From ed6bf44c1ba819d0d0793a0fcd58a1e12d180430 Mon Sep 17 00:00:00 2001 From: Tiankai Ma Date: Sun, 21 Jun 2026 20:54:51 +0800 Subject: [PATCH 01/10] chore: sync openapi from server --- Makefile | 2 +- api/openapi.json | 29363 ++++++++++++++++--------- internal/cmd/apicmd/api_paths_gen.go | 8 +- 3 files changed, 18530 insertions(+), 10843 deletions(-) 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/api/openapi.json b/api/openapi.json index 012853b..d61604a 100644 --- a/api/openapi.json +++ b/api/openapi.json @@ -3,24 +3,22 @@ "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" } ], "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,15 +35,21 @@ }, "options": { "operationId": "options-.well-known-oauth-authorization-server", - "summary": "", - "description": "", + "summary": "Compatibility alias for legacy clients that probe the root well-known path", "tags": [ "Api" ], - "parameters": [], "responses": { - "204": { - "description": "Response 204" + "307": { + "description": "Redirect", + "headers": { + "Location": { + "schema": { + "type": "string", + "format": "uri" + } + } + } } } } @@ -53,12 +57,10 @@ "/.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": "", + "summary": "Canonical RFC 8414 authorization server metadata for issuer `/api/auth`", "tags": [ "Api" ], - "parameters": [], "responses": { "200": { "description": "Response 200" @@ -67,15 +69,13 @@ }, "options": { "operationId": "options-.well-known-oauth-authorization-server-api-auth", - "summary": "", - "description": "", + "summary": "Canonical RFC 8414 authorization server metadata for issuer `/api/auth`", "tags": [ "Api" ], - "parameters": [], "responses": { - "204": { - "description": "Response 204" + "200": { + "description": "Response 200" } } } @@ -83,12 +83,10 @@ "/.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 clients that probe resource-path authorization-server metadata", "tags": [ "Api" ], - "parameters": [], "responses": { "307": { "description": "Redirect", @@ -105,15 +103,21 @@ }, "options": { "operationId": "options-.well-known-oauth-authorization-server-api-mcp", - "summary": "", - "description": "", + "summary": "Compatibility alias for clients that probe resource-path authorization-server metadata", "tags": [ "Api" ], - "parameters": [], "responses": { - "204": { - "description": "Response 204" + "307": { + "description": "Redirect", + "headers": { + "Location": { + "schema": { + "type": "string", + "format": "uri" + } + } + } } } } @@ -121,12 +125,10 @@ "/.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,15 +145,21 @@ }, "options": { "operationId": "options-.well-known-oauth-protected-resource", - "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" + } + } + } } } } @@ -159,12 +167,10 @@ "/.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": "", + "summary": "Canonical RFC 9728 protected resource metadata for MCP", "tags": [ "Api" ], - "parameters": [], "responses": { "200": { "description": "Response 200" @@ -173,15 +179,13 @@ }, "options": { "operationId": "options-.well-known-oauth-protected-resource-api-mcp", - "summary": "", - "description": "", + "summary": "Canonical RFC 9728 protected resource metadata for MCP", "tags": [ "Api" ], - "parameters": [], "responses": { - "204": { - "description": "Response 204" + "200": { + "description": "Response 200" } } } @@ -189,12 +193,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,15 +213,21 @@ }, "options": { "operationId": "options-.well-known-openid-configuration", - "summary": "", - "description": "", + "summary": "Compatibility alias for clients that look up root OpenID discovery directly", "tags": [ "Api" ], - "parameters": [], "responses": { - "204": { - "description": "Response 204" + "307": { + "description": "Redirect", + "headers": { + "Location": { + "schema": { + "type": "string", + "format": "uri" + } + } + } } } } @@ -227,12 +235,10 @@ "/.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": "", + "summary": "RFC 8414-compatible path form for OpenID provider metadata", "tags": [ "Api" ], - "parameters": [], "responses": { "200": { "description": "Response 200" @@ -241,15 +247,13 @@ }, "options": { "operationId": "options-.well-known-openid-configuration-api-auth", - "summary": "", - "description": "", + "summary": "RFC 8414-compatible path form for OpenID provider metadata", "tags": [ "Api" ], - "parameters": [], "responses": { - "204": { - "description": "Response 204" + "200": { + "description": "Response 200" } } } @@ -257,12 +261,10 @@ "/.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 probe resource-path OIDC metadata", "tags": [ "Api" ], - "parameters": [], "responses": { "307": { "description": "Redirect", @@ -279,15 +281,21 @@ }, "options": { "operationId": "options-.well-known-openid-configuration-api-mcp", - "summary": "", - "description": "", + "summary": "Compatibility alias for clients that probe resource-path OIDC metadata", "tags": [ "Api" ], - "parameters": [], "responses": { - "204": { - "description": "Response 204" + "307": { + "description": "Redirect", + "headers": { + "Location": { + "schema": { + "type": "string", + "format": "uri" + } + } + } } } } @@ -295,8 +303,7 @@ "/api/admin/comments": { "get": { "operationId": "listAdminComments", - "summary": "List moderation comments.", - "description": "", + "summary": "List moderation comments", "tags": [ "Admin" ], @@ -307,13 +314,13 @@ "schema": { "type": "string", "enum": [ + "all", "active", "softbanned", "deleted", "suspended" ] - }, - "required": false + } }, { "in": "query", @@ -321,8 +328,7 @@ "schema": { "type": "integer", "format": "int64" - }, - "required": false + } } ], "responses": { @@ -352,8 +358,7 @@ "/api/admin/comments/{id}": { "patch": { "operationId": "moderateAdminComment", - "summary": "Moderate one comment.", - "description": "", + "summary": "Moderate one comment", "tags": [ "Admin" ], @@ -365,10 +370,18 @@ "type": "string", "minLength": 1 }, - "required": true, - "example": "123" + "required": true } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/adminModerateCommentRequestSchema" + } + } + } + }, "responses": { "200": { "description": "Successful response", @@ -390,23 +403,13 @@ } } } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/adminModerateCommentRequestSchema" - } - } - } } } }, "/api/admin/descriptions": { "get": { "operationId": "listAdminDescriptions", - "summary": "List descriptions for moderation review.", - "description": "", + "summary": "List descriptions", "tags": [ "Admin" ], @@ -423,8 +426,7 @@ "teacher", "homework" ] - }, - "required": false + } }, { "in": "query", @@ -436,16 +438,14 @@ "withContent", "empty" ] - }, - "required": false + } }, { "in": "query", "name": "search", "schema": { "type": "string" - }, - "required": false + } }, { "in": "query", @@ -453,8 +453,7 @@ "schema": { "type": "integer", "format": "int64" - }, - "required": false + } } ], "responses": { @@ -484,8 +483,7 @@ "/api/admin/homeworks": { "get": { "operationId": "listAdminHomeworks", - "summary": "List moderation homeworks.", - "description": "", + "summary": "List moderation homeworks", "tags": [ "Admin" ], @@ -500,16 +498,14 @@ "active", "deleted" ] - }, - "required": false + } }, { "in": "query", "name": "search", "schema": { "type": "string" - }, - "required": false + } }, { "in": "query", @@ -517,8 +513,7 @@ "schema": { "type": "integer", "format": "int64" - }, - "required": false + } } ], "responses": { @@ -548,8 +543,7 @@ "/api/admin/homeworks/{id}": { "delete": { "operationId": "deleteAdminHomework", - "summary": "Soft delete one homework (admin).", - "description": "", + "summary": "Delete one homework", "tags": [ "Admin" ], @@ -561,8 +555,7 @@ "type": "string", "minLength": 1 }, - "required": true, - "example": "123" + "required": true } ], "responses": { @@ -592,12 +585,10 @@ "/api/admin/suspensions": { "get": { "operationId": "listAdminSuspensions", - "summary": "List suspensions.", - "description": "", + "summary": "List suspensions", "tags": [ "Admin" ], - "parameters": [], "responses": { "200": { "description": "Successful response", @@ -613,12 +604,19 @@ }, "post": { "operationId": "createAdminSuspension", - "summary": "List suspensions.", - "description": "", + "summary": "Create suspension for one user", "tags": [ "Admin" ], - "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/adminCreateSuspensionRequestSchema" + } + } + } + }, "responses": { "200": { "description": "Successful response", @@ -640,23 +638,13 @@ } } } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/adminCreateSuspensionRequestSchema" - } - } - } } } }, "/api/admin/suspensions/{id}": { "patch": { "operationId": "updateAdminSuspension", - "summary": "Lift one suspension.", - "description": "", + "summary": "Lift one suspension", "tags": [ "Admin" ], @@ -668,8 +656,7 @@ "type": "string", "minLength": 1 }, - "required": true, - "example": "123" + "required": true } ], "responses": { @@ -699,8 +686,7 @@ "/api/admin/users": { "get": { "operationId": "listAdminUsers", - "summary": "List users for admin console.", - "description": "", + "summary": "List users", "tags": [ "Admin" ], @@ -710,8 +696,7 @@ "name": "search", "schema": { "type": "string" - }, - "required": false + } }, { "in": "query", @@ -719,8 +704,7 @@ "schema": { "type": "integer", "format": "int64" - }, - "required": false + } }, { "in": "query", @@ -728,8 +712,7 @@ "schema": { "type": "integer", "format": "int64" - }, - "required": false + } } ], "responses": { @@ -759,8 +742,7 @@ "/api/admin/users/{id}": { "patch": { "operationId": "updateAdminUser", - "summary": "Update one user.", - "description": "", + "summary": "Update one user", "tags": [ "Admin" ], @@ -772,10 +754,18 @@ "type": "string", "minLength": 1 }, - "required": true, - "example": "123" + "required": true } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/adminUpdateUserRequestSchema" + } + } + } + }, "responses": { "200": { "description": "Successful response", @@ -797,27 +787,16 @@ } } } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/adminUpdateUserRequestSchema" - } - } - } } } }, "/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": "", + "summary": "OpenID Connect discovery metadata for issuer `/api/auth`", "tags": [ "Api" ], - "parameters": [], "responses": { "200": { "description": "Response 200" @@ -826,213 +805,218 @@ }, "options": { "operationId": "options-api-auth-.well-known-openid-configuration", - "summary": "", - "description": "", + "summary": "OpenID Connect discovery metadata for issuer `/api/auth`", "tags": [ "Api" ], - "parameters": [], "responses": { - "204": { - "description": "Response 204" + "200": { + "description": "Response 200" } } } }, - "/api/auth/{auth}": { - "get": { - "operationId": "getAuth", - "summary": "", - "description": "", - "tags": [ - "Api" - ], - "parameters": [], - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": { - "schema": {} - } - } - } - } - }, + "/api/auth/oauth2/device-authorization": { "post": { - "operationId": "createAuth", - "summary": "", - "description": "", + "operationId": "post-api-auth-oauth2-device-authorization", + "summary": "Start OAuth 2.0 device authorization", "tags": [ "Api" ], - "parameters": [], "responses": { "200": { - "description": "Successful response", + "description": "Response 200" + }, + "400": { + "description": "Error response", "content": { "application/json": { - "schema": {} + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } } } } } - }, - "put": { - "operationId": "setAuth", - "summary": "", - "description": "", + } + }, + "/api/auth/oauth2/token": { + "get": { + "operationId": "get-api-auth-oauth2-token", + "summary": "Return method guidance for OAuth token clients", "tags": [ "Api" ], - "parameters": [], "responses": { - "200": { - "description": "Successful response", + "405": { + "description": "Error response", "content": { "application/json": { - "schema": {} + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } } } } } }, - "patch": { - "operationId": "updateAuth", - "summary": "", - "description": "", + "post": { + "operationId": "post-api-auth-oauth2-token", + "summary": "Exchange OAuth 2.0 authorization/device/refresh grants for tokens", "tags": [ "Api" ], - "parameters": [], "responses": { "200": { - "description": "Successful response", + "description": "Response 200" + }, + "400": { + "description": "Error response", "content": { "application/json": { - "schema": {} + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } } } - } - } - }, - "delete": { - "operationId": "deleteAuth", - "summary": "", - "description": "", - "tags": [ - "Api" - ], - "parameters": [], - "responses": { - "200": { - "description": "Successful response", + }, + "401": { + "description": "Error response", "content": { "application/json": { - "schema": {} + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } } } } } } }, - "/api/auth/oauth2/device-authorization": { - "post": { - "operationId": "post-api-auth-oauth2-device-authorization", - "summary": "", - "description": "", + "/api/bus": { + "get": { + "operationId": "queryBus", + "summary": "Query shuttle buses", "tags": [ - "Api" + "Bus" ], - "parameters": [], - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": { - "schema": {} - } + "parameters": [ + { + "in": "query", + "name": "versionKey", + "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": {} + "schema": { + "$ref": "#/components/schemas/busQueryResponseSchema" + } } } - } - } - } - }, - "/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": {} - } - } - } - } - }, - "post": { - "operationId": "post-api-auth-oauth2-token", - "summary": "", - "description": "", - "tags": [ - "Api" - ], - "parameters": [], - "responses": { - "200": { - "description": "Successful response", + }, + "400": { + "description": "Error response", "content": { "application/json": { - "schema": {} + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } } } } } } }, - "/api/bus": { + "/api/bus/next": { "get": { - "operationId": "queryBus", - "summary": "Public shuttle-bus query API.", - "description": "", + "operationId": "get-api-bus-next", + "summary": "Get next shuttle bus departures for an origin and destination campus", "tags": [ "Bus" ], "parameters": [ + { + "in": "query", + "name": "originCampusId", + "schema": { + "type": "integer", + "format": "int64" + }, + "required": true + }, + { + "in": "query", + "name": "destinationCampusId", + "schema": { + "type": "integer", + "format": "int64" + }, + "required": true + }, + { + "in": "query", + "name": "atTime", + "schema": { + "type": "string", + "minLength": 1 + } + }, + { + "in": "query", + "name": "dayType", + "schema": { + "type": "string", + "enum": [ + "auto", + "weekday", + "weekend" + ] + } + }, + { + "in": "query", + "name": "includeDeparted", + "schema": { + "type": "string", + "enum": [ + "true", + "false" + ] + } + }, + { + "in": "query", + "name": "limit", + "schema": { + "type": "integer", + "format": "int64" + } + }, { "in": "query", "name": "versionKey", "schema": { "type": "string", "minLength": 1 - }, - "required": false + } + }, + { + "in": "query", + "name": "locale", + "schema": { + "type": "string", + "enum": [ + "en-us", + "zh-cn" + ] + } } ], "responses": { @@ -1041,7 +1025,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/busQueryResponseSchema" + "$ref": "#/components/schemas/busNextDeparturesResponseSchema" } } } @@ -1055,6 +1039,16 @@ } } } + }, + "404": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } } } } @@ -1062,12 +1056,10 @@ "/api/bus/preferences": { "get": { "operationId": "getBusPreferences", - "summary": "Get bus preferences for the current user.", - "description": "", + "summary": "Get bus preferences", "tags": [ "Bus" ], - "parameters": [], "responses": { "200": { "description": "Successful response", @@ -1093,12 +1085,19 @@ }, "post": { "operationId": "setBusPreferences", - "summary": "Get bus preferences for the current user.", - "description": "", + "summary": "Update bus preferences", "tags": [ "Bus" ], - "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/busPreferenceRequestSchema" + } + } + } + }, "responses": { "200": { "description": "Successful response", @@ -1130,34 +1129,60 @@ } } } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/busPreferenceRequestSchema" - } - } - } } } }, - "/api/calendar-subscriptions": { - "post": { - "operationId": "setCalendarSubscription", - "summary": "Replace the current user's section subscriptions.", - "description": "", + "/api/bus/routes": { + "get": { + "operationId": "get-api-bus-routes", + "summary": "Search shuttle bus route variants", "tags": [ - "Calendar" + "Bus" + ], + "parameters": [ + { + "in": "query", + "name": "originCampusId", + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "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" + ] + } + } ], - "parameters": [], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/calendarSubscriptionCreateResponseSchema" + "$ref": "#/components/schemas/busRouteSearchResponseSchema" } } } @@ -1171,40 +1196,48 @@ } } } - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/calendarSubscriptionCreateRequestSchema" + }, + "404": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } } } } } } }, - "/api/calendar-subscriptions/current": { - "get": { - "operationId": "getCurrentCalendarSubscription", - "summary": "Get the current user's section subscriptions.", - "description": "", + "/api/calendar-subscriptions": { + "post": { + "operationId": "setCalendarSubscription", + "summary": "Replace section subscriptions", "tags": [ "Calendar" ], - "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/calendarSubscriptionCreateRequestSchema" + } + } + } + }, "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/currentCalendarSubscriptionResponseSchema" + "$ref": "#/components/schemas/calendarSubscriptionCreateResponseSchema" } } } }, - "401": { + "400": { "description": "Error response", "content": { "application/json": { @@ -1217,56 +1250,12 @@ } } }, - "/api/comments": { + "/api/calendar-subscriptions/current": { "get": { - "operationId": "listComments", - "summary": "List comments for a target.", - "description": "", + "operationId": "getCurrentCalendarSubscription", + "summary": "Get section subscriptions", "tags": [ - "Comments" - ], - "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 - }, - { - "in": "query", - "name": "sectionId", - "schema": { - "type": "integer", - "format": "int64" - }, - "required": false - }, - { - "in": "query", - "name": "teacherId", - "schema": { - "type": "integer", - "format": "int64" - }, - "required": false - } + "Calendar" ], "responses": { "200": { @@ -1274,12 +1263,12 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/commentsListResponseSchema" + "$ref": "#/components/schemas/currentCalendarSubscriptionResponseSchema" } } } }, - "400": { + "401": { "description": "Error response", "content": { "application/json": { @@ -1290,16 +1279,77 @@ } } } - }, + } + }, + "/api/calendar-subscriptions/import-codes": { "post": { - "operationId": "createComment", - "summary": "List comments for a target.", - "description": "", + "operationId": "post-api-calendar-subscriptions-import-codes", + "summary": "Import section subscriptions by section codes", "tags": [ - "Comments" + "Calendar" ], - "parameters": [ - { + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/matchSectionCodesRequestSchema" + } + } + } + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/calendarSubscriptionImportResponseSchema" + } + } + } + }, + "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/comments": { + "get": { + "operationId": "listComments", + "summary": "List comments", + "tags": [ + "Comments" + ], + "parameters": [ + { "in": "query", "name": "targetType", "schema": { @@ -1319,8 +1369,7 @@ "name": "targetId", "schema": { "type": "string" - }, - "required": false + } }, { "in": "query", @@ -1328,8 +1377,7 @@ "schema": { "type": "integer", "format": "int64" - }, - "required": false + } }, { "in": "query", @@ -1337,8 +1385,7 @@ "schema": { "type": "integer", "format": "int64" - }, - "required": false + } } ], "responses": { @@ -1347,7 +1394,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/idResponseSchema" + "$ref": "#/components/schemas/commentsListResponseSchema" } } } @@ -1362,7 +1409,14 @@ } } } - }, + } + }, + "post": { + "operationId": "createComment", + "summary": "Create one comment", + "tags": [ + "Comments" + ], "requestBody": { "content": { "application/json": { @@ -1371,14 +1425,65 @@ } } } + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/idResponseSchema" + } + } + } + }, + "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/comments/{id}": { "get": { "operationId": "getComment", - "summary": "Get one comment thread by comment ID.", - "description": "", + "summary": "Get comment thread", "tags": [ "Comments" ], @@ -1390,8 +1495,7 @@ "type": "string", "minLength": 1 }, - "required": true, - "example": "123" + "required": true } ], "responses": { @@ -1419,8 +1523,7 @@ }, "patch": { "operationId": "updateComment", - "summary": "Get one comment thread by comment ID.", - "description": "", + "summary": "Update one comment", "tags": [ "Comments" ], @@ -1432,10 +1535,18 @@ "type": "string", "minLength": 1 }, - "required": true, - "example": "123" + "required": true } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/commentUpdateRequestSchema" + } + } + } + }, "responses": { "200": { "description": "Successful response", @@ -1457,7 +1568,7 @@ } } }, - "404": { + "401": { "description": "Error response", "content": { "application/json": { @@ -1466,13 +1577,24 @@ } } } - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/commentUpdateRequestSchema" + }, + "403": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + }, + "404": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } } } } @@ -1480,8 +1602,7 @@ }, "delete": { "operationId": "deleteComment", - "summary": "Get one comment thread by comment ID.", - "description": "", + "summary": "Delete one comment", "tags": [ "Comments" ], @@ -1493,8 +1614,7 @@ "type": "string", "minLength": 1 }, - "required": true, - "example": "123" + "required": true } ], "responses": { @@ -1508,7 +1628,7 @@ } } }, - "400": { + "401": { "description": "Error response", "content": { "application/json": { @@ -1518,7 +1638,7 @@ } } }, - "404": { + "403": { "description": "Error response", "content": { "application/json": { @@ -1527,13 +1647,14 @@ } } } - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/commentUpdateRequestSchema" + }, + "404": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } } } } @@ -1543,8 +1664,7 @@ "/api/comments/{id}/reactions": { "post": { "operationId": "addCommentReaction", - "summary": "Add one reaction to a comment.", - "description": "", + "summary": "Add one reaction to a comment", "tags": [ "Comments" ], @@ -1556,10 +1676,18 @@ "type": "string", "minLength": 1 }, - "required": true, - "example": "123" + "required": true } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/commentReactionRequestSchema" + } + } + } + }, "responses": { "200": { "description": "Successful response", @@ -1571,21 +1699,11 @@ } } } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/commentReactionRequestSchema" - } - } - } } }, "delete": { "operationId": "removeCommentReaction", - "summary": "Add one reaction to a comment.", - "description": "", + "summary": "Remove one reaction from a comment", "tags": [ "Comments" ], @@ -1597,8 +1715,7 @@ "type": "string", "minLength": 1 }, - "required": true, - "example": "123" + "required": true }, { "in": "query", @@ -1630,23 +1747,13 @@ } } } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/commentReactionRequestSchema" - } - } - } } } }, "/api/courses": { "get": { "operationId": "listCourses", - "summary": "List courses with search and pagination.", - "description": "", + "summary": "List courses", "tags": [ "Courses" ], @@ -1657,7 +1764,7 @@ "schema": { "type": "string" }, - "required": false + "example": "IS3003" }, { "in": "query", @@ -1665,8 +1772,7 @@ "schema": { "type": "integer", "format": "int64" - }, - "required": false + } }, { "in": "query", @@ -1674,8 +1780,7 @@ "schema": { "type": "integer", "format": "int64" - }, - "required": false + } }, { "in": "query", @@ -1683,8 +1788,7 @@ "schema": { "type": "integer", "format": "int64" - }, - "required": false + } }, { "in": "query", @@ -1693,7 +1797,7 @@ "type": "integer", "format": "int64" }, - "required": false + "example": 1 }, { "in": "query", @@ -1702,7 +1806,7 @@ "type": "integer", "format": "int64" }, - "required": false + "example": 20 } ], "responses": { @@ -1712,6 +1816,102 @@ "application/json": { "schema": { "$ref": "#/components/schemas/paginatedCourseResponseSchema" + }, + "example": { + "data": [ + { + "id": 1001, + "jwId": 9901001, + "code": "IS3003", + "nameCn": "密码工程原理与实践", + "nameEn": "Cryptographic Engineering: Principles and Practice", + "categoryId": 402, + "classTypeId": 403, + "classifyId": 404, + "educationLevelId": 401, + "gradationId": 405, + "typeId": 406, + "category": { + "id": 402, + "nameCn": "学科基础课", + "nameEn": "Disciplinary Foundation" + }, + "classType": { + "id": 403, + "nameCn": "理论课", + "nameEn": "Lecture" + }, + "classify": { + "id": 404, + "nameCn": "必修", + "nameEn": "Required" + }, + "educationLevel": { + "id": 401, + "nameCn": "本科生", + "nameEn": "Undergraduate" + }, + "gradation": { + "id": 405, + "nameCn": "进阶", + "nameEn": "Advanced" + }, + "type": { + "id": 406, + "nameCn": "专业核心", + "nameEn": "Core Major" + } + }, + { + "id": 1002, + "jwId": 9901002, + "code": "ASTRON1501", + "nameCn": "天体物理概观", + "nameEn": "Introduction to Astrophysics", + "categoryId": 402, + "classTypeId": 403, + "classifyId": 404, + "educationLevelId": 401, + "gradationId": 405, + "typeId": 406, + "category": { + "id": 402, + "nameCn": "学科基础课", + "nameEn": "Disciplinary Foundation" + }, + "classType": { + "id": 403, + "nameCn": "理论课", + "nameEn": "Lecture" + }, + "classify": { + "id": 404, + "nameCn": "必修", + "nameEn": "Required" + }, + "educationLevel": { + "id": 401, + "nameCn": "本科生", + "nameEn": "Undergraduate" + }, + "gradation": { + "id": 405, + "nameCn": "进阶", + "nameEn": "Advanced" + }, + "type": { + "id": 406, + "nameCn": "专业核心", + "nameEn": "Core Major" + } + } + ], + "pagination": { + "page": 1, + "pageSize": 20, + "total": 4, + "totalPages": 1 + } } } } @@ -1732,8 +1932,7 @@ "/api/courses/{jwId}": { "get": { "operationId": "getCourse", - "summary": "Get course detail by JW ID.", - "description": "", + "summary": "Get course", "tags": [ "Courses" ], @@ -1746,7 +1945,7 @@ "format": "int64" }, "required": true, - "example": "123" + "example": 9901001 } ], "responses": { @@ -1756,17 +1955,151 @@ "application/json": { "schema": { "$ref": "#/components/schemas/courseDetailSchema" - } - } - } - }, - "404": { - "description": "Error response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/openApiErrorSchema" - } + }, + "example": { + "id": 1001, + "jwId": 9901001, + "code": "IS3003", + "nameCn": "密码工程原理与实践", + "nameEn": "Cryptographic Engineering: Principles and Practice", + "categoryId": 402, + "classTypeId": 403, + "classifyId": 404, + "educationLevelId": 401, + "gradationId": 405, + "typeId": 406, + "category": { + "id": 402, + "nameCn": "学科基础课", + "nameEn": "Disciplinary Foundation" + }, + "classType": { + "id": 403, + "nameCn": "理论课", + "nameEn": "Lecture" + }, + "classify": { + "id": 404, + "nameCn": "必修", + "nameEn": "Required" + }, + "educationLevel": { + "id": 401, + "nameCn": "本科生", + "nameEn": "Undergraduate" + }, + "gradation": { + "id": 405, + "nameCn": "进阶", + "nameEn": "Advanced" + }, + "type": { + "id": 406, + "nameCn": "专业核心", + "nameEn": "Core Major" + }, + "sections": [ + { + "id": 2001, + "jwId": 9902001, + "code": "IS3003.01", + "bizTypeId": null, + "credits": 2.5, + "period": 48, + "periodsPerWeek": 4, + "timesPerWeek": 2, + "stdCount": 58, + "limitCount": 80, + "graduateAndPostgraduate": false, + "dateTimePlaceText": "周一 3-4节, 一教101", + "dateTimePlacePersonText": null, + "actualPeriods": 48, + "theoryPeriods": 32, + "practicePeriods": 16, + "experimentPeriods": null, + "machinePeriods": null, + "designPeriods": null, + "testPeriods": null, + "scheduleState": "scheduled", + "suggestScheduleWeeks": null, + "suggestScheduleWeekInfo": "1-16周", + "scheduleJsonParams": null, + "selectedStdCount": 58, + "remark": "结合密码协议与工程实现,强调课堂演示和实验复盘。", + "scheduleRemark": null, + "courseId": 1001, + "semesterId": 701, + "campusId": 201, + "examModeId": 602, + "openDepartmentId": 501, + "teachLanguageId": 601, + "roomTypeId": 303, + "semester": { + "id": 701, + "jwId": 9900001, + "nameCn": "2026年春季学期", + "code": "421", + "startDate": "2026-02-23T00:00:00+08:00", + "endDate": "2026-07-05T00:00:00+08:00" + }, + "campus": { + "id": 201, + "jwId": 9910001, + "nameCn": "东校区", + "nameEn": "East Campus", + "code": "EAST" + }, + "teachers": [ + { + "id": 8001, + "personId": null, + "teacherId": null, + "code": "T2401001", + "nameCn": "林璟锵", + "nameEn": "Lin Jingqiang", + "age": null, + "email": "jqlin@ustc.edu.cn", + "telephone": null, + "mobile": "13800001111", + "address": null, + "postcode": null, + "qq": null, + "wechat": null, + "departmentId": 501, + "teacherTitleId": 801 + }, + { + "id": 8002, + "personId": null, + "teacherId": null, + "code": "T2401002", + "nameCn": "王伟", + "nameEn": "Wang Wei", + "age": null, + "email": "wangwei@ustc.edu.cn", + "telephone": null, + "mobile": "13800002222", + "address": null, + "postcode": null, + "qq": null, + "wechat": null, + "departmentId": 501, + "teacherTitleId": 801 + } + ] + } + ] + } + } + } + }, + "404": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } } } } @@ -1776,12 +2109,20 @@ "/api/dashboard-links/pin": { "post": { "operationId": "pinDashboardLink", - "summary": "Pin or unpin one dashboard link for the current user.", - "description": "", + "summary": "Pin dashboard link", "tags": [ "DashboardLinks" ], - "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "$ref": "#/components/schemas/dashboardLinkPinRequestSchema" + } + } + } + }, "responses": { "303": { "description": "Redirect after pin/unpin", @@ -1794,24 +2135,13 @@ } } } - }, - "requestBody": { - "required": true, - "content": { - "application/x-www-form-urlencoded": { - "schema": { - "$ref": "#/components/schemas/dashboardLinkPinRequestSchema" - } - } - } } } }, "/api/dashboard-links/visit": { "get": { "operationId": "visitDashboardLink", - "summary": "Redirect to one dashboard link without side effects.", - "description": "", + "summary": "Preview dashboard link", "tags": [ "DashboardLinks" ], @@ -1842,22 +2172,20 @@ }, "post": { "operationId": "recordDashboardLinkVisit", - "summary": "Redirect to one dashboard link without side effects.", - "description": "", + "summary": "Record one dashboard link visit and redirect", "tags": [ "DashboardLinks" ], - "parameters": [ - { - "in": "query", - "name": "slug", - "schema": { - "type": "string", - "minLength": 1 - }, - "required": true + "requestBody": { + "required": true, + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "$ref": "#/components/schemas/dashboardLinkVisitRequestSchema" + } + } } - ], + }, "responses": { "303": { "description": "Redirect after recording link click", @@ -1870,24 +2198,13 @@ } } } - }, - "requestBody": { - "required": true, - "content": { - "application/x-www-form-urlencoded": { - "schema": { - "$ref": "#/components/schemas/dashboardLinkVisitRequestSchema" - } - } - } } } }, "/api/descriptions": { "get": { "operationId": "getDescription", - "summary": "Get description and history by target.", - "description": "", + "summary": "Get description history", "tags": [ "Descriptions" ], @@ -1941,36 +2258,19 @@ }, "post": { "operationId": "upsertDescription", - "summary": "Get description and history by target.", - "description": "", + "summary": "Upsert description", "tags": [ "Descriptions" ], - "parameters": [ - { - "in": "query", - "name": "targetType", - "schema": { - "type": "string", - "enum": [ - "section", - "course", - "teacher", - "homework" - ] - }, - "required": true - }, - { - "in": "query", - "name": "targetId", - "schema": { - "type": "string", - "minLength": 1 - }, - "required": true + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/descriptionUpsertRequestSchema" + } + } } - ], + }, "responses": { "200": { "description": "Successful response", @@ -1991,13 +2291,34 @@ } } } - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/descriptionUpsertRequestSchema" + }, + "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" + } } } } @@ -2007,8 +2328,7 @@ "/api/homeworks": { "get": { "operationId": "listHomeworks", - "summary": "List homeworks by section.", - "description": "", + "summary": "List homeworks", "tags": [ "Homeworks" ], @@ -2019,8 +2339,7 @@ "schema": { "type": "integer", "format": "int64" - }, - "required": false + } }, { "in": "query", @@ -2028,8 +2347,7 @@ "schema": { "type": "string", "minLength": 1 - }, - "required": false + } }, { "in": "query", @@ -2040,8 +2358,7 @@ "true", "false" ] - }, - "required": false + } } ], "responses": { @@ -2069,50 +2386,26 @@ }, "post": { "operationId": "createHomework", - "summary": "List homeworks by section.", - "description": "", + "summary": "Create one homework", "tags": [ "Homeworks" ], - "parameters": [ - { - "in": "query", - "name": "sectionId", - "schema": { - "type": "integer", - "format": "int64" - }, - "required": false - }, - { - "in": "query", - "name": "sectionIds", - "schema": { - "type": "string", - "minLength": 1 - }, - "required": false - }, - { - "in": "query", - "name": "includeDeleted", - "schema": { - "type": "string", - "enum": [ - "true", - "false" - ] - }, - "required": false + "requestBody": { + "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" } } } @@ -2126,13 +2419,34 @@ } } } - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/homeworkCreateRequestSchema" + }, + "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" + } } } } @@ -2142,8 +2456,7 @@ "/api/homeworks/{id}": { "patch": { "operationId": "updateHomework", - "summary": "Update one homework.", - "description": "", + "summary": "Update one homework", "tags": [ "Homeworks" ], @@ -2155,17 +2468,25 @@ "type": "string", "minLength": 1 }, - "required": true, - "example": "123" + "required": true } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/homeworkUpdateRequestSchema" + } + } + } + }, "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/successResponseSchema" + "$ref": "#/components/schemas/homeworkUpdateResponseSchema" } } } @@ -2179,35 +2500,54 @@ } } } - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/homeworkUpdateRequestSchema" + }, + "401": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } } } - } - } - }, - "delete": { - "operationId": "deleteHomework", - "summary": "Update one homework.", - "description": "", - "tags": [ - "Homeworks" - ], - "parameters": [ - { + }, + "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": "deleteHomework", + "summary": "Soft delete one homework", + "tags": [ + "Homeworks" + ], + "parameters": [ + { "in": "path", "name": "id", "schema": { "type": "string", "minLength": 1 }, - "required": true, - "example": "123" + "required": true } ], "responses": { @@ -2221,7 +2561,7 @@ } } }, - "400": { + "401": { "description": "Error response", "content": { "application/json": { @@ -2231,7 +2571,7 @@ } } }, - "404": { + "403": { "description": "Error response", "content": { "application/json": { @@ -2240,13 +2580,14 @@ } } } - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/homeworkUpdateRequestSchema" + }, + "404": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } } } } @@ -2256,8 +2597,7 @@ "/api/homeworks/{id}/completion": { "put": { "operationId": "setHomeworkCompletion", - "summary": "Update completion state for one homework.", - "description": "", + "summary": "Update homework completion", "tags": [ "Homeworks" ], @@ -2269,10 +2609,18 @@ "type": "string", "minLength": 1 }, - "required": true, - "example": "123" + "required": true } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/homeworkCompletionRequestSchema" + } + } + } + }, "responses": { "200": { "description": "Successful response", @@ -2293,13 +2641,74 @@ } } } + }, + "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/homeworks/completions": { + "put": { + "operationId": "put-api-homeworks-completions", + "summary": "Update homework completions in a batch", + "tags": [ + "Homeworks" + ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/homeworkCompletionRequestSchema" + "$ref": "#/components/schemas/homeworkCompletionBatchRequestSchema" + } + } + } + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/homeworkCompletionBatchResponseSchema" + } + } + } + }, + "400": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + }, + "401": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } } } } @@ -2309,12 +2718,19 @@ "/api/locale": { "post": { "operationId": "setLocale", - "summary": "Update user locale cookie.", - "description": "", + "summary": "Update user locale cookie", "tags": [ "Locale" ], - "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/localeUpdateRequestSchema" + } + } + } + }, "responses": { "200": { "description": "Successful response", @@ -2336,33 +2752,27 @@ } } } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/localeUpdateRequestSchema" - } - } - } } } }, "/api/mcp": { "get": { "operationId": "listMcp", - "summary": "", - "description": "", + "summary": "Open an MCP Streamable HTTP transport session", "tags": [ "Api" ], - "parameters": [], "responses": { "200": { - "description": "Successful response", + "description": "Response 200" + }, + "401": { + "description": "Error response", "content": { "application/json": { - "schema": {} + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } } } } @@ -2370,18 +2780,21 @@ }, "post": { "operationId": "createMcp", - "summary": "", - "description": "", + "summary": "Send an MCP Streamable HTTP JSON-RPC message", "tags": [ "Api" ], - "parameters": [], "responses": { "200": { - "description": "Successful response", + "description": "Response 200" + }, + "401": { + "description": "Error response", "content": { "application/json": { - "schema": {} + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } } } } @@ -2389,18 +2802,21 @@ }, "delete": { "operationId": "delete-api-mcp", - "summary": "", - "description": "", + "summary": "Close an MCP Streamable HTTP transport session", "tags": [ "Api" ], - "parameters": [], "responses": { "200": { - "description": "Successful response", + "description": "Response 200" + }, + "401": { + "description": "Error response", "content": { "application/json": { - "schema": {} + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } } } } @@ -2408,20 +2824,13 @@ }, "options": { "operationId": "options-api-mcp", - "summary": "", - "description": "", + "summary": "Return MCP transport CORS preflight headers", "tags": [ "Api" ], - "parameters": [], "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": { - "schema": {} - } - } + "204": { + "description": "Response 204" } } } @@ -2429,12 +2838,10 @@ "/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": "", + "summary": "MCP resource-relative authorization server metadata compatibility alias", "tags": [ "Api" ], - "parameters": [], "responses": { "307": { "description": "Redirect", @@ -2451,15 +2858,21 @@ }, "options": { "operationId": "options-api-mcp-.well-known-oauth-authorization-server", - "summary": "", - "description": "", + "summary": "MCP resource-relative authorization server metadata compatibility alias", "tags": [ "Api" ], - "parameters": [], "responses": { - "204": { - "description": "Response 204" + "307": { + "description": "Redirect", + "headers": { + "Location": { + "schema": { + "type": "string", + "format": "uri" + } + } + } } } } @@ -2467,12 +2880,10 @@ "/api/mcp/.well-known/openid-configuration": { "get": { "operationId": "get-api-mcp-.well-known-openid-configuration", - "summary": "Compatibility alias for clients that probe OIDC metadata relative to /api/mcp.", - "description": "", + "summary": "MCP resource-relative OpenID discovery compatibility alias", "tags": [ "Api" ], - "parameters": [], "responses": { "307": { "description": "Redirect", @@ -2489,15 +2900,21 @@ }, "options": { "operationId": "options-api-mcp-.well-known-openid-configuration", - "summary": "", - "description": "", + "summary": "MCP resource-relative OpenID discovery compatibility alias", "tags": [ "Api" ], - "parameters": [], "responses": { - "204": { - "description": "Response 204" + "307": { + "description": "Redirect", + "headers": { + "Location": { + "schema": { + "type": "string", + "format": "uri" + } + } + } } } } @@ -2505,12 +2922,10 @@ "/api/me": { "get": { "operationId": "getMe", - "summary": "Return the authenticated user's profile.", - "description": "", + "summary": "Get current user", "tags": [ "Me" ], - "parameters": [], "responses": { "200": { "description": "Successful response", @@ -2535,22 +2950,67 @@ } } }, - "/api/me/subscriptions/homeworks": { + "/api/me/overview": { "get": { - "operationId": "getSubscribedHomeworks", - "summary": "List homeworks for all subscribed sections in a single call.", - "description": "", + "operationId": "get-api-me-overview", + "summary": "Get a compact current-user overview for lightweight clients", "tags": [ "Me" ], - "parameters": [], + "parameters": [ + { + "in": "query", + "name": "atTime", + "schema": { + "type": "string", + "minLength": 1 + } + }, + { + "in": "query", + "name": "homeworkWindowDays", + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "in": "query", + "name": "limit", + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "in": "query", + "name": "locale", + "schema": { + "type": "string", + "enum": [ + "en-us", + "zh-cn" + ] + } + } + ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/subscribedHomeworksResponseSchema" + "$ref": "#/components/schemas/compactOverviewResponseSchema" + } + } + } + }, + "400": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" } } } @@ -2568,38 +3028,228 @@ } } }, - "/api/metadata": { + "/api/me/subscriptions/homeworks": { "get": { - "operationId": "getMetadata", - "summary": "Get metadata dictionaries for filters.", - "description": "", + "operationId": "getSubscribedHomeworks", + "summary": "List subscribed homeworks", "tags": [ - "Metadata" + "Me" ], - "parameters": [], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/metadataResponseSchema" + "$ref": "#/components/schemas/subscribedHomeworksResponseSchema" } } } - } - } - } - }, - "/api/openapi": { - "get": { - "operationId": "getOpenApiSpec", - "summary": "Get generated OpenAPI document.", - "description": "", + }, + "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" + ], + "parameters": [ + { + "in": "query", + "name": "dateFrom", + "schema": { + "type": "string", + "minLength": 1 + } + }, + { + "in": "query", + "name": "dateTo", + "schema": { + "type": "string", + "minLength": 1 + } + }, + { + "in": "query", + "name": "weekday", + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "in": "query", + "name": "limit", + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "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/metadata": { + "get": { + "operationId": "getMetadata", + "summary": "Get metadata", + "tags": [ + "Metadata" + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/metadataResponseSchema" + }, + "example": { + "educationLevels": [ + { + "id": 401, + "nameCn": "本科生", + "nameEn": "Undergraduate" + } + ], + "courseCategories": [ + { + "id": 402, + "nameCn": "学科基础课", + "nameEn": "Disciplinary Foundation" + } + ], + "courseClassifies": [ + { + "id": 404, + "nameCn": "必修", + "nameEn": "Required" + } + ], + "classTypes": [ + { + "id": 403, + "nameCn": "理论课", + "nameEn": "Lecture" + } + ], + "courseTypes": [ + { + "id": 406, + "nameCn": "专业核心", + "nameEn": "Core Major" + } + ], + "courseGradations": [ + { + "id": 405, + "nameCn": "进阶", + "nameEn": "Advanced" + } + ], + "examModes": [ + { + "id": 602, + "nameCn": "闭卷", + "nameEn": "Closed Book" + } + ], + "teachLanguages": [ + { + "id": 601, + "nameCn": "中文", + "nameEn": "Chinese" + } + ], + "campuses": [ + { + "id": 201, + "jwId": 9910001, + "nameCn": "东校区", + "nameEn": "East Campus", + "code": "EAST", + "buildings": [ + { + "id": 301, + "jwId": 9910021, + "code": "BLDG-1", + "nameCn": "第一教学楼", + "nameEn": "Teaching Building 1", + "campusId": 201 + } + ] + } + ] + } + } + } + } + } + } + }, + "/api/openapi": { + "get": { + "operationId": "getOpenApiSpec", + "summary": "Get OpenAPI document", "tags": [ "OpenAPI" ], - "parameters": [], "responses": { "200": { "description": "Successful response", @@ -2617,8 +3267,7 @@ "/api/schedules": { "get": { "operationId": "listSchedules", - "summary": "List schedules with filters and pagination.", - "description": "", + "summary": "List schedules", "tags": [ "Schedules" ], @@ -2629,8 +3278,7 @@ "schema": { "type": "integer", "format": "int64" - }, - "required": false + } }, { "in": "query", @@ -2638,8 +3286,7 @@ "schema": { "type": "integer", "format": "int64" - }, - "required": false + } }, { "in": "query", @@ -2647,8 +3294,7 @@ "schema": { "type": "string", "minLength": 1 - }, - "required": false + } }, { "in": "query", @@ -2656,8 +3302,7 @@ "schema": { "type": "integer", "format": "int64" - }, - "required": false + } }, { "in": "query", @@ -2665,8 +3310,7 @@ "schema": { "type": "string", "minLength": 1 - }, - "required": false + } }, { "in": "query", @@ -2674,8 +3318,7 @@ "schema": { "type": "integer", "format": "int64" - }, - "required": false + } }, { "in": "query", @@ -2683,37 +3326,33 @@ "schema": { "type": "integer", "format": "int64" - }, - "required": false + } }, { "in": "query", "name": "weekday", "schema": { "type": "integer", - "format": "int64" - }, - "required": false + "format": "int64", + "minimum": 1, + "maximum": 7 + } }, { "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 + "minLength": 1 + } }, { "in": "query", "name": "dateTo", "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 + "minLength": 1 + } }, { "in": "query", @@ -2721,8 +3360,7 @@ "schema": { "type": "integer", "format": "int64" - }, - "required": false + } }, { "in": "query", @@ -2730,8 +3368,7 @@ "schema": { "type": "integer", "format": "int64" - }, - "required": false + } } ], "responses": { @@ -2761,8 +3398,7 @@ "/api/sections": { "get": { "operationId": "listSections", - "summary": "List sections with filters and pagination.", - "description": "", + "summary": "List sections", "tags": [ "Sections" ], @@ -2773,8 +3409,7 @@ "schema": { "type": "integer", "format": "int64" - }, - "required": false + } }, { "in": "query", @@ -2782,8 +3417,7 @@ "schema": { "type": "integer", "format": "int64" - }, - "required": false + } }, { "in": "query", @@ -2791,8 +3425,7 @@ "schema": { "type": "integer", "format": "int64" - }, - "required": false + } }, { "in": "query", @@ -2801,7 +3434,7 @@ "type": "integer", "format": "int64" }, - "required": false + "example": 9900001 }, { "in": "query", @@ -2809,8 +3442,7 @@ "schema": { "type": "integer", "format": "int64" - }, - "required": false + } }, { "in": "query", @@ -2818,8 +3450,7 @@ "schema": { "type": "integer", "format": "int64" - }, - "required": false + } }, { "in": "query", @@ -2827,8 +3458,7 @@ "schema": { "type": "integer", "format": "int64" - }, - "required": false + } }, { "in": "query", @@ -2837,7 +3467,7 @@ "type": "string", "minLength": 1 }, - "required": false + "example": "T2401001" }, { "in": "query", @@ -2845,23 +3475,21 @@ "schema": { "type": "string" }, - "required": false + "example": "IS3003" }, { "in": "query", "name": "ids", "schema": { "type": "string" - }, - "required": false + } }, { "in": "query", "name": "jwIds", "schema": { "type": "string" - }, - "required": false + } }, { "in": "query", @@ -2870,7 +3498,7 @@ "type": "integer", "format": "int64" }, - "required": false + "example": 1 }, { "in": "query", @@ -2879,7 +3507,7 @@ "type": "integer", "format": "int64" }, - "required": false + "example": 20 } ], "responses": { @@ -2889,6 +3517,112 @@ "application/json": { "schema": { "$ref": "#/components/schemas/paginatedSectionResponseSchema" + }, + "example": { + "data": [ + { + "id": 2001, + "jwId": 9902001, + "code": "IS3003.01", + "credits": 2.5, + "stdCount": 58, + "limitCount": 80, + "courseId": 1001, + "semesterId": 701, + "campusId": 201, + "openDepartmentId": 501, + "course": { + "id": 1001, + "jwId": 9901001, + "code": "IS3003", + "nameCn": "密码工程原理与实践", + "nameEn": "Cryptographic Engineering: Principles and Practice" + }, + "semester": { + "id": 701, + "jwId": 9900001, + "nameCn": "2026年春季学期", + "code": "421", + "startDate": "2026-02-23T00:00:00+08:00", + "endDate": "2026-07-05T00:00:00+08:00" + }, + "campus": { + "id": 201, + "jwId": 9910001, + "nameCn": "东校区", + "nameEn": "East Campus", + "code": "EAST" + }, + "teachers": [ + { + "id": 8001, + "personId": null, + "teacherId": null, + "code": "T2401001", + "nameCn": "林璟锵", + "nameEn": "Lin Jingqiang" + }, + { + "id": 8002, + "personId": null, + "teacherId": null, + "code": "T2401002", + "nameCn": "王伟", + "nameEn": "Wang Wei" + } + ] + }, + { + "id": 2002, + "jwId": 9902002, + "code": "ASTRON1501.01", + "credits": 2, + "stdCount": 33, + "limitCount": 60, + "courseId": 1002, + "semesterId": 701, + "campusId": 201, + "openDepartmentId": 501, + "course": { + "id": 1002, + "jwId": 9901002, + "code": "ASTRON1501", + "nameCn": "天体物理概观", + "nameEn": "Introduction to Astrophysics" + }, + "semester": { + "id": 701, + "jwId": 9900001, + "nameCn": "2026年春季学期", + "code": "421", + "startDate": "2026-02-23T00:00:00+08:00", + "endDate": "2026-07-05T00:00:00+08:00" + }, + "campus": { + "id": 201, + "jwId": 9910001, + "nameCn": "东校区", + "nameEn": "East Campus", + "code": "EAST" + }, + "teachers": [ + { + "id": 8002, + "personId": null, + "teacherId": null, + "code": "T2401002", + "nameCn": "王伟", + "nameEn": "Wang Wei" + } + ] + } + ], + "pagination": { + "page": 1, + "pageSize": 20, + "total": 4, + "totalPages": 1 + } } } } @@ -2909,8 +3643,7 @@ "/api/sections/{jwId}": { "get": { "operationId": "getSection", - "summary": "Get section detail by JW ID.", - "description": "", + "summary": "Get section", "tags": [ "Sections" ], @@ -2923,7 +3656,7 @@ "format": "int64" }, "required": true, - "example": "123" + "example": 9902001 } ], "responses": { @@ -2933,6 +3666,211 @@ "application/json": { "schema": { "$ref": "#/components/schemas/sectionDetailSchema" + }, + "example": { + "id": 2001, + "jwId": 9902001, + "code": "IS3003.01", + "bizTypeId": null, + "credits": 2.5, + "period": 48, + "periodsPerWeek": 4, + "timesPerWeek": 2, + "stdCount": 58, + "limitCount": 80, + "graduateAndPostgraduate": false, + "dateTimePlaceText": "周一 3-4节, 一教101", + "dateTimePlacePersonText": null, + "actualPeriods": 48, + "theoryPeriods": 32, + "practicePeriods": 16, + "experimentPeriods": null, + "machinePeriods": null, + "designPeriods": null, + "testPeriods": null, + "scheduleState": "scheduled", + "suggestScheduleWeeks": null, + "suggestScheduleWeekInfo": "1-16周", + "scheduleJsonParams": null, + "selectedStdCount": 58, + "remark": "结合密码协议与工程实现,强调课堂演示和实验复盘。", + "scheduleRemark": null, + "courseId": 1001, + "semesterId": 701, + "campusId": 201, + "examModeId": 602, + "openDepartmentId": 501, + "teachLanguageId": 601, + "roomTypeId": 303, + "course": { + "id": 1001, + "jwId": 9901001, + "code": "IS3003", + "nameCn": "密码工程原理与实践", + "nameEn": "Cryptographic Engineering: Principles and Practice", + "categoryId": 402, + "classTypeId": 403, + "classifyId": 404, + "educationLevelId": 401, + "gradationId": 405, + "typeId": 406, + "category": { + "id": 402, + "nameCn": "学科基础课", + "nameEn": "Disciplinary Foundation" + }, + "classType": { + "id": 403, + "nameCn": "理论课", + "nameEn": "Lecture" + }, + "classify": { + "id": 404, + "nameCn": "必修", + "nameEn": "Required" + }, + "educationLevel": { + "id": 401, + "nameCn": "本科生", + "nameEn": "Undergraduate" + }, + "gradation": { + "id": 405, + "nameCn": "进阶", + "nameEn": "Advanced" + }, + "type": { + "id": 406, + "nameCn": "专业核心", + "nameEn": "Core Major" + } + }, + "semester": { + "id": 701, + "jwId": 9900001, + "nameCn": "2026年春季学期", + "code": "421", + "startDate": "2026-02-23T00:00:00+08:00", + "endDate": "2026-07-05T00:00:00+08:00" + }, + "campus": { + "id": 201, + "jwId": 9910001, + "nameCn": "东校区", + "nameEn": "East Campus", + "code": "EAST" + }, + "openDepartment": { + "id": 501, + "code": "DPT-IS", + "nameCn": "网络空间安全学院", + "nameEn": "School of Cyber Science and Technology", + "isCollege": true + }, + "examMode": { + "id": 602, + "nameCn": "闭卷", + "nameEn": "Closed Book" + }, + "teachLanguage": { + "id": 601, + "nameCn": "中文", + "nameEn": "Chinese" + }, + "roomType": { + "id": 303, + "jwId": 9910011, + "code": "MULTIMEDIA", + "nameCn": "多媒体教室", + "nameEn": "Multimedia Classroom" + }, + "schedules": [], + "scheduleGroups": [], + "teachers": [ + { + "id": 8001, + "personId": null, + "teacherId": null, + "code": "T2401001", + "nameCn": "林璟锵", + "nameEn": "Lin Jingqiang", + "age": null, + "email": "jqlin@ustc.edu.cn", + "telephone": null, + "mobile": "13800001111", + "address": null, + "postcode": null, + "qq": null, + "wechat": null, + "departmentId": 501, + "teacherTitleId": 801, + "department": { + "id": 501, + "code": "DPT-IS", + "nameCn": "网络空间安全学院", + "nameEn": "School of Cyber Science and Technology", + "isCollege": true + }, + "teacherTitle": { + "id": 801, + "jwId": 9910041, + "code": "PROF", + "nameCn": "教授", + "nameEn": "Professor", + "enabled": true + } + }, + { + "id": 8002, + "personId": null, + "teacherId": null, + "code": "T2401002", + "nameCn": "王伟", + "nameEn": "Wang Wei", + "age": null, + "email": "wangwei@ustc.edu.cn", + "telephone": null, + "mobile": "13800002222", + "address": null, + "postcode": null, + "qq": null, + "wechat": null, + "departmentId": 501, + "teacherTitleId": 801, + "department": { + "id": 501, + "code": "DPT-IS", + "nameCn": "网络空间安全学院", + "nameEn": "School of Cyber Science and Technology", + "isCollege": true + }, + "teacherTitle": { + "id": 801, + "jwId": 9910041, + "code": "PROF", + "nameCn": "教授", + "nameEn": "Professor", + "enabled": true + } + } + ], + "teacherAssignments": [], + "exams": [], + "adminClasses": [ + { + "id": 101, + "jwId": 9910061, + "code": "CS-2022-01", + "grade": "2022", + "nameCn": "计算机01", + "nameEn": "CS Class 01", + "stdCount": 58, + "planCount": 60, + "enabled": true, + "abbrZh": "计01", + "abbrEn": "CS01" + } + ] } } } @@ -2953,8 +3891,7 @@ "/api/sections/{jwId}/calendar.ics": { "get": { "operationId": "getSectionCalendar", - "summary": "Generate calendar ICS for one section.", - "description": "", + "summary": "Generate section calendar", "tags": [ "Sections" ], @@ -2966,8 +3903,7 @@ "type": "integer", "format": "int64" }, - "required": true, - "example": "123" + "required": true } ], "responses": { @@ -2998,8 +3934,7 @@ "/api/sections/{jwId}/schedule-groups": { "get": { "operationId": "getSectionScheduleGroups", - "summary": "Get schedule groups for one section.", - "description": "", + "summary": "Get schedule groups", "tags": [ "Sections" ], @@ -3011,8 +3946,7 @@ "type": "integer", "format": "int64" }, - "required": true, - "example": "123" + "required": true } ], "responses": { @@ -3043,8 +3977,7 @@ "/api/sections/{jwId}/schedules": { "get": { "operationId": "getSectionSchedules", - "summary": "Get all schedules for one section.", - "description": "", + "summary": "Get section schedules", "tags": [ "Sections" ], @@ -3056,8 +3989,7 @@ "type": "integer", "format": "int64" }, - "required": true, - "example": "123" + "required": true } ], "responses": { @@ -3088,8 +4020,7 @@ "/api/sections/calendar.ics": { "get": { "operationId": "getSectionsCalendar", - "summary": "Generate calendar ICS for multiple sections.", - "description": "", + "summary": "Generate sections calendar", "tags": [ "Sections" ], @@ -3132,12 +4063,25 @@ "/api/sections/match-codes": { "post": { "operationId": "matchSectionCodes", - "summary": "Match section codes in one semester.", - "description": "", + "summary": "Match section codes", "tags": [ "Sections" ], - "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/matchSectionCodesRequestSchema" + }, + "example": { + "codes": [ + "IS3003.01", + "ASTRON1501.01" + ] + } + } + } + }, "responses": { "200": { "description": "Successful response", @@ -3145,26 +4089,293 @@ "application/json": { "schema": { "$ref": "#/components/schemas/matchSectionCodesResponseSchema" + }, + "example": { + "semester": { + "id": 701, + "nameCn": "2026年春季学期", + "code": "421" + }, + "matchedCodes": [ + "IS3003.01", + "ASTRON1501.01" + ], + "unmatchedCodes": [], + "suggestions": {}, + "sections": [ + { + "id": 2001, + "jwId": 9902001, + "code": "IS3003.01", + "bizTypeId": null, + "credits": 2.5, + "period": 48, + "periodsPerWeek": 4, + "timesPerWeek": 2, + "stdCount": 58, + "limitCount": 80, + "graduateAndPostgraduate": false, + "dateTimePlaceText": "周一 3-4节, 一教101", + "dateTimePlacePersonText": null, + "actualPeriods": 48, + "theoryPeriods": 32, + "practicePeriods": 16, + "experimentPeriods": null, + "machinePeriods": null, + "designPeriods": null, + "testPeriods": null, + "scheduleState": "scheduled", + "suggestScheduleWeeks": null, + "suggestScheduleWeekInfo": "1-16周", + "scheduleJsonParams": null, + "selectedStdCount": 58, + "remark": "结合密码协议与工程实现,强调课堂演示和实验复盘。", + "scheduleRemark": null, + "courseId": 1001, + "semesterId": 701, + "campusId": 201, + "examModeId": 602, + "openDepartmentId": 501, + "teachLanguageId": 601, + "roomTypeId": 303, + "course": { + "id": 1001, + "jwId": 9901001, + "code": "IS3003", + "nameCn": "密码工程原理与实践", + "nameEn": "Cryptographic Engineering: Principles and Practice", + "categoryId": 402, + "classTypeId": 403, + "classifyId": 404, + "educationLevelId": 401, + "gradationId": 405, + "typeId": 406, + "category": { + "id": 402, + "nameCn": "学科基础课", + "nameEn": "Disciplinary Foundation" + }, + "classType": { + "id": 403, + "nameCn": "理论课", + "nameEn": "Lecture" + }, + "classify": { + "id": 404, + "nameCn": "必修", + "nameEn": "Required" + }, + "educationLevel": { + "id": 401, + "nameCn": "本科生", + "nameEn": "Undergraduate" + }, + "gradation": { + "id": 405, + "nameCn": "进阶", + "nameEn": "Advanced" + }, + "type": { + "id": 406, + "nameCn": "专业核心", + "nameEn": "Core Major" + } + }, + "semester": { + "id": 701, + "jwId": 9900001, + "nameCn": "2026年春季学期", + "code": "421", + "startDate": "2026-02-23T00:00:00+08:00", + "endDate": "2026-07-05T00:00:00+08:00" + }, + "campus": { + "id": 201, + "jwId": 9910001, + "nameCn": "东校区", + "nameEn": "East Campus", + "code": "EAST" + }, + "openDepartment": { + "id": 501, + "code": "DPT-IS", + "nameCn": "网络空间安全学院", + "nameEn": "School of Cyber Science and Technology", + "isCollege": true + }, + "teachers": [ + { + "id": 8001, + "personId": null, + "teacherId": null, + "code": "T2401001", + "nameCn": "林璟锵", + "nameEn": "Lin Jingqiang", + "age": null, + "email": "jqlin@ustc.edu.cn", + "telephone": null, + "mobile": "13800001111", + "address": null, + "postcode": null, + "qq": null, + "wechat": null, + "departmentId": 501, + "teacherTitleId": 801 + }, + { + "id": 8002, + "personId": null, + "teacherId": null, + "code": "T2401002", + "nameCn": "王伟", + "nameEn": "Wang Wei", + "age": null, + "email": "wangwei@ustc.edu.cn", + "telephone": null, + "mobile": "13800002222", + "address": null, + "postcode": null, + "qq": null, + "wechat": null, + "departmentId": 501, + "teacherTitleId": 801 + } + ] + }, + { + "id": 2002, + "jwId": 9902002, + "code": "ASTRON1501.01", + "bizTypeId": null, + "credits": 2, + "period": 48, + "periodsPerWeek": 4, + "timesPerWeek": 2, + "stdCount": 33, + "limitCount": 60, + "graduateAndPostgraduate": false, + "dateTimePlaceText": "周一 3-4节, 一教101", + "dateTimePlacePersonText": null, + "actualPeriods": 48, + "theoryPeriods": 32, + "practicePeriods": 16, + "experimentPeriods": null, + "machinePeriods": null, + "designPeriods": null, + "testPeriods": null, + "scheduleState": "scheduled", + "suggestScheduleWeeks": null, + "suggestScheduleWeekInfo": "1-16周", + "scheduleJsonParams": null, + "selectedStdCount": 33, + "remark": "围绕天体物理基础主题组织阅读、讨论和期末考核。", + "scheduleRemark": null, + "courseId": 1002, + "semesterId": 701, + "campusId": 201, + "examModeId": 602, + "openDepartmentId": 501, + "teachLanguageId": 601, + "roomTypeId": 303, + "course": { + "id": 1002, + "jwId": 9901002, + "code": "ASTRON1501", + "nameCn": "天体物理概观", + "nameEn": "Introduction to Astrophysics", + "categoryId": 402, + "classTypeId": 403, + "classifyId": 404, + "educationLevelId": 401, + "gradationId": 405, + "typeId": 406, + "category": { + "id": 402, + "nameCn": "学科基础课", + "nameEn": "Disciplinary Foundation" + }, + "classType": { + "id": 403, + "nameCn": "理论课", + "nameEn": "Lecture" + }, + "classify": { + "id": 404, + "nameCn": "必修", + "nameEn": "Required" + }, + "educationLevel": { + "id": 401, + "nameCn": "本科生", + "nameEn": "Undergraduate" + }, + "gradation": { + "id": 405, + "nameCn": "进阶", + "nameEn": "Advanced" + }, + "type": { + "id": 406, + "nameCn": "专业核心", + "nameEn": "Core Major" + } + }, + "semester": { + "id": 701, + "jwId": 9900001, + "nameCn": "2026年春季学期", + "code": "421", + "startDate": "2026-02-23T00:00:00+08:00", + "endDate": "2026-07-05T00:00:00+08:00" + }, + "campus": { + "id": 201, + "jwId": 9910001, + "nameCn": "东校区", + "nameEn": "East Campus", + "code": "EAST" + }, + "openDepartment": { + "id": 501, + "code": "DPT-IS", + "nameCn": "网络空间安全学院", + "nameEn": "School of Cyber Science and Technology", + "isCollege": true + }, + "teachers": [ + { + "id": 8002, + "personId": null, + "teacherId": null, + "code": "T2401002", + "nameCn": "王伟", + "nameEn": "Wang Wei", + "age": null, + "email": "wangwei@ustc.edu.cn", + "telephone": null, + "mobile": "13800002222", + "address": null, + "postcode": null, + "qq": null, + "wechat": null, + "departmentId": 501, + "teacherTitleId": 801 + } + ] + } + ], + "total": 2 } } } - }, - "400": { - "description": "Error response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/openApiErrorSchema" - } - } - } - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/matchSectionCodesRequestSchema" + }, + "400": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } } } } @@ -3174,8 +4385,7 @@ "/api/semesters": { "get": { "operationId": "listSemesters", - "summary": "List semesters with pagination.", - "description": "", + "summary": "List semesters", "tags": [ "Semesters" ], @@ -3187,7 +4397,7 @@ "type": "integer", "format": "int64" }, - "required": false + "example": 1 }, { "in": "query", @@ -3196,7 +4406,7 @@ "type": "integer", "format": "int64" }, - "required": false + "example": 20 } ], "responses": { @@ -3206,6 +4416,32 @@ "application/json": { "schema": { "$ref": "#/components/schemas/paginatedSemesterResponseSchema" + }, + "example": { + "data": [ + { + "id": 701, + "jwId": 9900001, + "nameCn": "2026年春季学期", + "code": "421", + "startDate": "2026-02-23T00:00:00+08:00", + "endDate": "2026-07-05T00:00:00+08:00" + }, + { + "id": 701, + "jwId": 9900000, + "nameCn": "2025年秋季学期", + "code": "420", + "startDate": "2026-02-23T00:00:00+08:00", + "endDate": "2026-07-05T00:00:00+08:00" + } + ], + "pagination": { + "page": 1, + "pageSize": 20, + "total": 2, + "totalPages": 1 + } } } } @@ -3226,12 +4462,10 @@ "/api/semesters/current": { "get": { "operationId": "getCurrentSemester", - "summary": "Get current semester.", - "description": "", + "summary": "Get current semester", "tags": [ "Semesters" ], - "parameters": [], "responses": { "200": { "description": "Successful response", @@ -3239,6 +4473,14 @@ "application/json": { "schema": { "$ref": "#/components/schemas/semesterSchema" + }, + "example": { + "id": 701, + "jwId": 9900001, + "nameCn": "2026年春季学期", + "code": "421", + "startDate": "2026-02-23T00:00:00+08:00", + "endDate": "2026-07-05T00:00:00+08:00" } } } @@ -3259,8 +4501,7 @@ "/api/teachers": { "get": { "operationId": "listTeachers", - "summary": "List teachers with department/search filters.", - "description": "", + "summary": "List teachers", "tags": [ "Teachers" ], @@ -3271,8 +4512,7 @@ "schema": { "type": "integer", "format": "int64" - }, - "required": false + } }, { "in": "query", @@ -3280,7 +4520,7 @@ "schema": { "type": "string" }, - "required": false + "example": "林璟锵" }, { "in": "query", @@ -3289,7 +4529,7 @@ "type": "integer", "format": "int64" }, - "required": false + "example": 1 }, { "in": "query", @@ -3298,7 +4538,7 @@ "type": "integer", "format": "int64" }, - "required": false + "example": 20 } ], "responses": { @@ -3308,6 +4548,88 @@ "application/json": { "schema": { "$ref": "#/components/schemas/paginatedTeacherResponseSchema" + }, + "example": { + "data": [ + { + "id": 8001, + "personId": null, + "teacherId": null, + "code": "T2401001", + "nameCn": "林璟锵", + "nameEn": "Lin Jingqiang", + "age": null, + "email": "jqlin@ustc.edu.cn", + "telephone": null, + "mobile": "13800001111", + "address": null, + "postcode": null, + "qq": null, + "wechat": null, + "departmentId": 501, + "teacherTitleId": 801, + "department": { + "id": 501, + "code": "DPT-IS", + "nameCn": "网络空间安全学院", + "nameEn": "School of Cyber Science and Technology", + "isCollege": true + }, + "teacherTitle": { + "id": 801, + "jwId": 9910041, + "code": "PROF", + "nameCn": "教授", + "nameEn": "Professor", + "enabled": true + }, + "_count": { + "sections": 1 + } + }, + { + "id": 8002, + "personId": null, + "teacherId": null, + "code": "T2401002", + "nameCn": "王伟", + "nameEn": "Wang Wei", + "age": null, + "email": "wangwei@ustc.edu.cn", + "telephone": null, + "mobile": "13800002222", + "address": null, + "postcode": null, + "qq": null, + "wechat": null, + "departmentId": 501, + "teacherTitleId": 801, + "department": { + "id": 501, + "code": "DPT-IS", + "nameCn": "网络空间安全学院", + "nameEn": "School of Cyber Science and Technology", + "isCollege": true + }, + "teacherTitle": { + "id": 801, + "jwId": 9910041, + "code": "PROF", + "nameCn": "教授", + "nameEn": "Professor", + "enabled": true + }, + "_count": { + "sections": 1 + } + } + ], + "pagination": { + "page": 1, + "pageSize": 20, + "total": 3, + "totalPages": 1 + } } } } @@ -3328,8 +4650,7 @@ "/api/teachers/{id}": { "get": { "operationId": "getTeacher", - "summary": "Get teacher detail by numeric ID.", - "description": "", + "summary": "Get teacher", "tags": [ "Teachers" ], @@ -3342,7 +4663,7 @@ "minLength": 1 }, "required": true, - "example": "123" + "example": 8001 } ], "responses": { @@ -3352,6 +4673,131 @@ "application/json": { "schema": { "$ref": "#/components/schemas/teacherDetailSchema" + }, + "example": { + "id": 8001, + "personId": null, + "teacherId": null, + "code": "T2401001", + "nameCn": "林璟锵", + "nameEn": "Lin Jingqiang", + "age": null, + "email": "jqlin@ustc.edu.cn", + "telephone": null, + "mobile": "13800001111", + "address": null, + "postcode": null, + "qq": null, + "wechat": null, + "departmentId": 501, + "teacherTitleId": 801, + "department": { + "id": 501, + "code": "DPT-IS", + "nameCn": "网络空间安全学院", + "nameEn": "School of Cyber Science and Technology", + "isCollege": true + }, + "teacherTitle": { + "id": 801, + "jwId": 9910041, + "code": "PROF", + "nameCn": "教授", + "nameEn": "Professor", + "enabled": true + }, + "sections": [ + { + "id": 2001, + "jwId": 9902001, + "code": "IS3003.01", + "bizTypeId": null, + "credits": 2.5, + "period": 48, + "periodsPerWeek": 4, + "timesPerWeek": 2, + "stdCount": 58, + "limitCount": 80, + "graduateAndPostgraduate": false, + "dateTimePlaceText": "周一 3-4节, 一教101", + "dateTimePlacePersonText": null, + "actualPeriods": 48, + "theoryPeriods": 32, + "practicePeriods": 16, + "experimentPeriods": null, + "machinePeriods": null, + "designPeriods": null, + "testPeriods": null, + "scheduleState": "scheduled", + "suggestScheduleWeeks": null, + "suggestScheduleWeekInfo": "1-16周", + "scheduleJsonParams": null, + "selectedStdCount": 58, + "remark": "结合密码协议与工程实现,强调课堂演示和实验复盘。", + "scheduleRemark": null, + "courseId": 1001, + "semesterId": 701, + "campusId": 201, + "examModeId": 602, + "openDepartmentId": 501, + "teachLanguageId": 601, + "roomTypeId": 303, + "course": { + "id": 1001, + "jwId": 9901001, + "code": "IS3003", + "nameCn": "密码工程原理与实践", + "nameEn": "Cryptographic Engineering: Principles and Practice", + "categoryId": 402, + "classTypeId": 403, + "classifyId": 404, + "educationLevelId": 401, + "gradationId": 405, + "typeId": 406, + "category": { + "id": 402, + "nameCn": "学科基础课", + "nameEn": "Disciplinary Foundation" + }, + "classType": { + "id": 403, + "nameCn": "理论课", + "nameEn": "Lecture" + }, + "classify": { + "id": 404, + "nameCn": "必修", + "nameEn": "Required" + }, + "educationLevel": { + "id": 401, + "nameCn": "本科生", + "nameEn": "Undergraduate" + }, + "gradation": { + "id": 405, + "nameCn": "进阶", + "nameEn": "Advanced" + }, + "type": { + "id": 406, + "nameCn": "专业核心", + "nameEn": "Core Major" + } + }, + "semester": { + "id": 701, + "jwId": 9900001, + "nameCn": "2026年春季学期", + "code": "421", + "startDate": "2026-02-23T00:00:00+08:00", + "endDate": "2026-07-05T00:00:00+08:00" + } + } + ], + "_count": { + "sections": 1 + } } } } @@ -3372,8 +4818,7 @@ "/api/todos": { "get": { "operationId": "listTodos", - "summary": "List todos for the current user.", - "description": "", + "summary": "List todos", "tags": [ "Todos" ], @@ -3387,8 +4832,7 @@ "true", "false" ] - }, - "required": false + } }, { "in": "query", @@ -3400,8 +4844,7 @@ "medium", "high" ] - }, - "required": false + } }, { "in": "query", @@ -3410,8 +4853,7 @@ "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", @@ -3420,8 +4862,15 @@ "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": "limit", + "schema": { + "type": "integer", + "format": "int64" + } } ], "responses": { @@ -3449,58 +4898,19 @@ }, "post": { "operationId": "createTodo", - "summary": "List todos for the current user.", - "description": "", + "summary": "Create a todo", "tags": [ "Todos" ], - "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", - "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 + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/todoCreateRequestSchema" + } + } } - ], + }, "responses": { "200": { "description": "Successful response", @@ -3521,25 +4931,6 @@ } } } - }, - "401": { - "description": "Error response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/openApiErrorSchema" - } - } - } - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/todoCreateRequestSchema" - } - } } } } @@ -3547,8 +4938,7 @@ "/api/todos/{id}": { "patch": { "operationId": "updateTodo", - "summary": "Update one todo.", - "description": "", + "summary": "Update one todo", "tags": [ "Todos" ], @@ -3560,10 +4950,18 @@ "type": "string", "minLength": 1 }, - "required": true, - "example": "123" + "required": true } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/todoUpdateRequestSchema" + } + } + } + }, "responses": { "200": { "description": "Successful response", @@ -3585,21 +4983,11 @@ } } } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/todoUpdateRequestSchema" - } - } - } } }, "delete": { "operationId": "deleteTodo", - "summary": "Update one todo.", - "description": "", + "summary": "Delete one todo", "tags": [ "Todos" ], @@ -3611,8 +4999,7 @@ "type": "string", "minLength": 1 }, - "required": true, - "example": "123" + "required": true } ], "responses": { @@ -3626,16 +5013,6 @@ } } }, - "400": { - "description": "Error response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/openApiErrorSchema" - } - } - } - }, "404": { "description": "Error response", "content": { @@ -3646,27 +5023,16 @@ } } } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/todoUpdateRequestSchema" - } - } - } } } }, "/api/uploads": { "get": { "operationId": "listUploads", - "summary": "List uploads of current user.", - "description": "", + "summary": "List uploads", "tags": [ "Uploads" ], - "parameters": [], "responses": { "200": { "description": "Successful response", @@ -3682,12 +5048,19 @@ }, "post": { "operationId": "createUpload", - "summary": "List uploads of current user.", - "description": "", + "summary": "Create a signed upload URL", "tags": [ "Uploads" ], - "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/uploadCreateRequestSchema" + } + } + } + }, "responses": { "200": { "description": "Successful response", @@ -3709,23 +5082,13 @@ } } } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/uploadCreateRequestSchema" - } - } - } } } }, "/api/uploads/{id}": { "patch": { "operationId": "updateUpload", - "summary": "Rename one upload.", - "description": "", + "summary": "Rename one upload", "tags": [ "Uploads" ], @@ -3737,10 +5100,18 @@ "type": "string", "minLength": 1 }, - "required": true, - "example": "123" + "required": true } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/uploadRenameRequestSchema" + } + } + } + }, "responses": { "200": { "description": "Successful response", @@ -3782,21 +5153,11 @@ } } } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/uploadRenameRequestSchema" - } - } - } } }, "delete": { "operationId": "deleteUpload", - "summary": "Rename one upload.", - "description": "", + "summary": "Delete one upload", "tags": [ "Uploads" ], @@ -3808,8 +5169,7 @@ "type": "string", "minLength": 1 }, - "required": true, - "example": "123" + "required": true } ], "responses": { @@ -3823,16 +5183,6 @@ } } }, - "400": { - "description": "Error response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/openApiErrorSchema" - } - } - } - }, "401": { "description": "Error response", "content": { @@ -3853,23 +5203,13 @@ } } } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/uploadRenameRequestSchema" - } - } - } } } }, "/api/uploads/{id}/download": { "get": { "operationId": "downloadUpload", - "summary": "Redirect to signed URL for one upload.", - "description": "", + "summary": "Download upload", "tags": [ "Uploads" ], @@ -3881,18 +5221,17 @@ "type": "string", "minLength": 1 }, - "required": true, - "example": "123" + "required": true } ], "responses": { - "302": { - "description": "Redirect", - "headers": { - "Location": { + "200": { + "description": "Binary response", + "content": { + "application/octet-stream": { "schema": { "type": "string", - "format": "uri" + "format": "binary" } } } @@ -3923,12 +5262,19 @@ "/api/uploads/complete": { "post": { "operationId": "completeUpload", - "summary": "Finalize one upload after S3 put.", - "description": "", + "summary": "Complete upload", "tags": [ "Uploads" ], - "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/uploadCompleteRequestSchema" + } + } + } + }, "responses": { "200": { "description": "Successful response", @@ -3950,12 +5296,75 @@ } } } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/uploadCompleteRequestSchema" + } + } + }, + "/api/uploads/object": { + "put": { + "operationId": "put-api-uploads-object", + "summary": "Write upload object", + "tags": [ + "Uploads" + ], + "parameters": [ + { + "in": "query", + "name": "key", + "schema": { + "type": "string", + "minLength": 1 + }, + "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" + } + } + } + }, + "413": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } } } } @@ -3965,8 +5374,7 @@ "/api/users/{userId}/calendar.ics": { "get": { "operationId": "getUserCalendar", - "summary": "Generate calendar ICS for a user's subscribed sections and personal deadlines.", - "description": "", + "summary": "Generate user calendar", "tags": [ "Calendar" ], @@ -3978,8 +5386,7 @@ "type": "string", "minLength": 1 }, - "required": true, - "example": "123" + "required": true } ], "responses": { @@ -4030,154 +5437,6 @@ }, "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 - } - }, - "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 - }, - "openApiErrorSchema": { - "type": "object", - "properties": { - "error": { - "type": "string" - } - }, - "required": [ - "error" - ], - "additionalProperties": false - }, "adminModerateCommentRequestSchema": { "type": "object", "properties": { @@ -4190,1681 +5449,800 @@ ] }, "moderationNote": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" } }, "required": [ "status" - ], - "additionalProperties": false + ] }, - "adminCommentsResponseSchema": { + "adminCreateSuspensionRequestSchema": { "type": "object", "properties": { - "comments": { - "type": "array", + "userId": { + "type": "string", + "minLength": 1 + }, + "reason": { + "type": "string" + }, + "note": { + "type": "string" + }, + "expiresAt": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "nullable": true, + "enum": [ + null + ] + } + ] + } + }, + "required": [ + "userId" + ] + }, + "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" + } + } + }, + "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": [ + "showDepartedTrips" + ] + }, + "calendarSubscriptionCreateRequestSchema": { + "type": "object", + "properties": { + "sectionIds": { + "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", - "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 - }, - "user": { - "type": "object", - "properties": { - "name": { - "type": "string", - "nullable": true - } - }, - "required": [ - "name" - ], - "additionalProperties": false, - "nullable": true - }, - "section": { - "type": "object", - "properties": { - "jwId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "code": { - "type": "string" - }, - "course": { - "type": "object", - "properties": { - "jwId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "code": { - "type": "string" - }, - "nameCn": { - "type": "string" - } - }, - "required": [ - "jwId", - "code", - "nameCn" - ], - "additionalProperties": false - } - }, - "required": [ - "jwId", - "code", - "course" - ], - "additionalProperties": false, - "nullable": true - }, - "course": { - "type": "object", - "properties": { - "jwId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "code": { - "type": "string" - }, - "nameCn": { - "type": "string" - } - }, - "required": [ - "jwId", - "code", - "nameCn" - ], - "additionalProperties": false, - "nullable": true - }, - "teacher": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "nameCn": { - "type": "string" - } - }, - "required": [ - "id", - "nameCn" - ], - "additionalProperties": false, - "nullable": true - }, - "homework": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "title": { - "type": "string" - }, - "section": { - "type": "object", - "properties": { - "code": { - "type": "string" - } - }, - "required": [ - "code" - ], - "additionalProperties": false - } - }, - "required": [ - "id", - "title", - "section" - ], - "additionalProperties": false, - "nullable": true - }, - "sectionTeacher": { - "type": "object", - "properties": { - "section": { - "type": "object", - "properties": { - "jwId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "code": { - "type": "string" - }, - "course": { - "type": "object", - "properties": { - "jwId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "code": { - "type": "string" - }, - "nameCn": { - "type": "string" - } - }, - "required": [ - "jwId", - "code", - "nameCn" - ], - "additionalProperties": false - } - }, - "required": [ - "jwId", - "code", - "course" - ], - "additionalProperties": false - }, - "teacher": { - "type": "object", - "properties": { - "nameCn": { - "type": "string" - } - }, - "required": [ - "nameCn" - ], - "additionalProperties": false - } - }, - "required": [ - "section", - "teacher" - ], - "additionalProperties": false, - "nullable": true - } + "type": "integer", + "exclusiveMinimum": true, + "maximum": 9007199254740991 + } + } + } + }, + "matchSectionCodesRequestSchema": { + "type": "object", + "properties": { + "codes": { + "minItems": 1, + "maxItems": 500, + "type": "array", + "items": { + "type": "string", + "minLength": 1, + "maxLength": 64, + "pattern": "^[A-Za-z0-9_.-]+$" + } + }, + "semesterId": { + "anyOf": [ + { + "type": "string" }, - "required": [ - "id", - "body", - "visibility", - "status", - "isAnonymous", - "authorName", - "createdAt", - "updatedAt", - "deletedAt", - "moderatedAt", - "moderationNote", - "userId", - "moderatedById", - "parentId", - "rootId", - "sectionId", - "courseId", - "teacherId", - "sectionTeacherId", - "homeworkId", - "user", - "section", - "course", - "teacher", - "homework", - "sectionTeacher" - ], - "additionalProperties": false + { + "type": "number" + } + ] + } + }, + "required": [ + "codes" + ] + }, + "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" + } + ] + }, + "teacherId": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "body": { + "type": "string", + "minLength": 1, + "maxLength": 8000 + }, + "visibility": { + "type": "string", + "enum": [ + "public", + "logged_in_only", + "anonymous" + ] + }, + "isAnonymous": { + "type": "boolean" + }, + "parentId": { + "nullable": true, + "type": "string" + }, + "attachmentIds": { + "type": "array", + "items": { + "type": "string" } } }, "required": [ - "comments" - ], - "additionalProperties": false + "targetType", + "body" + ] }, - "adminDescriptionsResponseSchema": { + "commentUpdateRequestSchema": { "type": "object", "properties": { - "descriptions": { + "body": { + "type": "string", + "minLength": 1, + "maxLength": 8000 + }, + "visibility": { + "type": "string", + "enum": [ + "public", + "logged_in_only", + "anonymous" + ] + }, + "isAnonymous": { + "type": "boolean" + }, + "attachmentIds": { "type": "array", "items": { - "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 - }, - "teacherId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "homeworkId": { - "type": "string", - "nullable": true - }, - "lastEditedBy": { - "type": "object", - "properties": { - "id": { - "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 - }, - "section": { - "type": "object", - "properties": { - "jwId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "code": { - "type": "string", - "nullable": true - }, - "course": { - "type": "object", - "properties": { - "jwId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "code": { - "type": "string" - }, - "nameCn": { - "type": "string" - } - }, - "required": [ - "jwId", - "code", - "nameCn" - ], - "additionalProperties": false, - "nullable": true - } - }, - "required": [ - "jwId", - "code", - "course" - ], - "additionalProperties": false, - "nullable": true - }, - "course": { - "type": "object", - "properties": { - "jwId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "code": { - "type": "string" - }, - "nameCn": { - "type": "string" - } - }, - "required": [ - "jwId", - "code", - "nameCn" - ], - "additionalProperties": false, - "nullable": true - }, - "teacher": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "nameCn": { - "type": "string" - } - }, - "required": [ - "id", - "nameCn" - ], - "additionalProperties": false, - "nullable": true - }, - "homework": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "title": { - "type": "string" - }, - "section": { - "type": "object", - "properties": { - "jwId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "code": { - "type": "string", - "nullable": true - }, - "course": { - "type": "object", - "properties": { - "jwId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "code": { - "type": "string" - }, - "nameCn": { - "type": "string" - } - }, - "required": [ - "jwId", - "code", - "nameCn" - ], - "additionalProperties": false, - "nullable": true - } - }, - "required": [ - "jwId", - "code", - "course" - ], - "additionalProperties": false, - "nullable": true - } - }, - "required": [ - "id", - "title", - "section" - ], - "additionalProperties": false, - "nullable": true - } - }, - "required": [ - "id", - "content", - "createdAt", - "updatedAt", - "lastEditedAt", - "lastEditedById", - "sectionId", - "courseId", - "teacherId", - "homeworkId", - "lastEditedBy", - "section", - "course", - "teacher", - "homework" - ], - "additionalProperties": false + "type": "string" } } }, "required": [ - "descriptions" - ], - "additionalProperties": false + "body" + ] }, - "successResponseSchema": { + "commentReactionRequestSchema": { "type": "object", "properties": { - "success": { - "type": "boolean" + "type": { + "type": "string", + "enum": [ + "upvote", + "downvote", + "heart", + "laugh", + "hooray", + "confused", + "rocket", + "eyes" + ] } }, "required": [ - "success" - ], - "additionalProperties": false + "type" + ] }, - "adminHomeworksResponseSchema": { + "dashboardLinkPinRequestSchema": { "type": "object", "properties": { - "homeworks": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "title": { - "type": "string" - }, - "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)))$", - "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 - }, - "section": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "jwId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "code": { - "type": "string", - "nullable": true - }, - "course": { - "type": "object", - "properties": { - "jwId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "code": { - "type": "string" - }, - "nameCn": { - "type": "string" - } - }, - "required": [ - "jwId", - "code", - "nameCn" - ], - "additionalProperties": false - } - }, - "required": [ - "id", - "jwId", - "code", - "course" - ], - "additionalProperties": false, - "nullable": true - }, - "createdBy": { - "type": "object", - "properties": { - "id": { - "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": { - "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": { - "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 - } - }, - "required": [ - "id", - "title", - "submissionDueAt", - "createdAt", - "updatedAt", - "deletedAt", - "section", - "createdBy", - "updatedBy", - "deletedBy" - ], - "additionalProperties": false - } + "slug": { + "type": "string", + "minLength": 1 + }, + "returnTo": { + "type": "string" + }, + "action": { + "type": "string", + "enum": [ + "pin", + "unpin" + ] } }, "required": [ - "homeworks" - ], - "additionalProperties": false + "slug" + ] }, - "adminSuspensionResponseSchema": { + "dashboardLinkVisitRequestSchema": { "type": "object", "properties": { - "suspension": { - "type": "object", - "properties": { - "id": { + "slug": { + "type": "string", + "minLength": 1 + } + }, + "required": [ + "slug" + ] + }, + "descriptionUpsertRequestSchema": { + "type": "object", + "properties": { + "targetType": { + "type": "string", + "enum": [ + "section", + "course", + "teacher", + "homework" + ] + }, + "targetId": { + "anyOf": [ + { "type": "string" }, - "userId": { + { + "type": "number" + } + ] + }, + "content": { + "type": "string", + "maxLength": 4000 + } + }, + "required": [ + "targetType", + "targetId", + "content" + ] + }, + "homeworkCreateRequestSchema": { + "type": "object", + "properties": { + "sectionId": { + "anyOf": [ + { "type": "string" }, - "createdById": { + { + "type": "number" + } + ] + }, + "title": { + "type": "string", + "minLength": 1, + "maxLength": 200 + }, + "description": { + "type": "string", + "maxLength": 4000 + }, + "publishedAt": { + "anyOf": [ + { "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)))$" + "nullable": true, + "enum": [ + null + ] + } + ] + }, + "submissionStartAt": { + "anyOf": [ + { + "type": "string" }, - "reason": { + { "type": "string", - "nullable": true + "nullable": true, + "enum": [ + null + ] + } + ] + }, + "submissionDueAt": { + "anyOf": [ + { + "type": "string" }, - "note": { + { "type": "string", - "nullable": true + "nullable": true, + "enum": [ + null + ] + } + ] + }, + "isMajor": { + "type": "boolean" + }, + "requiresTeam": { + "type": "boolean" + } + }, + "required": [ + "sectionId", + "title" + ] + }, + "homeworkUpdateRequestSchema": { + "type": "object", + "properties": { + "title": { + "type": "string", + "minLength": 1, + "maxLength": 200 + }, + "description": { + "nullable": true, + "type": "string", + "maxLength": 4000 + }, + "publishedAt": { + "anyOf": [ + { + "type": "string" }, - "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 + "nullable": true, + "enum": [ + null + ] + } + ] + }, + "submissionStartAt": { + "anyOf": [ + { + "type": "string" }, - "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 + "nullable": true, + "enum": [ + null + ] + } + ] + }, + "submissionDueAt": { + "anyOf": [ + { + "type": "string" }, - "liftedById": { + { "type": "string", - "nullable": true - }, - "user": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string", - "nullable": true - } - }, - "required": [ - "id", - "name" - ], - "additionalProperties": false, - "nullable": true + "nullable": true, + "enum": [ + null + ] } - }, - "required": [ - "id", - "userId", - "createdById", - "createdAt", - "reason", - "note", - "expiresAt", - "liftedAt", - "liftedById" - ], - "additionalProperties": false + ] + }, + "isMajor": { + "type": "boolean" + }, + "requiresTeam": { + "type": "boolean" + } + } + }, + "homeworkCompletionRequestSchema": { + "type": "object", + "properties": { + "completed": { + "type": "boolean" } }, "required": [ - "suspension" - ], - "additionalProperties": false + "completed" + ] }, - "adminSuspensionsResponseSchema": { + "homeworkCompletionBatchRequestSchema": { "type": "object", "properties": { - "suspensions": { + "items": { + "minItems": 1, + "maxItems": 100, "type": "array", "items": { "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": { + "homeworkId": { "type": "string", - "nullable": true + "minLength": 1 }, - "user": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string", - "nullable": true - } - }, - "required": [ - "id", - "name" - ], - "additionalProperties": false, - "nullable": true + "completed": { + "type": "boolean" } }, "required": [ - "id", - "userId", - "createdById", - "createdAt", - "reason", - "note", - "expiresAt", - "liftedAt", - "liftedById" - ], - "additionalProperties": false + "homeworkId", + "completed" + ] } } }, "required": [ - "suspensions" - ], - "additionalProperties": false + "items" + ] }, - "adminCreateSuspensionRequestSchema": { + "localeUpdateRequestSchema": { "type": "object", "properties": { - "userId": { - "type": "string", - "minLength": 1 - }, - "reason": { - "type": "string" - }, - "note": { - "type": "string" - }, - "expiresAt": { + "locale": { "type": "string", - "nullable": true + "enum": [ + "en-us", + "zh-cn" + ] } }, "required": [ - "userId" - ], - "additionalProperties": false + "locale" + ] }, - "adminUserResponseSchema": { + "todoCreateRequestSchema": { "type": "object", "properties": { - "user": { - "type": "object", - "properties": { - "id": { + "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" }, - "name": { - "type": "string", - "nullable": true - }, - "username": { - "type": "string", - "nullable": true - }, - "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": { + { "type": "string", - "nullable": true + "nullable": true, + "enum": [ + null + ] } - }, - "required": [ - "id", - "name", - "username", - "isAdmin", - "createdAt", - "email" - ], - "additionalProperties": false + ] } }, "required": [ - "user" - ], - "additionalProperties": false + "title" + ] }, - "adminUpdateUserRequestSchema": { + "todoUpdateRequestSchema": { "type": "object", "properties": { - "name": { + "title": { "type": "string", - "nullable": true + "minLength": 1, + "maxLength": 200 }, - "username": { + "content": { + "nullable": true, "type": "string", - "nullable": true + "maxLength": 4000 }, - "isAdmin": { + "priority": { + "type": "string", + "enum": [ + "low", + "medium", + "high" + ] + }, + "dueAt": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "nullable": true, + "enum": [ + null + ] + } + ] + }, + "completed": { "type": "boolean" } - }, - "additionalProperties": false + } }, - "adminUsersResponseSchema": { + "uploadCreateRequestSchema": { "type": "object", "properties": { - "data": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string", - "nullable": true - }, - "username": { - "type": "string", - "nullable": true - }, - "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": { - "type": "string", - "nullable": true - } - }, - "required": [ - "id", - "name", - "username", - "isAdmin", - "createdAt", - "email" - ], - "additionalProperties": false - } + "filename": { + "type": "string", + "minLength": 1 }, - "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 + "contentType": { + "type": "string" + }, + "size": { + "anyOf": [ + { + "type": "string" }, - "totalPages": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + { + "type": "number" } - }, - "required": [ - "page", - "pageSize", - "total", - "totalPages" - ], - "additionalProperties": false + ] } }, "required": [ - "data", - "pagination" - ], - "additionalProperties": false + "filename", + "size" + ] }, - "busPreferenceResponseSchema": { + "uploadRenameRequestSchema": { "type": "object", "properties": { - "preference": { - "type": "object", - "properties": { - "preferredOriginCampusId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "preferredDestinationCampusId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "showDepartedTrips": { - "type": "boolean" - } - }, - "required": [ - "preferredOriginCampusId", - "preferredDestinationCampusId", - "showDepartedTrips" - ], - "additionalProperties": false + "filename": { + "type": "string", + "minLength": 1, + "maxLength": 255 } }, "required": [ - "preference" - ], - "additionalProperties": false + "filename" + ] }, - "busPreferenceRequestSchema": { + "uploadCompleteRequestSchema": { "type": "object", "properties": { - "preferredOriginCampusId": { - "default": null, - "type": "integer", - "exclusiveMinimum": true, - "maximum": 9007199254740991, - "minimum": 0, - "nullable": true + "key": { + "type": "string", + "minLength": 1 }, - "preferredDestinationCampusId": { - "default": null, - "type": "integer", - "exclusiveMinimum": true, - "maximum": 9007199254740991, - "minimum": 0, - "nullable": true + "filename": { + "type": "string", + "minLength": 1 }, - "showDepartedTrips": { - "type": "boolean" + "contentType": { + "type": "string" } }, "required": [ - "preferredOriginCampusId", - "preferredDestinationCampusId", - "showDepartedTrips" - ], - "additionalProperties": false + "key", + "filename" + ] }, - "busQueryResponseSchema": { + "adminCommentsResponseSchema": { "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": { - "type": "object", - "properties": { - "id": { - "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)))$" - }, - "notice": { - "type": "object", - "properties": { - "message": { - "type": "string", - "nullable": true - }, - "url": { - "type": "string", - "nullable": true - } - }, - "required": [ - "message", - "url" - ], - "additionalProperties": false, - "nullable": true - } - }, - "required": [ - "id", - "key", - "title", - "effectiveFrom", - "effectiveUntil", - "importedAt", - "notice" - ], - "additionalProperties": false, - "nullable": true - }, - "availableVersions": { + "comments": { "type": "array", "items": { "type": "object", "properties": { "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "key": { "type": "string" }, - "title": { + "body": { "type": "string" }, - "effectiveFrom": { + "visibility": { "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 + "enum": [ + "public", + "logged_in_only", + "anonymous" + ] }, - "effectiveUntil": { + "status": { "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 + "enum": [ + "active", + "softbanned", + "deleted" + ] }, - "importedAt": { + "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)))$" }, - "notice": { - "type": "object", - "properties": { - "message": { - "type": "string", - "nullable": true - }, - "url": { - "type": "string", - "nullable": true - } - }, - "required": [ - "message", - "url" - ], - "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": { + "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)))$" }, - "latitude": { - "type": "number" + "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)))$" }, - "longitude": { - "type": "number" + "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)))$" }, - "namePrimary": { + "moderationNote": { + "nullable": true, "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": { + "userId": { + "nullable": true, "type": "string" }, - "nameEn": { - "type": "string", - "nullable": true + "moderatedById": { + "nullable": true, + "type": "string" }, - "descriptionPrimary": { + "parentId": { + "nullable": true, "type": "string" }, - "descriptionSecondary": { - "type": "string", - "nullable": true + "rootId": { + "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": { - "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 - } - }, - "required": [ - "stopOrder", - "campus" - ], - "additionalProperties": false - } - } - }, - "required": [ - "id", - "nameCn", - "nameEn", - "descriptionPrimary", - "descriptionSecondary", - "stops" - ], - "additionalProperties": false - } - }, - "trips": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { + "sectionId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "routeId": { + "courseId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "dayType": { - "type": "string", - "enum": [ - "weekday", - "weekend" - ] - }, - "position": { + "teacherId": { + "nullable": true, "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": { + "sectionTeacherId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, - "arrivalTime": { - "type": "string", - "nullable": true + "homeworkId": { + "nullable": true, + "type": "string" }, - "arrivalMinutes": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - } - }, - "required": [ - "id", - "routeId", - "dayType", - "position", - "stopTimes", - "departureTime", - "departureMinutes", - "arrivalTime", - "arrivalMinutes" - ], - "additionalProperties": false - } - }, - "preferences": { - "type": "object", - "properties": { - "preferredOriginCampusId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "preferredDestinationCampusId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "showDepartedTrips": { - "type": "boolean" - } - }, - "required": [ - "preferredOriginCampusId", - "preferredDestinationCampusId", - "showDepartedTrips" - ], - "additionalProperties": false, - "nullable": true - }, - "notice": { - "type": "object", - "properties": { - "message": { - "type": "string", - "nullable": true - }, - "url": { - "type": "string", - "nullable": true - } - }, - "required": [ - "message", - "url" - ], - "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": { + "user": { + "nullable": true, + "type": "object", + "properties": { + "name": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "name" + ], + "additionalProperties": false + }, + "section": { + "nullable": true, "type": "object", "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, "jwId": { "type": "integer", "minimum": -9007199254740991, @@ -5873,164 +6251,9 @@ "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": { "type": "object", "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, "jwId": { "type": "integer", "minimum": -9007199254740991, @@ -6041,900 +6264,4707 @@ }, "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": { + } + }, + "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": { + "type": "object", + "properties": { + "code": { + "type": "string" + } + }, + "required": [ + "code" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "title", + "section" + ], + "additionalProperties": false + }, + "sectionTeacher": { + "nullable": true, + "type": "object", + "properties": { + "section": { + "type": "object", + "properties": { + "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 - }, - "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 + "maximum": 9007199254740991 }, - "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 + "code": { + "type": "string" }, - "gradation": { + "course": { "type": "object", "properties": { - "id": { + "jwId": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "nameCn": { + "code": { "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" + "jwId", + "code", + "nameCn" ], - "additionalProperties": false, - "nullable": true + "additionalProperties": false } }, "required": [ - "id", "jwId", "code", - "nameCn", - "nameEn", - "categoryId", - "classTypeId", - "classifyId", - "educationLevelId", - "gradationId", - "typeId", - "category", - "classType", - "classify", - "educationLevel", - "gradation", - "type" + "course" ], "additionalProperties": false }, - "semester": { + "teacher": { "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" + "nameCn" ], - "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 - }, - "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 - } + "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" + "section", + "teacher" ], "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 - }, - "calendarSubscriptionCreateResponseSchema": { - "type": "object", - "properties": { - "subscription": { - "type": "object", - "properties": { - "userId": { - "type": "string" - }, - "sections": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "jwId": { + "required": [ + "id", + "body", + "visibility", + "status", + "isAnonymous", + "authorName", + "createdAt", + "updatedAt", + "deletedAt", + "moderatedAt", + "moderationNote", + "userId", + "moderatedById", + "parentId", + "rootId", + "sectionId", + "courseId", + "teacherId", + "sectionTeacherId", + "homeworkId", + "user", + "section", + "course", + "teacher", + "homework", + "sectionTeacher" + ], + "additionalProperties": false + } + } + }, + "required": [ + "comments" + ], + "additionalProperties": false + }, + "openApiErrorSchema": { + "type": "object", + "properties": { + "error": { + "type": "string" + } + }, + "required": [ + "error" + ], + "additionalProperties": false + }, + "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": { + "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 + }, + "adminDescriptionsResponseSchema": { + "type": "object", + "properties": { + "descriptions": { + "type": "array", + "items": { + "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" }, - "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": { + "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 + } + }, + "required": [ + "jwId", + "code", + "course" + ], + "additionalProperties": false + }, + "course": { + "nullable": true, + "type": "object", + "properties": { + "jwId": { "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 + "code": { + "type": "string" }, - "openDepartmentId": { + "nameCn": { + "type": "string" + } + }, + "required": [ + "jwId", + "code", + "nameCn" + ], + "additionalProperties": false + }, + "teacher": { + "nullable": true, + "type": "object", + "properties": { + "id": { "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, - "teachLanguageId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "nameCn": { + "type": "string" + } + }, + "required": [ + "id", + "nameCn" + ], + "additionalProperties": false + }, + "homework": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "string" }, - "roomTypeId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "title": { + "type": "string" }, - "course": { + "section": { + "nullable": true, "type": "object", "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, "jwId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "code": { + "nullable": true, "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": { + "course": { + "nullable": true, "type": "object", "properties": { - "id": { + "jwId": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "nameCn": { + "code": { "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" + "jwId", + "code", + "nameCn" ], - "additionalProperties": false, - "nullable": true + "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": [ + "descriptions" + ], + "additionalProperties": false + }, + "adminHomeworksResponseSchema": { + "type": "object", + "properties": { + "homeworks": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "title": { + "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)))$" + }, + "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)))$" + }, + "section": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "jwId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "code": { + "nullable": true, + "type": "string" + }, + "course": { + "type": "object", + "properties": { + "jwId": { + "type": "integer", + "minimum": -9007199254740991, + "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 + "code": { + "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 + "nameCn": { + "type": "string" + } + }, + "required": [ + "jwId", + "code", + "nameCn" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "jwId", + "code", + "course" + ], + "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 + } + }, + "required": [ + "id", + "title", + "submissionDueAt", + "createdAt", + "updatedAt", + "deletedAt", + "section", + "createdBy", + "updatedBy", + "deletedBy" + ], + "additionalProperties": false + } + } + }, + "required": [ + "homeworks" + ], + "additionalProperties": false + }, + "successResponseSchema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + } + }, + "required": [ + "success" + ], + "additionalProperties": false + }, + "adminSuspensionsResponseSchema": { + "type": "object", + "properties": { + "suspensions": { + "type": "array", + "items": { + "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": { + "nullable": true, + "type": "string" + }, + "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)))$" + }, + "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)))$" + }, + "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", + "userId", + "createdById", + "createdAt", + "reason", + "note", + "expiresAt", + "liftedAt", + "liftedById" + ], + "additionalProperties": false + } + } + }, + "required": [ + "suspensions" + ], + "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": { + "nullable": true, + "type": "string" + }, + "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)))$" + }, + "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)))$" + }, + "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", + "userId", + "createdById", + "createdAt", + "reason", + "note", + "expiresAt", + "liftedAt", + "liftedById" + ], + "additionalProperties": false + } + }, + "required": [ + "suspension" + ], + "additionalProperties": false + }, + "adminUsersResponseSchema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "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 + } + }, + "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 + }, + "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 + }, + "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 + }, + "busNextDeparturesResponseSchema": { + "type": "object", + "properties": { + "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 + }, + "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)))$" + }, + "dayType": { + "type": "string", + "enum": [ + "weekday", + "weekend" + ] + }, + "totalRoutes": { + "type": "integer", + "minimum": 0, + "maximum": 9007199254740991 + }, + "departures": { + "type": "array", + "items": { + "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 + } + }, + "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 + }, + "busRouteSearchResponseSchema": { + "type": "object", + "properties": { + "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 + }, + "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 + }, + "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 + }, + "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": { + "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", + "originCampus", + "destinationCampus", + "stopCount", + "weekdayTrips", + "weekendTrips", + "stops" + ], + "additionalProperties": false + } + } + }, + "required": [ + "originCampus", + "destinationCampus", + "total", + "routes" + ], + "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 + } + }, + "required": [ + "id", + "jwId", + "code", + "nameCn", + "nameEn", + "categoryId", + "classTypeId", + "classifyId", + "educationLevelId", + "gradationId", + "typeId", + "category", + "classType", + "classify", + "educationLevel", + "gradation", + "type" + ], + "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" + }, + "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" + ], + "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 + }, + "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 + }, + "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 + } + }, + "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", + "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 + }, + "currentCalendarSubscriptionResponseSchema": { + "anyOf": [ + { + "type": "object", + "properties": { + "subscription": { + "type": "string", + "nullable": true, + "enum": [ + null + ] + } + }, + "required": [ + "subscription" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "subscription": { + "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 + } + }, + "required": [ + "id", + "jwId", + "code", + "nameCn", + "nameEn", + "categoryId", + "classTypeId", + "classifyId", + "educationLevelId", + "gradationId", + "typeId", + "category", + "classType", + "classify", + "educationLevel", + "gradation", + "type" + ], + "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" + }, + "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" + ], + "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 + }, + "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 + }, + "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 + } + }, + "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", + "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 + } + ] + }, + "calendarSubscriptionImportResponseSchema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "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" + } + }, + "unmatchedCodes": { + "type": "array", + "items": { + "type": "string" + } + }, + "ambiguousCodes": { + "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 + }, + "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 + }, + "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" + }, + "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" + ], + "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 + }, + "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 + }, + "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 + } + }, + "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", + "course", + "semester", + "campus", + "openDepartment", + "teachers" + ], + "additionalProperties": false + } + }, + "addedCount": { + "type": "integer", + "minimum": 0, + "maximum": 9007199254740991 + }, + "addedSections": { + "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 }, - "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,42 +10972,23 @@ "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "jwId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, "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": { + "classify": { + "nullable": true, "type": "object", "properties": { "id": { @@ -6985,35 +10996,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": { + "educationLevel": { + "nullable": true, "type": "object", "properties": { "id": { @@ -7021,2058 +11020,1705 @@ "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 - } + "gradation": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "required": [ - "id", - "personId", - "teacherId", - "code", - "nameCn", - "nameEn", - "age", - "email", - "telephone", - "mobile", - "address", - "postcode", - "qq", - "wechat", - "departmentId", - "teacherTitleId" - ], - "additionalProperties": false - } + "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", - "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" ], "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, + "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" + ], + "additionalProperties": false }, - "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" + } + }, + "required": [ + "id", + "jwId", + "nameCn", + "nameEn", + "code" + ], + "additionalProperties": false }, - "author": { + "openDepartment": { + "nullable": true, "type": "object", "properties": { "id": { - "type": "string" - }, - "name": { - "type": "string", - "nullable": true + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "image": { - "type": "string", - "nullable": true + "code": { + "type": "string" }, - "isUstcVerified": { - "type": "boolean" + "nameCn": { + "type": "string" }, - "isAdmin": { - "type": "boolean" + "nameEn": { + "nullable": true, + "type": "string" }, - "isGuest": { + "isCollege": { + "nullable": true, "type": "boolean" } }, "required": [ - "name", - "isUstcVerified", - "isAdmin", - "isGuest" + "id", + "code", + "nameCn", + "nameEn", + "isCollege" ], - "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 - } - }, - "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": { + "nameCn": { "type": "string" }, - "uploadId": { + "nameEn": { + "nullable": true, "type": "string" }, - "filename": { + "age": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "email": { + "nullable": true, "type": "string" }, - "url": { + "telephone": { + "nullable": true, "type": "string" }, - "contentType": { - "type": "string", - "nullable": true + "mobile": { + "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": { + "address": { + "nullable": true, "type": "string" }, - "count": { + "postcode": { + "nullable": true, + "type": "string" + }, + "qq": { + "nullable": true, + "type": "string" + }, + "wechat": { + "nullable": true, + "type": "string" + }, + "departmentId": { + "nullable": true, "type": "integer", - "minimum": 0, + "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "viewerHasReacted": { - "type": "boolean" + "teacherTitleId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 } }, "required": [ - "type", - "count", - "viewerHasReacted" + "id", + "personId", + "teacherId", + "code", + "nameCn", + "nameEn", + "age", + "email", + "telephone", + "mobile", + "address", + "postcode", + "qq", + "wechat", + "departmentId", + "teacherTitleId" ], - "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 - } - }, - "focusId": { - "type": "string" - }, - "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 - }, - "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": { - "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" - }, - "comment": { - "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" + "additionalProperties": false } - }, - "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": { + "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 + } + }, + "alreadySubscribedCount": { + "type": "integer", + "minimum": 0, + "maximum": 9007199254740991 + }, + "alreadySubscribedSections": { + "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" }, - "body": { + "nameCn": { "type": "string" }, - "visibility": { + "nameEn": { + "nullable": true, "type": "string" }, - "status": { - "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 }, - "author": { + "category": { + "nullable": true, "type": "object", "properties": { "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { "type": "string" }, - "name": { - "type": "string", - "nullable": true + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "classType": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "image": { - "type": "string", - "nullable": true + "nameCn": { + "type": "string" }, - "isUstcVerified": { - "type": "boolean" + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "classify": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "isAdmin": { - "type": "boolean" + "nameCn": { + "type": "string" }, - "isGuest": { - "type": "boolean" + "nameEn": { + "nullable": true, + "type": "string" } }, "required": [ - "name", - "isUstcVerified", - "isAdmin", - "isGuest" + "id", + "nameCn", + "nameEn" ], - "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)))$" + "additionalProperties": false }, - "parentId": { - "type": "string", - "nullable": true + "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 }, - "rootId": { - "type": "string", - "nullable": true + "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 }, - "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" - } + "type": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "required": [ - "id", - "body", - "visibility", - "status", - "author", - "authorHidden", - "isAnonymous", - "isAuthor", - "createdAt", - "updatedAt", - "parentId", - "rootId", - "replies", - "attachments", - "reactions", - "canReply", - "canEdit", - "canModerate" - ], - "additionalProperties": false - } + "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, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "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 - } + "jwId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "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 - } + "nameCn": { + "type": "string" }, - "canReply": { - "type": "boolean" + "code": { + "type": "string" }, - "canEdit": { - "type": "boolean" + "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" + ], + "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 + }, + "openDepartment": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "canModerate": { + "code": { + "type": "string" + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "isCollege": { + "nullable": true, "type": "boolean" } }, "required": [ "id", - "body", - "visibility", - "status", - "author", - "authorHidden", - "isAnonymous", - "isAuthor", - "createdAt", - "updatedAt", - "parentId", - "rootId", - "replies", - "attachments", - "reactions", - "canReply", - "canEdit", - "canModerate" + "code", + "nameCn", + "nameEn", + "isCollege" ], "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 + } + }, + "required": [ + "id", + "personId", + "teacherId", + "code", + "nameCn", + "nameEn", + "age", + "email", + "telephone", + "mobile", + "address", + "postcode", + "qq", + "wechat", + "departmentId", + "teacherTitleId" + ], + "additionalProperties": false + } } }, - "attachments": { + "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": "string" + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "uploadId": { - "type": "string" + "jwId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "filename": { + "code": { "type": "string" }, - "url": { - "type": "string" + "bizTypeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "contentType": { - "type": "string", - "nullable": true + "credits": { + "nullable": true, + "type": "number" }, - "size": { + "period": { + "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": { + "periodsPerWeek": { + "nullable": true, "type": "integer", - "minimum": 0, + "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 }, - "viewerHasReacted": { + "graduateAndPostgraduate": { + "nullable": true, "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": { + }, + "dateTimePlaceText": { + "nullable": true, "type": "string" }, - "name": { - "type": "string", + "dateTimePlacePersonText": { "nullable": true }, - "image": { - "type": "string", - "nullable": true + "actualPeriods": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "isUstcVerified": { - "type": "boolean" + "theoryPeriods": { + "nullable": true, + "type": "number" }, - "isAdmin": { - "type": "boolean" + "practicePeriods": { + "nullable": true, + "type": "number" }, - "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" - } + "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 }, - "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": { + "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": "string" - }, - "body": { - "type": "string" + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "visibility": { + "nameCn": { "type": "string" }, - "status": { + "nameEn": { + "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" - }, - "canModerate": { - "type": "boolean" } }, "required": [ "id", - "body", - "visibility", - "status", - "author", - "authorHidden", - "isAnonymous", - "isAuthor", - "createdAt", - "updatedAt", - "parentId", - "rootId", - "replies", - "attachments", - "reactions", - "canReply", - "canEdit", - "canModerate" + "nameCn", + "nameEn" ], "additionalProperties": false - } - }, - "attachments": { - "type": "array", - "items": { + }, + "classType": { + "nullable": true, "type": "object", "properties": { "id": { - "type": "string" + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "uploadId": { + "nameCn": { "type": "string" }, - "filename": { + "nameEn": { + "nullable": true, "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "classify": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "url": { + "nameCn": { "type": "string" }, - "contentType": { - "type": "string", - "nullable": true - }, - "size": { + "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", - "uploadId", - "filename", - "url", - "contentType", - "size" + "nameCn", + "nameEn" ], "additionalProperties": false - } - }, - "reactions": { - "type": "array", - "items": { + }, + "gradation": { + "nullable": true, "type": "object", "properties": { - "type": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { "type": "string" }, - "count": { + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "type": { + "nullable": true, + "type": "object", + "properties": { + "id": { "type": "integer", - "minimum": 0, + "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "viewerHasReacted": { - "type": "boolean" + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" } }, "required": [ - "type", - "count", - "viewerHasReacted" + "id", + "nameCn", + "nameEn" ], "additionalProperties": false } }, - "canReply": { - "type": "boolean" - }, - "canEdit": { - "type": "boolean" - }, - "canModerate": { - "type": "boolean" - } + "required": [ + "id", + "jwId", + "code", + "nameCn", + "nameEn", + "categoryId", + "classTypeId", + "classifyId", + "educationLevelId", + "gradationId", + "typeId", + "category", + "classType", + "classify", + "educationLevel", + "gradation", + "type" + ], + "additionalProperties": false }, - "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 + "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" + }, + "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)))$" + } }, - "size": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - } + "required": [ + "id", + "jwId", + "nameCn", + "code", + "startDate", + "endDate" + ], + "additionalProperties": false }, - "required": [ - "id", - "uploadId", - "filename", - "url", - "contentType", - "size" - ], - "additionalProperties": false - } - }, - "reactions": { - "type": "array", - "items": { - "type": "object", - "properties": { - "type": { - "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" + } }, - "count": { - "type": "integer", - "minimum": 0, - "maximum": 9007199254740991 + "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" + } }, - "viewerHasReacted": { - "type": "boolean" + "required": [ + "id", + "code", + "nameCn", + "nameEn", + "isCollege" + ], + "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 + } + }, + "required": [ + "id", + "personId", + "teacherId", + "code", + "nameCn", + "nameEn", + "age", + "email", + "telephone", + "mobile", + "address", + "postcode", + "qq", + "wechat", + "departmentId", + "teacherTitleId" + ], + "additionalProperties": false } - }, - "required": [ - "type", - "count", - "viewerHasReacted" - ], - "additionalProperties": false - } - }, - "canReply": { - "type": "boolean" - }, - "canEdit": { - "type": "boolean" - }, - "canModerate": { - "type": "boolean" + } + }, + "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": [ - "id", - "body", - "visibility", - "status", - "author", - "authorHidden", - "isAnonymous", - "isAuthor", - "createdAt", - "updatedAt", - "parentId", - "rootId", - "replies", - "attachments", - "reactions", - "canReply", - "canEdit", - "canModerate" - ], - "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 + }, + "commentsListResponseSchema": { + "type": "object", + "properties": { + "comments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/__schema0" } }, "hiddenCount": { @@ -9084,16 +12730,16 @@ "type": "object", "properties": { "userId": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" }, "name": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" }, "image": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" }, "isAdmin": { "type": "boolean" @@ -9105,14 +12751,14 @@ "type": "boolean" }, "suspensionReason": { - "type": "string", - "nullable": true + "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)))$", - "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)))$" } }, "required": [ @@ -9134,30 +12780,45 @@ "type": "string" }, "targetId": { - "type": "string", - "nullable": true + "anyOf": [ + { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + { + "type": "string" + }, + { + "type": "string", + "nullable": true, + "enum": [ + null + ] + } + ] }, "sectionId": { + "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" } }, "required": [ @@ -9191,433 +12852,292 @@ ], "additionalProperties": false }, - "commentCreateRequestSchema": { + "commentThreadResponseSchema": { "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": { + "thread": { "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/__schema0" } - } - }, - "required": [ - "targetType", - "body" - ], - "additionalProperties": false - }, - "courseDetailSchema": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "jwId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 }, - "code": { - "type": "string" - }, - "nameCn": { + "focusId": { "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": { + "hiddenCount": { "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "minimum": 0, + "maximum": 9007199254740991 }, - "category": { + "viewer": { "type": "object", "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "userId": { + "nullable": true, + "type": "string" + }, + "name": { + "nullable": true, + "type": "string" + }, + "image": { + "nullable": true, + "type": "string" + }, + "isAdmin": { + "type": "boolean" + }, + "isAuthenticated": { + "type": "boolean" }, - "nameCn": { + "isSuspended": { + "type": "boolean" + }, + "suspensionReason": { + "nullable": true, "type": "string" }, - "nameEn": { + "suspensionExpiresAt": { + "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)))$" } }, "required": [ - "id", - "nameCn", - "nameEn" + "userId", + "name", + "image", + "isAdmin", + "isAuthenticated", + "isSuspended", + "suspensionReason", + "suspensionExpiresAt" ], - "additionalProperties": false, - "nullable": true + "additionalProperties": false }, - "classType": { + "target": { "type": "object", "properties": { - "id": { + "sectionId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "nameCn": { + "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" }, - "nameEn": { - "type": "string", - "nullable": true - } - }, - "required": [ - "id", - "nameCn", - "nameEn" - ], - "additionalProperties": false, - "nullable": true - }, - "classify": { - "type": "object", - "properties": { - "id": { + "sectionTeacherTeacherName": { + "nullable": true, + "type": "string" + }, + "sectionTeacherCourseJwId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "nameCn": { + "sectionTeacherCourseName": { + "nullable": true, "type": "string" }, - "nameEn": { - "type": "string", - "nullable": true - } - }, - "required": [ - "id", - "nameCn", - "nameEn" - ], - "additionalProperties": false, - "nullable": true - }, - "educationLevel": { - "type": "object", - "properties": { - "id": { + "homeworkId": { + "nullable": true, + "type": "string" + }, + "homeworkTitle": { + "nullable": true, + "type": "string" + }, + "homeworkSectionJwId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "nameCn": { + "homeworkSectionCode": { + "nullable": true, "type": "string" }, - "nameEn": { - "type": "string", - "nullable": true - } - }, - "required": [ - "id", - "nameCn", - "nameEn" - ], - "additionalProperties": false, - "nullable": true - }, - "gradation": { - "type": "object", - "properties": { - "id": { + "sectionJwId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "nameCn": { + "sectionCode": { + "nullable": true, "type": "string" }, - "nameEn": { - "type": "string", - "nullable": true - } - }, - "required": [ - "id", - "nameCn", - "nameEn" - ], - "additionalProperties": false, - "nullable": true - }, - "type": { - "type": "object", - "properties": { - "id": { + "courseJwId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "nameCn": { + "courseName": { + "nullable": true, "type": "string" }, - "nameEn": { - "type": "string", - "nullable": true + "teacherName": { + "nullable": true, + "type": "string" } }, "required": [ - "id", - "nameCn", - "nameEn" + "sectionId", + "courseId", + "teacherId", + "sectionTeacherId", + "sectionTeacherSectionId", + "sectionTeacherTeacherId", + "sectionTeacherSectionJwId", + "sectionTeacherSectionCode", + "sectionTeacherTeacherName", + "sectionTeacherCourseJwId", + "sectionTeacherCourseName", + "homeworkId", + "homeworkTitle", + "homeworkSectionJwId", + "homeworkSectionCode", + "sectionJwId", + "sectionCode", + "courseJwId", + "courseName", + "teacherName" ], - "additionalProperties": false, - "nullable": true + "additionalProperties": false + } + }, + "required": [ + "thread", + "focusId", + "hiddenCount", + "viewer", + "target" + ], + "additionalProperties": false + }, + "commentUpdateResponseSchema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" }, - "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": { + "comment": { + "$ref": "#/components/schemas/__schema0" + } + }, + "required": [ + "success", + "comment" + ], + "additionalProperties": false + }, + "paginatedCourseResponseSchema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "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 - }, - "suggestScheduleWeeks": { - "nullable": true - }, - "suggestScheduleWeekInfo": { - "type": "string", - "nullable": true - }, - "scheduleJsonParams": { - "nullable": true + "maximum": 9007199254740991 }, - "selectedStdCount": { + "jwId": { "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, - "remark": { - "type": "string", - "nullable": true + "code": { + "type": "string" }, - "scheduleRemark": { - "type": "string", - "nullable": true + "nameCn": { + "type": "string" }, - "courseId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "nameEn": { + "nullable": true, + "type": "string" }, - "semesterId": { + "categoryId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, - "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 }, - "semester": { + "category": { + "nullable": true, "type": "object", "properties": { "id": { @@ -9625,7 +13145,26 @@ "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "jwId": { + "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 @@ -9633,34 +13172,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": { + "classify": { + "nullable": true, "type": "object", "properties": { "id": { @@ -9668,205 +13193,359 @@ "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "jwId": { + "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, - "nullable": true + "maximum": 9007199254740991 }, "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 }, - "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 - } + "gradation": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "required": [ - "id", - "personId", - "teacherId", - "code", - "nameCn", - "nameEn", - "age", - "email", - "telephone", - "mobile", - "address", - "postcode", - "qq", - "wechat", - "departmentId", - "teacherTitleId" - ], - "additionalProperties": false - } + "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", - "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" + "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": [ - "id", - "jwId", - "code", - "nameCn", - "nameEn", - "categoryId", - "classTypeId", - "classifyId", - "educationLevelId", - "gradationId", - "typeId", - "category", - "classType", - "classify", - "educationLevel", - "gradation", - "type", - "sections" + "data", + "pagination" ], "additionalProperties": false }, - "paginatedCourseResponseSchema": { + "courseDetailSchema": { "type": "object", "properties": { - "data": { + "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", @@ -9884,122 +13563,158 @@ "code": { "type": "string" }, - "nameCn": { - "type": "string" + "bizTypeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "nameEn": { - "type": "string", - "nullable": true + "credits": { + "nullable": true, + "type": "number" }, - "categoryId": { + "period": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, - "classTypeId": { + "periodsPerWeek": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, - "classifyId": { + "timesPerWeek": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, - "educationLevelId": { + "stdCount": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, - "gradationId": { + "limitCount": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, + "maximum": 9007199254740991 + }, + "graduateAndPostgraduate": { + "nullable": true, + "type": "boolean" + }, + "dateTimePlaceText": { + "nullable": true, + "type": "string" + }, + "dateTimePlacePersonText": { "nullable": true }, - "typeId": { + "actualPeriods": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, - "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 + "theoryPeriods": { + "nullable": true, + "type": "number" }, - "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, + "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 }, - "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, + "suggestScheduleWeekInfo": { + "nullable": true, + "type": "string" + }, + "scheduleJsonParams": { "nullable": true }, - "educationLevel": { + "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, "type": "object", "properties": { "id": { @@ -10007,26 +13722,7 @@ "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": { + "jwId": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 @@ -10034,20 +13730,34 @@ "nameCn": { "type": "string" }, - "nameEn": { + "code": { + "type": "string" + }, + "startDate": { + "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)))$" + }, + "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", - "nameEn" + "code", + "startDate", + "endDate" ], - "additionalProperties": false, - "nullable": true + "additionalProperties": false }, - "type": { + "campus": { + "nullable": true, "type": "object", "properties": { "id": { @@ -10055,117 +13765,223 @@ "minimum": -9007199254740991, "maximum": 9007199254740991 }, + "jwId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, "nameCn": { "type": "string" }, "nameEn": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" + }, + "code": { + "nullable": true, + "type": "string" } }, "required": [ "id", + "jwId", "nameCn", - "nameEn" + "nameEn", + "code" ], - "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 + } + }, + "required": [ + "id", + "personId", + "teacherId", + "code", + "nameCn", + "nameEn", + "age", + "email", + "telephone", + "mobile", + "address", + "postcode", + "qq", + "wechat", + "departmentId", + "teacherTitleId" + ], + "additionalProperties": false + } } }, "required": [ "id", "jwId", "code", - "nameCn", - "nameEn", - "categoryId", - "classTypeId", - "classifyId", - "educationLevelId", - "gradationId", - "typeId", - "category", - "classType", - "classify", - "educationLevel", - "gradation", - "type" + "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 } - }, - "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" + "id", + "jwId", + "code", + "nameCn", + "nameEn", + "categoryId", + "classTypeId", + "classifyId", + "educationLevelId", + "gradationId", + "typeId", + "category", + "classType", + "classify", + "educationLevel", + "gradation", + "type", + "sections" ], "additionalProperties": false }, - "dashboardLinkPinRequestSchema": { + "dashboardLinkPinResponseSchema": { "type": "object", "properties": { - "slug": { - "type": "string", - "minLength": 1 - }, - "returnTo": { - "type": "string" + "pinnedSlugs": { + "type": "array", + "items": { + "type": "string" + } }, - "action": { - "type": "string", - "enum": [ - "pin", - "unpin" - ] - } - }, - "required": [ - "slug" - ], - "additionalProperties": false - }, - "dashboardLinkVisitRequestSchema": { - "type": "object", - "properties": { - "slug": { - "type": "string", - "minLength": 1 + "maxPinnedLinks": { + "type": "integer", + "exclusiveMinimum": true, + "maximum": 9007199254740991 + }, + "error": { + "nullable": true, + "type": "string" } }, "required": [ - "slug" + "pinnedSlugs", + "maxPinnedLinks", + "error" ], "additionalProperties": false }, @@ -10176,8 +13992,8 @@ "type": "object", "properties": { "id": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" }, "content": { "type": "string" @@ -10188,28 +14004,29 @@ "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)))$" }, "lastEditedBy": { + "nullable": true, "type": "object", "properties": { "id": { "type": "string" }, "name": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" }, "image": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" }, "username": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" } }, "required": [ @@ -10218,8 +14035,7 @@ "image", "username" ], - "additionalProperties": false, - "nullable": true + "additionalProperties": false } }, "required": [ @@ -10245,29 +14061,30 @@ "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 + "nullable": true, + "type": "string" }, "nextContent": { "type": "string" }, "editor": { + "nullable": true, "type": "object", "properties": { "id": { "type": "string" }, "name": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" }, "image": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" }, "username": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" } }, "required": [ @@ -10276,8 +14093,7 @@ "image", "username" ], - "additionalProperties": false, - "nullable": true + "additionalProperties": false } }, "required": [ @@ -10294,16 +14110,16 @@ "type": "object", "properties": { "userId": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" }, "name": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" }, "image": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" }, "isAdmin": { "type": "boolean" @@ -10315,14 +14131,14 @@ "type": "boolean" }, "suspensionReason": { - "type": "string", - "nullable": true + "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)))$", - "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)))$" } }, "required": [ @@ -10361,93 +14177,6 @@ ], "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": { @@ -10455,16 +14184,16 @@ "type": "object", "properties": { "userId": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" }, "name": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" }, "image": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" }, "isAdmin": { "type": "boolean" @@ -10476,14 +14205,14 @@ "type": "boolean" }, "suspensionReason": { - "type": "string", - "nullable": true + "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)))$", - "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)))$" } }, "required": [ @@ -10516,22 +14245,22 @@ "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)))$", - "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)))$" }, "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)))$", - "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)))$" }, "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", @@ -10544,10 +14273,10 @@ "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)))$" }, "sectionId": { "type": "integer", @@ -10555,16 +14284,16 @@ "maximum": 9007199254740991 }, "createdById": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" }, "updatedById": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" }, "deletedById": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" }, "section": { "type": "object", @@ -10583,113 +14312,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", @@ -10697,40 +14426,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", @@ -10752,51 +14481,51 @@ "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 }, "namePrimary": { "type": "string" }, "nameSecondary": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" } }, "required": [ @@ -10817,6 +14546,7 @@ "additionalProperties": false }, "semester": { + "nullable": true, "type": "object", "properties": { "id": { @@ -10836,16 +14566,16 @@ "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)))$", - "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)))$" }, "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)))$", - "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)))$" } }, "required": [ @@ -10856,8 +14586,7 @@ "startDate", "endDate" ], - "additionalProperties": false, - "nullable": true + "additionalProperties": false } }, "required": [ @@ -10901,6 +14630,7 @@ "additionalProperties": false }, "description": { + "nullable": true, "type": "object", "properties": { "id": { @@ -10920,36 +14650,36 @@ "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" } }, "required": [ @@ -10964,26 +14694,26 @@ "teacherId", "homeworkId" ], - "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": [ @@ -10992,26 +14722,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": [ @@ -11020,26 +14750,26 @@ "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": [ @@ -11048,10 +14778,10 @@ "username", "image" ], - "additionalProperties": false, - "nullable": true + "additionalProperties": false }, "completion": { + "nullable": true, "type": "object", "properties": { "completedAt": { @@ -11063,270 +14793,41 @@ "required": [ "completedAt" ], - "additionalProperties": false, - "nullable": true + "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": { - "type": "string", - "nullable": true - }, - "actorId": { - "type": "string", - "nullable": true - }, - "actor": { - "type": "object", - "properties": { - "id": { - "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 - } - }, - "required": [ - "id", - "action", - "titleSnapshot", - "createdAt", - "sectionId", - "homeworkId", - "actorId", - "actor" - ], - "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 + "required": [ + "id", + "title", + "isMajor", + "requiresTeam", + "publishedAt", + "submissionStartAt", + "submissionDueAt", + "createdAt", + "updatedAt", + "deletedAt", + "sectionId", + "createdById", + "updatedById", + "deletedById", + "section", + "description", + "createdBy", + "updatedBy", + "deletedBy", + "completion", + "commentCount" + ], + "additionalProperties": false + } }, - "homeworks": { + "auditLogs": { "type": "array", "items": { "type": "object", @@ -11334,1141 +14835,3188 @@ "id": { "type": "string" }, - "title": { - "type": "string" - }, - "isMajor": { - "type": "boolean" - }, - "requiresTeam": { - "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)))$", - "nullable": true - }, - "submissionStartAt": { + "action": { "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 + "enum": [ + "created", + "deleted" + ] }, - "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)))$", - "nullable": true + "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)))$" }, - "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 - }, "sectionId": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "createdById": { - "type": "string", - "nullable": true - }, - "updatedById": { - "type": "string", - "nullable": true + "homeworkId": { + "nullable": true, + "type": "string" }, - "deletedById": { - "type": "string", - "nullable": true + "actorId": { + "nullable": true, + "type": "string" }, - "section": { + "actor": { + "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 + "name": { + "nullable": true, + "type": "string" }, - "openDepartmentId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "username": { + "nullable": true, + "type": "string" }, - "teachLanguageId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "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 + }, + "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" + } }, - "roomTypeId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "required": [ + "id", + "jwId", + "code", + "nameCn", + "nameEn", + "categoryId", + "classTypeId", + "classifyId", + "educationLevelId", + "gradationId", + "typeId", + "namePrimary", + "nameSecondary" + ], + "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" + }, + "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)))$" + } }, - "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", + "nameCn", + "code", + "startDate", + "endDate" + ], + "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 + }, + "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 + }, + "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 }, - "required": [ - "id", - "jwId", - "code", - "nameCn", - "nameEn", - "categoryId", - "classTypeId", - "classifyId", - "educationLevelId", - "gradationId", - "typeId", - "namePrimary", - "nameSecondary" - ], - "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 - } + "jwId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "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" - }, - "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 + "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" + } }, - "teacherId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "required": [ + "id", + "jwId", + "code", + "nameCn", + "nameEn", + "categoryId", + "classTypeId", + "classifyId", + "educationLevelId", + "gradationId", + "typeId", + "namePrimary", + "nameSecondary" + ], + "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" + }, + "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)))$" + } }, - "homeworkId": { - "type": "string", - "nullable": true - } + "required": [ + "id", + "jwId", + "nameCn", + "code", + "startDate", + "endDate" + ], + "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 + }, + "description": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "string" }, - "required": [ - "id", - "content", - "createdAt", - "updatedAt", - "lastEditedAt", - "lastEditedById", - "sectionId", - "courseId", - "teacherId", - "homeworkId" - ], - "additionalProperties": false, - "nullable": true + "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" + } }, - "createdBy": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string", - "nullable": true - }, - "username": { - "type": "string", - "nullable": true - }, - "image": { - "type": "string", - "nullable": true - } + "required": [ + "id", + "content", + "createdAt", + "updatedAt", + "lastEditedAt", + "lastEditedById", + "sectionId", + "courseId", + "teacherId", + "homeworkId" + ], + "additionalProperties": false + }, + "createdBy": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "string" }, - "required": [ - "id", - "name", - "username", - "image" - ], - "additionalProperties": false, - "nullable": true + "name": { + "nullable": true, + "type": "string" + }, + "username": { + "nullable": true, + "type": "string" + }, + "image": { + "nullable": true, + "type": "string" + } }, - "updatedBy": { + "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": [ + "success", + "homework" + ], + "additionalProperties": false + }, + "homeworkCompletionResponseSchema": { + "type": "object", + "properties": { + "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": [ + "completed", + "completedAt" + ], + "additionalProperties": false + }, + "homeworkCompletionBatchResponseSchema": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "oneOf": [ + { "type": "object", "properties": { - "id": { - "type": "string" + "success": { + "type": "boolean", + "enum": [ + true + ] }, - "name": { - "type": "string", - "nullable": true + "homeworkId": { + "type": "string" }, - "username": { - "type": "string", - "nullable": true + "completed": { + "type": "boolean" }, - "image": { + "completedAt": { + "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)))$" } }, "required": [ - "id", - "name", - "username", - "image" + "success", + "homeworkId", + "completed", + "completedAt" ], - "additionalProperties": false, - "nullable": true + "additionalProperties": false }, - "deletedBy": { + { "type": "object", "properties": { - "id": { - "type": "string" + "success": { + "type": "boolean", + "enum": [ + false + ] }, - "name": { - "type": "string", - "nullable": true + "homeworkId": { + "type": "string" }, - "username": { - "type": "string", - "nullable": true + "completed": { + "type": "boolean" }, - "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)))$" + "error": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "not_found", + "deleted" + ] + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "additionalProperties": false } }, "required": [ - "completedAt" + "success", + "homeworkId", + "completed", + "error" ], - "additionalProperties": false, - "nullable": true - }, - "commentCount": { - "type": "integer", - "minimum": 0, - "maximum": 9007199254740991 + "additionalProperties": false } - }, - "required": [ - "id", - "title", - "isMajor", - "requiresTeam", - "publishedAt", - "submissionStartAt", - "submissionDueAt", - "createdAt", - "updatedAt", - "deletedAt", - "sectionId", - "createdById", - "updatedById", - "deletedById", - "section", - "description", - "createdBy", - "updatedBy", - "deletedBy", - "completion", - "commentCount" ], - "additionalProperties": false + "type": "object" } + } + }, + "required": [ + "results" + ], + "additionalProperties": false + }, + "meResponseSchema": { + "type": "object", + "properties": { + "id": { + "type": "string" }, - "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 + "email": { + "nullable": true, + "type": "string" + }, + "name": { + "nullable": true, + "type": "string" + }, + "image": { + "nullable": true, + "type": "string" + }, + "username": { + "nullable": true, + "type": "string" + }, + "isAdmin": { + "type": "boolean" + } + }, + "required": [ + "id", + "email", + "name", + "image", + "username", + "isAdmin" + ], + "additionalProperties": false + }, + "compactOverviewResponseSchema": { + "type": "object", + "properties": { + "user": { + "type": "object", + "properties": { + "userId": { + "nullable": true, + "type": "string" + }, + "name": { + "nullable": true, + "type": "string" + }, + "image": { + "nullable": true, + "type": "string" + }, + "isAdmin": { + "type": "boolean" + } + }, + "required": [ + "userId", + "name", + "image", + "isAdmin" + ], + "additionalProperties": false + }, + "anchor": { + "type": "object", + "properties": { + "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)))$" + }, + "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)))$" + }, + "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)))$" + }, + "homeworkWindowDays": { + "type": "integer", + "exclusiveMinimum": true, + "maximum": 9007199254740991 + }, + "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)))$" + }, + "limit": { + "type": "integer", + "exclusiveMinimum": true, + "maximum": 9007199254740991 + } + }, + "required": [ + "atTime", + "todayStart", + "tomorrowStart", + "homeworkWindowDays", + "homeworkWindowEnd", + "limit" + ], + "additionalProperties": false + }, + "counts": { + "type": "object", + "properties": { + "todos": { + "type": "object", + "properties": { + "incomplete": { + "type": "integer", + "minimum": 0, + "maximum": 9007199254740991 + }, + "completed": { + "type": "integer", + "minimum": 0, + "maximum": 9007199254740991 + }, + "overdue": { + "type": "integer", + "minimum": 0, + "maximum": 9007199254740991 + } }, - "actor": { + "required": [ + "incomplete", + "completed", + "overdue" + ], + "additionalProperties": false + }, + "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": "string" + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "name": { + "periods": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "date": { + "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)))$" + }, + "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 + } }, - "username": { - "type": "string", - "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, + "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" + ], + "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 }, - "image": { - "type": "string", - "nullable": true - } - }, - "required": [ - "id", - "name", - "username", - "image" - ], - "additionalProperties": false, - "nullable": true - } - }, - "required": [ - "id", - "action", - "titleSnapshot", - "createdAt", - "sectionId", - "homeworkId", - "actorId", - "actor" - ], - "additionalProperties": false - } - }, - "sectionIds": { - "type": "array", - "items": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - } - } - }, - "required": [ - "viewer", - "homeworks", - "auditLogs", - "sectionIds" - ], - "additionalProperties": false - }, - "metadataResponseSchema": { - "type": "object", - "properties": { - "educationLevels": { - "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 - } - }, - "courseCategories": { - "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 - } - }, - "courseClassifies": { - "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 - } - }, - "classTypes": { - "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 - } - }, - "courseTypes": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "nameCn": { - "type": "string" - }, - "nameEn": { - "type": "string", - "nullable": true + "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 } - }, - "required": [ - "id", - "nameCn", - "nameEn" - ], - "additionalProperties": false - } + } + }, + "required": [ + "total", + "items" + ], + "additionalProperties": false }, - "courseGradations": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "nameCn": { - "type": "string" + "todos": { + "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 + } }, - "nameEn": { - "type": "string", - "nullable": true - } + "required": [ + "incomplete", + "completed", + "overdue" + ], + "additionalProperties": false }, - "required": [ - "id", - "nameCn", - "nameEn" - ], - "additionalProperties": false - } - }, - "examModes": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "nameCn": { - "type": "string" - }, - "nameEn": { - "type": "string", - "nullable": true + "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", - "nameCn", - "nameEn" - ], - "additionalProperties": false - } + } + }, + "required": [ + "counts", + "items" + ], + "additionalProperties": false }, - "teachLanguages": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "nameCn": { - "type": "string" - }, - "nameEn": { - "type": "string", - "nullable": true - } + "homeworks": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "minimum": 0, + "maximum": 9007199254740991 }, - "required": [ - "id", - "nameCn", - "nameEn" - ], - "additionalProperties": false - } - }, - "campuses": { - "type": "array", - "items": { - "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 - }, - "buildings": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "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 + }, + "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, + "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" + ], + "additionalProperties": false + } }, - "jwId": { - "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" + }, + "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" + } }, - "nameCn": { - "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" + } }, - "nameEn": { - "type": "string", - "nullable": true + "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" + } }, - "code": { - "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)))$" + } }, - "campusId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - } + "required": [ + "completedAt" + ], + "additionalProperties": false }, - "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", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": [ - "openapi", - "info", - "paths" - ], - "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": { - "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": { + "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": [ + "total", + "items" + ], + "additionalProperties": false + }, + "exams": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "minimum": 0, + "maximum": 9007199254740991 + }, + "items": { + "type": "array", + "items": { "type": "object", "properties": { "id": { @@ -12481,59 +18029,109 @@ "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "nameCn": { - "type": "string" - }, - "nameEn": { - "type": "string", - "nullable": true - }, - "code": { - "type": "string" - }, - "floor": { + "examType": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, - "virtual": { - "type": "boolean" + "startTime": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "seatsForSection": { + "endTime": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "remark": { + "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)))$" }, - "seats": { + "examTakeCount": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "buildingId": { + "examMode": { + "nullable": true, + "type": "string" + }, + "examBatchId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, - "roomTypeId": { + "sectionId": { "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, - "namePrimary": { - "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 }, - "nameSecondary": { - "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 + } }, - "building": { + "section": { "type": "object", "properties": { "id": { @@ -12546,30 +18144,160 @@ "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "nameCn": { + "code": { "type": "string" }, - "nameEn": { - "type": "string", - "nullable": true + "bizTypeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "code": { + "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" }, - "campusId": { + "dateTimePlacePersonText": { + "nullable": true + }, + "actualPeriods": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, - "maximum": 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 }, - "namePrimary": { + "suggestScheduleWeekInfo": { + "nullable": true, "type": "string" }, - "nameSecondary": { - "type": "string", + "scheduleJsonParams": { "nullable": true }, - "campus": { + "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": { @@ -12580,272 +18308,318 @@ "jwId": { "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 + }, + "code": { + "type": "string" }, "nameCn": { "type": "string" }, "nameEn": { - "type": "string", - "nullable": true + "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, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "jwId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" }, "code": { - "type": "string", - "nullable": true - }, - "namePrimary": { "type": "string" }, - "nameSecondary": { + "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", - "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)))$" } }, "required": [ "id", "jwId", "nameCn", - "nameEn", "code", - "namePrimary", - "nameSecondary" + "startDate", + "endDate" ], - "additionalProperties": false, - "nullable": true + "additionalProperties": false } }, "required": [ "id", "jwId", - "nameCn", - "nameEn", "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", - "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" - }, - "namePrimary": { - "type": "string" - }, - "nameSecondary": { - "type": "string", - "nullable": true - } - }, - "required": [ - "id", - "jwId", - "nameCn", - "nameEn", - "code", - "namePrimary", - "nameSecondary" + "examModeId", + "openDepartmentId", + "teachLanguageId", + "roomTypeId", + "course", + "semester" ], - "additionalProperties": false, - "nullable": true + "additionalProperties": false } }, "required": [ "id", "jwId", - "nameCn", - "nameEn", - "code", - "floor", - "virtual", - "seatsForSection", - "remark", - "seats", - "buildingId", - "roomTypeId", - "namePrimary", - "nameSecondary", - "building", - "roomType" + "examType", + "startTime", + "endTime", + "examDate", + "examTakeCount", + "examMode", + "examBatchId", + "sectionId", + "examBatch", + "examRooms", + "section" ], - "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 - }, - "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 - } + "additionalProperties": false + } + } + }, + "required": [ + "total", + "items" + ], + "additionalProperties": false + } + }, + "required": [ + "user", + "anchor", + "counts", + "schedules", + "todos", + "homeworks", + "exams" + ], + "additionalProperties": false + }, + "subscribedHomeworksResponseSchema": { + "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", @@ -12864,113 +18638,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", @@ -12978,40 +18752,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", @@ -13033,51 +18807,51 @@ "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 }, "namePrimary": { "type": "string" }, "nameSecondary": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" } }, "required": [ @@ -13098,6 +18872,7 @@ "additionalProperties": false }, "semester": { + "nullable": true, "type": "object", "properties": { "id": { @@ -13117,16 +18892,16 @@ "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)))$", - "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)))$" }, "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)))$", - "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)))$" } }, "required": [ @@ -13137,8 +18912,7 @@ "startDate", "endDate" ], - "additionalProperties": false, - "nullable": true + "additionalProperties": false } }, "required": [ @@ -13181,711 +18955,1546 @@ ], "additionalProperties": false }, - "scheduleGroup": { + "description": { + "nullable": true, "type": "object", "properties": { "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "type": "string" }, - "jwId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "content": { + "type": "string" }, - "no": { - "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)))$" }, - "limitCount": { + "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 }, - "stdCount": { + "courseId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "actualPeriods": { + "teacherId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "isDefault": { - "type": "boolean" + "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" }, - "sectionId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "name": { + "nullable": true, + "type": "string" + }, + "username": { + "nullable": true, + "type": "string" + }, + "image": { + "nullable": true, + "type": "string" } }, "required": [ "id", - "jwId", - "no", - "limitCount", - "stdCount", - "actualPeriods", - "isDefault", - "sectionId" + "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 - } - }, - "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 - }, - "sectionDetailSchema": { - "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": { - "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 + "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 + } }, - "category": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "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" + } }, - "nameCn": { - "type": "string" + "required": [ + "id", + "name", + "username", + "image" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "action", + "titleSnapshot", + "createdAt", + "sectionId", + "homeworkId", + "actorId", + "actor" + ], + "additionalProperties": false + } + }, + "sectionIds": { + "type": "array", + "items": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + } + } + }, + "required": [ + "viewer", + "homeworks", + "auditLogs", + "sectionIds" + ], + "additionalProperties": false + }, + "subscribedSchedulesResponseSchema": { + "type": "object", + "properties": { + "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" + }, + "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 + } }, - "nameEn": { - "type": "string", - "nullable": true + "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 } }, - "required": [ - "id", - "nameCn", - "nameEn" - ], - "additionalProperties": false, - "nullable": true - }, - "classType": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "nameCn": { - "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, + "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" + ], + "additionalProperties": false + } }, - "nameEn": { - "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" + ], + "additionalProperties": false }, - "required": [ - "id", - "nameCn", - "nameEn" - ], - "additionalProperties": false, - "nullable": true - }, - "classify": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "nameCn": { - "type": "string" + "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 + } }, - "nameEn": { - "type": "string", - "nullable": true - } - }, - "required": [ - "id", - "nameCn", - "nameEn" - ], - "additionalProperties": false, - "nullable": true + "required": [ + "id", + "jwId", + "no", + "limitCount", + "stdCount", + "actualPeriods", + "isDefault", + "sectionId" + ], + "additionalProperties": false + } }, - "educationLevel": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "nameCn": { - "type": "string" - }, - "nameEn": { - "type": "string", - "nullable": true - } + "required": [ + "id", + "periods", + "date", + "weekday", + "startTime", + "endTime", + "experiment", + "customPlace", + "lessonType", + "weekIndex", + "exerciseClass", + "startUnit", + "endUnit", + "roomId", + "sectionId", + "scheduleGroupId", + "room", + "teachers", + "section", + "scheduleGroup" + ], + "additionalProperties": false + } + } + }, + "required": [ + "schedules" + ], + "additionalProperties": false + }, + "metadataResponseSchema": { + "type": "object", + "properties": { + "educationLevels": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "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 - } + "nameCn": { + "type": "string" }, - "required": [ - "id", - "nameCn", - "nameEn" - ], - "additionalProperties": false, - "nullable": true + "nameEn": { + "nullable": true, + "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 - } - }, - "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 + } }, - "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 + "courseCategories": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } }, - "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", + "nameCn", + "nameEn" + ], + "additionalProperties": false + } }, - "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 + "courseClassifies": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } }, - "code": { - "type": "string", - "nullable": true - } - }, - "required": [ - "id", - "jwId", - "nameCn", - "nameEn", - "code" - ], - "additionalProperties": false, - "nullable": true + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + } }, - "openDepartment": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "code": { - "type": "string" - }, - "nameCn": { - "type": "string" - }, - "nameEn": { - "type": "string", - "nullable": true + "classTypes": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } }, - "isCollege": { - "type": "boolean", - "nullable": true - } - }, - "required": [ - "id", - "code", - "nameCn", - "nameEn", - "isCollege" - ], - "additionalProperties": false, - "nullable": true + "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 + } }, - "examMode": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "courseGradations": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } }, - "nameCn": { - "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" + } }, - "nameEn": { - "type": "string", - "nullable": true - } - }, - "required": [ - "id", - "nameCn", - "nameEn" - ], - "additionalProperties": false, - "nullable": true + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + } }, - "teachLanguage": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "teachLanguages": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } }, - "nameCn": { - "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 + } + } }, - "nameEn": { - "type": "string", - "nullable": true - } - }, - "required": [ - "id", - "nameCn", - "nameEn" - ], - "additionalProperties": false, - "nullable": true + "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" }, - "roomType": { + "info": { "type": "object", "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "jwId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "nameCn": { + "title": { "type": "string" }, - "nameEn": { - "type": "string", - "nullable": true + "version": { + "type": "string" }, - "code": { + "description": { "type": "string" } }, "required": [ - "id", - "jwId", - "nameCn", - "nameEn", - "code" + "title", + "version" ], - "additionalProperties": false, - "nullable": true + "additionalProperties": false + }, + "servers": { + "type": "array", + "items": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "description": { + "type": "string" + } + }, + "required": [ + "url" + ], + "additionalProperties": false + } }, - "schedules": { + "paths": { + "type": "object", + "additionalProperties": {} + } + }, + "required": [ + "openapi", + "info", + "paths" + ], + "additionalProperties": false + }, + "paginatedScheduleResponseSchema": { + "type": "object", + "properties": { + "data": { "type": "array", "items": { "type": "object", @@ -13901,10 +20510,10 @@ "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)))$", - "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)))$" }, "weekday": { "type": "integer", @@ -13918,16 +20527,16 @@ "type": "string" }, "experiment": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" }, "customPlace": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" }, "lessonType": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" }, "weekIndex": { "type": "integer", @@ -13935,8 +20544,8 @@ "maximum": 9007199254740991 }, "exerciseClass": { - "type": "boolean", - "nullable": true + "nullable": true, + "type": "boolean" }, "startUnit": { "type": "integer", @@ -13948,21 +20557,788 @@ "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "roomId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "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 + } }, - "sectionId": { - "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, + "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" + ], + "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 }, - "scheduleGroupId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "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": [ @@ -13981,12 +21357,58 @@ "endUnit", "roomId", "sectionId", - "scheduleGroupId" + "scheduleGroupId", + "room", + "teachers", + "section", + "scheduleGroup" ], "additionalProperties": false } }, - "scheduleGroups": { + "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", @@ -14001,128 +21423,49 @@ "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "no": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "code": { + "type": "string" }, - "limitCount": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "credits": { + "nullable": true, + "type": "number" }, "stdCount": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "actualPeriods": { + "limitCount": { + "nullable": true, "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 - } - }, - "teachers": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { + "courseId": { "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": { + "semesterId": { + "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 - }, - "wechat": { - "type": "string", - "nullable": true + "maximum": 9007199254740991 }, - "departmentId": { + "campusId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, - "teacherTitleId": { + "openDepartmentId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, - "department": { + "course": { "type": "object", "properties": { "id": { @@ -14130,6 +21473,11 @@ "minimum": -9007199254740991, "maximum": 9007199254740991 }, + "jwId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, "code": { "type": "string" }, @@ -14137,25 +21485,50 @@ "type": "string" }, "nameEn": { - "type": "string", - "nullable": true - }, - "isCollege": { - "type": "boolean", - "nullable": true + "nullable": true, + "type": "string" } }, "required": [ "id", + "jwId", "code", "nameCn", - "nameEn", - "isCollege" + "nameEn" ], - "additionalProperties": false, - "nullable": true + "additionalProperties": false }, - "teacherTitle": { + "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": { @@ -14164,6 +21537,7 @@ "maximum": 9007199254740991 }, "jwId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 @@ -14172,15 +21546,12 @@ "type": "string" }, "nameEn": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" }, "code": { + "nullable": true, "type": "string" - }, - "enabled": { - "type": "boolean", - "nullable": true } }, "required": [ @@ -14188,379 +21559,700 @@ "jwId", "nameCn", "nameEn", - "code", - "enabled" + "code" ], - "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" + } + }, + "required": [ + "id", + "personId", + "teacherId", + "code", + "nameCn", + "nameEn" + ], + "additionalProperties": false + } } }, "required": [ "id", - "personId", - "teacherId", + "jwId", "code", - "nameCn", - "nameEn", - "age", - "email", - "telephone", - "mobile", - "address", - "postcode", - "qq", - "wechat", - "departmentId", - "teacherTitleId", - "department", - "teacherTitle" + "credits", + "stdCount", + "limitCount", + "courseId", + "semesterId", + "campusId", + "openDepartmentId", + "course", + "semester", + "campus", + "teachers" ], "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": { + "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 + }, + "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 + }, + "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 }, - "nullable": true - }, - "weekIndicesMsg": { - "type": "string", - "nullable": true - }, - "teacherLessonTypeId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "teacher": { - "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 - } + "nameCn": { + "type": "string" }, - "required": [ - "id", - "personId", - "teacherId", - "code", - "nameCn", - "nameEn", - "age", - "email", - "telephone", - "mobile", - "address", - "postcode", - "qq", - "wechat", - "departmentId", - "teacherTitleId" - ], - "additionalProperties": false + "nameEn": { + "nullable": true, + "type": "string" + } }, - "teacherLessonType": { - "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" - }, - "role": { - "type": "string", - "nullable": true - }, - "enabled": { - "type": "boolean", - "nullable": true - } - }, - "required": [ - "id", - "jwId", - "nameCn", - "nameEn", - "code", - "role", - "enabled" - ], - "additionalProperties": false, - "nullable": true - } + "required": [ + "id", + "nameCn", + "nameEn" + ], + "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 - }, - "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 + "classType": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } }, - "examBatchId": { - "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" + } }, - "sectionId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "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" + } }, - "examBatch": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "nameCn": { - "type": "string" - }, - "nameEn": { - "type": "string", - "nullable": true - } + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "gradation": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "required": [ - "id", - "nameCn", - "nameEn" - ], - "additionalProperties": false, - "nullable": true + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } }, - "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 + "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 + }, + "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" + }, + "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" + ], + "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 + }, + "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" }, - "required": [ - "id", - "jwId", - "examType", - "startTime", - "endTime", - "examDate", - "examTakeCount", - "examMode", - "examBatchId", - "sectionId", - "examBatch", - "examRooms" - ], - "additionalProperties": false - } + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false }, - "adminClasses": { + "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": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "jwId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "code": { + "type": "string" + } + }, + "required": [ + "id", + "jwId", + "nameCn", + "nameEn", + "code" + ], + "additionalProperties": false + }, + "schedules": { "type": "array", "items": { "type": "object", @@ -14570,160 +22262,98 @@ "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "jwId": { + "periods": { "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, - "code": { + "date": { + "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)))$" }, - "grade": { - "type": "string", - "nullable": true + "weekday": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "nameCn": { + "startTime": { "type": "string" }, - "nameEn": { - "type": "string", - "nullable": true + "endTime": { + "type": "string" }, - "stdCount": { + "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 }, - "planCount": { + "exerciseClass": { + "nullable": true, + "type": "boolean" + }, + "startUnit": { "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, - "enabled": { - "type": "boolean", - "nullable": true + "endUnit": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "abbrZh": { - "type": "string", - "nullable": true + "roomId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "abbrEn": { - "type": "string", - "nullable": true + "sectionId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "scheduleGroupId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 } }, "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": { - "semester": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "nameCn": { - "type": "string", - "nullable": true - }, - "code": { - "type": "string", - "nullable": true - } - }, - "required": [ - "id", - "nameCn", - "code" - ], - "additionalProperties": false - }, - "matchedCodes": { - "type": "array", - "items": { - "type": "string" - } - }, - "unmatchedCodes": { - "type": "array", - "items": { - "type": "string" + "periods", + "date", + "weekday", + "startTime", + "endTime", + "experiment", + "customPlace", + "lessonType", + "weekIndex", + "exerciseClass", + "startUnit", + "endUnit", + "roomId", + "sectionId", + "scheduleGroupId" + ], + "additionalProperties": false } }, - "sections": { + "scheduleGroups": { "type": "array", "items": { "type": "object", @@ -14738,160 +22368,273 @@ "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "code": { - "type": "string" - }, - "bizTypeId": { + "no": { "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, - "credits": { - "type": "number", - "nullable": true + "limitCount": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "period": { + "stdCount": { "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, - "periodsPerWeek": { + "actualPeriods": { "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, - "timesPerWeek": { + "isDefault": { + "type": "boolean" + }, + "sectionId": { "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "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 }, - "stdCount": { + "personId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, - "limitCount": { + "teacherId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, - "graduateAndPostgraduate": { - "type": "boolean", - "nullable": true + "code": { + "nullable": true, + "type": "string" }, - "dateTimePlaceText": { - "type": "string", - "nullable": true + "nameCn": { + "type": "string" }, - "dateTimePlacePersonText": { - "nullable": true + "nameEn": { + "nullable": true, + "type": "string" }, - "actualPeriods": { + "age": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "theoryPeriods": { - "type": "number", - "nullable": true - }, - "practicePeriods": { - "type": "number", - "nullable": true - }, - "experimentPeriods": { - "type": "number", - "nullable": true + "maximum": 9007199254740991 }, - "machinePeriods": { - "type": "number", - "nullable": true + "email": { + "nullable": true, + "type": "string" }, - "designPeriods": { - "type": "number", - "nullable": true + "telephone": { + "nullable": true, + "type": "string" }, - "testPeriods": { - "type": "number", - "nullable": true + "mobile": { + "nullable": true, + "type": "string" }, - "scheduleState": { - "type": "string", - "nullable": true + "address": { + "nullable": true, + "type": "string" }, - "suggestScheduleWeeks": { - "nullable": true + "postcode": { + "nullable": true, + "type": "string" }, - "suggestScheduleWeekInfo": { - "type": "string", - "nullable": true + "qq": { + "nullable": true, + "type": "string" }, - "scheduleJsonParams": { - "nullable": true + "wechat": { + "nullable": true, + "type": "string" }, - "selectedStdCount": { + "departmentId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "remark": { - "type": "string", - "nullable": true - }, - "scheduleRemark": { - "type": "string", - "nullable": true + "maximum": 9007199254740991 }, - "courseId": { + "teacherTitleId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "semesterId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "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 }, - "campusId": { + "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 + } + }, + "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, - "nullable": true + "maximum": 9007199254740991 }, - "examModeId": { + "teacherId": { "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, - "openDepartmentId": { + "sectionId": { "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 + }, + "role": { + "nullable": true, + "type": "string" }, - "teachLanguageId": { + "period": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, - "roomTypeId": { + "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, - "nullable": true + "maximum": 9007199254740991 }, - "course": { + "teacher": { "type": "object", "properties": { "id": { @@ -14899,267 +22642,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" }, "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 + "nullable": true, + "type": "string" }, - "educationLevelId": { + "age": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, - "gradationId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "email": { + "nullable": true, + "type": "string" }, - "typeId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "telephone": { + "nullable": true, + "type": "string" }, - "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 + "mobile": { + "nullable": true, + "type": "string" }, - "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 + "address": { + "nullable": true, + "type": "string" }, - "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 + "postcode": { + "nullable": true, + "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 + "qq": { + "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 + "wechat": { + "nullable": true, + "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 - } - }, - "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": { + "departmentId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "jwId": { + "teacherTitleId": { + "nullable": true, "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", + "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 +22744,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 +22770,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 +22861,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", @@ -15238,184 +22886,220 @@ "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": { + "room": { "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": { + "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 +23118,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 +23232,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 +23287,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 +23339,8 @@ "type": "string" }, "nameEn": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" } }, "required": [ @@ -15663,10 +23348,10 @@ "nameCn", "nameEn" ], - "additionalProperties": false, - "nullable": true + "additionalProperties": false }, "classType": { + "nullable": true, "type": "object", "properties": { "id": { @@ -15678,8 +23363,8 @@ "type": "string" }, "nameEn": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" } }, "required": [ @@ -15687,10 +23372,10 @@ "nameCn", "nameEn" ], - "additionalProperties": false, - "nullable": true + "additionalProperties": false }, "classify": { + "nullable": true, "type": "object", "properties": { "id": { @@ -15702,8 +23387,8 @@ "type": "string" }, "nameEn": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" } }, "required": [ @@ -15711,10 +23396,10 @@ "nameCn", "nameEn" ], - "additionalProperties": false, - "nullable": true + "additionalProperties": false }, "educationLevel": { + "nullable": true, "type": "object", "properties": { "id": { @@ -15726,8 +23411,8 @@ "type": "string" }, "nameEn": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" } }, "required": [ @@ -15735,10 +23420,10 @@ "nameCn", "nameEn" ], - "additionalProperties": false, - "nullable": true + "additionalProperties": false }, "gradation": { + "nullable": true, "type": "object", "properties": { "id": { @@ -15750,8 +23435,8 @@ "type": "string" }, "nameEn": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" } }, "required": [ @@ -15759,10 +23444,10 @@ "nameCn", "nameEn" ], - "additionalProperties": false, - "nullable": true + "additionalProperties": false }, "type": { + "nullable": true, "type": "object", "properties": { "id": { @@ -15774,8 +23459,8 @@ "type": "string" }, "nameEn": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" } }, "required": [ @@ -15783,8 +23468,7 @@ "nameCn", "nameEn" ], - "additionalProperties": false, - "nullable": true + "additionalProperties": false } }, "required": [ @@ -15809,6 +23493,7 @@ "additionalProperties": false }, "semester": { + "nullable": true, "type": "object", "properties": { "id": { @@ -15828,16 +23513,16 @@ "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)))$", - "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)))$" }, "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)))$", - "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)))$" } }, "required": [ @@ -15848,10 +23533,10 @@ "startDate", "endDate" ], - "additionalProperties": false, - "nullable": true + "additionalProperties": false }, "campus": { + "nullable": true, "type": "object", "properties": { "id": { @@ -15860,21 +23545,21 @@ "maximum": 9007199254740991 }, "jwId": { + "nullable": true, "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 + "nullable": true, + "type": "string" } }, "required": [ @@ -15884,10 +23569,10 @@ "nameEn", "code" ], - "additionalProperties": false, - "nullable": true + "additionalProperties": false }, "openDepartment": { + "nullable": true, "type": "object", "properties": { "id": { @@ -15902,12 +23587,12 @@ "type": "string" }, "nameEn": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" }, "isCollege": { - "type": "boolean", - "nullable": true + "nullable": true, + "type": "boolean" } }, "required": [ @@ -15917,56 +23602,7 @@ "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 + "additionalProperties": false }, "teachers": { "type": "array", @@ -15979,73 +23615,73 @@ "maximum": 9007199254740991 }, "personId": { + "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 }, "code": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" }, "nameCn": { "type": "string" }, "nameEn": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" }, "age": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, "email": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" }, "telephone": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" }, "mobile": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" }, "address": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" }, "postcode": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" }, "qq": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" }, "wechat": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" }, "departmentId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, "teacherTitleId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 } }, "required": [ @@ -16068,78 +23704,6 @@ ], "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 - }, - "planCount": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "enabled": { - "type": "boolean", - "nullable": true - }, - "abbrZh": { - "type": "string", - "nullable": true - }, - "abbrEn": { - "type": "string", - "nullable": true - } - }, - "required": [ - "id", - "jwId", - "code", - "grade", - "nameCn", - "nameEn", - "stdCount", - "planCount", - "enabled", - "abbrZh", - "abbrEn" - ], - "additionalProperties": false - } } }, "required": [ @@ -16181,10 +23745,71 @@ "semester", "campus", "openDepartment", - "examMode", - "teachLanguage", - "teachers", - "adminClasses" + "teachers" + ], + "additionalProperties": false + } + }, + "total": { + "type": "integer", + "minimum": 0, + "maximum": 9007199254740991 + } + }, + "required": [ + "semester", + "matchedCodes", + "unmatchedCodes", + "suggestions", + "sections", + "total" + ], + "additionalProperties": false + }, + "paginatedSemesterResponseSchema": { + "type": "object", + "properties": { + "data": { + "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": { + "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" ], "additionalProperties": false } @@ -16248,16 +23873,16 @@ "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)))$", - "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)))$" }, "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)))$", - "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)))$" } }, "required": [ @@ -16270,7 +23895,7 @@ ], "additionalProperties": false }, - "paginatedSemesterResponseSchema": { + "paginatedTeacherResponseSchema": { "type": "object", "properties": { "data": { @@ -16283,37 +23908,182 @@ "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": { + "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 }, - "nameCn": { - "type": "string" - }, - "code": { - "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" + } + }, + "required": [ + "id", + "code", + "nameCn", + "nameEn", + "isCollege" + ], + "additionalProperties": false }, - "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 + "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 }, - "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 + "_count": { + "type": "object", + "properties": { + "sections": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + } + }, + "required": [ + "sections" + ], + "additionalProperties": false } }, "required": [ "id", - "jwId", - "nameCn", + "personId", + "teacherId", "code", - "startDate", - "endDate" + "nameCn", + "nameEn", + "age", + "email", + "telephone", + "mobile", + "address", + "postcode", + "qq", + "wechat", + "departmentId", + "teacherTitleId", + "department", + "teacherTitle", + "_count" ], "additionalProperties": false } @@ -16366,75 +24136,76 @@ "maximum": 9007199254740991 }, "personId": { + "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 }, "code": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" }, "nameCn": { "type": "string" }, "nameEn": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" }, "age": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, "email": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" }, "telephone": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" }, "mobile": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" }, "address": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" }, "postcode": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" }, "qq": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" }, "wechat": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" }, "departmentId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, "teacherTitleId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, "department": { + "nullable": true, "type": "object", "properties": { "id": { @@ -16449,12 +24220,12 @@ "type": "string" }, "nameEn": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" }, "isCollege": { - "type": "boolean", - "nullable": true + "nullable": true, + "type": "boolean" } }, "required": [ @@ -16464,10 +24235,10 @@ "nameEn", "isCollege" ], - "additionalProperties": false, - "nullable": true + "additionalProperties": false }, "teacherTitle": { + "nullable": true, "type": "object", "properties": { "id": { @@ -16484,15 +24255,15 @@ "type": "string" }, "nameEn": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" }, "code": { "type": "string" }, "enabled": { - "type": "boolean", - "nullable": true + "nullable": true, + "type": "boolean" } }, "required": [ @@ -16503,8 +24274,7 @@ "code", "enabled" ], - "additionalProperties": false, - "nullable": true + "additionalProperties": false }, "sections": { "type": "array", @@ -16525,113 +24295,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", @@ -16639,40 +24409,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", @@ -16694,46 +24464,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": { @@ -16745,8 +24516,8 @@ "type": "string" }, "nameEn": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" } }, "required": [ @@ -16754,10 +24525,10 @@ "nameCn", "nameEn" ], - "additionalProperties": false, - "nullable": true + "additionalProperties": false }, "classType": { + "nullable": true, "type": "object", "properties": { "id": { @@ -16769,8 +24540,8 @@ "type": "string" }, "nameEn": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" } }, "required": [ @@ -16778,10 +24549,10 @@ "nameCn", "nameEn" ], - "additionalProperties": false, - "nullable": true + "additionalProperties": false }, "classify": { + "nullable": true, "type": "object", "properties": { "id": { @@ -16793,8 +24564,8 @@ "type": "string" }, "nameEn": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" } }, "required": [ @@ -16802,10 +24573,10 @@ "nameCn", "nameEn" ], - "additionalProperties": false, - "nullable": true + "additionalProperties": false }, "educationLevel": { + "nullable": true, "type": "object", "properties": { "id": { @@ -16817,8 +24588,8 @@ "type": "string" }, "nameEn": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" } }, "required": [ @@ -16826,10 +24597,10 @@ "nameCn", "nameEn" ], - "additionalProperties": false, - "nullable": true + "additionalProperties": false }, "gradation": { + "nullable": true, "type": "object", "properties": { "id": { @@ -16841,8 +24612,8 @@ "type": "string" }, "nameEn": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" } }, "required": [ @@ -16850,10 +24621,10 @@ "nameCn", "nameEn" ], - "additionalProperties": false, - "nullable": true + "additionalProperties": false }, "type": { + "nullable": true, "type": "object", "properties": { "id": { @@ -16865,280 +24636,41 @@ "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 - }, - "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 - } - }, - "_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", - "sections", - "_count" - ], - "additionalProperties": false - }, - "paginatedTeacherResponseSchema": { - "type": "object", - "properties": { - "data": { - "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": { - "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 + "nameEn" + ], + "additionalProperties": false } }, "required": [ "id", + "jwId", "code", "nameCn", "nameEn", - "isCollege" + "categoryId", + "classTypeId", + "classifyId", + "educationLevelId", + "gradationId", + "typeId", + "category", + "classType", + "classify", + "educationLevel", + "gradation", + "type" ], - "additionalProperties": false, - "nullable": true + "additionalProperties": false }, - "teacherTitle": { + "semester": { + "nullable": true, "type": "object", "properties": { "id": { @@ -17154,141 +24686,142 @@ "nameCn": { "type": "string" }, - "nameEn": { - "type": "string", - "nullable": true - }, "code": { "type": "string" }, - "enabled": { - "type": "boolean", - "nullable": true + "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", - "nameEn", "code", - "enabled" - ], - "additionalProperties": false, - "nullable": true - }, - "_count": { - "type": "object", - "properties": { - "sections": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - } - }, - "required": [ - "sections" + "startDate", + "endDate" ], "additionalProperties": false } }, "required": [ "id", - "personId", - "teacherId", + "jwId", "code", - "nameCn", - "nameEn", - "age", - "email", - "telephone", - "mobile", - "address", - "postcode", - "qq", - "wechat", - "departmentId", - "teacherTitleId", - "department", - "teacherTitle", - "_count" + "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 } }, - "pagination": { + "_count": { "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": { + "sections": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "required": [ - "page", - "pageSize", - "total", - "totalPages" + "sections" ], "additionalProperties": false } }, "required": [ - "data", - "pagination" + "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": { - "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": { + "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": { @@ -17301,8 +24834,8 @@ "type": "string" }, "content": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" }, "priority": { "type": "string", @@ -17316,10 +24849,10 @@ "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)))$", - "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", @@ -17347,38 +24880,104 @@ } }, "required": [ - "todos" + "counts", + "todos" + ], + "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 }, - "todoCreateRequestSchema": { + "uploadCreateResponseSchema": { "type": "object", "properties": { - "title": { - "type": "string", - "minLength": 1, - "maxLength": 200 + "key": { + "type": "string" }, - "content": { - "type": "string", - "maxLength": 4000, - "nullable": true + "url": { + "type": "string" }, - "priority": { - "type": "string", - "enum": [ - "low", - "medium", - "high" - ] + "maxFileSizeBytes": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "dueAt": { - "type": "string", - "nullable": true + "quotaBytes": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "usedBytes": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 } }, "required": [ - "title" + "key", + "url", + "maxFileSizeBytes", + "quotaBytes", + "usedBytes" ], "additionalProperties": false }, @@ -17423,20 +25022,6 @@ ], "additionalProperties": false }, - "uploadRenameRequestSchema": { - "type": "object", - "properties": { - "filename": { - "type": "string", - "minLength": 1, - "maxLength": 255 - } - }, - "required": [ - "filename" - ], - "additionalProperties": false - }, "uploadDeleteResponseSchema": { "type": "object", "properties": { @@ -17508,41 +25093,88 @@ ], "additionalProperties": false }, - "uploadCompleteRequestSchema": { + "__schema0": { "type": "object", "properties": { - "key": { + "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", - "minLength": 1 + "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)))$" }, - "filename": { + "updatedAt": { "type": "string", - "minLength": 1 + "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)))$" }, - "contentType": { + "parentId": { + "nullable": true, "type": "string" - } - }, - "required": [ - "key", - "filename" - ], - "additionalProperties": false - }, - "uploadsListResponseSchema": { - "type": "object", - "properties": { - "maxFileSizeBytes": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 }, - "quotaBytes": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "rootId": { + "nullable": true, + "type": "string" }, - "uploads": { + "replies": { + "type": "array", + "items": { + "$ref": "#/components/schemas/__schema0" + } + }, + "attachments": { "type": "array", "items": { "type": "object", @@ -17550,98 +25182,94 @@ "id": { "type": "string" }, - "key": { + "uploadId": { "type": "string" }, "filename": { "type": "string" }, + "url": { + "type": "string" + }, + "contentType": { + "nullable": true, + "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", + "uploadId", "filename", - "size", - "createdAt" + "url", + "contentType", + "size" ], "additionalProperties": false } }, - "usedBytes": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - } - }, - "required": [ - "maxFileSizeBytes", - "quotaBytes", - "uploads", - "usedBytes" - ], - "additionalProperties": false - }, - "uploadCreateResponseSchema": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "url": { - "type": "string" - }, - "maxFileSizeBytes": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "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 + } }, - "quotaBytes": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "canReply": { + "type": "boolean" }, - "usedBytes": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - } - }, - "required": [ - "key", - "url", - "maxFileSizeBytes", - "quotaBytes", - "usedBytes" - ], - "additionalProperties": false - }, - "uploadCreateRequestSchema": { - "type": "object", - "properties": { - "filename": { - "type": "string", - "minLength": 1 + "canEdit": { + "type": "boolean" }, - "contentType": { - "type": "string" + "canDelete": { + "type": "boolean" }, - "size": { - "type": "string" + "canModerate": { + "type": "boolean" } }, "required": [ - "filename", - "size" + "id", + "body", + "visibility", + "status", + "author", + "authorHidden", + "isAnonymous", + "isAuthor", + "createdAt", + "updatedAt", + "parentId", + "rootId", + "replies", + "attachments", + "reactions", + "canReply", + "canEdit", + "canDelete", + "canModerate" ], "additionalProperties": false } @@ -17662,7 +25290,7 @@ }, { "name": "Uploads", - "description": "Upload presign, finalize, and file management" + "description": "Upload session, R2 object write, finalize, and file management" }, { "name": "Descriptions", @@ -17706,7 +25334,8 @@ }, { "name": "DashboardLinks", - "description": "Dashboard link pinning and click tracking" + "description": "Dashboard link pinning and click tracking", + "x-displayName": "Dashboard Links" }, { "name": "Locale", @@ -17718,11 +25347,63 @@ }, { "name": "OpenAPI", - "description": "OpenAPI document endpoint" + "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" + ] + } ] } diff --git a/internal/cmd/apicmd/api_paths_gen.go b/internal/cmd/apicmd/api_paths_gen.go index e02c163..d2d3912 100644 --- a/internal/cmd/apicmd/api_paths_gen.go +++ b/internal/cmd/apicmd/api_paths_gen.go @@ -22,11 +22,13 @@ 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/current", + "/api/calendar-subscriptions/import-codes", "/api/comments", "/api/comments/{id}", "/api/comments/{id}/reactions", @@ -36,6 +38,7 @@ var generatedAPIPaths = []string{ "/api/dashboard-links/visit", "/api/descriptions", "/api/homeworks", + "/api/homeworks/completions", "/api/homeworks/{id}", "/api/homeworks/{id}/completion", "/api/locale", @@ -43,7 +46,9 @@ 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/openapi", "/api/schedules", @@ -62,6 +67,7 @@ var generatedAPIPaths = []string{ "/api/todos/{id}", "/api/uploads", "/api/uploads/complete", + "/api/uploads/object", "/api/uploads/{id}", "/api/uploads/{id}/download", "/api/users/{userId}/calendar.ics", From 69b7fee8cad2dda5870c5c60f5be41c63b91ab2e Mon Sep 17 00:00:00 2001 From: Tiankai Ma Date: Tue, 30 Jun 2026 13:21:56 +0800 Subject: [PATCH 02/10] chore(cli): sync openapi from server and fix CI checkout --- .github/workflows/ci.yml | 13 +- api/openapi.json | 38723 ++++++++++++---------- internal/cmd/admin/admin.go | 12 +- internal/cmd/apicmd/api_paths_gen.go | 5 + internal/cmd/comment/comment.go | 40 +- internal/cmd/description/description.go | 12 +- internal/cmd/homework/homework.go | 42 +- internal/cmd/schedule/schedule.go | 6 +- internal/cmd/school/school.go | 42 +- internal/cmd/section/section.go | 6 +- internal/cmd/teacher/teacher.go | 7 +- internal/cmd/todo/todo.go | 26 +- internal/cmd/upload/upload.go | 5 +- internal/openapi/client.gen.go | 17821 +++++++--- 14 files changed, 33329 insertions(+), 23431 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 54c1ca8..a730a92 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,24 +18,23 @@ jobs: - name: Checkout server OpenAPI source uses: actions/checkout@v4 with: - repository: Life-USTC/server-nextjs - path: server-nextjs + repository: Life-USTC/server + 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 + git diff --exit-code lint: runs-on: ubuntu-latest diff --git a/api/openapi.json b/api/openapi.json index d61604a..5070cfb 100644 --- a/api/openapi.json +++ b/api/openapi.json @@ -11,6 +11,137 @@ "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": { @@ -54,36 +185,10 @@ } } }, - "/.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": { + "/.well-known/oauth-protected-resource": { "get": { - "operationId": "get-.well-known-oauth-authorization-server-api-mcp", - "summary": "Compatibility alias for clients that probe resource-path authorization-server metadata", + "operationId": "listOauthProtectedResource", + "summary": "Compatibility alias for clients that probe the resource-origin root path", "tags": [ "Api" ], @@ -102,8 +207,8 @@ } }, "options": { - "operationId": "options-.well-known-oauth-authorization-server-api-mcp", - "summary": "Compatibility alias for clients that probe resource-path authorization-server metadata", + "operationId": "options-.well-known-oauth-protected-resource", + "summary": "Compatibility alias for clients that probe the resource-origin root path", "tags": [ "Api" ], @@ -122,10 +227,10 @@ } } }, - "/.well-known/oauth-protected-resource": { + "/.well-known/openid-configuration": { "get": { - "operationId": "listOauthProtectedResource", - "summary": "Compatibility alias for clients that probe the resource-origin root path", + "operationId": "listOpenidConfiguration", + "summary": "Compatibility alias for clients that look up root OpenID discovery directly", "tags": [ "Api" ], @@ -144,8 +249,8 @@ } }, "options": { - "operationId": "options-.well-known-oauth-protected-resource", - "summary": "Compatibility alias for clients that probe the resource-origin root path", + "operationId": "options-.well-known-openid-configuration", + "summary": "Compatibility alias for clients that look up root OpenID discovery directly", "tags": [ "Api" ], @@ -164,67 +269,40 @@ } } }, - "/.well-known/oauth-protected-resource/api/mcp": { + "/api/bus": { "get": { - "operationId": "get-.well-known-oauth-protected-resource-api-mcp", - "summary": "Canonical RFC 9728 protected resource metadata for MCP", + "operationId": "queryBus", + "summary": "Query shuttle buses", "tags": [ - "Api" + "Bus" ], - "responses": { - "200": { - "description": "Response 200" + "parameters": [ + { + "in": "query", + "name": "versionKey", + "schema": { + "type": "string", + "minLength": 1 + } } - } - }, - "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": { - "get": { - "operationId": "listOpenidConfiguration", - "summary": "Compatibility alias for clients that look up root OpenID discovery directly", - "tags": [ - "Api" - ], - "responses": { - "307": { - "description": "Redirect", - "headers": { - "Location": { + "description": "Successful response", + "content": { + "application/json": { "schema": { - "type": "string", - "format": "uri" + "$ref": "#/components/schemas/busQueryResponseSchema" } } } - } - } - }, - "options": { - "operationId": "options-.well-known-openid-configuration", - "summary": "Compatibility alias for clients that look up root OpenID discovery directly", - "tags": [ - "Api" - ], - "responses": { - "307": { - "description": "Redirect", - "headers": { - "Location": { + }, + "400": { + "description": "Error response", + "content": { + "application/json": { "schema": { - "type": "string", - "format": "uri" + "$ref": "#/components/schemas/openApiErrorSchema" } } } @@ -232,112 +310,95 @@ } } }, - "/.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", + "/api/calendar-subscriptions": { + "post": { + "operationId": "setCalendarSubscription", + "summary": "Replace section subscriptions", "tags": [ - "Api" + "Calendar" ], - "responses": { - "200": { - "description": "Response 200" + "security": [ + { + "bearerAuth": [] + }, + { + "sessionCookie": [] } - } - }, - "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" + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/calendarSubscriptionCreateRequestSchema" + } + } } - } - } - }, - "/.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": { + "200": { + "description": "Successful response", + "content": { + "application/json": { "schema": { - "type": "string", - "format": "uri" + "$ref": "#/components/schemas/calendarSubscriptionCreateResponseSchema" } } } - } - } - }, - "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": { + }, + "400": { + "description": "Error response", + "content": { + "application/json": { "schema": { - "type": "string", - "format": "uri" + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + }, + "401": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" } } } } } - } - }, - "/api/admin/comments": { - "get": { - "operationId": "listAdminComments", - "summary": "List moderation comments", + }, + "patch": { + "operationId": "appendCalendarSubscriptionSections", + "summary": "Append section subscriptions", "tags": [ - "Admin" + "Calendar" ], - "parameters": [ + "security": [ { - "in": "query", - "name": "status", - "schema": { - "type": "string", - "enum": [ - "all", - "active", - "softbanned", - "deleted", - "suspended" - ] - } + "bearerAuth": [] }, { - "in": "query", - "name": "limit", - "schema": { - "type": "integer", - "format": "int64" - } + "sessionCookie": [] } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/calendarSubscriptionAppendRequestSchema" + } + } + } + }, "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/adminCommentsResponseSchema" + "$ref": "#/components/schemas/calendarSubscriptionAppendResponseSchema" } } } @@ -351,33 +412,49 @@ } } } + }, + "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/admin/comments/{id}": { - "patch": { - "operationId": "moderateAdminComment", - "summary": "Moderate one comment", + }, + "delete": { + "operationId": "delete-api-calendar-subscriptions", + "summary": "Remove section subscriptions", "tags": [ - "Admin" + "Calendar" ], - "parameters": [ + "security": [ { - "in": "path", - "name": "id", - "schema": { - "type": "string", - "minLength": 1 - }, - "required": true + "bearerAuth": [] + }, + { + "sessionCookie": [] } ], "requestBody": { + "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/adminModerateCommentRequestSchema" + "$ref": "#/components/schemas/calendarSubscriptionRemoveRequestSchema" } } } @@ -388,7 +465,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/adminModeratedCommentResponseSchema" + "$ref": "#/components/schemas/calendarSubscriptionRemoveResponseSchema" } } } @@ -402,16 +479,36 @@ } } } + }, + "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/admin/descriptions": { + "/api/comments": { "get": { - "operationId": "listAdminDescriptions", - "summary": "List descriptions", + "operationId": "listComments", + "summary": "List comments", "tags": [ - "Admin" + "Comments" ], "parameters": [ { @@ -420,36 +517,65 @@ "schema": { "type": "string", "enum": [ - "all", "section", "course", "teacher", + "section-teacher", "homework" ] + }, + "required": true + }, + { + "in": "query", + "name": "targetId", + "schema": { + "type": "string" } }, { "in": "query", - "name": "hasContent", + "name": "sectionId", "schema": { - "type": "string", - "enum": [ - "all", - "withContent", - "empty" - ] + "type": "integer", + "format": "int64" } }, { "in": "query", - "name": "search", + "name": "sectionJwId", "schema": { - "type": "string" + "type": "integer", + "format": "int64" } }, { "in": "query", - "name": "limit", + "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" @@ -462,7 +588,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/adminDescriptionsResponseSchema" + "$ref": "#/components/schemas/commentsListResponseSchema" } } } @@ -476,53 +602,50 @@ } } } + }, + "404": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } } } - } - }, - "/api/admin/homeworks": { - "get": { - "operationId": "listAdminHomeworks", - "summary": "List moderation homeworks", + }, + "post": { + "operationId": "createComment", + "summary": "Create one comment", "tags": [ - "Admin" + "Comments" ], - "parameters": [ - { - "in": "query", - "name": "status", - "schema": { - "type": "string", - "enum": [ - "all", - "active", - "deleted" - ] - } - }, + "security": [ { - "in": "query", - "name": "search", - "schema": { - "type": "string" - } + "bearerAuth": [] }, { - "in": "query", - "name": "limit", - "schema": { - "type": "integer", - "format": "int64" - } + "sessionCookie": [] } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/commentCreateRequestSchema" + } + } + } + }, "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/adminHomeworksResponseSchema" + "$ref": "#/components/schemas/idResponseSchema" } } } @@ -536,40 +659,8 @@ } } } - } - } - } - }, - "/api/admin/homeworks/{id}": { - "delete": { - "operationId": "deleteAdminHomework", - "summary": "Delete one homework", - "tags": [ - "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" - } - } - } }, - "404": { + "401": { "description": "Error response", "content": { "application/json": { @@ -578,57 +669,18 @@ } } } - } - } - } - }, - "/api/admin/suspensions": { - "get": { - "operationId": "listAdminSuspensions", - "summary": "List suspensions", - "tags": [ - "Admin" - ], - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/adminSuspensionsResponseSchema" - } - } - } - } - } - }, - "post": { - "operationId": "createAdminSuspension", - "summary": "Create suspension for one user", - "tags": [ - "Admin" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/adminCreateSuspensionRequestSchema" - } - } - } - }, - "responses": { - "200": { - "description": "Successful response", + }, + "403": { + "description": "Error response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/adminSuspensionResponseSchema" + "$ref": "#/components/schemas/openApiErrorSchema" } } } }, - "400": { + "404": { "description": "Error response", "content": { "application/json": { @@ -641,22 +693,62 @@ } } }, - "/api/admin/suspensions/{id}": { - "patch": { - "operationId": "updateAdminSuspension", - "summary": "Lift one suspension", + "/api/courses": { + "get": { + "operationId": "listCourses", + "summary": "List courses", "tags": [ - "Admin" + "Courses" ], "parameters": [ { - "in": "path", - "name": "id", + "in": "query", + "name": "search", "schema": { - "type": "string", - "minLength": 1 - }, - "required": true + "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 + } } ], "responses": { @@ -665,12 +757,12 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/adminSuspensionResponseSchema" + "$ref": "#/components/schemas/paginatedCourseResponseSchema" } } } }, - "404": { + "400": { "description": "Error response", "content": { "application/json": { @@ -683,24 +775,39 @@ } } }, - "/api/admin/users": { + "/api/descriptions": { "get": { - "operationId": "listAdminUsers", - "summary": "List users", + "operationId": "getDescription", + "summary": "Get description history", "tags": [ - "Admin" + "Descriptions" ], "parameters": [ { "in": "query", - "name": "search", + "name": "targetType", "schema": { - "type": "string" + "type": "string", + "enum": [ + "section", + "course", + "teacher", + "homework" + ] + }, + "required": true + }, + { + "in": "query", + "name": "targetId", + "schema": { + "type": "string", + "minLength": 1 } }, { "in": "query", - "name": "page", + "name": "sectionJwId", "schema": { "type": "integer", "format": "int64" @@ -708,11 +815,27 @@ }, { "in": "query", - "name": "limit", + "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 + } } ], "responses": { @@ -721,7 +844,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/adminUsersResponseSchema" + "$ref": "#/components/schemas/descriptionsResponseSchema" } } } @@ -735,33 +858,39 @@ } } } + }, + "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" + }, + "post": { + "operationId": "upsertDescription", + "summary": "Upsert description", + "tags": [ + "Descriptions" ], - "parameters": [ + "security": [ { - "in": "path", - "name": "id", - "schema": { - "type": "string", - "minLength": 1 - }, - "required": true + "bearerAuth": [] + }, + { + "sessionCookie": [] } ], "requestBody": { + "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/adminUpdateUserRequestSchema" + "$ref": "#/components/schemas/descriptionUpsertRequestSchema" } } } @@ -772,7 +901,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/adminUserResponseSchema" + "$ref": "#/components/schemas/descriptionUpsertResponseSchema" } } } @@ -786,69 +915,8 @@ } } } - } - } - } - }, - "/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" - ], - "responses": { - "200": { - "description": "Response 200" }, - "400": { - "description": "Error response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/openApiErrorSchema" - } - } - } - } - } - } - }, - "/api/auth/oauth2/token": { - "get": { - "operationId": "get-api-auth-oauth2-token", - "summary": "Return method guidance for OAuth token clients", - "tags": [ - "Api" - ], - "responses": { - "405": { + "401": { "description": "Error response", "content": { "application/json": { @@ -857,20 +925,8 @@ } } } - } - } - }, - "post": { - "operationId": "post-api-auth-oauth2-token", - "summary": "Exchange OAuth 2.0 authorization/device/refresh grants for tokens", - "tags": [ - "Api" - ], - "responses": { - "200": { - "description": "Response 200" }, - "400": { + "403": { "description": "Error response", "content": { "application/json": { @@ -880,7 +936,7 @@ } } }, - "401": { + "404": { "description": "Error response", "content": { "application/json": { @@ -893,40 +949,20 @@ } } }, - "/api/bus": { + "/api/health": { "get": { - "operationId": "queryBus", - "summary": "Query shuttle buses", + "operationId": "listHealth", + "summary": "Check process liveness", "tags": [ - "Bus" - ], - "parameters": [ - { - "in": "query", - "name": "versionKey", - "schema": { - "type": "string", - "minLength": 1 - } - } + "Api" ], "responses": { "200": { - "description": "Successful response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/busQueryResponseSchema" - } - } - } - }, - "400": { - "description": "Error response", + "description": "Text response", "content": { - "application/json": { + "text/plain": { "schema": { - "$ref": "#/components/schemas/openApiErrorSchema" + "type": "string" } } } @@ -934,66 +970,33 @@ } } }, - "/api/bus/next": { + "/api/homeworks": { "get": { - "operationId": "get-api-bus-next", - "summary": "Get next shuttle bus departures for an origin and destination campus", + "operationId": "listHomeworks", + "summary": "List homeworks", "tags": [ - "Bus" + "Homeworks" ], "parameters": [ { "in": "query", - "name": "originCampusId", - "schema": { - "type": "integer", - "format": "int64" - }, - "required": true - }, - { - "in": "query", - "name": "destinationCampusId", + "name": "sectionId", "schema": { "type": "integer", "format": "int64" - }, - "required": true - }, - { - "in": "query", - "name": "atTime", - "schema": { - "type": "string", - "minLength": 1 - } - }, - { - "in": "query", - "name": "dayType", - "schema": { - "type": "string", - "enum": [ - "auto", - "weekday", - "weekend" - ] } }, { "in": "query", - "name": "includeDeparted", + "name": "sectionIds", "schema": { "type": "string", - "enum": [ - "true", - "false" - ] + "minLength": 1 } }, { "in": "query", - "name": "limit", + "name": "sectionJwId", "schema": { "type": "integer", "format": "int64" @@ -1001,20 +1004,12 @@ }, { "in": "query", - "name": "versionKey", - "schema": { - "type": "string", - "minLength": 1 - } - }, - { - "in": "query", - "name": "locale", + "name": "includeDeleted", "schema": { "type": "string", "enum": [ - "en-us", - "zh-cn" + "true", + "false" ] } } @@ -1025,7 +1020,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/busNextDeparturesResponseSchema" + "$ref": "#/components/schemas/homeworksListResponseSchema" } } } @@ -1051,27 +1046,43 @@ } } } - } - }, - "/api/bus/preferences": { - "get": { - "operationId": "getBusPreferences", - "summary": "Get bus preferences", + }, + "post": { + "operationId": "createHomework", + "summary": "Create one homework", "tags": [ - "Bus" + "Homeworks" + ], + "security": [ + { + "bearerAuth": [] + }, + { + "sessionCookie": [] + } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/homeworkCreateRequestSchema" + } + } + } + }, "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/busPreferenceResponseSchema" + "$ref": "#/components/schemas/homeworkCreateResponseSchema" } } } }, - "401": { + "400": { "description": "Error response", "content": { "application/json": { @@ -1080,36 +1091,18 @@ } } } - } - } - }, - "post": { - "operationId": "setBusPreferences", - "summary": "Update bus preferences", - "tags": [ - "Bus" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/busPreferenceRequestSchema" - } - } - } - }, - "responses": { - "200": { - "description": "Successful response", + }, + "401": { + "description": "Error response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/busPreferenceResponseSchema" + "$ref": "#/components/schemas/openApiErrorSchema" } } } }, - "400": { + "403": { "description": "Error response", "content": { "application/json": { @@ -1119,7 +1112,7 @@ } } }, - "401": { + "404": { "description": "Error response", "content": { "application/json": { @@ -1132,57 +1125,30 @@ } } }, - "/api/bus/routes": { - "get": { - "operationId": "get-api-bus-routes", - "summary": "Search shuttle bus route variants", + "/api/locale": { + "post": { + "operationId": "setLocale", + "summary": "Update user locale cookie", "tags": [ - "Bus" + "Locale" ], - "parameters": [ - { - "in": "query", - "name": "originCampusId", - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "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" - ] + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/localeUpdateRequestSchema" + } } } - ], + }, "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/busRouteSearchResponseSchema" + "$ref": "#/components/schemas/successResponseSchema" } } } @@ -1196,48 +1162,37 @@ } } } - }, - "404": { - "description": "Error response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/openApiErrorSchema" - } - } - } } } } }, - "/api/calendar-subscriptions": { - "post": { - "operationId": "setCalendarSubscription", - "summary": "Replace section subscriptions", + "/api/mcp": { + "get": { + "operationId": "listMcp", + "summary": "Open an MCP Streamable HTTP transport session", "tags": [ - "Calendar" + "Api" ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/calendarSubscriptionCreateRequestSchema" - } - } + "security": [ + { + "mcpBearerAuth": [] } - }, + ], "responses": { "200": { - "description": "Successful response", + "description": "Response 200" + }, + "401": { + "description": "Error response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/calendarSubscriptionCreateResponseSchema" + "$ref": "#/components/schemas/openApiErrorSchema" } } } }, - "400": { + "403": { "description": "Error response", "content": { "application/json": { @@ -1248,27 +1203,33 @@ } } } - } - }, - "/api/calendar-subscriptions/current": { - "get": { - "operationId": "getCurrentCalendarSubscription", - "summary": "Get section subscriptions", + }, + "post": { + "operationId": "createMcp", + "summary": "Send an MCP Streamable HTTP JSON-RPC message", "tags": [ - "Calendar" + "Api" + ], + "security": [ + { + "mcpBearerAuth": [] + } ], "responses": { "200": { - "description": "Successful response", + "description": "Response 200" + }, + "401": { + "description": "Error response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/currentCalendarSubscriptionResponseSchema" + "$ref": "#/components/schemas/openApiErrorSchema" } } } }, - "401": { + "403": { "description": "Error response", "content": { "application/json": { @@ -1279,36 +1240,23 @@ } } } - } - }, - "/api/calendar-subscriptions/import-codes": { - "post": { - "operationId": "post-api-calendar-subscriptions-import-codes", - "summary": "Import section subscriptions by section codes", + }, + "delete": { + "operationId": "delete-api-mcp", + "summary": "Close an MCP Streamable HTTP transport session", "tags": [ - "Calendar" + "Api" ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/matchSectionCodesRequestSchema" - } - } + "security": [ + { + "mcpBearerAuth": [] } - }, + ], "responses": { "200": { - "description": "Successful response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/calendarSubscriptionImportResponseSchema" - } - } - } + "description": "Response 200" }, - "400": { + "401": { "description": "Error response", "content": { "application/json": { @@ -1318,7 +1266,7 @@ } } }, - "401": { + "403": { "description": "Error response", "content": { "application/json": { @@ -1327,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": { @@ -1341,51 +1301,19 @@ } } }, - "/api/comments": { + "/api/me": { "get": { - "operationId": "listComments", - "summary": "List comments", + "operationId": "getMe", + "summary": "Get current user", "tags": [ - "Comments" + "Me" ], - "parameters": [ - { - "in": "query", - "name": "targetType", - "schema": { - "type": "string", - "enum": [ - "section", - "course", - "teacher", - "section-teacher", - "homework" - ] - }, - "required": true - }, - { - "in": "query", - "name": "targetId", - "schema": { - "type": "string" - } - }, + "security": [ { - "in": "query", - "name": "sectionId", - "schema": { - "type": "integer", - "format": "int64" - } + "bearerAuth": [] }, { - "in": "query", - "name": "teacherId", - "schema": { - "type": "integer", - "format": "int64" - } + "sessionCookie": [] } ], "responses": { @@ -1394,12 +1322,12 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/commentsListResponseSchema" + "$ref": "#/components/schemas/meResponseSchema" } } } }, - "400": { + "401": { "description": "Error response", "content": { "application/json": { @@ -1410,69 +1338,72 @@ } } } - }, - "post": { - "operationId": "createComment", - "summary": "Create one comment", + } + }, + "/api/metadata": { + "get": { + "operationId": "getMetadata", + "summary": "Get metadata", "tags": [ - "Comments" + "Metadata" ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/commentCreateRequestSchema" - } - } - } - }, "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/idResponseSchema" + "$ref": "#/components/schemas/metadataResponseSchema" } } } - }, - "400": { - "description": "Error response", + } + } + } + }, + "/api/metrics": { + "get": { + "operationId": "listMetrics", + "summary": "Export internal runtime metrics", + "tags": [ + "Api" + ], + "security": [ + { + "internalBearerAuth": [] + } + ], + "responses": { + "200": { + "description": "Text response", "content": { - "application/json": { + "text/plain": { "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" + "type": "string" } } } }, "404": { - "description": "Error response", + "description": "Response 404" + } + } + } + }, + "/api/openapi": { + "get": { + "operationId": "getOpenApiSpec", + "summary": "Get OpenAPI document", + "tags": [ + "OpenAPI" + ], + "responses": { + "200": { + "description": "Successful response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/openApiErrorSchema" + "$ref": "#/components/schemas/openApiDocumentResponseSchema" } } } @@ -1480,22 +1411,16 @@ } } }, - "/api/comments/{id}": { + "/api/readiness": { "get": { - "operationId": "getComment", - "summary": "Get comment thread", + "operationId": "listReadiness", + "summary": "Check internal dependency readiness", "tags": [ - "Comments" + "Api" ], - "parameters": [ + "security": [ { - "in": "path", - "name": "id", - "schema": { - "type": "string", - "minLength": 1 - }, - "required": true + "internalBearerAuth": [] } ], "responses": { @@ -1504,117 +1429,136 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/commentThreadResponseSchema" + "$ref": "#/components/schemas/readinessResponseSchema" } } } }, "404": { + "description": "Response 404" + }, + "503": { "description": "Error response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/openApiErrorSchema" + "$ref": "#/components/schemas/readinessResponseSchema" } } } } } - }, - "patch": { - "operationId": "updateComment", - "summary": "Update one comment", + } + }, + "/api/schedules": { + "get": { + "operationId": "listSchedules", + "summary": "List schedules", "tags": [ - "Comments" + "Schedules" ], "parameters": [ { - "in": "path", - "name": "id", + "in": "query", + "name": "sectionId", + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "in": "query", + "name": "sectionJwId", + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "in": "query", + "name": "sectionCode", "schema": { "type": "string", "minLength": 1 - }, - "required": true - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/commentUpdateRequestSchema" - } } - } - }, - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/commentUpdateResponseSchema" - } - } + }, + { + "in": "query", + "name": "teacherId", + "schema": { + "type": "integer", + "format": "int64" } }, - "400": { - "description": "Error response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/openApiErrorSchema" - } - } + { + "in": "query", + "name": "teacherCode", + "schema": { + "type": "string", + "minLength": 1 } }, - "401": { - "description": "Error response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/openApiErrorSchema" - } - } + { + "in": "query", + "name": "roomId", + "schema": { + "type": "integer", + "format": "int64" } }, - "403": { - "description": "Error response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/openApiErrorSchema" - } - } + { + "in": "query", + "name": "roomJwId", + "schema": { + "type": "integer", + "format": "int64" } }, - "404": { - "description": "Error response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/openApiErrorSchema" - } - } + { + "in": "query", + "name": "weekday", + "schema": { + "type": "integer", + "format": "int64", + "minimum": 1, + "maximum": 7 } - } - } - }, - "delete": { - "operationId": "deleteComment", - "summary": "Delete one comment", - "tags": [ - "Comments" - ], - "parameters": [ + }, { - "in": "path", - "name": "id", + "in": "query", + "name": "dateFrom", "schema": { "type": "string", - "minLength": 1 - }, - "required": true + "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": "page", + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "in": "query", + "name": "limit", + "schema": { + "type": "integer", + "format": "int64", + "minimum": 1, + "maximum": 100 + } } ], "responses": { @@ -1623,32 +1567,12 @@ "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" + "$ref": "#/components/schemas/paginatedScheduleResponseSchema" } } } }, - "404": { + "400": { "description": "Error response", "content": { "application/json": { @@ -1661,114 +1585,49 @@ } } }, - "/api/comments/{id}/reactions": { - "post": { - "operationId": "addCommentReaction", - "summary": "Add one reaction to a comment", + "/api/sections": { + "get": { + "operationId": "listSections", + "summary": "List sections", "tags": [ - "Comments" + "Sections" ], "parameters": [ { - "in": "path", - "name": "id", + "in": "query", + "name": "courseId", "schema": { - "type": "string", - "minLength": 1 - }, - "required": true - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/commentReactionRequestSchema" - } - } - } - }, - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/successResponseSchema" - } - } + "type": "integer", + "format": "int64" } - } - } - }, - "delete": { - "operationId": "removeCommentReaction", - "summary": "Remove one reaction from a comment", - "tags": [ - "Comments" - ], - "parameters": [ + }, { - "in": "path", - "name": "id", + "in": "query", + "name": "courseJwId", "schema": { - "type": "string", - "minLength": 1 - }, - "required": true + "type": "integer", + "format": "int64" + } }, { "in": "query", - "name": "type", + "name": "semesterId", "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" - } - } + "type": "integer", + "format": "int64" } - } - } - } - }, - "/api/courses": { - "get": { - "operationId": "listCourses", - "summary": "List courses", - "tags": [ - "Courses" - ], - "parameters": [ + }, { "in": "query", - "name": "search", + "name": "semesterJwId", "schema": { - "type": "string" - }, - "example": "IS3003" + "type": "integer", + "format": "int64" + } }, { "in": "query", - "name": "educationLevelId", + "name": "campusId", "schema": { "type": "integer", "format": "int64" @@ -1776,7 +1635,7 @@ }, { "in": "query", - "name": "categoryId", + "name": "departmentId", "schema": { "type": "integer", "format": "int64" @@ -1784,29 +1643,58 @@ }, { "in": "query", - "name": "classTypeId", + "name": "teacherId", "schema": { "type": "integer", "format": "int64" } }, + { + "in": "query", + "name": "teacherCode", + "schema": { + "type": "string", + "minLength": 1 + } + }, + { + "in": "query", + "name": "search", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "ids", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "jwIds", + "schema": { + "type": "string" + } + }, { "in": "query", "name": "page", "schema": { "type": "integer", "format": "int64" - }, - "example": 1 + } }, { "in": "query", "name": "limit", "schema": { "type": "integer", - "format": "int64" - }, - "example": 20 + "format": "int64", + "minimum": 1, + "maximum": 100 + } } ], "responses": { @@ -1815,103 +1703,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/paginatedCourseResponseSchema" - }, - "example": { - "data": [ - { - "id": 1001, - "jwId": 9901001, - "code": "IS3003", - "nameCn": "密码工程原理与实践", - "nameEn": "Cryptographic Engineering: Principles and Practice", - "categoryId": 402, - "classTypeId": 403, - "classifyId": 404, - "educationLevelId": 401, - "gradationId": 405, - "typeId": 406, - "category": { - "id": 402, - "nameCn": "学科基础课", - "nameEn": "Disciplinary Foundation" - }, - "classType": { - "id": 403, - "nameCn": "理论课", - "nameEn": "Lecture" - }, - "classify": { - "id": 404, - "nameCn": "必修", - "nameEn": "Required" - }, - "educationLevel": { - "id": 401, - "nameCn": "本科生", - "nameEn": "Undergraduate" - }, - "gradation": { - "id": 405, - "nameCn": "进阶", - "nameEn": "Advanced" - }, - "type": { - "id": 406, - "nameCn": "专业核心", - "nameEn": "Core Major" - } - }, - { - "id": 1002, - "jwId": 9901002, - "code": "ASTRON1501", - "nameCn": "天体物理概观", - "nameEn": "Introduction to Astrophysics", - "categoryId": 402, - "classTypeId": 403, - "classifyId": 404, - "educationLevelId": 401, - "gradationId": 405, - "typeId": 406, - "category": { - "id": 402, - "nameCn": "学科基础课", - "nameEn": "Disciplinary Foundation" - }, - "classType": { - "id": 403, - "nameCn": "理论课", - "nameEn": "Lecture" - }, - "classify": { - "id": 404, - "nameCn": "必修", - "nameEn": "Required" - }, - "educationLevel": { - "id": 401, - "nameCn": "本科生", - "nameEn": "Undergraduate" - }, - "gradation": { - "id": 405, - "nameCn": "进阶", - "nameEn": "Advanced" - }, - "type": { - "id": 406, - "nameCn": "专业核心", - "nameEn": "Core Major" - } - } - ], - "pagination": { - "page": 1, - "pageSize": 20, - "total": 4, - "totalPages": 1 - } + "$ref": "#/components/schemas/paginatedSectionResponseSchema" } } } @@ -1929,23 +1721,31 @@ } } }, - "/api/courses/{jwId}": { + "/api/semesters": { "get": { - "operationId": "getCourse", - "summary": "Get course", + "operationId": "listSemesters", + "summary": "List semesters", "tags": [ - "Courses" + "Semesters" ], "parameters": [ { - "in": "path", - "name": "jwId", + "in": "query", + "name": "page", "schema": { "type": "integer", "format": "int64" - }, - "required": true, - "example": 9901001 + } + }, + { + "in": "query", + "name": "limit", + "schema": { + "type": "integer", + "format": "int64", + "minimum": 1, + "maximum": 100 + } } ], "responses": { @@ -1954,146 +1754,12 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/courseDetailSchema" - }, - "example": { - "id": 1001, - "jwId": 9901001, - "code": "IS3003", - "nameCn": "密码工程原理与实践", - "nameEn": "Cryptographic Engineering: Principles and Practice", - "categoryId": 402, - "classTypeId": 403, - "classifyId": 404, - "educationLevelId": 401, - "gradationId": 405, - "typeId": 406, - "category": { - "id": 402, - "nameCn": "学科基础课", - "nameEn": "Disciplinary Foundation" - }, - "classType": { - "id": 403, - "nameCn": "理论课", - "nameEn": "Lecture" - }, - "classify": { - "id": 404, - "nameCn": "必修", - "nameEn": "Required" - }, - "educationLevel": { - "id": 401, - "nameCn": "本科生", - "nameEn": "Undergraduate" - }, - "gradation": { - "id": 405, - "nameCn": "进阶", - "nameEn": "Advanced" - }, - "type": { - "id": 406, - "nameCn": "专业核心", - "nameEn": "Core Major" - }, - "sections": [ - { - "id": 2001, - "jwId": 9902001, - "code": "IS3003.01", - "bizTypeId": null, - "credits": 2.5, - "period": 48, - "periodsPerWeek": 4, - "timesPerWeek": 2, - "stdCount": 58, - "limitCount": 80, - "graduateAndPostgraduate": false, - "dateTimePlaceText": "周一 3-4节, 一教101", - "dateTimePlacePersonText": null, - "actualPeriods": 48, - "theoryPeriods": 32, - "practicePeriods": 16, - "experimentPeriods": null, - "machinePeriods": null, - "designPeriods": null, - "testPeriods": null, - "scheduleState": "scheduled", - "suggestScheduleWeeks": null, - "suggestScheduleWeekInfo": "1-16周", - "scheduleJsonParams": null, - "selectedStdCount": 58, - "remark": "结合密码协议与工程实现,强调课堂演示和实验复盘。", - "scheduleRemark": null, - "courseId": 1001, - "semesterId": 701, - "campusId": 201, - "examModeId": 602, - "openDepartmentId": 501, - "teachLanguageId": 601, - "roomTypeId": 303, - "semester": { - "id": 701, - "jwId": 9900001, - "nameCn": "2026年春季学期", - "code": "421", - "startDate": "2026-02-23T00:00:00+08:00", - "endDate": "2026-07-05T00:00:00+08:00" - }, - "campus": { - "id": 201, - "jwId": 9910001, - "nameCn": "东校区", - "nameEn": "East Campus", - "code": "EAST" - }, - "teachers": [ - { - "id": 8001, - "personId": null, - "teacherId": null, - "code": "T2401001", - "nameCn": "林璟锵", - "nameEn": "Lin Jingqiang", - "age": null, - "email": "jqlin@ustc.edu.cn", - "telephone": null, - "mobile": "13800001111", - "address": null, - "postcode": null, - "qq": null, - "wechat": null, - "departmentId": 501, - "teacherTitleId": 801 - }, - { - "id": 8002, - "personId": null, - "teacherId": null, - "code": "T2401002", - "nameCn": "王伟", - "nameEn": "Wang Wei", - "age": null, - "email": "wangwei@ustc.edu.cn", - "telephone": null, - "mobile": "13800002222", - "address": null, - "postcode": null, - "qq": null, - "wechat": null, - "departmentId": 501, - "teacherTitleId": 801 - } - ] - } - ] + "$ref": "#/components/schemas/paginatedSemesterResponseSchema" } } } }, - "404": { + "400": { "description": "Error response", "content": { "application/json": { @@ -2106,94 +1772,65 @@ } } }, - "/api/dashboard-links/pin": { - "post": { - "operationId": "pinDashboardLink", - "summary": "Pin dashboard link", - "tags": [ - "DashboardLinks" - ], - "requestBody": { - "required": true, - "content": { - "application/x-www-form-urlencoded": { - "schema": { - "$ref": "#/components/schemas/dashboardLinkPinRequestSchema" - } - } - } - }, - "responses": { - "303": { - "description": "Redirect after pin/unpin", - "headers": { - "Location": { - "description": "Redirect target URL", - "schema": { - "type": "string" - } - } - } - } - } - } - }, - "/api/dashboard-links/visit": { + "/api/teachers": { "get": { - "operationId": "visitDashboardLink", - "summary": "Preview dashboard link", + "operationId": "listTeachers", + "summary": "List teachers", "tags": [ - "DashboardLinks" + "Teachers" ], "parameters": [ { "in": "query", - "name": "slug", + "name": "departmentId", "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" + } + }, + { + "in": "query", + "name": "search", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "page", + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "in": "query", + "name": "limit", + "schema": { + "type": "integer", + "format": "int64", + "minimum": 1, + "maximum": 100 + } } - } - }, - "post": { - "operationId": "recordDashboardLinkVisit", - "summary": "Record one dashboard link visit and redirect", - "tags": [ - "DashboardLinks" ], - "requestBody": { - "required": true, - "content": { - "application/x-www-form-urlencoded": { - "schema": { - "$ref": "#/components/schemas/dashboardLinkVisitRequestSchema" + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/paginatedTeacherResponseSchema" + } } } - } - }, - "responses": { - "303": { - "description": "Redirect after recording link click", - "headers": { - "Location": { - "description": "Redirect target URL", + }, + "400": { + "description": "Error response", + "content": { + "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/openApiErrorSchema" } } } @@ -2201,36 +1838,72 @@ } } }, - "/api/descriptions": { + "/api/todos": { "get": { - "operationId": "getDescription", - "summary": "Get description history", + "operationId": "listTodos", + "summary": "List todos", "tags": [ - "Descriptions" + "Todos" + ], + "security": [ + { + "bearerAuth": [] + }, + { + "sessionCookie": [] + } ], "parameters": [ { "in": "query", - "name": "targetType", + "name": "completed", "schema": { "type": "string", "enum": [ - "section", - "course", - "teacher", - "homework" + "true", + "false" ] - }, - "required": true + } }, { "in": "query", - "name": "targetId", + "name": "priority", "schema": { "type": "string", - "minLength": 1 - }, - "required": true + "enum": [ + "low", + "medium", + "high" + ] + } + }, + { + "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": { @@ -2239,7 +1912,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/descriptionsResponseSchema" + "$ref": "#/components/schemas/todosListResponseSchema" } } } @@ -2253,20 +1926,39 @@ } } } + }, + "401": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } } } }, "post": { - "operationId": "upsertDescription", - "summary": "Upsert description", + "operationId": "createTodo", + "summary": "Create a todo", "tags": [ - "Descriptions" + "Todos" + ], + "security": [ + { + "bearerAuth": [] + }, + { + "sessionCookie": [] + } ], "requestBody": { + "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/descriptionUpsertRequestSchema" + "$ref": "#/components/schemas/todoCreateRequestSchema" } } } @@ -2277,7 +1969,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/descriptionUpsertResponseSchema" + "$ref": "#/components/schemas/idResponseSchema" } } } @@ -2301,64 +1993,23 @@ } } } - }, - "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/homeworks": { + "/api/uploads": { "get": { - "operationId": "listHomeworks", - "summary": "List homeworks", + "operationId": "listUploads", + "summary": "List uploads", "tags": [ - "Homeworks" + "Uploads" ], - "parameters": [ - { - "in": "query", - "name": "sectionId", - "schema": { - "type": "integer", - "format": "int64" - } - }, + "security": [ { - "in": "query", - "name": "sectionIds", - "schema": { - "type": "string", - "minLength": 1 - } + "bearerAuth": [] }, { - "in": "query", - "name": "includeDeleted", - "schema": { - "type": "string", - "enum": [ - "true", - "false" - ] - } + "sessionCookie": [] } ], "responses": { @@ -2367,12 +2018,12 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/homeworksListResponseSchema" + "$ref": "#/components/schemas/uploadsListResponseSchema" } } } }, - "400": { + "401": { "description": "Error response", "content": { "application/json": { @@ -2385,16 +2036,25 @@ } }, "post": { - "operationId": "createHomework", - "summary": "Create one homework", + "operationId": "createUpload", + "summary": "Create a signed upload URL", "tags": [ - "Homeworks" + "Uploads" + ], + "security": [ + { + "bearerAuth": [] + }, + { + "sessionCookie": [] + } ], "requestBody": { + "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/homeworkCreateRequestSchema" + "$ref": "#/components/schemas/uploadCreateRequestSchema" } } } @@ -2405,7 +2065,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/homeworkCreateResponseSchema" + "$ref": "#/components/schemas/uploadCreateResponseSchema" } } } @@ -2440,7 +2100,7 @@ } } }, - "404": { + "413": { "description": "Error response", "content": { "application/json": { @@ -2453,40 +2113,50 @@ } } }, - "/api/homeworks/{id}": { - "patch": { - "operationId": "updateHomework", - "summary": "Update one homework", + "/api/admin/comments": { + "get": { + "operationId": "listAdminComments", + "summary": "List moderation comments", "tags": [ - "Homeworks" + "Admin" + ], + "security": [ + { + "sessionCookie": [] + } ], + "x-auth-role": "admin", "parameters": [ { - "in": "path", - "name": "id", + "in": "query", + "name": "status", "schema": { "type": "string", - "minLength": 1 - }, - "required": true - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/homeworkUpdateRequestSchema" - } - } - } - }, + "enum": [ + "all", + "active", + "softbanned", + "deleted", + "suspended" + ] + } + }, + { + "in": "query", + "name": "limit", + "schema": { + "type": "integer", + "format": "int64" + } + } + ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/homeworkUpdateResponseSchema" + "$ref": "#/components/schemas/adminCommentsResponseSchema" } } } @@ -2510,8 +2180,78 @@ } } } + } + } + } + }, + "/api/admin/descriptions": { + "get": { + "operationId": "listAdminDescriptions", + "summary": "List descriptions", + "tags": [ + "Admin" + ], + "security": [ + { + "sessionCookie": [] + } + ], + "x-auth-role": "admin", + "parameters": [ + { + "in": "query", + "name": "targetType", + "schema": { + "type": "string", + "enum": [ + "all", + "section", + "course", + "teacher", + "homework" + ] + } }, - "403": { + { + "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" + } + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/adminDescriptionsResponseSchema" + } + } + } + }, + "400": { "description": "Error response", "content": { "application/json": { @@ -2521,7 +2261,7 @@ } } }, - "404": { + "401": { "description": "Error response", "content": { "application/json": { @@ -2532,22 +2272,48 @@ } } } - }, - "delete": { - "operationId": "deleteHomework", - "summary": "Soft delete one homework", + } + }, + "/api/admin/homeworks": { + "get": { + "operationId": "listAdminHomeworks", + "summary": "List moderation homeworks", "tags": [ - "Homeworks" + "Admin" + ], + "security": [ + { + "sessionCookie": [] + } ], + "x-auth-role": "admin", "parameters": [ { - "in": "path", - "name": "id", + "in": "query", + "name": "status", "schema": { "type": "string", - "minLength": 1 - }, - "required": true + "enum": [ + "all", + "active", + "deleted" + ] + } + }, + { + "in": "query", + "name": "search", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "limit", + "schema": { + "type": "integer", + "format": "int64" + } } ], "responses": { @@ -2556,12 +2322,12 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/successResponseSchema" + "$ref": "#/components/schemas/adminHomeworksResponseSchema" } } } }, - "401": { + "400": { "description": "Error response", "content": { "application/json": { @@ -2571,7 +2337,7 @@ } } }, - "403": { + "401": { "description": "Error response", "content": { "application/json": { @@ -2580,8 +2346,35 @@ } } } + } + } + } + }, + "/api/admin/suspensions": { + "get": { + "operationId": "listAdminSuspensions", + "summary": "List suspensions", + "tags": [ + "Admin" + ], + "security": [ + { + "sessionCookie": [] + } + ], + "x-auth-role": "admin", + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/adminSuspensionsResponseSchema" + } + } + } }, - "404": { + "401": { "description": "Error response", "content": { "application/json": { @@ -2592,31 +2385,25 @@ } } } - } - }, - "/api/homeworks/{id}/completion": { - "put": { - "operationId": "setHomeworkCompletion", - "summary": "Update homework completion", + }, + "post": { + "operationId": "createAdminSuspension", + "summary": "Create suspension for one user", "tags": [ - "Homeworks" + "Admin" ], - "parameters": [ + "security": [ { - "in": "path", - "name": "id", - "schema": { - "type": "string", - "minLength": 1 - }, - "required": true + "sessionCookie": [] } ], + "x-auth-role": "admin", "requestBody": { + "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/homeworkCompletionRequestSchema" + "$ref": "#/components/schemas/adminCreateSuspensionRequestSchema" } } } @@ -2627,7 +2414,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/homeworkCompletionResponseSchema" + "$ref": "#/components/schemas/adminSuspensionResponseSchema" } } } @@ -2652,6 +2439,16 @@ } } }, + "403": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + }, "404": { "description": "Error response", "content": { @@ -2665,29 +2462,51 @@ } } }, - "/api/homeworks/completions": { - "put": { - "operationId": "put-api-homeworks-completions", - "summary": "Update homework completions in a batch", + "/api/admin/users": { + "get": { + "operationId": "listAdminUsers", + "summary": "List users", "tags": [ - "Homeworks" + "Admin" ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/homeworkCompletionBatchRequestSchema" - } + "security": [ + { + "sessionCookie": [] + } + ], + "x-auth-role": "admin", + "parameters": [ + { + "in": "query", + "name": "search", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "page", + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "in": "query", + "name": "limit", + "schema": { + "type": "integer", + "format": "int64" } } - }, + ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/homeworkCompletionBatchResponseSchema" + "$ref": "#/components/schemas/adminUsersResponseSchema" } } } @@ -2715,29 +2534,100 @@ } } }, - "/api/locale": { - "post": { - "operationId": "setLocale", - "summary": "Update user locale cookie", + "/api/bus/next": { + "get": { + "operationId": "get-api-bus-next", + "summary": "Get next shuttle bus departures for an origin and destination campus", "tags": [ - "Locale" + "Bus" ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/localeUpdateRequestSchema" - } + "parameters": [ + { + "in": "query", + "name": "originCampusId", + "schema": { + "type": "integer", + "format": "int64" + }, + "required": true + }, + { + "in": "query", + "name": "destinationCampusId", + "schema": { + "type": "integer", + "format": "int64" + }, + "required": true + }, + { + "in": "query", + "name": "atTime", + "schema": { + "type": "string", + "minLength": 1 + } + }, + { + "in": "query", + "name": "dayType", + "schema": { + "type": "string", + "enum": [ + "auto", + "weekday", + "weekend" + ] + } + }, + { + "in": "query", + "name": "includeDeparted", + "schema": { + "type": "string", + "enum": [ + "true", + "false" + ] + } + }, + { + "in": "query", + "name": "limit", + "schema": { + "type": "integer", + "format": "int64", + "minimum": 1, + "maximum": 50 + } + }, + { + "in": "query", + "name": "versionKey", + "schema": { + "type": "string", + "minLength": 1 + } + }, + { + "in": "query", + "name": "locale", + "schema": { + "type": "string", + "enum": [ + "en-us", + "zh-cn" + ] } } - }, + ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/successResponseSchema" + "$ref": "#/components/schemas/busNextDeparturesResponseSchema" } } } @@ -2751,20 +2641,45 @@ } } } + }, + "404": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } } } } }, - "/api/mcp": { + "/api/bus/preferences": { "get": { - "operationId": "listMcp", - "summary": "Open an MCP Streamable HTTP transport session", + "operationId": "getBusPreferences", + "summary": "Get bus preferences", "tags": [ - "Api" + "Bus" + ], + "security": [ + { + "bearerAuth": [] + }, + { + "sessionCookie": [] + } ], "responses": { "200": { - "description": "Response 200" + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/busPreferenceResponseSchema" + } + } + } }, "401": { "description": "Error response", @@ -2779,16 +2694,41 @@ } }, "post": { - "operationId": "createMcp", - "summary": "Send an MCP Streamable HTTP JSON-RPC message", + "operationId": "setBusPreferences", + "summary": "Update bus preferences", "tags": [ - "Api" + "Bus" + ], + "security": [ + { + "bearerAuth": [] + }, + { + "sessionCookie": [] + } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/busPreferenceRequestSchema" + } + } + } + }, "responses": { "200": { - "description": "Response 200" + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/busPreferenceResponseSchema" + } + } + } }, - "401": { + "400": { "description": "Error response", "content": { "application/json": { @@ -2797,18 +2737,6 @@ } } } - } - } - }, - "delete": { - "operationId": "delete-api-mcp", - "summary": "Close an MCP Streamable HTTP transport session", - "tags": [ - "Api" - ], - "responses": { - "200": { - "description": "Response 200" }, "401": { "description": "Error response", @@ -2821,97 +2749,79 @@ } } } - }, - "options": { - "operationId": "options-api-mcp", - "summary": "Return MCP transport CORS preflight headers", - "tags": [ - "Api" - ], - "responses": { - "204": { - "description": "Response 204" - } - } } }, - "/api/mcp/.well-known/oauth-authorization-server": { + "/api/bus/routes": { "get": { - "operationId": "get-api-mcp-.well-known-oauth-authorization-server", - "summary": "MCP resource-relative authorization server metadata compatibility alias", + "operationId": "get-api-bus-routes", + "summary": "Search shuttle bus route variants", "tags": [ - "Api" + "Bus" + ], + "parameters": [ + { + "in": "query", + "name": "originCampusId", + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "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": { - "307": { - "description": "Redirect", - "headers": { - "Location": { + "200": { + "description": "Successful response", + "content": { + "application/json": { "schema": { - "type": "string", - "format": "uri" + "$ref": "#/components/schemas/busRouteSearchResponseSchema" } } } - } - } - }, - "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": { + }, + "400": { + "description": "Error response", + "content": { + "application/json": { "schema": { - "type": "string", - "format": "uri" + "$ref": "#/components/schemas/openApiErrorSchema" } } } - } - } - } - }, - "/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": { + }, + "404": { + "description": "Error response", + "content": { + "application/json": { "schema": { - "type": "string", - "format": "uri" + "$ref": "#/components/schemas/openApiErrorSchema" } } } @@ -2919,12 +2829,20 @@ } } }, - "/api/me": { + "/api/calendar-subscriptions/current": { "get": { - "operationId": "getMe", - "summary": "Get current user", + "operationId": "getCurrentCalendarSubscription", + "summary": "Get section subscriptions", "tags": [ - "Me" + "Calendar" + ], + "security": [ + { + "bearerAuth": [] + }, + { + "sessionCookie": [] + } ], "responses": { "200": { @@ -2932,7 +2850,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/meResponseSchema" + "$ref": "#/components/schemas/currentCalendarSubscriptionResponseSchema" } } } @@ -2950,57 +2868,38 @@ } } }, - "/api/me/overview": { - "get": { - "operationId": "get-api-me-overview", - "summary": "Get a compact current-user overview for lightweight clients", + "/api/calendar-subscriptions/import-codes": { + "post": { + "operationId": "post-api-calendar-subscriptions-import-codes", + "summary": "Import section subscriptions by section codes", "tags": [ - "Me" + "Calendar" ], - "parameters": [ - { - "in": "query", - "name": "atTime", - "schema": { - "type": "string", - "minLength": 1 - } - }, - { - "in": "query", - "name": "homeworkWindowDays", - "schema": { - "type": "integer", - "format": "int64" - } - }, + "security": [ { - "in": "query", - "name": "limit", - "schema": { - "type": "integer", - "format": "int64" - } + "bearerAuth": [] }, { - "in": "query", - "name": "locale", - "schema": { - "type": "string", - "enum": [ - "en-us", - "zh-cn" - ] - } + "sessionCookie": [] } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/matchSectionCodesRequestSchema" + } + } + } + }, "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/compactOverviewResponseSchema" + "$ref": "#/components/schemas/calendarSubscriptionImportResponseSchema" } } } @@ -3024,16 +2923,37 @@ } } } + }, + "404": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } } } } }, - "/api/me/subscriptions/homeworks": { + "/api/comments/{id}": { "get": { - "operationId": "getSubscribedHomeworks", - "summary": "List subscribed homeworks", + "operationId": "getComment", + "summary": "Get comment thread", "tags": [ - "Me" + "Comments" + ], + "parameters": [ + { + "in": "path", + "name": "id", + "schema": { + "type": "string", + "minLength": 1 + }, + "required": true + } ], "responses": { "200": { @@ -3041,12 +2961,22 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/subscribedHomeworksResponseSchema" + "$ref": "#/components/schemas/commentThreadResponseSchema" } } } }, - "401": { + "403": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + }, + "404": { "description": "Error response", "content": { "application/json": { @@ -3057,67 +2987,49 @@ } } } - } - }, - "/api/me/subscriptions/schedules": { - "get": { - "operationId": "get-api-me-subscriptions-schedules", - "summary": "List schedules across the current user's subscribed sections", + }, + "patch": { + "operationId": "updateComment", + "summary": "Update one comment", "tags": [ - "Me" + "Comments" ], - "parameters": [ - { - "in": "query", - "name": "dateFrom", - "schema": { - "type": "string", - "minLength": 1 - } - }, - { - "in": "query", - "name": "dateTo", - "schema": { - "type": "string", - "minLength": 1 - } - }, + "security": [ { - "in": "query", - "name": "weekday", - "schema": { - "type": "integer", - "format": "int64" - } + "bearerAuth": [] }, { - "in": "query", - "name": "limit", - "schema": { - "type": "integer", - "format": "int64" - } - }, + "sessionCookie": [] + } + ], + "parameters": [ { - "in": "query", - "name": "locale", + "in": "path", + "name": "id", "schema": { "type": "string", - "enum": [ - "en-us", - "zh-cn" - ] - } + "minLength": 1 + }, + "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/subscribedSchedulesResponseSchema" + "$ref": "#/components/schemas/commentUpdateResponseSchema" } } } @@ -3141,122 +3053,91 @@ } } } + }, + "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/metadata": { - "get": { - "operationId": "getMetadata", - "summary": "Get metadata", + }, + "delete": { + "operationId": "deleteComment", + "summary": "Delete one comment", "tags": [ - "Metadata" + "Comments" ], - "responses": { - "200": { - "description": "Successful response", + "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/metadataResponseSchema" - }, - "example": { - "educationLevels": [ - { - "id": 401, - "nameCn": "本科生", - "nameEn": "Undergraduate" - } - ], - "courseCategories": [ - { - "id": 402, - "nameCn": "学科基础课", - "nameEn": "Disciplinary Foundation" - } - ], - "courseClassifies": [ - { - "id": 404, - "nameCn": "必修", - "nameEn": "Required" - } - ], - "classTypes": [ - { - "id": 403, - "nameCn": "理论课", - "nameEn": "Lecture" - } - ], - "courseTypes": [ - { - "id": 406, - "nameCn": "专业核心", - "nameEn": "Core Major" - } - ], - "courseGradations": [ - { - "id": 405, - "nameCn": "进阶", - "nameEn": "Advanced" - } - ], - "examModes": [ - { - "id": 602, - "nameCn": "闭卷", - "nameEn": "Closed Book" - } - ], - "teachLanguages": [ - { - "id": 601, - "nameCn": "中文", - "nameEn": "Chinese" - } - ], - "campuses": [ - { - "id": 201, - "jwId": 9910001, - "nameCn": "东校区", - "nameEn": "East Campus", - "code": "EAST", - "buildings": [ - { - "id": 301, - "jwId": 9910021, - "code": "BLDG-1", - "nameCn": "第一教学楼", - "nameEn": "Teaching Building 1", - "campusId": 201 - } - ] - } - ] + "$ref": "#/components/schemas/successResponseSchema" } } } - } - } - } - }, - "/api/openapi": { - "get": { - "operationId": "getOpenApiSpec", - "summary": "Get OpenAPI document", - "tags": [ - "OpenAPI" - ], - "responses": { - "200": { - "description": "Successful response", + }, + "401": { + "description": "Error response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/openApiDocumentResponseSchema" + "$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" } } } @@ -3264,111 +3145,22 @@ } } }, - "/api/schedules": { + "/api/courses/{jwId}": { "get": { - "operationId": "listSchedules", - "summary": "List schedules", + "operationId": "getCourse", + "summary": "Get course", "tags": [ - "Schedules" + "Courses" ], "parameters": [ { - "in": "query", - "name": "sectionId", - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "in": "query", - "name": "sectionJwId", - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "in": "query", - "name": "sectionCode", - "schema": { - "type": "string", - "minLength": 1 - } - }, - { - "in": "query", - "name": "teacherId", - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "in": "query", - "name": "teacherCode", - "schema": { - "type": "string", - "minLength": 1 - } - }, - { - "in": "query", - "name": "roomId", - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "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 - } - }, - { - "in": "query", - "name": "dateTo", - "schema": { - "type": "string", - "minLength": 1 - } - }, - { - "in": "query", - "name": "page", - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "in": "query", - "name": "limit", + "in": "path", + "name": "jwId", "schema": { "type": "integer", "format": "int64" - } + }, + "required": true } ], "responses": { @@ -3377,7 +3169,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/paginatedScheduleResponseSchema" + "$ref": "#/components/schemas/courseDetailSchema" } } } @@ -3391,248 +3183,93 @@ } } } + }, + "404": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } } } } }, - "/api/sections": { - "get": { - "operationId": "listSections", - "summary": "List sections", + "/api/dashboard-links/pin": { + "post": { + "operationId": "pinDashboardLink", + "summary": "Pin dashboard link", "tags": [ - "Sections" + "DashboardLinks" ], - "parameters": [ + "security": [ { - "in": "query", - "name": "courseId", - "schema": { - "type": "integer", - "format": "int64" - } + "bearerAuth": [] }, { - "in": "query", - "name": "courseJwId", - "schema": { - "type": "integer", - "format": "int64" + "sessionCookie": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "$ref": "#/components/schemas/dashboardLinkPinRequestSchema" + } } - }, - { - "in": "query", - "name": "semesterId", - "schema": { - "type": "integer", - "format": "int64" + } + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/dashboardLinkPinResponseSchema" + } + } } }, - { - "in": "query", - "name": "semesterJwId", - "schema": { - "type": "integer", - "format": "int64" - }, - "example": 9900001 - }, - { - "in": "query", - "name": "campusId", - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "in": "query", - "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 - }, - "example": "T2401001" - }, - { - "in": "query", - "name": "search", - "schema": { - "type": "string" - }, - "example": "IS3003" - }, - { - "in": "query", - "name": "ids", - "schema": { - "type": "string" + "303": { + "description": "Redirect after pin/unpin", + "headers": { + "Location": { + "description": "Redirect target URL", + "schema": { + "type": "string" + } + } } }, - { - "in": "query", - "name": "jwIds", - "schema": { - "type": "string" + "400": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/dashboardLinkPinResponseSchema" + } + } } }, - { - "in": "query", - "name": "page", - "schema": { - "type": "integer", - "format": "int64" - }, - "example": 1 - }, - { - "in": "query", - "name": "limit", - "schema": { - "type": "integer", - "format": "int64" - }, - "example": 20 - } - ], - "responses": { - "200": { - "description": "Successful response", + "401": { + "description": "Error response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/paginatedSectionResponseSchema" - }, - "example": { - "data": [ - { - "id": 2001, - "jwId": 9902001, - "code": "IS3003.01", - "credits": 2.5, - "stdCount": 58, - "limitCount": 80, - "courseId": 1001, - "semesterId": 701, - "campusId": 201, - "openDepartmentId": 501, - "course": { - "id": 1001, - "jwId": 9901001, - "code": "IS3003", - "nameCn": "密码工程原理与实践", - "nameEn": "Cryptographic Engineering: Principles and Practice" - }, - "semester": { - "id": 701, - "jwId": 9900001, - "nameCn": "2026年春季学期", - "code": "421", - "startDate": "2026-02-23T00:00:00+08:00", - "endDate": "2026-07-05T00:00:00+08:00" - }, - "campus": { - "id": 201, - "jwId": 9910001, - "nameCn": "东校区", - "nameEn": "East Campus", - "code": "EAST" - }, - "teachers": [ - { - "id": 8001, - "personId": null, - "teacherId": null, - "code": "T2401001", - "nameCn": "林璟锵", - "nameEn": "Lin Jingqiang" - }, - { - "id": 8002, - "personId": null, - "teacherId": null, - "code": "T2401002", - "nameCn": "王伟", - "nameEn": "Wang Wei" - } - ] - }, - { - "id": 2002, - "jwId": 9902002, - "code": "ASTRON1501.01", - "credits": 2, - "stdCount": 33, - "limitCount": 60, - "courseId": 1002, - "semesterId": 701, - "campusId": 201, - "openDepartmentId": 501, - "course": { - "id": 1002, - "jwId": 9901002, - "code": "ASTRON1501", - "nameCn": "天体物理概观", - "nameEn": "Introduction to Astrophysics" - }, - "semester": { - "id": 701, - "jwId": 9900001, - "nameCn": "2026年春季学期", - "code": "421", - "startDate": "2026-02-23T00:00:00+08:00", - "endDate": "2026-07-05T00:00:00+08:00" - }, - "campus": { - "id": 201, - "jwId": 9910001, - "nameCn": "东校区", - "nameEn": "East Campus", - "code": "EAST" - }, - "teachers": [ - { - "id": 8002, - "personId": null, - "teacherId": null, - "code": "T2401002", - "nameCn": "王伟", - "nameEn": "Wang Wei" - } - ] - } - ], - "pagination": { - "page": 1, - "pageSize": 20, - "total": 4, - "totalPages": 1 - } + "$ref": "#/components/schemas/dashboardLinkPinResponseSchema" } } } }, - "400": { + "500": { "description": "Error response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/openApiErrorSchema" + "$ref": "#/components/schemas/dashboardLinkPinResponseSchema" } } } @@ -3640,247 +3277,62 @@ } } }, - "/api/sections/{jwId}": { + "/api/dashboard-links/visit": { "get": { - "operationId": "getSection", - "summary": "Get section", + "operationId": "visitDashboardLink", + "summary": "Preview dashboard link", "tags": [ - "Sections" + "DashboardLinks" ], "parameters": [ { - "in": "path", - "name": "jwId", + "in": "query", + "name": "slug", "schema": { - "type": "integer", - "format": "int64" + "type": "string", + "minLength": 1 }, - "required": true, - "example": 9902001 + "required": true } ], "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": { + "307": { + "description": "Temporary redirect to target link", + "headers": { + "Location": { + "description": "Redirect target URL", "schema": { - "$ref": "#/components/schemas/sectionDetailSchema" - }, - "example": { - "id": 2001, - "jwId": 9902001, - "code": "IS3003.01", - "bizTypeId": null, - "credits": 2.5, - "period": 48, - "periodsPerWeek": 4, - "timesPerWeek": 2, - "stdCount": 58, - "limitCount": 80, - "graduateAndPostgraduate": false, - "dateTimePlaceText": "周一 3-4节, 一教101", - "dateTimePlacePersonText": null, - "actualPeriods": 48, - "theoryPeriods": 32, - "practicePeriods": 16, - "experimentPeriods": null, - "machinePeriods": null, - "designPeriods": null, - "testPeriods": null, - "scheduleState": "scheduled", - "suggestScheduleWeeks": null, - "suggestScheduleWeekInfo": "1-16周", - "scheduleJsonParams": null, - "selectedStdCount": 58, - "remark": "结合密码协议与工程实现,强调课堂演示和实验复盘。", - "scheduleRemark": null, - "courseId": 1001, - "semesterId": 701, - "campusId": 201, - "examModeId": 602, - "openDepartmentId": 501, - "teachLanguageId": 601, - "roomTypeId": 303, - "course": { - "id": 1001, - "jwId": 9901001, - "code": "IS3003", - "nameCn": "密码工程原理与实践", - "nameEn": "Cryptographic Engineering: Principles and Practice", - "categoryId": 402, - "classTypeId": 403, - "classifyId": 404, - "educationLevelId": 401, - "gradationId": 405, - "typeId": 406, - "category": { - "id": 402, - "nameCn": "学科基础课", - "nameEn": "Disciplinary Foundation" - }, - "classType": { - "id": 403, - "nameCn": "理论课", - "nameEn": "Lecture" - }, - "classify": { - "id": 404, - "nameCn": "必修", - "nameEn": "Required" - }, - "educationLevel": { - "id": 401, - "nameCn": "本科生", - "nameEn": "Undergraduate" - }, - "gradation": { - "id": 405, - "nameCn": "进阶", - "nameEn": "Advanced" - }, - "type": { - "id": 406, - "nameCn": "专业核心", - "nameEn": "Core Major" - } - }, - "semester": { - "id": 701, - "jwId": 9900001, - "nameCn": "2026年春季学期", - "code": "421", - "startDate": "2026-02-23T00:00:00+08:00", - "endDate": "2026-07-05T00:00:00+08:00" - }, - "campus": { - "id": 201, - "jwId": 9910001, - "nameCn": "东校区", - "nameEn": "East Campus", - "code": "EAST" - }, - "openDepartment": { - "id": 501, - "code": "DPT-IS", - "nameCn": "网络空间安全学院", - "nameEn": "School of Cyber Science and Technology", - "isCollege": true - }, - "examMode": { - "id": 602, - "nameCn": "闭卷", - "nameEn": "Closed Book" - }, - "teachLanguage": { - "id": 601, - "nameCn": "中文", - "nameEn": "Chinese" - }, - "roomType": { - "id": 303, - "jwId": 9910011, - "code": "MULTIMEDIA", - "nameCn": "多媒体教室", - "nameEn": "Multimedia Classroom" - }, - "schedules": [], - "scheduleGroups": [], - "teachers": [ - { - "id": 8001, - "personId": null, - "teacherId": null, - "code": "T2401001", - "nameCn": "林璟锵", - "nameEn": "Lin Jingqiang", - "age": null, - "email": "jqlin@ustc.edu.cn", - "telephone": null, - "mobile": "13800001111", - "address": null, - "postcode": null, - "qq": null, - "wechat": null, - "departmentId": 501, - "teacherTitleId": 801, - "department": { - "id": 501, - "code": "DPT-IS", - "nameCn": "网络空间安全学院", - "nameEn": "School of Cyber Science and Technology", - "isCollege": true - }, - "teacherTitle": { - "id": 801, - "jwId": 9910041, - "code": "PROF", - "nameCn": "教授", - "nameEn": "Professor", - "enabled": true - } - }, - { - "id": 8002, - "personId": null, - "teacherId": null, - "code": "T2401002", - "nameCn": "王伟", - "nameEn": "Wang Wei", - "age": null, - "email": "wangwei@ustc.edu.cn", - "telephone": null, - "mobile": "13800002222", - "address": null, - "postcode": null, - "qq": null, - "wechat": null, - "departmentId": 501, - "teacherTitleId": 801, - "department": { - "id": 501, - "code": "DPT-IS", - "nameCn": "网络空间安全学院", - "nameEn": "School of Cyber Science and Technology", - "isCollege": true - }, - "teacherTitle": { - "id": 801, - "jwId": 9910041, - "code": "PROF", - "nameCn": "教授", - "nameEn": "Professor", - "enabled": true - } - } - ], - "teacherAssignments": [], - "exams": [], - "adminClasses": [ - { - "id": 101, - "jwId": 9910061, - "code": "CS-2022-01", - "grade": "2022", - "nameCn": "计算机01", - "nameEn": "CS Class 01", - "stdCount": 58, - "planCount": 60, - "enabled": true, - "abbrZh": "计01", - "abbrEn": "CS01" - } - ] + "type": "string" } } } - }, - "404": { - "description": "Error response", - "content": { - "application/json": { + } + } + }, + "post": { + "operationId": "recordDashboardLinkVisit", + "summary": "Record one dashboard link visit and redirect", + "tags": [ + "DashboardLinks" + ], + "requestBody": { + "required": true, + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "$ref": "#/components/schemas/dashboardLinkVisitRequestSchema" + } + } + } + }, + "responses": { + "303": { + "description": "Redirect after recording link click", + "headers": { + "Location": { + "description": "Redirect target URL", "schema": { - "$ref": "#/components/schemas/openApiErrorSchema" + "type": "string" } } } @@ -3888,37 +3340,54 @@ } } }, - "/api/sections/{jwId}/calendar.ics": { - "get": { - "operationId": "getSectionCalendar", - "summary": "Generate section calendar", + "/api/homeworks/{id}": { + "patch": { + "operationId": "updateHomework", + "summary": "Update one homework", "tags": [ - "Sections" + "Homeworks" + ], + "security": [ + { + "bearerAuth": [] + }, + { + "sessionCookie": [] + } ], "parameters": [ { "in": "path", - "name": "jwId", + "name": "id", "schema": { - "type": "integer", - "format": "int64" + "type": "string", + "minLength": 1 }, "required": true } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/homeworkUpdateRequestSchema" + } + } + } + }, "responses": { "200": { - "description": "Binary response", + "description": "Successful response", "content": { - "application/octet-stream": { + "application/json": { "schema": { - "type": "string", - "format": "binary" + "$ref": "#/components/schemas/homeworkUpdateResponseSchema" } } } }, - "404": { + "400": { "description": "Error response", "content": { "application/json": { @@ -3927,36 +3396,23 @@ } } } - } - } - } - }, - "/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", + }, + "401": { + "description": "Error response", "content": { "application/json": { "schema": { - "type": "array", - "items": {} + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + }, + "403": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" } } } @@ -3972,39 +3428,44 @@ } } } - } - }, - "/api/sections/{jwId}/schedules": { - "get": { - "operationId": "getSectionSchedules", - "summary": "Get section schedules", + }, + "delete": { + "operationId": "deleteHomework", + "summary": "Soft delete one homework", "tags": [ - "Sections" + "Homeworks" + ], + "security": [ + { + "bearerAuth": [] + }, + { + "sessionCookie": [] + } ], "parameters": [ { "in": "path", - "name": "jwId", + "name": "id", "schema": { - "type": "integer", - "format": "int64" + "type": "string", + "minLength": 1 }, "required": true } ], "responses": { "200": { - "description": "Array response", + "description": "Successful response", "content": { "application/json": { "schema": { - "type": "array", - "items": {} + "$ref": "#/components/schemas/successResponseSchema" } } } }, - "404": { + "401": { "description": "Error response", "content": { "application/json": { @@ -4013,41 +3474,18 @@ } } } - } - } - } - }, - "/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 - } - ], - "responses": { - "200": { - "description": "Binary response", + }, + "403": { + "description": "Error response", "content": { - "application/octet-stream": { + "application/json": { "schema": { - "type": "string", - "format": "binary" + "$ref": "#/components/schemas/openApiErrorSchema" } } } }, - "400": { + "404": { "description": "Error response", "content": { "application/json": { @@ -4060,24 +3498,27 @@ } } }, - "/api/sections/match-codes": { - "post": { - "operationId": "matchSectionCodes", - "summary": "Match section codes", + "/api/homeworks/completions": { + "put": { + "operationId": "put-api-homeworks-completions", + "summary": "Update homework completions in a batch", "tags": [ - "Sections" + "Homeworks" + ], + "security": [ + { + "bearerAuth": [] + }, + { + "sessionCookie": [] + } ], "requestBody": { + "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/matchSectionCodesRequestSchema" - }, - "example": { - "codes": [ - "IS3003.01", - "ASTRON1501.01" - ] + "$ref": "#/components/schemas/homeworkCompletionBatchRequestSchema" } } } @@ -4088,283 +3529,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/matchSectionCodesResponseSchema" - }, - "example": { - "semester": { - "id": 701, - "nameCn": "2026年春季学期", - "code": "421" - }, - "matchedCodes": [ - "IS3003.01", - "ASTRON1501.01" - ], - "unmatchedCodes": [], - "suggestions": {}, - "sections": [ - { - "id": 2001, - "jwId": 9902001, - "code": "IS3003.01", - "bizTypeId": null, - "credits": 2.5, - "period": 48, - "periodsPerWeek": 4, - "timesPerWeek": 2, - "stdCount": 58, - "limitCount": 80, - "graduateAndPostgraduate": false, - "dateTimePlaceText": "周一 3-4节, 一教101", - "dateTimePlacePersonText": null, - "actualPeriods": 48, - "theoryPeriods": 32, - "practicePeriods": 16, - "experimentPeriods": null, - "machinePeriods": null, - "designPeriods": null, - "testPeriods": null, - "scheduleState": "scheduled", - "suggestScheduleWeeks": null, - "suggestScheduleWeekInfo": "1-16周", - "scheduleJsonParams": null, - "selectedStdCount": 58, - "remark": "结合密码协议与工程实现,强调课堂演示和实验复盘。", - "scheduleRemark": null, - "courseId": 1001, - "semesterId": 701, - "campusId": 201, - "examModeId": 602, - "openDepartmentId": 501, - "teachLanguageId": 601, - "roomTypeId": 303, - "course": { - "id": 1001, - "jwId": 9901001, - "code": "IS3003", - "nameCn": "密码工程原理与实践", - "nameEn": "Cryptographic Engineering: Principles and Practice", - "categoryId": 402, - "classTypeId": 403, - "classifyId": 404, - "educationLevelId": 401, - "gradationId": 405, - "typeId": 406, - "category": { - "id": 402, - "nameCn": "学科基础课", - "nameEn": "Disciplinary Foundation" - }, - "classType": { - "id": 403, - "nameCn": "理论课", - "nameEn": "Lecture" - }, - "classify": { - "id": 404, - "nameCn": "必修", - "nameEn": "Required" - }, - "educationLevel": { - "id": 401, - "nameCn": "本科生", - "nameEn": "Undergraduate" - }, - "gradation": { - "id": 405, - "nameCn": "进阶", - "nameEn": "Advanced" - }, - "type": { - "id": 406, - "nameCn": "专业核心", - "nameEn": "Core Major" - } - }, - "semester": { - "id": 701, - "jwId": 9900001, - "nameCn": "2026年春季学期", - "code": "421", - "startDate": "2026-02-23T00:00:00+08:00", - "endDate": "2026-07-05T00:00:00+08:00" - }, - "campus": { - "id": 201, - "jwId": 9910001, - "nameCn": "东校区", - "nameEn": "East Campus", - "code": "EAST" - }, - "openDepartment": { - "id": 501, - "code": "DPT-IS", - "nameCn": "网络空间安全学院", - "nameEn": "School of Cyber Science and Technology", - "isCollege": true - }, - "teachers": [ - { - "id": 8001, - "personId": null, - "teacherId": null, - "code": "T2401001", - "nameCn": "林璟锵", - "nameEn": "Lin Jingqiang", - "age": null, - "email": "jqlin@ustc.edu.cn", - "telephone": null, - "mobile": "13800001111", - "address": null, - "postcode": null, - "qq": null, - "wechat": null, - "departmentId": 501, - "teacherTitleId": 801 - }, - { - "id": 8002, - "personId": null, - "teacherId": null, - "code": "T2401002", - "nameCn": "王伟", - "nameEn": "Wang Wei", - "age": null, - "email": "wangwei@ustc.edu.cn", - "telephone": null, - "mobile": "13800002222", - "address": null, - "postcode": null, - "qq": null, - "wechat": null, - "departmentId": 501, - "teacherTitleId": 801 - } - ] - }, - { - "id": 2002, - "jwId": 9902002, - "code": "ASTRON1501.01", - "bizTypeId": null, - "credits": 2, - "period": 48, - "periodsPerWeek": 4, - "timesPerWeek": 2, - "stdCount": 33, - "limitCount": 60, - "graduateAndPostgraduate": false, - "dateTimePlaceText": "周一 3-4节, 一教101", - "dateTimePlacePersonText": null, - "actualPeriods": 48, - "theoryPeriods": 32, - "practicePeriods": 16, - "experimentPeriods": null, - "machinePeriods": null, - "designPeriods": null, - "testPeriods": null, - "scheduleState": "scheduled", - "suggestScheduleWeeks": null, - "suggestScheduleWeekInfo": "1-16周", - "scheduleJsonParams": null, - "selectedStdCount": 33, - "remark": "围绕天体物理基础主题组织阅读、讨论和期末考核。", - "scheduleRemark": null, - "courseId": 1002, - "semesterId": 701, - "campusId": 201, - "examModeId": 602, - "openDepartmentId": 501, - "teachLanguageId": 601, - "roomTypeId": 303, - "course": { - "id": 1002, - "jwId": 9901002, - "code": "ASTRON1501", - "nameCn": "天体物理概观", - "nameEn": "Introduction to Astrophysics", - "categoryId": 402, - "classTypeId": 403, - "classifyId": 404, - "educationLevelId": 401, - "gradationId": 405, - "typeId": 406, - "category": { - "id": 402, - "nameCn": "学科基础课", - "nameEn": "Disciplinary Foundation" - }, - "classType": { - "id": 403, - "nameCn": "理论课", - "nameEn": "Lecture" - }, - "classify": { - "id": 404, - "nameCn": "必修", - "nameEn": "Required" - }, - "educationLevel": { - "id": 401, - "nameCn": "本科生", - "nameEn": "Undergraduate" - }, - "gradation": { - "id": 405, - "nameCn": "进阶", - "nameEn": "Advanced" - }, - "type": { - "id": 406, - "nameCn": "专业核心", - "nameEn": "Core Major" - } - }, - "semester": { - "id": 701, - "jwId": 9900001, - "nameCn": "2026年春季学期", - "code": "421", - "startDate": "2026-02-23T00:00:00+08:00", - "endDate": "2026-07-05T00:00:00+08:00" - }, - "campus": { - "id": 201, - "jwId": 9910001, - "nameCn": "东校区", - "nameEn": "East Campus", - "code": "EAST" - }, - "openDepartment": { - "id": 501, - "code": "DPT-IS", - "nameCn": "网络空间安全学院", - "nameEn": "School of Cyber Science and Technology", - "isCollege": true - }, - "teachers": [ - { - "id": 8002, - "personId": null, - "teacherId": null, - "code": "T2401002", - "nameCn": "王伟", - "nameEn": "Wang Wei", - "age": null, - "email": "wangwei@ustc.edu.cn", - "telephone": null, - "mobile": "13800002222", - "address": null, - "postcode": null, - "qq": null, - "wechat": null, - "departmentId": 501, - "teacherTitleId": 801 - } - ] - } - ], - "total": 2 + "$ref": "#/components/schemas/homeworkCompletionBatchResponseSchema" } } } @@ -4378,35 +3543,74 @@ } } } + }, + "401": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } } } } }, - "/api/semesters": { + "/api/me/overview": { "get": { - "operationId": "listSemesters", - "summary": "List semesters", + "operationId": "get-api-me-overview", + "summary": "Get a compact current-user overview for lightweight clients", "tags": [ - "Semesters" + "Me" + ], + "security": [ + { + "bearerAuth": [] + }, + { + "sessionCookie": [] + } ], "parameters": [ { "in": "query", - "name": "page", + "name": "atTime", + "schema": { + "type": "string", + "minLength": 1 + } + }, + { + "in": "query", + "name": "homeworkWindowDays", "schema": { "type": "integer", - "format": "int64" - }, - "example": 1 + "format": "int64", + "minimum": 1, + "maximum": 90 + } }, { "in": "query", "name": "limit", "schema": { "type": "integer", - "format": "int64" - }, - "example": 20 + "format": "int64", + "minimum": 1, + "maximum": 50 + } + }, + { + "in": "query", + "name": "locale", + "schema": { + "type": "string", + "enum": [ + "en-us", + "zh-cn" + ] + } } ], "responses": { @@ -4415,33 +3619,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/paginatedSemesterResponseSchema" - }, - "example": { - "data": [ - { - "id": 701, - "jwId": 9900001, - "nameCn": "2026年春季学期", - "code": "421", - "startDate": "2026-02-23T00:00:00+08:00", - "endDate": "2026-07-05T00:00:00+08:00" - }, - { - "id": 701, - "jwId": 9900000, - "nameCn": "2025年秋季学期", - "code": "420", - "startDate": "2026-02-23T00:00:00+08:00", - "endDate": "2026-07-05T00:00:00+08:00" - } - ], - "pagination": { - "page": 1, - "pageSize": 20, - "total": 2, - "totalPages": 1 - } + "$ref": "#/components/schemas/compactOverviewResponseSchema" } } } @@ -4455,16 +3633,37 @@ } } } + }, + "401": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } } } } }, - "/api/semesters/current": { + "/api/sections/{jwId}": { "get": { - "operationId": "getCurrentSemester", - "summary": "Get current semester", + "operationId": "getSection", + "summary": "Get section", "tags": [ - "Semesters" + "Sections" + ], + "parameters": [ + { + "in": "path", + "name": "jwId", + "schema": { + "type": "integer", + "format": "int64" + }, + "required": true + } ], "responses": { "200": { @@ -4472,15 +3671,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/semesterSchema" - }, - "example": { - "id": 701, - "jwId": 9900001, - "nameCn": "2026年春季学期", - "code": "421", - "startDate": "2026-02-23T00:00:00+08:00", - "endDate": "2026-07-05T00:00:00+08:00" + "$ref": "#/components/schemas/sectionDetailSchema" + } + } + } + }, + "400": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" } } } @@ -4498,138 +3699,31 @@ } } }, - "/api/teachers": { + "/api/sections/calendar.ics": { "get": { - "operationId": "listTeachers", - "summary": "List teachers", + "operationId": "getSectionsCalendar", + "summary": "Generate sections calendar", "tags": [ - "Teachers" + "Sections" ], "parameters": [ { "in": "query", - "name": "departmentId", - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "in": "query", - "name": "search", - "schema": { - "type": "string" - }, - "example": "林璟锵" - }, - { - "in": "query", - "name": "page", - "schema": { - "type": "integer", - "format": "int64" - }, - "example": 1 - }, - { - "in": "query", - "name": "limit", + "name": "sectionIds", "schema": { - "type": "integer", - "format": "int64" + "type": "string", + "minLength": 1 }, - "example": 20 + "required": true } ], "responses": { "200": { - "description": "Successful response", + "description": "Calendar response", "content": { - "application/json": { + "text/calendar": { "schema": { - "$ref": "#/components/schemas/paginatedTeacherResponseSchema" - }, - "example": { - "data": [ - { - "id": 8001, - "personId": null, - "teacherId": null, - "code": "T2401001", - "nameCn": "林璟锵", - "nameEn": "Lin Jingqiang", - "age": null, - "email": "jqlin@ustc.edu.cn", - "telephone": null, - "mobile": "13800001111", - "address": null, - "postcode": null, - "qq": null, - "wechat": null, - "departmentId": 501, - "teacherTitleId": 801, - "department": { - "id": 501, - "code": "DPT-IS", - "nameCn": "网络空间安全学院", - "nameEn": "School of Cyber Science and Technology", - "isCollege": true - }, - "teacherTitle": { - "id": 801, - "jwId": 9910041, - "code": "PROF", - "nameCn": "教授", - "nameEn": "Professor", - "enabled": true - }, - "_count": { - "sections": 1 - } - }, - { - "id": 8002, - "personId": null, - "teacherId": null, - "code": "T2401002", - "nameCn": "王伟", - "nameEn": "Wang Wei", - "age": null, - "email": "wangwei@ustc.edu.cn", - "telephone": null, - "mobile": "13800002222", - "address": null, - "postcode": null, - "qq": null, - "wechat": null, - "departmentId": 501, - "teacherTitleId": 801, - "department": { - "id": 501, - "code": "DPT-IS", - "nameCn": "网络空间安全学院", - "nameEn": "School of Cyber Science and Technology", - "isCollege": true - }, - "teacherTitle": { - "id": 801, - "jwId": 9910041, - "code": "PROF", - "nameCn": "教授", - "nameEn": "Professor", - "enabled": true - }, - "_count": { - "sections": 1 - } - } - ], - "pagination": { - "page": 1, - "pageSize": 20, - "total": 3, - "totalPages": 1 - } + "type": "string" } } } @@ -4647,157 +3741,40 @@ } } }, - "/api/teachers/{id}": { - "get": { - "operationId": "getTeacher", - "summary": "Get teacher", + "/api/sections/match-codes": { + "post": { + "operationId": "matchSectionCodes", + "summary": "Match section codes", "tags": [ - "Teachers" + "Sections" ], - "parameters": [ - { - "in": "path", - "name": "id", - "schema": { - "type": "string", - "minLength": 1 - }, - "required": true, - "example": 8001 + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/matchSectionCodesRequestSchema" + } + } } - ], + }, "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/teacherDetailSchema" - }, - "example": { - "id": 8001, - "personId": null, - "teacherId": null, - "code": "T2401001", - "nameCn": "林璟锵", - "nameEn": "Lin Jingqiang", - "age": null, - "email": "jqlin@ustc.edu.cn", - "telephone": null, - "mobile": "13800001111", - "address": null, - "postcode": null, - "qq": null, - "wechat": null, - "departmentId": 501, - "teacherTitleId": 801, - "department": { - "id": 501, - "code": "DPT-IS", - "nameCn": "网络空间安全学院", - "nameEn": "School of Cyber Science and Technology", - "isCollege": true - }, - "teacherTitle": { - "id": 801, - "jwId": 9910041, - "code": "PROF", - "nameCn": "教授", - "nameEn": "Professor", - "enabled": true - }, - "sections": [ - { - "id": 2001, - "jwId": 9902001, - "code": "IS3003.01", - "bizTypeId": null, - "credits": 2.5, - "period": 48, - "periodsPerWeek": 4, - "timesPerWeek": 2, - "stdCount": 58, - "limitCount": 80, - "graduateAndPostgraduate": false, - "dateTimePlaceText": "周一 3-4节, 一教101", - "dateTimePlacePersonText": null, - "actualPeriods": 48, - "theoryPeriods": 32, - "practicePeriods": 16, - "experimentPeriods": null, - "machinePeriods": null, - "designPeriods": null, - "testPeriods": null, - "scheduleState": "scheduled", - "suggestScheduleWeeks": null, - "suggestScheduleWeekInfo": "1-16周", - "scheduleJsonParams": null, - "selectedStdCount": 58, - "remark": "结合密码协议与工程实现,强调课堂演示和实验复盘。", - "scheduleRemark": null, - "courseId": 1001, - "semesterId": 701, - "campusId": 201, - "examModeId": 602, - "openDepartmentId": 501, - "teachLanguageId": 601, - "roomTypeId": 303, - "course": { - "id": 1001, - "jwId": 9901001, - "code": "IS3003", - "nameCn": "密码工程原理与实践", - "nameEn": "Cryptographic Engineering: Principles and Practice", - "categoryId": 402, - "classTypeId": 403, - "classifyId": 404, - "educationLevelId": 401, - "gradationId": 405, - "typeId": 406, - "category": { - "id": 402, - "nameCn": "学科基础课", - "nameEn": "Disciplinary Foundation" - }, - "classType": { - "id": 403, - "nameCn": "理论课", - "nameEn": "Lecture" - }, - "classify": { - "id": 404, - "nameCn": "必修", - "nameEn": "Required" - }, - "educationLevel": { - "id": 401, - "nameCn": "本科生", - "nameEn": "Undergraduate" - }, - "gradation": { - "id": 405, - "nameCn": "进阶", - "nameEn": "Advanced" - }, - "type": { - "id": 406, - "nameCn": "专业核心", - "nameEn": "Core Major" - } - }, - "semester": { - "id": 701, - "jwId": 9900001, - "nameCn": "2026年春季学期", - "code": "421", - "startDate": "2026-02-23T00:00:00+08:00", - "endDate": "2026-07-05T00:00:00+08:00" - } - } - ], - "_count": { - "sections": 1 - } + "$ref": "#/components/schemas/matchSectionCodesResponseSchema" + } + } + } + }, + "400": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" } } } @@ -4815,63 +3792,12 @@ } } }, - "/api/todos": { + "/api/semesters/current": { "get": { - "operationId": "listTodos", - "summary": "List todos", + "operationId": "getCurrentSemester", + "summary": "Get current semester", "tags": [ - "Todos" - ], - "parameters": [ - { - "in": "query", - "name": "completed", - "schema": { - "type": "string", - "enum": [ - "true", - "false" - ] - } - }, - { - "in": "query", - "name": "priority", - "schema": { - "type": "string", - "enum": [ - "low", - "medium", - "high" - ] - } - }, - { - "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))$" - } - }, - { - "in": "query", - "name": "dueAfter", - "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))$" - } - }, - { - "in": "query", - "name": "limit", - "schema": { - "type": "integer", - "format": "int64" - } - } + "Semesters" ], "responses": { "200": { @@ -4879,12 +3805,12 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/todosListResponseSchema" + "$ref": "#/components/schemas/semesterSchema" } } } }, - "401": { + "404": { "description": "Error response", "content": { "application/json": { @@ -4895,29 +3821,33 @@ } } } - }, - "post": { - "operationId": "createTodo", - "summary": "Create a todo", + } + }, + "/api/teachers/{id}": { + "get": { + "operationId": "getTeacher", + "summary": "Get teacher", "tags": [ - "Todos" + "Teachers" ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/todoCreateRequestSchema" - } - } + "parameters": [ + { + "in": "path", + "name": "id", + "schema": { + "type": "integer", + "format": "int64" + }, + "required": true } - }, + ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/idResponseSchema" + "$ref": "#/components/schemas/teacherDetailSchema" } } } @@ -4931,6 +3861,16 @@ } } } + }, + "404": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } } } } @@ -4942,6 +3882,14 @@ "tags": [ "Todos" ], + "security": [ + { + "bearerAuth": [] + }, + { + "sessionCookie": [] + } + ], "parameters": [ { "in": "path", @@ -4954,6 +3902,7 @@ } ], "requestBody": { + "required": true, "content": { "application/json": { "schema": { @@ -4968,7 +3917,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/successResponseSchema" + "$ref": "#/components/schemas/todoUpdateResponseSchema" } } } @@ -4982,15 +3931,53 @@ } } } - } - } - }, - "delete": { + }, + "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", @@ -5013,7 +4000,7 @@ } } }, - "404": { + "401": { "description": "Error response", "content": { "application/json": { @@ -5022,57 +4009,18 @@ } } } - } - } - } - }, - "/api/uploads": { - "get": { - "operationId": "listUploads", - "summary": "List uploads", - "tags": [ - "Uploads" - ], - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/uploadsListResponseSchema" - } - } - } - } - } - }, - "post": { - "operationId": "createUpload", - "summary": "Create a signed upload URL", - "tags": [ - "Uploads" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/uploadCreateRequestSchema" - } - } - } - }, - "responses": { - "200": { - "description": "Successful response", + }, + "403": { + "description": "Error response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/uploadCreateResponseSchema" + "$ref": "#/components/schemas/openApiErrorSchema" } } } }, - "400": { + "404": { "description": "Error response", "content": { "application/json": { @@ -5092,6 +4040,14 @@ "tags": [ "Uploads" ], + "security": [ + { + "bearerAuth": [] + }, + { + "sessionCookie": [] + } + ], "parameters": [ { "in": "path", @@ -5104,6 +4060,7 @@ } ], "requestBody": { + "required": true, "content": { "application/json": { "schema": { @@ -5143,6 +4100,16 @@ } } }, + "403": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + }, "404": { "description": "Error response", "content": { @@ -5161,6 +4128,14 @@ "tags": [ "Uploads" ], + "security": [ + { + "bearerAuth": [] + }, + { + "sessionCookie": [] + } + ], "parameters": [ { "in": "path", @@ -5193,7 +4168,7 @@ } } }, - "404": { + "403": { "description": "Error response", "content": { "application/json": { @@ -5202,41 +4177,8 @@ } } } - } - } - } - }, - "/api/uploads/{id}/download": { - "get": { - "operationId": "downloadUpload", - "summary": "Download upload", - "tags": [ - "Uploads" - ], - "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": { + "404": { "description": "Error response", "content": { "application/json": { @@ -5246,7 +4188,7 @@ } } }, - "404": { + "502": { "description": "Error response", "content": { "application/json": { @@ -5266,7 +4208,16 @@ "tags": [ "Uploads" ], + "security": [ + { + "bearerAuth": [] + }, + { + "sessionCookie": [] + } + ], "requestBody": { + "required": true, "content": { "application/json": { "schema": { @@ -5295,6 +4246,26 @@ } } } + }, + "401": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + }, + "403": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } } } } @@ -5306,6 +4277,14 @@ "tags": [ "Uploads" ], + "security": [ + { + "bearerAuth": [] + }, + { + "sessionCookie": [] + } + ], "parameters": [ { "in": "query", @@ -5317,6 +4296,17 @@ "required": true } ], + "requestBody": { + "required": true, + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, "responses": { "200": { "description": "Successful response", @@ -5371,47 +4361,43 @@ } } }, - "/api/users/{userId}/calendar.ics": { + "/api/users/profile": { "get": { - "operationId": "getUserCalendar", - "summary": "Generate user calendar", + "operationId": "get-api-users-profile", + "summary": "Get public user profile", "tags": [ - "Calendar" + "Api" ], "parameters": [ { - "in": "path", + "in": "query", + "name": "username", + "schema": { + "type": "string", + "minLength": 1 + } + }, + { + "in": "query", "name": "userId", "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", + "description": "Successful response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/openApiErrorSchema" + "$ref": "#/components/schemas/publicUserProfileResponseSchema" } } } }, - "403": { + "400": { "description": "Error response", "content": { "application/json": { @@ -5433,1894 +4419,1533 @@ } } } - } - }, - "components": { - "schemas": { - "adminModerateCommentRequestSchema": { - "type": "object", - "properties": { - "status": { - "type": "string", - "enum": [ - "active", - "softbanned", - "deleted" - ] - }, - "moderationNote": { - "nullable": true, - "type": "string" + }, + "/.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" } - }, - "required": [ - "status" - ] + } }, - "adminCreateSuspensionRequestSchema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "minLength": 1 - }, - "reason": { - "type": "string" - }, - "note": { - "type": "string" - }, - "expiresAt": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "nullable": true, - "enum": [ - null - ] + "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" + } } - ] + } } - }, - "required": [ - "userId" - ] + } }, - "adminUpdateUserRequestSchema": { - "type": "object", - "properties": { - "name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "nullable": true, - "enum": [ - null - ] - } - ] - }, - "username": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "nullable": true, - "enum": [ - null - ] + "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" + } } - ] - }, - "isAdmin": { - "type": "boolean" + } + } + } + } + }, + "/.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" } } }, - "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" + "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" } - }, - "required": [ - "showDepartedTrips" - ] + } + } + }, + "/.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" + } + } }, - "calendarSubscriptionCreateRequestSchema": { - "type": "object", - "properties": { - "sectionIds": { - "type": "array", - "items": { - "type": "integer", - "exclusiveMinimum": true, - "maximum": 9007199254740991 + "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" + } + } } } } }, - "matchSectionCodesRequestSchema": { - "type": "object", - "properties": { - "codes": { - "minItems": 1, - "maxItems": 500, - "type": "array", - "items": { - "type": "string", - "minLength": 1, - "maxLength": 64, - "pattern": "^[A-Za-z0-9_.-]+$" - } - }, - "semesterId": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "number" + "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" + } } - ] + } } - }, - "required": [ - "codes" - ] - }, - "commentCreateRequestSchema": { - "type": "object", - "properties": { - "targetType": { - "type": "string", - "enum": [ - "section", - "course", - "teacher", - "section-teacher", - "homework" - ] - }, - "targetId": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "number" + } + } + }, + "/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" } - ] - }, - "sectionId": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "number" + } + } + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/adminModeratedCommentResponseSchema" + } } - ] + } }, - "teacherId": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "number" + "400": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } } - ] - }, - "body": { - "type": "string", - "minLength": 1, - "maxLength": 8000 - }, - "visibility": { - "type": "string", - "enum": [ - "public", - "logged_in_only", - "anonymous" - ] + } }, - "isAnonymous": { - "type": "boolean" + "401": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } }, - "parentId": { - "nullable": true, - "type": "string" + "403": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } }, - "attachmentIds": { - "type": "array", - "items": { - "type": "string" + "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" + } } } }, - "required": [ - "targetType", - "body" - ] - }, - "commentUpdateRequestSchema": { - "type": "object", - "properties": { - "body": { - "type": "string", - "minLength": 1, - "maxLength": 8000 + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/adminModeratedDescriptionResponseSchema" + } + } + } }, - "visibility": { - "type": "string", - "enum": [ - "public", - "logged_in_only", - "anonymous" - ] + "400": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } }, - "isAnonymous": { - "type": "boolean" + "401": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } }, - "attachmentIds": { - "type": "array", - "items": { - "type": "string" + "403": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + }, + "404": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } } } - }, - "required": [ - "body" - ] - }, - "commentReactionRequestSchema": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "upvote", - "downvote", - "heart", - "laugh", - "hooray", - "confused", - "rocket", - "eyes" - ] + } + } + }, + "/api/admin/homeworks/{id}": { + "delete": { + "operationId": "deleteAdminHomework", + "summary": "Delete one homework", + "tags": [ + "Admin" + ], + "security": [ + { + "sessionCookie": [] } - }, - "required": [ - "type" - ] - }, - "dashboardLinkPinRequestSchema": { - "type": "object", - "properties": { - "slug": { - "type": "string", - "minLength": 1 + ], + "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" + } + } + } }, - "returnTo": { - "type": "string" + "401": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } }, - "action": { - "type": "string", - "enum": [ - "pin", - "unpin" - ] + "403": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + }, + "404": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } } - }, - "required": [ - "slug" - ] - }, - "dashboardLinkVisitRequestSchema": { - "type": "object", - "properties": { - "slug": { - "type": "string", - "minLength": 1 + } + } + }, + "/api/admin/suspensions/{id}": { + "patch": { + "operationId": "updateAdminSuspension", + "summary": "Lift one suspension", + "tags": [ + "Admin" + ], + "security": [ + { + "sessionCookie": [] } - }, - "required": [ - "slug" - ] - }, - "descriptionUpsertRequestSchema": { - "type": "object", - "properties": { - "targetType": { - "type": "string", - "enum": [ - "section", - "course", - "teacher", - "homework" - ] + ], + "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" + } + } + } }, - "targetId": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "number" + "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": { - "type": "string", - "maxLength": 4000 + "application/json": { + "schema": { + "$ref": "#/components/schemas/adminUpdateUserRequestSchema" + } + } } }, - "required": [ - "targetType", - "targetId", - "content" - ] - }, - "homeworkCreateRequestSchema": { - "type": "object", - "properties": { - "sectionId": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "number" + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/adminUserResponseSchema" + } } - ] - }, - "title": { - "type": "string", - "minLength": 1, - "maxLength": 200 - }, - "description": { - "type": "string", - "maxLength": 4000 + } }, - "publishedAt": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "nullable": true, - "enum": [ - null - ] + "400": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } } - ] + } }, - "submissionStartAt": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "nullable": true, - "enum": [ - null - ] + "401": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } } - ] + } }, - "submissionDueAt": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "nullable": true, - "enum": [ - null - ] + "403": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } } - ] - }, - "isMajor": { - "type": "boolean" + } }, - "requiresTeam": { - "type": "boolean" + "404": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } } - }, - "required": [ - "sectionId", - "title" - ] + } + } + }, + "/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" + } + } }, - "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 - ] + "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" } - ] - }, - "submissionStartAt": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "nullable": true, - "enum": [ - null - ] + } + } + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/oauthDeviceAuthorizationResponseSchema" + } } - ] + } }, - "submissionDueAt": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "nullable": true, - "enum": [ - null - ] + "400": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/oauthErrorResponseSchema" + } } - ] - }, - "isMajor": { - "type": "boolean" - }, - "requiresTeam": { - "type": "boolean" + } } } }, - "homeworkCompletionRequestSchema": { - "type": "object", - "properties": { - "completed": { - "type": "boolean" + "options": { + "operationId": "options-api-auth-oauth2-device-authorization", + "summary": "Return OAuth device authorization CORS preflight headers", + "tags": [ + "Api" + ], + "responses": { + "204": { + "description": "Response 204" } - }, - "required": [ - "completed" - ] - }, - "homeworkCompletionBatchRequestSchema": { - "type": "object", - "properties": { - "items": { - "minItems": 1, - "maxItems": 100, - "type": "array", - "items": { - "type": "object", - "properties": { - "homeworkId": { - "type": "string", - "minLength": 1 - }, - "completed": { - "type": "boolean" + } + } + }, + "/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" } - }, - "required": [ - "homeworkId", - "completed" - ] + } } } - }, - "required": [ - "items" - ] + } }, - "localeUpdateRequestSchema": { - "type": "object", - "properties": { - "locale": { - "type": "string", - "enum": [ - "en-us", - "zh-cn" - ] + "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" + } + } } }, - "required": [ - "locale" - ] - }, - "todoCreateRequestSchema": { - "type": "object", - "properties": { - "title": { - "type": "string", - "minLength": 1, - "maxLength": 200 + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/oauthTokenResponseSchema" + } + } + } }, - "content": { - "nullable": true, - "type": "string", - "maxLength": 4000 + "400": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/oauthErrorResponseSchema" + } + } + } }, - "priority": { - "type": "string", - "enum": [ - "low", - "medium", - "high" - ] + "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": [] }, - "dueAt": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "nullable": true, - "enum": [ - null - ] + { + "sessionCookie": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "id", + "schema": { + "type": "string", + "minLength": 1 + }, + "required": true + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/commentReactionRequestSchema" } - ] + } } }, - "required": [ - "title" - ] - }, - "todoUpdateRequestSchema": { - "type": "object", - "properties": { - "title": { - "type": "string", - "minLength": 1, - "maxLength": 200 + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/successResponseSchema" + } + } + } }, - "content": { - "nullable": true, - "type": "string", - "maxLength": 4000 + "400": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } }, - "priority": { - "type": "string", - "enum": [ - "low", - "medium", - "high" - ] + "401": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } }, - "dueAt": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "nullable": true, - "enum": [ - null - ] + "403": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } } - ] + } }, - "completed": { - "type": "boolean" + "404": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } } } }, - "uploadCreateRequestSchema": { - "type": "object", - "properties": { - "filename": { - "type": "string", - "minLength": 1 - }, - "contentType": { - "type": "string" + "delete": { + "operationId": "removeCommentReaction", + "summary": "Remove one reaction from a comment", + "tags": [ + "Comments" + ], + "security": [ + { + "bearerAuth": [] }, - "size": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ] - } - }, - "required": [ - "filename", - "size" - ] - }, - "uploadRenameRequestSchema": { - "type": "object", - "properties": { - "filename": { - "type": "string", - "minLength": 1, - "maxLength": 255 + { + "sessionCookie": [] } - }, - "required": [ - "filename" - ] - }, - "uploadCompleteRequestSchema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "minLength": 1 - }, - "filename": { - "type": "string", - "minLength": 1 + ], + "parameters": [ + { + "in": "path", + "name": "id", + "schema": { + "type": "string", + "minLength": 1 + }, + "required": true }, - "contentType": { - "type": "string" + { + "in": "query", + "name": "type", + "schema": { + "type": "string", + "enum": [ + "upvote", + "downvote", + "heart", + "laugh", + "hooray", + "confused", + "rocket", + "eyes" + ] + }, + "required": true } - }, - "required": [ - "key", - "filename" - ] - }, - "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": { - "nullable": true, - "type": "string" - }, - "createdAt": { + ], + "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/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": "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": { + "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": "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, + "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": "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, + "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": "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" - }, - "user": { - "nullable": true, - "type": "object", - "properties": { - "name": { - "nullable": true, - "type": "string" - } - }, - "required": [ - "name" - ], - "additionalProperties": false - }, - "section": { - "nullable": true, - "type": "object", - "properties": { - "jwId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "code": { - "type": "string" - }, - "course": { - "type": "object", - "properties": { - "jwId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "code": { - "type": "string" - }, - "nameCn": { - "type": "string" - } - }, - "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": { - "type": "object", - "properties": { - "code": { - "type": "string" - } - }, - "required": [ - "code" - ], - "additionalProperties": false - } - }, - "required": [ - "id", - "title", - "section" - ], - "additionalProperties": false - }, - "sectionTeacher": { - "nullable": true, - "type": "object", - "properties": { - "section": { - "type": "object", - "properties": { - "jwId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "code": { - "type": "string" - }, - "course": { - "type": "object", - "properties": { - "jwId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "code": { - "type": "string" - }, - "nameCn": { - "type": "string" - } - }, - "required": [ - "jwId", - "code", - "nameCn" - ], - "additionalProperties": false - } - }, - "required": [ - "jwId", - "code", - "course" - ], - "additionalProperties": false - }, - "teacher": { - "type": "object", - "properties": { - "nameCn": { - "type": "string" - } - }, - "required": [ - "nameCn" - ], - "additionalProperties": false - } - }, - "required": [ - "section", - "teacher" - ], - "additionalProperties": false + "format": "uri" } - }, - "required": [ - "id", - "body", - "visibility", - "status", - "isAnonymous", - "authorName", - "createdAt", - "updatedAt", - "deletedAt", - "moderatedAt", - "moderationNote", - "userId", - "moderatedById", - "parentId", - "rootId", - "sectionId", - "courseId", - "teacherId", - "sectionTeacherId", - "homeworkId", - "user", - "section", - "course", - "teacher", - "homework", - "sectionTeacher" - ], - "additionalProperties": false + } } } - }, - "required": [ - "comments" + } + } + }, + "/api/me/subscriptions/homeworks": { + "get": { + "operationId": "getSubscribedHomeworks", + "summary": "List subscribed homeworks", + "tags": [ + "Me" ], - "additionalProperties": false - }, - "openApiErrorSchema": { - "type": "object", - "properties": { - "error": { - "type": "string" + "security": [ + { + "bearerAuth": [] + }, + { + "sessionCookie": [] } - }, - "required": [ - "error" ], - "additionalProperties": false - }, - "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": { - "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" + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/subscribedHomeworksResponseSchema" + } } - }, - "required": [ - "id", - "body", - "visibility", - "status", - "isAnonymous", - "authorName", - "createdAt", - "updatedAt", - "deletedAt", - "moderatedAt", - "moderationNote", - "userId", - "moderatedById", - "parentId", - "rootId", - "sectionId", - "courseId", - "teacherId", - "sectionTeacherId", - "homeworkId" - ], - "additionalProperties": false + } + }, + "401": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } } - }, - "required": [ - "comment" + } + } + }, + "/api/me/subscriptions/schedules": { + "get": { + "operationId": "get-api-me-subscriptions-schedules", + "summary": "List schedules across the current user's subscribed sections", + "tags": [ + "Me" ], - "additionalProperties": false - }, - "adminDescriptionsResponseSchema": { - "type": "object", - "properties": { - "descriptions": { - "type": "array", - "items": { - "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 - }, - "code": { - "type": "string" - }, - "nameCn": { - "type": "string" - } - }, - "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 - }, - "code": { - "nullable": true, - "type": "string" - }, - "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 - } - }, - "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 + "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" + ] } } - }, - "required": [ - "descriptions" ], - "additionalProperties": false - }, - "adminHomeworksResponseSchema": { - "type": "object", - "properties": { - "homeworks": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "title": { - "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)))$" - }, - "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)))$" - }, - "section": { - "nullable": true, - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "jwId": { - "nullable": true, - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "code": { - "nullable": true, - "type": "string" - }, - "course": { - "type": "object", - "properties": { - "jwId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "code": { - "type": "string" - }, - "nameCn": { - "type": "string" - } - }, - "required": [ - "jwId", - "code", - "nameCn" - ], - "additionalProperties": false - } - }, - "required": [ - "id", - "jwId", - "code", - "course" - ], - "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 + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/subscribedSchedulesResponseSchema" } - }, - "required": [ - "id", - "title", - "submissionDueAt", - "createdAt", - "updatedAt", - "deletedAt", - "section", - "createdBy", - "updatedBy", - "deletedBy" - ], - "additionalProperties": false + } + } + }, + "400": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + }, + "401": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } } } - }, - "required": [ - "homeworks" + } + } + }, + "/api/sections/{jwId}/calendar.ics": { + "get": { + "operationId": "getSectionCalendar", + "summary": "Generate section calendar", + "tags": [ + "Sections" ], - "additionalProperties": false - }, - "successResponseSchema": { - "type": "object", - "properties": { - "success": { - "type": "boolean" + "parameters": [ + { + "in": "path", + "name": "jwId", + "schema": { + "type": "integer", + "format": "int64" + }, + "required": true } - }, - "required": [ - "success" ], - "additionalProperties": false - }, - "adminSuspensionsResponseSchema": { - "type": "object", - "properties": { - "suspensions": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "userId": { - "type": "string" - }, - "createdById": { + "responses": { + "200": { + "description": "Calendar response", + "content": { + "text/calendar": { + "schema": { "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": { - "nullable": true, - "type": "string" - }, - "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)))$" - }, - "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)))$" - }, - "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", - "userId", - "createdById", - "createdAt", - "reason", - "note", - "expiresAt", - "liftedAt", - "liftedById" - ], - "additionalProperties": false + } + } + }, + "404": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } } } - }, - "required": [ - "suspensions" + } + } + }, + "/api/sections/{jwId}/schedule-groups": { + "get": { + "operationId": "getSectionScheduleGroups", + "summary": "Get schedule groups", + "tags": [ + "Sections" ], - "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": { - "nullable": true, - "type": "string" - }, - "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)))$" - }, - "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)))$" - }, - "liftedById": { - "nullable": true, - "type": "string" - }, - "user": { - "nullable": true, - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "nullable": true, - "type": "string" - } - }, - "required": [ - "id", - "name" - ], - "additionalProperties": false - } + "parameters": [ + { + "in": "path", + "name": "jwId", + "schema": { + "type": "integer", + "format": "int64" }, - "required": [ - "id", - "userId", - "createdById", - "createdAt", - "reason", - "note", - "expiresAt", - "liftedAt", - "liftedById" - ], - "additionalProperties": false + "required": true } - }, - "required": [ - "suspension" ], - "additionalProperties": false - }, - "adminUsersResponseSchema": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "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" + "responses": { + "200": { + "description": "Array response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object" + } } - }, - "required": [ - "id", - "name", - "username", - "isAdmin", - "createdAt", - "email" - ], - "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 + "404": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } } - }, - "required": [ - "page", - "pageSize", - "total", - "totalPages" - ], - "additionalProperties": false + } } - }, - "required": [ - "data", - "pagination" + } + } + }, + "/api/sections/{jwId}/schedules": { + "get": { + "operationId": "getSectionSchedules", + "summary": "Get section schedules", + "tags": [ + "Sections" ], - "additionalProperties": false - }, - "adminUserResponseSchema": { + "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": { - "user": { + "id": { + "type": "string" + }, + "body": { + "type": "string" + }, + "visibility": { + "type": "string" + }, + "status": { + "type": "string" + }, + "author": { + "nullable": true, "type": "object", "properties": { "id": { @@ -7330,488 +5955,401 @@ "nullable": true, "type": "string" }, - "username": { + "image": { "nullable": true, "type": "string" }, - "isAdmin": { + "isUstcVerified": { "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)))$" + "isAdmin": { + "type": "boolean" }, - "email": { - "nullable": true, - "type": "string" + "isGuest": { + "type": "boolean" } }, "required": [ - "id", "name", - "username", + "isUstcVerified", "isAdmin", - "createdAt", - "email" - ], - "additionalProperties": false - } - }, - "required": [ - "user" - ], - "additionalProperties": false - }, - "busQueryResponseSchema": { - "type": "object", - "properties": { - "locale": { - "type": "string", - "enum": [ - "zh-cn", - "en-us" + "isGuest" ] }, - "fetchedAt": { + "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)))$" }, - "version": { + "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": "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 + "type": "string" }, - "availableVersions": { + "rootId": { + "nullable": true, + "type": "string" + }, + "replies": { "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 + "$ref": "#/components/schemas/__schema0" } }, - "campuses": { + "attachments": { "type": "array", "items": { "type": "object", "properties": { "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "nameCn": { "type": "string" }, - "nameEn": { - "nullable": true, + "uploadId": { "type": "string" }, - "latitude": { - "type": "number" - }, - "longitude": { - "type": "number" + "filename": { + "type": "string" }, - "namePrimary": { + "url": { "type": "string" }, - "nameSecondary": { + "contentType": { "nullable": true, "type": "string" + }, + "size": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 } }, "required": [ "id", - "nameCn", - "nameEn", - "latitude", - "longitude", - "namePrimary", - "nameSecondary" - ], - "additionalProperties": false + "uploadId", + "filename", + "url", + "contentType", + "size" + ] } }, - "routes": { + "reactions": { "type": "array", "items": { "type": "object", "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "nameCn": { - "type": "string" - }, - "nameEn": { - "nullable": true, - "type": "string" - }, - "descriptionPrimary": { + "type": { "type": "string" }, - "descriptionSecondary": { - "nullable": true, - "type": "string" + "count": { + "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": { - "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 - } + "viewerHasReacted": { + "type": "boolean" } }, "required": [ - "id", - "nameCn", - "nameEn", - "descriptionPrimary", - "descriptionSecondary", - "stops" - ], - "additionalProperties": false + "type", + "count", + "viewerHasReacted" + ] } }, - "trips": { + "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": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "type": "string" }, - "routeId": { + "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" }, - "dayType": { - "type": "string", - "enum": [ - "weekday", - "weekend" - ] - }, - "position": { + "count": { "type": "integer", - "minimum": -9007199254740991, + "minimum": 0, "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 + "viewerHasReacted": { + "type": "boolean" } }, "required": [ - "id", - "routeId", - "dayType", - "position", - "stopTimes", - "departureTime", - "departureMinutes", - "arrivalTime", - "arrivalMinutes" + "type", + "count", + "viewerHasReacted" ], "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 + "canReact": { + "type": "boolean" }, - "notice": { - "nullable": true, - "type": "object", - "properties": { - "message": { - "nullable": true, - "type": "string" - }, - "url": { - "nullable": true, - "type": "string" - } - }, - "required": [ - "message", - "url" - ], - "additionalProperties": false + "canReply": { + "type": "boolean" + }, + "canEdit": { + "type": "boolean" + }, + "canDelete": { + "type": "boolean" + }, + "canModerate": { + "type": "boolean" } }, "required": [ - "locale", - "fetchedAt", - "version", - "availableVersions", - "campuses", - "routes", - "trips", - "preferences", - "notice" + "id", + "body", + "visibility", + "status", + "author", + "authorHidden", + "isAnonymous", + "isAuthor", + "createdAt", + "updatedAt", + "parentId", + "rootId", + "replies", + "attachments", + "reactions", + "canReact", + "canReply", + "canEdit", + "canDelete", + "canModerate" ], "additionalProperties": false }, - "busNextDeparturesResponseSchema": { + "busQueryResponseSchema": { "type": "object", "properties": { - "originCampus": { + "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": { @@ -7820,477 +6358,369 @@ "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "nameCn": { + "key": { "type": "string" }, - "nameEn": { - "nullable": true, + "title": { "type": "string" }, - "latitude": { - "type": "number" + "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)))$" }, - "longitude": { - "type": "number" + "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)))$" }, - "namePrimary": { - "type": "string" + "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)))$" }, - "nameSecondary": { + "notice": { "nullable": true, - "type": "string" + "type": "object", + "properties": { + "message": { + "nullable": true, + "type": "string" + }, + "url": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "message", + "url" + ], + "additionalProperties": false } }, "required": [ "id", - "nameCn", - "nameEn", - "latitude", - "longitude", - "namePrimary", - "nameSecondary" + "key", + "title", + "effectiveFrom", + "effectiveUntil", + "importedAt", + "notice" ], "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 - }, - "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)))$" - }, - "dayType": { - "type": "string", - "enum": [ - "weekday", - "weekend" - ] - }, - "totalRoutes": { - "type": "integer", - "minimum": 0, - "maximum": 9007199254740991 - }, - "departures": { + "availableVersions": { "type": "array", "items": { "type": "object", "properties": { - "tripId": { + "id": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "routeId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "key": { + "type": "string" }, - "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 + "title": { + "type": "string" }, - "originCampus": { + "effectiveFrom": { "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 + "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)))$" }, - "destinationCampus": { + "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": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "nameCn": { - "type": "string" - }, - "nameEn": { + "message": { "nullable": true, "type": "string" }, - "latitude": { - "type": "number" - }, - "longitude": { - "type": "number" - }, - "namePrimary": { - "type": "string" - }, - "nameSecondary": { + "url": { "nullable": true, "type": "string" } }, "required": [ - "id", - "nameCn", - "nameEn", - "latitude", - "longitude", - "namePrimary", - "nameSecondary" + "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 }, - "departureTime": { - "nullable": true, + "nameCn": { "type": "string" }, - "arrivalTime": { + "nameEn": { "nullable": true, "type": "string" }, - "departureEstimated": { - "type": "boolean" - }, - "arrivalEstimated": { - "type": "boolean" + "latitude": { + "type": "number" }, - "minutesUntilDeparture": { - "nullable": true, - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "longitude": { + "type": "number" }, - "dayType": { - "type": "string", - "enum": [ - "weekday", - "weekend" - ] + "namePrimary": { + "type": "string" }, - "status": { - "type": "string", - "enum": [ - "upcoming", - "departed" - ] + "nameSecondary": { + "nullable": true, + "type": "string" } }, "required": [ - "tripId", - "routeId", - "route", - "originCampus", - "destinationCampus", - "departureTime", - "arrivalTime", - "departureEstimated", - "arrivalEstimated", - "minutesUntilDeparture", - "dayType", - "status" + "id", + "nameCn", + "nameEn", + "latitude", + "longitude", + "namePrimary", + "nameSecondary" ], "additionalProperties": false } }, - "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" - } + "routes": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "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" - } + "nameCn": { + "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" - } + "nameEn": { + "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" - ] + "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 + } + } }, - "status": { - "type": "string", - "enum": [ - "upcoming", - "departed" - ] - } - }, - "required": [ - "tripId", - "routeId", - "route", - "originCampus", - "destinationCampus", - "departureTime", - "arrivalTime", - "departureEstimated", - "arrivalEstimated", - "minutesUntilDeparture", - "dayType", - "status" - ], - "additionalProperties": false + "required": [ + "id", + "nameCn", + "nameEn", + "descriptionPrimary", + "descriptionSecondary", + "stops" + ], + "additionalProperties": false + } }, - "message": { - "nullable": true, - "type": "string" - } - }, - "required": [ - "originCampus", - "destinationCampus", - "atTime", - "dayType", - "totalRoutes", - "departures", - "nextAvailableDeparture", - "message" - ], - "additionalProperties": false - }, - "busPreferenceResponseSchema": { - "type": "object", - "properties": { - "preference": { + "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": { @@ -8315,316 +6745,74 @@ "showDepartedTrips" ], "additionalProperties": false - } - }, - "required": [ - "preference" - ], - "additionalProperties": false - }, - "busRouteSearchResponseSchema": { - "type": "object", - "properties": { - "originCampus": { + }, + "notice": { "nullable": true, "type": "object", "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "nameCn": { - "type": "string" - }, - "nameEn": { + "message": { "nullable": true, "type": "string" }, - "latitude": { - "type": "number" - }, - "longitude": { - "type": "number" - }, - "namePrimary": { - "type": "string" - }, - "nameSecondary": { + "url": { "nullable": true, "type": "string" } }, "required": [ - "id", - "nameCn", - "nameEn", - "latitude", - "longitude", - "namePrimary", - "nameSecondary" + "message", + "url" ], "additionalProperties": false - }, - "destinationCampus": { + } + }, + "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": { - "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 - }, - "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 - }, - "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 - }, - "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": { - "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", - "originCampus", - "destinationCampus", - "stopCount", - "weekdayTrips", - "weekendTrips", - "stops" - ], - "additionalProperties": false - } - } - }, - "required": [ - "originCampus", - "destinationCampus", - "total", - "routes" - ], - "additionalProperties": false - }, - "calendarSubscriptionCreateResponseSchema": { - "type": "object", - "properties": { - "subscription": { - "nullable": true, - "type": "object", - "properties": { - "userId": { + "userId": { "type": "string" }, "sections": { @@ -8997,6 +7185,13 @@ "nameEn" ], "additionalProperties": false + }, + "namePrimary": { + "type": "string" + }, + "nameSecondary": { + "nullable": true, + "type": "string" } }, "required": [ @@ -9016,11 +7211,21 @@ "classify", "educationLevel", "gradation", - "type" + "type", + "namePrimary", + "nameSecondary" ], "additionalProperties": false }, "semester": { + "nullable": true, + "allOf": [ + { + "$ref": "#/components/schemas/semesterSchema" + } + ] + }, + "campus": { "nullable": true, "type": "object", "properties": { @@ -9030,6 +7235,7 @@ "maximum": 9007199254740991 }, "jwId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 @@ -9037,33 +7243,34 @@ "nameCn": { "type": "string" }, - "code": { + "nameEn": { + "nullable": true, "type": "string" }, - "startDate": { + "code": { "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)))$" + "type": "string" + }, + "namePrimary": { + "type": "string" }, - "endDate": { + "nameSecondary": { "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)))$" + "type": "string" } }, "required": [ "id", "jwId", "nameCn", + "nameEn", "code", - "startDate", - "endDate" + "namePrimary", + "nameSecondary" ], "additionalProperties": false }, - "campus": { + "openDepartment": { "nullable": true, "type": "object", "properties": { @@ -9072,11 +7279,8 @@ "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "jwId": { - "nullable": true, - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "code": { + "type": "string" }, "nameCn": { "type": "string" @@ -9085,42 +7289,16 @@ "nullable": true, "type": "string" }, - "code": { + "isCollege": { "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": "boolean" + }, + "namePrimary": { "type": "string" }, - "nameEn": { + "nameSecondary": { "nullable": true, "type": "string" - }, - "isCollege": { - "nullable": true, - "type": "boolean" } }, "required": [ @@ -9128,7 +7306,9 @@ "code", "nameCn", "nameEn", - "isCollege" + "isCollege", + "namePrimary", + "nameSecondary" ], "additionalProperties": false }, @@ -9210,6 +7390,13 @@ "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 + }, + "namePrimary": { + "type": "string" + }, + "nameSecondary": { + "nullable": true, + "type": "string" } }, "required": [ @@ -9228,7 +7415,9 @@ "qq", "wechat", "departmentId", - "teacherTitleId" + "teacherTitleId", + "namePrimary", + "nameSecondary" ], "additionalProperties": false } @@ -9303,36 +7492,202 @@ ], "additionalProperties": false }, - "currentCalendarSubscriptionResponseSchema": { - "anyOf": [ - { - "type": "object", - "properties": { - "subscription": { - "type": "string", - "nullable": true, - "enum": [ - null - ] - } - }, - "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": { - "subscription": { - "type": "object", - "properties": { - "userId": { - "type": "string" - }, - "sections": { - "type": "array", - "items": { + "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": { @@ -9348,157 +7703,51 @@ "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, + "nameCn": { "type": "string" }, - "scheduleJsonParams": { - "nullable": true - }, - "selectedStdCount": { - "nullable": true, - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "remark": { + "nameEn": { "nullable": true, "type": "string" }, - "scheduleRemark": { + "categoryId": { "nullable": true, - "type": "string" - }, - "courseId": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "semesterId": { + "classTypeId": { "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "campusId": { + "classifyId": { "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "examModeId": { + "educationLevelId": { "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "openDepartmentId": { + "gradationId": { "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "teachLanguageId": { + "typeId": { "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "roomTypeId": { + "category": { "nullable": true, - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "course": { "type": "object", "properties": { "id": { @@ -9506,784 +7755,226 @@ "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, + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "classType": { + "nullable": true, + "type": "object", + "properties": { + "id": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "classTypeId": { - "nullable": true, - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "nameCn": { + "type": "string" }, - "classifyId": { + "nameEn": { "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "classify": { + "nullable": true, + "type": "object", + "properties": { + "id": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "educationLevelId": { + "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 }, - "gradationId": { + "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 }, - "typeId": { + "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 }, - "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 + "nameCn": { + "type": "string" }, - "classType": { + "nameEn": { "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 - }, - "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" - }, - "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" + "nameEn" ], "additionalProperties": false }, - "campus": { + "namePrimary": { + "type": "string" + }, + "nameSecondary": { "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 + "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 }, - "openDepartment": { + "jwId": { "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 + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "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 - } - }, - "required": [ - "id", - "personId", - "teacherId", - "code", - "nameCn", - "nameEn", - "age", - "email", - "telephone", - "mobile", - "address", - "postcode", - "qq", - "wechat", - "departmentId", - "teacherTitleId" - ], - "additionalProperties": false - } + "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", - "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" + "namePrimary", + "nameSecondary" ], "additionalProperties": false - } - }, - "calendarPath": { - "type": "string" - }, - "calendarUrl": { - "type": "string" - }, - "note": { - "type": "string" - } - }, - "required": [ - "userId", - "sections", - "calendarPath", - "calendarUrl", - "note" - ], - "additionalProperties": false - } - }, - "required": [ - "subscription" - ], - "additionalProperties": false - } - ] - }, - "calendarSubscriptionImportResponseSchema": { - "type": "object", - "properties": { - "success": { - "type": "boolean" - }, - "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" - } - }, - "unmatchedCodes": { - "type": "array", - "items": { - "type": "string" - } - }, - "ambiguousCodes": { - "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 - }, - "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": { + "openDepartment": { "nullable": true, "type": "object", "properties": { @@ -10292,29 +7983,8 @@ "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "nameCn": { - "type": "string" - }, - "nameEn": { - "nullable": true, + "code": { "type": "string" - } - }, - "required": [ - "id", - "nameCn", - "nameEn" - ], - "additionalProperties": false - }, - "classType": { - "nullable": true, - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 }, "nameCn": { "type": "string" @@ -10322,135 +7992,252 @@ "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": { + "isCollege": { "nullable": true, - "type": "string" - } - }, - "required": [ - "id", - "nameCn", - "nameEn" - ], - "additionalProperties": false - }, - "educationLevel": { - "nullable": true, - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "type": "boolean" }, - "nameCn": { + "namePrimary": { "type": "string" }, - "nameEn": { + "nameSecondary": { "nullable": true, "type": "string" } }, "required": [ "id", + "code", "nameCn", - "nameEn" + "nameEn", + "isCollege", + "namePrimary", + "nameSecondary" ], "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" + "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" + } }, - "nameEn": { - "nullable": true, - "type": "string" - } - }, - "required": [ - "id", - "nameCn", - "nameEn" - ], - "additionalProperties": false + "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", - "nameCn", - "nameEn", - "categoryId", - "classTypeId", - "classifyId", - "educationLevelId", - "gradationId", - "typeId", - "category", - "classType", - "classify", - "educationLevel", - "gradation", - "type" + "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 - }, - "semester": { - "nullable": true, + } + }, + "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": { @@ -10463,484 +8250,160 @@ "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "nameCn": { - "type": "string" - }, "code": { "type": "string" }, - "startDate": { + "bizTypeId": { "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)))$" + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "endDate": { + "credits": { + "nullable": true, + "type": "number" + }, + "period": { "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" - ], - "additionalProperties": false - }, - "campus": { - "nullable": true, - "type": "object", - "properties": { - "id": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "jwId": { + "periodsPerWeek": { "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "nameCn": { + "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": { + "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" }, - "code": { + "suggestScheduleWeeks": { + "nullable": true + }, + "suggestScheduleWeekInfo": { "nullable": true, "type": "string" - } - }, - "required": [ - "id", - "jwId", - "nameCn", - "nameEn", - "code" - ], - "additionalProperties": false - }, - "openDepartment": { - "nullable": true, - "type": "object", - "properties": { - "id": { + }, + "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": { + "courseId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "semesterId": { "nullable": true, - "type": "string" + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "isCollege": { + "campusId": { "nullable": true, - "type": "boolean" - } - }, - "required": [ - "id", - "code", - "nameCn", - "nameEn", - "isCollege" - ], - "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 - } + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "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", - "course", - "semester", - "campus", - "openDepartment", - "teachers" - ], - "additionalProperties": false - } - }, - "addedCount": { - "type": "integer", - "minimum": 0, - "maximum": 9007199254740991 - }, - "addedSections": { - "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": { + "examModeId": { "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "classifyId": { + "openDepartmentId": { "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "educationLevelId": { + "teachLanguageId": { "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "gradationId": { + "roomTypeId": { "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "typeId": { - "nullable": true, - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "category": { - "nullable": true, + "course": { "type": "object", "properties": { "id": { @@ -10948,22 +8411,241 @@ "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" + "nameEn", + "categoryId", + "classTypeId", + "classifyId", + "educationLevelId", + "gradationId", + "typeId", + "category", + "classType", + "classify", + "educationLevel", + "gradation", + "type", + "namePrimary", + "nameSecondary" ], "additionalProperties": false }, - "classType": { + "semester": { + "nullable": true, + "allOf": [ + { + "$ref": "#/components/schemas/semesterSchema" + } + ] + }, + "campus": { "nullable": true, "type": "object", "properties": { @@ -10972,22 +8654,43 @@ "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" + "nameEn", + "code", + "namePrimary", + "nameSecondary" ], "additionalProperties": false }, - "classify": { + "openDepartment": { "nullable": true, "type": "object", "properties": { @@ -10996,2556 +8699,580 @@ "minimum": -9007199254740991, "maximum": 9007199254740991 }, + "code": { + "type": "string" + }, "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": { + "isCollege": { "nullable": true, - "type": "string" - } - }, - "required": [ - "id", - "nameCn", - "nameEn" - ], - "additionalProperties": false - }, - "gradation": { - "nullable": true, - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "type": "boolean" }, - "nameCn": { + "namePrimary": { "type": "string" }, - "nameEn": { + "nameSecondary": { "nullable": true, "type": "string" } }, "required": [ "id", + "code", "nameCn", - "nameEn" + "nameEn", + "isCollege", + "namePrimary", + "nameSecondary" ], "additionalProperties": false }, - "type": { - "nullable": true, - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "nameCn": { - "type": "string" + "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" + } }, - "nameEn": { - "nullable": true, - "type": "string" - } - }, - "required": [ - "id", - "nameCn", - "nameEn" - ], - "additionalProperties": false + "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", - "nameCn", - "nameEn", - "categoryId", - "classTypeId", - "classifyId", - "educationLevelId", - "gradationId", - "typeId", - "category", - "classType", - "classify", - "educationLevel", - "gradation", - "type" + "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 - }, - "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" - }, - "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" - ], - "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 - }, - "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 - }, - "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 - } - }, - "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", - "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" } }, - "alreadySubscribedCount": { + "hiddenCount": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, - "alreadySubscribedSections": { - "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 - } - }, - "required": [ - "id", - "jwId", - "code", - "nameCn", - "nameEn", - "categoryId", - "classTypeId", - "classifyId", - "educationLevelId", - "gradationId", - "typeId", - "category", - "classType", - "classify", - "educationLevel", - "gradation", - "type" - ], - "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" - }, - "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" - ], - "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 - }, - "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 - }, - "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 - } - }, - "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", - "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 - }, - "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 - } - }, - "required": [ - "id", - "jwId", - "code", - "nameCn", - "nameEn", - "categoryId", - "classTypeId", - "classifyId", - "educationLevelId", - "gradationId", - "typeId", - "category", - "classType", - "classify", - "educationLevel", - "gradation", - "type" - ], - "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" - }, - "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" - ], - "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 - }, - "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 - }, - "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 - } - }, - "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", - "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": [ - "success", - "semester", - "matchedCodes", - "unmatchedCodes", - "ambiguousCodes", - "sections", - "addedCount", - "addedSections", - "alreadySubscribedCount", - "alreadySubscribedSections", - "subscription" - ], - "additionalProperties": false - }, - "commentsListResponseSchema": { - "type": "object", - "properties": { - "comments": { - "type": "array", - "items": { - "$ref": "#/components/schemas/__schema0" - } - }, - "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 - ] - } - ] - }, - "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" - } - }, - "required": [ - "type", - "targetId", - "sectionId", - "teacherId", - "sectionTeacherId", - "homeworkId" - ], - "additionalProperties": false - } - }, - "required": [ - "comments", - "hiddenCount", - "viewer", - "target" - ], - "additionalProperties": false - }, - "idResponseSchema": { - "type": "object", - "properties": { - "id": { - "type": "string" - } - }, - "required": [ - "id" - ], - "additionalProperties": false - }, - "commentThreadResponseSchema": { - "type": "object", - "properties": { - "thread": { - "type": "array", - "items": { - "$ref": "#/components/schemas/__schema0" - } - }, - "focusId": { - "type": "string" - }, - "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": { - "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" - }, - "homeworkId": { - "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": [ - "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" - }, - "comment": { - "$ref": "#/components/schemas/__schema0" - } - }, - "required": [ - "success", - "comment" - ], - "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 - } + "viewer": { + "type": "object", + "properties": { + "userId": { + "nullable": true, + "type": "string" }, - "required": [ - "id", - "jwId", - "code", - "nameCn", - "nameEn", - "categoryId", - "classTypeId", - "classifyId", - "educationLevelId", - "gradationId", - "typeId", - "category", - "classType", - "classify", - "educationLevel", - "gradation", - "type" - ], - "additionalProperties": false - } + "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 }, - "pagination": { + "target": { "type": "object", "properties": { - "page": { + "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 }, - "pageSize": { + "sectionId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "total": { + "teacherId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "totalPages": { + "sectionTeacherId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 - } - }, - "required": [ - "page", - "pageSize", - "total", - "totalPages" - ], - "additionalProperties": false - } - }, - "required": [ - "data", - "pagination" - ], - "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": { + }, + "homeworkId": { + "nullable": true, + "type": "string" + }, + "sectionTeacherSectionId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "nameCn": { + "sectionTeacherTeacherId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "sectionTeacherSectionJwId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "sectionTeacherSectionCode": { + "nullable": true, "type": "string" }, - "nameEn": { + "sectionTeacherTeacherName": { "nullable": true, "type": "string" - } - }, - "required": [ - "id", - "nameCn", - "nameEn" - ], - "additionalProperties": false - }, - "classType": { - "nullable": true, - "type": "object", - "properties": { - "id": { + }, + "sectionTeacherCourseJwId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "nameCn": { + "sectionTeacherCourseName": { + "nullable": true, "type": "string" }, - "nameEn": { + "homeworkTitle": { "nullable": true, "type": "string" - } - }, - "required": [ - "id", - "nameCn", - "nameEn" - ], - "additionalProperties": false - }, - "classify": { - "nullable": true, - "type": "object", - "properties": { - "id": { + }, + "homeworkSectionJwId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "nameCn": { + "homeworkSectionCode": { + "nullable": true, "type": "string" }, - "nameEn": { + "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": [ - "id", - "nameCn", - "nameEn" - ], - "additionalProperties": false + }, + "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" + } + ] }, - "educationLevel": { - "nullable": true, - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "nameCn": { + "sectionId": { + "anyOf": [ + { "type": "string" }, - "nameEn": { - "nullable": true, - "type": "string" + { + "type": "number" } - }, - "required": [ - "id", - "nameCn", - "nameEn" - ], - "additionalProperties": false + ] }, - "gradation": { - "nullable": true, - "type": "object", - "properties": { - "id": { + "sectionJwId": { + "anyOf": [ + { "type": "integer", - "minimum": -9007199254740991, + "format": "int64", + "minimum": 1 + }, + { + "type": "integer", + "minimum": 1, "maximum": 9007199254740991 + } + ] + }, + "courseJwId": { + "anyOf": [ + { + "type": "integer", + "format": "int64", + "minimum": 1 }, - "nameCn": { + { + "type": "integer", + "minimum": 1, + "maximum": 9007199254740991 + } + ] + }, + "teacherId": { + "anyOf": [ + { "type": "string" }, - "nameEn": { - "nullable": true, - "type": "string" + { + "type": "number" } - }, - "required": [ - "id", - "nameCn", - "nameEn" - ], - "additionalProperties": false + ] }, - "type": { - "nullable": true, - "type": "object", - "properties": { - "id": { + "homeworkId": { + "type": "string", + "minLength": 1 + }, + "sectionTeacherId": { + "anyOf": [ + { "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "nameCn": { - "type": "string" + "format": "int64", + "minimum": 1 }, - "nameEn": { - "nullable": true, - "type": "string" + { + "type": "integer", + "minimum": 1, + "maximum": 9007199254740991 } - }, - "required": [ - "id", - "nameCn", - "nameEn" - ], - "additionalProperties": false + ] }, - "sections": { + "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", @@ -13563,157 +9290,50 @@ "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, + "nameCn": { "type": "string" }, - "scheduleRemark": { + "nameEn": { "nullable": true, "type": "string" }, - "courseId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "semesterId": { + "categoryId": { "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "campusId": { + "classTypeId": { "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "examModeId": { + "classifyId": { "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "openDepartmentId": { + "educationLevelId": { "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "teachLanguageId": { + "gradationId": { "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "roomTypeId": { + "typeId": { "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "semester": { + "category": { "nullable": true, "type": "object", "properties": { @@ -13722,7 +9342,26 @@ "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "jwId": { + "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 @@ -13730,33 +9369,19 @@ "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": { + "nameEn": { "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)))$" + "type": "string" } }, "required": [ "id", - "jwId", "nameCn", - "code", - "startDate", - "endDate" + "nameEn" ], "additionalProperties": false }, - "campus": { + "classify": { "nullable": true, "type": "object", "properties": { @@ -13765,8 +9390,26 @@ "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "jwId": { + "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 @@ -13777,211 +9420,122 @@ "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" }, - "code": { + "nameEn": { "nullable": true, "type": "string" } }, "required": [ "id", - "jwId", "nameCn", - "nameEn", - "code" + "nameEn" ], "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 - } + "type": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "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" + "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 } - } - }, - "required": [ - "id", - "jwId", - "code", - "nameCn", - "nameEn", - "categoryId", - "classTypeId", - "classifyId", - "educationLevelId", - "gradationId", - "typeId", - "category", - "classType", - "classify", - "educationLevel", - "gradation", - "type", - "sections" - ], - "additionalProperties": false - }, - "dashboardLinkPinResponseSchema": { - "type": "object", - "properties": { - "pinnedSlugs": { - "type": "array", - "items": { - "type": "string" - } - }, - "maxPinnedLinks": { - "type": "integer", - "exclusiveMinimum": true, - "maximum": 9007199254740991 }, - "error": { - "nullable": true, - "type": "string" + "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": [ - "pinnedSlugs", - "maxPinnedLinks", - "error" + "data", + "pagination" ], "additionalProperties": false }, @@ -14161,6 +9715,136 @@ ], "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": { @@ -14547,46 +10231,11 @@ }, "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" - }, - "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)))$" + "allOf": [ + { + "$ref": "#/components/schemas/semesterSchema" } - }, - "required": [ - "id", - "jwId", - "nameCn", - "code", - "startDate", - "endDate" - ], - "additionalProperties": false + ] } }, "required": [ @@ -14801,117 +10450,297 @@ "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", + "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" }, - "required": [ - "id", - "name", - "username", - "image" - ], - "additionalProperties": false - } + { + "type": "number" + } + ] }, - "required": [ - "id", - "action", - "titleSnapshot", - "createdAt", - "sectionId", - "homeworkId", - "actorId", - "actor" - ], - "additionalProperties": false - } + "sectionJwId": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "title", + "sectionJwId" + ], + "additionalProperties": false } - }, - "required": [ - "viewer", - "homeworks", - "auditLogs" - ], - "additionalProperties": false + ] }, "homeworkCreateResponseSchema": { "type": "object", @@ -15235,533 +11064,1809 @@ ], "additionalProperties": false }, - "semester": { + "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": "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" - ], - "additionalProperties": false + "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": [ - "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": [ + "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" + } }, - "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", + "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 }, - "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" - } + "nameCn": { + "type": "string" }, - "required": [ - "id", - "name", - "username", - "image" - ], - "additionalProperties": false + "nameEn": { + "nullable": true, + "type": "string" + } }, - "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", + "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" }, - "required": [ - "id", - "name", - "username", - "image" - ], - "additionalProperties": false + "description": { + "type": "string" + } }, - "deletedBy": { - "nullable": true, + "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": { - "id": { - "type": "string" - }, - "name": { - "nullable": true, - "type": "string" - }, - "username": { - "nullable": true, - "type": "string" - }, - "image": { - "nullable": true, - "type": "string" + "status": { + "type": "string", + "enum": [ + "ok", + "error" + ] + }, + "durationMs": { + "type": "number", + "minimum": 0 } }, "required": [ - "id", - "name", - "username", - "image" + "status", + "durationMs" ], "additionalProperties": false }, - "completion": { - "nullable": true, + "storage": { "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)))$" + "status": { + "type": "string" + }, + "binding": { + "type": "string" + }, + "reason": { + "type": "string" } }, "required": [ - "completedAt" + "status", + "binding" ], "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" + "database", + "storage" ], "additionalProperties": false } }, "required": [ - "id", - "homework" + "status", + "uptimeSeconds", + "checks" ], "additionalProperties": false }, - "homeworkUpdateResponseSchema": { + "paginatedScheduleResponseSchema": { "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 + "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 + } }, - "campusId": { - "nullable": true, - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "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" + } + ] + } }, - "examModeId": { - "nullable": true, - "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 + }, + "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 + } }, - "openDepartmentId": { - "nullable": true, - "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" + } }, - "teachLanguageId": { - "nullable": true, - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "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" + } }, - "roomTypeId": { - "nullable": true, - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "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" + } }, - "course": { + "required": [ + "id", + "jwId", + "nameCn", + "nameEn", + "code" + ], + "additionalProperties": false + }, + "teachers": { + "type": "array", + "items": { "type": "object", "properties": { "id": { @@ -15769,660 +12874,1827 @@ "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": { + "personId": { "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "gradationId": { + "teacherId": { "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "typeId": { + "code": { "nullable": true, - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "type": "string" }, - "namePrimary": { + "nameCn": { "type": "string" }, - "nameSecondary": { + "nameEn": { "nullable": true, "type": "string" } }, - "required": [ - "id", - "jwId", - "code", - "nameCn", - "nameEn", - "categoryId", - "classTypeId", - "classifyId", - "educationLevelId", - "gradationId", - "typeId", - "namePrimary", - "nameSecondary" - ], - "additionalProperties": false + "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" + } }, - "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" - }, - "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", + "code", + "nameCn", + "nameEn", + "isCollege" + ], + "additionalProperties": false + }, + "teacherTitle": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "required": [ - "id", - "jwId", - "nameCn", - "code", - "startDate", - "endDate" - ], - "additionalProperties": false - } + "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)))$" }, - "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)))$" + "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" + }, + "user": { + "nullable": true, + "type": "object", + "properties": { + "name": { + "nullable": true, + "type": "string" + } }, - "lastEditedById": { - "nullable": true, - "type": "string" + "required": [ + "name" + ], + "additionalProperties": false + }, + "section": { + "nullable": true, + "type": "object", + "properties": { + "jwId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "code": { + "type": "string" + }, + "course": { + "type": "object", + "properties": { + "jwId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "code": { + "type": "string" + }, + "nameCn": { + "type": "string" + } + }, + "required": [ + "jwId", + "code", + "nameCn" + ], + "additionalProperties": false + } }, - "sectionId": { - "nullable": true, - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "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" + } }, - "courseId": { - "nullable": true, - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "required": [ + "jwId", + "code", + "nameCn" + ], + "additionalProperties": false + }, + "teacher": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + } }, - "teacherId": { - "nullable": true, - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "required": [ + "id", + "nameCn" + ], + "additionalProperties": false + }, + "homework": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "title": { + "type": "string" + }, + "section": { + "type": "object", + "properties": { + "code": { + "type": "string" + } + }, + "required": [ + "code" + ], + "additionalProperties": false + } }, - "homeworkId": { - "nullable": true, - "type": "string" - } + "required": [ + "id", + "title", + "section" + ], + "additionalProperties": false }, - "required": [ - "id", - "content", - "createdAt", - "updatedAt", - "lastEditedAt", - "lastEditedById", - "sectionId", - "courseId", - "teacherId", - "homeworkId" - ], - "additionalProperties": false - }, - "createdBy": { - "nullable": true, - "type": "object", - "properties": { - "id": { - "type": "string" + "sectionTeacher": { + "nullable": true, + "type": "object", + "properties": { + "section": { + "type": "object", + "properties": { + "jwId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "code": { + "type": "string" + }, + "course": { + "type": "object", + "properties": { + "jwId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "code": { + "type": "string" + }, + "nameCn": { + "type": "string" + } + }, + "required": [ + "jwId", + "code", + "nameCn" + ], + "additionalProperties": false + } + }, + "required": [ + "jwId", + "code", + "course" + ], + "additionalProperties": false + }, + "teacher": { + "type": "object", + "properties": { + "nameCn": { + "type": "string" + } + }, + "required": [ + "nameCn" + ], + "additionalProperties": false + } }, - "name": { - "nullable": true, - "type": "string" + "required": [ + "section", + "teacher" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "body", + "visibility", + "status", + "isAnonymous", + "authorName", + "createdAt", + "updatedAt", + "deletedAt", + "moderatedAt", + "moderationNote", + "userId", + "moderatedById", + "parentId", + "rootId", + "sectionId", + "courseId", + "teacherId", + "sectionTeacherId", + "homeworkId", + "user", + "section", + "course", + "teacher", + "homework", + "sectionTeacher" + ], + "additionalProperties": false + } + } + }, + "required": [ + "comments" + ], + "additionalProperties": false + }, + "adminDescriptionsResponseSchema": { + "type": "object", + "properties": { + "descriptions": { + "type": "array", + "items": { + "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" + } }, - "username": { - "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 + }, + "code": { + "type": "string" + }, + "nameCn": { + "type": "string" + } + }, + "required": [ + "jwId", + "code", + "nameCn" + ], + "additionalProperties": false + } }, - "image": { - "nullable": true, - "type": "string" - } + "required": [ + "jwId", + "code", + "course" + ], + "additionalProperties": false }, - "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" + "course": { + "nullable": true, + "type": "object", + "properties": { + "jwId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "code": { + "type": "string" + }, + "nameCn": { + "type": "string" + } }, - "image": { - "nullable": true, - "type": "string" - } + "required": [ + "jwId", + "code", + "nameCn" + ], + "additionalProperties": false }, - "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" + "teacher": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "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": [ + "id", + "nameCn" + ], + "additionalProperties": false }, - "required": [ - "completedAt" - ], - "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 + }, + "code": { + "nullable": true, + "type": "string" + }, + "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 + } + }, + "required": [ + "jwId", + "code", + "course" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "title", + "section" + ], + "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": [ - "success", - "homework" - ], - "additionalProperties": false - }, - "homeworkCompletionResponseSchema": { - "type": "object", - "properties": { - "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": [ + "id", + "content", + "createdAt", + "updatedAt", + "lastEditedAt", + "lastEditedById", + "sectionId", + "courseId", + "teacherId", + "homeworkId", + "lastEditedBy", + "section", + "course", + "teacher", + "homework" + ], + "additionalProperties": false + } } }, "required": [ - "completed", - "completedAt" + "descriptions" ], "additionalProperties": false }, - "homeworkCompletionBatchResponseSchema": { + "adminHomeworksResponseSchema": { "type": "object", "properties": { - "results": { + "homeworks": { "type": "array", "items": { - "oneOf": [ - { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "title": { + "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)))$" + }, + "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)))$" + }, + "section": { + "nullable": true, "type": "object", "properties": { - "success": { - "type": "boolean", - "enum": [ - true - ] + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "homeworkId": { + "jwId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "code": { + "nullable": true, "type": "string" }, - "completed": { - "type": "boolean" + "course": { + "type": "object", + "properties": { + "jwId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "code": { + "type": "string" + }, + "nameCn": { + "type": "string" + } + }, + "required": [ + "jwId", + "code", + "nameCn" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "jwId", + "code", + "course" + ], + "additionalProperties": false + }, + "createdBy": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "string" }, - "completedAt": { + "name": { "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)))$" + "type": "string" + }, + "username": { + "nullable": true, + "type": "string" + }, + "image": { + "nullable": true, + "type": "string" } }, "required": [ - "success", - "homeworkId", - "completed", - "completedAt" + "id", + "name", + "username", + "image" ], "additionalProperties": false }, - { + "updatedBy": { + "nullable": true, "type": "object", "properties": { - "success": { - "type": "boolean", - "enum": [ - false - ] + "id": { + "type": "string" }, - "homeworkId": { + "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 + } + }, + "required": [ + "id", + "title", + "submissionDueAt", + "createdAt", + "updatedAt", + "deletedAt", + "section", + "createdBy", + "updatedBy", + "deletedBy" + ], + "additionalProperties": false + } + } + }, + "required": [ + "homeworks" + ], + "additionalProperties": false + }, + "adminSuspensionsResponseSchema": { + "type": "object", + "properties": { + "suspensions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "userId": { + "type": "string" + }, + "createdById": { + "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)))$" + }, + "reason": { + "nullable": true, + "type": "string" + }, + "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)))$" + }, + "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)))$" + }, + "liftedById": { + "nullable": true, + "type": "string" + }, + "user": { + "nullable": true, + "type": "object", + "properties": { + "id": { "type": "string" }, - "completed": { - "type": "boolean" - }, - "error": { - "type": "object", - "properties": { - "code": { - "type": "string", - "enum": [ - "not_found", - "deleted" - ] - }, - "message": { - "type": "string" - } - }, - "required": [ - "code", - "message" - ], - "additionalProperties": false + "name": { + "nullable": true, + "type": "string" } }, "required": [ - "success", - "homeworkId", - "completed", - "error" + "id", + "name" ], "additionalProperties": false } + }, + "required": [ + "id", + "userId", + "createdById", + "createdAt", + "reason", + "note", + "expiresAt", + "liftedAt", + "liftedById" ], - "type": "object" + "additionalProperties": false } } }, "required": [ - "results" + "suspensions" ], "additionalProperties": false }, - "meResponseSchema": { + "adminCreateSuspensionRequestSchema": { "type": "object", "properties": { - "id": { - "type": "string" - }, - "email": { - "nullable": true, - "type": "string" - }, - "name": { - "nullable": true, - "type": "string" + "userId": { + "type": "string", + "minLength": 1 }, - "image": { - "nullable": true, + "reason": { "type": "string" }, - "username": { - "nullable": true, + "note": { "type": "string" }, - "isAdmin": { - "type": "boolean" + "expiresAt": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "nullable": true, + "enum": [ + null + ] + } + ] } }, "required": [ - "id", - "email", - "name", - "image", - "username", - "isAdmin" + "userId" ], "additionalProperties": false }, - "compactOverviewResponseSchema": { + "adminSuspensionResponseSchema": { "type": "object", "properties": { - "user": { + "suspension": { "type": "object", "properties": { - "userId": { - "nullable": true, + "id": { "type": "string" }, - "name": { - "nullable": true, + "userId": { "type": "string" }, - "image": { + "createdById": { "nullable": true, "type": "string" }, - "isAdmin": { - "type": "boolean" - } - }, - "required": [ - "userId", - "name", - "image", - "isAdmin" - ], - "additionalProperties": false - }, - "anchor": { - "type": "object", - "properties": { - "atTime": { + "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)))$" }, - "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)))$" + "reason": { + "nullable": true, + "type": "string" }, - "tomorrowStart": { + "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)))$" }, - "homeworkWindowDays": { - "type": "integer", - "exclusiveMinimum": true, - "maximum": 9007199254740991 - }, - "homeworkWindowEnd": { + "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)))$" }, - "limit": { - "type": "integer", - "exclusiveMinimum": true, - "maximum": 9007199254740991 - } - }, - "required": [ - "atTime", - "todayStart", - "tomorrowStart", - "homeworkWindowDays", - "homeworkWindowEnd", - "limit" - ], - "additionalProperties": false - }, - "counts": { - "type": "object", - "properties": { - "todos": { + "liftedById": { + "nullable": true, + "type": "string" + }, + "user": { + "nullable": true, "type": "object", "properties": { - "incomplete": { - "type": "integer", - "minimum": 0, - "maximum": 9007199254740991 - }, - "completed": { - "type": "integer", - "minimum": 0, - "maximum": 9007199254740991 + "id": { + "type": "string" }, - "overdue": { - "type": "integer", - "minimum": 0, - "maximum": 9007199254740991 + "name": { + "nullable": true, + "type": "string" } }, "required": [ - "incomplete", - "completed", - "overdue" + "id", + "name" ], "additionalProperties": false + } + }, + "required": [ + "id", + "userId", + "createdById", + "createdAt", + "reason", + "note", + "expiresAt", + "liftedAt", + "liftedById" + ], + "additionalProperties": false + } + }, + "required": [ + "suspension" + ], + "additionalProperties": false + }, + "adminUsersResponseSchema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "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" + } }, - "pendingHomeworks": { + "required": [ + "id", + "name", + "username", + "isAdmin", + "createdAt", + "email" + ], + "additionalProperties": false + } + }, + "pagination": { + "type": "object", + "properties": { + "page": { "type": "integer", - "minimum": 0, + "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "dueSoonHomeworks": { + "pageSize": { "type": "integer", - "minimum": 0, + "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "todaySchedules": { + "total": { "type": "integer", - "minimum": 0, + "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "upcomingExams": { + "totalPages": { "type": "integer", - "minimum": 0, + "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "required": [ - "todos", - "pendingHomeworks", - "dueSoonHomeworks", - "todaySchedules", - "upcomingExams" + "page", + "pageSize", + "total", + "totalPages" + ], + "additionalProperties": false + } + }, + "required": [ + "data", + "pagination" + ], + "additionalProperties": false + }, + "busNextDeparturesResponseSchema": { + "type": "object", + "properties": { + "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 }, - "schedules": { + "destinationCampus": { + "nullable": true, "type": "object", "properties": { - "total": { + "id": { "type": "integer", - "minimum": 0, + "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "items": { - "type": "array", - "items": { + "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 + }, + "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)))$" + }, + "dayType": { + "type": "string", + "enum": [ + "weekday", + "weekend" + ] + }, + "totalRoutes": { + "type": "integer", + "minimum": 0, + "maximum": 9007199254740991 + }, + "departures": { + "type": "array", + "items": { + "type": "object", + "properties": { + "tripId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "routeId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "route": { "type": "object", "properties": { "id": { @@ -16430,304 +14702,645 @@ "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "periods": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "nameCn": { + "type": "string" }, - "date": { + "nameEn": { "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": { + "descriptionPrimary": { "type": "string" }, - "experiment": { + "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 }, - "customPlace": { - "nullable": true, + "nameCn": { "type": "string" }, - "lessonType": { + "nameEn": { "nullable": true, "type": "string" }, - "weekIndex": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "latitude": { + "type": "number" }, - "exerciseClass": { - "nullable": true, - "type": "boolean" + "longitude": { + "type": "number" }, - "startUnit": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "namePrimary": { + "type": "string" }, - "endUnit": { + "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 }, - "roomId": { + "nameCn": { + "type": "string" + }, + "nameEn": { "nullable": true, - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "type": "string" }, - "sectionId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "latitude": { + "type": "number" }, - "scheduleGroupId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "longitude": { + "type": "number" }, - "room": { + "namePrimary": { + "type": "string" + }, + "nameSecondary": { "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 + "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 + } + }, + "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": { + "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 + }, + "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 }, - "teachers": { - "type": "array", - "items": { + "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 + }, + "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": { @@ -16735,22 +15348,6 @@ "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" }, @@ -16758,51 +15355,11 @@ "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 + "latitude": { + "type": "number" }, - "teacherTitleId": { - "nullable": true, - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "longitude": { + "type": "number" }, "namePrimary": { "type": "string" @@ -16810,75 +15367,232 @@ "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", + "latitude", + "longitude", "namePrimary", - "nameSecondary", - "department" + "nameSecondary" ], "additionalProperties": false } }, - "section": { + "required": [ + "stopOrder", + "campus" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "nameCn", + "nameEn", + "descriptionPrimary", + "descriptionSecondary", + "originCampus", + "destinationCampus", + "stopCount", + "weekdayTrips", + "weekendTrips", + "stops" + ], + "additionalProperties": false + } + } + }, + "required": [ + "originCampus", + "destinationCampus", + "total", + "routes" + ], + "additionalProperties": false + }, + "currentCalendarSubscriptionResponseSchema": { + "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": { @@ -16894,157 +15608,51 @@ "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, + "nameCn": { "type": "string" }, - "scheduleJsonParams": { - "nullable": true - }, - "selectedStdCount": { - "nullable": true, - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "remark": { + "nameEn": { "nullable": true, "type": "string" }, - "scheduleRemark": { + "categoryId": { "nullable": true, - "type": "string" - }, - "courseId": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "semesterId": { + "classTypeId": { "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "campusId": { + "classifyId": { "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "examModeId": { + "educationLevelId": { "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "openDepartmentId": { + "gradationId": { "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "teachLanguageId": { + "typeId": { "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "roomTypeId": { + "category": { "nullable": true, - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "course": { "type": "object", "properties": { "id": { @@ -17052,83 +15660,118 @@ "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, + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "classType": { + "nullable": true, + "type": "object", + "properties": { + "id": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "classTypeId": { + "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 }, - "classifyId": { - "nullable": true, - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "nameCn": { + "type": "string" }, - "educationLevelId": { + "nameEn": { "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "educationLevel": { + "nullable": true, + "type": "object", + "properties": { + "id": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "gradationId": { - "nullable": true, - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "nameCn": { + "type": "string" }, - "typeId": { + "nameEn": { "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "gradation": { + "nullable": true, + "type": "object", + "properties": { + "id": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "namePrimary": { + "nameCn": { "type": "string" }, - "nameSecondary": { + "nameEn": { "nullable": true, "type": "string" } }, "required": [ "id", - "jwId", - "code", "nameCn", - "nameEn", - "categoryId", - "classTypeId", - "classifyId", - "educationLevelId", - "gradationId", - "typeId", - "namePrimary", - "nameSecondary" + "nameEn" ], "additionalProperties": false }, - "semester": { + "type": { "nullable": true, "type": "object", "properties": { @@ -17137,886 +15780,1231 @@ "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": { + "nameEn": { "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)))$" + "type": "string" } }, "required": [ "id", - "jwId", "nameCn", - "code", - "startDate", - "endDate" + "nameEn" ], "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 - }, - "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" + "namePrimary": { + "type": "string" }, - "sectionId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "nameSecondary": { + "nullable": true, + "type": "string" } }, "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 - } - } - }, - "required": [ - "total", - "items" - ], - "additionalProperties": false - }, - "todos": { - "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 - }, - "items": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "title": { - "type": "string" + "code", + "nameCn", + "nameEn", + "categoryId", + "classTypeId", + "classifyId", + "educationLevelId", + "gradationId", + "typeId", + "category", + "classType", + "classify", + "educationLevel", + "gradation", + "type", + "namePrimary", + "nameSecondary" + ], + "additionalProperties": false }, - "content": { + "semester": { "nullable": true, - "type": "string" - }, - "priority": { - "type": "string", - "enum": [ - "low", - "medium", - "high" + "allOf": [ + { + "$ref": "#/components/schemas/semesterSchema" + } ] }, - "completed": { - "type": "boolean" - }, - "dueAt": { + "campus": { "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)))$" + "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 }, - "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)))$" + "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 }, - "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)))$" + "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", - "title", - "content", - "priority", - "completed", - "dueAt", - "createdAt", - "updatedAt" + "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": [ - "counts", - "items" + "userId", + "sections", + "calendarPath", + "calendarUrl", + "note" ], "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_.-]+$" + } }, - "homeworks": { + "semesterId": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "codes" + ], + "additionalProperties": false + }, + "calendarSubscriptionImportResponseSchema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "semester": { "type": "object", "properties": { - "total": { + "id": { "type": "integer", - "minimum": 0, + "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "items": { - "type": "array", - "items": { + "nameCn": { + "nullable": true, + "type": "string" + }, + "code": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "code" + ], + "additionalProperties": false + }, + "matchedCodes": { + "type": "array", + "items": { + "type": "string" + } + }, + "unmatchedCodes": { + "type": "array", + "items": { + "type": "string" + } + }, + "ambiguousCodes": { + "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": "string" - }, - "title": { - "type": "string" + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "isMajor": { - "type": "boolean" + "jwId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "requiresTeam": { - "type": "boolean" + "code": { + "type": "string" }, - "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)))$" + "nameCn": { + "type": "string" }, - "submissionStartAt": { + "nameEn": { "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)))$" + "type": "string" }, - "submissionDueAt": { + "categoryId": { "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)))$" + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "deletedAt": { + "classTypeId": { "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": { + "classifyId": { "nullable": true, - "type": "string" + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "updatedById": { + "educationLevelId": { "nullable": true, - "type": "string" + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "deletedById": { + "gradationId": { "nullable": true, - "type": "string" + "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, + "typeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "category": { + "nullable": true, + "type": "object", + "properties": { + "id": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "teachLanguageId": { - "nullable": true, - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "nameCn": { + "type": "string" }, - "roomTypeId": { + "nameEn": { "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "classType": { + "nullable": true, + "type": "object", + "properties": { + "id": { "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 + "nameCn": { + "type": "string" }, - "semester": { + "nameEn": { "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" - }, - "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" - ], - "additionalProperties": false + "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" ], "additionalProperties": false }, - "description": { + "classify": { "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 + "nameCn": { + "type": "string" }, - "homeworkId": { + "nameEn": { "nullable": true, "type": "string" } }, "required": [ "id", - "content", - "createdAt", - "updatedAt", - "lastEditedAt", - "lastEditedById", - "sectionId", - "courseId", - "teacherId", - "homeworkId" + "nameCn", + "nameEn" ], "additionalProperties": false }, - "createdBy": { + "educationLevel": { "nullable": true, "type": "object", "properties": { "id": { - "type": "string" - }, - "name": { - "nullable": true, - "type": "string" + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "username": { - "nullable": true, + "nameCn": { "type": "string" }, - "image": { + "nameEn": { "nullable": true, "type": "string" } }, "required": [ "id", - "name", - "username", - "image" + "nameCn", + "nameEn" ], "additionalProperties": false }, - "updatedBy": { + "gradation": { "nullable": true, "type": "object", "properties": { "id": { - "type": "string" - }, - "name": { - "nullable": true, - "type": "string" + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "username": { - "nullable": true, + "nameCn": { "type": "string" }, - "image": { + "nameEn": { "nullable": true, "type": "string" } }, "required": [ "id", - "name", - "username", - "image" + "nameCn", + "nameEn" ], "additionalProperties": false }, - "deletedBy": { + "type": { "nullable": true, "type": "object", "properties": { "id": { - "type": "string" - }, - "name": { - "nullable": true, - "type": "string" + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "username": { - "nullable": true, + "nameCn": { "type": "string" }, - "image": { + "nameEn": { "nullable": true, "type": "string" } }, "required": [ "id", - "name", - "username", - "image" + "nameCn", + "nameEn" ], "additionalProperties": false }, - "completion": { + "namePrimary": { + "type": "string" + }, + "nameSecondary": { "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)))$" - } + "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" }, - "required": [ - "completedAt" - ], - "additionalProperties": false + "nameSecondary": { + "nullable": true, + "type": "string" + } }, - "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", + "personId", + "teacherId", + "code", + "nameCn", + "nameEn", + "age", + "email", + "telephone", + "mobile", + "address", + "postcode", + "qq", + "wechat", + "departmentId", + "teacherTitleId", + "namePrimary", + "nameSecondary" + ], + "additionalProperties": false + } } - } - }, - "required": [ - "total", - "items" - ], - "additionalProperties": false - }, - "exams": { - "type": "object", - "properties": { - "total": { - "type": "integer", - "minimum": 0, - "maximum": 9007199254740991 }, - "items": { - "type": "array", - "items": { + "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 + } + }, + "addedCount": { + "type": "integer", + "minimum": 0, + "maximum": 9007199254740991 + }, + "addedSections": { + "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": { @@ -18029,599 +17017,1144 @@ "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)))$" + "code": { + "type": "string" }, - "examTakeCount": { - "nullable": true, - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "nameCn": { + "type": "string" }, - "examMode": { + "nameEn": { "nullable": true, "type": "string" }, - "examBatchId": { + "categoryId": { "nullable": true, "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "sectionId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "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 - }, - "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 - } - }, - "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, + "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 }, - "remark": { - "nullable": true, + "nameCn": { "type": "string" }, - "scheduleRemark": { + "nameEn": { "nullable": true, "type": "string" - }, - "courseId": { + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "classType": { + "nullable": true, + "type": "object", + "properties": { + "id": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "semesterId": { - "nullable": true, - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "nameCn": { + "type": "string" }, - "campusId": { + "nameEn": { "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "classify": { + "nullable": true, + "type": "object", + "properties": { + "id": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "examModeId": { - "nullable": true, - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "nameCn": { + "type": "string" }, - "openDepartmentId": { + "nameEn": { "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "educationLevel": { + "nullable": true, + "type": "object", + "properties": { + "id": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "teachLanguageId": { - "nullable": true, - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "nameCn": { + "type": "string" }, - "roomTypeId": { + "nameEn": { "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "gradation": { + "nullable": true, + "type": "object", + "properties": { + "id": { "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 + "nameCn": { + "type": "string" }, - "semester": { + "nameEn": { "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" - }, - "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" - ], - "additionalProperties": false + "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", - "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" ], "additionalProperties": false + }, + "namePrimary": { + "type": "string" + }, + "nameSecondary": { + "nullable": true, + "type": "string" } }, "required": [ "id", "jwId", - "examType", - "startTime", - "endTime", - "examDate", - "examTakeCount", - "examMode", - "examBatchId", - "sectionId", - "examBatch", - "examRooms", - "section" + "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": [ - "total", - "items" - ], - "additionalProperties": false - } - }, - "required": [ - "user", - "anchor", - "counts", - "schedules", - "todos", - "homeworks", - "exams" - ], - "additionalProperties": false - }, - "subscribedHomeworksResponseSchema": { - "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 + "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": { + "alreadySubscribedCount": { + "type": "integer", + "minimum": 0, + "maximum": 9007199254740991 + }, + "alreadySubscribedSections": { "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" }, - "title": { + "scheduleJsonParams": { + "nullable": true + }, + "selectedStdCount": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "remark": { + "nullable": true, "type": "string" }, - "isMajor": { - "type": "boolean" + "scheduleRemark": { + "nullable": true, + "type": "string" }, - "requiresTeam": { - "type": "boolean" + "courseId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "publishedAt": { + "semesterId": { "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)))$" + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "submissionStartAt": { + "campusId": { "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)))$" + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "submissionDueAt": { + "examModeId": { "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)))$" + "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)))$" + "openDepartmentId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "deletedAt": { + "teachLanguageId": { "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)))$" + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "sectionId": { + "roomTypeId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "createdById": { + "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, - "type": "string" + "allOf": [ + { + "$ref": "#/components/schemas/semesterSchema" + } + ] }, - "updatedById": { + "campus": { "nullable": true, - "type": "string" + "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 }, - "deletedById": { + "openDepartment": { "nullable": true, - "type": "string" + "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 }, - "section": { + "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 + } + }, + "subscription": { + "nullable": true, + "type": "object", + "properties": { + "userId": { + "type": "string" + }, + "sections": { + "type": "array", + "items": { "type": "object", "properties": { "id": { @@ -18842,9 +18375,218 @@ }, "typeId": { "nullable": true, - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "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" @@ -18857,21 +18599,15 @@ "required": [ "id", "jwId", - "code", "nameCn", "nameEn", - "categoryId", - "classTypeId", - "classifyId", - "educationLevelId", - "gradationId", - "typeId", + "code", "namePrimary", "nameSecondary" ], "additionalProperties": false }, - "semester": { + "openDepartment": { "nullable": true, "type": "object", "properties": { @@ -18880,836 +18616,860 @@ "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "jwId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "code": { + "type": "string" }, "nameCn": { "type": "string" }, - "code": { + "nameEn": { + "nullable": true, "type": "string" }, - "startDate": { + "isCollege": { "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)))$" + "type": "boolean" + }, + "namePrimary": { + "type": "string" }, - "endDate": { + "nameSecondary": { "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)))$" + "type": "string" } }, "required": [ "id", - "jwId", - "nameCn", "code", - "startDate", - "endDate" + "nameCn", + "nameEn", + "isCollege", + "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 - }, - "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" + "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" - ], - "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" + "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 - }, - "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 + "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 + }, + "commentThreadResponseSchema": { + "type": "object", + "properties": { + "thread": { + "type": "array", + "items": { + "$ref": "#/components/schemas/__schema1" } }, - "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 - } + "focusId": { + "type": "string" + }, + "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": { + "sectionId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "required": [ - "id", - "action", - "titleSnapshot", - "createdAt", - "sectionId", - "homeworkId", - "actorId", - "actor" - ], - "additionalProperties": false - } + "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" + }, + "homeworkId": { + "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": [ + "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 }, - "sectionIds": { + "visibility": { + "type": "string", + "enum": [ + "public", + "logged_in_only" + ] + }, + "isAnonymous": { + "type": "boolean" + }, + "attachmentIds": { "type": "array", "items": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "type": "string" } } }, "required": [ - "viewer", - "homeworks", - "auditLogs", - "sectionIds" + "body" + ], + "additionalProperties": false + }, + "commentUpdateResponseSchema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "comment": { + "$ref": "#/components/schemas/__schema1" + } + }, + "required": [ + "success", + "comment" ], "additionalProperties": false }, - "subscribedSchedulesResponseSchema": { + "courseDetailSchema": { "type": "object", "properties": { - "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" - }, - "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": { + "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 }, - "scheduleGroupId": { + "jwId": { "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 + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "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 - } + "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 }, - "section": { + "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": { @@ -19718,863 +19478,1166 @@ "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, + "nameCn": { "type": "string" }, - "scheduleJsonParams": { - "nullable": true - }, - "selectedStdCount": { - "nullable": true, - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "remark": { + "nameEn": { "nullable": true, "type": "string" }, - "scheduleRemark": { + "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 + } }, - "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", + "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 }, - "required": [ - "id", - "jwId", - "code", - "nameCn", - "nameEn", - "categoryId", - "classTypeId", - "classifyId", - "educationLevelId", - "gradationId", - "typeId", - "namePrimary", - "nameSecondary" - ], - "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" - }, - "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)))$" - } + "jwId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "required": [ - "id", - "jwId", - "nameCn", - "code", - "startDate", - "endDate" - ], - "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 - }, - "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" + "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" + } }, - "sectionId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - } + "required": [ + "id", + "jwId", + "code", + "nameCn", + "nameEn", + "categoryId", + "classTypeId", + "classifyId", + "educationLevelId", + "gradationId", + "typeId", + "namePrimary", + "nameSecondary" + ], + "additionalProperties": false }, - "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 - } - } - }, - "required": [ - "schedules" - ], - "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" + "semester": { + "nullable": true, + "allOf": [ + { + "$ref": "#/components/schemas/semesterSchema" + } + ] + } }, - "nameEn": { - "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" + ], + "additionalProperties": false }, - "required": [ - "id", - "nameCn", - "nameEn" - ], - "additionalProperties": false - } - }, - "courseTypes": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "nameCn": { - "type": "string" + "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" + } }, - "nameEn": { - "nullable": true, - "type": "string" - } + "required": [ + "id", + "content", + "createdAt", + "updatedAt", + "lastEditedAt", + "lastEditedById", + "sectionId", + "courseId", + "teacherId", + "homeworkId" + ], + "additionalProperties": false }, - "required": [ - "id", - "nameCn", - "nameEn" - ], - "additionalProperties": false - } - }, - "courseGradations": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "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" + } }, - "nameEn": { - "nullable": true, - "type": "string" - } + "required": [ + "id", + "name", + "username", + "image" + ], + "additionalProperties": false }, - "required": [ - "id", - "nameCn", - "nameEn" - ], - "additionalProperties": false - } - }, - "examModes": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "nameCn": { - "type": "string" + "updatedBy": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "nullable": true, + "type": "string" + }, + "username": { + "nullable": true, + "type": "string" + }, + "image": { + "nullable": true, + "type": "string" + } }, - "nameEn": { - "nullable": true, - "type": "string" - } + "required": [ + "id", + "name", + "username", + "image" + ], + "additionalProperties": false }, - "required": [ - "id", - "nameCn", - "nameEn" - ], - "additionalProperties": false - } - }, - "teachLanguages": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "nameCn": { - "type": "string" + "deletedBy": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "nullable": true, + "type": "string" + }, + "username": { + "nullable": true, + "type": "string" + }, + "image": { + "nullable": true, + "type": "string" + } }, - "nameEn": { - "nullable": true, - "type": "string" - } + "required": [ + "id", + "name", + "username", + "image" + ], + "additionalProperties": false }, - "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" + "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)))$" + } }, - "code": { - "nullable": true, - "type": "string" + "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": [ + "success", + "homework" + ], + "additionalProperties": false + }, + "homeworkCompletionBatchRequestSchema": { + "type": "object", + "properties": { + "items": { + "minItems": 1, + "maxItems": 100, + "type": "array", + "items": { + "type": "object", + "properties": { + "homeworkId": { + "type": "string", + "minLength": 1 }, - "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 - } + "completed": { + "type": "boolean" } }, "required": [ - "id", - "jwId", - "nameCn", - "nameEn", - "code", - "buildings" + "homeworkId", + "completed" ], "additionalProperties": false } } }, "required": [ - "educationLevels", - "courseCategories", - "courseClassifies", - "classTypes", - "courseTypes", - "courseGradations", - "examModes", - "teachLanguages", - "campuses" + "items" ], "additionalProperties": false }, - "openApiDocumentResponseSchema": { + "homeworkCompletionBatchResponseSchema": { "type": "object", "properties": { - "openapi": { - "type": "string" - }, - "info": { + "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": { - "title": { + "userId": { + "nullable": true, + "type": "string" + }, + "name": { + "nullable": true, + "type": "string" + }, + "image": { + "nullable": true, "type": "string" }, - "version": { - "type": "string" + "isAdmin": { + "type": "boolean" + } + }, + "required": [ + "userId", + "name", + "image", + "isAdmin" + ], + "additionalProperties": false + }, + "anchor": { + "type": "object", + "properties": { + "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)))$" + }, + "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)))$" + }, + "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)))$" + }, + "homeworkWindowDays": { + "type": "integer", + "exclusiveMinimum": true, + "maximum": 9007199254740991 + }, + "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)))$" + }, + "limit": { + "type": "integer", + "exclusiveMinimum": true, + "maximum": 9007199254740991 + } + }, + "required": [ + "atTime", + "todayStart", + "tomorrowStart", + "homeworkWindowDays", + "homeworkWindowEnd", + "limit" + ], + "additionalProperties": false + }, + "counts": { + "type": "object", + "properties": { + "todos": { + "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 + }, + "pendingHomeworks": { + "type": "integer", + "minimum": 0, + "maximum": 9007199254740991 }, - "description": { - "type": "string" + "dueSoonHomeworks": { + "type": "integer", + "minimum": 0, + "maximum": 9007199254740991 + }, + "todaySchedules": { + "type": "integer", + "minimum": 0, + "maximum": 9007199254740991 + }, + "upcomingExams": { + "type": "integer", + "minimum": 0, + "maximum": 9007199254740991 } }, "required": [ - "title", - "version" + "todos", + "pendingHomeworks", + "dueSoonHomeworks", + "todaySchedules", + "upcomingExams" ], "additionalProperties": false }, - "servers": { - "type": "array", - "items": { - "type": "object", - "properties": { - "url": { - "type": "string" - }, - "description": { - "type": "string" - } - }, - "required": [ - "url" - ], - "additionalProperties": false - } - }, - "paths": { + "schedules": { "type": "object", - "additionalProperties": {} - } - }, - "required": [ - "openapi", - "info", - "paths" - ], - "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, + "properties": { + "total": { + "type": "integer", + "minimum": 0, + "maximum": 9007199254740991 + }, + "items": { + "type": "array", + "items": { "type": "object", "properties": { "id": { @@ -20582,65 +20645,455 @@ "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "jwId": { + "periods": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "nameCn": { + "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" }, - "nameEn": { + "endTime": { + "type": "string" + }, + "experiment": { "nullable": true, "type": "string" }, - "code": { + "customPlace": { + "nullable": true, "type": "string" }, - "floor": { + "lessonType": { "nullable": true, + "type": "string" + }, + "weekIndex": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "virtual": { + "exerciseClass": { + "nullable": true, "type": "boolean" }, - "seatsForSection": { + "startUnit": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "remark": { - "nullable": true, - "type": "string" - }, - "seats": { + "endUnit": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "buildingId": { + "roomId": { "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "roomTypeId": { - "nullable": true, + "sectionId": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "namePrimary": { - "type": "string" + "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 }, - "nameSecondary": { - "nullable": true, - "type": "string" + "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 + } }, - "building": { - "nullable": true, + "section": { "type": "object", "properties": { "id": { @@ -20653,31 +21106,160 @@ "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "nameCn": { + "code": { "type": "string" }, - "nameEn": { + "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" }, - "code": { + "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" }, - "campusId": { + "suggestScheduleWeeks": { + "nullable": true + }, + "suggestScheduleWeekInfo": { + "nullable": true, + "type": "string" + }, + "scheduleJsonParams": { + "nullable": true + }, + "selectedStdCount": { "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "namePrimary": { + "remark": { + "nullable": true, "type": "string" }, - "nameSecondary": { + "scheduleRemark": { "nullable": true, "type": "string" }, - "campus": { + "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": { @@ -20685,22 +21267,56 @@ "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "jwId": { + "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 }, - "nameCn": { - "type": "string" + "educationLevelId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "nameEn": { + "gradationId": { "nullable": true, - "type": "string" + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "code": { + "typeId": { "nullable": true, - "type": "string" + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, "namePrimary": { "type": "string" @@ -20713,412 +21329,380 @@ "required": [ "id", "jwId", + "code", "nameCn", "nameEn", - "code", + "categoryId", + "classTypeId", + "classifyId", + "educationLevelId", + "gradationId", + "typeId", "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": { + "semester": { "nullable": true, - "type": "string" + "allOf": [ + { + "$ref": "#/components/schemas/semesterSchema" + } + ] } }, "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 - } + "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", - "personId", - "teacherId", - "code", - "nameCn", - "nameEn", - "age", - "email", - "telephone", - "mobile", - "address", - "postcode", - "qq", - "wechat", - "departmentId", - "teacherTitleId", - "namePrimary", - "nameSecondary", - "department" - ], - "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 + } + } + }, + "required": [ + "total", + "items" + ], + "additionalProperties": false + }, + "todos": { + "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 } }, - "section": { + "required": [ + "incomplete", + "completed", + "overdue" + ], + "additionalProperties": false + }, + "items": { + "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 + "title": { + "type": "string" }, - "periodsPerWeek": { + "content": { "nullable": true, - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "type": "string" }, - "timesPerWeek": { - "nullable": true, - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "priority": { + "type": "string", + "enum": [ + "low", + "medium", + "high" + ] }, - "stdCount": { - "nullable": true, - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "completed": { + "type": "boolean" }, - "limitCount": { + "dueAt": { "nullable": true, - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "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)))$" }, - "graduateAndPostgraduate": { - "nullable": true, - "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)))$" }, - "dateTimePlaceText": { - "nullable": true, + "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", + "items" + ], + "additionalProperties": false + }, + "dueTodos": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "minimum": 0, + "maximum": 9007199254740991 + }, + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { "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" + "title": { + "type": "string" }, - "designPeriods": { - "nullable": true, - "type": "number" + "priority": { + "type": "string", + "enum": [ + "low", + "medium", + "high" + ] }, - "testPeriods": { - "nullable": true, - "type": "number" + "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)))$" }, - "scheduleState": { - "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", + "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" }, - "suggestScheduleWeeks": { - "nullable": true - }, - "suggestScheduleWeekInfo": { - "nullable": true, + "title": { "type": "string" }, - "scheduleJsonParams": { - "nullable": true + "isMajor": { + "type": "boolean" }, - "selectedStdCount": { + "requiresTeam": { + "type": "boolean" + }, + "publishedAt": { "nullable": true, - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "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": { + "submissionStartAt": { "nullable": true, - "type": "string" + "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)))$" }, - "scheduleRemark": { + "submissionDueAt": { "nullable": true, - "type": "string" + "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 + "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)))$" }, - "semesterId": { - "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)))$" }, - "campusId": { + "deletedAt": { "nullable": true, - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "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)))$" }, - "examModeId": { - "nullable": true, + "sectionId": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "openDepartmentId": { + "createdById": { "nullable": true, - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "type": "string" }, - "teachLanguageId": { + "updatedById": { "nullable": true, - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "type": "string" }, - "roomTypeId": { + "deletedById": { "nullable": true, - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "type": "string" }, - "course": { + "section": { "type": "object", "properties": { "id": { @@ -21126,346 +21710,513 @@ "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "jwId": { + "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 }, - "code": { + "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" }, - "nameCn": { + "content": { "type": "string" }, - "nameEn": { + "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" }, - "categoryId": { + "sectionId": { "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "classTypeId": { + "courseId": { "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "classifyId": { + "teacherId": { "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "educationLevelId": { + "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": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "type": "string" }, - "gradationId": { + "image": { "nullable": true, - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "type": "string" + } + }, + "required": [ + "id", + "name", + "username", + "image" + ], + "additionalProperties": false + }, + "updatedBy": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "string" }, - "typeId": { + "name": { "nullable": true, - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "type": "string" }, - "namePrimary": { + "username": { + "nullable": true, "type": "string" }, - "nameSecondary": { + "image": { "nullable": true, "type": "string" } }, "required": [ "id", - "jwId", - "code", - "nameCn", - "nameEn", - "categoryId", - "classTypeId", - "classifyId", - "educationLevelId", - "gradationId", - "typeId", - "namePrimary", - "nameSecondary" + "name", + "username", + "image" ], "additionalProperties": false }, - "semester": { + "deletedBy": { "nullable": true, "type": "object", "properties": { "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "jwId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "nameCn": { "type": "string" }, - "code": { + "name": { + "nullable": true, "type": "string" }, - "startDate": { + "username": { "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)))$" + "type": "string" }, - "endDate": { + "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": [ - "id", - "jwId", - "nameCn", - "code", - "startDate", - "endDate" + "completedAt" ], "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 - }, - "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": { + "commentCount": { "type": "integer", - "minimum": -9007199254740991, + "minimum": 0, "maximum": 9007199254740991 } }, "required": [ "id", - "jwId", - "no", - "limitCount", - "stdCount", - "actualPeriods", - "isDefault", - "sectionId" + "title", + "isMajor", + "requiresTeam", + "publishedAt", + "submissionStartAt", + "submissionDueAt", + "createdAt", + "updatedAt", + "deletedAt", + "sectionId", + "createdById", + "updatedById", + "deletedById", + "section", + "description", + "createdBy", + "updatedBy", + "deletedBy", + "completion", + "commentCount" ], - "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 + "additionalProperties": false + } } }, "required": [ - "page", - "pageSize", "total", - "totalPages" + "items" ], "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": { + }, + "exams": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "minimum": 0, + "maximum": 9007199254740991 + }, + "items": { + "type": "array", + "items": { "type": "object", "properties": { "id": { @@ -21478,192 +22229,443 @@ "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "code": { - "type": "string" - }, - "nameCn": { - "type": "string" - }, - "nameEn": { + "examType": { "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": { + "startTime": { + "nullable": true, "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": { + "endTime": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "jwId": { + "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 }, - "nameCn": { + "examMode": { + "nullable": true, "type": "string" }, - "nameEn": { + "examBatchId": { "nullable": true, - "type": "string" + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "code": { + "sectionId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "examBatch": { "nullable": true, - "type": "string" + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "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 + } + }, + "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" + "examType", + "startTime", + "endTime", + "examDate", + "examTakeCount", + "examMode", + "examBatchId", + "sectionId", + "examBatch", + "examRooms", + "section" ], "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" + "items" ], "additionalProperties": false } }, "required": [ - "data", - "pagination" + "user", + "anchor", + "counts", + "schedules", + "todos", + "dueTodos", + "homeworks", + "exams" ], "additionalProperties": false }, @@ -21821,19 +22823,253 @@ "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "teachLanguageId": { + "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 + } + }, + "required": [ + "id", + "jwId", + "code", + "nameCn", + "nameEn", + "categoryId", + "classTypeId", + "classifyId", + "educationLevelId", + "gradationId", + "typeId", + "category", + "classType", + "classify", + "educationLevel", + "gradation", + "type" + ], + "additionalProperties": false + }, + "semester": { "nullable": true, - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "allOf": [ + { + "$ref": "#/components/schemas/semesterSchema" + } + ] }, - "roomTypeId": { + "campus": { "nullable": true, - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "course": { "type": "object", "properties": { "id": { @@ -21842,13 +23078,11 @@ "maximum": 9007199254740991 }, "jwId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "code": { - "type": "string" - }, "nameCn": { "type": "string" }, @@ -21856,346 +23090,938 @@ "nullable": true, "type": "string" }, - "categoryId": { + "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 }, - "classTypeId": { + "code": { + "type": "string" + }, + "nameCn": { + "type": "string" + }, + "nameEn": { "nullable": true, - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "type": "string" }, - "classifyId": { + "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 }, - "educationLevelId": { + "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 }, - "gradationId": { + "nameCn": { + "type": "string" + }, + "nameEn": { "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "roomType": { + "nullable": true, + "type": "object", + "properties": { + "id": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "typeId": { - "nullable": true, + "jwId": { "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" - } + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "code": { + "type": "string" + } + }, + "required": [ + "id", + "jwId", + "nameCn", + "nameEn", + "code" + ], + "additionalProperties": false + }, + "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" + }, + "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 + } + }, + "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 }, - "required": [ - "id", - "nameCn", - "nameEn" - ], - "additionalProperties": false + "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 + } }, - "classType": { - "nullable": true, - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "nameCn": { - "type": "string" + "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": { + "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" + } }, - "nameEn": { - "nullable": true, - "type": "string" - } + "required": [ + "id", + "code", + "nameCn", + "nameEn", + "isCollege" + ], + "additionalProperties": false }, - "required": [ - "id", - "nameCn", - "nameEn" - ], - "additionalProperties": false - }, - "classify": { - "nullable": true, - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "nameCn": { - "type": "string" + "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" + } }, - "nameEn": { - "nullable": true, - "type": "string" - } - }, - "required": [ - "id", - "nameCn", - "nameEn" - ], - "additionalProperties": false + "required": [ + "id", + "jwId", + "nameCn", + "nameEn", + "code", + "enabled" + ], + "additionalProperties": false + } }, - "educationLevel": { - "nullable": true, - "type": "object", - "properties": { - "id": { + "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 + }, + "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 - }, - "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" + "weekIndicesMsg": { + "nullable": true, + "type": "string" + }, + "teacherLessonTypeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "teacher": { + "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 + } }, - "nameEn": { - "nullable": true, - "type": "string" - } + "required": [ + "id", + "personId", + "teacherId", + "code", + "nameCn", + "nameEn", + "age", + "email", + "telephone", + "mobile", + "address", + "postcode", + "qq", + "wechat", + "departmentId", + "teacherTitleId" + ], + "additionalProperties": false }, - "required": [ - "id", - "nameCn", - "nameEn" - ], - "additionalProperties": false - }, - "type": { - "nullable": true, - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "nameCn": { - "type": "string" + "teacherLessonType": { + "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" + }, + "role": { + "nullable": true, + "type": "string" + }, + "enabled": { + "nullable": true, + "type": "boolean" + } }, - "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, - "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" - ], - "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" + "required": [ + "id", + "jwId", + "nameCn", + "nameEn", + "code", + "role", + "enabled" + ], + "additionalProperties": false + } }, - "code": { - "nullable": true, - "type": "string" - } - }, - "required": [ - "id", - "jwId", - "nameCn", - "nameEn", - "code" - ], - "additionalProperties": false + "required": [ + "id", + "teacherId", + "sectionId", + "role", + "period", + "weekIndices", + "weekIndicesMsg", + "teacherLessonTypeId", + "teacher", + "teacherLessonType" + ], + "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" + "exams": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "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": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "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 + } + } }, - "isCollege": { - "nullable": true, - "type": "boolean" - } - }, - "required": [ - "id", - "code", - "nameCn", - "nameEn", - "isCollege" - ], - "additionalProperties": false + "required": [ + "id", + "jwId", + "examType", + "startTime", + "endTime", + "examDate", + "examTakeCount", + "examMode", + "examBatchId", + "sectionId", + "examBatch", + "examRooms" + ], + "additionalProperties": false + } }, - "examMode": { - "nullable": true, - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "nameCn": { - "type": "string" + "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" + } }, - "nameEn": { - "nullable": true, - "type": "string" - } - }, - "required": [ - "id", - "nameCn", - "nameEn" - ], - "additionalProperties": false - }, - "teachLanguage": { - "nullable": true, + "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": { + "semester": { "type": "object", "properties": { "id": { @@ -22204,9 +24030,10 @@ "maximum": 9007199254740991 }, "nameCn": { + "nullable": true, "type": "string" }, - "nameEn": { + "code": { "nullable": true, "type": "string" } @@ -22214,45 +24041,32 @@ "required": [ "id", "nameCn", - "nameEn" + "code" ], "additionalProperties": false }, - "roomType": { - "nullable": true, + "matchedCodes": { + "type": "array", + "items": { + "type": "string" + } + }, + "unmatchedCodes": { + "type": "array", + "items": { + "type": "string" + } + }, + "suggestions": { "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": { + "additionalProperties": { + "type": "array", + "items": { "type": "string" } - }, - "required": [ - "id", - "jwId", - "nameCn", - "nameEn", - "code" - ], - "additionalProperties": false + } }, - "schedules": { + "sections": { "type": "array", "items": { "type": "object", @@ -22262,235 +24076,165 @@ "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "periods": { + "jwId": { "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)))$" + "code": { + "type": "string" }, - "weekday": { + "bizTypeId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "startTime": { - "type": "string" - }, - "endTime": { - "type": "string" - }, - "experiment": { - "nullable": true, - "type": "string" - }, - "customPlace": { + "credits": { "nullable": true, - "type": "string" + "type": "number" }, - "lessonType": { + "period": { "nullable": true, - "type": "string" - }, - "weekIndex": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "exerciseClass": { + "periodsPerWeek": { "nullable": true, - "type": "boolean" - }, - "startUnit": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "endUnit": { + "timesPerWeek": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "roomId": { + "stdCount": { "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "sectionId": { + "limitCount": { + "nullable": true, "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 - } - }, - "scheduleGroups": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "graduateAndPostgraduate": { + "nullable": true, + "type": "boolean" }, - "jwId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "dateTimePlaceText": { + "nullable": true, + "type": "string" }, - "no": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "dateTimePlacePersonText": { + "nullable": true }, - "limitCount": { + "actualPeriods": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "stdCount": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "theoryPeriods": { + "nullable": true, + "type": "number" }, - "actualPeriods": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "practicePeriods": { + "nullable": true, + "type": "number" }, - "isDefault": { - "type": "boolean" + "experimentPeriods": { + "nullable": true, + "type": "number" }, - "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 + "machinePeriods": { + "nullable": true, + "type": "number" }, - "personId": { + "designPeriods": { "nullable": true, - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "type": "number" }, - "teacherId": { + "testPeriods": { "nullable": true, - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "type": "number" }, - "code": { + "scheduleState": { "nullable": true, "type": "string" }, - "nameCn": { - "type": "string" + "suggestScheduleWeeks": { + "nullable": true }, - "nameEn": { + "suggestScheduleWeekInfo": { "nullable": true, "type": "string" }, - "age": { + "scheduleJsonParams": { + "nullable": true + }, + "selectedStdCount": { "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "email": { - "nullable": true, - "type": "string" - }, - "telephone": { + "remark": { "nullable": true, "type": "string" }, - "mobile": { + "scheduleRemark": { "nullable": true, "type": "string" }, - "address": { - "nullable": true, - "type": "string" + "courseId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "postcode": { + "semesterId": { "nullable": true, - "type": "string" + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "qq": { + "campusId": { "nullable": true, - "type": "string" + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "wechat": { + "examModeId": { "nullable": true, - "type": "string" + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "departmentId": { + "openDepartmentId": { "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "teacherTitleId": { + "teachLanguageId": { "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "department": { + "roomTypeId": { "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "course": { "type": "object", "properties": { "id": { @@ -22498,6 +24242,11 @@ "minimum": -9007199254740991, "maximum": 9007199254740991 }, + "jwId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, "code": { "type": "string" }, @@ -22508,231 +24257,226 @@ "nullable": true, "type": "string" }, - "isCollege": { + "categoryId": { "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": { + "classTypeId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "nameCn": { - "type": "string" - }, - "nameEn": { - "nullable": true, - "type": "string" - }, - "code": { - "type": "string" - }, - "enabled": { + "classifyId": { "nullable": true, - "type": "boolean" - } - }, - "required": [ - "id", - "jwId", - "nameCn", - "nameEn", - "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 - }, - "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": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "personId": { + "educationLevelId": { "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "teacherId": { + "gradationId": { "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "code": { - "nullable": true, - "type": "string" - }, - "nameCn": { - "type": "string" - }, - "nameEn": { - "nullable": true, - "type": "string" - }, - "age": { + "typeId": { "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "email": { + "category": { "nullable": true, - "type": "string" + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false }, - "telephone": { + "classType": { "nullable": true, - "type": "string" + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false }, - "mobile": { + "classify": { "nullable": true, - "type": "string" + "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 }, - "address": { + "gradation": { "nullable": true, - "type": "string" + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false }, - "postcode": { + "type": { "nullable": true, - "type": "string" + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false }, - "qq": { - "nullable": true, + "namePrimary": { "type": "string" }, - "wechat": { + "nameSecondary": { "nullable": true, "type": "string" - }, - "departmentId": { - "nullable": true, - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "teacherTitleId": { - "nullable": true, - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 } }, "required": [ "id", - "personId", - "teacherId", + "jwId", "code", "nameCn", "nameEn", - "age", - "email", - "telephone", - "mobile", - "address", - "postcode", - "qq", - "wechat", - "departmentId", - "teacherTitleId" + "categoryId", + "classTypeId", + "classifyId", + "educationLevelId", + "gradationId", + "typeId", + "category", + "classType", + "classify", + "educationLevel", + "gradation", + "type", + "namePrimary", + "nameSecondary" ], "additionalProperties": false }, - "teacherLessonType": { + "semester": { + "nullable": true, + "allOf": [ + { + "$ref": "#/components/schemas/semesterSchema" + } + ] + }, + "campus": { "nullable": true, "type": "object", "properties": { @@ -22742,6 +24486,7 @@ "maximum": 9007199254740991 }, "jwId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 @@ -22754,15 +24499,15 @@ "type": "string" }, "code": { + "nullable": true, "type": "string" }, - "role": { - "nullable": true, + "namePrimary": { "type": "string" }, - "enabled": { + "nameSecondary": { "nullable": true, - "type": "boolean" + "type": "string" } }, "required": [ @@ -22771,88 +24516,12 @@ "nameCn", "nameEn", "code", - "role", - "enabled" + "namePrimary", + "nameSecondary" ], "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 - }, - "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": { + "openDepartment": { "nullable": true, "type": "object", "properties": { @@ -22861,22 +24530,40 @@ "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" + "nameEn", + "isCollege", + "namePrimary", + "nameSecondary" ], "additionalProperties": false }, - "examRooms": { + "teachers": { "type": "array", "items": { "type": "object", @@ -22886,175 +24573,246 @@ "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "room": { + "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" }, - "count": { + "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 }, - "examId": { + "teacherTitleId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 + }, + "namePrimary": { + "type": "string" + }, + "nameSecondary": { + "nullable": true, + "type": "string" } }, "required": [ "id", - "room", - "count", - "examId" + "personId", + "teacherId", + "code", + "nameCn", + "nameEn", + "age", + "email", + "telephone", + "mobile", + "address", + "postcode", + "qq", + "wechat", + "departmentId", + "teacherTitleId", + "namePrimary", + "nameSecondary" ], "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", - "grade", - "nameCn", - "nameEn", + "bizTypeId", + "credits", + "period", + "periodsPerWeek", + "timesPerWeek", "stdCount", - "planCount", - "enabled", - "abbrZh", - "abbrEn" + "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": [ - "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" + "matchedCodes", + "unmatchedCodes", + "suggestions", + "sections", + "total" ], "additionalProperties": false }, - "matchSectionCodesResponseSchema": { + "teacherDetailSchema": { "type": "object", "properties": { - "semester": { + "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": { @@ -23062,42 +24820,68 @@ "minimum": -9007199254740991, "maximum": 9007199254740991 }, + "code": { + "type": "string" + }, "nameCn": { - "nullable": true, "type": "string" }, - "code": { + "nameEn": { "nullable": true, "type": "string" + }, + "isCollege": { + "nullable": true, + "type": "boolean" } }, "required": [ "id", + "code", "nameCn", - "code" + "nameEn", + "isCollege" ], "additionalProperties": false }, - "matchedCodes": { - "type": "array", - "items": { - "type": "string" - } - }, - "unmatchedCodes": { - "type": "array", - "items": { - "type": "string" - } - }, - "suggestions": { + "teacherTitle": { + "nullable": true, "type": "object", - "additionalProperties": { - "type": "array", - "items": { + "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", @@ -23471,980 +25255,1348 @@ "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, - "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", + "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": [ + "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 + } + }, + "_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", + "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" + }, + { + "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" + }, + "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", + "todo" + ], + "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": { + "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 + }, + "uploadDeleteResponseSchema": { + "type": "object", + "properties": { + "deletedId": { + "type": "string" + }, + "deletedSize": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + } + }, + "required": [ + "deletedId", + "deletedSize" + ], + "additionalProperties": false + }, + "uploadCompleteRequestSchema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "minLength": 1 + }, + "filename": { + "type": "string", + "minLength": 1 + }, + "contentType": { + "type": "string" + } + }, + "required": [ + "key", + "filename" + ], + "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 + }, + "publicUserProfileResponseSchema": { + "type": "object", + "properties": { + "user": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "username": { + "nullable": true, + "type": "string" + }, + "name": { + "nullable": true, + "type": "string" + }, + "image": { + "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)))$" + }, + "_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 + } + }, + "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 + } + }, + "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" }, - "required": [ - "id", - "jwId", - "nameCn", - "code", - "startDate", - "endDate" - ], - "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" - } + "username": { + "nullable": true, + "type": "string" }, - "required": [ - "id", - "jwId", - "nameCn", - "nameEn", - "code" - ], - "additionalProperties": false + "image": { + "nullable": true, + "type": "string" + } }, - "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", + "name", + "username", + "image" + ], + "additionalProperties": false + }, + "section": { + "nullable": true, + "type": "object", + "properties": { + "jwId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "required": [ - "id", - "code", - "nameCn", - "nameEn", - "isCollege" - ], - "additionalProperties": false - }, - "teachers": { - "type": "array", - "items": { + "code": { + "nullable": true, + "type": "string" + }, + "course": { + "nullable": true, "type": "object", "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "personId": { - "nullable": true, - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "teacherId": { - "nullable": true, + "jwId": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "code": { - "nullable": true, "type": "string" }, "nameCn": { "type": "string" - }, - "nameEn": { - "nullable": true, - "type": "string" - }, - "age": { + } + }, + "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 }, - "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": { + "code": { "nullable": true, "type": "string" }, - "departmentId": { - "nullable": true, - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "teacherTitleId": { + "course": { "nullable": true, - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "type": "object", + "properties": { + "jwId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "code": { + "type": "string" + }, + "nameCn": { + "type": "string" + } + }, + "required": [ + "jwId", + "code", + "nameCn" + ], + "additionalProperties": false } }, "required": [ - "id", - "personId", - "teacherId", + "jwId", "code", - "nameCn", - "nameEn", - "age", - "email", - "telephone", - "mobile", - "address", - "postcode", - "qq", - "wechat", - "departmentId", - "teacherTitleId" + "course" ], "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 - }, - "paginatedSemesterResponseSchema": { - "type": "object", - "properties": { - "data": { - "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": { - "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" - ], - "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": [ + "id", + "title", + "section" + ], + "additionalProperties": false } }, "required": [ - "page", - "pageSize", - "total", - "totalPages" - ], - "additionalProperties": false - } - }, - "required": [ - "data", - "pagination" - ], - "additionalProperties": false - }, - "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)))$" + "id", + "content", + "createdAt", + "updatedAt", + "lastEditedAt", + "lastEditedById", + "sectionId", + "courseId", + "teacherId", + "homeworkId", + "lastEditedBy", + "section", + "course", + "teacher", + "homework" + ], + "additionalProperties": false } }, "required": [ - "id", - "jwId", - "nameCn", - "code", - "startDate", - "endDate" + "description" ], "additionalProperties": false }, - "paginatedTeacherResponseSchema": { + "adminUpdateUserRequestSchema": { "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 - } + "name": { + "anyOf": [ + { + "type": "string" }, - "required": [ - "id", - "personId", - "teacherId", - "code", - "nameCn", - "nameEn", - "age", - "email", - "telephone", - "mobile", - "address", - "postcode", - "qq", - "wechat", - "departmentId", - "teacherTitleId", - "department", - "teacherTitle", - "_count" - ], - "additionalProperties": false - } + { + "type": "string", + "nullable": true, + "enum": [ + null + ] + } + ] }, - "pagination": { + "username": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "nullable": true, + "enum": [ + null + ] + } + ] + }, + "isAdmin": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "adminUserResponseSchema": { + "type": "object", + "properties": { + "user": { "type": "object", "properties": { - "page": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "id": { + "type": "string" + }, + "name": { + "nullable": true, + "type": "string" }, - "pageSize": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "username": { + "nullable": true, + "type": "string" }, - "total": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "isAdmin": { + "type": "boolean" }, - "totalPages": { - "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)))$" + }, + "email": { + "nullable": true, + "type": "string" } }, "required": [ - "page", - "pageSize", - "total", - "totalPages" + "id", + "name", + "username", + "isAdmin", + "createdAt", + "email" ], "additionalProperties": false } }, "required": [ - "data", - "pagination" + "user" ], "additionalProperties": false }, - "teacherDetailSchema": { + "oauthDeviceAuthorizationRequestSchema": { "type": "object", "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "personId": { - "nullable": true, - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "client_id": { + "type": "string", + "minLength": 1 }, - "teacherId": { - "nullable": true, - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "resource": { + "anyOf": [ + { + "type": "string", + "minLength": 1 + }, + { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + } + ] }, - "code": { - "nullable": true, + "scope": { + "type": "string", + "minLength": 1 + } + }, + "required": [ + "client_id" + ], + "additionalProperties": false + }, + "oauthDeviceAuthorizationResponseSchema": { + "type": "object", + "properties": { + "device_code": { "type": "string" }, - "nameCn": { + "user_code": { "type": "string" }, - "nameEn": { - "nullable": true, - "type": "string" + "verification_uri": { + "type": "string", + "format": "uri" }, - "age": { - "nullable": true, + "verification_uri_complete": { + "type": "string", + "format": "uri" + }, + "expires_in": { "type": "integer", - "minimum": -9007199254740991, + "exclusiveMinimum": true, "maximum": 9007199254740991 }, - "email": { - "nullable": true, + "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" }, - "telephone": { - "nullable": true, + "error_description": { "type": "string" + } + }, + "required": [ + "error" + ], + "additionalProperties": false + }, + "oauthTokenRequestSchema": { + "type": "object", + "properties": { + "grant_type": { + "type": "string", + "minLength": 1 }, - "mobile": { - "nullable": true, - "type": "string" + "client_id": { + "type": "string", + "minLength": 1 }, - "address": { - "nullable": true, + "client_secret": { "type": "string" }, - "postcode": { - "nullable": true, - "type": "string" + "code": { + "type": "string", + "minLength": 1 }, - "qq": { - "nullable": true, - "type": "string" + "code_verifier": { + "type": "string", + "minLength": 1 }, - "wechat": { - "nullable": true, + "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" }, - "departmentId": { - "nullable": true, + "token_type": { + "type": "string", + "enum": [ + "Bearer" + ] + }, + "expires_in": { "type": "integer", - "minimum": -9007199254740991, + "exclusiveMinimum": true, "maximum": 9007199254740991 }, - "teacherTitleId": { - "nullable": true, + "expires_at": { "type": "integer", - "minimum": -9007199254740991, + "exclusiveMinimum": true, "maximum": 9007199254740991 }, - "department": { + "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 + }, + "homeworkCompletionRequestSchema": { + "type": "object", + "properties": { + "completed": { + "type": "boolean" + } + }, + "required": [ + "completed" + ], + "additionalProperties": false + }, + "homeworkCompletionResponseSchema": { + "type": "object", + "properties": { + "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": [ + "completed", + "completedAt" + ], + "additionalProperties": false + }, + "subscribedHomeworksResponseSchema": { + "type": "object", + "properties": { + "viewer": { "type": "object", "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "code": { + "userId": { + "nullable": true, "type": "string" }, - "nameCn": { + "name": { + "nullable": true, "type": "string" }, - "nameEn": { + "image": { "nullable": true, "type": "string" }, - "isCollege": { - "nullable": true, + "isAdmin": { "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 + "isAuthenticated": { + "type": "boolean" }, - "nameCn": { - "type": "string" + "isSuspended": { + "type": "boolean" }, - "nameEn": { + "suspensionReason": { "nullable": true, "type": "string" }, - "code": { - "type": "string" - }, - "enabled": { + "suspensionExpiresAt": { "nullable": true, - "type": "boolean" + "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", - "nameEn", - "code", - "enabled" + "userId", + "name", + "image", + "isAdmin", + "isAuthenticated", + "isSuspended", + "suspensionReason", + "suspensionExpiresAt" ], "additionalProperties": false }, - "sections": { + "homeworks": { "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, + "title": { "type": "string" }, - "dateTimePlacePersonText": { - "nullable": true - }, - "actualPeriods": { - "nullable": true, - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "theoryPeriods": { - "nullable": true, - "type": "number" - }, - "practicePeriods": { - "nullable": true, - "type": "number" + "isMajor": { + "type": "boolean" }, - "experimentPeriods": { - "nullable": true, - "type": "number" + "requiresTeam": { + "type": "boolean" }, - "machinePeriods": { + "publishedAt": { "nullable": true, - "type": "number" + "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)))$" }, - "designPeriods": { + "submissionStartAt": { "nullable": true, - "type": "number" + "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)))$" }, - "testPeriods": { + "submissionDueAt": { "nullable": true, - "type": "number" + "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)))$" }, - "scheduleState": { - "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)))$" }, - "suggestScheduleWeeks": { - "nullable": true + "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)))$" }, - "suggestScheduleWeekInfo": { + "deletedAt": { "nullable": true, - "type": "string" - }, - "scheduleJsonParams": { - "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)))$" }, - "selectedStdCount": { - "nullable": true, + "sectionId": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "remark": { + "createdById": { "nullable": true, "type": "string" }, - "scheduleRemark": { + "updatedById": { "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": { + "deletedById": { "nullable": true, - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "type": "string" }, - "course": { + "section": { "type": "object", "properties": { "id": { @@ -24452,59 +26604,165 @@ "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "jwId": { + "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 }, - "code": { + "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" }, - "nameCn": { + "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" }, - "nameEn": { + "suggestScheduleWeeks": { + "nullable": true + }, + "suggestScheduleWeekInfo": { "nullable": true, "type": "string" }, - "categoryId": { + "scheduleJsonParams": { + "nullable": true + }, + "selectedStdCount": { "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "classTypeId": { + "remark": { "nullable": true, + "type": "string" + }, + "scheduleRemark": { + "nullable": true, + "type": "string" + }, + "courseId": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "classifyId": { + "semesterId": { "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "educationLevelId": { + "campusId": { "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "gradationId": { + "examModeId": { "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "typeId": { + "openDepartmentId": { "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "category": { + "teachLanguageId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "roomTypeId": { "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "course": { "type": "object", "properties": { "id": { @@ -24512,898 +26770,1301 @@ "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": { + "jwId": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, + "code": { + "type": "string" + }, "nameCn": { "type": "string" }, "nameEn": { "nullable": true, "type": "string" - } - }, - "required": [ - "id", - "nameCn", - "nameEn" - ], - "additionalProperties": false - }, - "classify": { - "nullable": true, - "type": "object", - "properties": { - "id": { + }, + "categoryId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "nameCn": { - "type": "string" - }, - "nameEn": { + "classTypeId": { "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" + "classifyId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "nameEn": { + "educationLevelId": { "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" + "gradationId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "nameEn": { + "typeId": { "nullable": true, - "type": "string" - } - }, - "required": [ - "id", - "nameCn", - "nameEn" - ], - "additionalProperties": false - }, - "type": { - "nullable": true, - "type": "object", - "properties": { - "id": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "nameCn": { + "namePrimary": { "type": "string" }, - "nameEn": { + "nameSecondary": { "nullable": true, "type": "string" } }, "required": [ "id", + "jwId", + "code", "nameCn", - "nameEn" + "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", - "categoryId", - "classTypeId", - "classifyId", - "educationLevelId", - "gradationId", - "typeId", - "category", - "classType", - "classify", - "educationLevel", - "gradation", - "type" + "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": { + "description": { "nullable": true, "type": "object", "properties": { "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "jwId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "nameCn": { "type": "string" }, - "code": { + "content": { "type": "string" }, - "startDate": { - "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)))$" }, - "endDate": { - "nullable": true, + "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", - "jwId", - "nameCn", - "code", - "startDate", - "endDate" - ], - "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 - } - }, - "_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", - "sections", - "_count" - ], - "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 - }, - "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" + }, + "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 }, - "filename": { - "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 }, - "size": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "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)))$" - } - }, - "required": [ - "id", - "key", - "filename", - "size", - "createdAt" - ], - "additionalProperties": false - } - }, - "usedBytes": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - } - }, - "required": [ - "maxFileSizeBytes", - "quotaBytes", - "uploads", - "usedBytes" - ], - "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 - }, - "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 - }, - "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 + "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 + } }, - "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 - }, - "__schema0": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "body": { - "type": "string" - }, - "visibility": { - "type": "string" - }, - "status": { - "type": "string" + "required": [ + "id", + "title", + "isMajor", + "requiresTeam", + "publishedAt", + "submissionStartAt", + "submissionDueAt", + "createdAt", + "updatedAt", + "deletedAt", + "sectionId", + "createdById", + "updatedById", + "deletedById", + "section", + "description", + "createdBy", + "updatedBy", + "deletedBy", + "completion", + "commentCount" + ], + "additionalProperties": false + } }, - "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" + "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 + } }, - "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" + "required": [ + "id", + "action", + "titleSnapshot", + "createdAt", + "sectionId", + "homeworkId", + "actorId", + "actor" + ], + "additionalProperties": false + } }, - "replies": { + "sectionIds": { "type": "array", "items": { - "$ref": "#/components/schemas/__schema0" + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 } - }, - "attachments": { + } + }, + "required": [ + "viewer", + "homeworks", + "auditLogs", + "sectionIds" + ], + "additionalProperties": false + }, + "subscribedSchedulesResponseSchema": { + "type": "object", + "properties": { + "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" }, - "uploadId": { + "endTime": { "type": "string" }, - "filename": { + "experiment": { + "nullable": true, "type": "string" }, - "url": { + "customPlace": { + "nullable": true, "type": "string" }, - "contentType": { + "lessonType": { "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" + "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 + } }, - "count": { - "type": "integer", - "minimum": 0, - "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 }, - "viewerHasReacted": { - "type": "boolean" + "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": [ - "type", - "count", - "viewerHasReacted" + "id", + "periods", + "date", + "weekday", + "startTime", + "endTime", + "experiment", + "customPlace", + "lessonType", + "weekIndex", + "exerciseClass", + "startUnit", + "endUnit", + "roomId", + "sectionId", + "scheduleGroupId", + "room", + "teachers", + "section", + "scheduleGroup" ], "additionalProperties": false } - }, - "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", - "canReply", - "canEdit", - "canDelete", - "canModerate" + "schedules" ], "additionalProperties": false } - } - }, - "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" - ] + "securitySchemes": { + "bearerAuth": { + "type": "http", + "scheme": "bearer", + "bearerFormat": "JWT", + "description": "OAuth access token accepted by protected REST endpoints when it carries rest:read for reads or rest:write for mutations. These endpoints also accept an in-site Better Auth session cookie." + }, + "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." + }, + "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." + } } - ] + } } 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 d2d3912..7487169 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", @@ -37,6 +38,7 @@ var generatedAPIPaths = []string{ "/api/dashboard-links/pin", "/api/dashboard-links/visit", "/api/descriptions", + "/api/health", "/api/homeworks", "/api/homeworks/completions", "/api/homeworks/{id}", @@ -50,7 +52,9 @@ var generatedAPIPaths = []string{ "/api/me/subscriptions/homeworks", "/api/me/subscriptions/schedules", "/api/metadata", + "/api/metrics", "/api/openapi", + "/api/readiness", "/api/schedules", "/api/sections", "/api/sections/calendar.ics", @@ -70,5 +74,6 @@ var generatedAPIPaths = []string{ "/api/uploads/object", "/api/uploads/{id}", "/api/uploads/{id}/download", + "/api/users/profile", "/api/users/{userId}/calendar.ics", } diff --git a/internal/cmd/comment/comment.go b/internal/cmd/comment/comment.go index dda65ea..083a9f5 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 } @@ -454,7 +441,7 @@ func newCmdDelete() *cobra.Command { if err != nil { return err } - _, err = api.ParseResponseRaw(c.DeleteCommentWithBody(api.Ctx(), id, "application/json", strings.NewReader("{}"))) + _, err = api.ParseResponseRaw(c.DeleteComment(api.Ctx(), id)) if err != nil { return err } @@ -482,10 +469,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/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..68fc369 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 } 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..f69db64 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 } @@ -1019,10 +1025,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 +1115,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 +1230,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..f669d85 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 } @@ -535,7 +539,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 +615,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/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..69ac500 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,16 @@ 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 @@ -187,7 +322,6 @@ func (e CommentCreateRequestSchemaTargetType) Valid() bool { // Defines values for CommentCreateRequestSchemaVisibility. const ( - CommentCreateRequestSchemaVisibilityAnonymous CommentCreateRequestSchemaVisibility = "anonymous" CommentCreateRequestSchemaVisibilityLoggedInOnly CommentCreateRequestSchemaVisibility = "logged_in_only" CommentCreateRequestSchemaVisibilityPublic CommentCreateRequestSchemaVisibility = "public" ) @@ -195,8 +329,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 +376,6 @@ func (e CommentReactionRequestSchemaType) Valid() bool { // Defines values for CommentUpdateRequestSchemaVisibility. const ( - CommentUpdateRequestSchemaVisibilityAnonymous CommentUpdateRequestSchemaVisibility = "anonymous" CommentUpdateRequestSchemaVisibilityLoggedInOnly CommentUpdateRequestSchemaVisibility = "logged_in_only" CommentUpdateRequestSchemaVisibilityPublic CommentUpdateRequestSchemaVisibility = "public" ) @@ -252,8 +383,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,6 +392,63 @@ 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 DashboardLinkPinRequestSchemaAction. const ( Pin DashboardLinkPinRequestSchemaAction = "pin" @@ -305,1719 +491,1022 @@ 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: - return true - case TodosListResponseSchemaTodosPriorityLow: + case HomeworkCompletionBatchResponseSchemaResults1ErrorCodeDeleted: 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: + case HomeworkCreateRequestSchema1SubmissionDueAt1LessThannil: return true - case CreateCommentParamsTargetTypeSectionTeacher: + 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 - case CreateCommentParamsTargetTypeTeacher: + default: + return false + } +} + +// Defines values for HomeworkUpdateRequestSchemaPublishedAt1. +const ( + HomeworkUpdateRequestSchemaPublishedAt1LessThannil HomeworkUpdateRequestSchemaPublishedAt1 = "" +) + +// Valid indicates whether the value is a known member of the HomeworkUpdateRequestSchemaPublishedAt1 enum. +func (e HomeworkUpdateRequestSchemaPublishedAt1) Valid() bool { + switch e { + case HomeworkUpdateRequestSchemaPublishedAt1LessThannil: return true default: return false } } -// Defines values for RemoveCommentReactionParamsType. +// Defines values for HomeworkUpdateRequestSchemaSubmissionDueAt1. 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" + HomeworkUpdateRequestSchemaSubmissionDueAt1LessThannil HomeworkUpdateRequestSchemaSubmissionDueAt1 = "" ) -// 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 HomeworkUpdateRequestSchemaSubmissionDueAt1 enum. +func (e HomeworkUpdateRequestSchemaSubmissionDueAt1) Valid() bool { switch e { - case RemoveCommentReactionParamsTypeConfused: + case HomeworkUpdateRequestSchemaSubmissionDueAt1LessThannil: return true - case RemoveCommentReactionParamsTypeDownvote: + 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 RemoveCommentReactionParamsTypeEyes: + 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 RemoveCommentReactionParamsTypeHeart: + case HomeworksListResponseSchemaAuditLogsActionDeleted: return true - case RemoveCommentReactionParamsTypeHooray: + 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 RemoveCommentReactionParamsTypeLaugh: + case LocaleUpdateRequestSchemaLocaleZhCn: return true - case RemoveCommentReactionParamsTypeRocket: + 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 - case RemoveCommentReactionParamsTypeUpvote: + default: + return false + } +} + +// Defines values for ReadinessResponseSchemaChecksDatabaseStatus. +const ( + ReadinessResponseSchemaChecksDatabaseStatusError ReadinessResponseSchemaChecksDatabaseStatus = "error" + ReadinessResponseSchemaChecksDatabaseStatusOk ReadinessResponseSchemaChecksDatabaseStatus = "ok" +) + +// Valid indicates whether the value is a known member of the ReadinessResponseSchemaChecksDatabaseStatus enum. +func (e ReadinessResponseSchemaChecksDatabaseStatus) Valid() bool { + switch e { + case ReadinessResponseSchemaChecksDatabaseStatusError: + return true + case ReadinessResponseSchemaChecksDatabaseStatusOk: return true default: return false } } -// Defines values for GetDescriptionParamsTargetType. +// Defines values for ReadinessResponseSchemaStatus. const ( - GetDescriptionParamsTargetTypeCourse GetDescriptionParamsTargetType = "course" - GetDescriptionParamsTargetTypeHomework GetDescriptionParamsTargetType = "homework" - GetDescriptionParamsTargetTypeSection GetDescriptionParamsTargetType = "section" - GetDescriptionParamsTargetTypeTeacher GetDescriptionParamsTargetType = "teacher" + ReadinessResponseSchemaStatusDegraded ReadinessResponseSchemaStatus = "degraded" + ReadinessResponseSchemaStatusOk ReadinessResponseSchemaStatus = "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 ReadinessResponseSchemaStatus enum. +func (e ReadinessResponseSchemaStatus) Valid() bool { switch e { - case GetDescriptionParamsTargetTypeCourse: + case ReadinessResponseSchemaStatusDegraded: return true - case GetDescriptionParamsTargetTypeHomework: + case ReadinessResponseSchemaStatusOk: return true - case GetDescriptionParamsTargetTypeSection: + default: + return false + } +} + +// Defines values for SubscribedHomeworksResponseSchemaAuditLogsAction. +const ( + SubscribedHomeworksResponseSchemaAuditLogsActionCreated SubscribedHomeworksResponseSchemaAuditLogsAction = "created" + SubscribedHomeworksResponseSchemaAuditLogsActionDeleted SubscribedHomeworksResponseSchemaAuditLogsAction = "deleted" +) + +// Valid indicates whether the value is a known member of the SubscribedHomeworksResponseSchemaAuditLogsAction enum. +func (e SubscribedHomeworksResponseSchemaAuditLogsAction) Valid() bool { + switch e { + case SubscribedHomeworksResponseSchemaAuditLogsActionCreated: return true - case GetDescriptionParamsTargetTypeTeacher: + case SubscribedHomeworksResponseSchemaAuditLogsActionDeleted: + return true + 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 UpsertDescriptionParamsTargetType. +// Defines values for TodoCreateRequestSchemaPriority. const ( - UpsertDescriptionParamsTargetTypeCourse UpsertDescriptionParamsTargetType = "course" - UpsertDescriptionParamsTargetTypeHomework UpsertDescriptionParamsTargetType = "homework" - UpsertDescriptionParamsTargetTypeSection UpsertDescriptionParamsTargetType = "section" - UpsertDescriptionParamsTargetTypeTeacher UpsertDescriptionParamsTargetType = "teacher" + TodoCreateRequestSchemaPriorityHigh TodoCreateRequestSchemaPriority = "high" + TodoCreateRequestSchemaPriorityLow TodoCreateRequestSchemaPriority = "low" + TodoCreateRequestSchemaPriorityMedium TodoCreateRequestSchemaPriority = "medium" ) -// 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 TodoCreateRequestSchemaPriority enum. +func (e TodoCreateRequestSchemaPriority) Valid() bool { switch e { - case UpsertDescriptionParamsTargetTypeCourse: + case TodoCreateRequestSchemaPriorityHigh: return true - case UpsertDescriptionParamsTargetTypeHomework: + case TodoCreateRequestSchemaPriorityLow: return true - case UpsertDescriptionParamsTargetTypeSection: + case TodoCreateRequestSchemaPriorityMedium: return true - case UpsertDescriptionParamsTargetTypeTeacher: + default: + return false + } +} + +// Defines values for TodoUpdateRequestSchemaDueAt1. +const ( + LessThannil TodoUpdateRequestSchemaDueAt1 = "" +) + +// 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 } } -// Defines values for ListHomeworksParamsIncludeDeleted. +// Defines values for TodoUpdateRequestSchemaPriority. const ( - ListHomeworksParamsIncludeDeletedFalse ListHomeworksParamsIncludeDeleted = "false" - ListHomeworksParamsIncludeDeletedTrue ListHomeworksParamsIncludeDeleted = "true" + TodoUpdateRequestSchemaPriorityHigh TodoUpdateRequestSchemaPriority = "high" + TodoUpdateRequestSchemaPriorityLow TodoUpdateRequestSchemaPriority = "low" + TodoUpdateRequestSchemaPriorityMedium TodoUpdateRequestSchemaPriority = "medium" ) -// 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 TodoUpdateRequestSchemaPriority enum. +func (e TodoUpdateRequestSchemaPriority) Valid() bool { switch e { - case ListHomeworksParamsIncludeDeletedFalse: + case TodoUpdateRequestSchemaPriorityHigh: return true - case ListHomeworksParamsIncludeDeletedTrue: + case TodoUpdateRequestSchemaPriorityLow: + return true + case TodoUpdateRequestSchemaPriorityMedium: return true default: return false } } -// Defines values for CreateHomeworkParamsIncludeDeleted. +// Defines values for TodoUpdateResponseSchemaTodoPriority. const ( - CreateHomeworkParamsIncludeDeletedFalse CreateHomeworkParamsIncludeDeleted = "false" - CreateHomeworkParamsIncludeDeletedTrue CreateHomeworkParamsIncludeDeleted = "true" + TodoUpdateResponseSchemaTodoPriorityHigh TodoUpdateResponseSchemaTodoPriority = "high" + TodoUpdateResponseSchemaTodoPriorityLow TodoUpdateResponseSchemaTodoPriority = "low" + TodoUpdateResponseSchemaTodoPriorityMedium TodoUpdateResponseSchemaTodoPriority = "medium" ) -// 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 TodoUpdateResponseSchemaTodoPriority enum. +func (e TodoUpdateResponseSchemaTodoPriority) Valid() bool { switch e { - case CreateHomeworkParamsIncludeDeletedFalse: + case TodoUpdateResponseSchemaTodoPriorityHigh: + return true + case TodoUpdateResponseSchemaTodoPriorityLow: return true - case CreateHomeworkParamsIncludeDeletedTrue: + case TodoUpdateResponseSchemaTodoPriorityMedium: return true default: return false } } -// Defines values for ListTodosParamsCompleted. +// Defines values for TodosListResponseSchemaTodosPriority. const ( - ListTodosParamsCompletedFalse ListTodosParamsCompleted = "false" - ListTodosParamsCompletedTrue ListTodosParamsCompleted = "true" + TodosListResponseSchemaTodosPriorityHigh TodosListResponseSchemaTodosPriority = "high" + TodosListResponseSchemaTodosPriorityLow TodosListResponseSchemaTodosPriority = "low" + TodosListResponseSchemaTodosPriorityMedium TodosListResponseSchemaTodosPriority = "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 TodosListResponseSchemaTodosPriority enum. +func (e TodosListResponseSchemaTodosPriority) Valid() bool { switch e { - case ListTodosParamsCompletedFalse: + case TodosListResponseSchemaTodosPriorityHigh: return true - case ListTodosParamsCompletedTrue: + case TodosListResponseSchemaTodosPriorityLow: + return true + case TodosListResponseSchemaTodosPriorityMedium: return true default: return false } } -// Defines values for ListTodosParamsPriority. +// Defines values for ListAdminCommentsParamsStatus. const ( - ListTodosParamsPriorityHigh ListTodosParamsPriority = "high" - ListTodosParamsPriorityLow ListTodosParamsPriority = "low" - ListTodosParamsPriorityMedium ListTodosParamsPriority = "medium" + ListAdminCommentsParamsStatusActive ListAdminCommentsParamsStatus = "active" + ListAdminCommentsParamsStatusAll ListAdminCommentsParamsStatus = "all" + ListAdminCommentsParamsStatusDeleted ListAdminCommentsParamsStatus = "deleted" + ListAdminCommentsParamsStatusSoftbanned ListAdminCommentsParamsStatus = "softbanned" + ListAdminCommentsParamsStatusSuspended ListAdminCommentsParamsStatus = "suspended" ) -// 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 ListAdminCommentsParamsStatus enum. +func (e ListAdminCommentsParamsStatus) Valid() bool { switch e { - case ListTodosParamsPriorityHigh: + case ListAdminCommentsParamsStatusActive: + return true + case ListAdminCommentsParamsStatusAll: + return true + case ListAdminCommentsParamsStatusDeleted: return true - case ListTodosParamsPriorityLow: + case ListAdminCommentsParamsStatusSoftbanned: return true - case ListTodosParamsPriorityMedium: + case ListAdminCommentsParamsStatusSuspended: return true default: return false } } -// Defines values for CreateTodoParamsCompleted. +// Defines values for ListAdminDescriptionsParamsTargetType. const ( - CreateTodoParamsCompletedFalse CreateTodoParamsCompleted = "false" - CreateTodoParamsCompletedTrue CreateTodoParamsCompleted = "true" + ListAdminDescriptionsParamsTargetTypeAll ListAdminDescriptionsParamsTargetType = "all" + ListAdminDescriptionsParamsTargetTypeCourse ListAdminDescriptionsParamsTargetType = "course" + ListAdminDescriptionsParamsTargetTypeHomework ListAdminDescriptionsParamsTargetType = "homework" + ListAdminDescriptionsParamsTargetTypeSection ListAdminDescriptionsParamsTargetType = "section" + ListAdminDescriptionsParamsTargetTypeTeacher ListAdminDescriptionsParamsTargetType = "teacher" ) -// 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 ListAdminDescriptionsParamsTargetType enum. +func (e ListAdminDescriptionsParamsTargetType) Valid() bool { switch e { - case CreateTodoParamsCompletedFalse: + case ListAdminDescriptionsParamsTargetTypeAll: return true - case CreateTodoParamsCompletedTrue: + case ListAdminDescriptionsParamsTargetTypeCourse: + return true + case ListAdminDescriptionsParamsTargetTypeHomework: + return true + case ListAdminDescriptionsParamsTargetTypeSection: + return true + case ListAdminDescriptionsParamsTargetTypeTeacher: return true default: return false } } -// Defines values for CreateTodoParamsPriority. +// Defines values for ListAdminDescriptionsParamsHasContent. const ( - High CreateTodoParamsPriority = "high" - Low CreateTodoParamsPriority = "low" - Medium CreateTodoParamsPriority = "medium" + ListAdminDescriptionsParamsHasContentAll ListAdminDescriptionsParamsHasContent = "all" + ListAdminDescriptionsParamsHasContentEmpty ListAdminDescriptionsParamsHasContent = "empty" + ListAdminDescriptionsParamsHasContentWithContent ListAdminDescriptionsParamsHasContent = "withContent" ) -// 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 ListAdminDescriptionsParamsHasContent enum. +func (e ListAdminDescriptionsParamsHasContent) Valid() bool { switch e { - case High: + case ListAdminDescriptionsParamsHasContentAll: return true - case Low: + case ListAdminDescriptionsParamsHasContentEmpty: return true - case Medium: + case ListAdminDescriptionsParamsHasContentWithContent: 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 ListAdminHomeworksParamsStatus. +const ( + Active ListAdminHomeworksParamsStatus = "active" + All ListAdminHomeworksParamsStatus = "all" + Deleted ListAdminHomeworksParamsStatus = "deleted" +) -// AdminCommentsResponseSchemaCommentsStatus defines model for AdminCommentsResponseSchema.Comments.Status. -type AdminCommentsResponseSchemaCommentsStatus string +// 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 + } +} -// AdminCommentsResponseSchemaCommentsVisibility defines model for AdminCommentsResponseSchema.Comments.Visibility. -type AdminCommentsResponseSchemaCommentsVisibility string +// Defines values for GetApiBusNextParamsDayType. +const ( + Auto GetApiBusNextParamsDayType = "auto" + Weekday GetApiBusNextParamsDayType = "weekday" + Weekend GetApiBusNextParamsDayType = "weekend" +) -// 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 GetApiBusNextParamsDayType enum. +func (e GetApiBusNextParamsDayType) Valid() bool { + switch e { + case Auto: + return true + case Weekday: + return true + case Weekend: + 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 GetApiBusNextParamsIncludeDeparted. +const ( + GetApiBusNextParamsIncludeDepartedFalse GetApiBusNextParamsIncludeDeparted = "false" + GetApiBusNextParamsIncludeDepartedTrue GetApiBusNextParamsIncludeDeparted = "true" +) -// 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 GetApiBusNextParamsIncludeDeparted enum. +func (e GetApiBusNextParamsIncludeDeparted) Valid() bool { + switch e { + case GetApiBusNextParamsIncludeDepartedFalse: + return true + case GetApiBusNextParamsIncludeDepartedTrue: + 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 GetApiBusNextParamsLocale. +const ( + GetApiBusNextParamsLocaleEnUs GetApiBusNextParamsLocale = "en-us" + GetApiBusNextParamsLocaleZhCn GetApiBusNextParamsLocale = "zh-cn" +) + +// 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 + } } -// AdminModerateCommentRequestSchemaStatus defines model for AdminModerateCommentRequestSchema.Status. -type AdminModerateCommentRequestSchemaStatus string +// Defines values for GetApiBusRoutesParamsLocale. +const ( + GetApiBusRoutesParamsLocaleEnUs GetApiBusRoutesParamsLocale = "en-us" + GetApiBusRoutesParamsLocaleZhCn GetApiBusRoutesParamsLocale = "zh-cn" +) -// 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 GetApiBusRoutesParamsLocale enum. +func (e GetApiBusRoutesParamsLocale) Valid() bool { + switch e { + case GetApiBusRoutesParamsLocaleEnUs: + return true + case GetApiBusRoutesParamsLocaleZhCn: + return true + default: + return false + } } -// AdminModeratedCommentResponseSchemaCommentStatus defines model for AdminModeratedCommentResponseSchema.Comment.Status. -type AdminModeratedCommentResponseSchemaCommentStatus string +// Defines values for ListCommentsParamsTargetType. +const ( + ListCommentsParamsTargetTypeCourse ListCommentsParamsTargetType = "course" + ListCommentsParamsTargetTypeHomework ListCommentsParamsTargetType = "homework" + ListCommentsParamsTargetTypeSection ListCommentsParamsTargetType = "section" + ListCommentsParamsTargetTypeSectionTeacher ListCommentsParamsTargetType = "section-teacher" + ListCommentsParamsTargetTypeTeacher ListCommentsParamsTargetType = "teacher" +) -// AdminModeratedCommentResponseSchemaCommentVisibility defines model for AdminModeratedCommentResponseSchema.Comment.Visibility. -type AdminModeratedCommentResponseSchemaCommentVisibility string +// 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 + } +} -// 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"` -} +// 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" +) -// 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"` +// 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 + } } -// AdminUpdateUserRequestSchema defines model for adminUpdateUserRequestSchema. -type AdminUpdateUserRequestSchema struct { - IsAdmin *bool `json:"isAdmin,omitempty"` - Name *string `json:"name,omitempty"` - Username *string `json:"username,omitempty"` -} +// Defines values for GetDescriptionParamsTargetType. +const ( + GetDescriptionParamsTargetTypeCourse GetDescriptionParamsTargetType = "course" + GetDescriptionParamsTargetTypeHomework GetDescriptionParamsTargetType = "homework" + GetDescriptionParamsTargetTypeSection GetDescriptionParamsTargetType = "section" + GetDescriptionParamsTargetTypeTeacher GetDescriptionParamsTargetType = "teacher" +) -// 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"` +// 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 + } } -// 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"` -} +// Defines values for ListHomeworksParamsIncludeDeleted. +const ( + ListHomeworksParamsIncludeDeletedFalse ListHomeworksParamsIncludeDeleted = "false" + ListHomeworksParamsIncludeDeletedTrue ListHomeworksParamsIncludeDeleted = "true" +) -// BusPreferenceRequestSchema defines model for busPreferenceRequestSchema. -type BusPreferenceRequestSchema struct { - PreferredDestinationCampusId *int `json:"preferredDestinationCampusId"` - PreferredOriginCampusId *int `json:"preferredOriginCampusId"` - ShowDepartedTrips bool `json:"showDepartedTrips"` +// 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 + } } -// BusPreferenceResponseSchema defines model for busPreferenceResponseSchema. -type BusPreferenceResponseSchema struct { - Preference struct { - PreferredDestinationCampusId *int `json:"preferredDestinationCampusId"` - PreferredOriginCampusId *int `json:"preferredOriginCampusId"` - ShowDepartedTrips bool `json:"showDepartedTrips"` - } `json:"preference"` -} +// Defines values for GetApiMeOverviewParamsLocale. +const ( + GetApiMeOverviewParamsLocaleEnUs GetApiMeOverviewParamsLocale = "en-us" + GetApiMeOverviewParamsLocaleZhCn GetApiMeOverviewParamsLocale = "zh-cn" +) -// 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"` +// 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 + } } -// BusQueryResponseSchemaLocale defines model for BusQueryResponseSchema.Locale. -type BusQueryResponseSchemaLocale string +// Defines values for GetApiMeSubscriptionsSchedulesParamsLocale. +const ( + GetApiMeSubscriptionsSchedulesParamsLocaleEnUs GetApiMeSubscriptionsSchedulesParamsLocale = "en-us" + GetApiMeSubscriptionsSchedulesParamsLocaleZhCn GetApiMeSubscriptionsSchedulesParamsLocale = "zh-cn" +) -// BusQueryResponseSchemaTripsDayType defines model for BusQueryResponseSchema.Trips.DayType. -type BusQueryResponseSchemaTripsDayType string +// 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 + } +} -// CalendarSubscriptionCreateRequestSchema defines model for calendarSubscriptionCreateRequestSchema. -type CalendarSubscriptionCreateRequestSchema struct { - SectionIds *[]int `json:"sectionIds,omitempty"` +// Defines values for ListTodosParamsCompleted. +const ( + False ListTodosParamsCompleted = "false" + True ListTodosParamsCompleted = "true" +) + +// 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 + } } -// 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 ListTodosParamsPriority. +const ( + High ListTodosParamsPriority = "high" + Low ListTodosParamsPriority = "low" + Medium ListTodosParamsPriority = "medium" +) -// 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 ListTodosParamsPriority enum. +func (e ListTodosParamsPriority) Valid() bool { + switch e { + case High: + return true + case Low: + return true + case Medium: + return true + default: + return false + } } -// CommentCreateRequestSchemaTargetType defines model for CommentCreateRequestSchema.TargetType. -type CommentCreateRequestSchemaTargetType string - -// CommentCreateRequestSchemaVisibility defines model for CommentCreateRequestSchema.Visibility. -type CommentCreateRequestSchemaVisibility string +// 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"` +} -// CommentReactionRequestSchema defines model for commentReactionRequestSchema. -type CommentReactionRequestSchema struct { - Type CommentReactionRequestSchemaType `json:"type"` +// 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"` } -// CommentReactionRequestSchemaType defines model for CommentReactionRequestSchema.Type. -type CommentReactionRequestSchemaType string +// AdminCommentsResponseSchemaCommentsStatus defines model for AdminCommentsResponseSchema.Comments.Status. +type AdminCommentsResponseSchemaCommentsStatus 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"` -} +// AdminCommentsResponseSchemaCommentsVisibility defines model for AdminCommentsResponseSchema.Comments.Visibility. +type AdminCommentsResponseSchemaCommentsVisibility string -// 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"` +// 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"` } -// CommentUpdateRequestSchemaVisibility defines model for CommentUpdateRequestSchema.Visibility. -type CommentUpdateRequestSchemaVisibility string +// AdminCreateSuspensionRequestSchemaExpiresAt0 defines model for . +type AdminCreateSuspensionRequestSchemaExpiresAt0 = string -// 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"` +// AdminCreateSuspensionRequestSchemaExpiresAt1 defines model for AdminCreateSuspensionRequestSchema.ExpiresAt.1. +type AdminCreateSuspensionRequestSchemaExpiresAt1 string + +// AdminCreateSuspensionRequestSchema_ExpiresAt defines model for AdminCreateSuspensionRequestSchema.ExpiresAt. +type AdminCreateSuspensionRequestSchema_ExpiresAt struct { + union json.RawMessage } -// 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"` -} - -// 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"` -} - -// 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 { +// 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"` - 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"` -} - -// 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 - -// DashboardLinkVisitRequestSchema defines model for dashboardLinkVisitRequestSchema. -type DashboardLinkVisitRequestSchema struct { - Slug string `json:"slug"` -} - -// DescriptionUpsertRequestSchema defines model for descriptionUpsertRequestSchema. -type DescriptionUpsertRequestSchema struct { - Content string `json:"content"` - TargetId string `json:"targetId"` - TargetType DescriptionUpsertRequestSchemaTargetType `json:"targetType"` -} - -// DescriptionUpsertRequestSchemaTargetType defines model for DescriptionUpsertRequestSchema.TargetType. -type DescriptionUpsertRequestSchemaTargetType 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"` + 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"` @@ -2025,87 +1514,29 @@ type DescriptionsResponseSchema struct { 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"` -} - -// 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 { - 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"` -} - -// 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"` + 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"` } -// 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"` +// 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 +1544,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 { +// 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"` + 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"` - 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"` - Semester struct { - Code *string `json:"code"` - Id int `json:"id"` - NameCn *string `json:"nameCn"` - } `json:"semester"` - Total int `json:"total"` - UnmatchedCodes []string `json:"unmatchedCodes"` + 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,93 +1770,360 @@ 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"` +// 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"` + 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 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"` +} + +// BusNextDeparturesResponseSchemaDayType defines model for BusNextDeparturesResponseSchema.DayType. +type BusNextDeparturesResponseSchemaDayType string + +// 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"` +} + +// BusPreferenceResponseSchema defines model for busPreferenceResponseSchema. +type BusPreferenceResponseSchema struct { + Preference struct { + PreferredDestinationCampusId *int `json:"preferredDestinationCampusId"` + PreferredOriginCampusId *int `json:"preferredOriginCampusId"` + ShowDepartedTrips bool `json:"showDepartedTrips"` + } `json:"preference"` +} + +// 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"` - 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"` - } `json:"building"` - BuildingId *int `json:"buildingId"` - Code string `json:"code"` - Floor *int `json:"floor"` + } `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"` - 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"` + } `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"` - 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"` - } `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:"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"` @@ -2617,41 +2137,7 @@ type PaginatedScheduleResponseSchema struct { 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 { + OpenDepartment *struct { Code string `json:"code"` Id int `json:"id"` IsCollege *bool `json:"isCollege"` @@ -2659,195 +2145,3058 @@ type PaginatedScheduleResponseSchema struct { 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:"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"` } -// 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"` +// CalendarSubscriptionCreateRequestSchema defines model for calendarSubscriptionCreateRequestSchema. +type CalendarSubscriptionCreateRequestSchema struct { + SectionIds *[]int `json:"sectionIds,omitempty"` } -// PaginatedSemesterResponseSchema defines model for paginatedSemesterResponseSchema. +// 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"` +} + +// 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"` +} + +// 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"` +} + +// 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 { - 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"` + 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"` @@ -2857,990 +5206,3666 @@ type PaginatedSemesterResponseSchema struct { } `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"` + } `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"` + Exams []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"` + SectionId int `json:"sectionId"` + StartTime *int `json:"startTime"` + } `json:"exams"` + 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"` + RoomType *struct { + Code string `json:"code"` + Id int `json:"id"` + JwId int `json:"jwId"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"roomType"` + RoomTypeId *int `json:"roomTypeId"` + ScheduleGroups []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:"scheduleGroups"` + ScheduleJsonParams interface{} `json:"scheduleJsonParams"` + ScheduleRemark *string `json:"scheduleRemark"` + ScheduleState *string `json:"scheduleState"` + 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"` + RoomId *int `json:"roomId"` + ScheduleGroupId int `json:"scheduleGroupId"` + SectionId int `json:"sectionId"` + StartTime string `json:"startTime"` + StartUnit int `json:"startUnit"` + WeekIndex int `json:"weekIndex"` + Weekday int `json:"weekday"` + } `json:"schedules"` + 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"` + NameEn *string `json:"nameEn"` + } `json:"teachLanguage"` + TeachLanguageId *int `json:"teachLanguageId"` + TeacherAssignments []struct { + Id int `json:"id"` + Period *int `json:"period"` + Role *string `json:"role"` + SectionId int `json:"sectionId"` + Teacher 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:"teacher"` + TeacherId int `json:"teacherId"` + TeacherLessonType *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"` + Role *string `json:"role"` + } `json:"teacherLessonType"` + TeacherLessonTypeId *int `json:"teacherLessonTypeId"` + WeekIndices *[]int `json:"weekIndices"` + WeekIndicesMsg *string `json:"weekIndicesMsg"` + } `json:"teacherAssignments"` + 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"` + } `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:"teachers"` + TestPeriods *float32 `json:"testPeriods"` + TheoryPeriods *float32 `json:"theoryPeriods"` + 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"` +} + +// 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"` +} + +// 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 + +// PostApiCalendarSubscriptionsImportCodesJSONRequestBody defines body for PostApiCalendarSubscriptionsImportCodes for application/json ContentType. +type PostApiCalendarSubscriptionsImportCodesJSONRequestBody = MatchSectionCodesRequestSchema + +// CreateCommentJSONRequestBody defines body for CreateComment for application/json ContentType. +type CreateCommentJSONRequestBody = CommentCreateRequestSchema + +// 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 + +// 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 + +// 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 +} + +// 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 } -// 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"` - } `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"` - Exams []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"` - SectionId int `json:"sectionId"` - StartTime *int `json:"startTime"` - } `json:"exams"` - 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"` - RoomType *struct { - Code string `json:"code"` - Id int `json:"id"` - JwId int `json:"jwId"` - NameCn string `json:"nameCn"` - NameEn *string `json:"nameEn"` - } `json:"roomType"` - RoomTypeId *int `json:"roomTypeId"` - ScheduleGroups []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:"scheduleGroups"` - ScheduleJsonParams interface{} `json:"scheduleJsonParams"` - ScheduleRemark *string `json:"scheduleRemark"` - ScheduleState *string `json:"scheduleState"` - 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"` - RoomId *int `json:"roomId"` - ScheduleGroupId int `json:"scheduleGroupId"` - SectionId int `json:"sectionId"` - StartTime string `json:"startTime"` - StartUnit int `json:"startUnit"` - 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"` - TeachLanguage *struct { - Id int `json:"id"` - NameCn string `json:"nameCn"` - NameEn *string `json:"nameEn"` - } `json:"teachLanguage"` - TeachLanguageId *int `json:"teachLanguageId"` - TeacherAssignments []struct { - Id int `json:"id"` - Period *int `json:"period"` - Role *string `json:"role"` - SectionId int `json:"sectionId"` - Teacher 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:"teacher"` - TeacherId int `json:"teacherId"` - TeacherLessonType *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"` - Role *string `json:"role"` - } `json:"teacherLessonType"` - TeacherLessonTypeId *int `json:"teacherLessonTypeId"` - WeekIndices *[]int `json:"weekIndices"` - WeekIndicesMsg *string `json:"weekIndicesMsg"` - } `json:"teacherAssignments"` - 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"` - } `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:"teachers"` - TestPeriods *float32 `json:"testPeriods"` - TheoryPeriods *float32 `json:"theoryPeriods"` - TimesPerWeek *int `json:"timesPerWeek"` +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 } -// 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"` +func (t HomeworkCreateRequestSchema_1_PublishedAt) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, 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 *HomeworkCreateRequestSchema_1_PublishedAt) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err } -// SubscribedHomeworksResponseSchemaAuditLogsAction defines model for SubscribedHomeworksResponseSchema.AuditLogs.Action. -type SubscribedHomeworksResponseSchemaAuditLogsAction string +// 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 +} -// SuccessResponseSchema defines model for successResponseSchema. -type SuccessResponseSchema struct { - Success bool `json:"success"` +// 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 } -// 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"` +// 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 } -// 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"` +// 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 } -// TodoCreateRequestSchemaPriority defines model for TodoCreateRequestSchema.Priority. -type TodoCreateRequestSchemaPriority string +func (t HomeworkCreateRequestSchema_1_SectionJwId) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, 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"` +func (t *HomeworkCreateRequestSchema_1_SectionJwId) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err } -// TodoUpdateRequestSchemaPriority defines model for TodoUpdateRequestSchema.Priority. -type TodoUpdateRequestSchemaPriority string +// 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 +} -// 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"` +// 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 } -// TodosListResponseSchemaTodosPriority defines model for TodosListResponseSchema.Todos.Priority. -type TodosListResponseSchemaTodosPriority string +// 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 + } -// UploadCompleteRequestSchema defines model for uploadCompleteRequestSchema. -type UploadCompleteRequestSchema struct { - ContentType *string `json:"contentType,omitempty"` - Filename string `json:"filename"` - Key string `json:"key"` + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + 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"` +// 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 } -// UploadCreateRequestSchema defines model for uploadCreateRequestSchema. -type UploadCreateRequestSchema struct { - ContentType *string `json:"contentType,omitempty"` - Filename string `json:"filename"` - Size string `json:"size"` +// 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 } -// 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"` +// 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 } -// UploadDeleteResponseSchema defines model for uploadDeleteResponseSchema. -type UploadDeleteResponseSchema struct { - DeletedId string `json:"deletedId"` - DeletedSize int `json:"deletedSize"` +func (t HomeworkCreateRequestSchema_1_SubmissionDueAt) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err } -// UploadRenameRequestSchema defines model for uploadRenameRequestSchema. -type UploadRenameRequestSchema struct { - Filename string `json:"filename"` +func (t *HomeworkCreateRequestSchema_1_SubmissionDueAt) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return 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"` +// 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 } -// 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"` +// 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 } -// ListAdminCommentsParams defines parameters for ListAdminComments. -type ListAdminCommentsParams struct { - Status *ListAdminCommentsParamsStatus `form:"status,omitempty" json:"status,omitempty"` - Limit *int64 `form:"limit,omitempty" json:"limit,omitempty"` +// 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 } -// ListAdminCommentsParamsStatus defines parameters for ListAdminComments. -type ListAdminCommentsParamsStatus string +// 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 +} -// 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"` +// 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 } -// ListAdminDescriptionsParamsTargetType defines parameters for ListAdminDescriptions. -type ListAdminDescriptionsParamsTargetType string +// 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 + } -// ListAdminDescriptionsParamsHasContent defines parameters for ListAdminDescriptions. -type ListAdminDescriptionsParamsHasContent string + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + 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"` +func (t HomeworkCreateRequestSchema_1_SubmissionStartAt) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err } -// ListAdminHomeworksParamsStatus defines parameters for ListAdminHomeworks. -type ListAdminHomeworksParamsStatus string +func (t *HomeworkCreateRequestSchema_1_SubmissionStartAt) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return 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"` +// 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 } -// QueryBusParams defines parameters for QueryBus. -type QueryBusParams struct { - VersionKey *string `form:"versionKey,omitempty" json:"versionKey,omitempty"` +// 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 } -// 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"` +// 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 } -// ListCommentsParamsTargetType defines parameters for ListComments. -type ListCommentsParamsTargetType string +// 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 +} -// 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"` +// 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 } -// CreateCommentParamsTargetType defines parameters for CreateComment. -type CreateCommentParamsTargetType string +// 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 + } -// RemoveCommentReactionParams defines parameters for RemoveCommentReaction. -type RemoveCommentReactionParams struct { - Type RemoveCommentReactionParamsType `form:"type" json:"type"` + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err } -// RemoveCommentReactionParamsType defines parameters for RemoveCommentReaction. -type RemoveCommentReactionParamsType string +func (t HomeworkUpdateRequestSchema_PublishedAt) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, 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"` +func (t *HomeworkUpdateRequestSchema_PublishedAt) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err } -// VisitDashboardLinkParams defines parameters for VisitDashboardLink. -type VisitDashboardLinkParams struct { - Slug string `form:"slug" json:"slug"` +// 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 } -// RecordDashboardLinkVisitParams defines parameters for RecordDashboardLinkVisit. -type RecordDashboardLinkVisitParams struct { - Slug string `form:"slug" json:"slug"` +// 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 } -// GetDescriptionParams defines parameters for GetDescription. -type GetDescriptionParams struct { - TargetType GetDescriptionParamsTargetType `form:"targetType" json:"targetType"` - TargetId string `form:"targetId" json:"targetId"` +// 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 } -// GetDescriptionParamsTargetType defines parameters for GetDescription. -type GetDescriptionParamsTargetType string +// 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 +} -// UpsertDescriptionParams defines parameters for UpsertDescription. -type UpsertDescriptionParams struct { - TargetType UpsertDescriptionParamsTargetType `form:"targetType" json:"targetType"` - TargetId string `form:"targetId" json:"targetId"` +// 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 } -// UpsertDescriptionParamsTargetType defines parameters for UpsertDescription. -type UpsertDescriptionParamsTargetType string +// 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 + } -// 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"` + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err } -// ListHomeworksParamsIncludeDeleted defines parameters for ListHomeworks. -type ListHomeworksParamsIncludeDeleted string +func (t HomeworkUpdateRequestSchema_SubmissionDueAt) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, 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"` +func (t *HomeworkUpdateRequestSchema_SubmissionDueAt) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err } -// CreateHomeworkParamsIncludeDeleted defines parameters for CreateHomework. -type CreateHomeworkParamsIncludeDeleted string +// 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 +} -// 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"` +// 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 } -// 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"` +// 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 +} + +// 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 +} + +// 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 + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +func (t HomeworkUpdateRequestSchema_SubmissionStartAt) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err +} + +func (t *HomeworkUpdateRequestSchema_SubmissionStartAt) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err +} + +// 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 +} + +// 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 +} + +// 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 +} + +// 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 +} + +// 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 +} + +// 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 +} + +func (t MatchSectionCodesRequestSchema_SemesterId) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err +} + +func (t *MatchSectionCodesRequestSchema_SemesterId) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err +} + +// 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 +} + +// 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 +} + +// 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 + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// 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 +} + +// 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 +} + +// 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 +} + +func (t OauthDeviceAuthorizationRequestSchema_Resource) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err +} + +func (t *OauthDeviceAuthorizationRequestSchema_Resource) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err } -// GetSectionsCalendarParams defines parameters for GetSectionsCalendar. -type GetSectionsCalendarParams struct { - SectionIds string `form:"sectionIds" json:"sectionIds"` +// 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 } -// ListSemestersParams defines parameters for ListSemesters. -type ListSemestersParams struct { - Page *int64 `form:"page,omitempty" json:"page,omitempty"` - Limit *int64 `form:"limit,omitempty" json:"limit,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 } -// 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"` +// 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 + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return 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"` +// 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 } -// ListTodosParamsCompleted defines parameters for ListTodos. -type ListTodosParamsCompleted string +// 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 +} -// ListTodosParamsPriority defines parameters for ListTodos. -type ListTodosParamsPriority 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 + } -// 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"` + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err } -// CreateTodoParamsCompleted defines parameters for CreateTodo. -type CreateTodoParamsCompleted string +func (t OauthTokenRequestSchema_Resource) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err +} -// CreateTodoParamsPriority defines parameters for CreateTodo. -type CreateTodoParamsPriority string +func (t *OauthTokenRequestSchema_Resource) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err +} -// ModerateAdminCommentJSONRequestBody defines body for ModerateAdminComment for application/json ContentType. -type ModerateAdminCommentJSONRequestBody = AdminModerateCommentRequestSchema +// 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 +} -// CreateAdminSuspensionJSONRequestBody defines body for CreateAdminSuspension for application/json ContentType. -type CreateAdminSuspensionJSONRequestBody = AdminCreateSuspensionRequestSchema +// 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 +} -// UpdateAdminUserJSONRequestBody defines body for UpdateAdminUser for application/json ContentType. -type UpdateAdminUserJSONRequestBody = AdminUpdateUserRequestSchema +// 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 + } -// SetBusPreferencesJSONRequestBody defines body for SetBusPreferences for application/json ContentType. -type SetBusPreferencesJSONRequestBody = BusPreferenceRequestSchema + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} -// SetCalendarSubscriptionJSONRequestBody defines body for SetCalendarSubscription for application/json ContentType. -type SetCalendarSubscriptionJSONRequestBody = CalendarSubscriptionCreateRequestSchema +// 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 +} -// CreateCommentJSONRequestBody defines body for CreateComment for application/json ContentType. -type CreateCommentJSONRequestBody = CommentCreateRequestSchema +// 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 +} -// DeleteCommentJSONRequestBody defines body for DeleteComment for application/json ContentType. -type DeleteCommentJSONRequestBody = CommentUpdateRequestSchema +// 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 + } -// UpdateCommentJSONRequestBody defines body for UpdateComment for application/json ContentType. -type UpdateCommentJSONRequestBody = CommentUpdateRequestSchema + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} -// RemoveCommentReactionJSONRequestBody defines body for RemoveCommentReaction for application/json ContentType. -type RemoveCommentReactionJSONRequestBody = CommentReactionRequestSchema +func (t TodoCreateRequestSchema_DueAt) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err +} -// AddCommentReactionJSONRequestBody defines body for AddCommentReaction for application/json ContentType. -type AddCommentReactionJSONRequestBody = CommentReactionRequestSchema +func (t *TodoCreateRequestSchema_DueAt) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err +} -// PinDashboardLinkFormdataRequestBody defines body for PinDashboardLink for application/x-www-form-urlencoded ContentType. -type PinDashboardLinkFormdataRequestBody = DashboardLinkPinRequestSchema +// 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 +} -// RecordDashboardLinkVisitFormdataRequestBody defines body for RecordDashboardLinkVisit for application/x-www-form-urlencoded ContentType. -type RecordDashboardLinkVisitFormdataRequestBody = DashboardLinkVisitRequestSchema +// 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 +} -// UpsertDescriptionJSONRequestBody defines body for UpsertDescription for application/json ContentType. -type UpsertDescriptionJSONRequestBody = DescriptionUpsertRequestSchema +// 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 + } -// 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 +// 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 +} -// UpdateHomeworkJSONRequestBody defines body for UpdateHomework for application/json ContentType. -type UpdateHomeworkJSONRequestBody = HomeworkUpdateRequestSchema +// 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 +} -// SetHomeworkCompletionJSONRequestBody defines body for SetHomeworkCompletion for application/json ContentType. -type SetHomeworkCompletionJSONRequestBody = HomeworkCompletionRequestSchema +// 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 + } -// SetLocaleJSONRequestBody defines body for SetLocale for application/json ContentType. -type SetLocaleJSONRequestBody = LocaleUpdateRequestSchema + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} -// MatchSectionCodesJSONRequestBody defines body for MatchSectionCodes for application/json ContentType. -type MatchSectionCodesJSONRequestBody = MatchSectionCodesRequestSchema +func (t TodoUpdateRequestSchema_DueAt) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err +} -// CreateTodoJSONRequestBody defines body for CreateTodo for application/json ContentType. -type CreateTodoJSONRequestBody = TodoCreateRequestSchema +func (t *TodoUpdateRequestSchema_DueAt) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err +} -// DeleteTodoJSONRequestBody defines body for DeleteTodo for application/json ContentType. -type DeleteTodoJSONRequestBody = TodoUpdateRequestSchema +// 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 +} -// UpdateTodoJSONRequestBody defines body for UpdateTodo for application/json ContentType. -type UpdateTodoJSONRequestBody = TodoUpdateRequestSchema +// 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 +} -// CreateUploadJSONRequestBody defines body for CreateUpload for application/json ContentType. -type CreateUploadJSONRequestBody = UploadCreateRequestSchema +// 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 + } -// CompleteUploadJSONRequestBody defines body for CompleteUpload for application/json ContentType. -type CompleteUploadJSONRequestBody = UploadCompleteRequestSchema + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// 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 +} -// DeleteUploadJSONRequestBody defines body for DeleteUpload for application/json ContentType. -type DeleteUploadJSONRequestBody = UploadRenameRequestSchema +// 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 +} -// UpdateUploadJSONRequestBody defines body for UpdateUpload for application/json ContentType. -type UpdateUploadJSONRequestBody = UploadRenameRequestSchema +// 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 + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +func (t UploadCreateRequestSchema_Size) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err +} + +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 +8951,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 +8984,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,6 +8995,19 @@ 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) @@ -3970,18 +9016,21 @@ type ClientInterface interface { // 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) + // 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) - - DeleteComment(ctx context.Context, id string, body DeleteCommentJSONRequestBody, 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 +9040,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) @@ -4016,30 +9063,33 @@ type ClientInterface interface { 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, params *UpsertDescriptionParams, body UpsertDescriptionJSONRequestBody, 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, params *CreateHomeworkParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + CreateHomeworkWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - CreateHomework(ctx context.Context, params *CreateHomeworkParams, body CreateHomeworkJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + CreateHomework(ctx context.Context, body CreateHomeworkJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // DeleteHomeworkWithBody request with any body - DeleteHomeworkWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + // PutApiHomeworksCompletionsWithBody request with any body + PutApiHomeworksCompletionsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - DeleteHomework(ctx context.Context, id string, body DeleteHomeworkJSONRequestBody, 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) @@ -4056,106 +9106,579 @@ type ClientInterface interface { SetLocale(ctx context.Context, body SetLocaleJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // GetMe request - GetMe(ctx context.Context, 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) + + // 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) +} - // GetSubscribedHomeworks request - GetSubscribedHomeworks(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) +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) +} - // GetMetadata request - GetMetadata(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) +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) +} - // GetOpenApiSpec request - GetOpenApiSpec(ctx context.Context, 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) +} - // ListSchedules request - ListSchedules(ctx context.Context, params *ListSchedulesParams, 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) +} - // ListSections request - ListSections(ctx context.Context, params *ListSectionsParams, 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) +} - // GetSectionsCalendar request - GetSectionsCalendar(ctx context.Context, params *GetSectionsCalendarParams, 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) +} - // MatchSectionCodesWithBody request with any body - MatchSectionCodesWithBody(ctx context.Context, 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) +} - MatchSectionCodes(ctx context.Context, body MatchSectionCodesJSONRequestBody, 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) +} - // GetSection request - GetSection(ctx context.Context, jwId int64, 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) +} - // GetSectionCalendar request - GetSectionCalendar(ctx context.Context, jwId int64, 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) +} - // GetSectionScheduleGroups request - GetSectionScheduleGroups(ctx context.Context, jwId int64, 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) +} - // GetSectionSchedules request - GetSectionSchedules(ctx context.Context, jwId int64, 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) +} - // ListSemesters request - ListSemesters(ctx context.Context, params *ListSemestersParams, 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) +} - // GetCurrentSemester request - GetCurrentSemester(ctx context.Context, 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) +} - // ListTeachers request - ListTeachers(ctx context.Context, params *ListTeachersParams, 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) +} - // GetTeacher request - GetTeacher(ctx context.Context, id string, 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) +} - // ListTodos request - ListTodos(ctx context.Context, params *ListTodosParams, 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) +} - // CreateTodoWithBody request with any body - CreateTodoWithBody(ctx context.Context, params *CreateTodoParams, contentType string, body io.Reader, 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) +} - CreateTodo(ctx context.Context, params *CreateTodoParams, body CreateTodoJSONRequestBody, 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) +} - // DeleteTodoWithBody request with any body - DeleteTodoWithBody(ctx context.Context, id string, contentType string, body io.Reader, 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) +} - DeleteTodo(ctx context.Context, id string, body DeleteTodoJSONRequestBody, 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) +} - // UpdateTodoWithBody request with any body - UpdateTodoWithBody(ctx context.Context, id string, 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) +} - UpdateTodo(ctx context.Context, id string, body UpdateTodoJSONRequestBody, 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) +} - // ListUploads request - ListUploads(ctx context.Context, 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) +} - // CreateUploadWithBody request with any body - CreateUploadWithBody(ctx context.Context, contentType string, body io.Reader, 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) +} - CreateUpload(ctx context.Context, body CreateUploadJSONRequestBody, 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) +} - // CompleteUploadWithBody request with any body - CompleteUploadWithBody(ctx context.Context, contentType string, body io.Reader, 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) +} - CompleteUpload(ctx context.Context, body CompleteUploadJSONRequestBody, 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) +} - // DeleteUploadWithBody request with any body - DeleteUploadWithBody(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) +} - DeleteUpload(ctx context.Context, id string, body DeleteUploadJSONRequestBody, 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) +} - // UpdateUploadWithBody request with any body - UpdateUploadWithBody(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) +} - UpdateUpload(ctx context.Context, id string, body UpdateUploadJSONRequestBody, 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) +} - // DownloadUpload request - DownloadUpload(ctx context.Context, id string, 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) +} - // GetUserCalendar request - GetUserCalendar(ctx context.Context, userId string, 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) } -func (c *Client) ListAdminComments(ctx context.Context, params *ListAdminCommentsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewListAdminCommentsRequest(c.Server, params) +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 } @@ -4166,8 +9689,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) ListCourses(ctx context.Context, params *ListCoursesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListCoursesRequest(c.Server, params) if err != nil { return nil, err } @@ -4178,8 +9701,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) GetCourse(ctx context.Context, jwId int64, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetCourseRequest(c.Server, jwId) if err != nil { return nil, err } @@ -4190,8 +9713,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) 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 } @@ -4202,8 +9725,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) PinDashboardLinkWithFormdataBody(ctx context.Context, body PinDashboardLinkFormdataRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPinDashboardLinkRequestWithFormdataBody(c.Server, body) if err != nil { return nil, err } @@ -4214,8 +9737,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) VisitDashboardLink(ctx context.Context, params *VisitDashboardLinkParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewVisitDashboardLinkRequest(c.Server, params) if err != nil { return nil, err } @@ -4226,8 +9749,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) 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 } @@ -4238,8 +9761,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) RecordDashboardLinkVisitWithFormdataBody(ctx context.Context, body RecordDashboardLinkVisitFormdataRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewRecordDashboardLinkVisitRequestWithFormdataBody(c.Server, body) if err != nil { return nil, err } @@ -4250,8 +9773,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) GetDescription(ctx context.Context, params *GetDescriptionParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetDescriptionRequest(c.Server, params) if err != nil { return nil, err } @@ -4262,8 +9785,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) 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 } @@ -4274,8 +9797,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) UpsertDescription(ctx context.Context, body UpsertDescriptionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpsertDescriptionRequest(c.Server, body) if err != nil { return nil, err } @@ -4286,8 +9809,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) ListHomeworks(ctx context.Context, params *ListHomeworksParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListHomeworksRequest(c.Server, params) if err != nil { return nil, err } @@ -4298,8 +9821,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) 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 } @@ -4310,8 +9833,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) CreateHomework(ctx context.Context, body CreateHomeworkJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateHomeworkRequest(c.Server, body) if err != nil { return nil, err } @@ -4322,8 +9845,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) 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 } @@ -4334,8 +9857,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) PutApiHomeworksCompletions(ctx context.Context, body PutApiHomeworksCompletionsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPutApiHomeworksCompletionsRequest(c.Server, body) if err != nil { return nil, err } @@ -4346,8 +9869,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) DeleteHomework(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteHomeworkRequest(c.Server, id) if err != nil { return nil, err } @@ -4358,8 +9881,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) 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 } @@ -4370,8 +9893,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) 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 } @@ -4382,8 +9905,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) 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 } @@ -4394,8 +9917,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) 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 } @@ -4406,8 +9929,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) 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 } @@ -4418,8 +9941,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) SetLocale(ctx context.Context, body SetLocaleJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewSetLocaleRequest(c.Server, body) if err != nil { return nil, err } @@ -4430,8 +9953,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) GetMe(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetMeRequest(c.Server) if err != nil { return nil, err } @@ -4442,8 +9965,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) GetApiMeOverview(ctx context.Context, params *GetApiMeOverviewParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetApiMeOverviewRequest(c.Server, params) if err != nil { return nil, err } @@ -4454,8 +9977,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) GetSubscribedHomeworks(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetSubscribedHomeworksRequest(c.Server) if err != nil { return nil, err } @@ -4466,8 +9989,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) GetApiMeSubscriptionsSchedules(ctx context.Context, params *GetApiMeSubscriptionsSchedulesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetApiMeSubscriptionsSchedulesRequest(c.Server, params) if err != nil { return nil, err } @@ -4478,8 +10001,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) GetMetadata(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetMetadataRequest(c.Server) if err != nil { return nil, err } @@ -4490,8 +10013,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) GetOpenApiSpec(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetOpenApiSpecRequest(c.Server) if err != nil { return nil, err } @@ -4502,8 +10025,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) ListSchedules(ctx context.Context, params *ListSchedulesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListSchedulesRequest(c.Server, params) if err != nil { return nil, err } @@ -4514,8 +10037,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) ListSections(ctx context.Context, params *ListSectionsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListSectionsRequest(c.Server, params) if err != nil { return nil, err } @@ -4526,8 +10049,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) GetSectionsCalendar(ctx context.Context, params *GetSectionsCalendarParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetSectionsCalendarRequest(c.Server, params) if err != nil { return nil, err } @@ -4538,8 +10061,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) 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 } @@ -4550,8 +10073,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) MatchSectionCodes(ctx context.Context, body MatchSectionCodesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewMatchSectionCodesRequest(c.Server, body) if err != nil { return nil, err } @@ -4562,8 +10085,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) GetSection(ctx context.Context, jwId int64, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetSectionRequest(c.Server, jwId) if err != nil { return nil, err } @@ -4574,8 +10097,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) GetSectionCalendar(ctx context.Context, jwId int64, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetSectionCalendarRequest(c.Server, jwId) if err != nil { return nil, err } @@ -4586,8 +10109,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) GetSectionScheduleGroups(ctx context.Context, jwId int64, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetSectionScheduleGroupsRequest(c.Server, jwId) if err != nil { return nil, err } @@ -4598,8 +10121,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) 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 } @@ -4610,8 +10133,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) ListSemesters(ctx context.Context, params *ListSemestersParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListSemestersRequest(c.Server, params) if err != nil { return nil, err } @@ -4622,8 +10145,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) GetCurrentSemester(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetCurrentSemesterRequest(c.Server) if err != nil { return nil, err } @@ -4634,8 +10157,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) ListTeachers(ctx context.Context, params *ListTeachersParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListTeachersRequest(c.Server, params) if err != nil { return nil, err } @@ -4646,8 +10169,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) GetTeacher(ctx context.Context, id int64, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetTeacherRequest(c.Server, id) if err != nil { return nil, err } @@ -4658,8 +10181,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) ListTodos(ctx context.Context, params *ListTodosParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListTodosRequest(c.Server, params) if err != nil { return nil, err } @@ -4670,8 +10193,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) 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 } @@ -4682,8 +10205,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) CreateTodo(ctx context.Context, body CreateTodoJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateTodoRequest(c.Server, body) if err != nil { return nil, err } @@ -4694,8 +10217,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) DeleteTodo(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteTodoRequest(c.Server, id) if err != nil { return nil, err } @@ -4706,8 +10229,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) 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 } @@ -4718,8 +10241,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) 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 } @@ -4730,8 +10253,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) ListUploads(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListUploadsRequest(c.Server) if err != nil { return nil, err } @@ -4742,8 +10265,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) 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 } @@ -4754,8 +10277,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) CreateUpload(ctx context.Context, body CreateUploadJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateUploadRequest(c.Server, body) if err != nil { return nil, err } @@ -4766,8 +10289,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) 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 } @@ -4778,8 +10301,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) CompleteUpload(ctx context.Context, body CompleteUploadJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCompleteUploadRequest(c.Server, body) if err != nil { return nil, err } @@ -4790,8 +10313,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) 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 } @@ -4802,8 +10325,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) DeleteUpload(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteUploadRequest(c.Server, id) if err != nil { return nil, err } @@ -4814,8 +10337,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) 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 } @@ -4826,8 +10349,8 @@ 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) +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 } @@ -4838,8 +10361,8 @@ func (c *Client) GetOpenApiSpec(ctx context.Context, reqEditors ...RequestEditor return c.Client.Do(req) } -func (c *Client) ListSchedules(ctx context.Context, params *ListSchedulesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewListSchedulesRequest(c.Server, params) +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 } @@ -4850,8 +10373,8 @@ func (c *Client) ListSchedules(ctx context.Context, params *ListSchedulesParams, 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) +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 } @@ -4862,356 +10385,480 @@ func (c *Client) ListSections(ctx context.Context, params *ListSectionsParams, r 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) +// 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 } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { + + operationPath := fmt.Sprintf("/api/admin/comments") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { return nil, err } - return c.Client.Do(req) -} -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 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 } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { + + 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 } - return c.Client.Do(req) + bodyReader = bytes.NewReader(buf) + return NewModerateAdminCommentRequestWithBody(server, id, "application/json", bodyReader) } -func (c *Client) MatchSectionCodes(ctx context.Context, body MatchSectionCodesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewMatchSectionCodesRequest(c.Server, body) +// 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 { + + serverURL, err := url.Parse(server) + if err != nil { return nil, err } - 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) + operationPath := fmt.Sprintf("/api/admin/comments/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + 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) GetSectionCalendar(ctx context.Context, jwId int64, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetSectionCalendarRequest(c.Server, jwId) +// 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 { + + operationPath := fmt.Sprintf("/api/admin/descriptions") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { return nil, err } - return c.Client.Do(req) -} -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 - } - 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.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) + } + } + } + + } -func (c *Client) GetSectionSchedules(ctx context.Context, jwId int64, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetSectionSchedulesRequest(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 + queryURL.RawQuery = queryValues.Encode() } - 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) + 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) GetCurrentSemester(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetCurrentSemesterRequest(c.Server) +// 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) ListTeachers(ctx context.Context, params *ListTeachersParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewListTeachersRequest(c.Server, params) +// 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) GetTeacher(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetTeacherRequest(c.Server, id) + 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) ListTodos(ctx context.Context, params *ListTodosParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewListTodosRequest(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 { - 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) + req, err := http.NewRequest("PATCH", 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) CreateTodo(ctx context.Context, params *CreateTodoParams, body CreateTodoJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateTodoRequest(c.Server, params, body) +// 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 { - return nil, err + + operationPath := fmt.Sprintf("/api/admin/homeworks") + if operationPath[0] == '/' { + operationPath = "." + operationPath } - return c.Client.Do(req) -} -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) + 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.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) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() } - 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) + 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) UpdateTodoWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUpdateTodoRequestWithBody(c.Server, id, contentType, body) +// 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 } - 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) + 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) ListUploads(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewListUploadsRequest(c.Server) + 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) CreateUploadWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateUploadRequestWithBody(c.Server, contentType, 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) CreateUpload(ctx context.Context, body CreateUploadJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateUploadRequest(c.Server, body) +// 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) CompleteUploadWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCompleteUploadRequestWithBody(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) CompleteUpload(ctx context.Context, body CompleteUploadJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCompleteUploadRequest(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) DeleteUploadWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteUploadRequestWithBody(c.Server, id, 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) DeleteUpload(ctx context.Context, id string, body DeleteUploadJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteUploadRequest(c.Server, id, 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) UpdateUploadWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUpdateUploadRequestWithBody(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 { + + req, err := http.NewRequest("POST", 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) UpdateUpload(ctx context.Context, id string, body UpdateUploadJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUpdateUploadRequest(c.Server, id, 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) DownloadUpload(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDownloadUploadRequest(c.Server, id) + 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) GetUserCalendar(ctx context.Context, userId string, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetUserCalendarRequest(c.Server, userId) + 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(), nil) + if 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 +10866,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 +10879,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 +10938,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 +10965,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 +10985,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 +10994,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 +11007,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 +11023,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 +11096,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 +11112,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 +11128,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 +11144,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 +11160,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 +11187,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 +11196,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 +11214,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 +11234,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 +11254,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 +11273,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 +11308,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 +11324,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 @@ -5716,34 +11351,27 @@ func NewListAdminUsersRequest(server string, params *ListAdminUsersParams) (*htt return req, nil } -// NewUpdateAdminUserRequest calls the generic UpdateAdminUser builder with application/json body -func NewUpdateAdminUserRequest(server string, id string, body UpdateAdminUserJSONRequestBody) (*http.Request, error) { +// 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 NewUpdateAdminUserRequestWithBody(server, id, "application/json", bodyReader) + return NewDeleteApiCalendarSubscriptionsRequestWithBody(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) { +// 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 - 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 } @@ -5753,7 +11381,7 @@ func NewUpdateAdminUserRequestWithBody(server string, id string, contentType str return nil, err } - req, err := http.NewRequest("PATCH", queryURL.String(), body) + req, err := http.NewRequest("DELETE", queryURL.String(), body) if err != nil { return nil, err } @@ -5763,57 +11391,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) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/api/bus") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - 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) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) +// 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 } - - return req, nil + bodyReader = bytes.NewReader(buf) + return NewAppendCalendarSubscriptionSectionsRequestWithBody(server, "application/json", bodyReader) } -// NewGetBusPreferencesRequest generates requests for GetBusPreferences -func NewGetBusPreferencesRequest(server string) (*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 serverURL, err := url.Parse(server) @@ -5821,7 +11411,7 @@ func NewGetBusPreferencesRequest(server string) (*http.Request, error) { return nil, err } - operationPath := fmt.Sprintf("/api/bus/preferences") + operationPath := fmt.Sprintf("/api/calendar-subscriptions") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -5831,27 +11421,29 @@ func NewGetBusPreferencesRequest(server string) (*http.Request, error) { return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest("PATCH", queryURL.String(), body) if err != nil { return nil, err } + req.Header.Add("Content-Type", contentType) + return req, nil } -// NewSetBusPreferencesRequest calls the generic SetBusPreferences builder with application/json body -func NewSetBusPreferencesRequest(server string, body SetBusPreferencesJSONRequestBody) (*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 NewSetBusPreferencesRequestWithBody(server, "application/json", bodyReader) + return NewSetCalendarSubscriptionRequestWithBody(server, "application/json", bodyReader) } -// NewSetBusPreferencesRequestWithBody generates requests for SetBusPreferences with any type of body -func NewSetBusPreferencesRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { +// 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) @@ -5859,7 +11451,7 @@ func NewSetBusPreferencesRequestWithBody(server string, contentType string, body return nil, err } - operationPath := fmt.Sprintf("/api/bus/preferences") + operationPath := fmt.Sprintf("/api/calendar-subscriptions") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -5879,19 +11471,8 @@ func NewSetBusPreferencesRequestWithBody(server string, contentType string, body return req, nil } -// 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) { +// NewGetCurrentCalendarSubscriptionRequest generates requests for GetCurrentCalendarSubscription +func NewGetCurrentCalendarSubscriptionRequest(server string) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -5899,7 +11480,7 @@ func NewSetCalendarSubscriptionRequestWithBody(server string, contentType string return nil, err } - operationPath := fmt.Sprintf("/api/calendar-subscriptions") + operationPath := fmt.Sprintf("/api/calendar-subscriptions/current") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -5909,18 +11490,27 @@ func NewSetCalendarSubscriptionRequestWithBody(server string, contentType string 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 } -// NewGetCurrentCalendarSubscriptionRequest generates requests for GetCurrentCalendarSubscription -func NewGetCurrentCalendarSubscriptionRequest(server string) (*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 NewPostApiCalendarSubscriptionsImportCodesRequestWithBody(server, "application/json", bodyReader) +} + +// 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) @@ -5928,7 +11518,7 @@ func NewGetCurrentCalendarSubscriptionRequest(server string) (*http.Request, err return nil, err } - operationPath := fmt.Sprintf("/api/calendar-subscriptions/current") + operationPath := fmt.Sprintf("/api/calendar-subscriptions/import-codes") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -5938,11 +11528,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 +11604,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 +11620,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 +11652,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 +11668,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,29 +11687,56 @@ func NewCreateCommentRequestWithBody(server string, params *CreateCommentParams, 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 } -// NewDeleteCommentRequest calls the generic DeleteComment builder with application/json body -func NewDeleteCommentRequest(server string, id string, body DeleteCommentJSONRequestBody) (*http.Request, error) { +// 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 NewDeleteCommentRequestWithBody(server, id, "application/json", bodyReader) + 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 + } + + req.Header.Add("Content-Type", contentType) + + return req, nil } -// NewDeleteCommentRequestWithBody generates requests for DeleteComment with any type of body -func NewDeleteCommentRequestWithBody(server string, id string, contentType string, body io.Reader) (*http.Request, error) { +// NewDeleteCommentRequest generates requests for DeleteComment +func NewDeleteCommentRequest(server string, id string) (*http.Request, error) { var err error var pathParam0 string @@ -6182,13 +11761,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 +11850,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 +11894,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 } @@ -6634,18 +12198,18 @@ func NewVisitDashboardLinkRequest(server string, params *VisitDashboardLinkParam } // NewRecordDashboardLinkVisitRequestWithFormdataBody calls the generic RecordDashboardLinkVisit builder with application/x-www-form-urlencoded body -func NewRecordDashboardLinkVisitRequestWithFormdataBody(server string, params *RecordDashboardLinkVisitParams, body RecordDashboardLinkVisitFormdataRequestBody) (*http.Request, error) { +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, params, "application/x-www-form-urlencoded", bodyReader) + return NewRecordDashboardLinkVisitRequestWithBody(server, "application/x-www-form-urlencoded", bodyReader) } // NewRecordDashboardLinkVisitRequestWithBody generates requests for RecordDashboardLinkVisit with any type of body -func NewRecordDashboardLinkVisitRequestWithBody(server string, params *RecordDashboardLinkVisitParams, contentType string, body io.Reader) (*http.Request, error) { +func NewRecordDashboardLinkVisitRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -6663,24 +12227,6 @@ func NewRecordDashboardLinkVisitRequestWithBody(server string, params *RecordDas 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("POST", queryURL.String(), body) if err != nil { return nil, err @@ -6725,16 +12271,84 @@ func NewGetDescriptionRequest(server string, params *GetDescriptionParams) (*htt } } - 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) + } + } + } + + } + + 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 + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.CourseJwId != 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 + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.TeacherId != 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 + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.HomeworkId != 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 + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } } } + } queryURL.RawQuery = queryValues.Encode() @@ -6749,18 +12363,18 @@ func NewGetDescriptionRequest(server string, params *GetDescriptionParams) (*htt } // NewUpsertDescriptionRequest calls the generic UpsertDescription builder with application/json body -func NewUpsertDescriptionRequest(server string, params *UpsertDescriptionParams, body UpsertDescriptionJSONRequestBody) (*http.Request, error) { +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 NewUpsertDescriptionRequestWithBody(server, params, "application/json", bodyReader) + return NewUpsertDescriptionRequestWithBody(server, "application/json", bodyReader) } // NewUpsertDescriptionRequestWithBody generates requests for UpsertDescription with any type of body -func NewUpsertDescriptionRequestWithBody(server string, params *UpsertDescriptionParams, contentType string, body io.Reader) (*http.Request, error) { +func NewUpsertDescriptionRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -6778,36 +12392,6 @@ func NewUpsertDescriptionRequestWithBody(server string, params *UpsertDescriptio 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("POST", queryURL.String(), body) if err != nil { return nil, err @@ -6872,6 +12456,22 @@ func NewListHomeworksRequest(server string, params *ListHomeworksParams) (*http. } + 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 + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + if params.IncludeDeleted != nil { if queryFrag, err := runtime.StyleParamWithOptions("form", true, "includeDeleted", *params.IncludeDeleted, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { @@ -6900,87 +12500,33 @@ func NewListHomeworksRequest(server string, params *ListHomeworksParams) (*http. } // NewCreateHomeworkRequest calls the generic CreateHomework builder with application/json body -func NewCreateHomeworkRequest(server string, params *CreateHomeworkParams, body CreateHomeworkJSONRequestBody) (*http.Request, error) { +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, params, "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) { - 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 - } - - if params != nil { - queryValues := queryURL.Query() - - if params.SectionId != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "sectionId", *params.SectionId, 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.SectionIds != 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) - } - } - } - - } + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewCreateHomeworkRequestWithBody(server, "application/json", bodyReader) +} - if params.IncludeDeleted != nil { +// 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 - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "includeDeleted", *params.IncludeDeleted, 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) - } - } - } + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - } + operationPath := fmt.Sprintf("/api/homeworks") + 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) @@ -6993,19 +12539,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 +12605,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 } @@ -7198,26 +12771,236 @@ func NewGetMeRequest(server string) (*http.Request, error) { return nil, err } - return req, nil -} + 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) + } + } + } + + } -// 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 +13217,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 +13233,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 +13719,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 +13744,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 +13996,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 +14085,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 +14101,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 +14143,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,76 +14172,6 @@ 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) - } - } - } - - } - - 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 { - 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.DueAfter != nil { - - 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) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { return nil, err @@ -8399,19 +14182,8 @@ 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) { - 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) -} - -// 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 +14208,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 } @@ -8600,19 +14370,55 @@ 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) +// 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) if err != nil { return nil, err } - bodyReader = bytes.NewReader(buf) - return NewDeleteUploadRequestWithBody(server, id, "application/json", bodyReader) + + operationPath := fmt.Sprintf("/api/uploads/object") + 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, "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 + } + + req.Header.Add("Content-Type", contentType) + + return req, nil } -// 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 +14443,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 } @@ -8654,12 +14458,48 @@ func NewUpdateUploadRequest(server string, id string, body UpdateUploadJSONReque if err != nil { return nil, err } - bodyReader = bytes.NewReader(buf) - return NewUpdateUploadRequestWithBody(server, id, "application/json", bodyReader) + bodyReader = bytes.NewReader(buf) + return NewUpdateUploadRequestWithBody(server, id, "application/json", bodyReader) +} + +// NewUpdateUploadRequestWithBody generates requests for UpdateUpload with any type of body +func NewUpdateUploadRequestWithBody(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 + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/uploads/%s", pathParam0) + 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 } -// NewUpdateUploadRequestWithBody generates requests for UpdateUpload with any type of body -func NewUpdateUploadRequestWithBody(server string, id string, contentType string, body io.Reader) (*http.Request, error) { +// NewDownloadUploadRequest generates requests for DownloadUpload +func NewDownloadUploadRequest(server string, id string) (*http.Request, error) { var err error var pathParam0 string @@ -8674,7 +14514,7 @@ func NewUpdateUploadRequestWithBody(server string, id string, contentType string return nil, err } - operationPath := fmt.Sprintf("/api/uploads/%s", pathParam0) + operationPath := fmt.Sprintf("/api/uploads/%s/download", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -8684,23 +14524,21 @@ func NewUpdateUploadRequestWithBody(server string, id string, contentType string return nil, err } - req, err := http.NewRequest("PATCH", 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 } -// NewDownloadUploadRequest generates requests for DownloadUpload -func NewDownloadUploadRequest(server string, id string) (*http.Request, error) { +// NewGetUserCalendarRequest generates requests for GetUserCalendar +func NewGetUserCalendarRequest(server string, userId string, params *GetUserCalendarParams) (*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, "userId", userId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) if err != nil { return nil, err } @@ -8710,7 +14548,7 @@ func NewDownloadUploadRequest(server string, id string) (*http.Request, error) { return nil, err } - operationPath := fmt.Sprintf("/api/uploads/%s/download", pathParam0) + operationPath := fmt.Sprintf("/api/users/%s/calendar.ics", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -8720,6 +14558,28 @@ func NewDownloadUploadRequest(server string, id string) (*http.Request, error) { 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 @@ -8728,331 +14588,942 @@ func NewDownloadUploadRequest(server string, id string) (*http.Request, error) { return req, nil } -// NewGetUserCalendarRequest generates requests for GetUserCalendar -func NewGetUserCalendarRequest(server string, userId string) (*http.Request, error) { - var err error +func (c *Client) applyEditors(ctx context.Context, req *http.Request, additionalEditors []RequestEditorFn) error { + for _, r := range c.RequestEditors { + if err := r(ctx, req); err != nil { + return err + } + } + for _, r := range additionalEditors { + if err := r(ctx, req); err != nil { + return err + } + } + return nil +} - var pathParam0 string +// ClientWithResponses builds on ClientInterface to offer response payloads +type ClientWithResponses struct { + ClientInterface +} + +// NewClientWithResponses creates a new ClientWithResponses, which wraps +// Client with return type handling +func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error) { + client, err := NewClient(server, opts...) + if err != nil { + return nil, err + } + return &ClientWithResponses{client}, nil +} + +// WithBaseURL overrides the baseURL. +func WithBaseURL(baseURL string) ClientOption { + return func(c *Client) error { + newBaseURL, err := url.Parse(baseURL) + if err != nil { + return err + } + c.Server = newBaseURL.String() + return nil + } +} + +// ClientWithResponsesInterface is the interface specification for the client with responses above. +type ClientWithResponsesInterface interface { + // ListAdminCommentsWithResponse request + ListAdminCommentsWithResponse(ctx context.Context, params *ListAdminCommentsParams, reqEditors ...RequestEditorFn) (*ListAdminCommentsResponse, error) + + // ModerateAdminCommentWithBodyWithResponse request with any body + ModerateAdminCommentWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ModerateAdminCommentResponse, error) + + ModerateAdminCommentWithResponse(ctx context.Context, id string, body ModerateAdminCommentJSONRequestBody, reqEditors ...RequestEditorFn) (*ModerateAdminCommentResponse, error) + + // ListAdminDescriptionsWithResponse request + ListAdminDescriptionsWithResponse(ctx context.Context, params *ListAdminDescriptionsParams, reqEditors ...RequestEditorFn) (*ListAdminDescriptionsResponse, 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) + + // 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) + + // 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) + + // 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) + + // 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) - pathParam0, err = runtime.StyleParamWithOptions("simple", false, "userId", userId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) - if err != nil { - return nil, err - } + // GetSectionScheduleGroupsWithResponse request + GetSectionScheduleGroupsWithResponse(ctx context.Context, jwId int64, reqEditors ...RequestEditorFn) (*GetSectionScheduleGroupsResponse, error) - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } + // GetSectionSchedulesWithResponse request + GetSectionSchedulesWithResponse(ctx context.Context, jwId int64, params *GetSectionSchedulesParams, reqEditors ...RequestEditorFn) (*GetSectionSchedulesResponse, error) - operationPath := fmt.Sprintf("/api/users/%s/calendar.ics", pathParam0) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } + // ListSemestersWithResponse request + ListSemestersWithResponse(ctx context.Context, params *ListSemestersParams, reqEditors ...RequestEditorFn) (*ListSemestersResponse, error) - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } + // GetCurrentSemesterWithResponse request + GetCurrentSemesterWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetCurrentSemesterResponse, error) - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } + // ListTeachersWithResponse request + ListTeachersWithResponse(ctx context.Context, params *ListTeachersParams, reqEditors ...RequestEditorFn) (*ListTeachersResponse, error) - return req, nil -} + // GetTeacherWithResponse request + GetTeacherWithResponse(ctx context.Context, id int64, reqEditors ...RequestEditorFn) (*GetTeacherResponse, error) -func (c *Client) applyEditors(ctx context.Context, req *http.Request, additionalEditors []RequestEditorFn) error { - for _, r := range c.RequestEditors { - if err := r(ctx, req); err != nil { - return err - } - } - for _, r := range additionalEditors { - if err := r(ctx, req); err != nil { - return err - } - } - return nil -} + // ListTodosWithResponse request + ListTodosWithResponse(ctx context.Context, params *ListTodosParams, reqEditors ...RequestEditorFn) (*ListTodosResponse, error) -// ClientWithResponses builds on ClientInterface to offer response payloads -type ClientWithResponses struct { - ClientInterface -} + // CreateTodoWithBodyWithResponse request with any body + CreateTodoWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTodoResponse, error) -// NewClientWithResponses creates a new ClientWithResponses, which wraps -// Client with return type handling -func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error) { - client, err := NewClient(server, opts...) - if err != nil { - return nil, err - } - return &ClientWithResponses{client}, nil -} + CreateTodoWithResponse(ctx context.Context, body CreateTodoJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTodoResponse, error) -// WithBaseURL overrides the baseURL. -func WithBaseURL(baseURL string) ClientOption { - return func(c *Client) error { - newBaseURL, err := url.Parse(baseURL) - if err != nil { - return err - } - c.Server = newBaseURL.String() - return nil - } -} + // DeleteTodoWithResponse request + DeleteTodoWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*DeleteTodoResponse, error) -// ClientWithResponsesInterface is the interface specification for the client with responses above. -type ClientWithResponsesInterface interface { - // ListAdminCommentsWithResponse request - ListAdminCommentsWithResponse(ctx context.Context, params *ListAdminCommentsParams, reqEditors ...RequestEditorFn) (*ListAdminCommentsResponse, error) + // UpdateTodoWithBodyWithResponse request with any body + UpdateTodoWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateTodoResponse, error) - // ModerateAdminCommentWithBodyWithResponse request with any body - ModerateAdminCommentWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ModerateAdminCommentResponse, error) + UpdateTodoWithResponse(ctx context.Context, id string, body UpdateTodoJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateTodoResponse, error) - ModerateAdminCommentWithResponse(ctx context.Context, id string, body ModerateAdminCommentJSONRequestBody, reqEditors ...RequestEditorFn) (*ModerateAdminCommentResponse, error) + // ListUploadsWithResponse request + ListUploadsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListUploadsResponse, error) - // ListAdminDescriptionsWithResponse request - ListAdminDescriptionsWithResponse(ctx context.Context, params *ListAdminDescriptionsParams, reqEditors ...RequestEditorFn) (*ListAdminDescriptionsResponse, error) + // CreateUploadWithBodyWithResponse request with any body + CreateUploadWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateUploadResponse, error) - // ListAdminHomeworksWithResponse request - ListAdminHomeworksWithResponse(ctx context.Context, params *ListAdminHomeworksParams, reqEditors ...RequestEditorFn) (*ListAdminHomeworksResponse, error) + CreateUploadWithResponse(ctx context.Context, body CreateUploadJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateUploadResponse, error) - // DeleteAdminHomeworkWithResponse request - DeleteAdminHomeworkWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*DeleteAdminHomeworkResponse, error) + // CompleteUploadWithBodyWithResponse request with any body + CompleteUploadWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CompleteUploadResponse, error) - // ListAdminSuspensionsWithResponse request - ListAdminSuspensionsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListAdminSuspensionsResponse, error) + CompleteUploadWithResponse(ctx context.Context, body CompleteUploadJSONRequestBody, reqEditors ...RequestEditorFn) (*CompleteUploadResponse, error) - // CreateAdminSuspensionWithBodyWithResponse request with any body - CreateAdminSuspensionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAdminSuspensionResponse, error) + // PutApiUploadsObjectWithBodyWithResponse request with any body + PutApiUploadsObjectWithBodyWithResponse(ctx context.Context, params *PutApiUploadsObjectParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutApiUploadsObjectResponse, error) - CreateAdminSuspensionWithResponse(ctx context.Context, body CreateAdminSuspensionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAdminSuspensionResponse, error) + // DeleteUploadWithResponse request + DeleteUploadWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*DeleteUploadResponse, error) - // UpdateAdminSuspensionWithResponse request - UpdateAdminSuspensionWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*UpdateAdminSuspensionResponse, error) + // UpdateUploadWithBodyWithResponse request with any body + UpdateUploadWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateUploadResponse, error) - // ListAdminUsersWithResponse request - ListAdminUsersWithResponse(ctx context.Context, params *ListAdminUsersParams, reqEditors ...RequestEditorFn) (*ListAdminUsersResponse, error) + UpdateUploadWithResponse(ctx context.Context, id string, body UpdateUploadJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateUploadResponse, error) - // UpdateAdminUserWithBodyWithResponse request with any body - UpdateAdminUserWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateAdminUserResponse, error) + // DownloadUploadWithResponse request + DownloadUploadWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*DownloadUploadResponse, error) - UpdateAdminUserWithResponse(ctx context.Context, id string, body UpdateAdminUserJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateAdminUserResponse, error) + // GetUserCalendarWithResponse request + GetUserCalendarWithResponse(ctx context.Context, userId string, params *GetUserCalendarParams, reqEditors ...RequestEditorFn) (*GetUserCalendarResponse, error) +} - // QueryBusWithResponse request - QueryBusWithResponse(ctx context.Context, params *QueryBusParams, reqEditors ...RequestEditorFn) (*QueryBusResponse, error) +type ListAdminCommentsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *AdminCommentsResponseSchema + JSON400 *OpenApiErrorSchema + JSON401 *OpenApiErrorSchema +} - // GetBusPreferencesWithResponse request - GetBusPreferencesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetBusPreferencesResponse, error) +// Status returns HTTPResponse.Status +func (r ListAdminCommentsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} - // SetBusPreferencesWithBodyWithResponse request with any body - SetBusPreferencesWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SetBusPreferencesResponse, error) +// StatusCode returns HTTPResponse.StatusCode +func (r ListAdminCommentsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} - SetBusPreferencesWithResponse(ctx context.Context, body SetBusPreferencesJSONRequestBody, reqEditors ...RequestEditorFn) (*SetBusPreferencesResponse, error) +type ModerateAdminCommentResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *AdminModeratedCommentResponseSchema + JSON400 *OpenApiErrorSchema + JSON401 *OpenApiErrorSchema + JSON403 *OpenApiErrorSchema + JSON404 *OpenApiErrorSchema +} - // SetCalendarSubscriptionWithBodyWithResponse request with any body - SetCalendarSubscriptionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, 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) +} - SetCalendarSubscriptionWithResponse(ctx context.Context, body SetCalendarSubscriptionJSONRequestBody, reqEditors ...RequestEditorFn) (*SetCalendarSubscriptionResponse, error) +// StatusCode returns HTTPResponse.StatusCode +func (r ModerateAdminCommentResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} - // GetCurrentCalendarSubscriptionWithResponse request - GetCurrentCalendarSubscriptionWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetCurrentCalendarSubscriptionResponse, error) +type ListAdminDescriptionsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *AdminDescriptionsResponseSchema + JSON400 *OpenApiErrorSchema + JSON401 *OpenApiErrorSchema +} - // ListCommentsWithResponse request - ListCommentsWithResponse(ctx context.Context, params *ListCommentsParams, reqEditors ...RequestEditorFn) (*ListCommentsResponse, error) +// Status returns HTTPResponse.Status +func (r ListAdminDescriptionsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} - // CreateCommentWithBodyWithResponse request with any body - CreateCommentWithBodyWithResponse(ctx context.Context, params *CreateCommentParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateCommentResponse, error) +// StatusCode returns HTTPResponse.StatusCode +func (r ListAdminDescriptionsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} - CreateCommentWithResponse(ctx context.Context, params *CreateCommentParams, body CreateCommentJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateCommentResponse, error) +type UpdateAdminDescriptionResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *AdminModeratedDescriptionResponseSchema + JSON400 *OpenApiErrorSchema + JSON401 *OpenApiErrorSchema + JSON403 *OpenApiErrorSchema + JSON404 *OpenApiErrorSchema +} - // DeleteCommentWithBodyWithResponse request with any body - DeleteCommentWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, 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) +} - DeleteCommentWithResponse(ctx context.Context, id string, body DeleteCommentJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteCommentResponse, error) +// StatusCode returns HTTPResponse.StatusCode +func (r UpdateAdminDescriptionResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} - // GetCommentWithResponse request - GetCommentWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*GetCommentResponse, error) +type ListAdminHomeworksResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *AdminHomeworksResponseSchema + JSON400 *OpenApiErrorSchema + JSON401 *OpenApiErrorSchema +} - // UpdateCommentWithBodyWithResponse request with any body - UpdateCommentWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, 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) +} - UpdateCommentWithResponse(ctx context.Context, id string, body UpdateCommentJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateCommentResponse, error) +// StatusCode returns HTTPResponse.StatusCode +func (r ListAdminHomeworksResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} - // RemoveCommentReactionWithBodyWithResponse request with any body - RemoveCommentReactionWithBodyWithResponse(ctx context.Context, id string, params *RemoveCommentReactionParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RemoveCommentReactionResponse, error) +type DeleteAdminHomeworkResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *SuccessResponseSchema + JSON401 *OpenApiErrorSchema + JSON403 *OpenApiErrorSchema + JSON404 *OpenApiErrorSchema +} - RemoveCommentReactionWithResponse(ctx context.Context, id string, params *RemoveCommentReactionParams, body RemoveCommentReactionJSONRequestBody, reqEditors ...RequestEditorFn) (*RemoveCommentReactionResponse, error) +// Status returns HTTPResponse.Status +func (r DeleteAdminHomeworkResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} - // AddCommentReactionWithBodyWithResponse request with any body - AddCommentReactionWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AddCommentReactionResponse, error) +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteAdminHomeworkResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} - AddCommentReactionWithResponse(ctx context.Context, id string, body AddCommentReactionJSONRequestBody, reqEditors ...RequestEditorFn) (*AddCommentReactionResponse, error) +type ListAdminSuspensionsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *AdminSuspensionsResponseSchema + JSON401 *OpenApiErrorSchema +} - // ListCoursesWithResponse request - ListCoursesWithResponse(ctx context.Context, params *ListCoursesParams, reqEditors ...RequestEditorFn) (*ListCoursesResponse, error) +// Status returns HTTPResponse.Status +func (r ListAdminSuspensionsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} - // GetCourseWithResponse request - GetCourseWithResponse(ctx context.Context, jwId int64, reqEditors ...RequestEditorFn) (*GetCourseResponse, error) +// StatusCode returns HTTPResponse.StatusCode +func (r ListAdminSuspensionsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} - // PinDashboardLinkWithBodyWithResponse request with any body - PinDashboardLinkWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PinDashboardLinkResponse, error) +type CreateAdminSuspensionResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *AdminSuspensionResponseSchema + JSON400 *OpenApiErrorSchema + JSON401 *OpenApiErrorSchema + JSON403 *OpenApiErrorSchema + JSON404 *OpenApiErrorSchema +} - PinDashboardLinkWithFormdataBodyWithResponse(ctx context.Context, body PinDashboardLinkFormdataRequestBody, reqEditors ...RequestEditorFn) (*PinDashboardLinkResponse, error) +// Status returns HTTPResponse.Status +func (r CreateAdminSuspensionResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} - // VisitDashboardLinkWithResponse request - VisitDashboardLinkWithResponse(ctx context.Context, params *VisitDashboardLinkParams, reqEditors ...RequestEditorFn) (*VisitDashboardLinkResponse, error) +// StatusCode returns HTTPResponse.StatusCode +func (r CreateAdminSuspensionResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} - // RecordDashboardLinkVisitWithBodyWithResponse request with any body - RecordDashboardLinkVisitWithBodyWithResponse(ctx context.Context, params *RecordDashboardLinkVisitParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RecordDashboardLinkVisitResponse, error) +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 GetCurrentCalendarSubscriptionResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *CurrentCalendarSubscriptionResponseSchema + JSON401 *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 GetCurrentCalendarSubscriptionResponse) 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 GetCurrentCalendarSubscriptionResponse) 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 PostApiCalendarSubscriptionsImportCodesResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *CalendarSubscriptionImportResponseSchema + JSON400 *OpenApiErrorSchema + JSON401 *OpenApiErrorSchema + JSON404 *OpenApiErrorSchema +} - DeleteTodoWithResponse(ctx context.Context, id string, body DeleteTodoJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteTodoResponse, error) +// Status returns HTTPResponse.Status +func (r PostApiCalendarSubscriptionsImportCodesResponse) 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 PostApiCalendarSubscriptionsImportCodesResponse) 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 ListCommentsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *CommentsListResponseSchema + JSON400 *OpenApiErrorSchema + JSON404 *OpenApiErrorSchema +} - // ListUploadsWithResponse request - ListUploadsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListUploadsResponse, error) +// Status returns HTTPResponse.Status +func (r ListCommentsResponse) 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 ListCommentsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} - CreateUploadWithResponse(ctx context.Context, body CreateUploadJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateUploadResponse, error) +type CreateCommentResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *IdResponseSchema + JSON400 *OpenApiErrorSchema + JSON401 *OpenApiErrorSchema + JSON403 *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 CreateCommentResponse) 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 CreateCommentResponse) 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 DeleteCommentResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *SuccessResponseSchema + JSON401 *OpenApiErrorSchema + JSON403 *OpenApiErrorSchema + JSON404 *OpenApiErrorSchema +} - DeleteUploadWithResponse(ctx context.Context, id string, body DeleteUploadJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteUploadResponse, error) +// Status returns HTTPResponse.Status +func (r DeleteCommentResponse) 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 DeleteCommentResponse) 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 GetCommentResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *CommentThreadResponseSchema + JSON403 *OpenApiErrorSchema + JSON404 *OpenApiErrorSchema +} - // DownloadUploadWithResponse request - DownloadUploadWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*DownloadUploadResponse, error) +// Status returns HTTPResponse.Status +func (r GetCommentResponse) 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 GetCommentResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 } -type ListAdminCommentsResponse struct { +type UpdateCommentResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *AdminCommentsResponseSchema + JSON200 *CommentUpdateResponseSchema JSON400 *OpenApiErrorSchema + JSON401 *OpenApiErrorSchema + JSON403 *OpenApiErrorSchema + JSON404 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r ListAdminCommentsResponse) Status() string { +func (r UpdateCommentResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9060,22 +15531,24 @@ func (r ListAdminCommentsResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r ListAdminCommentsResponse) StatusCode() int { +func (r UpdateCommentResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type ModerateAdminCommentResponse struct { +type RemoveCommentReactionResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *AdminModeratedCommentResponseSchema + JSON200 *SuccessResponseSchema JSON400 *OpenApiErrorSchema + JSON401 *OpenApiErrorSchema + JSON403 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r ModerateAdminCommentResponse) Status() string { +func (r RemoveCommentReactionResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9083,22 +15556,25 @@ func (r ModerateAdminCommentResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r ModerateAdminCommentResponse) StatusCode() int { +func (r RemoveCommentReactionResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type ListAdminDescriptionsResponse struct { +type AddCommentReactionResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *AdminDescriptionsResponseSchema + JSON200 *SuccessResponseSchema JSON400 *OpenApiErrorSchema + JSON401 *OpenApiErrorSchema + JSON403 *OpenApiErrorSchema + JSON404 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r ListAdminDescriptionsResponse) Status() string { +func (r AddCommentReactionResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9106,22 +15582,22 @@ func (r ListAdminDescriptionsResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r ListAdminDescriptionsResponse) StatusCode() int { +func (r AddCommentReactionResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type ListAdminHomeworksResponse struct { +type ListCoursesResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *AdminHomeworksResponseSchema + JSON200 *PaginatedCourseResponseSchema JSON400 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r ListAdminHomeworksResponse) Status() string { +func (r ListCoursesResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9129,22 +15605,23 @@ func (r ListAdminHomeworksResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r ListAdminHomeworksResponse) StatusCode() int { +func (r ListCoursesResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type DeleteAdminHomeworkResponse struct { +type GetCourseResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *SuccessResponseSchema + JSON200 *CourseDetailSchema + JSON400 *OpenApiErrorSchema JSON404 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r DeleteAdminHomeworkResponse) Status() string { +func (r GetCourseResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9152,21 +15629,24 @@ func (r DeleteAdminHomeworkResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r DeleteAdminHomeworkResponse) StatusCode() int { +func (r GetCourseResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type ListAdminSuspensionsResponse struct { +type PinDashboardLinkResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *AdminSuspensionsResponseSchema + JSON200 *DashboardLinkPinResponseSchema + JSON400 *DashboardLinkPinResponseSchema + JSON401 *DashboardLinkPinResponseSchema + JSON500 *DashboardLinkPinResponseSchema } // Status returns HTTPResponse.Status -func (r ListAdminSuspensionsResponse) Status() string { +func (r PinDashboardLinkResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9174,22 +15654,20 @@ func (r ListAdminSuspensionsResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r ListAdminSuspensionsResponse) StatusCode() int { +func (r PinDashboardLinkResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type CreateAdminSuspensionResponse struct { +type VisitDashboardLinkResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *AdminSuspensionResponseSchema - JSON400 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r CreateAdminSuspensionResponse) Status() string { +func (r VisitDashboardLinkResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9197,22 +15675,20 @@ func (r CreateAdminSuspensionResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r CreateAdminSuspensionResponse) StatusCode() int { +func (r VisitDashboardLinkResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type UpdateAdminSuspensionResponse struct { +type RecordDashboardLinkVisitResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *AdminSuspensionResponseSchema - JSON404 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r UpdateAdminSuspensionResponse) Status() string { +func (r RecordDashboardLinkVisitResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9220,22 +15696,23 @@ func (r UpdateAdminSuspensionResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r UpdateAdminSuspensionResponse) StatusCode() int { +func (r RecordDashboardLinkVisitResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type ListAdminUsersResponse struct { +type GetDescriptionResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *AdminUsersResponseSchema + JSON200 *DescriptionsResponseSchema JSON400 *OpenApiErrorSchema + JSON404 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r ListAdminUsersResponse) Status() string { +func (r GetDescriptionResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9243,22 +15720,25 @@ func (r ListAdminUsersResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r ListAdminUsersResponse) StatusCode() int { +func (r GetDescriptionResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type UpdateAdminUserResponse struct { +type UpsertDescriptionResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *AdminUserResponseSchema + JSON200 *DescriptionUpsertResponseSchema JSON400 *OpenApiErrorSchema + JSON401 *OpenApiErrorSchema + JSON403 *OpenApiErrorSchema + JSON404 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r UpdateAdminUserResponse) Status() string { +func (r UpsertDescriptionResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9266,22 +15746,23 @@ func (r UpdateAdminUserResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r UpdateAdminUserResponse) StatusCode() int { +func (r UpsertDescriptionResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type QueryBusResponse struct { +type ListHomeworksResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *BusQueryResponseSchema + JSON200 *HomeworksListResponseSchema JSON400 *OpenApiErrorSchema + JSON404 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r QueryBusResponse) Status() string { +func (r ListHomeworksResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9289,22 +15770,25 @@ func (r QueryBusResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r QueryBusResponse) StatusCode() int { +func (r ListHomeworksResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetBusPreferencesResponse struct { +type CreateHomeworkResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *BusPreferenceResponseSchema + JSON200 *HomeworkCreateResponseSchema + JSON400 *OpenApiErrorSchema JSON401 *OpenApiErrorSchema + JSON403 *OpenApiErrorSchema + JSON404 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r GetBusPreferencesResponse) Status() string { +func (r CreateHomeworkResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9312,23 +15796,23 @@ func (r GetBusPreferencesResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetBusPreferencesResponse) StatusCode() int { +func (r CreateHomeworkResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type SetBusPreferencesResponse struct { +type PutApiHomeworksCompletionsResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *BusPreferenceResponseSchema + JSON200 *HomeworkCompletionBatchResponseSchema JSON400 *OpenApiErrorSchema JSON401 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r SetBusPreferencesResponse) Status() string { +func (r PutApiHomeworksCompletionsResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9336,22 +15820,24 @@ func (r SetBusPreferencesResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r SetBusPreferencesResponse) StatusCode() int { +func (r PutApiHomeworksCompletionsResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type SetCalendarSubscriptionResponse struct { +type DeleteHomeworkResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *CalendarSubscriptionCreateResponseSchema - JSON400 *OpenApiErrorSchema + JSON200 *SuccessResponseSchema + JSON401 *OpenApiErrorSchema + JSON403 *OpenApiErrorSchema + JSON404 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r SetCalendarSubscriptionResponse) Status() string { +func (r DeleteHomeworkResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9359,22 +15845,25 @@ func (r SetCalendarSubscriptionResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r SetCalendarSubscriptionResponse) StatusCode() int { +func (r DeleteHomeworkResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetCurrentCalendarSubscriptionResponse struct { +type UpdateHomeworkResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *CurrentCalendarSubscriptionResponseSchema + JSON200 *HomeworkUpdateResponseSchema + JSON400 *OpenApiErrorSchema JSON401 *OpenApiErrorSchema + JSON403 *OpenApiErrorSchema + JSON404 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r GetCurrentCalendarSubscriptionResponse) Status() string { +func (r UpdateHomeworkResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9382,22 +15871,24 @@ func (r GetCurrentCalendarSubscriptionResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetCurrentCalendarSubscriptionResponse) StatusCode() int { +func (r UpdateHomeworkResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type ListCommentsResponse struct { +type SetHomeworkCompletionResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *CommentsListResponseSchema + JSON200 *HomeworkCompletionResponseSchema JSON400 *OpenApiErrorSchema + JSON401 *OpenApiErrorSchema + JSON404 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r ListCommentsResponse) Status() string { +func (r SetHomeworkCompletionResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9405,22 +15896,22 @@ func (r ListCommentsResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r ListCommentsResponse) StatusCode() int { +func (r SetHomeworkCompletionResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type CreateCommentResponse struct { +type SetLocaleResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *IdResponseSchema + JSON200 *SuccessResponseSchema JSON400 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r CreateCommentResponse) Status() string { +func (r SetLocaleResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9428,23 +15919,22 @@ func (r CreateCommentResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r CreateCommentResponse) StatusCode() int { +func (r SetLocaleResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type DeleteCommentResponse struct { +type GetMeResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *SuccessResponseSchema - JSON400 *OpenApiErrorSchema - JSON404 *OpenApiErrorSchema + JSON200 *MeResponseSchema + JSON401 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r DeleteCommentResponse) Status() string { +func (r GetMeResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9452,22 +15942,23 @@ func (r DeleteCommentResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r DeleteCommentResponse) StatusCode() int { +func (r GetMeResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetCommentResponse struct { +type GetApiMeOverviewResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *CommentThreadResponseSchema - JSON404 *OpenApiErrorSchema + JSON200 *CompactOverviewResponseSchema + JSON400 *OpenApiErrorSchema + JSON401 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r GetCommentResponse) Status() string { +func (r GetApiMeOverviewResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9475,23 +15966,22 @@ func (r GetCommentResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetCommentResponse) StatusCode() int { +func (r GetApiMeOverviewResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type UpdateCommentResponse struct { +type GetSubscribedHomeworksResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *CommentUpdateResponseSchema - JSON400 *OpenApiErrorSchema - JSON404 *OpenApiErrorSchema + JSON200 *SubscribedHomeworksResponseSchema + JSON401 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r UpdateCommentResponse) Status() string { +func (r GetSubscribedHomeworksResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9499,21 +15989,23 @@ func (r UpdateCommentResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r UpdateCommentResponse) StatusCode() int { +func (r GetSubscribedHomeworksResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type RemoveCommentReactionResponse struct { +type GetApiMeSubscriptionsSchedulesResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *SuccessResponseSchema + JSON200 *SubscribedSchedulesResponseSchema + JSON400 *OpenApiErrorSchema + JSON401 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r RemoveCommentReactionResponse) Status() string { +func (r GetApiMeSubscriptionsSchedulesResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9521,21 +16013,21 @@ func (r RemoveCommentReactionResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r RemoveCommentReactionResponse) StatusCode() int { +func (r GetApiMeSubscriptionsSchedulesResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type AddCommentReactionResponse struct { +type GetMetadataResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *SuccessResponseSchema + JSON200 *MetadataResponseSchema } // Status returns HTTPResponse.Status -func (r AddCommentReactionResponse) Status() string { +func (r GetMetadataResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9543,22 +16035,21 @@ func (r AddCommentReactionResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r AddCommentReactionResponse) StatusCode() int { +func (r GetMetadataResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type ListCoursesResponse struct { +type GetOpenApiSpecResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *PaginatedCourseResponseSchema - JSON400 *OpenApiErrorSchema + JSON200 *OpenApiDocumentResponseSchema } // Status returns HTTPResponse.Status -func (r ListCoursesResponse) Status() string { +func (r GetOpenApiSpecResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9566,22 +16057,22 @@ func (r ListCoursesResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r ListCoursesResponse) StatusCode() int { +func (r GetOpenApiSpecResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetCourseResponse struct { +type ListSchedulesResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *CourseDetailSchema - JSON404 *OpenApiErrorSchema + JSON200 *PaginatedScheduleResponseSchema + JSON400 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r GetCourseResponse) Status() string { +func (r ListSchedulesResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9589,20 +16080,22 @@ func (r GetCourseResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetCourseResponse) StatusCode() int { +func (r ListSchedulesResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type PinDashboardLinkResponse struct { +type ListSectionsResponse struct { Body []byte HTTPResponse *http.Response + JSON200 *PaginatedSectionResponseSchema + JSON400 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r PinDashboardLinkResponse) Status() string { +func (r ListSectionsResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9610,20 +16103,21 @@ func (r PinDashboardLinkResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r PinDashboardLinkResponse) StatusCode() int { +func (r ListSectionsResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type VisitDashboardLinkResponse struct { +type GetSectionsCalendarResponse struct { Body []byte HTTPResponse *http.Response + JSON400 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r VisitDashboardLinkResponse) Status() string { +func (r GetSectionsCalendarResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9631,20 +16125,23 @@ func (r VisitDashboardLinkResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r VisitDashboardLinkResponse) StatusCode() int { +func (r GetSectionsCalendarResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type RecordDashboardLinkVisitResponse struct { +type MatchSectionCodesResponse struct { Body []byte HTTPResponse *http.Response + JSON200 *MatchSectionCodesResponseSchema + JSON400 *OpenApiErrorSchema + JSON404 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r RecordDashboardLinkVisitResponse) Status() string { +func (r MatchSectionCodesResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9652,22 +16149,23 @@ func (r RecordDashboardLinkVisitResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r RecordDashboardLinkVisitResponse) StatusCode() int { +func (r MatchSectionCodesResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetDescriptionResponse struct { +type GetSectionResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *DescriptionsResponseSchema + JSON200 *SectionDetailSchema JSON400 *OpenApiErrorSchema + JSON404 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r GetDescriptionResponse) Status() string { +func (r GetSectionResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9675,22 +16173,21 @@ func (r GetDescriptionResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetDescriptionResponse) StatusCode() int { +func (r GetSectionResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type UpsertDescriptionResponse struct { +type GetSectionCalendarResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *DescriptionUpsertResponseSchema - JSON400 *OpenApiErrorSchema + JSON404 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r UpsertDescriptionResponse) Status() string { +func (r GetSectionCalendarResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9698,22 +16195,22 @@ func (r UpsertDescriptionResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r UpsertDescriptionResponse) StatusCode() int { +func (r GetSectionCalendarResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type ListHomeworksResponse struct { +type GetSectionScheduleGroupsResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *HomeworksListResponseSchema - JSON400 *OpenApiErrorSchema + JSON200 *[]map[string]interface{} + JSON404 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r ListHomeworksResponse) Status() string { +func (r GetSectionScheduleGroupsResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9721,22 +16218,23 @@ func (r ListHomeworksResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r ListHomeworksResponse) StatusCode() int { +func (r GetSectionScheduleGroupsResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type CreateHomeworkResponse struct { +type GetSectionSchedulesResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *IdResponseSchema + JSON200 *[]map[string]interface{} JSON400 *OpenApiErrorSchema + JSON404 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r CreateHomeworkResponse) Status() string { +func (r GetSectionSchedulesResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9744,23 +16242,22 @@ func (r CreateHomeworkResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r CreateHomeworkResponse) StatusCode() int { +func (r GetSectionSchedulesResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type DeleteHomeworkResponse struct { +type ListSemestersResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *SuccessResponseSchema + JSON200 *PaginatedSemesterResponseSchema JSON400 *OpenApiErrorSchema - JSON404 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r DeleteHomeworkResponse) Status() string { +func (r ListSemestersResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9768,22 +16265,22 @@ func (r DeleteHomeworkResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r DeleteHomeworkResponse) StatusCode() int { +func (r ListSemestersResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type UpdateHomeworkResponse struct { +type GetCurrentSemesterResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *SuccessResponseSchema - JSON400 *OpenApiErrorSchema + JSON200 *SemesterSchema + JSON404 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r UpdateHomeworkResponse) Status() string { +func (r GetCurrentSemesterResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9791,22 +16288,22 @@ func (r UpdateHomeworkResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r UpdateHomeworkResponse) StatusCode() int { +func (r GetCurrentSemesterResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type SetHomeworkCompletionResponse struct { +type ListTeachersResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *HomeworkCompletionResponseSchema + JSON200 *PaginatedTeacherResponseSchema JSON400 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r SetHomeworkCompletionResponse) Status() string { +func (r ListTeachersResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9814,22 +16311,23 @@ func (r SetHomeworkCompletionResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r SetHomeworkCompletionResponse) StatusCode() int { +func (r ListTeachersResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type SetLocaleResponse struct { +type GetTeacherResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *SuccessResponseSchema + JSON200 *TeacherDetailSchema JSON400 *OpenApiErrorSchema + JSON404 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r SetLocaleResponse) Status() string { +func (r GetTeacherResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9837,22 +16335,23 @@ func (r SetLocaleResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r SetLocaleResponse) StatusCode() int { +func (r GetTeacherResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetMeResponse struct { +type ListTodosResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *MeResponseSchema + JSON200 *TodosListResponseSchema + JSON400 *OpenApiErrorSchema JSON401 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r GetMeResponse) Status() string { +func (r ListTodosResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9860,22 +16359,23 @@ func (r GetMeResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetMeResponse) StatusCode() int { +func (r ListTodosResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetSubscribedHomeworksResponse struct { +type CreateTodoResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *SubscribedHomeworksResponseSchema + JSON200 *IdResponseSchema + JSON400 *OpenApiErrorSchema JSON401 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r GetSubscribedHomeworksResponse) Status() string { +func (r CreateTodoResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9883,21 +16383,24 @@ func (r GetSubscribedHomeworksResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetSubscribedHomeworksResponse) StatusCode() int { +func (r CreateTodoResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetMetadataResponse struct { +type DeleteTodoResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *MetadataResponseSchema + JSON200 *SuccessResponseSchema + JSON401 *OpenApiErrorSchema + JSON403 *OpenApiErrorSchema + JSON404 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r GetMetadataResponse) Status() string { +func (r DeleteTodoResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9905,21 +16408,25 @@ func (r GetMetadataResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetMetadataResponse) StatusCode() int { +func (r DeleteTodoResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetOpenApiSpecResponse struct { +type UpdateTodoResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *OpenApiDocumentResponseSchema + JSON200 *TodoUpdateResponseSchema + JSON400 *OpenApiErrorSchema + JSON401 *OpenApiErrorSchema + JSON403 *OpenApiErrorSchema + JSON404 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r GetOpenApiSpecResponse) Status() string { +func (r UpdateTodoResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9927,22 +16434,22 @@ func (r GetOpenApiSpecResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetOpenApiSpecResponse) StatusCode() int { +func (r UpdateTodoResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type ListSchedulesResponse struct { +type ListUploadsResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *PaginatedScheduleResponseSchema - JSON400 *OpenApiErrorSchema + JSON200 *UploadsListResponseSchema + JSON401 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r ListSchedulesResponse) Status() string { +func (r ListUploadsResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9950,22 +16457,25 @@ func (r ListSchedulesResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r ListSchedulesResponse) StatusCode() int { +func (r ListUploadsResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type ListSectionsResponse struct { +type CreateUploadResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *PaginatedSectionResponseSchema + JSON200 *UploadCreateResponseSchema JSON400 *OpenApiErrorSchema + JSON401 *OpenApiErrorSchema + JSON403 *OpenApiErrorSchema + JSON413 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r ListSectionsResponse) Status() string { +func (r CreateUploadResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9973,21 +16483,24 @@ func (r ListSectionsResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r ListSectionsResponse) StatusCode() int { +func (r CreateUploadResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetSectionsCalendarResponse struct { +type CompleteUploadResponse struct { Body []byte HTTPResponse *http.Response + JSON200 *UploadCompleteResponseSchema JSON400 *OpenApiErrorSchema + JSON401 *OpenApiErrorSchema + JSON403 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r GetSectionsCalendarResponse) Status() string { +func (r CompleteUploadResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9995,22 +16508,25 @@ func (r GetSectionsCalendarResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetSectionsCalendarResponse) StatusCode() int { +func (r CompleteUploadResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type MatchSectionCodesResponse struct { +type PutApiUploadsObjectResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *MatchSectionCodesResponseSchema + JSON200 *SuccessResponseSchema JSON400 *OpenApiErrorSchema + JSON401 *OpenApiErrorSchema + JSON403 *OpenApiErrorSchema + JSON413 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r MatchSectionCodesResponse) Status() string { +func (r PutApiUploadsObjectResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10018,22 +16534,25 @@ func (r MatchSectionCodesResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r MatchSectionCodesResponse) StatusCode() int { +func (r PutApiUploadsObjectResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetSectionResponse struct { +type DeleteUploadResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *SectionDetailSchema + JSON200 *UploadDeleteResponseSchema + JSON401 *OpenApiErrorSchema + JSON403 *OpenApiErrorSchema JSON404 *OpenApiErrorSchema + JSON502 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r GetSectionResponse) Status() string { +func (r DeleteUploadResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10041,21 +16560,25 @@ func (r GetSectionResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetSectionResponse) StatusCode() int { +func (r DeleteUploadResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetSectionCalendarResponse struct { +type UpdateUploadResponse struct { Body []byte HTTPResponse *http.Response + JSON200 *UploadRenameResponseSchema + JSON400 *OpenApiErrorSchema + JSON401 *OpenApiErrorSchema + JSON403 *OpenApiErrorSchema JSON404 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r GetSectionCalendarResponse) Status() string { +func (r UpdateUploadResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10063,22 +16586,22 @@ func (r GetSectionCalendarResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetSectionCalendarResponse) StatusCode() int { +func (r UpdateUploadResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetSectionScheduleGroupsResponse struct { +type DownloadUploadResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *[]interface{} + JSON401 *OpenApiErrorSchema JSON404 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r GetSectionScheduleGroupsResponse) Status() string { +func (r DownloadUploadResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10086,22 +16609,23 @@ func (r GetSectionScheduleGroupsResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetSectionScheduleGroupsResponse) StatusCode() int { +func (r DownloadUploadResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetSectionSchedulesResponse struct { +type GetUserCalendarResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *[]interface{} + JSON401 *OpenApiErrorSchema + JSON403 *OpenApiErrorSchema JSON404 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r GetSectionSchedulesResponse) Status() string { +func (r GetUserCalendarResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10109,1146 +16633,1334 @@ func (r GetSectionSchedulesResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetSectionSchedulesResponse) StatusCode() int { +func (r GetUserCalendarResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type ListSemestersResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *PaginatedSemesterResponseSchema - JSON400 *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) } -// Status returns HTTPResponse.Status -func (r ListSemestersResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status +// 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 http.StatusText(0) + return ParseModerateAdminCommentResponse(rsp) } -// StatusCode returns HTTPResponse.StatusCode -func (r ListSemestersResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode +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 0 + return ParseModerateAdminCommentResponse(rsp) } -type GetCurrentSemesterResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *SemesterSchema - JSON404 *OpenApiErrorSchema +// 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) } -// Status returns HTTPResponse.Status -func (r GetCurrentSemesterResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status +// 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 http.StatusText(0) + return ParseUpdateAdminDescriptionResponse(rsp) } -// StatusCode returns HTTPResponse.StatusCode -func (r GetCurrentSemesterResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode +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 0 + return ParseUpdateAdminDescriptionResponse(rsp) } -type ListTeachersResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *PaginatedTeacherResponseSchema - JSON400 *OpenApiErrorSchema +// 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) } -// Status returns HTTPResponse.Status -func (r ListTeachersResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status +// 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 http.StatusText(0) + return ParseDeleteAdminHomeworkResponse(rsp) } -// StatusCode returns HTTPResponse.StatusCode -func (r ListTeachersResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode +// 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 0 + return ParseListAdminSuspensionsResponse(rsp) } -type GetTeacherResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *TeacherDetailSchema - JSON404 *OpenApiErrorSchema +// 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) } -// Status returns HTTPResponse.Status -func (r GetTeacherResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status +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 http.StatusText(0) + return ParseCreateAdminSuspensionResponse(rsp) } -// StatusCode returns HTTPResponse.StatusCode -func (r GetTeacherResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode +// 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 0 + return ParseListAdminUsersResponse(rsp) } -type ListTodosResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *TodosListResponseSchema - JSON401 *OpenApiErrorSchema +// 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) } -// Status returns HTTPResponse.Status -func (r ListTodosResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status +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 http.StatusText(0) + return ParseUpdateAdminUserResponse(rsp) } -// StatusCode returns HTTPResponse.StatusCode -func (r ListTodosResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode +// 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 0 + return ParseQueryBusResponse(rsp) } -type CreateTodoResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *IdResponseSchema - JSON400 *OpenApiErrorSchema - JSON401 *OpenApiErrorSchema +// 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) } -// Status returns HTTPResponse.Status -func (r CreateTodoResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status +// 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 http.StatusText(0) + return ParseGetBusPreferencesResponse(rsp) } -// StatusCode returns HTTPResponse.StatusCode -func (r CreateTodoResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode +// 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 0 + return ParseSetBusPreferencesResponse(rsp) } -type DeleteTodoResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *SuccessResponseSchema - JSON400 *OpenApiErrorSchema - JSON404 *OpenApiErrorSchema +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) } -// Status returns HTTPResponse.Status -func (r DeleteTodoResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status +// 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 http.StatusText(0) + return ParseGetApiBusRoutesResponse(rsp) } -// StatusCode returns HTTPResponse.StatusCode -func (r DeleteTodoResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode +// 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 0 + return ParseDeleteApiCalendarSubscriptionsResponse(rsp) } -type UpdateTodoResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *SuccessResponseSchema - JSON400 *OpenApiErrorSchema +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 UpdateTodoResponse) 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 UpdateTodoResponse) 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 ListUploadsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *UploadsListResponseSchema +// 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 ListUploadsResponse) 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 ListUploadsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode +// 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 0 + return ParseGetCurrentCalendarSubscriptionResponse(rsp) } -type CreateUploadResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *UploadCreateResponseSchema - JSON400 *OpenApiErrorSchema +// 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 ParsePostApiCalendarSubscriptionsImportCodesResponse(rsp) } -// Status returns HTTPResponse.Status -func (r CreateUploadResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status +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 http.StatusText(0) + return ParsePostApiCalendarSubscriptionsImportCodesResponse(rsp) } -// StatusCode returns HTTPResponse.StatusCode -func (r CreateUploadResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode +// 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 0 + return ParseListCommentsResponse(rsp) } -type CompleteUploadResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *UploadCompleteResponseSchema - JSON400 *OpenApiErrorSchema +// 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 ParseCreateCommentResponse(rsp) } -// Status returns HTTPResponse.Status -func (r CompleteUploadResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status +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 http.StatusText(0) + return ParseCreateCommentResponse(rsp) } -// StatusCode returns HTTPResponse.StatusCode -func (r CompleteUploadResponse) 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 DeleteUploadResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *UploadDeleteResponseSchema - 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 DeleteUploadResponse) 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 DeleteUploadResponse) 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 UpdateUploadResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *UploadRenameResponseSchema - JSON400 *OpenApiErrorSchema - 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 UpdateUploadResponse) 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 UpdateUploadResponse) 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 DownloadUploadResponse struct { - Body []byte - HTTPResponse *http.Response - JSON401 *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 DownloadUploadResponse) 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 DownloadUploadResponse) 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) } -type GetUserCalendarResponse struct { - Body []byte - HTTPResponse *http.Response - JSON401 *OpenApiErrorSchema - JSON403 *OpenApiErrorSchema - JSON404 *OpenApiErrorSchema +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 ParsePinDashboardLinkResponse(rsp) } -// Status returns HTTPResponse.Status -func (r GetUserCalendarResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status +// 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 http.StatusText(0) + return ParseVisitDashboardLinkResponse(rsp) } -// StatusCode returns HTTPResponse.StatusCode -func (r GetUserCalendarResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode +// 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 0 + return ParseRecordDashboardLinkVisitResponse(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) RecordDashboardLinkVisitWithFormdataBodyWithResponse(ctx context.Context, body RecordDashboardLinkVisitFormdataRequestBody, reqEditors ...RequestEditorFn) (*RecordDashboardLinkVisitResponse, error) { + rsp, err := c.RecordDashboardLinkVisitWithFormdataBody(ctx, body, reqEditors...) if err != nil { return nil, err } - return ParseListAdminCommentsResponse(rsp) + return ParseRecordDashboardLinkVisitResponse(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...) +// 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 ParseModerateAdminCommentResponse(rsp) + return ParseGetDescriptionResponse(rsp) } -func (c *ClientWithResponses) ModerateAdminCommentWithResponse(ctx context.Context, id string, body ModerateAdminCommentJSONRequestBody, reqEditors ...RequestEditorFn) (*ModerateAdminCommentResponse, error) { - rsp, err := c.ModerateAdminComment(ctx, id, 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 ParseModerateAdminCommentResponse(rsp) + return ParseUpsertDescriptionResponse(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...) +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 ParseListAdminDescriptionsResponse(rsp) + return ParseUpsertDescriptionResponse(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...) +// 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 ParseListAdminHomeworksResponse(rsp) + return ParseListHomeworksResponse(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...) +// 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 ParseDeleteAdminHomeworkResponse(rsp) + return ParseCreateHomeworkResponse(rsp) } -// ListAdminSuspensionsWithResponse request returning *ListAdminSuspensionsResponse -func (c *ClientWithResponses) ListAdminSuspensionsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListAdminSuspensionsResponse, error) { - rsp, err := c.ListAdminSuspensions(ctx, 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 ParseListAdminSuspensionsResponse(rsp) + return ParseCreateHomeworkResponse(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...) +// 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 ParseCreateAdminSuspensionResponse(rsp) + return ParsePutApiHomeworksCompletionsResponse(rsp) } -func (c *ClientWithResponses) CreateAdminSuspensionWithResponse(ctx context.Context, body CreateAdminSuspensionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAdminSuspensionResponse, error) { - rsp, err := c.CreateAdminSuspension(ctx, body, 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 ParseCreateAdminSuspensionResponse(rsp) + return ParsePutApiHomeworksCompletionsResponse(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...) +// 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 ParseUpdateAdminSuspensionResponse(rsp) + return ParseDeleteHomeworkResponse(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...) +// 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 ParseListAdminUsersResponse(rsp) + return ParseUpdateHomeworkResponse(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) 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 ParseUpdateAdminUserResponse(rsp) + return ParseUpdateHomeworkResponse(rsp) } -func (c *ClientWithResponses) UpdateAdminUserWithResponse(ctx context.Context, id string, body UpdateAdminUserJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateAdminUserResponse, error) { - rsp, err := c.UpdateAdminUser(ctx, id, 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 ParseUpdateAdminUserResponse(rsp) + return ParseSetHomeworkCompletionResponse(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) 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 ParseQueryBusResponse(rsp) + return ParseSetHomeworkCompletionResponse(rsp) } -// GetBusPreferencesWithResponse request returning *GetBusPreferencesResponse -func (c *ClientWithResponses) GetBusPreferencesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetBusPreferencesResponse, error) { - rsp, err := c.GetBusPreferences(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 ParseGetBusPreferencesResponse(rsp) + return ParseSetLocaleResponse(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...) +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 ParseSetBusPreferencesResponse(rsp) + return ParseSetLocaleResponse(rsp) } -func (c *ClientWithResponses) SetBusPreferencesWithResponse(ctx context.Context, body SetBusPreferencesJSONRequestBody, reqEditors ...RequestEditorFn) (*SetBusPreferencesResponse, error) { - rsp, err := c.SetBusPreferences(ctx, 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 ParseSetBusPreferencesResponse(rsp) + return ParseGetMeResponse(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...) +// 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 ParseSetCalendarSubscriptionResponse(rsp) + return ParseGetApiMeOverviewResponse(rsp) } -func (c *ClientWithResponses) SetCalendarSubscriptionWithResponse(ctx context.Context, body SetCalendarSubscriptionJSONRequestBody, reqEditors ...RequestEditorFn) (*SetCalendarSubscriptionResponse, error) { - rsp, err := c.SetCalendarSubscription(ctx, 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 ParseSetCalendarSubscriptionResponse(rsp) + return ParseGetSubscribedHomeworksResponse(rsp) } -// GetCurrentCalendarSubscriptionWithResponse request returning *GetCurrentCalendarSubscriptionResponse -func (c *ClientWithResponses) GetCurrentCalendarSubscriptionWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetCurrentCalendarSubscriptionResponse, error) { - rsp, err := c.GetCurrentCalendarSubscription(ctx, 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 ParseGetCurrentCalendarSubscriptionResponse(rsp) + return ParseGetApiMeSubscriptionsSchedulesResponse(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...) +// 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 ParseListCommentsResponse(rsp) + return ParseGetMetadataResponse(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...) +// 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 ParseCreateCommentResponse(rsp) + return ParseGetOpenApiSpecResponse(rsp) } -func (c *ClientWithResponses) CreateCommentWithResponse(ctx context.Context, params *CreateCommentParams, body CreateCommentJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateCommentResponse, error) { - rsp, err := c.CreateComment(ctx, params, 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 ParseCreateCommentResponse(rsp) + return ParseListSchedulesResponse(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...) +// 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 ParseDeleteCommentResponse(rsp) + return ParseListSectionsResponse(rsp) } -func (c *ClientWithResponses) DeleteCommentWithResponse(ctx context.Context, id string, body DeleteCommentJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteCommentResponse, error) { - rsp, err := c.DeleteComment(ctx, id, 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 ParseDeleteCommentResponse(rsp) + return ParseGetSectionsCalendarResponse(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...) +// 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 ParseGetCommentResponse(rsp) + return ParseMatchSectionCodesResponse(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...) +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 ParseUpdateCommentResponse(rsp) + return ParseMatchSectionCodesResponse(rsp) } -func (c *ClientWithResponses) UpdateCommentWithResponse(ctx context.Context, id string, body UpdateCommentJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateCommentResponse, error) { - rsp, err := c.UpdateComment(ctx, id, body, 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 ParseUpdateCommentResponse(rsp) + return ParseGetSectionResponse(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...) +// 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 ParseRemoveCommentReactionResponse(rsp) + return ParseGetSectionCalendarResponse(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...) +// 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 ParseRemoveCommentReactionResponse(rsp) + return ParseGetSectionScheduleGroupsResponse(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...) +// 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 ParseAddCommentReactionResponse(rsp) + return ParseGetSectionSchedulesResponse(rsp) } -func (c *ClientWithResponses) AddCommentReactionWithResponse(ctx context.Context, id string, body AddCommentReactionJSONRequestBody, reqEditors ...RequestEditorFn) (*AddCommentReactionResponse, error) { - rsp, err := c.AddCommentReaction(ctx, id, body, 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 ParseAddCommentReactionResponse(rsp) + return ParseListSemestersResponse(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...) +// 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 ParseListCoursesResponse(rsp) + return ParseGetCurrentSemesterResponse(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...) +// 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 ParseGetCourseResponse(rsp) + return ParseListTeachersResponse(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...) +// 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 ParsePinDashboardLinkResponse(rsp) + return ParseGetTeacherResponse(rsp) } -func (c *ClientWithResponses) PinDashboardLinkWithFormdataBodyWithResponse(ctx context.Context, body PinDashboardLinkFormdataRequestBody, reqEditors ...RequestEditorFn) (*PinDashboardLinkResponse, error) { - rsp, err := c.PinDashboardLinkWithFormdataBody(ctx, 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 ParsePinDashboardLinkResponse(rsp) + return ParseListTodosResponse(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...) +// 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 ParseVisitDashboardLinkResponse(rsp) + return ParseCreateTodoResponse(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...) +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 ParseRecordDashboardLinkVisitResponse(rsp) + return ParseCreateTodoResponse(rsp) } -func (c *ClientWithResponses) RecordDashboardLinkVisitWithFormdataBodyWithResponse(ctx context.Context, params *RecordDashboardLinkVisitParams, body RecordDashboardLinkVisitFormdataRequestBody, reqEditors ...RequestEditorFn) (*RecordDashboardLinkVisitResponse, error) { - rsp, err := c.RecordDashboardLinkVisitWithFormdataBody(ctx, params, 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 ParseRecordDashboardLinkVisitResponse(rsp) + return ParseDeleteTodoResponse(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...) +// 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 ParseGetDescriptionResponse(rsp) + return ParseUpdateTodoResponse(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...) +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 ParseUpsertDescriptionResponse(rsp) + return ParseUpdateTodoResponse(rsp) } -func (c *ClientWithResponses) UpsertDescriptionWithResponse(ctx context.Context, params *UpsertDescriptionParams, body UpsertDescriptionJSONRequestBody, reqEditors ...RequestEditorFn) (*UpsertDescriptionResponse, error) { - rsp, err := c.UpsertDescription(ctx, params, 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 ParseUpsertDescriptionResponse(rsp) + return ParseListUploadsResponse(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...) +// 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 ParseListHomeworksResponse(rsp) + return ParseCreateUploadResponse(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...) +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 ParseCreateHomeworkResponse(rsp) + return ParseCreateUploadResponse(rsp) } -func (c *ClientWithResponses) CreateHomeworkWithResponse(ctx context.Context, params *CreateHomeworkParams, body CreateHomeworkJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateHomeworkResponse, error) { - rsp, err := c.CreateHomework(ctx, params, body, 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 ParseCreateHomeworkResponse(rsp) + return ParseCompleteUploadResponse(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...) +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 ParseDeleteHomeworkResponse(rsp) + return ParseCompleteUploadResponse(rsp) } -func (c *ClientWithResponses) DeleteHomeworkWithResponse(ctx context.Context, id string, body DeleteHomeworkJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteHomeworkResponse, error) { - rsp, err := c.DeleteHomework(ctx, id, body, 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 ParseDeleteHomeworkResponse(rsp) + return ParsePutApiUploadsObjectResponse(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...) +// 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 ParseUpdateHomeworkResponse(rsp) + return ParseDeleteUploadResponse(rsp) } -func (c *ClientWithResponses) UpdateHomeworkWithResponse(ctx context.Context, id string, body UpdateHomeworkJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateHomeworkResponse, error) { - rsp, err := c.UpdateHomework(ctx, id, body, 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 ParseUpdateHomeworkResponse(rsp) + return ParseUpdateUploadResponse(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) 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 ParseSetHomeworkCompletionResponse(rsp) + return ParseUpdateUploadResponse(rsp) } -func (c *ClientWithResponses) SetHomeworkCompletionWithResponse(ctx context.Context, id string, body SetHomeworkCompletionJSONRequestBody, reqEditors ...RequestEditorFn) (*SetHomeworkCompletionResponse, error) { - rsp, err := c.SetHomeworkCompletion(ctx, id, body, 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 ParseSetHomeworkCompletionResponse(rsp) + return ParseDownloadUploadResponse(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...) +// 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 ParseSetLocaleResponse(rsp) + return ParseGetUserCalendarResponse(rsp) } -func (c *ClientWithResponses) SetLocaleWithResponse(ctx context.Context, body SetLocaleJSONRequestBody, reqEditors ...RequestEditorFn) (*SetLocaleResponse, error) { - rsp, err := c.SetLocale(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 ParseSetLocaleResponse(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 } -// GetMeWithResponse request returning *GetMeResponse -func (c *ClientWithResponses) GetMeWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetMeResponse, error) { - rsp, err := c.GetMe(ctx, 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 ParseGetMeResponse(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 } -// GetSubscribedHomeworksWithResponse request returning *GetSubscribedHomeworksResponse -func (c *ClientWithResponses) GetSubscribedHomeworksWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetSubscribedHomeworksResponse, error) { - rsp, err := c.GetSubscribedHomeworks(ctx, 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 ParseGetSubscribedHomeworksResponse(rsp) -} -// 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 + 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 ParseGetMetadataResponse(rsp) + + return response, nil } -// GetOpenApiSpecWithResponse request returning *GetOpenApiSpecResponse -func (c *ClientWithResponses) GetOpenApiSpecWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetOpenApiSpecResponse, error) { - rsp, err := c.GetOpenApiSpec(ctx, 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 ParseGetOpenApiSpecResponse(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...) - if err != nil { - return nil, err + response := &UpdateAdminDescriptionResponse{ + Body: bodyBytes, + HTTPResponse: rsp, } - return ParseListSchedulesResponse(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...) - if err != nil { - return nil, err + 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 ParseListSectionsResponse(rsp) + + return response, nil } -// GetSectionsCalendarWithResponse request returning *GetSectionsCalendarResponse -func (c *ClientWithResponses) GetSectionsCalendarWithResponse(ctx context.Context, params *GetSectionsCalendarParams, reqEditors ...RequestEditorFn) (*GetSectionsCalendarResponse, error) { - rsp, err := c.GetSectionsCalendar(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 ParseGetSectionsCalendarResponse(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...) - if err != nil { - return nil, err + response := &ListAdminHomeworksResponse{ + Body: bodyBytes, + HTTPResponse: rsp, } - return ParseMatchSectionCodesResponse(rsp) -} -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 + 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 ParseMatchSectionCodesResponse(rsp) + + 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...) +// 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 ParseGetSectionResponse(rsp) -} -// 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 + response := &DeleteAdminHomeworkResponse{ + Body: bodyBytes, + HTTPResponse: rsp, } - return ParseGetSectionCalendarResponse(rsp) -} -// 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 + 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 ParseGetSectionScheduleGroupsResponse(rsp) + + return response, nil } -// GetSectionSchedulesWithResponse request returning *GetSectionSchedulesResponse -func (c *ClientWithResponses) GetSectionSchedulesWithResponse(ctx context.Context, jwId int64, reqEditors ...RequestEditorFn) (*GetSectionSchedulesResponse, error) { - rsp, err := c.GetSectionSchedules(ctx, jwId, 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 ParseGetSectionSchedulesResponse(rsp) -} -// 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 + response := &ListAdminSuspensionsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, } - 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 + 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 ParseGetCurrentSemesterResponse(rsp) + + return response, nil } -// ListTeachersWithResponse request returning *ListTeachersResponse -func (c *ClientWithResponses) ListTeachersWithResponse(ctx context.Context, params *ListTeachersParams, reqEditors ...RequestEditorFn) (*ListTeachersResponse, error) { - rsp, err := c.ListTeachers(ctx, params, 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 ParseListTeachersResponse(rsp) -} -// GetTeacherWithResponse request returning *GetTeacherResponse -func (c *ClientWithResponses) GetTeacherWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*GetTeacherResponse, error) { - rsp, err := c.GetTeacher(ctx, id, reqEditors...) - if err != nil { - return nil, err + response := &CreateAdminSuspensionResponse{ + Body: bodyBytes, + HTTPResponse: rsp, } - 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 - } - return ParseListTodosResponse(rsp) -} + 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 -// 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 } - return ParseCreateTodoResponse(rsp) -} -func (c *ClientWithResponses) CreateTodoWithResponse(ctx context.Context, params *CreateTodoParams, body CreateTodoJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTodoResponse, error) { - rsp, err := c.CreateTodo(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreateTodoResponse(rsp) + return response, nil } -// 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...) +// 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 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 + response := &UpdateAdminSuspensionResponse{ + Body: bodyBytes, + HTTPResponse: rsp, } - return ParseDeleteTodoResponse(rsp) -} -// 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 ParseUpdateTodoResponse(rsp) -} + 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 -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 ParseUpdateTodoResponse(rsp) -} + 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 -// 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 ParseListUploadsResponse(rsp) -} + 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 -// 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 ParseCreateUploadResponse(rsp) -} + 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 -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 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 - } - return ParseCompleteUploadResponse(rsp) + return response, nil } -func (c *ClientWithResponses) CompleteUploadWithResponse(ctx context.Context, body CompleteUploadJSONRequestBody, reqEditors ...RequestEditorFn) (*CompleteUploadResponse, error) { - rsp, err := c.CompleteUpload(ctx, 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 ParseCompleteUploadResponse(rsp) -} -// 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...) - if err != nil { - return nil, err + response := &ListAdminUsersResponse{ + Body: bodyBytes, + HTTPResponse: rsp, } - 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 - } - return ParseDeleteUploadResponse(rsp) -} + 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 -// 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 ParseUpdateUploadResponse(rsp) -} + 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 -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 ParseUpdateUploadResponse(rsp) -} + 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 -// 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 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 - } - return ParseGetUserCalendarResponse(rsp) + return response, nil } -// ParseListAdminCommentsResponse parses an HTTP response from a ListAdminCommentsWithResponse call -func ParseListAdminCommentsResponse(rsp *http.Response) (*ListAdminCommentsResponse, error) { +// 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 } - response := &ListAdminCommentsResponse{ + response := &UpdateAdminUserResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest AdminCommentsResponseSchema + var dest AdminUserResponseSchema if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -11261,27 +17973,48 @@ func ParseListAdminCommentsResponse(rsp *http.Response) (*ListAdminCommentsRespo } 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 } -// ParseModerateAdminCommentResponse parses an HTTP response from a ModerateAdminCommentWithResponse call -func ParseModerateAdminCommentResponse(rsp *http.Response) (*ModerateAdminCommentResponse, 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 := &ModerateAdminCommentResponse{ + response := &QueryBusResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest AdminModeratedCommentResponseSchema + var dest BusQueryResponseSchema if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -11299,22 +18032,22 @@ func ParseModerateAdminCommentResponse(rsp *http.Response) (*ModerateAdminCommen return response, nil } -// ParseListAdminDescriptionsResponse parses an HTTP response from a ListAdminDescriptionsWithResponse call -func ParseListAdminDescriptionsResponse(rsp *http.Response) (*ListAdminDescriptionsResponse, 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 := &ListAdminDescriptionsResponse{ + response := &GetApiBusNextResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest AdminDescriptionsResponseSchema + var dest BusNextDeparturesResponseSchema if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -11327,119 +18060,147 @@ func ParseListAdminDescriptionsResponse(rsp *http.Response) (*ListAdminDescripti } 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 } -// ParseListAdminHomeworksResponse parses an HTTP response from a ListAdminHomeworksWithResponse call -func ParseListAdminHomeworksResponse(rsp *http.Response) (*ListAdminHomeworksResponse, 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 := &ListAdminHomeworksResponse{ + response := &GetBusPreferencesResponse{ 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 } 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 } -// ParseDeleteAdminHomeworkResponse parses an HTTP response from a DeleteAdminHomeworkWithResponse call -func ParseDeleteAdminHomeworkResponse(rsp *http.Response) (*DeleteAdminHomeworkResponse, 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 := &DeleteAdminHomeworkResponse{ + response := &SetBusPreferencesResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest SuccessResponseSchema + 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 == 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 } -// ParseListAdminSuspensionsResponse parses an HTTP response from a ListAdminSuspensionsWithResponse call -func ParseListAdminSuspensionsResponse(rsp *http.Response) (*ListAdminSuspensionsResponse, 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 := &ListAdminSuspensionsResponse{ + response := &GetApiBusRoutesResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest AdminSuspensionsResponseSchema + 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 { + 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) { +// 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 := &CreateAdminSuspensionResponse{ + response := &DeleteApiCalendarSubscriptionsResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest AdminSuspensionResponseSchema + var dest CalendarSubscriptionRemoveResponseSchema if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -11452,32 +18213,60 @@ 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) { +// 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 := &UpdateAdminSuspensionResponse{ + 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 } 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 { @@ -11490,22 +18279,22 @@ func ParseUpdateAdminSuspensionResponse(rsp *http.Response) (*UpdateAdminSuspens return response, nil } -// ParseListAdminUsersResponse parses an HTTP response from a ListAdminUsersWithResponse call -func ParseListAdminUsersResponse(rsp *http.Response) (*ListAdminUsersResponse, 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 := &ListAdminUsersResponse{ + response := &SetCalendarSubscriptionResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest AdminUsersResponseSchema + var dest CalendarSubscriptionCreateResponseSchema if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -11518,60 +18307,67 @@ 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 + } 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,60 +18380,81 @@ 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) { +// 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 := &GetBusPreferencesResponse{ + 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 } response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + 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.JSON401 = &dest + 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 } -// ParseSetBusPreferencesResponse parses an HTTP response from a SetBusPreferencesWithResponse call -func ParseSetBusPreferencesResponse(rsp *http.Response) (*SetBusPreferencesResponse, 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 := &SetBusPreferencesResponse{ + response := &CreateCommentResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest BusPreferenceResponseSchema + var dest IdResponseSchema if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -11657,93 +18474,128 @@ func ParseSetBusPreferencesResponse(rsp *http.Response) (*SetBusPreferencesRespo } 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 } -// ParseSetCalendarSubscriptionResponse parses an HTTP response from a SetCalendarSubscriptionWithResponse call -func ParseSetCalendarSubscriptionResponse(rsp *http.Response) (*SetCalendarSubscriptionResponse, 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 := &SetCalendarSubscriptionResponse{ + response := &DeleteCommentResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest CalendarSubscriptionCreateResponseSchema + 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 } -// ParseGetCurrentCalendarSubscriptionResponse parses an HTTP response from a GetCurrentCalendarSubscriptionWithResponse call -func ParseGetCurrentCalendarSubscriptionResponse(rsp *http.Response) (*GetCurrentCalendarSubscriptionResponse, 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 := &GetCurrentCalendarSubscriptionResponse{ + response := &GetCommentResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest CurrentCalendarSubscriptionResponseSchema + 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 == 401: + 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.JSON401 = &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 } -// ParseListCommentsResponse parses an HTTP response from a ListCommentsWithResponse call -func ParseListCommentsResponse(rsp *http.Response) (*ListCommentsResponse, 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 := &ListCommentsResponse{ + response := &UpdateCommentResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest CommentsListResponseSchema + var dest CommentUpdateResponseSchema if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -11756,27 +18608,48 @@ func ParseListCommentsResponse(rsp *http.Response) (*ListCommentsResponse, 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 } -// ParseCreateCommentResponse parses an HTTP response from a CreateCommentWithResponse call -func ParseCreateCommentResponse(rsp *http.Response) (*CreateCommentResponse, 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 := &CreateCommentResponse{ + response := &RemoveCommentReactionResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest IdResponseSchema + var dest SuccessResponseSchema if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -11789,20 +18662,34 @@ func ParseCreateCommentResponse(rsp *http.Response) (*CreateCommentResponse, 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 + } return response, nil } -// ParseDeleteCommentResponse parses an HTTP response from a DeleteCommentWithResponse call -func ParseDeleteCommentResponse(rsp *http.Response) (*DeleteCommentResponse, 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 := &DeleteCommentResponse{ + response := &AddCommentReactionResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -11815,12 +18702,26 @@ func ParseDeleteCommentResponse(rsp *http.Response) (*DeleteCommentResponse, 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 == 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.JSON400 = &dest + response.JSON403 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest OpenApiErrorSchema @@ -11834,55 +18735,55 @@ 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) { +// 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 := &GetCommentResponse{ + response := &ListCoursesResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest CommentThreadResponseSchema + 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 == 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 } return response, nil } -// ParseUpdateCommentResponse parses an HTTP response from a UpdateCommentWithResponse call -func ParseUpdateCommentResponse(rsp *http.Response) (*UpdateCommentResponse, 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 := &UpdateCommentResponse{ + response := &GetCourseResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest CommentUpdateResponseSchema + var dest CourseDetailSchema if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -11907,74 +18808,101 @@ 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) { +// 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 := &RemoveCommentReactionResponse{ + response := &PinDashboardLinkResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest SuccessResponseSchema + 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 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 } -// ParseAddCommentReactionResponse parses an HTTP response from a AddCommentReactionWithResponse call -func ParseAddCommentReactionResponse(rsp *http.Response) (*AddCommentReactionResponse, error) { +// ParseVisitDashboardLinkResponse parses an HTTP response from a VisitDashboardLinkWithResponse call +func ParseVisitDashboardLinkResponse(rsp *http.Response) (*VisitDashboardLinkResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &AddCommentReactionResponse{ + response := &VisitDashboardLinkResponse{ Body: bodyBytes, HTTPResponse: rsp, } - 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 + return response, nil +} + +// ParseRecordDashboardLinkVisitResponse parses an HTTP response from a RecordDashboardLinkVisitWithResponse call +func ParseRecordDashboardLinkVisitResponse(rsp *http.Response) (*RecordDashboardLinkVisitResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + response := &RecordDashboardLinkVisitResponse{ + Body: bodyBytes, + HTTPResponse: rsp, } return response, nil } -// ParseListCoursesResponse parses an HTTP response from a ListCoursesWithResponse call -func ParseListCoursesResponse(rsp *http.Response) (*ListCoursesResponse, error) { +// ParseGetDescriptionResponse parses an HTTP response from a GetDescriptionWithResponse call +func ParseGetDescriptionResponse(rsp *http.Response) (*GetDescriptionResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListCoursesResponse{ + response := &GetDescriptionResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest PaginatedCourseResponseSchema + var dest DescriptionsResponseSchema if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -11987,108 +18915,128 @@ func ParseListCoursesResponse(rsp *http.Response) (*ListCoursesResponse, error) } 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 } -// ParseGetCourseResponse parses an HTTP response from a GetCourseWithResponse call -func ParseGetCourseResponse(rsp *http.Response) (*GetCourseResponse, error) { +// ParseUpsertDescriptionResponse parses an HTTP response from a UpsertDescriptionWithResponse call +func ParseUpsertDescriptionResponse(rsp *http.Response) (*UpsertDescriptionResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetCourseResponse{ + response := &UpsertDescriptionResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest CourseDetailSchema + var dest DescriptionUpsertResponseSchema 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 -} + 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 -// 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 == 404: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest - response := &PinDashboardLinkResponse{ - Body: bodyBytes, - HTTPResponse: rsp, } return response, nil } -// ParseVisitDashboardLinkResponse parses an HTTP response from a VisitDashboardLinkWithResponse call -func ParseVisitDashboardLinkResponse(rsp *http.Response) (*VisitDashboardLinkResponse, error) { +// ParseListHomeworksResponse parses an HTTP response from a ListHomeworksWithResponse call +func ParseListHomeworksResponse(rsp *http.Response) (*ListHomeworksResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &VisitDashboardLinkResponse{ + response := &ListHomeworksResponse{ Body: bodyBytes, HTTPResponse: rsp, } - return response, nil -} + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest HomeworksListResponseSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest -// ParseRecordDashboardLinkVisitResponse parses an HTTP response from a RecordDashboardLinkVisitWithResponse call -func ParseRecordDashboardLinkVisitResponse(rsp *http.Response) (*RecordDashboardLinkVisitResponse, 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 == 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 - response := &RecordDashboardLinkVisitResponse{ - Body: bodyBytes, - HTTPResponse: rsp, } return response, nil } -// ParseGetDescriptionResponse parses an HTTP response from a GetDescriptionWithResponse call -func ParseGetDescriptionResponse(rsp *http.Response) (*GetDescriptionResponse, error) { +// ParseCreateHomeworkResponse parses an HTTP response from a CreateHomeworkWithResponse call +func ParseCreateHomeworkResponse(rsp *http.Response) (*CreateHomeworkResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetDescriptionResponse{ + response := &CreateHomeworkResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest DescriptionsResponseSchema + var dest HomeworkCreateResponseSchema if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -12101,27 +19049,48 @@ func ParseGetDescriptionResponse(rsp *http.Response) (*GetDescriptionResponse, 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 } -// ParseUpsertDescriptionResponse parses an HTTP response from a UpsertDescriptionWithResponse call -func ParseUpsertDescriptionResponse(rsp *http.Response) (*UpsertDescriptionResponse, error) { +// 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 := &UpsertDescriptionResponse{ + response := &PutApiHomeworksCompletionsResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest DescriptionUpsertResponseSchema + var dest HomeworkCompletionBatchResponseSchema if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -12134,93 +19103,135 @@ 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 + } return response, nil } -// ParseListHomeworksResponse parses an HTTP response from a ListHomeworksWithResponse call -func ParseListHomeworksResponse(rsp *http.Response) (*ListHomeworksResponse, error) { +// ParseDeleteHomeworkResponse parses an HTTP response from a DeleteHomeworkWithResponse call +func ParseDeleteHomeworkResponse(rsp *http.Response) (*DeleteHomeworkResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListHomeworksResponse{ + response := &DeleteHomeworkResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest HomeworksListResponseSchema + 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 } -// ParseCreateHomeworkResponse parses an HTTP response from a CreateHomeworkWithResponse call -func ParseCreateHomeworkResponse(rsp *http.Response) (*CreateHomeworkResponse, error) { +// ParseUpdateHomeworkResponse parses an HTTP response from a UpdateHomeworkWithResponse call +func ParseUpdateHomeworkResponse(rsp *http.Response) (*UpdateHomeworkResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreateHomeworkResponse{ + response := &UpdateHomeworkResponse{ Body: bodyBytes, HTTPResponse: rsp, } - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest IdResponseSchema + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest HomeworkUpdateResponseSchema + 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.JSON200 = &dest + response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + 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.JSON400 = &dest + response.JSON404 = &dest } return response, nil } -// ParseDeleteHomeworkResponse parses an HTTP response from a DeleteHomeworkWithResponse call -func ParseDeleteHomeworkResponse(rsp *http.Response) (*DeleteHomeworkResponse, error) { +// ParseSetHomeworkCompletionResponse parses an HTTP response from a SetHomeworkCompletionWithResponse call +func ParseSetHomeworkCompletionResponse(rsp *http.Response) (*SetHomeworkCompletionResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DeleteHomeworkResponse{ + response := &SetHomeworkCompletionResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest SuccessResponseSchema + var dest HomeworkCompletionResponseSchema if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -12233,6 +19244,13 @@ func ParseDeleteHomeworkResponse(rsp *http.Response) (*DeleteHomeworkResponse, 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 { @@ -12245,15 +19263,15 @@ func ParseDeleteHomeworkResponse(rsp *http.Response) (*DeleteHomeworkResponse, e return response, nil } -// ParseUpdateHomeworkResponse parses an HTTP response from a UpdateHomeworkWithResponse call -func ParseUpdateHomeworkResponse(rsp *http.Response) (*UpdateHomeworkResponse, error) { +// ParseSetLocaleResponse parses an HTTP response from a SetLocaleWithResponse call +func ParseSetLocaleResponse(rsp *http.Response) (*SetLocaleResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &UpdateHomeworkResponse{ + response := &SetLocaleResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -12278,55 +19296,55 @@ func ParseUpdateHomeworkResponse(rsp *http.Response) (*UpdateHomeworkResponse, e return response, nil } -// ParseSetHomeworkCompletionResponse parses an HTTP response from a SetHomeworkCompletionWithResponse call -func ParseSetHomeworkCompletionResponse(rsp *http.Response) (*SetHomeworkCompletionResponse, error) { +// ParseGetMeResponse parses an HTTP response from a GetMeWithResponse call +func ParseGetMeResponse(rsp *http.Response) (*GetMeResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &SetHomeworkCompletionResponse{ + response := &GetMeResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest HomeworkCompletionResponseSchema + var dest MeResponseSchema 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 } -// ParseSetLocaleResponse parses an HTTP response from a SetLocaleWithResponse call -func ParseSetLocaleResponse(rsp *http.Response) (*SetLocaleResponse, error) { +// 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 := &SetLocaleResponse{ + response := &GetApiMeOverviewResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest SuccessResponseSchema + var dest CompactOverviewResponseSchema if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -12339,27 +19357,34 @@ func ParseSetLocaleResponse(rsp *http.Response) (*SetLocaleResponse, 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 + } return response, nil } -// ParseGetMeResponse parses an HTTP response from a GetMeWithResponse call -func ParseGetMeResponse(rsp *http.Response) (*GetMeResponse, error) { +// ParseGetSubscribedHomeworksResponse parses an HTTP response from a GetSubscribedHomeworksWithResponse call +func ParseGetSubscribedHomeworksResponse(rsp *http.Response) (*GetSubscribedHomeworksResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetMeResponse{ + response := &GetSubscribedHomeworksResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest MeResponseSchema + var dest SubscribedHomeworksResponseSchema if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -12377,27 +19402,34 @@ func ParseGetMeResponse(rsp *http.Response) (*GetMeResponse, error) { return response, nil } -// ParseGetSubscribedHomeworksResponse parses an HTTP response from a GetSubscribedHomeworksWithResponse call -func ParseGetSubscribedHomeworksResponse(rsp *http.Response) (*GetSubscribedHomeworksResponse, error) { +// 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 := &GetSubscribedHomeworksResponse{ + response := &GetApiMeSubscriptionsSchedulesResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest SubscribedHomeworksResponseSchema + 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 { @@ -12582,6 +19614,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 +19647,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 +19707,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 +19740,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 +19885,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 +19925,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 { @@ -12938,12 +20005,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 +20046,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 +20059,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 +20106,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 +20146,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 +20200,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 +20254,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 +20315,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 +20362,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 { From 582e4b47a82c9a472221204b842737851e91f388 Mon Sep 17 00:00:00 2001 From: Tiankai Ma Date: Tue, 30 Jun 2026 13:26:12 +0800 Subject: [PATCH 03/10] fix(ci): override OPENAPI_SOURCE for drift check in CI --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a730a92..dffc951 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,7 +33,7 @@ jobs: - name: Check generated code is up-to-date run: | - make sync-openapi generate + make sync-openapi generate OPENAPI_SOURCE=server/public/openapi.generated.json git diff --exit-code lint: From ba6920116cd354d5082769df2e02f97c18998fd2 Mon Sep 17 00:00:00 2001 From: Tiankai Ma Date: Tue, 30 Jun 2026 15:36:59 +0800 Subject: [PATCH 04/10] feat(auth): use golang.org/x/oauth2 and validate id token/audience --- go.mod | 2 + go.sum | 4 + internal/auth/auth.go | 113 ++++++++++++----------- internal/auth/device.go | 127 +++++++------------------- internal/auth/oauth.go | 194 ++++++++++++++++++++++++++++++++++++++++ 5 files changed, 289 insertions(+), 151 deletions(-) create mode 100644 internal/auth/oauth.go 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..a66483a 100644 --- a/internal/auth/auth.go +++ b/internal/auth/auth.go @@ -12,13 +12,13 @@ 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" @@ -133,9 +133,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 +165,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,34 +230,23 @@ 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}, - } - - httpClient := &http.Client{Timeout: 15 * time.Second} - tokenResp, err := httpClient.PostForm(tokenEndpoint, tokenData) + tok, err := conf.Exchange(ctx, result.code, + oauth2.VerifierOption(verifier), + oauth2.SetAuthURLParam("resource", server), + ) if err != nil { - return nil, err + return nil, fmt.Errorf("token exchange failed: %w", 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)) + vt := newVerifiedToken(tok) + 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, server); err != nil { + return nil, err } - - return credentialFromTokens(clientID, server, tokens, "", "") + return verifiedTokenToCredential(clientID, server, vt, "", "", time.Now()) } // RefreshToken attempts to refresh the access token. @@ -264,35 +258,38 @@ 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}, + conf := &oauth2.Config{ + ClientID: cred.ClientID, + Scopes: strings.Fields(cred.Scope), + Endpoint: oauth2.Endpoint{TokenURL: tokenEndpoint}, } - if cred.Resource != "" { - data.Set("resource", cred.Resource) + + 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), } - client := &http.Client{Timeout: 15 * time.Second} - resp, err := client.PostForm(tokenEndpoint, data) + tok, err := conf.TokenSource(ctx, token).Token() if err != nil { - return nil, err + return nil, fmt.Errorf("refresh failed: %w", err) } - 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)) + vt := newVerifiedToken(tok) + issuer := stringFromMap(meta, "issuer") + if issuer == "" { + issuer = strings.TrimRight(server, "/") } - - 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) + audience := cred.Resource + if audience == "" { + audience = strings.TrimRight(server, "/") } - - return credentialFromTokens(cred.ClientID, cred.Resource, tokens, cred.RefreshToken, cred.Scope) + if err := vt.ValidateIDToken(issuer, audience); err != nil { + return nil, err + } + return verifiedTokenToCredential(cred.ClientID, cred.Resource, vt, cred.RefreshToken, cred.Scope, time.Now()) } func requiredString(values map[string]any, key string) (string, error) { diff --git a/internal/auth/device.go b/internal/auth/device.go index 5f03f27..5a28572 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,53 @@ 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) + issuer := stringFromMap(meta, "issuer") + if issuer == "" { + issuer = server } - - return nil, fmt.Errorf("device code expired — please try again") + if err := vt.ValidateIDToken(issuer, server); err != nil { + return nil, err + } + return verifiedTokenToCredential(clientID, server, vt, "", "", time.Now()) } diff --git a/internal/auth/oauth.go b/internal/auth/oauth.go new file mode 100644 index 0000000..d3eec30 --- /dev/null +++ b/internal/auth/oauth.go @@ -0,0 +1,194 @@ +package auth + +import ( + "context" + "encoding/json" + "errors" + "fmt" + "net/http" + "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. +func (t *VerifiedToken) ValidateIDToken(issuer, audience string) error { + if t == nil || t.IDToken == "" { + return nil + } + 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 issuer != "" { + if iss, _ := claims["iss"].(string); strings.TrimSpace(iss) != issuer { + return fmt.Errorf("invalid issuer %q, expected %q", iss, issuer) + } + } + if audience != "" { + 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") + } + var n int64 + _, err := fmt.Sscanf(s, "%d", &n) + return n, err +} + +func verifiedTokenToCredential(clientID, resource string, vt *VerifiedToken, fallbackRefresh, fallbackScope string, now time.Time) (*config.Credential, error) { + 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 +} + +// jsonValid reports whether b is valid JSON. +func jsonValid(b []byte) bool { return json.Valid(b) } From 7028497ed468ddf64a775ccad866b76c8898923b Mon Sep 17 00:00:00 2001 From: Tiankai Ma Date: Tue, 30 Jun 2026 15:51:46 +0800 Subject: [PATCH 05/10] fix(auth): address review feedback for oauth2 migration - Preserve computed audience fallback in verifiedTokenToCredential on refresh. - Remove dead code: credentialFromTokens, requiredString, strDefault, jsonValid. - Reject empty issuer/audience in ValidateIDToken instead of skipping checks. - Use strconv.ParseInt in parseIntString. - Trim server consistently in RefreshToken and document resource refresh regression. --- internal/auth/auth.go | 54 +++++++------------------------------- internal/auth/auth_test.go | 24 +++++++++++------ internal/auth/oauth.go | 33 +++++++++++------------ 3 files changed, 41 insertions(+), 70 deletions(-) diff --git a/internal/auth/auth.go b/internal/auth/auth.go index a66483a..7e984e9 100644 --- a/internal/auth/auth.go +++ b/internal/auth/auth.go @@ -250,7 +250,13 @@ func Login(server string) (*config.Credential, error) { } // 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/audience is still preserved in the returned credential and +// used for ID token validation. func RefreshToken(server string, cred *config.Credential) (*config.Credential, error) { + server = strings.TrimRight(server, "/") if cred.RefreshToken == "" { return nil, fmt.Errorf("no refresh token") } @@ -280,56 +286,14 @@ func RefreshToken(server string, cred *config.Credential) (*config.Credential, e vt := newVerifiedToken(tok) issuer := stringFromMap(meta, "issuer") if issuer == "" { - issuer = strings.TrimRight(server, "/") + issuer = server } audience := cred.Resource if audience == "" { - audience = strings.TrimRight(server, "/") + audience = server } if err := vt.ValidateIDToken(issuer, audience); err != nil { return nil, err } - return verifiedTokenToCredential(cred.ClientID, cred.Resource, vt, cred.RefreshToken, cred.Scope, time.Now()) -} - -func requiredString(values map[string]any, key string) (string, error) { - if s, ok := values[key].(string); ok && s != "" { - return s, nil - } - return "", fmt.Errorf("token response missing %q", key) -} - -func strDefault(v any) string { - if s, ok := v.(string); ok { - return s - } - 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 { - 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, audience, vt, cred.RefreshToken, cred.Scope, time.Now()) } diff --git a/internal/auth/auth_test.go b/internal/auth/auth_test.go index 813d46a..369c0ac 100644 --- a/internal/auth/auth_test.go +++ b/internal/auth/auth_test.go @@ -1,12 +1,16 @@ package auth -import "testing" +import ( + "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") +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 +20,14 @@ 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") } } diff --git a/internal/auth/oauth.go b/internal/auth/oauth.go index d3eec30..bb37513 100644 --- a/internal/auth/oauth.go +++ b/internal/auth/oauth.go @@ -2,10 +2,10 @@ package auth import ( "context" - "encoding/json" "errors" "fmt" "net/http" + "strconv" "strings" "time" @@ -54,10 +54,18 @@ func tokenExtraString(tok *oauth2.Token, key string) string { // 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) @@ -66,15 +74,11 @@ func (t *VerifiedToken) ValidateIDToken(issuer, audience string) error { if err := parsed.UnsafeClaimsWithoutVerification(&claims); err != nil { return fmt.Errorf("invalid id_token claims: %w", err) } - if issuer != "" { - if iss, _ := claims["iss"].(string); strings.TrimSpace(iss) != issuer { - return fmt.Errorf("invalid issuer %q, expected %q", iss, issuer) - } + if iss, _ := claims["iss"].(string); strings.TrimSpace(iss) != issuer { + return fmt.Errorf("invalid issuer %q, expected %q", iss, issuer) } - if audience != "" { - if !audienceMatches(claims["aud"], audience) { - return fmt.Errorf("invalid audience, expected %q", audience) - } + 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") @@ -117,12 +121,10 @@ func parseIntString(s string) (int64, error) { if s == "" { return 0, errors.New("empty") } - var n int64 - _, err := fmt.Sscanf(s, "%d", &n) - return n, err + return strconv.ParseInt(s, 10, 64) } -func verifiedTokenToCredential(clientID, resource string, vt *VerifiedToken, fallbackRefresh, fallbackScope string, now time.Time) (*config.Credential, error) { +func verifiedTokenToCredential(clientID, audience string, vt *VerifiedToken, fallbackRefresh, fallbackScope string, now time.Time) (*config.Credential, error) { accessToken := strings.TrimSpace(vt.AccessToken) if accessToken == "" { return nil, errors.New("token response missing access_token") @@ -146,7 +148,7 @@ func verifiedTokenToCredential(clientID, resource string, vt *VerifiedToken, fal TokenType: strings.TrimSpace(vt.TokenType), ExpiresAt: float64(now.Add(time.Duration(expiresIn) * time.Second).Unix()), Scope: scope, - Resource: resource, + Resource: audience, }, nil } @@ -189,6 +191,3 @@ func tokenExpiresIn(tok *oauth2.Token, fallback int) int { } return fallback } - -// jsonValid reports whether b is valid JSON. -func jsonValid(b []byte) bool { return json.Valid(b) } From 8b3ddcabf68576b3bf922398f06365b7fc6eef8d Mon Sep 17 00:00:00 2001 From: Tiankai Ma Date: Tue, 30 Jun 2026 16:27:49 +0800 Subject: [PATCH 06/10] fix(auth): validate ID token audience against client_id and require id_token for openid scope - Pass registered clientID (not server URL) as audience to ValidateIDToken in Login, RefreshToken, and LoginDeviceCode. - Keep Credential.Resource as the server URL/resource indicator; verifiedTokenToCredential now accepts resource separately. - Return an error when openid scope was requested but the token response lacks id_token. - Add nil guard for VerifiedToken in verifiedTokenToCredential. - Document ExpiresAt - 1h heuristic in RefreshToken. - Add unit tests for audience validation, nil guard, and missing id_token. --- internal/auth/auth.go | 29 ++++++++++++------ internal/auth/auth_test.go | 62 ++++++++++++++++++++++++++++++++++++++ internal/auth/device.go | 7 +++-- internal/auth/oauth.go | 26 ++++++++++++++-- 4 files changed, 111 insertions(+), 13 deletions(-) diff --git a/internal/auth/auth.go b/internal/auth/auth.go index 7e984e9..a56bc25 100644 --- a/internal/auth/auth.go +++ b/internal/auth/auth.go @@ -239,22 +239,30 @@ func Login(server string) (*config.Credential, error) { } vt := newVerifiedToken(tok) + if err := requireIDTokenForOpenID(oauthScope, vt.IDToken); err != nil { + return nil, err + } issuer := stringFromMap(meta, "issuer") if issuer == "" { issuer = server } - if err := vt.ValidateIDToken(issuer, server); err != nil { + if err := vt.ValidateIDToken(issuer, clientID); err != nil { return nil, err } - return verifiedTokenToCredential(clientID, server, vt, "", "", time.Now()) + 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/audience is still preserved in the returned credential and -// used for ID token validation. +// 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 == "" { @@ -284,16 +292,19 @@ func RefreshToken(server string, cred *config.Credential) (*config.Credential, e } vt := newVerifiedToken(tok) + if err := requireIDTokenForOpenID(oauthScope, vt.IDToken); err != nil { + return nil, err + } issuer := stringFromMap(meta, "issuer") if issuer == "" { issuer = server } - audience := cred.Resource - if audience == "" { - audience = server + resource := cred.Resource + if resource == "" { + resource = server } - if err := vt.ValidateIDToken(issuer, audience); err != nil { + if err := vt.ValidateIDToken(issuer, cred.ClientID); err != nil { return nil, err } - return verifiedTokenToCredential(cred.ClientID, audience, vt, cred.RefreshToken, cred.Scope, time.Now()) + 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 369c0ac..30f16c5 100644 --- a/internal/auth/auth_test.go +++ b/internal/auth/auth_test.go @@ -1,8 +1,13 @@ package auth import ( + "crypto/rand" + "crypto/rsa" "testing" "time" + + "github.com/go-jose/go-jose/v4" + "github.com/go-jose/go-jose/v4/jwt" ) func TestVerifiedTokenToCredentialUsesFallbacks(t *testing.T) { @@ -31,3 +36,60 @@ func TestVerifiedTokenToCredentialRequiresAccessToken(t *testing.T) { 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 5a28572..aaf90bf 100644 --- a/internal/auth/device.go +++ b/internal/auth/device.go @@ -87,12 +87,15 @@ func LoginDeviceCode(server string) (*config.Credential, error) { } vt := newVerifiedToken(tok) + if err := requireIDTokenForOpenID(oauthScope, vt.IDToken); err != nil { + return nil, err + } issuer := stringFromMap(meta, "issuer") if issuer == "" { issuer = server } - if err := vt.ValidateIDToken(issuer, server); err != nil { + if err := vt.ValidateIDToken(issuer, clientID); err != nil { return nil, err } - return verifiedTokenToCredential(clientID, server, vt, "", "", time.Now()) + return verifiedTokenToCredential(clientID, server, vt, "", oauthScope, time.Now()) } diff --git a/internal/auth/oauth.go b/internal/auth/oauth.go index bb37513..78e28fb 100644 --- a/internal/auth/oauth.go +++ b/internal/auth/oauth.go @@ -124,7 +124,29 @@ func parseIntString(s string) (int64, error) { return strconv.ParseInt(s, 10, 64) } -func verifiedTokenToCredential(clientID, audience string, vt *VerifiedToken, fallbackRefresh, fallbackScope string, now time.Time) (*config.Credential, error) { +// 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") @@ -148,7 +170,7 @@ func verifiedTokenToCredential(clientID, audience string, vt *VerifiedToken, fal TokenType: strings.TrimSpace(vt.TokenType), ExpiresAt: float64(now.Add(time.Duration(expiresIn) * time.Second).Unix()), Scope: scope, - Resource: audience, + Resource: resource, }, nil } From 4776a56ed9447a5f11641abd6445ad267a4da91d Mon Sep 17 00:00:00 2001 From: Tiankai Ma Date: Tue, 30 Jun 2026 17:35:39 +0800 Subject: [PATCH 07/10] chore(openapi): regenerate spec with batch endpoints --- api/openapi.json | 687 +++++++++++++- internal/cmd/apicmd/api_paths_gen.go | 3 + internal/openapi/client.gen.go | 1277 ++++++++++++++++++++++++-- 3 files changed, 1893 insertions(+), 74 deletions(-) diff --git a/api/openapi.json b/api/openapi.json index 5070cfb..113513a 100644 --- a/api/openapi.json +++ b/api/openapi.json @@ -3145,6 +3145,75 @@ } } }, + "/api/comments/batch": { + "delete": { + "operationId": "delete-api-comments-batch", + "summary": "Delete multiple comments owned by the current user", + "tags": [ + "Comments" + ], + "security": [ + { + "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/commentBatchDeleteResponseSchema" + } + } + } + }, + "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/courses/{jwId}": { "get": { "operationId": "getCourse", @@ -4033,6 +4102,122 @@ } } }, + "/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", @@ -5307,6 +5492,75 @@ } } }, + "/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", @@ -19089,28 +19343,123 @@ ], "additionalProperties": false }, - "courseDetailSchema": { + "commentBatchDeleteRequestSchema": { "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" + "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 + ] + }, + "id": { + "type": "string" + } + }, + "required": [ + "success", + "id" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "enum": [ + false + ] + }, + "id": { + "type": "string" + }, + "error": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "not_found", + "forbidden", + "locked" + ] + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "additionalProperties": false + } + }, + "required": [ + "success", + "id", + "error" + ], + "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, @@ -25472,6 +25821,269 @@ ], "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 + }, + "todoBatchDeleteRequestSchema": { + "type": "object", + "properties": { + "ids": { + "minItems": 1, + "maxItems": 100, + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + } + }, + "required": [ + "ids" + ], + "additionalProperties": false + }, + "todoBatchDeleteResponseSchema": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "enum": [ + true + ] + }, + "id": { + "type": "string" + } + }, + "required": [ + "success", + "id" + ], + "additionalProperties": false + }, + { + "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 + } + ], + "type": "object" + } + } + }, + "required": [ + "results" + ], + "additionalProperties": false + }, "uploadRenameRequestSchema": { "type": "object", "properties": { @@ -26447,6 +27059,41 @@ ], "additionalProperties": false }, + "dashboardLinkPinBatchRequestSchema": { + "type": "object", + "properties": { + "items": { + "minItems": 1, + "maxItems": 10, + "type": "array", + "items": { + "type": "object", + "properties": { + "slug": { + "type": "string", + "minLength": 1 + }, + "action": { + "type": "string", + "enum": [ + "pin", + "unpin" + ] + } + }, + "required": [ + "slug", + "action" + ], + "additionalProperties": false + } + } + }, + "required": [ + "items" + ], + "additionalProperties": false + }, "homeworkCompletionRequestSchema": { "type": "object", "properties": { diff --git a/internal/cmd/apicmd/api_paths_gen.go b/internal/cmd/apicmd/api_paths_gen.go index 7487169..d8943d1 100644 --- a/internal/cmd/apicmd/api_paths_gen.go +++ b/internal/cmd/apicmd/api_paths_gen.go @@ -31,11 +31,13 @@ var generatedAPIPaths = []string{ "/api/calendar-subscriptions/current", "/api/calendar-subscriptions/import-codes", "/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", @@ -68,6 +70,7 @@ var generatedAPIPaths = []string{ "/api/teachers", "/api/teachers/{id}", "/api/todos", + "/api/todos/batch", "/api/todos/{id}", "/api/uploads", "/api/uploads/complete", diff --git a/internal/openapi/client.gen.go b/internal/openapi/client.gen.go index 69ac500..0a4f44c 100644 --- a/internal/openapi/client.gen.go +++ b/internal/openapi/client.gen.go @@ -293,6 +293,57 @@ func (e BusQueryResponseSchemaTripsDayType) Valid() bool { } } +// 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 + } +} + // Defines values for CommentCreateRequestSchemaTargetType. const ( CommentCreateRequestSchemaTargetTypeCourse CommentCreateRequestSchemaTargetType = "course" @@ -449,18 +500,36 @@ func (e CompactOverviewResponseSchemaTodosItemsPriority) Valid() bool { } } +// 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 @@ -839,6 +908,123 @@ func (e SubscribedHomeworksResponseSchemaAuditLogsAction) Valid() bool { } } +// 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 TodoBatchDeleteResponseSchemaResults1ErrorCode. +const ( + TodoBatchDeleteResponseSchemaResults1ErrorCodeForbidden TodoBatchDeleteResponseSchemaResults1ErrorCode = "forbidden" + TodoBatchDeleteResponseSchemaResults1ErrorCodeNotFound TodoBatchDeleteResponseSchemaResults1ErrorCode = "not_found" +) + +// Valid indicates whether the value is a known member of the TodoBatchDeleteResponseSchemaResults1ErrorCode enum. +func (e TodoBatchDeleteResponseSchemaResults1ErrorCode) Valid() bool { + switch e { + case TodoBatchDeleteResponseSchemaResults1ErrorCodeForbidden: + return true + case TodoBatchDeleteResponseSchemaResults1ErrorCodeNotFound: + return true + default: + return false + } +} + +// Defines values for TodoBatchDeleteResponseSchemaResults1Success. +const ( + TodoBatchDeleteResponseSchemaResults1SuccessFalse TodoBatchDeleteResponseSchemaResults1Success = false +) + +// Valid indicates whether the value is a known member of the TodoBatchDeleteResponseSchemaResults1Success enum. +func (e TodoBatchDeleteResponseSchemaResults1Success) Valid() bool { + switch e { + case TodoBatchDeleteResponseSchemaResults1SuccessFalse: + return true + 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 TodoCompletionBatchResponseSchemaResults0TodoPriority. +const ( + TodoCompletionBatchResponseSchemaResults0TodoPriorityHigh TodoCompletionBatchResponseSchemaResults0TodoPriority = "high" + TodoCompletionBatchResponseSchemaResults0TodoPriorityLow TodoCompletionBatchResponseSchemaResults0TodoPriority = "low" + TodoCompletionBatchResponseSchemaResults0TodoPriorityMedium TodoCompletionBatchResponseSchemaResults0TodoPriority = "medium" +) + +// Valid indicates whether the value is a known member of the TodoCompletionBatchResponseSchemaResults0TodoPriority enum. +func (e TodoCompletionBatchResponseSchemaResults0TodoPriority) Valid() bool { + switch e { + case TodoCompletionBatchResponseSchemaResults0TodoPriorityHigh: + return true + case TodoCompletionBatchResponseSchemaResults0TodoPriorityLow: + return true + case TodoCompletionBatchResponseSchemaResults0TodoPriorityMedium: + return true + default: + return false + } +} + +// Defines values for TodoCompletionBatchResponseSchemaResults1ErrorCode. +const ( + Forbidden TodoCompletionBatchResponseSchemaResults1ErrorCode = "forbidden" + NotFound TodoCompletionBatchResponseSchemaResults1ErrorCode = "not_found" +) + +// Valid indicates whether the value is a known member of the TodoCompletionBatchResponseSchemaResults1ErrorCode enum. +func (e TodoCompletionBatchResponseSchemaResults1ErrorCode) Valid() bool { + switch e { + case Forbidden: + return true + case NotFound: + return true + default: + return false + } +} + +// Defines values for TodoCompletionBatchResponseSchemaResults1Success. +const ( + TodoCompletionBatchResponseSchemaResults1SuccessFalse TodoCompletionBatchResponseSchemaResults1Success = false +) + +// Valid indicates whether the value is a known member of the TodoCompletionBatchResponseSchemaResults1Success enum. +func (e TodoCompletionBatchResponseSchemaResults1Success) Valid() bool { + switch e { + case TodoCompletionBatchResponseSchemaResults1SuccessFalse: + return true + default: + return false + } +} + // Defines values for TodoCreateRequestSchemaDueAt1. const ( TodoCreateRequestSchemaDueAt1LessThannil TodoCreateRequestSchemaDueAt1 = "" @@ -1285,19 +1471,19 @@ func (e ListTodosParamsCompleted) Valid() bool { // Defines values for ListTodosParamsPriority. const ( - High ListTodosParamsPriority = "high" - Low ListTodosParamsPriority = "low" - Medium ListTodosParamsPriority = "medium" + 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 High: + case ListTodosParamsPriorityHigh: return true - case Low: + case ListTodosParamsPriorityLow: return true - case Medium: + case ListTodosParamsPriorityMedium: return true default: return false @@ -2961,6 +3147,46 @@ type CalendarSubscriptionRemoveResponseSchema struct { } `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"` @@ -3806,6 +4032,17 @@ type CurrentCalendarSubscriptionResponseSchema struct { } `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"` @@ -5924,6 +6161,104 @@ type TeacherDetailSchema struct { 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"` @@ -6369,6 +6704,9 @@ type PostApiCalendarSubscriptionsImportCodesJSONRequestBody = MatchSectionCodesR // 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 @@ -6378,6 +6716,9 @@ 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 @@ -6405,6 +6746,12 @@ 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 @@ -6603,6 +6950,68 @@ func (t *AdminUpdateUserRequestSchema_Username) UnmarshalJSON(b []byte) error { 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 @@ -8681,22 +9090,22 @@ func (t *OauthTokenRequestSchema_Resource) UnmarshalJSON(b []byte) error { return err } -// AsTodoCreateRequestSchemaDueAt0 returns the union data inside the TodoCreateRequestSchema_DueAt as a TodoCreateRequestSchemaDueAt0 -func (t TodoCreateRequestSchema_DueAt) AsTodoCreateRequestSchemaDueAt0() (TodoCreateRequestSchemaDueAt0, error) { - var body TodoCreateRequestSchemaDueAt0 +// 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 } -// FromTodoCreateRequestSchemaDueAt0 overwrites any union data inside the TodoCreateRequestSchema_DueAt as the provided TodoCreateRequestSchemaDueAt0 -func (t *TodoCreateRequestSchema_DueAt) FromTodoCreateRequestSchemaDueAt0(v TodoCreateRequestSchemaDueAt0) error { +// 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 } -// MergeTodoCreateRequestSchemaDueAt0 performs a merge with any union data inside the TodoCreateRequestSchema_DueAt, using the provided TodoCreateRequestSchemaDueAt0 -func (t *TodoCreateRequestSchema_DueAt) MergeTodoCreateRequestSchemaDueAt0(v TodoCreateRequestSchemaDueAt0) error { +// 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 @@ -8707,22 +9116,22 @@ func (t *TodoCreateRequestSchema_DueAt) MergeTodoCreateRequestSchemaDueAt0(v Tod return err } -// AsTodoCreateRequestSchemaDueAt1 returns the union data inside the TodoCreateRequestSchema_DueAt as a TodoCreateRequestSchemaDueAt1 -func (t TodoCreateRequestSchema_DueAt) AsTodoCreateRequestSchemaDueAt1() (TodoCreateRequestSchemaDueAt1, error) { - var body TodoCreateRequestSchemaDueAt1 +// 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 } -// FromTodoCreateRequestSchemaDueAt1 overwrites any union data inside the TodoCreateRequestSchema_DueAt as the provided TodoCreateRequestSchemaDueAt1 -func (t *TodoCreateRequestSchema_DueAt) FromTodoCreateRequestSchemaDueAt1(v TodoCreateRequestSchemaDueAt1) error { +// 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 } -// MergeTodoCreateRequestSchemaDueAt1 performs a merge with any union data inside the TodoCreateRequestSchema_DueAt, using the provided TodoCreateRequestSchemaDueAt1 -func (t *TodoCreateRequestSchema_DueAt) MergeTodoCreateRequestSchemaDueAt1(v TodoCreateRequestSchemaDueAt1) error { +// 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 @@ -8733,32 +9142,32 @@ func (t *TodoCreateRequestSchema_DueAt) MergeTodoCreateRequestSchemaDueAt1(v Tod return err } -func (t TodoCreateRequestSchema_DueAt) MarshalJSON() ([]byte, error) { +func (t TodoBatchDeleteResponseSchema_Results_Item) MarshalJSON() ([]byte, error) { b, err := t.union.MarshalJSON() return b, err } -func (t *TodoCreateRequestSchema_DueAt) UnmarshalJSON(b []byte) error { +func (t *TodoBatchDeleteResponseSchema_Results_Item) 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 +// 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 } -// FromTodoUpdateRequestSchemaDueAt0 overwrites any union data inside the TodoUpdateRequestSchema_DueAt as the provided TodoUpdateRequestSchemaDueAt0 -func (t *TodoUpdateRequestSchema_DueAt) FromTodoUpdateRequestSchemaDueAt0(v TodoUpdateRequestSchemaDueAt0) error { +// 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 } -// MergeTodoUpdateRequestSchemaDueAt0 performs a merge with any union data inside the TodoUpdateRequestSchema_DueAt, using the provided TodoUpdateRequestSchemaDueAt0 -func (t *TodoUpdateRequestSchema_DueAt) MergeTodoUpdateRequestSchemaDueAt0(v TodoUpdateRequestSchemaDueAt0) error { +// 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 @@ -8769,22 +9178,22 @@ func (t *TodoUpdateRequestSchema_DueAt) MergeTodoUpdateRequestSchemaDueAt0(v Tod return err } -// AsTodoUpdateRequestSchemaDueAt1 returns the union data inside the TodoUpdateRequestSchema_DueAt as a TodoUpdateRequestSchemaDueAt1 -func (t TodoUpdateRequestSchema_DueAt) AsTodoUpdateRequestSchemaDueAt1() (TodoUpdateRequestSchemaDueAt1, error) { - var body TodoUpdateRequestSchemaDueAt1 +// 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 } -// FromTodoUpdateRequestSchemaDueAt1 overwrites any union data inside the TodoUpdateRequestSchema_DueAt as the provided TodoUpdateRequestSchemaDueAt1 -func (t *TodoUpdateRequestSchema_DueAt) FromTodoUpdateRequestSchemaDueAt1(v TodoUpdateRequestSchemaDueAt1) error { +// 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 } -// MergeTodoUpdateRequestSchemaDueAt1 performs a merge with any union data inside the TodoUpdateRequestSchema_DueAt, using the provided TodoUpdateRequestSchemaDueAt1 -func (t *TodoUpdateRequestSchema_DueAt) MergeTodoUpdateRequestSchemaDueAt1(v TodoUpdateRequestSchemaDueAt1) error { +// 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 @@ -8795,19 +9204,143 @@ func (t *TodoUpdateRequestSchema_DueAt) MergeTodoUpdateRequestSchemaDueAt1(v Tod return err } -func (t TodoUpdateRequestSchema_DueAt) MarshalJSON() ([]byte, error) { +func (t TodoCompletionBatchResponseSchema_Results_Item) MarshalJSON() ([]byte, error) { b, err := t.union.MarshalJSON() return b, err } -func (t *TodoUpdateRequestSchema_DueAt) UnmarshalJSON(b []byte) error { +func (t *TodoCompletionBatchResponseSchema_Results_Item) UnmarshalJSON(b []byte) error { err := t.union.UnmarshalJSON(b) return err } -// AsUploadCreateRequestSchemaSize0 returns the union data inside the UploadCreateRequestSchema_Size as a UploadCreateRequestSchemaSize0 -func (t UploadCreateRequestSchema_Size) AsUploadCreateRequestSchemaSize0() (UploadCreateRequestSchemaSize0, error) { - var body UploadCreateRequestSchemaSize0 +// 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 +} + +// 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 +} + +// 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 + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// 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 +} + +// 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 +} + +// 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 + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +func (t TodoCreateRequestSchema_DueAt) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err +} + +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 +} + +// 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 + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// 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 +} + +// 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 +} + +// 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 + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +func (t TodoUpdateRequestSchema_DueAt) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err +} + +func (t *TodoUpdateRequestSchema_DueAt) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err +} + +// 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 } @@ -9029,6 +9562,11 @@ type ClientInterface interface { CreateComment(ctx context.Context, body CreateCommentJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // DeleteApiCommentsBatchWithBody request with any body + DeleteApiCommentsBatchWithBody(ctx context.Context, contentType string, body io.Reader, 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) @@ -9059,6 +9597,11 @@ 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) @@ -9170,6 +9713,16 @@ type ClientInterface interface { 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) @@ -9605,6 +10158,30 @@ func (c *Client) CreateComment(ctx context.Context, body CreateCommentJSONReques return c.Client.Do(req) } +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) +} + +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) +} + func (c *Client) DeleteComment(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewDeleteCommentRequest(c.Server, id) if err != nil { @@ -9737,6 +10314,30 @@ func (c *Client) PinDashboardLinkWithFormdataBody(ctx context.Context, body PinD return c.Client.Do(req) } +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) +} + +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) +} + func (c *Client) VisitDashboardLink(ctx context.Context, params *VisitDashboardLinkParams, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewVisitDashboardLinkRequest(c.Server, params) if err != nil { @@ -10217,6 +10818,54 @@ func (c *Client) CreateTodo(ctx context.Context, body CreateTodoJSONRequestBody, return c.Client.Do(req) } +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 + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +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 + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +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 + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +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 + } + 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, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewDeleteTodoRequest(c.Server, id) if err != nil { @@ -11735,6 +12384,46 @@ func NewCreateCommentRequestWithBody(server string, contentType string, body io. return req, nil } +// 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 @@ -12152,6 +12841,46 @@ func NewPinDashboardLinkRequestWithBody(server string, contentType string, body return req, nil } +// 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) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/dashboard-links/pin/batch") + 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 +} + // NewVisitDashboardLinkRequest generates requests for VisitDashboardLink func NewVisitDashboardLinkRequest(server string, params *VisitDashboardLinkParams) (*http.Request, error) { var err error @@ -14182,6 +14911,86 @@ func NewCreateTodoRequestWithBody(server string, contentType string, body io.Rea 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) +} + +// 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 + + 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("DELETE", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// 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 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 +} + // NewDeleteTodoRequest generates requests for DeleteTodo func NewDeleteTodoRequest(server string, id string) (*http.Request, error) { var err error @@ -14720,6 +15529,11 @@ type ClientWithResponsesInterface interface { 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) @@ -14750,6 +15564,11 @@ type ClientWithResponsesInterface interface { 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) @@ -14861,6 +15680,16 @@ type ClientWithResponsesInterface interface { 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) @@ -15463,6 +16292,31 @@ func (r CreateCommentResponse) StatusCode() int { return 0 } +type DeleteApiCommentsBatchResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *CommentBatchDeleteResponseSchema + JSON400 *OpenApiErrorSchema + JSON401 *OpenApiErrorSchema + JSON403 *OpenApiErrorSchema +} + +// Status returns HTTPResponse.Status +func (r DeleteApiCommentsBatchResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteApiCommentsBatchResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + type DeleteCommentResponse struct { Body []byte HTTPResponse *http.Response @@ -15615,13 +16469,38 @@ func (r ListCoursesResponse) StatusCode() int { type GetCourseResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *CourseDetailSchema - JSON400 *OpenApiErrorSchema - JSON404 *OpenApiErrorSchema + JSON200 *CourseDetailSchema + JSON400 *OpenApiErrorSchema + JSON404 *OpenApiErrorSchema +} + +// Status returns HTTPResponse.Status +func (r GetCourseResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetCourseResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PinDashboardLinkResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *DashboardLinkPinResponseSchema + JSON400 *DashboardLinkPinResponseSchema + JSON401 *DashboardLinkPinResponseSchema + JSON500 *DashboardLinkPinResponseSchema } // Status returns HTTPResponse.Status -func (r GetCourseResponse) Status() string { +func (r PinDashboardLinkResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -15629,24 +16508,24 @@ func (r GetCourseResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetCourseResponse) StatusCode() int { +func (r PinDashboardLinkResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type PinDashboardLinkResponse struct { +type PostApiDashboardLinksPinBatchResponse struct { Body []byte HTTPResponse *http.Response JSON200 *DashboardLinkPinResponseSchema JSON400 *DashboardLinkPinResponseSchema - JSON401 *DashboardLinkPinResponseSchema + JSON401 *OpenApiErrorSchema JSON500 *DashboardLinkPinResponseSchema } // Status returns HTTPResponse.Status -func (r PinDashboardLinkResponse) Status() string { +func (r PostApiDashboardLinksPinBatchResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -15654,7 +16533,7 @@ func (r PinDashboardLinkResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r PinDashboardLinkResponse) StatusCode() int { +func (r PostApiDashboardLinksPinBatchResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -16390,6 +17269,54 @@ func (r CreateTodoResponse) StatusCode() int { return 0 } +type DeleteApiTodosBatchResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *TodoBatchDeleteResponseSchema + JSON400 *OpenApiErrorSchema + JSON401 *OpenApiErrorSchema +} + +// Status returns HTTPResponse.Status +func (r DeleteApiTodosBatchResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteApiTodosBatchResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PatchApiTodosBatchResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *TodoCompletionBatchResponseSchema + JSON400 *OpenApiErrorSchema + JSON401 *OpenApiErrorSchema +} + +// Status returns HTTPResponse.Status +func (r PatchApiTodosBatchResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PatchApiTodosBatchResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + type DeleteTodoResponse struct { Body []byte HTTPResponse *http.Response @@ -16927,6 +17854,23 @@ func (c *ClientWithResponses) CreateCommentWithResponse(ctx context.Context, bod return ParseCreateCommentResponse(rsp) } +// 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) +} + +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 ParseDeleteApiCommentsBatchResponse(rsp) +} + // DeleteCommentWithResponse request returning *DeleteCommentResponse func (c *ClientWithResponses) DeleteCommentWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*DeleteCommentResponse, error) { rsp, err := c.DeleteComment(ctx, id, reqEditors...) @@ -17023,6 +17967,23 @@ func (c *ClientWithResponses) PinDashboardLinkWithFormdataBodyWithResponse(ctx c return ParsePinDashboardLinkResponse(rsp) } +// 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 ParsePostApiDashboardLinksPinBatchResponse(rsp) +} + +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 ParsePostApiDashboardLinksPinBatchResponse(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...) @@ -17374,6 +18335,40 @@ func (c *ClientWithResponses) CreateTodoWithResponse(ctx context.Context, body C return ParseCreateTodoResponse(rsp) } +// 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 ParseDeleteApiTodosBatchResponse(rsp) +} + +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 ParseDeleteApiTodosBatchResponse(rsp) +} + +// 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 ParsePatchApiTodosBatchResponse(rsp) +} + +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 ParsePatchApiTodosBatchResponse(rsp) +} + // DeleteTodoWithResponse request returning *DeleteTodoResponse func (c *ClientWithResponses) DeleteTodoWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*DeleteTodoResponse, error) { rsp, err := c.DeleteTodo(ctx, id, reqEditors...) @@ -18493,6 +19488,53 @@ func ParseCreateCommentResponse(rsp *http.Response) (*CreateCommentResponse, err return response, nil } +// 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 := &DeleteApiCommentsBatchResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + 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 { + 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 +} + // ParseDeleteCommentResponse parses an HTTP response from a DeleteCommentWithResponse call func ParseDeleteCommentResponse(rsp *http.Response) (*DeleteCommentResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) @@ -18855,6 +19897,53 @@ func ParsePinDashboardLinkResponse(rsp *http.Response) (*PinDashboardLinkRespons return response, nil } +// 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 := &PostApiDashboardLinksPinBatchResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + 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 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 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 == 500: + var dest DashboardLinkPinResponseSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + // ParseVisitDashboardLinkResponse parses an HTTP response from a VisitDashboardLinkWithResponse call func ParseVisitDashboardLinkResponse(rsp *http.Response) (*VisitDashboardLinkResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) @@ -19984,6 +21073,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) From 33b1037950bb67c1bb4e03aa761a7008c82804d0 Mon Sep 17 00:00:00 2001 From: Tiankai Ma Date: Tue, 30 Jun 2026 18:05:26 +0800 Subject: [PATCH 08/10] feat(cli): use batch endpoints for todo, homework, comment bulk ops - todo done: call PATCH /api/todos/batch instead of looping single updates - homework done: call PUT /api/homeworks/completions instead of looping - comment delete: call DELETE /api/comments/batch instead of looping - calendar: add import-codes command using POST /api/calendar-subscriptions/import-codes - preserve interactive single-pick flows and per-item success reporting - report partial batch failures as a single returned error Task: 17 --- README.md | 4 + internal/cmd/calendar/calendar.go | 47 +++++++++++ internal/cmd/comment/comment.go | 112 ++++++++++++++++++++----- internal/cmd/comment/comment_test.go | 53 ++++++++++++ internal/cmd/homework/homework.go | 96 ++++++++++++++++----- internal/cmd/homework/homework_test.go | 37 +++++++- internal/cmd/todo/todo.go | 96 ++++++++++++++++----- internal/cmd/todo/todo_test.go | 32 +++++++ 8 files changed, 411 insertions(+), 66 deletions(-) create mode 100644 internal/cmd/comment/comment_test.go 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/internal/cmd/calendar/calendar.go b/internal/cmd/calendar/calendar.go index 921e359..b7dd9e6 100644 --- a/internal/cmd/calendar/calendar.go +++ b/internal/cmd/calendar/calendar.go @@ -23,6 +23,7 @@ func NewCmdCalendar() *cobra.Command { } cmd.AddCommand(newCmdGet()) cmd.AddCommand(newCmdSet()) + cmd.AddCommand(newCmdImportCodes()) return cmd } @@ -108,3 +109,49 @@ func newCmdSet() *cobra.Command { }, } } + +func newCmdImportCodes() *cobra.Command { + var semesterID string + cmd := &cobra.Command{ + Use: "import-codes ...", + Short: "Import section codes into calendar subscriptions", + Long: "Resolve section codes to Life@USTC sections and add them to your calendar subscriptions.", + 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 + } + body := openapi.PostApiCalendarSubscriptionsImportCodesJSONRequestBody{ + Codes: args, + } + if semesterID != "" { + semester := openapi.MatchSectionCodesRequestSchema_SemesterId{} + _ = semester.FromMatchSectionCodesRequestSchemaSemesterId0(semesterID) + body.SemesterId = &semester + } + data, err := api.ParseResponseRaw(c.PostApiCalendarSubscriptionsImportCodes(api.Ctx(), body)) + if err != nil { + return err + } + if output.IsJSON() { + return output.JSON(data) + } + m := cmdutil.AsMap(data) + matchedCodes, _ := m["matchedCodes"].([]any) + sectionRows := cmdutil.RowsFromAny(m["sections"]) + output.Success(fmt.Sprintf("Matched %d section code(s)", len(matchedCodes))) + 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.name"}, + }) + } + return nil + }, + } + cmd.Flags().StringVar(&semesterID, "semester-id", "", "Semester ID to narrow the match") + return cmd +} diff --git a/internal/cmd/comment/comment.go b/internal/cmd/comment/comment.go index 083a9f5..6ec6edd 100644 --- a/internal/cmd/comment/comment.go +++ b/internal/cmd/comment/comment.go @@ -408,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") } @@ -430,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.DeleteComment(api.Ctx(), id)) - 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 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/homework/homework.go b/internal/cmd/homework/homework.go index 68fc369..87bfad6 100644 --- a/internal/cmd/homework/homework.go +++ b/internal/cmd/homework/homework.go @@ -745,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") } @@ -773,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/todo/todo.go b/internal/cmd/todo/todo.go index f669d85..e64a44c 100644 --- a/internal/cmd/todo/todo.go +++ b/internal/cmd/todo/todo.go @@ -430,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") } @@ -458,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 } 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) + } +} From 92f1171c97ca5700f15170ca909a5cb0e55db9e9 Mon Sep 17 00:00:00 2001 From: Tiankai Ma Date: Tue, 30 Jun 2026 22:24:17 +0800 Subject: [PATCH 09/10] feat(cli): use generated client for subscriptions --- api/openapi.json | 7455 +++++++++++++++++--------- internal/auth/auth.go | 35 +- internal/cmd/apicmd/api_paths_gen.go | 2 + internal/cmd/calendar/calendar.go | 211 +- internal/cmd/school/school.go | 3 +- internal/openapi/client.gen.go | 985 +++- 6 files changed, 6087 insertions(+), 2604 deletions(-) diff --git a/api/openapi.json b/api/openapi.json index 113513a..bfb66f4 100644 --- a/api/openapi.json +++ b/api/openapi.json @@ -2829,6 +2829,75 @@ } } }, + "/api/calendar-subscriptions/batch": { + "post": { + "operationId": "batchUpdateCalendarSubscription", + "summary": "Batch update calendar section subscriptions", + "tags": [ + "Calendar" + ], + "security": [ + { + "bearerAuth": [] + }, + { + "sessionCookie": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/calendarSubscriptionBatchRequestSchema" + } + } + } + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/calendarSubscriptionBatchResponseSchema" + } + } + } + }, + "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/calendar-subscriptions/current": { "get": { "operationId": "getCurrentCalendarSubscription", @@ -2937,6 +3006,75 @@ } } }, + "/api/calendar-subscriptions/query": { + "post": { + "operationId": "queryCalendarSubscriptionSections", + "summary": "Query sections for calendar subscription changes", + "tags": [ + "Calendar" + ], + "security": [ + { + "bearerAuth": [] + }, + { + "sessionCookie": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/calendarSubscriptionQueryRequestSchema" + } + } + } + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/calendarSubscriptionQueryResponseSchema" + } + } + } + }, + "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/comments/{id}": { "get": { "operationId": "getComment", @@ -15668,185 +15806,345 @@ ], "additionalProperties": false }, - "currentCalendarSubscriptionResponseSchema": { + "calendarSubscriptionBatchRequestSchema": { "type": "object", "properties": { - "subscription": { + "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" + }, + { + "type": "number" + } + ] + }, + "action": { + "type": "string", + "enum": [ + "add", + "remove", + "set" + ] + } + }, + "required": [ + "action" + ], + "additionalProperties": false + }, + "calendarSubscriptionBatchResponseSchema": { + "type": "object", + "properties": { + "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": { - "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" + "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 }, - "practicePeriods": { - "nullable": true, - "type": "number" + "jwId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "experimentPeriods": { - "nullable": true, - "type": "number" + "code": { + "type": "string" }, - "machinePeriods": { - "nullable": true, - "type": "number" + "nameCn": { + "type": "string" }, - "designPeriods": { + "nameEn": { "nullable": true, - "type": "number" + "type": "string" }, - "testPeriods": { + "categoryId": { "nullable": true, - "type": "number" + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "scheduleState": { + "classTypeId": { "nullable": true, - "type": "string" - }, - "suggestScheduleWeeks": { - "nullable": true + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "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": { + "classifyId": { "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "examModeId": { + "educationLevelId": { "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "openDepartmentId": { + "gradationId": { "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "teachLanguageId": { + "typeId": { "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "roomTypeId": { + "category": { "nullable": true, - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "course": { "type": "object", "properties": { "id": { @@ -15854,754 +16152,227 @@ "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, + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "classType": { + "nullable": true, + "type": "object", + "properties": { + "id": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "classTypeId": { - "nullable": true, - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "nameCn": { + "type": "string" }, - "classifyId": { + "nameEn": { "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "classify": { + "nullable": true, + "type": "object", + "properties": { + "id": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "educationLevelId": { + "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 }, - "gradationId": { + "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 }, - "typeId": { + "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 }, - "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 + "nameCn": { + "type": "string" }, - "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": { + "nameEn": { "nullable": true, "type": "string" } }, "required": [ "id", - "jwId", - "code", "nameCn", - "nameEn", - "categoryId", - "classTypeId", - "classifyId", - "educationLevelId", - "gradationId", - "typeId", - "category", - "classType", - "classify", - "educationLevel", - "gradation", - "type", - "namePrimary", - "nameSecondary" + "nameEn" ], "additionalProperties": false }, - "semester": { + "namePrimary": { + "type": "string" + }, + "nameSecondary": { "nullable": true, - "allOf": [ - { - "$ref": "#/components/schemas/semesterSchema" - } - ] + "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 }, - "campus": { + "jwId": { "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 + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "openDepartment": { + "nameCn": { + "type": "string" + }, + "nameEn": { "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 + "type": "string" }, - "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 - } + "code": { + "nullable": true, + "type": "string" + }, + "namePrimary": { + "type": "string" + }, + "nameSecondary": { + "nullable": true, + "type": "string" } }, "required": [ "id", "jwId", + "nameCn", + "nameEn", "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" + "namePrimary", + "nameSecondary" ], "additionalProperties": false - } - }, - "calendarPath": { - "type": "string" - }, - "calendarUrl": { - "type": "string" - }, - "note": { - "type": "string" - } - }, - "required": [ - "userId", - "sections", - "calendarPath", - "calendarUrl", - "note" - ], - "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_.-]+$" - } - }, - "semesterId": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ] - } - }, - "required": [ - "codes" - ], - "additionalProperties": false - }, - "calendarSubscriptionImportResponseSchema": { - "type": "object", - "properties": { - "success": { - "type": "boolean" - }, - "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" - } - }, - "unmatchedCodes": { - "type": "array", - "items": { - "type": "string" - } - }, - "ambiguousCodes": { - "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": { + "openDepartment": { "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": { @@ -16609,11 +16380,6 @@ "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "jwId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, "code": { "type": "string" }, @@ -16624,327 +16390,44 @@ "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": { + "isCollege": { "nullable": true, - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "type": "boolean" }, - "typeId": { - "nullable": true, - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "namePrimary": { + "type": "string" }, - "category": { + "nameSecondary": { "nullable": true, - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "nameCn": { - "type": "string" - }, - "nameEn": { - "nullable": true, - "type": "string" - } + "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 }, - "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 + "personId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, "teacherId": { "nullable": true, @@ -17085,180 +16568,44 @@ "additionalProperties": false } }, + "total": { + "type": "integer", + "minimum": 0, + "maximum": 9007199254740991 + }, + "action": { + "type": "string", + "enum": [ + "add", + "remove", + "set" + ] + }, "addedCount": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, - "addedSections": { - "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": { + "removedCount": { + "type": "integer", + "minimum": 0, + "maximum": 9007199254740991 + }, + "unchangedCount": { + "type": "integer", + "minimum": 0, + "maximum": 9007199254740991 + }, + "subscription": { + "nullable": true, + "type": "object", + "properties": { + "userId": { + "type": "string" + }, + "sections": { + "type": "array", + "items": { "type": "object", "properties": { "id": { @@ -17274,349 +16621,2626 @@ "code": { "type": "string" }, - "nameCn": { - "type": "string" + "bizTypeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "nameEn": { + "credits": { "nullable": true, - "type": "string" + "type": "number" }, - "categoryId": { + "period": { "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "classTypeId": { + "periodsPerWeek": { "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "classifyId": { + "timesPerWeek": { "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "educationLevelId": { + "stdCount": { "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "gradationId": { + "limitCount": { "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "typeId": { + "graduateAndPostgraduate": { + "nullable": true, + "type": "boolean" + }, + "dateTimePlaceText": { + "nullable": true, + "type": "string" + }, + "dateTimePlacePersonText": { + "nullable": true + }, + "actualPeriods": { "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "category": { + "theoryPeriods": { "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": "number" }, - "classType": { + "practicePeriods": { "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": "number" }, - "classify": { + "experimentPeriods": { "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": "number" }, - "educationLevel": { + "machinePeriods": { "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": "number" }, - "gradation": { + "designPeriods": { "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": "number" }, - "type": { + "testPeriods": { "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": "number" }, - "namePrimary": { + "scheduleState": { + "nullable": true, "type": "string" }, - "nameSecondary": { + "suggestScheduleWeeks": { + "nullable": true + }, + "suggestScheduleWeekInfo": { "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": { + "scheduleJsonParams": { + "nullable": true + }, + "selectedStdCount": { "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "nameCn": { - "type": "string" - }, - "nameEn": { + "remark": { "nullable": true, "type": "string" }, - "code": { + "scheduleRemark": { "nullable": true, "type": "string" }, - "namePrimary": { - "type": "string" + "courseId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "nameSecondary": { + "semesterId": { "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" + "campusId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "nameEn": { + "examModeId": { "nullable": true, - "type": "string" + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "isCollege": { + "openDepartmentId": { "nullable": true, - "type": "boolean" + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "namePrimary": { - "type": "string" + "teachLanguageId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "nameSecondary": { + "roomTypeId": { "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": { + "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": [ + "semester", + "matchedCodes", + "unmatchedCodes", + "matchedSectionIds", + "unmatchedSectionIds", + "suggestions", + "sections", + "total", + "action", + "addedCount", + "removedCount", + "unchangedCount", + "subscription" + ], + "additionalProperties": false + }, + "currentCalendarSubscriptionResponseSchema": { + "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 + }, + "matchSectionCodesRequestSchema": { + "type": "object", + "properties": { + "codes": { + "minItems": 1, + "maxItems": 500, + "type": "array", + "items": { + "type": "string", + "minLength": 1, + "maxLength": 64, + "pattern": "^[A-Za-z0-9_.-]+$" + } + }, + "semesterId": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "codes" + ], + "additionalProperties": false + }, + "calendarSubscriptionImportResponseSchema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "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" + } + }, + "unmatchedCodes": { + "type": "array", + "items": { + "type": "string" + } + }, + "ambiguousCodes": { + "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 + }, + "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 + } + }, + "addedCount": { + "type": "integer", + "minimum": 0, + "maximum": 9007199254740991 + }, + "addedSections": { + "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" }, @@ -17897,25 +19521,518 @@ "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "openDepartmentId": { + "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, - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "allOf": [ + { + "$ref": "#/components/schemas/semesterSchema" + } + ] }, - "teachLanguageId": { + "campus": { "nullable": true, - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "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 }, - "roomTypeId": { + "openDepartment": { "nullable": true, - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "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 }, - "course": { + "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 + } + }, + "subscription": { + "nullable": true, + "type": "object", + "properties": { + "userId": { + "type": "string" + }, + "sections": { + "type": "array", + "items": { "type": "object", "properties": { "id": { @@ -17923,59 +20040,165 @@ "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "jwId": { - "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" }, - "code": { + "machinePeriods": { + "nullable": true, + "type": "number" + }, + "designPeriods": { + "nullable": true, + "type": "number" + }, + "testPeriods": { + "nullable": true, + "type": "number" + }, + "scheduleState": { + "nullable": true, "type": "string" }, - "nameCn": { + "suggestScheduleWeeks": { + "nullable": true + }, + "suggestScheduleWeekInfo": { + "nullable": true, "type": "string" }, - "nameEn": { + "scheduleJsonParams": { + "nullable": true + }, + "selectedStdCount": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "remark": { "nullable": true, "type": "string" }, - "categoryId": { + "scheduleRemark": { "nullable": true, + "type": "string" + }, + "courseId": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "classTypeId": { + "semesterId": { "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "classifyId": { + "campusId": { "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "educationLevelId": { + "examModeId": { "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "gradationId": { + "openDepartmentId": { "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "typeId": { + "teachLanguageId": { "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "category": { + "roomTypeId": { "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "course": { "type": "object", "properties": { "id": { @@ -17983,432 +20206,785 @@ "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": { + "jwId": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, + "code": { + "type": "string" + }, "nameCn": { "type": "string" }, "nameEn": { "nullable": true, "type": "string" - } - }, - "required": [ - "id", - "nameCn", - "nameEn" - ], - "additionalProperties": false - }, - "classify": { - "nullable": true, - "type": "object", - "properties": { - "id": { + }, + "categoryId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "nameCn": { - "type": "string" - }, - "nameEn": { + "classTypeId": { "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" + "classifyId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "nameEn": { + "educationLevelId": { "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" + "gradationId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "nameEn": { + "typeId": { "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" + "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": { "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 + "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" + } }, - "teacherTitleId": { - "nullable": true, - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "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" + } }, - "namePrimary": { - "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" + } }, - "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" - ], - "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 } }, - "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": [ + "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", + "maximum": 9007199254740991, + "minimum": 1 } }, - "subscription": { + "codes": { + "maxItems": 500, + "type": "array", + "items": { + "type": "string", + "minLength": 1, + "maxLength": 64 + } + }, + "semesterId": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "additionalProperties": false + }, + "calendarSubscriptionQueryResponseSchema": { + "type": "object", + "properties": { + "semester": { "nullable": true, "type": "object", "properties": { - "userId": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "nullable": true, "type": "string" }, - "sections": { - "type": "array", - "items": { + "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": { @@ -18424,157 +21000,51 @@ "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, + "nameCn": { "type": "string" }, - "scheduleRemark": { + "nameEn": { "nullable": true, "type": "string" }, - "courseId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "semesterId": { + "categoryId": { "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "campusId": { + "classTypeId": { "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "examModeId": { + "classifyId": { "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "openDepartmentId": { + "educationLevelId": { "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "teachLanguageId": { + "gradationId": { "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "roomTypeId": { + "typeId": { "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "course": { + "category": { + "nullable": true, "type": "object", "properties": { "id": { @@ -18582,241 +21052,70 @@ "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, + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "classType": { + "nullable": true, + "type": "object", + "properties": { + "id": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "gradationId": { - "nullable": true, - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "nameCn": { + "type": "string" }, - "typeId": { + "nameEn": { "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "classify": { + "nullable": true, + "type": "object", + "properties": { + "id": { "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": { + "nameCn": { "type": "string" }, - "nameSecondary": { + "nameEn": { "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" - } - ] + "nameEn" + ], + "additionalProperties": false }, - "campus": { + "educationLevel": { "nullable": true, "type": "object", "properties": { @@ -18825,43 +21124,22 @@ "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" + "nameEn" ], "additionalProperties": false }, - "openDepartment": { + "gradation": { "nullable": true, "type": "object", "properties": { @@ -18870,226 +21148,341 @@ "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "code": { - "type": "string" - }, "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 }, - "isCollege": { - "nullable": true, - "type": "boolean" - }, - "namePrimary": { + "nameCn": { "type": "string" }, - "nameSecondary": { + "nameEn": { "nullable": true, "type": "string" } }, "required": [ "id", - "code", "nameCn", - "nameEn", - "isCollege", - "namePrimary", - "nameSecondary" + "nameEn" ], "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 - } + "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", - "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", + "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 + } } }, - "calendarPath": { - "type": "string" - }, - "calendarUrl": { - "type": "string" - }, - "note": { - "type": "string" - } - }, - "required": [ - "userId", - "sections", - "calendarPath", - "calendarUrl", - "note" - ], - "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": [ - "success", "semester", "matchedCodes", "unmatchedCodes", - "ambiguousCodes", + "matchedSectionIds", + "unmatchedSectionIds", + "suggestions", "sections", - "addedCount", - "addedSections", - "alreadySubscribedCount", - "alreadySubscribedSections", - "subscription" + "total" ], "additionalProperties": false }, @@ -28687,7 +31080,7 @@ "type": "http", "scheme": "bearer", "bearerFormat": "JWT", - "description": "OAuth access token accepted by protected REST endpoints when it carries rest:read for reads or rest:write for mutations. These endpoints also accept an in-site Better Auth session cookie." + "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." }, "sessionCookie": { "type": "apiKey", diff --git a/internal/auth/auth.go b/internal/auth/auth.go index a56bc25..3fa1a69 100644 --- a/internal/auth/auth.go +++ b/internal/auth/auth.go @@ -21,7 +21,40 @@ import ( "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) diff --git a/internal/cmd/apicmd/api_paths_gen.go b/internal/cmd/apicmd/api_paths_gen.go index d8943d1..58db7cf 100644 --- a/internal/cmd/apicmd/api_paths_gen.go +++ b/internal/cmd/apicmd/api_paths_gen.go @@ -28,8 +28,10 @@ var generatedAPIPaths = []string{ "/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}", diff --git a/internal/cmd/calendar/calendar.go b/internal/cmd/calendar/calendar.go index b7dd9e6..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,6 +23,9 @@ func NewCmdCalendar() *cobra.Command { }, } cmd.AddCommand(newCmdGet()) + cmd.AddCommand(newCmdQuery()) + cmd.AddCommand(newCmdAdd()) + cmd.AddCommand(newCmdRemove()) cmd.AddCommand(newCmdSet()) cmd.AddCommand(newCmdImportCodes()) return cmd @@ -80,78 +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 { - 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 - } - body := openapi.SetCalendarSubscriptionJSONRequestBody{ - SectionIds: §ionIds, - } - _, err = api.ParseResponseRaw(c.SetCalendarSubscription(api.Ctx(), body)) - if err != nil { - return err - } - output.Success("Calendar subscriptions updated.") - return nil + return runCalendarBatch(cmd, args, openapi.CalendarSubscriptionBatchRequestSchemaActionSet, semesterID) }, } + cmd.Flags().StringVar(&semesterID, "semester-id", "", "Semester ID to narrow code matches") + return cmd } -func newCmdImportCodes() *cobra.Command { +func newCmdAdd() *cobra.Command { var semesterID string cmd := &cobra.Command{ - Use: "import-codes ...", - Short: "Import section codes into calendar subscriptions", - Long: "Resolve section codes to Life@USTC sections and add them to your calendar subscriptions.", + 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 } - body := openapi.PostApiCalendarSubscriptionsImportCodesJSONRequestBody{ - Codes: args, + 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 } if semesterID != "" { - semester := openapi.MatchSectionCodesRequestSchema_SemesterId{} - _ = semester.FromMatchSectionCodesRequestSchemaSemesterId0(semesterID) + semester := openapi.CalendarSubscriptionQueryRequestSchema_SemesterId{} + _ = semester.FromCalendarSubscriptionQueryRequestSchemaSemesterId0(semesterID) body.SemesterId = &semester } - data, err := api.ParseResponseRaw(c.PostApiCalendarSubscriptionsImportCodes(api.Ctx(), body)) + data, err := api.ParseResponseRaw(c.QueryCalendarSubscriptionSections(api.Ctx(), body)) if err != nil { return err } - if output.IsJSON() { - return output.JSON(data) - } - m := cmdutil.AsMap(data) - matchedCodes, _ := m["matchedCodes"].([]any) - sectionRows := cmdutil.RowsFromAny(m["sections"]) - output.Success(fmt.Sprintf("Matched %d section code(s)", len(matchedCodes))) - 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.name"}, - }) - } - 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/school/school.go b/internal/cmd/school/school.go index f69db64..c87440c 100644 --- a/internal/cmd/school/school.go +++ b/internal/cmd/school/school.go @@ -545,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 { diff --git a/internal/openapi/client.gen.go b/internal/openapi/client.gen.go index 0a4f44c..ddfa59b 100644 --- a/internal/openapi/client.gen.go +++ b/internal/openapi/client.gen.go @@ -293,6 +293,48 @@ func (e BusQueryResponseSchemaTripsDayType) Valid() bool { } } +// 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 @@ -2376,6 +2418,296 @@ type CalendarSubscriptionAppendResponseSchema struct { } `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"` @@ -3012,6 +3344,159 @@ type CalendarSubscriptionImportResponseSchema struct { 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"` @@ -6698,9 +7183,15 @@ type AppendCalendarSubscriptionSectionsJSONRequestBody = CalendarSubscriptionApp // 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 @@ -6950,6 +7441,130 @@ func (t *AdminUpdateUserRequestSchema_Username) UnmarshalJSON(b []byte) error { 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 @@ -9546,6 +10161,11 @@ type ClientInterface interface { 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) @@ -9554,6 +10174,11 @@ type ClientInterface interface { 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) @@ -9990,8 +10615,56 @@ 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) 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) +} + +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) +} + +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) +} + +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) +} + +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 } @@ -10002,8 +10675,8 @@ func (c *Client) SetBusPreferences(ctx context.Context, body SetBusPreferencesJS return c.Client.Do(req) } -func (c *Client) GetApiBusRoutes(ctx context.Context, params *GetApiBusRoutesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetApiBusRoutesRequest(c.Server, params) +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 } @@ -10014,8 +10687,8 @@ func (c *Client) GetApiBusRoutes(ctx context.Context, params *GetApiBusRoutesPar return c.Client.Do(req) } -func (c *Client) DeleteApiCalendarSubscriptionsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteApiCalendarSubscriptionsRequestWithBody(c.Server, contentType, body) +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 } @@ -10026,8 +10699,8 @@ func (c *Client) DeleteApiCalendarSubscriptionsWithBody(ctx context.Context, con return c.Client.Do(req) } -func (c *Client) DeleteApiCalendarSubscriptions(ctx context.Context, body DeleteApiCalendarSubscriptionsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteApiCalendarSubscriptionsRequest(c.Server, body) +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 } @@ -10038,8 +10711,8 @@ func (c *Client) DeleteApiCalendarSubscriptions(ctx context.Context, body Delete return c.Client.Do(req) } -func (c *Client) AppendCalendarSubscriptionSectionsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewAppendCalendarSubscriptionSectionsRequestWithBody(c.Server, contentType, body) +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 } @@ -10050,8 +10723,8 @@ func (c *Client) AppendCalendarSubscriptionSectionsWithBody(ctx context.Context, return c.Client.Do(req) } -func (c *Client) AppendCalendarSubscriptionSections(ctx context.Context, body AppendCalendarSubscriptionSectionsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewAppendCalendarSubscriptionSectionsRequest(c.Server, body) +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 } @@ -10062,8 +10735,8 @@ func (c *Client) AppendCalendarSubscriptionSections(ctx context.Context, body Ap 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) GetCurrentCalendarSubscription(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetCurrentCalendarSubscriptionRequest(c.Server) if err != nil { return nil, err } @@ -10074,8 +10747,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) 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 } @@ -10086,8 +10759,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) PostApiCalendarSubscriptionsImportCodes(ctx context.Context, body PostApiCalendarSubscriptionsImportCodesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostApiCalendarSubscriptionsImportCodesRequest(c.Server, body) if err != nil { return nil, err } @@ -10098,8 +10771,8 @@ func (c *Client) GetCurrentCalendarSubscription(ctx context.Context, reqEditors return c.Client.Do(req) } -func (c *Client) PostApiCalendarSubscriptionsImportCodesWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApiCalendarSubscriptionsImportCodesRequestWithBody(c.Server, contentType, body) +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 } @@ -10110,8 +10783,8 @@ func (c *Client) PostApiCalendarSubscriptionsImportCodesWithBody(ctx context.Con return c.Client.Do(req) } -func (c *Client) PostApiCalendarSubscriptionsImportCodes(ctx context.Context, body PostApiCalendarSubscriptionsImportCodesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApiCalendarSubscriptionsImportCodesRequest(c.Server, body) +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 } @@ -12120,6 +12793,46 @@ func NewSetCalendarSubscriptionRequestWithBody(server string, contentType string return req, 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 + } + bodyReader = bytes.NewReader(buf) + return NewBatchUpdateCalendarSubscriptionRequestWithBody(server, "application/json", bodyReader) +} + +// 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) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/calendar-subscriptions/batch") + 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 +} + // NewGetCurrentCalendarSubscriptionRequest generates requests for GetCurrentCalendarSubscription func NewGetCurrentCalendarSubscriptionRequest(server string) (*http.Request, error) { var err error @@ -12187,6 +12900,46 @@ func NewPostApiCalendarSubscriptionsImportCodesRequestWithBody(server string, co return req, nil } +// 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) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/calendar-subscriptions/query") + 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 +} + // NewListCommentsRequest generates requests for ListComments func NewListCommentsRequest(server string, params *ListCommentsParams) (*http.Request, error) { var err error @@ -15513,6 +16266,11 @@ type ClientWithResponsesInterface interface { 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) @@ -15521,6 +16279,11 @@ type ClientWithResponsesInterface interface { 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) @@ -16194,6 +16957,31 @@ func (r SetCalendarSubscriptionResponse) StatusCode() int { return 0 } +type BatchUpdateCalendarSubscriptionResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *CalendarSubscriptionBatchResponseSchema + JSON400 *OpenApiErrorSchema + JSON401 *OpenApiErrorSchema + JSON404 *OpenApiErrorSchema +} + +// Status returns HTTPResponse.Status +func (r BatchUpdateCalendarSubscriptionResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r BatchUpdateCalendarSubscriptionResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + type GetCurrentCalendarSubscriptionResponse struct { Body []byte HTTPResponse *http.Response @@ -16242,6 +17030,31 @@ func (r PostApiCalendarSubscriptionsImportCodesResponse) StatusCode() int { return 0 } +type QueryCalendarSubscriptionSectionsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *CalendarSubscriptionQueryResponseSchema + JSON400 *OpenApiErrorSchema + JSON401 *OpenApiErrorSchema + JSON404 *OpenApiErrorSchema +} + +// Status returns HTTPResponse.Status +func (r QueryCalendarSubscriptionSectionsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r QueryCalendarSubscriptionSectionsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + type ListCommentsResponse struct { Body []byte HTTPResponse *http.Response @@ -17802,6 +18615,23 @@ func (c *ClientWithResponses) SetCalendarSubscriptionWithResponse(ctx context.Co return ParseSetCalendarSubscriptionResponse(rsp) } +// 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 ParseBatchUpdateCalendarSubscriptionResponse(rsp) +} + +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) +} + // GetCurrentCalendarSubscriptionWithResponse request returning *GetCurrentCalendarSubscriptionResponse func (c *ClientWithResponses) GetCurrentCalendarSubscriptionWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetCurrentCalendarSubscriptionResponse, error) { rsp, err := c.GetCurrentCalendarSubscription(ctx, reqEditors...) @@ -17828,6 +18658,23 @@ func (c *ClientWithResponses) PostApiCalendarSubscriptionsImportCodesWithRespons return ParsePostApiCalendarSubscriptionsImportCodesResponse(rsp) } +// 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 ParseQueryCalendarSubscriptionSectionsResponse(rsp) +} + +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 ParseQueryCalendarSubscriptionSectionsResponse(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...) @@ -19314,6 +20161,53 @@ func ParseSetCalendarSubscriptionResponse(rsp *http.Response) (*SetCalendarSubsc return response, nil } +// 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 := &BatchUpdateCalendarSubscriptionResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest CalendarSubscriptionBatchResponseSchema + 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 +} + // ParseGetCurrentCalendarSubscriptionResponse parses an HTTP response from a GetCurrentCalendarSubscriptionWithResponse call func ParseGetCurrentCalendarSubscriptionResponse(rsp *http.Response) (*GetCurrentCalendarSubscriptionResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) @@ -19394,6 +20288,53 @@ func ParsePostApiCalendarSubscriptionsImportCodesResponse(rsp *http.Response) (* return response, nil } +// 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 := &QueryCalendarSubscriptionSectionsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + 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 { + 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 +} + // ParseListCommentsResponse parses an HTTP response from a ListCommentsWithResponse call func ParseListCommentsResponse(rsp *http.Response) (*ListCommentsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) From 2c3b1a7ed3a81088f6a332bd96e6135ef48d2f93 Mon Sep 17 00:00:00 2001 From: Tiankai Ma Date: Tue, 30 Jun 2026 22:29:21 +0800 Subject: [PATCH 10/10] ci: resolve server openapi branch for drift checks --- .github/workflows/ci.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dffc951..4dfba75 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,10 +15,21 @@ 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 + ref: ${{ steps.server-openapi-ref.outputs.ref }} path: server - uses: actions/setup-go@v5