Merge remote-tracking branch 'origin/main' into feature/user-section-v2

This commit is contained in:
Jesper Møller Jensen
2022-11-17 15:43:50 +01:00
9 changed files with 14 additions and 44373 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -56,9 +56,9 @@
"uuid": "^9.0.0"
},
"devDependencies": {
"@babel/core": "^7.19.6",
"@babel/core": "^7.20.2",
"@mdx-js/react": "^2.1.5",
"@open-wc/testing": "^3.1.6",
"@open-wc/testing": "^3.1.7",
"@playwright/test": "^1.27.1",
"@storybook/addon-a11y": "^6.5.13",
"@storybook/addon-actions": "^6.5.13",
@@ -67,7 +67,7 @@
"@storybook/builder-vite": "^0.2.5",
"@storybook/mdx2-csf": "^0.0.3",
"@storybook/web-components": "^6.5.13",
"@types/chai": "^4.3.1",
"@types/chai": "^4.3.4",
"@types/lodash-es": "^4.17.6",
"@types/mocha": "^9.1.1",
"@types/uuid": "^8.3.4",
@@ -78,7 +78,7 @@
"@web/test-runner": "^0.15.0",
"@web/test-runner-playwright": "^0.9.0",
"babel-loader": "^9.1.0",
"eslint": "^8.25.0",
"eslint": "^8.27.0",
"eslint-config-prettier": "^8.5.0",
"eslint-import-resolver-typescript": "^3.5.2",
"eslint-plugin-import": "^2.26.0",
@@ -96,7 +96,7 @@
"tiny-glob": "^0.2.9",
"typescript": "^4.8.4",
"vite": "^3.2.3",
"vite-plugin-static-copy": "^0.9.0",
"vite-plugin-static-copy": "^0.12.0",
"vite-tsconfig-paths": "^3.5.2",
"web-component-analyzer": "^2.0.0-next.4"
},

View File

@@ -1,3 +0,0 @@
# Schemas
These schemas are auto-generated by certain processes and are not to be touched.

View File

