diff --git a/src/Umbraco.Web.UI.Client/schemas/api/api.yml b/src/Umbraco.Web.UI.Client/schemas/api/api.yml index 25f76ca20a..59e42377b1 100644 --- a/src/Umbraco.Web.UI.Client/schemas/api/api.yml +++ b/src/Umbraco.Web.UI.Client/schemas/api/api.yml @@ -89,6 +89,35 @@ paths: application/json: schema: $ref: '#/components/schemas/ProblemDetails' + /upgrade/settings: + get: + operationId: GetUpgradeSettings + responses: + '200': + description: 200 response + content: + application/json: + schema: + $ref: '#/components/schemas/UpgradeSettingsResponse' + default: + description: default response + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + /upgrade/authorize: + post: + operationId: PostUpgradeAuthorize + parameters: [] + responses: + '201': + description: 201 response + '400': + description: 400 response + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' /user: get: operationId: GetUser @@ -339,6 +368,25 @@ components: type: string required: - version + UpgradeSettingsResponse: + type: object + properties: + currentState: + type: string + newState: + type: string + newVersion: + type: string + oldVersion: + type: string + reportUrl: + type: string + required: + - currentState + - newState + - newVersion + - oldVersion + - reportUrl UserResponse: type: object properties: diff --git a/src/Umbraco.Web.UI.Client/temp-schema-generator/api.ts b/src/Umbraco.Web.UI.Client/temp-schema-generator/api.ts index e5afc6e4a2..51cdd0acc6 100644 --- a/src/Umbraco.Web.UI.Client/temp-schema-generator/api.ts +++ b/src/Umbraco.Web.UI.Client/temp-schema-generator/api.ts @@ -1,5 +1,6 @@ import './installer'; import './server'; +import './upgrader'; import './user'; import { api } from '@airtasker/spot'; diff --git a/src/Umbraco.Web.UI.Client/temp-schema-generator/upgrader.ts b/src/Umbraco.Web.UI.Client/temp-schema-generator/upgrader.ts new file mode 100644 index 0000000000..2e1d4f76f2 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/temp-schema-generator/upgrader.ts @@ -0,0 +1,38 @@ +import { body, defaultResponse, endpoint, request, response } from '@airtasker/spot'; + +import { ProblemDetails } from './models'; + +@endpoint({ + method: 'GET', + path: '/upgrade/settings', +}) +export class GetUpgradeSettings { + @response({ status: 200 }) + success(@body body: UpgradeSettingsResponse) {} + + @defaultResponse + default(@body body: ProblemDetails) {} +} + +@endpoint({ + method: 'POST', + path: '/upgrade/authorize', +}) +export class PostUpgradeAuthorize { + @request + request() {} + + @response({ status: 201 }) + success() {} + + @response({ status: 400 }) + badRequest(@body body: ProblemDetails) {} +} + +export interface UpgradeSettingsResponse { + currentState: string; + newState: string; + newVersion: string; + oldVersion: string; + reportUrl: string; +}