Files
Umbraco-CMS/src/Umbraco.Web.UI.Client/temp-schema-generator/installer.ts

106 lines
2.3 KiB
TypeScript
Raw Normal View History

2022-06-27 11:07:17 +02:00
import { body, defaultResponse, endpoint, request, response } from '@airtasker/spot';
2022-05-19 10:34:11 +02:00
import { ProblemDetails } from './models';
2022-05-19 10:34:11 +02:00
@endpoint({
2022-05-24 11:27:02 +02:00
method: 'GET',
2022-06-27 11:07:17 +02:00
path: '/install/settings',
2022-05-19 10:34:11 +02:00
})
2022-06-27 11:07:17 +02:00
export class GetInstallSettings {
2022-05-24 11:27:02 +02:00
@response({ status: 200 })
2022-06-27 11:07:17 +02:00
success(@body body: InstallSettingsResponse) {}
@defaultResponse
default(@body body: ProblemDetails) {}
2022-05-19 10:34:11 +02:00
}
@endpoint({
2022-05-24 11:27:02 +02:00
method: 'POST',
2022-06-27 11:07:17 +02:00
path: '/install/setup',
2022-05-19 10:34:11 +02:00
})
2022-06-27 11:07:17 +02:00
export class PostInstallSetup {
2022-05-24 11:27:02 +02:00
@request
2022-06-27 11:07:17 +02:00
request(@body body: InstallSetupRequest) {}
2022-05-19 10:34:11 +02:00
2022-05-24 11:27:02 +02:00
@response({ status: 201 })
success() {}
2022-05-19 10:34:11 +02:00
2022-05-24 11:27:02 +02:00
@response({ status: 400 })
badRequest(@body body: ProblemDetails) {}
2022-05-19 10:34:11 +02:00
}
2022-05-19 10:50:33 +02:00
@endpoint({
2022-05-24 11:27:02 +02:00
method: 'POST',
2022-06-27 11:07:17 +02:00
path: '/install/validateDatabase',
2022-05-19 10:50:33 +02:00
})
export class PostInstallValidateDatabase {
2022-05-24 11:27:02 +02:00
@request
2022-06-27 11:07:17 +02:00
request(@body body: InstallValidateDatabaseRequest) {}
2022-05-19 10:50:33 +02:00
2022-05-24 11:27:02 +02:00
@response({ status: 201 })
success() {}
2022-05-19 10:50:33 +02:00
2022-05-24 11:27:02 +02:00
@response({ status: 400 })
badRequest(@body body: ProblemDetails) {}
2022-05-19 10:50:33 +02:00
}
2022-06-27 11:07:17 +02:00
export interface InstallSetupRequest {
user: InstallSetupUserConfiguration;
2022-05-24 11:27:02 +02:00
telemetryLevel: ConsentLevel;
database?: InstallSetupDatabaseConfiguration;
2022-05-19 10:50:33 +02:00
}
2022-06-27 11:07:17 +02:00
export interface InstallValidateDatabaseRequest {
database: InstallSetupDatabaseConfiguration;
2022-05-19 10:50:33 +02:00
}
2022-06-27 11:07:17 +02:00
export interface InstallSettingsResponse {
user: InstallUserModel;
databases: InstallDatabaseModel[];
2022-05-19 10:34:11 +02:00
}
2022-06-27 11:07:17 +02:00
export interface InstallUserModel {
2022-05-24 11:27:02 +02:00
minCharLength: number;
minNonAlphaNumericLength: number;
consentLevels: TelemetryModel[];
2022-05-19 10:34:11 +02:00
}
export interface InstallSetupUserConfiguration {
name: string;
email: string;
password: string;
subscribeToNewsletter: boolean;
}
2022-06-27 11:07:17 +02:00
export interface InstallSetupDatabaseConfiguration {
2022-06-30 13:15:15 +02:00
id?: string;
2022-06-27 11:07:17 +02:00
server?: string | null;
password?: string | null;
username?: string | null;
name?: string | null;
providerName?: string | null;
2022-06-27 11:07:17 +02:00
useIntegratedAuthentication?: boolean | null;
connectionString?: string | null;
}
2022-05-24 11:27:02 +02:00
export interface TelemetryModel {
level: ConsentLevel;
description: string;
2022-05-19 10:34:11 +02:00
}
2022-06-27 11:07:17 +02:00
export interface InstallDatabaseModel {
2022-05-24 11:27:02 +02:00
id: string;
sortOrder: number;
displayName: string;
defaultDatabaseName: string;
providerName: null | string;
2022-06-29 15:55:26 +02:00
isConfigured: boolean;
2022-05-24 11:27:02 +02:00
requiresServer: boolean;
serverPlaceholder: null | string;
requiresCredentials: boolean;
supportsIntegratedAuthentication: boolean;
requiresConnectionTest: boolean;
2022-05-19 10:34:11 +02:00
}
2022-05-24 11:27:02 +02:00
export type ConsentLevel = 'Minimal' | 'Basic' | 'Detailed';