@@ -1,624 +0,0 @@
openapi: 3.0.2
info:
title: umbraco-backoffice-api
version: 1.0.0
paths:
/install/settings:
get:
operationId: GetInstallSettings
responses:
'200':
description: 200 response
content:
application/json:
schema:
$ref: '#/components/schemas/InstallSettingsResponse'
default:
description: default response
content:
application/json:
schema:
$ref: '#/components/schemas/ProblemDetails'
/install/setup:
post:
operationId: PostInstallSetup
parameters: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/InstallSetupRequest'
required: true
responses:
'201':
description: 201 response
'400':
description: 400 response
content:
application/json:
schema:
$ref: '#/components/schemas/ProblemDetails'
/install/validateDatabase:
post:
operationId: PostInstallValidateDatabase
parameters: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/InstallSetupDatabaseConfiguration'
required: true
responses:
'201':
description: 201 response
'400':
description: 400 response
content:
application/json:
schema:
$ref: '#/components/schemas/ProblemDetails'
/manifests:
get:
operationId: Manifests
responses:
'200':
description: 200 response
content:
application/json:
schema:
$ref: '#/components/schemas/ManifestsResponse'
default:
description: default response
content:
application/json:
schema:
$ref: '#/components/schemas/ProblemDetails'
/manifests/packages:
get:
operationId: ManifestsPackages
responses:
'200':
description: 200 response
content:
application/json:
schema:
type: object
default:
description: default response
content:
application/json:
schema:
$ref: '#/components/schemas/ProblemDetails'
/manifests/packages/installed:
get:
operationId: ManifestsPackagesInstalled
responses:
'200':
description: 200 response
content:
application/json:
schema:
$ref: '#/components/schemas/ManifestsPackagesInstalledResponse'
default:
description: default response
content:
application/json:
schema:
$ref: '#/components/schemas/ProblemDetails'
/published-cache/status:
get:
operationId: PublishedCacheStatus
responses:
'200':
description: 200 response
content:
application/json:
schema:
type: string
default:
description: default response
content:
application/json:
schema:
$ref: '#/components/schemas/ProblemDetails'
/published-cache/reload:
post:
operationId: PublishedCacheReload
parameters: []
responses:
'201':
description: 201 response
'400':
description: 400 response
content:
application/json:
schema:
$ref: '#/components/schemas/ProblemDetails'
/published-cache/rebuild:
post:
operationId: PublishedCacheRebuild
parameters: []
responses:
'201':
description: 201 response
'400':
description: 400 response
content:
application/json:
schema:
$ref: '#/components/schemas/ProblemDetails'
/published-cache/collect:
get:
operationId: PublishedCacheCollect
responses:
'200':
description: 200 response
content:
application/json:
schema:
type: string
default:
description: default response
content:
application/json:
schema:
$ref: '#/components/schemas/ProblemDetails'
/server/status:
get:
operationId: GetStatus
responses:
'200':
description: 200 response
content:
application/json:
schema:
$ref: '#/components/schemas/StatusResponse'
default:
description: default response
content:
application/json:
schema:
$ref: '#/components/schemas/ProblemDetails'
/server/version:
get:
operationId: GetVersion
responses:
'200':
description: 200 response
content:
application/json:
schema:
$ref: '#/components/schemas/VersionResponse'
default:
description: default response
content:
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
responses:
'200':
description: 200 response
content:
application/json:
schema:
$ref: '#/components/schemas/UserResponse'
'403':
description: 403 response
content:
application/json:
schema:
$ref: '#/components/schemas/ProblemDetails'
/user/login:
post:
operationId: PostUserLogin
parameters: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/UserLoginRequest'
required: true
responses:
'201':
description: 201 response
'403':
description: 403 response
content:
application/json:
schema:
$ref: '#/components/schemas/ProblemDetails'
/user/logout:
post:
operationId: PostUserLogout
responses:
'201':
description: 201 response
default:
description: default response
content:
application/json:
schema:
$ref: '#/components/schemas/ProblemDetails'
/user/sections:
get:
operationId: GetAllowedSections
responses:
'200':
description: 200 response
content:
application/json:
schema:
$ref: '#/components/schemas/AllowedSectionsResponse'
default:
description: default response
content:
application/json:
schema:
$ref: '#/components/schemas/ProblemDetails'
/telemetry/ConsentLevel:
get:
operationId: GetConsentLevel
responses:
'200':
description: 200 response
content:
application/json:
schema:
$ref: '#/components/schemas/ConsentLevelSettings'
default:
description: default response
content:
application/json:
schema:
$ref: '#/components/schemas/ProblemDetails'
post:
operationId: PostConsentLevel
parameters: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ConsentLevelSettings'
required: true
responses:
'201':
description: 201 response
'400':
description: 400 response
content:
application/json:
schema:
$ref: '#/components/schemas/ProblemDetails'
/telemetry/ConsentLevels:
get:
operationId: ConsentLevels
responses:
'200':
description: 200 response
content:
application/json:
schema:
type: array
items:
type: string
default:
description: default response
content:
application/json:
schema:
$ref: '#/components/schemas/ProblemDetails'
components:
schemas:
ConsentLevel:
type: string
enum:
- Minimal
- Basic
- Detailed
TelemetryModel:
type: object
properties:
level:
$ref: '#/components/schemas/ConsentLevel'
description:
type: string
required:
- level
- description
InstallUserModel:
type: object
properties:
minCharLength:
type: number
format: float
minNonAlphaNumericLength:
type: number
format: float
consentLevels:
type: array
items:
$ref: '#/components/schemas/TelemetryModel'
required:
- minCharLength
- minNonAlphaNumericLength
- consentLevels
InstallDatabaseModel:
type: object
properties:
id:
type: string
sortOrder:
type: number
format: float
displayName:
type: string
defaultDatabaseName:
type: string
providerName:
type: string
nullable: true
isConfigured:
type: boolean
requiresServer:
type: boolean
serverPlaceholder:
type: string
nullable: true
requiresCredentials:
type: boolean
supportsIntegratedAuthentication:
type: boolean
requiresConnectionTest:
type: boolean
required:
- id
- sortOrder
- displayName
- defaultDatabaseName
- providerName
- isConfigured
- requiresServer
- serverPlaceholder
- requiresCredentials
- supportsIntegratedAuthentication
- requiresConnectionTest
InstallSettingsResponse:
type: object
properties:
user:
$ref: '#/components/schemas/InstallUserModel'
databases:
type: array
items:
$ref: '#/components/schemas/InstallDatabaseModel'
required:
- user
- databases
ProblemDetails:
type: object
properties:
type:
type: string
status:
type: number
format: float
title:
type: string
detail:
type: string
instance:
type: string
errors:
type: object
required:
- type
- status
InstallSetupUserConfiguration:
type: object
properties:
name:
type: string
email:
type: string
password:
type: string
subscribeToNewsletter:
type: boolean
required:
- name
- email
- password
- subscribeToNewsletter
InstallSetupDatabaseConfiguration:
type: object
properties:
id:
type: string
server:
type: string
nullable: true
password:
type: string
nullable: true
username:
type: string
nullable: true
name:
type: string
nullable: true
providerName:
type: string
nullable: true
useIntegratedAuthentication:
type: boolean
nullable: true
connectionString:
type: string
nullable: true
InstallSetupRequest:
type: object
properties:
user:
$ref: '#/components/schemas/InstallSetupUserConfiguration'
telemetryLevel:
$ref: '#/components/schemas/ConsentLevel'
database:
$ref: '#/components/schemas/InstallSetupDatabaseConfiguration'
required:
- user
- telemetryLevel
ManifestsResponse:
type: object
properties:
manifests:
type: array
items:
type: object
required:
- manifests
PackageInstalled:
type: object
properties:
id:
type: string
name:
type: string
alias:
type: string
version:
type: string
hasMigrations:
type: boolean
hasPendingMigrations:
type: boolean
plans:
type: array
items:
type: object
required:
- id
- name
- alias
- version
- hasMigrations
- hasPendingMigrations
- plans
ManifestsPackagesInstalledResponse:
type: object
properties:
packages:
type: array
items:
$ref: '#/components/schemas/PackageInstalled'
required:
- packages
ServerStatus:
type: string
enum:
- running
- must-install
- must-upgrade
StatusResponse:
type: object
properties:
serverStatus:
$ref: '#/components/schemas/ServerStatus'
required:
- serverStatus
VersionResponse:
type: object
properties:
version:
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:
username:
type: string
role:
type: string
required:
- username
- role
UserLoginRequest:
type: object
properties:
username:
type: string
password:
type: string
persist:
type: boolean
required:
- username
- password
- persist
AllowedSectionsResponse:
type: object
properties:
sections:
type: array
items:
type: string
required:
- sections
ConsentLevelSettings:
type: object
properties:
telemetryLevel:
$ref: '#/components/schemas/ConsentLevel'
required:
- telemetryLevel

