From 7a6fe0486d5f66a653bf1f22caa95d2775a0e8c0 Mon Sep 17 00:00:00 2001 From: Tiankai Ma Date: Fri, 24 Jul 2026 00:45:42 +0800 Subject: [PATCH 1/2] feat: align commands with interface hierarchy --- README.md | 3 + api/openapi.json | 1759 ++++++++++++---------- internal/cmd/apicmd/api_paths_gen.go | 15 +- internal/cmd/bus/bus.go | 16 +- internal/cmd/catalog/catalog.go | 2 + internal/cmd/homework/homework.go | 37 +- internal/cmd/link/link.go | 104 ++ internal/cmd/me/me.go | 2 +- internal/cmd/root/root_test.go | 4 +- internal/cmd/schedule/schedule.go | 6 +- internal/cmd/school/school.go | 22 +- internal/cmd/workspace/workspace.go | 6 +- internal/openapi/client.gen.go | 2016 +++++++++++++++----------- 13 files changed, 2311 insertions(+), 1681 deletions(-) create mode 100644 internal/cmd/link/link.go diff --git a/README.md b/README.md index e159980..56a6123 100644 --- a/README.md +++ b/README.md @@ -54,6 +54,8 @@ life-ustc workspace subscription import life-ustc workspace calendar events life-ustc workspace calendar feed life-ustc workspace bus-preferences get +life-ustc workspace link-pin list +life-ustc workspace link-pin pin jw life-ustc workspace upload create ./report.pdf life-ustc workspace upload download -o report.pdf @@ -67,6 +69,7 @@ life-ustc catalog section list --semester-id life-ustc catalog teacher list --search "张" life-ustc catalog semester current life-ustc catalog bus timetable --from east --to west +life-ustc catalog link life-ustc catalog metadata # Official USTC sources diff --git a/api/openapi.json b/api/openapi.json index 237f932..44d98e0 100644 --- a/api/openapi.json +++ b/api/openapi.json @@ -13,132 +13,185 @@ ], "tags": [ { - "name": "Admin", - "description": "Admin and moderation endpoints" + "name": "Api", + "description": "Api operations" }, { - "name": "Comments", - "description": "Comment threads, reactions, and moderation" + "name": "OpenAPI", + "description": "OpenAPI operations" }, { - "name": "Homeworks", - "description": "Homework management and completion status" + "name": "account.preferences", + "description": "account.preferences operations" }, { - "name": "Uploads", - "description": "Upload session, R2 object write, finalize, and file management" + "name": "account.profile", + "description": "account.profile operations" }, { - "name": "Descriptions", - "description": "User-generated description content and history" + "name": "admin.comments", + "description": "admin.comments operations" }, { - "name": "Sections", - "description": "Course sections, calendars, and schedules" + "name": "admin.descriptions", + "description": "admin.descriptions operations" }, { - "name": "Courses", - "description": "Course catalog and search" + "name": "admin.homework", + "description": "admin.homework operations" }, { - "name": "Teachers", - "description": "Teacher directory and search" + "name": "admin.suspensions", + "description": "admin.suspensions operations" }, { - "name": "Schedules", - "description": "Schedules search and filtering" + "name": "admin.user", + "description": "admin.user operations" }, { - "name": "Semesters", - "description": "Semester listing and current semester" + "name": "catalog.bus", + "description": "catalog.bus operations" }, { - "name": "Calendar", - "description": "Calendar selections and exports" + "name": "catalog.courses", + "description": "catalog.courses operations" }, { - "name": "Bus", - "description": "Shuttle bus schedules and preferences" + "name": "catalog.link", + "description": "catalog.link operations" }, { - "name": "Todos", - "description": "Personal todo management" + "name": "catalog.metadata", + "description": "catalog.metadata operations" }, { - "name": "Me", - "description": "Current user profile, subscriptions, and personal data" + "name": "catalog.schedule", + "description": "catalog.schedule operations" }, { - "name": "DashboardLinks", - "description": "Dashboard link pinning and click tracking", - "x-displayName": "Dashboard Links" + "name": "catalog.section", + "description": "catalog.section operations" }, { - "name": "Locale", - "description": "Locale switching and locale cookies" + "name": "catalog.semesters", + "description": "catalog.semesters operations" }, { - "name": "Metadata", - "description": "Metadata dictionaries for filters" + "name": "catalog.teachers", + "description": "catalog.teachers operations" }, { - "name": "OpenAPI", - "description": "OpenAPI document endpoint", - "x-displayName": "OpenAPI" + "name": "community.comments", + "description": "community.comments operations" }, { - "name": "Api", - "description": "General API endpoints" + "name": "community.descriptions", + "description": "community.descriptions operations" + }, + { + "name": "community.section-homework", + "description": "community.section-homework operations" + }, + { + "name": "community.user", + "description": "community.user operations" + }, + { + "name": "workspace.bus-preferences", + "description": "workspace.bus-preferences operations" + }, + { + "name": "workspace.calendar", + "description": "workspace.calendar operations" + }, + { + "name": "workspace.homework", + "description": "workspace.homework operations" + }, + { + "name": "workspace.link-pin", + "description": "workspace.link-pin operations" + }, + { + "name": "workspace.overview", + "description": "workspace.overview operations" + }, + { + "name": "workspace.schedule", + "description": "workspace.schedule operations" + }, + { + "name": "workspace.subscription", + "description": "workspace.subscription operations" + }, + { + "name": "workspace.todo", + "description": "workspace.todo operations" + }, + { + "name": "workspace.upload", + "description": "workspace.upload operations" } ], "x-tagGroups": [ { "name": "Catalog", "tags": [ - "Sections", - "Courses", - "Teachers", - "Schedules", - "Semesters" + "catalog.bus", + "catalog.courses", + "catalog.link", + "catalog.metadata", + "catalog.schedule", + "catalog.section", + "catalog.semesters", + "catalog.teachers" ] }, { "name": "Workspace", "tags": [ - "Homeworks", - "Todos", - "Calendar", - "Me", - "DashboardLinks" + "workspace.bus-preferences", + "workspace.calendar", + "workspace.homework", + "workspace.link-pin", + "workspace.overview", + "workspace.schedule", + "workspace.subscription", + "workspace.todo", + "workspace.upload" ] }, { "name": "Community", "tags": [ - "Comments", - "Descriptions", - "Uploads" + "community.comments", + "community.descriptions", + "community.section-homework", + "community.user" ] }, { - "name": "Campus Services", + "name": "Account", "tags": [ - "Bus" + "account.preferences", + "account.profile" ] }, { - "name": "Platform", + "name": "Admin", "tags": [ - "Metadata", - "Locale", - "OpenAPI", - "Api" + "admin.comments", + "admin.descriptions", + "admin.homework", + "admin.suspensions", + "admin.user" ] }, { - "name": "Admin", + "name": "Platform", "tags": [ - "Admin" + "Api", + "OpenAPI" ] } ], @@ -269,45 +322,6 @@ } } }, - "/api/account": { - "get": { - "operationId": "getMe", - "summary": "Get current user", - "tags": [ - "Me" - ], - "security": [ - { - "bearerAuth": [] - }, - { - "sessionCookie": [] - } - ], - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/meResponseSchema" - } - } - } - }, - "401": { - "description": "Error response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/openApiErrorSchema" - } - } - } - } - } - } - }, "/api/health": { "get": { "operationId": "listHealth", @@ -523,7 +537,7 @@ "operationId": "setLocale", "summary": "Update user locale cookie", "tags": [ - "Locale" + "account.preferences" ], "requestBody": { "required": true, @@ -561,27 +575,17 @@ }, "/api/account/profile": { "get": { - "operationId": "get-api-account-profile", - "summary": "Get public user profile", + "operationId": "account_profile_get", + "summary": "Get the current account profile", "tags": [ - "Me" + "account.profile" ], - "parameters": [ + "security": [ { - "in": "query", - "name": "username", - "schema": { - "type": "string", - "minLength": 1 - } + "bearerAuth": [] }, { - "in": "query", - "name": "userId", - "schema": { - "type": "string", - "minLength": 1 - } + "sessionCookie": [] } ], "responses": { @@ -590,12 +594,12 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/publicUserProfileResponseSchema" + "$ref": "#/components/schemas/meResponseSchema" } } } }, - "400": { + "401": { "description": "Error response", "content": { "application/json": { @@ -623,14 +627,13 @@ "operationId": "listAdminComments", "summary": "List moderation comments", "tags": [ - "Admin" + "admin.comments" ], "security": [ { "sessionCookie": [] } ], - "x-auth-role": "admin", "parameters": [ { "in": "query", @@ -717,14 +720,13 @@ "operationId": "listAdminDescriptions", "summary": "List descriptions", "tags": [ - "Admin" + "admin.descriptions" ], "security": [ { "sessionCookie": [] } ], - "x-auth-role": "admin", "parameters": [ { "in": "query", @@ -830,14 +832,13 @@ "operationId": "listAdminHomeworks", "summary": "List moderation homeworks", "tags": [ - "Admin" + "admin.homework" ], "security": [ { "sessionCookie": [] } ], - "x-auth-role": "admin", "parameters": [ { "in": "query", @@ -929,14 +930,13 @@ "operationId": "listAdminSuspensions", "summary": "List suspensions", "tags": [ - "Admin" + "admin.suspensions" ], "security": [ { "sessionCookie": [] } ], - "x-auth-role": "admin", "responses": { "200": { "description": "Successful response", @@ -964,14 +964,13 @@ "operationId": "createAdminSuspension", "summary": "Create suspension for one user", "tags": [ - "Admin" + "admin.suspensions" ], "security": [ { "sessionCookie": [] } ], - "x-auth-role": "admin", "requestBody": { "required": true, "content": { @@ -1087,14 +1086,13 @@ "operationId": "listAdminUsers", "summary": "List users", "tags": [ - "Admin" + "admin.user" ], "security": [ { "sessionCookie": [] } ], - "x-auth-role": "admin", "parameters": [ { "in": "query", @@ -1169,12 +1167,87 @@ } } }, + "/api/calendar-feeds/{credential}.ics": { + "get": { + "operationId": "workspace_calendar_feed_export", + "summary": "Deliver a token-bearing personal calendar feed", + "tags": [ + "workspace.calendar" + ], + "security": [ + { + "bearerAuth": [] + }, + { + "sessionCookie": [] + }, + { + "calendarFeedToken": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "credential", + "schema": { + "type": "string", + "minLength": 1, + "description": "Opaque user-and-token calendar feed credential." + }, + "required": true, + "description": "Opaque user-and-token calendar feed credential." + } + ], + "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" + } + } + } + } + } + } + }, "/api/catalog/bus": { "get": { - "operationId": "queryBus", + "operationId": "catalog_bus_timetable_get", "summary": "Query shuttle buses", "tags": [ - "Bus" + "catalog.bus" ], "parameters": [ { @@ -1215,7 +1288,7 @@ "operationId": "listCourses", "summary": "List courses", "tags": [ - "Courses" + "catalog.courses" ], "parameters": [ { @@ -1316,12 +1389,43 @@ } } }, + "/api/catalog/links": { + "get": { + "operationId": "catalog_link_list", + "summary": "List public campus links", + "tags": [ + "catalog.link" + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/catalogLinkListResponseSchema" + } + } + } + }, + "400": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + } + } + } + }, "/api/catalog/metadata": { "get": { "operationId": "getMetadata", "summary": "Get metadata", "tags": [ - "Metadata" + "catalog.metadata" ], "responses": { "200": { @@ -1342,7 +1446,7 @@ "operationId": "listSchedules", "summary": "List schedules", "tags": [ - "Schedules" + "catalog.schedule" ], "parameters": [ { @@ -1501,7 +1605,7 @@ "operationId": "listSections", "summary": "List sections", "tags": [ - "Sections" + "catalog.section" ], "parameters": [ { @@ -1661,7 +1765,7 @@ "operationId": "listSemesters", "summary": "List semesters", "tags": [ - "Semesters" + "catalog.semesters" ], "parameters": [ { @@ -1725,7 +1829,7 @@ "operationId": "listTeachers", "summary": "List teachers", "tags": [ - "Teachers" + "catalog.teachers" ], "parameters": [ { @@ -1815,7 +1919,7 @@ "operationId": "listComments", "summary": "List comments", "tags": [ - "Comments" + "community.comments" ], "parameters": [ { @@ -1957,7 +2061,7 @@ "operationId": "createComment", "summary": "Create one comment", "tags": [ - "Comments" + "community.comments" ], "security": [ { @@ -2082,7 +2186,7 @@ "operationId": "getDescription", "summary": "Get description history", "tags": [ - "Descriptions" + "community.descriptions" ], "parameters": [ { @@ -2177,7 +2281,7 @@ "operationId": "upsertDescription", "summary": "Upsert description", "tags": [ - "Descriptions" + "community.descriptions" ], "security": [ { @@ -2289,12 +2393,12 @@ } } }, - "/api/community/homeworks": { + "/api/community/section-homeworks": { "get": { - "operationId": "listHomeworks", - "summary": "List homeworks", + "operationId": "community_section_homework_list", + "summary": "List shared section homeworks", "tags": [ - "Homeworks" + "community.section-homework" ], "parameters": [ { @@ -2367,10 +2471,10 @@ } }, "post": { - "operationId": "createHomework", - "summary": "Create one homework", + "operationId": "community_section_homework_create", + "summary": "Create one shared section homework", "tags": [ - "Homeworks" + "community.section-homework" ], "security": [ { @@ -2492,10 +2596,10 @@ }, "/api/workspace/bus-preferences": { "get": { - "operationId": "getBusPreferences", + "operationId": "workspace_bus_preferences_get", "summary": "Get bus preferences", "tags": [ - "Bus" + "workspace.bus-preferences" ], "security": [ { @@ -2529,10 +2633,10 @@ } }, "post": { - "operationId": "setBusPreferences", + "operationId": "workspace_bus_preferences_set", "summary": "Update bus preferences", "tags": [ - "Bus" + "workspace.bus-preferences" ], "security": [ { @@ -2629,7 +2733,7 @@ "operationId": "getSubscribedHomeworks", "summary": "List subscribed homeworks", "tags": [ - "Homeworks" + "workspace.homework" ], "security": [ { @@ -2663,12 +2767,167 @@ } } }, + "/api/workspace/link-pins": { + "get": { + "operationId": "workspace_link_pin_list", + "summary": "List the current user's pinned campus links", + "tags": [ + "workspace.link-pin" + ], + "security": [ + { + "bearerAuth": [] + }, + { + "sessionCookie": [] + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/dashboardLinkPinResponseSchema" + } + } + } + }, + "401": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + } + } + }, + "post": { + "operationId": "workspace_link_pin_set", + "summary": "Set one campus link pin", + "tags": [ + "workspace.link-pin" + ], + "security": [ + { + "bearerAuth": [] + }, + { + "sessionCookie": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "$ref": "#/components/schemas/dashboardLinkPinRequestSchema" + } + } + } + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/dashboardLinkPinResponseSchema" + } + } + } + }, + "303": { + "description": "Redirect after pin/unpin", + "headers": { + "Location": { + "description": "Redirect target URL", + "schema": { + "type": "string" + } + } + } + }, + "400": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + }, + "401": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + }, + "429": { + "description": "Error response", + "headers": { + "Retry-After": { + "description": "Seconds before retrying the mutation", + "schema": { + "type": "integer", + "minimum": 0 + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + }, + "500": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + }, + "503": { + "description": "Error response", + "headers": { + "Retry-After": { + "description": "Seconds before retrying the mutation", + "schema": { + "type": "integer", + "minimum": 0 + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + } + } + } + }, "/api/workspace/overview": { "get": { - "operationId": "get-api-me-overview", + "operationId": "workspace_overview_get", "summary": "Get a compact current-user overview for lightweight clients", "tags": [ - "Dashboard" + "workspace.overview" ], "security": [ { @@ -2756,10 +3015,10 @@ }, "/api/workspace/schedules": { "get": { - "operationId": "get-api-me-subscriptions-schedules", + "operationId": "workspace_schedule_list", "summary": "List schedules across the current user's subscribed sections", "tags": [ - "Schedules" + "workspace.schedule" ], "security": [ { @@ -2859,7 +3118,7 @@ "operationId": "setCalendarSubscription", "summary": "Replace section subscriptions", "tags": [ - "Calendar" + "workspace.subscription" ], "security": [ { @@ -2954,7 +3213,7 @@ "operationId": "appendCalendarSubscriptionSections", "summary": "Append section subscriptions", "tags": [ - "Calendar" + "workspace.subscription" ], "security": [ { @@ -3059,7 +3318,7 @@ "operationId": "delete-api-workspace-subscriptions", "summary": "Remove section subscriptions", "tags": [ - "Calendar" + "workspace.subscription" ], "security": [ { @@ -3166,7 +3425,7 @@ "operationId": "listTodos", "summary": "List todos", "tags": [ - "Todos" + "workspace.todo" ], "security": [ { @@ -3266,7 +3525,7 @@ "operationId": "createTodo", "summary": "Create a todo", "tags": [ - "Todos" + "workspace.todo" ], "security": [ { @@ -3371,7 +3630,7 @@ "operationId": "listUploads", "summary": "List uploads", "tags": [ - "Uploads" + "workspace.upload" ], "security": [ { @@ -3451,7 +3710,7 @@ "operationId": "createUpload", "summary": "Create a signed upload URL", "tags": [ - "Uploads" + "workspace.upload" ], "security": [ { @@ -3756,14 +4015,13 @@ "operationId": "moderateAdminComment", "summary": "Moderate one comment", "tags": [ - "Admin" + "admin.comments" ], "security": [ { "sessionCookie": [] } ], - "x-auth-role": "admin", "parameters": [ { "in": "path", @@ -3882,14 +4140,13 @@ "operationId": "updateAdminDescription", "summary": "Update one description from moderation", "tags": [ - "Admin" + "admin.descriptions" ], "security": [ { "sessionCookie": [] } ], - "x-auth-role": "admin", "parameters": [ { "in": "path", @@ -4008,14 +4265,13 @@ "operationId": "deleteAdminHomework", "summary": "Delete one homework", "tags": [ - "Admin" + "admin.homework" ], "security": [ { "sessionCookie": [] } ], - "x-auth-role": "admin", "parameters": [ { "in": "path", @@ -4114,14 +4370,13 @@ "operationId": "updateAdminSuspension", "summary": "Lift one suspension", "tags": [ - "Admin" + "admin.suspensions" ], "security": [ { "sessionCookie": [] } ], - "x-auth-role": "admin", "parameters": [ { "in": "path", @@ -4220,14 +4475,13 @@ "operationId": "updateAdminUser", "summary": "Update one user", "tags": [ - "Admin" + "admin.user" ], "security": [ { "sessionCookie": [] } ], - "x-auth-role": "admin", "parameters": [ { "in": "path", @@ -4492,10 +4746,10 @@ }, "/api/catalog/bus/next": { "get": { - "operationId": "get-api-catalog-bus-next", + "operationId": "catalog_bus_departure_next", "summary": "Get next shuttle bus departures for an origin and destination campus", "tags": [ - "Bus" + "catalog.bus" ], "parameters": [ { @@ -4616,10 +4870,10 @@ }, "/api/catalog/bus/routes": { "get": { - "operationId": "get-api-bus-routes", + "operationId": "catalog_bus_route_search", "summary": "Search shuttle bus route variants", "tags": [ - "Bus" + "catalog.bus" ], "parameters": [ { @@ -4699,7 +4953,7 @@ "operationId": "getCourse", "summary": "Get course", "tags": [ - "Courses" + "catalog.courses" ], "parameters": [ { @@ -4757,12 +5011,75 @@ } } }, + "/api/catalog/links/resolve": { + "get": { + "operationId": "catalog_link_resolve", + "summary": "Resolve a public campus link", + "tags": [ + "catalog.link" + ], + "parameters": [ + { + "in": "query", + "name": "slug", + "schema": { + "type": "string", + "minLength": 1 + }, + "required": true + } + ], + "responses": { + "307": { + "description": "Temporary redirect to target link", + "headers": { + "Location": { + "description": "Redirect target URL", + "schema": { + "type": "string" + } + } + } + } + } + }, + "post": { + "operationId": "catalog_link_visit_record", + "summary": "Resolve a public campus link and record an authenticated visit", + "tags": [ + "catalog.link" + ], + "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": { + "type": "string" + } + } + } + } + } + } + }, "/api/catalog/sections/{jwId}": { "get": { "operationId": "getSection", "summary": "Get section", "tags": [ - "Sections" + "catalog.section" ], "parameters": [ { @@ -4825,7 +5142,7 @@ "operationId": "getSectionsCalendar", "summary": "Generate sections calendar", "tags": [ - "Sections" + "catalog.section" ], "parameters": [ { @@ -4867,7 +5184,7 @@ "operationId": "matchSectionCodes", "summary": "Match section codes", "tags": [ - "Sections" + "catalog.section" ], "requestBody": { "required": true, @@ -4918,7 +5235,7 @@ "operationId": "getCurrentSemester", "summary": "Get current semester", "tags": [ - "Semesters" + "catalog.semesters" ], "responses": { "200": { @@ -4949,7 +5266,7 @@ "operationId": "getTeacher", "summary": "Get teacher", "tags": [ - "Teachers" + "catalog.teachers" ], "parameters": [ { @@ -5012,7 +5329,7 @@ "operationId": "getComment", "summary": "Get comment thread", "tags": [ - "Comments" + "community.comments" ], "parameters": [ { @@ -5062,7 +5379,7 @@ "operationId": "updateComment", "summary": "Update one comment", "tags": [ - "Comments" + "community.comments" ], "security": [ { @@ -5188,7 +5505,7 @@ "operationId": "deleteComment", "summary": "Delete one comment", "tags": [ - "Comments" + "community.comments" ], "security": [ { @@ -5296,7 +5613,7 @@ "operationId": "delete-api-comments-batch", "summary": "Delete multiple comments owned by the current user", "tags": [ - "Comments" + "community.comments" ], "security": [ { @@ -5398,12 +5715,12 @@ } } }, - "/api/community/homeworks/{id}": { + "/api/community/section-homeworks/{id}": { "patch": { - "operationId": "updateHomework", - "summary": "Update one homework", + "operationId": "community_section_homework_update", + "summary": "Update one shared section homework", "tags": [ - "Homeworks" + "community.section-homework" ], "security": [ { @@ -5526,10 +5843,10 @@ } }, "delete": { - "operationId": "deleteHomework", - "summary": "Soft delete one homework", + "operationId": "community_section_homework_delete", + "summary": "Soft delete one shared section homework", "tags": [ - "Homeworks" + "community.section-homework" ], "security": [ { @@ -5632,6 +5949,48 @@ } } }, + "/api/community/users/{identifier}": { + "get": { + "operationId": "community_user_get", + "summary": "Get one public community user", + "tags": [ + "community.user" + ], + "parameters": [ + { + "in": "path", + "name": "identifier", + "schema": { + "type": "string", + "minLength": 1 + }, + "required": true + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/publicUserProfileResponseSchema" + } + } + } + }, + "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", @@ -5721,7 +6080,7 @@ "operationId": "put-api-homeworks-completions", "summary": "Update homework completions in a batch", "tags": [ - "Homeworks" + "workspace.homework" ], "security": [ { @@ -5813,12 +6172,12 @@ } } }, - "/api/workspace/links/pin": { + "/api/workspace/link-pins/batch": { "post": { - "operationId": "pinDashboardLink", - "summary": "Pin dashboard link", + "operationId": "workspace_link_pin_batch_set", + "summary": "Set multiple campus link pins", "tags": [ - "DashboardLinks" + "workspace.link-pin" ], "security": [ { @@ -5831,9 +6190,9 @@ "requestBody": { "required": true, "content": { - "application/x-www-form-urlencoded": { + "application/json": { "schema": { - "$ref": "#/components/schemas/dashboardLinkPinRequestSchema" + "$ref": "#/components/schemas/dashboardLinkPinBatchRequestSchema" } } } @@ -5849,23 +6208,12 @@ } } }, - "303": { - "description": "Redirect after pin/unpin", - "headers": { - "Location": { - "description": "Redirect target URL", - "schema": { - "type": "string" - } - } - } - }, "400": { "description": "Error response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/dashboardLinkPinResponseSchema" + "$ref": "#/components/schemas/openApiErrorSchema" } } } @@ -5875,7 +6223,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/dashboardLinkPinResponseSchema" + "$ref": "#/components/schemas/openApiErrorSchema" } } } @@ -5904,7 +6252,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/dashboardLinkPinResponseSchema" + "$ref": "#/components/schemas/openApiErrorSchema" } } } @@ -5931,75 +6279,12 @@ } } }, - "/api/workspace/links/visit": { - "get": { - "operationId": "visitDashboardLink", - "summary": "Preview dashboard link", - "tags": [ - "DashboardLinks" - ], - "parameters": [ - { - "in": "query", - "name": "slug", - "schema": { - "type": "string", - "minLength": 1 - }, - "required": true - } - ], - "responses": { - "307": { - "description": "Temporary redirect to target link", - "headers": { - "Location": { - "description": "Redirect target URL", - "schema": { - "type": "string" - } - } - } - } - } - }, - "post": { - "operationId": "recordDashboardLinkVisit", - "summary": "Record one dashboard link visit and redirect", - "tags": [ - "DashboardLinks" - ], - "requestBody": { - "required": true, - "content": { - "application/x-www-form-urlencoded": { - "schema": { - "$ref": "#/components/schemas/dashboardLinkVisitRequestSchema" - } - } - } - }, - "responses": { - "303": { - "description": "Redirect after recording link click", - "headers": { - "Location": { - "description": "Redirect target URL", - "schema": { - "type": "string" - } - } - } - } - } - } - }, "/api/workspace/subscriptions/batch": { "post": { "operationId": "batchUpdateCalendarSubscription", "summary": "Batch update calendar section subscriptions", "tags": [ - "Calendar" + "workspace.subscription" ], "security": [ { @@ -6106,7 +6391,7 @@ "operationId": "getCurrentCalendarSubscription", "summary": "Get section subscriptions", "tags": [ - "Calendar" + "workspace.subscription" ], "security": [ { @@ -6145,7 +6430,7 @@ "operationId": "post-api-workspace-subscriptions-import-codes", "summary": "Import section subscriptions by section codes", "tags": [ - "Calendar" + "workspace.subscription" ], "security": [ { @@ -6252,7 +6537,7 @@ "operationId": "queryCalendarSubscriptionSections", "summary": "Query sections for calendar subscription changes", "tags": [ - "Calendar" + "workspace.subscription" ], "security": [ { @@ -6321,7 +6606,7 @@ "operationId": "updateTodo", "summary": "Update one todo", "tags": [ - "Todos" + "workspace.todo" ], "security": [ { @@ -6447,7 +6732,7 @@ "operationId": "deleteTodo", "summary": "Delete one todo", "tags": [ - "Todos" + "workspace.todo" ], "security": [ { @@ -6555,7 +6840,7 @@ "operationId": "patch-api-todos-batch", "summary": "Update completion state for multiple todos", "tags": [ - "Todos" + "workspace.todo" ], "security": [ { @@ -6650,7 +6935,7 @@ "operationId": "delete-api-todos-batch", "summary": "Delete multiple todos by id", "tags": [ - "Todos" + "workspace.todo" ], "security": [ { @@ -6747,7 +7032,7 @@ "operationId": "updateUpload", "summary": "Rename one upload", "tags": [ - "Uploads" + "workspace.upload" ], "security": [ { @@ -6873,7 +7158,7 @@ "operationId": "deleteUpload", "summary": "Delete one upload", "tags": [ - "Uploads" + "workspace.upload" ], "security": [ { @@ -6991,7 +7276,7 @@ "operationId": "completeUpload", "summary": "Complete upload", "tags": [ - "Uploads" + "workspace.upload" ], "security": [ { @@ -7098,7 +7383,7 @@ "operationId": "put-api-uploads-object", "summary": "Write upload object", "tags": [ - "Uploads" + "workspace.upload" ], "security": [ { @@ -7227,7 +7512,7 @@ "operationId": "getSectionCalendar", "summary": "Generate section calendar", "tags": [ - "Sections" + "catalog.section" ], "parameters": [ { @@ -7269,7 +7554,7 @@ "operationId": "getSectionScheduleGroups", "summary": "Get schedule groups", "tags": [ - "Sections" + "catalog.section" ], "parameters": [ { @@ -7325,7 +7610,7 @@ "operationId": "getSectionSchedules", "summary": "Get section schedules", "tags": [ - "Sections" + "catalog.section" ], "parameters": [ { @@ -7419,7 +7704,7 @@ "operationId": "addCommentReaction", "summary": "Add one reaction to a comment", "tags": [ - "Comments" + "community.comments" ], "security": [ { @@ -7545,7 +7830,7 @@ "operationId": "removeCommentReaction", "summary": "Remove one reaction from a comment", "tags": [ - "Comments" + "community.comments" ], "security": [ { @@ -7666,97 +7951,12 @@ } } }, - "/api/community/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" - } - } - } - } - } - } - }, "/api/workspace/homeworks/{id}/completion": { "put": { "operationId": "setHomeworkCompletion", "summary": "Update homework completion", "tags": [ - "Homeworks" + "workspace.homework" ], "security": [ { @@ -7869,119 +8069,12 @@ } } }, - "/api/workspace/links/pin/batch": { - "post": { - "operationId": "post-api-workspace-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" - } - } - } - }, - "429": { - "description": "Error response", - "headers": { - "Retry-After": { - "description": "Seconds before retrying the mutation", - "schema": { - "type": "integer", - "minimum": 0 - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/openApiErrorSchema" - } - } - } - }, - "500": { - "description": "Error response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/dashboardLinkPinResponseSchema" - } - } - } - }, - "503": { - "description": "Error response", - "headers": { - "Retry-After": { - "description": "Seconds before retrying the mutation", - "schema": { - "type": "integer", - "minimum": 0 - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/openApiErrorSchema" - } - } - } - } - } - } - }, "/api/workspace/uploads/{id}/download": { "get": { "operationId": "downloadUpload", "summary": "Download upload", "tags": [ - "Uploads" + "workspace.upload" ], "security": [ { @@ -8453,6 +8546,101 @@ ], "additionalProperties": false }, + "openApiErrorSchema": { + "type": "object", + "properties": { + "error": { + "type": "string" + } + }, + "required": [ + "error" + ], + "additionalProperties": false + }, + "openApiDocumentResponseSchema": { + "type": "object", + "properties": { + "openapi": { + "type": "string" + }, + "info": { + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "version": { + "type": "string" + }, + "description": { + "type": "string" + } + }, + "required": [ + "title", + "version" + ], + "additionalProperties": false + }, + "servers": { + "type": "array", + "items": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "description": { + "type": "string" + } + }, + "required": [ + "url" + ], + "additionalProperties": false + } + }, + "paths": { + "type": "object", + "additionalProperties": {} + } + }, + "required": [ + "openapi", + "info", + "paths" + ], + "additionalProperties": false + }, + "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": { @@ -8501,214 +8689,6 @@ ], "additionalProperties": false }, - "openApiErrorSchema": { - "type": "object", - "properties": { - "error": { - "type": "string" - } - }, - "required": [ - "error" - ], - "additionalProperties": false - }, - "openApiDocumentResponseSchema": { - "type": "object", - "properties": { - "openapi": { - "type": "string" - }, - "info": { - "type": "object", - "properties": { - "title": { - "type": "string" - }, - "version": { - "type": "string" - }, - "description": { - "type": "string" - } - }, - "required": [ - "title", - "version" - ], - "additionalProperties": false - }, - "servers": { - "type": "array", - "items": { - "type": "object", - "properties": { - "url": { - "type": "string" - }, - "description": { - "type": "string" - } - }, - "required": [ - "url" - ], - "additionalProperties": false - } - }, - "paths": { - "type": "object", - "additionalProperties": {} - } - }, - "required": [ - "openapi", - "info", - "paths" - ], - "additionalProperties": false - }, - "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 - }, - "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 - }, "adminCommentsResponseSchema": { "type": "object", "properties": { @@ -10596,6 +10576,98 @@ ], "additionalProperties": false }, + "catalogLinkListResponseSchema": { + "type": "object", + "properties": { + "links": { + "type": "array", + "items": { + "type": "object", + "properties": { + "slug": { + "type": "string" + }, + "title": { + "type": "string" + }, + "url": { + "type": "string", + "format": "uri" + }, + "description": { + "type": "string" + }, + "titlePinyin": { + "type": "string" + }, + "descriptionPinyin": { + "type": "string" + }, + "category": { + "type": "string", + "enum": [ + "academic", + "community", + "services", + "campus" + ] + }, + "icon": { + "type": "string", + "enum": [ + "book-open", + "clipboard-list", + "building", + "graduation-cap", + "mail", + "monitor-play", + "network", + "school", + "users" + ] + }, + "group": { + "type": "string", + "enum": [ + "mostClicked", + "study", + "life", + "tech", + "classroom", + "external", + "graduate", + "leastClicked" + ] + }, + "locale": { + "type": "string", + "enum": [ + "zh-cn", + "en-us" + ] + } + }, + "required": [ + "slug", + "title", + "url", + "description", + "titlePinyin", + "descriptionPinyin", + "category", + "icon", + "group", + "locale" + ], + "additionalProperties": false + } + } + }, + "required": [ + "links" + ], + "additionalProperties": false + }, "metadataResponseSchema": { "type": "object", "properties": { @@ -15326,6 +15398,55 @@ ], "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 + }, + "dashboardLinkPinRequestSchema": { + "type": "object", + "properties": { + "slug": { + "type": "string", + "minLength": 1 + }, + "returnTo": { + "type": "string" + }, + "action": { + "type": "string", + "enum": [ + "pin", + "unpin" + ] + } + }, + "required": [ + "slug" + ], + "additionalProperties": false + }, "compactOverviewResponseSchema": { "type": "object", "properties": { @@ -22914,6 +23035,19 @@ ], "additionalProperties": false }, + "dashboardLinkVisitRequestSchema": { + "type": "object", + "properties": { + "slug": { + "type": "string", + "minLength": 1 + } + }, + "required": [ + "slug" + ], + "additionalProperties": false + }, "sectionDetailSchema": { "type": "object", "properties": { @@ -26672,6 +26806,119 @@ ], "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 + }, "homeworkCompletionBatchRequestSchema": { "type": "object", "properties": { @@ -26794,65 +27041,38 @@ ], "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": { + "dashboardLinkPinBatchRequestSchema": { "type": "object", "properties": { - "pinnedSlugs": { + "items": { + "minItems": 1, + "maxItems": 10, "type": "array", "items": { - "type": "string" + "type": "object", + "properties": { + "slug": { + "type": "string", + "minLength": 1 + }, + "action": { + "type": "string", + "enum": [ + "pin", + "unpin" + ] + } + }, + "required": [ + "slug", + "action" + ], + "additionalProperties": false } - }, - "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" + "items" ], "additionalProperties": false }, @@ -33171,41 +33391,6 @@ "completedAt" ], "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 } }, "securitySchemes": { diff --git a/internal/cmd/apicmd/api_paths_gen.go b/internal/cmd/apicmd/api_paths_gen.go index 00928be..117f0c2 100644 --- a/internal/cmd/apicmd/api_paths_gen.go +++ b/internal/cmd/apicmd/api_paths_gen.go @@ -11,7 +11,6 @@ var generatedAPIPaths = []string{ "/.well-known/openid-configuration", "/.well-known/openid-configuration/api/auth", "/.well-known/openid-configuration/api/mcp", - "/api/account", "/api/account/preferences", "/api/account/profile", "/api/admin/comments", @@ -27,11 +26,14 @@ var generatedAPIPaths = []string{ "/api/auth/.well-known/openid-configuration", "/api/auth/oauth2/device-authorization", "/api/auth/oauth2/token", + "/api/calendar-feeds/{credential}.ics", "/api/catalog/bus", "/api/catalog/bus/next", "/api/catalog/bus/routes", "/api/catalog/courses", "/api/catalog/courses/{jwId}", + "/api/catalog/links", + "/api/catalog/links/resolve", "/api/catalog/metadata", "/api/catalog/schedules", "/api/catalog/sections", @@ -50,9 +52,9 @@ var generatedAPIPaths = []string{ "/api/community/comments/{id}", "/api/community/comments/{id}/reactions", "/api/community/descriptions", - "/api/community/homeworks", - "/api/community/homeworks/{id}", - "/api/community/users/{userId}/calendar.ics", + "/api/community/section-homeworks", + "/api/community/section-homeworks/{id}", + "/api/community/users/{identifier}", "/api/health", "/api/mcp", "/api/mcp/.well-known/oauth-authorization-server", @@ -62,9 +64,8 @@ var generatedAPIPaths = []string{ "/api/workspace/homeworks", "/api/workspace/homeworks/completions", "/api/workspace/homeworks/{id}/completion", - "/api/workspace/links/pin", - "/api/workspace/links/pin/batch", - "/api/workspace/links/visit", + "/api/workspace/link-pins", + "/api/workspace/link-pins/batch", "/api/workspace/overview", "/api/workspace/schedules", "/api/workspace/subscriptions", diff --git a/internal/cmd/bus/bus.go b/internal/cmd/bus/bus.go index 553e67d..f2d0ed1 100644 --- a/internal/cmd/bus/bus.go +++ b/internal/cmd/bus/bus.go @@ -76,8 +76,8 @@ func runBusQuery(cmd *cobra.Command, origin, destination, dayType, now string, s if err != nil { return err } - params := &openapi.QueryBusParams{} - data, err := api.ParseResponseRaw(c.QueryBus(api.Ctx(), params)) + params := &openapi.CatalogBusTimetableGetParams{} + data, err := api.ParseResponseRaw(c.CatalogBusTimetableGet(api.Ctx(), params)) if err != nil { return err } @@ -431,7 +431,9 @@ func newCmdPreferences() *cobra.Command { if err != nil { return err } - rawData, err := api.ParseResponseRaw(c.GetBusPreferences(api.Ctx())) + rawData, err := api.ParseResponseRaw( + c.WorkspaceBusPreferencesGet(api.Ctx()), + ) if err != nil { return err } @@ -497,7 +499,13 @@ func newCmdSetPreferences() *cobra.Command { if err != nil { return fmt.Errorf("failed to encode body: %w", err) } - _, err = api.ParseResponseRaw(c.SetBusPreferencesWithBody(api.Ctx(), "application/json", bytes.NewReader(bodyBytes))) + _, err = api.ParseResponseRaw( + c.WorkspaceBusPreferencesSetWithBody( + api.Ctx(), + "application/json", + bytes.NewReader(bodyBytes), + ), + ) if err != nil { return err } diff --git a/internal/cmd/catalog/catalog.go b/internal/cmd/catalog/catalog.go index 4fb69eb..c5c4021 100644 --- a/internal/cmd/catalog/catalog.go +++ b/internal/cmd/catalog/catalog.go @@ -5,6 +5,7 @@ import ( "github.com/Life-USTC/CLI/internal/cmd/bus" "github.com/Life-USTC/CLI/internal/cmd/course" + "github.com/Life-USTC/CLI/internal/cmd/link" "github.com/Life-USTC/CLI/internal/cmd/metadata" "github.com/Life-USTC/CLI/internal/cmd/schedule" "github.com/Life-USTC/CLI/internal/cmd/section" @@ -26,6 +27,7 @@ func NewCmdCatalog() *cobra.Command { teacher.NewCmdTeacher(), schedule.NewCmdSchedule(), bus.NewCmdBus(), + link.NewCmdCatalogLink(), ) return cmd } diff --git a/internal/cmd/homework/homework.go b/internal/cmd/homework/homework.go index 9724ccc..a550005 100644 --- a/internal/cmd/homework/homework.go +++ b/internal/cmd/homework/homework.go @@ -54,19 +54,24 @@ func newCmdSectionList() *cobra.Command { if err != nil { return err } - inclDel := openapi.ListHomeworksParamsIncludeDeleted("false") + inclDel := openapi.CommunitySectionHomeworkListParamsIncludeDeleted( + "false", + ) if includeDeleted { - inclDel = openapi.ListHomeworksParamsIncludeDeletedTrue + inclDel = + openapi.CommunitySectionHomeworkListParamsIncludeDeletedTrue } sectionID, err := cmdutil.Int64PtrIfSet(args[0]) if err != nil { return err } - params := &openapi.ListHomeworksParams{ + params := &openapi.CommunitySectionHomeworkListParams{ SectionId: sectionID, IncludeDeleted: &inclDel, } - data, err := api.ParseResponseRaw(c.ListHomeworks(api.Ctx(), params)) + data, err := api.ParseResponseRaw( + c.CommunitySectionHomeworkList(api.Ctx(), params), + ) if err != nil { return err } @@ -162,9 +167,11 @@ func newCmdSectionCreate() *cobra.Command { if requiresTeam { schemaBody.RequiresTeam = &requiresTeam } - body := openapi.CreateHomeworkJSONRequestBody{} + body := openapi.CommunitySectionHomeworkCreateJSONRequestBody{} _ = body.FromHomeworkCreateRequestSchema0(schemaBody) - data, err := api.ParseResponseRaw(c.CreateHomework(api.Ctx(), body)) + data, err := api.ParseResponseRaw( + c.CommunitySectionHomeworkCreate(api.Ctx(), body), + ) if err != nil { return err } @@ -363,15 +370,17 @@ func runMyHomeworkList(cmd *cobra.Command, opts myHomeworkListOpts) error { var data any if opts.sectionID != "" { - // Single section — use /api/community/homeworks with sectionId filter + // Single section — use the shared section-homework catalog. sectionID, err := cmdutil.Int64PtrIfSet(opts.sectionID) if err != nil { return err } - params := &openapi.ListHomeworksParams{ + params := &openapi.CommunitySectionHomeworkListParams{ SectionId: sectionID, } - data, err = api.ParseResponseRaw(c.ListHomeworks(api.Ctx(), params)) + data, err = api.ParseResponseRaw( + c.CommunitySectionHomeworkList(api.Ctx(), params), + ) if err != nil { return err } @@ -625,7 +634,7 @@ func newCmdUpdate() *cobra.Command { if err != nil { return err } - body := openapi.UpdateHomeworkJSONRequestBody{} + body := openapi.CommunitySectionHomeworkUpdateJSONRequestBody{} hasUpdate := false if title != "" { body.Title = &title @@ -672,7 +681,9 @@ func newCmdUpdate() *cobra.Command { if !hasUpdate { return fmt.Errorf("nothing to update — specify at least one flag") } - _, err = api.ParseResponseRaw(c.UpdateHomework(api.Ctx(), id, body)) + _, err = api.ParseResponseRaw( + c.CommunitySectionHomeworkUpdate(api.Ctx(), id, body), + ) if err != nil { return err } @@ -727,7 +738,9 @@ func newCmdDelete() *cobra.Command { if err != nil { return err } - _, err = api.ParseResponseRaw(c.DeleteHomework(api.Ctx(), id)) + _, err = api.ParseResponseRaw( + c.CommunitySectionHomeworkDelete(api.Ctx(), id), + ) if err != nil { return err } diff --git a/internal/cmd/link/link.go b/internal/cmd/link/link.go new file mode 100644 index 0000000..fcaeea4 --- /dev/null +++ b/internal/cmd/link/link.go @@ -0,0 +1,104 @@ +package link + +import ( + "context" + "net/http" + + "github.com/spf13/cobra" + + "github.com/Life-USTC/CLI/internal/api" + "github.com/Life-USTC/CLI/internal/cmd/cmdutil" + openapi "github.com/Life-USTC/CLI/internal/openapi" + "github.com/Life-USTC/CLI/internal/output" +) + +func NewCmdCatalogLink() *cobra.Command { + return &cobra.Command{ + Use: "link", + Short: "List public campus links", + Args: cobra.NoArgs, + RunE: func(cmd *cobra.Command, _ []string) error { + client, err := api.NewTypedClient(cmdutil.ServerFromCmd(cmd), false) + if err != nil { + return err + } + data, err := api.ParseResponseRaw(client.CatalogLinkList(api.Ctx())) + if err != nil { + return err + } + list := cmdutil.NewListResult(data, "links") + return output.OutputList(list.Raw, list.Rows, []output.Column{ + {Header: "Title", Key: "title"}, + {Header: "Group", Key: "group"}, + {Header: "URL", Key: "url"}, + {Header: "Slug", Key: "slug"}, + }, list.Total, list.Page) + }, + } +} + +func NewCmdWorkspaceLinkPin() *cobra.Command { + cmd := &cobra.Command{ + Use: "link-pin ", + Short: "Manage personal campus link pins", + Args: cobra.NoArgs, + } + cmd.AddCommand(newCmdListPins(), newCmdSetPin("pin"), newCmdSetPin("unpin")) + return cmd +} + +func newCmdListPins() *cobra.Command { + return &cobra.Command{ + Use: "list", + Short: "List pinned campus link slugs", + Args: cobra.NoArgs, + RunE: func(cmd *cobra.Command, _ []string) error { + client, err := api.NewTypedClient(cmdutil.ServerFromCmd(cmd), true) + if err != nil { + return err + } + data, err := api.ParseResponseRaw( + client.WorkspaceLinkPinList(api.Ctx()), + ) + if err != nil { + return err + } + return output.OutputDetail(data, []output.FieldDef{ + {Key: "pinnedSlugs", Label: "Pinned links"}, + {Key: "maxPinnedLinks", Label: "Maximum pins"}, + }, "Link pins") + }, + } +} + +func newCmdSetPin(action string) *cobra.Command { + return &cobra.Command{ + Use: action + " ", + Short: action + " a campus link", + Args: cobra.ExactArgs(1), + RunE: func(cmd *cobra.Command, args []string) error { + client, err := api.NewTypedClient(cmdutil.ServerFromCmd(cmd), true) + if err != nil { + return err + } + value := openapi.DashboardLinkPinRequestSchemaAction(action) + data, err := api.ParseResponseRaw( + client.WorkspaceLinkPinSetWithFormdataBody( + api.Ctx(), + openapi.WorkspaceLinkPinSetFormdataRequestBody{ + Action: &value, + Slug: args[0], + }, + func(_ context.Context, request *http.Request) error { + request.Header.Set("Accept", "application/json") + return nil + }, + ), + ) + if err != nil { + return err + } + return output.JSON(data) + }, + } +} diff --git a/internal/cmd/me/me.go b/internal/cmd/me/me.go index 7f1ce83..7e0530c 100644 --- a/internal/cmd/me/me.go +++ b/internal/cmd/me/me.go @@ -25,7 +25,7 @@ func NewCmdProfile() *cobra.Command { if err != nil { return err } - data, err := api.ParseResponseRaw(c.GetMe(api.Ctx())) + data, err := api.ParseResponseRaw(c.AccountProfileGet(api.Ctx())) if err != nil { return err } diff --git a/internal/cmd/root/root_test.go b/internal/cmd/root/root_test.go index 5938e05..9e9cf79 100644 --- a/internal/cmd/root/root_test.go +++ b/internal/cmd/root/root_test.go @@ -42,11 +42,11 @@ func TestUnifiedDomainContents(t *testing.T) { cmd := NewCmdRoot() expected := map[string][]string{ "catalog": { - "metadata", "semester", "course", "section", "teacher", "schedule", "bus", + "metadata", "semester", "course", "section", "teacher", "schedule", "bus", "link", }, "workspace": { "overview", "calendar", "schedule", "exam", "todo", "homework", - "subscription", "bus-preferences", "upload", "school", + "subscription", "bus-preferences", "link-pin", "upload", "school", }, "community": { "comment", "description", "section-homework", diff --git a/internal/cmd/schedule/schedule.go b/internal/cmd/schedule/schedule.go index bdfd54d..e0ce277 100644 --- a/internal/cmd/schedule/schedule.go +++ b/internal/cmd/schedule/schedule.go @@ -52,13 +52,15 @@ func NewCmdWorkspaceSchedule() *cobra.Command { if err != nil { return err } - params := &openapi.GetApiMeSubscriptionsSchedulesParams{ + params := &openapi.WorkspaceScheduleListParams{ DateFrom: cmdutil.StringPtrIfSet(dateFrom), DateTo: cmdutil.StringPtrIfSet(dateTo), Weekday: cmdutil.Int64PtrIfPositive(weekday), Limit: cmdutil.Int64PtrIfPositive(limit), } - data, err := api.ParseResponseRaw(c.GetApiMeSubscriptionsSchedules(api.Ctx(), params)) + data, err := api.ParseResponseRaw( + c.WorkspaceScheduleList(api.Ctx(), params), + ) if err != nil { return err } diff --git a/internal/cmd/school/school.go b/internal/cmd/school/school.go index 08cffbe..6d33f0b 100644 --- a/internal/cmd/school/school.go +++ b/internal/cmd/school/school.go @@ -1240,15 +1240,21 @@ func sectionsByCourseName(curriculum []ustcschool.CurriculumItem, byCode map[str } func fetchLifeHomeworksForSection(cmd *cobra.Command, apiClient *api.TypedClient, sectionID string) ([]map[string]any, error) { - includeDeleted := openapi.ListHomeworksParamsIncludeDeletedFalse + includeDeleted := + openapi.CommunitySectionHomeworkListParamsIncludeDeletedFalse parsedSectionID, err := cmdutil.Int64PtrIfSet(sectionID) if err != nil { return nil, err } - raw, err := api.ParseResponseRaw(apiClient.ListHomeworks(cmd.Context(), &openapi.ListHomeworksParams{ - SectionId: parsedSectionID, - IncludeDeleted: &includeDeleted, - })) + raw, err := api.ParseResponseRaw( + apiClient.CommunitySectionHomeworkList( + cmd.Context(), + &openapi.CommunitySectionHomeworkListParams{ + SectionId: parsedSectionID, + IncludeDeleted: &includeDeleted, + }, + ), + ) if err != nil { return nil, err } @@ -1272,9 +1278,11 @@ func createLifeHomework(cmd *cobra.Command, apiClient *api.TypedClient, sectionI _ = dueUnion.FromHomeworkCreateRequestSchema0SubmissionDueAt0(due) schemaBody.SubmissionDueAt = &dueUnion } - body := openapi.CreateHomeworkJSONRequestBody{} + body := openapi.CommunitySectionHomeworkCreateJSONRequestBody{} _ = body.FromHomeworkCreateRequestSchema0(schemaBody) - raw, err := api.ParseResponseRaw(apiClient.CreateHomework(cmd.Context(), body)) + raw, err := api.ParseResponseRaw( + apiClient.CommunitySectionHomeworkCreate(cmd.Context(), body), + ) if err != nil { return nil, err } diff --git a/internal/cmd/workspace/workspace.go b/internal/cmd/workspace/workspace.go index b999d46..756c459 100644 --- a/internal/cmd/workspace/workspace.go +++ b/internal/cmd/workspace/workspace.go @@ -10,6 +10,7 @@ import ( "github.com/Life-USTC/CLI/internal/cmd/calendar" "github.com/Life-USTC/CLI/internal/cmd/cmdutil" "github.com/Life-USTC/CLI/internal/cmd/homework" + "github.com/Life-USTC/CLI/internal/cmd/link" "github.com/Life-USTC/CLI/internal/cmd/schedule" schoolcmd "github.com/Life-USTC/CLI/internal/cmd/school" "github.com/Life-USTC/CLI/internal/cmd/todo" @@ -33,6 +34,7 @@ func NewCmdWorkspace() *cobra.Command { homework.NewCmdMyHomework(), calendar.NewCmdSubscription(), bus.NewCmdBusPreferences(), + link.NewCmdWorkspaceLinkPin(), upload.NewCmdUpload(), schoolcmd.NewCmdSchool(), ) @@ -139,5 +141,7 @@ func getOverview(cmd *cobra.Command) (any, error) { if err != nil { return nil, err } - return api.ParseResponseRaw(c.GetApiMeOverview(api.Ctx(), &openapi.GetApiMeOverviewParams{})) + return api.ParseResponseRaw( + c.WorkspaceOverviewGet(api.Ctx(), &openapi.WorkspaceOverviewGetParams{}), + ) } diff --git a/internal/openapi/client.gen.go b/internal/openapi/client.gen.go index e3a70ac..d05510d 100644 --- a/internal/openapi/client.gen.go +++ b/internal/openapi/client.gen.go @@ -335,6 +335,123 @@ func (e CalendarSubscriptionBatchResponseSchemaAction) Valid() bool { } } +// Defines values for CatalogLinkListResponseSchemaLinksCategory. +const ( + Academic CatalogLinkListResponseSchemaLinksCategory = "academic" + Campus CatalogLinkListResponseSchemaLinksCategory = "campus" + Community CatalogLinkListResponseSchemaLinksCategory = "community" + Services CatalogLinkListResponseSchemaLinksCategory = "services" +) + +// Valid indicates whether the value is a known member of the CatalogLinkListResponseSchemaLinksCategory enum. +func (e CatalogLinkListResponseSchemaLinksCategory) Valid() bool { + switch e { + case Academic: + return true + case Campus: + return true + case Community: + return true + case Services: + return true + default: + return false + } +} + +// Defines values for CatalogLinkListResponseSchemaLinksGroup. +const ( + Classroom CatalogLinkListResponseSchemaLinksGroup = "classroom" + External CatalogLinkListResponseSchemaLinksGroup = "external" + Graduate CatalogLinkListResponseSchemaLinksGroup = "graduate" + LeastClicked CatalogLinkListResponseSchemaLinksGroup = "leastClicked" + Life CatalogLinkListResponseSchemaLinksGroup = "life" + MostClicked CatalogLinkListResponseSchemaLinksGroup = "mostClicked" + Study CatalogLinkListResponseSchemaLinksGroup = "study" + Tech CatalogLinkListResponseSchemaLinksGroup = "tech" +) + +// Valid indicates whether the value is a known member of the CatalogLinkListResponseSchemaLinksGroup enum. +func (e CatalogLinkListResponseSchemaLinksGroup) Valid() bool { + switch e { + case Classroom: + return true + case External: + return true + case Graduate: + return true + case LeastClicked: + return true + case Life: + return true + case MostClicked: + return true + case Study: + return true + case Tech: + return true + default: + return false + } +} + +// Defines values for CatalogLinkListResponseSchemaLinksIcon. +const ( + BookOpen CatalogLinkListResponseSchemaLinksIcon = "book-open" + Building CatalogLinkListResponseSchemaLinksIcon = "building" + ClipboardList CatalogLinkListResponseSchemaLinksIcon = "clipboard-list" + GraduationCap CatalogLinkListResponseSchemaLinksIcon = "graduation-cap" + Mail CatalogLinkListResponseSchemaLinksIcon = "mail" + MonitorPlay CatalogLinkListResponseSchemaLinksIcon = "monitor-play" + Network CatalogLinkListResponseSchemaLinksIcon = "network" + School CatalogLinkListResponseSchemaLinksIcon = "school" + Users CatalogLinkListResponseSchemaLinksIcon = "users" +) + +// Valid indicates whether the value is a known member of the CatalogLinkListResponseSchemaLinksIcon enum. +func (e CatalogLinkListResponseSchemaLinksIcon) Valid() bool { + switch e { + case BookOpen: + return true + case Building: + return true + case ClipboardList: + return true + case GraduationCap: + return true + case Mail: + return true + case MonitorPlay: + return true + case Network: + return true + case School: + return true + case Users: + return true + default: + return false + } +} + +// Defines values for CatalogLinkListResponseSchemaLinksLocale. +const ( + CatalogLinkListResponseSchemaLinksLocaleEnUs CatalogLinkListResponseSchemaLinksLocale = "en-us" + CatalogLinkListResponseSchemaLinksLocaleZhCn CatalogLinkListResponseSchemaLinksLocale = "zh-cn" +) + +// Valid indicates whether the value is a known member of the CatalogLinkListResponseSchemaLinksLocale enum. +func (e CatalogLinkListResponseSchemaLinksLocale) Valid() bool { + switch e { + case CatalogLinkListResponseSchemaLinksLocaleEnUs: + return true + case CatalogLinkListResponseSchemaLinksLocaleZhCn: + return true + default: + return false + } +} + // Defines values for CommentBatchDeleteResponseSchemaResults0Success. const ( CommentBatchDeleteResponseSchemaResults0SuccessTrue CommentBatchDeleteResponseSchemaResults0Success = true @@ -1241,15 +1358,15 @@ func (e ListAdminHomeworksParamsStatus) Valid() bool { } } -// Defines values for GetApiCatalogBusNextParamsDayType. +// Defines values for CatalogBusDepartureNextParamsDayType. const ( - Auto GetApiCatalogBusNextParamsDayType = "auto" - Weekday GetApiCatalogBusNextParamsDayType = "weekday" - Weekend GetApiCatalogBusNextParamsDayType = "weekend" + Auto CatalogBusDepartureNextParamsDayType = "auto" + Weekday CatalogBusDepartureNextParamsDayType = "weekday" + Weekend CatalogBusDepartureNextParamsDayType = "weekend" ) -// Valid indicates whether the value is a known member of the GetApiCatalogBusNextParamsDayType enum. -func (e GetApiCatalogBusNextParamsDayType) Valid() bool { +// Valid indicates whether the value is a known member of the CatalogBusDepartureNextParamsDayType enum. +func (e CatalogBusDepartureNextParamsDayType) Valid() bool { switch e { case Auto: return true @@ -1262,54 +1379,54 @@ func (e GetApiCatalogBusNextParamsDayType) Valid() bool { } } -// Defines values for GetApiCatalogBusNextParamsIncludeDeparted. +// Defines values for CatalogBusDepartureNextParamsIncludeDeparted. const ( - GetApiCatalogBusNextParamsIncludeDepartedFalse GetApiCatalogBusNextParamsIncludeDeparted = "false" - GetApiCatalogBusNextParamsIncludeDepartedTrue GetApiCatalogBusNextParamsIncludeDeparted = "true" + CatalogBusDepartureNextParamsIncludeDepartedFalse CatalogBusDepartureNextParamsIncludeDeparted = "false" + CatalogBusDepartureNextParamsIncludeDepartedTrue CatalogBusDepartureNextParamsIncludeDeparted = "true" ) -// Valid indicates whether the value is a known member of the GetApiCatalogBusNextParamsIncludeDeparted enum. -func (e GetApiCatalogBusNextParamsIncludeDeparted) Valid() bool { +// Valid indicates whether the value is a known member of the CatalogBusDepartureNextParamsIncludeDeparted enum. +func (e CatalogBusDepartureNextParamsIncludeDeparted) Valid() bool { switch e { - case GetApiCatalogBusNextParamsIncludeDepartedFalse: + case CatalogBusDepartureNextParamsIncludeDepartedFalse: return true - case GetApiCatalogBusNextParamsIncludeDepartedTrue: + case CatalogBusDepartureNextParamsIncludeDepartedTrue: return true default: return false } } -// Defines values for GetApiCatalogBusNextParamsLocale. +// Defines values for CatalogBusDepartureNextParamsLocale. const ( - GetApiCatalogBusNextParamsLocaleEnUs GetApiCatalogBusNextParamsLocale = "en-us" - GetApiCatalogBusNextParamsLocaleZhCn GetApiCatalogBusNextParamsLocale = "zh-cn" + CatalogBusDepartureNextParamsLocaleEnUs CatalogBusDepartureNextParamsLocale = "en-us" + CatalogBusDepartureNextParamsLocaleZhCn CatalogBusDepartureNextParamsLocale = "zh-cn" ) -// Valid indicates whether the value is a known member of the GetApiCatalogBusNextParamsLocale enum. -func (e GetApiCatalogBusNextParamsLocale) Valid() bool { +// Valid indicates whether the value is a known member of the CatalogBusDepartureNextParamsLocale enum. +func (e CatalogBusDepartureNextParamsLocale) Valid() bool { switch e { - case GetApiCatalogBusNextParamsLocaleEnUs: + case CatalogBusDepartureNextParamsLocaleEnUs: return true - case GetApiCatalogBusNextParamsLocaleZhCn: + case CatalogBusDepartureNextParamsLocaleZhCn: return true default: return false } } -// Defines values for GetApiBusRoutesParamsLocale. +// Defines values for CatalogBusRouteSearchParamsLocale. const ( - GetApiBusRoutesParamsLocaleEnUs GetApiBusRoutesParamsLocale = "en-us" - GetApiBusRoutesParamsLocaleZhCn GetApiBusRoutesParamsLocale = "zh-cn" + CatalogBusRouteSearchParamsLocaleEnUs CatalogBusRouteSearchParamsLocale = "en-us" + CatalogBusRouteSearchParamsLocaleZhCn CatalogBusRouteSearchParamsLocale = "zh-cn" ) -// Valid indicates whether the value is a known member of the GetApiBusRoutesParamsLocale enum. -func (e GetApiBusRoutesParamsLocale) Valid() bool { +// Valid indicates whether the value is a known member of the CatalogBusRouteSearchParamsLocale enum. +func (e CatalogBusRouteSearchParamsLocale) Valid() bool { switch e { - case GetApiBusRoutesParamsLocaleEnUs: + case CatalogBusRouteSearchParamsLocaleEnUs: return true - case GetApiBusRoutesParamsLocaleZhCn: + case CatalogBusRouteSearchParamsLocaleZhCn: return true default: return false @@ -1565,54 +1682,54 @@ func (e GetDescriptionParamsTargetType) Valid() bool { } } -// Defines values for ListHomeworksParamsIncludeDeleted. +// Defines values for CommunitySectionHomeworkListParamsIncludeDeleted. const ( - ListHomeworksParamsIncludeDeletedFalse ListHomeworksParamsIncludeDeleted = "false" - ListHomeworksParamsIncludeDeletedTrue ListHomeworksParamsIncludeDeleted = "true" + CommunitySectionHomeworkListParamsIncludeDeletedFalse CommunitySectionHomeworkListParamsIncludeDeleted = "false" + CommunitySectionHomeworkListParamsIncludeDeletedTrue CommunitySectionHomeworkListParamsIncludeDeleted = "true" ) -// 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 CommunitySectionHomeworkListParamsIncludeDeleted enum. +func (e CommunitySectionHomeworkListParamsIncludeDeleted) Valid() bool { switch e { - case ListHomeworksParamsIncludeDeletedFalse: + case CommunitySectionHomeworkListParamsIncludeDeletedFalse: return true - case ListHomeworksParamsIncludeDeletedTrue: + case CommunitySectionHomeworkListParamsIncludeDeletedTrue: return true default: return false } } -// Defines values for GetApiMeOverviewParamsLocale. +// Defines values for WorkspaceOverviewGetParamsLocale. const ( - GetApiMeOverviewParamsLocaleEnUs GetApiMeOverviewParamsLocale = "en-us" - GetApiMeOverviewParamsLocaleZhCn GetApiMeOverviewParamsLocale = "zh-cn" + WorkspaceOverviewGetParamsLocaleEnUs WorkspaceOverviewGetParamsLocale = "en-us" + WorkspaceOverviewGetParamsLocaleZhCn WorkspaceOverviewGetParamsLocale = "zh-cn" ) -// Valid indicates whether the value is a known member of the GetApiMeOverviewParamsLocale enum. -func (e GetApiMeOverviewParamsLocale) Valid() bool { +// Valid indicates whether the value is a known member of the WorkspaceOverviewGetParamsLocale enum. +func (e WorkspaceOverviewGetParamsLocale) Valid() bool { switch e { - case GetApiMeOverviewParamsLocaleEnUs: + case WorkspaceOverviewGetParamsLocaleEnUs: return true - case GetApiMeOverviewParamsLocaleZhCn: + case WorkspaceOverviewGetParamsLocaleZhCn: return true default: return false } } -// Defines values for GetApiMeSubscriptionsSchedulesParamsLocale. +// Defines values for WorkspaceScheduleListParamsLocale. const ( - EnUs GetApiMeSubscriptionsSchedulesParamsLocale = "en-us" - ZhCn GetApiMeSubscriptionsSchedulesParamsLocale = "zh-cn" + WorkspaceScheduleListParamsLocaleEnUs WorkspaceScheduleListParamsLocale = "en-us" + WorkspaceScheduleListParamsLocaleZhCn WorkspaceScheduleListParamsLocale = "zh-cn" ) -// Valid indicates whether the value is a known member of the GetApiMeSubscriptionsSchedulesParamsLocale enum. -func (e GetApiMeSubscriptionsSchedulesParamsLocale) Valid() bool { +// Valid indicates whether the value is a known member of the WorkspaceScheduleListParamsLocale enum. +func (e WorkspaceScheduleListParamsLocale) Valid() bool { switch e { - case EnUs: + case WorkspaceScheduleListParamsLocaleEnUs: return true - case ZhCn: + case WorkspaceScheduleListParamsLocaleZhCn: return true default: return false @@ -3798,6 +3915,34 @@ type CalendarSubscriptionRemoveResponseSchema struct { } `json:"subscription"` } +// CatalogLinkListResponseSchema defines model for catalogLinkListResponseSchema. +type CatalogLinkListResponseSchema struct { + Links []struct { + Category CatalogLinkListResponseSchemaLinksCategory `json:"category"` + Description string `json:"description"` + DescriptionPinyin string `json:"descriptionPinyin"` + Group CatalogLinkListResponseSchemaLinksGroup `json:"group"` + Icon CatalogLinkListResponseSchemaLinksIcon `json:"icon"` + Locale CatalogLinkListResponseSchemaLinksLocale `json:"locale"` + Slug string `json:"slug"` + Title string `json:"title"` + TitlePinyin string `json:"titlePinyin"` + Url string `json:"url"` + } `json:"links"` +} + +// CatalogLinkListResponseSchemaLinksCategory defines model for CatalogLinkListResponseSchema.Links.Category. +type CatalogLinkListResponseSchemaLinksCategory string + +// CatalogLinkListResponseSchemaLinksGroup defines model for CatalogLinkListResponseSchema.Links.Group. +type CatalogLinkListResponseSchemaLinksGroup string + +// CatalogLinkListResponseSchemaLinksIcon defines model for CatalogLinkListResponseSchema.Links.Icon. +type CatalogLinkListResponseSchemaLinksIcon string + +// CatalogLinkListResponseSchemaLinksLocale defines model for CatalogLinkListResponseSchema.Links.Locale. +type CatalogLinkListResponseSchemaLinksLocale string + // CommentBatchDeleteRequestSchema defines model for commentBatchDeleteRequestSchema. type CommentBatchDeleteRequestSchema struct { Ids []string `json:"ids"` @@ -7100,12 +7245,6 @@ type UploadsListResponseSchema struct { } `json:"pagination"` } -// GetApiAccountProfileParams defines parameters for GetApiAccountProfile. -type GetApiAccountProfileParams struct { - Username *string `form:"username,omitempty" json:"username,omitempty"` - UserId *string `form:"userId,omitempty" json:"userId,omitempty"` -} - // ListAdminCommentsParams defines parameters for ListAdminComments. type ListAdminCommentsParams struct { Status *ListAdminCommentsParamsStatus `form:"status,omitempty" json:"status,omitempty"` @@ -7169,42 +7308,42 @@ type ListAdminUsersParams struct { Limit *int64 `form:"limit,omitempty" json:"limit,omitempty"` } -// QueryBusParams defines parameters for QueryBus. -type QueryBusParams struct { +// CatalogBusTimetableGetParams defines parameters for CatalogBusTimetableGet. +type CatalogBusTimetableGetParams struct { VersionKey *string `form:"versionKey,omitempty" json:"versionKey,omitempty"` } -// GetApiCatalogBusNextParams defines parameters for GetApiCatalogBusNext. -type GetApiCatalogBusNextParams struct { - OriginCampusId int64 `form:"originCampusId" json:"originCampusId"` - DestinationCampusId int64 `form:"destinationCampusId" json:"destinationCampusId"` - AtTime *string `form:"atTime,omitempty" json:"atTime,omitempty"` - DayType *GetApiCatalogBusNextParamsDayType `form:"dayType,omitempty" json:"dayType,omitempty"` - IncludeDeparted *GetApiCatalogBusNextParamsIncludeDeparted `form:"includeDeparted,omitempty" json:"includeDeparted,omitempty"` - Limit *int64 `form:"limit,omitempty" json:"limit,omitempty"` - VersionKey *string `form:"versionKey,omitempty" json:"versionKey,omitempty"` - Locale *GetApiCatalogBusNextParamsLocale `form:"locale,omitempty" json:"locale,omitempty"` +// CatalogBusDepartureNextParams defines parameters for CatalogBusDepartureNext. +type CatalogBusDepartureNextParams struct { + OriginCampusId int64 `form:"originCampusId" json:"originCampusId"` + DestinationCampusId int64 `form:"destinationCampusId" json:"destinationCampusId"` + AtTime *string `form:"atTime,omitempty" json:"atTime,omitempty"` + DayType *CatalogBusDepartureNextParamsDayType `form:"dayType,omitempty" json:"dayType,omitempty"` + IncludeDeparted *CatalogBusDepartureNextParamsIncludeDeparted `form:"includeDeparted,omitempty" json:"includeDeparted,omitempty"` + Limit *int64 `form:"limit,omitempty" json:"limit,omitempty"` + VersionKey *string `form:"versionKey,omitempty" json:"versionKey,omitempty"` + Locale *CatalogBusDepartureNextParamsLocale `form:"locale,omitempty" json:"locale,omitempty"` } -// GetApiCatalogBusNextParamsDayType defines parameters for GetApiCatalogBusNext. -type GetApiCatalogBusNextParamsDayType string +// CatalogBusDepartureNextParamsDayType defines parameters for CatalogBusDepartureNext. +type CatalogBusDepartureNextParamsDayType string -// GetApiCatalogBusNextParamsIncludeDeparted defines parameters for GetApiCatalogBusNext. -type GetApiCatalogBusNextParamsIncludeDeparted string +// CatalogBusDepartureNextParamsIncludeDeparted defines parameters for CatalogBusDepartureNext. +type CatalogBusDepartureNextParamsIncludeDeparted string -// GetApiCatalogBusNextParamsLocale defines parameters for GetApiCatalogBusNext. -type GetApiCatalogBusNextParamsLocale string +// CatalogBusDepartureNextParamsLocale defines parameters for CatalogBusDepartureNext. +type CatalogBusDepartureNextParamsLocale 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"` +// CatalogBusRouteSearchParams defines parameters for CatalogBusRouteSearch. +type CatalogBusRouteSearchParams 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 *CatalogBusRouteSearchParamsLocale `form:"locale,omitempty" json:"locale,omitempty"` } -// GetApiBusRoutesParamsLocale defines parameters for GetApiBusRoutes. -type GetApiBusRoutesParamsLocale string +// CatalogBusRouteSearchParamsLocale defines parameters for CatalogBusRouteSearch. +type CatalogBusRouteSearchParamsLocale string // ListCoursesParams defines parameters for ListCourses. type ListCoursesParams struct { @@ -7233,6 +7372,11 @@ type GetCourseParams struct { // GetCourseParamsLocale defines parameters for GetCourse. type GetCourseParamsLocale string +// CatalogLinkResolveParams defines parameters for CatalogLinkResolve. +type CatalogLinkResolveParams struct { + Slug string `form:"slug" json:"slug"` +} + // ListSchedulesParams defines parameters for ListSchedules. type ListSchedulesParams struct { Locale *ListSchedulesParamsLocale `form:"locale,omitempty" json:"locale,omitempty"` @@ -7395,50 +7539,39 @@ type GetDescriptionParams struct { // 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 - -// 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"` +// CommunitySectionHomeworkListParams defines parameters for CommunitySectionHomeworkList. +type CommunitySectionHomeworkListParams 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 *CommunitySectionHomeworkListParamsIncludeDeleted `form:"includeDeleted,omitempty" json:"includeDeleted,omitempty"` } -// VisitDashboardLinkParams defines parameters for VisitDashboardLink. -type VisitDashboardLinkParams struct { - Slug string `form:"slug" json:"slug"` -} +// CommunitySectionHomeworkListParamsIncludeDeleted defines parameters for CommunitySectionHomeworkList. +type CommunitySectionHomeworkListParamsIncludeDeleted 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"` +// WorkspaceOverviewGetParams defines parameters for WorkspaceOverviewGet. +type WorkspaceOverviewGetParams 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 *WorkspaceOverviewGetParamsLocale `form:"locale,omitempty" json:"locale,omitempty"` } -// GetApiMeOverviewParamsLocale defines parameters for GetApiMeOverview. -type GetApiMeOverviewParamsLocale string +// WorkspaceOverviewGetParamsLocale defines parameters for WorkspaceOverviewGet. +type WorkspaceOverviewGetParamsLocale 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"` +// WorkspaceScheduleListParams defines parameters for WorkspaceScheduleList. +type WorkspaceScheduleListParams 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 *WorkspaceScheduleListParamsLocale `form:"locale,omitempty" json:"locale,omitempty"` } -// GetApiMeSubscriptionsSchedulesParamsLocale defines parameters for GetApiMeSubscriptionsSchedules. -type GetApiMeSubscriptionsSchedulesParamsLocale string +// WorkspaceScheduleListParamsLocale defines parameters for WorkspaceScheduleList. +type WorkspaceScheduleListParamsLocale string // ListTodosParams defines parameters for ListTodos. type ListTodosParams struct { @@ -7486,6 +7619,9 @@ type CreateAdminSuspensionJSONRequestBody = AdminCreateSuspensionRequestSchema // UpdateAdminUserJSONRequestBody defines body for UpdateAdminUser for application/json ContentType. type UpdateAdminUserJSONRequestBody = AdminUpdateUserRequestSchema +// CatalogLinkVisitRecordFormdataRequestBody defines body for CatalogLinkVisitRecord for application/x-www-form-urlencoded ContentType. +type CatalogLinkVisitRecordFormdataRequestBody = DashboardLinkVisitRequestSchema + // MatchSectionCodesJSONRequestBody defines body for MatchSectionCodes for application/json ContentType. type MatchSectionCodesJSONRequestBody = MatchSectionCodesRequestSchema @@ -7504,14 +7640,14 @@ type AddCommentReactionJSONRequestBody = CommentReactionRequestSchema // UpsertDescriptionJSONRequestBody defines body for UpsertDescription for application/json ContentType. type UpsertDescriptionJSONRequestBody = DescriptionUpsertRequestSchema -// CreateHomeworkJSONRequestBody defines body for CreateHomework for application/json ContentType. -type CreateHomeworkJSONRequestBody = HomeworkCreateRequestSchema +// CommunitySectionHomeworkCreateJSONRequestBody defines body for CommunitySectionHomeworkCreate for application/json ContentType. +type CommunitySectionHomeworkCreateJSONRequestBody = HomeworkCreateRequestSchema -// UpdateHomeworkJSONRequestBody defines body for UpdateHomework for application/json ContentType. -type UpdateHomeworkJSONRequestBody = HomeworkUpdateRequestSchema +// CommunitySectionHomeworkUpdateJSONRequestBody defines body for CommunitySectionHomeworkUpdate for application/json ContentType. +type CommunitySectionHomeworkUpdateJSONRequestBody = HomeworkUpdateRequestSchema -// SetBusPreferencesJSONRequestBody defines body for SetBusPreferences for application/json ContentType. -type SetBusPreferencesJSONRequestBody = BusPreferenceRequestSchema +// WorkspaceBusPreferencesSetJSONRequestBody defines body for WorkspaceBusPreferencesSet for application/json ContentType. +type WorkspaceBusPreferencesSetJSONRequestBody = BusPreferenceRequestSchema // PutApiHomeworksCompletionsJSONRequestBody defines body for PutApiHomeworksCompletions for application/json ContentType. type PutApiHomeworksCompletionsJSONRequestBody = HomeworkCompletionBatchRequestSchema @@ -7519,14 +7655,11 @@ type PutApiHomeworksCompletionsJSONRequestBody = HomeworkCompletionBatchRequestS // SetHomeworkCompletionJSONRequestBody defines body for SetHomeworkCompletion for application/json ContentType. type SetHomeworkCompletionJSONRequestBody = HomeworkCompletionRequestSchema -// PinDashboardLinkFormdataRequestBody defines body for PinDashboardLink for application/x-www-form-urlencoded ContentType. -type PinDashboardLinkFormdataRequestBody = DashboardLinkPinRequestSchema +// WorkspaceLinkPinSetFormdataRequestBody defines body for WorkspaceLinkPinSet for application/x-www-form-urlencoded ContentType. +type WorkspaceLinkPinSetFormdataRequestBody = DashboardLinkPinRequestSchema -// PostApiWorkspaceLinksPinBatchJSONRequestBody defines body for PostApiWorkspaceLinksPinBatch for application/json ContentType. -type PostApiWorkspaceLinksPinBatchJSONRequestBody = DashboardLinkPinBatchRequestSchema - -// RecordDashboardLinkVisitFormdataRequestBody defines body for RecordDashboardLinkVisit for application/x-www-form-urlencoded ContentType. -type RecordDashboardLinkVisitFormdataRequestBody = DashboardLinkVisitRequestSchema +// WorkspaceLinkPinBatchSetJSONRequestBody defines body for WorkspaceLinkPinBatchSet for application/json ContentType. +type WorkspaceLinkPinBatchSetJSONRequestBody = DashboardLinkPinBatchRequestSchema // DeleteApiWorkspaceSubscriptionsJSONRequestBody defines body for DeleteApiWorkspaceSubscriptions for application/json ContentType. type DeleteApiWorkspaceSubscriptionsJSONRequestBody = CalendarSubscriptionRemoveRequestSchema @@ -10400,16 +10533,13 @@ func WithRequestEditorFn(fn RequestEditorFn) ClientOption { // The interface specification for the client above. type ClientInterface interface { - // GetMe request - GetMe(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) - // SetLocaleWithBody request with any body SetLocaleWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) SetLocale(ctx context.Context, body SetLocaleJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // GetApiAccountProfile request - GetApiAccountProfile(ctx context.Context, params *GetApiAccountProfileParams, reqEditors ...RequestEditorFn) (*http.Response, error) + // AccountProfileGet request + AccountProfileGet(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) // ListAdminComments request ListAdminComments(ctx context.Context, params *ListAdminCommentsParams, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -10452,14 +10582,17 @@ type ClientInterface interface { UpdateAdminUser(ctx context.Context, id string, body UpdateAdminUserJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // QueryBus request - QueryBus(ctx context.Context, params *QueryBusParams, reqEditors ...RequestEditorFn) (*http.Response, error) + // WorkspaceCalendarFeedExport request + WorkspaceCalendarFeedExport(ctx context.Context, credential string, reqEditors ...RequestEditorFn) (*http.Response, error) - // GetApiCatalogBusNext request - GetApiCatalogBusNext(ctx context.Context, params *GetApiCatalogBusNextParams, reqEditors ...RequestEditorFn) (*http.Response, error) + // CatalogBusTimetableGet request + CatalogBusTimetableGet(ctx context.Context, params *CatalogBusTimetableGetParams, reqEditors ...RequestEditorFn) (*http.Response, error) - // GetApiBusRoutes request - GetApiBusRoutes(ctx context.Context, params *GetApiBusRoutesParams, reqEditors ...RequestEditorFn) (*http.Response, error) + // CatalogBusDepartureNext request + CatalogBusDepartureNext(ctx context.Context, params *CatalogBusDepartureNextParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // CatalogBusRouteSearch request + CatalogBusRouteSearch(ctx context.Context, params *CatalogBusRouteSearchParams, reqEditors ...RequestEditorFn) (*http.Response, error) // ListCourses request ListCourses(ctx context.Context, params *ListCoursesParams, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -10467,6 +10600,17 @@ type ClientInterface interface { // GetCourse request GetCourse(ctx context.Context, jwId int64, params *GetCourseParams, reqEditors ...RequestEditorFn) (*http.Response, error) + // CatalogLinkList request + CatalogLinkList(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + + // CatalogLinkResolve request + CatalogLinkResolve(ctx context.Context, params *CatalogLinkResolveParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // CatalogLinkVisitRecordWithBody request with any body + CatalogLinkVisitRecordWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + CatalogLinkVisitRecordWithFormdataBody(ctx context.Context, body CatalogLinkVisitRecordFormdataRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // GetMetadata request GetMetadata(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -10548,35 +10692,35 @@ type ClientInterface interface { UpsertDescription(ctx context.Context, body UpsertDescriptionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // ListHomeworks request - ListHomeworks(ctx context.Context, params *ListHomeworksParams, reqEditors ...RequestEditorFn) (*http.Response, error) + // CommunitySectionHomeworkList request + CommunitySectionHomeworkList(ctx context.Context, params *CommunitySectionHomeworkListParams, reqEditors ...RequestEditorFn) (*http.Response, error) - // CreateHomeworkWithBody request with any body - CreateHomeworkWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + // CommunitySectionHomeworkCreateWithBody request with any body + CommunitySectionHomeworkCreateWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - CreateHomework(ctx context.Context, body CreateHomeworkJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + CommunitySectionHomeworkCreate(ctx context.Context, body CommunitySectionHomeworkCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // DeleteHomework request - DeleteHomework(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) + // CommunitySectionHomeworkDelete request + CommunitySectionHomeworkDelete(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) + // CommunitySectionHomeworkUpdateWithBody request with any body + CommunitySectionHomeworkUpdateWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - UpdateHomework(ctx context.Context, id string, body UpdateHomeworkJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + CommunitySectionHomeworkUpdate(ctx context.Context, id string, body CommunitySectionHomeworkUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // GetUserCalendar request - GetUserCalendar(ctx context.Context, userId string, params *GetUserCalendarParams, reqEditors ...RequestEditorFn) (*http.Response, error) + // CommunityUserGet request + CommunityUserGet(ctx context.Context, identifier string, reqEditors ...RequestEditorFn) (*http.Response, error) // GetOpenApiSpec request GetOpenApiSpec(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) - // GetBusPreferences request - GetBusPreferences(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + // WorkspaceBusPreferencesGet request + WorkspaceBusPreferencesGet(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) - // SetBusPreferencesWithBody request with any body - SetBusPreferencesWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + // WorkspaceBusPreferencesSetWithBody request with any body + WorkspaceBusPreferencesSetWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - SetBusPreferences(ctx context.Context, body SetBusPreferencesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + WorkspaceBusPreferencesSet(ctx context.Context, body WorkspaceBusPreferencesSetJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // GetSubscribedHomeworks request GetSubscribedHomeworks(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -10591,29 +10735,24 @@ type ClientInterface interface { SetHomeworkCompletion(ctx context.Context, id string, body SetHomeworkCompletionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // PinDashboardLinkWithBody request with any body - PinDashboardLinkWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PinDashboardLinkWithFormdataBody(ctx context.Context, body PinDashboardLinkFormdataRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // WorkspaceLinkPinList request + WorkspaceLinkPinList(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) - // PostApiWorkspaceLinksPinBatchWithBody request with any body - PostApiWorkspaceLinksPinBatchWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + // WorkspaceLinkPinSetWithBody request with any body + WorkspaceLinkPinSetWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - PostApiWorkspaceLinksPinBatch(ctx context.Context, body PostApiWorkspaceLinksPinBatchJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + WorkspaceLinkPinSetWithFormdataBody(ctx context.Context, body WorkspaceLinkPinSetFormdataRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // VisitDashboardLink request - VisitDashboardLink(ctx context.Context, params *VisitDashboardLinkParams, reqEditors ...RequestEditorFn) (*http.Response, error) + // WorkspaceLinkPinBatchSetWithBody request with any body + WorkspaceLinkPinBatchSetWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - // RecordDashboardLinkVisitWithBody request with any body - RecordDashboardLinkVisitWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + WorkspaceLinkPinBatchSet(ctx context.Context, body WorkspaceLinkPinBatchSetJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - RecordDashboardLinkVisitWithFormdataBody(ctx context.Context, body RecordDashboardLinkVisitFormdataRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // WorkspaceOverviewGet request + WorkspaceOverviewGet(ctx context.Context, params *WorkspaceOverviewGetParams, reqEditors ...RequestEditorFn) (*http.Response, error) - // GetApiMeOverview request - GetApiMeOverview(ctx context.Context, params *GetApiMeOverviewParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetApiMeSubscriptionsSchedules request - GetApiMeSubscriptionsSchedules(ctx context.Context, params *GetApiMeSubscriptionsSchedulesParams, reqEditors ...RequestEditorFn) (*http.Response, error) + // WorkspaceScheduleList request + WorkspaceScheduleList(ctx context.Context, params *WorkspaceScheduleListParams, reqEditors ...RequestEditorFn) (*http.Response, error) // DeleteApiWorkspaceSubscriptionsWithBody request with any body DeleteApiWorkspaceSubscriptionsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -10702,18 +10841,6 @@ type ClientInterface interface { DownloadUpload(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) } -func (c *Client) GetMe(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetMeRequest(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) -} - 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 { @@ -10738,8 +10865,8 @@ func (c *Client) SetLocale(ctx context.Context, body SetLocaleJSONRequestBody, r return c.Client.Do(req) } -func (c *Client) GetApiAccountProfile(ctx context.Context, params *GetApiAccountProfileParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetApiAccountProfileRequest(c.Server, params) +func (c *Client) AccountProfileGet(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewAccountProfileGetRequest(c.Server) if err != nil { return nil, err } @@ -10930,8 +11057,20 @@ 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) WorkspaceCalendarFeedExport(ctx context.Context, credential string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewWorkspaceCalendarFeedExportRequest(c.Server, credential) + 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) CatalogBusTimetableGet(ctx context.Context, params *CatalogBusTimetableGetParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCatalogBusTimetableGetRequest(c.Server, params) if err != nil { return nil, err } @@ -10942,8 +11081,8 @@ func (c *Client) QueryBus(ctx context.Context, params *QueryBusParams, reqEditor return c.Client.Do(req) } -func (c *Client) GetApiCatalogBusNext(ctx context.Context, params *GetApiCatalogBusNextParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetApiCatalogBusNextRequest(c.Server, params) +func (c *Client) CatalogBusDepartureNext(ctx context.Context, params *CatalogBusDepartureNextParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCatalogBusDepartureNextRequest(c.Server, params) if err != nil { return nil, err } @@ -10954,8 +11093,8 @@ func (c *Client) GetApiCatalogBusNext(ctx context.Context, params *GetApiCatalog 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) CatalogBusRouteSearch(ctx context.Context, params *CatalogBusRouteSearchParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCatalogBusRouteSearchRequest(c.Server, params) if err != nil { return nil, err } @@ -10990,6 +11129,54 @@ func (c *Client) GetCourse(ctx context.Context, jwId int64, params *GetCoursePar return c.Client.Do(req) } +func (c *Client) CatalogLinkList(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCatalogLinkListRequest(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) +} + +func (c *Client) CatalogLinkResolve(ctx context.Context, params *CatalogLinkResolveParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCatalogLinkResolveRequest(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) CatalogLinkVisitRecordWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCatalogLinkVisitRecordRequestWithBody(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) CatalogLinkVisitRecordWithFormdataBody(ctx context.Context, body CatalogLinkVisitRecordFormdataRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCatalogLinkVisitRecordRequestWithFormdataBody(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) GetMetadata(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewGetMetadataRequest(c.Server) if err != nil { @@ -11338,8 +11525,8 @@ func (c *Client) UpsertDescription(ctx context.Context, body UpsertDescriptionJS 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) CommunitySectionHomeworkList(ctx context.Context, params *CommunitySectionHomeworkListParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCommunitySectionHomeworkListRequest(c.Server, params) if err != nil { return nil, err } @@ -11350,8 +11537,8 @@ func (c *Client) ListHomeworks(ctx context.Context, params *ListHomeworksParams, return c.Client.Do(req) } -func (c *Client) CreateHomeworkWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateHomeworkRequestWithBody(c.Server, contentType, body) +func (c *Client) CommunitySectionHomeworkCreateWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCommunitySectionHomeworkCreateRequestWithBody(c.Server, contentType, body) if err != nil { return nil, err } @@ -11362,8 +11549,8 @@ func (c *Client) CreateHomeworkWithBody(ctx context.Context, contentType string, return c.Client.Do(req) } -func (c *Client) CreateHomework(ctx context.Context, body CreateHomeworkJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateHomeworkRequest(c.Server, body) +func (c *Client) CommunitySectionHomeworkCreate(ctx context.Context, body CommunitySectionHomeworkCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCommunitySectionHomeworkCreateRequest(c.Server, body) if err != nil { return nil, err } @@ -11374,8 +11561,8 @@ func (c *Client) CreateHomework(ctx context.Context, body CreateHomeworkJSONRequ return c.Client.Do(req) } -func (c *Client) DeleteHomework(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteHomeworkRequest(c.Server, id) +func (c *Client) CommunitySectionHomeworkDelete(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCommunitySectionHomeworkDeleteRequest(c.Server, id) if err != nil { return nil, err } @@ -11386,8 +11573,8 @@ func (c *Client) DeleteHomework(ctx context.Context, id string, reqEditors ...Re 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) CommunitySectionHomeworkUpdateWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCommunitySectionHomeworkUpdateRequestWithBody(c.Server, id, contentType, body) if err != nil { return nil, err } @@ -11398,8 +11585,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) CommunitySectionHomeworkUpdate(ctx context.Context, id string, body CommunitySectionHomeworkUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCommunitySectionHomeworkUpdateRequest(c.Server, id, body) if err != nil { return nil, err } @@ -11410,8 +11597,8 @@ func (c *Client) UpdateHomework(ctx context.Context, id string, body UpdateHomew return c.Client.Do(req) } -func (c *Client) GetUserCalendar(ctx context.Context, userId string, params *GetUserCalendarParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetUserCalendarRequest(c.Server, userId, params) +func (c *Client) CommunityUserGet(ctx context.Context, identifier string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCommunityUserGetRequest(c.Server, identifier) if err != nil { return nil, err } @@ -11434,8 +11621,8 @@ func (c *Client) GetOpenApiSpec(ctx context.Context, reqEditors ...RequestEditor 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) WorkspaceBusPreferencesGet(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewWorkspaceBusPreferencesGetRequest(c.Server) if err != nil { return nil, err } @@ -11446,8 +11633,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) WorkspaceBusPreferencesSetWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewWorkspaceBusPreferencesSetRequestWithBody(c.Server, contentType, body) if err != nil { return nil, err } @@ -11458,8 +11645,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) WorkspaceBusPreferencesSet(ctx context.Context, body WorkspaceBusPreferencesSetJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewWorkspaceBusPreferencesSetRequest(c.Server, body) if err != nil { return nil, err } @@ -11530,32 +11717,8 @@ func (c *Client) SetHomeworkCompletion(ctx context.Context, id string, body SetH 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) - 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) PinDashboardLinkWithFormdataBody(ctx context.Context, body PinDashboardLinkFormdataRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPinDashboardLinkRequestWithFormdataBody(c.Server, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostApiWorkspaceLinksPinBatchWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApiWorkspaceLinksPinBatchRequestWithBody(c.Server, contentType, body) +func (c *Client) WorkspaceLinkPinList(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewWorkspaceLinkPinListRequest(c.Server) if err != nil { return nil, err } @@ -11566,8 +11729,8 @@ func (c *Client) PostApiWorkspaceLinksPinBatchWithBody(ctx context.Context, cont return c.Client.Do(req) } -func (c *Client) PostApiWorkspaceLinksPinBatch(ctx context.Context, body PostApiWorkspaceLinksPinBatchJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApiWorkspaceLinksPinBatchRequest(c.Server, body) +func (c *Client) WorkspaceLinkPinSetWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewWorkspaceLinkPinSetRequestWithBody(c.Server, contentType, body) if err != nil { return nil, err } @@ -11578,8 +11741,8 @@ func (c *Client) PostApiWorkspaceLinksPinBatch(ctx context.Context, body PostApi 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) WorkspaceLinkPinSetWithFormdataBody(ctx context.Context, body WorkspaceLinkPinSetFormdataRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewWorkspaceLinkPinSetRequestWithFormdataBody(c.Server, body) if err != nil { return nil, err } @@ -11590,8 +11753,8 @@ func (c *Client) VisitDashboardLink(ctx context.Context, params *VisitDashboardL return c.Client.Do(req) } -func (c *Client) RecordDashboardLinkVisitWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewRecordDashboardLinkVisitRequestWithBody(c.Server, contentType, body) +func (c *Client) WorkspaceLinkPinBatchSetWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewWorkspaceLinkPinBatchSetRequestWithBody(c.Server, contentType, body) if err != nil { return nil, err } @@ -11602,8 +11765,8 @@ func (c *Client) RecordDashboardLinkVisitWithBody(ctx context.Context, contentTy return c.Client.Do(req) } -func (c *Client) RecordDashboardLinkVisitWithFormdataBody(ctx context.Context, body RecordDashboardLinkVisitFormdataRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewRecordDashboardLinkVisitRequestWithFormdataBody(c.Server, body) +func (c *Client) WorkspaceLinkPinBatchSet(ctx context.Context, body WorkspaceLinkPinBatchSetJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewWorkspaceLinkPinBatchSetRequest(c.Server, body) if err != nil { return nil, err } @@ -11614,8 +11777,8 @@ func (c *Client) RecordDashboardLinkVisitWithFormdataBody(ctx context.Context, b return c.Client.Do(req) } -func (c *Client) GetApiMeOverview(ctx context.Context, params *GetApiMeOverviewParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetApiMeOverviewRequest(c.Server, params) +func (c *Client) WorkspaceOverviewGet(ctx context.Context, params *WorkspaceOverviewGetParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewWorkspaceOverviewGetRequest(c.Server, params) if err != nil { return nil, err } @@ -11626,8 +11789,8 @@ func (c *Client) GetApiMeOverview(ctx context.Context, params *GetApiMeOverviewP return c.Client.Do(req) } -func (c *Client) GetApiMeSubscriptionsSchedules(ctx context.Context, params *GetApiMeSubscriptionsSchedulesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetApiMeSubscriptionsSchedulesRequest(c.Server, params) +func (c *Client) WorkspaceScheduleList(ctx context.Context, params *WorkspaceScheduleListParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewWorkspaceScheduleListRequest(c.Server, params) if err != nil { return nil, err } @@ -12034,33 +12197,6 @@ func (c *Client) DownloadUpload(ctx context.Context, id string, reqEditors ...Re return c.Client.Do(req) } -// NewGetMeRequest generates requests for GetMe -func NewGetMeRequest(server string) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/api/account") - 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 -} - // NewSetLocaleRequest calls the generic SetLocale builder with application/json body func NewSetLocaleRequest(server string, body SetLocaleJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader @@ -12101,8 +12237,8 @@ func NewSetLocaleRequestWithBody(server string, contentType string, body io.Read return req, nil } -// NewGetApiAccountProfileRequest generates requests for GetApiAccountProfile -func NewGetApiAccountProfileRequest(server string, params *GetApiAccountProfileParams) (*http.Request, error) { +// NewAccountProfileGetRequest generates requests for AccountProfileGet +func NewAccountProfileGetRequest(server string) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -12120,44 +12256,6 @@ func NewGetApiAccountProfileRequest(server string, params *GetApiAccountProfileP return nil, err } - if params != nil { - queryValues := queryURL.Query() - - if params.Username != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "username", *params.Username, 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.UserId != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "userId", *params.UserId, 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 @@ -12878,8 +12976,42 @@ 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) { +// NewWorkspaceCalendarFeedExportRequest generates requests for WorkspaceCalendarFeedExport +func NewWorkspaceCalendarFeedExportRequest(server string, credential string) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "credential", credential, 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/calendar-feeds/%s.ics", pathParam0) + 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 +} + +// NewCatalogBusTimetableGetRequest generates requests for CatalogBusTimetableGet +func NewCatalogBusTimetableGetRequest(server string, params *CatalogBusTimetableGetParams) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -12927,8 +13059,8 @@ func NewQueryBusRequest(server string, params *QueryBusParams) (*http.Request, e return req, nil } -// NewGetApiCatalogBusNextRequest generates requests for GetApiCatalogBusNext -func NewGetApiCatalogBusNextRequest(server string, params *GetApiCatalogBusNextParams) (*http.Request, error) { +// NewCatalogBusDepartureNextRequest generates requests for CatalogBusDepartureNext +func NewCatalogBusDepartureNextRequest(server string, params *CatalogBusDepartureNextParams) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -13080,8 +13212,8 @@ func NewGetApiCatalogBusNextRequest(server string, params *GetApiCatalogBusNextP return req, nil } -// NewGetApiBusRoutesRequest generates requests for GetApiBusRoutes -func NewGetApiBusRoutesRequest(server string, params *GetApiBusRoutesParams) (*http.Request, error) { +// NewCatalogBusRouteSearchRequest generates requests for CatalogBusRouteSearch +func NewCatalogBusRouteSearchRequest(server string, params *CatalogBusRouteSearchParams) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -13394,8 +13526,8 @@ func NewGetCourseRequest(server string, jwId int64, params *GetCourseParams) (*h return req, nil } -// NewGetMetadataRequest generates requests for GetMetadata -func NewGetMetadataRequest(server string) (*http.Request, error) { +// NewCatalogLinkListRequest generates requests for CatalogLinkList +func NewCatalogLinkListRequest(server string) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -13403,7 +13535,119 @@ func NewGetMetadataRequest(server string) (*http.Request, error) { return nil, err } - operationPath := fmt.Sprintf("/api/catalog/metadata") + operationPath := fmt.Sprintf("/api/catalog/links") + 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 +} + +// NewCatalogLinkResolveRequest generates requests for CatalogLinkResolve +func NewCatalogLinkResolveRequest(server string, params *CatalogLinkResolveParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/catalog/links/resolve") + 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, "slug", params.Slug, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewCatalogLinkVisitRecordRequestWithFormdataBody calls the generic CatalogLinkVisitRecord builder with application/x-www-form-urlencoded body +func NewCatalogLinkVisitRecordRequestWithFormdataBody(server string, body CatalogLinkVisitRecordFormdataRequestBody) (*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 NewCatalogLinkVisitRecordRequestWithBody(server, "application/x-www-form-urlencoded", bodyReader) +} + +// NewCatalogLinkVisitRecordRequestWithBody generates requests for CatalogLinkVisitRecord with any type of body +func NewCatalogLinkVisitRecordRequestWithBody(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/catalog/links/resolve") + 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 +} + +// NewGetMetadataRequest generates requests for GetMetadata +func NewGetMetadataRequest(server string) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/catalog/metadata") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -15243,8 +15487,8 @@ func NewUpsertDescriptionRequestWithBody(server string, contentType string, body return req, nil } -// NewListHomeworksRequest generates requests for ListHomeworks -func NewListHomeworksRequest(server string, params *ListHomeworksParams) (*http.Request, error) { +// NewCommunitySectionHomeworkListRequest generates requests for CommunitySectionHomeworkList +func NewCommunitySectionHomeworkListRequest(server string, params *CommunitySectionHomeworkListParams) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -15252,7 +15496,7 @@ func NewListHomeworksRequest(server string, params *ListHomeworksParams) (*http. return nil, err } - operationPath := fmt.Sprintf("/api/community/homeworks") + operationPath := fmt.Sprintf("/api/community/section-homeworks") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -15340,19 +15584,19 @@ func NewListHomeworksRequest(server string, params *ListHomeworksParams) (*http. return req, nil } -// NewCreateHomeworkRequest calls the generic CreateHomework builder with application/json body -func NewCreateHomeworkRequest(server string, body CreateHomeworkJSONRequestBody) (*http.Request, error) { +// NewCommunitySectionHomeworkCreateRequest calls the generic CommunitySectionHomeworkCreate builder with application/json body +func NewCommunitySectionHomeworkCreateRequest(server string, body CommunitySectionHomeworkCreateJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewCreateHomeworkRequestWithBody(server, "application/json", bodyReader) + return NewCommunitySectionHomeworkCreateRequestWithBody(server, "application/json", bodyReader) } -// NewCreateHomeworkRequestWithBody generates requests for CreateHomework with any type of body -func NewCreateHomeworkRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { +// NewCommunitySectionHomeworkCreateRequestWithBody generates requests for CommunitySectionHomeworkCreate with any type of body +func NewCommunitySectionHomeworkCreateRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -15360,7 +15604,7 @@ func NewCreateHomeworkRequestWithBody(server string, contentType string, body io return nil, err } - operationPath := fmt.Sprintf("/api/community/homeworks") + operationPath := fmt.Sprintf("/api/community/section-homeworks") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -15380,8 +15624,8 @@ func NewCreateHomeworkRequestWithBody(server string, contentType string, body io return req, nil } -// NewDeleteHomeworkRequest generates requests for DeleteHomework -func NewDeleteHomeworkRequest(server string, id string) (*http.Request, error) { +// NewCommunitySectionHomeworkDeleteRequest generates requests for CommunitySectionHomeworkDelete +func NewCommunitySectionHomeworkDeleteRequest(server string, id string) (*http.Request, error) { var err error var pathParam0 string @@ -15396,7 +15640,7 @@ func NewDeleteHomeworkRequest(server string, id string) (*http.Request, error) { return nil, err } - operationPath := fmt.Sprintf("/api/community/homeworks/%s", pathParam0) + operationPath := fmt.Sprintf("/api/community/section-homeworks/%s", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -15414,19 +15658,19 @@ func NewDeleteHomeworkRequest(server string, id string) (*http.Request, error) { return req, nil } -// NewUpdateHomeworkRequest calls the generic UpdateHomework builder with application/json body -func NewUpdateHomeworkRequest(server string, id string, body UpdateHomeworkJSONRequestBody) (*http.Request, error) { +// NewCommunitySectionHomeworkUpdateRequest calls the generic CommunitySectionHomeworkUpdate builder with application/json body +func NewCommunitySectionHomeworkUpdateRequest(server string, id string, body CommunitySectionHomeworkUpdateJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewUpdateHomeworkRequestWithBody(server, id, "application/json", bodyReader) + return NewCommunitySectionHomeworkUpdateRequestWithBody(server, id, "application/json", bodyReader) } -// NewUpdateHomeworkRequestWithBody generates requests for UpdateHomework with any type of body -func NewUpdateHomeworkRequestWithBody(server string, id string, contentType string, body io.Reader) (*http.Request, error) { +// NewCommunitySectionHomeworkUpdateRequestWithBody generates requests for CommunitySectionHomeworkUpdate with any type of body +func NewCommunitySectionHomeworkUpdateRequestWithBody(server string, id string, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -15441,7 +15685,7 @@ func NewUpdateHomeworkRequestWithBody(server string, id string, contentType stri return nil, err } - operationPath := fmt.Sprintf("/api/community/homeworks/%s", pathParam0) + operationPath := fmt.Sprintf("/api/community/section-homeworks/%s", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -15461,13 +15705,13 @@ func NewUpdateHomeworkRequestWithBody(server string, id string, contentType stri return req, nil } -// NewGetUserCalendarRequest generates requests for GetUserCalendar -func NewGetUserCalendarRequest(server string, userId string, params *GetUserCalendarParams) (*http.Request, error) { +// NewCommunityUserGetRequest generates requests for CommunityUserGet +func NewCommunityUserGetRequest(server string, identifier string) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithOptions("simple", false, "userId", userId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "identifier", identifier, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) if err != nil { return nil, err } @@ -15477,7 +15721,7 @@ func NewGetUserCalendarRequest(server string, userId string, params *GetUserCale return nil, err } - operationPath := fmt.Sprintf("/api/community/users/%s/calendar.ics", pathParam0) + operationPath := fmt.Sprintf("/api/community/users/%s", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -15487,28 +15731,6 @@ func NewGetUserCalendarRequest(server string, userId string, params *GetUserCale 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 @@ -15544,8 +15766,8 @@ func NewGetOpenApiSpecRequest(server string) (*http.Request, error) { return req, nil } -// NewGetBusPreferencesRequest generates requests for GetBusPreferences -func NewGetBusPreferencesRequest(server string) (*http.Request, error) { +// NewWorkspaceBusPreferencesGetRequest generates requests for WorkspaceBusPreferencesGet +func NewWorkspaceBusPreferencesGetRequest(server string) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -15571,19 +15793,19 @@ func NewGetBusPreferencesRequest(server string) (*http.Request, error) { return req, nil } -// NewSetBusPreferencesRequest calls the generic SetBusPreferences builder with application/json body -func NewSetBusPreferencesRequest(server string, body SetBusPreferencesJSONRequestBody) (*http.Request, error) { +// NewWorkspaceBusPreferencesSetRequest calls the generic WorkspaceBusPreferencesSet builder with application/json body +func NewWorkspaceBusPreferencesSetRequest(server string, body WorkspaceBusPreferencesSetJSONRequestBody) (*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 NewWorkspaceBusPreferencesSetRequestWithBody(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) { +// NewWorkspaceBusPreferencesSetRequestWithBody generates requests for WorkspaceBusPreferencesSet with any type of body +func NewWorkspaceBusPreferencesSetRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -15725,19 +15947,8 @@ func NewSetHomeworkCompletionRequestWithBody(server string, id string, contentTy return req, nil } -// NewPinDashboardLinkRequestWithFormdataBody calls the generic PinDashboardLink builder with application/x-www-form-urlencoded body -func NewPinDashboardLinkRequestWithFormdataBody(server string, body PinDashboardLinkFormdataRequestBody) (*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 NewPinDashboardLinkRequestWithBody(server, "application/x-www-form-urlencoded", bodyReader) -} - -// NewPinDashboardLinkRequestWithBody generates requests for PinDashboardLink with any type of body -func NewPinDashboardLinkRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { +// NewWorkspaceLinkPinListRequest generates requests for WorkspaceLinkPinList +func NewWorkspaceLinkPinListRequest(server string) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -15745,7 +15956,7 @@ func NewPinDashboardLinkRequestWithBody(server string, contentType string, body return nil, err } - operationPath := fmt.Sprintf("/api/workspace/links/pin") + operationPath := fmt.Sprintf("/api/workspace/link-pins") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -15755,29 +15966,27 @@ func NewPinDashboardLinkRequestWithBody(server string, contentType string, body return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err } - req.Header.Add("Content-Type", contentType) - return req, nil } -// NewPostApiWorkspaceLinksPinBatchRequest calls the generic PostApiWorkspaceLinksPinBatch builder with application/json body -func NewPostApiWorkspaceLinksPinBatchRequest(server string, body PostApiWorkspaceLinksPinBatchJSONRequestBody) (*http.Request, error) { +// NewWorkspaceLinkPinSetRequestWithFormdataBody calls the generic WorkspaceLinkPinSet builder with application/x-www-form-urlencoded body +func NewWorkspaceLinkPinSetRequestWithFormdataBody(server string, body WorkspaceLinkPinSetFormdataRequestBody) (*http.Request, error) { var bodyReader io.Reader - buf, err := json.Marshal(body) + bodyStr, err := runtime.MarshalForm(body, nil) if err != nil { return nil, err } - bodyReader = bytes.NewReader(buf) - return NewPostApiWorkspaceLinksPinBatchRequestWithBody(server, "application/json", bodyReader) + bodyReader = strings.NewReader(bodyStr.Encode()) + return NewWorkspaceLinkPinSetRequestWithBody(server, "application/x-www-form-urlencoded", bodyReader) } -// NewPostApiWorkspaceLinksPinBatchRequestWithBody generates requests for PostApiWorkspaceLinksPinBatch with any type of body -func NewPostApiWorkspaceLinksPinBatchRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { +// NewWorkspaceLinkPinSetRequestWithBody generates requests for WorkspaceLinkPinSet with any type of body +func NewWorkspaceLinkPinSetRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -15785,7 +15994,7 @@ func NewPostApiWorkspaceLinksPinBatchRequestWithBody(server string, contentType return nil, err } - operationPath := fmt.Sprintf("/api/workspace/links/pin/batch") + operationPath := fmt.Sprintf("/api/workspace/link-pins") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -15805,64 +16014,19 @@ func NewPostApiWorkspaceLinksPinBatchRequestWithBody(server string, contentType return req, nil } -// NewVisitDashboardLinkRequest generates requests for VisitDashboardLink -func NewVisitDashboardLinkRequest(server string, params *VisitDashboardLinkParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/api/workspace/links/visit") - 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, "slug", params.Slug, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewRecordDashboardLinkVisitRequestWithFormdataBody calls the generic RecordDashboardLinkVisit builder with application/x-www-form-urlencoded body -func NewRecordDashboardLinkVisitRequestWithFormdataBody(server string, body RecordDashboardLinkVisitFormdataRequestBody) (*http.Request, error) { +// NewWorkspaceLinkPinBatchSetRequest calls the generic WorkspaceLinkPinBatchSet builder with application/json body +func NewWorkspaceLinkPinBatchSetRequest(server string, body WorkspaceLinkPinBatchSetJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader - bodyStr, err := runtime.MarshalForm(body, nil) + buf, err := json.Marshal(body) if err != nil { return nil, err } - bodyReader = strings.NewReader(bodyStr.Encode()) - return NewRecordDashboardLinkVisitRequestWithBody(server, "application/x-www-form-urlencoded", bodyReader) + bodyReader = bytes.NewReader(buf) + return NewWorkspaceLinkPinBatchSetRequestWithBody(server, "application/json", bodyReader) } -// NewRecordDashboardLinkVisitRequestWithBody generates requests for RecordDashboardLinkVisit with any type of body -func NewRecordDashboardLinkVisitRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { +// NewWorkspaceLinkPinBatchSetRequestWithBody generates requests for WorkspaceLinkPinBatchSet with any type of body +func NewWorkspaceLinkPinBatchSetRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -15870,7 +16034,7 @@ func NewRecordDashboardLinkVisitRequestWithBody(server string, contentType strin return nil, err } - operationPath := fmt.Sprintf("/api/workspace/links/visit") + operationPath := fmt.Sprintf("/api/workspace/link-pins/batch") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -15890,8 +16054,8 @@ func NewRecordDashboardLinkVisitRequestWithBody(server string, contentType strin return req, nil } -// NewGetApiMeOverviewRequest generates requests for GetApiMeOverview -func NewGetApiMeOverviewRequest(server string, params *GetApiMeOverviewParams) (*http.Request, error) { +// NewWorkspaceOverviewGetRequest generates requests for WorkspaceOverviewGet +func NewWorkspaceOverviewGetRequest(server string, params *WorkspaceOverviewGetParams) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -15987,8 +16151,8 @@ func NewGetApiMeOverviewRequest(server string, params *GetApiMeOverviewParams) ( return req, nil } -// NewGetApiMeSubscriptionsSchedulesRequest generates requests for GetApiMeSubscriptionsSchedules -func NewGetApiMeSubscriptionsSchedulesRequest(server string, params *GetApiMeSubscriptionsSchedulesParams) (*http.Request, error) { +// NewWorkspaceScheduleListRequest generates requests for WorkspaceScheduleList +func NewWorkspaceScheduleListRequest(server string, params *WorkspaceScheduleListParams) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -17047,16 +17211,13 @@ func WithBaseURL(baseURL string) ClientOption { // ClientWithResponsesInterface is the interface specification for the client with responses above. type ClientWithResponsesInterface interface { - // GetMeWithResponse request - GetMeWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetMeResponse, 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) - // GetApiAccountProfileWithResponse request - GetApiAccountProfileWithResponse(ctx context.Context, params *GetApiAccountProfileParams, reqEditors ...RequestEditorFn) (*GetApiAccountProfileResponse, error) + // AccountProfileGetWithResponse request + AccountProfileGetWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*AccountProfileGetResponse, error) // ListAdminCommentsWithResponse request ListAdminCommentsWithResponse(ctx context.Context, params *ListAdminCommentsParams, reqEditors ...RequestEditorFn) (*ListAdminCommentsResponse, error) @@ -17099,14 +17260,17 @@ type ClientWithResponsesInterface interface { UpdateAdminUserWithResponse(ctx context.Context, id string, body UpdateAdminUserJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateAdminUserResponse, error) - // QueryBusWithResponse request - QueryBusWithResponse(ctx context.Context, params *QueryBusParams, reqEditors ...RequestEditorFn) (*QueryBusResponse, error) + // WorkspaceCalendarFeedExportWithResponse request + WorkspaceCalendarFeedExportWithResponse(ctx context.Context, credential string, reqEditors ...RequestEditorFn) (*WorkspaceCalendarFeedExportResponse, error) - // GetApiCatalogBusNextWithResponse request - GetApiCatalogBusNextWithResponse(ctx context.Context, params *GetApiCatalogBusNextParams, reqEditors ...RequestEditorFn) (*GetApiCatalogBusNextResponse, error) + // CatalogBusTimetableGetWithResponse request + CatalogBusTimetableGetWithResponse(ctx context.Context, params *CatalogBusTimetableGetParams, reqEditors ...RequestEditorFn) (*CatalogBusTimetableGetResponse, error) - // GetApiBusRoutesWithResponse request - GetApiBusRoutesWithResponse(ctx context.Context, params *GetApiBusRoutesParams, reqEditors ...RequestEditorFn) (*GetApiBusRoutesResponse, error) + // CatalogBusDepartureNextWithResponse request + CatalogBusDepartureNextWithResponse(ctx context.Context, params *CatalogBusDepartureNextParams, reqEditors ...RequestEditorFn) (*CatalogBusDepartureNextResponse, error) + + // CatalogBusRouteSearchWithResponse request + CatalogBusRouteSearchWithResponse(ctx context.Context, params *CatalogBusRouteSearchParams, reqEditors ...RequestEditorFn) (*CatalogBusRouteSearchResponse, error) // ListCoursesWithResponse request ListCoursesWithResponse(ctx context.Context, params *ListCoursesParams, reqEditors ...RequestEditorFn) (*ListCoursesResponse, error) @@ -17114,6 +17278,17 @@ type ClientWithResponsesInterface interface { // GetCourseWithResponse request GetCourseWithResponse(ctx context.Context, jwId int64, params *GetCourseParams, reqEditors ...RequestEditorFn) (*GetCourseResponse, error) + // CatalogLinkListWithResponse request + CatalogLinkListWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*CatalogLinkListResponse, error) + + // CatalogLinkResolveWithResponse request + CatalogLinkResolveWithResponse(ctx context.Context, params *CatalogLinkResolveParams, reqEditors ...RequestEditorFn) (*CatalogLinkResolveResponse, error) + + // CatalogLinkVisitRecordWithBodyWithResponse request with any body + CatalogLinkVisitRecordWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CatalogLinkVisitRecordResponse, error) + + CatalogLinkVisitRecordWithFormdataBodyWithResponse(ctx context.Context, body CatalogLinkVisitRecordFormdataRequestBody, reqEditors ...RequestEditorFn) (*CatalogLinkVisitRecordResponse, error) + // GetMetadataWithResponse request GetMetadataWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetMetadataResponse, error) @@ -17195,35 +17370,35 @@ type ClientWithResponsesInterface interface { UpsertDescriptionWithResponse(ctx context.Context, body UpsertDescriptionJSONRequestBody, reqEditors ...RequestEditorFn) (*UpsertDescriptionResponse, error) - // ListHomeworksWithResponse request - ListHomeworksWithResponse(ctx context.Context, params *ListHomeworksParams, reqEditors ...RequestEditorFn) (*ListHomeworksResponse, error) + // CommunitySectionHomeworkListWithResponse request + CommunitySectionHomeworkListWithResponse(ctx context.Context, params *CommunitySectionHomeworkListParams, reqEditors ...RequestEditorFn) (*CommunitySectionHomeworkListResponse, error) - // CreateHomeworkWithBodyWithResponse request with any body - CreateHomeworkWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateHomeworkResponse, error) + // CommunitySectionHomeworkCreateWithBodyWithResponse request with any body + CommunitySectionHomeworkCreateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CommunitySectionHomeworkCreateResponse, error) - CreateHomeworkWithResponse(ctx context.Context, body CreateHomeworkJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateHomeworkResponse, error) + CommunitySectionHomeworkCreateWithResponse(ctx context.Context, body CommunitySectionHomeworkCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*CommunitySectionHomeworkCreateResponse, error) - // DeleteHomeworkWithResponse request - DeleteHomeworkWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*DeleteHomeworkResponse, error) + // CommunitySectionHomeworkDeleteWithResponse request + CommunitySectionHomeworkDeleteWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*CommunitySectionHomeworkDeleteResponse, error) - // UpdateHomeworkWithBodyWithResponse request with any body - UpdateHomeworkWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateHomeworkResponse, error) + // CommunitySectionHomeworkUpdateWithBodyWithResponse request with any body + CommunitySectionHomeworkUpdateWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CommunitySectionHomeworkUpdateResponse, error) - UpdateHomeworkWithResponse(ctx context.Context, id string, body UpdateHomeworkJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateHomeworkResponse, error) + CommunitySectionHomeworkUpdateWithResponse(ctx context.Context, id string, body CommunitySectionHomeworkUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*CommunitySectionHomeworkUpdateResponse, error) - // GetUserCalendarWithResponse request - GetUserCalendarWithResponse(ctx context.Context, userId string, params *GetUserCalendarParams, reqEditors ...RequestEditorFn) (*GetUserCalendarResponse, error) + // CommunityUserGetWithResponse request + CommunityUserGetWithResponse(ctx context.Context, identifier string, reqEditors ...RequestEditorFn) (*CommunityUserGetResponse, error) // GetOpenApiSpecWithResponse request GetOpenApiSpecWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetOpenApiSpecResponse, error) - // GetBusPreferencesWithResponse request - GetBusPreferencesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetBusPreferencesResponse, error) + // WorkspaceBusPreferencesGetWithResponse request + WorkspaceBusPreferencesGetWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*WorkspaceBusPreferencesGetResponse, error) - // SetBusPreferencesWithBodyWithResponse request with any body - SetBusPreferencesWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SetBusPreferencesResponse, error) + // WorkspaceBusPreferencesSetWithBodyWithResponse request with any body + WorkspaceBusPreferencesSetWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*WorkspaceBusPreferencesSetResponse, error) - SetBusPreferencesWithResponse(ctx context.Context, body SetBusPreferencesJSONRequestBody, reqEditors ...RequestEditorFn) (*SetBusPreferencesResponse, error) + WorkspaceBusPreferencesSetWithResponse(ctx context.Context, body WorkspaceBusPreferencesSetJSONRequestBody, reqEditors ...RequestEditorFn) (*WorkspaceBusPreferencesSetResponse, error) // GetSubscribedHomeworksWithResponse request GetSubscribedHomeworksWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetSubscribedHomeworksResponse, error) @@ -17238,29 +17413,24 @@ type ClientWithResponsesInterface interface { SetHomeworkCompletionWithResponse(ctx context.Context, id string, body SetHomeworkCompletionJSONRequestBody, reqEditors ...RequestEditorFn) (*SetHomeworkCompletionResponse, 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) + // WorkspaceLinkPinListWithResponse request + WorkspaceLinkPinListWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*WorkspaceLinkPinListResponse, error) - // PostApiWorkspaceLinksPinBatchWithBodyWithResponse request with any body - PostApiWorkspaceLinksPinBatchWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiWorkspaceLinksPinBatchResponse, error) + // WorkspaceLinkPinSetWithBodyWithResponse request with any body + WorkspaceLinkPinSetWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*WorkspaceLinkPinSetResponse, error) - PostApiWorkspaceLinksPinBatchWithResponse(ctx context.Context, body PostApiWorkspaceLinksPinBatchJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiWorkspaceLinksPinBatchResponse, error) + WorkspaceLinkPinSetWithFormdataBodyWithResponse(ctx context.Context, body WorkspaceLinkPinSetFormdataRequestBody, reqEditors ...RequestEditorFn) (*WorkspaceLinkPinSetResponse, error) - // VisitDashboardLinkWithResponse request - VisitDashboardLinkWithResponse(ctx context.Context, params *VisitDashboardLinkParams, reqEditors ...RequestEditorFn) (*VisitDashboardLinkResponse, error) + // WorkspaceLinkPinBatchSetWithBodyWithResponse request with any body + WorkspaceLinkPinBatchSetWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*WorkspaceLinkPinBatchSetResponse, error) - // RecordDashboardLinkVisitWithBodyWithResponse request with any body - RecordDashboardLinkVisitWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RecordDashboardLinkVisitResponse, error) + WorkspaceLinkPinBatchSetWithResponse(ctx context.Context, body WorkspaceLinkPinBatchSetJSONRequestBody, reqEditors ...RequestEditorFn) (*WorkspaceLinkPinBatchSetResponse, error) - RecordDashboardLinkVisitWithFormdataBodyWithResponse(ctx context.Context, body RecordDashboardLinkVisitFormdataRequestBody, reqEditors ...RequestEditorFn) (*RecordDashboardLinkVisitResponse, error) + // WorkspaceOverviewGetWithResponse request + WorkspaceOverviewGetWithResponse(ctx context.Context, params *WorkspaceOverviewGetParams, reqEditors ...RequestEditorFn) (*WorkspaceOverviewGetResponse, error) - // GetApiMeOverviewWithResponse request - GetApiMeOverviewWithResponse(ctx context.Context, params *GetApiMeOverviewParams, reqEditors ...RequestEditorFn) (*GetApiMeOverviewResponse, error) - - // GetApiMeSubscriptionsSchedulesWithResponse request - GetApiMeSubscriptionsSchedulesWithResponse(ctx context.Context, params *GetApiMeSubscriptionsSchedulesParams, reqEditors ...RequestEditorFn) (*GetApiMeSubscriptionsSchedulesResponse, error) + // WorkspaceScheduleListWithResponse request + WorkspaceScheduleListWithResponse(ctx context.Context, params *WorkspaceScheduleListParams, reqEditors ...RequestEditorFn) (*WorkspaceScheduleListResponse, error) // DeleteApiWorkspaceSubscriptionsWithBodyWithResponse request with any body DeleteApiWorkspaceSubscriptionsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteApiWorkspaceSubscriptionsResponse, error) @@ -17349,29 +17519,6 @@ type ClientWithResponsesInterface interface { DownloadUploadWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*DownloadUploadResponse, error) } -type GetMeResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *MeResponseSchema - JSON401 *OpenApiErrorSchema -} - -// Status returns HTTPResponse.Status -func (r GetMeResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetMeResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - type SetLocaleResponse struct { Body []byte HTTPResponse *http.Response @@ -17395,16 +17542,16 @@ func (r SetLocaleResponse) StatusCode() int { return 0 } -type GetApiAccountProfileResponse struct { +type AccountProfileGetResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *PublicUserProfileResponseSchema - JSON400 *OpenApiErrorSchema + JSON200 *MeResponseSchema + JSON401 *OpenApiErrorSchema JSON404 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r GetApiAccountProfileResponse) Status() string { +func (r AccountProfileGetResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -17412,7 +17559,7 @@ func (r GetApiAccountProfileResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetApiAccountProfileResponse) StatusCode() int { +func (r AccountProfileGetResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -17704,7 +17851,31 @@ func (r UpdateAdminUserResponse) StatusCode() int { return 0 } -type QueryBusResponse struct { +type WorkspaceCalendarFeedExportResponse struct { + Body []byte + HTTPResponse *http.Response + JSON401 *OpenApiErrorSchema + JSON403 *OpenApiErrorSchema + JSON404 *OpenApiErrorSchema +} + +// Status returns HTTPResponse.Status +func (r WorkspaceCalendarFeedExportResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r WorkspaceCalendarFeedExportResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CatalogBusTimetableGetResponse struct { Body []byte HTTPResponse *http.Response JSON200 *BusQueryResponseSchema @@ -17712,7 +17883,7 @@ type QueryBusResponse struct { } // Status returns HTTPResponse.Status -func (r QueryBusResponse) Status() string { +func (r CatalogBusTimetableGetResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -17720,14 +17891,14 @@ func (r QueryBusResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r QueryBusResponse) StatusCode() int { +func (r CatalogBusTimetableGetResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetApiCatalogBusNextResponse struct { +type CatalogBusDepartureNextResponse struct { Body []byte HTTPResponse *http.Response JSON200 *BusNextDeparturesResponseSchema @@ -17736,7 +17907,7 @@ type GetApiCatalogBusNextResponse struct { } // Status returns HTTPResponse.Status -func (r GetApiCatalogBusNextResponse) Status() string { +func (r CatalogBusDepartureNextResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -17744,14 +17915,14 @@ func (r GetApiCatalogBusNextResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetApiCatalogBusNextResponse) StatusCode() int { +func (r CatalogBusDepartureNextResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetApiBusRoutesResponse struct { +type CatalogBusRouteSearchResponse struct { Body []byte HTTPResponse *http.Response JSON200 *BusRouteSearchResponseSchema @@ -17760,7 +17931,7 @@ type GetApiBusRoutesResponse struct { } // Status returns HTTPResponse.Status -func (r GetApiBusRoutesResponse) Status() string { +func (r CatalogBusRouteSearchResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -17768,7 +17939,7 @@ func (r GetApiBusRoutesResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetApiBusRoutesResponse) StatusCode() int { +func (r CatalogBusRouteSearchResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -17822,14 +17993,15 @@ func (r GetCourseResponse) StatusCode() int { return 0 } -type GetMetadataResponse struct { +type CatalogLinkListResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *MetadataResponseSchema + JSON200 *CatalogLinkListResponseSchema + JSON400 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r GetMetadataResponse) Status() string { +func (r CatalogLinkListResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -17837,22 +18009,20 @@ func (r GetMetadataResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetMetadataResponse) StatusCode() int { +func (r CatalogLinkListResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type ListSchedulesResponse struct { +type CatalogLinkResolveResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *PaginatedScheduleResponseSchema - JSON400 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r ListSchedulesResponse) Status() string { +func (r CatalogLinkResolveResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -17860,22 +18030,20 @@ func (r ListSchedulesResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r ListSchedulesResponse) StatusCode() int { +func (r CatalogLinkResolveResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type ListSectionsResponse struct { +type CatalogLinkVisitRecordResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *PaginatedSectionResponseSchema - JSON400 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r ListSectionsResponse) Status() string { +func (r CatalogLinkVisitRecordResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -17883,17 +18051,85 @@ func (r ListSectionsResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r ListSectionsResponse) StatusCode() int { +func (r CatalogLinkVisitRecordResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetSectionsCalendarResponse struct { +type GetMetadataResponse struct { Body []byte HTTPResponse *http.Response - JSON400 *OpenApiErrorSchema + JSON200 *MetadataResponseSchema +} + +// Status returns HTTPResponse.Status +func (r GetMetadataResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetMetadataResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type ListSchedulesResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *PaginatedScheduleResponseSchema + JSON400 *OpenApiErrorSchema +} + +// Status returns HTTPResponse.Status +func (r ListSchedulesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ListSchedulesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type ListSectionsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *PaginatedSectionResponseSchema + JSON400 *OpenApiErrorSchema +} + +// Status returns HTTPResponse.Status +func (r ListSectionsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ListSectionsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetSectionsCalendarResponse struct { + Body []byte + HTTPResponse *http.Response + JSON400 *OpenApiErrorSchema } // Status returns HTTPResponse.Status @@ -18387,7 +18623,7 @@ func (r UpsertDescriptionResponse) StatusCode() int { return 0 } -type ListHomeworksResponse struct { +type CommunitySectionHomeworkListResponse struct { Body []byte HTTPResponse *http.Response JSON200 *HomeworksListResponseSchema @@ -18396,7 +18632,7 @@ type ListHomeworksResponse struct { } // Status returns HTTPResponse.Status -func (r ListHomeworksResponse) Status() string { +func (r CommunitySectionHomeworkListResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -18404,14 +18640,14 @@ func (r ListHomeworksResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r ListHomeworksResponse) StatusCode() int { +func (r CommunitySectionHomeworkListResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type CreateHomeworkResponse struct { +type CommunitySectionHomeworkCreateResponse struct { Body []byte HTTPResponse *http.Response JSON201 *HomeworkCreateResponseSchema @@ -18424,7 +18660,7 @@ type CreateHomeworkResponse struct { } // Status returns HTTPResponse.Status -func (r CreateHomeworkResponse) Status() string { +func (r CommunitySectionHomeworkCreateResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -18432,14 +18668,14 @@ func (r CreateHomeworkResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r CreateHomeworkResponse) StatusCode() int { +func (r CommunitySectionHomeworkCreateResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type DeleteHomeworkResponse struct { +type CommunitySectionHomeworkDeleteResponse struct { Body []byte HTTPResponse *http.Response JSON200 *SuccessResponseSchema @@ -18451,7 +18687,7 @@ type DeleteHomeworkResponse struct { } // Status returns HTTPResponse.Status -func (r DeleteHomeworkResponse) Status() string { +func (r CommunitySectionHomeworkDeleteResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -18459,14 +18695,14 @@ func (r DeleteHomeworkResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r DeleteHomeworkResponse) StatusCode() int { +func (r CommunitySectionHomeworkDeleteResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type UpdateHomeworkResponse struct { +type CommunitySectionHomeworkUpdateResponse struct { Body []byte HTTPResponse *http.Response JSON200 *HomeworkUpdateResponseSchema @@ -18479,7 +18715,7 @@ type UpdateHomeworkResponse struct { } // Status returns HTTPResponse.Status -func (r UpdateHomeworkResponse) Status() string { +func (r CommunitySectionHomeworkUpdateResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -18487,23 +18723,22 @@ func (r UpdateHomeworkResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r UpdateHomeworkResponse) StatusCode() int { +func (r CommunitySectionHomeworkUpdateResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetUserCalendarResponse struct { +type CommunityUserGetResponse struct { Body []byte HTTPResponse *http.Response - JSON401 *OpenApiErrorSchema - JSON403 *OpenApiErrorSchema + JSON200 *PublicUserProfileResponseSchema JSON404 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r GetUserCalendarResponse) Status() string { +func (r CommunityUserGetResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -18511,7 +18746,7 @@ func (r GetUserCalendarResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetUserCalendarResponse) StatusCode() int { +func (r CommunityUserGetResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -18540,7 +18775,7 @@ func (r GetOpenApiSpecResponse) StatusCode() int { return 0 } -type GetBusPreferencesResponse struct { +type WorkspaceBusPreferencesGetResponse struct { Body []byte HTTPResponse *http.Response JSON200 *BusPreferenceResponseSchema @@ -18548,7 +18783,7 @@ type GetBusPreferencesResponse struct { } // Status returns HTTPResponse.Status -func (r GetBusPreferencesResponse) Status() string { +func (r WorkspaceBusPreferencesGetResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -18556,14 +18791,14 @@ func (r GetBusPreferencesResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetBusPreferencesResponse) StatusCode() int { +func (r WorkspaceBusPreferencesGetResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type SetBusPreferencesResponse struct { +type WorkspaceBusPreferencesSetResponse struct { Body []byte HTTPResponse *http.Response JSON200 *BusPreferenceResponseSchema @@ -18574,7 +18809,7 @@ type SetBusPreferencesResponse struct { } // Status returns HTTPResponse.Status -func (r SetBusPreferencesResponse) Status() string { +func (r WorkspaceBusPreferencesSetResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -18582,7 +18817,7 @@ func (r SetBusPreferencesResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r SetBusPreferencesResponse) StatusCode() int { +func (r WorkspaceBusPreferencesSetResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -18665,19 +18900,15 @@ func (r SetHomeworkCompletionResponse) StatusCode() int { return 0 } -type PinDashboardLinkResponse struct { +type WorkspaceLinkPinListResponse struct { Body []byte HTTPResponse *http.Response JSON200 *DashboardLinkPinResponseSchema - JSON400 *DashboardLinkPinResponseSchema - JSON401 *DashboardLinkPinResponseSchema - JSON429 *OpenApiErrorSchema - JSON500 *DashboardLinkPinResponseSchema - JSON503 *OpenApiErrorSchema + JSON401 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r PinDashboardLinkResponse) Status() string { +func (r WorkspaceLinkPinListResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -18685,26 +18916,26 @@ func (r PinDashboardLinkResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r PinDashboardLinkResponse) StatusCode() int { +func (r WorkspaceLinkPinListResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type PostApiWorkspaceLinksPinBatchResponse struct { +type WorkspaceLinkPinSetResponse struct { Body []byte HTTPResponse *http.Response JSON200 *DashboardLinkPinResponseSchema - JSON400 *DashboardLinkPinResponseSchema + JSON400 *OpenApiErrorSchema JSON401 *OpenApiErrorSchema JSON429 *OpenApiErrorSchema - JSON500 *DashboardLinkPinResponseSchema + JSON500 *OpenApiErrorSchema JSON503 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r PostApiWorkspaceLinksPinBatchResponse) Status() string { +func (r WorkspaceLinkPinSetResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -18712,41 +18943,26 @@ func (r PostApiWorkspaceLinksPinBatchResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r PostApiWorkspaceLinksPinBatchResponse) StatusCode() int { +func (r WorkspaceLinkPinSetResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type VisitDashboardLinkResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r VisitDashboardLinkResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r VisitDashboardLinkResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type RecordDashboardLinkVisitResponse struct { +type WorkspaceLinkPinBatchSetResponse struct { Body []byte HTTPResponse *http.Response + JSON200 *DashboardLinkPinResponseSchema + JSON400 *OpenApiErrorSchema + JSON401 *OpenApiErrorSchema + JSON429 *OpenApiErrorSchema + JSON500 *OpenApiErrorSchema + JSON503 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r RecordDashboardLinkVisitResponse) Status() string { +func (r WorkspaceLinkPinBatchSetResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -18754,14 +18970,14 @@ func (r RecordDashboardLinkVisitResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r RecordDashboardLinkVisitResponse) StatusCode() int { +func (r WorkspaceLinkPinBatchSetResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetApiMeOverviewResponse struct { +type WorkspaceOverviewGetResponse struct { Body []byte HTTPResponse *http.Response JSON200 *CompactOverviewResponseSchema @@ -18770,7 +18986,7 @@ type GetApiMeOverviewResponse struct { } // Status returns HTTPResponse.Status -func (r GetApiMeOverviewResponse) Status() string { +func (r WorkspaceOverviewGetResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -18778,14 +18994,14 @@ func (r GetApiMeOverviewResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetApiMeOverviewResponse) StatusCode() int { +func (r WorkspaceOverviewGetResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetApiMeSubscriptionsSchedulesResponse struct { +type WorkspaceScheduleListResponse struct { Body []byte HTTPResponse *http.Response JSON200 *SubscribedSchedulesResponseSchema @@ -18794,7 +19010,7 @@ type GetApiMeSubscriptionsSchedulesResponse struct { } // Status returns HTTPResponse.Status -func (r GetApiMeSubscriptionsSchedulesResponse) Status() string { +func (r WorkspaceScheduleListResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -18802,7 +19018,7 @@ func (r GetApiMeSubscriptionsSchedulesResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetApiMeSubscriptionsSchedulesResponse) StatusCode() int { +func (r WorkspaceScheduleListResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -19334,15 +19550,6 @@ func (r DownloadUploadResponse) StatusCode() int { return 0 } -// 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 ParseGetMeResponse(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...) @@ -19360,13 +19567,13 @@ func (c *ClientWithResponses) SetLocaleWithResponse(ctx context.Context, body Se return ParseSetLocaleResponse(rsp) } -// GetApiAccountProfileWithResponse request returning *GetApiAccountProfileResponse -func (c *ClientWithResponses) GetApiAccountProfileWithResponse(ctx context.Context, params *GetApiAccountProfileParams, reqEditors ...RequestEditorFn) (*GetApiAccountProfileResponse, error) { - rsp, err := c.GetApiAccountProfile(ctx, params, reqEditors...) +// AccountProfileGetWithResponse request returning *AccountProfileGetResponse +func (c *ClientWithResponses) AccountProfileGetWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*AccountProfileGetResponse, error) { + rsp, err := c.AccountProfileGet(ctx, reqEditors...) if err != nil { return nil, err } - return ParseGetApiAccountProfileResponse(rsp) + return ParseAccountProfileGetResponse(rsp) } // ListAdminCommentsWithResponse request returning *ListAdminCommentsResponse @@ -19500,31 +19707,40 @@ func (c *ClientWithResponses) UpdateAdminUserWithResponse(ctx context.Context, i return ParseUpdateAdminUserResponse(rsp) } -// QueryBusWithResponse request returning *QueryBusResponse -func (c *ClientWithResponses) QueryBusWithResponse(ctx context.Context, params *QueryBusParams, reqEditors ...RequestEditorFn) (*QueryBusResponse, error) { - rsp, err := c.QueryBus(ctx, params, reqEditors...) +// WorkspaceCalendarFeedExportWithResponse request returning *WorkspaceCalendarFeedExportResponse +func (c *ClientWithResponses) WorkspaceCalendarFeedExportWithResponse(ctx context.Context, credential string, reqEditors ...RequestEditorFn) (*WorkspaceCalendarFeedExportResponse, error) { + rsp, err := c.WorkspaceCalendarFeedExport(ctx, credential, reqEditors...) + if err != nil { + return nil, err + } + return ParseWorkspaceCalendarFeedExportResponse(rsp) +} + +// CatalogBusTimetableGetWithResponse request returning *CatalogBusTimetableGetResponse +func (c *ClientWithResponses) CatalogBusTimetableGetWithResponse(ctx context.Context, params *CatalogBusTimetableGetParams, reqEditors ...RequestEditorFn) (*CatalogBusTimetableGetResponse, error) { + rsp, err := c.CatalogBusTimetableGet(ctx, params, reqEditors...) if err != nil { return nil, err } - return ParseQueryBusResponse(rsp) + return ParseCatalogBusTimetableGetResponse(rsp) } -// GetApiCatalogBusNextWithResponse request returning *GetApiCatalogBusNextResponse -func (c *ClientWithResponses) GetApiCatalogBusNextWithResponse(ctx context.Context, params *GetApiCatalogBusNextParams, reqEditors ...RequestEditorFn) (*GetApiCatalogBusNextResponse, error) { - rsp, err := c.GetApiCatalogBusNext(ctx, params, reqEditors...) +// CatalogBusDepartureNextWithResponse request returning *CatalogBusDepartureNextResponse +func (c *ClientWithResponses) CatalogBusDepartureNextWithResponse(ctx context.Context, params *CatalogBusDepartureNextParams, reqEditors ...RequestEditorFn) (*CatalogBusDepartureNextResponse, error) { + rsp, err := c.CatalogBusDepartureNext(ctx, params, reqEditors...) if err != nil { return nil, err } - return ParseGetApiCatalogBusNextResponse(rsp) + return ParseCatalogBusDepartureNextResponse(rsp) } -// GetApiBusRoutesWithResponse request returning *GetApiBusRoutesResponse -func (c *ClientWithResponses) GetApiBusRoutesWithResponse(ctx context.Context, params *GetApiBusRoutesParams, reqEditors ...RequestEditorFn) (*GetApiBusRoutesResponse, error) { - rsp, err := c.GetApiBusRoutes(ctx, params, reqEditors...) +// CatalogBusRouteSearchWithResponse request returning *CatalogBusRouteSearchResponse +func (c *ClientWithResponses) CatalogBusRouteSearchWithResponse(ctx context.Context, params *CatalogBusRouteSearchParams, reqEditors ...RequestEditorFn) (*CatalogBusRouteSearchResponse, error) { + rsp, err := c.CatalogBusRouteSearch(ctx, params, reqEditors...) if err != nil { return nil, err } - return ParseGetApiBusRoutesResponse(rsp) + return ParseCatalogBusRouteSearchResponse(rsp) } // ListCoursesWithResponse request returning *ListCoursesResponse @@ -19545,6 +19761,41 @@ func (c *ClientWithResponses) GetCourseWithResponse(ctx context.Context, jwId in return ParseGetCourseResponse(rsp) } +// CatalogLinkListWithResponse request returning *CatalogLinkListResponse +func (c *ClientWithResponses) CatalogLinkListWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*CatalogLinkListResponse, error) { + rsp, err := c.CatalogLinkList(ctx, reqEditors...) + if err != nil { + return nil, err + } + return ParseCatalogLinkListResponse(rsp) +} + +// CatalogLinkResolveWithResponse request returning *CatalogLinkResolveResponse +func (c *ClientWithResponses) CatalogLinkResolveWithResponse(ctx context.Context, params *CatalogLinkResolveParams, reqEditors ...RequestEditorFn) (*CatalogLinkResolveResponse, error) { + rsp, err := c.CatalogLinkResolve(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseCatalogLinkResolveResponse(rsp) +} + +// CatalogLinkVisitRecordWithBodyWithResponse request with arbitrary body returning *CatalogLinkVisitRecordResponse +func (c *ClientWithResponses) CatalogLinkVisitRecordWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CatalogLinkVisitRecordResponse, error) { + rsp, err := c.CatalogLinkVisitRecordWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCatalogLinkVisitRecordResponse(rsp) +} + +func (c *ClientWithResponses) CatalogLinkVisitRecordWithFormdataBodyWithResponse(ctx context.Context, body CatalogLinkVisitRecordFormdataRequestBody, reqEditors ...RequestEditorFn) (*CatalogLinkVisitRecordResponse, error) { + rsp, err := c.CatalogLinkVisitRecordWithFormdataBody(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCatalogLinkVisitRecordResponse(rsp) +} + // GetMetadataWithResponse request returning *GetMetadataResponse func (c *ClientWithResponses) GetMetadataWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetMetadataResponse, error) { rsp, err := c.GetMetadata(ctx, reqEditors...) @@ -19800,65 +20051,65 @@ func (c *ClientWithResponses) UpsertDescriptionWithResponse(ctx context.Context, return ParseUpsertDescriptionResponse(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...) +// CommunitySectionHomeworkListWithResponse request returning *CommunitySectionHomeworkListResponse +func (c *ClientWithResponses) CommunitySectionHomeworkListWithResponse(ctx context.Context, params *CommunitySectionHomeworkListParams, reqEditors ...RequestEditorFn) (*CommunitySectionHomeworkListResponse, error) { + rsp, err := c.CommunitySectionHomeworkList(ctx, params, reqEditors...) if err != nil { return nil, err } - return ParseListHomeworksResponse(rsp) + return ParseCommunitySectionHomeworkListResponse(rsp) } -// 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...) +// CommunitySectionHomeworkCreateWithBodyWithResponse request with arbitrary body returning *CommunitySectionHomeworkCreateResponse +func (c *ClientWithResponses) CommunitySectionHomeworkCreateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CommunitySectionHomeworkCreateResponse, error) { + rsp, err := c.CommunitySectionHomeworkCreateWithBody(ctx, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParseCreateHomeworkResponse(rsp) + return ParseCommunitySectionHomeworkCreateResponse(rsp) } -func (c *ClientWithResponses) CreateHomeworkWithResponse(ctx context.Context, body CreateHomeworkJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateHomeworkResponse, error) { - rsp, err := c.CreateHomework(ctx, body, reqEditors...) +func (c *ClientWithResponses) CommunitySectionHomeworkCreateWithResponse(ctx context.Context, body CommunitySectionHomeworkCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*CommunitySectionHomeworkCreateResponse, error) { + rsp, err := c.CommunitySectionHomeworkCreate(ctx, body, reqEditors...) if err != nil { return nil, err } - return ParseCreateHomeworkResponse(rsp) + return ParseCommunitySectionHomeworkCreateResponse(rsp) } -// DeleteHomeworkWithResponse request returning *DeleteHomeworkResponse -func (c *ClientWithResponses) DeleteHomeworkWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*DeleteHomeworkResponse, error) { - rsp, err := c.DeleteHomework(ctx, id, reqEditors...) +// CommunitySectionHomeworkDeleteWithResponse request returning *CommunitySectionHomeworkDeleteResponse +func (c *ClientWithResponses) CommunitySectionHomeworkDeleteWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*CommunitySectionHomeworkDeleteResponse, error) { + rsp, err := c.CommunitySectionHomeworkDelete(ctx, id, reqEditors...) if err != nil { return nil, err } - return ParseDeleteHomeworkResponse(rsp) + return ParseCommunitySectionHomeworkDeleteResponse(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...) +// CommunitySectionHomeworkUpdateWithBodyWithResponse request with arbitrary body returning *CommunitySectionHomeworkUpdateResponse +func (c *ClientWithResponses) CommunitySectionHomeworkUpdateWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CommunitySectionHomeworkUpdateResponse, error) { + rsp, err := c.CommunitySectionHomeworkUpdateWithBody(ctx, id, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParseUpdateHomeworkResponse(rsp) + return ParseCommunitySectionHomeworkUpdateResponse(rsp) } -func (c *ClientWithResponses) UpdateHomeworkWithResponse(ctx context.Context, id string, body UpdateHomeworkJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateHomeworkResponse, error) { - rsp, err := c.UpdateHomework(ctx, id, body, reqEditors...) +func (c *ClientWithResponses) CommunitySectionHomeworkUpdateWithResponse(ctx context.Context, id string, body CommunitySectionHomeworkUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*CommunitySectionHomeworkUpdateResponse, error) { + rsp, err := c.CommunitySectionHomeworkUpdate(ctx, id, body, reqEditors...) if err != nil { return nil, err } - return ParseUpdateHomeworkResponse(rsp) + return ParseCommunitySectionHomeworkUpdateResponse(rsp) } -// 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...) +// CommunityUserGetWithResponse request returning *CommunityUserGetResponse +func (c *ClientWithResponses) CommunityUserGetWithResponse(ctx context.Context, identifier string, reqEditors ...RequestEditorFn) (*CommunityUserGetResponse, error) { + rsp, err := c.CommunityUserGet(ctx, identifier, reqEditors...) if err != nil { return nil, err } - return ParseGetUserCalendarResponse(rsp) + return ParseCommunityUserGetResponse(rsp) } // GetOpenApiSpecWithResponse request returning *GetOpenApiSpecResponse @@ -19870,30 +20121,30 @@ func (c *ClientWithResponses) GetOpenApiSpecWithResponse(ctx context.Context, re return ParseGetOpenApiSpecResponse(rsp) } -// GetBusPreferencesWithResponse request returning *GetBusPreferencesResponse -func (c *ClientWithResponses) GetBusPreferencesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetBusPreferencesResponse, error) { - rsp, err := c.GetBusPreferences(ctx, reqEditors...) +// WorkspaceBusPreferencesGetWithResponse request returning *WorkspaceBusPreferencesGetResponse +func (c *ClientWithResponses) WorkspaceBusPreferencesGetWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*WorkspaceBusPreferencesGetResponse, error) { + rsp, err := c.WorkspaceBusPreferencesGet(ctx, reqEditors...) if err != nil { return nil, err } - return ParseGetBusPreferencesResponse(rsp) + return ParseWorkspaceBusPreferencesGetResponse(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...) +// WorkspaceBusPreferencesSetWithBodyWithResponse request with arbitrary body returning *WorkspaceBusPreferencesSetResponse +func (c *ClientWithResponses) WorkspaceBusPreferencesSetWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*WorkspaceBusPreferencesSetResponse, error) { + rsp, err := c.WorkspaceBusPreferencesSetWithBody(ctx, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParseSetBusPreferencesResponse(rsp) + return ParseWorkspaceBusPreferencesSetResponse(rsp) } -func (c *ClientWithResponses) SetBusPreferencesWithResponse(ctx context.Context, body SetBusPreferencesJSONRequestBody, reqEditors ...RequestEditorFn) (*SetBusPreferencesResponse, error) { - rsp, err := c.SetBusPreferences(ctx, body, reqEditors...) +func (c *ClientWithResponses) WorkspaceBusPreferencesSetWithResponse(ctx context.Context, body WorkspaceBusPreferencesSetJSONRequestBody, reqEditors ...RequestEditorFn) (*WorkspaceBusPreferencesSetResponse, error) { + rsp, err := c.WorkspaceBusPreferencesSet(ctx, body, reqEditors...) if err != nil { return nil, err } - return ParseSetBusPreferencesResponse(rsp) + return ParseWorkspaceBusPreferencesSetResponse(rsp) } // GetSubscribedHomeworksWithResponse request returning *GetSubscribedHomeworksResponse @@ -19939,82 +20190,65 @@ func (c *ClientWithResponses) SetHomeworkCompletionWithResponse(ctx context.Cont return ParseSetHomeworkCompletionResponse(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...) - if err != nil { - return nil, err - } - return ParsePinDashboardLinkResponse(rsp) -} - -func (c *ClientWithResponses) PinDashboardLinkWithFormdataBodyWithResponse(ctx context.Context, body PinDashboardLinkFormdataRequestBody, reqEditors ...RequestEditorFn) (*PinDashboardLinkResponse, error) { - rsp, err := c.PinDashboardLinkWithFormdataBody(ctx, body, reqEditors...) +// WorkspaceLinkPinListWithResponse request returning *WorkspaceLinkPinListResponse +func (c *ClientWithResponses) WorkspaceLinkPinListWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*WorkspaceLinkPinListResponse, error) { + rsp, err := c.WorkspaceLinkPinList(ctx, reqEditors...) if err != nil { return nil, err } - return ParsePinDashboardLinkResponse(rsp) + return ParseWorkspaceLinkPinListResponse(rsp) } -// PostApiWorkspaceLinksPinBatchWithBodyWithResponse request with arbitrary body returning *PostApiWorkspaceLinksPinBatchResponse -func (c *ClientWithResponses) PostApiWorkspaceLinksPinBatchWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiWorkspaceLinksPinBatchResponse, error) { - rsp, err := c.PostApiWorkspaceLinksPinBatchWithBody(ctx, contentType, body, reqEditors...) +// WorkspaceLinkPinSetWithBodyWithResponse request with arbitrary body returning *WorkspaceLinkPinSetResponse +func (c *ClientWithResponses) WorkspaceLinkPinSetWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*WorkspaceLinkPinSetResponse, error) { + rsp, err := c.WorkspaceLinkPinSetWithBody(ctx, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParsePostApiWorkspaceLinksPinBatchResponse(rsp) + return ParseWorkspaceLinkPinSetResponse(rsp) } -func (c *ClientWithResponses) PostApiWorkspaceLinksPinBatchWithResponse(ctx context.Context, body PostApiWorkspaceLinksPinBatchJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiWorkspaceLinksPinBatchResponse, error) { - rsp, err := c.PostApiWorkspaceLinksPinBatch(ctx, body, reqEditors...) +func (c *ClientWithResponses) WorkspaceLinkPinSetWithFormdataBodyWithResponse(ctx context.Context, body WorkspaceLinkPinSetFormdataRequestBody, reqEditors ...RequestEditorFn) (*WorkspaceLinkPinSetResponse, error) { + rsp, err := c.WorkspaceLinkPinSetWithFormdataBody(ctx, body, reqEditors...) if err != nil { return nil, err } - return ParsePostApiWorkspaceLinksPinBatchResponse(rsp) + return ParseWorkspaceLinkPinSetResponse(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...) +// WorkspaceLinkPinBatchSetWithBodyWithResponse request with arbitrary body returning *WorkspaceLinkPinBatchSetResponse +func (c *ClientWithResponses) WorkspaceLinkPinBatchSetWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*WorkspaceLinkPinBatchSetResponse, error) { + rsp, err := c.WorkspaceLinkPinBatchSetWithBody(ctx, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParseVisitDashboardLinkResponse(rsp) + return ParseWorkspaceLinkPinBatchSetResponse(rsp) } -// 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...) +func (c *ClientWithResponses) WorkspaceLinkPinBatchSetWithResponse(ctx context.Context, body WorkspaceLinkPinBatchSetJSONRequestBody, reqEditors ...RequestEditorFn) (*WorkspaceLinkPinBatchSetResponse, error) { + rsp, err := c.WorkspaceLinkPinBatchSet(ctx, body, reqEditors...) if err != nil { return nil, err } - return ParseRecordDashboardLinkVisitResponse(rsp) + return ParseWorkspaceLinkPinBatchSetResponse(rsp) } -func (c *ClientWithResponses) RecordDashboardLinkVisitWithFormdataBodyWithResponse(ctx context.Context, body RecordDashboardLinkVisitFormdataRequestBody, reqEditors ...RequestEditorFn) (*RecordDashboardLinkVisitResponse, error) { - rsp, err := c.RecordDashboardLinkVisitWithFormdataBody(ctx, body, reqEditors...) +// WorkspaceOverviewGetWithResponse request returning *WorkspaceOverviewGetResponse +func (c *ClientWithResponses) WorkspaceOverviewGetWithResponse(ctx context.Context, params *WorkspaceOverviewGetParams, reqEditors ...RequestEditorFn) (*WorkspaceOverviewGetResponse, error) { + rsp, err := c.WorkspaceOverviewGet(ctx, params, reqEditors...) if err != nil { return nil, err } - return ParseRecordDashboardLinkVisitResponse(rsp) + return ParseWorkspaceOverviewGetResponse(rsp) } -// GetApiMeOverviewWithResponse request returning *GetApiMeOverviewResponse -func (c *ClientWithResponses) GetApiMeOverviewWithResponse(ctx context.Context, params *GetApiMeOverviewParams, reqEditors ...RequestEditorFn) (*GetApiMeOverviewResponse, error) { - rsp, err := c.GetApiMeOverview(ctx, params, reqEditors...) +// WorkspaceScheduleListWithResponse request returning *WorkspaceScheduleListResponse +func (c *ClientWithResponses) WorkspaceScheduleListWithResponse(ctx context.Context, params *WorkspaceScheduleListParams, reqEditors ...RequestEditorFn) (*WorkspaceScheduleListResponse, error) { + rsp, err := c.WorkspaceScheduleList(ctx, params, reqEditors...) if err != nil { return nil, err } - return ParseGetApiMeOverviewResponse(rsp) -} - -// 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 ParseGetApiMeSubscriptionsSchedulesResponse(rsp) + return ParseWorkspaceScheduleListResponse(rsp) } // DeleteApiWorkspaceSubscriptionsWithBodyWithResponse request with arbitrary body returning *DeleteApiWorkspaceSubscriptionsResponse @@ -20301,39 +20535,6 @@ func (c *ClientWithResponses) DownloadUploadWithResponse(ctx context.Context, id return ParseDownloadUploadResponse(rsp) } -// 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 := &GetMeResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - 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 == 401: - var dest OpenApiErrorSchema - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - } - - return response, nil -} - // ParseSetLocaleResponse parses an HTTP response from a SetLocaleWithResponse call func ParseSetLocaleResponse(rsp *http.Response) (*SetLocaleResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) @@ -20367,33 +20568,33 @@ func ParseSetLocaleResponse(rsp *http.Response) (*SetLocaleResponse, error) { return response, nil } -// ParseGetApiAccountProfileResponse parses an HTTP response from a GetApiAccountProfileWithResponse call -func ParseGetApiAccountProfileResponse(rsp *http.Response) (*GetApiAccountProfileResponse, error) { +// ParseAccountProfileGetResponse parses an HTTP response from a AccountProfileGetWithResponse call +func ParseAccountProfileGetResponse(rsp *http.Response) (*AccountProfileGetResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetApiAccountProfileResponse{ + response := &AccountProfileGetResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest PublicUserProfileResponseSchema + 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 case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest OpenApiErrorSchema @@ -20994,15 +21195,55 @@ func ParseUpdateAdminUserResponse(rsp *http.Response) (*UpdateAdminUserResponse, return response, nil } -// ParseQueryBusResponse parses an HTTP response from a QueryBusWithResponse call -func ParseQueryBusResponse(rsp *http.Response) (*QueryBusResponse, error) { +// ParseWorkspaceCalendarFeedExportResponse parses an HTTP response from a WorkspaceCalendarFeedExportWithResponse call +func ParseWorkspaceCalendarFeedExportResponse(rsp *http.Response) (*WorkspaceCalendarFeedExportResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &WorkspaceCalendarFeedExportResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + 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 +} + +// ParseCatalogBusTimetableGetResponse parses an HTTP response from a CatalogBusTimetableGetWithResponse call +func ParseCatalogBusTimetableGetResponse(rsp *http.Response) (*CatalogBusTimetableGetResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &QueryBusResponse{ + response := &CatalogBusTimetableGetResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -21027,15 +21268,15 @@ func ParseQueryBusResponse(rsp *http.Response) (*QueryBusResponse, error) { return response, nil } -// ParseGetApiCatalogBusNextResponse parses an HTTP response from a GetApiCatalogBusNextWithResponse call -func ParseGetApiCatalogBusNextResponse(rsp *http.Response) (*GetApiCatalogBusNextResponse, error) { +// ParseCatalogBusDepartureNextResponse parses an HTTP response from a CatalogBusDepartureNextWithResponse call +func ParseCatalogBusDepartureNextResponse(rsp *http.Response) (*CatalogBusDepartureNextResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetApiCatalogBusNextResponse{ + response := &CatalogBusDepartureNextResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -21067,15 +21308,15 @@ func ParseGetApiCatalogBusNextResponse(rsp *http.Response) (*GetApiCatalogBusNex return response, nil } -// ParseGetApiBusRoutesResponse parses an HTTP response from a GetApiBusRoutesWithResponse call -func ParseGetApiBusRoutesResponse(rsp *http.Response) (*GetApiBusRoutesResponse, error) { +// ParseCatalogBusRouteSearchResponse parses an HTTP response from a CatalogBusRouteSearchWithResponse call +func ParseCatalogBusRouteSearchResponse(rsp *http.Response) (*CatalogBusRouteSearchResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetApiBusRoutesResponse{ + response := &CatalogBusRouteSearchResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -21180,6 +21421,71 @@ func ParseGetCourseResponse(rsp *http.Response) (*GetCourseResponse, error) { return response, nil } +// ParseCatalogLinkListResponse parses an HTTP response from a CatalogLinkListWithResponse call +func ParseCatalogLinkListResponse(rsp *http.Response) (*CatalogLinkListResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &CatalogLinkListResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest CatalogLinkListResponseSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + } + + return response, nil +} + +// ParseCatalogLinkResolveResponse parses an HTTP response from a CatalogLinkResolveWithResponse call +func ParseCatalogLinkResolveResponse(rsp *http.Response) (*CatalogLinkResolveResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &CatalogLinkResolveResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParseCatalogLinkVisitRecordResponse parses an HTTP response from a CatalogLinkVisitRecordWithResponse call +func ParseCatalogLinkVisitRecordResponse(rsp *http.Response) (*CatalogLinkVisitRecordResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &CatalogLinkVisitRecordResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + // ParseGetMetadataResponse parses an HTTP response from a GetMetadataWithResponse call func ParseGetMetadataResponse(rsp *http.Response) (*GetMetadataResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) @@ -22191,15 +22497,15 @@ func ParseUpsertDescriptionResponse(rsp *http.Response) (*UpsertDescriptionRespo return response, nil } -// ParseListHomeworksResponse parses an HTTP response from a ListHomeworksWithResponse call -func ParseListHomeworksResponse(rsp *http.Response) (*ListHomeworksResponse, error) { +// ParseCommunitySectionHomeworkListResponse parses an HTTP response from a CommunitySectionHomeworkListWithResponse call +func ParseCommunitySectionHomeworkListResponse(rsp *http.Response) (*CommunitySectionHomeworkListResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListHomeworksResponse{ + response := &CommunitySectionHomeworkListResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -22231,15 +22537,15 @@ func ParseListHomeworksResponse(rsp *http.Response) (*ListHomeworksResponse, err return response, nil } -// ParseCreateHomeworkResponse parses an HTTP response from a CreateHomeworkWithResponse call -func ParseCreateHomeworkResponse(rsp *http.Response) (*CreateHomeworkResponse, error) { +// ParseCommunitySectionHomeworkCreateResponse parses an HTTP response from a CommunitySectionHomeworkCreateWithResponse call +func ParseCommunitySectionHomeworkCreateResponse(rsp *http.Response) (*CommunitySectionHomeworkCreateResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreateHomeworkResponse{ + response := &CommunitySectionHomeworkCreateResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -22299,15 +22605,15 @@ func ParseCreateHomeworkResponse(rsp *http.Response) (*CreateHomeworkResponse, e return response, nil } -// ParseDeleteHomeworkResponse parses an HTTP response from a DeleteHomeworkWithResponse call -func ParseDeleteHomeworkResponse(rsp *http.Response) (*DeleteHomeworkResponse, error) { +// ParseCommunitySectionHomeworkDeleteResponse parses an HTTP response from a CommunitySectionHomeworkDeleteWithResponse call +func ParseCommunitySectionHomeworkDeleteResponse(rsp *http.Response) (*CommunitySectionHomeworkDeleteResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DeleteHomeworkResponse{ + response := &CommunitySectionHomeworkDeleteResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -22360,15 +22666,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) { +// ParseCommunitySectionHomeworkUpdateResponse parses an HTTP response from a CommunitySectionHomeworkUpdateWithResponse call +func ParseCommunitySectionHomeworkUpdateResponse(rsp *http.Response) (*CommunitySectionHomeworkUpdateResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &UpdateHomeworkResponse{ + response := &CommunitySectionHomeworkUpdateResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -22428,33 +22734,26 @@ func ParseUpdateHomeworkResponse(rsp *http.Response) (*UpdateHomeworkResponse, e return response, nil } -// ParseGetUserCalendarResponse parses an HTTP response from a GetUserCalendarWithResponse call -func ParseGetUserCalendarResponse(rsp *http.Response) (*GetUserCalendarResponse, error) { +// ParseCommunityUserGetResponse parses an HTTP response from a CommunityUserGetWithResponse call +func ParseCommunityUserGetResponse(rsp *http.Response) (*CommunityUserGetResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetUserCalendarResponse{ + response := &CommunityUserGetResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - 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 + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest PublicUserProfileResponseSchema if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON403 = &dest + response.JSON200 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest OpenApiErrorSchema @@ -22494,15 +22793,15 @@ func ParseGetOpenApiSpecResponse(rsp *http.Response) (*GetOpenApiSpecResponse, e return response, nil } -// ParseGetBusPreferencesResponse parses an HTTP response from a GetBusPreferencesWithResponse call -func ParseGetBusPreferencesResponse(rsp *http.Response) (*GetBusPreferencesResponse, error) { +// ParseWorkspaceBusPreferencesGetResponse parses an HTTP response from a WorkspaceBusPreferencesGetWithResponse call +func ParseWorkspaceBusPreferencesGetResponse(rsp *http.Response) (*WorkspaceBusPreferencesGetResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetBusPreferencesResponse{ + response := &WorkspaceBusPreferencesGetResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -22527,15 +22826,15 @@ func ParseGetBusPreferencesResponse(rsp *http.Response) (*GetBusPreferencesRespo return response, nil } -// ParseSetBusPreferencesResponse parses an HTTP response from a SetBusPreferencesWithResponse call -func ParseSetBusPreferencesResponse(rsp *http.Response) (*SetBusPreferencesResponse, error) { +// ParseWorkspaceBusPreferencesSetResponse parses an HTTP response from a WorkspaceBusPreferencesSetWithResponse call +func ParseWorkspaceBusPreferencesSetResponse(rsp *http.Response) (*WorkspaceBusPreferencesSetResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &SetBusPreferencesResponse{ + response := &WorkspaceBusPreferencesSetResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -22729,15 +23028,15 @@ func ParseSetHomeworkCompletionResponse(rsp *http.Response) (*SetHomeworkComplet return response, nil } -// ParsePinDashboardLinkResponse parses an HTTP response from a PinDashboardLinkWithResponse call -func ParsePinDashboardLinkResponse(rsp *http.Response) (*PinDashboardLinkResponse, error) { +// ParseWorkspaceLinkPinListResponse parses an HTTP response from a WorkspaceLinkPinListWithResponse call +func ParseWorkspaceLinkPinListResponse(rsp *http.Response) (*WorkspaceLinkPinListResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &PinDashboardLinkResponse{ + response := &WorkspaceLinkPinListResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -22750,15 +23049,48 @@ func ParsePinDashboardLinkResponse(rsp *http.Response) (*PinDashboardLinkRespons } 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.JSON401 = &dest + + } + + return response, nil +} + +// ParseWorkspaceLinkPinSetResponse parses an HTTP response from a WorkspaceLinkPinSetWithResponse call +func ParseWorkspaceLinkPinSetResponse(rsp *http.Response) (*WorkspaceLinkPinSetResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &WorkspaceLinkPinSetResponse{ + 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 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 DashboardLinkPinResponseSchema + var dest OpenApiErrorSchema if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -22772,7 +23104,7 @@ func ParsePinDashboardLinkResponse(rsp *http.Response) (*PinDashboardLinkRespons response.JSON429 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest DashboardLinkPinResponseSchema + var dest OpenApiErrorSchema if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -22790,15 +23122,15 @@ func ParsePinDashboardLinkResponse(rsp *http.Response) (*PinDashboardLinkRespons return response, nil } -// ParsePostApiWorkspaceLinksPinBatchResponse parses an HTTP response from a PostApiWorkspaceLinksPinBatchWithResponse call -func ParsePostApiWorkspaceLinksPinBatchResponse(rsp *http.Response) (*PostApiWorkspaceLinksPinBatchResponse, error) { +// ParseWorkspaceLinkPinBatchSetResponse parses an HTTP response from a WorkspaceLinkPinBatchSetWithResponse call +func ParseWorkspaceLinkPinBatchSetResponse(rsp *http.Response) (*WorkspaceLinkPinBatchSetResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &PostApiWorkspaceLinksPinBatchResponse{ + response := &WorkspaceLinkPinBatchSetResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -22812,7 +23144,7 @@ func ParsePostApiWorkspaceLinksPinBatchResponse(rsp *http.Response) (*PostApiWor response.JSON200 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest DashboardLinkPinResponseSchema + var dest OpenApiErrorSchema if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -22833,7 +23165,7 @@ func ParsePostApiWorkspaceLinksPinBatchResponse(rsp *http.Response) (*PostApiWor response.JSON429 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest DashboardLinkPinResponseSchema + var dest OpenApiErrorSchema if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -22851,47 +23183,15 @@ func ParsePostApiWorkspaceLinksPinBatchResponse(rsp *http.Response) (*PostApiWor 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) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &VisitDashboardLinkResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - 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 -} - -// ParseGetApiMeOverviewResponse parses an HTTP response from a GetApiMeOverviewWithResponse call -func ParseGetApiMeOverviewResponse(rsp *http.Response) (*GetApiMeOverviewResponse, error) { +// ParseWorkspaceOverviewGetResponse parses an HTTP response from a WorkspaceOverviewGetWithResponse call +func ParseWorkspaceOverviewGetResponse(rsp *http.Response) (*WorkspaceOverviewGetResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetApiMeOverviewResponse{ + response := &WorkspaceOverviewGetResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -22923,15 +23223,15 @@ func ParseGetApiMeOverviewResponse(rsp *http.Response) (*GetApiMeOverviewRespons return response, nil } -// ParseGetApiMeSubscriptionsSchedulesResponse parses an HTTP response from a GetApiMeSubscriptionsSchedulesWithResponse call -func ParseGetApiMeSubscriptionsSchedulesResponse(rsp *http.Response) (*GetApiMeSubscriptionsSchedulesResponse, error) { +// ParseWorkspaceScheduleListResponse parses an HTTP response from a WorkspaceScheduleListWithResponse call +func ParseWorkspaceScheduleListResponse(rsp *http.Response) (*WorkspaceScheduleListResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetApiMeSubscriptionsSchedulesResponse{ + response := &WorkspaceScheduleListResponse{ Body: bodyBytes, HTTPResponse: rsp, } From a2939cea022a60e7418b56d4e003a84d4e692c83 Mon Sep 17 00:00:00 2001 From: Tiankai Ma Date: Fri, 24 Jul 2026 01:30:33 +0800 Subject: [PATCH 2/2] fix: sync ownership-aligned schema names --- api/openapi.json | 31 ++++--- internal/cmd/link/link.go | 2 +- internal/openapi/client.gen.go | 156 ++++++++++++++++----------------- 3 files changed, 100 insertions(+), 89 deletions(-) diff --git a/api/openapi.json b/api/openapi.json index 44d98e0..065b4cb 100644 --- a/api/openapi.json +++ b/api/openapi.json @@ -634,6 +634,7 @@ "sessionCookie": [] } ], + "x-auth-role": "admin", "parameters": [ { "in": "query", @@ -727,6 +728,7 @@ "sessionCookie": [] } ], + "x-auth-role": "admin", "parameters": [ { "in": "query", @@ -839,6 +841,7 @@ "sessionCookie": [] } ], + "x-auth-role": "admin", "parameters": [ { "in": "query", @@ -937,6 +940,7 @@ "sessionCookie": [] } ], + "x-auth-role": "admin", "responses": { "200": { "description": "Successful response", @@ -971,6 +975,7 @@ "sessionCookie": [] } ], + "x-auth-role": "admin", "requestBody": { "required": true, "content": { @@ -1093,6 +1098,7 @@ "sessionCookie": [] } ], + "x-auth-role": "admin", "parameters": [ { "in": "query", @@ -2788,7 +2794,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/dashboardLinkPinResponseSchema" + "$ref": "#/components/schemas/workspaceLinkPinResponseSchema" } } } @@ -2824,7 +2830,7 @@ "content": { "application/x-www-form-urlencoded": { "schema": { - "$ref": "#/components/schemas/dashboardLinkPinRequestSchema" + "$ref": "#/components/schemas/workspaceLinkPinRequestSchema" } } } @@ -2835,7 +2841,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/dashboardLinkPinResponseSchema" + "$ref": "#/components/schemas/workspaceLinkPinResponseSchema" } } } @@ -4022,6 +4028,7 @@ "sessionCookie": [] } ], + "x-auth-role": "admin", "parameters": [ { "in": "path", @@ -4147,6 +4154,7 @@ "sessionCookie": [] } ], + "x-auth-role": "admin", "parameters": [ { "in": "path", @@ -4272,6 +4280,7 @@ "sessionCookie": [] } ], + "x-auth-role": "admin", "parameters": [ { "in": "path", @@ -4377,6 +4386,7 @@ "sessionCookie": [] } ], + "x-auth-role": "admin", "parameters": [ { "in": "path", @@ -4482,6 +4492,7 @@ "sessionCookie": [] } ], + "x-auth-role": "admin", "parameters": [ { "in": "path", @@ -5054,7 +5065,7 @@ "content": { "application/x-www-form-urlencoded": { "schema": { - "$ref": "#/components/schemas/dashboardLinkVisitRequestSchema" + "$ref": "#/components/schemas/catalogLinkVisitRequestSchema" } } } @@ -6192,7 +6203,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/dashboardLinkPinBatchRequestSchema" + "$ref": "#/components/schemas/workspaceLinkPinBatchRequestSchema" } } } @@ -6203,7 +6214,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/dashboardLinkPinResponseSchema" + "$ref": "#/components/schemas/workspaceLinkPinResponseSchema" } } } @@ -15398,7 +15409,7 @@ ], "additionalProperties": false }, - "dashboardLinkPinResponseSchema": { + "workspaceLinkPinResponseSchema": { "type": "object", "properties": { "pinnedSlugs": { @@ -15424,7 +15435,7 @@ ], "additionalProperties": false }, - "dashboardLinkPinRequestSchema": { + "workspaceLinkPinRequestSchema": { "type": "object", "properties": { "slug": { @@ -23035,7 +23046,7 @@ ], "additionalProperties": false }, - "dashboardLinkVisitRequestSchema": { + "catalogLinkVisitRequestSchema": { "type": "object", "properties": { "slug": { @@ -27041,7 +27052,7 @@ ], "additionalProperties": false }, - "dashboardLinkPinBatchRequestSchema": { + "workspaceLinkPinBatchRequestSchema": { "type": "object", "properties": { "items": { diff --git a/internal/cmd/link/link.go b/internal/cmd/link/link.go index fcaeea4..1339c0c 100644 --- a/internal/cmd/link/link.go +++ b/internal/cmd/link/link.go @@ -81,7 +81,7 @@ func newCmdSetPin(action string) *cobra.Command { if err != nil { return err } - value := openapi.DashboardLinkPinRequestSchemaAction(action) + value := openapi.WorkspaceLinkPinRequestSchemaAction(action) data, err := api.ParseResponseRaw( client.WorkspaceLinkPinSetWithFormdataBody( api.Ctx(), diff --git a/internal/openapi/client.gen.go b/internal/openapi/client.gen.go index d05510d..376d440 100644 --- a/internal/openapi/client.gen.go +++ b/internal/openapi/client.gen.go @@ -659,42 +659,6 @@ 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 ( - 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 DashboardLinkPinRequestSchemaActionPin: - return true - case DashboardLinkPinRequestSchemaActionUnpin: - return true - default: - return false - } -} - // Defines values for DescriptionUpsertRequestSchemaTargetType. const ( DescriptionUpsertRequestSchemaTargetTypeCourse DescriptionUpsertRequestSchemaTargetType = "course" @@ -1262,6 +1226,42 @@ func (e TodosListResponseSchemaTodosPriority) Valid() bool { } } +// Defines values for WorkspaceLinkPinBatchRequestSchemaItemsAction. +const ( + WorkspaceLinkPinBatchRequestSchemaItemsActionPin WorkspaceLinkPinBatchRequestSchemaItemsAction = "pin" + WorkspaceLinkPinBatchRequestSchemaItemsActionUnpin WorkspaceLinkPinBatchRequestSchemaItemsAction = "unpin" +) + +// Valid indicates whether the value is a known member of the WorkspaceLinkPinBatchRequestSchemaItemsAction enum. +func (e WorkspaceLinkPinBatchRequestSchemaItemsAction) Valid() bool { + switch e { + case WorkspaceLinkPinBatchRequestSchemaItemsActionPin: + return true + case WorkspaceLinkPinBatchRequestSchemaItemsActionUnpin: + return true + default: + return false + } +} + +// Defines values for WorkspaceLinkPinRequestSchemaAction. +const ( + WorkspaceLinkPinRequestSchemaActionPin WorkspaceLinkPinRequestSchemaAction = "pin" + WorkspaceLinkPinRequestSchemaActionUnpin WorkspaceLinkPinRequestSchemaAction = "unpin" +) + +// Valid indicates whether the value is a known member of the WorkspaceLinkPinRequestSchemaAction enum. +func (e WorkspaceLinkPinRequestSchemaAction) Valid() bool { + switch e { + case WorkspaceLinkPinRequestSchemaActionPin: + return true + case WorkspaceLinkPinRequestSchemaActionUnpin: + return true + default: + return false + } +} + // Defines values for ListAdminCommentsParamsStatus. const ( ListAdminCommentsParamsStatusActive ListAdminCommentsParamsStatus = "active" @@ -3943,6 +3943,11 @@ type CatalogLinkListResponseSchemaLinksIcon string // CatalogLinkListResponseSchemaLinksLocale defines model for CatalogLinkListResponseSchema.Links.Locale. type CatalogLinkListResponseSchemaLinksLocale string +// CatalogLinkVisitRequestSchema defines model for catalogLinkVisitRequestSchema. +type CatalogLinkVisitRequestSchema struct { + Slug string `json:"slug"` +} + // CommentBatchDeleteRequestSchema defines model for commentBatchDeleteRequestSchema. type CommentBatchDeleteRequestSchema struct { Ids []string `json:"ids"` @@ -4846,39 +4851,6 @@ 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"` - 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"` @@ -7245,6 +7217,34 @@ type UploadsListResponseSchema struct { } `json:"pagination"` } +// WorkspaceLinkPinBatchRequestSchema defines model for workspaceLinkPinBatchRequestSchema. +type WorkspaceLinkPinBatchRequestSchema struct { + Items []struct { + Action WorkspaceLinkPinBatchRequestSchemaItemsAction `json:"action"` + Slug string `json:"slug"` + } `json:"items"` +} + +// WorkspaceLinkPinBatchRequestSchemaItemsAction defines model for WorkspaceLinkPinBatchRequestSchema.Items.Action. +type WorkspaceLinkPinBatchRequestSchemaItemsAction string + +// WorkspaceLinkPinRequestSchema defines model for workspaceLinkPinRequestSchema. +type WorkspaceLinkPinRequestSchema struct { + Action *WorkspaceLinkPinRequestSchemaAction `json:"action,omitempty"` + ReturnTo *string `json:"returnTo,omitempty"` + Slug string `json:"slug"` +} + +// WorkspaceLinkPinRequestSchemaAction defines model for WorkspaceLinkPinRequestSchema.Action. +type WorkspaceLinkPinRequestSchemaAction string + +// WorkspaceLinkPinResponseSchema defines model for workspaceLinkPinResponseSchema. +type WorkspaceLinkPinResponseSchema struct { + Error *string `json:"error"` + MaxPinnedLinks int `json:"maxPinnedLinks"` + PinnedSlugs []string `json:"pinnedSlugs"` +} + // ListAdminCommentsParams defines parameters for ListAdminComments. type ListAdminCommentsParams struct { Status *ListAdminCommentsParamsStatus `form:"status,omitempty" json:"status,omitempty"` @@ -7620,7 +7620,7 @@ type CreateAdminSuspensionJSONRequestBody = AdminCreateSuspensionRequestSchema type UpdateAdminUserJSONRequestBody = AdminUpdateUserRequestSchema // CatalogLinkVisitRecordFormdataRequestBody defines body for CatalogLinkVisitRecord for application/x-www-form-urlencoded ContentType. -type CatalogLinkVisitRecordFormdataRequestBody = DashboardLinkVisitRequestSchema +type CatalogLinkVisitRecordFormdataRequestBody = CatalogLinkVisitRequestSchema // MatchSectionCodesJSONRequestBody defines body for MatchSectionCodes for application/json ContentType. type MatchSectionCodesJSONRequestBody = MatchSectionCodesRequestSchema @@ -7656,10 +7656,10 @@ type PutApiHomeworksCompletionsJSONRequestBody = HomeworkCompletionBatchRequestS type SetHomeworkCompletionJSONRequestBody = HomeworkCompletionRequestSchema // WorkspaceLinkPinSetFormdataRequestBody defines body for WorkspaceLinkPinSet for application/x-www-form-urlencoded ContentType. -type WorkspaceLinkPinSetFormdataRequestBody = DashboardLinkPinRequestSchema +type WorkspaceLinkPinSetFormdataRequestBody = WorkspaceLinkPinRequestSchema // WorkspaceLinkPinBatchSetJSONRequestBody defines body for WorkspaceLinkPinBatchSet for application/json ContentType. -type WorkspaceLinkPinBatchSetJSONRequestBody = DashboardLinkPinBatchRequestSchema +type WorkspaceLinkPinBatchSetJSONRequestBody = WorkspaceLinkPinBatchRequestSchema // DeleteApiWorkspaceSubscriptionsJSONRequestBody defines body for DeleteApiWorkspaceSubscriptions for application/json ContentType. type DeleteApiWorkspaceSubscriptionsJSONRequestBody = CalendarSubscriptionRemoveRequestSchema @@ -18903,7 +18903,7 @@ func (r SetHomeworkCompletionResponse) StatusCode() int { type WorkspaceLinkPinListResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *DashboardLinkPinResponseSchema + JSON200 *WorkspaceLinkPinResponseSchema JSON401 *OpenApiErrorSchema } @@ -18926,7 +18926,7 @@ func (r WorkspaceLinkPinListResponse) StatusCode() int { type WorkspaceLinkPinSetResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *DashboardLinkPinResponseSchema + JSON200 *WorkspaceLinkPinResponseSchema JSON400 *OpenApiErrorSchema JSON401 *OpenApiErrorSchema JSON429 *OpenApiErrorSchema @@ -18953,7 +18953,7 @@ func (r WorkspaceLinkPinSetResponse) StatusCode() int { type WorkspaceLinkPinBatchSetResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *DashboardLinkPinResponseSchema + JSON200 *WorkspaceLinkPinResponseSchema JSON400 *OpenApiErrorSchema JSON401 *OpenApiErrorSchema JSON429 *OpenApiErrorSchema @@ -23043,7 +23043,7 @@ func ParseWorkspaceLinkPinListResponse(rsp *http.Response) (*WorkspaceLinkPinLis switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest DashboardLinkPinResponseSchema + var dest WorkspaceLinkPinResponseSchema if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -23076,7 +23076,7 @@ func ParseWorkspaceLinkPinSetResponse(rsp *http.Response) (*WorkspaceLinkPinSetR switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest DashboardLinkPinResponseSchema + var dest WorkspaceLinkPinResponseSchema if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -23137,7 +23137,7 @@ func ParseWorkspaceLinkPinBatchSetResponse(rsp *http.Response) (*WorkspaceLinkPi switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest DashboardLinkPinResponseSchema + var dest WorkspaceLinkPinResponseSchema if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err }