Merge pull request #240 from umbraco/feature/backend-schema

Feature/backend schema
This commit is contained in:
Jacob Overgaard
2022-11-11 10:11:57 +01:00
committed by GitHub
185 changed files with 5055 additions and 5254 deletions

View File

@@ -2,7 +2,7 @@ import { rest } from 'msw';
import { expect, test } from '../test';
import { umbracoPath } from '@umbraco-cms/utils';
import type { ProblemDetails, StatusResponse } from '@umbraco-cms/models';
import { ProblemDetails, RuntimeLevel, ServerStatus } from '@umbraco-cms/backend-api';
test.describe('installer tests', () => {
test.beforeEach(async ({ page, worker }) => {
@@ -12,8 +12,8 @@ test.describe('installer tests', () => {
return res(
// Respond with a 200 status code
ctx.status(200),
ctx.json<StatusResponse>({
serverStatus: 'must-install',
ctx.json<ServerStatus>({
serverStatus: RuntimeLevel.INSTALL,
})
);
})

View File

@@ -1,7 +1,7 @@
import { rest } from 'msw';
import { expect, test } from '../test';
import { umbracoPath } from '@umbraco-cms/utils';
import type { ProblemDetails, StatusResponse } from '@umbraco-cms/models';
import { ProblemDetails, RuntimeLevel, ServerStatus } from '@umbraco-cms/backend-api';
test.describe('upgrader tests', () => {
test.beforeEach(async ({ page, worker }) => {
@@ -11,8 +11,8 @@ test.describe('upgrader tests', () => {
return res(
// Respond with a 200 status code
ctx.status(200),
ctx.json<StatusResponse>({
serverStatus: 'must-upgrade',
ctx.json<ServerStatus>({
serverStatus: RuntimeLevel.UPGRADE,
})
);
})

View File

@@ -57,6 +57,7 @@
"lit-html": "^2.4.0",
"msw": "^0.47.4",
"msw-storybook-addon": "^1.6.3",
"openapi-typescript-codegen": "^0.23.0",
"playwright-msw": "^1.0.2",
"plop": "^3.1.1",
"prettier": "2.7.1",
@@ -85,6 +86,36 @@
"node": ">=6.0.0"
}
},
"node_modules/@apidevtools/json-schema-ref-parser": {
"version": "9.0.9",
"resolved": "https://registry.npmjs.org/@apidevtools/json-schema-ref-parser/-/json-schema-ref-parser-9.0.9.tgz",
"integrity": "sha512-GBD2Le9w2+lVFoc4vswGI/TjkNIZSVp7+9xPf+X3uidBfWnAeUWmquteSyt0+VCrhNMWj/FTABISQrD3Z/YA+w==",
"dev": true,
"dependencies": {
"@jsdevtools/ono": "^7.1.3",
"@types/json-schema": "^7.0.6",
"call-me-maybe": "^1.0.1",
"js-yaml": "^4.1.0"
}
},
"node_modules/@apidevtools/json-schema-ref-parser/node_modules/argparse": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
"integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==",
"dev": true
},
"node_modules/@apidevtools/json-schema-ref-parser/node_modules/js-yaml": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz",
"integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==",
"dev": true,
"dependencies": {
"argparse": "^2.0.1"
},
"bin": {
"js-yaml": "bin/js-yaml.js"
}
},
"node_modules/@babel/code-frame": {
"version": "7.18.6",
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.18.6.tgz",
@@ -2504,6 +2535,12 @@
"@jridgewell/sourcemap-codec": "^1.4.10"
}
},
"node_modules/@jsdevtools/ono": {
"version": "7.1.3",
"resolved": "https://registry.npmjs.org/@jsdevtools/ono/-/ono-7.1.3.tgz",
"integrity": "sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg==",
"dev": true
},
"node_modules/@lit/reactive-element": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/@lit/reactive-element/-/reactive-element-1.4.1.tgz",
@@ -17108,6 +17145,18 @@
"integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==",
"dev": true
},
"node_modules/json-schema-ref-parser": {
"version": "9.0.9",
"resolved": "https://registry.npmjs.org/json-schema-ref-parser/-/json-schema-ref-parser-9.0.9.tgz",
"integrity": "sha512-qcP2lmGy+JUoQJ4DOQeLaZDqH9qSkeGCK3suKWxJXS82dg728Mn3j97azDMaOUmJAN4uCq91LdPx4K7E8F1a7Q==",
"dev": true,
"dependencies": {
"@apidevtools/json-schema-ref-parser": "9.0.9"
},
"engines": {
"node": ">=10"
}
},
"node_modules/json-schema-traverse": {
"version": "0.4.1",
"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
@@ -20390,6 +20439,45 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/openapi-typescript-codegen": {
"version": "0.23.0",
"resolved": "https://registry.npmjs.org/openapi-typescript-codegen/-/openapi-typescript-codegen-0.23.0.tgz",
"integrity": "sha512-gOJXy5g3H3HlLpVNN+USrNK2i2KYBmDczk9Xk34u6JorwrGiDJZUj+al4S+i9TXdfUQ/ZaLxE59Xf3wqkxGfqA==",
"dev": true,
"dependencies": {
"camelcase": "^6.3.0",
"commander": "^9.3.0",
"fs-extra": "^10.1.0",
"handlebars": "^4.7.7",
"json-schema-ref-parser": "^9.0.9"
},
"bin": {
"openapi": "bin/index.js"
}
},
"node_modules/openapi-typescript-codegen/node_modules/commander": {
"version": "9.4.1",
"resolved": "https://registry.npmjs.org/commander/-/commander-9.4.1.tgz",
"integrity": "sha512-5EEkTNyHNGFPD2H+c/dXXfQZYa/scCKasxWcXJaWnNJ99pnQN9Vnmqow+p+PlFPE63Q6mThaZws1T+HxfpgtPw==",
"dev": true,
"engines": {
"node": "^12.20.0 || >=14"
}
},
"node_modules/openapi-typescript-codegen/node_modules/fs-extra": {
"version": "10.1.0",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz",
"integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==",
"dev": true,
"dependencies": {
"graceful-fs": "^4.2.0",
"jsonfile": "^6.0.1",
"universalify": "^2.0.0"
},
"engines": {
"node": ">=12"
}
},
"node_modules/openapi-typescript-fetch": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/openapi-typescript-fetch/-/openapi-typescript-fetch-1.1.3.tgz",
@@ -28587,6 +28675,35 @@
"@jridgewell/trace-mapping": "^0.3.9"
}
},
"@apidevtools/json-schema-ref-parser": {
"version": "9.0.9",
"resolved": "https://registry.npmjs.org/@apidevtools/json-schema-ref-parser/-/json-schema-ref-parser-9.0.9.tgz",
"integrity": "sha512-GBD2Le9w2+lVFoc4vswGI/TjkNIZSVp7+9xPf+X3uidBfWnAeUWmquteSyt0+VCrhNMWj/FTABISQrD3Z/YA+w==",
"dev": true,
"requires": {
"@jsdevtools/ono": "^7.1.3",
"@types/json-schema": "^7.0.6",
"call-me-maybe": "^1.0.1",
"js-yaml": "^4.1.0"
},
"dependencies": {
"argparse": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
"integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==",
"dev": true
},
"js-yaml": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz",
"integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==",
"dev": true,
"requires": {
"argparse": "^2.0.1"
}
}
}
},
"@babel/code-frame": {
"version": "7.18.6",
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.18.6.tgz",
@@ -30286,6 +30403,12 @@
"@jridgewell/sourcemap-codec": "^1.4.10"
}
},
"@jsdevtools/ono": {
"version": "7.1.3",
"resolved": "https://registry.npmjs.org/@jsdevtools/ono/-/ono-7.1.3.tgz",
"integrity": "sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg==",
"dev": true
},
"@lit/reactive-element": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/@lit/reactive-element/-/reactive-element-1.4.1.tgz",
@@ -41517,6 +41640,15 @@
"integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==",
"dev": true
},
"json-schema-ref-parser": {
"version": "9.0.9",
"resolved": "https://registry.npmjs.org/json-schema-ref-parser/-/json-schema-ref-parser-9.0.9.tgz",
"integrity": "sha512-qcP2lmGy+JUoQJ4DOQeLaZDqH9qSkeGCK3suKWxJXS82dg728Mn3j97azDMaOUmJAN4uCq91LdPx4K7E8F1a7Q==",
"dev": true,
"requires": {
"@apidevtools/json-schema-ref-parser": "9.0.9"
}
},
"json-schema-traverse": {
"version": "0.4.1",
"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
@@ -43997,6 +44129,38 @@
"is-wsl": "^2.2.0"
}
},
"openapi-typescript-codegen": {
"version": "0.23.0",
"resolved": "https://registry.npmjs.org/openapi-typescript-codegen/-/openapi-typescript-codegen-0.23.0.tgz",
"integrity": "sha512-gOJXy5g3H3HlLpVNN+USrNK2i2KYBmDczk9Xk34u6JorwrGiDJZUj+al4S+i9TXdfUQ/ZaLxE59Xf3wqkxGfqA==",
"dev": true,
"requires": {
"camelcase": "^6.3.0",
"commander": "^9.3.0",
"fs-extra": "^10.1.0",
"handlebars": "^4.7.7",
"json-schema-ref-parser": "^9.0.9"
},
"dependencies": {
"commander": {
"version": "9.4.1",
"resolved": "https://registry.npmjs.org/commander/-/commander-9.4.1.tgz",
"integrity": "sha512-5EEkTNyHNGFPD2H+c/dXXfQZYa/scCKasxWcXJaWnNJ99pnQN9Vnmqow+p+PlFPE63Q6mThaZws1T+HxfpgtPw==",
"dev": true
},
"fs-extra": {
"version": "10.1.0",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz",
"integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==",
"dev": true,
"requires": {
"graceful-fs": "^4.2.0",
"jsonfile": "^6.0.1",
"universalify": "^2.0.0"
}
}
}
},
"openapi-typescript-fetch": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/openapi-typescript-fetch/-/openapi-typescript-fetch-1.1.3.tgz",