View File

@@ -1,515 +0,0 @@
/**
* This file was auto-generated by openapi-typescript.
* Do not make direct changes to the file.
*/
export interface paths {
"/install/settings": {
get: operations["GetInstallSettings"];
};
"/install/setup": {
post: operations["PostInstallSetup"];
};
"/install/validateDatabase": {
post: operations["PostInstallValidateDatabase"];
};
"/manifests": {
get: operations["Manifests"];
};
"/manifests/packages": {
get: operations["ManifestsPackages"];
};
"/manifests/packages/installed": {
get: operations["ManifestsPackagesInstalled"];
};
"/published-cache/status": {
get: operations["PublishedCacheStatus"];
};
"/published-cache/reload": {
post: operations["PublishedCacheReload"];
};
"/published-cache/rebuild": {
post: operations["PublishedCacheRebuild"];
};
"/published-cache/collect": {
get: operations["PublishedCacheCollect"];
};
"/server/status": {
get: operations["GetStatus"];
};
"/server/version": {
get: operations["GetVersion"];
};
"/upgrade/settings": {
get: operations["GetUpgradeSettings"];
};
"/upgrade/authorize": {
post: operations["PostUpgradeAuthorize"];
};
"/user": {
get: operations["GetUser"];
};
"/user/login": {
post: operations["PostUserLogin"];
};
"/user/logout": {
post: operations["PostUserLogout"];
};
"/user/sections": {
get: operations["GetAllowedSections"];
};
"/telemetry/ConsentLevel": {
get: operations["GetConsentLevel"];
post: operations["PostConsentLevel"];
};
"/telemetry/ConsentLevels": {
get: operations["ConsentLevels"];
};
}
export interface components {
schemas: {
/** @enum {string} */
ConsentLevel: "Minimal" | "Basic" | "Detailed";
TelemetryModel: {
level: components["schemas"]["ConsentLevel"];
description: string;
};
InstallUserModel: {
/** Format: float */
minCharLength: number;
/** Format: float */
minNonAlphaNumericLength: number;
consentLevels: components["schemas"]["TelemetryModel"][];
};
InstallDatabaseModel: {
id: string;
/** Format: float */
sortOrder: number;
displayName: string;
defaultDatabaseName: string;
providerName: string | null;
isConfigured: boolean;
requiresServer: boolean;
serverPlaceholder: string | null;
requiresCredentials: boolean;
supportsIntegratedAuthentication: boolean;
requiresConnectionTest: boolean;
};
InstallSettingsResponse: {
user: components["schemas"]["InstallUserModel"];
databases: components["schemas"]["InstallDatabaseModel"][];
};
ProblemDetails: {
type: string;
/** Format: float */
status: number;
title?: string;
detail?: string;
instance?: string;
errors?: { [key: string]: unknown };
};
InstallSetupUserConfiguration: {
name: string;
email: string;
password: string;
subscribeToNewsletter: boolean;
};
InstallSetupDatabaseConfiguration: {
id?: string;
server?: string | null;
password?: string | null;
username?: string | null;
name?: string | null;
providerName?: string | null;
useIntegratedAuthentication?: boolean | null;
connectionString?: string | null;
};
InstallSetupRequest: {
user: components["schemas"]["InstallSetupUserConfiguration"];
telemetryLevel: components["schemas"]["ConsentLevel"];
database?: components["schemas"]["InstallSetupDatabaseConfiguration"];
};
ManifestsResponse: {
manifests: { [key: string]: unknown }[];
};
PackageInstalled: {
id: string;
name: string;
alias: string;
version: string;
hasMigrations: boolean;
hasPendingMigrations: boolean;
plans: { [key: string]: unknown }[];
};
ManifestsPackagesInstalledResponse: {
packages: components["schemas"]["PackageInstalled"][];
};
/** @enum {string} */
ServerStatus: "running" | "must-install" | "must-upgrade";
StatusResponse: {
serverStatus: components["schemas"]["ServerStatus"];
};
VersionResponse: {
version: string;
};
UpgradeSettingsResponse: {
currentState: string;
newState: string;
newVersion: string;
oldVersion: string;
reportUrl: string;
};
UserResponse: {
username: string;
role: string;
};
UserLoginRequest: {
username: string;
password: string;
persist: boolean;
};
AllowedSectionsResponse: {
sections: string[];
};
ConsentLevelSettings: {
telemetryLevel: components["schemas"]["ConsentLevel"];
};
};
}
export interface operations {
GetInstallSettings: {
responses: {
/** 200 response */
200: {
content: {
"application/json": components["schemas"]["InstallSettingsResponse"];
};
};
/** default response */
default: {
content: {
"application/json": components["schemas"]["ProblemDetails"];
};
};
};
};
PostInstallSetup: {
parameters: {};
responses: {
/** 201 response */
201: unknown;
/** 400 response */
400: {
content: {
"application/json": components["schemas"]["ProblemDetails"];
};
};
};
requestBody: {
content: {
"application/json": components["schemas"]["InstallSetupRequest"];
};
};
};
PostInstallValidateDatabase: {
parameters: {};
responses: {
/** 201 response */
201: unknown;
/** 400 response */
400: {
content: {
"application/json": components["schemas"]["ProblemDetails"];
};
};
};
requestBody: {
content: {
"application/json": components["schemas"]["InstallSetupDatabaseConfiguration"];
};
};
};
Manifests: {
responses: {
/** 200 response */
200: {
content: {
"application/json": components["schemas"]["ManifestsResponse"];
};
};
/** default response */
default: {
content: {
"application/json": components["schemas"]["ProblemDetails"];
};
};
};
};
ManifestsPackages: {
responses: {
/** 200 response */
200: {
content: {
"application/json": { [key: string]: unknown };
};
};
/** default response */
default: {
content: {
"application/json": components["schemas"]["ProblemDetails"];
};
};
};
};
ManifestsPackagesInstalled: {
responses: {
/** 200 response */
200: {
content: {
"application/json": components["schemas"]["ManifestsPackagesInstalledResponse"];
};
};
/** default response */
default: {
content: {
"application/json": components["schemas"]["ProblemDetails"];
};
};
};
};
PublishedCacheStatus: {
responses: {
/** 200 response */
200: {
content: {
"application/json": string;
};
};
/** default response */
default: {
content: {
"application/json": components["schemas"]["ProblemDetails"];
};
};
};
};
PublishedCacheReload: {
parameters: {};
responses: {
/** 201 response */
201: unknown;
/** 400 response */
400: {
content: {
"application/json": components["schemas"]["ProblemDetails"];
};
};
};
};
PublishedCacheRebuild: {
parameters: {};
responses: {
/** 201 response */
201: unknown;
/** 400 response */
400: {
content: {
"application/json": components["schemas"]["ProblemDetails"];
};
};
};
};
PublishedCacheCollect: {
responses: {
/** 200 response */
200: {
content: {
"application/json": string;
};
};
/** default response */
default: {
content: {
"application/json": components["schemas"]["ProblemDetails"];
};
};
};
};
GetStatus: {
responses: {
/** 200 response */
200: {
content: {
"application/json": components["schemas"]["StatusResponse"];
};
};
/** default response */
default: {
content: {
"application/json": components["schemas"]["ProblemDetails"];
};
};
};
};
GetVersion: {
responses: {
/** 200 response */
200: {
content: {
"application/json": components["schemas"]["VersionResponse"];
};
};
/** default response */
default: {
content: {
"application/json": components["schemas"]["ProblemDetails"];
};
};
};
};
GetUpgradeSettings: {
responses: {
/** 200 response */
200: {
content: {
"application/json": components["schemas"]["UpgradeSettingsResponse"];
};
};
/** default response */
default: {
content: {
"application/json": components["schemas"]["ProblemDetails"];
};
};
};
};
PostUpgradeAuthorize: {
parameters: {};
responses: {
/** 201 response */
201: unknown;
/** 400 response */
400: {
content: {
"application/json": components["schemas"]["ProblemDetails"];
};
};
};
};
GetUser: {
responses: {
/** 200 response */
200: {
content: {
"application/json": components["schemas"]["UserResponse"];
};
};
/** 403 response */
403: {
content: {
"application/json": components["schemas"]["ProblemDetails"];
};
};
};
};
PostUserLogin: {
parameters: {};
responses: {
/** 201 response */
201: unknown;
/** 403 response */
403: {
content: {
"application/json": components["schemas"]["ProblemDetails"];
};
};
};
requestBody: {
content: {
"application/json": components["schemas"]["UserLoginRequest"];
};
};
};
PostUserLogout: {
responses: {
/** 201 response */
201: unknown;
/** default response */
default: {
content: {
"application/json": components["schemas"]["ProblemDetails"];
};
};
};
};
GetAllowedSections: {
responses: {
/** 200 response */
200: {
content: {
"application/json": components["schemas"]["AllowedSectionsResponse"];
};
};
/** default response */
default: {
content: {
"application/json": components["schemas"]["ProblemDetails"];
};
};
};
};
GetConsentLevel: {
responses: {
/** 200 response */
200: {
content: {
"application/json": components["schemas"]["ConsentLevelSettings"];
};
};
/** default response */
default: {
content: {
"application/json": components["schemas"]["ProblemDetails"];
};
};
};
};
PostConsentLevel: {
parameters: {};
responses: {
/** 201 response */
201: unknown;
/** 400 response */
400: {
content: {
"application/json": components["schemas"]["ProblemDetails"];
};
};
};
requestBody: {
content: {
"application/json": components["schemas"]["ConsentLevelSettings"];
};
};
};
ConsentLevels: {
responses: {
/** 200 response */
200: {
content: {
"application/json": string[];
};
};
/** default response */
default: {
content: {
"application/json": components["schemas"]["ProblemDetails"];
};
};
};
};
}
export interface external {}