View File

@@ -27,7 +27,8 @@
"lint:fix": "npm run lint -- --fix",
"format": "prettier 'src/**/*.ts'",
"format:fix": "npm run format -- --write",
"generate:api": "npx openapi-typescript schemas/**/*.yml --output schemas/generated-schema.ts",
"generate:api": "openapi --input https://raw.githubusercontent.com/umbraco/Umbraco-CMS/v11/dev/src/Umbraco.Cms.ManagementApi/OpenApi.json --output src/core/backend-api --postfix Resource --useOptions",
"generate:api-dev": "openapi --input http://localhost:9000/umbraco/swagger/v1/swagger.json --output src/core/backend-api --postfix Resource --useOptions",
"storybook": "npm run wc-analyze && start-storybook -p 6006",
"build-storybook": "npm run wc-analyze && build-storybook",
"generate:icons": "node ./devops/icons/index.mjs",
@@ -88,6 +89,7 @@
"lit-html": "^2.4.0",
"msw": "^0.47.4",
"msw-storybook-addon": "^1.6.3",
"openapi-typescript-codegen": "^0.23.0",
"playwright-msw": "^1.0.2",
"plop": "^3.1.1",
"prettier": "2.7.1",

View File

@@ -1,23 +1,20 @@
import './core/css/custom-properties.css';
import '@umbraco-ui/uui-modal';
import '@umbraco-ui/uui-modal-container';
import '@umbraco-ui/uui-modal-dialog';
import '@umbraco-ui/uui-modal-sidebar';
import 'router-slot';
// TODO: remove these imports when they are part of UUI
import '@umbraco-ui/uui-modal';
import '@umbraco-ui/uui-modal-sidebar';
import '@umbraco-ui/uui-modal-container';
import '@umbraco-ui/uui-modal-dialog';
import type { Guard, IRoute } from 'router-slot/model';
import { UUIIconRegistryEssential } from '@umbraco-ui/uui';
import { css, html, LitElement } from 'lit';
import { customElement, state } from 'lit/decorators.js';
import type { Guard, IRoute } from 'router-slot/model';
import { umbExtensionsRegistry } from '@umbraco-cms/extensions-registry';
import { getManifests, getServerStatus } from '@umbraco-cms/backend-api';
import { OpenAPI, RuntimeLevel, ServerResource } from '@umbraco-cms/backend-api';
import { UmbContextProviderMixin } from '@umbraco-cms/context-api';
import type { ManifestTypes, ServerStatus } from '@umbraco-cms/models';
@customElement('umb-app')
export class UmbApp extends UmbContextProviderMixin(LitElement) {
static styles = css`
@@ -56,40 +53,51 @@ export class UmbApp extends UmbContextProviderMixin(LitElement) {
];
private _iconRegistry = new UUIIconRegistryEssential();
private _serverStatus: ServerStatus = 'running';
private _runtimeLevel = RuntimeLevel.UNKNOWN;
constructor() {
super();
this._setup();
}
async connectedCallback() {
super.connectedCallback();
OpenAPI.BASE = '';
OpenAPI.WITH_CREDENTIALS = true;
await this._setInitStatus();
await this._registerExtensionManifestsFromServer();
this._redirect();
}
private async _setup() {
this._iconRegistry.attach(this);
await this._registerExtensionManifestsFromServer();
await this._setInitStatus();
this._redirect();
}
private async _setInitStatus() {
try {
const { data } = await getServerStatus({});
this._serverStatus = data.serverStatus;
const serverStatus = await ServerResource.getServerStatus();
if (serverStatus.serverStatus) {
this._runtimeLevel = serverStatus.serverStatus;
}
} catch (error) {
console.log(error);
}
}
private _redirect() {
switch (this._serverStatus) {
case 'must-install':
switch (this._runtimeLevel) {
case RuntimeLevel.INSTALL:
history.replaceState(null, '', '/install');
break;
case 'must-upgrade':
case RuntimeLevel.UPGRADE:
history.replaceState(null, '', '/upgrade');
break;
case 'running': {
case RuntimeLevel.RUN: {
const pathname =
window.location.pathname === '/install' || window.location.pathname === '/upgrade'
? '/'
@@ -97,6 +105,9 @@ export class UmbApp extends UmbContextProviderMixin(LitElement) {
history.replaceState(null, '', pathname);
break;
}
default:
throw new Error(`Unsupported runtime level: ${this._runtimeLevel}`);
}
}
@@ -122,9 +133,10 @@ export class UmbApp extends UmbContextProviderMixin(LitElement) {
}
private async _registerExtensionManifestsFromServer() {
const res = await getManifests({});
const { manifests } = res.data as unknown as { manifests: ManifestTypes[] };
manifests.forEach((manifest) => umbExtensionsRegistry.register(manifest));
// TODO: Implement once manifest endpoint exists
// const res = await getManifests({});
// const { manifests } = res.data as unknown as { manifests: ManifestTypes[] };
// manifests.forEach((manifest) => umbExtensionsRegistry.register(manifest));
}
render() {

View File

@@ -6,8 +6,6 @@ import { customElement, state } from 'lit/decorators.js';
import { ifDefined } from 'lit/directives/if-defined.js';
import { query } from 'router-slot';
import { postUserLogin } from '@umbraco-cms/backend-api';
@customElement('umb-login')
export default class UmbLogin extends LitElement {
static styles: CSSResultGroup = [
@@ -42,10 +40,10 @@ export default class UmbLogin extends LitElement {
};
private async _login(username: string, password: string, persist: boolean) {
// TODO: Move login to new login app
this._loggingIn = true;
try {
await postUserLogin({ username, password, persist });
this._loggingIn = false;
let { redirectTo } = query();
if (!redirectTo) {

View File

@@ -6,13 +6,9 @@ import { customElement, state } from 'lit/decorators.js';
import { UmbModalService } from '../../../core/services/modal';
import { UmbNotificationService } from '../../../core/services/notification';
import { UmbNotificationDefaultData } from '../../../core/services/notification/layouts/default';
import {
getPublishedCacheStatus,
postPublishedCacheReload,
postPublishedCacheRebuild,
getPublishedCacheCollect,
} from '@umbraco-cms/backend-api';
import { UmbContextConsumerMixin } from '@umbraco-cms/context-api';
import { ApiError, ProblemDetails, PublishedCacheResource } from '@umbraco-cms/backend-api';
@customElement('umb-dashboard-published-status')
export class UmbDashboardPublishedStatusElement extends UmbContextConsumerMixin(LitElement) {
@@ -64,12 +60,12 @@ export class UmbDashboardPublishedStatusElement extends UmbContextConsumerMixin(
private async _getPublishedStatus() {
try {
const { data } = await getPublishedCacheStatus({});
const data = await PublishedCacheResource.getPublishedCacheStatus();
this._publishedStatusText = data;
} catch (e) {
if (e instanceof getPublishedCacheStatus.Error) {
const error = e.getActualType();
const data: UmbNotificationDefaultData = { message: error.data.detail ?? 'Something went wrong' };
if (e instanceof ApiError) {
const error = e.body as ProblemDetails;
const data: UmbNotificationDefaultData = { message: error.detail ?? 'Something went wrong' };
this._notificationService?.peek('danger', { data });
}
}
@@ -85,16 +81,16 @@ export class UmbDashboardPublishedStatusElement extends UmbContextConsumerMixin(
this._buttonStateReload = 'waiting';
this._buttonState = 'waiting';
try {
await postPublishedCacheReload({});
await PublishedCacheResource.postPublishedCacheReload();
this._buttonStateReload = 'success';
this._getPublishedStatus();
this._buttonState = 'success';
} catch (e) {
this._buttonStateReload = 'failed';
this._buttonState = 'failed';
if (e instanceof postPublishedCacheReload.Error) {
const error = e.getActualType();
const data: UmbNotificationDefaultData = { message: error.data.detail ?? 'Something went wrong' };
if (e instanceof ApiError) {
const error = e.body as ProblemDetails;
const data: UmbNotificationDefaultData = { message: error.detail ?? 'Something went wrong' };
this._notificationService?.peek('danger', { data });
}
}
@@ -115,13 +111,13 @@ export class UmbDashboardPublishedStatusElement extends UmbContextConsumerMixin(
private async _rebuildDatabaseCache() {
this._buttonStateRebuild = 'waiting';
try {
await postPublishedCacheRebuild({});
await PublishedCacheResource.postPublishedCacheRebuild();
this._buttonStateRebuild = 'success';
} catch (e) {
this._buttonStateRebuild = 'failed';
if (e instanceof postPublishedCacheRebuild.Error) {
const error = e.getActualType();
const data: UmbNotificationDefaultData = { message: error.data.detail ?? 'Something went wrong' };
if (e instanceof ApiError) {
const error = e.body as ProblemDetails;
const data: UmbNotificationDefaultData = { message: error.detail ?? 'Something went wrong' };
this._notificationService?.peek('danger', { data });
}
}
@@ -141,12 +137,12 @@ export class UmbDashboardPublishedStatusElement extends UmbContextConsumerMixin(
//Collect
private async _cacheCollect() {
try {
await getPublishedCacheCollect({});
await PublishedCacheResource.postPublishedCacheCollect();
this._buttonStateCollect = 'success';
} catch (e) {
this._buttonStateCollect = 'failed';
if (e instanceof getPublishedCacheCollect.Error) {
const error = e.getActualType();
if (e instanceof ApiError) {
const error = e.body as ProblemDetails;
const data: UmbNotificationDefaultData = { message: error.data.detail ?? 'Something went wrong' };
this._notificationService?.peek('danger', { data });
}

View File

@@ -2,8 +2,7 @@ import { UUITextStyles } from '@umbraco-ui/uui-css/lib';
import { css, html, LitElement } from 'lit';
import { unsafeHTML } from 'lit/directives/unsafe-html.js';
import { customElement, state } from 'lit/decorators.js';
import { getConsentLevel, getConsentLevels, postConsentLevel } from '@umbraco-cms/backend-api';
import type { TelemetryModel } from '@umbraco-cms/models';
import { ApiError, ProblemDetails, Telemetry, TelemetryLevel, TelemetryResource } from '@umbraco-cms/backend-api';
export type SettingOption = 'Minimal' | 'Basic' | 'Detailed';
@@ -19,10 +18,10 @@ export class UmbDashboardTelemetryElement extends LitElement {
];
@state()
private _telemetryFormData: TelemetryModel['level'] = 'Basic';
private _telemetryFormData = TelemetryLevel.BASIC;
@state()
private _telemetryLevels: TelemetryModel['level'][] = [];
private _telemetryLevels: Telemetry[] = [];
@state()
private _errorMessage = '';
@@ -38,17 +37,22 @@ export class UmbDashboardTelemetryElement extends LitElement {
private async _setup() {
try {
const consentLevels = await getConsentLevels({});
this._telemetryLevels = consentLevels.data as TelemetryModel['level'][];
const consentLevels = await TelemetryResource.getTelemetry({});
this._telemetryLevels = consentLevels.items ?? [];
} catch (e) {
this._errorMessage;
if (e instanceof ApiError) {
const error = e.body as ProblemDetails;
this._errorMessage = error.detail;
}
}
try {
const consentSetting = await getConsentLevel({});
this._telemetryFormData = consentSetting.data.telemetryLevel as TelemetryModel['level'];
const consentSetting = await TelemetryResource.getTelemetryLevel();
this._telemetryFormData = consentSetting.telemetryLevel ?? TelemetryLevel.BASIC;
} catch (e) {
if (e instanceof getConsentLevel.Error) {
this._errorMessage = e.data.detail;
if (e instanceof ApiError) {
const error = e.body as ProblemDetails;
this._errorMessage = error.detail;
}
}
}
@@ -56,12 +60,14 @@ export class UmbDashboardTelemetryElement extends LitElement {
private _handleSubmit = async (e: CustomEvent<SubmitEvent>) => {
e.stopPropagation();
try {
await postConsentLevel({ telemetryLevel: this._telemetryFormData });
await TelemetryResource.postTelemetryLevel({
requestBody: { telemetryLevel: this._telemetryFormData },
});
} catch (e) {
if (e instanceof postConsentLevel.Error) {
const error = e.getActualType();
if (error.status === 400) {
this._errorMessage = error.data.detail || 'Unknown error, please try again';
if (e instanceof ApiError) {
const error = e.body as ProblemDetails;
if (e.status === 400) {
this._errorMessage = error.detail || 'Unknown error, please try again';
}
} else {
this._errorMessage = 'Unknown error, please try again';
@@ -75,31 +81,31 @@ export class UmbDashboardTelemetryElement extends LitElement {
private _handleChange(e: InputEvent) {
const target = e.target as HTMLInputElement;
this._telemetryFormData = this._telemetryLevels[parseInt(target.value) - 1];
this._telemetryFormData = this._telemetryLevels[parseInt(target.value) - 1].telemetryLevel ?? TelemetryLevel.BASIC;
}
private get _selectedTelemetryIndex() {
return this._telemetryLevels?.findIndex((x) => x === this._telemetryFormData) ?? 0;
return this._telemetryLevels.findIndex((x) => x.telemetryLevel === this._telemetryFormData) ?? 0;
}
private get _selectedTelemetry() {
return this._telemetryLevels?.find((x) => x === this._telemetryFormData) ?? this._telemetryLevels[0];
return this._telemetryLevels.find((x) => x.telemetryLevel === this._telemetryFormData) ?? this._telemetryLevels[1];
}
private get _selectedTelemetryDescription() {
switch (this._selectedTelemetry) {
case 'Minimal':
switch (this._selectedTelemetry.telemetryLevel) {
case TelemetryLevel.MINIMAL:
return 'We will only send an anonymized site ID to let us know that the site exists.';
case 'Basic':
case TelemetryLevel.BASIC:
return 'We will send an anonymized site ID, Umbraco version, and packages installed.';
case 'Detailed':
case TelemetryLevel.DETAILED:
return `We will send:<ul>
<li>Anonymized site ID, Umbraco version, and packages installed.</li>
<li>Number of: Root nodes, Content nodes, Macros, Media, Document Types, Templates, Languages, Domains, User Group, Users, Members, and Property Editors in use.</li>
<li>System information: Webserver, server OS, server framework, server OS language, and database provider.</li>
<li>Configuration settings: Modelsbuilder mode, if custom Umbraco path exists, ASP environment, and if you are in debug mode.</li>
</ul>
<i>We might change what we send on the Detailed level in the future. If so, it will be listed above.
By choosing "Detailed" you agree to current and future anonymized information being collected.</i>`;
default:
@@ -119,7 +125,7 @@ export class UmbDashboardTelemetryElement extends LitElement {
min="1"
max=${this._telemetryLevels.length}
hide-step-values></uui-slider>
<h2>${this._selectedTelemetry}</h2>
<h2>${this._selectedTelemetry.telemetryLevel}</h2>
<p>${unsafeHTML(this._selectedTelemetryDescription)}</p>
`;
}
@@ -143,6 +149,7 @@ export class UmbDashboardTelemetryElement extends LitElement {
Save
</uui-button>
</div>
${this._errorMessage ? html`<p class="error">${this._errorMessage}</p>` : ''}
</uui-box>
`;
}

View File

@@ -7,12 +7,12 @@ import { createExtensionElement } from '@umbraco-cms/extensions-api';
import { umbExtensionsRegistry } from '@umbraco-cms/extensions-registry';
import { UmbContextConsumerMixin } from '@umbraco-cms/context-api';
import type { ManifestPackageView, PackageInstalled } from '@umbraco-cms/models';
import type { ManifestPackageView } from '@umbraco-cms/models';
@customElement('umb-packages-installed-item')
export class UmbPackagesInstalledItem extends UmbContextConsumerMixin(LitElement) {
@property({ type: Object })
package!: PackageInstalled;
package!: any; // TODO: Use real type
@state()
private _packageView?: ManifestPackageView;

View File

@@ -1,15 +1,13 @@
import { html, LitElement, nothing } from 'lit';
import { customElement, state } from 'lit/decorators.js';
import { repeat } from 'lit/directives/repeat.js';
import { getPackagesInstalled } from '@umbraco-cms/backend-api';
import type { PackageInstalled } from '@umbraco-cms/models';
import './packages-installed-item.element';
@customElement('umb-packages-installed-overview')
export class UmbPackagesInstalledOverviewElement extends LitElement {
@state()
private _installedPackages: PackageInstalled[] = [];
private _installedPackages: any[] = []; // TODO: Use real type
@state()
private _errorMessage = '';
@@ -24,17 +22,18 @@ export class UmbPackagesInstalledOverviewElement extends LitElement {
private async _loadInstalledPackages() {
this._errorMessage = '';
try {
const {
data: { packages },
} = await getPackagesInstalled({});
this._installedPackages = packages;
} catch (e) {
if (e instanceof getPackagesInstalled.Error) {
const error = e.getActualType();
this._errorMessage = error.data.detail ?? 'An error occurred while loading the installed packages';
}
}
// TODO: Implement when API is ready
// try {
// const {
// data: { packages },
// } = await getPackagesInstalled({});
// this._installedPackages = packages;
// } catch (e) {
// if (e instanceof getPackagesInstalled.Error) {
// const error = e.getActualType();
// this._errorMessage = error.data.detail ?? 'An error occurred while loading the installed packages';
// }
// }
}
render() {

View File

@@ -0,0 +1,24 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { ApiRequestOptions } from './ApiRequestOptions';
import type { ApiResult } from './ApiResult';
export class ApiError extends Error {
public readonly url: string;
public readonly status: number;
public readonly statusText: string;
public readonly body: any;
public readonly request: ApiRequestOptions;
constructor(request: ApiRequestOptions, response: ApiResult, message: string) {
super(message);
this.name = 'ApiError';
this.url = response.url;
this.status = response.status;
this.statusText = response.statusText;
this.body = response.body;
this.request = request;
}
}

View File

@@ -0,0 +1,16 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type ApiRequestOptions = {
readonly method: 'GET' | 'PUT' | 'POST' | 'DELETE' | 'OPTIONS' | 'HEAD' | 'PATCH';
readonly url: string;
readonly path?: Record<string, any>;
readonly cookies?: Record<string, any>;
readonly headers?: Record<string, any>;
readonly query?: Record<string, any>;
readonly formData?: Record<string, any>;
readonly body?: any;
readonly mediaType?: string;
readonly responseHeader?: string;
readonly errors?: Record<number, string>;
};

View File

@@ -0,0 +1,10 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type ApiResult = {
readonly url: string;
readonly ok: boolean;
readonly status: number;
readonly statusText: string;
readonly body: any;
};

View File

@@ -0,0 +1,128 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export class CancelError extends Error {
constructor(message: string) {
super(message);
this.name = 'CancelError';
}
public get isCancelled(): boolean {
return true;
}
}
export interface OnCancel {
readonly isResolved: boolean;
readonly isRejected: boolean;
readonly isCancelled: boolean;
(cancelHandler: () => void): void;
}
export class CancelablePromise<T> implements Promise<T> {
readonly [Symbol.toStringTag]!: string;
private _isResolved: boolean;
private _isRejected: boolean;
private _isCancelled: boolean;
private readonly _cancelHandlers: (() => void)[];
private readonly _promise: Promise<T>;
private _resolve?: (value: T | PromiseLike<T>) => void;
private _reject?: (reason?: any) => void;
constructor(
executor: (
resolve: (value: T | PromiseLike<T>) => void,
reject: (reason?: any) => void,
onCancel: OnCancel
) => void
) {
this._isResolved = false;
this._isRejected = false;
this._isCancelled = false;
this._cancelHandlers = [];
this._promise = new Promise<T>((resolve, reject) => {
this._resolve = resolve;
this._reject = reject;
const onResolve = (value: T | PromiseLike<T>): void => {
if (this._isResolved || this._isRejected || this._isCancelled) {
return;
}
this._isResolved = true;
this._resolve?.(value);
};
const onReject = (reason?: any): void => {
if (this._isResolved || this._isRejected || this._isCancelled) {
return;
}
this._isRejected = true;
this._reject?.(reason);
};
const onCancel = (cancelHandler: () => void): void => {
if (this._isResolved || this._isRejected || this._isCancelled) {
return;
}
this._cancelHandlers.push(cancelHandler);
};
Object.defineProperty(onCancel, 'isResolved', {
get: (): boolean => this._isResolved,
});
Object.defineProperty(onCancel, 'isRejected', {
get: (): boolean => this._isRejected,
});
Object.defineProperty(onCancel, 'isCancelled', {
get: (): boolean => this._isCancelled,
});
return executor(onResolve, onReject, onCancel as OnCancel);
});
}
public then<TResult1 = T, TResult2 = never>(
onFulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null,
onRejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null
): Promise<TResult1 | TResult2> {
return this._promise.then(onFulfilled, onRejected);
}
public catch<TResult = never>(
onRejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null
): Promise<T | TResult> {
return this._promise.catch(onRejected);
}
public finally(onFinally?: (() => void) | null): Promise<T> {
return this._promise.finally(onFinally);
}
public cancel(): void {
if (this._isResolved || this._isRejected || this._isCancelled) {
return;
}
this._isCancelled = true;
if (this._cancelHandlers.length) {
try {
for (const cancelHandler of this._cancelHandlers) {
cancelHandler();
}
} catch (error) {
console.warn('Cancellation threw an error', error);
return;
}
}
this._cancelHandlers.length = 0;
this._reject?.(new CancelError('Request aborted'));
}
public get isCancelled(): boolean {
return this._isCancelled;
}
}

View File

@@ -0,0 +1,31 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { ApiRequestOptions } from './ApiRequestOptions';
type Resolver<T> = (options: ApiRequestOptions) => Promise<T>;
type Headers = Record<string, string>;
export type OpenAPIConfig = {
BASE: string;
VERSION: string;
WITH_CREDENTIALS: boolean;
CREDENTIALS: 'include' | 'omit' | 'same-origin';
TOKEN?: string | Resolver<string>;
USERNAME?: string | Resolver<string>;
PASSWORD?: string | Resolver<string>;
HEADERS?: Headers | Resolver<Headers>;
ENCODE_PATH?: (path: string) => string;
};
export const OpenAPI: OpenAPIConfig = {
BASE: '',
VERSION: '1.0',
WITH_CREDENTIALS: false,
CREDENTIALS: 'include',
TOKEN: undefined,
USERNAME: undefined,
PASSWORD: undefined,
HEADERS: undefined,
ENCODE_PATH: undefined,
};

View File

@@ -0,0 +1,306 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import { ApiError } from './ApiError';
import type { ApiRequestOptions } from './ApiRequestOptions';
import type { ApiResult } from './ApiResult';
import { CancelablePromise } from './CancelablePromise';
import type { OnCancel } from './CancelablePromise';
import type { OpenAPIConfig } from './OpenAPI';
const isDefined = <T>(value: T | null | undefined): value is Exclude<T, null | undefined> => {
return value !== undefined && value !== null;
};
const isString = (value: any): value is string => {
return typeof value === 'string';
};
const isStringWithValue = (value: any): value is string => {
return isString(value) && value !== '';
};
const isBlob = (value: any): value is Blob => {
return (
typeof value === 'object' &&
typeof value.type === 'string' &&
typeof value.stream === 'function' &&
typeof value.arrayBuffer === 'function' &&
typeof value.constructor === 'function' &&
typeof value.constructor.name === 'string' &&
/^(Blob|File)$/.test(value.constructor.name) &&
/^(Blob|File)$/.test(value[Symbol.toStringTag])
);
};
const isFormData = (value: any): value is FormData => {
return value instanceof FormData;
};
const base64 = (str: string): string => {
try {
return btoa(str);
} catch (err) {
// @ts-ignore
return Buffer.from(str).toString('base64');
}
};
const getQueryString = (params: Record<string, any>): string => {
const qs: string[] = [];
const append = (key: string, value: any) => {
qs.push(`${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`);
};
const process = (key: string, value: any) => {
if (isDefined(value)) {
if (Array.isArray(value)) {
value.forEach(v => {
process(key, v);
});
} else if (typeof value === 'object') {
Object.entries(value).forEach(([k, v]) => {
process(`${key}[${k}]`, v);
});
} else {
append(key, value);
}
}
};
Object.entries(params).forEach(([key, value]) => {
process(key, value);
});
if (qs.length > 0) {
return `?${qs.join('&')}`;
}
return '';
};
const getUrl = (config: OpenAPIConfig, options: ApiRequestOptions): string => {
const encoder = config.ENCODE_PATH || encodeURI;
const path = options.url
.replace('{api-version}', config.VERSION)
.replace(/{(.*?)}/g, (substring: string, group: string) => {
if (options.path?.hasOwnProperty(group)) {
return encoder(String(options.path[group]));
}
return substring;
});
const url = `${config.BASE}${path}`;
if (options.query) {
return `${url}${getQueryString(options.query)}`;
}
return url;
};
const getFormData = (options: ApiRequestOptions): FormData | undefined => {
if (options.formData) {
const formData = new FormData();
const process = (key: string, value: any) => {
if (isString(value) || isBlob(value)) {
formData.append(key, value);
} else {
formData.append(key, JSON.stringify(value));
}
};
Object.entries(options.formData)
.filter(([_, value]) => isDefined(value))
.forEach(([key, value]) => {
if (Array.isArray(value)) {
value.forEach(v => process(key, v));
} else {
process(key, value);
}
});
return formData;
}
return undefined;
};
type Resolver<T> = (options: ApiRequestOptions) => Promise<T>;
const resolve = async <T>(options: ApiRequestOptions, resolver?: T | Resolver<T>): Promise<T | undefined> => {
if (typeof resolver === 'function') {
return (resolver as Resolver<T>)(options);
}
return resolver;
};
const getHeaders = async (config: OpenAPIConfig, options: ApiRequestOptions): Promise<Headers> => {
const token = await resolve(options, config.TOKEN);
const username = await resolve(options, config.USERNAME);
const password = await resolve(options, config.PASSWORD);
const additionalHeaders = await resolve(options, config.HEADERS);
const headers = Object.entries({
Accept: 'application/json',
...additionalHeaders,
...options.headers,
})
.filter(([_, value]) => isDefined(value))
.reduce((headers, [key, value]) => ({
...headers,
[key]: String(value),
}), {} as Record<string, string>);
if (isStringWithValue(token)) {
headers['Authorization'] = `Bearer ${token}`;
}
if (isStringWithValue(username) && isStringWithValue(password)) {
const credentials = base64(`${username}:${password}`);
headers['Authorization'] = `Basic ${credentials}`;
}
if (options.body) {
if (options.mediaType) {
headers['Content-Type'] = options.mediaType;
} else if (isBlob(options.body)) {
headers['Content-Type'] = options.body.type || 'application/octet-stream';
} else if (isString(options.body)) {
headers['Content-Type'] = 'text/plain';
} else if (!isFormData(options.body)) {
headers['Content-Type'] = 'application/json';
}
}
return new Headers(headers);
};
const getRequestBody = (options: ApiRequestOptions): any => {
if (options.body) {
if (options.mediaType?.includes('/json')) {
return JSON.stringify(options.body)
} else if (isString(options.body) || isBlob(options.body) || isFormData(options.body)) {
return options.body;
} else {
return JSON.stringify(options.body);
}
}
return undefined;
};
export const sendRequest = async (
config: OpenAPIConfig,
options: ApiRequestOptions,
url: string,
body: any,
formData: FormData | undefined,
headers: Headers,
onCancel: OnCancel
): Promise<Response> => {
const controller = new AbortController();
const request: RequestInit = {
headers,
body: body ?? formData,
method: options.method,
signal: controller.signal,
};
if (config.WITH_CREDENTIALS) {
request.credentials = config.CREDENTIALS;
}
onCancel(() => controller.abort());
return await fetch(url, request);
};
const getResponseHeader = (response: Response, responseHeader?: string): string | undefined => {
if (responseHeader) {
const content = response.headers.get(responseHeader);
if (isString(content)) {
return content;
}
}
return undefined;
};
const getResponseBody = async (response: Response): Promise<any> => {
if (response.status !== 204) {
try {
const contentType = response.headers.get('Content-Type');
if (contentType) {
const isJSON = contentType.toLowerCase().startsWith('application/json');
if (isJSON) {
return await response.json();
} else {
return await response.text();
}
}
} catch (error) {
console.error(error);
}
}
return undefined;
};
const catchErrorCodes = (options: ApiRequestOptions, result: ApiResult): void => {
const errors: Record<number, string> = {
400: 'Bad Request',
401: 'Unauthorized',
403: 'Forbidden',
404: 'Not Found',
500: 'Internal Server Error',
502: 'Bad Gateway',
503: 'Service Unavailable',
...options.errors,
}
const error = errors[result.status];
if (error) {
throw new ApiError(options, result, error);
}
if (!result.ok) {
throw new ApiError(options, result, 'Generic Error');
}
};
/**
* Request method
* @param config The OpenAPI configuration object
* @param options The request options from the service
* @returns CancelablePromise<T>
* @throws ApiError
*/
export const request = <T>(config: OpenAPIConfig, options: ApiRequestOptions): CancelablePromise<T> => {
return new CancelablePromise(async (resolve, reject, onCancel) => {
try {
const url = getUrl(config, options);
const formData = getFormData(options);
const body = getRequestBody(options);
const headers = await getHeaders(config, options);
if (!onCancel.isCancelled) {
const response = await sendRequest(config, options, url, body, formData, headers, onCancel);
const responseBody = await getResponseBody(response);
const responseHeader = getResponseHeader(response, options.responseHeader);
const result: ApiResult = {
url,
ok: response.ok,
status: response.status,
statusText: response.statusText,
body: responseHeader ?? responseBody,
};
catchErrorCodes(options, result);
resolve(result.body);
}
} catch (error) {
reject(error);
}
});
};

View File

@@ -1,31 +0,0 @@
import { Fetcher } from 'openapi-typescript-fetch';
import type { paths } from '../../../schemas/generated-schema';
const fetcher = Fetcher.for<paths>();
fetcher.configure({
baseUrl: '/umbraco/backoffice',
});
export const getServerStatus = fetcher.path('/server/status').method('get').create();
export const getServerVersion = fetcher.path('/server/version').method('get').create();
export const getUser = fetcher.path('/user').method('get').create();
export const postUserLogin = fetcher.path('/user/login').method('post').create();
export const postUserLogout = fetcher.path('/user/logout').method('post').create();
export const getUserSections = fetcher.path('/user/sections').method('get').create();
export const getInstallSettings = fetcher.path('/install/settings').method('get').create();
export const postInstallValidateDatabase = fetcher.path('/install/validateDatabase').method('post').create();
export const postInstallSetup = fetcher.path('/install/setup').method('post').create();
export const getUpgradeSettings = fetcher.path('/upgrade/settings').method('get').create();
export const PostUpgradeAuthorize = fetcher.path('/upgrade/authorize').method('post').create();
export const getManifests = fetcher.path('/manifests').method('get').create();
export const getPackagesInstalled = fetcher.path('/manifests/packages/installed').method('get').create();
export const getConsentLevels = fetcher.path('/telemetry/ConsentLevels').method('get').create();
export const getConsentLevel = fetcher.path('/telemetry/ConsentLevel').method('get').create();
export const postConsentLevel = fetcher.path('/telemetry/ConsentLevel').method('post').create();
export const getPublishedCacheStatus = fetcher.path('/published-cache/status').method('get').create();
export const postPublishedCacheReload = fetcher.path('/published-cache/reload').method('post').create();
export const postPublishedCacheRebuild = fetcher.path('/published-cache/rebuild').method('post').create();
export const getPublishedCacheCollect = fetcher.path('/published-cache/collect').method('get').create();

View File

@@ -1 +1,145 @@
export * from './fetcher';
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export { ApiError } from './core/ApiError';
export { CancelablePromise, CancelError } from './core/CancelablePromise';
export { OpenAPI } from './core/OpenAPI';
export type { OpenAPIConfig } from './core/OpenAPI';
export type { Assembly } from './models/Assembly';
export type { BackOfficeNotification } from './models/BackOfficeNotification';
export { CallingConventions } from './models/CallingConventions';
export type { ConsentLevel } from './models/ConsentLevel';
export type { ConstructorInfo } from './models/ConstructorInfo';
export type { ContentApp } from './models/ContentApp';
export type { ContentAppBadge } from './models/ContentAppBadge';
export { ContentAppBadgeType } from './models/ContentAppBadgeType';
export type { ContentResult } from './models/ContentResult';
export type { ContentTreeItem } from './models/ContentTreeItem';
export type { CreatedResult } from './models/CreatedResult';
export type { Culture } from './models/Culture';
export type { CustomAttributeData } from './models/CustomAttributeData';
export type { CustomAttributeNamedArgument } from './models/CustomAttributeNamedArgument';
export type { CustomAttributeTypedArgument } from './models/CustomAttributeTypedArgument';
export type { DatabaseInstall } from './models/DatabaseInstall';
export type { DatabaseSettings } from './models/DatabaseSettings';
export type { Dictionary } from './models/Dictionary';
export type { DictionaryImport } from './models/DictionaryImport';
export type { DictionaryItem } from './models/DictionaryItem';
export type { DictionaryItemsImport } from './models/DictionaryItemsImport';
export type { DictionaryOverview } from './models/DictionaryOverview';
export type { DictionaryTranslation } from './models/DictionaryTranslation';
export type { DictionaryTranslationOverview } from './models/DictionaryTranslationOverview';
export type { DocumentBlueprintTreeItem } from './models/DocumentBlueprintTreeItem';
export type { DocumentTreeItem } from './models/DocumentTreeItem';
export type { DocumentTypeTreeItem } from './models/DocumentTypeTreeItem';
export type { EntityTreeItem } from './models/EntityTreeItem';
export { EventAttributes } from './models/EventAttributes';
export type { EventInfo } from './models/EventInfo';
export type { Field } from './models/Field';
export { FieldAttributes } from './models/FieldAttributes';
export type { FieldInfo } from './models/FieldInfo';
export type { FileSystemTreeItem } from './models/FileSystemTreeItem';
export type { FolderTreeItem } from './models/FolderTreeItem';
export { GenericParameterAttributes } from './models/GenericParameterAttributes';
export type { HelpPage } from './models/HelpPage';
export type { ICustomAttributeProvider } from './models/ICustomAttributeProvider';
export type { Index } from './models/Index';
export type { Install } from './models/Install';
export type { InstallSettings } from './models/InstallSettings';
export type { IntPtr } from './models/IntPtr';
export type { IOutputFormatter } from './models/IOutputFormatter';
export type { JsonPatch } from './models/JsonPatch';
export type { Language } from './models/Language';
export { LayoutKind } from './models/LayoutKind';
export type { MemberInfo } from './models/MemberInfo';
export { MemberTypes } from './models/MemberTypes';
export { MethodAttributes } from './models/MethodAttributes';
export type { MethodBase } from './models/MethodBase';
export { MethodImplAttributes } from './models/MethodImplAttributes';
export type { MethodInfo } from './models/MethodInfo';
export type { ModelsBuilder } from './models/ModelsBuilder';
export { ModelsMode } from './models/ModelsMode';
export type { Module } from './models/Module';
export type { ModuleHandle } from './models/ModuleHandle';
export type { NotFoundResult } from './models/NotFoundResult';
export { NotificationStyle } from './models/NotificationStyle';
export type { OkResult } from './models/OkResult';
export type { OutOfDateStatus } from './models/OutOfDateStatus';
export { OutOfDateType } from './models/OutOfDateType';
export type { PagedContentTreeItem } from './models/PagedContentTreeItem';
export type { PagedCulture } from './models/PagedCulture';
export type { PagedDictionaryOverview } from './models/PagedDictionaryOverview';
export type { PagedDocumentBlueprintTreeItem } from './models/PagedDocumentBlueprintTreeItem';
export type { PagedDocumentTreeItem } from './models/PagedDocumentTreeItem';
export type { PagedDocumentTypeTreeItem } from './models/PagedDocumentTypeTreeItem';
export type { PagedEntityTreeItem } from './models/PagedEntityTreeItem';
export type { PagedFileSystemTreeItem } from './models/PagedFileSystemTreeItem';
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';
export type { PagedSearcher } from './models/PagedSearcher';
export type { PagedSearchResult } from './models/PagedSearchResult';
export type { PagedTelemetry } from './models/PagedTelemetry';
export { ParameterAttributes } from './models/ParameterAttributes';
export type { ParameterInfo } from './models/ParameterInfo';
export type { ProblemDetails } from './models/ProblemDetails';
export type { ProfilingStatus } from './models/ProfilingStatus';
export { PropertyAttributes } from './models/PropertyAttributes';
export type { PropertyInfo } from './models/PropertyInfo';
export type { RecycleBinItem } from './models/RecycleBinItem';
export type { Relation } from './models/Relation';
export type { RelationItem } from './models/RelationItem';
export type { RuntimeFieldHandle } from './models/RuntimeFieldHandle';
export { RuntimeLevel } from './models/RuntimeLevel';
export type { RuntimeMethodHandle } from './models/RuntimeMethodHandle';
export type { RuntimeTypeHandle } from './models/RuntimeTypeHandle';
export type { Searcher } from './models/Searcher';
export type { SearchResult } from './models/SearchResult';
export { SecurityRuleSet } from './models/SecurityRuleSet';
export type { ServerStatus } from './models/ServerStatus';
export type { StructLayoutAttribute } from './models/StructLayoutAttribute';
export type { Telemetry } from './models/Telemetry';
export { TelemetryLevel } from './models/TelemetryLevel';
export type { Type } from './models/Type';
export { TypeAttributes } from './models/TypeAttributes';
export type { TypeInfo } from './models/TypeInfo';
export type { UpgradeSettings } from './models/UpgradeSettings';
export type { UserInstall } from './models/UserInstall';
export type { UserSettings } from './models/UserSettings';
export type { Version } from './models/Version';
export { CultureResource } from './services/CultureResource';
export { DataTypeResource } from './services/DataTypeResource';
export { DictionaryResource } from './services/DictionaryResource';
export { DocumentResource } from './services/DocumentResource';
export { DocumentBlueprintResource } from './services/DocumentBlueprintResource';
export { DocumentTypeResource } from './services/DocumentTypeResource';
export { HelpResource } from './services/HelpResource';
export { InstallResource } from './services/InstallResource';
export { LanguageResource } from './services/LanguageResource';
export { MediaResource } from './services/MediaResource';
export { MediaTypeResource } from './services/MediaTypeResource';
export { MemberGroupResource } from './services/MemberGroupResource';
export { MemberTypeResource } from './services/MemberTypeResource';
export { ModelsBuilderResource } from './services/ModelsBuilderResource';
export { PartialViewResource } from './services/PartialViewResource';
export { ProfilingResource } from './services/ProfilingResource';
export { PublishedCacheResource } from './services/PublishedCacheResource';
export { RelationResource } from './services/RelationResource';
export { RelationTypeResource } from './services/RelationTypeResource';
export { ScriptResource } from './services/ScriptResource';
export { SearchResource } from './services/SearchResource';
export { SecurityResource } from './services/SecurityResource';
export { ServerResource } from './services/ServerResource';
export { StaticFileResource } from './services/StaticFileResource';
export { StylesheetResource } from './services/StylesheetResource';
export { TelemetryResource } from './services/TelemetryResource';
export { TemplateResource } from './services/TemplateResource';
export { TrackedReferenceResource } from './services/TrackedReferenceResource';
export { UpgradeResource } from './services/UpgradeResource';

View File

@@ -0,0 +1,41 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { CustomAttributeData } from './CustomAttributeData';
import type { MethodInfo } from './MethodInfo';
import type { Module } from './Module';
import type { SecurityRuleSet } from './SecurityRuleSet';
import type { Type } from './Type';
import type { TypeInfo } from './TypeInfo';
export type Assembly = {
readonly definedTypes?: Array<TypeInfo> | null;
readonly exportedTypes?: Array<Type> | null;
/**
* @deprecated
*/
readonly codeBase?: string | null;
entryPoint?: MethodInfo;
readonly fullName?: string | null;
readonly imageRuntimeVersion?: string | null;
readonly isDynamic?: boolean;
readonly location?: string | null;
readonly reflectionOnly?: boolean;
readonly isCollectible?: boolean;
readonly isFullyTrusted?: boolean;
readonly customAttributes?: Array<CustomAttributeData> | null;
/**
* @deprecated
*/
readonly escapedCodeBase?: string | null;
manifestModule?: Module;
readonly modules?: Array<Module> | null;
/**
* @deprecated
*/
readonly globalAssemblyCache?: boolean;
readonly hostContext?: number;
securityRuleSet?: SecurityRuleSet;
};

View File

@@ -0,0 +1,12 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { NotificationStyle } from './NotificationStyle';
export type BackOfficeNotification = {
header?: string | null;
message?: string | null;
notificationType?: NotificationStyle;
};

View File

@@ -0,0 +1,11 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export enum CallingConventions {
STANDARD = 'Standard',
VAR_ARGS = 'VarArgs',
ANY = 'Any',
HAS_THIS = 'HasThis',
EXPLICIT_THIS = 'ExplicitThis',
}

View File

@@ -0,0 +1,11 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { TelemetryLevel } from './TelemetryLevel';
export type ConsentLevel = {
level?: TelemetryLevel;
description?: string | null;
};

View File

@@ -0,0 +1,48 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { CallingConventions } from './CallingConventions';
import type { CustomAttributeData } from './CustomAttributeData';
import type { MemberTypes } from './MemberTypes';
import type { MethodAttributes } from './MethodAttributes';
import type { MethodImplAttributes } from './MethodImplAttributes';
import type { Module } from './Module';
import type { RuntimeMethodHandle } from './RuntimeMethodHandle';
import type { Type } from './Type';
export type ConstructorInfo = {
readonly name?: string | null;
declaringType?: Type;
reflectedType?: Type;
module?: Module;
readonly customAttributes?: Array<CustomAttributeData> | null;
readonly isCollectible?: boolean;
readonly metadataToken?: number;
attributes?: MethodAttributes;
methodImplementationFlags?: MethodImplAttributes;
callingConvention?: CallingConventions;
readonly isAbstract?: boolean;
readonly isConstructor?: boolean;
readonly isFinal?: boolean;
readonly isHideBySig?: boolean;
readonly isSpecialName?: boolean;
readonly isStatic?: boolean;
readonly isVirtual?: boolean;
readonly isAssembly?: boolean;
readonly isFamily?: boolean;
readonly isFamilyAndAssembly?: boolean;
readonly isFamilyOrAssembly?: boolean;
readonly isPrivate?: boolean;
readonly isPublic?: boolean;
readonly isConstructedGenericMethod?: boolean;
readonly isGenericMethod?: boolean;
readonly isGenericMethodDefinition?: boolean;
readonly containsGenericParameters?: boolean;
methodHandle?: RuntimeMethodHandle;
readonly isSecurityCritical?: boolean;
readonly isSecuritySafeCritical?: boolean;
readonly isSecurityTransparent?: boolean;
memberType?: MemberTypes;
};

View File

@@ -0,0 +1,17 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { ContentAppBadge } from './ContentAppBadge';
export type ContentApp = {
name?: string | null;
alias?: string | null;
weight?: number;
icon?: string | null;
view?: string | null;
viewModel?: any;
active?: boolean;
badge?: ContentAppBadge;
};

View File

@@ -0,0 +1,11 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { ContentAppBadgeType } from './ContentAppBadgeType';
export type ContentAppBadge = {
count?: number;
type?: ContentAppBadgeType;
};

View File

@@ -0,0 +1,9 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export enum ContentAppBadgeType {
DEFAULT = 'default',
WARNING = 'warning',
ALERT = 'alert',
}

View File

@@ -0,0 +1,10 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type ContentResult = {
content?: string | null;
contentType?: string | null;
statusCode?: number | null;
};

View File

@@ -0,0 +1,15 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type ContentTreeItem = {
name?: string | null;
type?: string | null;
icon?: string | null;
hasChildren?: boolean;
key?: string;
isContainer?: boolean;
parentKey?: string | null;
noAccess?: boolean;
};

View File

@@ -0,0 +1,16 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { IOutputFormatter } from './IOutputFormatter';
import type { Type } from './Type';
export type CreatedResult = {
value?: any;
formatters?: Array<IOutputFormatter> | null;
contentTypes?: Array<string> | null;
declaredType?: Type;
statusCode?: number | null;
location?: string | null;
};

View File

@@ -0,0 +1,9 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type Culture = {
name?: string | null;
englishName?: string | null;
};

View File

@@ -0,0 +1,16 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { ConstructorInfo } from './ConstructorInfo';
import type { CustomAttributeNamedArgument } from './CustomAttributeNamedArgument';
import type { CustomAttributeTypedArgument } from './CustomAttributeTypedArgument';
import type { Type } from './Type';
export type CustomAttributeData = {
attributeType?: Type;
constructor?: ConstructorInfo;
readonly constructorArguments?: Array<CustomAttributeTypedArgument> | null;
readonly namedArguments?: Array<CustomAttributeNamedArgument> | null;
};

View File

@@ -0,0 +1,14 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { CustomAttributeTypedArgument } from './CustomAttributeTypedArgument';
import type { MemberInfo } from './MemberInfo';
export type CustomAttributeNamedArgument = {
memberInfo?: MemberInfo;
typedValue?: CustomAttributeTypedArgument;
readonly memberName?: string | null;
readonly isField?: boolean;
};

View File

@@ -0,0 +1,11 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { Type } from './Type';
export type CustomAttributeTypedArgument = {
argumentType?: Type;
value?: any;
};

View File

@@ -0,0 +1,15 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type DatabaseInstall = {
id: string;
providerName: string;
server?: string | null;
name?: string | null;
username?: string | null;
password?: string | null;
useIntegratedAuthentication?: boolean;
connectionString?: string | null;
};

View File

@@ -0,0 +1,18 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type DatabaseSettings = {
id?: string;
sortOrder?: number;
displayName?: string | null;
defaultDatabaseName?: string | null;
providerName?: string | null;
isConfigured?: boolean;
requiresServer?: boolean;
serverPlaceholder?: string | null;
requiresCredentials?: boolean;
supportsIntegratedAuthentication?: boolean;
requiresConnectionTest?: boolean;
};

View File

@@ -0,0 +1,18 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { BackOfficeNotification } from './BackOfficeNotification';
import type { ContentApp } from './ContentApp';
import type { DictionaryTranslation } from './DictionaryTranslation';
export type Dictionary = {
parentId?: string | null;
translations?: Array<DictionaryTranslation> | null;
contentApps?: Array<ContentApp> | null;
readonly notifications?: Array<BackOfficeNotification> | null;
name: string;
key?: string;
path?: string | null;
};

View File

@@ -0,0 +1,11 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { DictionaryItemsImport } from './DictionaryItemsImport';
export type DictionaryImport = {
dictionaryItems?: Array<DictionaryItemsImport> | null;
tempFileName?: string | null;
};

View File

@@ -0,0 +1,9 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type DictionaryItem = {
parentId?: string | null;
key?: string;
};

View File

@@ -0,0 +1,9 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type DictionaryItemsImport = {
name?: string | null;
level?: number;
};

View File

@@ -0,0 +1,13 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { DictionaryTranslationOverview } from './DictionaryTranslationOverview';
export type DictionaryOverview = {
name?: string | null;
key?: string;
level?: number;
readonly translations?: Array<DictionaryTranslationOverview> | null;
};

View File

@@ -0,0 +1,13 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type DictionaryTranslation = {
id?: number;
key?: string;
displayName?: string | null;
isoCode?: string | null;
translation?: string | null;
languageId?: number;
};

View File

@@ -0,0 +1,9 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type DictionaryTranslationOverview = {
displayName?: string | null;
hasTranslation?: boolean;
};

View File

@@ -0,0 +1,17 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type DocumentBlueprintTreeItem = {
name?: string | null;
type?: string | null;
icon?: string | null;
hasChildren?: boolean;
key?: string;
isContainer?: boolean;
parentKey?: string | null;
documentTypeKey?: string;
documentTypeAlias?: string | null;
documentTypeName?: string | null;
};

View File

@@ -0,0 +1,18 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type DocumentTreeItem = {
name?: string | null;
type?: string | null;
icon?: string | null;
hasChildren?: boolean;
key?: string;
isContainer?: boolean;
parentKey?: string | null;
noAccess?: boolean;
isProtected?: boolean;
isPublished?: boolean;
isEdited?: boolean;
};

View File

@@ -0,0 +1,16 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type DocumentTypeTreeItem = {
name?: string | null;
type?: string | null;
icon?: string | null;
hasChildren?: boolean;
key?: string;
isContainer?: boolean;
parentKey?: string | null;
isFolder?: boolean;
isElement?: boolean;
};

View File

@@ -0,0 +1,14 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type EntityTreeItem = {
name?: string | null;
type?: string | null;
icon?: string | null;
hasChildren?: boolean;
key?: string;
isContainer?: boolean;
parentKey?: string | null;
};

View File

@@ -0,0 +1,10 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export enum EventAttributes {
NONE = 'None',
SPECIAL_NAME = 'SpecialName',
RTSPECIAL_NAME = 'RTSpecialName',
RESERVED_MASK = 'ReservedMask',
}

View File

@@ -0,0 +1,29 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { CustomAttributeData } from './CustomAttributeData';
import type { EventAttributes } from './EventAttributes';
import type { MemberTypes } from './MemberTypes';
import type { MethodInfo } from './MethodInfo';
import type { Module } from './Module';
import type { Type } from './Type';
export type EventInfo = {
readonly name?: string | null;
declaringType?: Type;
reflectedType?: Type;
module?: Module;
readonly customAttributes?: Array<CustomAttributeData> | null;
readonly isCollectible?: boolean;
readonly metadataToken?: number;
memberType?: MemberTypes;
attributes?: EventAttributes;
readonly isSpecialName?: boolean;
addMethod?: MethodInfo;
removeMethod?: MethodInfo;
raiseMethod?: MethodInfo;
readonly isMulticast?: boolean;
eventHandlerType?: Type;
};

View File

@@ -0,0 +1,9 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type Field = {
name?: string | null;
values?: Array<string> | null;
};

View File

@@ -0,0 +1,25 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export enum FieldAttributes {
PRIVATE_SCOPE = 'PrivateScope',
PRIVATE = 'Private',
FAM_ANDASSEM = 'FamANDAssem',
ASSEMBLY = 'Assembly',
FAMILY = 'Family',
FAM_ORASSEM = 'FamORAssem',
PUBLIC = 'Public',
FIELD_ACCESS_MASK = 'FieldAccessMask',
STATIC = 'Static',
INIT_ONLY = 'InitOnly',
LITERAL = 'Literal',
NOT_SERIALIZED = 'NotSerialized',
HAS_FIELD_RVA = 'HasFieldRVA',
SPECIAL_NAME = 'SpecialName',
RTSPECIAL_NAME = 'RTSpecialName',
HAS_FIELD_MARSHAL = 'HasFieldMarshal',
PINVOKE_IMPL = 'PinvokeImpl',
HAS_DEFAULT = 'HasDefault',
RESERVED_MASK = 'ReservedMask',
}

View File

@@ -0,0 +1,40 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { CustomAttributeData } from './CustomAttributeData';
import type { FieldAttributes } from './FieldAttributes';
import type { MemberTypes } from './MemberTypes';
import type { Module } from './Module';
import type { RuntimeFieldHandle } from './RuntimeFieldHandle';
import type { Type } from './Type';
export type FieldInfo = {
readonly name?: string | null;
declaringType?: Type;
reflectedType?: Type;
module?: Module;
readonly customAttributes?: Array<CustomAttributeData> | null;
readonly isCollectible?: boolean;
readonly metadataToken?: number;
memberType?: MemberTypes;
attributes?: FieldAttributes;
fieldType?: Type;
readonly isInitOnly?: boolean;
readonly isLiteral?: boolean;
readonly isNotSerialized?: boolean;
readonly isPinvokeImpl?: boolean;
readonly isSpecialName?: boolean;
readonly isStatic?: boolean;
readonly isAssembly?: boolean;
readonly isFamily?: boolean;
readonly isFamilyAndAssembly?: boolean;
readonly isFamilyOrAssembly?: boolean;
readonly isPrivate?: boolean;
readonly isPublic?: boolean;
readonly isSecurityCritical?: boolean;
readonly isSecuritySafeCritical?: boolean;
readonly isSecurityTransparent?: boolean;
fieldHandle?: RuntimeFieldHandle;
};

View File

@@ -0,0 +1,13 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type FileSystemTreeItem = {
name?: string | null;
type?: string | null;
icon?: string | null;
hasChildren?: boolean;
path?: string | null;
isFolder?: boolean;
};

View File

@@ -0,0 +1,15 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type FolderTreeItem = {
name?: string | null;
type?: string | null;
icon?: string | null;
hasChildren?: boolean;
key?: string;
isContainer?: boolean;
parentKey?: string | null;
isFolder?: boolean;
};

View File

@@ -0,0 +1,14 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export enum GenericParameterAttributes {
NONE = 'None',
COVARIANT = 'Covariant',
CONTRAVARIANT = 'Contravariant',
VARIANCE_MASK = 'VarianceMask',
REFERENCE_TYPE_CONSTRAINT = 'ReferenceTypeConstraint',
NOT_NULLABLE_VALUE_TYPE_CONSTRAINT = 'NotNullableValueTypeConstraint',
DEFAULT_CONSTRUCTOR_CONSTRAINT = 'DefaultConstructorConstraint',
SPECIAL_CONSTRAINT_MASK = 'SpecialConstraintMask',
}

View File

@@ -0,0 +1,11 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type HelpPage = {
name?: string | null;
description?: string | null;
url?: string | null;
type?: string | null;
};

View File

@@ -0,0 +1,7 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type ICustomAttributeProvider = {
};

View File

@@ -0,0 +1,7 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type IOutputFormatter = {
};

View File

@@ -0,0 +1,14 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type Index = {
name?: string | null;
healthStatus?: string | null;
readonly isHealthy?: boolean;
canRebuild?: boolean;
searcherName?: string | null;
documentCount?: number;
fieldCount?: number;
};

View File

@@ -0,0 +1,14 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { DatabaseInstall } from './DatabaseInstall';
import type { TelemetryLevel } from './TelemetryLevel';
import type { UserInstall } from './UserInstall';
export type Install = {
user: UserInstall;
database: DatabaseInstall;
telemetryLevel?: TelemetryLevel;
};

View File

@@ -0,0 +1,12 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { DatabaseSettings } from './DatabaseSettings';
import type { UserSettings } from './UserSettings';
export type InstallSettings = {
user?: UserSettings;
databases?: Array<DatabaseSettings> | null;
};

View File

@@ -0,0 +1,7 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type IntPtr = {
};

View File

@@ -0,0 +1,10 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type JsonPatch = {
op?: string | null;
path?: string | null;
value?: any;
};

View File

@@ -0,0 +1,13 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type Language = {
id?: number;
isoCode: string;
name?: string | null;
isDefault?: boolean;
isMandatory?: boolean;
fallbackLanguageId?: number | null;
};

View File

@@ -0,0 +1,9 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export enum LayoutKind {
SEQUENTIAL = 'Sequential',
EXPLICIT = 'Explicit',
AUTO = 'Auto',
}

View File

@@ -0,0 +1,20 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { CustomAttributeData } from './CustomAttributeData';
import type { MemberTypes } from './MemberTypes';
import type { Module } from './Module';
import type { Type } from './Type';
export type MemberInfo = {
memberType?: MemberTypes;
readonly name?: string | null;
declaringType?: Type;
reflectedType?: Type;
module?: Module;
readonly customAttributes?: Array<CustomAttributeData> | null;
readonly isCollectible?: boolean;
readonly metadataToken?: number;
};

View File

@@ -0,0 +1,15 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export enum MemberTypes {
CONSTRUCTOR = 'Constructor',
EVENT = 'Event',
FIELD = 'Field',
METHOD = 'Method',
PROPERTY = 'Property',
TYPE_INFO = 'TypeInfo',
CUSTOM = 'Custom',
NESTED_TYPE = 'NestedType',
ALL = 'All',
}

View File

@@ -0,0 +1,30 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export enum MethodAttributes {
REUSE_SLOT = 'ReuseSlot',
PRIVATE_SCOPE = 'PrivateScope',
PRIVATE = 'Private',
FAM_ANDASSEM = 'FamANDAssem',
ASSEMBLY = 'Assembly',
FAMILY = 'Family',
FAM_ORASSEM = 'FamORAssem',
PUBLIC = 'Public',
MEMBER_ACCESS_MASK = 'MemberAccessMask',
UNMANAGED_EXPORT = 'UnmanagedExport',
STATIC = 'Static',
FINAL = 'Final',
VIRTUAL = 'Virtual',
HIDE_BY_SIG = 'HideBySig',
NEW_SLOT = 'NewSlot',
VTABLE_LAYOUT_MASK = 'VtableLayoutMask',
CHECK_ACCESS_ON_OVERRIDE = 'CheckAccessOnOverride',
ABSTRACT = 'Abstract',
SPECIAL_NAME = 'SpecialName',
RTSPECIAL_NAME = 'RTSpecialName',
PINVOKE_IMPL = 'PinvokeImpl',
HAS_SECURITY = 'HasSecurity',
REQUIRE_SEC_OBJECT = 'RequireSecObject',
RESERVED_MASK = 'ReservedMask',
}

View File

@@ -0,0 +1,48 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { CallingConventions } from './CallingConventions';
import type { CustomAttributeData } from './CustomAttributeData';
import type { MemberTypes } from './MemberTypes';
import type { MethodAttributes } from './MethodAttributes';
import type { MethodImplAttributes } from './MethodImplAttributes';
import type { Module } from './Module';
import type { RuntimeMethodHandle } from './RuntimeMethodHandle';
import type { Type } from './Type';
export type MethodBase = {
memberType?: MemberTypes;
readonly name?: string | null;
declaringType?: Type;
reflectedType?: Type;
module?: Module;
readonly customAttributes?: Array<CustomAttributeData> | null;
readonly isCollectible?: boolean;
readonly metadataToken?: number;
attributes?: MethodAttributes;
methodImplementationFlags?: MethodImplAttributes;
callingConvention?: CallingConventions;
readonly isAbstract?: boolean;
readonly isConstructor?: boolean;
readonly isFinal?: boolean;
readonly isHideBySig?: boolean;
readonly isSpecialName?: boolean;
readonly isStatic?: boolean;
readonly isVirtual?: boolean;
readonly isAssembly?: boolean;
readonly isFamily?: boolean;
readonly isFamilyAndAssembly?: boolean;
readonly isFamilyOrAssembly?: boolean;
readonly isPrivate?: boolean;
readonly isPublic?: boolean;
readonly isConstructedGenericMethod?: boolean;
readonly isGenericMethod?: boolean;
readonly isGenericMethodDefinition?: boolean;
readonly containsGenericParameters?: boolean;
methodHandle?: RuntimeMethodHandle;
readonly isSecurityCritical?: boolean;
readonly isSecuritySafeCritical?: boolean;
readonly isSecurityTransparent?: boolean;
};

View File

@@ -0,0 +1,23 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export enum MethodImplAttributes {
IL = 'IL',
MANAGED = 'Managed',
NATIVE = 'Native',
OPTIL = 'OPTIL',
RUNTIME = 'Runtime',
CODE_TYPE_MASK = 'CodeTypeMask',
UNMANAGED = 'Unmanaged',
MANAGED_MASK = 'ManagedMask',
NO_INLINING = 'NoInlining',
FORWARD_REF = 'ForwardRef',
SYNCHRONIZED = 'Synchronized',
NO_OPTIMIZATION = 'NoOptimization',
PRESERVE_SIG = 'PreserveSig',
AGGRESSIVE_INLINING = 'AggressiveInlining',
AGGRESSIVE_OPTIMIZATION = 'AggressiveOptimization',
INTERNAL_CALL = 'InternalCall',
MAX_METHOD_IMPL_VAL = 'MaxMethodImplVal',
}

View File

@@ -0,0 +1,53 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { CallingConventions } from './CallingConventions';
import type { CustomAttributeData } from './CustomAttributeData';
import type { ICustomAttributeProvider } from './ICustomAttributeProvider';
import type { MemberTypes } from './MemberTypes';
import type { MethodAttributes } from './MethodAttributes';
import type { MethodImplAttributes } from './MethodImplAttributes';
import type { Module } from './Module';
import type { ParameterInfo } from './ParameterInfo';
import type { RuntimeMethodHandle } from './RuntimeMethodHandle';
import type { Type } from './Type';
export type MethodInfo = {
readonly name?: string | null;
declaringType?: Type;
reflectedType?: Type;
module?: Module;
readonly customAttributes?: Array<CustomAttributeData> | null;
readonly isCollectible?: boolean;
readonly metadataToken?: number;
attributes?: MethodAttributes;
methodImplementationFlags?: MethodImplAttributes;
callingConvention?: CallingConventions;
readonly isAbstract?: boolean;
readonly isConstructor?: boolean;
readonly isFinal?: boolean;
readonly isHideBySig?: boolean;
readonly isSpecialName?: boolean;
readonly isStatic?: boolean;
readonly isVirtual?: boolean;
readonly isAssembly?: boolean;
readonly isFamily?: boolean;
readonly isFamilyAndAssembly?: boolean;
readonly isFamilyOrAssembly?: boolean;
readonly isPrivate?: boolean;
readonly isPublic?: boolean;
readonly isConstructedGenericMethod?: boolean;
readonly isGenericMethod?: boolean;
readonly isGenericMethodDefinition?: boolean;
readonly containsGenericParameters?: boolean;
methodHandle?: RuntimeMethodHandle;
readonly isSecurityCritical?: boolean;
readonly isSecuritySafeCritical?: boolean;
readonly isSecurityTransparent?: boolean;
memberType?: MemberTypes;
returnParameter?: ParameterInfo;
returnType?: Type;
returnTypeCustomAttributes?: ICustomAttributeProvider;
};

View File

@@ -0,0 +1,16 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { ModelsMode } from './ModelsMode';
export type ModelsBuilder = {
mode?: ModelsMode;
canGenerate?: boolean;
outOfDateModels?: boolean;
lastError?: string | null;
version?: string | null;
modelsNamespace?: string | null;
trackingOutOfDateModels?: boolean;
};

View File

@@ -0,0 +1,10 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export enum ModelsMode {
NOTHING = 'Nothing',
IN_MEMORY_AUTO = 'InMemoryAuto',
SOURCE_CODE_MANUAL = 'SourceCodeManual',
SOURCE_CODE_AUTO = 'SourceCodeAuto',
}

View File

@@ -0,0 +1,20 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { Assembly } from './Assembly';
import type { CustomAttributeData } from './CustomAttributeData';
import type { ModuleHandle } from './ModuleHandle';
export type Module = {
assembly?: Assembly;
readonly fullyQualifiedName?: string | null;
readonly name?: string | null;
readonly mdStreamVersion?: number;
readonly moduleVersionId?: string;
readonly scopeName?: string | null;
moduleHandle?: ModuleHandle;
readonly customAttributes?: Array<CustomAttributeData> | null;
readonly metadataToken?: number;
};

View File

@@ -0,0 +1,8 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type ModuleHandle = {
readonly mdStreamVersion?: number;
};

View File

@@ -0,0 +1,8 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type NotFoundResult = {
statusCode?: number;
};

View File

@@ -0,0 +1,11 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export enum NotificationStyle {
SAVE = 'Save',
INFO = 'Info',
ERROR = 'Error',
SUCCESS = 'Success',
WARNING = 'Warning',
}

View File

@@ -0,0 +1,8 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type OkResult = {
statusCode?: number;
};

View File

@@ -0,0 +1,10 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { OutOfDateType } from './OutOfDateType';
export type OutOfDateStatus = {
status?: OutOfDateType;
};

View File

@@ -0,0 +1,9 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export enum OutOfDateType {
OUT_OF_DATE = 'OutOfDate',
CURRENT = 'Current',
UNKNOWN = 'Unknown',
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -0,0 +1,17 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export enum ParameterAttributes {
NONE = 'None',
IN = 'In',
OUT = 'Out',
LCID = 'Lcid',
RETVAL = 'Retval',
OPTIONAL = 'Optional',
HAS_DEFAULT = 'HasDefault',
HAS_FIELD_MARSHAL = 'HasFieldMarshal',
RESERVED3 = 'Reserved3',
RESERVED4 = 'Reserved4',
RESERVED_MASK = 'ReservedMask',
}

View File

@@ -0,0 +1,27 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { CustomAttributeData } from './CustomAttributeData';
import type { MemberInfo } from './MemberInfo';
import type { ParameterAttributes } from './ParameterAttributes';
import type { Type } from './Type';
export type ParameterInfo = {
attributes?: ParameterAttributes;
member?: MemberInfo;
readonly name?: string | null;
parameterType?: Type;
readonly position?: number;
readonly isIn?: boolean;
readonly isLcid?: boolean;
readonly isOptional?: boolean;
readonly isOut?: boolean;
readonly isRetval?: boolean;
readonly defaultValue?: any;
readonly rawDefaultValue?: any;
readonly hasDefaultValue?: boolean;
readonly customAttributes?: Array<CustomAttributeData> | null;
readonly metadataToken?: number;
};

Some files were not shown because too many files have changed in this diff Show More