View File

@@ -79,7 +79,6 @@ export type { PagedFolderTreeItem } from './models/PagedFolderTreeItem';
export type { PagedHelpPage } from './models/PagedHelpPage';
export type { PagedIndex } from './models/PagedIndex';
export type { PagedLanguage } from './models/PagedLanguage';
export type { PagedPaged } from './models/PagedPaged';
export type { PagedRecycleBinItem } from './models/PagedRecycleBinItem';
export type { PagedRelation } from './models/PagedRelation';
export type { PagedRelationItem } from './models/PagedRelationItem';

View File

@@ -3,12 +3,13 @@
/* eslint-disable */
export type Index = {
name?: string | null;
name: string;
healthStatus?: string | null;
readonly isHealthy?: boolean;
canRebuild?: boolean;
readonly isHealthy: boolean;
canRebuild: boolean;
searcherName?: string | null;
documentCount?: number;
fieldCount?: number;
documentCount: number;
fieldCount: number;
providerProperties?: Record<string, any> | null;
};

View File

@@ -1,11 +0,0 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { PagedSearchResult } from './PagedSearchResult';
export type PagedPaged = {
total: number;
items: Array<PagedSearchResult>;
};

View File

@@ -4,8 +4,8 @@
import type { Index } from '../models/Index';
import type { OkResult } from '../models/OkResult';
import type { PagedIndex } from '../models/PagedIndex';
import type { PagedPaged } from '../models/PagedPaged';
import type { PagedSearcher } from '../models/PagedSearcher';
import type { PagedSearchResult } from '../models/PagedSearchResult';
import type { CancelablePromise } from '../core/CancelablePromise';
import { OpenAPI } from '../core/OpenAPI';
@@ -98,7 +98,7 @@ export class SearchResource {
}
/**
* @returns PagedPaged Success
* @returns PagedSearchResult Success
* @throws ApiError
*/
public static getSearchSearcherBySearcherNameSearch({
@@ -111,7 +111,7 @@ export class SearchResource {
query?: string,
skip?: number,
take?: number,
}): CancelablePromise<PagedPaged> {
}): CancelablePromise<PagedSearchResult> {
return __request(OpenAPI, {
method: 'GET',
url: '/umbraco/management/api/v1/search/searcher/{searcherName}/search',