diff --git a/.vscode/settings.json b/.vscode/settings.json index e3755bbd24..6d4441fffc 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,8 +1,7 @@ { - "cSpell.words": [ - "unprovide" - ], - "eslint.workingDirectories": [ + "cSpell.words": ["unprovide"], + "eslint.useFlatConfig": true, + "eslint.workingDirectories": [ "./src/Umbraco.Web.UI.Client/", "./src/Umbraco.Web.UI.Login/" ] diff --git a/src/Umbraco.Web.UI.Client/eslint.config.js b/src/Umbraco.Web.UI.Client/eslint.config.js index d4ad41a6f1..e0f4913ab9 100644 --- a/src/Umbraco.Web.UI.Client/eslint.config.js +++ b/src/Umbraco.Web.UI.Client/eslint.config.js @@ -28,6 +28,8 @@ export default [ 'src/packages/core/icon-registry/icons', 'src/packages/core/icon-registry/icons.ts', 'src/**/*.test.ts', + 'src/packages/core/backend-api', + 'src/packages/core/openapi-ts.*.js', ], }, diff --git a/src/Umbraco.Web.UI.Client/examples/manipulate-document-property-value-permissions/manipulate-property-view-permissions-action.ts b/src/Umbraco.Web.UI.Client/examples/manipulate-document-property-value-permissions/manipulate-property-view-permissions-action.ts index a7109d4d7f..acd20dd52b 100644 --- a/src/Umbraco.Web.UI.Client/examples/manipulate-document-property-value-permissions/manipulate-property-view-permissions-action.ts +++ b/src/Umbraco.Web.UI.Client/examples/manipulate-document-property-value-permissions/manipulate-property-view-permissions-action.ts @@ -2,7 +2,7 @@ import { UMB_CONTENT_WORKSPACE_CONTEXT } from '@umbraco-cms/backoffice/content'; import { UmbWorkspaceActionBase, type UmbWorkspaceAction } from '@umbraco-cms/backoffice/workspace'; // The Example Incrementor Workspace Action Controller: -export class ExampleWorkspaceActionManipulateWiewPermission +export class ExampleWorkspaceActionManipulateViewPermission extends UmbWorkspaceActionBase implements UmbWorkspaceAction { @@ -30,4 +30,4 @@ export class ExampleWorkspaceActionManipulateWiewPermission } // Declare a api export, so Extension Registry can initialize this class: -export const api = ExampleWorkspaceActionManipulateWiewPermission; +export const api = ExampleWorkspaceActionManipulateViewPermission; diff --git a/src/Umbraco.Web.UI.Client/package-lock.json b/src/Umbraco.Web.UI.Client/package-lock.json index 753841429b..99587795df 100644 --- a/src/Umbraco.Web.UI.Client/package-lock.json +++ b/src/Umbraco.Web.UI.Client/package-lock.json @@ -39,7 +39,6 @@ "devDependencies": { "@babel/core": "^7.26.9", "@eslint/js": "^9.20.0", - "@hey-api/openapi-ts": "^0.66.1", "@open-wc/testing": "^4.0.0", "@playwright/test": "^1.49.1", "@rollup/plugin-json": "^6.1.0", @@ -1028,6 +1027,19 @@ "dev": true, "license": "BSD-3-Clause" }, + "node_modules/@hey-api/client-fetch": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/@hey-api/client-fetch/-/client-fetch-0.10.0.tgz", + "integrity": "sha512-C7vzj4t52qPiHCqjn1l8cRTI2p4pZCd7ViLtJDTHr5ZwI4sWOYC1tmv6bd529qqY6HFFbhGCz4TAZSwKAMJncg==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/hey-api" + }, + "peerDependencies": { + "@hey-api/openapi-ts": "< 2" + } + }, "node_modules/@hey-api/json-schema-ref-parser": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/@hey-api/json-schema-ref-parser/-/json-schema-ref-parser-1.0.4.tgz", @@ -17589,6 +17601,10 @@ "@types/diff": "^7.0.1", "diff": "^7.0.0", "uuid": "^11.0.5" + }, + "devDependencies": { + "@hey-api/client-fetch": "^0.10.0", + "@hey-api/openapi-ts": "^0.66.1" } }, "src/packages/data-type": { @@ -17612,6 +17628,14 @@ "src/packages/help": { "name": "@umbraco-backoffice/help" }, + "src/packages/http": { + "name": "@umbraco-backoffice/http", + "extraneous": true, + "devDependencies": { + "@hey-api/client-fetch": "^0.10.0", + "@hey-api/openapi-ts": "^0.66.1" + } + }, "src/packages/language": { "name": "@umbraco-backoffice/language" }, diff --git a/src/Umbraco.Web.UI.Client/package.json b/src/Umbraco.Web.UI.Client/package.json index 8353e93116..d1a3943072 100644 --- a/src/Umbraco.Web.UI.Client/package.json +++ b/src/Umbraco.Web.UI.Client/package.json @@ -50,6 +50,7 @@ "./extension-registry": "./dist-cms/packages/core/extension-registry/index.js", "./health-check": "./dist-cms/packages/health-check/index.js", "./help": "./dist-cms/packages/help/index.js", + "./http-client": "./dist-cms/packages/core/http-client/index.js", "./icon": "./dist-cms/packages/core/icon-registry/index.js", "./id": "./dist-cms/packages/core/id/index.js", "./imaging": "./dist-cms/packages/media/imaging/index.js", @@ -114,7 +115,7 @@ "./variant": "./dist-cms/packages/core/variant/index.js", "./webhook": "./dist-cms/packages/webhook/index.js", "./workspace": "./dist-cms/packages/core/workspace/index.js", - "./external/backend-api": "./dist-cms/external/backend-api/index.js", + "./external/backend-api": "./dist-cms/packages/core/backend-api/index.js", "./external/dompurify": "./dist-cms/external/dompurify/index.js", "./external/lit": "./dist-cms/external/lit/index.js", "./external/marked": "./dist-cms/external/marked/index.js", @@ -165,8 +166,8 @@ "example": "node ./devops/example-runner/index.js", "format:fix": "npm run format -- --write", "format": "prettier 'src/**/*.ts' --check", - "generate:server-api-dev": "openapi-ts --file devops/openapi-ts/openapi-ts.dev.config.js", - "generate:server-api": "openapi-ts --file devops/openapi-ts/openapi-ts.config.js", + "generate:server-api-dev": "npm run generate:server-api-dev -w @umbraco-backoffice/core", + "generate:server-api": "npm run generate:server-api -w @umbraco-backoffice/core", "generate:icons": "node ./devops/icons/index.js", "generate:overrides": "node ./devops/tsc/index.js", "generate:jsonschema:imports": "node ./devops/json-schema-generator/index.js", @@ -225,7 +226,6 @@ "devDependencies": { "@babel/core": "^7.26.9", "@eslint/js": "^9.20.0", - "@hey-api/openapi-ts": "^0.66.1", "@open-wc/testing": "^4.0.0", "@playwright/test": "^1.49.1", "@rollup/plugin-json": "^6.1.0", @@ -287,4 +287,4 @@ "access": "public", "registry": "https://registry.npmjs.org/" } -} \ No newline at end of file +} diff --git a/src/Umbraco.Web.UI.Client/src/apps/app/app.element.ts b/src/Umbraco.Web.UI.Client/src/apps/app/app.element.ts index f8eaa69c63..34942baf65 100644 --- a/src/Umbraco.Web.UI.Client/src/apps/app/app.element.ts +++ b/src/Umbraco.Web.UI.Client/src/apps/app/app.element.ts @@ -2,6 +2,7 @@ import { onInit } from '../../packages/core/entry-point.js'; import type { UmbAppErrorElement } from './app-error.element.js'; import { UmbAppAuthController } from './app-auth.controller.js'; import type { UmbAppOauthElement } from './app-oauth.element.js'; +import { UmbNetworkConnectionStatusManager } from './network-connection-status.manager.js'; import type { UMB_AUTH_CONTEXT } from '@umbraco-cms/backoffice/auth'; import { UmbAuthContext } from '@umbraco-cms/backoffice/auth'; import { UmbServerConnection, UmbServerContext } from '@umbraco-cms/backoffice/server'; @@ -10,7 +11,7 @@ import { UUIIconRegistryEssential } from '@umbraco-cms/backoffice/external/uui'; import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element'; import type { Guard, UmbRoute } from '@umbraco-cms/backoffice/router'; import { pathWithoutBasePath } from '@umbraco-cms/backoffice/router'; -import { OpenAPI, RuntimeLevelModel } from '@umbraco-cms/backoffice/external/backend-api'; +import { RuntimeLevelModel } from '@umbraco-cms/backoffice/external/backend-api'; import { UmbContextDebugController } from '@umbraco-cms/backoffice/debug'; import { UmbBundleExtensionInitializer, UmbServerExtensionRegistrator } from '@umbraco-cms/backoffice/extension-api'; import { @@ -20,6 +21,7 @@ import { import { filter, first, firstValueFrom } from '@umbraco-cms/backoffice/external/rxjs'; import { hasOwnOpener, retrieveStoredPath } from '@umbraco-cms/backoffice/utils'; import { UmbApiInterceptorController } from '@umbraco-cms/backoffice/resources'; +import { umbHttpClient } from '@umbraco-cms/backoffice/http-client'; import './app-oauth.element.js'; @@ -30,25 +32,20 @@ export class UmbAppElement extends UmbLitElement { * @attr * @remarks This is the base URL of the Umbraco server, not the base URL of the backoffice. */ - @property({ type: String }) - set serverUrl(url: string) { - OpenAPI.BASE = url; - } - get serverUrl() { - return OpenAPI.BASE; - } + @property({ type: String, attribute: 'server-url' }) + serverUrl = window.location.origin; /** * The base path of the backoffice. * @attr */ - @property({ type: String }) + @property({ type: String, attribute: 'backoffice-path' }) backofficePath = '/umbraco'; /** * Bypass authentication. */ - @property({ type: Boolean }) + @property({ type: Boolean, attribute: 'bypass-auth' }) bypassAuth = false; private _routes: UmbRoute[] = [ @@ -143,15 +140,13 @@ export class UmbAppElement extends UmbLitElement { constructor() { super(); - OpenAPI.BASE = window.location.origin; - - this.#apiInterceptorController.bindDefaultInterceptors(OpenAPI); - new UmbBundleExtensionInitializer(this, umbExtensionsRegistry); new UUIIconRegistryEssential().attach(this); new UmbContextDebugController(this); + + new UmbNetworkConnectionStatusManager(this); } override connectedCallback(): void { @@ -160,6 +155,11 @@ export class UmbAppElement extends UmbLitElement { } async #setup() { + umbHttpClient.setConfig({ + baseUrl: this.serverUrl, + }); + + this.#apiInterceptorController.bindDefaultInterceptors(umbHttpClient); this.#serverConnection = await new UmbServerConnection(this, this.serverUrl).connect(); this.#authContext = new UmbAuthContext(this, this.serverUrl, this.backofficePath, this.bypassAuth); @@ -227,9 +227,11 @@ export class UmbAppElement extends UmbLitElement { await this.#authContext?.setInitialState(); // Instruct all requests to use the auth flow to get and use the access_token for all subsequent requests - OpenAPI.TOKEN = () => this.#authContext!.getLatestToken(); - OpenAPI.WITH_CREDENTIALS = true; - OpenAPI.ENCODE_PATH = (path: string) => path; + umbHttpClient.setConfig({ + baseUrl: this.serverUrl, + credentials: 'include', + auth: () => this.#authContext!.getLatestToken(), + }); } #redirect() { diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/server/network-connection-status.manager.ts b/src/Umbraco.Web.UI.Client/src/apps/app/network-connection-status.manager.ts similarity index 86% rename from src/Umbraco.Web.UI.Client/src/packages/core/server/network-connection-status.manager.ts rename to src/Umbraco.Web.UI.Client/src/apps/app/network-connection-status.manager.ts index ad573a2464..34f094622e 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/server/network-connection-status.manager.ts +++ b/src/Umbraco.Web.UI.Client/src/apps/app/network-connection-status.manager.ts @@ -1,14 +1,11 @@ import { UmbControllerBase } from '@umbraco-cms/backoffice/class-api'; import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api'; import { UmbLocalizationController } from '@umbraco-cms/backoffice/localization-api'; -import { - UMB_NOTIFICATION_CONTEXT, - type UmbNotificationContext, - type UmbNotificationHandler, -} from '@umbraco-cms/backoffice/notification'; +import { UMB_NOTIFICATION_CONTEXT } from '@umbraco-cms/backoffice/notification'; +import type { UmbNotificationHandler } from '@umbraco-cms/backoffice/notification'; export class UmbNetworkConnectionStatusManager extends UmbControllerBase { - #notificationContext?: UmbNotificationContext; + #notificationContext?: typeof UMB_NOTIFICATION_CONTEXT.TYPE; #offlineNotification?: UmbNotificationHandler; #localize = new UmbLocalizationController(this); diff --git a/src/Umbraco.Web.UI.Client/src/apps/installer/database/installer-database.element.ts b/src/Umbraco.Web.UI.Client/src/apps/installer/database/installer-database.element.ts index 3f223fdf11..f611a69b91 100644 --- a/src/Umbraco.Web.UI.Client/src/apps/installer/database/installer-database.element.ts +++ b/src/Umbraco.Web.UI.Client/src/apps/installer/database/installer-database.element.ts @@ -1,9 +1,9 @@ import type { UmbInstallerContext } from '../installer.context.js'; import { UMB_INSTALLER_CONTEXT } from '../installer.context.js'; + import type { UUIButtonElement } from '@umbraco-cms/backoffice/external/uui'; import type { CSSResultGroup } from '@umbraco-cms/backoffice/external/lit'; import { css, html, nothing, customElement, property, query, state } from '@umbraco-cms/backoffice/external/lit'; - import type { DatabaseInstallRequestModel, DatabaseSettingsPresentationModel, @@ -165,7 +165,7 @@ export class UmbInstallerDatabaseElement extends UmbLitElement { const { error } = await tryExecute( this, - InstallService.postInstallValidateDatabase({ requestBody: databaseDetails }), + InstallService.postInstallValidateDatabase({ body: databaseDetails }), { disableNotifications: true }, ); diff --git a/src/Umbraco.Web.UI.Client/src/apps/installer/installer.context.ts b/src/Umbraco.Web.UI.Client/src/apps/installer/installer.context.ts index d43703219b..bc77b8dcff 100644 --- a/src/Umbraco.Web.UI.Client/src/apps/installer/installer.context.ts +++ b/src/Umbraco.Web.UI.Client/src/apps/installer/installer.context.ts @@ -1,5 +1,8 @@ import type { Observable } from '@umbraco-cms/backoffice/external/rxjs'; -import type { InstallSettingsResponseModel, InstallRequestModel } from '@umbraco-cms/backoffice/external/backend-api'; +import type { + InstallSettingsResponseModel, + InstallRequestModelReadable, +} from '@umbraco-cms/backoffice/external/backend-api'; import { InstallService, TelemetryLevelModel } from '@umbraco-cms/backoffice/external/backend-api'; import { tryExecute, UmbApiError, type UmbProblemDetails } from '@umbraco-cms/backoffice/resources'; import { UmbContextToken } from '@umbraco-cms/backoffice/context-api'; @@ -12,7 +15,7 @@ import { UmbContextBase } from '@umbraco-cms/backoffice/class-api'; * @class UmbInstallerContext */ export class UmbInstallerContext extends UmbContextBase { - private _data = new UmbObjectState({ + private _data = new UmbObjectState({ user: { name: '', email: '', password: '', subscribeToNewsletter: false }, database: { id: '', providerName: '', useIntegratedAuthentication: false, trustServerCertificate: false }, telemetryLevel: TelemetryLevelModel.DETAILED, @@ -87,7 +90,7 @@ export class UmbInstallerContext extends UmbContextBase} data The data to set * @memberof UmbInstallerContext */ - public appendData(data: Partial): void { + public appendData(data: Partial): void { this._data.setValue({ ...this.getData(), ...data }); } @@ -97,12 +100,12 @@ export class UmbInstallerContext extends UmbContextBase { - const { error } = await tryExecute(this, InstallService.postInstallSetup({ requestBody: this.getData() }), { + const { error } = await tryExecute(this, InstallService.postInstallSetup({ body: this.getData() }), { disableNotifications: true, }); if (error) { diff --git a/src/Umbraco.Web.UI.Client/src/apps/upgrader/upgrader-view.element.ts b/src/Umbraco.Web.UI.Client/src/apps/upgrader/upgrader-view.element.ts index 7e11ac9670..1b1f78132d 100644 --- a/src/Umbraco.Web.UI.Client/src/apps/upgrader/upgrader-view.element.ts +++ b/src/Umbraco.Web.UI.Client/src/apps/upgrader/upgrader-view.element.ts @@ -1,6 +1,6 @@ import type { CSSResultGroup } from '@umbraco-cms/backoffice/external/lit'; import { css, html, LitElement, customElement, property, ifDefined } from '@umbraco-cms/backoffice/external/lit'; -import type { UpgradeSettingsResponseModel } from '@umbraco-cms/backoffice/external/backend-api'; +import type { UpgradeSettingsResponseModelReadable } from '@umbraco-cms/backoffice/external/backend-api'; /** * @element umb-upgrader-view @@ -18,7 +18,7 @@ export class UmbUpgraderViewElement extends LitElement { errorMessage = ''; @property({ type: Object, reflect: true }) - settings?: UpgradeSettingsResponseModel; + settings?: UpgradeSettingsResponseModelReadable; private _renderLayout() { return html` diff --git a/src/Umbraco.Web.UI.Client/src/apps/upgrader/upgrader.element.ts b/src/Umbraco.Web.UI.Client/src/apps/upgrader/upgrader.element.ts index 8a01b434fb..6b959d1f9d 100644 --- a/src/Umbraco.Web.UI.Client/src/apps/upgrader/upgrader.element.ts +++ b/src/Umbraco.Web.UI.Client/src/apps/upgrader/upgrader.element.ts @@ -1,5 +1,5 @@ import { html, customElement, state } from '@umbraco-cms/backoffice/external/lit'; -import type { UpgradeSettingsResponseModel } from '@umbraco-cms/backoffice/external/backend-api'; +import type { UpgradeSettingsResponseModelReadable } from '@umbraco-cms/backoffice/external/backend-api'; import { UpgradeService } from '@umbraco-cms/backoffice/external/backend-api'; import { tryExecute, UmbApiError } from '@umbraco-cms/backoffice/resources'; import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element'; @@ -13,7 +13,7 @@ import './upgrader-view.element.js'; @customElement('umb-upgrader') export class UmbUpgraderElement extends UmbLitElement { @state() - private upgradeSettings?: UpgradeSettingsResponseModel; + private upgradeSettings?: UpgradeSettingsResponseModelReadable; @state() private fetching = true; diff --git a/src/Umbraco.Web.UI.Client/src/assets/lang/en.ts b/src/Umbraco.Web.UI.Client/src/assets/lang/en.ts index ae4e8d6b9a..97a51c381f 100644 --- a/src/Umbraco.Web.UI.Client/src/assets/lang/en.ts +++ b/src/Umbraco.Web.UI.Client/src/assets/lang/en.ts @@ -1195,6 +1195,7 @@ export default { 'This package file doesn\'t contain any items to uninstall.

\n You can safely remove this from the system by clicking "uninstall package" below.', packageOptions: 'Package options', packageMigrationsRun: 'Run pending package migrations', + packageMigrationsConfirmText: 'Do you want to run the pending package migrations?', packageReadme: 'Package readme', packageRepository: 'Package repository', packageUninstallConfirm: 'Confirm package uninstall', diff --git a/src/Umbraco.Web.UI.Client/src/external/backend-api/index.ts b/src/Umbraco.Web.UI.Client/src/external/backend-api/index.ts deleted file mode 100644 index 4df73b330f..0000000000 --- a/src/Umbraco.Web.UI.Client/src/external/backend-api/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './src/index.js'; diff --git a/src/Umbraco.Web.UI.Client/src/external/backend-api/src/core/ApiError.ts b/src/Umbraco.Web.UI.Client/src/external/backend-api/src/core/ApiError.ts deleted file mode 100644 index 36675d288a..0000000000 --- a/src/Umbraco.Web.UI.Client/src/external/backend-api/src/core/ApiError.ts +++ /dev/null @@ -1,21 +0,0 @@ -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: unknown; - 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; - } -} \ No newline at end of file diff --git a/src/Umbraco.Web.UI.Client/src/external/backend-api/src/core/ApiRequestOptions.ts b/src/Umbraco.Web.UI.Client/src/external/backend-api/src/core/ApiRequestOptions.ts deleted file mode 100644 index 939a0aa4c8..0000000000 --- a/src/Umbraco.Web.UI.Client/src/external/backend-api/src/core/ApiRequestOptions.ts +++ /dev/null @@ -1,21 +0,0 @@ -export type ApiRequestOptions = { - readonly body?: any; - readonly cookies?: Record; - readonly errors?: Record; - readonly formData?: Record | any[] | Blob | File; - readonly headers?: Record; - readonly mediaType?: string; - readonly method: - | 'DELETE' - | 'GET' - | 'HEAD' - | 'OPTIONS' - | 'PATCH' - | 'POST' - | 'PUT'; - readonly path?: Record; - readonly query?: Record; - readonly responseHeader?: string; - readonly responseTransformer?: (data: unknown) => Promise; - readonly url: string; -}; \ No newline at end of file diff --git a/src/Umbraco.Web.UI.Client/src/external/backend-api/src/core/ApiResult.ts b/src/Umbraco.Web.UI.Client/src/external/backend-api/src/core/ApiResult.ts deleted file mode 100644 index 4c58e39138..0000000000 --- a/src/Umbraco.Web.UI.Client/src/external/backend-api/src/core/ApiResult.ts +++ /dev/null @@ -1,7 +0,0 @@ -export type ApiResult = { - readonly body: TData; - readonly ok: boolean; - readonly status: number; - readonly statusText: string; - readonly url: string; -}; \ No newline at end of file diff --git a/src/Umbraco.Web.UI.Client/src/external/backend-api/src/core/CancelablePromise.ts b/src/Umbraco.Web.UI.Client/src/external/backend-api/src/core/CancelablePromise.ts deleted file mode 100644 index ccc082e8f2..0000000000 --- a/src/Umbraco.Web.UI.Client/src/external/backend-api/src/core/CancelablePromise.ts +++ /dev/null @@ -1,126 +0,0 @@ -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 implements Promise { - private _isResolved: boolean; - private _isRejected: boolean; - private _isCancelled: boolean; - readonly cancelHandlers: (() => void)[]; - readonly promise: Promise; - private _resolve?: (value: T | PromiseLike) => void; - private _reject?: (reason?: unknown) => void; - - constructor( - executor: ( - resolve: (value: T | PromiseLike) => void, - reject: (reason?: unknown) => void, - onCancel: OnCancel - ) => void - ) { - this._isResolved = false; - this._isRejected = false; - this._isCancelled = false; - this.cancelHandlers = []; - this.promise = new Promise((resolve, reject) => { - this._resolve = resolve; - this._reject = reject; - - const onResolve = (value: T | PromiseLike): void => { - if (this._isResolved || this._isRejected || this._isCancelled) { - return; - } - this._isResolved = true; - if (this._resolve) this._resolve(value); - }; - - const onReject = (reason?: unknown): void => { - if (this._isResolved || this._isRejected || this._isCancelled) { - return; - } - this._isRejected = true; - if (this._reject) 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); - }); - } - - get [Symbol.toStringTag]() { - return "Cancellable Promise"; - } - - public then( - onFulfilled?: ((value: T) => TResult1 | PromiseLike) | null, - onRejected?: ((reason: unknown) => TResult2 | PromiseLike) | null - ): Promise { - return this.promise.then(onFulfilled, onRejected); - } - - public catch( - onRejected?: ((reason: unknown) => TResult | PromiseLike) | null - ): Promise { - return this.promise.catch(onRejected); - } - - public finally(onFinally?: (() => void) | null): Promise { - 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; - if (this._reject) this._reject(new CancelError('Request aborted')); - } - - public get isCancelled(): boolean { - return this._isCancelled; - } -} \ No newline at end of file diff --git a/src/Umbraco.Web.UI.Client/src/external/backend-api/src/core/OpenAPI.ts b/src/Umbraco.Web.UI.Client/src/external/backend-api/src/core/OpenAPI.ts deleted file mode 100644 index e1c7868551..0000000000 --- a/src/Umbraco.Web.UI.Client/src/external/backend-api/src/core/OpenAPI.ts +++ /dev/null @@ -1,56 +0,0 @@ -import type { ApiRequestOptions } from './ApiRequestOptions'; - -type Headers = Record; -type Middleware = (value: T) => T | Promise; -type Resolver = (options: ApiRequestOptions) => Promise; - -export class Interceptors { - _fns: Middleware[]; - - constructor() { - this._fns = []; - } - - eject(fn: Middleware): void { - const index = this._fns.indexOf(fn); - if (index !== -1) { - this._fns = [...this._fns.slice(0, index), ...this._fns.slice(index + 1)]; - } - } - - use(fn: Middleware): void { - this._fns = [...this._fns, fn]; - } -} - -export type OpenAPIConfig = { - BASE: string; - CREDENTIALS: 'include' | 'omit' | 'same-origin'; - ENCODE_PATH?: ((path: string) => string) | undefined; - HEADERS?: Headers | Resolver | undefined; - PASSWORD?: string | Resolver | undefined; - TOKEN?: string | Resolver | undefined; - USERNAME?: string | Resolver | undefined; - VERSION: string; - WITH_CREDENTIALS: boolean; - interceptors: { - request: Interceptors; - response: Interceptors; - }; -}; - -export const OpenAPI: OpenAPIConfig = { - BASE: '', - CREDENTIALS: 'include', - ENCODE_PATH: undefined, - HEADERS: undefined, - PASSWORD: undefined, - TOKEN: undefined, - USERNAME: undefined, - VERSION: 'Latest', - WITH_CREDENTIALS: false, - interceptors: { - request: new Interceptors(), - response: new Interceptors(), - }, -}; \ No newline at end of file diff --git a/src/Umbraco.Web.UI.Client/src/external/backend-api/src/core/request.ts b/src/Umbraco.Web.UI.Client/src/external/backend-api/src/core/request.ts deleted file mode 100644 index 5458a2899d..0000000000 --- a/src/Umbraco.Web.UI.Client/src/external/backend-api/src/core/request.ts +++ /dev/null @@ -1,350 +0,0 @@ -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'; - -export const isString = (value: unknown): value is string => { - return typeof value === 'string'; -}; - -export const isStringWithValue = (value: unknown): value is string => { - return isString(value) && value !== ''; -}; - -export const isBlob = (value: any): value is Blob => { - return value instanceof Blob; -}; - -export const isFormData = (value: unknown): value is FormData => { - return value instanceof FormData; -}; - -export const base64 = (str: string): string => { - try { - return btoa(str); - } catch (err) { - // @ts-ignore - return Buffer.from(str).toString('base64'); - } -}; - -export const getQueryString = (params: Record): string => { - const qs: string[] = []; - - const append = (key: string, value: unknown) => { - qs.push(`${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`); - }; - - const encodePair = (key: string, value: unknown) => { - if (value === undefined || value === null) { - return; - } - - if (value instanceof Date) { - append(key, value.toISOString()); - } else if (Array.isArray(value)) { - value.forEach(v => encodePair(key, v)); - } else if (typeof value === 'object') { - Object.entries(value).forEach(([k, v]) => encodePair(`${key}[${k}]`, v)); - } else { - append(key, value); - } - }; - - Object.entries(params).forEach(([key, value]) => encodePair(key, value)); - - return qs.length ? `?${qs.join('&')}` : ''; -}; - -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; - return options.query ? url + getQueryString(options.query) : url; -}; - -export const getFormData = (options: ApiRequestOptions): FormData | undefined => { - if (options.formData) { - const formData = new FormData(); - - const process = (key: string, value: unknown) => { - if (isString(value) || isBlob(value)) { - formData.append(key, value); - } else { - formData.append(key, JSON.stringify(value)); - } - }; - - Object.entries(options.formData) - .filter(([, value]) => value !== undefined && value !== null) - .forEach(([key, value]) => { - if (Array.isArray(value)) { - value.forEach(v => process(key, v)); - } else { - process(key, value); - } - }); - - return formData; - } - return undefined; -}; - -type Resolver = (options: ApiRequestOptions) => Promise; - -export const resolve = async (options: ApiRequestOptions, resolver?: T | Resolver): Promise => { - if (typeof resolver === 'function') { - return (resolver as Resolver)(options); - } - return resolver; -}; - -export const getHeaders = async (config: OpenAPIConfig, options: ApiRequestOptions): Promise => { - const [token, username, password, additionalHeaders] = await Promise.all([ - // @ts-ignore - resolve(options, config.TOKEN), - // @ts-ignore - resolve(options, config.USERNAME), - // @ts-ignore - resolve(options, config.PASSWORD), - // @ts-ignore - resolve(options, config.HEADERS), - ]); - - const headers = Object.entries({ - Accept: 'application/json', - ...additionalHeaders, - ...options.headers, - }) - .filter(([, value]) => value !== undefined && value !== null) - .reduce((headers, [key, value]) => ({ - ...headers, - [key]: String(value), - }), {} as Record); - - if (isStringWithValue(token)) { - headers['Authorization'] = `Bearer ${token}`; - } - - if (isStringWithValue(username) && isStringWithValue(password)) { - const credentials = base64(`${username}:${password}`); - headers['Authorization'] = `Basic ${credentials}`; - } - - if (options.body !== undefined) { - 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); -}; - -export const getRequestBody = (options: ApiRequestOptions): unknown => { - if (options.body !== undefined) { - if (options.mediaType?.includes('application/json') || 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 => { - const controller = new AbortController(); - - let request: RequestInit = { - headers, - body: body ?? formData, - method: options.method, - signal: controller.signal, - }; - - if (config.WITH_CREDENTIALS) { - request.credentials = config.CREDENTIALS; - } - - for (const fn of config.interceptors.request._fns) { - request = await fn(request); - } - - onCancel(() => controller.abort()); - - return await fetch(url, request); -}; - -export const getResponseHeader = (response: Response, responseHeader?: string): string | undefined => { - if (responseHeader) { - const content = response.headers.get(responseHeader); - if (isString(content)) { - return content; - } - } - return undefined; -}; - -export const getResponseBody = async (response: Response): Promise => { - if (response.status !== 204) { - try { - const contentType = response.headers.get('Content-Type'); - if (contentType) { - const binaryTypes = ['application/octet-stream', 'application/pdf', 'application/zip', 'audio/', 'image/', 'video/']; - if (contentType.includes('application/json') || contentType.includes('+json')) { - return await response.json(); - } else if (binaryTypes.some(type => contentType.includes(type))) { - return await response.blob(); - } else if (contentType.includes('multipart/form-data')) { - return await response.formData(); - } else if (contentType.includes('text/')) { - return await response.text(); - } - } - } catch (error) { - console.error(error); - } - } - return undefined; -}; - -export const catchErrorCodes = (options: ApiRequestOptions, result: ApiResult): void => { - const errors: Record = { - 400: 'Bad Request', - 401: 'Unauthorized', - 402: 'Payment Required', - 403: 'Forbidden', - 404: 'Not Found', - 405: 'Method Not Allowed', - 406: 'Not Acceptable', - 407: 'Proxy Authentication Required', - 408: 'Request Timeout', - 409: 'Conflict', - 410: 'Gone', - 411: 'Length Required', - 412: 'Precondition Failed', - 413: 'Payload Too Large', - 414: 'URI Too Long', - 415: 'Unsupported Media Type', - 416: 'Range Not Satisfiable', - 417: 'Expectation Failed', - 418: 'Im a teapot', - 421: 'Misdirected Request', - 422: 'Unprocessable Content', - 423: 'Locked', - 424: 'Failed Dependency', - 425: 'Too Early', - 426: 'Upgrade Required', - 428: 'Precondition Required', - 429: 'Too Many Requests', - 431: 'Request Header Fields Too Large', - 451: 'Unavailable For Legal Reasons', - 500: 'Internal Server Error', - 501: 'Not Implemented', - 502: 'Bad Gateway', - 503: 'Service Unavailable', - 504: 'Gateway Timeout', - 505: 'HTTP Version Not Supported', - 506: 'Variant Also Negotiates', - 507: 'Insufficient Storage', - 508: 'Loop Detected', - 510: 'Not Extended', - 511: 'Network Authentication Required', - ...options.errors, - } - - const error = errors[result.status]; - if (error) { - throw new ApiError(options, result, error); - } - - if (!result.ok) { - const errorStatus = result.status ?? 'unknown'; - const errorStatusText = result.statusText ?? 'unknown'; - const errorBody = (() => { - try { - return JSON.stringify(result.body, null, 2); - } catch (e) { - return undefined; - } - })(); - - throw new ApiError(options, result, - `Generic Error: status: ${errorStatus}; status text: ${errorStatusText}; body: ${errorBody}` - ); - } -}; - -/** - * Request method - * @param config The OpenAPI configuration object - * @param options The request options from the service - * @returns CancelablePromise - * @throws ApiError - */ -export const request = (config: OpenAPIConfig, options: ApiRequestOptions): CancelablePromise => { - 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) { - let response = await sendRequest(config, options, url, body, formData, headers, onCancel); - - for (const fn of config.interceptors.response._fns) { - response = await fn(response); - } - - const responseBody = await getResponseBody(response); - const responseHeader = getResponseHeader(response, options.responseHeader); - - let transformedBody = responseBody; - if (options.responseTransformer && response.ok) { - transformedBody = await options.responseTransformer(responseBody) - } - - const result: ApiResult = { - url, - ok: response.ok, - status: response.status, - statusText: response.statusText, - body: responseHeader ?? transformedBody, - }; - - catchErrorCodes(options, result); - - resolve(result.body); - } - } catch (error) { - reject(error); - } - }); -}; \ No newline at end of file diff --git a/src/Umbraco.Web.UI.Client/src/external/backend-api/src/index.ts b/src/Umbraco.Web.UI.Client/src/external/backend-api/src/index.ts deleted file mode 100644 index 50a1dd734c..0000000000 --- a/src/Umbraco.Web.UI.Client/src/external/backend-api/src/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -// This file is auto-generated by @hey-api/openapi-ts -export { ApiError } from './core/ApiError'; -export { CancelablePromise, CancelError } from './core/CancelablePromise'; -export { OpenAPI, type OpenAPIConfig } from './core/OpenAPI'; -export * from './sdk.gen'; -export * from './types.gen'; \ No newline at end of file diff --git a/src/Umbraco.Web.UI.Client/src/external/backend-api/src/sdk.gen.ts b/src/Umbraco.Web.UI.Client/src/external/backend-api/src/sdk.gen.ts deleted file mode 100644 index 080a6477db..0000000000 --- a/src/Umbraco.Web.UI.Client/src/external/backend-api/src/sdk.gen.ts +++ /dev/null @@ -1,9072 +0,0 @@ -// This file is auto-generated by @hey-api/openapi-ts - -import type { CancelablePromise } from './core/CancelablePromise'; -import { OpenAPI } from './core/OpenAPI'; -import { request as __request } from './core/request'; -import type { GetCultureData, GetCultureResponse, PostDataTypeData, PostDataTypeResponse, GetDataTypeByIdData, GetDataTypeByIdResponse, DeleteDataTypeByIdData, DeleteDataTypeByIdResponse, PutDataTypeByIdData, PutDataTypeByIdResponse, PostDataTypeByIdCopyData, PostDataTypeByIdCopyResponse, GetDataTypeByIdIsUsedData, GetDataTypeByIdIsUsedResponse, PutDataTypeByIdMoveData, PutDataTypeByIdMoveResponse, GetDataTypeByIdReferencedByData, GetDataTypeByIdReferencedByResponse, GetDataTypeByIdReferencesData, GetDataTypeByIdReferencesResponse, GetDataTypeConfigurationResponse, PostDataTypeFolderData, PostDataTypeFolderResponse, GetDataTypeFolderByIdData, GetDataTypeFolderByIdResponse, DeleteDataTypeFolderByIdData, DeleteDataTypeFolderByIdResponse, PutDataTypeFolderByIdData, PutDataTypeFolderByIdResponse, GetFilterDataTypeData, GetFilterDataTypeResponse, GetItemDataTypeData, GetItemDataTypeResponse, GetItemDataTypeSearchData, GetItemDataTypeSearchResponse, GetTreeDataTypeAncestorsData, GetTreeDataTypeAncestorsResponse, GetTreeDataTypeChildrenData, GetTreeDataTypeChildrenResponse, GetTreeDataTypeRootData, GetTreeDataTypeRootResponse, GetDictionaryData, GetDictionaryResponse, PostDictionaryData, PostDictionaryResponse, GetDictionaryByIdData, GetDictionaryByIdResponse, DeleteDictionaryByIdData, DeleteDictionaryByIdResponse, PutDictionaryByIdData, PutDictionaryByIdResponse, GetDictionaryByIdExportData, GetDictionaryByIdExportResponse, PutDictionaryByIdMoveData, PutDictionaryByIdMoveResponse, PostDictionaryImportData, PostDictionaryImportResponse, GetItemDictionaryData, GetItemDictionaryResponse, GetTreeDictionaryAncestorsData, GetTreeDictionaryAncestorsResponse, GetTreeDictionaryChildrenData, GetTreeDictionaryChildrenResponse, GetTreeDictionaryRootData, GetTreeDictionaryRootResponse, GetCollectionDocumentByIdData, GetCollectionDocumentByIdResponse, PostDocumentData, PostDocumentResponse, GetDocumentByIdData, GetDocumentByIdResponse, DeleteDocumentByIdData, DeleteDocumentByIdResponse, PutDocumentByIdData, PutDocumentByIdResponse, GetDocumentByIdAuditLogData, GetDocumentByIdAuditLogResponse, PostDocumentByIdCopyData, PostDocumentByIdCopyResponse, GetDocumentByIdDomainsData, GetDocumentByIdDomainsResponse, PutDocumentByIdDomainsData, PutDocumentByIdDomainsResponse, PutDocumentByIdMoveData, PutDocumentByIdMoveResponse, PutDocumentByIdMoveToRecycleBinData, PutDocumentByIdMoveToRecycleBinResponse, GetDocumentByIdNotificationsData, GetDocumentByIdNotificationsResponse, PutDocumentByIdNotificationsData, PutDocumentByIdNotificationsResponse, PostDocumentByIdPublicAccessData, PostDocumentByIdPublicAccessResponse, DeleteDocumentByIdPublicAccessData, DeleteDocumentByIdPublicAccessResponse, GetDocumentByIdPublicAccessData, GetDocumentByIdPublicAccessResponse, PutDocumentByIdPublicAccessData, PutDocumentByIdPublicAccessResponse, PutDocumentByIdPublishData, PutDocumentByIdPublishResponse, PutDocumentByIdPublishWithDescendantsData, PutDocumentByIdPublishWithDescendantsResponse, GetDocumentByIdPublishWithDescendantsResultByTaskIdData, GetDocumentByIdPublishWithDescendantsResultByTaskIdResponse, GetDocumentByIdPublishedData, GetDocumentByIdPublishedResponse, GetDocumentByIdReferencedByData, GetDocumentByIdReferencedByResponse, GetDocumentByIdReferencedDescendantsData, GetDocumentByIdReferencedDescendantsResponse, PutDocumentByIdUnpublishData, PutDocumentByIdUnpublishResponse, PutUmbracoManagementApiV11DocumentByIdValidate11Data, PutUmbracoManagementApiV11DocumentByIdValidate11Response, GetDocumentAreReferencedData, GetDocumentAreReferencedResponse, GetDocumentConfigurationResponse, PutDocumentSortData, PutDocumentSortResponse, GetDocumentUrlsData, GetDocumentUrlsResponse, PostDocumentValidateData, PostDocumentValidateResponse, GetItemDocumentData, GetItemDocumentResponse, GetItemDocumentSearchData, GetItemDocumentSearchResponse, DeleteRecycleBinDocumentResponse, DeleteRecycleBinDocumentByIdData, DeleteRecycleBinDocumentByIdResponse, GetRecycleBinDocumentByIdOriginalParentData, GetRecycleBinDocumentByIdOriginalParentResponse, PutRecycleBinDocumentByIdRestoreData, PutRecycleBinDocumentByIdRestoreResponse, GetRecycleBinDocumentChildrenData, GetRecycleBinDocumentChildrenResponse, GetRecycleBinDocumentReferencedByData, GetRecycleBinDocumentReferencedByResponse, GetRecycleBinDocumentRootData, GetRecycleBinDocumentRootResponse, GetTreeDocumentAncestorsData, GetTreeDocumentAncestorsResponse, GetTreeDocumentChildrenData, GetTreeDocumentChildrenResponse, GetTreeDocumentRootData, GetTreeDocumentRootResponse, PostDocumentBlueprintData, PostDocumentBlueprintResponse, GetDocumentBlueprintByIdData, GetDocumentBlueprintByIdResponse, DeleteDocumentBlueprintByIdData, DeleteDocumentBlueprintByIdResponse, PutDocumentBlueprintByIdData, PutDocumentBlueprintByIdResponse, PutDocumentBlueprintByIdMoveData, PutDocumentBlueprintByIdMoveResponse, PostDocumentBlueprintFolderData, PostDocumentBlueprintFolderResponse, GetDocumentBlueprintFolderByIdData, GetDocumentBlueprintFolderByIdResponse, DeleteDocumentBlueprintFolderByIdData, DeleteDocumentBlueprintFolderByIdResponse, PutDocumentBlueprintFolderByIdData, PutDocumentBlueprintFolderByIdResponse, PostDocumentBlueprintFromDocumentData, PostDocumentBlueprintFromDocumentResponse, GetItemDocumentBlueprintData, GetItemDocumentBlueprintResponse, GetTreeDocumentBlueprintAncestorsData, GetTreeDocumentBlueprintAncestorsResponse, GetTreeDocumentBlueprintChildrenData, GetTreeDocumentBlueprintChildrenResponse, GetTreeDocumentBlueprintRootData, GetTreeDocumentBlueprintRootResponse, PostDocumentTypeData, PostDocumentTypeResponse, GetDocumentTypeByIdData, GetDocumentTypeByIdResponse, DeleteDocumentTypeByIdData, DeleteDocumentTypeByIdResponse, PutDocumentTypeByIdData, PutDocumentTypeByIdResponse, GetDocumentTypeByIdAllowedChildrenData, GetDocumentTypeByIdAllowedChildrenResponse, GetDocumentTypeByIdBlueprintData, GetDocumentTypeByIdBlueprintResponse, GetDocumentTypeByIdCompositionReferencesData, GetDocumentTypeByIdCompositionReferencesResponse, PostDocumentTypeByIdCopyData, PostDocumentTypeByIdCopyResponse, GetDocumentTypeByIdExportData, GetDocumentTypeByIdExportResponse, PutDocumentTypeByIdImportData, PutDocumentTypeByIdImportResponse, PutDocumentTypeByIdMoveData, PutDocumentTypeByIdMoveResponse, GetDocumentTypeAllowedAtRootData, GetDocumentTypeAllowedAtRootResponse, PostDocumentTypeAvailableCompositionsData, PostDocumentTypeAvailableCompositionsResponse, GetDocumentTypeConfigurationResponse, PostDocumentTypeFolderData, PostDocumentTypeFolderResponse, GetDocumentTypeFolderByIdData, GetDocumentTypeFolderByIdResponse, DeleteDocumentTypeFolderByIdData, DeleteDocumentTypeFolderByIdResponse, PutDocumentTypeFolderByIdData, PutDocumentTypeFolderByIdResponse, PostDocumentTypeImportData, PostDocumentTypeImportResponse, GetItemDocumentTypeData, GetItemDocumentTypeResponse, GetItemDocumentTypeSearchData, GetItemDocumentTypeSearchResponse, GetTreeDocumentTypeAncestorsData, GetTreeDocumentTypeAncestorsResponse, GetTreeDocumentTypeChildrenData, GetTreeDocumentTypeChildrenResponse, GetTreeDocumentTypeRootData, GetTreeDocumentTypeRootResponse, GetDocumentVersionData, GetDocumentVersionResponse, GetDocumentVersionByIdData, GetDocumentVersionByIdResponse, PutDocumentVersionByIdPreventCleanupData, PutDocumentVersionByIdPreventCleanupResponse, PostDocumentVersionByIdRollbackData, PostDocumentVersionByIdRollbackResponse, PostDynamicRootQueryData, PostDynamicRootQueryResponse, GetDynamicRootStepsResponse, GetHealthCheckGroupData, GetHealthCheckGroupResponse, GetHealthCheckGroupByNameData, GetHealthCheckGroupByNameResponse, PostHealthCheckGroupByNameCheckData, PostHealthCheckGroupByNameCheckResponse, PostHealthCheckExecuteActionData, PostHealthCheckExecuteActionResponse, GetHelpData, GetHelpResponse, GetImagingResizeUrlsData, GetImagingResizeUrlsResponse, GetImportAnalyzeData, GetImportAnalyzeResponse, GetIndexerData, GetIndexerResponse, GetIndexerByIndexNameData, GetIndexerByIndexNameResponse, PostIndexerByIndexNameRebuildData, PostIndexerByIndexNameRebuildResponse, GetInstallSettingsResponse, PostInstallSetupData, PostInstallSetupResponse, PostInstallValidateDatabaseData, PostInstallValidateDatabaseResponse, GetItemLanguageData, GetItemLanguageResponse, GetItemLanguageDefaultResponse, GetLanguageData, GetLanguageResponse, PostLanguageData, PostLanguageResponse, GetLanguageByIsoCodeData, GetLanguageByIsoCodeResponse, DeleteLanguageByIsoCodeData, DeleteLanguageByIsoCodeResponse, PutLanguageByIsoCodeData, PutLanguageByIsoCodeResponse, GetLogViewerLevelData, GetLogViewerLevelResponse, GetLogViewerLevelCountData, GetLogViewerLevelCountResponse, GetLogViewerLogData, GetLogViewerLogResponse, GetLogViewerMessageTemplateData, GetLogViewerMessageTemplateResponse, GetLogViewerSavedSearchData, GetLogViewerSavedSearchResponse, PostLogViewerSavedSearchData, PostLogViewerSavedSearchResponse, GetLogViewerSavedSearchByNameData, GetLogViewerSavedSearchByNameResponse, DeleteLogViewerSavedSearchByNameData, DeleteLogViewerSavedSearchByNameResponse, GetLogViewerValidateLogsSizeData, GetLogViewerValidateLogsSizeResponse, GetManifestManifestResponse, GetManifestManifestPrivateResponse, GetManifestManifestPublicResponse, GetCollectionMediaData, GetCollectionMediaResponse, GetItemMediaData, GetItemMediaResponse, GetItemMediaSearchData, GetItemMediaSearchResponse, PostMediaData, PostMediaResponse, GetMediaByIdData, GetMediaByIdResponse, DeleteMediaByIdData, DeleteMediaByIdResponse, PutMediaByIdData, PutMediaByIdResponse, GetMediaByIdAuditLogData, GetMediaByIdAuditLogResponse, PutMediaByIdMoveData, PutMediaByIdMoveResponse, PutMediaByIdMoveToRecycleBinData, PutMediaByIdMoveToRecycleBinResponse, GetMediaByIdReferencedByData, GetMediaByIdReferencedByResponse, GetMediaByIdReferencedDescendantsData, GetMediaByIdReferencedDescendantsResponse, PutMediaByIdValidateData, PutMediaByIdValidateResponse, GetMediaAreReferencedData, GetMediaAreReferencedResponse, GetMediaConfigurationResponse, PutMediaSortData, PutMediaSortResponse, GetMediaUrlsData, GetMediaUrlsResponse, PostMediaValidateData, PostMediaValidateResponse, DeleteRecycleBinMediaResponse, DeleteRecycleBinMediaByIdData, DeleteRecycleBinMediaByIdResponse, GetRecycleBinMediaByIdOriginalParentData, GetRecycleBinMediaByIdOriginalParentResponse, PutRecycleBinMediaByIdRestoreData, PutRecycleBinMediaByIdRestoreResponse, GetRecycleBinMediaChildrenData, GetRecycleBinMediaChildrenResponse, GetRecycleBinMediaReferencedByData, GetRecycleBinMediaReferencedByResponse, GetRecycleBinMediaRootData, GetRecycleBinMediaRootResponse, GetTreeMediaAncestorsData, GetTreeMediaAncestorsResponse, GetTreeMediaChildrenData, GetTreeMediaChildrenResponse, GetTreeMediaRootData, GetTreeMediaRootResponse, GetItemMediaTypeData, GetItemMediaTypeResponse, GetItemMediaTypeAllowedData, GetItemMediaTypeAllowedResponse, GetItemMediaTypeFoldersData, GetItemMediaTypeFoldersResponse, GetItemMediaTypeSearchData, GetItemMediaTypeSearchResponse, PostMediaTypeData, PostMediaTypeResponse, GetMediaTypeByIdData, GetMediaTypeByIdResponse, DeleteMediaTypeByIdData, DeleteMediaTypeByIdResponse, PutMediaTypeByIdData, PutMediaTypeByIdResponse, GetMediaTypeByIdAllowedChildrenData, GetMediaTypeByIdAllowedChildrenResponse, GetMediaTypeByIdCompositionReferencesData, GetMediaTypeByIdCompositionReferencesResponse, PostMediaTypeByIdCopyData, PostMediaTypeByIdCopyResponse, GetMediaTypeByIdExportData, GetMediaTypeByIdExportResponse, PutMediaTypeByIdImportData, PutMediaTypeByIdImportResponse, PutMediaTypeByIdMoveData, PutMediaTypeByIdMoveResponse, GetMediaTypeAllowedAtRootData, GetMediaTypeAllowedAtRootResponse, PostMediaTypeAvailableCompositionsData, PostMediaTypeAvailableCompositionsResponse, GetMediaTypeConfigurationResponse, PostMediaTypeFolderData, PostMediaTypeFolderResponse, GetMediaTypeFolderByIdData, GetMediaTypeFolderByIdResponse, DeleteMediaTypeFolderByIdData, DeleteMediaTypeFolderByIdResponse, PutMediaTypeFolderByIdData, PutMediaTypeFolderByIdResponse, PostMediaTypeImportData, PostMediaTypeImportResponse, GetTreeMediaTypeAncestorsData, GetTreeMediaTypeAncestorsResponse, GetTreeMediaTypeChildrenData, GetTreeMediaTypeChildrenResponse, GetTreeMediaTypeRootData, GetTreeMediaTypeRootResponse, GetFilterMemberData, GetFilterMemberResponse, GetItemMemberData, GetItemMemberResponse, GetItemMemberSearchData, GetItemMemberSearchResponse, PostMemberData, PostMemberResponse, GetMemberByIdData, GetMemberByIdResponse, DeleteMemberByIdData, DeleteMemberByIdResponse, PutMemberByIdData, PutMemberByIdResponse, GetMemberByIdReferencedByData, GetMemberByIdReferencedByResponse, GetMemberByIdReferencedDescendantsData, GetMemberByIdReferencedDescendantsResponse, PutMemberByIdValidateData, PutMemberByIdValidateResponse, GetMemberAreReferencedData, GetMemberAreReferencedResponse, GetMemberConfigurationResponse, PostMemberValidateData, PostMemberValidateResponse, GetItemMemberGroupData, GetItemMemberGroupResponse, GetMemberGroupData, GetMemberGroupResponse, PostMemberGroupData, PostMemberGroupResponse, GetMemberGroupByIdData, GetMemberGroupByIdResponse, DeleteMemberGroupByIdData, DeleteMemberGroupByIdResponse, PutMemberGroupByIdData, PutMemberGroupByIdResponse, GetTreeMemberGroupRootData, GetTreeMemberGroupRootResponse, GetItemMemberTypeData, GetItemMemberTypeResponse, GetItemMemberTypeSearchData, GetItemMemberTypeSearchResponse, PostMemberTypeData, PostMemberTypeResponse, GetMemberTypeByIdData, GetMemberTypeByIdResponse, DeleteMemberTypeByIdData, DeleteMemberTypeByIdResponse, PutMemberTypeByIdData, PutMemberTypeByIdResponse, GetMemberTypeByIdCompositionReferencesData, GetMemberTypeByIdCompositionReferencesResponse, PostMemberTypeByIdCopyData, PostMemberTypeByIdCopyResponse, PostMemberTypeAvailableCompositionsData, PostMemberTypeAvailableCompositionsResponse, GetMemberTypeConfigurationResponse, GetTreeMemberTypeRootData, GetTreeMemberTypeRootResponse, PostModelsBuilderBuildResponse, GetModelsBuilderDashboardResponse, GetModelsBuilderStatusResponse, GetObjectTypesData, GetObjectTypesResponse, GetOembedQueryData, GetOembedQueryResponse, PostPackageByNameRunMigrationData, PostPackageByNameRunMigrationResponse, GetPackageConfigurationResponse, GetPackageCreatedData, GetPackageCreatedResponse, PostPackageCreatedData, PostPackageCreatedResponse, GetPackageCreatedByIdData, GetPackageCreatedByIdResponse, DeletePackageCreatedByIdData, DeletePackageCreatedByIdResponse, PutPackageCreatedByIdData, PutPackageCreatedByIdResponse, GetPackageCreatedByIdDownloadData, GetPackageCreatedByIdDownloadResponse, GetPackageMigrationStatusData, GetPackageMigrationStatusResponse, GetItemPartialViewData, GetItemPartialViewResponse, PostPartialViewData, PostPartialViewResponse, GetPartialViewByPathData, GetPartialViewByPathResponse, DeletePartialViewByPathData, DeletePartialViewByPathResponse, PutPartialViewByPathData, PutPartialViewByPathResponse, PutPartialViewByPathRenameData, PutPartialViewByPathRenameResponse, PostPartialViewFolderData, PostPartialViewFolderResponse, GetPartialViewFolderByPathData, GetPartialViewFolderByPathResponse, DeletePartialViewFolderByPathData, DeletePartialViewFolderByPathResponse, GetPartialViewSnippetData, GetPartialViewSnippetResponse, GetPartialViewSnippetByIdData, GetPartialViewSnippetByIdResponse, GetTreePartialViewAncestorsData, GetTreePartialViewAncestorsResponse, GetTreePartialViewChildrenData, GetTreePartialViewChildrenResponse, GetTreePartialViewRootData, GetTreePartialViewRootResponse, DeletePreviewResponse, PostPreviewResponse, GetProfilingStatusResponse, PutProfilingStatusData, PutProfilingStatusResponse, GetPropertyTypeIsUsedData, GetPropertyTypeIsUsedResponse, PostPublishedCacheRebuildResponse, GetPublishedCacheRebuildStatusResponse, PostPublishedCacheReloadResponse, GetRedirectManagementData, GetRedirectManagementResponse, GetRedirectManagementByIdData, GetRedirectManagementByIdResponse, DeleteRedirectManagementByIdData, DeleteRedirectManagementByIdResponse, GetRedirectManagementStatusResponse, PostRedirectManagementStatusData, PostRedirectManagementStatusResponse, GetRelationByRelationTypeIdData, GetRelationByRelationTypeIdResponse, GetItemRelationTypeData, GetItemRelationTypeResponse, GetRelationTypeData, GetRelationTypeResponse, GetRelationTypeByIdData, GetRelationTypeByIdResponse, GetItemScriptData, GetItemScriptResponse, PostScriptData, PostScriptResponse, GetScriptByPathData, GetScriptByPathResponse, DeleteScriptByPathData, DeleteScriptByPathResponse, PutScriptByPathData, PutScriptByPathResponse, PutScriptByPathRenameData, PutScriptByPathRenameResponse, PostScriptFolderData, PostScriptFolderResponse, GetScriptFolderByPathData, GetScriptFolderByPathResponse, DeleteScriptFolderByPathData, DeleteScriptFolderByPathResponse, GetTreeScriptAncestorsData, GetTreeScriptAncestorsResponse, GetTreeScriptChildrenData, GetTreeScriptChildrenResponse, GetTreeScriptRootData, GetTreeScriptRootResponse, GetSearcherData, GetSearcherResponse, GetSearcherBySearcherNameQueryData, GetSearcherBySearcherNameQueryResponse, GetSecurityConfigurationResponse, PostSecurityForgotPasswordData, PostSecurityForgotPasswordResponse, PostSecurityForgotPasswordResetData, PostSecurityForgotPasswordResetResponse, PostSecurityForgotPasswordVerifyData, PostSecurityForgotPasswordVerifyResponse, GetSegmentData, GetSegmentResponse, GetServerConfigurationResponse, GetServerInformationResponse, GetServerStatusResponse, GetServerTroubleshootingResponse, GetServerUpgradeCheckResponse, GetItemStaticFileData, GetItemStaticFileResponse, GetTreeStaticFileAncestorsData, GetTreeStaticFileAncestorsResponse, GetTreeStaticFileChildrenData, GetTreeStaticFileChildrenResponse, GetTreeStaticFileRootData, GetTreeStaticFileRootResponse, GetItemStylesheetData, GetItemStylesheetResponse, PostStylesheetData, PostStylesheetResponse, GetStylesheetByPathData, GetStylesheetByPathResponse, DeleteStylesheetByPathData, DeleteStylesheetByPathResponse, PutStylesheetByPathData, PutStylesheetByPathResponse, PutStylesheetByPathRenameData, PutStylesheetByPathRenameResponse, PostStylesheetFolderData, PostStylesheetFolderResponse, GetStylesheetFolderByPathData, GetStylesheetFolderByPathResponse, DeleteStylesheetFolderByPathData, DeleteStylesheetFolderByPathResponse, GetTreeStylesheetAncestorsData, GetTreeStylesheetAncestorsResponse, GetTreeStylesheetChildrenData, GetTreeStylesheetChildrenResponse, GetTreeStylesheetRootData, GetTreeStylesheetRootResponse, GetTagData, GetTagResponse, GetTelemetryData, GetTelemetryResponse, GetTelemetryLevelResponse, PostTelemetryLevelData, PostTelemetryLevelResponse, GetItemTemplateData, GetItemTemplateResponse, GetItemTemplateSearchData, GetItemTemplateSearchResponse, PostTemplateData, PostTemplateResponse, GetTemplateByIdData, GetTemplateByIdResponse, DeleteTemplateByIdData, DeleteTemplateByIdResponse, PutTemplateByIdData, PutTemplateByIdResponse, GetTemplateConfigurationResponse, PostTemplateQueryExecuteData, PostTemplateQueryExecuteResponse, GetTemplateQuerySettingsResponse, GetTreeTemplateAncestorsData, GetTreeTemplateAncestorsResponse, GetTreeTemplateChildrenData, GetTreeTemplateChildrenResponse, GetTreeTemplateRootData, GetTreeTemplateRootResponse, PostTemporaryFileData, PostTemporaryFileResponse, GetTemporaryFileByIdData, GetTemporaryFileByIdResponse, DeleteTemporaryFileByIdData, DeleteTemporaryFileByIdResponse, GetTemporaryFileConfigurationResponse, PostUpgradeAuthorizeResponse, GetUpgradeSettingsResponse, GetFilterUserData, GetFilterUserResponse, GetItemUserData, GetItemUserResponse, PostUserData, PostUserResponse, DeleteUserData, DeleteUserResponse, GetUserData, GetUserResponse, GetUserByIdData, GetUserByIdResponse, DeleteUserByIdData, DeleteUserByIdResponse, PutUserByIdData, PutUserByIdResponse, GetUserById2FaData, GetUserById2FaResponse, DeleteUserById2FaByProviderNameData, DeleteUserById2FaByProviderNameResponse, GetUserByIdCalculateStartNodesData, GetUserByIdCalculateStartNodesResponse, PostUserByIdChangePasswordData, PostUserByIdChangePasswordResponse, PostUserByIdClientCredentialsData, PostUserByIdClientCredentialsResponse, GetUserByIdClientCredentialsData, GetUserByIdClientCredentialsResponse, DeleteUserByIdClientCredentialsByClientIdData, DeleteUserByIdClientCredentialsByClientIdResponse, PostUserByIdResetPasswordData, PostUserByIdResetPasswordResponse, DeleteUserAvatarByIdData, DeleteUserAvatarByIdResponse, PostUserAvatarByIdData, PostUserAvatarByIdResponse, GetUserConfigurationResponse, GetUserCurrentResponse, GetUserCurrent2FaResponse, DeleteUserCurrent2FaByProviderNameData, DeleteUserCurrent2FaByProviderNameResponse, PostUserCurrent2FaByProviderNameData, PostUserCurrent2FaByProviderNameResponse, GetUserCurrent2FaByProviderNameData, GetUserCurrent2FaByProviderNameResponse, PostUserCurrentAvatarData, PostUserCurrentAvatarResponse, PostUserCurrentChangePasswordData, PostUserCurrentChangePasswordResponse, GetUserCurrentConfigurationResponse, GetUserCurrentLoginProvidersResponse, GetUserCurrentPermissionsData, GetUserCurrentPermissionsResponse, GetUserCurrentPermissionsDocumentData, GetUserCurrentPermissionsDocumentResponse, GetUserCurrentPermissionsMediaData, GetUserCurrentPermissionsMediaResponse, PostUserDisableData, PostUserDisableResponse, PostUserEnableData, PostUserEnableResponse, PostUserInviteData, PostUserInviteResponse, PostUserInviteCreatePasswordData, PostUserInviteCreatePasswordResponse, PostUserInviteResendData, PostUserInviteResendResponse, PostUserInviteVerifyData, PostUserInviteVerifyResponse, PostUserSetUserGroupsData, PostUserSetUserGroupsResponse, PostUserUnlockData, PostUserUnlockResponse, PostUserDataData, PostUserDataResponse, GetUserDataData, GetUserDataResponse, PutUserDataData, PutUserDataResponse, GetUserDataByIdData, GetUserDataByIdResponse, GetFilterUserGroupData, GetFilterUserGroupResponse, GetItemUserGroupData, GetItemUserGroupResponse, DeleteUserGroupData, DeleteUserGroupResponse, PostUserGroupData, PostUserGroupResponse, GetUserGroupData, GetUserGroupResponse, GetUserGroupByIdData, GetUserGroupByIdResponse, DeleteUserGroupByIdData, DeleteUserGroupByIdResponse, PutUserGroupByIdData, PutUserGroupByIdResponse, DeleteUserGroupByIdUsersData, DeleteUserGroupByIdUsersResponse, PostUserGroupByIdUsersData, PostUserGroupByIdUsersResponse, GetItemWebhookData, GetItemWebhookResponse, GetWebhookData, GetWebhookResponse, PostWebhookData, PostWebhookResponse, GetWebhookByIdData, GetWebhookByIdResponse, DeleteWebhookByIdData, DeleteWebhookByIdResponse, PutWebhookByIdData, PutWebhookByIdResponse, GetWebhookByIdLogsData, GetWebhookByIdLogsResponse, GetWebhookEventsData, GetWebhookEventsResponse, GetWebhookLogsData, GetWebhookLogsResponse } from './types.gen'; - -export class CultureService { - /** - * @param data The data for the request. - * @param data.skip - * @param data.take - * @returns unknown OK - * @throws ApiError - */ - public static getCulture(data: GetCultureData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/culture', - query: { - skip: data.skip, - take: data.take - }, - errors: { - 401: 'The resource is protected and requires an authentication token' - } - }); - } - -} - -export class DataTypeService { - /** - * @param data The data for the request. - * @param data.requestBody - * @returns string Created - * @throws ApiError - */ - public static postDataType(data: PostDataTypeData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/umbraco/management/api/v1/data-type', - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Generated-Resource', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @returns unknown OK - * @throws ApiError - */ - public static getDataTypeById(data: GetDataTypeByIdData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/data-type/{id}', - path: { - id: data.id - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @returns string OK - * @throws ApiError - */ - public static deleteDataTypeById(data: DeleteDataTypeByIdData): CancelablePromise { - return __request(OpenAPI, { - method: 'DELETE', - url: '/umbraco/management/api/v1/data-type/{id}', - path: { - id: data.id - }, - responseHeader: 'Umb-Notifications', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @param data.requestBody - * @returns string OK - * @throws ApiError - */ - public static putDataTypeById(data: PutDataTypeByIdData): CancelablePromise { - return __request(OpenAPI, { - method: 'PUT', - url: '/umbraco/management/api/v1/data-type/{id}', - path: { - id: data.id - }, - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Notifications', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @param data.requestBody - * @returns string Created - * @throws ApiError - */ - public static postDataTypeByIdCopy(data: PostDataTypeByIdCopyData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/umbraco/management/api/v1/data-type/{id}/copy', - path: { - id: data.id - }, - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Generated-Resource', - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @returns boolean OK - * @throws ApiError - */ - public static getDataTypeByIdIsUsed(data: GetDataTypeByIdIsUsedData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/data-type/{id}/is-used', - path: { - id: data.id - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @param data.requestBody - * @returns string OK - * @throws ApiError - */ - public static putDataTypeByIdMove(data: PutDataTypeByIdMoveData): CancelablePromise { - return __request(OpenAPI, { - method: 'PUT', - url: '/umbraco/management/api/v1/data-type/{id}/move', - path: { - id: data.id - }, - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Notifications', - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @param data.skip - * @param data.take - * @returns unknown OK - * @throws ApiError - */ - public static getDataTypeByIdReferencedBy(data: GetDataTypeByIdReferencedByData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/data-type/{id}/referenced-by', - path: { - id: data.id - }, - query: { - skip: data.skip, - take: data.take - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - - /** - * @deprecated - * @param data The data for the request. - * @param data.id - * @returns unknown OK - * @throws ApiError - */ - public static getDataTypeByIdReferences(data: GetDataTypeByIdReferencesData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/data-type/{id}/references', - path: { - id: data.id - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @returns unknown OK - * @throws ApiError - */ - public static getDataTypeConfiguration(): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/data-type/configuration', - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - - /** - * @param data The data for the request. - * @param data.requestBody - * @returns string Created - * @throws ApiError - */ - public static postDataTypeFolder(data: PostDataTypeFolderData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/umbraco/management/api/v1/data-type/folder', - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Generated-Resource', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @returns unknown OK - * @throws ApiError - */ - public static getDataTypeFolderById(data: GetDataTypeFolderByIdData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/data-type/folder/{id}', - path: { - id: data.id - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @returns string OK - * @throws ApiError - */ - public static deleteDataTypeFolderById(data: DeleteDataTypeFolderByIdData): CancelablePromise { - return __request(OpenAPI, { - method: 'DELETE', - url: '/umbraco/management/api/v1/data-type/folder/{id}', - path: { - id: data.id - }, - responseHeader: 'Umb-Notifications', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @param data.requestBody - * @returns string OK - * @throws ApiError - */ - public static putDataTypeFolderById(data: PutDataTypeFolderByIdData): CancelablePromise { - return __request(OpenAPI, { - method: 'PUT', - url: '/umbraco/management/api/v1/data-type/folder/{id}', - path: { - id: data.id - }, - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Notifications', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.skip - * @param data.take - * @param data.name - * @param data.editorUiAlias - * @param data.editorAlias - * @returns unknown OK - * @throws ApiError - */ - public static getFilterDataType(data: GetFilterDataTypeData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/filter/data-type', - query: { - skip: data.skip, - take: data.take, - name: data.name, - editorUiAlias: data.editorUiAlias, - editorAlias: data.editorAlias - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @returns unknown OK - * @throws ApiError - */ - public static getItemDataType(data: GetItemDataTypeData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/item/data-type', - query: { - id: data.id - }, - errors: { - 401: 'The resource is protected and requires an authentication token' - } - }); - } - - /** - * @param data The data for the request. - * @param data.query - * @param data.skip - * @param data.take - * @returns unknown OK - * @throws ApiError - */ - public static getItemDataTypeSearch(data: GetItemDataTypeSearchData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/item/data-type/search', - query: { - query: data.query, - skip: data.skip, - take: data.take - }, - errors: { - 401: 'The resource is protected and requires an authentication token' - } - }); - } - - /** - * @param data The data for the request. - * @param data.descendantId - * @returns unknown OK - * @throws ApiError - */ - public static getTreeDataTypeAncestors(data: GetTreeDataTypeAncestorsData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/tree/data-type/ancestors', - query: { - descendantId: data.descendantId - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - - /** - * @param data The data for the request. - * @param data.parentId - * @param data.skip - * @param data.take - * @param data.foldersOnly - * @returns unknown OK - * @throws ApiError - */ - public static getTreeDataTypeChildren(data: GetTreeDataTypeChildrenData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/tree/data-type/children', - query: { - parentId: data.parentId, - skip: data.skip, - take: data.take, - foldersOnly: data.foldersOnly - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - - /** - * @param data The data for the request. - * @param data.skip - * @param data.take - * @param data.foldersOnly - * @returns unknown OK - * @throws ApiError - */ - public static getTreeDataTypeRoot(data: GetTreeDataTypeRootData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/tree/data-type/root', - query: { - skip: data.skip, - take: data.take, - foldersOnly: data.foldersOnly - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - -} - -export class DictionaryService { - /** - * @param data The data for the request. - * @param data.filter - * @param data.skip - * @param data.take - * @returns unknown OK - * @throws ApiError - */ - public static getDictionary(data: GetDictionaryData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/dictionary', - query: { - filter: data.filter, - skip: data.skip, - take: data.take - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - - /** - * @param data The data for the request. - * @param data.requestBody - * @returns string Created - * @throws ApiError - */ - public static postDictionary(data: PostDictionaryData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/umbraco/management/api/v1/dictionary', - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Generated-Resource', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found', - 409: 'Conflict' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @returns unknown OK - * @throws ApiError - */ - public static getDictionaryById(data: GetDictionaryByIdData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/dictionary/{id}', - path: { - id: data.id - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @returns string OK - * @throws ApiError - */ - public static deleteDictionaryById(data: DeleteDictionaryByIdData): CancelablePromise { - return __request(OpenAPI, { - method: 'DELETE', - url: '/umbraco/management/api/v1/dictionary/{id}', - path: { - id: data.id - }, - responseHeader: 'Umb-Notifications', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @param data.requestBody - * @returns string OK - * @throws ApiError - */ - public static putDictionaryById(data: PutDictionaryByIdData): CancelablePromise { - return __request(OpenAPI, { - method: 'PUT', - url: '/umbraco/management/api/v1/dictionary/{id}', - path: { - id: data.id - }, - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Notifications', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @param data.includeChildren - * @returns unknown OK - * @throws ApiError - */ - public static getDictionaryByIdExport(data: GetDictionaryByIdExportData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/dictionary/{id}/export', - path: { - id: data.id - }, - query: { - includeChildren: data.includeChildren - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @param data.requestBody - * @returns string OK - * @throws ApiError - */ - public static putDictionaryByIdMove(data: PutDictionaryByIdMoveData): CancelablePromise { - return __request(OpenAPI, { - method: 'PUT', - url: '/umbraco/management/api/v1/dictionary/{id}/move', - path: { - id: data.id - }, - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Notifications', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.requestBody - * @returns string Created - * @throws ApiError - */ - public static postDictionaryImport(data: PostDictionaryImportData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/umbraco/management/api/v1/dictionary/import', - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Generated-Resource', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @returns unknown OK - * @throws ApiError - */ - public static getItemDictionary(data: GetItemDictionaryData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/item/dictionary', - query: { - id: data.id - }, - errors: { - 401: 'The resource is protected and requires an authentication token' - } - }); - } - - /** - * @param data The data for the request. - * @param data.descendantId - * @returns unknown OK - * @throws ApiError - */ - public static getTreeDictionaryAncestors(data: GetTreeDictionaryAncestorsData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/tree/dictionary/ancestors', - query: { - descendantId: data.descendantId - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - - /** - * @param data The data for the request. - * @param data.parentId - * @param data.skip - * @param data.take - * @returns unknown OK - * @throws ApiError - */ - public static getTreeDictionaryChildren(data: GetTreeDictionaryChildrenData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/tree/dictionary/children', - query: { - parentId: data.parentId, - skip: data.skip, - take: data.take - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - - /** - * @param data The data for the request. - * @param data.skip - * @param data.take - * @returns unknown OK - * @throws ApiError - */ - public static getTreeDictionaryRoot(data: GetTreeDictionaryRootData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/tree/dictionary/root', - query: { - skip: data.skip, - take: data.take - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - -} - -export class DocumentService { - /** - * @param data The data for the request. - * @param data.id - * @param data.dataTypeId - * @param data.orderBy - * @param data.orderCulture - * @param data.orderDirection - * @param data.filter - * @param data.skip - * @param data.take - * @returns unknown OK - * @throws ApiError - */ - public static getCollectionDocumentById(data: GetCollectionDocumentByIdData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/collection/document/{id}', - path: { - id: data.id - }, - query: { - dataTypeId: data.dataTypeId, - orderBy: data.orderBy, - orderCulture: data.orderCulture, - orderDirection: data.orderDirection, - filter: data.filter, - skip: data.skip, - take: data.take - }, - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.requestBody - * @returns string Created - * @throws ApiError - */ - public static postDocument(data: PostDocumentData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/umbraco/management/api/v1/document', - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Generated-Resource', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @returns unknown OK - * @throws ApiError - */ - public static getDocumentById(data: GetDocumentByIdData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/document/{id}', - path: { - id: data.id - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @returns string OK - * @throws ApiError - */ - public static deleteDocumentById(data: DeleteDocumentByIdData): CancelablePromise { - return __request(OpenAPI, { - method: 'DELETE', - url: '/umbraco/management/api/v1/document/{id}', - path: { - id: data.id - }, - responseHeader: 'Umb-Notifications', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @param data.requestBody - * @returns string OK - * @throws ApiError - */ - public static putDocumentById(data: PutDocumentByIdData): CancelablePromise { - return __request(OpenAPI, { - method: 'PUT', - url: '/umbraco/management/api/v1/document/{id}', - path: { - id: data.id - }, - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Notifications', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @param data.orderDirection - * @param data.sinceDate - * @param data.skip - * @param data.take - * @returns unknown OK - * @throws ApiError - */ - public static getDocumentByIdAuditLog(data: GetDocumentByIdAuditLogData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/document/{id}/audit-log', - path: { - id: data.id - }, - query: { - orderDirection: data.orderDirection, - sinceDate: data.sinceDate, - skip: data.skip, - take: data.take - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @param data.requestBody - * @returns string Created - * @throws ApiError - */ - public static postDocumentByIdCopy(data: PostDocumentByIdCopyData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/umbraco/management/api/v1/document/{id}/copy', - path: { - id: data.id - }, - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Generated-Resource', - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @returns unknown OK - * @throws ApiError - */ - public static getDocumentByIdDomains(data: GetDocumentByIdDomainsData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/document/{id}/domains', - path: { - id: data.id - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @param data.requestBody - * @returns string OK - * @throws ApiError - */ - public static putDocumentByIdDomains(data: PutDocumentByIdDomainsData): CancelablePromise { - return __request(OpenAPI, { - method: 'PUT', - url: '/umbraco/management/api/v1/document/{id}/domains', - path: { - id: data.id - }, - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Notifications', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found', - 409: 'Conflict' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @param data.requestBody - * @returns string OK - * @throws ApiError - */ - public static putDocumentByIdMove(data: PutDocumentByIdMoveData): CancelablePromise { - return __request(OpenAPI, { - method: 'PUT', - url: '/umbraco/management/api/v1/document/{id}/move', - path: { - id: data.id - }, - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Notifications', - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @returns string OK - * @throws ApiError - */ - public static putDocumentByIdMoveToRecycleBin(data: PutDocumentByIdMoveToRecycleBinData): CancelablePromise { - return __request(OpenAPI, { - method: 'PUT', - url: '/umbraco/management/api/v1/document/{id}/move-to-recycle-bin', - path: { - id: data.id - }, - responseHeader: 'Umb-Notifications', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @returns unknown OK - * @throws ApiError - */ - public static getDocumentByIdNotifications(data: GetDocumentByIdNotificationsData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/document/{id}/notifications', - path: { - id: data.id - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @param data.requestBody - * @returns string OK - * @throws ApiError - */ - public static putDocumentByIdNotifications(data: PutDocumentByIdNotificationsData): CancelablePromise { - return __request(OpenAPI, { - method: 'PUT', - url: '/umbraco/management/api/v1/document/{id}/notifications', - path: { - id: data.id - }, - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Notifications', - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @param data.requestBody - * @returns string Created - * @throws ApiError - */ - public static postDocumentByIdPublicAccess(data: PostDocumentByIdPublicAccessData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/umbraco/management/api/v1/document/{id}/public-access', - path: { - id: data.id - }, - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Generated-Resource', - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @returns string OK - * @throws ApiError - */ - public static deleteDocumentByIdPublicAccess(data: DeleteDocumentByIdPublicAccessData): CancelablePromise { - return __request(OpenAPI, { - method: 'DELETE', - url: '/umbraco/management/api/v1/document/{id}/public-access', - path: { - id: data.id - }, - responseHeader: 'Umb-Notifications', - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @returns unknown OK - * @throws ApiError - */ - public static getDocumentByIdPublicAccess(data: GetDocumentByIdPublicAccessData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/document/{id}/public-access', - path: { - id: data.id - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @param data.requestBody - * @returns string OK - * @throws ApiError - */ - public static putDocumentByIdPublicAccess(data: PutDocumentByIdPublicAccessData): CancelablePromise { - return __request(OpenAPI, { - method: 'PUT', - url: '/umbraco/management/api/v1/document/{id}/public-access', - path: { - id: data.id - }, - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Notifications', - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @param data.requestBody - * @returns string OK - * @throws ApiError - */ - public static putDocumentByIdPublish(data: PutDocumentByIdPublishData): CancelablePromise { - return __request(OpenAPI, { - method: 'PUT', - url: '/umbraco/management/api/v1/document/{id}/publish', - path: { - id: data.id - }, - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Notifications', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @param data.requestBody - * @returns unknown OK - * @throws ApiError - */ - public static putDocumentByIdPublishWithDescendants(data: PutDocumentByIdPublishWithDescendantsData): CancelablePromise { - return __request(OpenAPI, { - method: 'PUT', - url: '/umbraco/management/api/v1/document/{id}/publish-with-descendants', - path: { - id: data.id - }, - body: data.requestBody, - mediaType: 'application/json', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @param data.taskId - * @returns unknown OK - * @throws ApiError - */ - public static getDocumentByIdPublishWithDescendantsResultByTaskId(data: GetDocumentByIdPublishWithDescendantsResultByTaskIdData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/document/{id}/publish-with-descendants/result/{taskId}', - path: { - id: data.id, - taskId: data.taskId - }, - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @returns unknown OK - * @throws ApiError - */ - public static getDocumentByIdPublished(data: GetDocumentByIdPublishedData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/document/{id}/published', - path: { - id: data.id - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @param data.skip - * @param data.take - * @returns unknown OK - * @throws ApiError - */ - public static getDocumentByIdReferencedBy(data: GetDocumentByIdReferencedByData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/document/{id}/referenced-by', - path: { - id: data.id - }, - query: { - skip: data.skip, - take: data.take - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @param data.skip - * @param data.take - * @returns unknown OK - * @throws ApiError - */ - public static getDocumentByIdReferencedDescendants(data: GetDocumentByIdReferencedDescendantsData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/document/{id}/referenced-descendants', - path: { - id: data.id - }, - query: { - skip: data.skip, - take: data.take - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @param data.requestBody - * @returns string OK - * @throws ApiError - */ - public static putDocumentByIdUnpublish(data: PutDocumentByIdUnpublishData): CancelablePromise { - return __request(OpenAPI, { - method: 'PUT', - url: '/umbraco/management/api/v1/document/{id}/unpublish', - path: { - id: data.id - }, - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Notifications', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @param data.requestBody - * @returns string OK - * @throws ApiError - */ - public static putUmbracoManagementApiV11DocumentByIdValidate11(data: PutUmbracoManagementApiV11DocumentByIdValidate11Data): CancelablePromise { - return __request(OpenAPI, { - method: 'PUT', - url: '/umbraco/management/api/v1.1/document/{id}/validate', - path: { - id: data.id - }, - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Notifications', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @param data.skip - * @param data.take - * @returns unknown OK - * @throws ApiError - */ - public static getDocumentAreReferenced(data: GetDocumentAreReferencedData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/document/are-referenced', - query: { - id: data.id, - skip: data.skip, - take: data.take - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - - /** - * @returns unknown OK - * @throws ApiError - */ - public static getDocumentConfiguration(): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/document/configuration', - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - - /** - * @param data The data for the request. - * @param data.requestBody - * @returns string OK - * @throws ApiError - */ - public static putDocumentSort(data: PutDocumentSortData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'PUT', - url: '/umbraco/management/api/v1/document/sort', - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Notifications', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @returns unknown OK - * @throws ApiError - */ - public static getDocumentUrls(data: GetDocumentUrlsData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/document/urls', - query: { - id: data.id - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - - /** - * @param data The data for the request. - * @param data.requestBody - * @returns string OK - * @throws ApiError - */ - public static postDocumentValidate(data: PostDocumentValidateData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/umbraco/management/api/v1/document/validate', - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Notifications', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @returns unknown OK - * @throws ApiError - */ - public static getItemDocument(data: GetItemDocumentData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/item/document', - query: { - id: data.id - }, - errors: { - 401: 'The resource is protected and requires an authentication token' - } - }); - } - - /** - * @param data The data for the request. - * @param data.query - * @param data.trashed - * @param data.skip - * @param data.take - * @param data.parentId - * @param data.allowedDocumentTypes - * @returns unknown OK - * @throws ApiError - */ - public static getItemDocumentSearch(data: GetItemDocumentSearchData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/item/document/search', - query: { - query: data.query, - trashed: data.trashed, - skip: data.skip, - take: data.take, - parentId: data.parentId, - allowedDocumentTypes: data.allowedDocumentTypes - }, - errors: { - 401: 'The resource is protected and requires an authentication token' - } - }); - } - - /** - * @returns string OK - * @throws ApiError - */ - public static deleteRecycleBinDocument(): CancelablePromise { - return __request(OpenAPI, { - method: 'DELETE', - url: '/umbraco/management/api/v1/recycle-bin/document', - responseHeader: 'Umb-Notifications', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @returns string OK - * @throws ApiError - */ - public static deleteRecycleBinDocumentById(data: DeleteRecycleBinDocumentByIdData): CancelablePromise { - return __request(OpenAPI, { - method: 'DELETE', - url: '/umbraco/management/api/v1/recycle-bin/document/{id}', - path: { - id: data.id - }, - responseHeader: 'Umb-Notifications', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @returns unknown OK - * @throws ApiError - */ - public static getRecycleBinDocumentByIdOriginalParent(data: GetRecycleBinDocumentByIdOriginalParentData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/recycle-bin/document/{id}/original-parent', - path: { - id: data.id - }, - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @param data.requestBody - * @returns string OK - * @throws ApiError - */ - public static putRecycleBinDocumentByIdRestore(data: PutRecycleBinDocumentByIdRestoreData): CancelablePromise { - return __request(OpenAPI, { - method: 'PUT', - url: '/umbraco/management/api/v1/recycle-bin/document/{id}/restore', - path: { - id: data.id - }, - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Notifications', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.parentId - * @param data.skip - * @param data.take - * @returns unknown OK - * @throws ApiError - */ - public static getRecycleBinDocumentChildren(data: GetRecycleBinDocumentChildrenData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/recycle-bin/document/children', - query: { - parentId: data.parentId, - skip: data.skip, - take: data.take - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - - /** - * @param data The data for the request. - * @param data.skip - * @param data.take - * @returns unknown OK - * @throws ApiError - */ - public static getRecycleBinDocumentReferencedBy(data: GetRecycleBinDocumentReferencedByData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/recycle-bin/document/referenced-by', - query: { - skip: data.skip, - take: data.take - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - - /** - * @param data The data for the request. - * @param data.skip - * @param data.take - * @returns unknown OK - * @throws ApiError - */ - public static getRecycleBinDocumentRoot(data: GetRecycleBinDocumentRootData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/recycle-bin/document/root', - query: { - skip: data.skip, - take: data.take - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - - /** - * @param data The data for the request. - * @param data.descendantId - * @returns unknown OK - * @throws ApiError - */ - public static getTreeDocumentAncestors(data: GetTreeDocumentAncestorsData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/tree/document/ancestors', - query: { - descendantId: data.descendantId - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - - /** - * @param data The data for the request. - * @param data.parentId - * @param data.skip - * @param data.take - * @param data.dataTypeId - * @returns unknown OK - * @throws ApiError - */ - public static getTreeDocumentChildren(data: GetTreeDocumentChildrenData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/tree/document/children', - query: { - parentId: data.parentId, - skip: data.skip, - take: data.take, - dataTypeId: data.dataTypeId - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - - /** - * @param data The data for the request. - * @param data.skip - * @param data.take - * @param data.dataTypeId - * @returns unknown OK - * @throws ApiError - */ - public static getTreeDocumentRoot(data: GetTreeDocumentRootData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/tree/document/root', - query: { - skip: data.skip, - take: data.take, - dataTypeId: data.dataTypeId - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - -} - -export class DocumentBlueprintService { - /** - * @param data The data for the request. - * @param data.requestBody - * @returns string Created - * @throws ApiError - */ - public static postDocumentBlueprint(data: PostDocumentBlueprintData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/umbraco/management/api/v1/document-blueprint', - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Generated-Resource', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @returns unknown OK - * @throws ApiError - */ - public static getDocumentBlueprintById(data: GetDocumentBlueprintByIdData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/document-blueprint/{id}', - path: { - id: data.id - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @returns string OK - * @throws ApiError - */ - public static deleteDocumentBlueprintById(data: DeleteDocumentBlueprintByIdData): CancelablePromise { - return __request(OpenAPI, { - method: 'DELETE', - url: '/umbraco/management/api/v1/document-blueprint/{id}', - path: { - id: data.id - }, - responseHeader: 'Umb-Notifications', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @param data.requestBody - * @returns string OK - * @throws ApiError - */ - public static putDocumentBlueprintById(data: PutDocumentBlueprintByIdData): CancelablePromise { - return __request(OpenAPI, { - method: 'PUT', - url: '/umbraco/management/api/v1/document-blueprint/{id}', - path: { - id: data.id - }, - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Notifications', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @param data.requestBody - * @returns string OK - * @throws ApiError - */ - public static putDocumentBlueprintByIdMove(data: PutDocumentBlueprintByIdMoveData): CancelablePromise { - return __request(OpenAPI, { - method: 'PUT', - url: '/umbraco/management/api/v1/document-blueprint/{id}/move', - path: { - id: data.id - }, - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Notifications', - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.requestBody - * @returns string Created - * @throws ApiError - */ - public static postDocumentBlueprintFolder(data: PostDocumentBlueprintFolderData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/umbraco/management/api/v1/document-blueprint/folder', - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Generated-Resource', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @returns unknown OK - * @throws ApiError - */ - public static getDocumentBlueprintFolderById(data: GetDocumentBlueprintFolderByIdData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/document-blueprint/folder/{id}', - path: { - id: data.id - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @returns string OK - * @throws ApiError - */ - public static deleteDocumentBlueprintFolderById(data: DeleteDocumentBlueprintFolderByIdData): CancelablePromise { - return __request(OpenAPI, { - method: 'DELETE', - url: '/umbraco/management/api/v1/document-blueprint/folder/{id}', - path: { - id: data.id - }, - responseHeader: 'Umb-Notifications', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @param data.requestBody - * @returns string OK - * @throws ApiError - */ - public static putDocumentBlueprintFolderById(data: PutDocumentBlueprintFolderByIdData): CancelablePromise { - return __request(OpenAPI, { - method: 'PUT', - url: '/umbraco/management/api/v1/document-blueprint/folder/{id}', - path: { - id: data.id - }, - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Notifications', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.requestBody - * @returns string Created - * @throws ApiError - */ - public static postDocumentBlueprintFromDocument(data: PostDocumentBlueprintFromDocumentData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/umbraco/management/api/v1/document-blueprint/from-document', - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Generated-Resource', - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @returns unknown OK - * @throws ApiError - */ - public static getItemDocumentBlueprint(data: GetItemDocumentBlueprintData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/item/document-blueprint', - query: { - id: data.id - }, - errors: { - 401: 'The resource is protected and requires an authentication token' - } - }); - } - - /** - * @param data The data for the request. - * @param data.descendantId - * @returns unknown OK - * @throws ApiError - */ - public static getTreeDocumentBlueprintAncestors(data: GetTreeDocumentBlueprintAncestorsData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/tree/document-blueprint/ancestors', - query: { - descendantId: data.descendantId - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - - /** - * @param data The data for the request. - * @param data.parentId - * @param data.skip - * @param data.take - * @param data.foldersOnly - * @returns unknown OK - * @throws ApiError - */ - public static getTreeDocumentBlueprintChildren(data: GetTreeDocumentBlueprintChildrenData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/tree/document-blueprint/children', - query: { - parentId: data.parentId, - skip: data.skip, - take: data.take, - foldersOnly: data.foldersOnly - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - - /** - * @param data The data for the request. - * @param data.skip - * @param data.take - * @param data.foldersOnly - * @returns unknown OK - * @throws ApiError - */ - public static getTreeDocumentBlueprintRoot(data: GetTreeDocumentBlueprintRootData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/tree/document-blueprint/root', - query: { - skip: data.skip, - take: data.take, - foldersOnly: data.foldersOnly - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - -} - -export class DocumentTypeService { - /** - * @param data The data for the request. - * @param data.requestBody - * @returns string Created - * @throws ApiError - */ - public static postDocumentType(data: PostDocumentTypeData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/umbraco/management/api/v1/document-type', - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Generated-Resource', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @returns unknown OK - * @throws ApiError - */ - public static getDocumentTypeById(data: GetDocumentTypeByIdData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/document-type/{id}', - path: { - id: data.id - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @returns string OK - * @throws ApiError - */ - public static deleteDocumentTypeById(data: DeleteDocumentTypeByIdData): CancelablePromise { - return __request(OpenAPI, { - method: 'DELETE', - url: '/umbraco/management/api/v1/document-type/{id}', - path: { - id: data.id - }, - responseHeader: 'Umb-Notifications', - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @param data.requestBody - * @returns string OK - * @throws ApiError - */ - public static putDocumentTypeById(data: PutDocumentTypeByIdData): CancelablePromise { - return __request(OpenAPI, { - method: 'PUT', - url: '/umbraco/management/api/v1/document-type/{id}', - path: { - id: data.id - }, - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Notifications', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @param data.parentContentKey - * @param data.skip - * @param data.take - * @returns unknown OK - * @throws ApiError - */ - public static getDocumentTypeByIdAllowedChildren(data: GetDocumentTypeByIdAllowedChildrenData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/document-type/{id}/allowed-children', - path: { - id: data.id - }, - query: { - parentContentKey: data.parentContentKey, - skip: data.skip, - take: data.take - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @param data.skip - * @param data.take - * @returns unknown OK - * @throws ApiError - */ - public static getDocumentTypeByIdBlueprint(data: GetDocumentTypeByIdBlueprintData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/document-type/{id}/blueprint', - path: { - id: data.id - }, - query: { - skip: data.skip, - take: data.take - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @returns unknown OK - * @throws ApiError - */ - public static getDocumentTypeByIdCompositionReferences(data: GetDocumentTypeByIdCompositionReferencesData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/document-type/{id}/composition-references', - path: { - id: data.id - }, - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @param data.requestBody - * @returns string Created - * @throws ApiError - */ - public static postDocumentTypeByIdCopy(data: PostDocumentTypeByIdCopyData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/umbraco/management/api/v1/document-type/{id}/copy', - path: { - id: data.id - }, - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Generated-Resource', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @returns unknown OK - * @throws ApiError - */ - public static getDocumentTypeByIdExport(data: GetDocumentTypeByIdExportData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/document-type/{id}/export', - path: { - id: data.id - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @param data.requestBody - * @returns string OK - * @throws ApiError - */ - public static putDocumentTypeByIdImport(data: PutDocumentTypeByIdImportData): CancelablePromise { - return __request(OpenAPI, { - method: 'PUT', - url: '/umbraco/management/api/v1/document-type/{id}/import', - path: { - id: data.id - }, - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Notifications', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @param data.requestBody - * @returns string OK - * @throws ApiError - */ - public static putDocumentTypeByIdMove(data: PutDocumentTypeByIdMoveData): CancelablePromise { - return __request(OpenAPI, { - method: 'PUT', - url: '/umbraco/management/api/v1/document-type/{id}/move', - path: { - id: data.id - }, - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Notifications', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.skip - * @param data.take - * @returns unknown OK - * @throws ApiError - */ - public static getDocumentTypeAllowedAtRoot(data: GetDocumentTypeAllowedAtRootData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/document-type/allowed-at-root', - query: { - skip: data.skip, - take: data.take - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - - /** - * @param data The data for the request. - * @param data.requestBody - * @returns unknown OK - * @throws ApiError - */ - public static postDocumentTypeAvailableCompositions(data: PostDocumentTypeAvailableCompositionsData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/umbraco/management/api/v1/document-type/available-compositions', - body: data.requestBody, - mediaType: 'application/json', - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - - /** - * @returns unknown OK - * @throws ApiError - */ - public static getDocumentTypeConfiguration(): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/document-type/configuration', - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - - /** - * @param data The data for the request. - * @param data.requestBody - * @returns string Created - * @throws ApiError - */ - public static postDocumentTypeFolder(data: PostDocumentTypeFolderData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/umbraco/management/api/v1/document-type/folder', - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Generated-Resource', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @returns unknown OK - * @throws ApiError - */ - public static getDocumentTypeFolderById(data: GetDocumentTypeFolderByIdData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/document-type/folder/{id}', - path: { - id: data.id - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @returns string OK - * @throws ApiError - */ - public static deleteDocumentTypeFolderById(data: DeleteDocumentTypeFolderByIdData): CancelablePromise { - return __request(OpenAPI, { - method: 'DELETE', - url: '/umbraco/management/api/v1/document-type/folder/{id}', - path: { - id: data.id - }, - responseHeader: 'Umb-Notifications', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @param data.requestBody - * @returns string OK - * @throws ApiError - */ - public static putDocumentTypeFolderById(data: PutDocumentTypeFolderByIdData): CancelablePromise { - return __request(OpenAPI, { - method: 'PUT', - url: '/umbraco/management/api/v1/document-type/folder/{id}', - path: { - id: data.id - }, - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Notifications', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.requestBody - * @returns string Created - * @throws ApiError - */ - public static postDocumentTypeImport(data: PostDocumentTypeImportData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/umbraco/management/api/v1/document-type/import', - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Generated-Resource', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @returns unknown OK - * @throws ApiError - */ - public static getItemDocumentType(data: GetItemDocumentTypeData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/item/document-type', - query: { - id: data.id - }, - errors: { - 401: 'The resource is protected and requires an authentication token' - } - }); - } - - /** - * @param data The data for the request. - * @param data.query - * @param data.isElement - * @param data.skip - * @param data.take - * @returns unknown OK - * @throws ApiError - */ - public static getItemDocumentTypeSearch(data: GetItemDocumentTypeSearchData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/item/document-type/search', - query: { - query: data.query, - isElement: data.isElement, - skip: data.skip, - take: data.take - }, - errors: { - 401: 'The resource is protected and requires an authentication token' - } - }); - } - - /** - * @param data The data for the request. - * @param data.descendantId - * @returns unknown OK - * @throws ApiError - */ - public static getTreeDocumentTypeAncestors(data: GetTreeDocumentTypeAncestorsData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/tree/document-type/ancestors', - query: { - descendantId: data.descendantId - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - - /** - * @param data The data for the request. - * @param data.parentId - * @param data.skip - * @param data.take - * @param data.foldersOnly - * @returns unknown OK - * @throws ApiError - */ - public static getTreeDocumentTypeChildren(data: GetTreeDocumentTypeChildrenData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/tree/document-type/children', - query: { - parentId: data.parentId, - skip: data.skip, - take: data.take, - foldersOnly: data.foldersOnly - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - - /** - * @param data The data for the request. - * @param data.skip - * @param data.take - * @param data.foldersOnly - * @returns unknown OK - * @throws ApiError - */ - public static getTreeDocumentTypeRoot(data: GetTreeDocumentTypeRootData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/tree/document-type/root', - query: { - skip: data.skip, - take: data.take, - foldersOnly: data.foldersOnly - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - -} - -export class DocumentVersionService { - /** - * @param data The data for the request. - * @param data.documentId - * @param data.culture - * @param data.skip - * @param data.take - * @returns unknown OK - * @throws ApiError - */ - public static getDocumentVersion(data: GetDocumentVersionData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/document-version', - query: { - documentId: data.documentId, - culture: data.culture, - skip: data.skip, - take: data.take - }, - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @returns unknown OK - * @throws ApiError - */ - public static getDocumentVersionById(data: GetDocumentVersionByIdData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/document-version/{id}', - path: { - id: data.id - }, - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @param data.preventCleanup - * @returns string OK - * @throws ApiError - */ - public static putDocumentVersionByIdPreventCleanup(data: PutDocumentVersionByIdPreventCleanupData): CancelablePromise { - return __request(OpenAPI, { - method: 'PUT', - url: '/umbraco/management/api/v1/document-version/{id}/prevent-cleanup', - path: { - id: data.id - }, - query: { - preventCleanup: data.preventCleanup - }, - responseHeader: 'Umb-Notifications', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @param data.culture - * @returns string OK - * @throws ApiError - */ - public static postDocumentVersionByIdRollback(data: PostDocumentVersionByIdRollbackData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/umbraco/management/api/v1/document-version/{id}/rollback', - path: { - id: data.id - }, - query: { - culture: data.culture - }, - responseHeader: 'Umb-Notifications', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - -} - -export class DynamicRootService { - /** - * @param data The data for the request. - * @param data.requestBody - * @returns unknown OK - * @throws ApiError - */ - public static postDynamicRootQuery(data: PostDynamicRootQueryData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/umbraco/management/api/v1/dynamic-root/query', - body: data.requestBody, - mediaType: 'application/json', - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - - /** - * @returns string OK - * @throws ApiError - */ - public static getDynamicRootSteps(): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/dynamic-root/steps', - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - -} - -export class HealthCheckService { - /** - * @param data The data for the request. - * @param data.skip - * @param data.take - * @returns unknown OK - * @throws ApiError - */ - public static getHealthCheckGroup(data: GetHealthCheckGroupData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/health-check-group', - query: { - skip: data.skip, - take: data.take - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - - /** - * @param data The data for the request. - * @param data.name - * @returns unknown OK - * @throws ApiError - */ - public static getHealthCheckGroupByName(data: GetHealthCheckGroupByNameData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/health-check-group/{name}', - path: { - name: data.name - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.name - * @returns unknown OK - * @throws ApiError - */ - public static postHealthCheckGroupByNameCheck(data: PostHealthCheckGroupByNameCheckData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/umbraco/management/api/v1/health-check-group/{name}/check', - path: { - name: data.name - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.requestBody - * @returns unknown OK - * @throws ApiError - */ - public static postHealthCheckExecuteAction(data: PostHealthCheckExecuteActionData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/umbraco/management/api/v1/health-check/execute-action', - body: data.requestBody, - mediaType: 'application/json', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - -} - -export class HelpService { - /** - * @param data The data for the request. - * @param data.section - * @param data.tree - * @param data.skip - * @param data.take - * @param data.baseUrl - * @returns unknown OK - * @throws ApiError - */ - public static getHelp(data: GetHelpData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/help', - query: { - section: data.section, - tree: data.tree, - skip: data.skip, - take: data.take, - baseUrl: data.baseUrl - }, - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token' - } - }); - } - -} - -export class ImagingService { - /** - * @param data The data for the request. - * @param data.id - * @param data.height - * @param data.width - * @param data.mode - * @returns unknown OK - * @throws ApiError - */ - public static getImagingResizeUrls(data: GetImagingResizeUrlsData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/imaging/resize/urls', - query: { - id: data.id, - height: data.height, - width: data.width, - mode: data.mode - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - -} - -export class ImportService { - /** - * @param data The data for the request. - * @param data.temporaryFileId - * @returns unknown OK - * @throws ApiError - */ - public static getImportAnalyze(data: GetImportAnalyzeData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/import/analyze', - query: { - temporaryFileId: data.temporaryFileId - }, - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 404: 'Not Found' - } - }); - } - -} - -export class IndexerService { - /** - * @param data The data for the request. - * @param data.skip - * @param data.take - * @returns unknown OK - * @throws ApiError - */ - public static getIndexer(data: GetIndexerData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/indexer', - query: { - skip: data.skip, - take: data.take - }, - errors: { - 401: 'The resource is protected and requires an authentication token' - } - }); - } - - /** - * @param data The data for the request. - * @param data.indexName - * @returns unknown OK - * @throws ApiError - */ - public static getIndexerByIndexName(data: GetIndexerByIndexNameData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/indexer/{indexName}', - path: { - indexName: data.indexName - }, - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token' - } - }); - } - - /** - * @param data The data for the request. - * @param data.indexName - * @returns string OK - * @throws ApiError - */ - public static postIndexerByIndexNameRebuild(data: PostIndexerByIndexNameRebuildData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/umbraco/management/api/v1/indexer/{indexName}/rebuild', - path: { - indexName: data.indexName - }, - responseHeader: 'Umb-Notifications', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 404: 'Not Found', - 409: 'Conflict' - } - }); - } - -} - -export class InstallService { - /** - * @returns unknown OK - * @throws ApiError - */ - public static getInstallSettings(): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/install/settings', - errors: { - 428: 'Precondition Required' - } - }); - } - - /** - * @param data The data for the request. - * @param data.requestBody - * @returns string OK - * @throws ApiError - */ - public static postInstallSetup(data: PostInstallSetupData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/umbraco/management/api/v1/install/setup', - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Notifications', - errors: { - 428: 'Precondition Required' - } - }); - } - - /** - * @param data The data for the request. - * @param data.requestBody - * @returns string OK - * @throws ApiError - */ - public static postInstallValidateDatabase(data: PostInstallValidateDatabaseData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/umbraco/management/api/v1/install/validate-database', - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Notifications', - errors: { - 400: 'Bad Request' - } - }); - } - -} - -export class LanguageService { - /** - * @param data The data for the request. - * @param data.isoCode - * @returns unknown OK - * @throws ApiError - */ - public static getItemLanguage(data: GetItemLanguageData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/item/language', - query: { - isoCode: data.isoCode - }, - errors: { - 401: 'The resource is protected and requires an authentication token' - } - }); - } - - /** - * @returns unknown OK - * @throws ApiError - */ - public static getItemLanguageDefault(): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/item/language/default', - errors: { - 401: 'The resource is protected and requires an authentication token' - } - }); - } - - /** - * @param data The data for the request. - * @param data.skip - * @param data.take - * @returns unknown OK - * @throws ApiError - */ - public static getLanguage(data: GetLanguageData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/language', - query: { - skip: data.skip, - take: data.take - }, - errors: { - 401: 'The resource is protected and requires an authentication token' - } - }); - } - - /** - * @param data The data for the request. - * @param data.requestBody - * @returns string Created - * @throws ApiError - */ - public static postLanguage(data: PostLanguageData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/umbraco/management/api/v1/language', - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Generated-Resource', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.isoCode - * @returns unknown OK - * @throws ApiError - */ - public static getLanguageByIsoCode(data: GetLanguageByIsoCodeData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/language/{isoCode}', - path: { - isoCode: data.isoCode - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.isoCode - * @returns string OK - * @throws ApiError - */ - public static deleteLanguageByIsoCode(data: DeleteLanguageByIsoCodeData): CancelablePromise { - return __request(OpenAPI, { - method: 'DELETE', - url: '/umbraco/management/api/v1/language/{isoCode}', - path: { - isoCode: data.isoCode - }, - responseHeader: 'Umb-Notifications', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.isoCode - * @param data.requestBody - * @returns string OK - * @throws ApiError - */ - public static putLanguageByIsoCode(data: PutLanguageByIsoCodeData): CancelablePromise { - return __request(OpenAPI, { - method: 'PUT', - url: '/umbraco/management/api/v1/language/{isoCode}', - path: { - isoCode: data.isoCode - }, - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Notifications', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - -} - -export class LogViewerService { - /** - * @param data The data for the request. - * @param data.skip - * @param data.take - * @returns unknown OK - * @throws ApiError - */ - public static getLogViewerLevel(data: GetLogViewerLevelData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/log-viewer/level', - query: { - skip: data.skip, - take: data.take - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - - /** - * @param data The data for the request. - * @param data.startDate - * @param data.endDate - * @returns unknown OK - * @throws ApiError - */ - public static getLogViewerLevelCount(data: GetLogViewerLevelCountData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/log-viewer/level-count', - query: { - startDate: data.startDate, - endDate: data.endDate - }, - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - - /** - * @param data The data for the request. - * @param data.skip - * @param data.take - * @param data.orderDirection - * @param data.filterExpression - * @param data.logLevel - * @param data.startDate - * @param data.endDate - * @returns unknown OK - * @throws ApiError - */ - public static getLogViewerLog(data: GetLogViewerLogData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/log-viewer/log', - query: { - skip: data.skip, - take: data.take, - orderDirection: data.orderDirection, - filterExpression: data.filterExpression, - logLevel: data.logLevel, - startDate: data.startDate, - endDate: data.endDate - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - - /** - * @param data The data for the request. - * @param data.skip - * @param data.take - * @param data.startDate - * @param data.endDate - * @returns unknown OK - * @throws ApiError - */ - public static getLogViewerMessageTemplate(data: GetLogViewerMessageTemplateData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/log-viewer/message-template', - query: { - skip: data.skip, - take: data.take, - startDate: data.startDate, - endDate: data.endDate - }, - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - - /** - * @param data The data for the request. - * @param data.skip - * @param data.take - * @returns unknown OK - * @throws ApiError - */ - public static getLogViewerSavedSearch(data: GetLogViewerSavedSearchData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/log-viewer/saved-search', - query: { - skip: data.skip, - take: data.take - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - - /** - * @param data The data for the request. - * @param data.requestBody - * @returns string Created - * @throws ApiError - */ - public static postLogViewerSavedSearch(data: PostLogViewerSavedSearchData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/umbraco/management/api/v1/log-viewer/saved-search', - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Generated-Resource', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - - /** - * @param data The data for the request. - * @param data.name - * @returns unknown OK - * @throws ApiError - */ - public static getLogViewerSavedSearchByName(data: GetLogViewerSavedSearchByNameData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/log-viewer/saved-search/{name}', - path: { - name: data.name - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.name - * @returns string OK - * @throws ApiError - */ - public static deleteLogViewerSavedSearchByName(data: DeleteLogViewerSavedSearchByNameData): CancelablePromise { - return __request(OpenAPI, { - method: 'DELETE', - url: '/umbraco/management/api/v1/log-viewer/saved-search/{name}', - path: { - name: data.name - }, - responseHeader: 'Umb-Notifications', - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.startDate - * @param data.endDate - * @returns unknown OK - * @throws ApiError - */ - public static getLogViewerValidateLogsSize(data: GetLogViewerValidateLogsSizeData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/log-viewer/validate-logs-size', - query: { - startDate: data.startDate, - endDate: data.endDate - }, - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - -} - -export class ManifestService { - /** - * @returns unknown OK - * @throws ApiError - */ - public static getManifestManifest(): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/manifest/manifest', - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - - /** - * @returns unknown OK - * @throws ApiError - */ - public static getManifestManifestPrivate(): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/manifest/manifest/private', - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - - /** - * @returns unknown OK - * @throws ApiError - */ - public static getManifestManifestPublic(): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/manifest/manifest/public' - }); - } - -} - -export class MediaService { - /** - * @param data The data for the request. - * @param data.id - * @param data.dataTypeId - * @param data.orderBy - * @param data.orderDirection - * @param data.filter - * @param data.skip - * @param data.take - * @returns unknown OK - * @throws ApiError - */ - public static getCollectionMedia(data: GetCollectionMediaData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/collection/media', - query: { - id: data.id, - dataTypeId: data.dataTypeId, - orderBy: data.orderBy, - orderDirection: data.orderDirection, - filter: data.filter, - skip: data.skip, - take: data.take - }, - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @returns unknown OK - * @throws ApiError - */ - public static getItemMedia(data: GetItemMediaData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/item/media', - query: { - id: data.id - }, - errors: { - 401: 'The resource is protected and requires an authentication token' - } - }); - } - - /** - * @param data The data for the request. - * @param data.query - * @param data.trashed - * @param data.skip - * @param data.take - * @param data.parentId - * @param data.allowedMediaTypes - * @returns unknown OK - * @throws ApiError - */ - public static getItemMediaSearch(data: GetItemMediaSearchData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/item/media/search', - query: { - query: data.query, - trashed: data.trashed, - skip: data.skip, - take: data.take, - parentId: data.parentId, - allowedMediaTypes: data.allowedMediaTypes - }, - errors: { - 401: 'The resource is protected and requires an authentication token' - } - }); - } - - /** - * @param data The data for the request. - * @param data.requestBody - * @returns string Created - * @throws ApiError - */ - public static postMedia(data: PostMediaData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/umbraco/management/api/v1/media', - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Generated-Resource', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @returns unknown OK - * @throws ApiError - */ - public static getMediaById(data: GetMediaByIdData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/media/{id}', - path: { - id: data.id - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @returns string OK - * @throws ApiError - */ - public static deleteMediaById(data: DeleteMediaByIdData): CancelablePromise { - return __request(OpenAPI, { - method: 'DELETE', - url: '/umbraco/management/api/v1/media/{id}', - path: { - id: data.id - }, - responseHeader: 'Umb-Notifications', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @param data.requestBody - * @returns string OK - * @throws ApiError - */ - public static putMediaById(data: PutMediaByIdData): CancelablePromise { - return __request(OpenAPI, { - method: 'PUT', - url: '/umbraco/management/api/v1/media/{id}', - path: { - id: data.id - }, - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Notifications', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @param data.orderDirection - * @param data.sinceDate - * @param data.skip - * @param data.take - * @returns unknown OK - * @throws ApiError - */ - public static getMediaByIdAuditLog(data: GetMediaByIdAuditLogData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/media/{id}/audit-log', - path: { - id: data.id - }, - query: { - orderDirection: data.orderDirection, - sinceDate: data.sinceDate, - skip: data.skip, - take: data.take - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @param data.requestBody - * @returns string OK - * @throws ApiError - */ - public static putMediaByIdMove(data: PutMediaByIdMoveData): CancelablePromise { - return __request(OpenAPI, { - method: 'PUT', - url: '/umbraco/management/api/v1/media/{id}/move', - path: { - id: data.id - }, - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Notifications', - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @returns string OK - * @throws ApiError - */ - public static putMediaByIdMoveToRecycleBin(data: PutMediaByIdMoveToRecycleBinData): CancelablePromise { - return __request(OpenAPI, { - method: 'PUT', - url: '/umbraco/management/api/v1/media/{id}/move-to-recycle-bin', - path: { - id: data.id - }, - responseHeader: 'Umb-Notifications', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @param data.skip - * @param data.take - * @returns unknown OK - * @throws ApiError - */ - public static getMediaByIdReferencedBy(data: GetMediaByIdReferencedByData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/media/{id}/referenced-by', - path: { - id: data.id - }, - query: { - skip: data.skip, - take: data.take - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @param data.skip - * @param data.take - * @returns unknown OK - * @throws ApiError - */ - public static getMediaByIdReferencedDescendants(data: GetMediaByIdReferencedDescendantsData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/media/{id}/referenced-descendants', - path: { - id: data.id - }, - query: { - skip: data.skip, - take: data.take - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @param data.requestBody - * @returns string OK - * @throws ApiError - */ - public static putMediaByIdValidate(data: PutMediaByIdValidateData): CancelablePromise { - return __request(OpenAPI, { - method: 'PUT', - url: '/umbraco/management/api/v1/media/{id}/validate', - path: { - id: data.id - }, - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Notifications', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @param data.skip - * @param data.take - * @returns unknown OK - * @throws ApiError - */ - public static getMediaAreReferenced(data: GetMediaAreReferencedData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/media/are-referenced', - query: { - id: data.id, - skip: data.skip, - take: data.take - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - - /** - * @deprecated - * @returns unknown OK - * @throws ApiError - */ - public static getMediaConfiguration(): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/media/configuration', - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - - /** - * @param data The data for the request. - * @param data.requestBody - * @returns string OK - * @throws ApiError - */ - public static putMediaSort(data: PutMediaSortData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'PUT', - url: '/umbraco/management/api/v1/media/sort', - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Notifications', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @returns unknown OK - * @throws ApiError - */ - public static getMediaUrls(data: GetMediaUrlsData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/media/urls', - query: { - id: data.id - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - - /** - * @param data The data for the request. - * @param data.requestBody - * @returns string OK - * @throws ApiError - */ - public static postMediaValidate(data: PostMediaValidateData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/umbraco/management/api/v1/media/validate', - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Notifications', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @returns string OK - * @throws ApiError - */ - public static deleteRecycleBinMedia(): CancelablePromise { - return __request(OpenAPI, { - method: 'DELETE', - url: '/umbraco/management/api/v1/recycle-bin/media', - responseHeader: 'Umb-Notifications', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @returns string OK - * @throws ApiError - */ - public static deleteRecycleBinMediaById(data: DeleteRecycleBinMediaByIdData): CancelablePromise { - return __request(OpenAPI, { - method: 'DELETE', - url: '/umbraco/management/api/v1/recycle-bin/media/{id}', - path: { - id: data.id - }, - responseHeader: 'Umb-Notifications', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @returns unknown OK - * @throws ApiError - */ - public static getRecycleBinMediaByIdOriginalParent(data: GetRecycleBinMediaByIdOriginalParentData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/recycle-bin/media/{id}/original-parent', - path: { - id: data.id - }, - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @param data.requestBody - * @returns string OK - * @throws ApiError - */ - public static putRecycleBinMediaByIdRestore(data: PutRecycleBinMediaByIdRestoreData): CancelablePromise { - return __request(OpenAPI, { - method: 'PUT', - url: '/umbraco/management/api/v1/recycle-bin/media/{id}/restore', - path: { - id: data.id - }, - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Notifications', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.parentId - * @param data.skip - * @param data.take - * @returns unknown OK - * @throws ApiError - */ - public static getRecycleBinMediaChildren(data: GetRecycleBinMediaChildrenData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/recycle-bin/media/children', - query: { - parentId: data.parentId, - skip: data.skip, - take: data.take - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - - /** - * @param data The data for the request. - * @param data.skip - * @param data.take - * @returns unknown OK - * @throws ApiError - */ - public static getRecycleBinMediaReferencedBy(data: GetRecycleBinMediaReferencedByData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/recycle-bin/media/referenced-by', - query: { - skip: data.skip, - take: data.take - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - - /** - * @param data The data for the request. - * @param data.skip - * @param data.take - * @returns unknown OK - * @throws ApiError - */ - public static getRecycleBinMediaRoot(data: GetRecycleBinMediaRootData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/recycle-bin/media/root', - query: { - skip: data.skip, - take: data.take - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - - /** - * @param data The data for the request. - * @param data.descendantId - * @returns unknown OK - * @throws ApiError - */ - public static getTreeMediaAncestors(data: GetTreeMediaAncestorsData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/tree/media/ancestors', - query: { - descendantId: data.descendantId - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - - /** - * @param data The data for the request. - * @param data.parentId - * @param data.skip - * @param data.take - * @param data.dataTypeId - * @returns unknown OK - * @throws ApiError - */ - public static getTreeMediaChildren(data: GetTreeMediaChildrenData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/tree/media/children', - query: { - parentId: data.parentId, - skip: data.skip, - take: data.take, - dataTypeId: data.dataTypeId - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - - /** - * @param data The data for the request. - * @param data.skip - * @param data.take - * @param data.dataTypeId - * @returns unknown OK - * @throws ApiError - */ - public static getTreeMediaRoot(data: GetTreeMediaRootData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/tree/media/root', - query: { - skip: data.skip, - take: data.take, - dataTypeId: data.dataTypeId - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - -} - -export class MediaTypeService { - /** - * @param data The data for the request. - * @param data.id - * @returns unknown OK - * @throws ApiError - */ - public static getItemMediaType(data: GetItemMediaTypeData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/item/media-type', - query: { - id: data.id - }, - errors: { - 401: 'The resource is protected and requires an authentication token' - } - }); - } - - /** - * @param data The data for the request. - * @param data.fileExtension - * @param data.skip - * @param data.take - * @returns unknown OK - * @throws ApiError - */ - public static getItemMediaTypeAllowed(data: GetItemMediaTypeAllowedData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/item/media-type/allowed', - query: { - fileExtension: data.fileExtension, - skip: data.skip, - take: data.take - }, - errors: { - 401: 'The resource is protected and requires an authentication token' - } - }); - } - - /** - * @param data The data for the request. - * @param data.skip - * @param data.take - * @returns unknown OK - * @throws ApiError - */ - public static getItemMediaTypeFolders(data: GetItemMediaTypeFoldersData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/item/media-type/folders', - query: { - skip: data.skip, - take: data.take - }, - errors: { - 401: 'The resource is protected and requires an authentication token' - } - }); - } - - /** - * @param data The data for the request. - * @param data.query - * @param data.skip - * @param data.take - * @returns unknown OK - * @throws ApiError - */ - public static getItemMediaTypeSearch(data: GetItemMediaTypeSearchData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/item/media-type/search', - query: { - query: data.query, - skip: data.skip, - take: data.take - }, - errors: { - 401: 'The resource is protected and requires an authentication token' - } - }); - } - - /** - * @param data The data for the request. - * @param data.requestBody - * @returns string Created - * @throws ApiError - */ - public static postMediaType(data: PostMediaTypeData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/umbraco/management/api/v1/media-type', - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Generated-Resource', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @returns unknown OK - * @throws ApiError - */ - public static getMediaTypeById(data: GetMediaTypeByIdData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/media-type/{id}', - path: { - id: data.id - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @returns string OK - * @throws ApiError - */ - public static deleteMediaTypeById(data: DeleteMediaTypeByIdData): CancelablePromise { - return __request(OpenAPI, { - method: 'DELETE', - url: '/umbraco/management/api/v1/media-type/{id}', - path: { - id: data.id - }, - responseHeader: 'Umb-Notifications', - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @param data.requestBody - * @returns string OK - * @throws ApiError - */ - public static putMediaTypeById(data: PutMediaTypeByIdData): CancelablePromise { - return __request(OpenAPI, { - method: 'PUT', - url: '/umbraco/management/api/v1/media-type/{id}', - path: { - id: data.id - }, - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Notifications', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @param data.parentContentKey - * @param data.skip - * @param data.take - * @returns unknown OK - * @throws ApiError - */ - public static getMediaTypeByIdAllowedChildren(data: GetMediaTypeByIdAllowedChildrenData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/media-type/{id}/allowed-children', - path: { - id: data.id - }, - query: { - parentContentKey: data.parentContentKey, - skip: data.skip, - take: data.take - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @returns unknown OK - * @throws ApiError - */ - public static getMediaTypeByIdCompositionReferences(data: GetMediaTypeByIdCompositionReferencesData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/media-type/{id}/composition-references', - path: { - id: data.id - }, - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @param data.requestBody - * @returns string Created - * @throws ApiError - */ - public static postMediaTypeByIdCopy(data: PostMediaTypeByIdCopyData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/umbraco/management/api/v1/media-type/{id}/copy', - path: { - id: data.id - }, - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Generated-Resource', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @returns unknown OK - * @throws ApiError - */ - public static getMediaTypeByIdExport(data: GetMediaTypeByIdExportData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/media-type/{id}/export', - path: { - id: data.id - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @param data.requestBody - * @returns string OK - * @throws ApiError - */ - public static putMediaTypeByIdImport(data: PutMediaTypeByIdImportData): CancelablePromise { - return __request(OpenAPI, { - method: 'PUT', - url: '/umbraco/management/api/v1/media-type/{id}/import', - path: { - id: data.id - }, - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Notifications', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @param data.requestBody - * @returns string OK - * @throws ApiError - */ - public static putMediaTypeByIdMove(data: PutMediaTypeByIdMoveData): CancelablePromise { - return __request(OpenAPI, { - method: 'PUT', - url: '/umbraco/management/api/v1/media-type/{id}/move', - path: { - id: data.id - }, - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Notifications', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.skip - * @param data.take - * @returns unknown OK - * @throws ApiError - */ - public static getMediaTypeAllowedAtRoot(data: GetMediaTypeAllowedAtRootData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/media-type/allowed-at-root', - query: { - skip: data.skip, - take: data.take - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - - /** - * @param data The data for the request. - * @param data.requestBody - * @returns unknown OK - * @throws ApiError - */ - public static postMediaTypeAvailableCompositions(data: PostMediaTypeAvailableCompositionsData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/umbraco/management/api/v1/media-type/available-compositions', - body: data.requestBody, - mediaType: 'application/json', - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - - /** - * @returns unknown OK - * @throws ApiError - */ - public static getMediaTypeConfiguration(): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/media-type/configuration', - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - - /** - * @param data The data for the request. - * @param data.requestBody - * @returns string Created - * @throws ApiError - */ - public static postMediaTypeFolder(data: PostMediaTypeFolderData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/umbraco/management/api/v1/media-type/folder', - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Generated-Resource', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @returns unknown OK - * @throws ApiError - */ - public static getMediaTypeFolderById(data: GetMediaTypeFolderByIdData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/media-type/folder/{id}', - path: { - id: data.id - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @returns string OK - * @throws ApiError - */ - public static deleteMediaTypeFolderById(data: DeleteMediaTypeFolderByIdData): CancelablePromise { - return __request(OpenAPI, { - method: 'DELETE', - url: '/umbraco/management/api/v1/media-type/folder/{id}', - path: { - id: data.id - }, - responseHeader: 'Umb-Notifications', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @param data.requestBody - * @returns string OK - * @throws ApiError - */ - public static putMediaTypeFolderById(data: PutMediaTypeFolderByIdData): CancelablePromise { - return __request(OpenAPI, { - method: 'PUT', - url: '/umbraco/management/api/v1/media-type/folder/{id}', - path: { - id: data.id - }, - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Notifications', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.requestBody - * @returns string Created - * @throws ApiError - */ - public static postMediaTypeImport(data: PostMediaTypeImportData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/umbraco/management/api/v1/media-type/import', - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Generated-Resource', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.descendantId - * @returns unknown OK - * @throws ApiError - */ - public static getTreeMediaTypeAncestors(data: GetTreeMediaTypeAncestorsData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/tree/media-type/ancestors', - query: { - descendantId: data.descendantId - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - - /** - * @param data The data for the request. - * @param data.parentId - * @param data.skip - * @param data.take - * @param data.foldersOnly - * @returns unknown OK - * @throws ApiError - */ - public static getTreeMediaTypeChildren(data: GetTreeMediaTypeChildrenData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/tree/media-type/children', - query: { - parentId: data.parentId, - skip: data.skip, - take: data.take, - foldersOnly: data.foldersOnly - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - - /** - * @param data The data for the request. - * @param data.skip - * @param data.take - * @param data.foldersOnly - * @returns unknown OK - * @throws ApiError - */ - public static getTreeMediaTypeRoot(data: GetTreeMediaTypeRootData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/tree/media-type/root', - query: { - skip: data.skip, - take: data.take, - foldersOnly: data.foldersOnly - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - -} - -export class MemberService { - /** - * @param data The data for the request. - * @param data.memberTypeId - * @param data.memberGroupName - * @param data.isApproved - * @param data.isLockedOut - * @param data.orderBy - * @param data.orderDirection - * @param data.filter - * @param data.skip - * @param data.take - * @returns unknown OK - * @throws ApiError - */ - public static getFilterMember(data: GetFilterMemberData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/filter/member', - query: { - memberTypeId: data.memberTypeId, - memberGroupName: data.memberGroupName, - isApproved: data.isApproved, - isLockedOut: data.isLockedOut, - orderBy: data.orderBy, - orderDirection: data.orderDirection, - filter: data.filter, - skip: data.skip, - take: data.take - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @returns unknown OK - * @throws ApiError - */ - public static getItemMember(data: GetItemMemberData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/item/member', - query: { - id: data.id - }, - errors: { - 401: 'The resource is protected and requires an authentication token' - } - }); - } - - /** - * @param data The data for the request. - * @param data.query - * @param data.skip - * @param data.take - * @param data.allowedMemberTypes - * @returns unknown OK - * @throws ApiError - */ - public static getItemMemberSearch(data: GetItemMemberSearchData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/item/member/search', - query: { - query: data.query, - skip: data.skip, - take: data.take, - allowedMemberTypes: data.allowedMemberTypes - }, - errors: { - 401: 'The resource is protected and requires an authentication token' - } - }); - } - - /** - * @param data The data for the request. - * @param data.requestBody - * @returns string Created - * @throws ApiError - */ - public static postMember(data: PostMemberData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/umbraco/management/api/v1/member', - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Generated-Resource', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @returns unknown OK - * @throws ApiError - */ - public static getMemberById(data: GetMemberByIdData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/member/{id}', - path: { - id: data.id - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @returns string OK - * @throws ApiError - */ - public static deleteMemberById(data: DeleteMemberByIdData): CancelablePromise { - return __request(OpenAPI, { - method: 'DELETE', - url: '/umbraco/management/api/v1/member/{id}', - path: { - id: data.id - }, - responseHeader: 'Umb-Notifications', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @param data.requestBody - * @returns string OK - * @throws ApiError - */ - public static putMemberById(data: PutMemberByIdData): CancelablePromise { - return __request(OpenAPI, { - method: 'PUT', - url: '/umbraco/management/api/v1/member/{id}', - path: { - id: data.id - }, - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Notifications', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @param data.skip - * @param data.take - * @returns unknown OK - * @throws ApiError - */ - public static getMemberByIdReferencedBy(data: GetMemberByIdReferencedByData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/member/{id}/referenced-by', - path: { - id: data.id - }, - query: { - skip: data.skip, - take: data.take - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @param data.skip - * @param data.take - * @returns unknown OK - * @throws ApiError - */ - public static getMemberByIdReferencedDescendants(data: GetMemberByIdReferencedDescendantsData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/member/{id}/referenced-descendants', - path: { - id: data.id - }, - query: { - skip: data.skip, - take: data.take - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @param data.requestBody - * @returns string OK - * @throws ApiError - */ - public static putMemberByIdValidate(data: PutMemberByIdValidateData): CancelablePromise { - return __request(OpenAPI, { - method: 'PUT', - url: '/umbraco/management/api/v1/member/{id}/validate', - path: { - id: data.id - }, - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Notifications', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @param data.skip - * @param data.take - * @returns unknown OK - * @throws ApiError - */ - public static getMemberAreReferenced(data: GetMemberAreReferencedData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/member/are-referenced', - query: { - id: data.id, - skip: data.skip, - take: data.take - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - - /** - * @returns unknown OK - * @throws ApiError - */ - public static getMemberConfiguration(): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/member/configuration', - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - - /** - * @param data The data for the request. - * @param data.requestBody - * @returns string OK - * @throws ApiError - */ - public static postMemberValidate(data: PostMemberValidateData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/umbraco/management/api/v1/member/validate', - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Notifications', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - -} - -export class MemberGroupService { - /** - * @param data The data for the request. - * @param data.id - * @returns unknown OK - * @throws ApiError - */ - public static getItemMemberGroup(data: GetItemMemberGroupData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/item/member-group', - query: { - id: data.id - }, - errors: { - 401: 'The resource is protected and requires an authentication token' - } - }); - } - - /** - * @param data The data for the request. - * @param data.skip - * @param data.take - * @returns unknown OK - * @throws ApiError - */ - public static getMemberGroup(data: GetMemberGroupData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/member-group', - query: { - skip: data.skip, - take: data.take - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - - /** - * @param data The data for the request. - * @param data.requestBody - * @returns string Created - * @throws ApiError - */ - public static postMemberGroup(data: PostMemberGroupData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/umbraco/management/api/v1/member-group', - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Generated-Resource', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @returns unknown OK - * @throws ApiError - */ - public static getMemberGroupById(data: GetMemberGroupByIdData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/member-group/{id}', - path: { - id: data.id - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @returns string OK - * @throws ApiError - */ - public static deleteMemberGroupById(data: DeleteMemberGroupByIdData): CancelablePromise { - return __request(OpenAPI, { - method: 'DELETE', - url: '/umbraco/management/api/v1/member-group/{id}', - path: { - id: data.id - }, - responseHeader: 'Umb-Notifications', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @param data.requestBody - * @returns string OK - * @throws ApiError - */ - public static putMemberGroupById(data: PutMemberGroupByIdData): CancelablePromise { - return __request(OpenAPI, { - method: 'PUT', - url: '/umbraco/management/api/v1/member-group/{id}', - path: { - id: data.id - }, - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Notifications', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.skip - * @param data.take - * @returns unknown OK - * @throws ApiError - */ - public static getTreeMemberGroupRoot(data: GetTreeMemberGroupRootData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/tree/member-group/root', - query: { - skip: data.skip, - take: data.take - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - -} - -export class MemberTypeService { - /** - * @param data The data for the request. - * @param data.id - * @returns unknown OK - * @throws ApiError - */ - public static getItemMemberType(data: GetItemMemberTypeData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/item/member-type', - query: { - id: data.id - }, - errors: { - 401: 'The resource is protected and requires an authentication token' - } - }); - } - - /** - * @param data The data for the request. - * @param data.query - * @param data.skip - * @param data.take - * @returns unknown OK - * @throws ApiError - */ - public static getItemMemberTypeSearch(data: GetItemMemberTypeSearchData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/item/member-type/search', - query: { - query: data.query, - skip: data.skip, - take: data.take - }, - errors: { - 401: 'The resource is protected and requires an authentication token' - } - }); - } - - /** - * @param data The data for the request. - * @param data.requestBody - * @returns string Created - * @throws ApiError - */ - public static postMemberType(data: PostMemberTypeData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/umbraco/management/api/v1/member-type', - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Generated-Resource', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @returns unknown OK - * @throws ApiError - */ - public static getMemberTypeById(data: GetMemberTypeByIdData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/member-type/{id}', - path: { - id: data.id - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @returns string OK - * @throws ApiError - */ - public static deleteMemberTypeById(data: DeleteMemberTypeByIdData): CancelablePromise { - return __request(OpenAPI, { - method: 'DELETE', - url: '/umbraco/management/api/v1/member-type/{id}', - path: { - id: data.id - }, - responseHeader: 'Umb-Notifications', - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @param data.requestBody - * @returns string OK - * @throws ApiError - */ - public static putMemberTypeById(data: PutMemberTypeByIdData): CancelablePromise { - return __request(OpenAPI, { - method: 'PUT', - url: '/umbraco/management/api/v1/member-type/{id}', - path: { - id: data.id - }, - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Notifications', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @returns unknown OK - * @throws ApiError - */ - public static getMemberTypeByIdCompositionReferences(data: GetMemberTypeByIdCompositionReferencesData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/member-type/{id}/composition-references', - path: { - id: data.id - }, - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @returns string Created - * @throws ApiError - */ - public static postMemberTypeByIdCopy(data: PostMemberTypeByIdCopyData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/umbraco/management/api/v1/member-type/{id}/copy', - path: { - id: data.id - }, - responseHeader: 'Umb-Generated-Resource', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.requestBody - * @returns unknown OK - * @throws ApiError - */ - public static postMemberTypeAvailableCompositions(data: PostMemberTypeAvailableCompositionsData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/umbraco/management/api/v1/member-type/available-compositions', - body: data.requestBody, - mediaType: 'application/json', - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - - /** - * @returns unknown OK - * @throws ApiError - */ - public static getMemberTypeConfiguration(): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/member-type/configuration', - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - - /** - * @param data The data for the request. - * @param data.skip - * @param data.take - * @returns unknown OK - * @throws ApiError - */ - public static getTreeMemberTypeRoot(data: GetTreeMemberTypeRootData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/tree/member-type/root', - query: { - skip: data.skip, - take: data.take - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - -} - -export class ModelsBuilderService { - /** - * @returns string OK - * @throws ApiError - */ - public static postModelsBuilderBuild(): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/umbraco/management/api/v1/models-builder/build', - responseHeader: 'Umb-Notifications', - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 428: 'Precondition Required' - } - }); - } - - /** - * @returns unknown OK - * @throws ApiError - */ - public static getModelsBuilderDashboard(): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/models-builder/dashboard', - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - - /** - * @returns unknown OK - * @throws ApiError - */ - public static getModelsBuilderStatus(): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/models-builder/status', - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - -} - -export class ObjectTypesService { - /** - * @param data The data for the request. - * @param data.skip - * @param data.take - * @returns unknown OK - * @throws ApiError - */ - public static getObjectTypes(data: GetObjectTypesData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/object-types', - query: { - skip: data.skip, - take: data.take - }, - errors: { - 401: 'The resource is protected and requires an authentication token' - } - }); - } - -} - -export class OEmbedService { - /** - * @param data The data for the request. - * @param data.url - * @param data.maxWidth - * @param data.maxHeight - * @returns unknown OK - * @throws ApiError - */ - public static getOembedQuery(data: GetOembedQueryData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/oembed/query', - query: { - url: data.url, - maxWidth: data.maxWidth, - maxHeight: data.maxHeight - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - -} - -export class PackageService { - /** - * @param data The data for the request. - * @param data.name - * @returns string OK - * @throws ApiError - */ - public static postPackageByNameRunMigration(data: PostPackageByNameRunMigrationData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/umbraco/management/api/v1/package/{name}/run-migration', - path: { - name: data.name - }, - responseHeader: 'Umb-Notifications', - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found', - 409: 'Conflict' - } - }); - } - - /** - * @returns unknown OK - * @throws ApiError - */ - public static getPackageConfiguration(): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/package/configuration', - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - - /** - * @param data The data for the request. - * @param data.skip - * @param data.take - * @returns unknown OK - * @throws ApiError - */ - public static getPackageCreated(data: GetPackageCreatedData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/package/created', - query: { - skip: data.skip, - take: data.take - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - - /** - * @param data The data for the request. - * @param data.requestBody - * @returns string Created - * @throws ApiError - */ - public static postPackageCreated(data: PostPackageCreatedData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/umbraco/management/api/v1/package/created', - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Generated-Resource', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @returns unknown OK - * @throws ApiError - */ - public static getPackageCreatedById(data: GetPackageCreatedByIdData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/package/created/{id}', - path: { - id: data.id - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @returns string OK - * @throws ApiError - */ - public static deletePackageCreatedById(data: DeletePackageCreatedByIdData): CancelablePromise { - return __request(OpenAPI, { - method: 'DELETE', - url: '/umbraco/management/api/v1/package/created/{id}', - path: { - id: data.id - }, - responseHeader: 'Umb-Notifications', - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @param data.requestBody - * @returns string OK - * @throws ApiError - */ - public static putPackageCreatedById(data: PutPackageCreatedByIdData): CancelablePromise { - return __request(OpenAPI, { - method: 'PUT', - url: '/umbraco/management/api/v1/package/created/{id}', - path: { - id: data.id - }, - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Notifications', - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @returns unknown OK - * @throws ApiError - */ - public static getPackageCreatedByIdDownload(data: GetPackageCreatedByIdDownloadData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/package/created/{id}/download', - path: { - id: data.id - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.skip - * @param data.take - * @returns unknown OK - * @throws ApiError - */ - public static getPackageMigrationStatus(data: GetPackageMigrationStatusData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/package/migration-status', - query: { - skip: data.skip, - take: data.take - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - -} - -export class PartialViewService { - /** - * @param data The data for the request. - * @param data.path - * @returns unknown OK - * @throws ApiError - */ - public static getItemPartialView(data: GetItemPartialViewData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/item/partial-view', - query: { - path: data.path - }, - errors: { - 401: 'The resource is protected and requires an authentication token' - } - }); - } - - /** - * @param data The data for the request. - * @param data.requestBody - * @returns string Created - * @throws ApiError - */ - public static postPartialView(data: PostPartialViewData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/umbraco/management/api/v1/partial-view', - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Generated-Resource', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.path - * @returns unknown OK - * @throws ApiError - */ - public static getPartialViewByPath(data: GetPartialViewByPathData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/partial-view/{path}', - path: { - path: data.path - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.path - * @returns string OK - * @throws ApiError - */ - public static deletePartialViewByPath(data: DeletePartialViewByPathData): CancelablePromise { - return __request(OpenAPI, { - method: 'DELETE', - url: '/umbraco/management/api/v1/partial-view/{path}', - path: { - path: data.path - }, - responseHeader: 'Umb-Notifications', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.path - * @param data.requestBody - * @returns string OK - * @throws ApiError - */ - public static putPartialViewByPath(data: PutPartialViewByPathData): CancelablePromise { - return __request(OpenAPI, { - method: 'PUT', - url: '/umbraco/management/api/v1/partial-view/{path}', - path: { - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Notifications', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.path - * @param data.requestBody - * @returns string Created - * @throws ApiError - */ - public static putPartialViewByPathRename(data: PutPartialViewByPathRenameData): CancelablePromise { - return __request(OpenAPI, { - method: 'PUT', - url: '/umbraco/management/api/v1/partial-view/{path}/rename', - path: { - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Generated-Resource', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.requestBody - * @returns string Created - * @throws ApiError - */ - public static postPartialViewFolder(data: PostPartialViewFolderData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/umbraco/management/api/v1/partial-view/folder', - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Generated-Resource', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.path - * @returns unknown OK - * @throws ApiError - */ - public static getPartialViewFolderByPath(data: GetPartialViewFolderByPathData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/partial-view/folder/{path}', - path: { - path: data.path - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.path - * @returns string OK - * @throws ApiError - */ - public static deletePartialViewFolderByPath(data: DeletePartialViewFolderByPathData): CancelablePromise { - return __request(OpenAPI, { - method: 'DELETE', - url: '/umbraco/management/api/v1/partial-view/folder/{path}', - path: { - path: data.path - }, - responseHeader: 'Umb-Notifications', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.skip - * @param data.take - * @returns unknown OK - * @throws ApiError - */ - public static getPartialViewSnippet(data: GetPartialViewSnippetData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/partial-view/snippet', - query: { - skip: data.skip, - take: data.take - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @returns unknown OK - * @throws ApiError - */ - public static getPartialViewSnippetById(data: GetPartialViewSnippetByIdData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/partial-view/snippet/{id}', - path: { - id: data.id - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.descendantPath - * @returns unknown OK - * @throws ApiError - */ - public static getTreePartialViewAncestors(data: GetTreePartialViewAncestorsData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/tree/partial-view/ancestors', - query: { - descendantPath: data.descendantPath - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - - /** - * @param data The data for the request. - * @param data.parentPath - * @param data.skip - * @param data.take - * @returns unknown OK - * @throws ApiError - */ - public static getTreePartialViewChildren(data: GetTreePartialViewChildrenData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/tree/partial-view/children', - query: { - parentPath: data.parentPath, - skip: data.skip, - take: data.take - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - - /** - * @param data The data for the request. - * @param data.skip - * @param data.take - * @returns unknown OK - * @throws ApiError - */ - public static getTreePartialViewRoot(data: GetTreePartialViewRootData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/tree/partial-view/root', - query: { - skip: data.skip, - take: data.take - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - -} - -export class PreviewService { - /** - * @returns string OK - * @throws ApiError - */ - public static deletePreview(): CancelablePromise { - return __request(OpenAPI, { - method: 'DELETE', - url: '/umbraco/management/api/v1/preview', - responseHeader: 'Umb-Notifications' - }); - } - - /** - * @returns string OK - * @throws ApiError - */ - public static postPreview(): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/umbraco/management/api/v1/preview', - responseHeader: 'Umb-Notifications', - errors: { - 401: 'The resource is protected and requires an authentication token' - } - }); - } - -} - -export class ProfilingService { - /** - * @returns unknown OK - * @throws ApiError - */ - public static getProfilingStatus(): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/profiling/status', - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - - /** - * @param data The data for the request. - * @param data.requestBody - * @returns string OK - * @throws ApiError - */ - public static putProfilingStatus(data: PutProfilingStatusData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'PUT', - url: '/umbraco/management/api/v1/profiling/status', - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Notifications', - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - -} - -export class PropertyTypeService { - /** - * @param data The data for the request. - * @param data.contentTypeId - * @param data.propertyAlias - * @returns boolean OK - * @throws ApiError - */ - public static getPropertyTypeIsUsed(data: GetPropertyTypeIsUsedData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/property-type/is-used', - query: { - contentTypeId: data.contentTypeId, - propertyAlias: data.propertyAlias - }, - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - -} - -export class PublishedCacheService { - /** - * @returns string OK - * @throws ApiError - */ - public static postPublishedCacheRebuild(): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/umbraco/management/api/v1/published-cache/rebuild', - responseHeader: 'Umb-Notifications', - errors: { - 401: 'The resource is protected and requires an authentication token' - } - }); - } - - /** - * @returns unknown OK - * @throws ApiError - */ - public static getPublishedCacheRebuildStatus(): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/published-cache/rebuild/status', - errors: { - 401: 'The resource is protected and requires an authentication token' - } - }); - } - - /** - * @returns string OK - * @throws ApiError - */ - public static postPublishedCacheReload(): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/umbraco/management/api/v1/published-cache/reload', - responseHeader: 'Umb-Notifications', - errors: { - 401: 'The resource is protected and requires an authentication token' - } - }); - } - -} - -export class RedirectManagementService { - /** - * @param data The data for the request. - * @param data.filter - * @param data.skip - * @param data.take - * @returns unknown OK - * @throws ApiError - */ - public static getRedirectManagement(data: GetRedirectManagementData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/redirect-management', - query: { - filter: data.filter, - skip: data.skip, - take: data.take - }, - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @param data.skip - * @param data.take - * @returns unknown OK - * @throws ApiError - */ - public static getRedirectManagementById(data: GetRedirectManagementByIdData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/redirect-management/{id}', - path: { - id: data.id - }, - query: { - skip: data.skip, - take: data.take - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @returns string OK - * @throws ApiError - */ - public static deleteRedirectManagementById(data: DeleteRedirectManagementByIdData): CancelablePromise { - return __request(OpenAPI, { - method: 'DELETE', - url: '/umbraco/management/api/v1/redirect-management/{id}', - path: { - id: data.id - }, - responseHeader: 'Umb-Notifications', - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - - /** - * @returns unknown OK - * @throws ApiError - */ - public static getRedirectManagementStatus(): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/redirect-management/status', - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - - /** - * @param data The data for the request. - * @param data.status - * @returns string OK - * @throws ApiError - */ - public static postRedirectManagementStatus(data: PostRedirectManagementStatusData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/umbraco/management/api/v1/redirect-management/status', - query: { - status: data.status - }, - responseHeader: 'Umb-Notifications', - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - -} - -export class RelationService { - /** - * @param data The data for the request. - * @param data.id - * @param data.skip - * @param data.take - * @returns unknown OK - * @throws ApiError - */ - public static getRelationByRelationTypeId(data: GetRelationByRelationTypeIdData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/relation/type/{id}', - path: { - id: data.id - }, - query: { - skip: data.skip, - take: data.take - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - -} - -export class RelationTypeService { - /** - * @param data The data for the request. - * @param data.id - * @returns unknown OK - * @throws ApiError - */ - public static getItemRelationType(data: GetItemRelationTypeData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/item/relation-type', - query: { - id: data.id - }, - errors: { - 401: 'The resource is protected and requires an authentication token' - } - }); - } - - /** - * @param data The data for the request. - * @param data.skip - * @param data.take - * @returns unknown OK - * @throws ApiError - */ - public static getRelationType(data: GetRelationTypeData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/relation-type', - query: { - skip: data.skip, - take: data.take - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @returns unknown OK - * @throws ApiError - */ - public static getRelationTypeById(data: GetRelationTypeByIdData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/relation-type/{id}', - path: { - id: data.id - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - -} - -export class ScriptService { - /** - * @param data The data for the request. - * @param data.path - * @returns unknown OK - * @throws ApiError - */ - public static getItemScript(data: GetItemScriptData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/item/script', - query: { - path: data.path - }, - errors: { - 401: 'The resource is protected and requires an authentication token' - } - }); - } - - /** - * @param data The data for the request. - * @param data.requestBody - * @returns string Created - * @throws ApiError - */ - public static postScript(data: PostScriptData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/umbraco/management/api/v1/script', - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Generated-Resource', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.path - * @returns unknown OK - * @throws ApiError - */ - public static getScriptByPath(data: GetScriptByPathData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/script/{path}', - path: { - path: data.path - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.path - * @returns string OK - * @throws ApiError - */ - public static deleteScriptByPath(data: DeleteScriptByPathData): CancelablePromise { - return __request(OpenAPI, { - method: 'DELETE', - url: '/umbraco/management/api/v1/script/{path}', - path: { - path: data.path - }, - responseHeader: 'Umb-Notifications', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.path - * @param data.requestBody - * @returns string OK - * @throws ApiError - */ - public static putScriptByPath(data: PutScriptByPathData): CancelablePromise { - return __request(OpenAPI, { - method: 'PUT', - url: '/umbraco/management/api/v1/script/{path}', - path: { - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Notifications', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.path - * @param data.requestBody - * @returns string Created - * @throws ApiError - */ - public static putScriptByPathRename(data: PutScriptByPathRenameData): CancelablePromise { - return __request(OpenAPI, { - method: 'PUT', - url: '/umbraco/management/api/v1/script/{path}/rename', - path: { - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Generated-Resource', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.requestBody - * @returns string Created - * @throws ApiError - */ - public static postScriptFolder(data: PostScriptFolderData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/umbraco/management/api/v1/script/folder', - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Generated-Resource', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.path - * @returns unknown OK - * @throws ApiError - */ - public static getScriptFolderByPath(data: GetScriptFolderByPathData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/script/folder/{path}', - path: { - path: data.path - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.path - * @returns string OK - * @throws ApiError - */ - public static deleteScriptFolderByPath(data: DeleteScriptFolderByPathData): CancelablePromise { - return __request(OpenAPI, { - method: 'DELETE', - url: '/umbraco/management/api/v1/script/folder/{path}', - path: { - path: data.path - }, - responseHeader: 'Umb-Notifications', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.descendantPath - * @returns unknown OK - * @throws ApiError - */ - public static getTreeScriptAncestors(data: GetTreeScriptAncestorsData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/tree/script/ancestors', - query: { - descendantPath: data.descendantPath - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - - /** - * @param data The data for the request. - * @param data.parentPath - * @param data.skip - * @param data.take - * @returns unknown OK - * @throws ApiError - */ - public static getTreeScriptChildren(data: GetTreeScriptChildrenData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/tree/script/children', - query: { - parentPath: data.parentPath, - skip: data.skip, - take: data.take - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - - /** - * @param data The data for the request. - * @param data.skip - * @param data.take - * @returns unknown OK - * @throws ApiError - */ - public static getTreeScriptRoot(data: GetTreeScriptRootData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/tree/script/root', - query: { - skip: data.skip, - take: data.take - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - -} - -export class SearcherService { - /** - * @param data The data for the request. - * @param data.skip - * @param data.take - * @returns unknown OK - * @throws ApiError - */ - public static getSearcher(data: GetSearcherData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/searcher', - query: { - skip: data.skip, - take: data.take - }, - errors: { - 401: 'The resource is protected and requires an authentication token' - } - }); - } - - /** - * @param data The data for the request. - * @param data.searcherName - * @param data.term - * @param data.skip - * @param data.take - * @returns unknown OK - * @throws ApiError - */ - public static getSearcherBySearcherNameQuery(data: GetSearcherBySearcherNameQueryData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/searcher/{searcherName}/query', - path: { - searcherName: data.searcherName - }, - query: { - term: data.term, - skip: data.skip, - take: data.take - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 404: 'Not Found' - } - }); - } - -} - -export class SecurityService { - /** - * @returns unknown OK - * @throws ApiError - */ - public static getSecurityConfiguration(): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/security/configuration', - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - - /** - * @param data The data for the request. - * @param data.requestBody - * @returns string OK - * @throws ApiError - */ - public static postSecurityForgotPassword(data: PostSecurityForgotPasswordData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/umbraco/management/api/v1/security/forgot-password', - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Notifications', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - - /** - * @param data The data for the request. - * @param data.requestBody - * @returns string No Content - * @throws ApiError - */ - public static postSecurityForgotPasswordReset(data: PostSecurityForgotPasswordResetData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/umbraco/management/api/v1/security/forgot-password/reset', - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Notifications', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.requestBody - * @returns unknown OK - * @throws ApiError - */ - public static postSecurityForgotPasswordVerify(data: PostSecurityForgotPasswordVerifyData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/umbraco/management/api/v1/security/forgot-password/verify', - body: data.requestBody, - mediaType: 'application/json', - errors: { - 400: 'Bad Request', - 404: 'Not Found' - } - }); - } - -} - -export class SegmentService { - /** - * @param data The data for the request. - * @param data.skip - * @param data.take - * @returns unknown OK - * @throws ApiError - */ - public static getSegment(data: GetSegmentData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/segment', - query: { - skip: data.skip, - take: data.take - }, - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - -} - -export class ServerService { - /** - * @returns unknown OK - * @throws ApiError - */ - public static getServerConfiguration(): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/server/configuration' - }); - } - - /** - * @returns unknown OK - * @throws ApiError - */ - public static getServerInformation(): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/server/information', - errors: { - 401: 'The resource is protected and requires an authentication token' - } - }); - } - - /** - * @returns unknown OK - * @throws ApiError - */ - public static getServerStatus(): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/server/status', - errors: { - 400: 'Bad Request' - } - }); - } - - /** - * @returns unknown OK - * @throws ApiError - */ - public static getServerTroubleshooting(): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/server/troubleshooting', - errors: { - 401: 'The resource is protected and requires an authentication token' - } - }); - } - - /** - * @returns unknown OK - * @throws ApiError - */ - public static getServerUpgradeCheck(): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/server/upgrade-check', - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - -} - -export class StaticFileService { - /** - * @param data The data for the request. - * @param data.path - * @returns unknown OK - * @throws ApiError - */ - public static getItemStaticFile(data: GetItemStaticFileData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/item/static-file', - query: { - path: data.path - }, - errors: { - 401: 'The resource is protected and requires an authentication token' - } - }); - } - - /** - * @param data The data for the request. - * @param data.descendantPath - * @returns unknown OK - * @throws ApiError - */ - public static getTreeStaticFileAncestors(data: GetTreeStaticFileAncestorsData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/tree/static-file/ancestors', - query: { - descendantPath: data.descendantPath - }, - errors: { - 401: 'The resource is protected and requires an authentication token' - } - }); - } - - /** - * @param data The data for the request. - * @param data.parentPath - * @param data.skip - * @param data.take - * @returns unknown OK - * @throws ApiError - */ - public static getTreeStaticFileChildren(data: GetTreeStaticFileChildrenData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/tree/static-file/children', - query: { - parentPath: data.parentPath, - skip: data.skip, - take: data.take - }, - errors: { - 401: 'The resource is protected and requires an authentication token' - } - }); - } - - /** - * @param data The data for the request. - * @param data.skip - * @param data.take - * @returns unknown OK - * @throws ApiError - */ - public static getTreeStaticFileRoot(data: GetTreeStaticFileRootData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/tree/static-file/root', - query: { - skip: data.skip, - take: data.take - }, - errors: { - 401: 'The resource is protected and requires an authentication token' - } - }); - } - -} - -export class StylesheetService { - /** - * @param data The data for the request. - * @param data.path - * @returns unknown OK - * @throws ApiError - */ - public static getItemStylesheet(data: GetItemStylesheetData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/item/stylesheet', - query: { - path: data.path - }, - errors: { - 401: 'The resource is protected and requires an authentication token' - } - }); - } - - /** - * @param data The data for the request. - * @param data.requestBody - * @returns string Created - * @throws ApiError - */ - public static postStylesheet(data: PostStylesheetData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/umbraco/management/api/v1/stylesheet', - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Generated-Resource', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.path - * @returns unknown OK - * @throws ApiError - */ - public static getStylesheetByPath(data: GetStylesheetByPathData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/stylesheet/{path}', - path: { - path: data.path - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.path - * @returns string OK - * @throws ApiError - */ - public static deleteStylesheetByPath(data: DeleteStylesheetByPathData): CancelablePromise { - return __request(OpenAPI, { - method: 'DELETE', - url: '/umbraco/management/api/v1/stylesheet/{path}', - path: { - path: data.path - }, - responseHeader: 'Umb-Notifications', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.path - * @param data.requestBody - * @returns string OK - * @throws ApiError - */ - public static putStylesheetByPath(data: PutStylesheetByPathData): CancelablePromise { - return __request(OpenAPI, { - method: 'PUT', - url: '/umbraco/management/api/v1/stylesheet/{path}', - path: { - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Notifications', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.path - * @param data.requestBody - * @returns string Created - * @throws ApiError - */ - public static putStylesheetByPathRename(data: PutStylesheetByPathRenameData): CancelablePromise { - return __request(OpenAPI, { - method: 'PUT', - url: '/umbraco/management/api/v1/stylesheet/{path}/rename', - path: { - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Generated-Resource', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.requestBody - * @returns string Created - * @throws ApiError - */ - public static postStylesheetFolder(data: PostStylesheetFolderData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/umbraco/management/api/v1/stylesheet/folder', - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Generated-Resource', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.path - * @returns unknown OK - * @throws ApiError - */ - public static getStylesheetFolderByPath(data: GetStylesheetFolderByPathData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/stylesheet/folder/{path}', - path: { - path: data.path - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.path - * @returns string OK - * @throws ApiError - */ - public static deleteStylesheetFolderByPath(data: DeleteStylesheetFolderByPathData): CancelablePromise { - return __request(OpenAPI, { - method: 'DELETE', - url: '/umbraco/management/api/v1/stylesheet/folder/{path}', - path: { - path: data.path - }, - responseHeader: 'Umb-Notifications', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.descendantPath - * @returns unknown OK - * @throws ApiError - */ - public static getTreeStylesheetAncestors(data: GetTreeStylesheetAncestorsData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/tree/stylesheet/ancestors', - query: { - descendantPath: data.descendantPath - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - - /** - * @param data The data for the request. - * @param data.parentPath - * @param data.skip - * @param data.take - * @returns unknown OK - * @throws ApiError - */ - public static getTreeStylesheetChildren(data: GetTreeStylesheetChildrenData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/tree/stylesheet/children', - query: { - parentPath: data.parentPath, - skip: data.skip, - take: data.take - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - - /** - * @param data The data for the request. - * @param data.skip - * @param data.take - * @returns unknown OK - * @throws ApiError - */ - public static getTreeStylesheetRoot(data: GetTreeStylesheetRootData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/tree/stylesheet/root', - query: { - skip: data.skip, - take: data.take - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - -} - -export class TagService { - /** - * @param data The data for the request. - * @param data.query - * @param data.tagGroup - * @param data.culture - * @param data.skip - * @param data.take - * @returns unknown OK - * @throws ApiError - */ - public static getTag(data: GetTagData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/tag', - query: { - query: data.query, - tagGroup: data.tagGroup, - culture: data.culture, - skip: data.skip, - take: data.take - }, - errors: { - 401: 'The resource is protected and requires an authentication token' - } - }); - } - -} - -export class TelemetryService { - /** - * @param data The data for the request. - * @param data.skip - * @param data.take - * @returns unknown OK - * @throws ApiError - */ - public static getTelemetry(data: GetTelemetryData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/telemetry', - query: { - skip: data.skip, - take: data.take - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - - /** - * @returns unknown OK - * @throws ApiError - */ - public static getTelemetryLevel(): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/telemetry/level', - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - - /** - * @param data The data for the request. - * @param data.requestBody - * @returns string OK - * @throws ApiError - */ - public static postTelemetryLevel(data: PostTelemetryLevelData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/umbraco/management/api/v1/telemetry/level', - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Notifications', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - -} - -export class TemplateService { - /** - * @param data The data for the request. - * @param data.id - * @returns unknown OK - * @throws ApiError - */ - public static getItemTemplate(data: GetItemTemplateData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/item/template', - query: { - id: data.id - }, - errors: { - 401: 'The resource is protected and requires an authentication token' - } - }); - } - - /** - * @param data The data for the request. - * @param data.query - * @param data.skip - * @param data.take - * @returns unknown OK - * @throws ApiError - */ - public static getItemTemplateSearch(data: GetItemTemplateSearchData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/item/template/search', - query: { - query: data.query, - skip: data.skip, - take: data.take - }, - errors: { - 401: 'The resource is protected and requires an authentication token' - } - }); - } - - /** - * @param data The data for the request. - * @param data.requestBody - * @returns string Created - * @throws ApiError - */ - public static postTemplate(data: PostTemplateData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/umbraco/management/api/v1/template', - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Generated-Resource', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @returns unknown OK - * @throws ApiError - */ - public static getTemplateById(data: GetTemplateByIdData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/template/{id}', - path: { - id: data.id - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @returns string OK - * @throws ApiError - */ - public static deleteTemplateById(data: DeleteTemplateByIdData): CancelablePromise { - return __request(OpenAPI, { - method: 'DELETE', - url: '/umbraco/management/api/v1/template/{id}', - path: { - id: data.id - }, - responseHeader: 'Umb-Notifications', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @param data.requestBody - * @returns string OK - * @throws ApiError - */ - public static putTemplateById(data: PutTemplateByIdData): CancelablePromise { - return __request(OpenAPI, { - method: 'PUT', - url: '/umbraco/management/api/v1/template/{id}', - path: { - id: data.id - }, - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Notifications', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @returns unknown OK - * @throws ApiError - */ - public static getTemplateConfiguration(): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/template/configuration', - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - - /** - * @param data The data for the request. - * @param data.requestBody - * @returns unknown OK - * @throws ApiError - */ - public static postTemplateQueryExecute(data: PostTemplateQueryExecuteData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/umbraco/management/api/v1/template/query/execute', - body: data.requestBody, - mediaType: 'application/json', - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - - /** - * @returns unknown OK - * @throws ApiError - */ - public static getTemplateQuerySettings(): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/template/query/settings', - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - - /** - * @param data The data for the request. - * @param data.descendantId - * @returns unknown OK - * @throws ApiError - */ - public static getTreeTemplateAncestors(data: GetTreeTemplateAncestorsData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/tree/template/ancestors', - query: { - descendantId: data.descendantId - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - - /** - * @param data The data for the request. - * @param data.parentId - * @param data.skip - * @param data.take - * @returns unknown OK - * @throws ApiError - */ - public static getTreeTemplateChildren(data: GetTreeTemplateChildrenData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/tree/template/children', - query: { - parentId: data.parentId, - skip: data.skip, - take: data.take - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - - /** - * @param data The data for the request. - * @param data.skip - * @param data.take - * @returns unknown OK - * @throws ApiError - */ - public static getTreeTemplateRoot(data: GetTreeTemplateRootData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/tree/template/root', - query: { - skip: data.skip, - take: data.take - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - -} - -export class TemporaryFileService { - /** - * @param data The data for the request. - * @param data.formData - * @returns string Created - * @throws ApiError - */ - public static postTemporaryFile(data: PostTemporaryFileData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/umbraco/management/api/v1/temporary-file', - formData: data.formData, - mediaType: 'multipart/form-data', - responseHeader: 'Umb-Generated-Resource', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @returns unknown OK - * @throws ApiError - */ - public static getTemporaryFileById(data: GetTemporaryFileByIdData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/temporary-file/{id}', - path: { - id: data.id - }, - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @returns string OK - * @throws ApiError - */ - public static deleteTemporaryFileById(data: DeleteTemporaryFileByIdData): CancelablePromise { - return __request(OpenAPI, { - method: 'DELETE', - url: '/umbraco/management/api/v1/temporary-file/{id}', - path: { - id: data.id - }, - responseHeader: 'Umb-Notifications', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 404: 'Not Found' - } - }); - } - - /** - * @returns unknown OK - * @throws ApiError - */ - public static getTemporaryFileConfiguration(): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/temporary-file/configuration', - errors: { - 401: 'The resource is protected and requires an authentication token' - } - }); - } - -} - -export class UpgradeService { - /** - * @returns string OK - * @throws ApiError - */ - public static postUpgradeAuthorize(): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/umbraco/management/api/v1/upgrade/authorize', - responseHeader: 'Umb-Notifications', - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 428: 'Precondition Required', - 500: 'Internal Server Error' - } - }); - } - - /** - * @returns unknown OK - * @throws ApiError - */ - public static getUpgradeSettings(): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/upgrade/settings', - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 428: 'Precondition Required' - } - }); - } - -} - -export class UserService { - /** - * @param data The data for the request. - * @param data.skip - * @param data.take - * @param data.orderBy - * @param data.orderDirection - * @param data.userGroupIds - * @param data.userStates - * @param data.filter - * @returns unknown OK - * @throws ApiError - */ - public static getFilterUser(data: GetFilterUserData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/filter/user', - query: { - skip: data.skip, - take: data.take, - orderBy: data.orderBy, - orderDirection: data.orderDirection, - userGroupIds: data.userGroupIds, - userStates: data.userStates, - filter: data.filter - }, - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @returns unknown OK - * @throws ApiError - */ - public static getItemUser(data: GetItemUserData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/item/user', - query: { - id: data.id - }, - errors: { - 401: 'The resource is protected and requires an authentication token' - } - }); - } - - /** - * @param data The data for the request. - * @param data.requestBody - * @returns string Created - * @throws ApiError - */ - public static postUser(data: PostUserData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/umbraco/management/api/v1/user', - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Generated-Resource', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.requestBody - * @returns string OK - * @throws ApiError - */ - public static deleteUser(data: DeleteUserData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'DELETE', - url: '/umbraco/management/api/v1/user', - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Notifications', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - - /** - * @param data The data for the request. - * @param data.skip - * @param data.take - * @returns unknown OK - * @throws ApiError - */ - public static getUser(data: GetUserData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/user', - query: { - skip: data.skip, - take: data.take - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @returns unknown OK - * @throws ApiError - */ - public static getUserById(data: GetUserByIdData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/user/{id}', - path: { - id: data.id - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @returns string OK - * @throws ApiError - */ - public static deleteUserById(data: DeleteUserByIdData): CancelablePromise { - return __request(OpenAPI, { - method: 'DELETE', - url: '/umbraco/management/api/v1/user/{id}', - path: { - id: data.id - }, - responseHeader: 'Umb-Notifications', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @param data.requestBody - * @returns string OK - * @throws ApiError - */ - public static putUserById(data: PutUserByIdData): CancelablePromise { - return __request(OpenAPI, { - method: 'PUT', - url: '/umbraco/management/api/v1/user/{id}', - path: { - id: data.id - }, - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Notifications', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @returns unknown OK - * @throws ApiError - */ - public static getUserById2Fa(data: GetUserById2FaData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/user/{id}/2fa', - path: { - id: data.id - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @param data.providerName - * @returns string OK - * @throws ApiError - */ - public static deleteUserById2FaByProviderName(data: DeleteUserById2FaByProviderNameData): CancelablePromise { - return __request(OpenAPI, { - method: 'DELETE', - url: '/umbraco/management/api/v1/user/{id}/2fa/{providerName}', - path: { - id: data.id, - providerName: data.providerName - }, - responseHeader: 'Umb-Notifications', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @returns unknown OK - * @throws ApiError - */ - public static getUserByIdCalculateStartNodes(data: GetUserByIdCalculateStartNodesData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/user/{id}/calculate-start-nodes', - path: { - id: data.id - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @param data.requestBody - * @returns string OK - * @throws ApiError - */ - public static postUserByIdChangePassword(data: PostUserByIdChangePasswordData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/umbraco/management/api/v1/user/{id}/change-password', - path: { - id: data.id - }, - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Notifications', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @param data.requestBody - * @returns string OK - * @throws ApiError - */ - public static postUserByIdClientCredentials(data: PostUserByIdClientCredentialsData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/umbraco/management/api/v1/user/{id}/client-credentials', - path: { - id: data.id - }, - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Notifications', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @returns string OK - * @throws ApiError - */ - public static getUserByIdClientCredentials(data: GetUserByIdClientCredentialsData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/user/{id}/client-credentials', - path: { - id: data.id - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @param data.clientId - * @returns string OK - * @throws ApiError - */ - public static deleteUserByIdClientCredentialsByClientId(data: DeleteUserByIdClientCredentialsByClientIdData): CancelablePromise { - return __request(OpenAPI, { - method: 'DELETE', - url: '/umbraco/management/api/v1/user/{id}/client-credentials/{clientId}', - path: { - id: data.id, - clientId: data.clientId - }, - responseHeader: 'Umb-Notifications', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @returns unknown OK - * @throws ApiError - */ - public static postUserByIdResetPassword(data: PostUserByIdResetPasswordData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/umbraco/management/api/v1/user/{id}/reset-password', - path: { - id: data.id - }, - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @returns string OK - * @throws ApiError - */ - public static deleteUserAvatarById(data: DeleteUserAvatarByIdData): CancelablePromise { - return __request(OpenAPI, { - method: 'DELETE', - url: '/umbraco/management/api/v1/user/avatar/{id}', - path: { - id: data.id - }, - responseHeader: 'Umb-Notifications', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @param data.requestBody - * @returns string OK - * @throws ApiError - */ - public static postUserAvatarById(data: PostUserAvatarByIdData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/umbraco/management/api/v1/user/avatar/{id}', - path: { - id: data.id - }, - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Notifications', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @returns unknown OK - * @throws ApiError - */ - public static getUserConfiguration(): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/user/configuration', - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - - /** - * @returns unknown OK - * @throws ApiError - */ - public static getUserCurrent(): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/user/current', - errors: { - 401: 'The resource is protected and requires an authentication token' - } - }); - } - - /** - * @returns unknown OK - * @throws ApiError - */ - public static getUserCurrent2Fa(): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/user/current/2fa', - errors: { - 401: 'The resource is protected and requires an authentication token' - } - }); - } - - /** - * @param data The data for the request. - * @param data.providerName - * @param data.code - * @returns string OK - * @throws ApiError - */ - public static deleteUserCurrent2FaByProviderName(data: DeleteUserCurrent2FaByProviderNameData): CancelablePromise { - return __request(OpenAPI, { - method: 'DELETE', - url: '/umbraco/management/api/v1/user/current/2fa/{providerName}', - path: { - providerName: data.providerName - }, - query: { - code: data.code - }, - responseHeader: 'Umb-Notifications', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.providerName - * @param data.requestBody - * @returns unknown OK - * @throws ApiError - */ - public static postUserCurrent2FaByProviderName(data: PostUserCurrent2FaByProviderNameData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/umbraco/management/api/v1/user/current/2fa/{providerName}', - path: { - providerName: data.providerName - }, - body: data.requestBody, - mediaType: 'application/json', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.providerName - * @returns unknown OK - * @throws ApiError - */ - public static getUserCurrent2FaByProviderName(data: GetUserCurrent2FaByProviderNameData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/user/current/2fa/{providerName}', - path: { - providerName: data.providerName - }, - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.requestBody - * @returns string OK - * @throws ApiError - */ - public static postUserCurrentAvatar(data: PostUserCurrentAvatarData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/umbraco/management/api/v1/user/current/avatar', - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Notifications', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token' - } - }); - } - - /** - * @param data The data for the request. - * @param data.requestBody - * @returns string OK - * @throws ApiError - */ - public static postUserCurrentChangePassword(data: PostUserCurrentChangePasswordData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/umbraco/management/api/v1/user/current/change-password', - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Notifications', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token' - } - }); - } - - /** - * @returns unknown OK - * @throws ApiError - */ - public static getUserCurrentConfiguration(): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/user/current/configuration', - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - - /** - * @returns unknown OK - * @throws ApiError - */ - public static getUserCurrentLoginProviders(): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/user/current/login-providers', - errors: { - 401: 'The resource is protected and requires an authentication token' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @returns unknown OK - * @throws ApiError - */ - public static getUserCurrentPermissions(data: GetUserCurrentPermissionsData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/user/current/permissions', - query: { - id: data.id - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @returns unknown OK - * @throws ApiError - */ - public static getUserCurrentPermissionsDocument(data: GetUserCurrentPermissionsDocumentData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/user/current/permissions/document', - query: { - id: data.id - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @returns unknown OK - * @throws ApiError - */ - public static getUserCurrentPermissionsMedia(data: GetUserCurrentPermissionsMediaData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/user/current/permissions/media', - query: { - id: data.id - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.requestBody - * @returns string OK - * @throws ApiError - */ - public static postUserDisable(data: PostUserDisableData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/umbraco/management/api/v1/user/disable', - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Notifications', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.requestBody - * @returns string OK - * @throws ApiError - */ - public static postUserEnable(data: PostUserEnableData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/umbraco/management/api/v1/user/enable', - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Notifications', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.requestBody - * @returns string Created - * @throws ApiError - */ - public static postUserInvite(data: PostUserInviteData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/umbraco/management/api/v1/user/invite', - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Generated-Resource', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.requestBody - * @returns string OK - * @throws ApiError - */ - public static postUserInviteCreatePassword(data: PostUserInviteCreatePasswordData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/umbraco/management/api/v1/user/invite/create-password', - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Notifications', - errors: { - 400: 'Bad Request', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.requestBody - * @returns string OK - * @throws ApiError - */ - public static postUserInviteResend(data: PostUserInviteResendData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/umbraco/management/api/v1/user/invite/resend', - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Notifications', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.requestBody - * @returns unknown OK - * @throws ApiError - */ - public static postUserInviteVerify(data: PostUserInviteVerifyData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/umbraco/management/api/v1/user/invite/verify', - body: data.requestBody, - mediaType: 'application/json', - errors: { - 400: 'Bad Request', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.requestBody - * @returns string OK - * @throws ApiError - */ - public static postUserSetUserGroups(data: PostUserSetUserGroupsData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/umbraco/management/api/v1/user/set-user-groups', - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Notifications', - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - - /** - * @param data The data for the request. - * @param data.requestBody - * @returns string OK - * @throws ApiError - */ - public static postUserUnlock(data: PostUserUnlockData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/umbraco/management/api/v1/user/unlock', - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Notifications', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - -} - -export class UserDataService { - /** - * @param data The data for the request. - * @param data.requestBody - * @returns string Created - * @throws ApiError - */ - public static postUserData(data: PostUserDataData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/umbraco/management/api/v1/user-data', - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Generated-Resource', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.groups - * @param data.identifiers - * @param data.skip - * @param data.take - * @returns unknown OK - * @throws ApiError - */ - public static getUserData(data: GetUserDataData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/user-data', - query: { - groups: data.groups, - identifiers: data.identifiers, - skip: data.skip, - take: data.take - }, - errors: { - 401: 'The resource is protected and requires an authentication token' - } - }); - } - - /** - * @param data The data for the request. - * @param data.requestBody - * @returns string OK - * @throws ApiError - */ - public static putUserData(data: PutUserDataData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'PUT', - url: '/umbraco/management/api/v1/user-data', - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Notifications', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @returns unknown OK - * @throws ApiError - */ - public static getUserDataById(data: GetUserDataByIdData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/user-data/{id}', - path: { - id: data.id - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 404: 'Not Found' - } - }); - } - -} - -export class UserGroupService { - /** - * @param data The data for the request. - * @param data.skip - * @param data.take - * @param data.filter - * @returns unknown OK - * @throws ApiError - */ - public static getFilterUserGroup(data: GetFilterUserGroupData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/filter/user-group', - query: { - skip: data.skip, - take: data.take, - filter: data.filter - }, - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @returns unknown OK - * @throws ApiError - */ - public static getItemUserGroup(data: GetItemUserGroupData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/item/user-group', - query: { - id: data.id - }, - errors: { - 401: 'The resource is protected and requires an authentication token' - } - }); - } - - /** - * @param data The data for the request. - * @param data.requestBody - * @returns string OK - * @throws ApiError - */ - public static deleteUserGroup(data: DeleteUserGroupData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'DELETE', - url: '/umbraco/management/api/v1/user-group', - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Notifications', - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.requestBody - * @returns string Created - * @throws ApiError - */ - public static postUserGroup(data: PostUserGroupData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/umbraco/management/api/v1/user-group', - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Generated-Resource', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - - /** - * @param data The data for the request. - * @param data.skip - * @param data.take - * @returns unknown OK - * @throws ApiError - */ - public static getUserGroup(data: GetUserGroupData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/user-group', - query: { - skip: data.skip, - take: data.take - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @returns unknown OK - * @throws ApiError - */ - public static getUserGroupById(data: GetUserGroupByIdData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/user-group/{id}', - path: { - id: data.id - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @returns string OK - * @throws ApiError - */ - public static deleteUserGroupById(data: DeleteUserGroupByIdData): CancelablePromise { - return __request(OpenAPI, { - method: 'DELETE', - url: '/umbraco/management/api/v1/user-group/{id}', - path: { - id: data.id - }, - responseHeader: 'Umb-Notifications', - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @param data.requestBody - * @returns string OK - * @throws ApiError - */ - public static putUserGroupById(data: PutUserGroupByIdData): CancelablePromise { - return __request(OpenAPI, { - method: 'PUT', - url: '/umbraco/management/api/v1/user-group/{id}', - path: { - id: data.id - }, - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Notifications', - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @param data.requestBody - * @returns string OK - * @throws ApiError - */ - public static deleteUserGroupByIdUsers(data: DeleteUserGroupByIdUsersData): CancelablePromise { - return __request(OpenAPI, { - method: 'DELETE', - url: '/umbraco/management/api/v1/user-group/{id}/users', - path: { - id: data.id - }, - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Notifications', - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @param data.requestBody - * @returns string OK - * @throws ApiError - */ - public static postUserGroupByIdUsers(data: PostUserGroupByIdUsersData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/umbraco/management/api/v1/user-group/{id}/users', - path: { - id: data.id - }, - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Notifications', - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - -} - -export class WebhookService { - /** - * @param data The data for the request. - * @param data.id - * @returns unknown OK - * @throws ApiError - */ - public static getItemWebhook(data: GetItemWebhookData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/item/webhook', - query: { - id: data.id - }, - errors: { - 401: 'The resource is protected and requires an authentication token' - } - }); - } - - /** - * @param data The data for the request. - * @param data.skip - * @param data.take - * @returns unknown OK - * @throws ApiError - */ - public static getWebhook(data: GetWebhookData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/webhook', - query: { - skip: data.skip, - take: data.take - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - - /** - * @param data The data for the request. - * @param data.requestBody - * @returns string Created - * @throws ApiError - */ - public static postWebhook(data: PostWebhookData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/umbraco/management/api/v1/webhook', - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Generated-Resource', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @returns unknown OK - * @throws ApiError - */ - public static getWebhookById(data: GetWebhookByIdData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/webhook/{id}', - path: { - id: data.id - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @returns string OK - * @throws ApiError - */ - public static deleteWebhookById(data: DeleteWebhookByIdData): CancelablePromise { - return __request(OpenAPI, { - method: 'DELETE', - url: '/umbraco/management/api/v1/webhook/{id}', - path: { - id: data.id - }, - responseHeader: 'Umb-Notifications', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @param data.requestBody - * @returns string OK - * @throws ApiError - */ - public static putWebhookById(data: PutWebhookByIdData): CancelablePromise { - return __request(OpenAPI, { - method: 'PUT', - url: '/umbraco/management/api/v1/webhook/{id}', - path: { - id: data.id - }, - body: data.requestBody, - mediaType: 'application/json', - responseHeader: 'Umb-Notifications', - errors: { - 400: 'Bad Request', - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource', - 404: 'Not Found' - } - }); - } - - /** - * @param data The data for the request. - * @param data.id - * @param data.skip - * @param data.take - * @returns unknown OK - * @throws ApiError - */ - public static getWebhookByIdLogs(data: GetWebhookByIdLogsData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/webhook/{id}/logs', - path: { - id: data.id - }, - query: { - skip: data.skip, - take: data.take - }, - errors: { - 401: 'The resource is protected and requires an authentication token' - } - }); - } - - /** - * @param data The data for the request. - * @param data.skip - * @param data.take - * @returns unknown OK - * @throws ApiError - */ - public static getWebhookEvents(data: GetWebhookEventsData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/webhook/events', - query: { - skip: data.skip, - take: data.take - }, - errors: { - 401: 'The resource is protected and requires an authentication token', - 403: 'The authenticated user does not have access to this resource' - } - }); - } - - /** - * @param data The data for the request. - * @param data.skip - * @param data.take - * @returns unknown OK - * @throws ApiError - */ - public static getWebhookLogs(data: GetWebhookLogsData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/webhook/logs', - query: { - skip: data.skip, - take: data.take - }, - errors: { - 401: 'The resource is protected and requires an authentication token' - } - }); - } - -} \ No newline at end of file diff --git a/src/Umbraco.Web.UI.Client/src/external/backend-api/src/types.gen.ts b/src/Umbraco.Web.UI.Client/src/external/backend-api/src/types.gen.ts deleted file mode 100644 index 5e0bed5010..0000000000 --- a/src/Umbraco.Web.UI.Client/src/external/backend-api/src/types.gen.ts +++ /dev/null @@ -1,5508 +0,0 @@ -// This file is auto-generated by @hey-api/openapi-ts - -export type AllowedDocumentTypeModel = { - id: string; - name: string; - description?: (string) | null; - icon?: (string) | null; -}; - -export type AllowedMediaTypeModel = { - id: string; - name: string; - description?: (string) | null; - icon?: (string) | null; -}; - -export type AuditLogResponseModel = { - user: (ReferenceByIdModel); - timestamp: string; - logType: AuditTypeModel; - comment?: (string) | null; - parameters?: (string) | null; -}; - -export enum AuditTypeModel { - NEW = 'New', - SAVE = 'Save', - SAVE_VARIANT = 'SaveVariant', - OPEN = 'Open', - DELETE = 'Delete', - PUBLISH = 'Publish', - PUBLISH_VARIANT = 'PublishVariant', - SEND_TO_PUBLISH = 'SendToPublish', - SEND_TO_PUBLISH_VARIANT = 'SendToPublishVariant', - UNPUBLISH = 'Unpublish', - UNPUBLISH_VARIANT = 'UnpublishVariant', - MOVE = 'Move', - COPY = 'Copy', - ASSIGN_DOMAIN = 'AssignDomain', - PUBLIC_ACCESS = 'PublicAccess', - SORT = 'Sort', - NOTIFY = 'Notify', - SYSTEM = 'System', - ROLL_BACK = 'RollBack', - PACKAGER_INSTALL = 'PackagerInstall', - PACKAGER_UNINSTALL = 'PackagerUninstall', - CUSTOM = 'Custom', - CONTENT_VERSION_PREVENT_CLEANUP = 'ContentVersionPreventCleanup', - CONTENT_VERSION_ENABLE_CLEANUP = 'ContentVersionEnableCleanup' -} - -export type AvailableDocumentTypeCompositionResponseModel = { - id: string; - name: string; - icon: string; - folderPath: Array<(string)>; - isCompatible: boolean; -}; - -export type AvailableMediaTypeCompositionResponseModel = { - id: string; - name: string; - icon: string; - folderPath: Array<(string)>; - isCompatible: boolean; -}; - -export type AvailableMemberTypeCompositionResponseModel = { - id: string; - name: string; - icon: string; - folderPath: Array<(string)>; - isCompatible: boolean; -}; - -export type CalculatedUserStartNodesResponseModel = { - id: string; - documentStartNodeIds: Array<(ReferenceByIdModel)>; - hasDocumentRootAccess: boolean; - mediaStartNodeIds: Array<(ReferenceByIdModel)>; - hasMediaRootAccess: boolean; -}; - -export type ChangePasswordCurrentUserRequestModel = { - newPassword: string; - oldPassword?: (string) | null; -}; - -export type ChangePasswordUserRequestModel = { - newPassword: string; -}; - -export enum CompositionTypeModel { - COMPOSITION = 'Composition', - INHERITANCE = 'Inheritance' -} - -export type ConsentLevelPresentationModel = { - level: TelemetryLevelModel; - description: string; -}; - -export type CopyDataTypeRequestModel = { - target?: ((ReferenceByIdModel) | null); -}; - -export type CopyDocumentRequestModel = { - target?: ((ReferenceByIdModel) | null); - relateToOriginal: boolean; - includeDescendants: boolean; -}; - -export type CopyDocumentTypeRequestModel = { - target?: ((ReferenceByIdModel) | null); -}; - -export type CopyMediaTypeRequestModel = { - target?: ((ReferenceByIdModel) | null); -}; - -export type CreateDataTypeRequestModel = { - name: string; - editorAlias: string; - editorUiAlias: string; - values: Array<(DataTypePropertyPresentationModel)>; - id?: (string) | null; - parent?: ((ReferenceByIdModel) | null); -}; - -export type CreateDictionaryItemRequestModel = { - name: string; - translations: Array<(DictionaryItemTranslationModel)>; - id?: (string) | null; - parent?: ((ReferenceByIdModel) | null); -}; - -export type CreateDocumentBlueprintFromDocumentRequestModel = { - document: (ReferenceByIdModel); - id?: (string) | null; - name: string; - parent?: ((ReferenceByIdModel) | null); -}; - -export type CreateDocumentBlueprintRequestModel = { - values: Array<(DocumentValueModel)>; - variants: Array<(DocumentVariantRequestModel)>; - id?: (string) | null; - parent?: ((ReferenceByIdModel) | null); - documentType: (ReferenceByIdModel); -}; - -export type CreateDocumentRequestModel = { - values: Array<(DocumentValueModel)>; - variants: Array<(DocumentVariantRequestModel)>; - id?: (string) | null; - parent?: ((ReferenceByIdModel) | null); - documentType: (ReferenceByIdModel); - template: ((ReferenceByIdModel) | null); -}; - -export type CreateDocumentTypePropertyTypeContainerRequestModel = { - id: string; - parent?: ((ReferenceByIdModel) | null); - name?: (string) | null; - type: string; - sortOrder: number; -}; - -export type CreateDocumentTypePropertyTypeRequestModel = { - id: string; - container?: ((ReferenceByIdModel) | null); - sortOrder: number; - alias: string; - name: string; - description?: (string) | null; - dataType: (ReferenceByIdModel); - variesByCulture: boolean; - variesBySegment: boolean; - validation: (PropertyTypeValidationModel); - appearance: (PropertyTypeAppearanceModel); -}; - -export type CreateDocumentTypeRequestModel = { - alias: string; - name: string; - description?: (string) | null; - icon: string; - allowedAsRoot: boolean; - variesByCulture: boolean; - variesBySegment: boolean; - collection?: ((ReferenceByIdModel) | null); - isElement: boolean; - properties: Array<(CreateDocumentTypePropertyTypeRequestModel)>; - containers: Array<(CreateDocumentTypePropertyTypeContainerRequestModel)>; - id?: (string) | null; - parent?: ((ReferenceByIdModel) | null); - allowedTemplates: Array<(ReferenceByIdModel)>; - defaultTemplate?: ((ReferenceByIdModel) | null); - cleanup: (DocumentTypeCleanupModel); - allowedDocumentTypes: Array<(DocumentTypeSortModel)>; - compositions: Array<(DocumentTypeCompositionModel)>; -}; - -export type CreateFolderRequestModel = { - name: string; - id?: (string) | null; - parent?: ((ReferenceByIdModel) | null); -}; - -export type CreateInitialPasswordUserRequestModel = { - user: (ReferenceByIdModel); - token: string; - password: string; -}; - -export type CreateLanguageRequestModel = { - name: string; - isDefault: boolean; - isMandatory: boolean; - fallbackIsoCode?: (string) | null; - isoCode: string; -}; - -export type CreateMediaRequestModel = { - values: Array<(MediaValueModel)>; - variants: Array<(MediaVariantRequestModel)>; - id?: (string) | null; - parent?: ((ReferenceByIdModel) | null); - mediaType: (ReferenceByIdModel); -}; - -export type CreateMediaTypePropertyTypeContainerRequestModel = { - id: string; - parent?: ((ReferenceByIdModel) | null); - name?: (string) | null; - type: string; - sortOrder: number; -}; - -export type CreateMediaTypePropertyTypeRequestModel = { - id: string; - container?: ((ReferenceByIdModel) | null); - sortOrder: number; - alias: string; - name: string; - description?: (string) | null; - dataType: (ReferenceByIdModel); - variesByCulture: boolean; - variesBySegment: boolean; - validation: (PropertyTypeValidationModel); - appearance: (PropertyTypeAppearanceModel); -}; - -export type CreateMediaTypeRequestModel = { - alias: string; - name: string; - description?: (string) | null; - icon: string; - allowedAsRoot: boolean; - variesByCulture: boolean; - variesBySegment: boolean; - isElement: boolean; - properties: Array<(CreateMediaTypePropertyTypeRequestModel)>; - containers: Array<(CreateMediaTypePropertyTypeContainerRequestModel)>; - id?: (string) | null; - parent?: ((ReferenceByIdModel) | null); - allowedMediaTypes: Array<(MediaTypeSortModel)>; - compositions: Array<(MediaTypeCompositionModel)>; - collection?: ((ReferenceByIdModel) | null); -}; - -export type CreateMemberGroupRequestModel = { - name: string; - id?: (string) | null; -}; - -export type CreateMemberRequestModel = { - values: Array<(MemberValueModel)>; - variants: Array<(MemberVariantRequestModel)>; - id?: (string) | null; - email: string; - username: string; - password: string; - memberType: (ReferenceByIdModel); - groups?: Array<(string)> | null; - isApproved: boolean; -}; - -export type CreateMemberTypePropertyTypeContainerRequestModel = { - id: string; - parent?: ((ReferenceByIdModel) | null); - name?: (string) | null; - type: string; - sortOrder: number; -}; - -export type CreateMemberTypePropertyTypeRequestModel = { - id: string; - container?: ((ReferenceByIdModel) | null); - sortOrder: number; - alias: string; - name: string; - description?: (string) | null; - dataType: (ReferenceByIdModel); - variesByCulture: boolean; - variesBySegment: boolean; - validation: (PropertyTypeValidationModel); - appearance: (PropertyTypeAppearanceModel); - isSensitive: boolean; - visibility: (MemberTypePropertyTypeVisibilityModel); -}; - -export type CreateMemberTypeRequestModel = { - alias: string; - name: string; - description?: (string) | null; - icon: string; - allowedAsRoot: boolean; - variesByCulture: boolean; - variesBySegment: boolean; - collection?: ((ReferenceByIdModel) | null); - isElement: boolean; - properties: Array<(CreateMemberTypePropertyTypeRequestModel)>; - containers: Array<(CreateMemberTypePropertyTypeContainerRequestModel)>; - id?: (string) | null; - compositions: Array<(MemberTypeCompositionModel)>; -}; - -export type CreatePackageRequestModel = { - name: string; - contentNodeId?: (string) | null; - contentLoadChildNodes: boolean; - mediaIds: Array<(string)>; - mediaLoadChildNodes: boolean; - documentTypes: Array<(string)>; - mediaTypes: Array<(string)>; - dataTypes: Array<(string)>; - templates: Array<(string)>; - partialViews: Array<(string)>; - stylesheets: Array<(string)>; - scripts: Array<(string)>; - languages: Array<(string)>; - dictionaryItems: Array<(string)>; - id?: (string) | null; -}; - -export type CreatePartialViewFolderRequestModel = { - name: string; - parent?: ((FileSystemFolderModel) | null); -}; - -export type CreatePartialViewRequestModel = { - name: string; - parent?: ((FileSystemFolderModel) | null); - content: string; -}; - -export type CreateScriptFolderRequestModel = { - name: string; - parent?: ((FileSystemFolderModel) | null); -}; - -export type CreateScriptRequestModel = { - name: string; - parent?: ((FileSystemFolderModel) | null); - content: string; -}; - -export type CreateStylesheetFolderRequestModel = { - name: string; - parent?: ((FileSystemFolderModel) | null); -}; - -export type CreateStylesheetRequestModel = { - name: string; - parent?: ((FileSystemFolderModel) | null); - content: string; -}; - -export type CreateTemplateRequestModel = { - name: string; - alias: string; - content?: (string) | null; - id?: (string) | null; -}; - -export type CreateUserClientCredentialsRequestModel = { - clientId: string; - clientSecret: string; -}; - -export type CreateUserDataRequestModel = { - group: string; - identifier: string; - value: string; - key?: (string) | null; -}; - -export type CreateUserGroupRequestModel = { - name: string; - alias: string; - icon?: (string) | null; - sections: Array<(string)>; - languages: Array<(string)>; - hasAccessToAllLanguages: boolean; - documentStartNode?: ((ReferenceByIdModel) | null); - documentRootAccess: boolean; - mediaStartNode?: ((ReferenceByIdModel) | null); - mediaRootAccess: boolean; - fallbackPermissions: Array<(string)>; - permissions: Array<(DocumentPermissionPresentationModel | DocumentPropertyValuePermissionPresentationModel | UnknownTypePermissionPresentationModel)>; - id?: (string) | null; -}; - -export type CreateUserRequestModel = { - email: string; - userName: string; - name: string; - userGroupIds: Array<(ReferenceByIdModel)>; - id?: (string) | null; - kind: UserKindModel; -}; - -export type CreateWebhookRequestModel = { - enabled: boolean; - name?: (string) | null; - description?: (string) | null; - url: string; - contentTypeKeys: Array<(string)>; - headers: { - [key: string]: (string); - }; - id?: (string) | null; - events: Array<(string)>; -}; - -export type CultureAndScheduleRequestModel = { - culture?: (string) | null; - schedule?: ((ScheduleRequestModel) | null); -}; - -export type CultureReponseModel = { - name: string; - englishName: string; -}; - -export type CurrentUserConfigurationResponseModel = { - keepUserLoggedIn: boolean; - passwordConfiguration: (PasswordConfigurationResponseModel); - allowChangePassword: boolean; - allowTwoFactor: boolean; -}; - -export type CurrentUserResponseModel = { - email: string; - userName: string; - name: string; - userGroupIds: Array<(ReferenceByIdModel)>; - id: string; - languageIsoCode: (string) | null; - documentStartNodeIds: Array<(ReferenceByIdModel)>; - hasDocumentRootAccess: boolean; - mediaStartNodeIds: Array<(ReferenceByIdModel)>; - hasMediaRootAccess: boolean; - avatarUrls: Array<(string)>; - languages: Array<(string)>; - hasAccessToAllLanguages: boolean; - hasAccessToSensitiveData: boolean; - fallbackPermissions: Array<(string)>; - permissions: Array<(DocumentPermissionPresentationModel | DocumentPropertyValuePermissionPresentationModel | UnknownTypePermissionPresentationModel)>; - allowedSections: Array<(string)>; - isAdmin: boolean; -}; - -export type DatabaseInstallRequestModel = { - id: string; - providerName: string; - server?: (string) | null; - name?: (string) | null; - username?: (string) | null; - password?: (string) | null; - useIntegratedAuthentication: boolean; - connectionString?: (string) | null; - trustServerCertificate: boolean; -}; - -export type DatabaseSettingsPresentationModel = { - id: string; - sortOrder: number; - displayName: string; - defaultDatabaseName: string; - providerName: string; - isConfigured: boolean; - requiresServer: boolean; - serverPlaceholder: string; - requiresCredentials: boolean; - supportsIntegratedAuthentication: boolean; - requiresConnectionTest: boolean; -}; - -export enum DataTypeChangeModeModel { - TRUE = 'True', - FALSE = 'False', - FALSE_WITH_HELP_TEXT = 'FalseWithHelpText' -} - -export type DatatypeConfigurationResponseModel = { - canBeChanged: DataTypeChangeModeModel; - documentListViewId: string; - mediaListViewId: string; -}; - -export type DataTypeContentTypeReferenceModel = { - id: string; - type: (string) | null; - name: (string) | null; - icon: (string) | null; -}; - -export type DataTypeItemResponseModel = { - id: string; - name: string; - editorUiAlias?: (string) | null; - editorAlias: string; - isDeletable: boolean; -}; - -export type DataTypePropertyPresentationModel = { - alias: string; - value?: unknown; -}; - -export type DataTypePropertyReferenceModel = { - name: string; - alias: string; -}; - -export type DataTypeReferenceResponseModel = { - contentType: (DataTypeContentTypeReferenceModel); - properties: Array<(DataTypePropertyReferenceModel)>; -}; - -export type DataTypeResponseModel = { - name: string; - editorAlias: string; - editorUiAlias: string; - values: Array<(DataTypePropertyPresentationModel)>; - id: string; - isDeletable: boolean; - canIgnoreStartNodes: boolean; -}; - -export type DataTypeTreeItemResponseModel = { - hasChildren: boolean; - id: string; - parent?: ((ReferenceByIdModel) | null); - name: string; - isFolder: boolean; - editorUiAlias?: (string) | null; - isDeletable: boolean; -}; - -export type DefaultReferenceResponseModel = { - $type: string; - id: string; - name?: (string) | null; - type?: (string) | null; - icon?: (string) | null; -}; - -export type DeleteUserGroupsRequestModel = { - userGroupIds: Array<(ReferenceByIdModel)>; -}; - -export type DeleteUsersRequestModel = { - userIds: Array<(ReferenceByIdModel)>; -}; - -export type DictionaryItemItemResponseModel = { - id: string; - name: string; -}; - -export type DictionaryItemResponseModel = { - name: string; - translations: Array<(DictionaryItemTranslationModel)>; - id: string; -}; - -export type DictionaryItemTranslationModel = { - isoCode: string; - translation: string; -}; - -export type DictionaryOverviewResponseModel = { - name?: (string) | null; - id: string; - parent?: ((ReferenceByIdModel) | null); - translatedIsoCodes: Array<(string)>; -}; - -export enum DirectionModel { - ASCENDING = 'Ascending', - DESCENDING = 'Descending' -} - -export type DisableUserRequestModel = { - userIds: Array<(ReferenceByIdModel)>; -}; - -export type DocumentBlueprintItemResponseModel = { - id: string; - name: string; - documentType: (DocumentTypeReferenceResponseModel); -}; - -export type DocumentBlueprintResponseModel = { - values: Array<(DocumentValueResponseModel)>; - variants: Array<(DocumentVariantResponseModel)>; - id: string; - documentType: (DocumentTypeReferenceResponseModel); -}; - -export type DocumentBlueprintTreeItemResponseModel = { - hasChildren: boolean; - id: string; - parent?: ((ReferenceByIdModel) | null); - name: string; - isFolder: boolean; - documentType?: ((DocumentTypeReferenceResponseModel) | null); -}; - -export type DocumentCollectionResponseModel = { - values: Array<(DocumentValueResponseModel)>; - variants: Array<(DocumentVariantResponseModel)>; - id: string; - creator?: (string) | null; - sortOrder: number; - documentType: (DocumentTypeCollectionReferenceResponseModel); - isTrashed: boolean; - isProtected: boolean; - ancestors: Array<(ReferenceByIdModel)>; - updater?: (string) | null; -}; - -export type DocumentConfigurationResponseModel = { - disableDeleteWhenReferenced: boolean; - disableUnpublishWhenReferenced: boolean; - allowEditInvariantFromNonDefault: boolean; - allowNonExistingSegmentsCreation: boolean; -}; - -export type DocumentItemResponseModel = { - id: string; - isTrashed: boolean; - isProtected: boolean; - parent?: ((ReferenceByIdModel) | null); - hasChildren: boolean; - documentType: (DocumentTypeReferenceResponseModel); - variants: Array<(DocumentVariantItemResponseModel)>; -}; - -export type DocumentNotificationResponseModel = { - actionId: string; - alias: string; - subscribed: boolean; -}; - -export type DocumentPermissionPresentationModel = { - $type: string; - document: (ReferenceByIdModel); - verbs: Array<(string)>; -}; - -export type DocumentPropertyValuePermissionPresentationModel = { - $type: string; - documentType: (ReferenceByIdModel); - propertyType: (ReferenceByIdModel); - verbs: Array<(string)>; -}; - -export type DocumentRecycleBinItemResponseModel = { - id: string; - createDate: string; - hasChildren: boolean; - parent?: ((ItemReferenceByIdResponseModel) | null); - documentType: (DocumentTypeReferenceResponseModel); - variants: Array<(DocumentVariantItemResponseModel)>; -}; - -export type DocumentReferenceResponseModel = { - $type: string; - id: string; - name?: (string) | null; - published?: (boolean) | null; - documentType: (TrackedReferenceDocumentTypeModel); - variants: Array<(DocumentVariantItemResponseModel)>; -}; - -export type DocumentResponseModel = { - values: Array<(DocumentValueResponseModel)>; - variants: Array<(DocumentVariantResponseModel)>; - id: string; - documentType: (DocumentTypeReferenceResponseModel); - urls: Array<(DocumentUrlInfoModel)>; - template?: ((ReferenceByIdModel) | null); - isTrashed: boolean; -}; - -export type DocumentTreeItemResponseModel = { - hasChildren: boolean; - parent?: ((ReferenceByIdModel) | null); - noAccess: boolean; - isTrashed: boolean; - id: string; - createDate: string; - isProtected: boolean; - ancestors: Array<(ReferenceByIdModel)>; - documentType: (DocumentTypeReferenceResponseModel); - variants: Array<(DocumentVariantItemResponseModel)>; -}; - -export type DocumentTypeBlueprintItemResponseModel = { - id: string; - name: string; -}; - -export type DocumentTypeCleanupModel = { - preventCleanup: boolean; - keepAllVersionsNewerThanDays?: (number) | null; - keepLatestVersionPerDayForDays?: (number) | null; -}; - -export type DocumentTypeCollectionReferenceResponseModel = { - id: string; - alias: string; - icon: string; -}; - -export type DocumentTypeCompositionModel = { - documentType: (ReferenceByIdModel); - compositionType: CompositionTypeModel; -}; - -export type DocumentTypeCompositionRequestModel = { - id?: (string) | null; - currentPropertyAliases: Array<(string)>; - currentCompositeIds: Array<(string)>; - isElement: boolean; -}; - -export type DocumentTypeCompositionResponseModel = { - id: string; - name: string; - icon: string; -}; - -export type DocumentTypeConfigurationResponseModel = { - dataTypesCanBeChanged: DataTypeChangeModeModel; - disableTemplates: boolean; - useSegments: boolean; - reservedFieldNames: Array<(string)>; -}; - -export type DocumentTypeItemResponseModel = { - id: string; - name: string; - isElement: boolean; - icon?: (string) | null; - description?: (string) | null; -}; - -export type DocumentTypePropertyTypeContainerResponseModel = { - id: string; - parent?: ((ReferenceByIdModel) | null); - name?: (string) | null; - type: string; - sortOrder: number; -}; - -export type DocumentTypePropertyTypeReferenceResponseModel = { - $type: string; - id: string; - name?: (string) | null; - alias?: (string) | null; - documentType: (TrackedReferenceDocumentTypeModel); -}; - -export type DocumentTypePropertyTypeResponseModel = { - id: string; - container?: ((ReferenceByIdModel) | null); - sortOrder: number; - alias: string; - name: string; - description?: (string) | null; - dataType: (ReferenceByIdModel); - variesByCulture: boolean; - variesBySegment: boolean; - validation: (PropertyTypeValidationModel); - appearance: (PropertyTypeAppearanceModel); -}; - -export type DocumentTypeReferenceResponseModel = { - id: string; - icon: string; - collection?: ((ReferenceByIdModel) | null); -}; - -export type DocumentTypeResponseModel = { - alias: string; - name: string; - description?: (string) | null; - icon: string; - allowedAsRoot: boolean; - variesByCulture: boolean; - variesBySegment: boolean; - collection?: ((ReferenceByIdModel) | null); - isElement: boolean; - properties: Array<(DocumentTypePropertyTypeResponseModel)>; - containers: Array<(DocumentTypePropertyTypeContainerResponseModel)>; - id: string; - allowedTemplates: Array<(ReferenceByIdModel)>; - defaultTemplate?: ((ReferenceByIdModel) | null); - cleanup: (DocumentTypeCleanupModel); - allowedDocumentTypes: Array<(DocumentTypeSortModel)>; - compositions: Array<(DocumentTypeCompositionModel)>; -}; - -export type DocumentTypeSortModel = { - documentType: (ReferenceByIdModel); - sortOrder: number; -}; - -export type DocumentTypeTreeItemResponseModel = { - hasChildren: boolean; - id: string; - parent?: ((ReferenceByIdModel) | null); - name: string; - isFolder: boolean; - isElement: boolean; - icon: string; -}; - -export type DocumentUrlInfoModel = { - culture: (string) | null; - url: string; -}; - -export type DocumentUrlInfoResponseModel = { - id: string; - urlInfos: Array<(DocumentUrlInfoModel)>; -}; - -export type DocumentValueModel = { - culture?: (string) | null; - segment?: (string) | null; - alias: string; - value?: unknown; -}; - -export type DocumentValueResponseModel = { - culture?: (string) | null; - segment?: (string) | null; - alias: string; - value?: unknown; - editorAlias: string; -}; - -export type DocumentVariantItemResponseModel = { - name: string; - culture?: (string) | null; - state: DocumentVariantStateModel; -}; - -export type DocumentVariantRequestModel = { - culture?: (string) | null; - segment?: (string) | null; - name: string; -}; - -export type DocumentVariantResponseModel = { - culture?: (string) | null; - segment?: (string) | null; - name: string; - createDate: string; - updateDate: string; - state: DocumentVariantStateModel; - publishDate?: (string) | null; - scheduledPublishDate?: (string) | null; - scheduledUnpublishDate?: (string) | null; -}; - -export enum DocumentVariantStateModel { - NOT_CREATED = 'NotCreated', - DRAFT = 'Draft', - PUBLISHED = 'Published', - PUBLISHED_PENDING_CHANGES = 'PublishedPendingChanges' -} - -export type DocumentVersionItemResponseModel = { - id: string; - document: (ReferenceByIdModel); - documentType: (ReferenceByIdModel); - user: (ReferenceByIdModel); - versionDate: string; - isCurrentPublishedVersion: boolean; - isCurrentDraftVersion: boolean; - preventCleanup: boolean; -}; - -export type DocumentVersionResponseModel = { - values: Array<(DocumentValueResponseModel)>; - variants: Array<(DocumentVariantResponseModel)>; - id: string; - documentType: (DocumentTypeReferenceResponseModel); - document?: ((ReferenceByIdModel) | null); -}; - -export type DomainPresentationModel = { - domainName: string; - isoCode: string; -}; - -export type DomainsResponseModel = { - defaultIsoCode?: (string) | null; - domains: Array<(DomainPresentationModel)>; -}; - -export type DynamicRootContextRequestModel = { - id?: (string) | null; - parent: (ReferenceByIdModel); - culture?: (string) | null; - segment?: (string) | null; -}; - -export type DynamicRootQueryOriginRequestModel = { - alias: string; - id?: (string) | null; -}; - -export type DynamicRootQueryRequestModel = { - origin: (DynamicRootQueryOriginRequestModel); - steps: Array<(DynamicRootQueryStepRequestModel)>; -}; - -export type DynamicRootQueryStepRequestModel = { - alias: string; - documentTypeIds: Array<(string)>; -}; - -export type DynamicRootRequestModel = { - context: (DynamicRootContextRequestModel); - query: (DynamicRootQueryRequestModel); -}; - -export type DynamicRootResponseModel = { - roots: Array<(string)>; -}; - -export type EnableTwoFactorRequestModel = { - code: string; - secret: string; -}; - -export type EnableUserRequestModel = { - userIds: Array<(ReferenceByIdModel)>; -}; - -export type EntityImportAnalysisResponseModel = { - entityType: string; - alias?: (string) | null; - key?: (string) | null; -}; - -export enum EventMessageTypeModel { - DEFAULT = 'Default', - INFO = 'Info', - ERROR = 'Error', - SUCCESS = 'Success', - WARNING = 'Warning' -} - -export type FieldPresentationModel = { - name: string; - values: Array<(string)>; -}; - -export type FileSystemFolderModel = { - path: string; -}; - -export type FileSystemTreeItemPresentationModel = { - hasChildren: boolean; - name: string; - path: string; - parent?: ((FileSystemFolderModel) | null); - isFolder: boolean; -}; - -export type FolderResponseModel = { - name: string; - id: string; -}; - -export type HealthCheckActionRequestModel = { - healthCheck: (ReferenceByIdModel); - alias?: (string) | null; - name?: (string) | null; - description?: (string) | null; - valueRequired: boolean; - providedValue?: (string) | null; - providedValueValidation?: (string) | null; - providedValueValidationRegex?: (string) | null; - actionParameters?: { - [key: string]: unknown; - } | null; -}; - -export type HealthCheckGroupPresentationModel = { - name: string; - checks: Array<(HealthCheckModel)>; -}; - -export type HealthCheckGroupResponseModel = { - name: string; -}; - -export type HealthCheckGroupWithResultResponseModel = { - checks: Array<(HealthCheckWithResultPresentationModel)>; -}; - -export type HealthCheckModel = { - id: string; - name: string; - description?: (string) | null; -}; - -export type HealthCheckResultResponseModel = { - message: string; - resultType: StatusResultTypeModel; - actions?: Array<(HealthCheckActionRequestModel)> | null; - readMoreLink?: (string) | null; -}; - -export type HealthCheckWithResultPresentationModel = { - id: string; - results?: Array<(HealthCheckResultResponseModel)> | null; -}; - -export enum HealthStatusModel { - HEALTHY = 'Healthy', - UNHEALTHY = 'Unhealthy', - REBUILDING = 'Rebuilding', - CORRUPT = 'Corrupt' -} - -export type HealthStatusResponseModel = { - status: HealthStatusModel; - message?: (string) | null; -}; - -export type HelpPageResponseModel = { - name?: (string) | null; - description?: (string) | null; - url?: (string) | null; - type?: (string) | null; -}; - -export enum ImageCropModeModel { - CROP = 'Crop', - MAX = 'Max', - STRETCH = 'Stretch', - PAD = 'Pad', - BOX_PAD = 'BoxPad', - MIN = 'Min' -} - -export type ImportDictionaryRequestModel = { - temporaryFile: (ReferenceByIdModel); - parent?: ((ReferenceByIdModel) | null); -}; - -export type ImportDocumentTypeRequestModel = { - file: (ReferenceByIdModel); -}; - -export type ImportMediaTypeRequestModel = { - file: (ReferenceByIdModel); -}; - -export type IndexResponseModel = { - name: string; - healthStatus: (HealthStatusResponseModel); - canRebuild: boolean; - searcherName: string; - documentCount: number; - fieldCount: number; - providerProperties?: { - [key: string]: unknown; - } | null; -}; - -export type InstallRequestModel = { - user: (UserInstallRequestModel); - database: (DatabaseInstallRequestModel); - telemetryLevel: TelemetryLevelModel; -}; - -export type InstallSettingsResponseModel = { - user: (UserSettingsPresentationModel); - databases: Array<(DatabaseSettingsPresentationModel)>; -}; - -export type InviteUserRequestModel = { - email: string; - userName: string; - name: string; - userGroupIds: Array<(ReferenceByIdModel)>; - id?: (string) | null; - message?: (string) | null; -}; - -export type ItemReferenceByIdResponseModel = { - id: string; -}; - -export type ItemSortingRequestModel = { - id: string; - sortOrder: number; -}; - -export type LanguageItemResponseModel = { - name: string; - isoCode: string; -}; - -export type LanguageResponseModel = { - name: string; - isDefault: boolean; - isMandatory: boolean; - fallbackIsoCode?: (string) | null; - isoCode: string; -}; - -export type LoggerResponseModel = { - name: string; - level: LogLevelModel; -}; - -export type LogLevelCountsReponseModel = { - information: number; - debug: number; - warning: number; - error: number; - fatal: number; -}; - -export enum LogLevelModel { - VERBOSE = 'Verbose', - DEBUG = 'Debug', - INFORMATION = 'Information', - WARNING = 'Warning', - ERROR = 'Error', - FATAL = 'Fatal' -} - -export type LogMessagePropertyPresentationModel = { - name: string; - value?: (string) | null; -}; - -export type LogMessageResponseModel = { - timestamp: string; - level: LogLevelModel; - messageTemplate?: (string) | null; - renderedMessage?: (string) | null; - properties: Array<(LogMessagePropertyPresentationModel)>; - exception?: (string) | null; -}; - -export type LogTemplateResponseModel = { - messageTemplate?: (string) | null; - count: number; -}; - -export type ManifestResponseModel = { - name: string; - id?: (string) | null; - version?: (string) | null; - extensions: Array; -}; - -export type MediaCollectionResponseModel = { - values: Array<(MediaValueResponseModel)>; - variants: Array<(MediaVariantResponseModel)>; - id: string; - creator?: (string) | null; - sortOrder: number; - mediaType: (MediaTypeCollectionReferenceResponseModel); -}; - -export type MediaConfigurationResponseModel = { - disableDeleteWhenReferenced: boolean; - disableUnpublishWhenReferenced: boolean; -}; - -export type MediaItemResponseModel = { - id: string; - isTrashed: boolean; - parent?: ((ReferenceByIdModel) | null); - hasChildren: boolean; - mediaType: (MediaTypeReferenceResponseModel); - variants: Array<(VariantItemResponseModel)>; -}; - -export type MediaRecycleBinItemResponseModel = { - id: string; - createDate: string; - hasChildren: boolean; - parent?: ((ItemReferenceByIdResponseModel) | null); - mediaType: (MediaTypeReferenceResponseModel); - variants: Array<(VariantItemResponseModel)>; -}; - -export type MediaReferenceResponseModel = { - $type: string; - id: string; - name?: (string) | null; - mediaType: (TrackedReferenceMediaTypeModel); -}; - -export type MediaResponseModel = { - values: Array<(MediaValueResponseModel)>; - variants: Array<(MediaVariantResponseModel)>; - id: string; - urls: Array<(MediaUrlInfoModel)>; - isTrashed: boolean; - mediaType: (MediaTypeReferenceResponseModel); -}; - -export type MediaTreeItemResponseModel = { - hasChildren: boolean; - parent?: ((ReferenceByIdModel) | null); - noAccess: boolean; - isTrashed: boolean; - id: string; - createDate: string; - mediaType: (MediaTypeReferenceResponseModel); - variants: Array<(VariantItemResponseModel)>; -}; - -export type MediaTypeCollectionReferenceResponseModel = { - id: string; - alias: string; - icon: string; -}; - -export type MediaTypeCompositionModel = { - mediaType: (ReferenceByIdModel); - compositionType: CompositionTypeModel; -}; - -export type MediaTypeCompositionRequestModel = { - id?: (string) | null; - currentPropertyAliases: Array<(string)>; - currentCompositeIds: Array<(string)>; -}; - -export type MediaTypeCompositionResponseModel = { - id: string; - name: string; - icon: string; -}; - -export type MediaTypeConfigurationResponseModel = { - reservedFieldNames: Array<(string)>; -}; - -export type MediaTypeItemResponseModel = { - id: string; - name: string; - icon?: (string) | null; -}; - -export type MediaTypePropertyTypeContainerResponseModel = { - id: string; - parent?: ((ReferenceByIdModel) | null); - name?: (string) | null; - type: string; - sortOrder: number; -}; - -export type MediaTypePropertyTypeReferenceResponseModel = { - $type: string; - id: string; - name?: (string) | null; - alias?: (string) | null; - mediaType: (TrackedReferenceMediaTypeModel); -}; - -export type MediaTypePropertyTypeResponseModel = { - id: string; - container?: ((ReferenceByIdModel) | null); - sortOrder: number; - alias: string; - name: string; - description?: (string) | null; - dataType: (ReferenceByIdModel); - variesByCulture: boolean; - variesBySegment: boolean; - validation: (PropertyTypeValidationModel); - appearance: (PropertyTypeAppearanceModel); -}; - -export type MediaTypeReferenceResponseModel = { - id: string; - icon: string; - collection?: ((ReferenceByIdModel) | null); -}; - -export type MediaTypeResponseModel = { - alias: string; - name: string; - description?: (string) | null; - icon: string; - allowedAsRoot: boolean; - variesByCulture: boolean; - variesBySegment: boolean; - collection?: ((ReferenceByIdModel) | null); - isElement: boolean; - properties: Array<(MediaTypePropertyTypeResponseModel)>; - containers: Array<(MediaTypePropertyTypeContainerResponseModel)>; - id: string; - allowedMediaTypes: Array<(MediaTypeSortModel)>; - compositions: Array<(MediaTypeCompositionModel)>; - isDeletable: boolean; - aliasCanBeChanged: boolean; -}; - -export type MediaTypeSortModel = { - mediaType: (ReferenceByIdModel); - sortOrder: number; -}; - -export type MediaTypeTreeItemResponseModel = { - hasChildren: boolean; - id: string; - parent?: ((ReferenceByIdModel) | null); - name: string; - isFolder: boolean; - icon: string; - isDeletable: boolean; -}; - -export type MediaUrlInfoModel = { - culture: (string) | null; - url: string; -}; - -export type MediaUrlInfoResponseModel = { - id: string; - urlInfos: Array<(MediaUrlInfoModel)>; -}; - -export type MediaValueModel = { - culture?: (string) | null; - segment?: (string) | null; - alias: string; - value?: unknown; -}; - -export type MediaValueResponseModel = { - culture?: (string) | null; - segment?: (string) | null; - alias: string; - value?: unknown; - editorAlias: string; -}; - -export type MediaVariantRequestModel = { - culture?: (string) | null; - segment?: (string) | null; - name: string; -}; - -export type MediaVariantResponseModel = { - culture?: (string) | null; - segment?: (string) | null; - name: string; - createDate: string; - updateDate: string; -}; - -export type MemberConfigurationResponseModel = { - [key: string]: unknown; -}; - -export type MemberGroupItemResponseModel = { - id: string; - name: string; -}; - -export type MemberGroupResponseModel = { - name: string; - id: string; -}; - -export type MemberItemResponseModel = { - id: string; - memberType: (MemberTypeReferenceResponseModel); - variants: Array<(VariantItemResponseModel)>; - kind: MemberKindModel; -}; - -export enum MemberKindModel { - DEFAULT = 'Default', - API = 'Api' -} - -export type MemberReferenceResponseModel = { - $type: string; - id: string; - name?: (string) | null; - memberType: (TrackedReferenceMemberTypeModel); -}; - -export type MemberResponseModel = { - values: Array<(MemberValueResponseModel)>; - variants: Array<(MemberVariantResponseModel)>; - id: string; - email: string; - username: string; - memberType: (MemberTypeReferenceResponseModel); - isApproved: boolean; - isLockedOut: boolean; - isTwoFactorEnabled: boolean; - failedPasswordAttempts: number; - lastLoginDate?: (string) | null; - lastLockoutDate?: (string) | null; - lastPasswordChangeDate?: (string) | null; - groups: Array<(string)>; - kind: MemberKindModel; -}; - -export type MemberTypeCompositionModel = { - memberType: (ReferenceByIdModel); - compositionType: CompositionTypeModel; -}; - -export type MemberTypeCompositionRequestModel = { - id?: (string) | null; - currentPropertyAliases: Array<(string)>; - currentCompositeIds: Array<(string)>; -}; - -export type MemberTypeCompositionResponseModel = { - id: string; - name: string; - icon: string; -}; - -export type MemberTypeConfigurationResponseModel = { - reservedFieldNames: Array<(string)>; -}; - -export type MemberTypeItemResponseModel = { - id: string; - name: string; - icon?: (string) | null; -}; - -export type MemberTypePropertyTypeContainerResponseModel = { - id: string; - parent?: ((ReferenceByIdModel) | null); - name?: (string) | null; - type: string; - sortOrder: number; -}; - -export type MemberTypePropertyTypeReferenceResponseModel = { - $type: string; - id: string; - name?: (string) | null; - alias?: (string) | null; - memberType: (TrackedReferenceMemberTypeModel); -}; - -export type MemberTypePropertyTypeResponseModel = { - id: string; - container?: ((ReferenceByIdModel) | null); - sortOrder: number; - alias: string; - name: string; - description?: (string) | null; - dataType: (ReferenceByIdModel); - variesByCulture: boolean; - variesBySegment: boolean; - validation: (PropertyTypeValidationModel); - appearance: (PropertyTypeAppearanceModel); - isSensitive: boolean; - visibility: (MemberTypePropertyTypeVisibilityModel); -}; - -export type MemberTypePropertyTypeVisibilityModel = { - memberCanView: boolean; - memberCanEdit: boolean; -}; - -export type MemberTypeReferenceResponseModel = { - id: string; - icon: string; - collection?: ((ReferenceByIdModel) | null); -}; - -export type MemberTypeResponseModel = { - alias: string; - name: string; - description?: (string) | null; - icon: string; - allowedAsRoot: boolean; - variesByCulture: boolean; - variesBySegment: boolean; - collection?: ((ReferenceByIdModel) | null); - isElement: boolean; - properties: Array<(MemberTypePropertyTypeResponseModel)>; - containers: Array<(MemberTypePropertyTypeContainerResponseModel)>; - id: string; - compositions: Array<(MemberTypeCompositionModel)>; -}; - -export type MemberTypeTreeItemResponseModel = { - hasChildren: boolean; - id: string; - parent?: ((ReferenceByIdModel) | null); - name: string; - icon: string; -}; - -export type MemberValueModel = { - culture?: (string) | null; - segment?: (string) | null; - alias: string; - value?: unknown; -}; - -export type MemberValueResponseModel = { - culture?: (string) | null; - segment?: (string) | null; - alias: string; - value?: unknown; - editorAlias: string; -}; - -export type MemberVariantRequestModel = { - culture?: (string) | null; - segment?: (string) | null; - name: string; -}; - -export type MemberVariantResponseModel = { - culture?: (string) | null; - segment?: (string) | null; - name: string; - createDate: string; - updateDate: string; -}; - -export type ModelsBuilderResponseModel = { - mode: ModelsModeModel; - canGenerate: boolean; - outOfDateModels: boolean; - lastError?: (string) | null; - version?: (string) | null; - modelsNamespace?: (string) | null; - trackingOutOfDateModels: boolean; -}; - -export enum ModelsModeModel { - NOTHING = 'Nothing', - IN_MEMORY_AUTO = 'InMemoryAuto', - SOURCE_CODE_MANUAL = 'SourceCodeManual', - SOURCE_CODE_AUTO = 'SourceCodeAuto' -} - -export type MoveDataTypeRequestModel = { - target?: ((ReferenceByIdModel) | null); -}; - -export type MoveDictionaryRequestModel = { - target?: ((ReferenceByIdModel) | null); -}; - -export type MoveDocumentBlueprintRequestModel = { - target?: ((ReferenceByIdModel) | null); -}; - -export type MoveDocumentRequestModel = { - target?: ((ReferenceByIdModel) | null); -}; - -export type MoveDocumentTypeRequestModel = { - target?: ((ReferenceByIdModel) | null); -}; - -export type MoveMediaRequestModel = { - target?: ((ReferenceByIdModel) | null); -}; - -export type MoveMediaTypeRequestModel = { - target?: ((ReferenceByIdModel) | null); -}; - -export type NamedEntityTreeItemResponseModel = { - hasChildren: boolean; - id: string; - parent?: ((ReferenceByIdModel) | null); - name: string; -}; - -export type NoopSetupTwoFactorModel = { - [key: string]: unknown; -}; - -export type NotificationHeaderModel = { - message: string; - category: string; - type: EventMessageTypeModel; -}; - -export type ObjectTypeResponseModel = { - name?: (string) | null; - id: string; -}; - -export type OEmbedResponseModel = { - markup: string; -}; - -export enum OperatorModel { - EQUALS = 'Equals', - NOT_EQUALS = 'NotEquals', - CONTAINS = 'Contains', - NOT_CONTAINS = 'NotContains', - LESS_THAN = 'LessThan', - LESS_THAN_EQUAL_TO = 'LessThanEqualTo', - GREATER_THAN = 'GreaterThan', - GREATER_THAN_EQUAL_TO = 'GreaterThanEqualTo' -} - -export type OutOfDateStatusResponseModel = { - status: OutOfDateTypeModel; -}; - -export enum OutOfDateTypeModel { - OUT_OF_DATE = 'OutOfDate', - CURRENT = 'Current', - UNKNOWN = 'Unknown' -} - -export type PackageConfigurationResponseModel = { - marketplaceUrl: string; -}; - -export type PackageDefinitionResponseModel = { - name: string; - contentNodeId?: (string) | null; - contentLoadChildNodes: boolean; - mediaIds: Array<(string)>; - mediaLoadChildNodes: boolean; - documentTypes: Array<(string)>; - mediaTypes: Array<(string)>; - dataTypes: Array<(string)>; - templates: Array<(string)>; - partialViews: Array<(string)>; - stylesheets: Array<(string)>; - scripts: Array<(string)>; - languages: Array<(string)>; - dictionaryItems: Array<(string)>; - id: string; - readonly packagePath: string; -}; - -export type PackageMigrationStatusResponseModel = { - packageName: string; - hasPendingMigrations: boolean; -}; - -export type PagedAllowedDocumentTypeModel = { - total: number; - items: Array<(AllowedDocumentTypeModel)>; -}; - -export type PagedAllowedMediaTypeModel = { - total: number; - items: Array<(AllowedMediaTypeModel)>; -}; - -export type PagedAuditLogResponseModel = { - total: number; - items: Array<(AuditLogResponseModel)>; -}; - -export type PagedCultureReponseModel = { - total: number; - items: Array<(CultureReponseModel)>; -}; - -export type PagedDataTypeItemResponseModel = { - total: number; - items: Array<(DataTypeItemResponseModel)>; -}; - -export type PagedDataTypeTreeItemResponseModel = { - total: number; - items: Array<(DataTypeTreeItemResponseModel)>; -}; - -export type PagedDictionaryOverviewResponseModel = { - total: number; - items: Array<(DictionaryOverviewResponseModel)>; -}; - -export type PagedDocumentBlueprintTreeItemResponseModel = { - total: number; - items: Array<(DocumentBlueprintTreeItemResponseModel)>; -}; - -export type PagedDocumentCollectionResponseModel = { - total: number; - items: Array<(DocumentCollectionResponseModel)>; -}; - -export type PagedDocumentRecycleBinItemResponseModel = { - total: number; - items: Array<(DocumentRecycleBinItemResponseModel)>; -}; - -export type PagedDocumentTreeItemResponseModel = { - total: number; - items: Array<(DocumentTreeItemResponseModel)>; -}; - -export type PagedDocumentTypeBlueprintItemResponseModel = { - total: number; - items: Array<(DocumentTypeBlueprintItemResponseModel)>; -}; - -export type PagedDocumentTypeTreeItemResponseModel = { - total: number; - items: Array<(DocumentTypeTreeItemResponseModel)>; -}; - -export type PagedDocumentVersionItemResponseModel = { - total: number; - items: Array<(DocumentVersionItemResponseModel)>; -}; - -export type PagedFileSystemTreeItemPresentationModel = { - total: number; - items: Array<(FileSystemTreeItemPresentationModel)>; -}; - -export type PagedHealthCheckGroupResponseModel = { - total: number; - items: Array<(HealthCheckGroupResponseModel)>; -}; - -export type PagedHelpPageResponseModel = { - total: number; - items: Array<(HelpPageResponseModel)>; -}; - -export type PagedIndexResponseModel = { - total: number; - items: Array<(IndexResponseModel)>; -}; - -export type PagedIReferenceResponseModel = { - total: number; - items: Array<(DefaultReferenceResponseModel | DocumentReferenceResponseModel | DocumentTypePropertyTypeReferenceResponseModel | MediaReferenceResponseModel | MediaTypePropertyTypeReferenceResponseModel | MemberReferenceResponseModel | MemberTypePropertyTypeReferenceResponseModel)>; -}; - -export type PagedLanguageResponseModel = { - total: number; - items: Array<(LanguageResponseModel)>; -}; - -export type PagedLoggerResponseModel = { - total: number; - items: Array<(LoggerResponseModel)>; -}; - -export type PagedLogMessageResponseModel = { - total: number; - items: Array<(LogMessageResponseModel)>; -}; - -export type PagedLogTemplateResponseModel = { - total: number; - items: Array<(LogTemplateResponseModel)>; -}; - -export type PagedMediaCollectionResponseModel = { - total: number; - items: Array<(MediaCollectionResponseModel)>; -}; - -export type PagedMediaRecycleBinItemResponseModel = { - total: number; - items: Array<(MediaRecycleBinItemResponseModel)>; -}; - -export type PagedMediaTreeItemResponseModel = { - total: number; - items: Array<(MediaTreeItemResponseModel)>; -}; - -export type PagedMediaTypeTreeItemResponseModel = { - total: number; - items: Array<(MediaTypeTreeItemResponseModel)>; -}; - -export type PagedMemberGroupResponseModel = { - total: number; - items: Array<(MemberGroupResponseModel)>; -}; - -export type PagedMemberResponseModel = { - total: number; - items: Array<(MemberResponseModel)>; -}; - -export type PagedMemberTypeTreeItemResponseModel = { - total: number; - items: Array<(MemberTypeTreeItemResponseModel)>; -}; - -export type PagedModelDataTypeItemResponseModel = { - items: Array<(DataTypeItemResponseModel)>; - total: number; -}; - -export type PagedModelDocumentItemResponseModel = { - items: Array<(DocumentItemResponseModel)>; - total: number; -}; - -export type PagedModelDocumentTypeItemResponseModel = { - items: Array<(DocumentTypeItemResponseModel)>; - total: number; -}; - -export type PagedModelMediaItemResponseModel = { - items: Array<(MediaItemResponseModel)>; - total: number; -}; - -export type PagedModelMediaTypeItemResponseModel = { - items: Array<(MediaTypeItemResponseModel)>; - total: number; -}; - -export type PagedModelMemberItemResponseModel = { - items: Array<(MemberItemResponseModel)>; - total: number; -}; - -export type PagedModelMemberTypeItemResponseModel = { - items: Array<(MemberTypeItemResponseModel)>; - total: number; -}; - -export type PagedModelTemplateItemResponseModel = { - items: Array<(TemplateItemResponseModel)>; - total: number; -}; - -export type PagedNamedEntityTreeItemResponseModel = { - total: number; - items: Array<(NamedEntityTreeItemResponseModel)>; -}; - -export type PagedObjectTypeResponseModel = { - total: number; - items: Array<(ObjectTypeResponseModel)>; -}; - -export type PagedPackageDefinitionResponseModel = { - total: number; - items: Array<(PackageDefinitionResponseModel)>; -}; - -export type PagedPackageMigrationStatusResponseModel = { - total: number; - items: Array<(PackageMigrationStatusResponseModel)>; -}; - -export type PagedPartialViewSnippetItemResponseModel = { - total: number; - items: Array<(PartialViewSnippetItemResponseModel)>; -}; - -export type PagedProblemDetailsModel = { - total: number; - items: Array<(ProblemDetails)>; -}; - -export type PagedRedirectUrlResponseModel = { - total: number; - items: Array<(RedirectUrlResponseModel)>; -}; - -export type PagedReferenceByIdModel = { - total: number; - items: Array<(ReferenceByIdModel)>; -}; - -export type PagedRelationResponseModel = { - total: number; - items: Array<(RelationResponseModel)>; -}; - -export type PagedRelationTypeResponseModel = { - total: number; - items: Array<(RelationTypeResponseModel)>; -}; - -export type PagedSavedLogSearchResponseModel = { - total: number; - items: Array<(SavedLogSearchResponseModel)>; -}; - -export type PagedSearcherResponseModel = { - total: number; - items: Array<(SearcherResponseModel)>; -}; - -export type PagedSearchResultResponseModel = { - total: number; - items: Array<(SearchResultResponseModel)>; -}; - -export type PagedSegmentResponseModel = { - total: number; - items: Array<(SegmentResponseModel)>; -}; - -export type PagedTagResponseModel = { - total: number; - items: Array<(TagResponseModel)>; -}; - -export type PagedTelemetryResponseModel = { - total: number; - items: Array<(TelemetryResponseModel)>; -}; - -export type PagedUserDataResponseModel = { - total: number; - items: Array<(UserDataResponseModel)>; -}; - -export type PagedUserGroupResponseModel = { - total: number; - items: Array<(UserGroupResponseModel)>; -}; - -export type PagedUserResponseModel = { - total: number; - items: Array<(UserResponseModel)>; -}; - -export type PagedWebhookEventModel = { - total: number; - items: Array<(WebhookEventModel)>; -}; - -export type PagedWebhookLogResponseModel = { - total: number; - items: Array<(WebhookLogResponseModel)>; -}; - -export type PagedWebhookResponseModel = { - total: number; - items: Array<(WebhookResponseModel)>; -}; - -export type PartialViewFolderResponseModel = { - path: string; - name: string; - parent?: ((FileSystemFolderModel) | null); -}; - -export type PartialViewItemResponseModel = { - path: string; - name: string; - parent?: ((FileSystemFolderModel) | null); - isFolder: boolean; -}; - -export type PartialViewResponseModel = { - path: string; - name: string; - parent?: ((FileSystemFolderModel) | null); - content: string; -}; - -export type PartialViewSnippetItemResponseModel = { - id: string; - name: string; -}; - -export type PartialViewSnippetResponseModel = { - id: string; - name: string; - content: string; -}; - -export type PasswordConfigurationResponseModel = { - minimumPasswordLength: number; - requireNonLetterOrDigit: boolean; - requireDigit: boolean; - requireLowercase: boolean; - requireUppercase: boolean; -}; - -export type ProblemDetails = { - type?: (string) | null; - title?: (string) | null; - status?: (number) | null; - detail?: (string) | null; - instance?: (string) | null; - [key: string]: (unknown | string | number) | undefined; -}; - -export type ProblemDetailsBuilderModel = { - [key: string]: unknown; -}; - -export type ProfilingStatusRequestModel = { - enabled: boolean; -}; - -export type ProfilingStatusResponseModel = { - enabled: boolean; -}; - -export type PropertyTypeAppearanceModel = { - labelOnTop: boolean; -}; - -export type PropertyTypeValidationModel = { - mandatory: boolean; - mandatoryMessage?: (string) | null; - regEx?: (string) | null; - regExMessage?: (string) | null; -}; - -export type PublicAccessRequestModel = { - loginDocument: (ReferenceByIdModel); - errorDocument: (ReferenceByIdModel); - memberUserNames: Array<(string)>; - memberGroupNames: Array<(string)>; -}; - -export type PublicAccessResponseModel = { - loginDocument: (ReferenceByIdModel); - errorDocument: (ReferenceByIdModel); - members: Array<(MemberItemResponseModel)>; - groups: Array<(MemberGroupItemResponseModel)>; -}; - -export type PublishDocumentRequestModel = { - publishSchedules: Array<(CultureAndScheduleRequestModel)>; -}; - -export type PublishDocumentWithDescendantsRequestModel = { - includeUnpublishedDescendants: boolean; - cultures: Array<(string)>; -}; - -export type PublishedDocumentResponseModel = { - values: Array<(DocumentValueResponseModel)>; - variants: Array<(DocumentVariantResponseModel)>; - id: string; - documentType: (DocumentTypeReferenceResponseModel); - urls: Array<(DocumentUrlInfoModel)>; - template?: ((ReferenceByIdModel) | null); - isTrashed: boolean; -}; - -export type PublishWithDescendantsResultModel = { - taskId: string; - isComplete: boolean; -}; - -export type RebuildStatusModel = { - isRebuilding: boolean; -}; - -export enum RedirectStatusModel { - ENABLED = 'Enabled', - DISABLED = 'Disabled' -} - -export type RedirectUrlResponseModel = { - id: string; - originalUrl: string; - destinationUrl: string; - created: string; - document: (ReferenceByIdModel); - culture?: (string) | null; -}; - -export type RedirectUrlStatusResponseModel = { - status: RedirectStatusModel; - userIsAdmin: boolean; -}; - -export type ReferenceByIdModel = { - id: string; -}; - -export type RelationReferenceModel = { - id: string; - name?: (string) | null; -}; - -export type RelationResponseModel = { - id: string; - relationType: (ReferenceByIdModel); - readonly parent: (RelationReferenceModel); - readonly child: (RelationReferenceModel); - readonly createDate: string; - readonly comment?: (string) | null; -}; - -export type RelationTypeItemResponseModel = { - id: string; - name: string; - isDeletable: boolean; -}; - -export type RelationTypeResponseModel = { - name: string; - isBidirectional: boolean; - isDependency: boolean; - id: string; - alias?: (string) | null; - parentObject?: ((ObjectTypeResponseModel) | null); - childObject?: ((ObjectTypeResponseModel) | null); -}; - -export type RenamePartialViewRequestModel = { - name: string; -}; - -export type RenameScriptRequestModel = { - name: string; -}; - -export type RenameStylesheetRequestModel = { - name: string; -}; - -export type ResendInviteUserRequestModel = { - user: (ReferenceByIdModel); - message?: (string) | null; -}; - -export type ResetPasswordRequestModel = { - email: string; -}; - -export type ResetPasswordTokenRequestModel = { - user: (ReferenceByIdModel); - resetCode: string; - password: string; -}; - -export type ResetPasswordUserResponseModel = { - resetPassword?: (string) | null; -}; - -export enum RuntimeLevelModel { - UNKNOWN = 'Unknown', - BOOT = 'Boot', - INSTALL = 'Install', - UPGRADE = 'Upgrade', - RUN = 'Run', - BOOT_FAILED = 'BootFailed' -} - -export enum RuntimeModeModel { - BACKOFFICE_DEVELOPMENT = 'BackofficeDevelopment', - DEVELOPMENT = 'Development', - PRODUCTION = 'Production' -} - -export type SavedLogSearchRequestModel = { - name: string; - query: string; -}; - -export type SavedLogSearchResponseModel = { - name: string; - query: string; -}; - -export type ScheduleRequestModel = { - publishTime?: (string) | null; - unpublishTime?: (string) | null; -}; - -export type ScriptFolderResponseModel = { - path: string; - name: string; - parent?: ((FileSystemFolderModel) | null); -}; - -export type ScriptItemResponseModel = { - path: string; - name: string; - parent?: ((FileSystemFolderModel) | null); - isFolder: boolean; -}; - -export type ScriptResponseModel = { - path: string; - name: string; - parent?: ((FileSystemFolderModel) | null); - content: string; -}; - -export type SearcherResponseModel = { - name: string; -}; - -export type SearchResultResponseModel = { - id: string; - score: number; - readonly fieldCount: number; - fields: Array<(FieldPresentationModel)>; -}; - -export type SecurityConfigurationResponseModel = { - passwordConfiguration: (PasswordConfigurationResponseModel); -}; - -export type SegmentResponseModel = { - name: string; - alias: string; -}; - -export type ServerConfigurationItemResponseModel = { - name: string; - data: string; -}; - -export type ServerConfigurationResponseModel = { - allowPasswordReset: boolean; - versionCheckPeriod: number; - allowLocalLogin: boolean; -}; - -export type ServerInformationResponseModel = { - version: string; - assemblyVersion: string; - baseUtcOffset: string; - runtimeMode: RuntimeModeModel; -}; - -export type ServerStatusResponseModel = { - serverStatus: RuntimeLevelModel; -}; - -export type ServerTroubleshootingResponseModel = { - items: Array<(ServerConfigurationItemResponseModel)>; -}; - -export type SetAvatarRequestModel = { - file: (ReferenceByIdModel); -}; - -export type SortingRequestModel = { - parent?: ((ReferenceByIdModel) | null); - sorting: Array<(ItemSortingRequestModel)>; -}; - -export type StaticFileItemResponseModel = { - path: string; - name: string; - parent?: ((FileSystemFolderModel) | null); - isFolder: boolean; -}; - -export enum StatusResultTypeModel { - SUCCESS = 'Success', - WARNING = 'Warning', - ERROR = 'Error', - INFO = 'Info' -} - -export type StylesheetFolderResponseModel = { - path: string; - name: string; - parent?: ((FileSystemFolderModel) | null); -}; - -export type StylesheetItemResponseModel = { - path: string; - name: string; - parent?: ((FileSystemFolderModel) | null); - isFolder: boolean; -}; - -export type StylesheetResponseModel = { - path: string; - name: string; - parent?: ((FileSystemFolderModel) | null); - content: string; -}; - -export type TagResponseModel = { - id: string; - text?: (string) | null; - group?: (string) | null; - nodeCount: number; -}; - -export enum TelemetryLevelModel { - MINIMAL = 'Minimal', - BASIC = 'Basic', - DETAILED = 'Detailed' -} - -export type TelemetryRequestModel = { - telemetryLevel: TelemetryLevelModel; -}; - -export type TelemetryResponseModel = { - telemetryLevel: TelemetryLevelModel; -}; - -export type TemplateConfigurationResponseModel = { - disabled: boolean; -}; - -export type TemplateItemResponseModel = { - id: string; - name: string; - alias: string; -}; - -export type TemplateQueryExecuteFilterPresentationModel = { - propertyAlias: string; - constraintValue: string; - operator: OperatorModel; -}; - -export type TemplateQueryExecuteModel = { - rootDocument?: ((ReferenceByIdModel) | null); - documentTypeAlias?: (string) | null; - filters?: Array<(TemplateQueryExecuteFilterPresentationModel)> | null; - sort?: ((TemplateQueryExecuteSortModel) | null); - take: number; -}; - -export type TemplateQueryExecuteSortModel = { - propertyAlias: string; - direction?: (string) | null; -}; - -export type TemplateQueryOperatorModel = { - operator: OperatorModel; - applicableTypes: Array; -}; - -export type TemplateQueryPropertyPresentationModel = { - alias: string; - type: TemplateQueryPropertyTypeModel; -}; - -export enum TemplateQueryPropertyTypeModel { - STRING = 'String', - DATE_TIME = 'DateTime', - INTEGER = 'Integer' -} - -export type TemplateQueryResultItemPresentationModel = { - icon: string; - name: string; -}; - -export type TemplateQueryResultResponseModel = { - queryExpression: string; - sampleResults: Array<(TemplateQueryResultItemPresentationModel)>; - resultCount: number; - executionTime: number; -}; - -export type TemplateQuerySettingsResponseModel = { - documentTypeAliases: Array<(string)>; - properties: Array<(TemplateQueryPropertyPresentationModel)>; - operators: Array<(TemplateQueryOperatorModel)>; -}; - -export type TemplateResponseModel = { - name: string; - alias: string; - content?: (string) | null; - id: string; - masterTemplate?: ((ReferenceByIdModel) | null); -}; - -export type TemporaryFileConfigurationResponseModel = { - imageFileTypes: Array<(string)>; - disallowedUploadedFilesExtensions: Array<(string)>; - allowedUploadedFileExtensions: Array<(string)>; - maxFileSize?: (number) | null; -}; - -export type TemporaryFileResponseModel = { - id: string; - availableUntil?: (string) | null; - fileName: string; -}; - -export type TrackedReferenceDocumentTypeModel = { - id: string; - icon?: (string) | null; - alias?: (string) | null; - name?: (string) | null; -}; - -export type TrackedReferenceMediaTypeModel = { - id: string; - icon?: (string) | null; - alias?: (string) | null; - name?: (string) | null; -}; - -export type TrackedReferenceMemberTypeModel = { - id: string; - icon?: (string) | null; - alias?: (string) | null; - name?: (string) | null; -}; - -export type UnknownTypePermissionPresentationModel = { - $type: string; - verbs: Array<(string)>; - context: string; -}; - -export type UnlockUsersRequestModel = { - userIds: Array<(ReferenceByIdModel)>; -}; - -export type UnpublishDocumentRequestModel = { - cultures?: Array<(string)> | null; -}; - -export type UpdateDataTypeRequestModel = { - name: string; - editorAlias: string; - editorUiAlias: string; - values: Array<(DataTypePropertyPresentationModel)>; -}; - -export type UpdateDictionaryItemRequestModel = { - name: string; - translations: Array<(DictionaryItemTranslationModel)>; -}; - -export type UpdateDocumentBlueprintRequestModel = { - values: Array<(DocumentValueModel)>; - variants: Array<(DocumentVariantRequestModel)>; -}; - -export type UpdateDocumentNotificationsRequestModel = { - subscribedActionIds: Array<(string)>; -}; - -export type UpdateDocumentRequestModel = { - values: Array<(DocumentValueModel)>; - variants: Array<(DocumentVariantRequestModel)>; - template?: ((ReferenceByIdModel) | null); -}; - -export type UpdateDocumentTypePropertyTypeContainerRequestModel = { - id: string; - parent?: ((ReferenceByIdModel) | null); - name?: (string) | null; - type: string; - sortOrder: number; -}; - -export type UpdateDocumentTypePropertyTypeRequestModel = { - id: string; - container?: ((ReferenceByIdModel) | null); - sortOrder: number; - alias: string; - name: string; - description?: (string) | null; - dataType: (ReferenceByIdModel); - variesByCulture: boolean; - variesBySegment: boolean; - validation: (PropertyTypeValidationModel); - appearance: (PropertyTypeAppearanceModel); -}; - -export type UpdateDocumentTypeRequestModel = { - alias: string; - name: string; - description?: (string) | null; - icon: string; - allowedAsRoot: boolean; - variesByCulture: boolean; - variesBySegment: boolean; - collection?: ((ReferenceByIdModel) | null); - isElement: boolean; - properties: Array<(UpdateDocumentTypePropertyTypeRequestModel)>; - containers: Array<(UpdateDocumentTypePropertyTypeContainerRequestModel)>; - allowedTemplates: Array<(ReferenceByIdModel)>; - defaultTemplate?: ((ReferenceByIdModel) | null); - cleanup: (DocumentTypeCleanupModel); - allowedDocumentTypes: Array<(DocumentTypeSortModel)>; - compositions: Array<(DocumentTypeCompositionModel)>; -}; - -export type UpdateDomainsRequestModel = { - defaultIsoCode?: (string) | null; - domains: Array<(DomainPresentationModel)>; -}; - -export type UpdateFolderResponseModel = { - name: string; -}; - -export type UpdateLanguageRequestModel = { - name: string; - isDefault: boolean; - isMandatory: boolean; - fallbackIsoCode?: (string) | null; -}; - -export type UpdateMediaRequestModel = { - values: Array<(MediaValueModel)>; - variants: Array<(MediaVariantRequestModel)>; -}; - -export type UpdateMediaTypePropertyTypeContainerRequestModel = { - id: string; - parent?: ((ReferenceByIdModel) | null); - name?: (string) | null; - type: string; - sortOrder: number; -}; - -export type UpdateMediaTypePropertyTypeRequestModel = { - id: string; - container?: ((ReferenceByIdModel) | null); - sortOrder: number; - alias: string; - name: string; - description?: (string) | null; - dataType: (ReferenceByIdModel); - variesByCulture: boolean; - variesBySegment: boolean; - validation: (PropertyTypeValidationModel); - appearance: (PropertyTypeAppearanceModel); -}; - -export type UpdateMediaTypeRequestModel = { - alias: string; - name: string; - description?: (string) | null; - icon: string; - allowedAsRoot: boolean; - variesByCulture: boolean; - variesBySegment: boolean; - collection?: ((ReferenceByIdModel) | null); - isElement: boolean; - properties: Array<(UpdateMediaTypePropertyTypeRequestModel)>; - containers: Array<(UpdateMediaTypePropertyTypeContainerRequestModel)>; - allowedMediaTypes: Array<(MediaTypeSortModel)>; - compositions: Array<(MediaTypeCompositionModel)>; -}; - -export type UpdateMemberGroupRequestModel = { - name: string; -}; - -export type UpdateMemberRequestModel = { - values: Array<(MemberValueModel)>; - variants: Array<(MemberVariantRequestModel)>; - email: string; - username: string; - oldPassword?: (string) | null; - newPassword?: (string) | null; - groups?: Array<(string)> | null; - isApproved: boolean; - isLockedOut: boolean; - isTwoFactorEnabled: boolean; -}; - -export type UpdateMemberTypePropertyTypeContainerRequestModel = { - id: string; - parent?: ((ReferenceByIdModel) | null); - name?: (string) | null; - type: string; - sortOrder: number; -}; - -export type UpdateMemberTypePropertyTypeRequestModel = { - id: string; - container?: ((ReferenceByIdModel) | null); - sortOrder: number; - alias: string; - name: string; - description?: (string) | null; - dataType: (ReferenceByIdModel); - variesByCulture: boolean; - variesBySegment: boolean; - validation: (PropertyTypeValidationModel); - appearance: (PropertyTypeAppearanceModel); - isSensitive: boolean; - visibility: (MemberTypePropertyTypeVisibilityModel); -}; - -export type UpdateMemberTypeRequestModel = { - alias: string; - name: string; - description?: (string) | null; - icon: string; - allowedAsRoot: boolean; - variesByCulture: boolean; - variesBySegment: boolean; - collection?: ((ReferenceByIdModel) | null); - isElement: boolean; - properties: Array<(UpdateMemberTypePropertyTypeRequestModel)>; - containers: Array<(UpdateMemberTypePropertyTypeContainerRequestModel)>; - compositions: Array<(MemberTypeCompositionModel)>; -}; - -export type UpdatePackageRequestModel = { - name: string; - contentNodeId?: (string) | null; - contentLoadChildNodes: boolean; - mediaIds: Array<(string)>; - mediaLoadChildNodes: boolean; - documentTypes: Array<(string)>; - mediaTypes: Array<(string)>; - dataTypes: Array<(string)>; - templates: Array<(string)>; - partialViews: Array<(string)>; - stylesheets: Array<(string)>; - scripts: Array<(string)>; - languages: Array<(string)>; - dictionaryItems: Array<(string)>; - readonly packagePath: string; -}; - -export type UpdatePartialViewRequestModel = { - content: string; -}; - -export type UpdateScriptRequestModel = { - content: string; -}; - -export type UpdateStylesheetRequestModel = { - content: string; -}; - -export type UpdateTemplateRequestModel = { - name: string; - alias: string; - content?: (string) | null; -}; - -export type UpdateUserDataRequestModel = { - group: string; - identifier: string; - value: string; - key: string; -}; - -export type UpdateUserGroupRequestModel = { - name: string; - alias: string; - icon?: (string) | null; - sections: Array<(string)>; - languages: Array<(string)>; - hasAccessToAllLanguages: boolean; - documentStartNode?: ((ReferenceByIdModel) | null); - documentRootAccess: boolean; - mediaStartNode?: ((ReferenceByIdModel) | null); - mediaRootAccess: boolean; - fallbackPermissions: Array<(string)>; - permissions: Array<(DocumentPermissionPresentationModel | DocumentPropertyValuePermissionPresentationModel | UnknownTypePermissionPresentationModel)>; -}; - -export type UpdateUserGroupsOnUserRequestModel = { - userIds: Array<(ReferenceByIdModel)>; - userGroupIds: Array<(ReferenceByIdModel)>; -}; - -export type UpdateUserRequestModel = { - email: string; - userName: string; - name: string; - userGroupIds: Array<(ReferenceByIdModel)>; - languageIsoCode: string; - documentStartNodeIds: Array<(ReferenceByIdModel)>; - hasDocumentRootAccess: boolean; - mediaStartNodeIds: Array<(ReferenceByIdModel)>; - hasMediaRootAccess: boolean; -}; - -export type UpdateWebhookRequestModel = { - enabled: boolean; - name?: (string) | null; - description?: (string) | null; - url: string; - contentTypeKeys: Array<(string)>; - headers: { - [key: string]: (string); - }; - events: Array<(string)>; -}; - -export type UpgradeCheckResponseModel = { - type: string; - comment: string; - url: string; -}; - -export type UpgradeSettingsResponseModel = { - currentState: string; - newState: string; - newVersion: string; - oldVersion: string; - readonly reportUrl: string; -}; - -export type UserConfigurationResponseModel = { - canInviteUsers: boolean; - usernameIsEmail: boolean; - passwordConfiguration: (PasswordConfigurationResponseModel); - allowChangePassword: boolean; - allowTwoFactor: boolean; -}; - -export type UserDataModel = { - group: string; - identifier: string; - value: string; -}; - -export enum UserDataOperationStatusModel { - SUCCESS = 'Success', - NOT_FOUND = 'NotFound', - USER_NOT_FOUND = 'UserNotFound', - ALREADY_EXISTS = 'AlreadyExists' -} - -export type UserDataResponseModel = { - group: string; - identifier: string; - value: string; - key: string; -}; - -export type UserExternalLoginProviderModel = { - providerSchemeName: string; - providerKey?: (string) | null; - isLinkedOnUser: boolean; - hasManualLinkingEnabled: boolean; -}; - -export type UserGroupItemResponseModel = { - id: string; - name: string; - icon?: (string) | null; - alias?: (string) | null; -}; - -export type UserGroupResponseModel = { - name: string; - alias: string; - icon?: (string) | null; - sections: Array<(string)>; - languages: Array<(string)>; - hasAccessToAllLanguages: boolean; - documentStartNode?: ((ReferenceByIdModel) | null); - documentRootAccess: boolean; - mediaStartNode?: ((ReferenceByIdModel) | null); - mediaRootAccess: boolean; - fallbackPermissions: Array<(string)>; - permissions: Array<(DocumentPermissionPresentationModel | DocumentPropertyValuePermissionPresentationModel | UnknownTypePermissionPresentationModel)>; - id: string; - isDeletable: boolean; - aliasCanBeChanged: boolean; -}; - -export type UserInstallRequestModel = { - name: string; - email: string; - password: string; - readonly subscribeToNewsletter: boolean; -}; - -export type UserItemResponseModel = { - id: string; - name: string; - avatarUrls: Array<(string)>; - kind: UserKindModel; -}; - -export enum UserKindModel { - DEFAULT = 'Default', - API = 'Api' -} - -export enum UserOrderModel { - USER_NAME = 'UserName', - LANGUAGE = 'Language', - NAME = 'Name', - EMAIL = 'Email', - ID = 'Id', - CREATE_DATE = 'CreateDate', - UPDATE_DATE = 'UpdateDate', - IS_APPROVED = 'IsApproved', - IS_LOCKED_OUT = 'IsLockedOut', - LAST_LOGIN_DATE = 'LastLoginDate' -} - -export type UserPermissionModel = { - nodeKey: string; - permissions: Array<(string)>; -}; - -export type UserPermissionsResponseModel = { - permissions: Array<(UserPermissionModel)>; -}; - -export type UserResponseModel = { - email: string; - userName: string; - name: string; - userGroupIds: Array<(ReferenceByIdModel)>; - id: string; - languageIsoCode?: (string) | null; - documentStartNodeIds: Array<(ReferenceByIdModel)>; - hasDocumentRootAccess: boolean; - mediaStartNodeIds: Array<(ReferenceByIdModel)>; - hasMediaRootAccess: boolean; - avatarUrls: Array<(string)>; - state: UserStateModel; - failedLoginAttempts: number; - createDate: string; - updateDate: string; - lastLoginDate?: (string) | null; - lastLockoutDate?: (string) | null; - lastPasswordChangeDate?: (string) | null; - isAdmin: boolean; - kind: UserKindModel; -}; - -export type UserSettingsPresentationModel = { - minCharLength: number; - minNonAlphaNumericLength: number; - consentLevels: Array<(ConsentLevelPresentationModel)>; -}; - -export enum UserStateModel { - ACTIVE = 'Active', - DISABLED = 'Disabled', - LOCKED_OUT = 'LockedOut', - INVITED = 'Invited', - INACTIVE = 'Inactive', - ALL = 'All' -} - -export type UserTwoFactorProviderModel = { - providerName: string; - isEnabledOnUser: boolean; -}; - -export type ValidateUpdateDocumentRequestModel = { - values: Array<(DocumentValueModel)>; - variants: Array<(DocumentVariantRequestModel)>; - template?: ((ReferenceByIdModel) | null); - cultures?: Array<(string)> | null; -}; - -export type VariantItemResponseModel = { - name: string; - culture?: (string) | null; -}; - -export type VerifyInviteUserRequestModel = { - user: (ReferenceByIdModel); - token: string; -}; - -export type VerifyInviteUserResponseModel = { - passwordConfiguration: (PasswordConfigurationResponseModel); -}; - -export type VerifyResetPasswordResponseModel = { - passwordConfiguration: (PasswordConfigurationResponseModel); -}; - -export type VerifyResetPasswordTokenRequestModel = { - user: (ReferenceByIdModel); - resetCode: string; -}; - -export type WebhookEventModel = { - eventName: string; - eventType: string; - alias: string; -}; - -export type WebhookEventResponseModel = { - eventName: string; - eventType: string; - alias: string; -}; - -export type WebhookItemResponseModel = { - enabled: boolean; - name: string; - events: string; - url: string; - types: string; -}; - -export type WebhookLogResponseModel = { - key: string; - webhookKey: string; - statusCode: string; - isSuccessStatusCode: boolean; - date: string; - eventAlias: string; - url: string; - retryCount: number; - requestHeaders: string; - requestBody: string; - responseHeaders: string; - responseBody: string; - exceptionOccured: boolean; -}; - -export type WebhookResponseModel = { - enabled: boolean; - name?: (string) | null; - description?: (string) | null; - url: string; - contentTypeKeys: Array<(string)>; - headers: { - [key: string]: (string); - }; - id: string; - events: Array<(WebhookEventResponseModel)>; -}; - -export type GetCultureData = { - skip?: number; - take?: number; -}; - -export type GetCultureResponse = ((PagedCultureReponseModel)); - -export type PostDataTypeData = { - requestBody?: (CreateDataTypeRequestModel); -}; - -export type PostDataTypeResponse = (string); - -export type GetDataTypeByIdData = { - id: string; -}; - -export type GetDataTypeByIdResponse = ((DataTypeResponseModel)); - -export type DeleteDataTypeByIdData = { - id: string; -}; - -export type DeleteDataTypeByIdResponse = (string); - -export type PutDataTypeByIdData = { - id: string; - requestBody?: (UpdateDataTypeRequestModel); -}; - -export type PutDataTypeByIdResponse = (string); - -export type PostDataTypeByIdCopyData = { - id: string; - requestBody?: (CopyDataTypeRequestModel); -}; - -export type PostDataTypeByIdCopyResponse = (string); - -export type GetDataTypeByIdIsUsedData = { - id: string; -}; - -export type GetDataTypeByIdIsUsedResponse = (boolean); - -export type PutDataTypeByIdMoveData = { - id: string; - requestBody?: (MoveDataTypeRequestModel); -}; - -export type PutDataTypeByIdMoveResponse = (string); - -export type GetDataTypeByIdReferencedByData = { - id: string; - skip?: number; - take?: number; -}; - -export type GetDataTypeByIdReferencedByResponse = ((PagedIReferenceResponseModel)); - -export type GetDataTypeByIdReferencesData = { - id: string; -}; - -export type GetDataTypeByIdReferencesResponse = (Array<(DataTypeReferenceResponseModel)>); - -export type GetDataTypeConfigurationResponse = ((DatatypeConfigurationResponseModel)); - -export type PostDataTypeFolderData = { - requestBody?: (CreateFolderRequestModel); -}; - -export type PostDataTypeFolderResponse = (string); - -export type GetDataTypeFolderByIdData = { - id: string; -}; - -export type GetDataTypeFolderByIdResponse = ((FolderResponseModel)); - -export type DeleteDataTypeFolderByIdData = { - id: string; -}; - -export type DeleteDataTypeFolderByIdResponse = (string); - -export type PutDataTypeFolderByIdData = { - id: string; - requestBody?: (UpdateFolderResponseModel); -}; - -export type PutDataTypeFolderByIdResponse = (string); - -export type GetFilterDataTypeData = { - editorAlias?: string; - editorUiAlias?: string; - name?: string; - skip?: number; - take?: number; -}; - -export type GetFilterDataTypeResponse = ((PagedDataTypeItemResponseModel)); - -export type GetItemDataTypeData = { - id?: Array<(string)>; -}; - -export type GetItemDataTypeResponse = (Array<(DataTypeItemResponseModel)>); - -export type GetItemDataTypeSearchData = { - query?: string; - skip?: number; - take?: number; -}; - -export type GetItemDataTypeSearchResponse = ((PagedModelDataTypeItemResponseModel)); - -export type GetTreeDataTypeAncestorsData = { - descendantId?: string; -}; - -export type GetTreeDataTypeAncestorsResponse = (Array<(DataTypeTreeItemResponseModel)>); - -export type GetTreeDataTypeChildrenData = { - foldersOnly?: boolean; - parentId?: string; - skip?: number; - take?: number; -}; - -export type GetTreeDataTypeChildrenResponse = ((PagedDataTypeTreeItemResponseModel)); - -export type GetTreeDataTypeRootData = { - foldersOnly?: boolean; - skip?: number; - take?: number; -}; - -export type GetTreeDataTypeRootResponse = ((PagedDataTypeTreeItemResponseModel)); - -export type GetDictionaryData = { - filter?: string; - skip?: number; - take?: number; -}; - -export type GetDictionaryResponse = ((PagedDictionaryOverviewResponseModel)); - -export type PostDictionaryData = { - requestBody?: (CreateDictionaryItemRequestModel); -}; - -export type PostDictionaryResponse = (string); - -export type GetDictionaryByIdData = { - id: string; -}; - -export type GetDictionaryByIdResponse = ((DictionaryItemResponseModel)); - -export type DeleteDictionaryByIdData = { - id: string; -}; - -export type DeleteDictionaryByIdResponse = (string); - -export type PutDictionaryByIdData = { - id: string; - requestBody?: (UpdateDictionaryItemRequestModel); -}; - -export type PutDictionaryByIdResponse = (string); - -export type GetDictionaryByIdExportData = { - id: string; - includeChildren?: boolean; -}; - -export type GetDictionaryByIdExportResponse = (((Blob | File))); - -export type PutDictionaryByIdMoveData = { - id: string; - requestBody?: (MoveDictionaryRequestModel); -}; - -export type PutDictionaryByIdMoveResponse = (string); - -export type PostDictionaryImportData = { - requestBody?: (ImportDictionaryRequestModel); -}; - -export type PostDictionaryImportResponse = (string); - -export type GetItemDictionaryData = { - id?: Array<(string)>; -}; - -export type GetItemDictionaryResponse = (Array<(DictionaryItemItemResponseModel)>); - -export type GetTreeDictionaryAncestorsData = { - descendantId?: string; -}; - -export type GetTreeDictionaryAncestorsResponse = (Array<(NamedEntityTreeItemResponseModel)>); - -export type GetTreeDictionaryChildrenData = { - parentId?: string; - skip?: number; - take?: number; -}; - -export type GetTreeDictionaryChildrenResponse = ((PagedNamedEntityTreeItemResponseModel)); - -export type GetTreeDictionaryRootData = { - skip?: number; - take?: number; -}; - -export type GetTreeDictionaryRootResponse = ((PagedNamedEntityTreeItemResponseModel)); - -export type GetCollectionDocumentByIdData = { - dataTypeId?: string; - filter?: string; - id: string; - orderBy?: string; - orderCulture?: string; - orderDirection?: DirectionModel; - skip?: number; - take?: number; -}; - -export type GetCollectionDocumentByIdResponse = ((PagedDocumentCollectionResponseModel)); - -export type PostDocumentData = { - requestBody?: (CreateDocumentRequestModel); -}; - -export type PostDocumentResponse = (string); - -export type GetDocumentByIdData = { - id: string; -}; - -export type GetDocumentByIdResponse = ((DocumentResponseModel)); - -export type DeleteDocumentByIdData = { - id: string; -}; - -export type DeleteDocumentByIdResponse = (string); - -export type PutDocumentByIdData = { - id: string; - requestBody?: (UpdateDocumentRequestModel); -}; - -export type PutDocumentByIdResponse = (string); - -export type GetDocumentByIdAuditLogData = { - id: string; - orderDirection?: DirectionModel; - sinceDate?: string; - skip?: number; - take?: number; -}; - -export type GetDocumentByIdAuditLogResponse = ((PagedAuditLogResponseModel)); - -export type PostDocumentByIdCopyData = { - id: string; - requestBody?: (CopyDocumentRequestModel); -}; - -export type PostDocumentByIdCopyResponse = (string); - -export type GetDocumentByIdDomainsData = { - id: string; -}; - -export type GetDocumentByIdDomainsResponse = ((DomainsResponseModel)); - -export type PutDocumentByIdDomainsData = { - id: string; - requestBody?: (UpdateDomainsRequestModel); -}; - -export type PutDocumentByIdDomainsResponse = (string); - -export type PutDocumentByIdMoveData = { - id: string; - requestBody?: (MoveDocumentRequestModel); -}; - -export type PutDocumentByIdMoveResponse = (string); - -export type PutDocumentByIdMoveToRecycleBinData = { - id: string; -}; - -export type PutDocumentByIdMoveToRecycleBinResponse = (string); - -export type GetDocumentByIdNotificationsData = { - id: string; -}; - -export type GetDocumentByIdNotificationsResponse = (Array<(DocumentNotificationResponseModel)>); - -export type PutDocumentByIdNotificationsData = { - id: string; - requestBody?: (UpdateDocumentNotificationsRequestModel); -}; - -export type PutDocumentByIdNotificationsResponse = (string); - -export type PostDocumentByIdPublicAccessData = { - id: string; - requestBody?: (PublicAccessRequestModel); -}; - -export type PostDocumentByIdPublicAccessResponse = (string); - -export type DeleteDocumentByIdPublicAccessData = { - id: string; -}; - -export type DeleteDocumentByIdPublicAccessResponse = (string); - -export type GetDocumentByIdPublicAccessData = { - id: string; -}; - -export type GetDocumentByIdPublicAccessResponse = ((PublicAccessResponseModel)); - -export type PutDocumentByIdPublicAccessData = { - id: string; - requestBody?: (PublicAccessRequestModel); -}; - -export type PutDocumentByIdPublicAccessResponse = (string); - -export type PutDocumentByIdPublishData = { - id: string; - requestBody?: (PublishDocumentRequestModel); -}; - -export type PutDocumentByIdPublishResponse = (string); - -export type PutDocumentByIdPublishWithDescendantsData = { - id: string; - requestBody?: (PublishDocumentWithDescendantsRequestModel); -}; - -export type PutDocumentByIdPublishWithDescendantsResponse = ((PublishWithDescendantsResultModel)); - -export type GetDocumentByIdPublishWithDescendantsResultByTaskIdData = { - id: string; - taskId: string; -}; - -export type GetDocumentByIdPublishWithDescendantsResultByTaskIdResponse = ((PublishWithDescendantsResultModel)); - -export type GetDocumentByIdPublishedData = { - id: string; -}; - -export type GetDocumentByIdPublishedResponse = ((PublishedDocumentResponseModel)); - -export type GetDocumentByIdReferencedByData = { - id: string; - skip?: number; - take?: number; -}; - -export type GetDocumentByIdReferencedByResponse = ((PagedIReferenceResponseModel)); - -export type GetDocumentByIdReferencedDescendantsData = { - id: string; - skip?: number; - take?: number; -}; - -export type GetDocumentByIdReferencedDescendantsResponse = ((PagedReferenceByIdModel)); - -export type PutDocumentByIdUnpublishData = { - id: string; - requestBody?: (UnpublishDocumentRequestModel); -}; - -export type PutDocumentByIdUnpublishResponse = (string); - -export type PutUmbracoManagementApiV11DocumentByIdValidate11Data = { - id: string; - requestBody?: (ValidateUpdateDocumentRequestModel); -}; - -export type PutUmbracoManagementApiV11DocumentByIdValidate11Response = (string); - -export type GetDocumentAreReferencedData = { - id?: Array<(string)>; - skip?: number; - take?: number; -}; - -export type GetDocumentAreReferencedResponse = ((PagedReferenceByIdModel)); - -export type GetDocumentConfigurationResponse = ((DocumentConfigurationResponseModel)); - -export type PutDocumentSortData = { - requestBody?: (SortingRequestModel); -}; - -export type PutDocumentSortResponse = (string); - -export type GetDocumentUrlsData = { - id?: Array<(string)>; -}; - -export type GetDocumentUrlsResponse = (Array<(DocumentUrlInfoResponseModel)>); - -export type PostDocumentValidateData = { - requestBody?: (CreateDocumentRequestModel); -}; - -export type PostDocumentValidateResponse = (string); - -export type GetItemDocumentData = { - id?: Array<(string)>; -}; - -export type GetItemDocumentResponse = (Array<(DocumentItemResponseModel)>); - -export type GetItemDocumentSearchData = { - allowedDocumentTypes?: Array<(string)>; - parentId?: string; - query?: string; - skip?: number; - take?: number; - trashed?: boolean; -}; - -export type GetItemDocumentSearchResponse = ((PagedModelDocumentItemResponseModel)); - -export type DeleteRecycleBinDocumentResponse = (string); - -export type DeleteRecycleBinDocumentByIdData = { - id: string; -}; - -export type DeleteRecycleBinDocumentByIdResponse = (string); - -export type GetRecycleBinDocumentByIdOriginalParentData = { - id: string; -}; - -export type GetRecycleBinDocumentByIdOriginalParentResponse = ((ReferenceByIdModel)); - -export type PutRecycleBinDocumentByIdRestoreData = { - id: string; - requestBody?: (MoveMediaRequestModel); -}; - -export type PutRecycleBinDocumentByIdRestoreResponse = (string); - -export type GetRecycleBinDocumentChildrenData = { - parentId?: string; - skip?: number; - take?: number; -}; - -export type GetRecycleBinDocumentChildrenResponse = ((PagedDocumentRecycleBinItemResponseModel)); - -export type GetRecycleBinDocumentReferencedByData = { - skip?: number; - take?: number; -}; - -export type GetRecycleBinDocumentReferencedByResponse = ((PagedIReferenceResponseModel)); - -export type GetRecycleBinDocumentRootData = { - skip?: number; - take?: number; -}; - -export type GetRecycleBinDocumentRootResponse = ((PagedDocumentRecycleBinItemResponseModel)); - -export type GetTreeDocumentAncestorsData = { - descendantId?: string; -}; - -export type GetTreeDocumentAncestorsResponse = (Array<(DocumentTreeItemResponseModel)>); - -export type GetTreeDocumentChildrenData = { - dataTypeId?: string; - parentId?: string; - skip?: number; - take?: number; -}; - -export type GetTreeDocumentChildrenResponse = ((PagedDocumentTreeItemResponseModel)); - -export type GetTreeDocumentRootData = { - dataTypeId?: string; - skip?: number; - take?: number; -}; - -export type GetTreeDocumentRootResponse = ((PagedDocumentTreeItemResponseModel)); - -export type PostDocumentBlueprintData = { - requestBody?: (CreateDocumentBlueprintRequestModel); -}; - -export type PostDocumentBlueprintResponse = (string); - -export type GetDocumentBlueprintByIdData = { - id: string; -}; - -export type GetDocumentBlueprintByIdResponse = ((DocumentBlueprintResponseModel)); - -export type DeleteDocumentBlueprintByIdData = { - id: string; -}; - -export type DeleteDocumentBlueprintByIdResponse = (string); - -export type PutDocumentBlueprintByIdData = { - id: string; - requestBody?: (UpdateDocumentBlueprintRequestModel); -}; - -export type PutDocumentBlueprintByIdResponse = (string); - -export type PutDocumentBlueprintByIdMoveData = { - id: string; - requestBody?: (MoveDocumentBlueprintRequestModel); -}; - -export type PutDocumentBlueprintByIdMoveResponse = (string); - -export type PostDocumentBlueprintFolderData = { - requestBody?: (CreateFolderRequestModel); -}; - -export type PostDocumentBlueprintFolderResponse = (string); - -export type GetDocumentBlueprintFolderByIdData = { - id: string; -}; - -export type GetDocumentBlueprintFolderByIdResponse = ((FolderResponseModel)); - -export type DeleteDocumentBlueprintFolderByIdData = { - id: string; -}; - -export type DeleteDocumentBlueprintFolderByIdResponse = (string); - -export type PutDocumentBlueprintFolderByIdData = { - id: string; - requestBody?: (UpdateFolderResponseModel); -}; - -export type PutDocumentBlueprintFolderByIdResponse = (string); - -export type PostDocumentBlueprintFromDocumentData = { - requestBody?: (CreateDocumentBlueprintFromDocumentRequestModel); -}; - -export type PostDocumentBlueprintFromDocumentResponse = (string); - -export type GetItemDocumentBlueprintData = { - id?: Array<(string)>; -}; - -export type GetItemDocumentBlueprintResponse = (Array<(DocumentBlueprintItemResponseModel)>); - -export type GetTreeDocumentBlueprintAncestorsData = { - descendantId?: string; -}; - -export type GetTreeDocumentBlueprintAncestorsResponse = (Array<(DocumentBlueprintTreeItemResponseModel)>); - -export type GetTreeDocumentBlueprintChildrenData = { - foldersOnly?: boolean; - parentId?: string; - skip?: number; - take?: number; -}; - -export type GetTreeDocumentBlueprintChildrenResponse = ((PagedDocumentBlueprintTreeItemResponseModel)); - -export type GetTreeDocumentBlueprintRootData = { - foldersOnly?: boolean; - skip?: number; - take?: number; -}; - -export type GetTreeDocumentBlueprintRootResponse = ((PagedDocumentBlueprintTreeItemResponseModel)); - -export type PostDocumentTypeData = { - requestBody?: (CreateDocumentTypeRequestModel); -}; - -export type PostDocumentTypeResponse = (string); - -export type GetDocumentTypeByIdData = { - id: string; -}; - -export type GetDocumentTypeByIdResponse = ((DocumentTypeResponseModel)); - -export type DeleteDocumentTypeByIdData = { - id: string; -}; - -export type DeleteDocumentTypeByIdResponse = (string); - -export type PutDocumentTypeByIdData = { - id: string; - requestBody?: (UpdateDocumentTypeRequestModel); -}; - -export type PutDocumentTypeByIdResponse = (string); - -export type GetDocumentTypeByIdAllowedChildrenData = { - id: string; - parentContentKey?: string; - skip?: number; - take?: number; -}; - -export type GetDocumentTypeByIdAllowedChildrenResponse = ((PagedAllowedDocumentTypeModel)); - -export type GetDocumentTypeByIdBlueprintData = { - id: string; - skip?: number; - take?: number; -}; - -export type GetDocumentTypeByIdBlueprintResponse = ((PagedDocumentTypeBlueprintItemResponseModel)); - -export type GetDocumentTypeByIdCompositionReferencesData = { - id: string; -}; - -export type GetDocumentTypeByIdCompositionReferencesResponse = (Array<(DocumentTypeCompositionResponseModel)>); - -export type PostDocumentTypeByIdCopyData = { - id: string; - requestBody?: (CopyDocumentTypeRequestModel); -}; - -export type PostDocumentTypeByIdCopyResponse = (string); - -export type GetDocumentTypeByIdExportData = { - id: string; -}; - -export type GetDocumentTypeByIdExportResponse = (((Blob | File))); - -export type PutDocumentTypeByIdImportData = { - id: string; - requestBody?: (ImportDocumentTypeRequestModel); -}; - -export type PutDocumentTypeByIdImportResponse = (string); - -export type PutDocumentTypeByIdMoveData = { - id: string; - requestBody?: (MoveDocumentTypeRequestModel); -}; - -export type PutDocumentTypeByIdMoveResponse = (string); - -export type GetDocumentTypeAllowedAtRootData = { - skip?: number; - take?: number; -}; - -export type GetDocumentTypeAllowedAtRootResponse = ((PagedAllowedDocumentTypeModel)); - -export type PostDocumentTypeAvailableCompositionsData = { - requestBody?: (DocumentTypeCompositionRequestModel); -}; - -export type PostDocumentTypeAvailableCompositionsResponse = (Array<(AvailableDocumentTypeCompositionResponseModel)>); - -export type GetDocumentTypeConfigurationResponse = ((DocumentTypeConfigurationResponseModel)); - -export type PostDocumentTypeFolderData = { - requestBody?: (CreateFolderRequestModel); -}; - -export type PostDocumentTypeFolderResponse = (string); - -export type GetDocumentTypeFolderByIdData = { - id: string; -}; - -export type GetDocumentTypeFolderByIdResponse = ((FolderResponseModel)); - -export type DeleteDocumentTypeFolderByIdData = { - id: string; -}; - -export type DeleteDocumentTypeFolderByIdResponse = (string); - -export type PutDocumentTypeFolderByIdData = { - id: string; - requestBody?: (UpdateFolderResponseModel); -}; - -export type PutDocumentTypeFolderByIdResponse = (string); - -export type PostDocumentTypeImportData = { - requestBody?: (ImportDocumentTypeRequestModel); -}; - -export type PostDocumentTypeImportResponse = (string); - -export type GetItemDocumentTypeData = { - id?: Array<(string)>; -}; - -export type GetItemDocumentTypeResponse = (Array<(DocumentTypeItemResponseModel)>); - -export type GetItemDocumentTypeSearchData = { - isElement?: boolean; - query?: string; - skip?: number; - take?: number; -}; - -export type GetItemDocumentTypeSearchResponse = ((PagedModelDocumentTypeItemResponseModel)); - -export type GetTreeDocumentTypeAncestorsData = { - descendantId?: string; -}; - -export type GetTreeDocumentTypeAncestorsResponse = (Array<(DocumentTypeTreeItemResponseModel)>); - -export type GetTreeDocumentTypeChildrenData = { - foldersOnly?: boolean; - parentId?: string; - skip?: number; - take?: number; -}; - -export type GetTreeDocumentTypeChildrenResponse = ((PagedDocumentTypeTreeItemResponseModel)); - -export type GetTreeDocumentTypeRootData = { - foldersOnly?: boolean; - skip?: number; - take?: number; -}; - -export type GetTreeDocumentTypeRootResponse = ((PagedDocumentTypeTreeItemResponseModel)); - -export type GetDocumentVersionData = { - culture?: string; - documentId: string; - skip?: number; - take?: number; -}; - -export type GetDocumentVersionResponse = ((PagedDocumentVersionItemResponseModel)); - -export type GetDocumentVersionByIdData = { - id: string; -}; - -export type GetDocumentVersionByIdResponse = ((DocumentVersionResponseModel)); - -export type PutDocumentVersionByIdPreventCleanupData = { - id: string; - preventCleanup?: boolean; -}; - -export type PutDocumentVersionByIdPreventCleanupResponse = (string); - -export type PostDocumentVersionByIdRollbackData = { - culture?: string; - id: string; -}; - -export type PostDocumentVersionByIdRollbackResponse = (string); - -export type PostDynamicRootQueryData = { - requestBody?: (DynamicRootRequestModel); -}; - -export type PostDynamicRootQueryResponse = ((DynamicRootResponseModel)); - -export type GetDynamicRootStepsResponse = (Array<(string)>); - -export type GetHealthCheckGroupData = { - skip?: number; - take?: number; -}; - -export type GetHealthCheckGroupResponse = ((PagedHealthCheckGroupResponseModel)); - -export type GetHealthCheckGroupByNameData = { - name: string; -}; - -export type GetHealthCheckGroupByNameResponse = ((HealthCheckGroupPresentationModel)); - -export type PostHealthCheckGroupByNameCheckData = { - name: string; -}; - -export type PostHealthCheckGroupByNameCheckResponse = ((HealthCheckGroupWithResultResponseModel)); - -export type PostHealthCheckExecuteActionData = { - requestBody?: (HealthCheckActionRequestModel); -}; - -export type PostHealthCheckExecuteActionResponse = ((HealthCheckResultResponseModel)); - -export type GetHelpData = { - baseUrl?: string; - section?: string; - skip?: number; - take?: number; - tree?: string; -}; - -export type GetHelpResponse = ((PagedHelpPageResponseModel)); - -export type GetImagingResizeUrlsData = { - height?: number; - id?: Array<(string)>; - mode?: ImageCropModeModel; - width?: number; -}; - -export type GetImagingResizeUrlsResponse = (Array<(MediaUrlInfoResponseModel)>); - -export type GetImportAnalyzeData = { - temporaryFileId?: string; -}; - -export type GetImportAnalyzeResponse = ((EntityImportAnalysisResponseModel)); - -export type GetIndexerData = { - skip?: number; - take?: number; -}; - -export type GetIndexerResponse = ((PagedIndexResponseModel)); - -export type GetIndexerByIndexNameData = { - indexName: string; -}; - -export type GetIndexerByIndexNameResponse = ((IndexResponseModel)); - -export type PostIndexerByIndexNameRebuildData = { - indexName: string; -}; - -export type PostIndexerByIndexNameRebuildResponse = (string); - -export type GetInstallSettingsResponse = ((InstallSettingsResponseModel)); - -export type PostInstallSetupData = { - requestBody?: (InstallRequestModel); -}; - -export type PostInstallSetupResponse = (string); - -export type PostInstallValidateDatabaseData = { - requestBody?: (DatabaseInstallRequestModel); -}; - -export type PostInstallValidateDatabaseResponse = (string); - -export type GetItemLanguageData = { - isoCode?: Array<(string)>; -}; - -export type GetItemLanguageResponse = (Array<(LanguageItemResponseModel)>); - -export type GetItemLanguageDefaultResponse = ((LanguageItemResponseModel)); - -export type GetLanguageData = { - skip?: number; - take?: number; -}; - -export type GetLanguageResponse = ((PagedLanguageResponseModel)); - -export type PostLanguageData = { - requestBody?: (CreateLanguageRequestModel); -}; - -export type PostLanguageResponse = (string); - -export type GetLanguageByIsoCodeData = { - isoCode: string; -}; - -export type GetLanguageByIsoCodeResponse = ((LanguageResponseModel)); - -export type DeleteLanguageByIsoCodeData = { - isoCode: string; -}; - -export type DeleteLanguageByIsoCodeResponse = (string); - -export type PutLanguageByIsoCodeData = { - isoCode: string; - requestBody?: (UpdateLanguageRequestModel); -}; - -export type PutLanguageByIsoCodeResponse = (string); - -export type GetLogViewerLevelData = { - skip?: number; - take?: number; -}; - -export type GetLogViewerLevelResponse = ((PagedLoggerResponseModel)); - -export type GetLogViewerLevelCountData = { - endDate?: string; - startDate?: string; -}; - -export type GetLogViewerLevelCountResponse = ((LogLevelCountsReponseModel)); - -export type GetLogViewerLogData = { - endDate?: string; - filterExpression?: string; - logLevel?: Array; - orderDirection?: DirectionModel; - skip?: number; - startDate?: string; - take?: number; -}; - -export type GetLogViewerLogResponse = ((PagedLogMessageResponseModel)); - -export type GetLogViewerMessageTemplateData = { - endDate?: string; - skip?: number; - startDate?: string; - take?: number; -}; - -export type GetLogViewerMessageTemplateResponse = ((PagedLogTemplateResponseModel)); - -export type GetLogViewerSavedSearchData = { - skip?: number; - take?: number; -}; - -export type GetLogViewerSavedSearchResponse = ((PagedSavedLogSearchResponseModel)); - -export type PostLogViewerSavedSearchData = { - requestBody?: (SavedLogSearchRequestModel); -}; - -export type PostLogViewerSavedSearchResponse = (string); - -export type GetLogViewerSavedSearchByNameData = { - name: string; -}; - -export type GetLogViewerSavedSearchByNameResponse = ((SavedLogSearchResponseModel)); - -export type DeleteLogViewerSavedSearchByNameData = { - name: string; -}; - -export type DeleteLogViewerSavedSearchByNameResponse = (string); - -export type GetLogViewerValidateLogsSizeData = { - endDate?: string; - startDate?: string; -}; - -export type GetLogViewerValidateLogsSizeResponse = (unknown); - -export type GetManifestManifestResponse = (Array<(ManifestResponseModel)>); - -export type GetManifestManifestPrivateResponse = (Array<(ManifestResponseModel)>); - -export type GetManifestManifestPublicResponse = (Array<(ManifestResponseModel)>); - -export type GetCollectionMediaData = { - dataTypeId?: string; - filter?: string; - id?: string; - orderBy?: string; - orderDirection?: DirectionModel; - skip?: number; - take?: number; -}; - -export type GetCollectionMediaResponse = ((PagedMediaCollectionResponseModel)); - -export type GetItemMediaData = { - id?: Array<(string)>; -}; - -export type GetItemMediaResponse = (Array<(MediaItemResponseModel)>); - -export type GetItemMediaSearchData = { - allowedMediaTypes?: Array<(string)>; - parentId?: string; - query?: string; - skip?: number; - take?: number; - trashed?: boolean; -}; - -export type GetItemMediaSearchResponse = ((PagedModelMediaItemResponseModel)); - -export type PostMediaData = { - requestBody?: (CreateMediaRequestModel); -}; - -export type PostMediaResponse = (string); - -export type GetMediaByIdData = { - id: string; -}; - -export type GetMediaByIdResponse = ((MediaResponseModel)); - -export type DeleteMediaByIdData = { - id: string; -}; - -export type DeleteMediaByIdResponse = (string); - -export type PutMediaByIdData = { - id: string; - requestBody?: (UpdateMediaRequestModel); -}; - -export type PutMediaByIdResponse = (string); - -export type GetMediaByIdAuditLogData = { - id: string; - orderDirection?: DirectionModel; - sinceDate?: string; - skip?: number; - take?: number; -}; - -export type GetMediaByIdAuditLogResponse = ((PagedAuditLogResponseModel)); - -export type PutMediaByIdMoveData = { - id: string; - requestBody?: (MoveMediaRequestModel); -}; - -export type PutMediaByIdMoveResponse = (string); - -export type PutMediaByIdMoveToRecycleBinData = { - id: string; -}; - -export type PutMediaByIdMoveToRecycleBinResponse = (string); - -export type GetMediaByIdReferencedByData = { - id: string; - skip?: number; - take?: number; -}; - -export type GetMediaByIdReferencedByResponse = ((PagedIReferenceResponseModel)); - -export type GetMediaByIdReferencedDescendantsData = { - id: string; - skip?: number; - take?: number; -}; - -export type GetMediaByIdReferencedDescendantsResponse = ((PagedReferenceByIdModel)); - -export type PutMediaByIdValidateData = { - id: string; - requestBody?: (UpdateMediaRequestModel); -}; - -export type PutMediaByIdValidateResponse = (string); - -export type GetMediaAreReferencedData = { - id?: Array<(string)>; - skip?: number; - take?: number; -}; - -export type GetMediaAreReferencedResponse = ((PagedReferenceByIdModel)); - -export type GetMediaConfigurationResponse = ((MediaConfigurationResponseModel)); - -export type PutMediaSortData = { - requestBody?: (SortingRequestModel); -}; - -export type PutMediaSortResponse = (string); - -export type GetMediaUrlsData = { - id?: Array<(string)>; -}; - -export type GetMediaUrlsResponse = (Array<(MediaUrlInfoResponseModel)>); - -export type PostMediaValidateData = { - requestBody?: (CreateMediaRequestModel); -}; - -export type PostMediaValidateResponse = (string); - -export type DeleteRecycleBinMediaResponse = (string); - -export type DeleteRecycleBinMediaByIdData = { - id: string; -}; - -export type DeleteRecycleBinMediaByIdResponse = (string); - -export type GetRecycleBinMediaByIdOriginalParentData = { - id: string; -}; - -export type GetRecycleBinMediaByIdOriginalParentResponse = ((ReferenceByIdModel)); - -export type PutRecycleBinMediaByIdRestoreData = { - id: string; - requestBody?: (MoveMediaRequestModel); -}; - -export type PutRecycleBinMediaByIdRestoreResponse = (string); - -export type GetRecycleBinMediaChildrenData = { - parentId?: string; - skip?: number; - take?: number; -}; - -export type GetRecycleBinMediaChildrenResponse = ((PagedMediaRecycleBinItemResponseModel)); - -export type GetRecycleBinMediaReferencedByData = { - skip?: number; - take?: number; -}; - -export type GetRecycleBinMediaReferencedByResponse = ((PagedIReferenceResponseModel)); - -export type GetRecycleBinMediaRootData = { - skip?: number; - take?: number; -}; - -export type GetRecycleBinMediaRootResponse = ((PagedMediaRecycleBinItemResponseModel)); - -export type GetTreeMediaAncestorsData = { - descendantId?: string; -}; - -export type GetTreeMediaAncestorsResponse = (Array<(MediaTreeItemResponseModel)>); - -export type GetTreeMediaChildrenData = { - dataTypeId?: string; - parentId?: string; - skip?: number; - take?: number; -}; - -export type GetTreeMediaChildrenResponse = ((PagedMediaTreeItemResponseModel)); - -export type GetTreeMediaRootData = { - dataTypeId?: string; - skip?: number; - take?: number; -}; - -export type GetTreeMediaRootResponse = ((PagedMediaTreeItemResponseModel)); - -export type GetItemMediaTypeData = { - id?: Array<(string)>; -}; - -export type GetItemMediaTypeResponse = (Array<(MediaTypeItemResponseModel)>); - -export type GetItemMediaTypeAllowedData = { - fileExtension?: string; - skip?: number; - take?: number; -}; - -export type GetItemMediaTypeAllowedResponse = ((PagedModelMediaTypeItemResponseModel)); - -export type GetItemMediaTypeFoldersData = { - skip?: number; - take?: number; -}; - -export type GetItemMediaTypeFoldersResponse = ((PagedModelMediaTypeItemResponseModel)); - -export type GetItemMediaTypeSearchData = { - query?: string; - skip?: number; - take?: number; -}; - -export type GetItemMediaTypeSearchResponse = ((PagedModelMediaTypeItemResponseModel)); - -export type PostMediaTypeData = { - requestBody?: (CreateMediaTypeRequestModel); -}; - -export type PostMediaTypeResponse = (string); - -export type GetMediaTypeByIdData = { - id: string; -}; - -export type GetMediaTypeByIdResponse = ((MediaTypeResponseModel)); - -export type DeleteMediaTypeByIdData = { - id: string; -}; - -export type DeleteMediaTypeByIdResponse = (string); - -export type PutMediaTypeByIdData = { - id: string; - requestBody?: (UpdateMediaTypeRequestModel); -}; - -export type PutMediaTypeByIdResponse = (string); - -export type GetMediaTypeByIdAllowedChildrenData = { - id: string; - parentContentKey?: string; - skip?: number; - take?: number; -}; - -export type GetMediaTypeByIdAllowedChildrenResponse = ((PagedAllowedMediaTypeModel)); - -export type GetMediaTypeByIdCompositionReferencesData = { - id: string; -}; - -export type GetMediaTypeByIdCompositionReferencesResponse = (Array<(MediaTypeCompositionResponseModel)>); - -export type PostMediaTypeByIdCopyData = { - id: string; - requestBody?: (CopyMediaTypeRequestModel); -}; - -export type PostMediaTypeByIdCopyResponse = (string); - -export type GetMediaTypeByIdExportData = { - id: string; -}; - -export type GetMediaTypeByIdExportResponse = (((Blob | File))); - -export type PutMediaTypeByIdImportData = { - id: string; - requestBody?: (ImportMediaTypeRequestModel); -}; - -export type PutMediaTypeByIdImportResponse = (string); - -export type PutMediaTypeByIdMoveData = { - id: string; - requestBody?: (MoveMediaTypeRequestModel); -}; - -export type PutMediaTypeByIdMoveResponse = (string); - -export type GetMediaTypeAllowedAtRootData = { - skip?: number; - take?: number; -}; - -export type GetMediaTypeAllowedAtRootResponse = ((PagedAllowedMediaTypeModel)); - -export type PostMediaTypeAvailableCompositionsData = { - requestBody?: (MediaTypeCompositionRequestModel); -}; - -export type PostMediaTypeAvailableCompositionsResponse = (Array<(AvailableMediaTypeCompositionResponseModel)>); - -export type GetMediaTypeConfigurationResponse = ((MediaTypeConfigurationResponseModel)); - -export type PostMediaTypeFolderData = { - requestBody?: (CreateFolderRequestModel); -}; - -export type PostMediaTypeFolderResponse = (string); - -export type GetMediaTypeFolderByIdData = { - id: string; -}; - -export type GetMediaTypeFolderByIdResponse = ((FolderResponseModel)); - -export type DeleteMediaTypeFolderByIdData = { - id: string; -}; - -export type DeleteMediaTypeFolderByIdResponse = (string); - -export type PutMediaTypeFolderByIdData = { - id: string; - requestBody?: (UpdateFolderResponseModel); -}; - -export type PutMediaTypeFolderByIdResponse = (string); - -export type PostMediaTypeImportData = { - requestBody?: (ImportMediaTypeRequestModel); -}; - -export type PostMediaTypeImportResponse = (string); - -export type GetTreeMediaTypeAncestorsData = { - descendantId?: string; -}; - -export type GetTreeMediaTypeAncestorsResponse = (Array<(MediaTypeTreeItemResponseModel)>); - -export type GetTreeMediaTypeChildrenData = { - foldersOnly?: boolean; - parentId?: string; - skip?: number; - take?: number; -}; - -export type GetTreeMediaTypeChildrenResponse = ((PagedMediaTypeTreeItemResponseModel)); - -export type GetTreeMediaTypeRootData = { - foldersOnly?: boolean; - skip?: number; - take?: number; -}; - -export type GetTreeMediaTypeRootResponse = ((PagedMediaTypeTreeItemResponseModel)); - -export type GetFilterMemberData = { - filter?: string; - isApproved?: boolean; - isLockedOut?: boolean; - memberGroupName?: string; - memberTypeId?: string; - orderBy?: string; - orderDirection?: DirectionModel; - skip?: number; - take?: number; -}; - -export type GetFilterMemberResponse = ((PagedMemberResponseModel)); - -export type GetItemMemberData = { - id?: Array<(string)>; -}; - -export type GetItemMemberResponse = (Array<(MemberItemResponseModel)>); - -export type GetItemMemberSearchData = { - allowedMemberTypes?: Array<(string)>; - query?: string; - skip?: number; - take?: number; -}; - -export type GetItemMemberSearchResponse = ((PagedModelMemberItemResponseModel)); - -export type PostMemberData = { - requestBody?: (CreateMemberRequestModel); -}; - -export type PostMemberResponse = (string); - -export type GetMemberByIdData = { - id: string; -}; - -export type GetMemberByIdResponse = ((MemberResponseModel)); - -export type DeleteMemberByIdData = { - id: string; -}; - -export type DeleteMemberByIdResponse = (string); - -export type PutMemberByIdData = { - id: string; - requestBody?: (UpdateMemberRequestModel); -}; - -export type PutMemberByIdResponse = (string); - -export type GetMemberByIdReferencedByData = { - id: string; - skip?: number; - take?: number; -}; - -export type GetMemberByIdReferencedByResponse = ((PagedIReferenceResponseModel)); - -export type GetMemberByIdReferencedDescendantsData = { - id: string; - skip?: number; - take?: number; -}; - -export type GetMemberByIdReferencedDescendantsResponse = ((PagedReferenceByIdModel)); - -export type PutMemberByIdValidateData = { - id: string; - requestBody?: (UpdateMemberRequestModel); -}; - -export type PutMemberByIdValidateResponse = (string); - -export type GetMemberAreReferencedData = { - id?: Array<(string)>; - skip?: number; - take?: number; -}; - -export type GetMemberAreReferencedResponse = ((PagedReferenceByIdModel)); - -export type GetMemberConfigurationResponse = ((MemberConfigurationResponseModel)); - -export type PostMemberValidateData = { - requestBody?: (CreateMemberRequestModel); -}; - -export type PostMemberValidateResponse = (string); - -export type GetItemMemberGroupData = { - id?: Array<(string)>; -}; - -export type GetItemMemberGroupResponse = (Array<(MemberGroupItemResponseModel)>); - -export type GetMemberGroupData = { - skip?: number; - take?: number; -}; - -export type GetMemberGroupResponse = ((PagedMemberGroupResponseModel)); - -export type PostMemberGroupData = { - requestBody?: (CreateMemberGroupRequestModel); -}; - -export type PostMemberGroupResponse = (string); - -export type GetMemberGroupByIdData = { - id: string; -}; - -export type GetMemberGroupByIdResponse = ((MemberGroupResponseModel)); - -export type DeleteMemberGroupByIdData = { - id: string; -}; - -export type DeleteMemberGroupByIdResponse = (string); - -export type PutMemberGroupByIdData = { - id: string; - requestBody?: (UpdateMemberGroupRequestModel); -}; - -export type PutMemberGroupByIdResponse = (string); - -export type GetTreeMemberGroupRootData = { - skip?: number; - take?: number; -}; - -export type GetTreeMemberGroupRootResponse = ((PagedNamedEntityTreeItemResponseModel)); - -export type GetItemMemberTypeData = { - id?: Array<(string)>; -}; - -export type GetItemMemberTypeResponse = (Array<(MemberTypeItemResponseModel)>); - -export type GetItemMemberTypeSearchData = { - query?: string; - skip?: number; - take?: number; -}; - -export type GetItemMemberTypeSearchResponse = ((PagedModelMemberTypeItemResponseModel)); - -export type PostMemberTypeData = { - requestBody?: (CreateMemberTypeRequestModel); -}; - -export type PostMemberTypeResponse = (string); - -export type GetMemberTypeByIdData = { - id: string; -}; - -export type GetMemberTypeByIdResponse = ((MemberTypeResponseModel)); - -export type DeleteMemberTypeByIdData = { - id: string; -}; - -export type DeleteMemberTypeByIdResponse = (string); - -export type PutMemberTypeByIdData = { - id: string; - requestBody?: (UpdateMemberTypeRequestModel); -}; - -export type PutMemberTypeByIdResponse = (string); - -export type GetMemberTypeByIdCompositionReferencesData = { - id: string; -}; - -export type GetMemberTypeByIdCompositionReferencesResponse = (Array<(MemberTypeCompositionResponseModel)>); - -export type PostMemberTypeByIdCopyData = { - id: string; -}; - -export type PostMemberTypeByIdCopyResponse = (string); - -export type PostMemberTypeAvailableCompositionsData = { - requestBody?: (MemberTypeCompositionRequestModel); -}; - -export type PostMemberTypeAvailableCompositionsResponse = (Array<(AvailableMemberTypeCompositionResponseModel)>); - -export type GetMemberTypeConfigurationResponse = ((MemberTypeConfigurationResponseModel)); - -export type GetTreeMemberTypeRootData = { - skip?: number; - take?: number; -}; - -export type GetTreeMemberTypeRootResponse = ((PagedMemberTypeTreeItemResponseModel)); - -export type PostModelsBuilderBuildResponse = (string); - -export type GetModelsBuilderDashboardResponse = ((ModelsBuilderResponseModel)); - -export type GetModelsBuilderStatusResponse = ((OutOfDateStatusResponseModel)); - -export type GetObjectTypesData = { - skip?: number; - take?: number; -}; - -export type GetObjectTypesResponse = ((PagedObjectTypeResponseModel)); - -export type GetOembedQueryData = { - maxHeight?: number; - maxWidth?: number; - url?: string; -}; - -export type GetOembedQueryResponse = ((OEmbedResponseModel)); - -export type PostPackageByNameRunMigrationData = { - name: string; -}; - -export type PostPackageByNameRunMigrationResponse = (string); - -export type GetPackageConfigurationResponse = ((PackageConfigurationResponseModel)); - -export type GetPackageCreatedData = { - skip?: number; - take?: number; -}; - -export type GetPackageCreatedResponse = ((PagedPackageDefinitionResponseModel)); - -export type PostPackageCreatedData = { - requestBody?: (CreatePackageRequestModel); -}; - -export type PostPackageCreatedResponse = (string); - -export type GetPackageCreatedByIdData = { - id: string; -}; - -export type GetPackageCreatedByIdResponse = ((PackageDefinitionResponseModel)); - -export type DeletePackageCreatedByIdData = { - id: string; -}; - -export type DeletePackageCreatedByIdResponse = (string); - -export type PutPackageCreatedByIdData = { - id: string; - requestBody?: (UpdatePackageRequestModel); -}; - -export type PutPackageCreatedByIdResponse = (string); - -export type GetPackageCreatedByIdDownloadData = { - id: string; -}; - -export type GetPackageCreatedByIdDownloadResponse = (((Blob | File))); - -export type GetPackageMigrationStatusData = { - skip?: number; - take?: number; -}; - -export type GetPackageMigrationStatusResponse = ((PagedPackageMigrationStatusResponseModel)); - -export type GetItemPartialViewData = { - path?: Array<(string)>; -}; - -export type GetItemPartialViewResponse = (Array<(PartialViewItemResponseModel)>); - -export type PostPartialViewData = { - requestBody?: (CreatePartialViewRequestModel); -}; - -export type PostPartialViewResponse = (string); - -export type GetPartialViewByPathData = { - path: string; -}; - -export type GetPartialViewByPathResponse = ((PartialViewResponseModel)); - -export type DeletePartialViewByPathData = { - path: string; -}; - -export type DeletePartialViewByPathResponse = (string); - -export type PutPartialViewByPathData = { - path: string; - requestBody?: (UpdatePartialViewRequestModel); -}; - -export type PutPartialViewByPathResponse = (string); - -export type PutPartialViewByPathRenameData = { - path: string; - requestBody?: (RenamePartialViewRequestModel); -}; - -export type PutPartialViewByPathRenameResponse = (string); - -export type PostPartialViewFolderData = { - requestBody?: (CreatePartialViewFolderRequestModel); -}; - -export type PostPartialViewFolderResponse = (string); - -export type GetPartialViewFolderByPathData = { - path: string; -}; - -export type GetPartialViewFolderByPathResponse = ((PartialViewFolderResponseModel)); - -export type DeletePartialViewFolderByPathData = { - path: string; -}; - -export type DeletePartialViewFolderByPathResponse = (string); - -export type GetPartialViewSnippetData = { - skip?: number; - take?: number; -}; - -export type GetPartialViewSnippetResponse = ((PagedPartialViewSnippetItemResponseModel)); - -export type GetPartialViewSnippetByIdData = { - id: string; -}; - -export type GetPartialViewSnippetByIdResponse = ((PartialViewSnippetResponseModel)); - -export type GetTreePartialViewAncestorsData = { - descendantPath?: string; -}; - -export type GetTreePartialViewAncestorsResponse = (Array<(FileSystemTreeItemPresentationModel)>); - -export type GetTreePartialViewChildrenData = { - parentPath?: string; - skip?: number; - take?: number; -}; - -export type GetTreePartialViewChildrenResponse = ((PagedFileSystemTreeItemPresentationModel)); - -export type GetTreePartialViewRootData = { - skip?: number; - take?: number; -}; - -export type GetTreePartialViewRootResponse = ((PagedFileSystemTreeItemPresentationModel)); - -export type DeletePreviewResponse = (string); - -export type PostPreviewResponse = (string); - -export type GetProfilingStatusResponse = ((ProfilingStatusResponseModel)); - -export type PutProfilingStatusData = { - requestBody?: (ProfilingStatusRequestModel); -}; - -export type PutProfilingStatusResponse = (string); - -export type GetPropertyTypeIsUsedData = { - contentTypeId?: string; - propertyAlias?: string; -}; - -export type GetPropertyTypeIsUsedResponse = (boolean); - -export type PostPublishedCacheRebuildResponse = (string); - -export type GetPublishedCacheRebuildStatusResponse = ((RebuildStatusModel)); - -export type PostPublishedCacheReloadResponse = (string); - -export type GetRedirectManagementData = { - filter?: string; - skip?: number; - take?: number; -}; - -export type GetRedirectManagementResponse = ((PagedRedirectUrlResponseModel)); - -export type GetRedirectManagementByIdData = { - id: string; - skip?: number; - take?: number; -}; - -export type GetRedirectManagementByIdResponse = ((PagedRedirectUrlResponseModel)); - -export type DeleteRedirectManagementByIdData = { - id: string; -}; - -export type DeleteRedirectManagementByIdResponse = (string); - -export type GetRedirectManagementStatusResponse = ((RedirectUrlStatusResponseModel)); - -export type PostRedirectManagementStatusData = { - status?: RedirectStatusModel; -}; - -export type PostRedirectManagementStatusResponse = (string); - -export type GetRelationByRelationTypeIdData = { - id: string; - skip?: number; - take?: number; -}; - -export type GetRelationByRelationTypeIdResponse = ((PagedRelationResponseModel)); - -export type GetItemRelationTypeData = { - id?: Array<(string)>; -}; - -export type GetItemRelationTypeResponse = (Array<(RelationTypeItemResponseModel)>); - -export type GetRelationTypeData = { - skip?: number; - take?: number; -}; - -export type GetRelationTypeResponse = ((PagedRelationTypeResponseModel)); - -export type GetRelationTypeByIdData = { - id: string; -}; - -export type GetRelationTypeByIdResponse = ((RelationTypeResponseModel)); - -export type GetItemScriptData = { - path?: Array<(string)>; -}; - -export type GetItemScriptResponse = (Array<(ScriptItemResponseModel)>); - -export type PostScriptData = { - requestBody?: (CreateScriptRequestModel); -}; - -export type PostScriptResponse = (string); - -export type GetScriptByPathData = { - path: string; -}; - -export type GetScriptByPathResponse = ((ScriptResponseModel)); - -export type DeleteScriptByPathData = { - path: string; -}; - -export type DeleteScriptByPathResponse = (string); - -export type PutScriptByPathData = { - path: string; - requestBody?: (UpdateScriptRequestModel); -}; - -export type PutScriptByPathResponse = (string); - -export type PutScriptByPathRenameData = { - path: string; - requestBody?: (RenameScriptRequestModel); -}; - -export type PutScriptByPathRenameResponse = (string); - -export type PostScriptFolderData = { - requestBody?: (CreateScriptFolderRequestModel); -}; - -export type PostScriptFolderResponse = (string); - -export type GetScriptFolderByPathData = { - path: string; -}; - -export type GetScriptFolderByPathResponse = ((ScriptFolderResponseModel)); - -export type DeleteScriptFolderByPathData = { - path: string; -}; - -export type DeleteScriptFolderByPathResponse = (string); - -export type GetTreeScriptAncestorsData = { - descendantPath?: string; -}; - -export type GetTreeScriptAncestorsResponse = (Array<(FileSystemTreeItemPresentationModel)>); - -export type GetTreeScriptChildrenData = { - parentPath?: string; - skip?: number; - take?: number; -}; - -export type GetTreeScriptChildrenResponse = ((PagedFileSystemTreeItemPresentationModel)); - -export type GetTreeScriptRootData = { - skip?: number; - take?: number; -}; - -export type GetTreeScriptRootResponse = ((PagedFileSystemTreeItemPresentationModel)); - -export type GetSearcherData = { - skip?: number; - take?: number; -}; - -export type GetSearcherResponse = ((PagedSearcherResponseModel)); - -export type GetSearcherBySearcherNameQueryData = { - searcherName: string; - skip?: number; - take?: number; - term?: string; -}; - -export type GetSearcherBySearcherNameQueryResponse = ((PagedSearchResultResponseModel)); - -export type GetSecurityConfigurationResponse = ((SecurityConfigurationResponseModel)); - -export type PostSecurityForgotPasswordData = { - requestBody?: (ResetPasswordRequestModel); -}; - -export type PostSecurityForgotPasswordResponse = (string); - -export type PostSecurityForgotPasswordResetData = { - requestBody?: (ResetPasswordTokenRequestModel); -}; - -export type PostSecurityForgotPasswordResetResponse = (string); - -export type PostSecurityForgotPasswordVerifyData = { - requestBody?: (VerifyResetPasswordTokenRequestModel); -}; - -export type PostSecurityForgotPasswordVerifyResponse = ((VerifyResetPasswordResponseModel)); - -export type GetSegmentData = { - skip?: number; - take?: number; -}; - -export type GetSegmentResponse = ((PagedSegmentResponseModel)); - -export type GetServerConfigurationResponse = ((ServerConfigurationResponseModel)); - -export type GetServerInformationResponse = ((ServerInformationResponseModel)); - -export type GetServerStatusResponse = ((ServerStatusResponseModel)); - -export type GetServerTroubleshootingResponse = ((ServerTroubleshootingResponseModel)); - -export type GetServerUpgradeCheckResponse = ((UpgradeCheckResponseModel)); - -export type GetItemStaticFileData = { - path?: Array<(string)>; -}; - -export type GetItemStaticFileResponse = (Array<(StaticFileItemResponseModel)>); - -export type GetTreeStaticFileAncestorsData = { - descendantPath?: string; -}; - -export type GetTreeStaticFileAncestorsResponse = (Array<(FileSystemTreeItemPresentationModel)>); - -export type GetTreeStaticFileChildrenData = { - parentPath?: string; - skip?: number; - take?: number; -}; - -export type GetTreeStaticFileChildrenResponse = ((PagedFileSystemTreeItemPresentationModel)); - -export type GetTreeStaticFileRootData = { - skip?: number; - take?: number; -}; - -export type GetTreeStaticFileRootResponse = ((PagedFileSystemTreeItemPresentationModel)); - -export type GetItemStylesheetData = { - path?: Array<(string)>; -}; - -export type GetItemStylesheetResponse = (Array<(StylesheetItemResponseModel)>); - -export type PostStylesheetData = { - requestBody?: (CreateStylesheetRequestModel); -}; - -export type PostStylesheetResponse = (string); - -export type GetStylesheetByPathData = { - path: string; -}; - -export type GetStylesheetByPathResponse = ((StylesheetResponseModel)); - -export type DeleteStylesheetByPathData = { - path: string; -}; - -export type DeleteStylesheetByPathResponse = (string); - -export type PutStylesheetByPathData = { - path: string; - requestBody?: (UpdateStylesheetRequestModel); -}; - -export type PutStylesheetByPathResponse = (string); - -export type PutStylesheetByPathRenameData = { - path: string; - requestBody?: (RenameStylesheetRequestModel); -}; - -export type PutStylesheetByPathRenameResponse = (string); - -export type PostStylesheetFolderData = { - requestBody?: (CreateStylesheetFolderRequestModel); -}; - -export type PostStylesheetFolderResponse = (string); - -export type GetStylesheetFolderByPathData = { - path: string; -}; - -export type GetStylesheetFolderByPathResponse = ((StylesheetFolderResponseModel)); - -export type DeleteStylesheetFolderByPathData = { - path: string; -}; - -export type DeleteStylesheetFolderByPathResponse = (string); - -export type GetTreeStylesheetAncestorsData = { - descendantPath?: string; -}; - -export type GetTreeStylesheetAncestorsResponse = (Array<(FileSystemTreeItemPresentationModel)>); - -export type GetTreeStylesheetChildrenData = { - parentPath?: string; - skip?: number; - take?: number; -}; - -export type GetTreeStylesheetChildrenResponse = ((PagedFileSystemTreeItemPresentationModel)); - -export type GetTreeStylesheetRootData = { - skip?: number; - take?: number; -}; - -export type GetTreeStylesheetRootResponse = ((PagedFileSystemTreeItemPresentationModel)); - -export type GetTagData = { - culture?: string; - query?: string; - skip?: number; - tagGroup?: string; - take?: number; -}; - -export type GetTagResponse = ((PagedTagResponseModel)); - -export type GetTelemetryData = { - skip?: number; - take?: number; -}; - -export type GetTelemetryResponse = ((PagedTelemetryResponseModel)); - -export type GetTelemetryLevelResponse = ((TelemetryResponseModel)); - -export type PostTelemetryLevelData = { - requestBody?: (TelemetryRequestModel); -}; - -export type PostTelemetryLevelResponse = (string); - -export type GetItemTemplateData = { - id?: Array<(string)>; -}; - -export type GetItemTemplateResponse = (Array<(TemplateItemResponseModel)>); - -export type GetItemTemplateSearchData = { - query?: string; - skip?: number; - take?: number; -}; - -export type GetItemTemplateSearchResponse = ((PagedModelTemplateItemResponseModel)); - -export type PostTemplateData = { - requestBody?: (CreateTemplateRequestModel); -}; - -export type PostTemplateResponse = (string); - -export type GetTemplateByIdData = { - id: string; -}; - -export type GetTemplateByIdResponse = ((TemplateResponseModel)); - -export type DeleteTemplateByIdData = { - id: string; -}; - -export type DeleteTemplateByIdResponse = (string); - -export type PutTemplateByIdData = { - id: string; - requestBody?: (UpdateTemplateRequestModel); -}; - -export type PutTemplateByIdResponse = (string); - -export type GetTemplateConfigurationResponse = ((TemplateConfigurationResponseModel)); - -export type PostTemplateQueryExecuteData = { - requestBody?: (TemplateQueryExecuteModel); -}; - -export type PostTemplateQueryExecuteResponse = ((TemplateQueryResultResponseModel)); - -export type GetTemplateQuerySettingsResponse = ((TemplateQuerySettingsResponseModel)); - -export type GetTreeTemplateAncestorsData = { - descendantId?: string; -}; - -export type GetTreeTemplateAncestorsResponse = (Array<(NamedEntityTreeItemResponseModel)>); - -export type GetTreeTemplateChildrenData = { - parentId?: string; - skip?: number; - take?: number; -}; - -export type GetTreeTemplateChildrenResponse = ((PagedNamedEntityTreeItemResponseModel)); - -export type GetTreeTemplateRootData = { - skip?: number; - take?: number; -}; - -export type GetTreeTemplateRootResponse = ((PagedNamedEntityTreeItemResponseModel)); - -export type PostTemporaryFileData = { - formData?: { - Id: string; - File: (Blob | File); - }; -}; - -export type PostTemporaryFileResponse = (string); - -export type GetTemporaryFileByIdData = { - id: string; -}; - -export type GetTemporaryFileByIdResponse = ((TemporaryFileResponseModel)); - -export type DeleteTemporaryFileByIdData = { - id: string; -}; - -export type DeleteTemporaryFileByIdResponse = (string); - -export type GetTemporaryFileConfigurationResponse = ((TemporaryFileConfigurationResponseModel)); - -export type PostUpgradeAuthorizeResponse = (string); - -export type GetUpgradeSettingsResponse = ((UpgradeSettingsResponseModel)); - -export type GetFilterUserData = { - filter?: string; - orderBy?: UserOrderModel; - orderDirection?: DirectionModel; - skip?: number; - take?: number; - userGroupIds?: Array<(string)>; - userStates?: Array; -}; - -export type GetFilterUserResponse = ((PagedUserResponseModel)); - -export type GetItemUserData = { - id?: Array<(string)>; -}; - -export type GetItemUserResponse = (Array<(UserItemResponseModel)>); - -export type PostUserData = { - requestBody?: (CreateUserRequestModel); -}; - -export type PostUserResponse = (string); - -export type DeleteUserData = { - requestBody?: (DeleteUsersRequestModel); -}; - -export type DeleteUserResponse = (string); - -export type GetUserData = { - skip?: number; - take?: number; -}; - -export type GetUserResponse = ((PagedUserResponseModel)); - -export type GetUserByIdData = { - id: string; -}; - -export type GetUserByIdResponse = ((UserResponseModel)); - -export type DeleteUserByIdData = { - id: string; -}; - -export type DeleteUserByIdResponse = (string); - -export type PutUserByIdData = { - id: string; - requestBody?: (UpdateUserRequestModel); -}; - -export type PutUserByIdResponse = (string); - -export type GetUserById2FaData = { - id: string; -}; - -export type GetUserById2FaResponse = (Array<(UserTwoFactorProviderModel)>); - -export type DeleteUserById2FaByProviderNameData = { - id: string; - providerName: string; -}; - -export type DeleteUserById2FaByProviderNameResponse = (string); - -export type GetUserByIdCalculateStartNodesData = { - id: string; -}; - -export type GetUserByIdCalculateStartNodesResponse = ((CalculatedUserStartNodesResponseModel)); - -export type PostUserByIdChangePasswordData = { - id: string; - requestBody?: (ChangePasswordUserRequestModel); -}; - -export type PostUserByIdChangePasswordResponse = (string); - -export type PostUserByIdClientCredentialsData = { - id: string; - requestBody?: (CreateUserClientCredentialsRequestModel); -}; - -export type PostUserByIdClientCredentialsResponse = (string); - -export type GetUserByIdClientCredentialsData = { - id: string; -}; - -export type GetUserByIdClientCredentialsResponse = (Array<(string)>); - -export type DeleteUserByIdClientCredentialsByClientIdData = { - clientId: string; - id: string; -}; - -export type DeleteUserByIdClientCredentialsByClientIdResponse = (string); - -export type PostUserByIdResetPasswordData = { - id: string; -}; - -export type PostUserByIdResetPasswordResponse = ((ResetPasswordUserResponseModel)); - -export type DeleteUserAvatarByIdData = { - id: string; -}; - -export type DeleteUserAvatarByIdResponse = (string); - -export type PostUserAvatarByIdData = { - id: string; - requestBody?: (SetAvatarRequestModel); -}; - -export type PostUserAvatarByIdResponse = (string); - -export type GetUserConfigurationResponse = ((UserConfigurationResponseModel)); - -export type GetUserCurrentResponse = ((CurrentUserResponseModel)); - -export type GetUserCurrent2FaResponse = (Array<(UserTwoFactorProviderModel)>); - -export type DeleteUserCurrent2FaByProviderNameData = { - code?: string; - providerName: string; -}; - -export type DeleteUserCurrent2FaByProviderNameResponse = (string); - -export type PostUserCurrent2FaByProviderNameData = { - providerName: string; - requestBody?: (EnableTwoFactorRequestModel); -}; - -export type PostUserCurrent2FaByProviderNameResponse = ((NoopSetupTwoFactorModel)); - -export type GetUserCurrent2FaByProviderNameData = { - providerName: string; -}; - -export type GetUserCurrent2FaByProviderNameResponse = ((NoopSetupTwoFactorModel)); - -export type PostUserCurrentAvatarData = { - requestBody?: (SetAvatarRequestModel); -}; - -export type PostUserCurrentAvatarResponse = (string); - -export type PostUserCurrentChangePasswordData = { - requestBody?: (ChangePasswordCurrentUserRequestModel); -}; - -export type PostUserCurrentChangePasswordResponse = (string); - -export type GetUserCurrentConfigurationResponse = ((CurrentUserConfigurationResponseModel)); - -export type GetUserCurrentLoginProvidersResponse = (Array<(UserExternalLoginProviderModel)>); - -export type GetUserCurrentPermissionsData = { - id?: Array<(string)>; -}; - -export type GetUserCurrentPermissionsResponse = ((UserPermissionsResponseModel)); - -export type GetUserCurrentPermissionsDocumentData = { - id?: Array<(string)>; -}; - -export type GetUserCurrentPermissionsDocumentResponse = (Array<(UserPermissionsResponseModel)>); - -export type GetUserCurrentPermissionsMediaData = { - id?: Array<(string)>; -}; - -export type GetUserCurrentPermissionsMediaResponse = ((UserPermissionsResponseModel)); - -export type PostUserDisableData = { - requestBody?: (DisableUserRequestModel); -}; - -export type PostUserDisableResponse = (string); - -export type PostUserEnableData = { - requestBody?: (EnableUserRequestModel); -}; - -export type PostUserEnableResponse = (string); - -export type PostUserInviteData = { - requestBody?: (InviteUserRequestModel); -}; - -export type PostUserInviteResponse = (string); - -export type PostUserInviteCreatePasswordData = { - requestBody?: (CreateInitialPasswordUserRequestModel); -}; - -export type PostUserInviteCreatePasswordResponse = (string); - -export type PostUserInviteResendData = { - requestBody?: (ResendInviteUserRequestModel); -}; - -export type PostUserInviteResendResponse = (string); - -export type PostUserInviteVerifyData = { - requestBody?: (VerifyInviteUserRequestModel); -}; - -export type PostUserInviteVerifyResponse = ((VerifyInviteUserResponseModel)); - -export type PostUserSetUserGroupsData = { - requestBody?: (UpdateUserGroupsOnUserRequestModel); -}; - -export type PostUserSetUserGroupsResponse = (string); - -export type PostUserUnlockData = { - requestBody?: (UnlockUsersRequestModel); -}; - -export type PostUserUnlockResponse = (string); - -export type PostUserDataData = { - requestBody?: (CreateUserDataRequestModel); -}; - -export type PostUserDataResponse = (string); - -export type GetUserDataData = { - groups?: Array<(string)>; - identifiers?: Array<(string)>; - skip?: number; - take?: number; -}; - -export type GetUserDataResponse = ((PagedUserDataResponseModel)); - -export type PutUserDataData = { - requestBody?: (UpdateUserDataRequestModel); -}; - -export type PutUserDataResponse = (string); - -export type GetUserDataByIdData = { - id: string; -}; - -export type GetUserDataByIdResponse = ((UserDataModel)); - -export type GetFilterUserGroupData = { - filter?: string; - skip?: number; - take?: number; -}; - -export type GetFilterUserGroupResponse = ((PagedUserGroupResponseModel)); - -export type GetItemUserGroupData = { - id?: Array<(string)>; -}; - -export type GetItemUserGroupResponse = (Array<(UserGroupItemResponseModel)>); - -export type DeleteUserGroupData = { - requestBody?: (DeleteUserGroupsRequestModel); -}; - -export type DeleteUserGroupResponse = (string); - -export type PostUserGroupData = { - requestBody?: (CreateUserGroupRequestModel); -}; - -export type PostUserGroupResponse = (string); - -export type GetUserGroupData = { - skip?: number; - take?: number; -}; - -export type GetUserGroupResponse = ((PagedUserGroupResponseModel)); - -export type GetUserGroupByIdData = { - id: string; -}; - -export type GetUserGroupByIdResponse = ((UserGroupResponseModel)); - -export type DeleteUserGroupByIdData = { - id: string; -}; - -export type DeleteUserGroupByIdResponse = (string); - -export type PutUserGroupByIdData = { - id: string; - requestBody?: (UpdateUserGroupRequestModel); -}; - -export type PutUserGroupByIdResponse = (string); - -export type DeleteUserGroupByIdUsersData = { - id: string; - requestBody?: Array<(ReferenceByIdModel)>; -}; - -export type DeleteUserGroupByIdUsersResponse = (string); - -export type PostUserGroupByIdUsersData = { - id: string; - requestBody?: Array<(ReferenceByIdModel)>; -}; - -export type PostUserGroupByIdUsersResponse = (string); - -export type GetItemWebhookData = { - id?: Array<(string)>; -}; - -export type GetItemWebhookResponse = (Array<(WebhookItemResponseModel)>); - -export type GetWebhookData = { - skip?: number; - take?: number; -}; - -export type GetWebhookResponse = ((PagedWebhookResponseModel)); - -export type PostWebhookData = { - requestBody?: (CreateWebhookRequestModel); -}; - -export type PostWebhookResponse = (string); - -export type GetWebhookByIdData = { - id: string; -}; - -export type GetWebhookByIdResponse = ((WebhookResponseModel)); - -export type DeleteWebhookByIdData = { - id: string; -}; - -export type DeleteWebhookByIdResponse = (string); - -export type PutWebhookByIdData = { - id: string; - requestBody?: (UpdateWebhookRequestModel); -}; - -export type PutWebhookByIdResponse = (string); - -export type GetWebhookByIdLogsData = { - id: string; - skip?: number; - take?: number; -}; - -export type GetWebhookByIdLogsResponse = ((PagedWebhookLogResponseModel)); - -export type GetWebhookEventsData = { - skip?: number; - take?: number; -}; - -export type GetWebhookEventsResponse = ((PagedWebhookEventModel)); - -export type GetWebhookLogsData = { - skip?: number; - take?: number; -}; - -export type GetWebhookLogsResponse = ((PagedWebhookLogResponseModel)); \ No newline at end of file diff --git a/src/Umbraco.Web.UI.Client/src/libs/extension-api/controller/server-extension-registrator.controller.ts b/src/Umbraco.Web.UI.Client/src/libs/extension-api/controller/server-extension-registrator.controller.ts index b0f77cffe7..0f5af1c0b1 100644 --- a/src/Umbraco.Web.UI.Client/src/libs/extension-api/controller/server-extension-registrator.controller.ts +++ b/src/Umbraco.Web.UI.Client/src/libs/extension-api/controller/server-extension-registrator.controller.ts @@ -1,15 +1,15 @@ import type { ManifestBase } from '../types/index.js'; import { isManifestBaseType } from '../type-guards/index.js'; -import { OpenAPI, ManifestService, type ManifestResponseModel } from '@umbraco-cms/backoffice/external/backend-api'; +import { ManifestService, type ManifestResponseModel } from '@umbraco-cms/backoffice/external/backend-api'; import { UmbControllerBase } from '@umbraco-cms/backoffice/class-api'; import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api'; import type { UmbBackofficeExtensionRegistry } from '@umbraco-cms/backoffice/extension-registry'; import { tryExecute } from '@umbraco-cms/backoffice/resources'; +import { UMB_SERVER_CONTEXT } from '@umbraco-cms/backoffice/server'; // TODO: consider if this can be replaced by the new extension controllers export class UmbServerExtensionRegistrator extends UmbControllerBase { #extensionRegistry: UmbBackofficeExtensionRegistry; - #apiBaseUrl = OpenAPI.BASE; constructor(host: UmbControllerHost, extensionRegistry: UmbBackofficeExtensionRegistry) { super(host, UmbServerExtensionRegistrator.name); @@ -55,6 +55,14 @@ export class UmbServerExtensionRegistrator extends UmbControllerBase { async #loadServerPackages(packages: ManifestResponseModel[]) { const extensions: ManifestBase[] = []; + const serverContext = await this.getContext(UMB_SERVER_CONTEXT); + + if (!serverContext) { + throw new Error('Server context is not available'); + } + + const apiBaseUrl = serverContext?.getServerUrl(); + packages.forEach((p) => { p.extensions?.forEach((e) => { // Crudely validate that the extension at least follows a basic manifest structure @@ -68,17 +76,17 @@ export class UmbServerExtensionRegistrator extends UmbControllerBase { // TODO: add helper to check for relative paths // Add base url if the js path is relative if ('js' in e && typeof e.js === 'string' && !e.js.startsWith('http')) { - e.js = `${this.#apiBaseUrl}${e.js}`; + e.js = `${apiBaseUrl}${e.js}`; } // Add base url if the element path is relative if ('element' in e && typeof e.element === 'string' && !e.element.startsWith('http')) { - e.element = `${this.#apiBaseUrl}${e.element}`; + e.element = `${apiBaseUrl}${e.element}`; } // Add base url if the element path api relative if ('api' in e && typeof e.api === 'string' && !e.api.startsWith('http')) { - e.api = `${this.#apiBaseUrl}${e.api}`; + e.api = `${apiBaseUrl}${e.api}`; } extensions.push(e); diff --git a/src/Umbraco.Web.UI.Client/src/mocks/data/examine.data.ts b/src/Umbraco.Web.UI.Client/src/mocks/data/examine.data.ts index d639085407..4c04edc1ea 100644 --- a/src/Umbraco.Web.UI.Client/src/mocks/data/examine.data.ts +++ b/src/Umbraco.Web.UI.Client/src/mocks/data/examine.data.ts @@ -1,7 +1,7 @@ import type { IndexResponseModel, PagedIndexResponseModel, - SearchResultResponseModel, + SearchResultResponseModelReadable, } from '@umbraco-cms/backoffice/external/backend-api'; import { HealthStatusModel } from '@umbraco-cms/backoffice/external/backend-api'; @@ -19,7 +19,7 @@ export function getIndexByName(indexName: string) { /** * */ -export function getSearchResultsMockData(): SearchResultResponseModel[] { +export function getSearchResultsMockData(): SearchResultResponseModelReadable[] { return searchResultMockData; } @@ -91,7 +91,7 @@ export const PagedIndexers: PagedIndexResponseModel = { total: 0, }; -export const searchResultMockData: SearchResultResponseModel[] = [ +export const searchResultMockData: SearchResultResponseModelReadable[] = [ { id: '1', score: 1, diff --git a/src/Umbraco.Web.UI.Client/src/mocks/data/relation/relation.data.ts b/src/Umbraco.Web.UI.Client/src/mocks/data/relation/relation.data.ts index 11a9228118..be5d35b460 100644 --- a/src/Umbraco.Web.UI.Client/src/mocks/data/relation/relation.data.ts +++ b/src/Umbraco.Web.UI.Client/src/mocks/data/relation/relation.data.ts @@ -1,6 +1,9 @@ -import type { RelationResponseModel, RelationReferenceModel } from '@umbraco-cms/backoffice/external/backend-api'; +import type { + RelationResponseModelReadable, + RelationReferenceModel, +} from '@umbraco-cms/backoffice/external/backend-api'; -export type UmbMockRelationModel = RelationResponseModel; +export type UmbMockRelationModel = RelationResponseModelReadable; export type UmbMockRelationReferenceModel = RelationReferenceModel; export const data: Array = [ diff --git a/src/Umbraco.Web.UI.Client/src/mocks/data/relation/relation.db.ts b/src/Umbraco.Web.UI.Client/src/mocks/data/relation/relation.db.ts index 122b1506cb..d885a524af 100644 --- a/src/Umbraco.Web.UI.Client/src/mocks/data/relation/relation.db.ts +++ b/src/Umbraco.Web.UI.Client/src/mocks/data/relation/relation.db.ts @@ -2,7 +2,7 @@ import { UmbMockEntityDetailManager } from '../utils/entity/entity-detail.manage import { UmbEntityMockDbBase } from '../utils/entity/entity-base.js'; import type { UmbMockRelationModel } from './relation.data.js'; import { data } from './relation.data.js'; -import type { RelationResponseModel } from '@umbraco-cms/backoffice/external/backend-api'; +import type { RelationResponseModelReadable } from '@umbraco-cms/backoffice/external/backend-api'; class UmbRelationMockDB extends UmbEntityMockDbBase { item = new UmbMockEntityDetailManager(this, itemResponseMapper, createDetailMockMapper); @@ -16,7 +16,7 @@ const createDetailMockMapper = (): UmbMockRelationModel => { throw new Error('Not possible to create a relation'); }; -const itemResponseMapper = (item: UmbMockRelationModel): RelationResponseModel => { +const itemResponseMapper = (item: UmbMockRelationModel): RelationResponseModelReadable => { return { id: item.id, child: item.child, diff --git a/src/Umbraco.Web.UI.Client/src/mocks/handlers/examine-management.handlers.ts b/src/Umbraco.Web.UI.Client/src/mocks/handlers/examine-management.handlers.ts index 51fca662e2..feb5d83ac5 100644 --- a/src/Umbraco.Web.UI.Client/src/mocks/handlers/examine-management.handlers.ts +++ b/src/Umbraco.Web.UI.Client/src/mocks/handlers/examine-management.handlers.ts @@ -6,7 +6,7 @@ import type { IndexResponseModel, PagedIndexResponseModel, PagedSearcherResponseModel, - PagedSearchResultResponseModel, + PagedSearchResultResponseModelReadable, } from '@umbraco-cms/backoffice/external/backend-api'; export const handlers = [ @@ -65,7 +65,7 @@ export const handlers = [ if (searcherName) { return res( ctx.status(200), - ctx.json({ + ctx.json({ total: 0, items: searchResultMockData, }), diff --git a/src/Umbraco.Web.UI.Client/src/mocks/handlers/install.handlers.ts b/src/Umbraco.Web.UI.Client/src/mocks/handlers/install.handlers.ts index 20ee663300..01b96ab3aa 100644 --- a/src/Umbraco.Web.UI.Client/src/mocks/handlers/install.handlers.ts +++ b/src/Umbraco.Web.UI.Client/src/mocks/handlers/install.handlers.ts @@ -1,9 +1,9 @@ const { rest } = window.MockServiceWorker; import type { DatabaseInstallRequestModel, + InstallRequestModelReadable, InstallSettingsResponseModel, ProblemDetails, - InstallRequestModel, } from '@umbraco-cms/backoffice/external/backend-api'; import { TelemetryLevelModel } from '@umbraco-cms/backoffice/external/backend-api'; import { umbracoPath } from '@umbraco-cms/backoffice/utils'; @@ -99,7 +99,7 @@ export const handlers = [ }), rest.post(umbracoPath('/install/setup'), async (req, res, ctx) => { - const body = await req.json(); + const body = await req.json(); if (body.database?.name === 'fail') { return res( diff --git a/src/Umbraco.Web.UI.Client/src/mocks/handlers/package.handlers.ts b/src/Umbraco.Web.UI.Client/src/mocks/handlers/package.handlers.ts index f251ad05b8..a58cb2b86a 100644 --- a/src/Umbraco.Web.UI.Client/src/mocks/handlers/package.handlers.ts +++ b/src/Umbraco.Web.UI.Client/src/mocks/handlers/package.handlers.ts @@ -3,11 +3,11 @@ import { UmbId } from '@umbraco-cms/backoffice/id'; import { umbracoPath } from '@umbraco-cms/backoffice/utils'; import type { - PackageDefinitionResponseModel, - PagedPackageDefinitionResponseModel, PagedPackageMigrationStatusResponseModel, CreatePackageRequestModel, GetPackageConfigurationResponse, + PagedPackageDefinitionResponseModelReadable, + PackageDefinitionResponseModelReadable, } from '@umbraco-cms/backoffice/external/backend-api'; export const handlers = [ @@ -55,7 +55,7 @@ export const handlers = [ // read all return res( ctx.status(200), - ctx.json({ + ctx.json({ total: packageArray.length, items: packageArray, }), @@ -65,9 +65,9 @@ export const handlers = [ rest.post(umbracoPath('/package/created'), async (_req, res, ctx) => { //save const data: CreatePackageRequestModel = await _req.json(); - const newPackage: PackageDefinitionResponseModel = { ...data, id: UmbId.new(), packagePath: '' }; + const newPackage: PackageDefinitionResponseModelReadable = { ...data, id: UmbId.new(), packagePath: '' }; packageArray.push(newPackage); - return res(ctx.status(200), ctx.json(newPackage)); + return res(ctx.status(200), ctx.json(newPackage)); }), rest.get(umbracoPath('/package/created/:id'), (_req, res, ctx) => { @@ -76,12 +76,12 @@ export const handlers = [ if (!id) return res(ctx.status(404)); const found = packageArray.find((p) => p.id == id); if (!found) return res(ctx.status(404)); - return res(ctx.status(200), ctx.json(found)); + return res(ctx.status(200), ctx.json(found)); }), rest.put(umbracoPath('/package/created/:id'), async (_req, res, ctx) => { //update - const data: PackageDefinitionResponseModel = await _req.json(); + const data: PackageDefinitionResponseModelReadable = await _req.json(); if (!data.id) return; const index = packageArray.findIndex((x) => x.id === data.id); packageArray[index] = data; @@ -104,7 +104,7 @@ export const handlers = [ }), ]; -const packageArray: PackageDefinitionResponseModel[] = [ +const packageArray: PackageDefinitionResponseModelReadable[] = [ { id: '2a0181ec-244b-4068-a1d7-2f95ed7e6da6', packagePath: '', diff --git a/src/Umbraco.Web.UI.Client/src/mocks/handlers/temporary-file/temporary-file.handlers.ts b/src/Umbraco.Web.UI.Client/src/mocks/handlers/temporary-file/temporary-file.handlers.ts index ee72270fee..f84422ecd3 100644 --- a/src/Umbraco.Web.UI.Client/src/mocks/handlers/temporary-file/temporary-file.handlers.ts +++ b/src/Umbraco.Web.UI.Client/src/mocks/handlers/temporary-file/temporary-file.handlers.ts @@ -1,9 +1,6 @@ const { rest } = window.MockServiceWorker; import { umbracoPath } from '@umbraco-cms/backoffice/utils'; -import type { - GetTemporaryFileConfigurationResponse, - PostTemporaryFileResponse, -} from '@umbraco-cms/backoffice/external/backend-api'; +import type { GetTemporaryFileConfigurationResponse } from '@umbraco-cms/backoffice/external/backend-api'; import { UmbId } from '@umbraco-cms/backoffice/id'; const UMB_SLUG = 'temporary-file'; @@ -11,12 +8,7 @@ const UMB_SLUG = 'temporary-file'; export const handlers = [ rest.post(umbracoPath(`/${UMB_SLUG}`), async (_req, res, ctx) => { const guid = UmbId.new(); - return res( - ctx.delay(), - ctx.status(201), - ctx.set('Umb-Generated-Resource', guid), - ctx.text(guid), - ); + return res(ctx.delay(), ctx.status(201), ctx.set('Umb-Generated-Resource', guid)); }), rest.get(umbracoPath(`/${UMB_SLUG}/configuration`), async (_req, res, ctx) => { diff --git a/src/Umbraco.Web.UI.Client/src/mocks/handlers/upgrade.handlers.ts b/src/Umbraco.Web.UI.Client/src/mocks/handlers/upgrade.handlers.ts index a7050fe08c..61031c5ae7 100644 --- a/src/Umbraco.Web.UI.Client/src/mocks/handlers/upgrade.handlers.ts +++ b/src/Umbraco.Web.UI.Client/src/mocks/handlers/upgrade.handlers.ts @@ -1,19 +1,19 @@ const { rest } = window.MockServiceWorker; import { umbracoPath } from '@umbraco-cms/backoffice/utils'; -import type { UpgradeSettingsResponseModel } from '@umbraco-cms/backoffice/external/backend-api'; +import type { UpgradeSettingsResponseModelReadable } from '@umbraco-cms/backoffice/external/backend-api'; export const handlers = [ rest.get(umbracoPath('/upgrade/settings'), (_req, res, ctx) => { return res( // Respond with a 200 status code ctx.status(200), - ctx.json({ + ctx.json({ currentState: '2b20c6e7', newState: '2b20c6e8', oldVersion: '13.0.0', - newVersion: '13.1.0', - reportUrl: 'https://our.umbraco.com/download/releases/1000', + newVersion: '17.0.0', + reportUrl: 'https://our.umbraco.com/download/releases/1700', }), ); }), diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/auth/auth.context.ts b/src/Umbraco.Web.UI.Client/src/packages/core/auth/auth.context.ts index 470f1f776c..e8697f6567 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/auth/auth.context.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/auth/auth.context.ts @@ -3,12 +3,12 @@ import { UMB_AUTH_CONTEXT } from './auth.context.token.js'; import type { UmbOpenApiConfiguration } from './models/openApiConfiguration.js'; import type { ManifestAuthProvider } from './auth-provider.extension.js'; import { UMB_STORAGE_TOKEN_RESPONSE_NAME } from './constants.js'; -import { OpenAPI } from '@umbraco-cms/backoffice/external/backend-api'; import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api'; import { UmbContextBase } from '@umbraco-cms/backoffice/class-api'; import { UmbBooleanState } from '@umbraco-cms/backoffice/observable-api'; import { ReplaySubject, Subject, firstValueFrom, switchMap } from '@umbraco-cms/backoffice/external/rxjs'; import type { UmbBackofficeExtensionRegistry } from '@umbraco-cms/backoffice/extension-registry'; +import { umbHttpClient } from '@umbraco-cms/backoffice/http-client'; export class UmbAuthContext extends UmbContextBase { #isAuthorized = new UmbBooleanState(false); @@ -240,20 +240,17 @@ export class UmbAuthContext extends UmbContextBase { * const defaultOpenApi = authContext.getOpenApiConfiguration(); * client.setConfig({ * base: defaultOpenApi.base, - * credentials: defaultOpenApi.credentials, * auth: defaultOpenApi.token, * }); * ``` * @returns {UmbOpenApiConfiguration} The default OpenAPI configuration */ getOpenApiConfiguration(): UmbOpenApiConfiguration { + const config = umbHttpClient.getConfig(); return { - base: OpenAPI.BASE, - version: OpenAPI.VERSION, - withCredentials: OpenAPI.WITH_CREDENTIALS, - credentials: OpenAPI.CREDENTIALS, - token: () => this.getLatestToken(), - encodePath: OpenAPI.ENCODE_PATH, + base: config.baseUrl, + credentials: config.credentials, + token: this.getLatestToken, }; } diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/auth/models/openApiConfiguration.ts b/src/Umbraco.Web.UI.Client/src/packages/core/auth/models/openApiConfiguration.ts index 761b936260..75178807b6 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/auth/models/openApiConfiguration.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/auth/models/openApiConfiguration.ts @@ -7,32 +7,16 @@ export interface UmbOpenApiConfiguration { /** * The base URL of the OpenAPI (Umbraco) server. */ - readonly base: string; - - /** - * The configured version of the Management API to use. - */ - readonly version: string; - - /** - * The `withCredentials` option for the Fetch API. - */ - readonly withCredentials: boolean; + readonly base?: string; /** * The `credentials` option for the Fetch API. */ - readonly credentials: 'include' | 'omit' | 'same-origin'; + readonly credentials?: 'include' | 'omit' | 'same-origin'; /** * The token to use for the Authorization header. * @returns A resolver for the token to use for the Authorization header. */ - readonly token: () => Promise; - - /** - * The encoder to use for the request URLs. - * @returns A resolver for the encoder to use for the request URLs. - */ - readonly encodePath?: (value: string) => string; + readonly token: () => Promise; } diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/backend-api/client.gen.ts b/src/Umbraco.Web.UI.Client/src/packages/core/backend-api/client.gen.ts new file mode 100644 index 0000000000..fd97b4b69e --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/packages/core/backend-api/client.gen.ts @@ -0,0 +1,18 @@ +// This file is auto-generated by @hey-api/openapi-ts + +import type { ClientOptions } from './types.gen'; +import { type Config, type ClientOptions as DefaultClientOptions, createClient, createConfig } from '@hey-api/client-fetch'; + +/** + * The `createClientConfig()` function will be called on client initialization + * and the returned object will become the client's initial configuration. + * + * You may want to initialize your client this way instead of calling + * `setConfig()`. This is useful for example if you're using Next.js + * to ensure your client always has the correct values. + */ +export type CreateClientConfig = (override?: Config) => Config & T>; + +export const client = createClient(createConfig({ + throwOnError: true +})); \ No newline at end of file diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/backend-api/index.ts b/src/Umbraco.Web.UI.Client/src/packages/core/backend-api/index.ts new file mode 100644 index 0000000000..31a9f07eb7 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/packages/core/backend-api/index.ts @@ -0,0 +1,4 @@ +// This file is auto-generated by @hey-api/openapi-ts +export * from './types.gen'; +export * from './client.gen'; +export * from './sdk.gen'; \ No newline at end of file diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/backend-api/sdk.gen.ts b/src/Umbraco.Web.UI.Client/src/packages/core/backend-api/sdk.gen.ts new file mode 100644 index 0000000000..7938c6e056 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/packages/core/backend-api/sdk.gen.ts @@ -0,0 +1,5852 @@ +// This file is auto-generated by @hey-api/openapi-ts + +import { type Options as ClientOptions, type TDataShape, type Client, formDataBodySerializer } from '@hey-api/client-fetch'; +import type { GetCultureData, GetCultureResponse, PostDataTypeData, PostDataTypeError, DeleteDataTypeByIdData, DeleteDataTypeByIdError, GetDataTypeByIdData, GetDataTypeByIdResponse, GetDataTypeByIdError, PutDataTypeByIdData, PutDataTypeByIdError, PostDataTypeByIdCopyData, PostDataTypeByIdCopyError, GetDataTypeByIdIsUsedData, GetDataTypeByIdIsUsedResponse, GetDataTypeByIdIsUsedError, PutDataTypeByIdMoveData, PutDataTypeByIdMoveError, GetDataTypeByIdReferencedByData, GetDataTypeByIdReferencedByResponse, GetDataTypeByIdReferencesData, GetDataTypeByIdReferencesResponse, GetDataTypeByIdReferencesError, GetDataTypeConfigurationData, GetDataTypeConfigurationResponse, PostDataTypeFolderData, PostDataTypeFolderError, DeleteDataTypeFolderByIdData, DeleteDataTypeFolderByIdError, GetDataTypeFolderByIdData, GetDataTypeFolderByIdResponse, GetDataTypeFolderByIdError, PutDataTypeFolderByIdData, PutDataTypeFolderByIdError, GetFilterDataTypeData, GetFilterDataTypeResponse, GetItemDataTypeData, GetItemDataTypeResponse, GetItemDataTypeSearchData, GetItemDataTypeSearchResponse, GetTreeDataTypeAncestorsData, GetTreeDataTypeAncestorsResponse, GetTreeDataTypeChildrenData, GetTreeDataTypeChildrenResponse, GetTreeDataTypeRootData, GetTreeDataTypeRootResponse, GetDictionaryData, GetDictionaryResponse, PostDictionaryData, PostDictionaryError, DeleteDictionaryByIdData, DeleteDictionaryByIdError, GetDictionaryByIdData, GetDictionaryByIdResponse, GetDictionaryByIdError, PutDictionaryByIdData, PutDictionaryByIdError, GetDictionaryByIdExportData, GetDictionaryByIdExportResponse, GetDictionaryByIdExportError, PutDictionaryByIdMoveData, PutDictionaryByIdMoveError, PostDictionaryImportData, PostDictionaryImportError, GetItemDictionaryData, GetItemDictionaryResponse, GetTreeDictionaryAncestorsData, GetTreeDictionaryAncestorsResponse, GetTreeDictionaryChildrenData, GetTreeDictionaryChildrenResponse, GetTreeDictionaryRootData, GetTreeDictionaryRootResponse, PostDocumentBlueprintData, PostDocumentBlueprintError, DeleteDocumentBlueprintByIdData, DeleteDocumentBlueprintByIdError, GetDocumentBlueprintByIdData, GetDocumentBlueprintByIdResponse, GetDocumentBlueprintByIdError, PutDocumentBlueprintByIdData, PutDocumentBlueprintByIdError, PutDocumentBlueprintByIdMoveData, PutDocumentBlueprintByIdMoveError, PostDocumentBlueprintFolderData, PostDocumentBlueprintFolderError, DeleteDocumentBlueprintFolderByIdData, DeleteDocumentBlueprintFolderByIdError, GetDocumentBlueprintFolderByIdData, GetDocumentBlueprintFolderByIdResponse, GetDocumentBlueprintFolderByIdError, PutDocumentBlueprintFolderByIdData, PutDocumentBlueprintFolderByIdError, PostDocumentBlueprintFromDocumentData, PostDocumentBlueprintFromDocumentError, GetItemDocumentBlueprintData, GetItemDocumentBlueprintResponse, GetTreeDocumentBlueprintAncestorsData, GetTreeDocumentBlueprintAncestorsResponse, GetTreeDocumentBlueprintChildrenData, GetTreeDocumentBlueprintChildrenResponse, GetTreeDocumentBlueprintRootData, GetTreeDocumentBlueprintRootResponse, PostDocumentTypeData, PostDocumentTypeError, DeleteDocumentTypeByIdData, DeleteDocumentTypeByIdError, GetDocumentTypeByIdData, GetDocumentTypeByIdResponse, GetDocumentTypeByIdError, PutDocumentTypeByIdData, PutDocumentTypeByIdError, GetDocumentTypeByIdAllowedChildrenData, GetDocumentTypeByIdAllowedChildrenResponse, GetDocumentTypeByIdAllowedChildrenError, GetDocumentTypeByIdBlueprintData, GetDocumentTypeByIdBlueprintResponse, GetDocumentTypeByIdBlueprintError, GetDocumentTypeByIdCompositionReferencesData, GetDocumentTypeByIdCompositionReferencesResponse, GetDocumentTypeByIdCompositionReferencesError, PostDocumentTypeByIdCopyData, PostDocumentTypeByIdCopyError, GetDocumentTypeByIdExportData, GetDocumentTypeByIdExportResponse, GetDocumentTypeByIdExportError, PutDocumentTypeByIdImportData, PutDocumentTypeByIdImportError, PutDocumentTypeByIdMoveData, PutDocumentTypeByIdMoveError, GetDocumentTypeAllowedAtRootData, GetDocumentTypeAllowedAtRootResponse, PostDocumentTypeAvailableCompositionsData, PostDocumentTypeAvailableCompositionsResponse, GetDocumentTypeConfigurationData, GetDocumentTypeConfigurationResponse, PostDocumentTypeFolderData, PostDocumentTypeFolderError, DeleteDocumentTypeFolderByIdData, DeleteDocumentTypeFolderByIdError, GetDocumentTypeFolderByIdData, GetDocumentTypeFolderByIdResponse, GetDocumentTypeFolderByIdError, PutDocumentTypeFolderByIdData, PutDocumentTypeFolderByIdError, PostDocumentTypeImportData, PostDocumentTypeImportError, GetItemDocumentTypeData, GetItemDocumentTypeResponse, GetItemDocumentTypeSearchData, GetItemDocumentTypeSearchResponse, GetTreeDocumentTypeAncestorsData, GetTreeDocumentTypeAncestorsResponse, GetTreeDocumentTypeChildrenData, GetTreeDocumentTypeChildrenResponse, GetTreeDocumentTypeRootData, GetTreeDocumentTypeRootResponse, GetDocumentVersionData, GetDocumentVersionResponse, GetDocumentVersionError, GetDocumentVersionByIdData, GetDocumentVersionByIdResponse, GetDocumentVersionByIdError, PutDocumentVersionByIdPreventCleanupData, PutDocumentVersionByIdPreventCleanupError, PostDocumentVersionByIdRollbackData, PostDocumentVersionByIdRollbackError, GetCollectionDocumentByIdData, GetCollectionDocumentByIdResponse, GetCollectionDocumentByIdError, PostDocumentData, PostDocumentError, DeleteDocumentByIdData, DeleteDocumentByIdError, GetDocumentByIdData, GetDocumentByIdResponse, GetDocumentByIdError, PutDocumentByIdData, PutDocumentByIdError, GetDocumentByIdAuditLogData, GetDocumentByIdAuditLogResponse, PostDocumentByIdCopyData, PostDocumentByIdCopyError, GetDocumentByIdDomainsData, GetDocumentByIdDomainsResponse, GetDocumentByIdDomainsError, PutDocumentByIdDomainsData, PutDocumentByIdDomainsError, PutDocumentByIdMoveData, PutDocumentByIdMoveError, PutDocumentByIdMoveToRecycleBinData, PutDocumentByIdMoveToRecycleBinError, GetDocumentByIdNotificationsData, GetDocumentByIdNotificationsResponse, GetDocumentByIdNotificationsError, PutDocumentByIdNotificationsData, PutDocumentByIdNotificationsError, DeleteDocumentByIdPublicAccessData, DeleteDocumentByIdPublicAccessError, GetDocumentByIdPublicAccessData, GetDocumentByIdPublicAccessResponse, GetDocumentByIdPublicAccessError, PostDocumentByIdPublicAccessData, PostDocumentByIdPublicAccessError, PutDocumentByIdPublicAccessData, PutDocumentByIdPublicAccessError, PutDocumentByIdPublishData, PutDocumentByIdPublishError, PutDocumentByIdPublishWithDescendantsData, PutDocumentByIdPublishWithDescendantsResponse, PutDocumentByIdPublishWithDescendantsError, GetDocumentByIdPublishWithDescendantsResultByTaskIdData, GetDocumentByIdPublishWithDescendantsResultByTaskIdResponse, GetDocumentByIdPublishWithDescendantsResultByTaskIdError, GetDocumentByIdPublishedData, GetDocumentByIdPublishedResponse, GetDocumentByIdPublishedError, GetDocumentByIdReferencedByData, GetDocumentByIdReferencedByResponse, GetDocumentByIdReferencedDescendantsData, GetDocumentByIdReferencedDescendantsResponse, PutDocumentByIdUnpublishData, PutDocumentByIdUnpublishError, PutUmbracoManagementApiV11DocumentByIdValidate11Data, PutUmbracoManagementApiV11DocumentByIdValidate11Error, GetDocumentAreReferencedData, GetDocumentAreReferencedResponse, GetDocumentConfigurationData, GetDocumentConfigurationResponse, PutDocumentSortData, PutDocumentSortError, GetDocumentUrlsData, GetDocumentUrlsResponse, PostDocumentValidateData, PostDocumentValidateError, GetItemDocumentData, GetItemDocumentResponse, GetItemDocumentSearchData, GetItemDocumentSearchResponse, DeleteRecycleBinDocumentData, DeleteRecycleBinDocumentError, DeleteRecycleBinDocumentByIdData, DeleteRecycleBinDocumentByIdError, GetRecycleBinDocumentByIdOriginalParentData, GetRecycleBinDocumentByIdOriginalParentResponse, GetRecycleBinDocumentByIdOriginalParentError, PutRecycleBinDocumentByIdRestoreData, PutRecycleBinDocumentByIdRestoreError, GetRecycleBinDocumentChildrenData, GetRecycleBinDocumentChildrenResponse, GetRecycleBinDocumentReferencedByData, GetRecycleBinDocumentReferencedByResponse, GetRecycleBinDocumentRootData, GetRecycleBinDocumentRootResponse, GetTreeDocumentAncestorsData, GetTreeDocumentAncestorsResponse, GetTreeDocumentChildrenData, GetTreeDocumentChildrenResponse, GetTreeDocumentRootData, GetTreeDocumentRootResponse, PostDynamicRootQueryData, PostDynamicRootQueryResponse, GetDynamicRootStepsData, GetDynamicRootStepsResponse, GetHealthCheckGroupData, GetHealthCheckGroupResponse, GetHealthCheckGroupByNameData, GetHealthCheckGroupByNameResponse, GetHealthCheckGroupByNameError, PostHealthCheckGroupByNameCheckData, PostHealthCheckGroupByNameCheckResponse, PostHealthCheckGroupByNameCheckError, PostHealthCheckExecuteActionData, PostHealthCheckExecuteActionResponse, PostHealthCheckExecuteActionError, GetHelpData, GetHelpResponse, GetHelpError, GetImagingResizeUrlsData, GetImagingResizeUrlsResponse, GetImportAnalyzeData, GetImportAnalyzeResponse, GetImportAnalyzeError, GetIndexerData, GetIndexerResponse, GetIndexerByIndexNameData, GetIndexerByIndexNameResponse, GetIndexerByIndexNameError, PostIndexerByIndexNameRebuildData, PostIndexerByIndexNameRebuildError, GetInstallSettingsData, GetInstallSettingsResponse, GetInstallSettingsError, PostInstallSetupData, PostInstallSetupError, PostInstallValidateDatabaseData, PostInstallValidateDatabaseError, GetItemLanguageData, GetItemLanguageResponse, GetItemLanguageDefaultData, GetItemLanguageDefaultResponse, GetLanguageData, GetLanguageResponse, PostLanguageData, PostLanguageError, DeleteLanguageByIsoCodeData, DeleteLanguageByIsoCodeError, GetLanguageByIsoCodeData, GetLanguageByIsoCodeResponse, GetLanguageByIsoCodeError, PutLanguageByIsoCodeData, PutLanguageByIsoCodeError, GetLogViewerLevelData, GetLogViewerLevelResponse, GetLogViewerLevelCountData, GetLogViewerLevelCountResponse, GetLogViewerLevelCountError, GetLogViewerLogData, GetLogViewerLogResponse, GetLogViewerMessageTemplateData, GetLogViewerMessageTemplateResponse, GetLogViewerMessageTemplateError, GetLogViewerSavedSearchData, GetLogViewerSavedSearchResponse, PostLogViewerSavedSearchData, PostLogViewerSavedSearchError, DeleteLogViewerSavedSearchByNameData, DeleteLogViewerSavedSearchByNameError, GetLogViewerSavedSearchByNameData, GetLogViewerSavedSearchByNameResponse, GetLogViewerSavedSearchByNameError, GetLogViewerValidateLogsSizeData, GetLogViewerValidateLogsSizeError, GetManifestManifestData, GetManifestManifestResponse, GetManifestManifestPrivateData, GetManifestManifestPrivateResponse, GetManifestManifestPublicData, GetManifestManifestPublicResponse, GetItemMediaTypeData, GetItemMediaTypeResponse, GetItemMediaTypeAllowedData, GetItemMediaTypeAllowedResponse, GetItemMediaTypeFoldersData, GetItemMediaTypeFoldersResponse, GetItemMediaTypeSearchData, GetItemMediaTypeSearchResponse, PostMediaTypeData, PostMediaTypeError, DeleteMediaTypeByIdData, DeleteMediaTypeByIdError, GetMediaTypeByIdData, GetMediaTypeByIdResponse, GetMediaTypeByIdError, PutMediaTypeByIdData, PutMediaTypeByIdError, GetMediaTypeByIdAllowedChildrenData, GetMediaTypeByIdAllowedChildrenResponse, GetMediaTypeByIdAllowedChildrenError, GetMediaTypeByIdCompositionReferencesData, GetMediaTypeByIdCompositionReferencesResponse, GetMediaTypeByIdCompositionReferencesError, PostMediaTypeByIdCopyData, PostMediaTypeByIdCopyError, GetMediaTypeByIdExportData, GetMediaTypeByIdExportResponse, GetMediaTypeByIdExportError, PutMediaTypeByIdImportData, PutMediaTypeByIdImportError, PutMediaTypeByIdMoveData, PutMediaTypeByIdMoveError, GetMediaTypeAllowedAtRootData, GetMediaTypeAllowedAtRootResponse, PostMediaTypeAvailableCompositionsData, PostMediaTypeAvailableCompositionsResponse, GetMediaTypeConfigurationData, GetMediaTypeConfigurationResponse, PostMediaTypeFolderData, PostMediaTypeFolderError, DeleteMediaTypeFolderByIdData, DeleteMediaTypeFolderByIdError, GetMediaTypeFolderByIdData, GetMediaTypeFolderByIdResponse, GetMediaTypeFolderByIdError, PutMediaTypeFolderByIdData, PutMediaTypeFolderByIdError, PostMediaTypeImportData, PostMediaTypeImportError, GetTreeMediaTypeAncestorsData, GetTreeMediaTypeAncestorsResponse, GetTreeMediaTypeChildrenData, GetTreeMediaTypeChildrenResponse, GetTreeMediaTypeRootData, GetTreeMediaTypeRootResponse, GetCollectionMediaData, GetCollectionMediaResponse, GetCollectionMediaError, GetItemMediaData, GetItemMediaResponse, GetItemMediaSearchData, GetItemMediaSearchResponse, PostMediaData, PostMediaError, DeleteMediaByIdData, DeleteMediaByIdError, GetMediaByIdData, GetMediaByIdResponse, GetMediaByIdError, PutMediaByIdData, PutMediaByIdError, GetMediaByIdAuditLogData, GetMediaByIdAuditLogResponse, PutMediaByIdMoveData, PutMediaByIdMoveError, PutMediaByIdMoveToRecycleBinData, PutMediaByIdMoveToRecycleBinError, GetMediaByIdReferencedByData, GetMediaByIdReferencedByResponse, GetMediaByIdReferencedDescendantsData, GetMediaByIdReferencedDescendantsResponse, PutMediaByIdValidateData, PutMediaByIdValidateError, GetMediaAreReferencedData, GetMediaAreReferencedResponse, GetMediaConfigurationData, GetMediaConfigurationResponse, PutMediaSortData, PutMediaSortError, GetMediaUrlsData, GetMediaUrlsResponse, PostMediaValidateData, PostMediaValidateError, DeleteRecycleBinMediaData, DeleteRecycleBinMediaError, DeleteRecycleBinMediaByIdData, DeleteRecycleBinMediaByIdError, GetRecycleBinMediaByIdOriginalParentData, GetRecycleBinMediaByIdOriginalParentResponse, GetRecycleBinMediaByIdOriginalParentError, PutRecycleBinMediaByIdRestoreData, PutRecycleBinMediaByIdRestoreError, GetRecycleBinMediaChildrenData, GetRecycleBinMediaChildrenResponse, GetRecycleBinMediaReferencedByData, GetRecycleBinMediaReferencedByResponse, GetRecycleBinMediaRootData, GetRecycleBinMediaRootResponse, GetTreeMediaAncestorsData, GetTreeMediaAncestorsResponse, GetTreeMediaChildrenData, GetTreeMediaChildrenResponse, GetTreeMediaRootData, GetTreeMediaRootResponse, GetItemMemberGroupData, GetItemMemberGroupResponse, GetMemberGroupData, GetMemberGroupResponse, PostMemberGroupData, PostMemberGroupError, DeleteMemberGroupByIdData, DeleteMemberGroupByIdError, GetMemberGroupByIdData, GetMemberGroupByIdResponse, PutMemberGroupByIdData, PutMemberGroupByIdError, GetTreeMemberGroupRootData, GetTreeMemberGroupRootResponse, GetItemMemberTypeData, GetItemMemberTypeResponse, GetItemMemberTypeSearchData, GetItemMemberTypeSearchResponse, PostMemberTypeData, PostMemberTypeError, DeleteMemberTypeByIdData, DeleteMemberTypeByIdError, GetMemberTypeByIdData, GetMemberTypeByIdResponse, GetMemberTypeByIdError, PutMemberTypeByIdData, PutMemberTypeByIdError, GetMemberTypeByIdCompositionReferencesData, GetMemberTypeByIdCompositionReferencesResponse, GetMemberTypeByIdCompositionReferencesError, PostMemberTypeByIdCopyData, PostMemberTypeByIdCopyError, PostMemberTypeAvailableCompositionsData, PostMemberTypeAvailableCompositionsResponse, GetMemberTypeConfigurationData, GetMemberTypeConfigurationResponse, GetTreeMemberTypeRootData, GetTreeMemberTypeRootResponse, GetFilterMemberData, GetFilterMemberResponse, GetFilterMemberError, GetItemMemberData, GetItemMemberResponse, GetItemMemberSearchData, GetItemMemberSearchResponse, PostMemberData, PostMemberError, DeleteMemberByIdData, DeleteMemberByIdError, GetMemberByIdData, GetMemberByIdResponse, GetMemberByIdError, PutMemberByIdData, PutMemberByIdError, GetMemberByIdReferencedByData, GetMemberByIdReferencedByResponse, GetMemberByIdReferencedDescendantsData, GetMemberByIdReferencedDescendantsResponse, PutMemberByIdValidateData, PutMemberByIdValidateError, GetMemberAreReferencedData, GetMemberAreReferencedResponse, GetMemberConfigurationData, GetMemberConfigurationResponse, PostMemberValidateData, PostMemberValidateError, PostModelsBuilderBuildData, PostModelsBuilderBuildError, GetModelsBuilderDashboardData, GetModelsBuilderDashboardResponse, GetModelsBuilderStatusData, GetModelsBuilderStatusResponse, GetObjectTypesData, GetObjectTypesResponse, GetOembedQueryData, GetOembedQueryResponse, PostPackageByNameRunMigrationData, PostPackageByNameRunMigrationError, GetPackageConfigurationData, GetPackageConfigurationResponse, GetPackageCreatedData, GetPackageCreatedResponse, PostPackageCreatedData, PostPackageCreatedError, DeletePackageCreatedByIdData, DeletePackageCreatedByIdError, GetPackageCreatedByIdData, GetPackageCreatedByIdResponse, GetPackageCreatedByIdError, PutPackageCreatedByIdData, PutPackageCreatedByIdError, GetPackageCreatedByIdDownloadData, GetPackageCreatedByIdDownloadResponse, GetPackageCreatedByIdDownloadError, GetPackageMigrationStatusData, GetPackageMigrationStatusResponse, GetItemPartialViewData, GetItemPartialViewResponse, PostPartialViewData, PostPartialViewError, DeletePartialViewByPathData, DeletePartialViewByPathError, GetPartialViewByPathData, GetPartialViewByPathResponse, GetPartialViewByPathError, PutPartialViewByPathData, PutPartialViewByPathError, PutPartialViewByPathRenameData, PutPartialViewByPathRenameError, PostPartialViewFolderData, PostPartialViewFolderError, DeletePartialViewFolderByPathData, DeletePartialViewFolderByPathError, GetPartialViewFolderByPathData, GetPartialViewFolderByPathResponse, GetPartialViewFolderByPathError, GetPartialViewSnippetData, GetPartialViewSnippetResponse, GetPartialViewSnippetByIdData, GetPartialViewSnippetByIdResponse, GetPartialViewSnippetByIdError, GetTreePartialViewAncestorsData, GetTreePartialViewAncestorsResponse, GetTreePartialViewChildrenData, GetTreePartialViewChildrenResponse, GetTreePartialViewRootData, GetTreePartialViewRootResponse, DeletePreviewData, PostPreviewData, GetProfilingStatusData, GetProfilingStatusResponse, PutProfilingStatusData, GetPropertyTypeIsUsedData, GetPropertyTypeIsUsedResponse, GetPropertyTypeIsUsedError, PostPublishedCacheRebuildData, GetPublishedCacheRebuildStatusData, GetPublishedCacheRebuildStatusResponse, PostPublishedCacheReloadData, GetRedirectManagementData, GetRedirectManagementResponse, GetRedirectManagementError, DeleteRedirectManagementByIdData, GetRedirectManagementByIdData, GetRedirectManagementByIdResponse, GetRedirectManagementStatusData, GetRedirectManagementStatusResponse, PostRedirectManagementStatusData, GetItemRelationTypeData, GetItemRelationTypeResponse, GetRelationTypeData, GetRelationTypeResponse, GetRelationTypeByIdData, GetRelationTypeByIdResponse, GetRelationTypeByIdError, GetRelationByRelationTypeIdData, GetRelationByRelationTypeIdResponse, GetRelationByRelationTypeIdError, GetItemScriptData, GetItemScriptResponse, PostScriptData, PostScriptError, DeleteScriptByPathData, DeleteScriptByPathError, GetScriptByPathData, GetScriptByPathResponse, GetScriptByPathError, PutScriptByPathData, PutScriptByPathError, PutScriptByPathRenameData, PutScriptByPathRenameError, PostScriptFolderData, PostScriptFolderError, DeleteScriptFolderByPathData, DeleteScriptFolderByPathError, GetScriptFolderByPathData, GetScriptFolderByPathResponse, GetScriptFolderByPathError, GetTreeScriptAncestorsData, GetTreeScriptAncestorsResponse, GetTreeScriptChildrenData, GetTreeScriptChildrenResponse, GetTreeScriptRootData, GetTreeScriptRootResponse, GetSearcherData, GetSearcherResponse, GetSearcherBySearcherNameQueryData, GetSearcherBySearcherNameQueryResponse, GetSearcherBySearcherNameQueryError, GetSecurityConfigurationData, GetSecurityConfigurationResponse, PostSecurityForgotPasswordData, PostSecurityForgotPasswordError, PostSecurityForgotPasswordResetData, PostSecurityForgotPasswordResetResponse, PostSecurityForgotPasswordResetError, PostSecurityForgotPasswordVerifyData, PostSecurityForgotPasswordVerifyResponse, PostSecurityForgotPasswordVerifyError, GetSegmentData, GetSegmentResponse, GetSegmentError, GetServerConfigurationData, GetServerConfigurationResponse, GetServerInformationData, GetServerInformationResponse, GetServerStatusData, GetServerStatusResponse, GetServerStatusError, GetServerTroubleshootingData, GetServerTroubleshootingResponse, GetServerUpgradeCheckData, GetServerUpgradeCheckResponse, GetItemStaticFileData, GetItemStaticFileResponse, GetTreeStaticFileAncestorsData, GetTreeStaticFileAncestorsResponse, GetTreeStaticFileChildrenData, GetTreeStaticFileChildrenResponse, GetTreeStaticFileRootData, GetTreeStaticFileRootResponse, GetItemStylesheetData, GetItemStylesheetResponse, PostStylesheetData, PostStylesheetError, DeleteStylesheetByPathData, DeleteStylesheetByPathError, GetStylesheetByPathData, GetStylesheetByPathResponse, GetStylesheetByPathError, PutStylesheetByPathData, PutStylesheetByPathError, PutStylesheetByPathRenameData, PutStylesheetByPathRenameError, PostStylesheetFolderData, PostStylesheetFolderError, DeleteStylesheetFolderByPathData, DeleteStylesheetFolderByPathError, GetStylesheetFolderByPathData, GetStylesheetFolderByPathResponse, GetStylesheetFolderByPathError, GetTreeStylesheetAncestorsData, GetTreeStylesheetAncestorsResponse, GetTreeStylesheetChildrenData, GetTreeStylesheetChildrenResponse, GetTreeStylesheetRootData, GetTreeStylesheetRootResponse, GetTagData, GetTagResponse, GetTelemetryData, GetTelemetryResponse, GetTelemetryLevelData, GetTelemetryLevelResponse, PostTelemetryLevelData, PostTelemetryLevelError, GetItemTemplateData, GetItemTemplateResponse, GetItemTemplateSearchData, GetItemTemplateSearchResponse, PostTemplateData, PostTemplateError, DeleteTemplateByIdData, DeleteTemplateByIdError, GetTemplateByIdData, GetTemplateByIdResponse, GetTemplateByIdError, PutTemplateByIdData, PutTemplateByIdError, GetTemplateConfigurationData, GetTemplateConfigurationResponse, PostTemplateQueryExecuteData, PostTemplateQueryExecuteResponse, GetTemplateQuerySettingsData, GetTemplateQuerySettingsResponse, GetTreeTemplateAncestorsData, GetTreeTemplateAncestorsResponse, GetTreeTemplateChildrenData, GetTreeTemplateChildrenResponse, GetTreeTemplateRootData, GetTreeTemplateRootResponse, PostTemporaryFileData, PostTemporaryFileError, DeleteTemporaryFileByIdData, DeleteTemporaryFileByIdError, GetTemporaryFileByIdData, GetTemporaryFileByIdResponse, GetTemporaryFileByIdError, GetTemporaryFileConfigurationData, GetTemporaryFileConfigurationResponse, PostUpgradeAuthorizeData, PostUpgradeAuthorizeError, GetUpgradeSettingsData, GetUpgradeSettingsResponse, GetUpgradeSettingsError, GetUserDataData, GetUserDataResponse, PostUserDataData, PostUserDataError, PutUserDataData, PutUserDataError, GetUserDataByIdData, GetUserDataByIdResponse, GetFilterUserGroupData, GetFilterUserGroupResponse, GetFilterUserGroupError, GetItemUserGroupData, GetItemUserGroupResponse, DeleteUserGroupData, DeleteUserGroupError, GetUserGroupData, GetUserGroupResponse, PostUserGroupData, PostUserGroupError, DeleteUserGroupByIdData, DeleteUserGroupByIdError, GetUserGroupByIdData, GetUserGroupByIdResponse, GetUserGroupByIdError, PutUserGroupByIdData, PutUserGroupByIdError, DeleteUserGroupByIdUsersData, DeleteUserGroupByIdUsersError, PostUserGroupByIdUsersData, PostUserGroupByIdUsersError, GetFilterUserData, GetFilterUserResponse, GetFilterUserError, GetItemUserData, GetItemUserResponse, DeleteUserData, DeleteUserError, GetUserData, GetUserResponse, GetUserError, PostUserData, PostUserError, DeleteUserByIdData, DeleteUserByIdError, GetUserByIdData, GetUserByIdResponse, GetUserByIdError, PutUserByIdData, PutUserByIdError, GetUserById2FaData, GetUserById2FaResponse, GetUserById2FaError, DeleteUserById2FaByProviderNameData, DeleteUserById2FaByProviderNameError, GetUserByIdCalculateStartNodesData, GetUserByIdCalculateStartNodesResponse, GetUserByIdCalculateStartNodesError, PostUserByIdChangePasswordData, PostUserByIdChangePasswordError, GetUserByIdClientCredentialsData, GetUserByIdClientCredentialsResponse, PostUserByIdClientCredentialsData, PostUserByIdClientCredentialsError, DeleteUserByIdClientCredentialsByClientIdData, DeleteUserByIdClientCredentialsByClientIdError, PostUserByIdResetPasswordData, PostUserByIdResetPasswordResponse, PostUserByIdResetPasswordError, DeleteUserAvatarByIdData, DeleteUserAvatarByIdError, PostUserAvatarByIdData, PostUserAvatarByIdError, GetUserConfigurationData, GetUserConfigurationResponse, GetUserCurrentData, GetUserCurrentResponse, GetUserCurrent2FaData, GetUserCurrent2FaResponse, DeleteUserCurrent2FaByProviderNameData, DeleteUserCurrent2FaByProviderNameError, GetUserCurrent2FaByProviderNameData, GetUserCurrent2FaByProviderNameResponse, GetUserCurrent2FaByProviderNameError, PostUserCurrent2FaByProviderNameData, PostUserCurrent2FaByProviderNameResponse, PostUserCurrent2FaByProviderNameError, PostUserCurrentAvatarData, PostUserCurrentAvatarError, PostUserCurrentChangePasswordData, PostUserCurrentChangePasswordError, GetUserCurrentConfigurationData, GetUserCurrentConfigurationResponse, GetUserCurrentLoginProvidersData, GetUserCurrentLoginProvidersResponse, GetUserCurrentPermissionsData, GetUserCurrentPermissionsResponse, GetUserCurrentPermissionsError, GetUserCurrentPermissionsDocumentData, GetUserCurrentPermissionsDocumentResponse, GetUserCurrentPermissionsDocumentError, GetUserCurrentPermissionsMediaData, GetUserCurrentPermissionsMediaResponse, GetUserCurrentPermissionsMediaError, PostUserDisableData, PostUserDisableError, PostUserEnableData, PostUserEnableError, PostUserInviteData, PostUserInviteError, PostUserInviteCreatePasswordData, PostUserInviteCreatePasswordError, PostUserInviteResendData, PostUserInviteResendError, PostUserInviteVerifyData, PostUserInviteVerifyResponse, PostUserInviteVerifyError, PostUserSetUserGroupsData, PostUserUnlockData, PostUserUnlockError, GetItemWebhookData, GetItemWebhookResponse, GetWebhookData, GetWebhookResponse, PostWebhookData, PostWebhookError, DeleteWebhookByIdData, DeleteWebhookByIdError, GetWebhookByIdData, GetWebhookByIdResponse, GetWebhookByIdError, PutWebhookByIdData, PutWebhookByIdError, GetWebhookByIdLogsData, GetWebhookByIdLogsResponse, GetWebhookEventsData, GetWebhookEventsResponse, GetWebhookLogsData, GetWebhookLogsResponse } from './types.gen'; +import { client as _heyApiClient } from './client.gen'; + +export type Options = ClientOptions & { + /** + * You can provide a client instance returned by `createClient()` instead of + * individual options. This might be also useful if you want to implement a + * custom client. + */ + client?: Client; + /** + * You can pass arbitrary values through the `meta` object. This can be + * used to access values that aren't defined as part of the SDK function. + */ + meta?: Record; +}; + +export class CultureService { + public static getCulture(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/culture', + ...options + }); + } + +} + +export class DataTypeService { + public static postDataType(options?: Options) { + return (options?.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/data-type', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static deleteDataTypeById(options: Options) { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/data-type/{id}', + ...options + }); + } + + public static getDataTypeById(options: Options) { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/data-type/{id}', + ...options + }); + } + + public static putDataTypeById(options: Options) { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/data-type/{id}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static postDataTypeByIdCopy(options: Options) { + return (options.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/data-type/{id}/copy', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static getDataTypeByIdIsUsed(options: Options) { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/data-type/{id}/is-used', + ...options + }); + } + + public static putDataTypeByIdMove(options: Options) { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/data-type/{id}/move', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static getDataTypeByIdReferencedBy(options: Options) { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/data-type/{id}/referenced-by', + ...options + }); + } + + /** + * @deprecated + */ + public static getDataTypeByIdReferences(options: Options) { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/data-type/{id}/references', + ...options + }); + } + + public static getDataTypeConfiguration(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/data-type/configuration', + ...options + }); + } + + public static postDataTypeFolder(options?: Options) { + return (options?.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/data-type/folder', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static deleteDataTypeFolderById(options: Options) { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/data-type/folder/{id}', + ...options + }); + } + + public static getDataTypeFolderById(options: Options) { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/data-type/folder/{id}', + ...options + }); + } + + public static putDataTypeFolderById(options: Options) { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/data-type/folder/{id}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static getFilterDataType(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/filter/data-type', + ...options + }); + } + + public static getItemDataType(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/item/data-type', + ...options + }); + } + + public static getItemDataTypeSearch(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/item/data-type/search', + ...options + }); + } + + public static getTreeDataTypeAncestors(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/tree/data-type/ancestors', + ...options + }); + } + + public static getTreeDataTypeChildren(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/tree/data-type/children', + ...options + }); + } + + public static getTreeDataTypeRoot(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/tree/data-type/root', + ...options + }); + } + +} + +export class DictionaryService { + public static getDictionary(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/dictionary', + ...options + }); + } + + public static postDictionary(options?: Options) { + return (options?.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/dictionary', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static deleteDictionaryById(options: Options) { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/dictionary/{id}', + ...options + }); + } + + public static getDictionaryById(options: Options) { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/dictionary/{id}', + ...options + }); + } + + public static putDictionaryById(options: Options) { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/dictionary/{id}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static getDictionaryByIdExport(options: Options) { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/dictionary/{id}/export', + ...options + }); + } + + public static putDictionaryByIdMove(options: Options) { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/dictionary/{id}/move', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static postDictionaryImport(options?: Options) { + return (options?.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/dictionary/import', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static getItemDictionary(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/item/dictionary', + ...options + }); + } + + public static getTreeDictionaryAncestors(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/tree/dictionary/ancestors', + ...options + }); + } + + public static getTreeDictionaryChildren(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/tree/dictionary/children', + ...options + }); + } + + public static getTreeDictionaryRoot(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/tree/dictionary/root', + ...options + }); + } + +} + +export class DocumentBlueprintService { + public static postDocumentBlueprint(options?: Options) { + return (options?.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/document-blueprint', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static deleteDocumentBlueprintById(options: Options) { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/document-blueprint/{id}', + ...options + }); + } + + public static getDocumentBlueprintById(options: Options) { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/document-blueprint/{id}', + ...options + }); + } + + public static putDocumentBlueprintById(options: Options) { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/document-blueprint/{id}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static putDocumentBlueprintByIdMove(options: Options) { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/document-blueprint/{id}/move', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static postDocumentBlueprintFolder(options?: Options) { + return (options?.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/document-blueprint/folder', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static deleteDocumentBlueprintFolderById(options: Options) { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/document-blueprint/folder/{id}', + ...options + }); + } + + public static getDocumentBlueprintFolderById(options: Options) { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/document-blueprint/folder/{id}', + ...options + }); + } + + public static putDocumentBlueprintFolderById(options: Options) { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/document-blueprint/folder/{id}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static postDocumentBlueprintFromDocument(options?: Options) { + return (options?.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/document-blueprint/from-document', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static getItemDocumentBlueprint(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/item/document-blueprint', + ...options + }); + } + + public static getTreeDocumentBlueprintAncestors(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/tree/document-blueprint/ancestors', + ...options + }); + } + + public static getTreeDocumentBlueprintChildren(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/tree/document-blueprint/children', + ...options + }); + } + + public static getTreeDocumentBlueprintRoot(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/tree/document-blueprint/root', + ...options + }); + } + +} + +export class DocumentTypeService { + public static postDocumentType(options?: Options) { + return (options?.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/document-type', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static deleteDocumentTypeById(options: Options) { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/document-type/{id}', + ...options + }); + } + + public static getDocumentTypeById(options: Options) { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/document-type/{id}', + ...options + }); + } + + public static putDocumentTypeById(options: Options) { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/document-type/{id}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static getDocumentTypeByIdAllowedChildren(options: Options) { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/document-type/{id}/allowed-children', + ...options + }); + } + + public static getDocumentTypeByIdBlueprint(options: Options) { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/document-type/{id}/blueprint', + ...options + }); + } + + public static getDocumentTypeByIdCompositionReferences(options: Options) { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/document-type/{id}/composition-references', + ...options + }); + } + + public static postDocumentTypeByIdCopy(options: Options) { + return (options.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/document-type/{id}/copy', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static getDocumentTypeByIdExport(options: Options) { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/document-type/{id}/export', + ...options + }); + } + + public static putDocumentTypeByIdImport(options: Options) { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/document-type/{id}/import', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static putDocumentTypeByIdMove(options: Options) { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/document-type/{id}/move', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static getDocumentTypeAllowedAtRoot(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/document-type/allowed-at-root', + ...options + }); + } + + public static postDocumentTypeAvailableCompositions(options?: Options) { + return (options?.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/document-type/available-compositions', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static getDocumentTypeConfiguration(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/document-type/configuration', + ...options + }); + } + + public static postDocumentTypeFolder(options?: Options) { + return (options?.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/document-type/folder', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static deleteDocumentTypeFolderById(options: Options) { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/document-type/folder/{id}', + ...options + }); + } + + public static getDocumentTypeFolderById(options: Options) { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/document-type/folder/{id}', + ...options + }); + } + + public static putDocumentTypeFolderById(options: Options) { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/document-type/folder/{id}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static postDocumentTypeImport(options?: Options) { + return (options?.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/document-type/import', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static getItemDocumentType(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/item/document-type', + ...options + }); + } + + public static getItemDocumentTypeSearch(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/item/document-type/search', + ...options + }); + } + + public static getTreeDocumentTypeAncestors(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/tree/document-type/ancestors', + ...options + }); + } + + public static getTreeDocumentTypeChildren(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/tree/document-type/children', + ...options + }); + } + + public static getTreeDocumentTypeRoot(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/tree/document-type/root', + ...options + }); + } + +} + +export class DocumentVersionService { + public static getDocumentVersion(options: Options) { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/document-version', + ...options + }); + } + + public static getDocumentVersionById(options: Options) { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/document-version/{id}', + ...options + }); + } + + public static putDocumentVersionByIdPreventCleanup(options: Options) { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/document-version/{id}/prevent-cleanup', + ...options + }); + } + + public static postDocumentVersionByIdRollback(options: Options) { + return (options.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/document-version/{id}/rollback', + ...options + }); + } + +} + +export class DocumentService { + public static getCollectionDocumentById(options: Options) { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/collection/document/{id}', + ...options + }); + } + + public static postDocument(options?: Options) { + return (options?.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/document', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static deleteDocumentById(options: Options) { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/document/{id}', + ...options + }); + } + + public static getDocumentById(options: Options) { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/document/{id}', + ...options + }); + } + + public static putDocumentById(options: Options) { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/document/{id}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static getDocumentByIdAuditLog(options: Options) { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/document/{id}/audit-log', + ...options + }); + } + + public static postDocumentByIdCopy(options: Options) { + return (options.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/document/{id}/copy', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static getDocumentByIdDomains(options: Options) { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/document/{id}/domains', + ...options + }); + } + + public static putDocumentByIdDomains(options: Options) { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/document/{id}/domains', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static putDocumentByIdMove(options: Options) { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/document/{id}/move', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static putDocumentByIdMoveToRecycleBin(options: Options) { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/document/{id}/move-to-recycle-bin', + ...options + }); + } + + public static getDocumentByIdNotifications(options: Options) { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/document/{id}/notifications', + ...options + }); + } + + public static putDocumentByIdNotifications(options: Options) { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/document/{id}/notifications', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static deleteDocumentByIdPublicAccess(options: Options) { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/document/{id}/public-access', + ...options + }); + } + + public static getDocumentByIdPublicAccess(options: Options) { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/document/{id}/public-access', + ...options + }); + } + + public static postDocumentByIdPublicAccess(options: Options) { + return (options.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/document/{id}/public-access', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static putDocumentByIdPublicAccess(options: Options) { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/document/{id}/public-access', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static putDocumentByIdPublish(options: Options) { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/document/{id}/publish', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static putDocumentByIdPublishWithDescendants(options: Options) { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/document/{id}/publish-with-descendants', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static getDocumentByIdPublishWithDescendantsResultByTaskId(options: Options) { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/document/{id}/publish-with-descendants/result/{taskId}', + ...options + }); + } + + public static getDocumentByIdPublished(options: Options) { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/document/{id}/published', + ...options + }); + } + + public static getDocumentByIdReferencedBy(options: Options) { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/document/{id}/referenced-by', + ...options + }); + } + + public static getDocumentByIdReferencedDescendants(options: Options) { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/document/{id}/referenced-descendants', + ...options + }); + } + + public static putDocumentByIdUnpublish(options: Options) { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/document/{id}/unpublish', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static putUmbracoManagementApiV11DocumentByIdValidate11(options: Options) { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1.1/document/{id}/validate', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static getDocumentAreReferenced(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/document/are-referenced', + ...options + }); + } + + public static getDocumentConfiguration(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/document/configuration', + ...options + }); + } + + public static putDocumentSort(options?: Options) { + return (options?.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/document/sort', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static getDocumentUrls(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/document/urls', + ...options + }); + } + + public static postDocumentValidate(options?: Options) { + return (options?.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/document/validate', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static getItemDocument(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/item/document', + ...options + }); + } + + public static getItemDocumentSearch(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/item/document/search', + ...options + }); + } + + public static deleteRecycleBinDocument(options?: Options) { + return (options?.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/recycle-bin/document', + ...options + }); + } + + public static deleteRecycleBinDocumentById(options: Options) { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/recycle-bin/document/{id}', + ...options + }); + } + + public static getRecycleBinDocumentByIdOriginalParent(options: Options) { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/recycle-bin/document/{id}/original-parent', + ...options + }); + } + + public static putRecycleBinDocumentByIdRestore(options: Options) { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/recycle-bin/document/{id}/restore', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static getRecycleBinDocumentChildren(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/recycle-bin/document/children', + ...options + }); + } + + public static getRecycleBinDocumentReferencedBy(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/recycle-bin/document/referenced-by', + ...options + }); + } + + public static getRecycleBinDocumentRoot(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/recycle-bin/document/root', + ...options + }); + } + + public static getTreeDocumentAncestors(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/tree/document/ancestors', + ...options + }); + } + + public static getTreeDocumentChildren(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/tree/document/children', + ...options + }); + } + + public static getTreeDocumentRoot(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/tree/document/root', + ...options + }); + } + +} + +export class DynamicRootService { + public static postDynamicRootQuery(options?: Options) { + return (options?.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/dynamic-root/query', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static getDynamicRootSteps(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/dynamic-root/steps', + ...options + }); + } + +} + +export class HealthCheckService { + public static getHealthCheckGroup(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/health-check-group', + ...options + }); + } + + public static getHealthCheckGroupByName(options: Options) { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/health-check-group/{name}', + ...options + }); + } + + public static postHealthCheckGroupByNameCheck(options: Options) { + return (options.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/health-check-group/{name}/check', + ...options + }); + } + + public static postHealthCheckExecuteAction(options?: Options) { + return (options?.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/health-check/execute-action', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + +} + +export class HelpService { + public static getHelp(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/help', + ...options + }); + } + +} + +export class ImagingService { + public static getImagingResizeUrls(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/imaging/resize/urls', + ...options + }); + } + +} + +export class ImportService { + public static getImportAnalyze(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/import/analyze', + ...options + }); + } + +} + +export class IndexerService { + public static getIndexer(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/indexer', + ...options + }); + } + + public static getIndexerByIndexName(options: Options) { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/indexer/{indexName}', + ...options + }); + } + + public static postIndexerByIndexNameRebuild(options: Options) { + return (options.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/indexer/{indexName}/rebuild', + ...options + }); + } + +} + +export class InstallService { + public static getInstallSettings(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + url: '/umbraco/management/api/v1/install/settings', + ...options + }); + } + + public static postInstallSetup(options?: Options) { + return (options?.client ?? _heyApiClient).post({ + url: '/umbraco/management/api/v1/install/setup', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static postInstallValidateDatabase(options?: Options) { + return (options?.client ?? _heyApiClient).post({ + url: '/umbraco/management/api/v1/install/validate-database', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + +} + +export class LanguageService { + public static getItemLanguage(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/item/language', + ...options + }); + } + + public static getItemLanguageDefault(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/item/language/default', + ...options + }); + } + + public static getLanguage(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/language', + ...options + }); + } + + public static postLanguage(options?: Options) { + return (options?.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/language', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static deleteLanguageByIsoCode(options: Options) { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/language/{isoCode}', + ...options + }); + } + + public static getLanguageByIsoCode(options: Options) { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/language/{isoCode}', + ...options + }); + } + + public static putLanguageByIsoCode(options: Options) { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/language/{isoCode}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + +} + +export class LogViewerService { + public static getLogViewerLevel(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/log-viewer/level', + ...options + }); + } + + public static getLogViewerLevelCount(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/log-viewer/level-count', + ...options + }); + } + + public static getLogViewerLog(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/log-viewer/log', + ...options + }); + } + + public static getLogViewerMessageTemplate(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/log-viewer/message-template', + ...options + }); + } + + public static getLogViewerSavedSearch(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/log-viewer/saved-search', + ...options + }); + } + + public static postLogViewerSavedSearch(options?: Options) { + return (options?.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/log-viewer/saved-search', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static deleteLogViewerSavedSearchByName(options: Options) { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/log-viewer/saved-search/{name}', + ...options + }); + } + + public static getLogViewerSavedSearchByName(options: Options) { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/log-viewer/saved-search/{name}', + ...options + }); + } + + public static getLogViewerValidateLogsSize(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/log-viewer/validate-logs-size', + ...options + }); + } + +} + +export class ManifestService { + public static getManifestManifest(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/manifest/manifest', + ...options + }); + } + + public static getManifestManifestPrivate(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/manifest/manifest/private', + ...options + }); + } + + public static getManifestManifestPublic(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + url: '/umbraco/management/api/v1/manifest/manifest/public', + ...options + }); + } + +} + +export class MediaTypeService { + public static getItemMediaType(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/item/media-type', + ...options + }); + } + + public static getItemMediaTypeAllowed(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/item/media-type/allowed', + ...options + }); + } + + public static getItemMediaTypeFolders(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/item/media-type/folders', + ...options + }); + } + + public static getItemMediaTypeSearch(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/item/media-type/search', + ...options + }); + } + + public static postMediaType(options?: Options) { + return (options?.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/media-type', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static deleteMediaTypeById(options: Options) { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/media-type/{id}', + ...options + }); + } + + public static getMediaTypeById(options: Options) { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/media-type/{id}', + ...options + }); + } + + public static putMediaTypeById(options: Options) { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/media-type/{id}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static getMediaTypeByIdAllowedChildren(options: Options) { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/media-type/{id}/allowed-children', + ...options + }); + } + + public static getMediaTypeByIdCompositionReferences(options: Options) { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/media-type/{id}/composition-references', + ...options + }); + } + + public static postMediaTypeByIdCopy(options: Options) { + return (options.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/media-type/{id}/copy', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static getMediaTypeByIdExport(options: Options) { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/media-type/{id}/export', + ...options + }); + } + + public static putMediaTypeByIdImport(options: Options) { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/media-type/{id}/import', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static putMediaTypeByIdMove(options: Options) { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/media-type/{id}/move', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static getMediaTypeAllowedAtRoot(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/media-type/allowed-at-root', + ...options + }); + } + + public static postMediaTypeAvailableCompositions(options?: Options) { + return (options?.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/media-type/available-compositions', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static getMediaTypeConfiguration(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/media-type/configuration', + ...options + }); + } + + public static postMediaTypeFolder(options?: Options) { + return (options?.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/media-type/folder', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static deleteMediaTypeFolderById(options: Options) { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/media-type/folder/{id}', + ...options + }); + } + + public static getMediaTypeFolderById(options: Options) { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/media-type/folder/{id}', + ...options + }); + } + + public static putMediaTypeFolderById(options: Options) { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/media-type/folder/{id}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static postMediaTypeImport(options?: Options) { + return (options?.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/media-type/import', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static getTreeMediaTypeAncestors(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/tree/media-type/ancestors', + ...options + }); + } + + public static getTreeMediaTypeChildren(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/tree/media-type/children', + ...options + }); + } + + public static getTreeMediaTypeRoot(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/tree/media-type/root', + ...options + }); + } + +} + +export class MediaService { + public static getCollectionMedia(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/collection/media', + ...options + }); + } + + public static getItemMedia(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/item/media', + ...options + }); + } + + public static getItemMediaSearch(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/item/media/search', + ...options + }); + } + + public static postMedia(options?: Options) { + return (options?.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/media', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static deleteMediaById(options: Options) { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/media/{id}', + ...options + }); + } + + public static getMediaById(options: Options) { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/media/{id}', + ...options + }); + } + + public static putMediaById(options: Options) { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/media/{id}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static getMediaByIdAuditLog(options: Options) { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/media/{id}/audit-log', + ...options + }); + } + + public static putMediaByIdMove(options: Options) { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/media/{id}/move', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static putMediaByIdMoveToRecycleBin(options: Options) { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/media/{id}/move-to-recycle-bin', + ...options + }); + } + + public static getMediaByIdReferencedBy(options: Options) { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/media/{id}/referenced-by', + ...options + }); + } + + public static getMediaByIdReferencedDescendants(options: Options) { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/media/{id}/referenced-descendants', + ...options + }); + } + + public static putMediaByIdValidate(options: Options) { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/media/{id}/validate', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static getMediaAreReferenced(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/media/are-referenced', + ...options + }); + } + + /** + * @deprecated + */ + public static getMediaConfiguration(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/media/configuration', + ...options + }); + } + + public static putMediaSort(options?: Options) { + return (options?.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/media/sort', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static getMediaUrls(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/media/urls', + ...options + }); + } + + public static postMediaValidate(options?: Options) { + return (options?.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/media/validate', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static deleteRecycleBinMedia(options?: Options) { + return (options?.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/recycle-bin/media', + ...options + }); + } + + public static deleteRecycleBinMediaById(options: Options) { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/recycle-bin/media/{id}', + ...options + }); + } + + public static getRecycleBinMediaByIdOriginalParent(options: Options) { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/recycle-bin/media/{id}/original-parent', + ...options + }); + } + + public static putRecycleBinMediaByIdRestore(options: Options) { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/recycle-bin/media/{id}/restore', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static getRecycleBinMediaChildren(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/recycle-bin/media/children', + ...options + }); + } + + public static getRecycleBinMediaReferencedBy(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/recycle-bin/media/referenced-by', + ...options + }); + } + + public static getRecycleBinMediaRoot(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/recycle-bin/media/root', + ...options + }); + } + + public static getTreeMediaAncestors(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/tree/media/ancestors', + ...options + }); + } + + public static getTreeMediaChildren(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/tree/media/children', + ...options + }); + } + + public static getTreeMediaRoot(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/tree/media/root', + ...options + }); + } + +} + +export class MemberGroupService { + public static getItemMemberGroup(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/item/member-group', + ...options + }); + } + + public static getMemberGroup(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/member-group', + ...options + }); + } + + public static postMemberGroup(options?: Options) { + return (options?.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/member-group', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static deleteMemberGroupById(options: Options) { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/member-group/{id}', + ...options + }); + } + + public static getMemberGroupById(options: Options) { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/member-group/{id}', + ...options + }); + } + + public static putMemberGroupById(options: Options) { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/member-group/{id}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static getTreeMemberGroupRoot(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/tree/member-group/root', + ...options + }); + } + +} + +export class MemberTypeService { + public static getItemMemberType(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/item/member-type', + ...options + }); + } + + public static getItemMemberTypeSearch(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/item/member-type/search', + ...options + }); + } + + public static postMemberType(options?: Options) { + return (options?.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/member-type', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static deleteMemberTypeById(options: Options) { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/member-type/{id}', + ...options + }); + } + + public static getMemberTypeById(options: Options) { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/member-type/{id}', + ...options + }); + } + + public static putMemberTypeById(options: Options) { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/member-type/{id}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static getMemberTypeByIdCompositionReferences(options: Options) { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/member-type/{id}/composition-references', + ...options + }); + } + + public static postMemberTypeByIdCopy(options: Options) { + return (options.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/member-type/{id}/copy', + ...options + }); + } + + public static postMemberTypeAvailableCompositions(options?: Options) { + return (options?.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/member-type/available-compositions', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static getMemberTypeConfiguration(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/member-type/configuration', + ...options + }); + } + + public static getTreeMemberTypeRoot(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/tree/member-type/root', + ...options + }); + } + +} + +export class MemberService { + public static getFilterMember(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/filter/member', + ...options + }); + } + + public static getItemMember(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/item/member', + ...options + }); + } + + public static getItemMemberSearch(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/item/member/search', + ...options + }); + } + + public static postMember(options?: Options) { + return (options?.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/member', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static deleteMemberById(options: Options) { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/member/{id}', + ...options + }); + } + + public static getMemberById(options: Options) { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/member/{id}', + ...options + }); + } + + public static putMemberById(options: Options) { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/member/{id}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static getMemberByIdReferencedBy(options: Options) { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/member/{id}/referenced-by', + ...options + }); + } + + public static getMemberByIdReferencedDescendants(options: Options) { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/member/{id}/referenced-descendants', + ...options + }); + } + + public static putMemberByIdValidate(options: Options) { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/member/{id}/validate', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static getMemberAreReferenced(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/member/are-referenced', + ...options + }); + } + + public static getMemberConfiguration(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/member/configuration', + ...options + }); + } + + public static postMemberValidate(options?: Options) { + return (options?.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/member/validate', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + +} + +export class ModelsBuilderService { + public static postModelsBuilderBuild(options?: Options) { + return (options?.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/models-builder/build', + ...options + }); + } + + public static getModelsBuilderDashboard(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/models-builder/dashboard', + ...options + }); + } + + public static getModelsBuilderStatus(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/models-builder/status', + ...options + }); + } + +} + +export class ObjectTypesService { + public static getObjectTypes(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/object-types', + ...options + }); + } + +} + +export class OEmbedService { + public static getOembedQuery(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/oembed/query', + ...options + }); + } + +} + +export class PackageService { + public static postPackageByNameRunMigration(options: Options) { + return (options.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/package/{name}/run-migration', + ...options + }); + } + + public static getPackageConfiguration(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/package/configuration', + ...options + }); + } + + public static getPackageCreated(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/package/created', + ...options + }); + } + + public static postPackageCreated(options?: Options) { + return (options?.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/package/created', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static deletePackageCreatedById(options: Options) { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/package/created/{id}', + ...options + }); + } + + public static getPackageCreatedById(options: Options) { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/package/created/{id}', + ...options + }); + } + + public static putPackageCreatedById(options: Options) { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/package/created/{id}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static getPackageCreatedByIdDownload(options: Options) { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/package/created/{id}/download', + ...options + }); + } + + public static getPackageMigrationStatus(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/package/migration-status', + ...options + }); + } + +} + +export class PartialViewService { + public static getItemPartialView(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/item/partial-view', + ...options + }); + } + + public static postPartialView(options?: Options) { + return (options?.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/partial-view', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static deletePartialViewByPath(options: Options) { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/partial-view/{path}', + ...options + }); + } + + public static getPartialViewByPath(options: Options) { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/partial-view/{path}', + ...options + }); + } + + public static putPartialViewByPath(options: Options) { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/partial-view/{path}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static putPartialViewByPathRename(options: Options) { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/partial-view/{path}/rename', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static postPartialViewFolder(options?: Options) { + return (options?.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/partial-view/folder', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static deletePartialViewFolderByPath(options: Options) { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/partial-view/folder/{path}', + ...options + }); + } + + public static getPartialViewFolderByPath(options: Options) { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/partial-view/folder/{path}', + ...options + }); + } + + public static getPartialViewSnippet(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/partial-view/snippet', + ...options + }); + } + + public static getPartialViewSnippetById(options: Options) { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/partial-view/snippet/{id}', + ...options + }); + } + + public static getTreePartialViewAncestors(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/tree/partial-view/ancestors', + ...options + }); + } + + public static getTreePartialViewChildren(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/tree/partial-view/children', + ...options + }); + } + + public static getTreePartialViewRoot(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/tree/partial-view/root', + ...options + }); + } + +} + +export class PreviewService { + public static deletePreview(options?: Options) { + return (options?.client ?? _heyApiClient).delete({ + url: '/umbraco/management/api/v1/preview', + ...options + }); + } + + public static postPreview(options?: Options) { + return (options?.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/preview', + ...options + }); + } + +} + +export class ProfilingService { + public static getProfilingStatus(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/profiling/status', + ...options + }); + } + + public static putProfilingStatus(options?: Options) { + return (options?.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/profiling/status', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + +} + +export class PropertyTypeService { + public static getPropertyTypeIsUsed(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/property-type/is-used', + ...options + }); + } + +} + +export class PublishedCacheService { + public static postPublishedCacheRebuild(options?: Options) { + return (options?.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/published-cache/rebuild', + ...options + }); + } + + public static getPublishedCacheRebuildStatus(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/published-cache/rebuild/status', + ...options + }); + } + + public static postPublishedCacheReload(options?: Options) { + return (options?.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/published-cache/reload', + ...options + }); + } + +} + +export class RedirectManagementService { + public static getRedirectManagement(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/redirect-management', + ...options + }); + } + + public static deleteRedirectManagementById(options: Options) { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/redirect-management/{id}', + ...options + }); + } + + public static getRedirectManagementById(options: Options) { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/redirect-management/{id}', + ...options + }); + } + + public static getRedirectManagementStatus(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/redirect-management/status', + ...options + }); + } + + public static postRedirectManagementStatus(options?: Options) { + return (options?.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/redirect-management/status', + ...options + }); + } + +} + +export class RelationTypeService { + public static getItemRelationType(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/item/relation-type', + ...options + }); + } + + public static getRelationType(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/relation-type', + ...options + }); + } + + public static getRelationTypeById(options: Options) { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/relation-type/{id}', + ...options + }); + } + +} + +export class RelationService { + public static getRelationByRelationTypeId(options: Options) { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/relation/type/{id}', + ...options + }); + } + +} + +export class ScriptService { + public static getItemScript(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/item/script', + ...options + }); + } + + public static postScript(options?: Options) { + return (options?.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/script', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static deleteScriptByPath(options: Options) { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/script/{path}', + ...options + }); + } + + public static getScriptByPath(options: Options) { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/script/{path}', + ...options + }); + } + + public static putScriptByPath(options: Options) { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/script/{path}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static putScriptByPathRename(options: Options) { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/script/{path}/rename', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static postScriptFolder(options?: Options) { + return (options?.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/script/folder', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static deleteScriptFolderByPath(options: Options) { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/script/folder/{path}', + ...options + }); + } + + public static getScriptFolderByPath(options: Options) { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/script/folder/{path}', + ...options + }); + } + + public static getTreeScriptAncestors(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/tree/script/ancestors', + ...options + }); + } + + public static getTreeScriptChildren(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/tree/script/children', + ...options + }); + } + + public static getTreeScriptRoot(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/tree/script/root', + ...options + }); + } + +} + +export class SearcherService { + public static getSearcher(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/searcher', + ...options + }); + } + + public static getSearcherBySearcherNameQuery(options: Options) { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/searcher/{searcherName}/query', + ...options + }); + } + +} + +export class SecurityService { + public static getSecurityConfiguration(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/security/configuration', + ...options + }); + } + + public static postSecurityForgotPassword(options?: Options) { + return (options?.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/security/forgot-password', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static postSecurityForgotPasswordReset(options?: Options) { + return (options?.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/security/forgot-password/reset', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static postSecurityForgotPasswordVerify(options?: Options) { + return (options?.client ?? _heyApiClient).post({ + url: '/umbraco/management/api/v1/security/forgot-password/verify', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + +} + +export class SegmentService { + public static getSegment(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/segment', + ...options + }); + } + +} + +export class ServerService { + public static getServerConfiguration(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + url: '/umbraco/management/api/v1/server/configuration', + ...options + }); + } + + public static getServerInformation(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/server/information', + ...options + }); + } + + public static getServerStatus(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + url: '/umbraco/management/api/v1/server/status', + ...options + }); + } + + public static getServerTroubleshooting(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/server/troubleshooting', + ...options + }); + } + + public static getServerUpgradeCheck(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/server/upgrade-check', + ...options + }); + } + +} + +export class StaticFileService { + public static getItemStaticFile(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/item/static-file', + ...options + }); + } + + public static getTreeStaticFileAncestors(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/tree/static-file/ancestors', + ...options + }); + } + + public static getTreeStaticFileChildren(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/tree/static-file/children', + ...options + }); + } + + public static getTreeStaticFileRoot(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/tree/static-file/root', + ...options + }); + } + +} + +export class StylesheetService { + public static getItemStylesheet(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/item/stylesheet', + ...options + }); + } + + public static postStylesheet(options?: Options) { + return (options?.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/stylesheet', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static deleteStylesheetByPath(options: Options) { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/stylesheet/{path}', + ...options + }); + } + + public static getStylesheetByPath(options: Options) { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/stylesheet/{path}', + ...options + }); + } + + public static putStylesheetByPath(options: Options) { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/stylesheet/{path}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static putStylesheetByPathRename(options: Options) { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/stylesheet/{path}/rename', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static postStylesheetFolder(options?: Options) { + return (options?.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/stylesheet/folder', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static deleteStylesheetFolderByPath(options: Options) { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/stylesheet/folder/{path}', + ...options + }); + } + + public static getStylesheetFolderByPath(options: Options) { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/stylesheet/folder/{path}', + ...options + }); + } + + public static getTreeStylesheetAncestors(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/tree/stylesheet/ancestors', + ...options + }); + } + + public static getTreeStylesheetChildren(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/tree/stylesheet/children', + ...options + }); + } + + public static getTreeStylesheetRoot(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/tree/stylesheet/root', + ...options + }); + } + +} + +export class TagService { + public static getTag(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/tag', + ...options + }); + } + +} + +export class TelemetryService { + public static getTelemetry(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/telemetry', + ...options + }); + } + + public static getTelemetryLevel(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/telemetry/level', + ...options + }); + } + + public static postTelemetryLevel(options?: Options) { + return (options?.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/telemetry/level', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + +} + +export class TemplateService { + public static getItemTemplate(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/item/template', + ...options + }); + } + + public static getItemTemplateSearch(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/item/template/search', + ...options + }); + } + + public static postTemplate(options?: Options) { + return (options?.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/template', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static deleteTemplateById(options: Options) { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/template/{id}', + ...options + }); + } + + public static getTemplateById(options: Options) { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/template/{id}', + ...options + }); + } + + public static putTemplateById(options: Options) { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/template/{id}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static getTemplateConfiguration(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/template/configuration', + ...options + }); + } + + public static postTemplateQueryExecute(options?: Options) { + return (options?.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/template/query/execute', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static getTemplateQuerySettings(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/template/query/settings', + ...options + }); + } + + public static getTreeTemplateAncestors(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/tree/template/ancestors', + ...options + }); + } + + public static getTreeTemplateChildren(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/tree/template/children', + ...options + }); + } + + public static getTreeTemplateRoot(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/tree/template/root', + ...options + }); + } + +} + +export class TemporaryFileService { + public static postTemporaryFile(options?: Options) { + return (options?.client ?? _heyApiClient).post({ + ...formDataBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/temporary-file', + ...options, + headers: { + 'Content-Type': null, + ...options?.headers + } + }); + } + + public static deleteTemporaryFileById(options: Options) { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/temporary-file/{id}', + ...options + }); + } + + public static getTemporaryFileById(options: Options) { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/temporary-file/{id}', + ...options + }); + } + + public static getTemporaryFileConfiguration(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/temporary-file/configuration', + ...options + }); + } + +} + +export class UpgradeService { + public static postUpgradeAuthorize(options?: Options) { + return (options?.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/upgrade/authorize', + ...options + }); + } + + public static getUpgradeSettings(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/upgrade/settings', + ...options + }); + } + +} + +export class UserDataService { + public static getUserData(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/user-data', + ...options + }); + } + + public static postUserData(options?: Options) { + return (options?.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/user-data', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static putUserData(options?: Options) { + return (options?.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/user-data', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static getUserDataById(options: Options) { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/user-data/{id}', + ...options + }); + } + +} + +export class UserGroupService { + public static getFilterUserGroup(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/filter/user-group', + ...options + }); + } + + public static getItemUserGroup(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/item/user-group', + ...options + }); + } + + public static deleteUserGroup(options?: Options) { + return (options?.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/user-group', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static getUserGroup(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/user-group', + ...options + }); + } + + public static postUserGroup(options?: Options) { + return (options?.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/user-group', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static deleteUserGroupById(options: Options) { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/user-group/{id}', + ...options + }); + } + + public static getUserGroupById(options: Options) { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/user-group/{id}', + ...options + }); + } + + public static putUserGroupById(options: Options) { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/user-group/{id}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static deleteUserGroupByIdUsers(options: Options) { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/user-group/{id}/users', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static postUserGroupByIdUsers(options: Options) { + return (options.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/user-group/{id}/users', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + +} + +export class UserService { + public static getFilterUser(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/filter/user', + ...options + }); + } + + public static getItemUser(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/item/user', + ...options + }); + } + + public static deleteUser(options?: Options) { + return (options?.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/user', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static getUser(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/user', + ...options + }); + } + + public static postUser(options?: Options) { + return (options?.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/user', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static deleteUserById(options: Options) { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/user/{id}', + ...options + }); + } + + public static getUserById(options: Options) { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/user/{id}', + ...options + }); + } + + public static putUserById(options: Options) { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/user/{id}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static getUserById2Fa(options: Options) { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/user/{id}/2fa', + ...options + }); + } + + public static deleteUserById2FaByProviderName(options: Options) { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/user/{id}/2fa/{providerName}', + ...options + }); + } + + public static getUserByIdCalculateStartNodes(options: Options) { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/user/{id}/calculate-start-nodes', + ...options + }); + } + + public static postUserByIdChangePassword(options: Options) { + return (options.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/user/{id}/change-password', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static getUserByIdClientCredentials(options: Options) { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/user/{id}/client-credentials', + ...options + }); + } + + public static postUserByIdClientCredentials(options: Options) { + return (options.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/user/{id}/client-credentials', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static deleteUserByIdClientCredentialsByClientId(options: Options) { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/user/{id}/client-credentials/{clientId}', + ...options + }); + } + + public static postUserByIdResetPassword(options: Options) { + return (options.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/user/{id}/reset-password', + ...options + }); + } + + public static deleteUserAvatarById(options: Options) { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/user/avatar/{id}', + ...options + }); + } + + public static postUserAvatarById(options: Options) { + return (options.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/user/avatar/{id}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static getUserConfiguration(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/user/configuration', + ...options + }); + } + + public static getUserCurrent(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/user/current', + ...options + }); + } + + public static getUserCurrent2Fa(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/user/current/2fa', + ...options + }); + } + + public static deleteUserCurrent2FaByProviderName(options: Options) { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/user/current/2fa/{providerName}', + ...options + }); + } + + public static getUserCurrent2FaByProviderName(options: Options) { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/user/current/2fa/{providerName}', + ...options + }); + } + + public static postUserCurrent2FaByProviderName(options: Options) { + return (options.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/user/current/2fa/{providerName}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static postUserCurrentAvatar(options?: Options) { + return (options?.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/user/current/avatar', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static postUserCurrentChangePassword(options?: Options) { + return (options?.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/user/current/change-password', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static getUserCurrentConfiguration(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/user/current/configuration', + ...options + }); + } + + public static getUserCurrentLoginProviders(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/user/current/login-providers', + ...options + }); + } + + public static getUserCurrentPermissions(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/user/current/permissions', + ...options + }); + } + + public static getUserCurrentPermissionsDocument(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/user/current/permissions/document', + ...options + }); + } + + public static getUserCurrentPermissionsMedia(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/user/current/permissions/media', + ...options + }); + } + + public static postUserDisable(options?: Options) { + return (options?.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/user/disable', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static postUserEnable(options?: Options) { + return (options?.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/user/enable', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static postUserInvite(options?: Options) { + return (options?.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/user/invite', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static postUserInviteCreatePassword(options?: Options) { + return (options?.client ?? _heyApiClient).post({ + url: '/umbraco/management/api/v1/user/invite/create-password', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static postUserInviteResend(options?: Options) { + return (options?.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/user/invite/resend', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static postUserInviteVerify(options?: Options) { + return (options?.client ?? _heyApiClient).post({ + url: '/umbraco/management/api/v1/user/invite/verify', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static postUserSetUserGroups(options?: Options) { + return (options?.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/user/set-user-groups', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static postUserUnlock(options?: Options) { + return (options?.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/user/unlock', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + +} + +export class WebhookService { + public static getItemWebhook(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/item/webhook', + ...options + }); + } + + public static getWebhook(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/webhook', + ...options + }); + } + + public static postWebhook(options?: Options) { + return (options?.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/webhook', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static deleteWebhookById(options: Options) { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/webhook/{id}', + ...options + }); + } + + public static getWebhookById(options: Options) { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/webhook/{id}', + ...options + }); + } + + public static putWebhookById(options: Options) { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/webhook/{id}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); + } + + public static getWebhookByIdLogs(options: Options) { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/webhook/{id}/logs', + ...options + }); + } + + public static getWebhookEvents(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/webhook/events', + ...options + }); + } + + public static getWebhookLogs(options?: Options) { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/webhook/logs', + ...options + }); + } + +} \ No newline at end of file diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/backend-api/types.gen.ts b/src/Umbraco.Web.UI.Client/src/packages/core/backend-api/types.gen.ts new file mode 100644 index 0000000000..4965384163 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/packages/core/backend-api/types.gen.ts @@ -0,0 +1,16103 @@ +// This file is auto-generated by @hey-api/openapi-ts + +export type AllowedDocumentTypeModel = { + id: string; + name: string; + description?: string | null; + icon?: string | null; +}; + +export type AllowedMediaTypeModel = { + id: string; + name: string; + description?: string | null; + icon?: string | null; +}; + +export type AuditLogResponseModel = { + user: ReferenceByIdModel; + timestamp: string; + logType: AuditTypeModel; + comment?: string | null; + parameters?: string | null; +}; + +export enum AuditTypeModel { + NEW = 'New', + SAVE = 'Save', + SAVE_VARIANT = 'SaveVariant', + OPEN = 'Open', + DELETE = 'Delete', + PUBLISH = 'Publish', + PUBLISH_VARIANT = 'PublishVariant', + SEND_TO_PUBLISH = 'SendToPublish', + SEND_TO_PUBLISH_VARIANT = 'SendToPublishVariant', + UNPUBLISH = 'Unpublish', + UNPUBLISH_VARIANT = 'UnpublishVariant', + MOVE = 'Move', + COPY = 'Copy', + ASSIGN_DOMAIN = 'AssignDomain', + PUBLIC_ACCESS = 'PublicAccess', + SORT = 'Sort', + NOTIFY = 'Notify', + SYSTEM = 'System', + ROLL_BACK = 'RollBack', + PACKAGER_INSTALL = 'PackagerInstall', + PACKAGER_UNINSTALL = 'PackagerUninstall', + CUSTOM = 'Custom', + CONTENT_VERSION_PREVENT_CLEANUP = 'ContentVersionPreventCleanup', + CONTENT_VERSION_ENABLE_CLEANUP = 'ContentVersionEnableCleanup' +} + +export type AvailableDocumentTypeCompositionResponseModel = { + id: string; + name: string; + icon: string; + folderPath: Array; + isCompatible: boolean; +}; + +export type AvailableMediaTypeCompositionResponseModel = { + id: string; + name: string; + icon: string; + folderPath: Array; + isCompatible: boolean; +}; + +export type AvailableMemberTypeCompositionResponseModel = { + id: string; + name: string; + icon: string; + folderPath: Array; + isCompatible: boolean; +}; + +export type CalculatedUserStartNodesResponseModel = { + id: string; + documentStartNodeIds: Array; + hasDocumentRootAccess: boolean; + mediaStartNodeIds: Array; + hasMediaRootAccess: boolean; +}; + +export type ChangePasswordCurrentUserRequestModel = { + newPassword: string; + oldPassword?: string | null; +}; + +export type ChangePasswordUserRequestModel = { + newPassword: string; +}; + +export enum CompositionTypeModel { + COMPOSITION = 'Composition', + INHERITANCE = 'Inheritance' +} + +export type ConsentLevelPresentationModel = { + level: TelemetryLevelModel; + description: string; +}; + +export type CopyDataTypeRequestModel = { + target?: ReferenceByIdModel | null; +}; + +export type CopyDocumentRequestModel = { + target?: ReferenceByIdModel | null; + relateToOriginal: boolean; + includeDescendants: boolean; +}; + +export type CopyDocumentTypeRequestModel = { + target?: ReferenceByIdModel | null; +}; + +export type CopyMediaTypeRequestModel = { + target?: ReferenceByIdModel | null; +}; + +export type CreateDataTypeRequestModel = { + name: string; + editorAlias: string; + editorUiAlias: string; + values: Array; + id?: string | null; + parent?: ReferenceByIdModel | null; +}; + +export type CreateDictionaryItemRequestModel = { + name: string; + translations: Array; + id?: string | null; + parent?: ReferenceByIdModel | null; +}; + +export type CreateDocumentBlueprintFromDocumentRequestModel = { + document: ReferenceByIdModel; + id?: string | null; + name: string; + parent?: ReferenceByIdModel | null; +}; + +export type CreateDocumentBlueprintRequestModel = { + values: Array; + variants: Array; + id?: string | null; + parent?: ReferenceByIdModel | null; + documentType: ReferenceByIdModel; +}; + +export type CreateDocumentRequestModel = { + values: Array; + variants: Array; + id?: string | null; + parent?: ReferenceByIdModel | null; + documentType: ReferenceByIdModel; + template: ReferenceByIdModel | null; +}; + +export type CreateDocumentTypePropertyTypeContainerRequestModel = { + id: string; + parent?: ReferenceByIdModel | null; + name?: string | null; + type: string; + sortOrder: number; +}; + +export type CreateDocumentTypePropertyTypeRequestModel = { + id: string; + container?: ReferenceByIdModel | null; + sortOrder: number; + alias: string; + name: string; + description?: string | null; + dataType: ReferenceByIdModel; + variesByCulture: boolean; + variesBySegment: boolean; + validation: PropertyTypeValidationModel; + appearance: PropertyTypeAppearanceModel; +}; + +export type CreateDocumentTypeRequestModel = { + alias: string; + name: string; + description?: string | null; + icon: string; + allowedAsRoot: boolean; + variesByCulture: boolean; + variesBySegment: boolean; + collection?: ReferenceByIdModel | null; + isElement: boolean; + properties: Array; + containers: Array; + id?: string | null; + parent?: ReferenceByIdModel | null; + allowedTemplates: Array; + defaultTemplate?: ReferenceByIdModel | null; + cleanup: DocumentTypeCleanupModel; + allowedDocumentTypes: Array; + compositions: Array; +}; + +export type CreateFolderRequestModel = { + name: string; + id?: string | null; + parent?: ReferenceByIdModel | null; +}; + +export type CreateInitialPasswordUserRequestModel = { + user: ReferenceByIdModel; + token: string; + password: string; +}; + +export type CreateLanguageRequestModel = { + name: string; + isDefault: boolean; + isMandatory: boolean; + fallbackIsoCode?: string | null; + isoCode: string; +}; + +export type CreateMediaRequestModel = { + values: Array; + variants: Array; + id?: string | null; + parent?: ReferenceByIdModel | null; + mediaType: ReferenceByIdModel; +}; + +export type CreateMediaTypePropertyTypeContainerRequestModel = { + id: string; + parent?: ReferenceByIdModel | null; + name?: string | null; + type: string; + sortOrder: number; +}; + +export type CreateMediaTypePropertyTypeRequestModel = { + id: string; + container?: ReferenceByIdModel | null; + sortOrder: number; + alias: string; + name: string; + description?: string | null; + dataType: ReferenceByIdModel; + variesByCulture: boolean; + variesBySegment: boolean; + validation: PropertyTypeValidationModel; + appearance: PropertyTypeAppearanceModel; +}; + +export type CreateMediaTypeRequestModel = { + alias: string; + name: string; + description?: string | null; + icon: string; + allowedAsRoot: boolean; + variesByCulture: boolean; + variesBySegment: boolean; + isElement: boolean; + properties: Array; + containers: Array; + id?: string | null; + parent?: ReferenceByIdModel | null; + allowedMediaTypes: Array; + compositions: Array; + collection?: ReferenceByIdModel | null; +}; + +export type CreateMemberGroupRequestModel = { + name: string; + id?: string | null; +}; + +export type CreateMemberRequestModel = { + values: Array; + variants: Array; + id?: string | null; + email: string; + username: string; + password: string; + memberType: ReferenceByIdModel; + groups?: Array | null; + isApproved: boolean; +}; + +export type CreateMemberTypePropertyTypeContainerRequestModel = { + id: string; + parent?: ReferenceByIdModel | null; + name?: string | null; + type: string; + sortOrder: number; +}; + +export type CreateMemberTypePropertyTypeRequestModel = { + id: string; + container?: ReferenceByIdModel | null; + sortOrder: number; + alias: string; + name: string; + description?: string | null; + dataType: ReferenceByIdModel; + variesByCulture: boolean; + variesBySegment: boolean; + validation: PropertyTypeValidationModel; + appearance: PropertyTypeAppearanceModel; + isSensitive: boolean; + visibility: MemberTypePropertyTypeVisibilityModel; +}; + +export type CreateMemberTypeRequestModel = { + alias: string; + name: string; + description?: string | null; + icon: string; + allowedAsRoot: boolean; + variesByCulture: boolean; + variesBySegment: boolean; + collection?: ReferenceByIdModel | null; + isElement: boolean; + properties: Array; + containers: Array; + id?: string | null; + compositions: Array; +}; + +export type CreatePackageRequestModel = { + name: string; + contentNodeId?: string | null; + contentLoadChildNodes: boolean; + mediaIds: Array; + mediaLoadChildNodes: boolean; + documentTypes: Array; + mediaTypes: Array; + dataTypes: Array; + templates: Array; + partialViews: Array; + stylesheets: Array; + scripts: Array; + languages: Array; + dictionaryItems: Array; + id?: string | null; +}; + +export type CreatePartialViewFolderRequestModel = { + name: string; + parent?: FileSystemFolderModel | null; +}; + +export type CreatePartialViewRequestModel = { + name: string; + parent?: FileSystemFolderModel | null; + content: string; +}; + +export type CreateScriptFolderRequestModel = { + name: string; + parent?: FileSystemFolderModel | null; +}; + +export type CreateScriptRequestModel = { + name: string; + parent?: FileSystemFolderModel | null; + content: string; +}; + +export type CreateStylesheetFolderRequestModel = { + name: string; + parent?: FileSystemFolderModel | null; +}; + +export type CreateStylesheetRequestModel = { + name: string; + parent?: FileSystemFolderModel | null; + content: string; +}; + +export type CreateTemplateRequestModel = { + name: string; + alias: string; + content?: string | null; + id?: string | null; +}; + +export type CreateUserClientCredentialsRequestModel = { + clientId: string; + clientSecret: string; +}; + +export type CreateUserDataRequestModel = { + group: string; + identifier: string; + value: string; + key?: string | null; +}; + +export type CreateUserGroupRequestModel = { + name: string; + alias: string; + icon?: string | null; + sections: Array; + languages: Array; + hasAccessToAllLanguages: boolean; + documentStartNode?: ReferenceByIdModel | null; + documentRootAccess: boolean; + mediaStartNode?: ReferenceByIdModel | null; + mediaRootAccess: boolean; + fallbackPermissions: Array; + permissions: Array; + id?: string | null; +}; + +export type CreateUserRequestModel = { + email: string; + userName: string; + name: string; + userGroupIds: Array; + id?: string | null; + kind: UserKindModel; +}; + +export type CreateWebhookRequestModel = { + enabled: boolean; + name?: string | null; + description?: string | null; + url: string; + contentTypeKeys: Array; + headers: { + [key: string]: string; + }; + id?: string | null; + events: Array; +}; + +export type CultureAndScheduleRequestModel = { + culture?: string | null; + schedule?: ScheduleRequestModel | null; +}; + +export type CultureReponseModel = { + name: string; + englishName: string; +}; + +export type CurrentUserConfigurationResponseModel = { + keepUserLoggedIn: boolean; + passwordConfiguration: PasswordConfigurationResponseModel; + allowChangePassword: boolean; + allowTwoFactor: boolean; +}; + +export type CurrentUserResponseModel = { + email: string; + userName: string; + name: string; + userGroupIds: Array; + id: string; + languageIsoCode: string | null; + documentStartNodeIds: Array; + hasDocumentRootAccess: boolean; + mediaStartNodeIds: Array; + hasMediaRootAccess: boolean; + avatarUrls: Array; + languages: Array; + hasAccessToAllLanguages: boolean; + hasAccessToSensitiveData: boolean; + fallbackPermissions: Array; + permissions: Array; + allowedSections: Array; + isAdmin: boolean; +}; + +export enum DataTypeChangeModeModel { + TRUE = 'True', + FALSE = 'False', + FALSE_WITH_HELP_TEXT = 'FalseWithHelpText' +} + +export type DataTypeContentTypeReferenceModel = { + id: string; + type: string | null; + name: string | null; + icon: string | null; +}; + +export type DataTypeItemResponseModel = { + id: string; + name: string; + editorUiAlias?: string | null; + editorAlias: string; + isDeletable: boolean; +}; + +export type DataTypePropertyPresentationModel = { + alias: string; + value?: unknown; +}; + +export type DataTypePropertyReferenceModel = { + name: string; + alias: string; +}; + +export type DataTypeReferenceResponseModel = { + contentType: DataTypeContentTypeReferenceModel; + properties: Array; +}; + +export type DataTypeResponseModel = { + name: string; + editorAlias: string; + editorUiAlias: string; + values: Array; + id: string; + isDeletable: boolean; + canIgnoreStartNodes: boolean; +}; + +export type DataTypeTreeItemResponseModel = { + hasChildren: boolean; + id: string; + parent?: ReferenceByIdModel | null; + name: string; + isFolder: boolean; + editorUiAlias?: string | null; + isDeletable: boolean; +}; + +export type DatabaseInstallRequestModel = { + id: string; + providerName: string; + server?: string | null; + name?: string | null; + username?: string | null; + password?: string | null; + useIntegratedAuthentication: boolean; + connectionString?: string | null; + trustServerCertificate: boolean; +}; + +export type DatabaseSettingsPresentationModel = { + id: string; + sortOrder: number; + displayName: string; + defaultDatabaseName: string; + providerName: string; + isConfigured: boolean; + requiresServer: boolean; + serverPlaceholder: string; + requiresCredentials: boolean; + supportsIntegratedAuthentication: boolean; + requiresConnectionTest: boolean; +}; + +export type DatatypeConfigurationResponseModel = { + canBeChanged: DataTypeChangeModeModel; + documentListViewId: string; + mediaListViewId: string; +}; + +export type DefaultReferenceResponseModel = { + $type: string; + id: string; + name?: string | null; + type?: string | null; + icon?: string | null; +}; + +export type DeleteUserGroupsRequestModel = { + userGroupIds: Array; +}; + +export type DeleteUsersRequestModel = { + userIds: Array; +}; + +export type DictionaryItemItemResponseModel = { + id: string; + name: string; +}; + +export type DictionaryItemResponseModel = { + name: string; + translations: Array; + id: string; +}; + +export type DictionaryItemTranslationModel = { + isoCode: string; + translation: string; +}; + +export type DictionaryOverviewResponseModel = { + name?: string | null; + id: string; + parent?: ReferenceByIdModel | null; + translatedIsoCodes: Array; +}; + +export enum DirectionModel { + ASCENDING = 'Ascending', + DESCENDING = 'Descending' +} + +export type DisableUserRequestModel = { + userIds: Array; +}; + +export type DocumentBlueprintItemResponseModel = { + id: string; + name: string; + documentType: DocumentTypeReferenceResponseModel; +}; + +export type DocumentBlueprintResponseModel = { + values: Array; + variants: Array; + id: string; + documentType: DocumentTypeReferenceResponseModel; +}; + +export type DocumentBlueprintTreeItemResponseModel = { + hasChildren: boolean; + id: string; + parent?: ReferenceByIdModel | null; + name: string; + isFolder: boolean; + documentType?: DocumentTypeReferenceResponseModel | null; +}; + +export type DocumentCollectionResponseModel = { + values: Array; + variants: Array; + id: string; + creator?: string | null; + sortOrder: number; + documentType: DocumentTypeCollectionReferenceResponseModel; + isTrashed: boolean; + isProtected: boolean; + ancestors: Array; + updater?: string | null; +}; + +export type DocumentConfigurationResponseModel = { + disableDeleteWhenReferenced: boolean; + disableUnpublishWhenReferenced: boolean; + allowEditInvariantFromNonDefault: boolean; + allowNonExistingSegmentsCreation: boolean; +}; + +export type DocumentItemResponseModel = { + id: string; + isTrashed: boolean; + isProtected: boolean; + parent?: ReferenceByIdModel | null; + hasChildren: boolean; + documentType: DocumentTypeReferenceResponseModel; + variants: Array; +}; + +export type DocumentNotificationResponseModel = { + actionId: string; + alias: string; + subscribed: boolean; +}; + +export type DocumentPermissionPresentationModel = { + $type: string; + document: ReferenceByIdModel; + verbs: Array; +}; + +export type DocumentPropertyValuePermissionPresentationModel = { + $type: string; + documentType: ReferenceByIdModel; + propertyType: ReferenceByIdModel; + verbs: Array; +}; + +export type DocumentRecycleBinItemResponseModel = { + id: string; + createDate: string; + hasChildren: boolean; + parent?: ItemReferenceByIdResponseModel | null; + documentType: DocumentTypeReferenceResponseModel; + variants: Array; +}; + +export type DocumentReferenceResponseModel = { + $type: string; + id: string; + name?: string | null; + published?: boolean | null; + documentType: TrackedReferenceDocumentTypeModel; + variants: Array; +}; + +export type DocumentResponseModel = { + values: Array; + variants: Array; + id: string; + documentType: DocumentTypeReferenceResponseModel; + urls: Array; + template?: ReferenceByIdModel | null; + isTrashed: boolean; +}; + +export type DocumentTreeItemResponseModel = { + hasChildren: boolean; + parent?: ReferenceByIdModel | null; + noAccess: boolean; + isTrashed: boolean; + id: string; + createDate: string; + isProtected: boolean; + ancestors: Array; + documentType: DocumentTypeReferenceResponseModel; + variants: Array; +}; + +export type DocumentTypeBlueprintItemResponseModel = { + id: string; + name: string; +}; + +export type DocumentTypeCleanupModel = { + preventCleanup: boolean; + keepAllVersionsNewerThanDays?: number | null; + keepLatestVersionPerDayForDays?: number | null; +}; + +export type DocumentTypeCollectionReferenceResponseModel = { + id: string; + alias: string; + icon: string; +}; + +export type DocumentTypeCompositionModel = { + documentType: ReferenceByIdModel; + compositionType: CompositionTypeModel; +}; + +export type DocumentTypeCompositionRequestModel = { + id?: string | null; + currentPropertyAliases: Array; + currentCompositeIds: Array; + isElement: boolean; +}; + +export type DocumentTypeCompositionResponseModel = { + id: string; + name: string; + icon: string; +}; + +export type DocumentTypeConfigurationResponseModel = { + dataTypesCanBeChanged: DataTypeChangeModeModel; + disableTemplates: boolean; + useSegments: boolean; + reservedFieldNames: Array; +}; + +export type DocumentTypeItemResponseModel = { + id: string; + name: string; + isElement: boolean; + icon?: string | null; + description?: string | null; +}; + +export type DocumentTypePropertyTypeContainerResponseModel = { + id: string; + parent?: ReferenceByIdModel | null; + name?: string | null; + type: string; + sortOrder: number; +}; + +export type DocumentTypePropertyTypeReferenceResponseModel = { + $type: string; + id: string; + name?: string | null; + alias?: string | null; + documentType: TrackedReferenceDocumentTypeModel; +}; + +export type DocumentTypePropertyTypeResponseModel = { + id: string; + container?: ReferenceByIdModel | null; + sortOrder: number; + alias: string; + name: string; + description?: string | null; + dataType: ReferenceByIdModel; + variesByCulture: boolean; + variesBySegment: boolean; + validation: PropertyTypeValidationModel; + appearance: PropertyTypeAppearanceModel; +}; + +export type DocumentTypeReferenceResponseModel = { + id: string; + icon: string; + collection?: ReferenceByIdModel | null; +}; + +export type DocumentTypeResponseModel = { + alias: string; + name: string; + description?: string | null; + icon: string; + allowedAsRoot: boolean; + variesByCulture: boolean; + variesBySegment: boolean; + collection?: ReferenceByIdModel | null; + isElement: boolean; + properties: Array; + containers: Array; + id: string; + allowedTemplates: Array; + defaultTemplate?: ReferenceByIdModel | null; + cleanup: DocumentTypeCleanupModel; + allowedDocumentTypes: Array; + compositions: Array; +}; + +export type DocumentTypeSortModel = { + documentType: ReferenceByIdModel; + sortOrder: number; +}; + +export type DocumentTypeTreeItemResponseModel = { + hasChildren: boolean; + id: string; + parent?: ReferenceByIdModel | null; + name: string; + isFolder: boolean; + isElement: boolean; + icon: string; +}; + +export type DocumentUrlInfoModel = { + culture: string | null; + url: string; +}; + +export type DocumentUrlInfoResponseModel = { + id: string; + urlInfos: Array; +}; + +export type DocumentValueModel = { + culture?: string | null; + segment?: string | null; + alias: string; + value?: unknown; +}; + +export type DocumentValueResponseModel = { + culture?: string | null; + segment?: string | null; + alias: string; + value?: unknown; + editorAlias: string; +}; + +export type DocumentVariantItemResponseModel = { + name: string; + culture?: string | null; + state: DocumentVariantStateModel; +}; + +export type DocumentVariantRequestModel = { + culture?: string | null; + segment?: string | null; + name: string; +}; + +export type DocumentVariantResponseModel = { + culture?: string | null; + segment?: string | null; + name: string; + createDate: string; + updateDate: string; + state: DocumentVariantStateModel; + publishDate?: string | null; + scheduledPublishDate?: string | null; + scheduledUnpublishDate?: string | null; +}; + +export enum DocumentVariantStateModel { + NOT_CREATED = 'NotCreated', + DRAFT = 'Draft', + PUBLISHED = 'Published', + PUBLISHED_PENDING_CHANGES = 'PublishedPendingChanges' +} + +export type DocumentVersionItemResponseModel = { + id: string; + document: ReferenceByIdModel; + documentType: ReferenceByIdModel; + user: ReferenceByIdModel; + versionDate: string; + isCurrentPublishedVersion: boolean; + isCurrentDraftVersion: boolean; + preventCleanup: boolean; +}; + +export type DocumentVersionResponseModel = { + values: Array; + variants: Array; + id: string; + documentType: DocumentTypeReferenceResponseModel; + document?: ReferenceByIdModel | null; +}; + +export type DomainPresentationModel = { + domainName: string; + isoCode: string; +}; + +export type DomainsResponseModel = { + defaultIsoCode?: string | null; + domains: Array; +}; + +export type DynamicRootContextRequestModel = { + id?: string | null; + parent: ReferenceByIdModel; + culture?: string | null; + segment?: string | null; +}; + +export type DynamicRootQueryOriginRequestModel = { + alias: string; + id?: string | null; +}; + +export type DynamicRootQueryRequestModel = { + origin: DynamicRootQueryOriginRequestModel; + steps: Array; +}; + +export type DynamicRootQueryStepRequestModel = { + alias: string; + documentTypeIds: Array; +}; + +export type DynamicRootRequestModel = { + context: DynamicRootContextRequestModel; + query: DynamicRootQueryRequestModel; +}; + +export type DynamicRootResponseModel = { + roots: Array; +}; + +export type EnableTwoFactorRequestModel = { + code: string; + secret: string; +}; + +export type EnableUserRequestModel = { + userIds: Array; +}; + +export type EntityImportAnalysisResponseModel = { + entityType: string; + alias?: string | null; + key?: string | null; +}; + +export enum EventMessageTypeModel { + DEFAULT = 'Default', + INFO = 'Info', + ERROR = 'Error', + SUCCESS = 'Success', + WARNING = 'Warning' +} + +export type FieldPresentationModel = { + name: string; + values: Array; +}; + +export type FileSystemFolderModel = { + path: string; +}; + +export type FileSystemTreeItemPresentationModel = { + hasChildren: boolean; + name: string; + path: string; + parent?: FileSystemFolderModel | null; + isFolder: boolean; +}; + +export type FolderResponseModel = { + name: string; + id: string; +}; + +export type HealthCheckActionRequestModel = { + healthCheck: ReferenceByIdModel; + alias?: string | null; + name?: string | null; + description?: string | null; + valueRequired: boolean; + providedValue?: string | null; + providedValueValidation?: string | null; + providedValueValidationRegex?: string | null; + actionParameters?: {} | null; +}; + +export type HealthCheckGroupPresentationModel = { + name: string; + checks: Array; +}; + +export type HealthCheckGroupResponseModel = { + name: string; +}; + +export type HealthCheckGroupWithResultResponseModel = { + checks: Array; +}; + +export type HealthCheckModel = { + id: string; + name: string; + description?: string | null; +}; + +export type HealthCheckResultResponseModel = { + message: string; + resultType: StatusResultTypeModel; + actions?: Array | null; + readMoreLink?: string | null; +}; + +export type HealthCheckWithResultPresentationModel = { + id: string; + results?: Array | null; +}; + +export enum HealthStatusModel { + HEALTHY = 'Healthy', + UNHEALTHY = 'Unhealthy', + REBUILDING = 'Rebuilding', + CORRUPT = 'Corrupt' +} + +export type HealthStatusResponseModel = { + status: HealthStatusModel; + message?: string | null; +}; + +export type HelpPageResponseModel = { + name?: string | null; + description?: string | null; + url?: string | null; + type?: string | null; +}; + +export enum ImageCropModeModel { + CROP = 'Crop', + MAX = 'Max', + STRETCH = 'Stretch', + PAD = 'Pad', + BOX_PAD = 'BoxPad', + MIN = 'Min' +} + +export type ImportDictionaryRequestModel = { + temporaryFile: ReferenceByIdModel; + parent?: ReferenceByIdModel | null; +}; + +export type ImportDocumentTypeRequestModel = { + file: ReferenceByIdModel; +}; + +export type ImportMediaTypeRequestModel = { + file: ReferenceByIdModel; +}; + +export type IndexResponseModel = { + name: string; + healthStatus: HealthStatusResponseModel; + canRebuild: boolean; + searcherName: string; + documentCount: number; + fieldCount: number; + providerProperties?: {} | null; +}; + +export type InstallRequestModelReadable = { + user: UserInstallRequestModelReadable; + database: DatabaseInstallRequestModel; + telemetryLevel: TelemetryLevelModel; +}; + +export type InstallRequestModelWritable = { + user: UserInstallRequestModelWritable; + database: DatabaseInstallRequestModel; + telemetryLevel: TelemetryLevelModel; +}; + +export type InstallSettingsResponseModel = { + user: UserSettingsPresentationModel; + databases: Array; +}; + +export type InviteUserRequestModel = { + email: string; + userName: string; + name: string; + userGroupIds: Array; + id?: string | null; + message?: string | null; +}; + +export type ItemReferenceByIdResponseModel = { + id: string; +}; + +export type ItemSortingRequestModel = { + id: string; + sortOrder: number; +}; + +export type LanguageItemResponseModel = { + name: string; + isoCode: string; +}; + +export type LanguageResponseModel = { + name: string; + isDefault: boolean; + isMandatory: boolean; + fallbackIsoCode?: string | null; + isoCode: string; +}; + +export type LogLevelCountsReponseModel = { + information: number; + debug: number; + warning: number; + error: number; + fatal: number; +}; + +export enum LogLevelModel { + VERBOSE = 'Verbose', + DEBUG = 'Debug', + INFORMATION = 'Information', + WARNING = 'Warning', + ERROR = 'Error', + FATAL = 'Fatal' +} + +export type LogMessagePropertyPresentationModel = { + name: string; + value?: string | null; +}; + +export type LogMessageResponseModel = { + timestamp: string; + level: LogLevelModel; + messageTemplate?: string | null; + renderedMessage?: string | null; + properties: Array; + exception?: string | null; +}; + +export type LogTemplateResponseModel = { + messageTemplate?: string | null; + count: number; +}; + +export type LoggerResponseModel = { + name: string; + level: LogLevelModel; +}; + +export type ManifestResponseModel = { + name: string; + id?: string | null; + version?: string | null; + extensions: Array; +}; + +export type MediaCollectionResponseModel = { + values: Array; + variants: Array; + id: string; + creator?: string | null; + sortOrder: number; + mediaType: MediaTypeCollectionReferenceResponseModel; +}; + +export type MediaConfigurationResponseModel = { + disableDeleteWhenReferenced: boolean; + disableUnpublishWhenReferenced: boolean; +}; + +export type MediaItemResponseModel = { + id: string; + isTrashed: boolean; + parent?: ReferenceByIdModel | null; + hasChildren: boolean; + mediaType: MediaTypeReferenceResponseModel; + variants: Array; +}; + +export type MediaRecycleBinItemResponseModel = { + id: string; + createDate: string; + hasChildren: boolean; + parent?: ItemReferenceByIdResponseModel | null; + mediaType: MediaTypeReferenceResponseModel; + variants: Array; +}; + +export type MediaReferenceResponseModel = { + $type: string; + id: string; + name?: string | null; + mediaType: TrackedReferenceMediaTypeModel; +}; + +export type MediaResponseModel = { + values: Array; + variants: Array; + id: string; + urls: Array; + isTrashed: boolean; + mediaType: MediaTypeReferenceResponseModel; +}; + +export type MediaTreeItemResponseModel = { + hasChildren: boolean; + parent?: ReferenceByIdModel | null; + noAccess: boolean; + isTrashed: boolean; + id: string; + createDate: string; + mediaType: MediaTypeReferenceResponseModel; + variants: Array; +}; + +export type MediaTypeCollectionReferenceResponseModel = { + id: string; + alias: string; + icon: string; +}; + +export type MediaTypeCompositionModel = { + mediaType: ReferenceByIdModel; + compositionType: CompositionTypeModel; +}; + +export type MediaTypeCompositionRequestModel = { + id?: string | null; + currentPropertyAliases: Array; + currentCompositeIds: Array; +}; + +export type MediaTypeCompositionResponseModel = { + id: string; + name: string; + icon: string; +}; + +export type MediaTypeConfigurationResponseModel = { + reservedFieldNames: Array; +}; + +export type MediaTypeItemResponseModel = { + id: string; + name: string; + icon?: string | null; +}; + +export type MediaTypePropertyTypeContainerResponseModel = { + id: string; + parent?: ReferenceByIdModel | null; + name?: string | null; + type: string; + sortOrder: number; +}; + +export type MediaTypePropertyTypeReferenceResponseModel = { + $type: string; + id: string; + name?: string | null; + alias?: string | null; + mediaType: TrackedReferenceMediaTypeModel; +}; + +export type MediaTypePropertyTypeResponseModel = { + id: string; + container?: ReferenceByIdModel | null; + sortOrder: number; + alias: string; + name: string; + description?: string | null; + dataType: ReferenceByIdModel; + variesByCulture: boolean; + variesBySegment: boolean; + validation: PropertyTypeValidationModel; + appearance: PropertyTypeAppearanceModel; +}; + +export type MediaTypeReferenceResponseModel = { + id: string; + icon: string; + collection?: ReferenceByIdModel | null; +}; + +export type MediaTypeResponseModel = { + alias: string; + name: string; + description?: string | null; + icon: string; + allowedAsRoot: boolean; + variesByCulture: boolean; + variesBySegment: boolean; + collection?: ReferenceByIdModel | null; + isElement: boolean; + properties: Array; + containers: Array; + id: string; + allowedMediaTypes: Array; + compositions: Array; + isDeletable: boolean; + aliasCanBeChanged: boolean; +}; + +export type MediaTypeSortModel = { + mediaType: ReferenceByIdModel; + sortOrder: number; +}; + +export type MediaTypeTreeItemResponseModel = { + hasChildren: boolean; + id: string; + parent?: ReferenceByIdModel | null; + name: string; + isFolder: boolean; + icon: string; + isDeletable: boolean; +}; + +export type MediaUrlInfoModel = { + culture: string | null; + url: string; +}; + +export type MediaUrlInfoResponseModel = { + id: string; + urlInfos: Array; +}; + +export type MediaValueModel = { + culture?: string | null; + segment?: string | null; + alias: string; + value?: unknown; +}; + +export type MediaValueResponseModel = { + culture?: string | null; + segment?: string | null; + alias: string; + value?: unknown; + editorAlias: string; +}; + +export type MediaVariantRequestModel = { + culture?: string | null; + segment?: string | null; + name: string; +}; + +export type MediaVariantResponseModel = { + culture?: string | null; + segment?: string | null; + name: string; + createDate: string; + updateDate: string; +}; + +export type MemberConfigurationResponseModel = { + [key: string]: never; +}; + +export type MemberGroupItemResponseModel = { + id: string; + name: string; +}; + +export type MemberGroupResponseModel = { + name: string; + id: string; +}; + +export type MemberItemResponseModel = { + id: string; + memberType: MemberTypeReferenceResponseModel; + variants: Array; + kind: MemberKindModel; +}; + +export enum MemberKindModel { + DEFAULT = 'Default', + API = 'Api' +} + +export type MemberReferenceResponseModel = { + $type: string; + id: string; + name?: string | null; + memberType: TrackedReferenceMemberTypeModel; +}; + +export type MemberResponseModel = { + values: Array; + variants: Array; + id: string; + email: string; + username: string; + memberType: MemberTypeReferenceResponseModel; + isApproved: boolean; + isLockedOut: boolean; + isTwoFactorEnabled: boolean; + failedPasswordAttempts: number; + lastLoginDate?: string | null; + lastLockoutDate?: string | null; + lastPasswordChangeDate?: string | null; + groups: Array; + kind: MemberKindModel; +}; + +export type MemberTypeCompositionModel = { + memberType: ReferenceByIdModel; + compositionType: CompositionTypeModel; +}; + +export type MemberTypeCompositionRequestModel = { + id?: string | null; + currentPropertyAliases: Array; + currentCompositeIds: Array; +}; + +export type MemberTypeCompositionResponseModel = { + id: string; + name: string; + icon: string; +}; + +export type MemberTypeConfigurationResponseModel = { + reservedFieldNames: Array; +}; + +export type MemberTypeItemResponseModel = { + id: string; + name: string; + icon?: string | null; +}; + +export type MemberTypePropertyTypeContainerResponseModel = { + id: string; + parent?: ReferenceByIdModel | null; + name?: string | null; + type: string; + sortOrder: number; +}; + +export type MemberTypePropertyTypeReferenceResponseModel = { + $type: string; + id: string; + name?: string | null; + alias?: string | null; + memberType: TrackedReferenceMemberTypeModel; +}; + +export type MemberTypePropertyTypeResponseModel = { + id: string; + container?: ReferenceByIdModel | null; + sortOrder: number; + alias: string; + name: string; + description?: string | null; + dataType: ReferenceByIdModel; + variesByCulture: boolean; + variesBySegment: boolean; + validation: PropertyTypeValidationModel; + appearance: PropertyTypeAppearanceModel; + isSensitive: boolean; + visibility: MemberTypePropertyTypeVisibilityModel; +}; + +export type MemberTypePropertyTypeVisibilityModel = { + memberCanView: boolean; + memberCanEdit: boolean; +}; + +export type MemberTypeReferenceResponseModel = { + id: string; + icon: string; + collection?: ReferenceByIdModel | null; +}; + +export type MemberTypeResponseModel = { + alias: string; + name: string; + description?: string | null; + icon: string; + allowedAsRoot: boolean; + variesByCulture: boolean; + variesBySegment: boolean; + collection?: ReferenceByIdModel | null; + isElement: boolean; + properties: Array; + containers: Array; + id: string; + compositions: Array; +}; + +export type MemberTypeTreeItemResponseModel = { + hasChildren: boolean; + id: string; + parent?: ReferenceByIdModel | null; + name: string; + icon: string; +}; + +export type MemberValueModel = { + culture?: string | null; + segment?: string | null; + alias: string; + value?: unknown; +}; + +export type MemberValueResponseModel = { + culture?: string | null; + segment?: string | null; + alias: string; + value?: unknown; + editorAlias: string; +}; + +export type MemberVariantRequestModel = { + culture?: string | null; + segment?: string | null; + name: string; +}; + +export type MemberVariantResponseModel = { + culture?: string | null; + segment?: string | null; + name: string; + createDate: string; + updateDate: string; +}; + +export type ModelsBuilderResponseModel = { + mode: ModelsModeModel; + canGenerate: boolean; + outOfDateModels: boolean; + lastError?: string | null; + version?: string | null; + modelsNamespace?: string | null; + trackingOutOfDateModels: boolean; +}; + +export enum ModelsModeModel { + NOTHING = 'Nothing', + IN_MEMORY_AUTO = 'InMemoryAuto', + SOURCE_CODE_MANUAL = 'SourceCodeManual', + SOURCE_CODE_AUTO = 'SourceCodeAuto' +} + +export type MoveDataTypeRequestModel = { + target?: ReferenceByIdModel | null; +}; + +export type MoveDictionaryRequestModel = { + target?: ReferenceByIdModel | null; +}; + +export type MoveDocumentBlueprintRequestModel = { + target?: ReferenceByIdModel | null; +}; + +export type MoveDocumentRequestModel = { + target?: ReferenceByIdModel | null; +}; + +export type MoveDocumentTypeRequestModel = { + target?: ReferenceByIdModel | null; +}; + +export type MoveMediaRequestModel = { + target?: ReferenceByIdModel | null; +}; + +export type MoveMediaTypeRequestModel = { + target?: ReferenceByIdModel | null; +}; + +export type NamedEntityTreeItemResponseModel = { + hasChildren: boolean; + id: string; + parent?: ReferenceByIdModel | null; + name: string; +}; + +export type NoopSetupTwoFactorModel = { + [key: string]: never; +}; + +export type NotificationHeaderModel = { + message: string; + category: string; + type: EventMessageTypeModel; +}; + +export type OEmbedResponseModel = { + markup: string; +}; + +export type ObjectTypeResponseModel = { + name?: string | null; + id: string; +}; + +export enum OperatorModel { + EQUALS = 'Equals', + NOT_EQUALS = 'NotEquals', + CONTAINS = 'Contains', + NOT_CONTAINS = 'NotContains', + LESS_THAN = 'LessThan', + LESS_THAN_EQUAL_TO = 'LessThanEqualTo', + GREATER_THAN = 'GreaterThan', + GREATER_THAN_EQUAL_TO = 'GreaterThanEqualTo' +} + +export type OutOfDateStatusResponseModel = { + status: OutOfDateTypeModel; +}; + +export enum OutOfDateTypeModel { + OUT_OF_DATE = 'OutOfDate', + CURRENT = 'Current', + UNKNOWN = 'Unknown' +} + +export type PackageConfigurationResponseModel = { + marketplaceUrl: string; +}; + +export type PackageDefinitionResponseModelReadable = { + name: string; + contentNodeId?: string | null; + contentLoadChildNodes: boolean; + mediaIds: Array; + mediaLoadChildNodes: boolean; + documentTypes: Array; + mediaTypes: Array; + dataTypes: Array; + templates: Array; + partialViews: Array; + stylesheets: Array; + scripts: Array; + languages: Array; + dictionaryItems: Array; + id: string; + readonly packagePath: string; +}; + +export type PackageDefinitionResponseModelWritable = { + name: string; + contentNodeId?: string | null; + contentLoadChildNodes: boolean; + mediaIds: Array; + mediaLoadChildNodes: boolean; + documentTypes: Array; + mediaTypes: Array; + dataTypes: Array; + templates: Array; + partialViews: Array; + stylesheets: Array; + scripts: Array; + languages: Array; + dictionaryItems: Array; + id: string; +}; + +export type PackageMigrationStatusResponseModel = { + packageName: string; + hasPendingMigrations: boolean; +}; + +export type PagedAllowedDocumentTypeModel = { + total: number; + items: Array; +}; + +export type PagedAllowedMediaTypeModel = { + total: number; + items: Array; +}; + +export type PagedAuditLogResponseModel = { + total: number; + items: Array; +}; + +export type PagedCultureReponseModel = { + total: number; + items: Array; +}; + +export type PagedDataTypeItemResponseModel = { + total: number; + items: Array; +}; + +export type PagedDataTypeTreeItemResponseModel = { + total: number; + items: Array; +}; + +export type PagedDictionaryOverviewResponseModel = { + total: number; + items: Array; +}; + +export type PagedDocumentBlueprintTreeItemResponseModel = { + total: number; + items: Array; +}; + +export type PagedDocumentCollectionResponseModel = { + total: number; + items: Array; +}; + +export type PagedDocumentRecycleBinItemResponseModel = { + total: number; + items: Array; +}; + +export type PagedDocumentTreeItemResponseModel = { + total: number; + items: Array; +}; + +export type PagedDocumentTypeBlueprintItemResponseModel = { + total: number; + items: Array; +}; + +export type PagedDocumentTypeTreeItemResponseModel = { + total: number; + items: Array; +}; + +export type PagedDocumentVersionItemResponseModel = { + total: number; + items: Array; +}; + +export type PagedFileSystemTreeItemPresentationModel = { + total: number; + items: Array; +}; + +export type PagedHealthCheckGroupResponseModel = { + total: number; + items: Array; +}; + +export type PagedHelpPageResponseModel = { + total: number; + items: Array; +}; + +export type PagedIReferenceResponseModel = { + total: number; + items: Array; +}; + +export type PagedIndexResponseModel = { + total: number; + items: Array; +}; + +export type PagedLanguageResponseModel = { + total: number; + items: Array; +}; + +export type PagedLogMessageResponseModel = { + total: number; + items: Array; +}; + +export type PagedLogTemplateResponseModel = { + total: number; + items: Array; +}; + +export type PagedLoggerResponseModel = { + total: number; + items: Array; +}; + +export type PagedMediaCollectionResponseModel = { + total: number; + items: Array; +}; + +export type PagedMediaRecycleBinItemResponseModel = { + total: number; + items: Array; +}; + +export type PagedMediaTreeItemResponseModel = { + total: number; + items: Array; +}; + +export type PagedMediaTypeTreeItemResponseModel = { + total: number; + items: Array; +}; + +export type PagedMemberGroupResponseModel = { + total: number; + items: Array; +}; + +export type PagedMemberResponseModel = { + total: number; + items: Array; +}; + +export type PagedMemberTypeTreeItemResponseModel = { + total: number; + items: Array; +}; + +export type PagedModelDataTypeItemResponseModel = { + items: Array; + total: number; +}; + +export type PagedModelDocumentItemResponseModel = { + items: Array; + total: number; +}; + +export type PagedModelDocumentTypeItemResponseModel = { + items: Array; + total: number; +}; + +export type PagedModelMediaItemResponseModel = { + items: Array; + total: number; +}; + +export type PagedModelMediaTypeItemResponseModel = { + items: Array; + total: number; +}; + +export type PagedModelMemberItemResponseModel = { + items: Array; + total: number; +}; + +export type PagedModelMemberTypeItemResponseModel = { + items: Array; + total: number; +}; + +export type PagedModelTemplateItemResponseModel = { + items: Array; + total: number; +}; + +export type PagedNamedEntityTreeItemResponseModel = { + total: number; + items: Array; +}; + +export type PagedObjectTypeResponseModel = { + total: number; + items: Array; +}; + +export type PagedPackageDefinitionResponseModelReadable = { + total: number; + items: Array; +}; + +export type PagedPackageDefinitionResponseModelWritable = { + total: number; + items: Array; +}; + +export type PagedPackageMigrationStatusResponseModel = { + total: number; + items: Array; +}; + +export type PagedPartialViewSnippetItemResponseModel = { + total: number; + items: Array; +}; + +export type PagedProblemDetailsModel = { + total: number; + items: Array; +}; + +export type PagedRedirectUrlResponseModel = { + total: number; + items: Array; +}; + +export type PagedReferenceByIdModel = { + total: number; + items: Array; +}; + +export type PagedRelationResponseModelReadable = { + total: number; + items: Array; +}; + +export type PagedRelationResponseModelWritable = { + total: number; + items: Array; +}; + +export type PagedRelationTypeResponseModel = { + total: number; + items: Array; +}; + +export type PagedSavedLogSearchResponseModel = { + total: number; + items: Array; +}; + +export type PagedSearchResultResponseModelReadable = { + total: number; + items: Array; +}; + +export type PagedSearchResultResponseModelWritable = { + total: number; + items: Array; +}; + +export type PagedSearcherResponseModel = { + total: number; + items: Array; +}; + +export type PagedSegmentResponseModel = { + total: number; + items: Array; +}; + +export type PagedTagResponseModel = { + total: number; + items: Array; +}; + +export type PagedTelemetryResponseModel = { + total: number; + items: Array; +}; + +export type PagedUserDataResponseModel = { + total: number; + items: Array; +}; + +export type PagedUserGroupResponseModel = { + total: number; + items: Array; +}; + +export type PagedUserResponseModel = { + total: number; + items: Array; +}; + +export type PagedWebhookEventModel = { + total: number; + items: Array; +}; + +export type PagedWebhookLogResponseModel = { + total: number; + items: Array; +}; + +export type PagedWebhookResponseModel = { + total: number; + items: Array; +}; + +export type PartialViewFolderResponseModel = { + path: string; + name: string; + parent?: FileSystemFolderModel | null; +}; + +export type PartialViewItemResponseModel = { + path: string; + name: string; + parent?: FileSystemFolderModel | null; + isFolder: boolean; +}; + +export type PartialViewResponseModel = { + path: string; + name: string; + parent?: FileSystemFolderModel | null; + content: string; +}; + +export type PartialViewSnippetItemResponseModel = { + id: string; + name: string; +}; + +export type PartialViewSnippetResponseModel = { + id: string; + name: string; + content: string; +}; + +export type PasswordConfigurationResponseModel = { + minimumPasswordLength: number; + requireNonLetterOrDigit: boolean; + requireDigit: boolean; + requireLowercase: boolean; + requireUppercase: boolean; +}; + +export type ProblemDetails = { + type?: string | null; + title?: string | null; + status?: number | null; + detail?: string | null; + instance?: string | null; + [key: string]: unknown | (string | null) | (string | null) | (number | null) | (string | null) | (string | null) | undefined; +}; + +export type ProblemDetailsBuilderModel = { + [key: string]: never; +}; + +export type ProfilingStatusRequestModel = { + enabled: boolean; +}; + +export type ProfilingStatusResponseModel = { + enabled: boolean; +}; + +export type PropertyTypeAppearanceModel = { + labelOnTop: boolean; +}; + +export type PropertyTypeValidationModel = { + mandatory: boolean; + mandatoryMessage?: string | null; + regEx?: string | null; + regExMessage?: string | null; +}; + +export type PublicAccessRequestModel = { + loginDocument: ReferenceByIdModel; + errorDocument: ReferenceByIdModel; + memberUserNames: Array; + memberGroupNames: Array; +}; + +export type PublicAccessResponseModel = { + loginDocument: ReferenceByIdModel; + errorDocument: ReferenceByIdModel; + members: Array; + groups: Array; +}; + +export type PublishDocumentRequestModel = { + publishSchedules: Array; +}; + +export type PublishDocumentWithDescendantsRequestModel = { + includeUnpublishedDescendants: boolean; + cultures: Array; +}; + +export type PublishWithDescendantsResultModel = { + taskId: string; + isComplete: boolean; +}; + +export type PublishedDocumentResponseModel = { + values: Array; + variants: Array; + id: string; + documentType: DocumentTypeReferenceResponseModel; + urls: Array; + template?: ReferenceByIdModel | null; + isTrashed: boolean; +}; + +export type RebuildStatusModel = { + isRebuilding: boolean; +}; + +export enum RedirectStatusModel { + ENABLED = 'Enabled', + DISABLED = 'Disabled' +} + +export type RedirectUrlResponseModel = { + id: string; + originalUrl: string; + destinationUrl: string; + created: string; + document: ReferenceByIdModel; + culture?: string | null; +}; + +export type RedirectUrlStatusResponseModel = { + status: RedirectStatusModel; + userIsAdmin: boolean; +}; + +export type ReferenceByIdModel = { + id: string; +}; + +export type RelationReferenceModel = { + id: string; + name?: string | null; +}; + +export type RelationResponseModelReadable = { + id: string; + relationType: ReferenceByIdModel; + parent: RelationReferenceModel; + child: RelationReferenceModel; + readonly createDate: string; + readonly comment?: string | null; +}; + +export type RelationResponseModelWritable = { + id: string; + relationType: ReferenceByIdModel; + parent: RelationReferenceModel; + child: RelationReferenceModel; +}; + +export type RelationTypeItemResponseModel = { + id: string; + name: string; + isDeletable: boolean; +}; + +export type RelationTypeResponseModel = { + name: string; + isBidirectional: boolean; + isDependency: boolean; + id: string; + alias?: string | null; + parentObject?: ObjectTypeResponseModel | null; + childObject?: ObjectTypeResponseModel | null; +}; + +export type RenamePartialViewRequestModel = { + name: string; +}; + +export type RenameScriptRequestModel = { + name: string; +}; + +export type RenameStylesheetRequestModel = { + name: string; +}; + +export type ResendInviteUserRequestModel = { + user: ReferenceByIdModel; + message?: string | null; +}; + +export type ResetPasswordRequestModel = { + email: string; +}; + +export type ResetPasswordTokenRequestModel = { + user: ReferenceByIdModel; + resetCode: string; + password: string; +}; + +export type ResetPasswordUserResponseModel = { + resetPassword?: string | null; +}; + +export enum RuntimeLevelModel { + UNKNOWN = 'Unknown', + BOOT = 'Boot', + INSTALL = 'Install', + UPGRADE = 'Upgrade', + RUN = 'Run', + BOOT_FAILED = 'BootFailed' +} + +export enum RuntimeModeModel { + BACKOFFICE_DEVELOPMENT = 'BackofficeDevelopment', + DEVELOPMENT = 'Development', + PRODUCTION = 'Production' +} + +export type SavedLogSearchRequestModel = { + name: string; + query: string; +}; + +export type SavedLogSearchResponseModel = { + name: string; + query: string; +}; + +export type ScheduleRequestModel = { + publishTime?: string | null; + unpublishTime?: string | null; +}; + +export type ScriptFolderResponseModel = { + path: string; + name: string; + parent?: FileSystemFolderModel | null; +}; + +export type ScriptItemResponseModel = { + path: string; + name: string; + parent?: FileSystemFolderModel | null; + isFolder: boolean; +}; + +export type ScriptResponseModel = { + path: string; + name: string; + parent?: FileSystemFolderModel | null; + content: string; +}; + +export type SearchResultResponseModelReadable = { + id: string; + score: number; + readonly fieldCount: number; + fields: Array; +}; + +export type SearchResultResponseModelWritable = { + id: string; + score: number; + fields: Array; +}; + +export type SearcherResponseModel = { + name: string; +}; + +export type SecurityConfigurationResponseModel = { + passwordConfiguration: PasswordConfigurationResponseModel; +}; + +export type SegmentResponseModel = { + name: string; + alias: string; +}; + +export type ServerConfigurationItemResponseModel = { + name: string; + data: string; +}; + +export type ServerConfigurationResponseModel = { + allowPasswordReset: boolean; + versionCheckPeriod: number; + allowLocalLogin: boolean; +}; + +export type ServerInformationResponseModel = { + version: string; + assemblyVersion: string; + baseUtcOffset: string; + runtimeMode: RuntimeModeModel; +}; + +export type ServerStatusResponseModel = { + serverStatus: RuntimeLevelModel; +}; + +export type ServerTroubleshootingResponseModel = { + items: Array; +}; + +export type SetAvatarRequestModel = { + file: ReferenceByIdModel; +}; + +export type SortingRequestModel = { + parent?: ReferenceByIdModel | null; + sorting: Array; +}; + +export type StaticFileItemResponseModel = { + path: string; + name: string; + parent?: FileSystemFolderModel | null; + isFolder: boolean; +}; + +export enum StatusResultTypeModel { + SUCCESS = 'Success', + WARNING = 'Warning', + ERROR = 'Error', + INFO = 'Info' +} + +export type StylesheetFolderResponseModel = { + path: string; + name: string; + parent?: FileSystemFolderModel | null; +}; + +export type StylesheetItemResponseModel = { + path: string; + name: string; + parent?: FileSystemFolderModel | null; + isFolder: boolean; +}; + +export type StylesheetResponseModel = { + path: string; + name: string; + parent?: FileSystemFolderModel | null; + content: string; +}; + +export type TagResponseModel = { + id: string; + text?: string | null; + group?: string | null; + nodeCount: number; +}; + +export enum TelemetryLevelModel { + MINIMAL = 'Minimal', + BASIC = 'Basic', + DETAILED = 'Detailed' +} + +export type TelemetryRequestModel = { + telemetryLevel: TelemetryLevelModel; +}; + +export type TelemetryResponseModel = { + telemetryLevel: TelemetryLevelModel; +}; + +export type TemplateConfigurationResponseModel = { + disabled: boolean; +}; + +export type TemplateItemResponseModel = { + id: string; + name: string; + alias: string; +}; + +export type TemplateQueryExecuteFilterPresentationModel = { + propertyAlias: string; + constraintValue: string; + operator: OperatorModel; +}; + +export type TemplateQueryExecuteModel = { + rootDocument?: ReferenceByIdModel | null; + documentTypeAlias?: string | null; + filters?: Array | null; + sort?: TemplateQueryExecuteSortModel | null; + take: number; +}; + +export type TemplateQueryExecuteSortModel = { + propertyAlias: string; + direction?: string | null; +}; + +export type TemplateQueryOperatorModel = { + operator: OperatorModel; + applicableTypes: Array; +}; + +export type TemplateQueryPropertyPresentationModel = { + alias: string; + type: TemplateQueryPropertyTypeModel; +}; + +export enum TemplateQueryPropertyTypeModel { + STRING = 'String', + DATE_TIME = 'DateTime', + INTEGER = 'Integer' +} + +export type TemplateQueryResultItemPresentationModel = { + icon: string; + name: string; +}; + +export type TemplateQueryResultResponseModel = { + queryExpression: string; + sampleResults: Array; + resultCount: number; + executionTime: number; +}; + +export type TemplateQuerySettingsResponseModel = { + documentTypeAliases: Array; + properties: Array; + operators: Array; +}; + +export type TemplateResponseModel = { + name: string; + alias: string; + content?: string | null; + id: string; + masterTemplate?: ReferenceByIdModel | null; +}; + +export type TemporaryFileConfigurationResponseModel = { + imageFileTypes: Array; + disallowedUploadedFilesExtensions: Array; + allowedUploadedFileExtensions: Array; + maxFileSize?: number | null; +}; + +export type TemporaryFileResponseModel = { + id: string; + availableUntil?: string | null; + fileName: string; +}; + +export type TrackedReferenceDocumentTypeModel = { + id: string; + icon?: string | null; + alias?: string | null; + name?: string | null; +}; + +export type TrackedReferenceMediaTypeModel = { + id: string; + icon?: string | null; + alias?: string | null; + name?: string | null; +}; + +export type TrackedReferenceMemberTypeModel = { + id: string; + icon?: string | null; + alias?: string | null; + name?: string | null; +}; + +export type UnknownTypePermissionPresentationModel = { + $type: string; + verbs: Array; + context: string; +}; + +export type UnlockUsersRequestModel = { + userIds: Array; +}; + +export type UnpublishDocumentRequestModel = { + cultures?: Array | null; +}; + +export type UpdateDataTypeRequestModel = { + name: string; + editorAlias: string; + editorUiAlias: string; + values: Array; +}; + +export type UpdateDictionaryItemRequestModel = { + name: string; + translations: Array; +}; + +export type UpdateDocumentBlueprintRequestModel = { + values: Array; + variants: Array; +}; + +export type UpdateDocumentNotificationsRequestModel = { + subscribedActionIds: Array; +}; + +export type UpdateDocumentRequestModel = { + values: Array; + variants: Array; + template?: ReferenceByIdModel | null; +}; + +export type UpdateDocumentTypePropertyTypeContainerRequestModel = { + id: string; + parent?: ReferenceByIdModel | null; + name?: string | null; + type: string; + sortOrder: number; +}; + +export type UpdateDocumentTypePropertyTypeRequestModel = { + id: string; + container?: ReferenceByIdModel | null; + sortOrder: number; + alias: string; + name: string; + description?: string | null; + dataType: ReferenceByIdModel; + variesByCulture: boolean; + variesBySegment: boolean; + validation: PropertyTypeValidationModel; + appearance: PropertyTypeAppearanceModel; +}; + +export type UpdateDocumentTypeRequestModel = { + alias: string; + name: string; + description?: string | null; + icon: string; + allowedAsRoot: boolean; + variesByCulture: boolean; + variesBySegment: boolean; + collection?: ReferenceByIdModel | null; + isElement: boolean; + properties: Array; + containers: Array; + allowedTemplates: Array; + defaultTemplate?: ReferenceByIdModel | null; + cleanup: DocumentTypeCleanupModel; + allowedDocumentTypes: Array; + compositions: Array; +}; + +export type UpdateDomainsRequestModel = { + defaultIsoCode?: string | null; + domains: Array; +}; + +export type UpdateFolderResponseModel = { + name: string; +}; + +export type UpdateLanguageRequestModel = { + name: string; + isDefault: boolean; + isMandatory: boolean; + fallbackIsoCode?: string | null; +}; + +export type UpdateMediaRequestModel = { + values: Array; + variants: Array; +}; + +export type UpdateMediaTypePropertyTypeContainerRequestModel = { + id: string; + parent?: ReferenceByIdModel | null; + name?: string | null; + type: string; + sortOrder: number; +}; + +export type UpdateMediaTypePropertyTypeRequestModel = { + id: string; + container?: ReferenceByIdModel | null; + sortOrder: number; + alias: string; + name: string; + description?: string | null; + dataType: ReferenceByIdModel; + variesByCulture: boolean; + variesBySegment: boolean; + validation: PropertyTypeValidationModel; + appearance: PropertyTypeAppearanceModel; +}; + +export type UpdateMediaTypeRequestModel = { + alias: string; + name: string; + description?: string | null; + icon: string; + allowedAsRoot: boolean; + variesByCulture: boolean; + variesBySegment: boolean; + collection?: ReferenceByIdModel | null; + isElement: boolean; + properties: Array; + containers: Array; + allowedMediaTypes: Array; + compositions: Array; +}; + +export type UpdateMemberGroupRequestModel = { + name: string; +}; + +export type UpdateMemberRequestModel = { + values: Array; + variants: Array; + email: string; + username: string; + oldPassword?: string | null; + newPassword?: string | null; + groups?: Array | null; + isApproved: boolean; + isLockedOut: boolean; + isTwoFactorEnabled: boolean; +}; + +export type UpdateMemberTypePropertyTypeContainerRequestModel = { + id: string; + parent?: ReferenceByIdModel | null; + name?: string | null; + type: string; + sortOrder: number; +}; + +export type UpdateMemberTypePropertyTypeRequestModel = { + id: string; + container?: ReferenceByIdModel | null; + sortOrder: number; + alias: string; + name: string; + description?: string | null; + dataType: ReferenceByIdModel; + variesByCulture: boolean; + variesBySegment: boolean; + validation: PropertyTypeValidationModel; + appearance: PropertyTypeAppearanceModel; + isSensitive: boolean; + visibility: MemberTypePropertyTypeVisibilityModel; +}; + +export type UpdateMemberTypeRequestModel = { + alias: string; + name: string; + description?: string | null; + icon: string; + allowedAsRoot: boolean; + variesByCulture: boolean; + variesBySegment: boolean; + collection?: ReferenceByIdModel | null; + isElement: boolean; + properties: Array; + containers: Array; + compositions: Array; +}; + +export type UpdatePackageRequestModelReadable = { + name: string; + contentNodeId?: string | null; + contentLoadChildNodes: boolean; + mediaIds: Array; + mediaLoadChildNodes: boolean; + documentTypes: Array; + mediaTypes: Array; + dataTypes: Array; + templates: Array; + partialViews: Array; + stylesheets: Array; + scripts: Array; + languages: Array; + dictionaryItems: Array; + readonly packagePath: string; +}; + +export type UpdatePackageRequestModelWritable = { + name: string; + contentNodeId?: string | null; + contentLoadChildNodes: boolean; + mediaIds: Array; + mediaLoadChildNodes: boolean; + documentTypes: Array; + mediaTypes: Array; + dataTypes: Array; + templates: Array; + partialViews: Array; + stylesheets: Array; + scripts: Array; + languages: Array; + dictionaryItems: Array; +}; + +export type UpdatePartialViewRequestModel = { + content: string; +}; + +export type UpdateScriptRequestModel = { + content: string; +}; + +export type UpdateStylesheetRequestModel = { + content: string; +}; + +export type UpdateTemplateRequestModel = { + name: string; + alias: string; + content?: string | null; +}; + +export type UpdateUserDataRequestModel = { + group: string; + identifier: string; + value: string; + key: string; +}; + +export type UpdateUserGroupRequestModel = { + name: string; + alias: string; + icon?: string | null; + sections: Array; + languages: Array; + hasAccessToAllLanguages: boolean; + documentStartNode?: ReferenceByIdModel | null; + documentRootAccess: boolean; + mediaStartNode?: ReferenceByIdModel | null; + mediaRootAccess: boolean; + fallbackPermissions: Array; + permissions: Array; +}; + +export type UpdateUserGroupsOnUserRequestModel = { + userIds: Array; + userGroupIds: Array; +}; + +export type UpdateUserRequestModel = { + email: string; + userName: string; + name: string; + userGroupIds: Array; + languageIsoCode: string; + documentStartNodeIds: Array; + hasDocumentRootAccess: boolean; + mediaStartNodeIds: Array; + hasMediaRootAccess: boolean; +}; + +export type UpdateWebhookRequestModel = { + enabled: boolean; + name?: string | null; + description?: string | null; + url: string; + contentTypeKeys: Array; + headers: { + [key: string]: string; + }; + events: Array; +}; + +export type UpgradeCheckResponseModel = { + type: string; + comment: string; + url: string; +}; + +export type UpgradeSettingsResponseModelReadable = { + currentState: string; + newState: string; + newVersion: string; + oldVersion: string; + readonly reportUrl: string; +}; + +export type UpgradeSettingsResponseModelWritable = { + currentState: string; + newState: string; + newVersion: string; + oldVersion: string; +}; + +export type UserConfigurationResponseModel = { + canInviteUsers: boolean; + usernameIsEmail: boolean; + passwordConfiguration: PasswordConfigurationResponseModel; + allowChangePassword: boolean; + allowTwoFactor: boolean; +}; + +export type UserDataModel = { + group: string; + identifier: string; + value: string; +}; + +export enum UserDataOperationStatusModel { + SUCCESS = 'Success', + NOT_FOUND = 'NotFound', + USER_NOT_FOUND = 'UserNotFound', + ALREADY_EXISTS = 'AlreadyExists' +} + +export type UserDataResponseModel = { + group: string; + identifier: string; + value: string; + key: string; +}; + +export type UserExternalLoginProviderModel = { + providerSchemeName: string; + providerKey?: string | null; + isLinkedOnUser: boolean; + hasManualLinkingEnabled: boolean; +}; + +export type UserGroupItemResponseModel = { + id: string; + name: string; + icon?: string | null; + alias?: string | null; +}; + +export type UserGroupResponseModel = { + name: string; + alias: string; + icon?: string | null; + sections: Array; + languages: Array; + hasAccessToAllLanguages: boolean; + documentStartNode?: ReferenceByIdModel | null; + documentRootAccess: boolean; + mediaStartNode?: ReferenceByIdModel | null; + mediaRootAccess: boolean; + fallbackPermissions: Array; + permissions: Array; + id: string; + isDeletable: boolean; + aliasCanBeChanged: boolean; +}; + +export type UserInstallRequestModelReadable = { + name: string; + email: string; + password: string; + readonly subscribeToNewsletter: boolean; +}; + +export type UserInstallRequestModelWritable = { + name: string; + email: string; + password: string; +}; + +export type UserItemResponseModel = { + id: string; + name: string; + avatarUrls: Array; + kind: UserKindModel; +}; + +export enum UserKindModel { + DEFAULT = 'Default', + API = 'Api' +} + +export enum UserOrderModel { + USER_NAME = 'UserName', + LANGUAGE = 'Language', + NAME = 'Name', + EMAIL = 'Email', + ID = 'Id', + CREATE_DATE = 'CreateDate', + UPDATE_DATE = 'UpdateDate', + IS_APPROVED = 'IsApproved', + IS_LOCKED_OUT = 'IsLockedOut', + LAST_LOGIN_DATE = 'LastLoginDate' +} + +export type UserPermissionModel = { + nodeKey: string; + permissions: Array; +}; + +export type UserPermissionsResponseModel = { + permissions: Array; +}; + +export type UserResponseModel = { + email: string; + userName: string; + name: string; + userGroupIds: Array; + id: string; + languageIsoCode?: string | null; + documentStartNodeIds: Array; + hasDocumentRootAccess: boolean; + mediaStartNodeIds: Array; + hasMediaRootAccess: boolean; + avatarUrls: Array; + state: UserStateModel; + failedLoginAttempts: number; + createDate: string; + updateDate: string; + lastLoginDate?: string | null; + lastLockoutDate?: string | null; + lastPasswordChangeDate?: string | null; + isAdmin: boolean; + kind: UserKindModel; +}; + +export type UserSettingsPresentationModel = { + minCharLength: number; + minNonAlphaNumericLength: number; + consentLevels: Array; +}; + +export enum UserStateModel { + ACTIVE = 'Active', + DISABLED = 'Disabled', + LOCKED_OUT = 'LockedOut', + INVITED = 'Invited', + INACTIVE = 'Inactive', + ALL = 'All' +} + +export type UserTwoFactorProviderModel = { + providerName: string; + isEnabledOnUser: boolean; +}; + +export type ValidateUpdateDocumentRequestModel = { + values: Array; + variants: Array; + template?: ReferenceByIdModel | null; + cultures?: Array | null; +}; + +export type VariantItemResponseModel = { + name: string; + culture?: string | null; +}; + +export type VerifyInviteUserRequestModel = { + user: ReferenceByIdModel; + token: string; +}; + +export type VerifyInviteUserResponseModel = { + passwordConfiguration: PasswordConfigurationResponseModel; +}; + +export type VerifyResetPasswordResponseModel = { + passwordConfiguration: PasswordConfigurationResponseModel; +}; + +export type VerifyResetPasswordTokenRequestModel = { + user: ReferenceByIdModel; + resetCode: string; +}; + +export type WebhookEventModel = { + eventName: string; + eventType: string; + alias: string; +}; + +export type WebhookEventResponseModel = { + eventName: string; + eventType: string; + alias: string; +}; + +export type WebhookItemResponseModel = { + enabled: boolean; + name: string; + events: string; + url: string; + types: string; +}; + +export type WebhookLogResponseModel = { + key: string; + webhookKey: string; + statusCode: string; + isSuccessStatusCode: boolean; + date: string; + eventAlias: string; + url: string; + retryCount: number; + requestHeaders: string; + requestBody: string; + responseHeaders: string; + responseBody: string; + exceptionOccured: boolean; +}; + +export type WebhookResponseModel = { + enabled: boolean; + name?: string | null; + description?: string | null; + url: string; + contentTypeKeys: Array; + headers: { + [key: string]: string; + }; + id: string; + events: Array; +}; + +export type GetCultureData = { + body?: never; + path?: never; + query?: { + skip?: number; + take?: number; + }; + url: '/umbraco/management/api/v1/culture'; +}; + +export type GetCultureErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; +}; + +export type GetCultureResponses = { + /** + * OK + */ + 200: PagedCultureReponseModel; +}; + +export type GetCultureResponse = GetCultureResponses[keyof GetCultureResponses]; + +export type PostDataTypeData = { + body?: CreateDataTypeRequestModel; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/data-type'; +}; + +export type PostDataTypeErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PostDataTypeError = PostDataTypeErrors[keyof PostDataTypeErrors]; + +export type PostDataTypeResponses = { + /** + * Created + */ + 201: unknown; +}; + +export type DeleteDataTypeByIdData = { + body?: never; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/data-type/{id}'; +}; + +export type DeleteDataTypeByIdErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type DeleteDataTypeByIdError = DeleteDataTypeByIdErrors[keyof DeleteDataTypeByIdErrors]; + +export type DeleteDataTypeByIdResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type GetDataTypeByIdData = { + body?: never; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/data-type/{id}'; +}; + +export type GetDataTypeByIdErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type GetDataTypeByIdError = GetDataTypeByIdErrors[keyof GetDataTypeByIdErrors]; + +export type GetDataTypeByIdResponses = { + /** + * OK + */ + 200: DataTypeResponseModel; +}; + +export type GetDataTypeByIdResponse = GetDataTypeByIdResponses[keyof GetDataTypeByIdResponses]; + +export type PutDataTypeByIdData = { + body?: UpdateDataTypeRequestModel; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/data-type/{id}'; +}; + +export type PutDataTypeByIdErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PutDataTypeByIdError = PutDataTypeByIdErrors[keyof PutDataTypeByIdErrors]; + +export type PutDataTypeByIdResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type PostDataTypeByIdCopyData = { + body?: CopyDataTypeRequestModel; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/data-type/{id}/copy'; +}; + +export type PostDataTypeByIdCopyErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PostDataTypeByIdCopyError = PostDataTypeByIdCopyErrors[keyof PostDataTypeByIdCopyErrors]; + +export type PostDataTypeByIdCopyResponses = { + /** + * Created + */ + 201: unknown; +}; + +export type GetDataTypeByIdIsUsedData = { + body?: never; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/data-type/{id}/is-used'; +}; + +export type GetDataTypeByIdIsUsedErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type GetDataTypeByIdIsUsedError = GetDataTypeByIdIsUsedErrors[keyof GetDataTypeByIdIsUsedErrors]; + +export type GetDataTypeByIdIsUsedResponses = { + /** + * OK + */ + 200: boolean; +}; + +export type GetDataTypeByIdIsUsedResponse = GetDataTypeByIdIsUsedResponses[keyof GetDataTypeByIdIsUsedResponses]; + +export type PutDataTypeByIdMoveData = { + body?: MoveDataTypeRequestModel; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/data-type/{id}/move'; +}; + +export type PutDataTypeByIdMoveErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PutDataTypeByIdMoveError = PutDataTypeByIdMoveErrors[keyof PutDataTypeByIdMoveErrors]; + +export type PutDataTypeByIdMoveResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type GetDataTypeByIdReferencedByData = { + body?: never; + path: { + id: string; + }; + query?: { + skip?: number; + take?: number; + }; + url: '/umbraco/management/api/v1/data-type/{id}/referenced-by'; +}; + +export type GetDataTypeByIdReferencedByErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetDataTypeByIdReferencedByResponses = { + /** + * OK + */ + 200: PagedIReferenceResponseModel; +}; + +export type GetDataTypeByIdReferencedByResponse = GetDataTypeByIdReferencedByResponses[keyof GetDataTypeByIdReferencedByResponses]; + +export type GetDataTypeByIdReferencesData = { + body?: never; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/data-type/{id}/references'; +}; + +export type GetDataTypeByIdReferencesErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type GetDataTypeByIdReferencesError = GetDataTypeByIdReferencesErrors[keyof GetDataTypeByIdReferencesErrors]; + +export type GetDataTypeByIdReferencesResponses = { + /** + * OK + */ + 200: Array; +}; + +export type GetDataTypeByIdReferencesResponse = GetDataTypeByIdReferencesResponses[keyof GetDataTypeByIdReferencesResponses]; + +export type GetDataTypeConfigurationData = { + body?: never; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/data-type/configuration'; +}; + +export type GetDataTypeConfigurationErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetDataTypeConfigurationResponses = { + /** + * OK + */ + 200: DatatypeConfigurationResponseModel; +}; + +export type GetDataTypeConfigurationResponse = GetDataTypeConfigurationResponses[keyof GetDataTypeConfigurationResponses]; + +export type PostDataTypeFolderData = { + body?: CreateFolderRequestModel; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/data-type/folder'; +}; + +export type PostDataTypeFolderErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PostDataTypeFolderError = PostDataTypeFolderErrors[keyof PostDataTypeFolderErrors]; + +export type PostDataTypeFolderResponses = { + /** + * Created + */ + 201: unknown; +}; + +export type DeleteDataTypeFolderByIdData = { + body?: never; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/data-type/folder/{id}'; +}; + +export type DeleteDataTypeFolderByIdErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type DeleteDataTypeFolderByIdError = DeleteDataTypeFolderByIdErrors[keyof DeleteDataTypeFolderByIdErrors]; + +export type DeleteDataTypeFolderByIdResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type GetDataTypeFolderByIdData = { + body?: never; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/data-type/folder/{id}'; +}; + +export type GetDataTypeFolderByIdErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type GetDataTypeFolderByIdError = GetDataTypeFolderByIdErrors[keyof GetDataTypeFolderByIdErrors]; + +export type GetDataTypeFolderByIdResponses = { + /** + * OK + */ + 200: FolderResponseModel; +}; + +export type GetDataTypeFolderByIdResponse = GetDataTypeFolderByIdResponses[keyof GetDataTypeFolderByIdResponses]; + +export type PutDataTypeFolderByIdData = { + body?: UpdateFolderResponseModel; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/data-type/folder/{id}'; +}; + +export type PutDataTypeFolderByIdErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PutDataTypeFolderByIdError = PutDataTypeFolderByIdErrors[keyof PutDataTypeFolderByIdErrors]; + +export type PutDataTypeFolderByIdResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type GetFilterDataTypeData = { + body?: never; + path?: never; + query?: { + skip?: number; + take?: number; + name?: string; + editorUiAlias?: string; + editorAlias?: string; + }; + url: '/umbraco/management/api/v1/filter/data-type'; +}; + +export type GetFilterDataTypeErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetFilterDataTypeResponses = { + /** + * OK + */ + 200: PagedDataTypeItemResponseModel; +}; + +export type GetFilterDataTypeResponse = GetFilterDataTypeResponses[keyof GetFilterDataTypeResponses]; + +export type GetItemDataTypeData = { + body?: never; + path?: never; + query?: { + id?: Array; + }; + url: '/umbraco/management/api/v1/item/data-type'; +}; + +export type GetItemDataTypeErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; +}; + +export type GetItemDataTypeResponses = { + /** + * OK + */ + 200: Array; +}; + +export type GetItemDataTypeResponse = GetItemDataTypeResponses[keyof GetItemDataTypeResponses]; + +export type GetItemDataTypeSearchData = { + body?: never; + path?: never; + query?: { + query?: string; + skip?: number; + take?: number; + }; + url: '/umbraco/management/api/v1/item/data-type/search'; +}; + +export type GetItemDataTypeSearchErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; +}; + +export type GetItemDataTypeSearchResponses = { + /** + * OK + */ + 200: PagedModelDataTypeItemResponseModel; +}; + +export type GetItemDataTypeSearchResponse = GetItemDataTypeSearchResponses[keyof GetItemDataTypeSearchResponses]; + +export type GetTreeDataTypeAncestorsData = { + body?: never; + path?: never; + query?: { + descendantId?: string; + }; + url: '/umbraco/management/api/v1/tree/data-type/ancestors'; +}; + +export type GetTreeDataTypeAncestorsErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetTreeDataTypeAncestorsResponses = { + /** + * OK + */ + 200: Array; +}; + +export type GetTreeDataTypeAncestorsResponse = GetTreeDataTypeAncestorsResponses[keyof GetTreeDataTypeAncestorsResponses]; + +export type GetTreeDataTypeChildrenData = { + body?: never; + path?: never; + query?: { + parentId?: string; + skip?: number; + take?: number; + foldersOnly?: boolean; + }; + url: '/umbraco/management/api/v1/tree/data-type/children'; +}; + +export type GetTreeDataTypeChildrenErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetTreeDataTypeChildrenResponses = { + /** + * OK + */ + 200: PagedDataTypeTreeItemResponseModel; +}; + +export type GetTreeDataTypeChildrenResponse = GetTreeDataTypeChildrenResponses[keyof GetTreeDataTypeChildrenResponses]; + +export type GetTreeDataTypeRootData = { + body?: never; + path?: never; + query?: { + skip?: number; + take?: number; + foldersOnly?: boolean; + }; + url: '/umbraco/management/api/v1/tree/data-type/root'; +}; + +export type GetTreeDataTypeRootErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetTreeDataTypeRootResponses = { + /** + * OK + */ + 200: PagedDataTypeTreeItemResponseModel; +}; + +export type GetTreeDataTypeRootResponse = GetTreeDataTypeRootResponses[keyof GetTreeDataTypeRootResponses]; + +export type GetDictionaryData = { + body?: never; + path?: never; + query?: { + filter?: string; + skip?: number; + take?: number; + }; + url: '/umbraco/management/api/v1/dictionary'; +}; + +export type GetDictionaryErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetDictionaryResponses = { + /** + * OK + */ + 200: PagedDictionaryOverviewResponseModel; +}; + +export type GetDictionaryResponse = GetDictionaryResponses[keyof GetDictionaryResponses]; + +export type PostDictionaryData = { + body?: CreateDictionaryItemRequestModel; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/dictionary'; +}; + +export type PostDictionaryErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; + /** + * Conflict + */ + 409: ProblemDetails; +}; + +export type PostDictionaryError = PostDictionaryErrors[keyof PostDictionaryErrors]; + +export type PostDictionaryResponses = { + /** + * Created + */ + 201: unknown; +}; + +export type DeleteDictionaryByIdData = { + body?: never; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/dictionary/{id}'; +}; + +export type DeleteDictionaryByIdErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type DeleteDictionaryByIdError = DeleteDictionaryByIdErrors[keyof DeleteDictionaryByIdErrors]; + +export type DeleteDictionaryByIdResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type GetDictionaryByIdData = { + body?: never; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/dictionary/{id}'; +}; + +export type GetDictionaryByIdErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type GetDictionaryByIdError = GetDictionaryByIdErrors[keyof GetDictionaryByIdErrors]; + +export type GetDictionaryByIdResponses = { + /** + * OK + */ + 200: DictionaryItemResponseModel; +}; + +export type GetDictionaryByIdResponse = GetDictionaryByIdResponses[keyof GetDictionaryByIdResponses]; + +export type PutDictionaryByIdData = { + body?: UpdateDictionaryItemRequestModel; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/dictionary/{id}'; +}; + +export type PutDictionaryByIdErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PutDictionaryByIdError = PutDictionaryByIdErrors[keyof PutDictionaryByIdErrors]; + +export type PutDictionaryByIdResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type GetDictionaryByIdExportData = { + body?: never; + path: { + id: string; + }; + query?: { + includeChildren?: boolean; + }; + url: '/umbraco/management/api/v1/dictionary/{id}/export'; +}; + +export type GetDictionaryByIdExportErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type GetDictionaryByIdExportError = GetDictionaryByIdExportErrors[keyof GetDictionaryByIdExportErrors]; + +export type GetDictionaryByIdExportResponses = { + /** + * OK + */ + 200: Blob | File; +}; + +export type GetDictionaryByIdExportResponse = GetDictionaryByIdExportResponses[keyof GetDictionaryByIdExportResponses]; + +export type PutDictionaryByIdMoveData = { + body?: MoveDictionaryRequestModel; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/dictionary/{id}/move'; +}; + +export type PutDictionaryByIdMoveErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PutDictionaryByIdMoveError = PutDictionaryByIdMoveErrors[keyof PutDictionaryByIdMoveErrors]; + +export type PutDictionaryByIdMoveResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type PostDictionaryImportData = { + body?: ImportDictionaryRequestModel; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/dictionary/import'; +}; + +export type PostDictionaryImportErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PostDictionaryImportError = PostDictionaryImportErrors[keyof PostDictionaryImportErrors]; + +export type PostDictionaryImportResponses = { + /** + * Created + */ + 201: unknown; +}; + +export type GetItemDictionaryData = { + body?: never; + path?: never; + query?: { + id?: Array; + }; + url: '/umbraco/management/api/v1/item/dictionary'; +}; + +export type GetItemDictionaryErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; +}; + +export type GetItemDictionaryResponses = { + /** + * OK + */ + 200: Array; +}; + +export type GetItemDictionaryResponse = GetItemDictionaryResponses[keyof GetItemDictionaryResponses]; + +export type GetTreeDictionaryAncestorsData = { + body?: never; + path?: never; + query?: { + descendantId?: string; + }; + url: '/umbraco/management/api/v1/tree/dictionary/ancestors'; +}; + +export type GetTreeDictionaryAncestorsErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetTreeDictionaryAncestorsResponses = { + /** + * OK + */ + 200: Array; +}; + +export type GetTreeDictionaryAncestorsResponse = GetTreeDictionaryAncestorsResponses[keyof GetTreeDictionaryAncestorsResponses]; + +export type GetTreeDictionaryChildrenData = { + body?: never; + path?: never; + query?: { + parentId?: string; + skip?: number; + take?: number; + }; + url: '/umbraco/management/api/v1/tree/dictionary/children'; +}; + +export type GetTreeDictionaryChildrenErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetTreeDictionaryChildrenResponses = { + /** + * OK + */ + 200: PagedNamedEntityTreeItemResponseModel; +}; + +export type GetTreeDictionaryChildrenResponse = GetTreeDictionaryChildrenResponses[keyof GetTreeDictionaryChildrenResponses]; + +export type GetTreeDictionaryRootData = { + body?: never; + path?: never; + query?: { + skip?: number; + take?: number; + }; + url: '/umbraco/management/api/v1/tree/dictionary/root'; +}; + +export type GetTreeDictionaryRootErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetTreeDictionaryRootResponses = { + /** + * OK + */ + 200: PagedNamedEntityTreeItemResponseModel; +}; + +export type GetTreeDictionaryRootResponse = GetTreeDictionaryRootResponses[keyof GetTreeDictionaryRootResponses]; + +export type PostDocumentBlueprintData = { + body?: CreateDocumentBlueprintRequestModel; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/document-blueprint'; +}; + +export type PostDocumentBlueprintErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PostDocumentBlueprintError = PostDocumentBlueprintErrors[keyof PostDocumentBlueprintErrors]; + +export type PostDocumentBlueprintResponses = { + /** + * Created + */ + 201: unknown; +}; + +export type DeleteDocumentBlueprintByIdData = { + body?: never; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/document-blueprint/{id}'; +}; + +export type DeleteDocumentBlueprintByIdErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type DeleteDocumentBlueprintByIdError = DeleteDocumentBlueprintByIdErrors[keyof DeleteDocumentBlueprintByIdErrors]; + +export type DeleteDocumentBlueprintByIdResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type GetDocumentBlueprintByIdData = { + body?: never; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/document-blueprint/{id}'; +}; + +export type GetDocumentBlueprintByIdErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type GetDocumentBlueprintByIdError = GetDocumentBlueprintByIdErrors[keyof GetDocumentBlueprintByIdErrors]; + +export type GetDocumentBlueprintByIdResponses = { + /** + * OK + */ + 200: DocumentBlueprintResponseModel; +}; + +export type GetDocumentBlueprintByIdResponse = GetDocumentBlueprintByIdResponses[keyof GetDocumentBlueprintByIdResponses]; + +export type PutDocumentBlueprintByIdData = { + body?: UpdateDocumentBlueprintRequestModel; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/document-blueprint/{id}'; +}; + +export type PutDocumentBlueprintByIdErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PutDocumentBlueprintByIdError = PutDocumentBlueprintByIdErrors[keyof PutDocumentBlueprintByIdErrors]; + +export type PutDocumentBlueprintByIdResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type PutDocumentBlueprintByIdMoveData = { + body?: MoveDocumentBlueprintRequestModel; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/document-blueprint/{id}/move'; +}; + +export type PutDocumentBlueprintByIdMoveErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PutDocumentBlueprintByIdMoveError = PutDocumentBlueprintByIdMoveErrors[keyof PutDocumentBlueprintByIdMoveErrors]; + +export type PutDocumentBlueprintByIdMoveResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type PostDocumentBlueprintFolderData = { + body?: CreateFolderRequestModel; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/document-blueprint/folder'; +}; + +export type PostDocumentBlueprintFolderErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PostDocumentBlueprintFolderError = PostDocumentBlueprintFolderErrors[keyof PostDocumentBlueprintFolderErrors]; + +export type PostDocumentBlueprintFolderResponses = { + /** + * Created + */ + 201: unknown; +}; + +export type DeleteDocumentBlueprintFolderByIdData = { + body?: never; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/document-blueprint/folder/{id}'; +}; + +export type DeleteDocumentBlueprintFolderByIdErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type DeleteDocumentBlueprintFolderByIdError = DeleteDocumentBlueprintFolderByIdErrors[keyof DeleteDocumentBlueprintFolderByIdErrors]; + +export type DeleteDocumentBlueprintFolderByIdResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type GetDocumentBlueprintFolderByIdData = { + body?: never; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/document-blueprint/folder/{id}'; +}; + +export type GetDocumentBlueprintFolderByIdErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type GetDocumentBlueprintFolderByIdError = GetDocumentBlueprintFolderByIdErrors[keyof GetDocumentBlueprintFolderByIdErrors]; + +export type GetDocumentBlueprintFolderByIdResponses = { + /** + * OK + */ + 200: FolderResponseModel; +}; + +export type GetDocumentBlueprintFolderByIdResponse = GetDocumentBlueprintFolderByIdResponses[keyof GetDocumentBlueprintFolderByIdResponses]; + +export type PutDocumentBlueprintFolderByIdData = { + body?: UpdateFolderResponseModel; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/document-blueprint/folder/{id}'; +}; + +export type PutDocumentBlueprintFolderByIdErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PutDocumentBlueprintFolderByIdError = PutDocumentBlueprintFolderByIdErrors[keyof PutDocumentBlueprintFolderByIdErrors]; + +export type PutDocumentBlueprintFolderByIdResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type PostDocumentBlueprintFromDocumentData = { + body?: CreateDocumentBlueprintFromDocumentRequestModel; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/document-blueprint/from-document'; +}; + +export type PostDocumentBlueprintFromDocumentErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PostDocumentBlueprintFromDocumentError = PostDocumentBlueprintFromDocumentErrors[keyof PostDocumentBlueprintFromDocumentErrors]; + +export type PostDocumentBlueprintFromDocumentResponses = { + /** + * Created + */ + 201: unknown; +}; + +export type GetItemDocumentBlueprintData = { + body?: never; + path?: never; + query?: { + id?: Array; + }; + url: '/umbraco/management/api/v1/item/document-blueprint'; +}; + +export type GetItemDocumentBlueprintErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; +}; + +export type GetItemDocumentBlueprintResponses = { + /** + * OK + */ + 200: Array; +}; + +export type GetItemDocumentBlueprintResponse = GetItemDocumentBlueprintResponses[keyof GetItemDocumentBlueprintResponses]; + +export type GetTreeDocumentBlueprintAncestorsData = { + body?: never; + path?: never; + query?: { + descendantId?: string; + }; + url: '/umbraco/management/api/v1/tree/document-blueprint/ancestors'; +}; + +export type GetTreeDocumentBlueprintAncestorsErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetTreeDocumentBlueprintAncestorsResponses = { + /** + * OK + */ + 200: Array; +}; + +export type GetTreeDocumentBlueprintAncestorsResponse = GetTreeDocumentBlueprintAncestorsResponses[keyof GetTreeDocumentBlueprintAncestorsResponses]; + +export type GetTreeDocumentBlueprintChildrenData = { + body?: never; + path?: never; + query?: { + parentId?: string; + skip?: number; + take?: number; + foldersOnly?: boolean; + }; + url: '/umbraco/management/api/v1/tree/document-blueprint/children'; +}; + +export type GetTreeDocumentBlueprintChildrenErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetTreeDocumentBlueprintChildrenResponses = { + /** + * OK + */ + 200: PagedDocumentBlueprintTreeItemResponseModel; +}; + +export type GetTreeDocumentBlueprintChildrenResponse = GetTreeDocumentBlueprintChildrenResponses[keyof GetTreeDocumentBlueprintChildrenResponses]; + +export type GetTreeDocumentBlueprintRootData = { + body?: never; + path?: never; + query?: { + skip?: number; + take?: number; + foldersOnly?: boolean; + }; + url: '/umbraco/management/api/v1/tree/document-blueprint/root'; +}; + +export type GetTreeDocumentBlueprintRootErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetTreeDocumentBlueprintRootResponses = { + /** + * OK + */ + 200: PagedDocumentBlueprintTreeItemResponseModel; +}; + +export type GetTreeDocumentBlueprintRootResponse = GetTreeDocumentBlueprintRootResponses[keyof GetTreeDocumentBlueprintRootResponses]; + +export type PostDocumentTypeData = { + body?: CreateDocumentTypeRequestModel; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/document-type'; +}; + +export type PostDocumentTypeErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PostDocumentTypeError = PostDocumentTypeErrors[keyof PostDocumentTypeErrors]; + +export type PostDocumentTypeResponses = { + /** + * Created + */ + 201: unknown; +}; + +export type DeleteDocumentTypeByIdData = { + body?: never; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/document-type/{id}'; +}; + +export type DeleteDocumentTypeByIdErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type DeleteDocumentTypeByIdError = DeleteDocumentTypeByIdErrors[keyof DeleteDocumentTypeByIdErrors]; + +export type DeleteDocumentTypeByIdResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type GetDocumentTypeByIdData = { + body?: never; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/document-type/{id}'; +}; + +export type GetDocumentTypeByIdErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type GetDocumentTypeByIdError = GetDocumentTypeByIdErrors[keyof GetDocumentTypeByIdErrors]; + +export type GetDocumentTypeByIdResponses = { + /** + * OK + */ + 200: DocumentTypeResponseModel; +}; + +export type GetDocumentTypeByIdResponse = GetDocumentTypeByIdResponses[keyof GetDocumentTypeByIdResponses]; + +export type PutDocumentTypeByIdData = { + body?: UpdateDocumentTypeRequestModel; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/document-type/{id}'; +}; + +export type PutDocumentTypeByIdErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PutDocumentTypeByIdError = PutDocumentTypeByIdErrors[keyof PutDocumentTypeByIdErrors]; + +export type PutDocumentTypeByIdResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type GetDocumentTypeByIdAllowedChildrenData = { + body?: never; + path: { + id: string; + }; + query?: { + parentContentKey?: string; + skip?: number; + take?: number; + }; + url: '/umbraco/management/api/v1/document-type/{id}/allowed-children'; +}; + +export type GetDocumentTypeByIdAllowedChildrenErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type GetDocumentTypeByIdAllowedChildrenError = GetDocumentTypeByIdAllowedChildrenErrors[keyof GetDocumentTypeByIdAllowedChildrenErrors]; + +export type GetDocumentTypeByIdAllowedChildrenResponses = { + /** + * OK + */ + 200: PagedAllowedDocumentTypeModel; +}; + +export type GetDocumentTypeByIdAllowedChildrenResponse = GetDocumentTypeByIdAllowedChildrenResponses[keyof GetDocumentTypeByIdAllowedChildrenResponses]; + +export type GetDocumentTypeByIdBlueprintData = { + body?: never; + path: { + id: string; + }; + query?: { + skip?: number; + take?: number; + }; + url: '/umbraco/management/api/v1/document-type/{id}/blueprint'; +}; + +export type GetDocumentTypeByIdBlueprintErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type GetDocumentTypeByIdBlueprintError = GetDocumentTypeByIdBlueprintErrors[keyof GetDocumentTypeByIdBlueprintErrors]; + +export type GetDocumentTypeByIdBlueprintResponses = { + /** + * OK + */ + 200: PagedDocumentTypeBlueprintItemResponseModel; +}; + +export type GetDocumentTypeByIdBlueprintResponse = GetDocumentTypeByIdBlueprintResponses[keyof GetDocumentTypeByIdBlueprintResponses]; + +export type GetDocumentTypeByIdCompositionReferencesData = { + body?: never; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/document-type/{id}/composition-references'; +}; + +export type GetDocumentTypeByIdCompositionReferencesErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type GetDocumentTypeByIdCompositionReferencesError = GetDocumentTypeByIdCompositionReferencesErrors[keyof GetDocumentTypeByIdCompositionReferencesErrors]; + +export type GetDocumentTypeByIdCompositionReferencesResponses = { + /** + * OK + */ + 200: Array; +}; + +export type GetDocumentTypeByIdCompositionReferencesResponse = GetDocumentTypeByIdCompositionReferencesResponses[keyof GetDocumentTypeByIdCompositionReferencesResponses]; + +export type PostDocumentTypeByIdCopyData = { + body?: CopyDocumentTypeRequestModel; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/document-type/{id}/copy'; +}; + +export type PostDocumentTypeByIdCopyErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PostDocumentTypeByIdCopyError = PostDocumentTypeByIdCopyErrors[keyof PostDocumentTypeByIdCopyErrors]; + +export type PostDocumentTypeByIdCopyResponses = { + /** + * Created + */ + 201: unknown; +}; + +export type GetDocumentTypeByIdExportData = { + body?: never; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/document-type/{id}/export'; +}; + +export type GetDocumentTypeByIdExportErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type GetDocumentTypeByIdExportError = GetDocumentTypeByIdExportErrors[keyof GetDocumentTypeByIdExportErrors]; + +export type GetDocumentTypeByIdExportResponses = { + /** + * OK + */ + 200: Blob | File; +}; + +export type GetDocumentTypeByIdExportResponse = GetDocumentTypeByIdExportResponses[keyof GetDocumentTypeByIdExportResponses]; + +export type PutDocumentTypeByIdImportData = { + body?: ImportDocumentTypeRequestModel; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/document-type/{id}/import'; +}; + +export type PutDocumentTypeByIdImportErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PutDocumentTypeByIdImportError = PutDocumentTypeByIdImportErrors[keyof PutDocumentTypeByIdImportErrors]; + +export type PutDocumentTypeByIdImportResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type PutDocumentTypeByIdMoveData = { + body?: MoveDocumentTypeRequestModel; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/document-type/{id}/move'; +}; + +export type PutDocumentTypeByIdMoveErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PutDocumentTypeByIdMoveError = PutDocumentTypeByIdMoveErrors[keyof PutDocumentTypeByIdMoveErrors]; + +export type PutDocumentTypeByIdMoveResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type GetDocumentTypeAllowedAtRootData = { + body?: never; + path?: never; + query?: { + skip?: number; + take?: number; + }; + url: '/umbraco/management/api/v1/document-type/allowed-at-root'; +}; + +export type GetDocumentTypeAllowedAtRootErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetDocumentTypeAllowedAtRootResponses = { + /** + * OK + */ + 200: PagedAllowedDocumentTypeModel; +}; + +export type GetDocumentTypeAllowedAtRootResponse = GetDocumentTypeAllowedAtRootResponses[keyof GetDocumentTypeAllowedAtRootResponses]; + +export type PostDocumentTypeAvailableCompositionsData = { + body?: DocumentTypeCompositionRequestModel; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/document-type/available-compositions'; +}; + +export type PostDocumentTypeAvailableCompositionsErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type PostDocumentTypeAvailableCompositionsResponses = { + /** + * OK + */ + 200: Array; +}; + +export type PostDocumentTypeAvailableCompositionsResponse = PostDocumentTypeAvailableCompositionsResponses[keyof PostDocumentTypeAvailableCompositionsResponses]; + +export type GetDocumentTypeConfigurationData = { + body?: never; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/document-type/configuration'; +}; + +export type GetDocumentTypeConfigurationErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetDocumentTypeConfigurationResponses = { + /** + * OK + */ + 200: DocumentTypeConfigurationResponseModel; +}; + +export type GetDocumentTypeConfigurationResponse = GetDocumentTypeConfigurationResponses[keyof GetDocumentTypeConfigurationResponses]; + +export type PostDocumentTypeFolderData = { + body?: CreateFolderRequestModel; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/document-type/folder'; +}; + +export type PostDocumentTypeFolderErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PostDocumentTypeFolderError = PostDocumentTypeFolderErrors[keyof PostDocumentTypeFolderErrors]; + +export type PostDocumentTypeFolderResponses = { + /** + * Created + */ + 201: unknown; +}; + +export type DeleteDocumentTypeFolderByIdData = { + body?: never; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/document-type/folder/{id}'; +}; + +export type DeleteDocumentTypeFolderByIdErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type DeleteDocumentTypeFolderByIdError = DeleteDocumentTypeFolderByIdErrors[keyof DeleteDocumentTypeFolderByIdErrors]; + +export type DeleteDocumentTypeFolderByIdResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type GetDocumentTypeFolderByIdData = { + body?: never; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/document-type/folder/{id}'; +}; + +export type GetDocumentTypeFolderByIdErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type GetDocumentTypeFolderByIdError = GetDocumentTypeFolderByIdErrors[keyof GetDocumentTypeFolderByIdErrors]; + +export type GetDocumentTypeFolderByIdResponses = { + /** + * OK + */ + 200: FolderResponseModel; +}; + +export type GetDocumentTypeFolderByIdResponse = GetDocumentTypeFolderByIdResponses[keyof GetDocumentTypeFolderByIdResponses]; + +export type PutDocumentTypeFolderByIdData = { + body?: UpdateFolderResponseModel; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/document-type/folder/{id}'; +}; + +export type PutDocumentTypeFolderByIdErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PutDocumentTypeFolderByIdError = PutDocumentTypeFolderByIdErrors[keyof PutDocumentTypeFolderByIdErrors]; + +export type PutDocumentTypeFolderByIdResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type PostDocumentTypeImportData = { + body?: ImportDocumentTypeRequestModel; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/document-type/import'; +}; + +export type PostDocumentTypeImportErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PostDocumentTypeImportError = PostDocumentTypeImportErrors[keyof PostDocumentTypeImportErrors]; + +export type PostDocumentTypeImportResponses = { + /** + * Created + */ + 201: unknown; +}; + +export type GetItemDocumentTypeData = { + body?: never; + path?: never; + query?: { + id?: Array; + }; + url: '/umbraco/management/api/v1/item/document-type'; +}; + +export type GetItemDocumentTypeErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; +}; + +export type GetItemDocumentTypeResponses = { + /** + * OK + */ + 200: Array; +}; + +export type GetItemDocumentTypeResponse = GetItemDocumentTypeResponses[keyof GetItemDocumentTypeResponses]; + +export type GetItemDocumentTypeSearchData = { + body?: never; + path?: never; + query?: { + query?: string; + isElement?: boolean; + skip?: number; + take?: number; + }; + url: '/umbraco/management/api/v1/item/document-type/search'; +}; + +export type GetItemDocumentTypeSearchErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; +}; + +export type GetItemDocumentTypeSearchResponses = { + /** + * OK + */ + 200: PagedModelDocumentTypeItemResponseModel; +}; + +export type GetItemDocumentTypeSearchResponse = GetItemDocumentTypeSearchResponses[keyof GetItemDocumentTypeSearchResponses]; + +export type GetTreeDocumentTypeAncestorsData = { + body?: never; + path?: never; + query?: { + descendantId?: string; + }; + url: '/umbraco/management/api/v1/tree/document-type/ancestors'; +}; + +export type GetTreeDocumentTypeAncestorsErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetTreeDocumentTypeAncestorsResponses = { + /** + * OK + */ + 200: Array; +}; + +export type GetTreeDocumentTypeAncestorsResponse = GetTreeDocumentTypeAncestorsResponses[keyof GetTreeDocumentTypeAncestorsResponses]; + +export type GetTreeDocumentTypeChildrenData = { + body?: never; + path?: never; + query?: { + parentId?: string; + skip?: number; + take?: number; + foldersOnly?: boolean; + }; + url: '/umbraco/management/api/v1/tree/document-type/children'; +}; + +export type GetTreeDocumentTypeChildrenErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetTreeDocumentTypeChildrenResponses = { + /** + * OK + */ + 200: PagedDocumentTypeTreeItemResponseModel; +}; + +export type GetTreeDocumentTypeChildrenResponse = GetTreeDocumentTypeChildrenResponses[keyof GetTreeDocumentTypeChildrenResponses]; + +export type GetTreeDocumentTypeRootData = { + body?: never; + path?: never; + query?: { + skip?: number; + take?: number; + foldersOnly?: boolean; + }; + url: '/umbraco/management/api/v1/tree/document-type/root'; +}; + +export type GetTreeDocumentTypeRootErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetTreeDocumentTypeRootResponses = { + /** + * OK + */ + 200: PagedDocumentTypeTreeItemResponseModel; +}; + +export type GetTreeDocumentTypeRootResponse = GetTreeDocumentTypeRootResponses[keyof GetTreeDocumentTypeRootResponses]; + +export type GetDocumentVersionData = { + body?: never; + path?: never; + query: { + documentId: string; + culture?: string; + skip?: number; + take?: number; + }; + url: '/umbraco/management/api/v1/document-version'; +}; + +export type GetDocumentVersionErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type GetDocumentVersionError = GetDocumentVersionErrors[keyof GetDocumentVersionErrors]; + +export type GetDocumentVersionResponses = { + /** + * OK + */ + 200: PagedDocumentVersionItemResponseModel; +}; + +export type GetDocumentVersionResponse = GetDocumentVersionResponses[keyof GetDocumentVersionResponses]; + +export type GetDocumentVersionByIdData = { + body?: never; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/document-version/{id}'; +}; + +export type GetDocumentVersionByIdErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type GetDocumentVersionByIdError = GetDocumentVersionByIdErrors[keyof GetDocumentVersionByIdErrors]; + +export type GetDocumentVersionByIdResponses = { + /** + * OK + */ + 200: DocumentVersionResponseModel; +}; + +export type GetDocumentVersionByIdResponse = GetDocumentVersionByIdResponses[keyof GetDocumentVersionByIdResponses]; + +export type PutDocumentVersionByIdPreventCleanupData = { + body?: never; + path: { + id: string; + }; + query?: { + preventCleanup?: boolean; + }; + url: '/umbraco/management/api/v1/document-version/{id}/prevent-cleanup'; +}; + +export type PutDocumentVersionByIdPreventCleanupErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PutDocumentVersionByIdPreventCleanupError = PutDocumentVersionByIdPreventCleanupErrors[keyof PutDocumentVersionByIdPreventCleanupErrors]; + +export type PutDocumentVersionByIdPreventCleanupResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type PostDocumentVersionByIdRollbackData = { + body?: never; + path: { + id: string; + }; + query?: { + culture?: string; + }; + url: '/umbraco/management/api/v1/document-version/{id}/rollback'; +}; + +export type PostDocumentVersionByIdRollbackErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PostDocumentVersionByIdRollbackError = PostDocumentVersionByIdRollbackErrors[keyof PostDocumentVersionByIdRollbackErrors]; + +export type PostDocumentVersionByIdRollbackResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type GetCollectionDocumentByIdData = { + body?: never; + path: { + id: string; + }; + query?: { + dataTypeId?: string; + orderBy?: string; + orderCulture?: string; + orderDirection?: DirectionModel; + filter?: string; + skip?: number; + take?: number; + }; + url: '/umbraco/management/api/v1/collection/document/{id}'; +}; + +export type GetCollectionDocumentByIdErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type GetCollectionDocumentByIdError = GetCollectionDocumentByIdErrors[keyof GetCollectionDocumentByIdErrors]; + +export type GetCollectionDocumentByIdResponses = { + /** + * OK + */ + 200: PagedDocumentCollectionResponseModel; +}; + +export type GetCollectionDocumentByIdResponse = GetCollectionDocumentByIdResponses[keyof GetCollectionDocumentByIdResponses]; + +export type PostDocumentData = { + body?: CreateDocumentRequestModel; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/document'; +}; + +export type PostDocumentErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PostDocumentError = PostDocumentErrors[keyof PostDocumentErrors]; + +export type PostDocumentResponses = { + /** + * Created + */ + 201: unknown; +}; + +export type DeleteDocumentByIdData = { + body?: never; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/document/{id}'; +}; + +export type DeleteDocumentByIdErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type DeleteDocumentByIdError = DeleteDocumentByIdErrors[keyof DeleteDocumentByIdErrors]; + +export type DeleteDocumentByIdResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type GetDocumentByIdData = { + body?: never; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/document/{id}'; +}; + +export type GetDocumentByIdErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type GetDocumentByIdError = GetDocumentByIdErrors[keyof GetDocumentByIdErrors]; + +export type GetDocumentByIdResponses = { + /** + * OK + */ + 200: DocumentResponseModel; +}; + +export type GetDocumentByIdResponse = GetDocumentByIdResponses[keyof GetDocumentByIdResponses]; + +export type PutDocumentByIdData = { + body?: UpdateDocumentRequestModel; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/document/{id}'; +}; + +export type PutDocumentByIdErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PutDocumentByIdError = PutDocumentByIdErrors[keyof PutDocumentByIdErrors]; + +export type PutDocumentByIdResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type GetDocumentByIdAuditLogData = { + body?: never; + path: { + id: string; + }; + query?: { + orderDirection?: DirectionModel; + sinceDate?: string; + skip?: number; + take?: number; + }; + url: '/umbraco/management/api/v1/document/{id}/audit-log'; +}; + +export type GetDocumentByIdAuditLogErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetDocumentByIdAuditLogResponses = { + /** + * OK + */ + 200: PagedAuditLogResponseModel; +}; + +export type GetDocumentByIdAuditLogResponse = GetDocumentByIdAuditLogResponses[keyof GetDocumentByIdAuditLogResponses]; + +export type PostDocumentByIdCopyData = { + body?: CopyDocumentRequestModel; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/document/{id}/copy'; +}; + +export type PostDocumentByIdCopyErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PostDocumentByIdCopyError = PostDocumentByIdCopyErrors[keyof PostDocumentByIdCopyErrors]; + +export type PostDocumentByIdCopyResponses = { + /** + * Created + */ + 201: unknown; +}; + +export type GetDocumentByIdDomainsData = { + body?: never; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/document/{id}/domains'; +}; + +export type GetDocumentByIdDomainsErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type GetDocumentByIdDomainsError = GetDocumentByIdDomainsErrors[keyof GetDocumentByIdDomainsErrors]; + +export type GetDocumentByIdDomainsResponses = { + /** + * OK + */ + 200: DomainsResponseModel; +}; + +export type GetDocumentByIdDomainsResponse = GetDocumentByIdDomainsResponses[keyof GetDocumentByIdDomainsResponses]; + +export type PutDocumentByIdDomainsData = { + body?: UpdateDomainsRequestModel; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/document/{id}/domains'; +}; + +export type PutDocumentByIdDomainsErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; + /** + * Conflict + */ + 409: ProblemDetails; +}; + +export type PutDocumentByIdDomainsError = PutDocumentByIdDomainsErrors[keyof PutDocumentByIdDomainsErrors]; + +export type PutDocumentByIdDomainsResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type PutDocumentByIdMoveData = { + body?: MoveDocumentRequestModel; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/document/{id}/move'; +}; + +export type PutDocumentByIdMoveErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PutDocumentByIdMoveError = PutDocumentByIdMoveErrors[keyof PutDocumentByIdMoveErrors]; + +export type PutDocumentByIdMoveResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type PutDocumentByIdMoveToRecycleBinData = { + body?: never; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/document/{id}/move-to-recycle-bin'; +}; + +export type PutDocumentByIdMoveToRecycleBinErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PutDocumentByIdMoveToRecycleBinError = PutDocumentByIdMoveToRecycleBinErrors[keyof PutDocumentByIdMoveToRecycleBinErrors]; + +export type PutDocumentByIdMoveToRecycleBinResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type GetDocumentByIdNotificationsData = { + body?: never; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/document/{id}/notifications'; +}; + +export type GetDocumentByIdNotificationsErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type GetDocumentByIdNotificationsError = GetDocumentByIdNotificationsErrors[keyof GetDocumentByIdNotificationsErrors]; + +export type GetDocumentByIdNotificationsResponses = { + /** + * OK + */ + 200: Array; +}; + +export type GetDocumentByIdNotificationsResponse = GetDocumentByIdNotificationsResponses[keyof GetDocumentByIdNotificationsResponses]; + +export type PutDocumentByIdNotificationsData = { + body?: UpdateDocumentNotificationsRequestModel; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/document/{id}/notifications'; +}; + +export type PutDocumentByIdNotificationsErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PutDocumentByIdNotificationsError = PutDocumentByIdNotificationsErrors[keyof PutDocumentByIdNotificationsErrors]; + +export type PutDocumentByIdNotificationsResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type DeleteDocumentByIdPublicAccessData = { + body?: never; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/document/{id}/public-access'; +}; + +export type DeleteDocumentByIdPublicAccessErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type DeleteDocumentByIdPublicAccessError = DeleteDocumentByIdPublicAccessErrors[keyof DeleteDocumentByIdPublicAccessErrors]; + +export type DeleteDocumentByIdPublicAccessResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type GetDocumentByIdPublicAccessData = { + body?: never; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/document/{id}/public-access'; +}; + +export type GetDocumentByIdPublicAccessErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type GetDocumentByIdPublicAccessError = GetDocumentByIdPublicAccessErrors[keyof GetDocumentByIdPublicAccessErrors]; + +export type GetDocumentByIdPublicAccessResponses = { + /** + * OK + */ + 200: PublicAccessResponseModel; +}; + +export type GetDocumentByIdPublicAccessResponse = GetDocumentByIdPublicAccessResponses[keyof GetDocumentByIdPublicAccessResponses]; + +export type PostDocumentByIdPublicAccessData = { + body?: PublicAccessRequestModel; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/document/{id}/public-access'; +}; + +export type PostDocumentByIdPublicAccessErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PostDocumentByIdPublicAccessError = PostDocumentByIdPublicAccessErrors[keyof PostDocumentByIdPublicAccessErrors]; + +export type PostDocumentByIdPublicAccessResponses = { + /** + * Created + */ + 201: unknown; +}; + +export type PutDocumentByIdPublicAccessData = { + body?: PublicAccessRequestModel; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/document/{id}/public-access'; +}; + +export type PutDocumentByIdPublicAccessErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PutDocumentByIdPublicAccessError = PutDocumentByIdPublicAccessErrors[keyof PutDocumentByIdPublicAccessErrors]; + +export type PutDocumentByIdPublicAccessResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type PutDocumentByIdPublishData = { + body?: PublishDocumentRequestModel; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/document/{id}/publish'; +}; + +export type PutDocumentByIdPublishErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PutDocumentByIdPublishError = PutDocumentByIdPublishErrors[keyof PutDocumentByIdPublishErrors]; + +export type PutDocumentByIdPublishResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type PutDocumentByIdPublishWithDescendantsData = { + body?: PublishDocumentWithDescendantsRequestModel; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/document/{id}/publish-with-descendants'; +}; + +export type PutDocumentByIdPublishWithDescendantsErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PutDocumentByIdPublishWithDescendantsError = PutDocumentByIdPublishWithDescendantsErrors[keyof PutDocumentByIdPublishWithDescendantsErrors]; + +export type PutDocumentByIdPublishWithDescendantsResponses = { + /** + * OK + */ + 200: PublishWithDescendantsResultModel; +}; + +export type PutDocumentByIdPublishWithDescendantsResponse = PutDocumentByIdPublishWithDescendantsResponses[keyof PutDocumentByIdPublishWithDescendantsResponses]; + +export type GetDocumentByIdPublishWithDescendantsResultByTaskIdData = { + body?: never; + path: { + id: string; + taskId: string; + }; + query?: never; + url: '/umbraco/management/api/v1/document/{id}/publish-with-descendants/result/{taskId}'; +}; + +export type GetDocumentByIdPublishWithDescendantsResultByTaskIdErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type GetDocumentByIdPublishWithDescendantsResultByTaskIdError = GetDocumentByIdPublishWithDescendantsResultByTaskIdErrors[keyof GetDocumentByIdPublishWithDescendantsResultByTaskIdErrors]; + +export type GetDocumentByIdPublishWithDescendantsResultByTaskIdResponses = { + /** + * OK + */ + 200: PublishWithDescendantsResultModel; +}; + +export type GetDocumentByIdPublishWithDescendantsResultByTaskIdResponse = GetDocumentByIdPublishWithDescendantsResultByTaskIdResponses[keyof GetDocumentByIdPublishWithDescendantsResultByTaskIdResponses]; + +export type GetDocumentByIdPublishedData = { + body?: never; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/document/{id}/published'; +}; + +export type GetDocumentByIdPublishedErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type GetDocumentByIdPublishedError = GetDocumentByIdPublishedErrors[keyof GetDocumentByIdPublishedErrors]; + +export type GetDocumentByIdPublishedResponses = { + /** + * OK + */ + 200: PublishedDocumentResponseModel; +}; + +export type GetDocumentByIdPublishedResponse = GetDocumentByIdPublishedResponses[keyof GetDocumentByIdPublishedResponses]; + +export type GetDocumentByIdReferencedByData = { + body?: never; + path: { + id: string; + }; + query?: { + skip?: number; + take?: number; + }; + url: '/umbraco/management/api/v1/document/{id}/referenced-by'; +}; + +export type GetDocumentByIdReferencedByErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetDocumentByIdReferencedByResponses = { + /** + * OK + */ + 200: PagedIReferenceResponseModel; +}; + +export type GetDocumentByIdReferencedByResponse = GetDocumentByIdReferencedByResponses[keyof GetDocumentByIdReferencedByResponses]; + +export type GetDocumentByIdReferencedDescendantsData = { + body?: never; + path: { + id: string; + }; + query?: { + skip?: number; + take?: number; + }; + url: '/umbraco/management/api/v1/document/{id}/referenced-descendants'; +}; + +export type GetDocumentByIdReferencedDescendantsErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetDocumentByIdReferencedDescendantsResponses = { + /** + * OK + */ + 200: PagedReferenceByIdModel; +}; + +export type GetDocumentByIdReferencedDescendantsResponse = GetDocumentByIdReferencedDescendantsResponses[keyof GetDocumentByIdReferencedDescendantsResponses]; + +export type PutDocumentByIdUnpublishData = { + body?: UnpublishDocumentRequestModel; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/document/{id}/unpublish'; +}; + +export type PutDocumentByIdUnpublishErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PutDocumentByIdUnpublishError = PutDocumentByIdUnpublishErrors[keyof PutDocumentByIdUnpublishErrors]; + +export type PutDocumentByIdUnpublishResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type PutUmbracoManagementApiV11DocumentByIdValidate11Data = { + body?: ValidateUpdateDocumentRequestModel; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1.1/document/{id}/validate'; +}; + +export type PutUmbracoManagementApiV11DocumentByIdValidate11Errors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PutUmbracoManagementApiV11DocumentByIdValidate11Error = PutUmbracoManagementApiV11DocumentByIdValidate11Errors[keyof PutUmbracoManagementApiV11DocumentByIdValidate11Errors]; + +export type PutUmbracoManagementApiV11DocumentByIdValidate11Responses = { + /** + * OK + */ + 200: unknown; +}; + +export type GetDocumentAreReferencedData = { + body?: never; + path?: never; + query?: { + id?: Array; + skip?: number; + take?: number; + }; + url: '/umbraco/management/api/v1/document/are-referenced'; +}; + +export type GetDocumentAreReferencedErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetDocumentAreReferencedResponses = { + /** + * OK + */ + 200: PagedReferenceByIdModel; +}; + +export type GetDocumentAreReferencedResponse = GetDocumentAreReferencedResponses[keyof GetDocumentAreReferencedResponses]; + +export type GetDocumentConfigurationData = { + body?: never; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/document/configuration'; +}; + +export type GetDocumentConfigurationErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetDocumentConfigurationResponses = { + /** + * OK + */ + 200: DocumentConfigurationResponseModel; +}; + +export type GetDocumentConfigurationResponse = GetDocumentConfigurationResponses[keyof GetDocumentConfigurationResponses]; + +export type PutDocumentSortData = { + body?: SortingRequestModel; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/document/sort'; +}; + +export type PutDocumentSortErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PutDocumentSortError = PutDocumentSortErrors[keyof PutDocumentSortErrors]; + +export type PutDocumentSortResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type GetDocumentUrlsData = { + body?: never; + path?: never; + query?: { + id?: Array; + }; + url: '/umbraco/management/api/v1/document/urls'; +}; + +export type GetDocumentUrlsErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetDocumentUrlsResponses = { + /** + * OK + */ + 200: Array; +}; + +export type GetDocumentUrlsResponse = GetDocumentUrlsResponses[keyof GetDocumentUrlsResponses]; + +export type PostDocumentValidateData = { + body?: CreateDocumentRequestModel; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/document/validate'; +}; + +export type PostDocumentValidateErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PostDocumentValidateError = PostDocumentValidateErrors[keyof PostDocumentValidateErrors]; + +export type PostDocumentValidateResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type GetItemDocumentData = { + body?: never; + path?: never; + query?: { + id?: Array; + }; + url: '/umbraco/management/api/v1/item/document'; +}; + +export type GetItemDocumentErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; +}; + +export type GetItemDocumentResponses = { + /** + * OK + */ + 200: Array; +}; + +export type GetItemDocumentResponse = GetItemDocumentResponses[keyof GetItemDocumentResponses]; + +export type GetItemDocumentSearchData = { + body?: never; + path?: never; + query?: { + query?: string; + trashed?: boolean; + skip?: number; + take?: number; + parentId?: string; + allowedDocumentTypes?: Array; + }; + url: '/umbraco/management/api/v1/item/document/search'; +}; + +export type GetItemDocumentSearchErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; +}; + +export type GetItemDocumentSearchResponses = { + /** + * OK + */ + 200: PagedModelDocumentItemResponseModel; +}; + +export type GetItemDocumentSearchResponse = GetItemDocumentSearchResponses[keyof GetItemDocumentSearchResponses]; + +export type DeleteRecycleBinDocumentData = { + body?: never; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/recycle-bin/document'; +}; + +export type DeleteRecycleBinDocumentErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type DeleteRecycleBinDocumentError = DeleteRecycleBinDocumentErrors[keyof DeleteRecycleBinDocumentErrors]; + +export type DeleteRecycleBinDocumentResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type DeleteRecycleBinDocumentByIdData = { + body?: never; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/recycle-bin/document/{id}'; +}; + +export type DeleteRecycleBinDocumentByIdErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type DeleteRecycleBinDocumentByIdError = DeleteRecycleBinDocumentByIdErrors[keyof DeleteRecycleBinDocumentByIdErrors]; + +export type DeleteRecycleBinDocumentByIdResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type GetRecycleBinDocumentByIdOriginalParentData = { + body?: never; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/recycle-bin/document/{id}/original-parent'; +}; + +export type GetRecycleBinDocumentByIdOriginalParentErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type GetRecycleBinDocumentByIdOriginalParentError = GetRecycleBinDocumentByIdOriginalParentErrors[keyof GetRecycleBinDocumentByIdOriginalParentErrors]; + +export type GetRecycleBinDocumentByIdOriginalParentResponses = { + /** + * OK + */ + 200: ReferenceByIdModel; +}; + +export type GetRecycleBinDocumentByIdOriginalParentResponse = GetRecycleBinDocumentByIdOriginalParentResponses[keyof GetRecycleBinDocumentByIdOriginalParentResponses]; + +export type PutRecycleBinDocumentByIdRestoreData = { + body?: MoveMediaRequestModel; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/recycle-bin/document/{id}/restore'; +}; + +export type PutRecycleBinDocumentByIdRestoreErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PutRecycleBinDocumentByIdRestoreError = PutRecycleBinDocumentByIdRestoreErrors[keyof PutRecycleBinDocumentByIdRestoreErrors]; + +export type PutRecycleBinDocumentByIdRestoreResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type GetRecycleBinDocumentChildrenData = { + body?: never; + path?: never; + query?: { + parentId?: string; + skip?: number; + take?: number; + }; + url: '/umbraco/management/api/v1/recycle-bin/document/children'; +}; + +export type GetRecycleBinDocumentChildrenErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetRecycleBinDocumentChildrenResponses = { + /** + * OK + */ + 200: PagedDocumentRecycleBinItemResponseModel; +}; + +export type GetRecycleBinDocumentChildrenResponse = GetRecycleBinDocumentChildrenResponses[keyof GetRecycleBinDocumentChildrenResponses]; + +export type GetRecycleBinDocumentReferencedByData = { + body?: never; + path?: never; + query?: { + skip?: number; + take?: number; + }; + url: '/umbraco/management/api/v1/recycle-bin/document/referenced-by'; +}; + +export type GetRecycleBinDocumentReferencedByErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetRecycleBinDocumentReferencedByResponses = { + /** + * OK + */ + 200: PagedIReferenceResponseModel; +}; + +export type GetRecycleBinDocumentReferencedByResponse = GetRecycleBinDocumentReferencedByResponses[keyof GetRecycleBinDocumentReferencedByResponses]; + +export type GetRecycleBinDocumentRootData = { + body?: never; + path?: never; + query?: { + skip?: number; + take?: number; + }; + url: '/umbraco/management/api/v1/recycle-bin/document/root'; +}; + +export type GetRecycleBinDocumentRootErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetRecycleBinDocumentRootResponses = { + /** + * OK + */ + 200: PagedDocumentRecycleBinItemResponseModel; +}; + +export type GetRecycleBinDocumentRootResponse = GetRecycleBinDocumentRootResponses[keyof GetRecycleBinDocumentRootResponses]; + +export type GetTreeDocumentAncestorsData = { + body?: never; + path?: never; + query?: { + descendantId?: string; + }; + url: '/umbraco/management/api/v1/tree/document/ancestors'; +}; + +export type GetTreeDocumentAncestorsErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetTreeDocumentAncestorsResponses = { + /** + * OK + */ + 200: Array; +}; + +export type GetTreeDocumentAncestorsResponse = GetTreeDocumentAncestorsResponses[keyof GetTreeDocumentAncestorsResponses]; + +export type GetTreeDocumentChildrenData = { + body?: never; + path?: never; + query?: { + parentId?: string; + skip?: number; + take?: number; + dataTypeId?: string; + }; + url: '/umbraco/management/api/v1/tree/document/children'; +}; + +export type GetTreeDocumentChildrenErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetTreeDocumentChildrenResponses = { + /** + * OK + */ + 200: PagedDocumentTreeItemResponseModel; +}; + +export type GetTreeDocumentChildrenResponse = GetTreeDocumentChildrenResponses[keyof GetTreeDocumentChildrenResponses]; + +export type GetTreeDocumentRootData = { + body?: never; + path?: never; + query?: { + skip?: number; + take?: number; + dataTypeId?: string; + }; + url: '/umbraco/management/api/v1/tree/document/root'; +}; + +export type GetTreeDocumentRootErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetTreeDocumentRootResponses = { + /** + * OK + */ + 200: PagedDocumentTreeItemResponseModel; +}; + +export type GetTreeDocumentRootResponse = GetTreeDocumentRootResponses[keyof GetTreeDocumentRootResponses]; + +export type PostDynamicRootQueryData = { + body?: DynamicRootRequestModel; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/dynamic-root/query'; +}; + +export type PostDynamicRootQueryErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type PostDynamicRootQueryResponses = { + /** + * OK + */ + 200: DynamicRootResponseModel; +}; + +export type PostDynamicRootQueryResponse = PostDynamicRootQueryResponses[keyof PostDynamicRootQueryResponses]; + +export type GetDynamicRootStepsData = { + body?: never; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/dynamic-root/steps'; +}; + +export type GetDynamicRootStepsErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetDynamicRootStepsResponses = { + /** + * OK + */ + 200: Array; +}; + +export type GetDynamicRootStepsResponse = GetDynamicRootStepsResponses[keyof GetDynamicRootStepsResponses]; + +export type GetHealthCheckGroupData = { + body?: never; + path?: never; + query?: { + skip?: number; + take?: number; + }; + url: '/umbraco/management/api/v1/health-check-group'; +}; + +export type GetHealthCheckGroupErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetHealthCheckGroupResponses = { + /** + * OK + */ + 200: PagedHealthCheckGroupResponseModel; +}; + +export type GetHealthCheckGroupResponse = GetHealthCheckGroupResponses[keyof GetHealthCheckGroupResponses]; + +export type GetHealthCheckGroupByNameData = { + body?: never; + path: { + name: string; + }; + query?: never; + url: '/umbraco/management/api/v1/health-check-group/{name}'; +}; + +export type GetHealthCheckGroupByNameErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type GetHealthCheckGroupByNameError = GetHealthCheckGroupByNameErrors[keyof GetHealthCheckGroupByNameErrors]; + +export type GetHealthCheckGroupByNameResponses = { + /** + * OK + */ + 200: HealthCheckGroupPresentationModel; +}; + +export type GetHealthCheckGroupByNameResponse = GetHealthCheckGroupByNameResponses[keyof GetHealthCheckGroupByNameResponses]; + +export type PostHealthCheckGroupByNameCheckData = { + body?: never; + path: { + name: string; + }; + query?: never; + url: '/umbraco/management/api/v1/health-check-group/{name}/check'; +}; + +export type PostHealthCheckGroupByNameCheckErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PostHealthCheckGroupByNameCheckError = PostHealthCheckGroupByNameCheckErrors[keyof PostHealthCheckGroupByNameCheckErrors]; + +export type PostHealthCheckGroupByNameCheckResponses = { + /** + * OK + */ + 200: HealthCheckGroupWithResultResponseModel; +}; + +export type PostHealthCheckGroupByNameCheckResponse = PostHealthCheckGroupByNameCheckResponses[keyof PostHealthCheckGroupByNameCheckResponses]; + +export type PostHealthCheckExecuteActionData = { + body?: HealthCheckActionRequestModel; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/health-check/execute-action'; +}; + +export type PostHealthCheckExecuteActionErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type PostHealthCheckExecuteActionError = PostHealthCheckExecuteActionErrors[keyof PostHealthCheckExecuteActionErrors]; + +export type PostHealthCheckExecuteActionResponses = { + /** + * OK + */ + 200: HealthCheckResultResponseModel; +}; + +export type PostHealthCheckExecuteActionResponse = PostHealthCheckExecuteActionResponses[keyof PostHealthCheckExecuteActionResponses]; + +export type GetHelpData = { + body?: never; + path?: never; + query?: { + section?: string; + tree?: string; + skip?: number; + take?: number; + baseUrl?: string; + }; + url: '/umbraco/management/api/v1/help'; +}; + +export type GetHelpErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; +}; + +export type GetHelpError = GetHelpErrors[keyof GetHelpErrors]; + +export type GetHelpResponses = { + /** + * OK + */ + 200: PagedHelpPageResponseModel; +}; + +export type GetHelpResponse = GetHelpResponses[keyof GetHelpResponses]; + +export type GetImagingResizeUrlsData = { + body?: never; + path?: never; + query?: { + id?: Array; + height?: number; + width?: number; + mode?: ImageCropModeModel; + }; + url: '/umbraco/management/api/v1/imaging/resize/urls'; +}; + +export type GetImagingResizeUrlsErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetImagingResizeUrlsResponses = { + /** + * OK + */ + 200: Array; +}; + +export type GetImagingResizeUrlsResponse = GetImagingResizeUrlsResponses[keyof GetImagingResizeUrlsResponses]; + +export type GetImportAnalyzeData = { + body?: never; + path?: never; + query?: { + temporaryFileId?: string; + }; + url: '/umbraco/management/api/v1/import/analyze'; +}; + +export type GetImportAnalyzeErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type GetImportAnalyzeError = GetImportAnalyzeErrors[keyof GetImportAnalyzeErrors]; + +export type GetImportAnalyzeResponses = { + /** + * OK + */ + 200: EntityImportAnalysisResponseModel; +}; + +export type GetImportAnalyzeResponse = GetImportAnalyzeResponses[keyof GetImportAnalyzeResponses]; + +export type GetIndexerData = { + body?: never; + path?: never; + query?: { + skip?: number; + take?: number; + }; + url: '/umbraco/management/api/v1/indexer'; +}; + +export type GetIndexerErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; +}; + +export type GetIndexerResponses = { + /** + * OK + */ + 200: PagedIndexResponseModel; +}; + +export type GetIndexerResponse = GetIndexerResponses[keyof GetIndexerResponses]; + +export type GetIndexerByIndexNameData = { + body?: never; + path: { + indexName: string; + }; + query?: never; + url: '/umbraco/management/api/v1/indexer/{indexName}'; +}; + +export type GetIndexerByIndexNameErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; +}; + +export type GetIndexerByIndexNameError = GetIndexerByIndexNameErrors[keyof GetIndexerByIndexNameErrors]; + +export type GetIndexerByIndexNameResponses = { + /** + * OK + */ + 200: IndexResponseModel; +}; + +export type GetIndexerByIndexNameResponse = GetIndexerByIndexNameResponses[keyof GetIndexerByIndexNameResponses]; + +export type PostIndexerByIndexNameRebuildData = { + body?: never; + path: { + indexName: string; + }; + query?: never; + url: '/umbraco/management/api/v1/indexer/{indexName}/rebuild'; +}; + +export type PostIndexerByIndexNameRebuildErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * Not Found + */ + 404: ProblemDetails; + /** + * Conflict + */ + 409: ProblemDetails; +}; + +export type PostIndexerByIndexNameRebuildError = PostIndexerByIndexNameRebuildErrors[keyof PostIndexerByIndexNameRebuildErrors]; + +export type PostIndexerByIndexNameRebuildResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type GetInstallSettingsData = { + body?: never; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/install/settings'; +}; + +export type GetInstallSettingsErrors = { + /** + * Precondition Required + */ + 428: ProblemDetails; +}; + +export type GetInstallSettingsError = GetInstallSettingsErrors[keyof GetInstallSettingsErrors]; + +export type GetInstallSettingsResponses = { + /** + * OK + */ + 200: InstallSettingsResponseModel; +}; + +export type GetInstallSettingsResponse = GetInstallSettingsResponses[keyof GetInstallSettingsResponses]; + +export type PostInstallSetupData = { + body?: InstallRequestModelWritable; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/install/setup'; +}; + +export type PostInstallSetupErrors = { + /** + * Precondition Required + */ + 428: ProblemDetails; +}; + +export type PostInstallSetupError = PostInstallSetupErrors[keyof PostInstallSetupErrors]; + +export type PostInstallSetupResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type PostInstallValidateDatabaseData = { + body?: DatabaseInstallRequestModel; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/install/validate-database'; +}; + +export type PostInstallValidateDatabaseErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; +}; + +export type PostInstallValidateDatabaseError = PostInstallValidateDatabaseErrors[keyof PostInstallValidateDatabaseErrors]; + +export type PostInstallValidateDatabaseResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type GetItemLanguageData = { + body?: never; + path?: never; + query?: { + isoCode?: Array; + }; + url: '/umbraco/management/api/v1/item/language'; +}; + +export type GetItemLanguageErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; +}; + +export type GetItemLanguageResponses = { + /** + * OK + */ + 200: Array; +}; + +export type GetItemLanguageResponse = GetItemLanguageResponses[keyof GetItemLanguageResponses]; + +export type GetItemLanguageDefaultData = { + body?: never; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/item/language/default'; +}; + +export type GetItemLanguageDefaultErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; +}; + +export type GetItemLanguageDefaultResponses = { + /** + * OK + */ + 200: LanguageItemResponseModel; +}; + +export type GetItemLanguageDefaultResponse = GetItemLanguageDefaultResponses[keyof GetItemLanguageDefaultResponses]; + +export type GetLanguageData = { + body?: never; + path?: never; + query?: { + skip?: number; + take?: number; + }; + url: '/umbraco/management/api/v1/language'; +}; + +export type GetLanguageErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; +}; + +export type GetLanguageResponses = { + /** + * OK + */ + 200: PagedLanguageResponseModel; +}; + +export type GetLanguageResponse = GetLanguageResponses[keyof GetLanguageResponses]; + +export type PostLanguageData = { + body?: CreateLanguageRequestModel; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/language'; +}; + +export type PostLanguageErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PostLanguageError = PostLanguageErrors[keyof PostLanguageErrors]; + +export type PostLanguageResponses = { + /** + * Created + */ + 201: unknown; +}; + +export type DeleteLanguageByIsoCodeData = { + body?: never; + path: { + isoCode: string; + }; + query?: never; + url: '/umbraco/management/api/v1/language/{isoCode}'; +}; + +export type DeleteLanguageByIsoCodeErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type DeleteLanguageByIsoCodeError = DeleteLanguageByIsoCodeErrors[keyof DeleteLanguageByIsoCodeErrors]; + +export type DeleteLanguageByIsoCodeResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type GetLanguageByIsoCodeData = { + body?: never; + path: { + isoCode: string; + }; + query?: never; + url: '/umbraco/management/api/v1/language/{isoCode}'; +}; + +export type GetLanguageByIsoCodeErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type GetLanguageByIsoCodeError = GetLanguageByIsoCodeErrors[keyof GetLanguageByIsoCodeErrors]; + +export type GetLanguageByIsoCodeResponses = { + /** + * OK + */ + 200: LanguageResponseModel; +}; + +export type GetLanguageByIsoCodeResponse = GetLanguageByIsoCodeResponses[keyof GetLanguageByIsoCodeResponses]; + +export type PutLanguageByIsoCodeData = { + body?: UpdateLanguageRequestModel; + path: { + isoCode: string; + }; + query?: never; + url: '/umbraco/management/api/v1/language/{isoCode}'; +}; + +export type PutLanguageByIsoCodeErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PutLanguageByIsoCodeError = PutLanguageByIsoCodeErrors[keyof PutLanguageByIsoCodeErrors]; + +export type PutLanguageByIsoCodeResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type GetLogViewerLevelData = { + body?: never; + path?: never; + query?: { + skip?: number; + take?: number; + }; + url: '/umbraco/management/api/v1/log-viewer/level'; +}; + +export type GetLogViewerLevelErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetLogViewerLevelResponses = { + /** + * OK + */ + 200: PagedLoggerResponseModel; +}; + +export type GetLogViewerLevelResponse = GetLogViewerLevelResponses[keyof GetLogViewerLevelResponses]; + +export type GetLogViewerLevelCountData = { + body?: never; + path?: never; + query?: { + startDate?: string; + endDate?: string; + }; + url: '/umbraco/management/api/v1/log-viewer/level-count'; +}; + +export type GetLogViewerLevelCountErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetLogViewerLevelCountError = GetLogViewerLevelCountErrors[keyof GetLogViewerLevelCountErrors]; + +export type GetLogViewerLevelCountResponses = { + /** + * OK + */ + 200: LogLevelCountsReponseModel; +}; + +export type GetLogViewerLevelCountResponse = GetLogViewerLevelCountResponses[keyof GetLogViewerLevelCountResponses]; + +export type GetLogViewerLogData = { + body?: never; + path?: never; + query?: { + skip?: number; + take?: number; + orderDirection?: DirectionModel; + filterExpression?: string; + logLevel?: Array; + startDate?: string; + endDate?: string; + }; + url: '/umbraco/management/api/v1/log-viewer/log'; +}; + +export type GetLogViewerLogErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetLogViewerLogResponses = { + /** + * OK + */ + 200: PagedLogMessageResponseModel; +}; + +export type GetLogViewerLogResponse = GetLogViewerLogResponses[keyof GetLogViewerLogResponses]; + +export type GetLogViewerMessageTemplateData = { + body?: never; + path?: never; + query?: { + skip?: number; + take?: number; + startDate?: string; + endDate?: string; + }; + url: '/umbraco/management/api/v1/log-viewer/message-template'; +}; + +export type GetLogViewerMessageTemplateErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetLogViewerMessageTemplateError = GetLogViewerMessageTemplateErrors[keyof GetLogViewerMessageTemplateErrors]; + +export type GetLogViewerMessageTemplateResponses = { + /** + * OK + */ + 200: PagedLogTemplateResponseModel; +}; + +export type GetLogViewerMessageTemplateResponse = GetLogViewerMessageTemplateResponses[keyof GetLogViewerMessageTemplateResponses]; + +export type GetLogViewerSavedSearchData = { + body?: never; + path?: never; + query?: { + skip?: number; + take?: number; + }; + url: '/umbraco/management/api/v1/log-viewer/saved-search'; +}; + +export type GetLogViewerSavedSearchErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetLogViewerSavedSearchResponses = { + /** + * OK + */ + 200: PagedSavedLogSearchResponseModel; +}; + +export type GetLogViewerSavedSearchResponse = GetLogViewerSavedSearchResponses[keyof GetLogViewerSavedSearchResponses]; + +export type PostLogViewerSavedSearchData = { + body?: SavedLogSearchRequestModel; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/log-viewer/saved-search'; +}; + +export type PostLogViewerSavedSearchErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type PostLogViewerSavedSearchError = PostLogViewerSavedSearchErrors[keyof PostLogViewerSavedSearchErrors]; + +export type PostLogViewerSavedSearchResponses = { + /** + * Created + */ + 201: unknown; +}; + +export type DeleteLogViewerSavedSearchByNameData = { + body?: never; + path: { + name: string; + }; + query?: never; + url: '/umbraco/management/api/v1/log-viewer/saved-search/{name}'; +}; + +export type DeleteLogViewerSavedSearchByNameErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type DeleteLogViewerSavedSearchByNameError = DeleteLogViewerSavedSearchByNameErrors[keyof DeleteLogViewerSavedSearchByNameErrors]; + +export type DeleteLogViewerSavedSearchByNameResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type GetLogViewerSavedSearchByNameData = { + body?: never; + path: { + name: string; + }; + query?: never; + url: '/umbraco/management/api/v1/log-viewer/saved-search/{name}'; +}; + +export type GetLogViewerSavedSearchByNameErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type GetLogViewerSavedSearchByNameError = GetLogViewerSavedSearchByNameErrors[keyof GetLogViewerSavedSearchByNameErrors]; + +export type GetLogViewerSavedSearchByNameResponses = { + /** + * OK + */ + 200: SavedLogSearchResponseModel; +}; + +export type GetLogViewerSavedSearchByNameResponse = GetLogViewerSavedSearchByNameResponses[keyof GetLogViewerSavedSearchByNameResponses]; + +export type GetLogViewerValidateLogsSizeData = { + body?: never; + path?: never; + query?: { + startDate?: string; + endDate?: string; + }; + url: '/umbraco/management/api/v1/log-viewer/validate-logs-size'; +}; + +export type GetLogViewerValidateLogsSizeErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetLogViewerValidateLogsSizeError = GetLogViewerValidateLogsSizeErrors[keyof GetLogViewerValidateLogsSizeErrors]; + +export type GetLogViewerValidateLogsSizeResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type GetManifestManifestData = { + body?: never; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/manifest/manifest'; +}; + +export type GetManifestManifestErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetManifestManifestResponses = { + /** + * OK + */ + 200: Array; +}; + +export type GetManifestManifestResponse = GetManifestManifestResponses[keyof GetManifestManifestResponses]; + +export type GetManifestManifestPrivateData = { + body?: never; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/manifest/manifest/private'; +}; + +export type GetManifestManifestPrivateErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetManifestManifestPrivateResponses = { + /** + * OK + */ + 200: Array; +}; + +export type GetManifestManifestPrivateResponse = GetManifestManifestPrivateResponses[keyof GetManifestManifestPrivateResponses]; + +export type GetManifestManifestPublicData = { + body?: never; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/manifest/manifest/public'; +}; + +export type GetManifestManifestPublicResponses = { + /** + * OK + */ + 200: Array; +}; + +export type GetManifestManifestPublicResponse = GetManifestManifestPublicResponses[keyof GetManifestManifestPublicResponses]; + +export type GetItemMediaTypeData = { + body?: never; + path?: never; + query?: { + id?: Array; + }; + url: '/umbraco/management/api/v1/item/media-type'; +}; + +export type GetItemMediaTypeErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; +}; + +export type GetItemMediaTypeResponses = { + /** + * OK + */ + 200: Array; +}; + +export type GetItemMediaTypeResponse = GetItemMediaTypeResponses[keyof GetItemMediaTypeResponses]; + +export type GetItemMediaTypeAllowedData = { + body?: never; + path?: never; + query?: { + fileExtension?: string; + skip?: number; + take?: number; + }; + url: '/umbraco/management/api/v1/item/media-type/allowed'; +}; + +export type GetItemMediaTypeAllowedErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; +}; + +export type GetItemMediaTypeAllowedResponses = { + /** + * OK + */ + 200: PagedModelMediaTypeItemResponseModel; +}; + +export type GetItemMediaTypeAllowedResponse = GetItemMediaTypeAllowedResponses[keyof GetItemMediaTypeAllowedResponses]; + +export type GetItemMediaTypeFoldersData = { + body?: never; + path?: never; + query?: { + skip?: number; + take?: number; + }; + url: '/umbraco/management/api/v1/item/media-type/folders'; +}; + +export type GetItemMediaTypeFoldersErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; +}; + +export type GetItemMediaTypeFoldersResponses = { + /** + * OK + */ + 200: PagedModelMediaTypeItemResponseModel; +}; + +export type GetItemMediaTypeFoldersResponse = GetItemMediaTypeFoldersResponses[keyof GetItemMediaTypeFoldersResponses]; + +export type GetItemMediaTypeSearchData = { + body?: never; + path?: never; + query?: { + query?: string; + skip?: number; + take?: number; + }; + url: '/umbraco/management/api/v1/item/media-type/search'; +}; + +export type GetItemMediaTypeSearchErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; +}; + +export type GetItemMediaTypeSearchResponses = { + /** + * OK + */ + 200: PagedModelMediaTypeItemResponseModel; +}; + +export type GetItemMediaTypeSearchResponse = GetItemMediaTypeSearchResponses[keyof GetItemMediaTypeSearchResponses]; + +export type PostMediaTypeData = { + body?: CreateMediaTypeRequestModel; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/media-type'; +}; + +export type PostMediaTypeErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PostMediaTypeError = PostMediaTypeErrors[keyof PostMediaTypeErrors]; + +export type PostMediaTypeResponses = { + /** + * Created + */ + 201: unknown; +}; + +export type DeleteMediaTypeByIdData = { + body?: never; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/media-type/{id}'; +}; + +export type DeleteMediaTypeByIdErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type DeleteMediaTypeByIdError = DeleteMediaTypeByIdErrors[keyof DeleteMediaTypeByIdErrors]; + +export type DeleteMediaTypeByIdResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type GetMediaTypeByIdData = { + body?: never; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/media-type/{id}'; +}; + +export type GetMediaTypeByIdErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type GetMediaTypeByIdError = GetMediaTypeByIdErrors[keyof GetMediaTypeByIdErrors]; + +export type GetMediaTypeByIdResponses = { + /** + * OK + */ + 200: MediaTypeResponseModel; +}; + +export type GetMediaTypeByIdResponse = GetMediaTypeByIdResponses[keyof GetMediaTypeByIdResponses]; + +export type PutMediaTypeByIdData = { + body?: UpdateMediaTypeRequestModel; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/media-type/{id}'; +}; + +export type PutMediaTypeByIdErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PutMediaTypeByIdError = PutMediaTypeByIdErrors[keyof PutMediaTypeByIdErrors]; + +export type PutMediaTypeByIdResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type GetMediaTypeByIdAllowedChildrenData = { + body?: never; + path: { + id: string; + }; + query?: { + parentContentKey?: string; + skip?: number; + take?: number; + }; + url: '/umbraco/management/api/v1/media-type/{id}/allowed-children'; +}; + +export type GetMediaTypeByIdAllowedChildrenErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type GetMediaTypeByIdAllowedChildrenError = GetMediaTypeByIdAllowedChildrenErrors[keyof GetMediaTypeByIdAllowedChildrenErrors]; + +export type GetMediaTypeByIdAllowedChildrenResponses = { + /** + * OK + */ + 200: PagedAllowedMediaTypeModel; +}; + +export type GetMediaTypeByIdAllowedChildrenResponse = GetMediaTypeByIdAllowedChildrenResponses[keyof GetMediaTypeByIdAllowedChildrenResponses]; + +export type GetMediaTypeByIdCompositionReferencesData = { + body?: never; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/media-type/{id}/composition-references'; +}; + +export type GetMediaTypeByIdCompositionReferencesErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type GetMediaTypeByIdCompositionReferencesError = GetMediaTypeByIdCompositionReferencesErrors[keyof GetMediaTypeByIdCompositionReferencesErrors]; + +export type GetMediaTypeByIdCompositionReferencesResponses = { + /** + * OK + */ + 200: Array; +}; + +export type GetMediaTypeByIdCompositionReferencesResponse = GetMediaTypeByIdCompositionReferencesResponses[keyof GetMediaTypeByIdCompositionReferencesResponses]; + +export type PostMediaTypeByIdCopyData = { + body?: CopyMediaTypeRequestModel; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/media-type/{id}/copy'; +}; + +export type PostMediaTypeByIdCopyErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PostMediaTypeByIdCopyError = PostMediaTypeByIdCopyErrors[keyof PostMediaTypeByIdCopyErrors]; + +export type PostMediaTypeByIdCopyResponses = { + /** + * Created + */ + 201: unknown; +}; + +export type GetMediaTypeByIdExportData = { + body?: never; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/media-type/{id}/export'; +}; + +export type GetMediaTypeByIdExportErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type GetMediaTypeByIdExportError = GetMediaTypeByIdExportErrors[keyof GetMediaTypeByIdExportErrors]; + +export type GetMediaTypeByIdExportResponses = { + /** + * OK + */ + 200: Blob | File; +}; + +export type GetMediaTypeByIdExportResponse = GetMediaTypeByIdExportResponses[keyof GetMediaTypeByIdExportResponses]; + +export type PutMediaTypeByIdImportData = { + body?: ImportMediaTypeRequestModel; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/media-type/{id}/import'; +}; + +export type PutMediaTypeByIdImportErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PutMediaTypeByIdImportError = PutMediaTypeByIdImportErrors[keyof PutMediaTypeByIdImportErrors]; + +export type PutMediaTypeByIdImportResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type PutMediaTypeByIdMoveData = { + body?: MoveMediaTypeRequestModel; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/media-type/{id}/move'; +}; + +export type PutMediaTypeByIdMoveErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PutMediaTypeByIdMoveError = PutMediaTypeByIdMoveErrors[keyof PutMediaTypeByIdMoveErrors]; + +export type PutMediaTypeByIdMoveResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type GetMediaTypeAllowedAtRootData = { + body?: never; + path?: never; + query?: { + skip?: number; + take?: number; + }; + url: '/umbraco/management/api/v1/media-type/allowed-at-root'; +}; + +export type GetMediaTypeAllowedAtRootErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetMediaTypeAllowedAtRootResponses = { + /** + * OK + */ + 200: PagedAllowedMediaTypeModel; +}; + +export type GetMediaTypeAllowedAtRootResponse = GetMediaTypeAllowedAtRootResponses[keyof GetMediaTypeAllowedAtRootResponses]; + +export type PostMediaTypeAvailableCompositionsData = { + body?: MediaTypeCompositionRequestModel; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/media-type/available-compositions'; +}; + +export type PostMediaTypeAvailableCompositionsErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type PostMediaTypeAvailableCompositionsResponses = { + /** + * OK + */ + 200: Array; +}; + +export type PostMediaTypeAvailableCompositionsResponse = PostMediaTypeAvailableCompositionsResponses[keyof PostMediaTypeAvailableCompositionsResponses]; + +export type GetMediaTypeConfigurationData = { + body?: never; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/media-type/configuration'; +}; + +export type GetMediaTypeConfigurationErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetMediaTypeConfigurationResponses = { + /** + * OK + */ + 200: MediaTypeConfigurationResponseModel; +}; + +export type GetMediaTypeConfigurationResponse = GetMediaTypeConfigurationResponses[keyof GetMediaTypeConfigurationResponses]; + +export type PostMediaTypeFolderData = { + body?: CreateFolderRequestModel; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/media-type/folder'; +}; + +export type PostMediaTypeFolderErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PostMediaTypeFolderError = PostMediaTypeFolderErrors[keyof PostMediaTypeFolderErrors]; + +export type PostMediaTypeFolderResponses = { + /** + * Created + */ + 201: unknown; +}; + +export type DeleteMediaTypeFolderByIdData = { + body?: never; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/media-type/folder/{id}'; +}; + +export type DeleteMediaTypeFolderByIdErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type DeleteMediaTypeFolderByIdError = DeleteMediaTypeFolderByIdErrors[keyof DeleteMediaTypeFolderByIdErrors]; + +export type DeleteMediaTypeFolderByIdResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type GetMediaTypeFolderByIdData = { + body?: never; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/media-type/folder/{id}'; +}; + +export type GetMediaTypeFolderByIdErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type GetMediaTypeFolderByIdError = GetMediaTypeFolderByIdErrors[keyof GetMediaTypeFolderByIdErrors]; + +export type GetMediaTypeFolderByIdResponses = { + /** + * OK + */ + 200: FolderResponseModel; +}; + +export type GetMediaTypeFolderByIdResponse = GetMediaTypeFolderByIdResponses[keyof GetMediaTypeFolderByIdResponses]; + +export type PutMediaTypeFolderByIdData = { + body?: UpdateFolderResponseModel; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/media-type/folder/{id}'; +}; + +export type PutMediaTypeFolderByIdErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PutMediaTypeFolderByIdError = PutMediaTypeFolderByIdErrors[keyof PutMediaTypeFolderByIdErrors]; + +export type PutMediaTypeFolderByIdResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type PostMediaTypeImportData = { + body?: ImportMediaTypeRequestModel; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/media-type/import'; +}; + +export type PostMediaTypeImportErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PostMediaTypeImportError = PostMediaTypeImportErrors[keyof PostMediaTypeImportErrors]; + +export type PostMediaTypeImportResponses = { + /** + * Created + */ + 201: unknown; +}; + +export type GetTreeMediaTypeAncestorsData = { + body?: never; + path?: never; + query?: { + descendantId?: string; + }; + url: '/umbraco/management/api/v1/tree/media-type/ancestors'; +}; + +export type GetTreeMediaTypeAncestorsErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetTreeMediaTypeAncestorsResponses = { + /** + * OK + */ + 200: Array; +}; + +export type GetTreeMediaTypeAncestorsResponse = GetTreeMediaTypeAncestorsResponses[keyof GetTreeMediaTypeAncestorsResponses]; + +export type GetTreeMediaTypeChildrenData = { + body?: never; + path?: never; + query?: { + parentId?: string; + skip?: number; + take?: number; + foldersOnly?: boolean; + }; + url: '/umbraco/management/api/v1/tree/media-type/children'; +}; + +export type GetTreeMediaTypeChildrenErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetTreeMediaTypeChildrenResponses = { + /** + * OK + */ + 200: PagedMediaTypeTreeItemResponseModel; +}; + +export type GetTreeMediaTypeChildrenResponse = GetTreeMediaTypeChildrenResponses[keyof GetTreeMediaTypeChildrenResponses]; + +export type GetTreeMediaTypeRootData = { + body?: never; + path?: never; + query?: { + skip?: number; + take?: number; + foldersOnly?: boolean; + }; + url: '/umbraco/management/api/v1/tree/media-type/root'; +}; + +export type GetTreeMediaTypeRootErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetTreeMediaTypeRootResponses = { + /** + * OK + */ + 200: PagedMediaTypeTreeItemResponseModel; +}; + +export type GetTreeMediaTypeRootResponse = GetTreeMediaTypeRootResponses[keyof GetTreeMediaTypeRootResponses]; + +export type GetCollectionMediaData = { + body?: never; + path?: never; + query?: { + id?: string; + dataTypeId?: string; + orderBy?: string; + orderDirection?: DirectionModel; + filter?: string; + skip?: number; + take?: number; + }; + url: '/umbraco/management/api/v1/collection/media'; +}; + +export type GetCollectionMediaErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type GetCollectionMediaError = GetCollectionMediaErrors[keyof GetCollectionMediaErrors]; + +export type GetCollectionMediaResponses = { + /** + * OK + */ + 200: PagedMediaCollectionResponseModel; +}; + +export type GetCollectionMediaResponse = GetCollectionMediaResponses[keyof GetCollectionMediaResponses]; + +export type GetItemMediaData = { + body?: never; + path?: never; + query?: { + id?: Array; + }; + url: '/umbraco/management/api/v1/item/media'; +}; + +export type GetItemMediaErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; +}; + +export type GetItemMediaResponses = { + /** + * OK + */ + 200: Array; +}; + +export type GetItemMediaResponse = GetItemMediaResponses[keyof GetItemMediaResponses]; + +export type GetItemMediaSearchData = { + body?: never; + path?: never; + query?: { + query?: string; + trashed?: boolean; + skip?: number; + take?: number; + parentId?: string; + allowedMediaTypes?: Array; + }; + url: '/umbraco/management/api/v1/item/media/search'; +}; + +export type GetItemMediaSearchErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; +}; + +export type GetItemMediaSearchResponses = { + /** + * OK + */ + 200: PagedModelMediaItemResponseModel; +}; + +export type GetItemMediaSearchResponse = GetItemMediaSearchResponses[keyof GetItemMediaSearchResponses]; + +export type PostMediaData = { + body?: CreateMediaRequestModel; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/media'; +}; + +export type PostMediaErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PostMediaError = PostMediaErrors[keyof PostMediaErrors]; + +export type PostMediaResponses = { + /** + * Created + */ + 201: unknown; +}; + +export type DeleteMediaByIdData = { + body?: never; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/media/{id}'; +}; + +export type DeleteMediaByIdErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type DeleteMediaByIdError = DeleteMediaByIdErrors[keyof DeleteMediaByIdErrors]; + +export type DeleteMediaByIdResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type GetMediaByIdData = { + body?: never; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/media/{id}'; +}; + +export type GetMediaByIdErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type GetMediaByIdError = GetMediaByIdErrors[keyof GetMediaByIdErrors]; + +export type GetMediaByIdResponses = { + /** + * OK + */ + 200: MediaResponseModel; +}; + +export type GetMediaByIdResponse = GetMediaByIdResponses[keyof GetMediaByIdResponses]; + +export type PutMediaByIdData = { + body?: UpdateMediaRequestModel; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/media/{id}'; +}; + +export type PutMediaByIdErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PutMediaByIdError = PutMediaByIdErrors[keyof PutMediaByIdErrors]; + +export type PutMediaByIdResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type GetMediaByIdAuditLogData = { + body?: never; + path: { + id: string; + }; + query?: { + orderDirection?: DirectionModel; + sinceDate?: string; + skip?: number; + take?: number; + }; + url: '/umbraco/management/api/v1/media/{id}/audit-log'; +}; + +export type GetMediaByIdAuditLogErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetMediaByIdAuditLogResponses = { + /** + * OK + */ + 200: PagedAuditLogResponseModel; +}; + +export type GetMediaByIdAuditLogResponse = GetMediaByIdAuditLogResponses[keyof GetMediaByIdAuditLogResponses]; + +export type PutMediaByIdMoveData = { + body?: MoveMediaRequestModel; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/media/{id}/move'; +}; + +export type PutMediaByIdMoveErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PutMediaByIdMoveError = PutMediaByIdMoveErrors[keyof PutMediaByIdMoveErrors]; + +export type PutMediaByIdMoveResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type PutMediaByIdMoveToRecycleBinData = { + body?: never; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/media/{id}/move-to-recycle-bin'; +}; + +export type PutMediaByIdMoveToRecycleBinErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PutMediaByIdMoveToRecycleBinError = PutMediaByIdMoveToRecycleBinErrors[keyof PutMediaByIdMoveToRecycleBinErrors]; + +export type PutMediaByIdMoveToRecycleBinResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type GetMediaByIdReferencedByData = { + body?: never; + path: { + id: string; + }; + query?: { + skip?: number; + take?: number; + }; + url: '/umbraco/management/api/v1/media/{id}/referenced-by'; +}; + +export type GetMediaByIdReferencedByErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetMediaByIdReferencedByResponses = { + /** + * OK + */ + 200: PagedIReferenceResponseModel; +}; + +export type GetMediaByIdReferencedByResponse = GetMediaByIdReferencedByResponses[keyof GetMediaByIdReferencedByResponses]; + +export type GetMediaByIdReferencedDescendantsData = { + body?: never; + path: { + id: string; + }; + query?: { + skip?: number; + take?: number; + }; + url: '/umbraco/management/api/v1/media/{id}/referenced-descendants'; +}; + +export type GetMediaByIdReferencedDescendantsErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetMediaByIdReferencedDescendantsResponses = { + /** + * OK + */ + 200: PagedReferenceByIdModel; +}; + +export type GetMediaByIdReferencedDescendantsResponse = GetMediaByIdReferencedDescendantsResponses[keyof GetMediaByIdReferencedDescendantsResponses]; + +export type PutMediaByIdValidateData = { + body?: UpdateMediaRequestModel; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/media/{id}/validate'; +}; + +export type PutMediaByIdValidateErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PutMediaByIdValidateError = PutMediaByIdValidateErrors[keyof PutMediaByIdValidateErrors]; + +export type PutMediaByIdValidateResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type GetMediaAreReferencedData = { + body?: never; + path?: never; + query?: { + id?: Array; + skip?: number; + take?: number; + }; + url: '/umbraco/management/api/v1/media/are-referenced'; +}; + +export type GetMediaAreReferencedErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetMediaAreReferencedResponses = { + /** + * OK + */ + 200: PagedReferenceByIdModel; +}; + +export type GetMediaAreReferencedResponse = GetMediaAreReferencedResponses[keyof GetMediaAreReferencedResponses]; + +export type GetMediaConfigurationData = { + body?: never; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/media/configuration'; +}; + +export type GetMediaConfigurationErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetMediaConfigurationResponses = { + /** + * OK + */ + 200: MediaConfigurationResponseModel; +}; + +export type GetMediaConfigurationResponse = GetMediaConfigurationResponses[keyof GetMediaConfigurationResponses]; + +export type PutMediaSortData = { + body?: SortingRequestModel; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/media/sort'; +}; + +export type PutMediaSortErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PutMediaSortError = PutMediaSortErrors[keyof PutMediaSortErrors]; + +export type PutMediaSortResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type GetMediaUrlsData = { + body?: never; + path?: never; + query?: { + id?: Array; + }; + url: '/umbraco/management/api/v1/media/urls'; +}; + +export type GetMediaUrlsErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetMediaUrlsResponses = { + /** + * OK + */ + 200: Array; +}; + +export type GetMediaUrlsResponse = GetMediaUrlsResponses[keyof GetMediaUrlsResponses]; + +export type PostMediaValidateData = { + body?: CreateMediaRequestModel; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/media/validate'; +}; + +export type PostMediaValidateErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PostMediaValidateError = PostMediaValidateErrors[keyof PostMediaValidateErrors]; + +export type PostMediaValidateResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type DeleteRecycleBinMediaData = { + body?: never; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/recycle-bin/media'; +}; + +export type DeleteRecycleBinMediaErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type DeleteRecycleBinMediaError = DeleteRecycleBinMediaErrors[keyof DeleteRecycleBinMediaErrors]; + +export type DeleteRecycleBinMediaResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type DeleteRecycleBinMediaByIdData = { + body?: never; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/recycle-bin/media/{id}'; +}; + +export type DeleteRecycleBinMediaByIdErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type DeleteRecycleBinMediaByIdError = DeleteRecycleBinMediaByIdErrors[keyof DeleteRecycleBinMediaByIdErrors]; + +export type DeleteRecycleBinMediaByIdResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type GetRecycleBinMediaByIdOriginalParentData = { + body?: never; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/recycle-bin/media/{id}/original-parent'; +}; + +export type GetRecycleBinMediaByIdOriginalParentErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type GetRecycleBinMediaByIdOriginalParentError = GetRecycleBinMediaByIdOriginalParentErrors[keyof GetRecycleBinMediaByIdOriginalParentErrors]; + +export type GetRecycleBinMediaByIdOriginalParentResponses = { + /** + * OK + */ + 200: ReferenceByIdModel; +}; + +export type GetRecycleBinMediaByIdOriginalParentResponse = GetRecycleBinMediaByIdOriginalParentResponses[keyof GetRecycleBinMediaByIdOriginalParentResponses]; + +export type PutRecycleBinMediaByIdRestoreData = { + body?: MoveMediaRequestModel; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/recycle-bin/media/{id}/restore'; +}; + +export type PutRecycleBinMediaByIdRestoreErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PutRecycleBinMediaByIdRestoreError = PutRecycleBinMediaByIdRestoreErrors[keyof PutRecycleBinMediaByIdRestoreErrors]; + +export type PutRecycleBinMediaByIdRestoreResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type GetRecycleBinMediaChildrenData = { + body?: never; + path?: never; + query?: { + parentId?: string; + skip?: number; + take?: number; + }; + url: '/umbraco/management/api/v1/recycle-bin/media/children'; +}; + +export type GetRecycleBinMediaChildrenErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetRecycleBinMediaChildrenResponses = { + /** + * OK + */ + 200: PagedMediaRecycleBinItemResponseModel; +}; + +export type GetRecycleBinMediaChildrenResponse = GetRecycleBinMediaChildrenResponses[keyof GetRecycleBinMediaChildrenResponses]; + +export type GetRecycleBinMediaReferencedByData = { + body?: never; + path?: never; + query?: { + skip?: number; + take?: number; + }; + url: '/umbraco/management/api/v1/recycle-bin/media/referenced-by'; +}; + +export type GetRecycleBinMediaReferencedByErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetRecycleBinMediaReferencedByResponses = { + /** + * OK + */ + 200: PagedIReferenceResponseModel; +}; + +export type GetRecycleBinMediaReferencedByResponse = GetRecycleBinMediaReferencedByResponses[keyof GetRecycleBinMediaReferencedByResponses]; + +export type GetRecycleBinMediaRootData = { + body?: never; + path?: never; + query?: { + skip?: number; + take?: number; + }; + url: '/umbraco/management/api/v1/recycle-bin/media/root'; +}; + +export type GetRecycleBinMediaRootErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetRecycleBinMediaRootResponses = { + /** + * OK + */ + 200: PagedMediaRecycleBinItemResponseModel; +}; + +export type GetRecycleBinMediaRootResponse = GetRecycleBinMediaRootResponses[keyof GetRecycleBinMediaRootResponses]; + +export type GetTreeMediaAncestorsData = { + body?: never; + path?: never; + query?: { + descendantId?: string; + }; + url: '/umbraco/management/api/v1/tree/media/ancestors'; +}; + +export type GetTreeMediaAncestorsErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetTreeMediaAncestorsResponses = { + /** + * OK + */ + 200: Array; +}; + +export type GetTreeMediaAncestorsResponse = GetTreeMediaAncestorsResponses[keyof GetTreeMediaAncestorsResponses]; + +export type GetTreeMediaChildrenData = { + body?: never; + path?: never; + query?: { + parentId?: string; + skip?: number; + take?: number; + dataTypeId?: string; + }; + url: '/umbraco/management/api/v1/tree/media/children'; +}; + +export type GetTreeMediaChildrenErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetTreeMediaChildrenResponses = { + /** + * OK + */ + 200: PagedMediaTreeItemResponseModel; +}; + +export type GetTreeMediaChildrenResponse = GetTreeMediaChildrenResponses[keyof GetTreeMediaChildrenResponses]; + +export type GetTreeMediaRootData = { + body?: never; + path?: never; + query?: { + skip?: number; + take?: number; + dataTypeId?: string; + }; + url: '/umbraco/management/api/v1/tree/media/root'; +}; + +export type GetTreeMediaRootErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetTreeMediaRootResponses = { + /** + * OK + */ + 200: PagedMediaTreeItemResponseModel; +}; + +export type GetTreeMediaRootResponse = GetTreeMediaRootResponses[keyof GetTreeMediaRootResponses]; + +export type GetItemMemberGroupData = { + body?: never; + path?: never; + query?: { + id?: Array; + }; + url: '/umbraco/management/api/v1/item/member-group'; +}; + +export type GetItemMemberGroupErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; +}; + +export type GetItemMemberGroupResponses = { + /** + * OK + */ + 200: Array; +}; + +export type GetItemMemberGroupResponse = GetItemMemberGroupResponses[keyof GetItemMemberGroupResponses]; + +export type GetMemberGroupData = { + body?: never; + path?: never; + query?: { + skip?: number; + take?: number; + }; + url: '/umbraco/management/api/v1/member-group'; +}; + +export type GetMemberGroupErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetMemberGroupResponses = { + /** + * OK + */ + 200: PagedMemberGroupResponseModel; +}; + +export type GetMemberGroupResponse = GetMemberGroupResponses[keyof GetMemberGroupResponses]; + +export type PostMemberGroupData = { + body?: CreateMemberGroupRequestModel; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/member-group'; +}; + +export type PostMemberGroupErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type PostMemberGroupError = PostMemberGroupErrors[keyof PostMemberGroupErrors]; + +export type PostMemberGroupResponses = { + /** + * Created + */ + 201: unknown; +}; + +export type DeleteMemberGroupByIdData = { + body?: never; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/member-group/{id}'; +}; + +export type DeleteMemberGroupByIdErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type DeleteMemberGroupByIdError = DeleteMemberGroupByIdErrors[keyof DeleteMemberGroupByIdErrors]; + +export type DeleteMemberGroupByIdResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type GetMemberGroupByIdData = { + body?: never; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/member-group/{id}'; +}; + +export type GetMemberGroupByIdErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type GetMemberGroupByIdResponses = { + /** + * OK + */ + 200: MemberGroupResponseModel; +}; + +export type GetMemberGroupByIdResponse = GetMemberGroupByIdResponses[keyof GetMemberGroupByIdResponses]; + +export type PutMemberGroupByIdData = { + body?: UpdateMemberGroupRequestModel; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/member-group/{id}'; +}; + +export type PutMemberGroupByIdErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PutMemberGroupByIdError = PutMemberGroupByIdErrors[keyof PutMemberGroupByIdErrors]; + +export type PutMemberGroupByIdResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type GetTreeMemberGroupRootData = { + body?: never; + path?: never; + query?: { + skip?: number; + take?: number; + }; + url: '/umbraco/management/api/v1/tree/member-group/root'; +}; + +export type GetTreeMemberGroupRootErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetTreeMemberGroupRootResponses = { + /** + * OK + */ + 200: PagedNamedEntityTreeItemResponseModel; +}; + +export type GetTreeMemberGroupRootResponse = GetTreeMemberGroupRootResponses[keyof GetTreeMemberGroupRootResponses]; + +export type GetItemMemberTypeData = { + body?: never; + path?: never; + query?: { + id?: Array; + }; + url: '/umbraco/management/api/v1/item/member-type'; +}; + +export type GetItemMemberTypeErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; +}; + +export type GetItemMemberTypeResponses = { + /** + * OK + */ + 200: Array; +}; + +export type GetItemMemberTypeResponse = GetItemMemberTypeResponses[keyof GetItemMemberTypeResponses]; + +export type GetItemMemberTypeSearchData = { + body?: never; + path?: never; + query?: { + query?: string; + skip?: number; + take?: number; + }; + url: '/umbraco/management/api/v1/item/member-type/search'; +}; + +export type GetItemMemberTypeSearchErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; +}; + +export type GetItemMemberTypeSearchResponses = { + /** + * OK + */ + 200: PagedModelMemberTypeItemResponseModel; +}; + +export type GetItemMemberTypeSearchResponse = GetItemMemberTypeSearchResponses[keyof GetItemMemberTypeSearchResponses]; + +export type PostMemberTypeData = { + body?: CreateMemberTypeRequestModel; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/member-type'; +}; + +export type PostMemberTypeErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PostMemberTypeError = PostMemberTypeErrors[keyof PostMemberTypeErrors]; + +export type PostMemberTypeResponses = { + /** + * Created + */ + 201: unknown; +}; + +export type DeleteMemberTypeByIdData = { + body?: never; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/member-type/{id}'; +}; + +export type DeleteMemberTypeByIdErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type DeleteMemberTypeByIdError = DeleteMemberTypeByIdErrors[keyof DeleteMemberTypeByIdErrors]; + +export type DeleteMemberTypeByIdResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type GetMemberTypeByIdData = { + body?: never; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/member-type/{id}'; +}; + +export type GetMemberTypeByIdErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type GetMemberTypeByIdError = GetMemberTypeByIdErrors[keyof GetMemberTypeByIdErrors]; + +export type GetMemberTypeByIdResponses = { + /** + * OK + */ + 200: MemberTypeResponseModel; +}; + +export type GetMemberTypeByIdResponse = GetMemberTypeByIdResponses[keyof GetMemberTypeByIdResponses]; + +export type PutMemberTypeByIdData = { + body?: UpdateMemberTypeRequestModel; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/member-type/{id}'; +}; + +export type PutMemberTypeByIdErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PutMemberTypeByIdError = PutMemberTypeByIdErrors[keyof PutMemberTypeByIdErrors]; + +export type PutMemberTypeByIdResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type GetMemberTypeByIdCompositionReferencesData = { + body?: never; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/member-type/{id}/composition-references'; +}; + +export type GetMemberTypeByIdCompositionReferencesErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type GetMemberTypeByIdCompositionReferencesError = GetMemberTypeByIdCompositionReferencesErrors[keyof GetMemberTypeByIdCompositionReferencesErrors]; + +export type GetMemberTypeByIdCompositionReferencesResponses = { + /** + * OK + */ + 200: Array; +}; + +export type GetMemberTypeByIdCompositionReferencesResponse = GetMemberTypeByIdCompositionReferencesResponses[keyof GetMemberTypeByIdCompositionReferencesResponses]; + +export type PostMemberTypeByIdCopyData = { + body?: never; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/member-type/{id}/copy'; +}; + +export type PostMemberTypeByIdCopyErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PostMemberTypeByIdCopyError = PostMemberTypeByIdCopyErrors[keyof PostMemberTypeByIdCopyErrors]; + +export type PostMemberTypeByIdCopyResponses = { + /** + * Created + */ + 201: unknown; +}; + +export type PostMemberTypeAvailableCompositionsData = { + body?: MemberTypeCompositionRequestModel; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/member-type/available-compositions'; +}; + +export type PostMemberTypeAvailableCompositionsErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type PostMemberTypeAvailableCompositionsResponses = { + /** + * OK + */ + 200: Array; +}; + +export type PostMemberTypeAvailableCompositionsResponse = PostMemberTypeAvailableCompositionsResponses[keyof PostMemberTypeAvailableCompositionsResponses]; + +export type GetMemberTypeConfigurationData = { + body?: never; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/member-type/configuration'; +}; + +export type GetMemberTypeConfigurationErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetMemberTypeConfigurationResponses = { + /** + * OK + */ + 200: MemberTypeConfigurationResponseModel; +}; + +export type GetMemberTypeConfigurationResponse = GetMemberTypeConfigurationResponses[keyof GetMemberTypeConfigurationResponses]; + +export type GetTreeMemberTypeRootData = { + body?: never; + path?: never; + query?: { + skip?: number; + take?: number; + }; + url: '/umbraco/management/api/v1/tree/member-type/root'; +}; + +export type GetTreeMemberTypeRootErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetTreeMemberTypeRootResponses = { + /** + * OK + */ + 200: PagedMemberTypeTreeItemResponseModel; +}; + +export type GetTreeMemberTypeRootResponse = GetTreeMemberTypeRootResponses[keyof GetTreeMemberTypeRootResponses]; + +export type GetFilterMemberData = { + body?: never; + path?: never; + query?: { + memberTypeId?: string; + memberGroupName?: string; + isApproved?: boolean; + isLockedOut?: boolean; + orderBy?: string; + orderDirection?: DirectionModel; + filter?: string; + skip?: number; + take?: number; + }; + url: '/umbraco/management/api/v1/filter/member'; +}; + +export type GetFilterMemberErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type GetFilterMemberError = GetFilterMemberErrors[keyof GetFilterMemberErrors]; + +export type GetFilterMemberResponses = { + /** + * OK + */ + 200: PagedMemberResponseModel; +}; + +export type GetFilterMemberResponse = GetFilterMemberResponses[keyof GetFilterMemberResponses]; + +export type GetItemMemberData = { + body?: never; + path?: never; + query?: { + id?: Array; + }; + url: '/umbraco/management/api/v1/item/member'; +}; + +export type GetItemMemberErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; +}; + +export type GetItemMemberResponses = { + /** + * OK + */ + 200: Array; +}; + +export type GetItemMemberResponse = GetItemMemberResponses[keyof GetItemMemberResponses]; + +export type GetItemMemberSearchData = { + body?: never; + path?: never; + query?: { + query?: string; + skip?: number; + take?: number; + allowedMemberTypes?: Array; + }; + url: '/umbraco/management/api/v1/item/member/search'; +}; + +export type GetItemMemberSearchErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; +}; + +export type GetItemMemberSearchResponses = { + /** + * OK + */ + 200: PagedModelMemberItemResponseModel; +}; + +export type GetItemMemberSearchResponse = GetItemMemberSearchResponses[keyof GetItemMemberSearchResponses]; + +export type PostMemberData = { + body?: CreateMemberRequestModel; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/member'; +}; + +export type PostMemberErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PostMemberError = PostMemberErrors[keyof PostMemberErrors]; + +export type PostMemberResponses = { + /** + * Created + */ + 201: unknown; +}; + +export type DeleteMemberByIdData = { + body?: never; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/member/{id}'; +}; + +export type DeleteMemberByIdErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type DeleteMemberByIdError = DeleteMemberByIdErrors[keyof DeleteMemberByIdErrors]; + +export type DeleteMemberByIdResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type GetMemberByIdData = { + body?: never; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/member/{id}'; +}; + +export type GetMemberByIdErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type GetMemberByIdError = GetMemberByIdErrors[keyof GetMemberByIdErrors]; + +export type GetMemberByIdResponses = { + /** + * OK + */ + 200: MemberResponseModel; +}; + +export type GetMemberByIdResponse = GetMemberByIdResponses[keyof GetMemberByIdResponses]; + +export type PutMemberByIdData = { + body?: UpdateMemberRequestModel; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/member/{id}'; +}; + +export type PutMemberByIdErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PutMemberByIdError = PutMemberByIdErrors[keyof PutMemberByIdErrors]; + +export type PutMemberByIdResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type GetMemberByIdReferencedByData = { + body?: never; + path: { + id: string; + }; + query?: { + skip?: number; + take?: number; + }; + url: '/umbraco/management/api/v1/member/{id}/referenced-by'; +}; + +export type GetMemberByIdReferencedByErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetMemberByIdReferencedByResponses = { + /** + * OK + */ + 200: PagedIReferenceResponseModel; +}; + +export type GetMemberByIdReferencedByResponse = GetMemberByIdReferencedByResponses[keyof GetMemberByIdReferencedByResponses]; + +export type GetMemberByIdReferencedDescendantsData = { + body?: never; + path: { + id: string; + }; + query?: { + skip?: number; + take?: number; + }; + url: '/umbraco/management/api/v1/member/{id}/referenced-descendants'; +}; + +export type GetMemberByIdReferencedDescendantsErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetMemberByIdReferencedDescendantsResponses = { + /** + * OK + */ + 200: PagedReferenceByIdModel; +}; + +export type GetMemberByIdReferencedDescendantsResponse = GetMemberByIdReferencedDescendantsResponses[keyof GetMemberByIdReferencedDescendantsResponses]; + +export type PutMemberByIdValidateData = { + body?: UpdateMemberRequestModel; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/member/{id}/validate'; +}; + +export type PutMemberByIdValidateErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PutMemberByIdValidateError = PutMemberByIdValidateErrors[keyof PutMemberByIdValidateErrors]; + +export type PutMemberByIdValidateResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type GetMemberAreReferencedData = { + body?: never; + path?: never; + query?: { + id?: Array; + skip?: number; + take?: number; + }; + url: '/umbraco/management/api/v1/member/are-referenced'; +}; + +export type GetMemberAreReferencedErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetMemberAreReferencedResponses = { + /** + * OK + */ + 200: PagedReferenceByIdModel; +}; + +export type GetMemberAreReferencedResponse = GetMemberAreReferencedResponses[keyof GetMemberAreReferencedResponses]; + +export type GetMemberConfigurationData = { + body?: never; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/member/configuration'; +}; + +export type GetMemberConfigurationErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetMemberConfigurationResponses = { + /** + * OK + */ + 200: MemberConfigurationResponseModel; +}; + +export type GetMemberConfigurationResponse = GetMemberConfigurationResponses[keyof GetMemberConfigurationResponses]; + +export type PostMemberValidateData = { + body?: CreateMemberRequestModel; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/member/validate'; +}; + +export type PostMemberValidateErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PostMemberValidateError = PostMemberValidateErrors[keyof PostMemberValidateErrors]; + +export type PostMemberValidateResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type PostModelsBuilderBuildData = { + body?: never; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/models-builder/build'; +}; + +export type PostModelsBuilderBuildErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Precondition Required + */ + 428: ProblemDetails; +}; + +export type PostModelsBuilderBuildError = PostModelsBuilderBuildErrors[keyof PostModelsBuilderBuildErrors]; + +export type PostModelsBuilderBuildResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type GetModelsBuilderDashboardData = { + body?: never; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/models-builder/dashboard'; +}; + +export type GetModelsBuilderDashboardErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetModelsBuilderDashboardResponses = { + /** + * OK + */ + 200: ModelsBuilderResponseModel; +}; + +export type GetModelsBuilderDashboardResponse = GetModelsBuilderDashboardResponses[keyof GetModelsBuilderDashboardResponses]; + +export type GetModelsBuilderStatusData = { + body?: never; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/models-builder/status'; +}; + +export type GetModelsBuilderStatusErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetModelsBuilderStatusResponses = { + /** + * OK + */ + 200: OutOfDateStatusResponseModel; +}; + +export type GetModelsBuilderStatusResponse = GetModelsBuilderStatusResponses[keyof GetModelsBuilderStatusResponses]; + +export type GetObjectTypesData = { + body?: never; + path?: never; + query?: { + skip?: number; + take?: number; + }; + url: '/umbraco/management/api/v1/object-types'; +}; + +export type GetObjectTypesErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; +}; + +export type GetObjectTypesResponses = { + /** + * OK + */ + 200: PagedObjectTypeResponseModel; +}; + +export type GetObjectTypesResponse = GetObjectTypesResponses[keyof GetObjectTypesResponses]; + +export type GetOembedQueryData = { + body?: never; + path?: never; + query?: { + url?: string; + maxWidth?: number; + maxHeight?: number; + }; + url: '/umbraco/management/api/v1/oembed/query'; +}; + +export type GetOembedQueryErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetOembedQueryResponses = { + /** + * OK + */ + 200: OEmbedResponseModel; +}; + +export type GetOembedQueryResponse = GetOembedQueryResponses[keyof GetOembedQueryResponses]; + +export type PostPackageByNameRunMigrationData = { + body?: never; + path: { + name: string; + }; + query?: never; + url: '/umbraco/management/api/v1/package/{name}/run-migration'; +}; + +export type PostPackageByNameRunMigrationErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; + /** + * Conflict + */ + 409: ProblemDetails; +}; + +export type PostPackageByNameRunMigrationError = PostPackageByNameRunMigrationErrors[keyof PostPackageByNameRunMigrationErrors]; + +export type PostPackageByNameRunMigrationResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type GetPackageConfigurationData = { + body?: never; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/package/configuration'; +}; + +export type GetPackageConfigurationErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetPackageConfigurationResponses = { + /** + * OK + */ + 200: PackageConfigurationResponseModel; +}; + +export type GetPackageConfigurationResponse = GetPackageConfigurationResponses[keyof GetPackageConfigurationResponses]; + +export type GetPackageCreatedData = { + body?: never; + path?: never; + query?: { + skip?: number; + take?: number; + }; + url: '/umbraco/management/api/v1/package/created'; +}; + +export type GetPackageCreatedErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetPackageCreatedResponses = { + /** + * OK + */ + 200: PagedPackageDefinitionResponseModelReadable; +}; + +export type GetPackageCreatedResponse = GetPackageCreatedResponses[keyof GetPackageCreatedResponses]; + +export type PostPackageCreatedData = { + body?: CreatePackageRequestModel; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/package/created'; +}; + +export type PostPackageCreatedErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PostPackageCreatedError = PostPackageCreatedErrors[keyof PostPackageCreatedErrors]; + +export type PostPackageCreatedResponses = { + /** + * Created + */ + 201: unknown; +}; + +export type DeletePackageCreatedByIdData = { + body?: never; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/package/created/{id}'; +}; + +export type DeletePackageCreatedByIdErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type DeletePackageCreatedByIdError = DeletePackageCreatedByIdErrors[keyof DeletePackageCreatedByIdErrors]; + +export type DeletePackageCreatedByIdResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type GetPackageCreatedByIdData = { + body?: never; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/package/created/{id}'; +}; + +export type GetPackageCreatedByIdErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type GetPackageCreatedByIdError = GetPackageCreatedByIdErrors[keyof GetPackageCreatedByIdErrors]; + +export type GetPackageCreatedByIdResponses = { + /** + * OK + */ + 200: PackageDefinitionResponseModelReadable; +}; + +export type GetPackageCreatedByIdResponse = GetPackageCreatedByIdResponses[keyof GetPackageCreatedByIdResponses]; + +export type PutPackageCreatedByIdData = { + body?: UpdatePackageRequestModelWritable; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/package/created/{id}'; +}; + +export type PutPackageCreatedByIdErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PutPackageCreatedByIdError = PutPackageCreatedByIdErrors[keyof PutPackageCreatedByIdErrors]; + +export type PutPackageCreatedByIdResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type GetPackageCreatedByIdDownloadData = { + body?: never; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/package/created/{id}/download'; +}; + +export type GetPackageCreatedByIdDownloadErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type GetPackageCreatedByIdDownloadError = GetPackageCreatedByIdDownloadErrors[keyof GetPackageCreatedByIdDownloadErrors]; + +export type GetPackageCreatedByIdDownloadResponses = { + /** + * OK + */ + 200: Blob | File; +}; + +export type GetPackageCreatedByIdDownloadResponse = GetPackageCreatedByIdDownloadResponses[keyof GetPackageCreatedByIdDownloadResponses]; + +export type GetPackageMigrationStatusData = { + body?: never; + path?: never; + query?: { + skip?: number; + take?: number; + }; + url: '/umbraco/management/api/v1/package/migration-status'; +}; + +export type GetPackageMigrationStatusErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetPackageMigrationStatusResponses = { + /** + * OK + */ + 200: PagedPackageMigrationStatusResponseModel; +}; + +export type GetPackageMigrationStatusResponse = GetPackageMigrationStatusResponses[keyof GetPackageMigrationStatusResponses]; + +export type GetItemPartialViewData = { + body?: never; + path?: never; + query?: { + path?: Array; + }; + url: '/umbraco/management/api/v1/item/partial-view'; +}; + +export type GetItemPartialViewErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; +}; + +export type GetItemPartialViewResponses = { + /** + * OK + */ + 200: Array; +}; + +export type GetItemPartialViewResponse = GetItemPartialViewResponses[keyof GetItemPartialViewResponses]; + +export type PostPartialViewData = { + body?: CreatePartialViewRequestModel; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/partial-view'; +}; + +export type PostPartialViewErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PostPartialViewError = PostPartialViewErrors[keyof PostPartialViewErrors]; + +export type PostPartialViewResponses = { + /** + * Created + */ + 201: unknown; +}; + +export type DeletePartialViewByPathData = { + body?: never; + path: { + path: string; + }; + query?: never; + url: '/umbraco/management/api/v1/partial-view/{path}'; +}; + +export type DeletePartialViewByPathErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type DeletePartialViewByPathError = DeletePartialViewByPathErrors[keyof DeletePartialViewByPathErrors]; + +export type DeletePartialViewByPathResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type GetPartialViewByPathData = { + body?: never; + path: { + path: string; + }; + query?: never; + url: '/umbraco/management/api/v1/partial-view/{path}'; +}; + +export type GetPartialViewByPathErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type GetPartialViewByPathError = GetPartialViewByPathErrors[keyof GetPartialViewByPathErrors]; + +export type GetPartialViewByPathResponses = { + /** + * OK + */ + 200: PartialViewResponseModel; +}; + +export type GetPartialViewByPathResponse = GetPartialViewByPathResponses[keyof GetPartialViewByPathResponses]; + +export type PutPartialViewByPathData = { + body?: UpdatePartialViewRequestModel; + path: { + path: string; + }; + query?: never; + url: '/umbraco/management/api/v1/partial-view/{path}'; +}; + +export type PutPartialViewByPathErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PutPartialViewByPathError = PutPartialViewByPathErrors[keyof PutPartialViewByPathErrors]; + +export type PutPartialViewByPathResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type PutPartialViewByPathRenameData = { + body?: RenamePartialViewRequestModel; + path: { + path: string; + }; + query?: never; + url: '/umbraco/management/api/v1/partial-view/{path}/rename'; +}; + +export type PutPartialViewByPathRenameErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PutPartialViewByPathRenameError = PutPartialViewByPathRenameErrors[keyof PutPartialViewByPathRenameErrors]; + +export type PutPartialViewByPathRenameResponses = { + /** + * Created + */ + 201: unknown; +}; + +export type PostPartialViewFolderData = { + body?: CreatePartialViewFolderRequestModel; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/partial-view/folder'; +}; + +export type PostPartialViewFolderErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PostPartialViewFolderError = PostPartialViewFolderErrors[keyof PostPartialViewFolderErrors]; + +export type PostPartialViewFolderResponses = { + /** + * Created + */ + 201: unknown; +}; + +export type DeletePartialViewFolderByPathData = { + body?: never; + path: { + path: string; + }; + query?: never; + url: '/umbraco/management/api/v1/partial-view/folder/{path}'; +}; + +export type DeletePartialViewFolderByPathErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type DeletePartialViewFolderByPathError = DeletePartialViewFolderByPathErrors[keyof DeletePartialViewFolderByPathErrors]; + +export type DeletePartialViewFolderByPathResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type GetPartialViewFolderByPathData = { + body?: never; + path: { + path: string; + }; + query?: never; + url: '/umbraco/management/api/v1/partial-view/folder/{path}'; +}; + +export type GetPartialViewFolderByPathErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type GetPartialViewFolderByPathError = GetPartialViewFolderByPathErrors[keyof GetPartialViewFolderByPathErrors]; + +export type GetPartialViewFolderByPathResponses = { + /** + * OK + */ + 200: PartialViewFolderResponseModel; +}; + +export type GetPartialViewFolderByPathResponse = GetPartialViewFolderByPathResponses[keyof GetPartialViewFolderByPathResponses]; + +export type GetPartialViewSnippetData = { + body?: never; + path?: never; + query?: { + skip?: number; + take?: number; + }; + url: '/umbraco/management/api/v1/partial-view/snippet'; +}; + +export type GetPartialViewSnippetErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetPartialViewSnippetResponses = { + /** + * OK + */ + 200: PagedPartialViewSnippetItemResponseModel; +}; + +export type GetPartialViewSnippetResponse = GetPartialViewSnippetResponses[keyof GetPartialViewSnippetResponses]; + +export type GetPartialViewSnippetByIdData = { + body?: never; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/partial-view/snippet/{id}'; +}; + +export type GetPartialViewSnippetByIdErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type GetPartialViewSnippetByIdError = GetPartialViewSnippetByIdErrors[keyof GetPartialViewSnippetByIdErrors]; + +export type GetPartialViewSnippetByIdResponses = { + /** + * OK + */ + 200: PartialViewSnippetResponseModel; +}; + +export type GetPartialViewSnippetByIdResponse = GetPartialViewSnippetByIdResponses[keyof GetPartialViewSnippetByIdResponses]; + +export type GetTreePartialViewAncestorsData = { + body?: never; + path?: never; + query?: { + descendantPath?: string; + }; + url: '/umbraco/management/api/v1/tree/partial-view/ancestors'; +}; + +export type GetTreePartialViewAncestorsErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetTreePartialViewAncestorsResponses = { + /** + * OK + */ + 200: Array; +}; + +export type GetTreePartialViewAncestorsResponse = GetTreePartialViewAncestorsResponses[keyof GetTreePartialViewAncestorsResponses]; + +export type GetTreePartialViewChildrenData = { + body?: never; + path?: never; + query?: { + parentPath?: string; + skip?: number; + take?: number; + }; + url: '/umbraco/management/api/v1/tree/partial-view/children'; +}; + +export type GetTreePartialViewChildrenErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetTreePartialViewChildrenResponses = { + /** + * OK + */ + 200: PagedFileSystemTreeItemPresentationModel; +}; + +export type GetTreePartialViewChildrenResponse = GetTreePartialViewChildrenResponses[keyof GetTreePartialViewChildrenResponses]; + +export type GetTreePartialViewRootData = { + body?: never; + path?: never; + query?: { + skip?: number; + take?: number; + }; + url: '/umbraco/management/api/v1/tree/partial-view/root'; +}; + +export type GetTreePartialViewRootErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetTreePartialViewRootResponses = { + /** + * OK + */ + 200: PagedFileSystemTreeItemPresentationModel; +}; + +export type GetTreePartialViewRootResponse = GetTreePartialViewRootResponses[keyof GetTreePartialViewRootResponses]; + +export type DeletePreviewData = { + body?: never; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/preview'; +}; + +export type DeletePreviewResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type PostPreviewData = { + body?: never; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/preview'; +}; + +export type PostPreviewErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; +}; + +export type PostPreviewResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type GetProfilingStatusData = { + body?: never; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/profiling/status'; +}; + +export type GetProfilingStatusErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetProfilingStatusResponses = { + /** + * OK + */ + 200: ProfilingStatusResponseModel; +}; + +export type GetProfilingStatusResponse = GetProfilingStatusResponses[keyof GetProfilingStatusResponses]; + +export type PutProfilingStatusData = { + body?: ProfilingStatusRequestModel; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/profiling/status'; +}; + +export type PutProfilingStatusErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type PutProfilingStatusResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type GetPropertyTypeIsUsedData = { + body?: never; + path?: never; + query?: { + contentTypeId?: string; + propertyAlias?: string; + }; + url: '/umbraco/management/api/v1/property-type/is-used'; +}; + +export type GetPropertyTypeIsUsedErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetPropertyTypeIsUsedError = GetPropertyTypeIsUsedErrors[keyof GetPropertyTypeIsUsedErrors]; + +export type GetPropertyTypeIsUsedResponses = { + /** + * OK + */ + 200: boolean; +}; + +export type GetPropertyTypeIsUsedResponse = GetPropertyTypeIsUsedResponses[keyof GetPropertyTypeIsUsedResponses]; + +export type PostPublishedCacheRebuildData = { + body?: never; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/published-cache/rebuild'; +}; + +export type PostPublishedCacheRebuildErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; +}; + +export type PostPublishedCacheRebuildResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type GetPublishedCacheRebuildStatusData = { + body?: never; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/published-cache/rebuild/status'; +}; + +export type GetPublishedCacheRebuildStatusErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; +}; + +export type GetPublishedCacheRebuildStatusResponses = { + /** + * OK + */ + 200: RebuildStatusModel; +}; + +export type GetPublishedCacheRebuildStatusResponse = GetPublishedCacheRebuildStatusResponses[keyof GetPublishedCacheRebuildStatusResponses]; + +export type PostPublishedCacheReloadData = { + body?: never; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/published-cache/reload'; +}; + +export type PostPublishedCacheReloadErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; +}; + +export type PostPublishedCacheReloadResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type GetRedirectManagementData = { + body?: never; + path?: never; + query?: { + filter?: string; + skip?: number; + take?: number; + }; + url: '/umbraco/management/api/v1/redirect-management'; +}; + +export type GetRedirectManagementErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetRedirectManagementError = GetRedirectManagementErrors[keyof GetRedirectManagementErrors]; + +export type GetRedirectManagementResponses = { + /** + * OK + */ + 200: PagedRedirectUrlResponseModel; +}; + +export type GetRedirectManagementResponse = GetRedirectManagementResponses[keyof GetRedirectManagementResponses]; + +export type DeleteRedirectManagementByIdData = { + body?: never; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/redirect-management/{id}'; +}; + +export type DeleteRedirectManagementByIdErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type DeleteRedirectManagementByIdResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type GetRedirectManagementByIdData = { + body?: never; + path: { + id: string; + }; + query?: { + skip?: number; + take?: number; + }; + url: '/umbraco/management/api/v1/redirect-management/{id}'; +}; + +export type GetRedirectManagementByIdErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetRedirectManagementByIdResponses = { + /** + * OK + */ + 200: PagedRedirectUrlResponseModel; +}; + +export type GetRedirectManagementByIdResponse = GetRedirectManagementByIdResponses[keyof GetRedirectManagementByIdResponses]; + +export type GetRedirectManagementStatusData = { + body?: never; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/redirect-management/status'; +}; + +export type GetRedirectManagementStatusErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetRedirectManagementStatusResponses = { + /** + * OK + */ + 200: RedirectUrlStatusResponseModel; +}; + +export type GetRedirectManagementStatusResponse = GetRedirectManagementStatusResponses[keyof GetRedirectManagementStatusResponses]; + +export type PostRedirectManagementStatusData = { + body?: never; + path?: never; + query?: { + status?: RedirectStatusModel; + }; + url: '/umbraco/management/api/v1/redirect-management/status'; +}; + +export type PostRedirectManagementStatusErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type PostRedirectManagementStatusResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type GetItemRelationTypeData = { + body?: never; + path?: never; + query?: { + id?: Array; + }; + url: '/umbraco/management/api/v1/item/relation-type'; +}; + +export type GetItemRelationTypeErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; +}; + +export type GetItemRelationTypeResponses = { + /** + * OK + */ + 200: Array; +}; + +export type GetItemRelationTypeResponse = GetItemRelationTypeResponses[keyof GetItemRelationTypeResponses]; + +export type GetRelationTypeData = { + body?: never; + path?: never; + query?: { + skip?: number; + take?: number; + }; + url: '/umbraco/management/api/v1/relation-type'; +}; + +export type GetRelationTypeErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetRelationTypeResponses = { + /** + * OK + */ + 200: PagedRelationTypeResponseModel; +}; + +export type GetRelationTypeResponse = GetRelationTypeResponses[keyof GetRelationTypeResponses]; + +export type GetRelationTypeByIdData = { + body?: never; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/relation-type/{id}'; +}; + +export type GetRelationTypeByIdErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type GetRelationTypeByIdError = GetRelationTypeByIdErrors[keyof GetRelationTypeByIdErrors]; + +export type GetRelationTypeByIdResponses = { + /** + * OK + */ + 200: RelationTypeResponseModel; +}; + +export type GetRelationTypeByIdResponse = GetRelationTypeByIdResponses[keyof GetRelationTypeByIdResponses]; + +export type GetRelationByRelationTypeIdData = { + body?: never; + path: { + id: string; + }; + query?: { + skip?: number; + take?: number; + }; + url: '/umbraco/management/api/v1/relation/type/{id}'; +}; + +export type GetRelationByRelationTypeIdErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: PagedProblemDetailsModel; +}; + +export type GetRelationByRelationTypeIdError = GetRelationByRelationTypeIdErrors[keyof GetRelationByRelationTypeIdErrors]; + +export type GetRelationByRelationTypeIdResponses = { + /** + * OK + */ + 200: PagedRelationResponseModelReadable; +}; + +export type GetRelationByRelationTypeIdResponse = GetRelationByRelationTypeIdResponses[keyof GetRelationByRelationTypeIdResponses]; + +export type GetItemScriptData = { + body?: never; + path?: never; + query?: { + path?: Array; + }; + url: '/umbraco/management/api/v1/item/script'; +}; + +export type GetItemScriptErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; +}; + +export type GetItemScriptResponses = { + /** + * OK + */ + 200: Array; +}; + +export type GetItemScriptResponse = GetItemScriptResponses[keyof GetItemScriptResponses]; + +export type PostScriptData = { + body?: CreateScriptRequestModel; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/script'; +}; + +export type PostScriptErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PostScriptError = PostScriptErrors[keyof PostScriptErrors]; + +export type PostScriptResponses = { + /** + * Created + */ + 201: unknown; +}; + +export type DeleteScriptByPathData = { + body?: never; + path: { + path: string; + }; + query?: never; + url: '/umbraco/management/api/v1/script/{path}'; +}; + +export type DeleteScriptByPathErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type DeleteScriptByPathError = DeleteScriptByPathErrors[keyof DeleteScriptByPathErrors]; + +export type DeleteScriptByPathResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type GetScriptByPathData = { + body?: never; + path: { + path: string; + }; + query?: never; + url: '/umbraco/management/api/v1/script/{path}'; +}; + +export type GetScriptByPathErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type GetScriptByPathError = GetScriptByPathErrors[keyof GetScriptByPathErrors]; + +export type GetScriptByPathResponses = { + /** + * OK + */ + 200: ScriptResponseModel; +}; + +export type GetScriptByPathResponse = GetScriptByPathResponses[keyof GetScriptByPathResponses]; + +export type PutScriptByPathData = { + body?: UpdateScriptRequestModel; + path: { + path: string; + }; + query?: never; + url: '/umbraco/management/api/v1/script/{path}'; +}; + +export type PutScriptByPathErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PutScriptByPathError = PutScriptByPathErrors[keyof PutScriptByPathErrors]; + +export type PutScriptByPathResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type PutScriptByPathRenameData = { + body?: RenameScriptRequestModel; + path: { + path: string; + }; + query?: never; + url: '/umbraco/management/api/v1/script/{path}/rename'; +}; + +export type PutScriptByPathRenameErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PutScriptByPathRenameError = PutScriptByPathRenameErrors[keyof PutScriptByPathRenameErrors]; + +export type PutScriptByPathRenameResponses = { + /** + * Created + */ + 201: unknown; +}; + +export type PostScriptFolderData = { + body?: CreateScriptFolderRequestModel; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/script/folder'; +}; + +export type PostScriptFolderErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PostScriptFolderError = PostScriptFolderErrors[keyof PostScriptFolderErrors]; + +export type PostScriptFolderResponses = { + /** + * Created + */ + 201: unknown; +}; + +export type DeleteScriptFolderByPathData = { + body?: never; + path: { + path: string; + }; + query?: never; + url: '/umbraco/management/api/v1/script/folder/{path}'; +}; + +export type DeleteScriptFolderByPathErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type DeleteScriptFolderByPathError = DeleteScriptFolderByPathErrors[keyof DeleteScriptFolderByPathErrors]; + +export type DeleteScriptFolderByPathResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type GetScriptFolderByPathData = { + body?: never; + path: { + path: string; + }; + query?: never; + url: '/umbraco/management/api/v1/script/folder/{path}'; +}; + +export type GetScriptFolderByPathErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type GetScriptFolderByPathError = GetScriptFolderByPathErrors[keyof GetScriptFolderByPathErrors]; + +export type GetScriptFolderByPathResponses = { + /** + * OK + */ + 200: ScriptFolderResponseModel; +}; + +export type GetScriptFolderByPathResponse = GetScriptFolderByPathResponses[keyof GetScriptFolderByPathResponses]; + +export type GetTreeScriptAncestorsData = { + body?: never; + path?: never; + query?: { + descendantPath?: string; + }; + url: '/umbraco/management/api/v1/tree/script/ancestors'; +}; + +export type GetTreeScriptAncestorsErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetTreeScriptAncestorsResponses = { + /** + * OK + */ + 200: Array; +}; + +export type GetTreeScriptAncestorsResponse = GetTreeScriptAncestorsResponses[keyof GetTreeScriptAncestorsResponses]; + +export type GetTreeScriptChildrenData = { + body?: never; + path?: never; + query?: { + parentPath?: string; + skip?: number; + take?: number; + }; + url: '/umbraco/management/api/v1/tree/script/children'; +}; + +export type GetTreeScriptChildrenErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetTreeScriptChildrenResponses = { + /** + * OK + */ + 200: PagedFileSystemTreeItemPresentationModel; +}; + +export type GetTreeScriptChildrenResponse = GetTreeScriptChildrenResponses[keyof GetTreeScriptChildrenResponses]; + +export type GetTreeScriptRootData = { + body?: never; + path?: never; + query?: { + skip?: number; + take?: number; + }; + url: '/umbraco/management/api/v1/tree/script/root'; +}; + +export type GetTreeScriptRootErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetTreeScriptRootResponses = { + /** + * OK + */ + 200: PagedFileSystemTreeItemPresentationModel; +}; + +export type GetTreeScriptRootResponse = GetTreeScriptRootResponses[keyof GetTreeScriptRootResponses]; + +export type GetSearcherData = { + body?: never; + path?: never; + query?: { + skip?: number; + take?: number; + }; + url: '/umbraco/management/api/v1/searcher'; +}; + +export type GetSearcherErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; +}; + +export type GetSearcherResponses = { + /** + * OK + */ + 200: PagedSearcherResponseModel; +}; + +export type GetSearcherResponse = GetSearcherResponses[keyof GetSearcherResponses]; + +export type GetSearcherBySearcherNameQueryData = { + body?: never; + path: { + searcherName: string; + }; + query?: { + term?: string; + skip?: number; + take?: number; + }; + url: '/umbraco/management/api/v1/searcher/{searcherName}/query'; +}; + +export type GetSearcherBySearcherNameQueryErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type GetSearcherBySearcherNameQueryError = GetSearcherBySearcherNameQueryErrors[keyof GetSearcherBySearcherNameQueryErrors]; + +export type GetSearcherBySearcherNameQueryResponses = { + /** + * OK + */ + 200: PagedSearchResultResponseModelReadable; +}; + +export type GetSearcherBySearcherNameQueryResponse = GetSearcherBySearcherNameQueryResponses[keyof GetSearcherBySearcherNameQueryResponses]; + +export type GetSecurityConfigurationData = { + body?: never; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/security/configuration'; +}; + +export type GetSecurityConfigurationErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetSecurityConfigurationResponses = { + /** + * OK + */ + 200: SecurityConfigurationResponseModel; +}; + +export type GetSecurityConfigurationResponse = GetSecurityConfigurationResponses[keyof GetSecurityConfigurationResponses]; + +export type PostSecurityForgotPasswordData = { + body?: ResetPasswordRequestModel; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/security/forgot-password'; +}; + +export type PostSecurityForgotPasswordErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type PostSecurityForgotPasswordError = PostSecurityForgotPasswordErrors[keyof PostSecurityForgotPasswordErrors]; + +export type PostSecurityForgotPasswordResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type PostSecurityForgotPasswordResetData = { + body?: ResetPasswordTokenRequestModel; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/security/forgot-password/reset'; +}; + +export type PostSecurityForgotPasswordResetErrors = { + /** + * Bad Request + */ + 400: ProblemDetailsBuilderModel; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetailsBuilderModel; +}; + +export type PostSecurityForgotPasswordResetError = PostSecurityForgotPasswordResetErrors[keyof PostSecurityForgotPasswordResetErrors]; + +export type PostSecurityForgotPasswordResetResponses = { + /** + * No Content + */ + 204: void; +}; + +export type PostSecurityForgotPasswordResetResponse = PostSecurityForgotPasswordResetResponses[keyof PostSecurityForgotPasswordResetResponses]; + +export type PostSecurityForgotPasswordVerifyData = { + body?: VerifyResetPasswordTokenRequestModel; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/security/forgot-password/verify'; +}; + +export type PostSecurityForgotPasswordVerifyErrors = { + /** + * Bad Request + */ + 400: ProblemDetailsBuilderModel; + /** + * Not Found + */ + 404: ProblemDetailsBuilderModel; +}; + +export type PostSecurityForgotPasswordVerifyError = PostSecurityForgotPasswordVerifyErrors[keyof PostSecurityForgotPasswordVerifyErrors]; + +export type PostSecurityForgotPasswordVerifyResponses = { + /** + * OK + */ + 200: VerifyResetPasswordResponseModel; +}; + +export type PostSecurityForgotPasswordVerifyResponse = PostSecurityForgotPasswordVerifyResponses[keyof PostSecurityForgotPasswordVerifyResponses]; + +export type GetSegmentData = { + body?: never; + path?: never; + query?: { + skip?: number; + take?: number; + }; + url: '/umbraco/management/api/v1/segment'; +}; + +export type GetSegmentErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetSegmentError = GetSegmentErrors[keyof GetSegmentErrors]; + +export type GetSegmentResponses = { + /** + * OK + */ + 200: PagedSegmentResponseModel; +}; + +export type GetSegmentResponse = GetSegmentResponses[keyof GetSegmentResponses]; + +export type GetServerConfigurationData = { + body?: never; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/server/configuration'; +}; + +export type GetServerConfigurationResponses = { + /** + * OK + */ + 200: ServerConfigurationResponseModel; +}; + +export type GetServerConfigurationResponse = GetServerConfigurationResponses[keyof GetServerConfigurationResponses]; + +export type GetServerInformationData = { + body?: never; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/server/information'; +}; + +export type GetServerInformationErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; +}; + +export type GetServerInformationResponses = { + /** + * OK + */ + 200: ServerInformationResponseModel; +}; + +export type GetServerInformationResponse = GetServerInformationResponses[keyof GetServerInformationResponses]; + +export type GetServerStatusData = { + body?: never; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/server/status'; +}; + +export type GetServerStatusErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; +}; + +export type GetServerStatusError = GetServerStatusErrors[keyof GetServerStatusErrors]; + +export type GetServerStatusResponses = { + /** + * OK + */ + 200: ServerStatusResponseModel; +}; + +export type GetServerStatusResponse = GetServerStatusResponses[keyof GetServerStatusResponses]; + +export type GetServerTroubleshootingData = { + body?: never; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/server/troubleshooting'; +}; + +export type GetServerTroubleshootingErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; +}; + +export type GetServerTroubleshootingResponses = { + /** + * OK + */ + 200: ServerTroubleshootingResponseModel; +}; + +export type GetServerTroubleshootingResponse = GetServerTroubleshootingResponses[keyof GetServerTroubleshootingResponses]; + +export type GetServerUpgradeCheckData = { + body?: never; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/server/upgrade-check'; +}; + +export type GetServerUpgradeCheckErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetServerUpgradeCheckResponses = { + /** + * OK + */ + 200: UpgradeCheckResponseModel; +}; + +export type GetServerUpgradeCheckResponse = GetServerUpgradeCheckResponses[keyof GetServerUpgradeCheckResponses]; + +export type GetItemStaticFileData = { + body?: never; + path?: never; + query?: { + path?: Array; + }; + url: '/umbraco/management/api/v1/item/static-file'; +}; + +export type GetItemStaticFileErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; +}; + +export type GetItemStaticFileResponses = { + /** + * OK + */ + 200: Array; +}; + +export type GetItemStaticFileResponse = GetItemStaticFileResponses[keyof GetItemStaticFileResponses]; + +export type GetTreeStaticFileAncestorsData = { + body?: never; + path?: never; + query?: { + descendantPath?: string; + }; + url: '/umbraco/management/api/v1/tree/static-file/ancestors'; +}; + +export type GetTreeStaticFileAncestorsErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; +}; + +export type GetTreeStaticFileAncestorsResponses = { + /** + * OK + */ + 200: Array; +}; + +export type GetTreeStaticFileAncestorsResponse = GetTreeStaticFileAncestorsResponses[keyof GetTreeStaticFileAncestorsResponses]; + +export type GetTreeStaticFileChildrenData = { + body?: never; + path?: never; + query?: { + parentPath?: string; + skip?: number; + take?: number; + }; + url: '/umbraco/management/api/v1/tree/static-file/children'; +}; + +export type GetTreeStaticFileChildrenErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; +}; + +export type GetTreeStaticFileChildrenResponses = { + /** + * OK + */ + 200: PagedFileSystemTreeItemPresentationModel; +}; + +export type GetTreeStaticFileChildrenResponse = GetTreeStaticFileChildrenResponses[keyof GetTreeStaticFileChildrenResponses]; + +export type GetTreeStaticFileRootData = { + body?: never; + path?: never; + query?: { + skip?: number; + take?: number; + }; + url: '/umbraco/management/api/v1/tree/static-file/root'; +}; + +export type GetTreeStaticFileRootErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; +}; + +export type GetTreeStaticFileRootResponses = { + /** + * OK + */ + 200: PagedFileSystemTreeItemPresentationModel; +}; + +export type GetTreeStaticFileRootResponse = GetTreeStaticFileRootResponses[keyof GetTreeStaticFileRootResponses]; + +export type GetItemStylesheetData = { + body?: never; + path?: never; + query?: { + path?: Array; + }; + url: '/umbraco/management/api/v1/item/stylesheet'; +}; + +export type GetItemStylesheetErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; +}; + +export type GetItemStylesheetResponses = { + /** + * OK + */ + 200: Array; +}; + +export type GetItemStylesheetResponse = GetItemStylesheetResponses[keyof GetItemStylesheetResponses]; + +export type PostStylesheetData = { + body?: CreateStylesheetRequestModel; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/stylesheet'; +}; + +export type PostStylesheetErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PostStylesheetError = PostStylesheetErrors[keyof PostStylesheetErrors]; + +export type PostStylesheetResponses = { + /** + * Created + */ + 201: unknown; +}; + +export type DeleteStylesheetByPathData = { + body?: never; + path: { + path: string; + }; + query?: never; + url: '/umbraco/management/api/v1/stylesheet/{path}'; +}; + +export type DeleteStylesheetByPathErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type DeleteStylesheetByPathError = DeleteStylesheetByPathErrors[keyof DeleteStylesheetByPathErrors]; + +export type DeleteStylesheetByPathResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type GetStylesheetByPathData = { + body?: never; + path: { + path: string; + }; + query?: never; + url: '/umbraco/management/api/v1/stylesheet/{path}'; +}; + +export type GetStylesheetByPathErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type GetStylesheetByPathError = GetStylesheetByPathErrors[keyof GetStylesheetByPathErrors]; + +export type GetStylesheetByPathResponses = { + /** + * OK + */ + 200: StylesheetResponseModel; +}; + +export type GetStylesheetByPathResponse = GetStylesheetByPathResponses[keyof GetStylesheetByPathResponses]; + +export type PutStylesheetByPathData = { + body?: UpdateStylesheetRequestModel; + path: { + path: string; + }; + query?: never; + url: '/umbraco/management/api/v1/stylesheet/{path}'; +}; + +export type PutStylesheetByPathErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PutStylesheetByPathError = PutStylesheetByPathErrors[keyof PutStylesheetByPathErrors]; + +export type PutStylesheetByPathResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type PutStylesheetByPathRenameData = { + body?: RenameStylesheetRequestModel; + path: { + path: string; + }; + query?: never; + url: '/umbraco/management/api/v1/stylesheet/{path}/rename'; +}; + +export type PutStylesheetByPathRenameErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PutStylesheetByPathRenameError = PutStylesheetByPathRenameErrors[keyof PutStylesheetByPathRenameErrors]; + +export type PutStylesheetByPathRenameResponses = { + /** + * Created + */ + 201: unknown; +}; + +export type PostStylesheetFolderData = { + body?: CreateStylesheetFolderRequestModel; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/stylesheet/folder'; +}; + +export type PostStylesheetFolderErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PostStylesheetFolderError = PostStylesheetFolderErrors[keyof PostStylesheetFolderErrors]; + +export type PostStylesheetFolderResponses = { + /** + * Created + */ + 201: unknown; +}; + +export type DeleteStylesheetFolderByPathData = { + body?: never; + path: { + path: string; + }; + query?: never; + url: '/umbraco/management/api/v1/stylesheet/folder/{path}'; +}; + +export type DeleteStylesheetFolderByPathErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type DeleteStylesheetFolderByPathError = DeleteStylesheetFolderByPathErrors[keyof DeleteStylesheetFolderByPathErrors]; + +export type DeleteStylesheetFolderByPathResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type GetStylesheetFolderByPathData = { + body?: never; + path: { + path: string; + }; + query?: never; + url: '/umbraco/management/api/v1/stylesheet/folder/{path}'; +}; + +export type GetStylesheetFolderByPathErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type GetStylesheetFolderByPathError = GetStylesheetFolderByPathErrors[keyof GetStylesheetFolderByPathErrors]; + +export type GetStylesheetFolderByPathResponses = { + /** + * OK + */ + 200: StylesheetFolderResponseModel; +}; + +export type GetStylesheetFolderByPathResponse = GetStylesheetFolderByPathResponses[keyof GetStylesheetFolderByPathResponses]; + +export type GetTreeStylesheetAncestorsData = { + body?: never; + path?: never; + query?: { + descendantPath?: string; + }; + url: '/umbraco/management/api/v1/tree/stylesheet/ancestors'; +}; + +export type GetTreeStylesheetAncestorsErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetTreeStylesheetAncestorsResponses = { + /** + * OK + */ + 200: Array; +}; + +export type GetTreeStylesheetAncestorsResponse = GetTreeStylesheetAncestorsResponses[keyof GetTreeStylesheetAncestorsResponses]; + +export type GetTreeStylesheetChildrenData = { + body?: never; + path?: never; + query?: { + parentPath?: string; + skip?: number; + take?: number; + }; + url: '/umbraco/management/api/v1/tree/stylesheet/children'; +}; + +export type GetTreeStylesheetChildrenErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetTreeStylesheetChildrenResponses = { + /** + * OK + */ + 200: PagedFileSystemTreeItemPresentationModel; +}; + +export type GetTreeStylesheetChildrenResponse = GetTreeStylesheetChildrenResponses[keyof GetTreeStylesheetChildrenResponses]; + +export type GetTreeStylesheetRootData = { + body?: never; + path?: never; + query?: { + skip?: number; + take?: number; + }; + url: '/umbraco/management/api/v1/tree/stylesheet/root'; +}; + +export type GetTreeStylesheetRootErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetTreeStylesheetRootResponses = { + /** + * OK + */ + 200: PagedFileSystemTreeItemPresentationModel; +}; + +export type GetTreeStylesheetRootResponse = GetTreeStylesheetRootResponses[keyof GetTreeStylesheetRootResponses]; + +export type GetTagData = { + body?: never; + path?: never; + query?: { + query?: string; + tagGroup?: string; + culture?: string; + skip?: number; + take?: number; + }; + url: '/umbraco/management/api/v1/tag'; +}; + +export type GetTagErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; +}; + +export type GetTagResponses = { + /** + * OK + */ + 200: PagedTagResponseModel; +}; + +export type GetTagResponse = GetTagResponses[keyof GetTagResponses]; + +export type GetTelemetryData = { + body?: never; + path?: never; + query?: { + skip?: number; + take?: number; + }; + url: '/umbraco/management/api/v1/telemetry'; +}; + +export type GetTelemetryErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetTelemetryResponses = { + /** + * OK + */ + 200: PagedTelemetryResponseModel; +}; + +export type GetTelemetryResponse = GetTelemetryResponses[keyof GetTelemetryResponses]; + +export type GetTelemetryLevelData = { + body?: never; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/telemetry/level'; +}; + +export type GetTelemetryLevelErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetTelemetryLevelResponses = { + /** + * OK + */ + 200: TelemetryResponseModel; +}; + +export type GetTelemetryLevelResponse = GetTelemetryLevelResponses[keyof GetTelemetryLevelResponses]; + +export type PostTelemetryLevelData = { + body?: TelemetryRequestModel; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/telemetry/level'; +}; + +export type PostTelemetryLevelErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type PostTelemetryLevelError = PostTelemetryLevelErrors[keyof PostTelemetryLevelErrors]; + +export type PostTelemetryLevelResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type GetItemTemplateData = { + body?: never; + path?: never; + query?: { + id?: Array; + }; + url: '/umbraco/management/api/v1/item/template'; +}; + +export type GetItemTemplateErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; +}; + +export type GetItemTemplateResponses = { + /** + * OK + */ + 200: Array; +}; + +export type GetItemTemplateResponse = GetItemTemplateResponses[keyof GetItemTemplateResponses]; + +export type GetItemTemplateSearchData = { + body?: never; + path?: never; + query?: { + query?: string; + skip?: number; + take?: number; + }; + url: '/umbraco/management/api/v1/item/template/search'; +}; + +export type GetItemTemplateSearchErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; +}; + +export type GetItemTemplateSearchResponses = { + /** + * OK + */ + 200: PagedModelTemplateItemResponseModel; +}; + +export type GetItemTemplateSearchResponse = GetItemTemplateSearchResponses[keyof GetItemTemplateSearchResponses]; + +export type PostTemplateData = { + body?: CreateTemplateRequestModel; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/template'; +}; + +export type PostTemplateErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PostTemplateError = PostTemplateErrors[keyof PostTemplateErrors]; + +export type PostTemplateResponses = { + /** + * Created + */ + 201: unknown; +}; + +export type DeleteTemplateByIdData = { + body?: never; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/template/{id}'; +}; + +export type DeleteTemplateByIdErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type DeleteTemplateByIdError = DeleteTemplateByIdErrors[keyof DeleteTemplateByIdErrors]; + +export type DeleteTemplateByIdResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type GetTemplateByIdData = { + body?: never; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/template/{id}'; +}; + +export type GetTemplateByIdErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type GetTemplateByIdError = GetTemplateByIdErrors[keyof GetTemplateByIdErrors]; + +export type GetTemplateByIdResponses = { + /** + * OK + */ + 200: TemplateResponseModel; +}; + +export type GetTemplateByIdResponse = GetTemplateByIdResponses[keyof GetTemplateByIdResponses]; + +export type PutTemplateByIdData = { + body?: UpdateTemplateRequestModel; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/template/{id}'; +}; + +export type PutTemplateByIdErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PutTemplateByIdError = PutTemplateByIdErrors[keyof PutTemplateByIdErrors]; + +export type PutTemplateByIdResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type GetTemplateConfigurationData = { + body?: never; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/template/configuration'; +}; + +export type GetTemplateConfigurationErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetTemplateConfigurationResponses = { + /** + * OK + */ + 200: TemplateConfigurationResponseModel; +}; + +export type GetTemplateConfigurationResponse = GetTemplateConfigurationResponses[keyof GetTemplateConfigurationResponses]; + +export type PostTemplateQueryExecuteData = { + body?: TemplateQueryExecuteModel; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/template/query/execute'; +}; + +export type PostTemplateQueryExecuteErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type PostTemplateQueryExecuteResponses = { + /** + * OK + */ + 200: TemplateQueryResultResponseModel; +}; + +export type PostTemplateQueryExecuteResponse = PostTemplateQueryExecuteResponses[keyof PostTemplateQueryExecuteResponses]; + +export type GetTemplateQuerySettingsData = { + body?: never; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/template/query/settings'; +}; + +export type GetTemplateQuerySettingsErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetTemplateQuerySettingsResponses = { + /** + * OK + */ + 200: TemplateQuerySettingsResponseModel; +}; + +export type GetTemplateQuerySettingsResponse = GetTemplateQuerySettingsResponses[keyof GetTemplateQuerySettingsResponses]; + +export type GetTreeTemplateAncestorsData = { + body?: never; + path?: never; + query?: { + descendantId?: string; + }; + url: '/umbraco/management/api/v1/tree/template/ancestors'; +}; + +export type GetTreeTemplateAncestorsErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetTreeTemplateAncestorsResponses = { + /** + * OK + */ + 200: Array; +}; + +export type GetTreeTemplateAncestorsResponse = GetTreeTemplateAncestorsResponses[keyof GetTreeTemplateAncestorsResponses]; + +export type GetTreeTemplateChildrenData = { + body?: never; + path?: never; + query?: { + parentId?: string; + skip?: number; + take?: number; + }; + url: '/umbraco/management/api/v1/tree/template/children'; +}; + +export type GetTreeTemplateChildrenErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetTreeTemplateChildrenResponses = { + /** + * OK + */ + 200: PagedNamedEntityTreeItemResponseModel; +}; + +export type GetTreeTemplateChildrenResponse = GetTreeTemplateChildrenResponses[keyof GetTreeTemplateChildrenResponses]; + +export type GetTreeTemplateRootData = { + body?: never; + path?: never; + query?: { + skip?: number; + take?: number; + }; + url: '/umbraco/management/api/v1/tree/template/root'; +}; + +export type GetTreeTemplateRootErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetTreeTemplateRootResponses = { + /** + * OK + */ + 200: PagedNamedEntityTreeItemResponseModel; +}; + +export type GetTreeTemplateRootResponse = GetTreeTemplateRootResponses[keyof GetTreeTemplateRootResponses]; + +export type PostTemporaryFileData = { + body?: { + Id: string; + File: Blob | File; + }; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/temporary-file'; +}; + +export type PostTemporaryFileErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; +}; + +export type PostTemporaryFileError = PostTemporaryFileErrors[keyof PostTemporaryFileErrors]; + +export type PostTemporaryFileResponses = { + /** + * Created + */ + 201: unknown; +}; + +export type DeleteTemporaryFileByIdData = { + body?: never; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/temporary-file/{id}'; +}; + +export type DeleteTemporaryFileByIdErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type DeleteTemporaryFileByIdError = DeleteTemporaryFileByIdErrors[keyof DeleteTemporaryFileByIdErrors]; + +export type DeleteTemporaryFileByIdResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type GetTemporaryFileByIdData = { + body?: never; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/temporary-file/{id}'; +}; + +export type GetTemporaryFileByIdErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type GetTemporaryFileByIdError = GetTemporaryFileByIdErrors[keyof GetTemporaryFileByIdErrors]; + +export type GetTemporaryFileByIdResponses = { + /** + * OK + */ + 200: TemporaryFileResponseModel; +}; + +export type GetTemporaryFileByIdResponse = GetTemporaryFileByIdResponses[keyof GetTemporaryFileByIdResponses]; + +export type GetTemporaryFileConfigurationData = { + body?: never; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/temporary-file/configuration'; +}; + +export type GetTemporaryFileConfigurationErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; +}; + +export type GetTemporaryFileConfigurationResponses = { + /** + * OK + */ + 200: TemporaryFileConfigurationResponseModel; +}; + +export type GetTemporaryFileConfigurationResponse = GetTemporaryFileConfigurationResponses[keyof GetTemporaryFileConfigurationResponses]; + +export type PostUpgradeAuthorizeData = { + body?: never; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/upgrade/authorize'; +}; + +export type PostUpgradeAuthorizeErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Precondition Required + */ + 428: ProblemDetails; + /** + * Internal Server Error + */ + 500: ProblemDetails; +}; + +export type PostUpgradeAuthorizeError = PostUpgradeAuthorizeErrors[keyof PostUpgradeAuthorizeErrors]; + +export type PostUpgradeAuthorizeResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type GetUpgradeSettingsData = { + body?: never; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/upgrade/settings'; +}; + +export type GetUpgradeSettingsErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Precondition Required + */ + 428: ProblemDetails; +}; + +export type GetUpgradeSettingsError = GetUpgradeSettingsErrors[keyof GetUpgradeSettingsErrors]; + +export type GetUpgradeSettingsResponses = { + /** + * OK + */ + 200: UpgradeSettingsResponseModelReadable; +}; + +export type GetUpgradeSettingsResponse = GetUpgradeSettingsResponses[keyof GetUpgradeSettingsResponses]; + +export type GetUserDataData = { + body?: never; + path?: never; + query?: { + groups?: Array; + identifiers?: Array; + skip?: number; + take?: number; + }; + url: '/umbraco/management/api/v1/user-data'; +}; + +export type GetUserDataErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; +}; + +export type GetUserDataResponses = { + /** + * OK + */ + 200: PagedUserDataResponseModel; +}; + +export type GetUserDataResponse = GetUserDataResponses[keyof GetUserDataResponses]; + +export type PostUserDataData = { + body?: CreateUserDataRequestModel; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/user-data'; +}; + +export type PostUserDataErrors = { + /** + * Bad Request + */ + 400: UserDataOperationStatusModel; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * Not Found + */ + 404: UserDataOperationStatusModel; +}; + +export type PostUserDataError = PostUserDataErrors[keyof PostUserDataErrors]; + +export type PostUserDataResponses = { + /** + * Created + */ + 201: unknown; +}; + +export type PutUserDataData = { + body?: UpdateUserDataRequestModel; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/user-data'; +}; + +export type PutUserDataErrors = { + /** + * Bad Request + */ + 400: UserDataOperationStatusModel; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * Not Found + */ + 404: UserDataOperationStatusModel; +}; + +export type PutUserDataError = PutUserDataErrors[keyof PutUserDataErrors]; + +export type PutUserDataResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type GetUserDataByIdData = { + body?: never; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/user-data/{id}'; +}; + +export type GetUserDataByIdErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type GetUserDataByIdResponses = { + /** + * OK + */ + 200: UserDataModel; +}; + +export type GetUserDataByIdResponse = GetUserDataByIdResponses[keyof GetUserDataByIdResponses]; + +export type GetFilterUserGroupData = { + body?: never; + path?: never; + query?: { + skip?: number; + take?: number; + filter?: string; + }; + url: '/umbraco/management/api/v1/filter/user-group'; +}; + +export type GetFilterUserGroupErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type GetFilterUserGroupError = GetFilterUserGroupErrors[keyof GetFilterUserGroupErrors]; + +export type GetFilterUserGroupResponses = { + /** + * OK + */ + 200: PagedUserGroupResponseModel; +}; + +export type GetFilterUserGroupResponse = GetFilterUserGroupResponses[keyof GetFilterUserGroupResponses]; + +export type GetItemUserGroupData = { + body?: never; + path?: never; + query?: { + id?: Array; + }; + url: '/umbraco/management/api/v1/item/user-group'; +}; + +export type GetItemUserGroupErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; +}; + +export type GetItemUserGroupResponses = { + /** + * OK + */ + 200: Array; +}; + +export type GetItemUserGroupResponse = GetItemUserGroupResponses[keyof GetItemUserGroupResponses]; + +export type DeleteUserGroupData = { + body?: DeleteUserGroupsRequestModel; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/user-group'; +}; + +export type DeleteUserGroupErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type DeleteUserGroupError = DeleteUserGroupErrors[keyof DeleteUserGroupErrors]; + +export type DeleteUserGroupResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type GetUserGroupData = { + body?: never; + path?: never; + query?: { + skip?: number; + take?: number; + }; + url: '/umbraco/management/api/v1/user-group'; +}; + +export type GetUserGroupErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetUserGroupResponses = { + /** + * OK + */ + 200: PagedUserGroupResponseModel; +}; + +export type GetUserGroupResponse = GetUserGroupResponses[keyof GetUserGroupResponses]; + +export type PostUserGroupData = { + body?: CreateUserGroupRequestModel; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/user-group'; +}; + +export type PostUserGroupErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type PostUserGroupError = PostUserGroupErrors[keyof PostUserGroupErrors]; + +export type PostUserGroupResponses = { + /** + * Created + */ + 201: unknown; +}; + +export type DeleteUserGroupByIdData = { + body?: never; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/user-group/{id}'; +}; + +export type DeleteUserGroupByIdErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type DeleteUserGroupByIdError = DeleteUserGroupByIdErrors[keyof DeleteUserGroupByIdErrors]; + +export type DeleteUserGroupByIdResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type GetUserGroupByIdData = { + body?: never; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/user-group/{id}'; +}; + +export type GetUserGroupByIdErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type GetUserGroupByIdError = GetUserGroupByIdErrors[keyof GetUserGroupByIdErrors]; + +export type GetUserGroupByIdResponses = { + /** + * OK + */ + 200: UserGroupResponseModel; +}; + +export type GetUserGroupByIdResponse = GetUserGroupByIdResponses[keyof GetUserGroupByIdResponses]; + +export type PutUserGroupByIdData = { + body?: UpdateUserGroupRequestModel; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/user-group/{id}'; +}; + +export type PutUserGroupByIdErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PutUserGroupByIdError = PutUserGroupByIdErrors[keyof PutUserGroupByIdErrors]; + +export type PutUserGroupByIdResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type DeleteUserGroupByIdUsersData = { + body?: Array; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/user-group/{id}/users'; +}; + +export type DeleteUserGroupByIdUsersErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type DeleteUserGroupByIdUsersError = DeleteUserGroupByIdUsersErrors[keyof DeleteUserGroupByIdUsersErrors]; + +export type DeleteUserGroupByIdUsersResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type PostUserGroupByIdUsersData = { + body?: Array; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/user-group/{id}/users'; +}; + +export type PostUserGroupByIdUsersErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PostUserGroupByIdUsersError = PostUserGroupByIdUsersErrors[keyof PostUserGroupByIdUsersErrors]; + +export type PostUserGroupByIdUsersResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type GetFilterUserData = { + body?: never; + path?: never; + query?: { + skip?: number; + take?: number; + orderBy?: UserOrderModel; + orderDirection?: DirectionModel; + userGroupIds?: Array; + userStates?: Array; + filter?: string; + }; + url: '/umbraco/management/api/v1/filter/user'; +}; + +export type GetFilterUserErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type GetFilterUserError = GetFilterUserErrors[keyof GetFilterUserErrors]; + +export type GetFilterUserResponses = { + /** + * OK + */ + 200: PagedUserResponseModel; +}; + +export type GetFilterUserResponse = GetFilterUserResponses[keyof GetFilterUserResponses]; + +export type GetItemUserData = { + body?: never; + path?: never; + query?: { + id?: Array; + }; + url: '/umbraco/management/api/v1/item/user'; +}; + +export type GetItemUserErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; +}; + +export type GetItemUserResponses = { + /** + * OK + */ + 200: Array; +}; + +export type GetItemUserResponse = GetItemUserResponses[keyof GetItemUserResponses]; + +export type DeleteUserData = { + body?: DeleteUsersRequestModel; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/user'; +}; + +export type DeleteUserErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type DeleteUserError = DeleteUserErrors[keyof DeleteUserErrors]; + +export type DeleteUserResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type GetUserData = { + body?: never; + path?: never; + query?: { + skip?: number; + take?: number; + }; + url: '/umbraco/management/api/v1/user'; +}; + +export type GetUserErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type GetUserError = GetUserErrors[keyof GetUserErrors]; + +export type GetUserResponses = { + /** + * OK + */ + 200: PagedUserResponseModel; +}; + +export type GetUserResponse = GetUserResponses[keyof GetUserResponses]; + +export type PostUserData = { + body?: CreateUserRequestModel; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/user'; +}; + +export type PostUserErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PostUserError = PostUserErrors[keyof PostUserErrors]; + +export type PostUserResponses = { + /** + * Created + */ + 201: unknown; +}; + +export type DeleteUserByIdData = { + body?: never; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/user/{id}'; +}; + +export type DeleteUserByIdErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type DeleteUserByIdError = DeleteUserByIdErrors[keyof DeleteUserByIdErrors]; + +export type DeleteUserByIdResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type GetUserByIdData = { + body?: never; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/user/{id}'; +}; + +export type GetUserByIdErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type GetUserByIdError = GetUserByIdErrors[keyof GetUserByIdErrors]; + +export type GetUserByIdResponses = { + /** + * OK + */ + 200: UserResponseModel; +}; + +export type GetUserByIdResponse = GetUserByIdResponses[keyof GetUserByIdResponses]; + +export type PutUserByIdData = { + body?: UpdateUserRequestModel; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/user/{id}'; +}; + +export type PutUserByIdErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PutUserByIdError = PutUserByIdErrors[keyof PutUserByIdErrors]; + +export type PutUserByIdResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type GetUserById2FaData = { + body?: never; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/user/{id}/2fa'; +}; + +export type GetUserById2FaErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type GetUserById2FaError = GetUserById2FaErrors[keyof GetUserById2FaErrors]; + +export type GetUserById2FaResponses = { + /** + * OK + */ + 200: Array; +}; + +export type GetUserById2FaResponse = GetUserById2FaResponses[keyof GetUserById2FaResponses]; + +export type DeleteUserById2FaByProviderNameData = { + body?: never; + path: { + id: string; + providerName: string; + }; + query?: never; + url: '/umbraco/management/api/v1/user/{id}/2fa/{providerName}'; +}; + +export type DeleteUserById2FaByProviderNameErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type DeleteUserById2FaByProviderNameError = DeleteUserById2FaByProviderNameErrors[keyof DeleteUserById2FaByProviderNameErrors]; + +export type DeleteUserById2FaByProviderNameResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type GetUserByIdCalculateStartNodesData = { + body?: never; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/user/{id}/calculate-start-nodes'; +}; + +export type GetUserByIdCalculateStartNodesErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type GetUserByIdCalculateStartNodesError = GetUserByIdCalculateStartNodesErrors[keyof GetUserByIdCalculateStartNodesErrors]; + +export type GetUserByIdCalculateStartNodesResponses = { + /** + * OK + */ + 200: CalculatedUserStartNodesResponseModel; +}; + +export type GetUserByIdCalculateStartNodesResponse = GetUserByIdCalculateStartNodesResponses[keyof GetUserByIdCalculateStartNodesResponses]; + +export type PostUserByIdChangePasswordData = { + body?: ChangePasswordUserRequestModel; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/user/{id}/change-password'; +}; + +export type PostUserByIdChangePasswordErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PostUserByIdChangePasswordError = PostUserByIdChangePasswordErrors[keyof PostUserByIdChangePasswordErrors]; + +export type PostUserByIdChangePasswordResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type GetUserByIdClientCredentialsData = { + body?: never; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/user/{id}/client-credentials'; +}; + +export type GetUserByIdClientCredentialsErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetUserByIdClientCredentialsResponses = { + /** + * OK + */ + 200: Array; +}; + +export type GetUserByIdClientCredentialsResponse = GetUserByIdClientCredentialsResponses[keyof GetUserByIdClientCredentialsResponses]; + +export type PostUserByIdClientCredentialsData = { + body?: CreateUserClientCredentialsRequestModel; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/user/{id}/client-credentials'; +}; + +export type PostUserByIdClientCredentialsErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type PostUserByIdClientCredentialsError = PostUserByIdClientCredentialsErrors[keyof PostUserByIdClientCredentialsErrors]; + +export type PostUserByIdClientCredentialsResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type DeleteUserByIdClientCredentialsByClientIdData = { + body?: never; + path: { + id: string; + clientId: string; + }; + query?: never; + url: '/umbraco/management/api/v1/user/{id}/client-credentials/{clientId}'; +}; + +export type DeleteUserByIdClientCredentialsByClientIdErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type DeleteUserByIdClientCredentialsByClientIdError = DeleteUserByIdClientCredentialsByClientIdErrors[keyof DeleteUserByIdClientCredentialsByClientIdErrors]; + +export type DeleteUserByIdClientCredentialsByClientIdResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type PostUserByIdResetPasswordData = { + body?: never; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/user/{id}/reset-password'; +}; + +export type PostUserByIdResetPasswordErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PostUserByIdResetPasswordError = PostUserByIdResetPasswordErrors[keyof PostUserByIdResetPasswordErrors]; + +export type PostUserByIdResetPasswordResponses = { + /** + * OK + */ + 200: ResetPasswordUserResponseModel; +}; + +export type PostUserByIdResetPasswordResponse = PostUserByIdResetPasswordResponses[keyof PostUserByIdResetPasswordResponses]; + +export type DeleteUserAvatarByIdData = { + body?: never; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/user/avatar/{id}'; +}; + +export type DeleteUserAvatarByIdErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type DeleteUserAvatarByIdError = DeleteUserAvatarByIdErrors[keyof DeleteUserAvatarByIdErrors]; + +export type DeleteUserAvatarByIdResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type PostUserAvatarByIdData = { + body?: SetAvatarRequestModel; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/user/avatar/{id}'; +}; + +export type PostUserAvatarByIdErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PostUserAvatarByIdError = PostUserAvatarByIdErrors[keyof PostUserAvatarByIdErrors]; + +export type PostUserAvatarByIdResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type GetUserConfigurationData = { + body?: never; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/user/configuration'; +}; + +export type GetUserConfigurationErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetUserConfigurationResponses = { + /** + * OK + */ + 200: UserConfigurationResponseModel; +}; + +export type GetUserConfigurationResponse = GetUserConfigurationResponses[keyof GetUserConfigurationResponses]; + +export type GetUserCurrentData = { + body?: never; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/user/current'; +}; + +export type GetUserCurrentErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; +}; + +export type GetUserCurrentResponses = { + /** + * OK + */ + 200: CurrentUserResponseModel; +}; + +export type GetUserCurrentResponse = GetUserCurrentResponses[keyof GetUserCurrentResponses]; + +export type GetUserCurrent2FaData = { + body?: never; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/user/current/2fa'; +}; + +export type GetUserCurrent2FaErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; +}; + +export type GetUserCurrent2FaResponses = { + /** + * OK + */ + 200: Array; +}; + +export type GetUserCurrent2FaResponse = GetUserCurrent2FaResponses[keyof GetUserCurrent2FaResponses]; + +export type DeleteUserCurrent2FaByProviderNameData = { + body?: never; + path: { + providerName: string; + }; + query?: { + code?: string; + }; + url: '/umbraco/management/api/v1/user/current/2fa/{providerName}'; +}; + +export type DeleteUserCurrent2FaByProviderNameErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type DeleteUserCurrent2FaByProviderNameError = DeleteUserCurrent2FaByProviderNameErrors[keyof DeleteUserCurrent2FaByProviderNameErrors]; + +export type DeleteUserCurrent2FaByProviderNameResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type GetUserCurrent2FaByProviderNameData = { + body?: never; + path: { + providerName: string; + }; + query?: never; + url: '/umbraco/management/api/v1/user/current/2fa/{providerName}'; +}; + +export type GetUserCurrent2FaByProviderNameErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type GetUserCurrent2FaByProviderNameError = GetUserCurrent2FaByProviderNameErrors[keyof GetUserCurrent2FaByProviderNameErrors]; + +export type GetUserCurrent2FaByProviderNameResponses = { + /** + * OK + */ + 200: NoopSetupTwoFactorModel; +}; + +export type GetUserCurrent2FaByProviderNameResponse = GetUserCurrent2FaByProviderNameResponses[keyof GetUserCurrent2FaByProviderNameResponses]; + +export type PostUserCurrent2FaByProviderNameData = { + body?: EnableTwoFactorRequestModel; + path: { + providerName: string; + }; + query?: never; + url: '/umbraco/management/api/v1/user/current/2fa/{providerName}'; +}; + +export type PostUserCurrent2FaByProviderNameErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PostUserCurrent2FaByProviderNameError = PostUserCurrent2FaByProviderNameErrors[keyof PostUserCurrent2FaByProviderNameErrors]; + +export type PostUserCurrent2FaByProviderNameResponses = { + /** + * OK + */ + 200: NoopSetupTwoFactorModel; +}; + +export type PostUserCurrent2FaByProviderNameResponse = PostUserCurrent2FaByProviderNameResponses[keyof PostUserCurrent2FaByProviderNameResponses]; + +export type PostUserCurrentAvatarData = { + body?: SetAvatarRequestModel; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/user/current/avatar'; +}; + +export type PostUserCurrentAvatarErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; +}; + +export type PostUserCurrentAvatarError = PostUserCurrentAvatarErrors[keyof PostUserCurrentAvatarErrors]; + +export type PostUserCurrentAvatarResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type PostUserCurrentChangePasswordData = { + body?: ChangePasswordCurrentUserRequestModel; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/user/current/change-password'; +}; + +export type PostUserCurrentChangePasswordErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; +}; + +export type PostUserCurrentChangePasswordError = PostUserCurrentChangePasswordErrors[keyof PostUserCurrentChangePasswordErrors]; + +export type PostUserCurrentChangePasswordResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type GetUserCurrentConfigurationData = { + body?: never; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/user/current/configuration'; +}; + +export type GetUserCurrentConfigurationErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetUserCurrentConfigurationResponses = { + /** + * OK + */ + 200: CurrentUserConfigurationResponseModel; +}; + +export type GetUserCurrentConfigurationResponse = GetUserCurrentConfigurationResponses[keyof GetUserCurrentConfigurationResponses]; + +export type GetUserCurrentLoginProvidersData = { + body?: never; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/user/current/login-providers'; +}; + +export type GetUserCurrentLoginProvidersErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; +}; + +export type GetUserCurrentLoginProvidersResponses = { + /** + * OK + */ + 200: Array; +}; + +export type GetUserCurrentLoginProvidersResponse = GetUserCurrentLoginProvidersResponses[keyof GetUserCurrentLoginProvidersResponses]; + +export type GetUserCurrentPermissionsData = { + body?: never; + path?: never; + query?: { + id?: Array; + }; + url: '/umbraco/management/api/v1/user/current/permissions'; +}; + +export type GetUserCurrentPermissionsErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type GetUserCurrentPermissionsError = GetUserCurrentPermissionsErrors[keyof GetUserCurrentPermissionsErrors]; + +export type GetUserCurrentPermissionsResponses = { + /** + * OK + */ + 200: UserPermissionsResponseModel; +}; + +export type GetUserCurrentPermissionsResponse = GetUserCurrentPermissionsResponses[keyof GetUserCurrentPermissionsResponses]; + +export type GetUserCurrentPermissionsDocumentData = { + body?: never; + path?: never; + query?: { + id?: Array; + }; + url: '/umbraco/management/api/v1/user/current/permissions/document'; +}; + +export type GetUserCurrentPermissionsDocumentErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type GetUserCurrentPermissionsDocumentError = GetUserCurrentPermissionsDocumentErrors[keyof GetUserCurrentPermissionsDocumentErrors]; + +export type GetUserCurrentPermissionsDocumentResponses = { + /** + * OK + */ + 200: Array; +}; + +export type GetUserCurrentPermissionsDocumentResponse = GetUserCurrentPermissionsDocumentResponses[keyof GetUserCurrentPermissionsDocumentResponses]; + +export type GetUserCurrentPermissionsMediaData = { + body?: never; + path?: never; + query?: { + id?: Array; + }; + url: '/umbraco/management/api/v1/user/current/permissions/media'; +}; + +export type GetUserCurrentPermissionsMediaErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type GetUserCurrentPermissionsMediaError = GetUserCurrentPermissionsMediaErrors[keyof GetUserCurrentPermissionsMediaErrors]; + +export type GetUserCurrentPermissionsMediaResponses = { + /** + * OK + */ + 200: UserPermissionsResponseModel; +}; + +export type GetUserCurrentPermissionsMediaResponse = GetUserCurrentPermissionsMediaResponses[keyof GetUserCurrentPermissionsMediaResponses]; + +export type PostUserDisableData = { + body?: DisableUserRequestModel; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/user/disable'; +}; + +export type PostUserDisableErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PostUserDisableError = PostUserDisableErrors[keyof PostUserDisableErrors]; + +export type PostUserDisableResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type PostUserEnableData = { + body?: EnableUserRequestModel; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/user/enable'; +}; + +export type PostUserEnableErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PostUserEnableError = PostUserEnableErrors[keyof PostUserEnableErrors]; + +export type PostUserEnableResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type PostUserInviteData = { + body?: InviteUserRequestModel; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/user/invite'; +}; + +export type PostUserInviteErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PostUserInviteError = PostUserInviteErrors[keyof PostUserInviteErrors]; + +export type PostUserInviteResponses = { + /** + * Created + */ + 201: unknown; +}; + +export type PostUserInviteCreatePasswordData = { + body?: CreateInitialPasswordUserRequestModel; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/user/invite/create-password'; +}; + +export type PostUserInviteCreatePasswordErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PostUserInviteCreatePasswordError = PostUserInviteCreatePasswordErrors[keyof PostUserInviteCreatePasswordErrors]; + +export type PostUserInviteCreatePasswordResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type PostUserInviteResendData = { + body?: ResendInviteUserRequestModel; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/user/invite/resend'; +}; + +export type PostUserInviteResendErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PostUserInviteResendError = PostUserInviteResendErrors[keyof PostUserInviteResendErrors]; + +export type PostUserInviteResendResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type PostUserInviteVerifyData = { + body?: VerifyInviteUserRequestModel; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/user/invite/verify'; +}; + +export type PostUserInviteVerifyErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PostUserInviteVerifyError = PostUserInviteVerifyErrors[keyof PostUserInviteVerifyErrors]; + +export type PostUserInviteVerifyResponses = { + /** + * OK + */ + 200: VerifyInviteUserResponseModel; +}; + +export type PostUserInviteVerifyResponse = PostUserInviteVerifyResponses[keyof PostUserInviteVerifyResponses]; + +export type PostUserSetUserGroupsData = { + body?: UpdateUserGroupsOnUserRequestModel; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/user/set-user-groups'; +}; + +export type PostUserSetUserGroupsErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type PostUserSetUserGroupsResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type PostUserUnlockData = { + body?: UnlockUsersRequestModel; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/user/unlock'; +}; + +export type PostUserUnlockErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type PostUserUnlockError = PostUserUnlockErrors[keyof PostUserUnlockErrors]; + +export type PostUserUnlockResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type GetItemWebhookData = { + body?: never; + path?: never; + query?: { + id?: Array; + }; + url: '/umbraco/management/api/v1/item/webhook'; +}; + +export type GetItemWebhookErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; +}; + +export type GetItemWebhookResponses = { + /** + * OK + */ + 200: Array; +}; + +export type GetItemWebhookResponse = GetItemWebhookResponses[keyof GetItemWebhookResponses]; + +export type GetWebhookData = { + body?: never; + path?: never; + query?: { + skip?: number; + take?: number; + }; + url: '/umbraco/management/api/v1/webhook'; +}; + +export type GetWebhookErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetWebhookResponses = { + /** + * OK + */ + 200: PagedWebhookResponseModel; +}; + +export type GetWebhookResponse = GetWebhookResponses[keyof GetWebhookResponses]; + +export type PostWebhookData = { + body?: CreateWebhookRequestModel; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/webhook'; +}; + +export type PostWebhookErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PostWebhookError = PostWebhookErrors[keyof PostWebhookErrors]; + +export type PostWebhookResponses = { + /** + * Created + */ + 201: unknown; +}; + +export type DeleteWebhookByIdData = { + body?: never; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/webhook/{id}'; +}; + +export type DeleteWebhookByIdErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type DeleteWebhookByIdError = DeleteWebhookByIdErrors[keyof DeleteWebhookByIdErrors]; + +export type DeleteWebhookByIdResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type GetWebhookByIdData = { + body?: never; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/webhook/{id}'; +}; + +export type GetWebhookByIdErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type GetWebhookByIdError = GetWebhookByIdErrors[keyof GetWebhookByIdErrors]; + +export type GetWebhookByIdResponses = { + /** + * OK + */ + 200: WebhookResponseModel; +}; + +export type GetWebhookByIdResponse = GetWebhookByIdResponses[keyof GetWebhookByIdResponses]; + +export type PutWebhookByIdData = { + body?: UpdateWebhookRequestModel; + path: { + id: string; + }; + query?: never; + url: '/umbraco/management/api/v1/webhook/{id}'; +}; + +export type PutWebhookByIdErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PutWebhookByIdError = PutWebhookByIdErrors[keyof PutWebhookByIdErrors]; + +export type PutWebhookByIdResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type GetWebhookByIdLogsData = { + body?: never; + path: { + id: string; + }; + query?: { + skip?: number; + take?: number; + }; + url: '/umbraco/management/api/v1/webhook/{id}/logs'; +}; + +export type GetWebhookByIdLogsErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; +}; + +export type GetWebhookByIdLogsResponses = { + /** + * OK + */ + 200: PagedWebhookLogResponseModel; +}; + +export type GetWebhookByIdLogsResponse = GetWebhookByIdLogsResponses[keyof GetWebhookByIdLogsResponses]; + +export type GetWebhookEventsData = { + body?: never; + path?: never; + query?: { + skip?: number; + take?: number; + }; + url: '/umbraco/management/api/v1/webhook/events'; +}; + +export type GetWebhookEventsErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetWebhookEventsResponses = { + /** + * OK + */ + 200: PagedWebhookEventModel; +}; + +export type GetWebhookEventsResponse = GetWebhookEventsResponses[keyof GetWebhookEventsResponses]; + +export type GetWebhookLogsData = { + body?: never; + path?: never; + query?: { + skip?: number; + take?: number; + }; + url: '/umbraco/management/api/v1/webhook/logs'; +}; + +export type GetWebhookLogsErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; +}; + +export type GetWebhookLogsResponses = { + /** + * OK + */ + 200: PagedWebhookLogResponseModel; +}; + +export type GetWebhookLogsResponse = GetWebhookLogsResponses[keyof GetWebhookLogsResponses]; + +export type ClientOptions = { + baseUrl: `${string}://${string}` | (string & {}); +}; \ No newline at end of file diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content-type/repository/structure/content-type-structure-server-data-source-base.ts b/src/Umbraco.Web.UI.Client/src/packages/core/content-type/repository/structure/content-type-structure-server-data-source-base.ts index b370ae5681..09c7aa336a 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/content-type/repository/structure/content-type-structure-server-data-source-base.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/content-type/repository/structure/content-type-structure-server-data-source-base.ts @@ -3,6 +3,7 @@ import type { UmbContentTypeStructureDataSource } from './content-type-structure import type { UmbEntityModel } from '@umbraco-cms/backoffice/entity'; import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api'; import { tryExecute } from '@umbraco-cms/backoffice/resources'; +import type { UmbDataSourceResponse } from '@umbraco-cms/backoffice/repository'; // Keep this type internal type AllowedContentTypeBaseModel = { @@ -19,7 +20,7 @@ export interface UmbContentTypeStructureServerDataSourceBaseArgs< getAllowedChildrenOf: ( unique: string | null, parentContentUnique: string | null, - ) => Promise>; + ) => Promise>>; mapper: (item: ServerItemType) => ClientItemType; } diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/culture/repository/sources/culture.server.data.ts b/src/Umbraco.Web.UI.Client/src/packages/core/culture/repository/sources/culture.server.data.ts index 99343287d7..9c617a32ad 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/culture/repository/sources/culture.server.data.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/culture/repository/sources/culture.server.data.ts @@ -29,6 +29,6 @@ export class UmbCultureServerDataSource implements UmbCultureDataSource { * @memberof UmbLanguageServerDataSource */ async getCollection({ skip, take }: { skip: number; take: number }) { - return tryExecute(this.#host, CultureService.getCulture({ skip, take })); + return tryExecute(this.#host, CultureService.getCulture({ query: { skip, take } })); } } diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/http-client/index.ts b/src/Umbraco.Web.UI.Client/src/packages/core/http-client/index.ts new file mode 100644 index 0000000000..450649ecb2 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/packages/core/http-client/index.ts @@ -0,0 +1 @@ +export { client as umbHttpClient } from '@umbraco-cms/backoffice/external/backend-api'; diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/modal/context/modal-manager.context.ts b/src/Umbraco.Web.UI.Client/src/packages/core/modal/context/modal-manager.context.ts index 9cb52e4359..655e9af94d 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/modal/context/modal-manager.context.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/modal/context/modal-manager.context.ts @@ -1,5 +1,6 @@ import type { UmbModalToken } from '../token/modal-token.js'; -import { UmbModalContext, type UmbModalContextClassArgs } from './modal.context.js'; +import { UmbModalContext } from './modal.context.js'; +import type { UmbModalContextClassArgs } from './modal.context.js'; import { UmbBasicState, appendToFrozenArray } from '@umbraco-cms/backoffice/observable-api'; import { UmbContextToken } from '@umbraco-cms/backoffice/context-api'; import { UmbContextBase } from '@umbraco-cms/backoffice/class-api'; diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/modal/controller/open-modal.controller.ts b/src/Umbraco.Web.UI.Client/src/packages/core/modal/controller/open-modal.controller.ts index 84fbddedc9..994cea8780 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/modal/controller/open-modal.controller.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/modal/controller/open-modal.controller.ts @@ -1,7 +1,8 @@ +import { UMB_MODAL_MANAGER_CONTEXT } from '../context/modal-manager.context.js'; import type { UmbModalToken } from '../token/modal-token.js'; +import type { UmbModalContextClassArgs } from '../context/modal.context.js'; import { UmbControllerBase } from '@umbraco-cms/backoffice/class-api'; import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api'; -import { UMB_MODAL_MANAGER_CONTEXT, type UmbModalContextClassArgs } from '../context/index.js'; export class UmbOpenModalController extends UmbControllerBase { async open< diff --git a/src/Umbraco.Web.UI.Client/devops/openapi-ts/openapi-ts.config.js b/src/Umbraco.Web.UI.Client/src/packages/core/openapi-ts.config.js similarity index 55% rename from src/Umbraco.Web.UI.Client/devops/openapi-ts/openapi-ts.config.js rename to src/Umbraco.Web.UI.Client/src/packages/core/openapi-ts.config.js index 0e27431a11..25ad5655d9 100644 --- a/src/Umbraco.Web.UI.Client/devops/openapi-ts/openapi-ts.config.js +++ b/src/Umbraco.Web.UI.Client/src/packages/core/openapi-ts.config.js @@ -2,14 +2,17 @@ import { defineConfig } from '@hey-api/openapi-ts'; export default defineConfig({ debug: true, - input: '../Umbraco.Cms.Api.Management/OpenApi.json', + input: '../../../../Umbraco.Cms.Api.Management/OpenApi.json', output: { - path: 'src/external/backend-api/src', - format: 'prettier', - lint: 'eslint', + path: './backend-api', }, plugins: [ - 'legacy/fetch', + { + name: '@hey-api/client-fetch', + bundle: false, + exportFromIndex: true, + throwOnError: true, + }, { name: '@hey-api/typescript', enums: 'typescript' diff --git a/src/Umbraco.Web.UI.Client/devops/openapi-ts/openapi-ts.dev.config.js b/src/Umbraco.Web.UI.Client/src/packages/core/openapi-ts.dev.config.js similarity index 100% rename from src/Umbraco.Web.UI.Client/devops/openapi-ts/openapi-ts.dev.config.js rename to src/Umbraco.Web.UI.Client/src/packages/core/openapi-ts.dev.config.js diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/package.json b/src/Umbraco.Web.UI.Client/src/packages/core/package.json index 045f9dc9f9..2a1734d1f5 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/package.json +++ b/src/Umbraco.Web.UI.Client/src/packages/core/package.json @@ -3,11 +3,17 @@ "private": true, "type": "module", "scripts": { - "build": "vite build" + "build": "vite build", + "generate:server-api-dev": "openapi-ts --file openapi-ts.dev.config.js", + "generate:server-api": "openapi-ts --file openapi-ts.config.js" }, "dependencies": { "@types/diff": "^7.0.1", "diff": "^7.0.0", "uuid": "^11.0.5" + }, + "devDependencies": { + "@hey-api/client-fetch": "^0.10.0", + "@hey-api/openapi-ts": "^0.66.1" } -} \ No newline at end of file +} diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/repository/data-source-response.interface.ts b/src/Umbraco.Web.UI.Client/src/packages/core/repository/data-source-response.interface.ts index 181b80fb46..5b242867a3 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/repository/data-source-response.interface.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/repository/data-source-response.interface.ts @@ -1,6 +1,9 @@ import type { UmbApiError, UmbCancelError, UmbError } from '../resources/umb-error.js'; export interface UmbDataSourceResponse extends UmbDataSourceErrorResponse { + /** + * The data returned from the data source. + */ data?: T; } diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/repository/detail/detail-data-source.interface.ts b/src/Umbraco.Web.UI.Client/src/packages/core/repository/detail/detail-data-source.interface.ts index a9ae091257..5b92e4de68 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/repository/detail/detail-data-source.interface.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/repository/detail/detail-data-source.interface.ts @@ -13,5 +13,5 @@ export interface UmbDetailDataSource extends UmbReadDetailDataSource createScaffold(preset?: Partial): Promise>; create(data: DetailType, parentUnique: string | null): Promise>; update(data: DetailType): Promise>; - delete(unique: string): Promise; + delete(unique: string): Promise>; } diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/repository/item/item-data-source.interface.ts b/src/Umbraco.Web.UI.Client/src/packages/core/repository/item/item-data-source.interface.ts index 824a891388..51a46a4737 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/repository/item/item-data-source.interface.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/repository/item/item-data-source.interface.ts @@ -1,5 +1,5 @@ -import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api'; import type { UmbDataSourceResponse } from '../data-source-response.interface.js'; +import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api'; export interface UmbItemDataSourceConstructor { new (host: UmbControllerHost): UmbItemDataSource; diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/repository/item/item-server-data-source-base.ts b/src/Umbraco.Web.UI.Client/src/packages/core/repository/item/item-server-data-source-base.ts index 845a716c1e..02df1f5429 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/repository/item/item-server-data-source-base.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/repository/item/item-server-data-source-base.ts @@ -1,9 +1,10 @@ +import type { UmbDataSourceResponse } from '../data-source-response.interface.js'; +import type { UmbItemDataSource } from './item-data-source.interface.js'; import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api'; import { tryExecute } from '@umbraco-cms/backoffice/resources'; -import type { UmbItemDataSource } from './item-data-source.interface.js'; export interface UmbItemServerDataSourceBaseArgs { - getItems: (uniques: Array) => Promise>; + getItems: (uniques: Array) => Promise>>; mapper: (item: ServerItemType) => ClientItemType; } @@ -16,7 +17,7 @@ export abstract class UmbItemServerDataSourceBase { #host: UmbControllerHost; - #getItems: (uniques: Array) => Promise>; + #getItems: (uniques: Array) => Promise>>; #mapper: (item: ServerItemType) => ClientItemType; /** diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/resources/api-interceptor.controller.ts b/src/Umbraco.Web.UI.Client/src/packages/core/resources/api-interceptor.controller.ts index b4043cd5ea..101c9f24ed 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/resources/api-interceptor.controller.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/resources/api-interceptor.controller.ts @@ -1,29 +1,30 @@ import { extractUmbNotificationColor } from './extractUmbNotificationColor.function.js'; import { isUmbNotifications, UMB_NOTIFICATION_HEADER } from './isUmbNotifications.function.js'; import { UmbControllerBase } from '@umbraco-cms/backoffice/class-api'; -import type { OpenAPIConfig } from '@umbraco-cms/backoffice/external/backend-api'; import { UMB_AUTH_CONTEXT } from '@umbraco-cms/backoffice/auth'; import type { UmbNotificationColor } from '@umbraco-cms/backoffice/notification'; +import type { umbHttpClient } from '@umbraco-cms/backoffice/http-client'; export class UmbApiInterceptorController extends UmbControllerBase { /** * Binds the default interceptors to the client. * This includes the auth response interceptor, the error interceptor and the umb-notifications interceptor. - * @param {OpenAPIConfig} client The OpenAPI client to add the interceptor to. It can be any client supporting Response and Request interceptors. + * @param {umbHttpClient} client The OpenAPI client to add the interceptor to. It can be any client supporting Response and Request interceptors. */ - public bindDefaultInterceptors(client: OpenAPIConfig) { + public bindDefaultInterceptors(client: typeof umbHttpClient) { this.addAuthResponseInterceptor(client); + this.addUmbGeneratedResourceInterceptor(client); this.addUmbNotificationsInterceptor(client); this.addErrorInterceptor(client); } /** * Interceptor which checks responses for 401 errors and lets the UmbAuthContext know the user is timed out. - * @param {OpenAPIConfig} client The OpenAPI client to add the interceptor to. It can be any client supporting Response and Request interceptors. + * @param {umbHttpClient} client The OpenAPI client to add the interceptor to. It can be any client supporting Response and Request interceptors. * @internal */ - addAuthResponseInterceptor(client: OpenAPIConfig) { - client.interceptors.response.use(async (response) => { + addAuthResponseInterceptor(client: typeof umbHttpClient) { + client.interceptors.response.use(async (response: Response) => { if (response.status === 401) { // See if we can get the UmbAuthContext and let it know the user is timed out const authContext = await this.getContext(UMB_AUTH_CONTEXT, { preventTimeout: true }); @@ -37,11 +38,36 @@ export class UmbApiInterceptorController extends UmbControllerBase { } /** - * Interceptor which checks responses for 500 errors and displays them as a notification if any. - * @param {OpenAPIConfig} client The OpenAPI client to add the interceptor to. It can be any client supporting Response and Request interceptors. + * Interceptor which checks responses for the Umb-Generated-Resource header and replaces the value into the response body. + * @param {umbHttpClient} client The OpenAPI client to add the interceptor to. It can be any client supporting Response and Request interceptors. * @internal */ - addErrorInterceptor(client: OpenAPIConfig) { + addUmbGeneratedResourceInterceptor(client: typeof umbHttpClient) { + client.interceptors.response.use(async (response: Response) => { + if (!response.headers.has('Umb-Generated-Resource')) { + return response; + } + + const generatedResource = response.headers.get('Umb-Generated-Resource'); + if (generatedResource === null) { + return response; + } + + // Generate new response body with the generated resource, which is a guid + const newResponse = new Response(generatedResource, { + ...response, + }); + + return newResponse; + }); + } + + /** + * Interceptor which checks responses for 500 errors and displays them as a notification if any. + * @param {umbHttpClient} client The OpenAPI client to add the interceptor to. It can be any client supporting Response and Request interceptors. + * @internal + */ + addErrorInterceptor(client: typeof umbHttpClient) { client.interceptors.response.use(async (response) => { if (response.ok) return response; @@ -88,10 +114,10 @@ export class UmbApiInterceptorController extends UmbControllerBase { /** * Interceptor which checks responses for the umb-notifications header and displays them as a notification if any. Removes the umb-notifications from the headers. - * @param {OpenAPIConfig} client The OpenAPI client to add the interceptor to. It can be any client supporting Response and Request interceptors. + * @param {umbHttpClient} client The OpenAPI client to add the interceptor to. It can be any client supporting Response and Request interceptors. * @internal */ - addUmbNotificationsInterceptor(client: OpenAPIConfig) { + addUmbNotificationsInterceptor(client: typeof umbHttpClient) { client.interceptors.response.use((response) => { // Check if the response has the umb-notifications header // If not, we just return the response diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/resources/apiTypeValidators.function.ts b/src/Umbraco.Web.UI.Client/src/packages/core/resources/apiTypeValidators.function.ts index 94a003fee4..dc197c13ae 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/resources/apiTypeValidators.function.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/resources/apiTypeValidators.function.ts @@ -1,3 +1,5 @@ +import type { UmbProblemDetails } from './types.js'; + /** * Checks if the given error is an instance of ApiError. * @param {*} error The error to check @@ -26,3 +28,26 @@ export function isCancelError(error: unknown): error is Error { export function isCancelablePromise(promise: unknown): promise is Promise & { cancel: () => void } { return typeof (promise as Promise & { cancel: () => void }).cancel === 'function'; } + +/** + * Checks if the given error is an instance of ProblemDetails. + * @param {*} error The error to check + * @returns {boolean} True if the error is an instance of ProblemDetails, false otherwise + */ +export function isProblemDetailsLike(error: unknown): error is UmbProblemDetails { + return ( + typeof error === 'object' && + error !== null && + 'type' in error && + 'title' in error && + 'status' in error && + (typeof (error as { detail?: unknown }).detail === 'undefined' || + typeof (error as { detail?: unknown }).detail === 'string') && + (typeof (error as { instance?: unknown }).instance === 'undefined' || + typeof (error as { instance?: unknown }).instance === 'string') && + (typeof (error as { operationStatus?: unknown }).operationStatus === 'undefined' || + typeof (error as { operationStatus?: unknown }).operationStatus === 'string') && + (typeof (error as { errors?: unknown }).errors === 'undefined' || + typeof (error as { errors?: unknown }).errors === 'object') + ); +} diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/resources/resource.controller.ts b/src/Umbraco.Web.UI.Client/src/packages/core/resources/resource.controller.ts index 7b22a4a41c..172176ecc7 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/resources/resource.controller.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/resources/resource.controller.ts @@ -1,18 +1,16 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ -import { isApiError, isCancelablePromise, isCancelError } from './apiTypeValidators.function.js'; -import type { UmbCancelablePromise } from './cancelable-promise.js'; +import { isApiError, isCancelablePromise, isCancelError, isProblemDetailsLike } from './apiTypeValidators.function.js'; import { UmbApiError, UmbCancelError, UmbError } from './umb-error.js'; import { UmbControllerBase } from '@umbraco-cms/backoffice/class-api'; import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api'; -export class UmbResourceController extends UmbControllerBase { +export class UmbResourceController extends UmbControllerBase { /** * The promise that is being executed. * @protected */ - protected _promise: UmbCancelablePromise | Promise; + protected _promise; - constructor(host: UmbControllerHost, promise: Promise, alias?: string) { + constructor(host: UmbControllerHost, promise: PromiseLike, alias?: string) { super(host, alias); this._promise = promise; @@ -25,8 +23,10 @@ export class UmbResourceController extends UmbControllerBase { * @returns {*} The mapped error */ mapToUmbError(error: unknown): UmbApiError | UmbCancelError | UmbError { - if (isApiError(error)) { - return UmbApiError.fromLegacyApiError(error as any); + if (isProblemDetailsLike(error)) { + return new UmbApiError(error.detail ?? error.title, error.status, null, error); + } else if (isApiError(error)) { + return UmbApiError.fromLegacyApiError(error as never); } else if (isCancelError(error)) { return UmbCancelError.fromLegacyCancelError(error); } else if (UmbCancelError.isUmbCancelError(error)) { diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/resources/try-execute.controller.ts b/src/Umbraco.Web.UI.Client/src/packages/core/resources/try-execute.controller.ts index 2df496efbe..6fcd049ca6 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/resources/try-execute.controller.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/resources/try-execute.controller.ts @@ -1,19 +1,18 @@ import { UmbResourceController } from './resource.controller.js'; -import type { UmbTryExecuteOptions } from './types.js'; +import type { UmbApiResponse, UmbTryExecuteOptions } from './types.js'; import { UmbApiError, UmbCancelError } from './umb-error.js'; -import type { UmbDataSourceResponse } from '@umbraco-cms/backoffice/repository'; -export class UmbTryExecuteController extends UmbResourceController { +export class UmbTryExecuteController extends UmbResourceController { #abortSignal?: AbortSignal; - async tryExecute(opts?: UmbTryExecuteOptions): Promise> { + async tryExecute(opts?: UmbTryExecuteOptions): Promise> { try { if (opts?.abortSignal) { this.#abortSignal = opts.abortSignal; this.#abortSignal.addEventListener('abort', () => this.cancel(), { once: true }); } - return { data: await this._promise }; + return (await this._promise) as UmbApiResponse; } catch (error) { // Error might be a legacy error, so we need to check if it is an UmbError const umbError = this.mapToUmbError(error); @@ -24,7 +23,7 @@ export class UmbTryExecuteController extends UmbResourceController { return { error: umbError, - }; + } as UmbApiResponse; } } @@ -43,13 +42,13 @@ export class UmbTryExecuteController extends UmbResourceController { let headline = 'An error occurred'; let message = 'An error occurred while trying to execute the request.'; - let details: Record = {}; + let details: Record | undefined = undefined; if (UmbApiError.isUmbApiError(error)) { // UmbApiError, show notification headline = error.problemDetails.title ?? error.name; message = error.problemDetails.detail ?? error.message; - details = error.problemDetails.errors ?? {}; + details = error.problemDetails.errors ?? undefined; } else { // Unknown error, show notification headline = ''; diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/resources/tryExecute.function.ts b/src/Umbraco.Web.UI.Client/src/packages/core/resources/tryExecute.function.ts index ab96539486..07c4b26cfd 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/resources/tryExecute.function.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/resources/tryExecute.function.ts @@ -1,6 +1,5 @@ import { UmbTryExecuteController } from './try-execute.controller.js'; -import type { UmbTryExecuteOptions } from './types.js'; -import type { UmbDataSourceResponse } from '@umbraco-cms/backoffice/repository'; +import type { UmbApiResponse, UmbTryExecuteOptions } from './types.js'; import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api'; /** @@ -8,7 +7,7 @@ import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api'; * @param {UmbControllerHost} host The host to use for the request and where notifications will be shown. * @param {Promise} promise The promise to execute. * @param {UmbTryExecuteOptions} opts Options for the request. - * @returns {Promise>} A promise that resolves with the response data or rejects with an error. + * @returns {Promise>} A promise that resolves with the response data or rejects with an error. * @template T The type of the response data. * @example * const { data, error } = await tryExecute(this, myPromise, { @@ -23,9 +22,9 @@ export async function tryExecute( host: UmbControllerHost, promise: Promise, opts?: UmbTryExecuteOptions, -): Promise> { +): Promise> { const controller = new UmbTryExecuteController(host, promise); const response = await controller.tryExecute(opts); controller.destroy(); - return response as UmbDataSourceResponse; + return response; } diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/resources/tryExecuteAndNotify.function.ts b/src/Umbraco.Web.UI.Client/src/packages/core/resources/tryExecuteAndNotify.function.ts index 46f9d3882c..1708d759c0 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/resources/tryExecuteAndNotify.function.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/resources/tryExecuteAndNotify.function.ts @@ -1,6 +1,6 @@ import { UmbTryExecuteController } from './try-execute.controller.js'; +import type { UmbApiResponse } from './types.js'; import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api'; -import type { UmbDataSourceResponse } from '@umbraco-cms/backoffice/repository'; import { UmbDeprecation } from '@umbraco-cms/backoffice/utils'; /** @@ -9,7 +9,7 @@ import { UmbDeprecation } from '@umbraco-cms/backoffice/utils'; * It is useful for making requests where you want to handle errors in a consistent way. * @param {UmbControllerHost} host The host to use for the request. * @param {Promise} resource The resource to request. - * @returns {Promise>} A promise that resolves with the response data or rejects with an error. + * @returns {Promise>} A promise that resolves with the response data or rejects with an error. * @template T The type of the response data. * @deprecated Use the {@link tryExecute} function instead and handle the error in the caller. * This function is kept for backwards compatibility and will be removed in a future version. @@ -17,7 +17,7 @@ import { UmbDeprecation } from '@umbraco-cms/backoffice/utils'; export async function tryExecuteAndNotify( host: UmbControllerHost, resource: Promise, -): Promise> { +): Promise> { new UmbDeprecation({ deprecated: 'The tryExecuteAndNotify function is deprecated.', removeInVersion: '18.0.0', @@ -26,5 +26,5 @@ export async function tryExecuteAndNotify( const controller = new UmbTryExecuteController(host, resource); const response = await controller.tryExecute({ disableNotifications: false }); controller.destroy(); - return response as UmbDataSourceResponse; + return response; } diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/resources/tryXhrRequest.function.ts b/src/Umbraco.Web.UI.Client/src/packages/core/resources/tryXhrRequest.function.ts index 68f2f222eb..ab4b6810a7 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/resources/tryXhrRequest.function.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/resources/tryXhrRequest.function.ts @@ -1,10 +1,9 @@ import { UmbTryExecuteController } from './try-execute.controller.js'; import { UmbCancelablePromise } from './cancelable-promise.js'; import { UmbApiError } from './umb-error.js'; -import type { XhrRequestOptions } from './types.js'; -import { OpenAPI } from '@umbraco-cms/backoffice/external/backend-api'; +import type { UmbApiResponse, XhrRequestOptions } from './types.js'; import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api'; -import type { UmbDataSourceResponse } from '@umbraco-cms/backoffice/repository'; +import { umbHttpClient } from '@umbraco-cms/backoffice/http-client'; /** * Make an XHR request. @@ -12,22 +11,23 @@ import type { UmbDataSourceResponse } from '@umbraco-cms/backoffice/repository'; * It supports cancelable promises, progress events, and custom headers. * @param {UmbControllerHost} host The host to use for the request. * @param {XhrRequestOptions} options The options for the request. - * @returns {Promise>} A promise that resolves with the response data or rejects with an error. + * @returns {Promise>} A promise that resolves with the response data or rejects with an error. * @template T The type of the response data. */ export async function tryXhrRequest( host: UmbControllerHost, options: XhrRequestOptions, -): Promise> { - const promise = createXhrRequest({ +): Promise> { + const config = umbHttpClient.getConfig(); + const promise = createXhrRequest({ ...options, - baseUrl: OpenAPI.BASE, - token: OpenAPI.TOKEN as never, + baseUrl: config.baseUrl, + token: () => (typeof config.auth === 'function' ? config.auth({ type: 'http', scheme: 'bearer' }) : config.auth), }); const controller = new UmbTryExecuteController(host, promise); const response = await controller.tryExecute(options); controller.destroy(); - return response as UmbDataSourceResponse; + return response; } /** diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/resources/types.ts b/src/Umbraco.Web.UI.Client/src/packages/core/resources/types.ts index bbdebf1d1e..fd7413e8f1 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/resources/types.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/resources/types.ts @@ -1,9 +1,11 @@ +import type { UmbApiError, UmbCancelError, UmbError } from './umb-error.js'; + export interface XhrRequestOptions extends UmbTryExecuteOptions { baseUrl?: string; method: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS'; url: string; body?: unknown; - token?: string | (() => string | Promise); + token?: string | (() => undefined | string | Promise); headers?: Record; responseHeader?: string; onProgress?: (event: ProgressEvent) => void; @@ -33,3 +35,16 @@ export interface UmbTryExecuteOptions { */ abortSignal?: AbortSignal; } + +export type UmbApiWithErrorResponse = { + error?: UmbError | UmbApiError | UmbCancelError | Error; +}; + +/** + * UmbApiResponse is a type that represents the response from an API call. + * It can either be a successful response with data or an error response. + * @template T The type of the response data. + * @property {T} data The data returned from the API. + * @property {UmbError | UmbApiError | UmbCancelError | Error} error The error returned from the API. + */ +export type UmbApiResponse = T & UmbApiWithErrorResponse; diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/server/index.ts b/src/Umbraco.Web.UI.Client/src/packages/core/server/index.ts index 683339b674..22bc53a8f5 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/server/index.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/server/index.ts @@ -1,4 +1,3 @@ -export * from './network-connection-status.manager.js'; export * from './server-connection.js'; export * from './server.context-token.js'; export * from './server.context.js'; diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/server/server.context.ts b/src/Umbraco.Web.UI.Client/src/packages/core/server/server.context.ts index bcf46c637d..dea492b571 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/server/server.context.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/server/server.context.ts @@ -1,5 +1,4 @@ import { UMB_SERVER_CONTEXT } from './server.context-token.js'; -import { UmbNetworkConnectionStatusManager } from './network-connection-status.manager.js'; import type { UmbServerContextConfig } from './types.js'; import { UmbContextBase } from '@umbraco-cms/backoffice/class-api'; import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api'; @@ -14,8 +13,6 @@ export class UmbServerContext extends UmbContextBase { this.#serverUrl = config.serverUrl; this.#backofficePath = config.backofficePath; this.#serverConnection = config.serverConnection; - - new UmbNetworkConnectionStatusManager(this); } getBackofficePath() { diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/temporary-file/temporary-file-manager.class.ts b/src/Umbraco.Web.UI.Client/src/packages/core/temporary-file/temporary-file-manager.class.ts index 4f438760df..2ae3f819c7 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/temporary-file/temporary-file-manager.class.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/temporary-file/temporary-file-manager.class.ts @@ -11,7 +11,7 @@ import { UmbControllerBase } from '@umbraco-cms/backoffice/class-api'; import { UmbLocalizationController } from '@umbraco-cms/backoffice/localization-api'; import { UMB_NOTIFICATION_CONTEXT } from '@umbraco-cms/backoffice/notification'; import { formatBytes } from '@umbraco-cms/backoffice/utils'; -import { isCancelError } from '@umbraco-cms/backoffice/resources'; +import { UmbCancelError } from '@umbraco-cms/backoffice/resources'; export class UmbTemporaryFileManager< UploadableItem extends UmbTemporaryFileModel = UmbTemporaryFileModel, @@ -164,7 +164,7 @@ export class UmbTemporaryFileManager< let status = TemporaryFileStatus.SUCCESS; if (error) { status = TemporaryFileStatus.ERROR; - if (isCancelError(error)) { + if (UmbCancelError.isUmbCancelError(error)) { status = TemporaryFileStatus.CANCELLED; } } diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/temporary-file/temporary-file.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/core/temporary-file/temporary-file.server.data-source.ts index ff3642c385..f0c0d26423 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/temporary-file/temporary-file.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/temporary-file/temporary-file.server.data-source.ts @@ -1,5 +1,5 @@ import type { UmbDataSourceResponse } from '../repository/index.js'; -import { TemporaryFileService, type PostTemporaryFileResponse } from '@umbraco-cms/backoffice/external/backend-api'; +import { TemporaryFileService } from '@umbraco-cms/backoffice/external/backend-api'; import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api'; import { tryExecute, tryXhrRequest } from '@umbraco-cms/backoffice/resources'; @@ -32,11 +32,11 @@ export class UmbTemporaryFileServerDataSource { file: File, onProgress?: (progress: ProgressEvent) => void, abortSignal?: AbortSignal, - ): Promise> { + ): Promise> { const body = new FormData(); body.append('Id', id); body.append('File', file); - const xhrRequest = tryXhrRequest(this.#host, { + const xhrRequest = tryXhrRequest(this.#host, { url: '/umbraco/management/api/v1/temporary-file', method: 'POST', responseHeader: 'Umb-Generated-Resource', @@ -55,7 +55,7 @@ export class UmbTemporaryFileServerDataSource { */ read(id: string) { if (!id) throw new Error('Id is missing'); - return tryExecute(this.#host, TemporaryFileService.getTemporaryFileById({ id })); + return tryExecute(this.#host, TemporaryFileService.getTemporaryFileById({ path: { id } })); } /** @@ -66,6 +66,6 @@ export class UmbTemporaryFileServerDataSource { */ delete(id: string) { if (!id) throw new Error('Id is missing'); - return tryExecute(this.#host, TemporaryFileService.deleteTemporaryFileById({ id })); + return tryExecute(this.#host, TemporaryFileService.deleteTemporaryFileById({ path: { id } })); } } diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/tree/data/tree-server-data-source-base.ts b/src/Umbraco.Web.UI.Client/src/packages/core/tree/data/tree-server-data-source-base.ts index d8069603f2..d265b448fe 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/tree/data/tree-server-data-source-base.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/tree/data/tree-server-data-source-base.ts @@ -7,7 +7,7 @@ import type { } from './types.js'; import { tryExecute } from '@umbraco-cms/backoffice/resources'; import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api'; -import type { UmbPagedModel } from '@umbraco-cms/backoffice/repository'; +import type { UmbDataSourceResponse, UmbPagedModel } from '@umbraco-cms/backoffice/repository'; export interface UmbTreeServerDataSourceBaseArgs< ServerTreeItemType extends { hasChildren: boolean }, @@ -16,9 +16,13 @@ export interface UmbTreeServerDataSourceBaseArgs< TreeChildrenOfRequestArgsType extends UmbTreeChildrenOfRequestArgs = UmbTreeChildrenOfRequestArgs, TreeAncestorsOfRequestArgsType extends UmbTreeAncestorsOfRequestArgs = UmbTreeAncestorsOfRequestArgs, > { - getRootItems: (args: TreeRootItemsRequestArgsType) => Promise>; - getChildrenOf: (args: TreeChildrenOfRequestArgsType) => Promise>; - getAncestorsOf: (args: TreeAncestorsOfRequestArgsType) => Promise>; + getRootItems: ( + args: TreeRootItemsRequestArgsType, + ) => Promise>>; + getChildrenOf: ( + args: TreeChildrenOfRequestArgsType, + ) => Promise>>; + getAncestorsOf: (args: TreeAncestorsOfRequestArgsType) => Promise>>; mapper: (item: ServerTreeItemType) => ClientTreeItemType; } diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/utils/get-processed-image-url.function.ts b/src/Umbraco.Web.UI.Client/src/packages/core/utils/get-processed-image-url.function.ts index 51a43983d5..5ca5f5c00d 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/utils/get-processed-image-url.function.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/utils/get-processed-image-url.function.ts @@ -6,7 +6,10 @@ import type { GetImagingResizeUrlsData } from '@umbraco-cms/backoffice/external/ * @param {GetImagingResizeUrlsData} options The options for resizing the image. * @returns {Promise} The URL of the processed image. */ -export async function getProcessedImageUrl(imagePath: string, options: GetImagingResizeUrlsData): Promise { +export async function getProcessedImageUrl( + imagePath: string, + options: GetImagingResizeUrlsData['query'], +): Promise { if (!options) { return imagePath; } diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/vite.config.ts b/src/Umbraco.Web.UI.Client/src/packages/core/vite.config.ts index 1e78a42608..1cf88bf452 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/vite.config.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/vite.config.ts @@ -14,6 +14,7 @@ export default defineConfig({ 'action/index': './action/index.ts', 'audit-log/index': './audit-log/index.ts', 'auth/index': './auth/index.ts', + 'backend-api/index': './backend-api/index.ts', 'collection/index': './collection/index.ts', 'components/index': './components/index.ts', 'const/index': './const/index.ts', @@ -30,6 +31,7 @@ export default defineConfig({ 'entry-point': 'entry-point.ts', 'event/index': './event/index.ts', 'extension-registry/index': './extension-registry/index.ts', + 'http-client/index': './http-client/index.ts', 'icon-registry/index': './icon-registry/index.ts', 'id/index': './id/index.ts', 'lit-element/index': './lit-element/index.ts', diff --git a/src/Umbraco.Web.UI.Client/src/packages/data-type/collection/repository/data-type-collection.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/data-type/collection/repository/data-type-collection.server.data-source.ts index 637f8dde0e..6e3ab98d95 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/data-type/collection/repository/data-type-collection.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/data-type/collection/repository/data-type-collection.server.data-source.ts @@ -35,12 +35,12 @@ export class UmbDataTypeCollectionServerDataSource implements UmbCollectionDataS /** * Gets the DataType collection filtered by the given filter. - * @param {UmbDataTypeCollectionFilterModel} filter + * @param {UmbDataTypeCollectionFilterModel} query * @returns {*} * @DataTypeof UmbDataTypeCollectionServerDataSource */ - async getCollection(filter: UmbDataTypeCollectionFilterModel) { - const { data, error } = await tryExecute(this.#host, DataTypeService.getFilterDataType(filter)); + async getCollection(query: UmbDataTypeCollectionFilterModel) { + const { data, error } = await tryExecute(this.#host, DataTypeService.getFilterDataType({ query })); if (error) { return { error }; diff --git a/src/Umbraco.Web.UI.Client/src/packages/data-type/entity-actions/duplicate/repository/data-type-duplicate.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/data-type/entity-actions/duplicate/repository/data-type-duplicate.server.data-source.ts index 73899fb42a..544c79ad37 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/data-type/entity-actions/duplicate/repository/data-type-duplicate.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/data-type/entity-actions/duplicate/repository/data-type-duplicate.server.data-source.ts @@ -32,8 +32,8 @@ export class UmbDuplicateDataTypeServerDataSource implements UmbDuplicateToDataS return tryExecute( this.#host, DataTypeService.postDataTypeByIdCopy({ - id: args.unique, - requestBody: { + path: { id: args.unique }, + body: { target: args.destination.unique ? { id: args.destination.unique } : null, }, }), diff --git a/src/Umbraco.Web.UI.Client/src/packages/data-type/entity-actions/move-to/repository/data-type-move.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/data-type/entity-actions/move-to/repository/data-type-move.server.data-source.ts index 22982c86c1..9b55b8fdd1 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/data-type/entity-actions/move-to/repository/data-type-move.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/data-type/entity-actions/move-to/repository/data-type-move.server.data-source.ts @@ -34,8 +34,8 @@ export class UmbMoveDataTypeServerDataSource implements UmbMoveDataSource { return tryExecute( this.#host, DataTypeService.putDataTypeByIdMove({ - id: args.unique, - requestBody: { + path: { id: args.unique }, + body: { target: args.destination.unique ? { id: args.destination.unique } : null, }, }), diff --git a/src/Umbraco.Web.UI.Client/src/packages/data-type/reference/repository/data-type-reference.server.data.ts b/src/Umbraco.Web.UI.Client/src/packages/data-type/reference/repository/data-type-reference.server.data.ts index 7fa8b49d24..d0fc7a93f2 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/data-type/reference/repository/data-type-reference.server.data.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/data-type/reference/repository/data-type-reference.server.data.ts @@ -28,7 +28,7 @@ export class UmbDataTypeReferenceServerDataSource extends UmbControllerBase impl ): Promise>> { const { data, error } = await tryExecute( this, - DataTypeService.getDataTypeByIdReferencedBy({ id: unique, skip, take }), + DataTypeService.getDataTypeByIdReferencedBy({ path: { id: unique }, query: { skip, take } }), ); if (data) { diff --git a/src/Umbraco.Web.UI.Client/src/packages/data-type/repository/detail/data-type-detail.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/data-type/repository/detail/data-type-detail.server.data-source.ts index d085fcfedd..9963b80846 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/data-type/repository/detail/data-type-detail.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/data-type/repository/detail/data-type-detail.server.data-source.ts @@ -57,7 +57,7 @@ export class UmbDataTypeServerDataSource implements UmbDetailDataSource) => DataTypeService.getItemDataType({ id: uniques }); +const getItems = (uniques: Array) => DataTypeService.getItemDataType({ query: { id: uniques } }); const mapper = (item: DataTypeItemResponseModel): UmbDataTypeItemModel => { return { diff --git a/src/Umbraco.Web.UI.Client/src/packages/data-type/search/data-type-search.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/data-type/search/data-type-search.server.data-source.ts index b2eace4630..69929e8f44 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/data-type/search/data-type-search.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/data-type/search/data-type-search.server.data-source.ts @@ -32,7 +32,7 @@ export class UmbDataTypeSearchServerDataSource implements UmbSearchDataSource { // eslint-disable-next-line local-rules/no-direct-api-import return DataTypeService.getTreeDataTypeRoot({ - foldersOnly: args.foldersOnly, - skip: args.skip, - take: args.take, + query: { foldersOnly: args.foldersOnly, skip: args.skip, take: args.take }, }); }; @@ -63,10 +61,7 @@ const getChildrenOf = (args: UmbTreeChildrenOfRequestArgs) => { } else { // eslint-disable-next-line local-rules/no-direct-api-import return DataTypeService.getTreeDataTypeChildren({ - parentId: args.parent.unique, - foldersOnly: args.foldersOnly, - skip: args.skip, - take: args.take, + query: { parentId: args.parent.unique, foldersOnly: args.foldersOnly, skip: args.skip, take: args.take }, }); } }; @@ -74,7 +69,7 @@ const getChildrenOf = (args: UmbTreeChildrenOfRequestArgs) => { const getAncestorsOf = (args: UmbTreeAncestorsOfRequestArgs) => // eslint-disable-next-line local-rules/no-direct-api-import DataTypeService.getTreeDataTypeAncestors({ - descendantId: args.treeItem.unique, + query: { descendantId: args.treeItem.unique }, }); const mapper = (item: DataTypeTreeItemResponseModel): UmbDataTypeTreeItemModel => { diff --git a/src/Umbraco.Web.UI.Client/src/packages/data-type/tree/folder/repository/data-type-folder.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/data-type/tree/folder/repository/data-type-folder.server.data-source.ts index cedc7bf430..b5507238f3 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/data-type/tree/folder/repository/data-type-folder.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/data-type/tree/folder/repository/data-type-folder.server.data-source.ts @@ -52,7 +52,7 @@ export class UmbDataTypeFolderServerDataSource implements UmbDetailDataSource { diff --git a/src/Umbraco.Web.UI.Client/src/packages/dictionary/entity-action/move-to/repository/dictionary-move.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/dictionary/entity-action/move-to/repository/dictionary-move.server.data-source.ts index 247a15f6c4..dbf649878a 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/dictionary/entity-action/move-to/repository/dictionary-move.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/dictionary/entity-action/move-to/repository/dictionary-move.server.data-source.ts @@ -34,8 +34,8 @@ export class UmbMoveDictionaryServerDataSource implements UmbMoveDataSource { return tryExecute( this.#host, DictionaryService.putDictionaryByIdMove({ - id: args.unique, - requestBody: { + path: { id: args.unique }, + body: { target: args.destination.unique ? { id: args.destination.unique } : null, }, }), diff --git a/src/Umbraco.Web.UI.Client/src/packages/dictionary/repository/detail/dictionary-detail.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/dictionary/repository/detail/dictionary-detail.server.data-source.ts index d7f66fd676..869dc7d3d0 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/dictionary/repository/detail/dictionary-detail.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/dictionary/repository/detail/dictionary-detail.server.data-source.ts @@ -52,7 +52,7 @@ export class UmbDictionaryServerDataSource implements UmbDetailDataSource) => DictionaryService.getItemDictionary({ id: uniques }); +const getItems = (uniques: Array) => DictionaryService.getItemDictionary({ query: { id: uniques } }); const mapper = (item: DictionaryItemItemResponseModel): UmbDictionaryItemModel => { return { diff --git a/src/Umbraco.Web.UI.Client/src/packages/dictionary/search/dictionary-search.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/dictionary/search/dictionary-search.server.data-source.ts index cca0ddd97f..58422e397b 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/dictionary/search/dictionary-search.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/dictionary/search/dictionary-search.server.data-source.ts @@ -32,7 +32,7 @@ export class UmbDictionarySearchServerDataSource implements UmbSearchDataSource< const { data, error } = await tryExecute( this.#host, DictionaryService.getDictionary({ - filter: args.query, + query: { filter: args.query }, }), ); diff --git a/src/Umbraco.Web.UI.Client/src/packages/dictionary/tree/dictionary-tree.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/dictionary/tree/dictionary-tree.server.data-source.ts index 39f92083ea..1cf80b8ee4 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/dictionary/tree/dictionary-tree.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/dictionary/tree/dictionary-tree.server.data-source.ts @@ -36,7 +36,7 @@ export class UmbDictionaryTreeServerDataSource extends UmbTreeServerDataSourceBa const getRootItems = (args: UmbTreeRootItemsRequestArgs) => // eslint-disable-next-line local-rules/no-direct-api-import - DictionaryService.getTreeDictionaryRoot({ skip: args.skip, take: args.take }); + DictionaryService.getTreeDictionaryRoot({ query: { skip: args.skip, take: args.take } }); const getChildrenOf = (args: UmbTreeChildrenOfRequestArgs) => { if (args.parent.unique === null) { @@ -44,9 +44,7 @@ const getChildrenOf = (args: UmbTreeChildrenOfRequestArgs) => { } else { // eslint-disable-next-line local-rules/no-direct-api-import return DictionaryService.getTreeDictionaryChildren({ - parentId: args.parent.unique, - skip: args.skip, - take: args.take, + query: { parentId: args.parent.unique, skip: args.skip, take: args.take }, }); } }; @@ -54,7 +52,7 @@ const getChildrenOf = (args: UmbTreeChildrenOfRequestArgs) => { const getAncestorsOf = (args: UmbTreeAncestorsOfRequestArgs) => // eslint-disable-next-line local-rules/no-direct-api-import DictionaryService.getTreeDictionaryAncestors({ - descendantId: args.treeItem.unique, + query: { descendantId: args.treeItem.unique }, }); const mapper = (item: NamedEntityTreeItemResponseModel): UmbDictionaryTreeItemModel => { diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/document-blueprints/entity-actions/move-to/repository/document-blueprint-move.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/document-blueprints/entity-actions/move-to/repository/document-blueprint-move.server.data-source.ts index 49770c6e88..6465783abd 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/documents/document-blueprints/entity-actions/move-to/repository/document-blueprint-move.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/document-blueprints/entity-actions/move-to/repository/document-blueprint-move.server.data-source.ts @@ -34,8 +34,8 @@ export class UmbMoveDocumentBlueprintServerDataSource implements UmbMoveDataSour return tryExecute( this.#host, DocumentBlueprintService.putDocumentBlueprintByIdMove({ - id: args.unique, - requestBody: { + path: { id: args.unique }, + body: { target: args.destination.unique ? { id: args.destination.unique } : null, }, }), diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/document-blueprints/repository/detail/document-blueprint-detail.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/document-blueprints/repository/detail/document-blueprint-detail.server.data-source.ts index 1b8ae81680..ac7d331dc2 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/documents/document-blueprints/repository/detail/document-blueprint-detail.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/document-blueprints/repository/detail/document-blueprint-detail.server.data-source.ts @@ -80,7 +80,7 @@ export class UmbDocumentBlueprintServerDataSource implements UmbDetailDataSource const { data, error } = await tryExecute( this.#host, - DocumentBlueprintService.getDocumentBlueprintById({ id: unique }), + DocumentBlueprintService.getDocumentBlueprintById({ path: { id: unique } }), ); if (error || !data) { @@ -133,7 +133,7 @@ export class UmbDocumentBlueprintServerDataSource implements UmbDetailDataSource if (!model.unique) throw new Error('Document unique is missing'); // TODO: make data mapper to prevent errors - const requestBody: CreateDocumentBlueprintRequestModel = { + const body: CreateDocumentBlueprintRequestModel = { id: model.unique, parent: parentUnique ? { id: parentUnique } : null, documentType: { id: model.documentType.unique }, @@ -144,11 +144,11 @@ export class UmbDocumentBlueprintServerDataSource implements UmbDetailDataSource const { data, error } = await tryExecute( this.#host, DocumentBlueprintService.postDocumentBlueprint({ - requestBody, + body, }), ); - if (data) { + if (data && typeof data === 'string') { return this.read(data); } @@ -166,7 +166,7 @@ export class UmbDocumentBlueprintServerDataSource implements UmbDetailDataSource if (!model.unique) throw new Error('Unique is missing'); // TODO: make data mapper to prevent errors - const requestBody: UpdateDocumentBlueprintRequestModel = { + const body: UpdateDocumentBlueprintRequestModel = { values: model.values, variants: model.variants, }; @@ -174,8 +174,8 @@ export class UmbDocumentBlueprintServerDataSource implements UmbDetailDataSource const { error } = await tryExecute( this.#host, DocumentBlueprintService.putDocumentBlueprintById({ - id: model.unique, - requestBody, + path: { id: model.unique }, + body, }), ); @@ -195,7 +195,6 @@ export class UmbDocumentBlueprintServerDataSource implements UmbDetailDataSource async delete(unique: string) { if (!unique) throw new Error('Unique is missing'); - // TODO: update to delete when implemented - return tryExecute(this.#host, DocumentBlueprintService.deleteDocumentBlueprintById({ id: unique })); + return tryExecute(this.#host, DocumentBlueprintService.deleteDocumentBlueprintById({ path: { id: unique } })); } } diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/document-blueprints/repository/item/document-blueprint-item.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/document-blueprints/repository/item/document-blueprint-item.server.data-source.ts index 753a6183f8..104ecfbee1 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/documents/document-blueprints/repository/item/document-blueprint-item.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/document-blueprints/repository/item/document-blueprint-item.server.data-source.ts @@ -33,7 +33,7 @@ export class UmbDocumentBlueprintItemServerDataSource extends UmbItemServerDataS if (!unique) throw new Error('Unique is missing'); const { data, error } = await tryExecute( this.#host, - DocumentTypeService.getDocumentTypeByIdBlueprint({ id: unique }), + DocumentTypeService.getDocumentTypeByIdBlueprint({ path: { id: unique } }), ); if (data) { @@ -50,7 +50,8 @@ export class UmbDocumentBlueprintItemServerDataSource extends UmbItemServerDataS } /* eslint-disable local-rules/no-direct-api-import */ -const getItems = (uniques: Array) => DocumentBlueprintService.getItemDocumentBlueprint({ id: uniques }); +const getItems = (uniques: Array) => + DocumentBlueprintService.getItemDocumentBlueprint({ query: { id: uniques } }); const mapper = (item: DocumentBlueprintItemResponseModel): UmbDocumentBlueprintItemModel => { return { diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/document-blueprints/tree/document-blueprint-tree.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/document-blueprints/tree/document-blueprint-tree.server.data-source.ts index 4f681c4a81..e3aefa1263 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/documents/document-blueprints/tree/document-blueprint-tree.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/document-blueprints/tree/document-blueprint-tree.server.data-source.ts @@ -37,9 +37,7 @@ export class UmbDocumentBlueprintTreeServerDataSource extends UmbTreeServerDataS const getRootItems = (args: UmbTreeRootItemsRequestArgs) => // eslint-disable-next-line local-rules/no-direct-api-import DocumentBlueprintService.getTreeDocumentBlueprintRoot({ - foldersOnly: args.foldersOnly, - skip: args.skip, - take: args.take, + query: { foldersOnly: args.foldersOnly, skip: args.skip, take: args.take }, }); const getChildrenOf = (args: UmbTreeChildrenOfRequestArgs) => { @@ -48,8 +46,7 @@ const getChildrenOf = (args: UmbTreeChildrenOfRequestArgs) => { } else { // eslint-disable-next-line local-rules/no-direct-api-import return DocumentBlueprintService.getTreeDocumentBlueprintChildren({ - parentId: args.parent.unique, - foldersOnly: args.foldersOnly, + query: { parentId: args.parent.unique, foldersOnly: args.foldersOnly }, }); } }; diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/document-blueprints/tree/folder/repository/document-blueprint-folder.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/document-blueprints/tree/folder/repository/document-blueprint-folder.server.data-source.ts index 465862f2d3..e8b9a186c0 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/documents/document-blueprints/tree/folder/repository/document-blueprint-folder.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/document-blueprints/tree/folder/repository/document-blueprint-folder.server.data-source.ts @@ -52,7 +52,7 @@ export class UmbDocumentBlueprintFolderServerDataSource implements UmbDetailData const { data, error } = await tryExecute( this.#host, DocumentBlueprintService.getDocumentBlueprintFolderById({ - id: unique, + path: { id: unique }, }), ); @@ -80,7 +80,7 @@ export class UmbDocumentBlueprintFolderServerDataSource implements UmbDetailData if (!model.unique) throw new Error('Unique is missing'); if (!model.name) throw new Error('Name is missing'); - const requestBody = { + const body = { id: model.unique, parent: parentUnique ? { id: parentUnique } : null, name: model.name, @@ -89,7 +89,7 @@ export class UmbDocumentBlueprintFolderServerDataSource implements UmbDetailData const { error } = await tryExecute( this.#host, DocumentBlueprintService.postDocumentBlueprintFolder({ - requestBody, + body, }), ); @@ -114,8 +114,8 @@ export class UmbDocumentBlueprintFolderServerDataSource implements UmbDetailData const { error } = await tryExecute( this.#host, DocumentBlueprintService.putDocumentBlueprintFolderById({ - id: model.unique, - requestBody: { name: model.name }, + path: { id: model.unique }, + body: { name: model.name }, }), ); @@ -137,7 +137,7 @@ export class UmbDocumentBlueprintFolderServerDataSource implements UmbDetailData return tryExecute( this.#host, DocumentBlueprintService.deleteDocumentBlueprintFolderById({ - id: unique, + path: { id: unique }, }), ); } diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/document-redirect-management/dashboard-redirect-management.element.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/document-redirect-management/dashboard-redirect-management.element.ts index 5deac1c4b5..6a7840ba0b 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/documents/document-redirect-management/dashboard-redirect-management.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/document-redirect-management/dashboard-redirect-management.element.ts @@ -52,7 +52,7 @@ export class UmbDashboardRedirectManagementElement extends UmbLitElement { const skip = this.page * this.itemsPerPage - this.itemsPerPage; const { data } = await tryExecute( this, - RedirectManagementService.getRedirectManagement({ filter, take: this.itemsPerPage, skip }), + RedirectManagementService.getRedirectManagement({ query: { filter, take: this.itemsPerPage, skip } }), ); if (!data) return; @@ -89,7 +89,7 @@ export class UmbDashboardRedirectManagementElement extends UmbLitElement { this.#redirectDelete(data.id!); } async #redirectDelete(id: string) { - const { error } = await tryExecute(this, RedirectManagementService.deleteRedirectManagementById({ id })); + const { error } = await tryExecute(this, RedirectManagementService.deleteRedirectManagementById({ path: { id } })); if (error) return; this._redirectData = this._redirectData?.filter((x) => x.id !== id); @@ -127,7 +127,10 @@ export class UmbDashboardRedirectManagementElement extends UmbLitElement { async #trackerToggle() { const status = this._trackerEnabled ? RedirectStatusModel.DISABLED : RedirectStatusModel.ENABLED; - const { error } = await tryExecute(this, RedirectManagementService.postRedirectManagementStatus({ status })); + const { error } = await tryExecute( + this, + RedirectManagementService.postRedirectManagementStatus({ query: { status } }), + ); if (error) return; this._trackerEnabled = !this._trackerEnabled; } diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/document-types/entity-actions/duplicate/repository/document-type-duplicate.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/document-types/entity-actions/duplicate/repository/document-type-duplicate.server.data-source.ts index afc6c0a705..e1e02a6fb5 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/documents/document-types/entity-actions/duplicate/repository/document-type-duplicate.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/document-types/entity-actions/duplicate/repository/document-type-duplicate.server.data-source.ts @@ -32,8 +32,8 @@ export class UmbDuplicateDocumentTypeServerDataSource implements UmbDuplicateToD return tryExecute( this.#host, DocumentTypeService.postDocumentTypeByIdCopy({ - id: args.unique, - requestBody: { + path: { id: args.unique }, + body: { target: args.destination.unique ? { id: args.destination.unique } : null, }, }), diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/document-types/entity-actions/export/repository/document-type-export.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/document-types/entity-actions/export/repository/document-type-export.server.data-source.ts index abe26a3cc6..f81d563d6e 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/documents/document-types/entity-actions/export/repository/document-type-export.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/document-types/entity-actions/export/repository/document-type-export.server.data-source.ts @@ -27,6 +27,6 @@ export class UmbExportDocumentTypeServerDataSource { async export(unique: string) { if (!unique) throw new Error('Unique is missing'); - return tryExecute(this.#host, DocumentTypeService.getDocumentTypeByIdExport({ id: unique })); + return tryExecute(this.#host, DocumentTypeService.getDocumentTypeByIdExport({ path: { id: unique } })); } } diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/document-types/entity-actions/import/repository/document-type-import.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/document-types/entity-actions/import/repository/document-type-import.server.data-source.ts index 5a2f602f18..ad0a603a1d 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/documents/document-types/entity-actions/import/repository/document-type-import.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/document-types/entity-actions/import/repository/document-type-import.server.data-source.ts @@ -1,4 +1,4 @@ -import { DocumentTypeService, type PostDocumentTypeImportData } from '@umbraco-cms/backoffice/external/backend-api'; +import { DocumentTypeService, type ImportDocumentTypeRequestModel } from '@umbraco-cms/backoffice/external/backend-api'; import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api'; import { tryExecute } from '@umbraco-cms/backoffice/resources'; @@ -28,10 +28,10 @@ export class UmbDocumentTypeImportServerDataSource { async import(temporaryUnique: string) { if (!temporaryUnique) throw new Error('Unique is missing'); - const requestBody: PostDocumentTypeImportData = { - requestBody: { file: { id: temporaryUnique } }, + const body: ImportDocumentTypeRequestModel = { + file: { id: temporaryUnique }, }; - return tryExecute(this.#host, DocumentTypeService.postDocumentTypeImport(requestBody)); + return tryExecute(this.#host, DocumentTypeService.postDocumentTypeImport({ body })); } } diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/document-types/entity-actions/move-to/repository/document-type-move.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/document-types/entity-actions/move-to/repository/document-type-move.server.data-source.ts index ba8ba22bbb..2f436844fe 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/documents/document-types/entity-actions/move-to/repository/document-type-move.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/document-types/entity-actions/move-to/repository/document-type-move.server.data-source.ts @@ -34,8 +34,8 @@ export class UmbMoveDocumentTypeServerDataSource implements UmbMoveDataSource { return tryExecute( this.#host, DocumentTypeService.putDocumentTypeByIdMove({ - id: args.unique, - requestBody: { + path: { id: args.unique }, + body: { target: args.destination.unique ? { id: args.destination.unique } : null, }, }), diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/document-types/repository/composition/document-type-composition.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/document-types/repository/composition/document-type-composition.server.data-source.ts index 6a257dc16b..151a5e1f40 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/documents/document-types/repository/composition/document-type-composition.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/document-types/repository/composition/document-type-composition.server.data-source.ts @@ -42,7 +42,7 @@ export class UmbDocumentTypeCompositionServerDataSource async getReferences(unique: string) { const response = await tryExecute( this.#host, - DocumentTypeService.getDocumentTypeByIdCompositionReferences({ id: unique }), + DocumentTypeService.getDocumentTypeByIdCompositionReferences({ path: { id: unique } }), ); const error = response.error; const data: Array | undefined = response.data?.map((reference) => { @@ -57,23 +57,20 @@ export class UmbDocumentTypeCompositionServerDataSource } /** * Updates the compositions for a document type on the server - * @param {DocumentTypeCompositionRequestModel} requestBody + * @param {DocumentTypeCompositionRequestModel} body * @param args * @returns {*} * @memberof UmbDocumentTypeCompositionServerDataSource */ async availableCompositions(args: UmbDocumentTypeAvailableCompositionRequestModel) { - const requestBody: DocumentTypeCompositionRequestModel = { + const body: DocumentTypeCompositionRequestModel = { id: args.unique, isElement: args.isElement, currentCompositeIds: args.currentCompositeUniques, currentPropertyAliases: args.currentPropertyAliases, }; - const response = await tryExecute( - this.#host, - DocumentTypeService.postDocumentTypeAvailableCompositions({ requestBody }), - ); + const response = await tryExecute(this.#host, DocumentTypeService.postDocumentTypeAvailableCompositions({ body })); const error = response.error; const data: Array | undefined = response.data?.map((composition) => { return { diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/document-types/repository/detail/document-type-detail.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/document-types/repository/detail/document-type-detail.server.data-source.ts index b433a295df..b937292ce5 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/documents/document-types/repository/detail/document-type-detail.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/document-types/repository/detail/document-type-detail.server.data-source.ts @@ -74,7 +74,10 @@ export class UmbDocumentTypeDetailServerDataSource implements UmbDetailDataSourc async read(unique: string) { if (!unique) throw new Error('Unique is missing'); - const { data, error } = await tryExecute(this.#host, DocumentTypeService.getDocumentTypeById({ id: unique })); + const { data, error } = await tryExecute( + this.#host, + DocumentTypeService.getDocumentTypeById({ path: { id: unique } }), + ); if (error || !data) { return { error }; @@ -142,7 +145,7 @@ export class UmbDocumentTypeDetailServerDataSource implements UmbDetailDataSourc if (!model.unique) throw new Error('Media Type unique is missing'); // TODO: make data mapper to prevent errors - const requestBody: CreateDocumentTypeRequestModel = { + const body: CreateDocumentTypeRequestModel = { parent: parentUnique ? { id: parentUnique } : null, alias: model.alias, name: model.name, @@ -190,12 +193,12 @@ export class UmbDocumentTypeDetailServerDataSource implements UmbDetailDataSourc const { data, error } = await tryExecute( this.#host, DocumentTypeService.postDocumentType({ - requestBody, + body: body, }), ); if (data) { - return this.read(data); + return this.read(data as any); } return { error }; @@ -212,7 +215,7 @@ export class UmbDocumentTypeDetailServerDataSource implements UmbDetailDataSourc if (!model.unique) throw new Error('Unique is missing'); // TODO: make data mapper to prevent errors - const requestBody: UpdateDocumentTypeRequestModel = { + const body: UpdateDocumentTypeRequestModel = { alias: model.alias, name: model.name, description: model.description, @@ -266,8 +269,8 @@ export class UmbDocumentTypeDetailServerDataSource implements UmbDetailDataSourc const { error } = await tryExecute( this.#host, DocumentTypeService.putDocumentTypeById({ - id: model.unique, - requestBody, + path: { id: model.unique }, + body: body, }), ); @@ -290,7 +293,7 @@ export class UmbDocumentTypeDetailServerDataSource implements UmbDetailDataSourc return tryExecute( this.#host, DocumentTypeService.deleteDocumentTypeById({ - id: unique, + path: { id: unique }, }), ); } diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/document-types/repository/item/document-type-item.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/document-types/repository/item/document-type-item.server.data-source.ts index 32d3499bdb..1fed1d9574 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/documents/document-types/repository/item/document-type-item.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/document-types/repository/item/document-type-item.server.data-source.ts @@ -25,7 +25,7 @@ export class UmbDocumentTypeItemServerDataSource extends UmbItemServerDataSource } /* eslint-disable local-rules/no-direct-api-import */ -const getItems = (uniques: Array) => DocumentTypeService.getItemDocumentType({ id: uniques }); +const getItems = (uniques: Array) => DocumentTypeService.getItemDocumentType({ query: { id: uniques } }); const mapper = (item: DocumentTypeItemResponseModel): UmbDocumentTypeItemModel => { return { diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/document-types/repository/structure/document-type-structure.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/document-types/repository/structure/document-type-structure.server.data-source.ts index c00b8faf0b..d274bf3a9f 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/documents/document-types/repository/structure/document-type-structure.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/document-types/repository/structure/document-type-structure.server.data-source.ts @@ -7,7 +7,7 @@ import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api'; /** * - + * @class UmbDocumentTypeStructureServerDataSource * @augments {UmbContentTypeStructureServerDataSourceBase} */ @@ -24,8 +24,8 @@ const getAllowedChildrenOf = (unique: string | null, parentContentUnique: string if (unique) { // eslint-disable-next-line local-rules/no-direct-api-import return DocumentTypeService.getDocumentTypeByIdAllowedChildren({ - id: unique, - parentContentKey: parentContentUnique ?? undefined, + path: { id: unique }, + query: { parentContentKey: parentContentUnique ?? undefined }, }); } else { // eslint-disable-next-line local-rules/no-direct-api-import diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/document-types/search/document-type-search.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/document-types/search/document-type-search.server.data-source.ts index 784945fb45..c36757d8dd 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/documents/document-types/search/document-type-search.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/document-types/search/document-type-search.server.data-source.ts @@ -32,7 +32,7 @@ export class UmbDocumentTypeSearchServerDataSource implements UmbSearchDataSourc const { data, error } = await tryExecute( this.#host, DocumentTypeService.getItemDocumentTypeSearch({ - query: args.query, + query: { query: args.query }, }), ); diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/document-types/tree/document-type.tree.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/document-types/tree/document-type.tree.server.data-source.ts index 7f8dbfa1b7..119925861f 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/documents/document-types/tree/document-type.tree.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/document-types/tree/document-type.tree.server.data-source.ts @@ -38,9 +38,7 @@ export class UmbDocumentTypeTreeServerDataSource extends UmbTreeServerDataSource const getRootItems = (args: UmbTreeRootItemsRequestArgs) => // eslint-disable-next-line local-rules/no-direct-api-import DocumentTypeService.getTreeDocumentTypeRoot({ - foldersOnly: args.foldersOnly, - skip: args.skip, - take: args.take, + query: { foldersOnly: args.foldersOnly, skip: args.skip, take: args.take }, }); const getChildrenOf = (args: UmbTreeChildrenOfRequestArgs) => { @@ -53,10 +51,7 @@ const getChildrenOf = (args: UmbTreeChildrenOfRequestArgs) => { } else { // eslint-disable-next-line local-rules/no-direct-api-import return DocumentTypeService.getTreeDocumentTypeChildren({ - parentId: args.parent.unique, - foldersOnly: args.foldersOnly, - skip: args.skip, - take: args.take, + query: { parentId: args.parent.unique, foldersOnly: args.foldersOnly, skip: args.skip, take: args.take }, }); } }; @@ -64,7 +59,7 @@ const getChildrenOf = (args: UmbTreeChildrenOfRequestArgs) => { const getAncestorsOf = (args: UmbTreeAncestorsOfRequestArgs) => // eslint-disable-next-line local-rules/no-direct-api-import DocumentTypeService.getTreeDocumentTypeAncestors({ - descendantId: args.treeItem.unique, + query: { descendantId: args.treeItem.unique }, }); const mapper = (item: DocumentTypeTreeItemResponseModel): UmbDocumentTypeTreeItemModel => { diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/document-types/tree/folder/repository/document-type-folder.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/document-types/tree/folder/repository/document-type-folder.server.data-source.ts index ae37bfdf95..cc4b40ac23 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/documents/document-types/tree/folder/repository/document-type-folder.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/document-types/tree/folder/repository/document-type-folder.server.data-source.ts @@ -52,7 +52,7 @@ export class UmbDocumentTypeFolderServerDataSource implements UmbDetailDataSourc const { data, error } = await tryExecute( this.#host, DocumentTypeService.getDocumentTypeFolderById({ - id: unique, + path: { id: unique }, }), ); @@ -80,7 +80,7 @@ export class UmbDocumentTypeFolderServerDataSource implements UmbDetailDataSourc if (!model.unique) throw new Error('Unique is missing'); if (!model.name) throw new Error('Name is missing'); - const requestBody = { + const body = { id: model.unique, parent: parentUnique ? { id: parentUnique } : null, name: model.name, @@ -89,7 +89,7 @@ export class UmbDocumentTypeFolderServerDataSource implements UmbDetailDataSourc const { error } = await tryExecute( this.#host, DocumentTypeService.postDocumentTypeFolder({ - requestBody, + body, }), ); @@ -113,8 +113,8 @@ export class UmbDocumentTypeFolderServerDataSource implements UmbDetailDataSourc const { error } = await tryExecute( this.#host, DocumentTypeService.putDocumentTypeFolderById({ - id: model.unique, - requestBody: { name: model.name }, + path: { id: model.unique }, + body: { name: model.name }, }), ); @@ -136,7 +136,7 @@ export class UmbDocumentTypeFolderServerDataSource implements UmbDetailDataSourc return tryExecute( this.#host, DocumentTypeService.deleteDocumentTypeFolderById({ - id: unique, + path: { id: unique }, }), ); } diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/audit-log/repository/document-audit-log.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/audit-log/repository/document-audit-log.server.data-source.ts index 6553e8ebd4..92b76ba37a 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/audit-log/repository/document-audit-log.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/audit-log/repository/document-audit-log.server.data-source.ts @@ -32,11 +32,13 @@ export class UmbDocumentAuditLogServerDataSource implements UmbAuditLogDataSourc const { data, error } = await tryExecute( this.#host, DocumentService.getDocumentByIdAuditLog({ - id: args.unique, - orderDirection: args.orderDirection as DirectionModel, // TODO: Fix type cast - sinceDate: args.sinceDate, - skip: args.skip, - take: args.take, + path: { id: args.unique }, + query: { + orderDirection: args.orderDirection as DirectionModel, // TODO: Fix type cast + sinceDate: args.sinceDate, + skip: args.skip, + take: args.take, + }, }), ); diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/collection/repository/document-collection.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/collection/repository/document-collection.server.data-source.ts index ecca618550..83d7ab091c 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/collection/repository/document-collection.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/collection/repository/document-collection.server.data-source.ts @@ -13,23 +13,25 @@ export class UmbDocumentCollectionServerDataSource implements UmbCollectionDataS this.#host = host; } - async getCollection(query: UmbDocumentCollectionFilterModel) { - if (!query.unique) { + async getCollection(filter: UmbDocumentCollectionFilterModel) { + if (!filter.unique) { throw new Error('Unique ID is required to fetch a collection.'); } - const params = { - id: query.unique, - dataTypeId: query.dataTypeId ?? '', - orderBy: query.orderBy ?? 'updateDate', - orderCulture: query.orderCulture ?? 'en-US', - orderDirection: query.orderDirection === 'asc' ? DirectionModel.ASCENDING : DirectionModel.DESCENDING, - filter: query.filter, - skip: query.skip || 0, - take: query.take || 100, + const query = { + dataTypeId: filter.dataTypeId ?? '', + orderBy: filter.orderBy ?? 'updateDate', + orderCulture: filter.orderCulture ?? 'en-US', + orderDirection: filter.orderDirection === 'asc' ? DirectionModel.ASCENDING : DirectionModel.DESCENDING, + filter: filter.filter, + skip: filter.skip || 0, + take: filter.take || 100, }; - const { data, error } = await tryExecute(this.#host, DocumentService.getCollectionDocumentById(params)); + const { data, error } = await tryExecute( + this.#host, + DocumentService.getCollectionDocumentById({ path: { id: filter.unique }, query }), + ); if (data) { const items = data.items.map((item: DocumentCollectionResponseModel) => { diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/entity-actions/create-blueprint/repository/document-create-blueprint.repository.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/entity-actions/create-blueprint/repository/document-create-blueprint.repository.ts index b9bc6c569c..72e11f6076 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/entity-actions/create-blueprint/repository/document-create-blueprint.repository.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/entity-actions/create-blueprint/repository/document-create-blueprint.repository.ts @@ -18,8 +18,8 @@ export class UmbDocumentCreateBlueprintRepository extends UmbControllerBase impl }); } - async create(requestBody: CreateDocumentBlueprintFromDocumentRequestModel) { - const { data, error } = await this.#dataSource.create(requestBody); + async create(body: CreateDocumentBlueprintFromDocumentRequestModel) { + const { data, error } = await this.#dataSource.create(body); if (!error) { const notification = { data: { message: `Document Blueprint created` } }; this.#notificationContext!.peek('positive', notification); diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/entity-actions/create-blueprint/repository/document-create-blueprint.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/entity-actions/create-blueprint/repository/document-create-blueprint.server.data-source.ts index 3485ccfe05..aea3414c1a 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/entity-actions/create-blueprint/repository/document-create-blueprint.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/entity-actions/create-blueprint/repository/document-create-blueprint.server.data-source.ts @@ -23,10 +23,10 @@ export class UmbDocumentCreateBlueprintServerDataSource { /** * Fetches the Culture and Hostnames for the given Document unique * @param {string} unique - * @param requestBody + * @param body * @memberof UmbDocumentCreateBlueprintServerDataSource */ - async create(requestBody: CreateDocumentBlueprintFromDocumentRequestModel) { - return tryExecute(this.#host, DocumentBlueprintService.postDocumentBlueprintFromDocument({ requestBody })); + async create(body: CreateDocumentBlueprintFromDocumentRequestModel) { + return tryExecute(this.#host, DocumentBlueprintService.postDocumentBlueprintFromDocument({ body })); } } diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/entity-actions/culture-and-hostnames/repository/culture-and-hostnames.server.data.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/entity-actions/culture-and-hostnames/repository/culture-and-hostnames.server.data.ts index bcc8d00871..18ffbf9c78 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/entity-actions/culture-and-hostnames/repository/culture-and-hostnames.server.data.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/entity-actions/culture-and-hostnames/repository/culture-and-hostnames.server.data.ts @@ -27,7 +27,7 @@ export class UmbDocumentCultureAndHostnamesServerDataSource { */ async read(unique: string) { if (!unique) throw new Error('Unique is missing'); - return tryExecute(this.#host, DocumentService.getDocumentByIdDomains({ id: unique })); + return tryExecute(this.#host, DocumentService.getDocumentByIdDomains({ path: { id: unique } })); } /** @@ -38,6 +38,6 @@ export class UmbDocumentCultureAndHostnamesServerDataSource { */ async update(unique: string, data: UpdateDomainsRequestModel) { if (!unique) throw new Error('Unique is missing'); - return tryExecute(this.#host, DocumentService.putDocumentByIdDomains({ id: unique, requestBody: data })); + return tryExecute(this.#host, DocumentService.putDocumentByIdDomains({ path: { id: unique }, body: data })); } } diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/entity-actions/duplicate/repository/document-duplicate.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/entity-actions/duplicate/repository/document-duplicate.server.data-source.ts index 68e2002f6e..3bf2bee93c 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/entity-actions/duplicate/repository/document-duplicate.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/entity-actions/duplicate/repository/document-duplicate.server.data-source.ts @@ -32,8 +32,8 @@ export class UmbDuplicateDocumentServerDataSource { return tryExecute( this.#host, DocumentService.postDocumentByIdCopy({ - id: args.unique, - requestBody: { + path: { id: args.unique }, + body: { target: args.destination.unique ? { id: args.destination.unique } : null, relateToOriginal: args.relateToOriginal, includeDescendants: args.includeDescendants, diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/entity-actions/move-to/repository/document-move.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/entity-actions/move-to/repository/document-move.server.data-source.ts index eb62d9e7b3..854e245ec7 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/entity-actions/move-to/repository/document-move.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/entity-actions/move-to/repository/document-move.server.data-source.ts @@ -34,8 +34,8 @@ export class UmbMoveDocumentServerDataSource implements UmbMoveDataSource { return tryExecute( this.#host, DocumentService.putDocumentByIdMove({ - id: args.unique, - requestBody: { + path: { id: args.unique }, + body: { target: args.destination.unique ? { id: args.destination.unique } : null, }, }), diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/entity-actions/notifications/repository/document-notifications.server.data.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/entity-actions/notifications/repository/document-notifications.server.data.ts index 21e76efb3e..d5c054e08d 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/entity-actions/notifications/repository/document-notifications.server.data.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/entity-actions/notifications/repository/document-notifications.server.data.ts @@ -26,7 +26,7 @@ export class UmbDocumentNotificationsServerDataSource { */ async read(unique: string) { if (!unique) throw new Error('Unique is missing'); - return tryExecute(this.#host, DocumentService.getDocumentByIdNotifications({ id: unique })); + return tryExecute(this.#host, DocumentService.getDocumentByIdNotifications({ path: { id: unique } })); } /** @@ -37,6 +37,6 @@ export class UmbDocumentNotificationsServerDataSource { */ async update(unique: string, data: UpdateDocumentNotificationsRequestModel) { if (!unique) throw new Error('Unique is missing'); - return tryExecute(this.#host, DocumentService.putDocumentByIdNotifications({ id: unique, requestBody: data })); + return tryExecute(this.#host, DocumentService.putDocumentByIdNotifications({ path: { id: unique }, body: data })); } } diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/entity-actions/sort-children-of/repository/sort-children-of.server.data.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/entity-actions/sort-children-of/repository/sort-children-of.server.data.ts index 2d93f98982..95e26ea595 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/entity-actions/sort-children-of/repository/sort-children-of.server.data.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/entity-actions/sort-children-of/repository/sort-children-of.server.data.ts @@ -33,7 +33,7 @@ export class UmbSortChildrenOfDocumentServerDataSource implements UmbSortChildre return tryExecute( this.#host, DocumentService.putDocumentSort({ - requestBody: { + body: { parent: args.unique ? { id: args.unique } : null, sorting: sortingMapping, }, diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/item/repository/document-item.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/item/repository/document-item.server.data-source.ts index 14e808545f..a9e2dfe005 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/item/repository/document-item.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/item/repository/document-item.server.data-source.ts @@ -28,7 +28,7 @@ export class UmbDocumentItemServerDataSource extends UmbItemServerDataSourceBase } /* eslint-disable local-rules/no-direct-api-import */ -const getItems = (uniques: Array) => DocumentService.getItemDocument({ id: uniques }); +const getItems = (uniques: Array) => DocumentService.getItemDocument({ query: { id: uniques } }); const mapper = (item: DocumentItemResponseModel): UmbDocumentItemModel => { return { diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/publishing/repository/document-publishing.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/publishing/repository/document-publishing.server.data-source.ts index 006af2c77d..7d3d76d3ce 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/publishing/repository/document-publishing.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/publishing/repository/document-publishing.server.data-source.ts @@ -50,11 +50,11 @@ export class UmbDocumentPublishingServerDataSource { ); // TODO: THIS DOES NOT TAKE SEGMENTS INTO ACCOUNT!!!!!! - const requestBody: PublishDocumentRequestModel = { + const body: PublishDocumentRequestModel = { publishSchedules, }; - return tryExecute(this.#host, DocumentService.putDocumentByIdPublish({ id: unique, requestBody })); + return tryExecute(this.#host, DocumentService.putDocumentByIdPublish({ path: { id: unique }, body: body })); } /** @@ -73,18 +73,18 @@ export class UmbDocumentPublishingServerDataSource { const hasInvariant = variantIds.some((variant) => variant.isCultureInvariant()); if (hasInvariant) { - const requestBody: UnpublishDocumentRequestModel = { + const body: UnpublishDocumentRequestModel = { cultures: null, }; - return tryExecute(this.#host, DocumentService.putDocumentByIdUnpublish({ id: unique, requestBody })); + return tryExecute(this.#host, DocumentService.putDocumentByIdUnpublish({ path: { id: unique }, body: body })); } - const requestBody: UnpublishDocumentRequestModel = { + const body: UnpublishDocumentRequestModel = { cultures: variantIds.map((variant) => variant.toCultureString()), }; - return tryExecute(this.#host, DocumentService.putDocumentByIdUnpublish({ id: unique, requestBody })); + return tryExecute(this.#host, DocumentService.putDocumentByIdUnpublish({ path: { id: unique }, body: body })); } /** @@ -101,7 +101,7 @@ export class UmbDocumentPublishingServerDataSource { ) { if (!unique) throw new Error('Id is missing'); - const requestBody: PublishDocumentWithDescendantsRequestModel = { + const body: PublishDocumentWithDescendantsRequestModel = { cultures: variantIds.map((variant) => variant.toCultureString()), includeUnpublishedDescendants, }; @@ -109,7 +109,7 @@ export class UmbDocumentPublishingServerDataSource { // Initiate the publish descendants task and get back a task Id. const { data, error } = await tryExecute( this.#host, - DocumentService.putDocumentByIdPublishWithDescendants({ id: unique, requestBody }), + DocumentService.putDocumentByIdPublishWithDescendants({ path: { id: unique }, body: body }), ); if (error || !data) { @@ -125,7 +125,8 @@ export class UmbDocumentPublishingServerDataSource { isFirstPoll = false; const { data, error } = await tryExecute( this.#host, - DocumentService.getDocumentByIdPublishWithDescendantsResultByTaskId({ id: unique, taskId })); + DocumentService.getDocumentByIdPublishWithDescendantsResultByTaskId({ path: { id: unique, taskId } }), + ); if (error || !data) { return { error }; } @@ -133,7 +134,6 @@ export class UmbDocumentPublishingServerDataSource { if (data.isComplete) { return { error: null }; } - } } @@ -148,7 +148,7 @@ export class UmbDocumentPublishingServerDataSource { const { data, error } = await tryExecute( this.#host, - DocumentService.getDocumentByIdPublished({ id: unique }), + DocumentService.getDocumentByIdPublished({ path: { id: unique } }), ); if (error || !data) { diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/recycle-bin/repository/document-recycle-bin.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/recycle-bin/repository/document-recycle-bin.server.data-source.ts index c451890805..df8475c545 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/recycle-bin/repository/document-recycle-bin.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/recycle-bin/repository/document-recycle-bin.server.data-source.ts @@ -16,15 +16,15 @@ export class UmbDocumentRecycleBinServerDataSource implements UmbRecycleBinDataS } trash(args: UmbRecycleBinTrashRequestArgs) { - return tryExecute(this.#host, DocumentService.putDocumentByIdMoveToRecycleBin({ id: args.unique })); + return tryExecute(this.#host, DocumentService.putDocumentByIdMoveToRecycleBin({ path: { id: args.unique } })); } restore(args: UmbRecycleBinRestoreRequestArgs) { return tryExecute( this.#host, DocumentService.putRecycleBinDocumentByIdRestore({ - id: args.unique, - requestBody: { + path: { id: args.unique }, + body: { target: args.destination.unique ? { id: args.destination.unique } : null, }, }), @@ -38,7 +38,7 @@ export class UmbDocumentRecycleBinServerDataSource implements UmbRecycleBinDataS async getOriginalParent(args: UmbRecycleBinOriginalParentRequestArgs) { const { data, error } = await tryExecute( this.#host, - DocumentService.getRecycleBinDocumentByIdOriginalParent({ id: args.unique }), + DocumentService.getRecycleBinDocumentByIdOriginalParent({ path: { id: args.unique } }), ); // only check for undefined because data can be null if the parent is the root diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/recycle-bin/tree/data/document-recycle-bin-tree.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/recycle-bin/tree/data/document-recycle-bin-tree.server.data-source.ts index daed1c921c..91567e8909 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/recycle-bin/tree/data/document-recycle-bin-tree.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/recycle-bin/tree/data/document-recycle-bin-tree.server.data-source.ts @@ -37,7 +37,7 @@ export class UmbDocumentRecycleBinTreeServerDataSource extends UmbTreeServerData const getRootItems = (args: UmbTreeRootItemsRequestArgs) => // eslint-disable-next-line local-rules/no-direct-api-import - DocumentService.getRecycleBinDocumentRoot({ skip: args.skip, take: args.take }); + DocumentService.getRecycleBinDocumentRoot({ query: { skip: args.skip, take: args.take } }); const getChildrenOf = (args: UmbTreeChildrenOfRequestArgs) => { if (args.parent.unique === null) { @@ -45,9 +45,7 @@ const getChildrenOf = (args: UmbTreeChildrenOfRequestArgs) => { } else { // eslint-disable-next-line local-rules/no-direct-api-import return DocumentService.getRecycleBinDocumentChildren({ - parentId: args.parent.unique, - skip: args.skip, - take: args.take, + query: { parentId: args.parent.unique, skip: args.skip, take: args.take }, }); } }; @@ -55,7 +53,7 @@ const getChildrenOf = (args: UmbTreeChildrenOfRequestArgs) => { const getAncestorsOf = (args: UmbTreeAncestorsOfRequestArgs) => // eslint-disable-next-line local-rules/no-direct-api-import DocumentService.getTreeDocumentAncestors({ - descendantId: args.treeItem.unique, + query: { descendantId: args.treeItem.unique }, }); const mapper = (item: DocumentRecycleBinItemResponseModel): UmbDocumentRecycleBinTreeItemModel => { diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/reference/repository/document-reference.server.data.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/reference/repository/document-reference.server.data.ts index 94b37df7c6..fa00a70aa5 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/reference/repository/document-reference.server.data.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/reference/repository/document-reference.server.data.ts @@ -29,7 +29,7 @@ export class UmbDocumentReferenceServerDataSource extends UmbControllerBase impl ): Promise>> { const { data, error } = await tryExecute( this, - DocumentService.getDocumentByIdReferencedBy({ id: unique, skip, take }), + DocumentService.getDocumentByIdReferencedBy({ path: { id: unique }, query: { skip, take } }), ); if (data) { @@ -70,7 +70,7 @@ export class UmbDocumentReferenceServerDataSource extends UmbControllerBase impl ): Promise>> { const { data, error } = await tryExecute( this, - DocumentService.getDocumentAreReferenced({ id: uniques, skip, take }), + DocumentService.getDocumentAreReferenced({ query: { id: uniques, skip, take } }), ); if (data) { @@ -102,7 +102,7 @@ export class UmbDocumentReferenceServerDataSource extends UmbControllerBase impl ): Promise>> { const { data, error } = await tryExecute( this, - DocumentService.getDocumentByIdReferencedDescendants({ id: unique, skip, take }), + DocumentService.getDocumentByIdReferencedDescendants({ path: { id: unique }, query: { skip, take } }), ); if (data) { diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/repository/detail/document-detail.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/repository/detail/document-detail.server.data-source.ts index 53235535f0..e5881b873f 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/repository/detail/document-detail.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/repository/detail/document-detail.server.data-source.ts @@ -81,7 +81,7 @@ export class UmbDocumentServerDataSource implements UmbDetailDataSource> { if (!model) throw new Error('Document is missing'); if (!model.unique) throw new Error('Document unique is missing'); if (parentUnique === undefined) throw new Error('Parent unique is missing'); // TODO: make data mapper to prevent errors - const requestBody: CreateDocumentRequestModel = { + const body: CreateDocumentRequestModel = { id: model.unique, parent: parentUnique ? { id: parentUnique } : null, documentType: { id: model.documentType.unique }, @@ -41,15 +45,21 @@ export class UmbDocumentValidationServerDataSource { }; // Maybe use: tryExecuteAndNotify - return tryExecute( + const { data, error } = await tryExecute( this.#host, DocumentService.postDocumentValidate({ - requestBody, + body, }), { disableNotifications: true, }, ); + + if (data && typeof data === 'string') { + return { data }; + } + + return { error }; } /** @@ -58,13 +68,16 @@ export class UmbDocumentValidationServerDataSource { * @param {Array} variantIds - Variant Ids * @returns {*} */ - async validateUpdate(model: UmbDocumentDetailModel, variantIds: Array) { + async validateUpdate( + model: UmbDocumentDetailModel, + variantIds: Array, + ): Promise> { if (!model.unique) throw new Error('Unique is missing'); const cultures = variantIds.map((id) => id.culture).filter((culture) => culture !== null) as Array; // TODO: make data mapper to prevent errors - const requestBody: ValidateUpdateDocumentRequestModel = { + const body: ValidateUpdateDocumentRequestModel = { template: model.template ? { id: model.template.unique } : null, values: model.values, variants: model.variants, @@ -72,15 +85,21 @@ export class UmbDocumentValidationServerDataSource { }; // Maybe use: tryExecuteAndNotify - return tryExecute( + const { data, error } = await tryExecute( this.#host, DocumentService.putUmbracoManagementApiV11DocumentByIdValidate11({ - id: model.unique, - requestBody, + path: { id: model.unique }, + body, }), { disableNotifications: true, }, ); + + if (data && typeof data === 'string') { + return { data }; + } + + return { error }; } } diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/rollback/repository/rollback.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/rollback/repository/rollback.server.data-source.ts index f0c98c9fa8..84240212e6 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/rollback/repository/rollback.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/rollback/repository/rollback.server.data-source.ts @@ -27,7 +27,7 @@ export class UmbRollbackServerDataSource { * @memberof UmbRollbackServerDataSource */ getVersionsByDocumentId(id: string, culture?: string) { - return tryExecute(this.#host, DocumentVersionService.getDocumentVersion({ documentId: id, culture })); + return tryExecute(this.#host, DocumentVersionService.getDocumentVersion({ query: { documentId: id, culture } })); } /** @@ -37,17 +37,23 @@ export class UmbRollbackServerDataSource { * @memberof UmbRollbackServerDataSource */ getVersionById(versionId: string) { - return tryExecute(this.#host, DocumentVersionService.getDocumentVersionById({ id: versionId })); + return tryExecute(this.#host, DocumentVersionService.getDocumentVersionById({ path: { id: versionId } })); } setPreventCleanup(versionId: string, preventCleanup: boolean) { return tryExecute( this.#host, - DocumentVersionService.putDocumentVersionByIdPreventCleanup({ id: versionId, preventCleanup }), + DocumentVersionService.putDocumentVersionByIdPreventCleanup({ + path: { id: versionId }, + query: { preventCleanup }, + }), ); } rollback(versionId: string, culture?: string) { - return tryExecute(this.#host, DocumentVersionService.postDocumentVersionByIdRollback({ id: versionId, culture })); + return tryExecute( + this.#host, + DocumentVersionService.postDocumentVersionByIdRollback({ path: { id: versionId }, query: { culture } }), + ); } } diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/search/document-search.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/search/document-search.server.data-source.ts index 178c49c2a5..5c2fc21beb 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/search/document-search.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/search/document-search.server.data-source.ts @@ -34,9 +34,11 @@ export class UmbDocumentSearchServerDataSource const { data, error } = await tryExecute( this.#host, DocumentService.getItemDocumentSearch({ - query: args.query, - parentId: args.searchFrom?.unique ?? undefined, - allowedDocumentTypes: args.allowedContentTypes?.map((contentType) => contentType.unique), + query: { + query: args.query, + parentId: args.searchFrom?.unique ?? undefined, + allowedDocumentTypes: args.allowedContentTypes?.map((contentType) => contentType.unique), + }, }), ); diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/tree/document-tree.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/tree/document-tree.server.data-source.ts index 8c67372759..4bb8b14bcc 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/tree/document-tree.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/tree/document-tree.server.data-source.ts @@ -39,9 +39,7 @@ export class UmbDocumentTreeServerDataSource extends UmbTreeServerDataSourceBase const getRootItems = (args: UmbDocumentTreeRootItemsRequestArgs) => // eslint-disable-next-line local-rules/no-direct-api-import DocumentService.getTreeDocumentRoot({ - dataTypeId: args.dataType?.unique, - skip: args.skip, - take: args.take, + query: { dataTypeId: args.dataType?.unique, skip: args.skip, take: args.take }, }); const getChildrenOf = (args: UmbDocumentTreeChildrenOfRequestArgs) => { @@ -50,10 +48,7 @@ const getChildrenOf = (args: UmbDocumentTreeChildrenOfRequestArgs) => { } else { // eslint-disable-next-line local-rules/no-direct-api-import return DocumentService.getTreeDocumentChildren({ - parentId: args.parent.unique, - dataTypeId: args.dataType?.unique, - skip: args.skip, - take: args.take, + query: { parentId: args.parent.unique, dataTypeId: args.dataType?.unique, skip: args.skip, take: args.take }, }); } }; @@ -61,7 +56,7 @@ const getChildrenOf = (args: UmbDocumentTreeChildrenOfRequestArgs) => { const getAncestorsOf = (args: UmbTreeAncestorsOfRequestArgs) => // eslint-disable-next-line local-rules/no-direct-api-import DocumentService.getTreeDocumentAncestors({ - descendantId: args.treeItem.unique, + query: { descendantId: args.treeItem.unique }, }); const mapper = (item: DocumentTreeItemResponseModel): UmbDocumentTreeItemModel => { diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/url/repository/document-url.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/url/repository/document-url.server.data-source.ts index 2993e37a40..bcf61c137d 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/url/repository/document-url.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/url/repository/document-url.server.data-source.ts @@ -24,6 +24,6 @@ export class UmbDocumentUrlServerDataSource extends UmbItemServerDataSourceBase< } /* eslint-disable local-rules/no-direct-api-import */ -const getItems = (uniques: Array) => DocumentService.getDocumentUrls({ id: uniques }); +const getItems = (uniques: Array) => DocumentService.getDocumentUrls({ query: { id: uniques } }); const mapper = (item: DocumentUrlInfoResponseModel): UmbDocumentUrlsModel => ({ unique: item.id, urls: item.urlInfos }); diff --git a/src/Umbraco.Web.UI.Client/src/packages/embedded-media/repository/oembed.server.data.ts b/src/Umbraco.Web.UI.Client/src/packages/embedded-media/repository/oembed.server.data.ts index 3ce001b98b..7ff883013a 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/embedded-media/repository/oembed.server.data.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/embedded-media/repository/oembed.server.data.ts @@ -25,6 +25,6 @@ export class UmbOEmbedServerDataSource { * @memberof UmbOEmbedServerDataSource */ async getOEmbedQuery({ url, maxWidth, maxHeight }: { url?: string; maxWidth?: number; maxHeight?: number }) { - return tryExecute(this.#host, OEmbedService.getOembedQuery({ url, maxWidth, maxHeight })); + return tryExecute(this.#host, OEmbedService.getOembedQuery({ query: { url, maxWidth, maxHeight } })); } } diff --git a/src/Umbraco.Web.UI.Client/src/packages/health-check/dashboard-health-check.element.ts b/src/Umbraco.Web.UI.Client/src/packages/health-check/dashboard-health-check.element.ts index 9fc5cf33ea..97353b1fb8 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/health-check/dashboard-health-check.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/health-check/dashboard-health-check.element.ts @@ -47,7 +47,7 @@ export class UmbDashboardHealthCheckElement extends UmbLitElement { } #registerHealthChecks = async () => { - const { data } = await tryExecute(this, HealthCheckService.getHealthCheckGroup({ skip: 0, take: 9999 })); + const { data } = await tryExecute(this, HealthCheckService.getHealthCheckGroup({ query: { skip: 0, take: 9999 } })); if (!data) return; const manifests = this.#createManifests(data.items); this.#register(manifests); diff --git a/src/Umbraco.Web.UI.Client/src/packages/health-check/health-check.context.ts b/src/Umbraco.Web.UI.Client/src/packages/health-check/health-check.context.ts index 94efcc5863..359aba9e5b 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/health-check/health-check.context.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/health-check/health-check.context.ts @@ -17,7 +17,7 @@ export class UmbHealthCheckContext extends UmbControllerBase implements UmbApi { public readonly results = this.#results.asObservable(); async getGroupChecks(name: string) { - const { data } = await tryExecute(this, HealthCheckService.getHealthCheckGroupByName({ name })); + const { data } = await tryExecute(this, HealthCheckService.getHealthCheckGroupByName({ path: { name } })); if (data) { this.#checks.setValue(data); @@ -27,7 +27,7 @@ export class UmbHealthCheckContext extends UmbControllerBase implements UmbApi { } async checkGroup(name: string) { - const { data } = await tryExecute(this, HealthCheckService.postHealthCheckGroupByNameCheck({ name })); + const { data } = await tryExecute(this, HealthCheckService.postHealthCheckGroupByNameCheck({ path: { name } })); if (data) { this.#results.setValue(data); diff --git a/src/Umbraco.Web.UI.Client/src/packages/health-check/views/health-check-action.element.ts b/src/Umbraco.Web.UI.Client/src/packages/health-check/views/health-check-action.element.ts index 8a4e753c2b..db19233cd1 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/health-check/views/health-check-action.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/health-check/views/health-check-action.element.ts @@ -17,10 +17,7 @@ export class UmbDashboardHealthCheckActionElement extends UmbLitElement { private async _onActionClick(e: SubmitEvent) { e.preventDefault(); this._buttonState = 'waiting'; - const { error } = await tryExecute( - this, - HealthCheckService.postHealthCheckExecuteAction({ requestBody: this.action }), - ); + const { error } = await tryExecute(this, HealthCheckService.postHealthCheckExecuteAction({ body: this.action })); if (error) { this._buttonState = 'failed'; diff --git a/src/Umbraco.Web.UI.Client/src/packages/language/collection/repository/language-collection.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/language/collection/repository/language-collection.server.data-source.ts index e6be8d18f0..4130781beb 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/language/collection/repository/language-collection.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/language/collection/repository/language-collection.server.data-source.ts @@ -30,7 +30,7 @@ export class UmbLanguageCollectionServerDataSource implements UmbCollectionDataS * @memberof UmbLanguageCollectionServerDataSource */ async getCollection(filter: UmbLanguageCollectionFilterModel) { - const { data, error } = await tryExecute(this.#host, LanguageService.getLanguage(filter)); + const { data, error } = await tryExecute(this.#host, LanguageService.getLanguage({ query: filter })); if (data) { const items = data.items.map((item) => { diff --git a/src/Umbraco.Web.UI.Client/src/packages/language/repository/detail/language-detail.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/language/repository/detail/language-detail.server.data-source.ts index e354bd8e55..da721cf0b1 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/language/repository/detail/language-detail.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/language/repository/detail/language-detail.server.data-source.ts @@ -55,7 +55,10 @@ export class UmbLanguageServerDataSource implements UmbDetailDataSource) => LanguageService.getItemLanguage({ isoCode: uniques }); +const getItems = (uniques: Array) => LanguageService.getItemLanguage({ query: { isoCode: uniques } }); const mapper = (item: LanguageItemResponseModel): UmbLanguageItemModel => { return { diff --git a/src/Umbraco.Web.UI.Client/src/packages/log-viewer/repository/sources/log-viewer.server.data.ts b/src/Umbraco.Web.UI.Client/src/packages/log-viewer/repository/sources/log-viewer.server.data.ts index 2df8cd00ee..f730e5543d 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/log-viewer/repository/sources/log-viewer.server.data.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/log-viewer/repository/sources/log-viewer.server.data.ts @@ -32,7 +32,7 @@ export class UmbLogSearchesServerDataSource implements LogSearchDataSource { * @memberof UmbLogSearchesServerDataSource */ async getAllSavedSearches({ skip = 0, take = 100 }: { skip?: number; take?: number }) { - return await tryExecute(this.#host, LogViewerService.getLogViewerSavedSearch({ skip, take })); + return await tryExecute(this.#host, LogViewerService.getLogViewerSavedSearch({ query: { skip, take } })); } /** * Get a log viewer saved search by name from the server @@ -41,17 +41,17 @@ export class UmbLogSearchesServerDataSource implements LogSearchDataSource { * @memberof UmbLogSearchesServerDataSource */ async getSavedSearchByName({ name }: { name: string }) { - return await tryExecute(this.#host, LogViewerService.getLogViewerSavedSearchByName({ name })); + return await tryExecute(this.#host, LogViewerService.getLogViewerSavedSearchByName({ path: { name } })); } /** * Post a new log viewer saved search to the server - * @param {{ requestBody?: SavedLogSearch }} { requestBody } + * @param {{ body?: SavedLogSearch }} { body } * @returns {*} * @memberof UmbLogSearchesServerDataSource */ async postLogViewerSavedSearch({ name, query }: SavedLogSearchResponseModel) { - return await tryExecute(this.#host, LogViewerService.postLogViewerSavedSearch({ requestBody: { name, query } })); + return await tryExecute(this.#host, LogViewerService.postLogViewerSavedSearch({ body: { name, query } })); } /** * Remove a log viewer saved search by name from the server @@ -60,7 +60,7 @@ export class UmbLogSearchesServerDataSource implements LogSearchDataSource { * @memberof UmbLogSearchesServerDataSource */ async deleteSavedSearchByName({ name }: { name: string }) { - return await tryExecute(this.#host, LogViewerService.deleteLogViewerSavedSearchByName({ name })); + return await tryExecute(this.#host, LogViewerService.deleteLogViewerSavedSearchByName({ path: { name } })); } } /** @@ -87,7 +87,7 @@ export class UmbLogMessagesServerDataSource implements LogMessagesDataSource { * @memberof UmbLogMessagesServerDataSource */ async getLogViewerLevel({ skip = 0, take = 100 }: { skip?: number; take?: number }) { - return await tryExecute(this.#host, LogViewerService.getLogViewerLevel({ skip, take })); + return await tryExecute(this.#host, LogViewerService.getLogViewerLevel({ query: { skip, take } })); } /** @@ -100,8 +100,7 @@ export class UmbLogMessagesServerDataSource implements LogMessagesDataSource { return await tryExecute( this.#host, LogViewerService.getLogViewerLevelCount({ - startDate, - endDate, + query: { startDate, endDate }, }), ); } @@ -147,13 +146,7 @@ export class UmbLogMessagesServerDataSource implements LogMessagesDataSource { return await tryExecute( this.#host, LogViewerService.getLogViewerLog({ - skip, - take, - orderDirection, - filterExpression, - logLevel, - startDate, - endDate, + query: { skip, take, orderDirection, filterExpression, logLevel, startDate, endDate }, }), ); } @@ -187,10 +180,7 @@ export class UmbLogMessagesServerDataSource implements LogMessagesDataSource { return await tryExecute( this.#host, LogViewerService.getLogViewerMessageTemplate({ - skip, - take, - startDate, - endDate, + query: { skip, take, startDate, endDate }, }), ); } @@ -199,8 +189,7 @@ export class UmbLogMessagesServerDataSource implements LogMessagesDataSource { return await tryExecute( this.#host, LogViewerService.getLogViewerValidateLogsSize({ - startDate, - endDate, + query: { startDate, endDate }, }), ); } diff --git a/src/Umbraco.Web.UI.Client/src/packages/media/imaging/imaging.server.data.ts b/src/Umbraco.Web.UI.Client/src/packages/media/imaging/imaging.server.data.ts index d5d6eb0359..924ffc1a24 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/media/imaging/imaging.server.data.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/media/imaging/imaging.server.data.ts @@ -33,7 +33,7 @@ export class UmbImagingServerDataSource { const { data, error } = await tryExecute( this.#host, - ImagingService.getImagingResizeUrls({ id: uniques, ...imagingModel }), + ImagingService.getImagingResizeUrls({ query: { id: uniques, ...imagingModel } }), ); if (data) { diff --git a/src/Umbraco.Web.UI.Client/src/packages/media/media-types/entity-actions/duplicate/repository/media-type-duplicate.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/media/media-types/entity-actions/duplicate/repository/media-type-duplicate.server.data-source.ts index c9113e0545..349bd9c8b0 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/media/media-types/entity-actions/duplicate/repository/media-type-duplicate.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/media/media-types/entity-actions/duplicate/repository/media-type-duplicate.server.data-source.ts @@ -32,8 +32,8 @@ export class UmbDuplicateMediaTypeServerDataSource implements UmbDuplicateToData return tryExecute( this.#host, MediaTypeService.postMediaTypeByIdCopy({ - id: args.unique, - requestBody: { + path: { id: args.unique }, + body: { target: args.destination.unique ? { id: args.destination.unique } : null, }, }), diff --git a/src/Umbraco.Web.UI.Client/src/packages/media/media-types/entity-actions/export/repository/media-type-export.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/media/media-types/entity-actions/export/repository/media-type-export.server.data-source.ts index fd111609f8..a04607ab94 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/media/media-types/entity-actions/export/repository/media-type-export.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/media/media-types/entity-actions/export/repository/media-type-export.server.data-source.ts @@ -28,6 +28,6 @@ export class UmbExportMediaTypeServerDataSource { async export(unique: string) { if (!unique) throw new Error('Unique is missing'); - return tryExecute(this.#host, MediaTypeService.getMediaTypeByIdExport({ id: unique })); + return tryExecute(this.#host, MediaTypeService.getMediaTypeByIdExport({ path: { id: unique } })); } } diff --git a/src/Umbraco.Web.UI.Client/src/packages/media/media-types/entity-actions/import/repository/media-type-import.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/media/media-types/entity-actions/import/repository/media-type-import.server.data-source.ts index 716dd3ae1f..d88bf3e4c1 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/media/media-types/entity-actions/import/repository/media-type-import.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/media/media-types/entity-actions/import/repository/media-type-import.server.data-source.ts @@ -1,4 +1,4 @@ -import { MediaTypeService, type PostMediaTypeImportData } from '@umbraco-cms/backoffice/external/backend-api'; +import { MediaTypeService, type ImportMediaTypeRequestModel } from '@umbraco-cms/backoffice/external/backend-api'; import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api'; import { tryExecute } from '@umbraco-cms/backoffice/resources'; @@ -28,10 +28,10 @@ export class UmbMediaTypeImportServerDataSource { async import(temporaryUnique: string) { if (!temporaryUnique) throw new Error('Unique is missing'); - const requestBody: PostMediaTypeImportData = { - requestBody: { file: { id: temporaryUnique } }, + const body: ImportMediaTypeRequestModel = { + file: { id: temporaryUnique }, }; - return tryExecute(this.#host, MediaTypeService.postMediaTypeImport(requestBody)); + return tryExecute(this.#host, MediaTypeService.postMediaTypeImport({ body })); } } diff --git a/src/Umbraco.Web.UI.Client/src/packages/media/media-types/entity-actions/move-to/repository/media-type-move.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/media/media-types/entity-actions/move-to/repository/media-type-move.server.data-source.ts index 104b6f64b5..56666dec6a 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/media/media-types/entity-actions/move-to/repository/media-type-move.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/media/media-types/entity-actions/move-to/repository/media-type-move.server.data-source.ts @@ -34,8 +34,8 @@ export class UmbMoveMediaTypeServerDataSource implements UmbMoveDataSource { return tryExecute( this.#host, MediaTypeService.putMediaTypeByIdMove({ - id: args.unique, - requestBody: { + path: { id: args.unique }, + body: { target: args.destination.unique ? { id: args.destination.unique } : null, }, }), diff --git a/src/Umbraco.Web.UI.Client/src/packages/media/media-types/repository/composition/media-type-composition.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/media/media-types/repository/composition/media-type-composition.server.data-source.ts index 858a126804..f21886b91d 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/media/media-types/repository/composition/media-type-composition.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/media/media-types/repository/composition/media-type-composition.server.data-source.ts @@ -39,7 +39,7 @@ export class UmbMediaTypeCompositionServerDataSource async getReferences(unique: string) { const response = await tryExecute( this.#host, - MediaTypeService.getMediaTypeByIdCompositionReferences({ id: unique }), + MediaTypeService.getMediaTypeByIdCompositionReferences({ path: { id: unique } }), ); const error = response.error; const data: Array | undefined = response.data?.map((reference) => { @@ -54,19 +54,19 @@ export class UmbMediaTypeCompositionServerDataSource } /** * Updates the compositions for a media type on the server - * @param {MediaTypeCompositionRequestModel} requestBody + * @param {MediaTypeCompositionRequestModel} body * @param args * @returns {*} * @memberof UmbMediaTypeCompositionServerDataSource */ async availableCompositions(args: UmbMediaTypeAvailableCompositionRequestModel) { - const requestBody: MediaTypeCompositionRequestModel = { + const body: MediaTypeCompositionRequestModel = { id: args.unique, currentCompositeIds: args.currentCompositeUniques, currentPropertyAliases: args.currentPropertyAliases, }; - const response = await tryExecute(this.#host, MediaTypeService.postMediaTypeAvailableCompositions({ requestBody })); + const response = await tryExecute(this.#host, MediaTypeService.postMediaTypeAvailableCompositions({ body })); const error = response.error; const data: Array | undefined = response.data?.map((composition) => { return { diff --git a/src/Umbraco.Web.UI.Client/src/packages/media/media-types/repository/detail/media-type-detail.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/media/media-types/repository/detail/media-type-detail.server.data-source.ts index 6e5461942f..6f37542e8b 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/media/media-types/repository/detail/media-type-detail.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/media/media-types/repository/detail/media-type-detail.server.data-source.ts @@ -66,7 +66,7 @@ export class UmbMediaTypeServerDataSource implements UmbDetailDataSource) => MediaTypeService.getItemMediaType({ id: uniques }); +const getItems = (uniques: Array) => MediaTypeService.getItemMediaType({ query: { id: uniques } }); const mapper = (item: MediaTypeItemResponseModel): UmbMediaTypeItemModel => { return { diff --git a/src/Umbraco.Web.UI.Client/src/packages/media/media-types/repository/structure/media-type-structure.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/media/media-types/repository/structure/media-type-structure.server.data-source.ts index 71758ace60..5db89134e2 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/media/media-types/repository/structure/media-type-structure.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/media/media-types/repository/structure/media-type-structure.server.data-source.ts @@ -30,8 +30,8 @@ const getAllowedChildrenOf = (unique: string | null, parentContentUnique: string if (unique) { // eslint-disable-next-line local-rules/no-direct-api-import return MediaTypeService.getMediaTypeByIdAllowedChildren({ - id: unique, - parentContentKey: parentContentUnique ?? undefined, + path: { id: unique }, + query: { parentContentKey: parentContentUnique ?? undefined }, }); } else { // eslint-disable-next-line local-rules/no-direct-api-import @@ -51,8 +51,8 @@ const mapper = (item: AllowedMediaTypeModel): UmbAllowedMediaTypeModel => { const getAllowedMediaTypesOfFolders = async ({ skip, take }: { skip: number; take: number }) => { // eslint-disable-next-line local-rules/no-direct-api-import - const { items } = await MediaTypeService.getItemMediaTypeFolders({ skip, take }); - return items.map((item) => mapper(item)); + const { data } = await MediaTypeService.getItemMediaTypeFolders({ query: { skip, take } }); + return data.items.map((item) => mapper(item)); }; const getAllowedMediaTypesOfExtension = async ({ @@ -65,6 +65,6 @@ const getAllowedMediaTypesOfExtension = async ({ take: number; }) => { // eslint-disable-next-line local-rules/no-direct-api-import - const { items } = await MediaTypeService.getItemMediaTypeAllowed({ fileExtension, skip, take }); - return items.map((item) => mapper(item)); + const { data } = await MediaTypeService.getItemMediaTypeAllowed({ query: { fileExtension, skip, take } }); + return data.items.map((item) => mapper(item)); }; diff --git a/src/Umbraco.Web.UI.Client/src/packages/media/media-types/search/media-type-search.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/media/media-types/search/media-type-search.server.data-source.ts index 2220814315..18a232798a 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/media/media-types/search/media-type-search.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/media/media-types/search/media-type-search.server.data-source.ts @@ -32,7 +32,7 @@ export class UmbMediaTypeSearchServerDataSource implements UmbSearchDataSource // eslint-disable-next-line local-rules/no-direct-api-import MediaTypeService.getTreeMediaTypeRoot({ - foldersOnly: args.foldersOnly, - skip: args.skip, - take: args.take, + query: { foldersOnly: args.foldersOnly, skip: args.skip, take: args.take }, }); const getChildrenOf = (args: UmbTreeChildrenOfRequestArgs) => { @@ -52,10 +50,7 @@ const getChildrenOf = (args: UmbTreeChildrenOfRequestArgs) => { } else { // eslint-disable-next-line local-rules/no-direct-api-import return MediaTypeService.getTreeMediaTypeChildren({ - parentId: args.parent.unique, - foldersOnly: args.foldersOnly, - skip: args.skip, - take: args.take, + query: { parentId: args.parent.unique, foldersOnly: args.foldersOnly, skip: args.skip, take: args.take }, }); } }; @@ -63,7 +58,7 @@ const getChildrenOf = (args: UmbTreeChildrenOfRequestArgs) => { const getAncestorsOf = (args: UmbTreeAncestorsOfRequestArgs) => // eslint-disable-next-line local-rules/no-direct-api-import MediaTypeService.getTreeMediaTypeAncestors({ - descendantId: args.treeItem.unique, + query: { descendantId: args.treeItem.unique }, }); const mapper = (item: MediaTypeTreeItemResponseModel): UmbMediaTypeTreeItemModel => { diff --git a/src/Umbraco.Web.UI.Client/src/packages/media/media/audit-log/repository/media-audit-log.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/media/media/audit-log/repository/media-audit-log.server.data-source.ts index 3229d44363..c0aa5f484d 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/media/media/audit-log/repository/media-audit-log.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/media/media/audit-log/repository/media-audit-log.server.data-source.ts @@ -32,11 +32,13 @@ export class UmbMediaAuditLogServerDataSource implements UmbAuditLogDataSource { diff --git a/src/Umbraco.Web.UI.Client/src/packages/media/media/entity-actions/move-to/repository/media-move.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/media/media/entity-actions/move-to/repository/media-move.server.data-source.ts index 8d24101fca..be0dcca07b 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/media/media/entity-actions/move-to/repository/media-move.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/media/media/entity-actions/move-to/repository/media-move.server.data-source.ts @@ -34,8 +34,8 @@ export class UmbMoveMediaServerDataSource implements UmbMoveDataSource { return tryExecute( this.#host, MediaService.putMediaByIdMove({ - id: args.unique, - requestBody: { + path: { id: args.unique }, + body: { target: args.destination.unique ? { id: args.destination.unique } : null, }, }), diff --git a/src/Umbraco.Web.UI.Client/src/packages/media/media/entity-actions/sort-children-of/repository/sort-children-of.server.data.ts b/src/Umbraco.Web.UI.Client/src/packages/media/media/entity-actions/sort-children-of/repository/sort-children-of.server.data.ts index 6b3f8acb9b..a8993f7a0f 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/media/media/entity-actions/sort-children-of/repository/sort-children-of.server.data.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/media/media/entity-actions/sort-children-of/repository/sort-children-of.server.data.ts @@ -33,7 +33,7 @@ export class UmbSortChildrenOfMediaServerDataSource implements UmbSortChildrenOf return tryExecute( this.#host, MediaService.putMediaSort({ - requestBody: { + body: { parent: args.unique ? { id: args.unique } : null, sorting: sortingMapping, }, diff --git a/src/Umbraco.Web.UI.Client/src/packages/media/media/recycle-bin/repository/media-recycle-bin.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/media/media/recycle-bin/repository/media-recycle-bin.server.data-source.ts index 058d73469e..ee53140e61 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/media/media/recycle-bin/repository/media-recycle-bin.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/media/media/recycle-bin/repository/media-recycle-bin.server.data-source.ts @@ -16,15 +16,15 @@ export class UmbMediaRecycleBinServerDataSource implements UmbRecycleBinDataSour } trash(args: UmbRecycleBinTrashRequestArgs) { - return tryExecute(this.#host, MediaService.putMediaByIdMoveToRecycleBin({ id: args.unique })); + return tryExecute(this.#host, MediaService.putMediaByIdMoveToRecycleBin({ path: { id: args.unique } })); } restore(args: UmbRecycleBinRestoreRequestArgs) { return tryExecute( this.#host, MediaService.putRecycleBinMediaByIdRestore({ - id: args.unique, - requestBody: { + path: { id: args.unique }, + body: { target: args.destination.unique ? { id: args.destination.unique } : null, }, }), @@ -38,7 +38,7 @@ export class UmbMediaRecycleBinServerDataSource implements UmbRecycleBinDataSour async getOriginalParent(args: UmbRecycleBinOriginalParentRequestArgs) { const { data, error } = await tryExecute( this.#host, - MediaService.getRecycleBinMediaByIdOriginalParent({ id: args.unique }), + MediaService.getRecycleBinMediaByIdOriginalParent({ path: { id: args.unique } }), ); // only check for undefined because data can be null if the parent is the root diff --git a/src/Umbraco.Web.UI.Client/src/packages/media/media/recycle-bin/tree/media-recycle-bin-tree.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/media/media/recycle-bin/tree/media-recycle-bin-tree.server.data-source.ts index 891c20f48d..abde218ea2 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/media/media/recycle-bin/tree/media-recycle-bin-tree.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/media/media/recycle-bin/tree/media-recycle-bin-tree.server.data-source.ts @@ -36,7 +36,7 @@ export class UmbMediaRecycleBinTreeServerDataSource extends UmbTreeServerDataSou const getRootItems = (args: UmbTreeRootItemsRequestArgs) => // eslint-disable-next-line local-rules/no-direct-api-import - MediaService.getRecycleBinMediaRoot({ skip: args.skip, take: args.take }); + MediaService.getRecycleBinMediaRoot({ query: { skip: args.skip, take: args.take } }); const getChildrenOf = (args: UmbTreeChildrenOfRequestArgs) => { if (args.parent.unique === null) { @@ -44,9 +44,7 @@ const getChildrenOf = (args: UmbTreeChildrenOfRequestArgs) => { } else { // eslint-disable-next-line local-rules/no-direct-api-import return MediaService.getRecycleBinMediaChildren({ - parentId: args.parent.unique, - skip: args.skip, - take: args.take, + query: { parentId: args.parent.unique, skip: args.skip, take: args.take }, }); } }; @@ -54,7 +52,7 @@ const getChildrenOf = (args: UmbTreeChildrenOfRequestArgs) => { const getAncestorsOf = (args: UmbTreeAncestorsOfRequestArgs) => // eslint-disable-next-line local-rules/no-direct-api-import MediaService.getTreeMediaAncestors({ - descendantId: args.treeItem.unique, + query: { descendantId: args.treeItem.unique }, }); const mapper = (item: MediaRecycleBinItemResponseModel): UmbMediaRecycleBinTreeItemModel => { diff --git a/src/Umbraco.Web.UI.Client/src/packages/media/media/reference/repository/media-reference.server.data.ts b/src/Umbraco.Web.UI.Client/src/packages/media/media/reference/repository/media-reference.server.data.ts index d7b8418cb2..b0fdcfabc4 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/media/media/reference/repository/media-reference.server.data.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/media/media/reference/repository/media-reference.server.data.ts @@ -27,7 +27,10 @@ export class UmbMediaReferenceServerDataSource extends UmbControllerBase impleme skip: number = 0, take: number = 20, ): Promise>> { - const { data, error } = await tryExecute(this, MediaService.getMediaByIdReferencedBy({ id: unique, skip, take })); + const { data, error } = await tryExecute( + this, + MediaService.getMediaByIdReferencedBy({ path: { id: unique }, query: { skip, take } }), + ); if (data) { const promises = data.items.map(async (item) => { @@ -65,7 +68,10 @@ export class UmbMediaReferenceServerDataSource extends UmbControllerBase impleme skip: number = 0, take: number = 20, ): Promise>> { - const { data, error } = await tryExecute(this, MediaService.getMediaAreReferenced({ id: uniques, skip, take })); + const { data, error } = await tryExecute( + this, + MediaService.getMediaAreReferenced({ query: { id: uniques, skip, take } }), + ); if (data) { const items: Array = data.items.map((item) => { @@ -96,7 +102,7 @@ export class UmbMediaReferenceServerDataSource extends UmbControllerBase impleme ): Promise>> { const { data, error } = await tryExecute( this, - MediaService.getMediaByIdReferencedDescendants({ id: unique, skip, take }), + MediaService.getMediaByIdReferencedDescendants({ path: { id: unique }, query: { skip, take } }), ); if (data) { diff --git a/src/Umbraco.Web.UI.Client/src/packages/media/media/repository/detail/media-detail.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/media/media/repository/detail/media-detail.server.data-source.ts index 8dc85a8b0c..5558db3287 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/media/media/repository/detail/media-detail.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/media/media/repository/detail/media-detail.server.data-source.ts @@ -66,7 +66,7 @@ export class UmbMediaServerDataSource implements UmbDetailDataSource mapper(item)); return { data: mapped, error }; } } /* eslint-disable local-rules/no-direct-api-import */ -const getItems = (uniques: Array) => MediaService.getItemMedia({ id: uniques }); +const getItems = (uniques: Array) => MediaService.getItemMedia({ query: { id: uniques } }); const mapper = (item: MediaItemResponseModel): UmbMediaItemModel => { return { diff --git a/src/Umbraco.Web.UI.Client/src/packages/media/media/repository/validation/media-validation.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/media/media/repository/validation/media-validation.server.data-source.ts index 04243d21a8..00f5852875 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/media/media/repository/validation/media-validation.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/media/media/repository/validation/media-validation.server.data-source.ts @@ -8,6 +8,7 @@ import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api'; import { tryExecute } from '@umbraco-cms/backoffice/resources'; import type { UmbVariantId } from '@umbraco-cms/backoffice/variant'; import type { UmbEntityUnique } from '@umbraco-cms/backoffice/entity'; +import type { UmbDataSourceResponse } from '@umbraco-cms/backoffice/repository'; /** * A server data source for Media Validation @@ -25,13 +26,16 @@ export class UmbMediaValidationServerDataSource { * @param {UmbEntityUnique} parentUnique - Parent Unique * @returns {*} */ - async validateCreate(model: UmbMediaDetailModel, parentUnique: UmbEntityUnique = null) { + async validateCreate( + model: UmbMediaDetailModel, + parentUnique: UmbEntityUnique = null, + ): Promise> { if (!model) throw new Error('Media is missing'); if (!model.unique) throw new Error('Media unique is missing'); if (parentUnique === undefined) throw new Error('Parent unique is missing'); // TODO: make data mapper to prevent errors - const requestBody: CreateMediaRequestModel = { + const body: CreateMediaRequestModel = { id: model.unique, parent: parentUnique ? { id: parentUnique } : null, mediaType: { id: model.mediaType.unique }, @@ -40,12 +44,18 @@ export class UmbMediaValidationServerDataSource { }; // Maybe use: tryExecuteAndNotify - return tryExecute( + const { data, error } = await tryExecute( this.#host, MediaService.postMediaValidate({ - requestBody, + body, }), ); + + if (data && typeof data === 'string') { + return { data }; + } + + return { error }; } /** @@ -54,25 +64,34 @@ export class UmbMediaValidationServerDataSource { * @param {Array} variantIds - Variant Ids * @returns {Promise<*>} - The response from the server */ - // eslint-disable-next-line @typescript-eslint/no-unused-vars - async validateUpdate(model: UmbMediaDetailModel, variantIds: Array) { + async validateUpdate( + model: UmbMediaDetailModel, + // eslint-disable-next-line @typescript-eslint/no-unused-vars + variantIds: Array, + ): Promise> { if (!model.unique) throw new Error('Unique is missing'); //const cultures = variantIds.map((id) => id.culture).filter((culture) => culture !== null) as Array; // TODO: make data mapper to prevent errors - const requestBody: UpdateMediaRequestModel = { + const body: UpdateMediaRequestModel = { values: model.values, variants: model.variants, }; // Maybe use: tryExecuteAndNotify - return tryExecute( + const { data, error } = await tryExecute( this.#host, MediaService.putMediaByIdValidate({ - id: model.unique, - requestBody, + path: { id: model.unique }, + body, }), ); + + if (data && typeof data === 'string') { + return { data }; + } + + return { error }; } } diff --git a/src/Umbraco.Web.UI.Client/src/packages/media/media/search/media-search.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/media/media/search/media-search.server.data-source.ts index fd782a1856..5617d61fcf 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/media/media/search/media-search.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/media/media/search/media-search.server.data-source.ts @@ -34,9 +34,11 @@ export class UmbMediaSearchServerDataSource const { data, error } = await tryExecute( this.#host, MediaService.getItemMediaSearch({ - query: args.query, - parentId: args.searchFrom?.unique || undefined, - allowedMediaTypes: args.allowedContentTypes?.map((mediaReference) => mediaReference.unique), + query: { + query: args.query, + parentId: args.searchFrom?.unique || undefined, + allowedMediaTypes: args.allowedContentTypes?.map((mediaReference) => mediaReference.unique), + }, }), ); diff --git a/src/Umbraco.Web.UI.Client/src/packages/media/media/tree/media-tree.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/media/media/tree/media-tree.server.data-source.ts index 734309fc5b..156ecc39fb 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/media/media/tree/media-tree.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/media/media/tree/media-tree.server.data-source.ts @@ -37,7 +37,7 @@ export class UmbMediaTreeServerDataSource extends UmbTreeServerDataSourceBase< const getRootItems = (args: UmbMediaTreeRootItemsRequestArgs) => // eslint-disable-next-line local-rules/no-direct-api-import - MediaService.getTreeMediaRoot({ dataTypeId: args.dataType?.unique, skip: args.skip, take: args.take }); + MediaService.getTreeMediaRoot({ query: { dataTypeId: args.dataType?.unique, skip: args.skip, take: args.take } }); const getChildrenOf = (args: UmbMediaTreeChildrenOfRequestArgs) => { if (args.parent.unique === null) { @@ -45,10 +45,7 @@ const getChildrenOf = (args: UmbMediaTreeChildrenOfRequestArgs) => { } else { // eslint-disable-next-line local-rules/no-direct-api-import return MediaService.getTreeMediaChildren({ - parentId: args.parent.unique, - dataTypeId: args.dataType?.unique, - skip: args.skip, - take: args.take, + query: { parentId: args.parent.unique, dataTypeId: args.dataType?.unique, skip: args.skip, take: args.take }, }); } }; @@ -56,7 +53,7 @@ const getChildrenOf = (args: UmbMediaTreeChildrenOfRequestArgs) => { const getAncestorsOf = (args: UmbTreeAncestorsOfRequestArgs) => // eslint-disable-next-line local-rules/no-direct-api-import MediaService.getTreeMediaAncestors({ - descendantId: args.treeItem.unique, + query: { descendantId: args.treeItem.unique }, }); const mapper = (item: MediaTreeItemResponseModel): UmbMediaTreeItemModel => { diff --git a/src/Umbraco.Web.UI.Client/src/packages/media/media/url/repository/media-url.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/media/media/url/repository/media-url.server.data-source.ts index b82bd9cbb6..d52e8952c6 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/media/media/url/repository/media-url.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/media/media/url/repository/media-url.server.data-source.ts @@ -26,7 +26,7 @@ export class UmbMediaUrlServerDataSource extends UmbItemServerDataSourceBase< } /* eslint-disable local-rules/no-direct-api-import */ -const getItems = (uniques: Array) => MediaService.getMediaUrls({ id: uniques }); +const getItems = (uniques: Array) => MediaService.getMediaUrls({ query: { id: uniques } }); const mapper = (item: MediaUrlInfoResponseModel): UmbMediaUrlModel => { const url = item.urlInfos.length ? item.urlInfos[0].url : undefined; diff --git a/src/Umbraco.Web.UI.Client/src/packages/members/member-group/collection/repository/member-group-collection.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/members/member-group/collection/repository/member-group-collection.server.data-source.ts index 0433001568..9bdd2ce0e6 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/members/member-group/collection/repository/member-group-collection.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/members/member-group/collection/repository/member-group-collection.server.data-source.ts @@ -30,8 +30,8 @@ export class UmbMemberGroupCollectionServerDataSource implements UmbCollectionDa * @returns {*} * @memberof UmbMemberGroupCollectionServerDataSource */ - async getCollection(filter: UmbMemberGroupCollectionFilterModel) { - const { data, error } = await tryExecute(this.#host, MemberGroupService.getMemberGroup(filter)); + async getCollection(query: UmbMemberGroupCollectionFilterModel) { + const { data, error } = await tryExecute(this.#host, MemberGroupService.getMemberGroup({ query })); if (error) { return { error }; diff --git a/src/Umbraco.Web.UI.Client/src/packages/members/member-group/repository/detail/member-group-detail.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/members/member-group/repository/detail/member-group-detail.server.data-source.ts index 4e14ee3624..614ceac6f5 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/members/member-group/repository/detail/member-group-detail.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/members/member-group/repository/detail/member-group-detail.server.data-source.ts @@ -49,7 +49,10 @@ export class UmbMemberGroupServerDataSource implements UmbDetailDataSource) => MemberGroupService.getItemMemberGroup({ id: uniques }); +const getItems = (uniques: Array) => MemberGroupService.getItemMemberGroup({ query: { id: uniques } }); const mapper = (item: MemberGroupItemResponseModel): UmbMemberGroupItemModel => { return { diff --git a/src/Umbraco.Web.UI.Client/src/packages/members/member-public-access/modal/public-access-modal.element.ts b/src/Umbraco.Web.UI.Client/src/packages/members/member-public-access/modal/public-access-modal.element.ts index 8a08a84b0d..3458d37f18 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/members/member-public-access/modal/public-access-modal.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/members/member-public-access/modal/public-access-modal.element.ts @@ -90,7 +90,7 @@ export class UmbPublicAccessModalElement extends UmbModalBaseElement< // TODO: [v15] Currently the Management API doesn't support passing the member/group ids, only the userNames/names. // This is a temporary solution where we have to look them up until the API is updated to support this. - const requestBody: PublicAccessRequestModel = { + const body: PublicAccessRequestModel = { memberGroupNames: [], memberUserNames: [], loginDocument: { id: this._loginDocumentId }, @@ -108,7 +108,7 @@ export class UmbPublicAccessModalElement extends UmbModalBaseElement< .filter((response) => response.data) .map((response) => response.data?.username) as string[]; - requestBody.memberUserNames = memberUserNames; + body.memberUserNames = memberUserNames; } else { // Groups const repo = new UmbMemberGroupItemRepository(this); @@ -119,13 +119,13 @@ export class UmbPublicAccessModalElement extends UmbModalBaseElement< .filter((groupItem) => this._selection.includes(groupItem.unique)) .map((groupItem) => groupItem.name); - requestBody.memberGroupNames = groupNames; + body.memberGroupNames = groupNames; } if (this.#isNew) { - await this.#publicAccessRepository.create(this.#unique, requestBody); + await this.#publicAccessRepository.create(this.#unique, body); } else { - await this.#publicAccessRepository.update(this.#unique, requestBody); + await this.#publicAccessRepository.update(this.#unique, body); } this.modalContext?.submit(); diff --git a/src/Umbraco.Web.UI.Client/src/packages/members/member-public-access/repository/public-access.server.data.ts b/src/Umbraco.Web.UI.Client/src/packages/members/member-public-access/repository/public-access.server.data.ts index 5dcdf0d15e..300ea27677 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/members/member-public-access/repository/public-access.server.data.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/members/member-public-access/repository/public-access.server.data.ts @@ -28,7 +28,7 @@ export class UmbDocumentPublicAccessServerDataSource { */ async create(unique: string, data: PublicAccessRequestModel) { if (!unique) throw new Error('unique is missing'); - return tryExecute(this.#host, DocumentService.postDocumentByIdPublicAccess({ id: unique, requestBody: data })); + return tryExecute(this.#host, DocumentService.postDocumentByIdPublicAccess({ path: { id: unique }, body: data })); } /** @@ -40,19 +40,19 @@ export class UmbDocumentPublicAccessServerDataSource { if (!unique) throw new Error('unique is missing'); // NOTE: The entity will not be present, when fetching Public Access for a descendant of a protected Document. // This is a perfectly valid scenario, which is handled in the view. In other words, just use tryExecute here. - return tryExecute(this.#host, DocumentService.getDocumentByIdPublicAccess({ id: unique })); + return tryExecute(this.#host, DocumentService.getDocumentByIdPublicAccess({ path: { id: unique } })); } /** * Updates Public Access for the given Document unique * @param {string} unique * @param {PublicAccessRequestModel} data - * @param requestBody + * @param body * @memberof UmbDocumentPublicAccessServerDataSource */ - async update(unique: string, requestBody: PublicAccessRequestModel) { + async update(unique: string, body: PublicAccessRequestModel) { if (!unique) throw new Error('unique is missing'); - return tryExecute(this.#host, DocumentService.putDocumentByIdPublicAccess({ id: unique, requestBody })); + return tryExecute(this.#host, DocumentService.putDocumentByIdPublicAccess({ path: { id: unique }, body })); } /** @@ -62,6 +62,6 @@ export class UmbDocumentPublicAccessServerDataSource { */ async delete(unique: string) { if (!unique) throw new Error('unique is missing'); - return tryExecute(this.#host, DocumentService.deleteDocumentByIdPublicAccess({ id: unique })); + return tryExecute(this.#host, DocumentService.deleteDocumentByIdPublicAccess({ path: { id: unique } })); } } diff --git a/src/Umbraco.Web.UI.Client/src/packages/members/member-type/entity-actions/duplicate/repository/member-type-duplicate.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/members/member-type/entity-actions/duplicate/repository/member-type-duplicate.server.data-source.ts index 31c70f563b..99c6b949a0 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/members/member-type/entity-actions/duplicate/repository/member-type-duplicate.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/members/member-type/entity-actions/duplicate/repository/member-type-duplicate.server.data-source.ts @@ -31,7 +31,7 @@ export class UmbDuplicateMemberTypeServerDataSource implements UmbDuplicateDataS return tryExecute( this.#host, MemberTypeService.postMemberTypeByIdCopy({ - id: args.unique, + path: { id: args.unique }, }), ); } diff --git a/src/Umbraco.Web.UI.Client/src/packages/members/member-type/repository/composition/member-type-composition.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/members/member-type/repository/composition/member-type-composition.server.data-source.ts index d34b4242e9..49705357d2 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/members/member-type/repository/composition/member-type-composition.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/members/member-type/repository/composition/member-type-composition.server.data-source.ts @@ -42,7 +42,7 @@ export class UmbMemberTypeCompositionServerDataSource async getReferences(unique: string) { const response = await tryExecute( this.#host, - MemberTypeService.getMemberTypeByIdCompositionReferences({ id: unique }), + MemberTypeService.getMemberTypeByIdCompositionReferences({ path: { id: unique } }), ); const error = response.error; const data: Array | undefined = response.data?.map((reference) => { @@ -57,22 +57,19 @@ export class UmbMemberTypeCompositionServerDataSource } /** * Updates the compositions for a document type on the server - * @param {MemberTypeCompositionRequestModel} requestBody + * @param {MemberTypeCompositionRequestModel} body * @param args * @returns {*} * @memberof UmbMemberTypeCompositionServerDataSource */ async availableCompositions(args: UmbMemberTypeAvailableCompositionRequestModel) { - const requestBody: MemberTypeCompositionRequestModel = { + const body: MemberTypeCompositionRequestModel = { id: args.unique, currentCompositeIds: args.currentCompositeUniques, currentPropertyAliases: args.currentPropertyAliases, }; - const response = await tryExecute( - this.#host, - MemberTypeService.postMemberTypeAvailableCompositions({ requestBody }), - ); + const response = await tryExecute(this.#host, MemberTypeService.postMemberTypeAvailableCompositions({ body })); const error = response.error; const data: Array | undefined = response.data?.map((composition) => { return { diff --git a/src/Umbraco.Web.UI.Client/src/packages/members/member-type/repository/detail/member-type-detail.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/members/member-type/repository/detail/member-type-detail.server.data-source.ts index a875e32592..1edb55e876 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/members/member-type/repository/detail/member-type-detail.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/members/member-type/repository/detail/member-type-detail.server.data-source.ts @@ -66,7 +66,7 @@ export class UmbMemberTypeServerDataSource implements UmbDetailDataSource) => MemberTypeService.getItemMemberType({ id: uniques }); +const getItems = (uniques: Array) => MemberTypeService.getItemMemberType({ query: { id: uniques } }); const mapper = (item: MemberTypeItemResponseModel): UmbMemberTypeItemModel => { return { diff --git a/src/Umbraco.Web.UI.Client/src/packages/members/member-type/search/member-type-search.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/members/member-type/search/member-type-search.server.data-source.ts index 7e235c5500..fb36db63ae 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/members/member-type/search/member-type-search.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/members/member-type/search/member-type-search.server.data-source.ts @@ -32,7 +32,7 @@ export class UmbMemberTypeSearchServerDataSource implements UmbSearchDataSource< const { data, error } = await tryExecute( this.#host, MemberTypeService.getItemMemberTypeSearch({ - query: args.query, + query: { query: args.query }, }), ); diff --git a/src/Umbraco.Web.UI.Client/src/packages/members/member-type/tree/member-type-tree.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/members/member-type/tree/member-type-tree.server.data-source.ts index 580d2d0a8b..f83401985e 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/members/member-type/tree/member-type-tree.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/members/member-type/tree/member-type-tree.server.data-source.ts @@ -32,7 +32,7 @@ export class UmbMemberTypeTreeServerDataSource extends UmbTreeServerDataSourceBa const getRootItems = (args: UmbTreeRootItemsRequestArgs) => // eslint-disable-next-line local-rules/no-direct-api-import - MemberTypeService.getTreeMemberTypeRoot({ skip: args.skip, take: args.take }); + MemberTypeService.getTreeMemberTypeRoot({ query: { skip: args.skip, take: args.take } }); const getChildrenOf = (args: UmbTreeChildrenOfRequestArgs) => { if (args.parent.unique === null) { diff --git a/src/Umbraco.Web.UI.Client/src/packages/members/member/collection/repository/member-collection.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/members/member/collection/repository/member-collection.server.data-source.ts index 46529a8133..0c9742104d 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/members/member/collection/repository/member-collection.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/members/member/collection/repository/member-collection.server.data-source.ts @@ -31,8 +31,8 @@ export class UmbMemberCollectionServerDataSource implements UmbCollectionDataSou * @returns {*} * @memberof UmbMemberCollectionServerDataSource */ - async getCollection(filter: UmbMemberCollectionFilterModel) { - const { data, error } = await tryExecute(this.#host, MemberService.getFilterMember(filter)); + async getCollection(query: UmbMemberCollectionFilterModel) { + const { data, error } = await tryExecute(this.#host, MemberService.getFilterMember({ query })); if (error) { return { error }; diff --git a/src/Umbraco.Web.UI.Client/src/packages/members/member/item/repository/member-item.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/members/member/item/repository/member-item.server.data-source.ts index 06873cdc3b..2853948b74 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/members/member/item/repository/member-item.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/members/member/item/repository/member-item.server.data-source.ts @@ -28,7 +28,7 @@ export class UmbMemberItemServerDataSource extends UmbItemServerDataSourceBase< } /* eslint-disable local-rules/no-direct-api-import */ -const getItems = (uniques: Array) => MemberService.getItemMember({ id: uniques }); +const getItems = (uniques: Array) => MemberService.getItemMember({ query: { id: uniques } }); const mapper = (item: MemberItemResponseModel): UmbMemberItemModel => { return { diff --git a/src/Umbraco.Web.UI.Client/src/packages/members/member/reference/repository/member-reference.server.data.ts b/src/Umbraco.Web.UI.Client/src/packages/members/member/reference/repository/member-reference.server.data.ts index e3947d8c92..466062f99f 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/members/member/reference/repository/member-reference.server.data.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/members/member/reference/repository/member-reference.server.data.ts @@ -27,7 +27,10 @@ export class UmbMemberReferenceServerDataSource extends UmbControllerBase implem skip: number = 0, take: number = 20, ): Promise>> { - const { data, error } = await tryExecute(this, MemberService.getMemberByIdReferencedBy({ id: unique, skip, take })); + const { data, error } = await tryExecute( + this, + MemberService.getMemberByIdReferencedBy({ path: { id: unique }, query: { skip, take } }), + ); if (data) { const promises = data.items.map(async (item) => { @@ -65,7 +68,10 @@ export class UmbMemberReferenceServerDataSource extends UmbControllerBase implem skip: number = 0, take: number = 20, ): Promise>> { - const { data, error } = await tryExecute(this, MemberService.getMemberAreReferenced({ id: uniques, skip, take })); + const { data, error } = await tryExecute( + this, + MemberService.getMemberAreReferenced({ query: { id: uniques, skip, take } }), + ); if (data) { const items: Array = data.items.map((item) => { @@ -96,7 +102,7 @@ export class UmbMemberReferenceServerDataSource extends UmbControllerBase implem ): Promise>> { const { data, error } = await tryExecute( this, - MemberService.getMemberByIdReferencedDescendants({ id: unique, skip, take }), + MemberService.getMemberByIdReferencedDescendants({ path: { id: unique }, query: { skip, take } }), ); if (data) { diff --git a/src/Umbraco.Web.UI.Client/src/packages/members/member/repository/detail/member-detail.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/members/member/repository/detail/member-detail.server.data-source.ts index f7455cc7a7..50385ea63c 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/members/member/repository/detail/member-detail.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/members/member/repository/detail/member-detail.server.data-source.ts @@ -75,7 +75,7 @@ export class UmbMemberServerDataSource implements UmbDetailDataSource> { if (!model) throw new Error('Member is missing'); if (!model.unique) throw new Error('Member unique is missing'); if (!model.newPassword) throw new Error('Member newPassword is missing'); if (parentUnique === undefined) throw new Error('Parent unique is missing'); // TODO: make data mapper to prevent errors - const requestBody: CreateMemberRequestModel = { + const body: CreateMemberRequestModel = { email: model.email, username: model.username, password: model.newPassword, @@ -43,13 +47,19 @@ export class UmbMemberValidationServerDataSource { variants: model.variants, }; - // Maybe use: tryExecuteAndNotify - return tryExecute( + const { data, error } = await tryExecute( this.#host, MemberService.postMemberValidate({ - requestBody, + body, }), + { disableNotifications: true }, ); + + if (data && typeof data === 'string') { + return { data }; + } + + return { error }; } /** @@ -58,14 +68,17 @@ export class UmbMemberValidationServerDataSource { * @param {Array} variantIds - Variant Ids * @returns {Promise<*>} - The response from the server */ - // eslint-disable-next-line @typescript-eslint/no-unused-vars - async validateUpdate(model: UmbMemberDetailModel, variantIds: Array) { + async validateUpdate( + model: UmbMemberDetailModel, + // eslint-disable-next-line @typescript-eslint/no-unused-vars + variantIds: Array, + ): Promise> { if (!model.unique) throw new Error('Unique is missing'); //const cultures = variantIds.map((id) => id.culture).filter((culture) => culture !== null) as Array; // TODO: make data mapper to prevent errors - const requestBody: UpdateMemberRequestModel = { + const body: UpdateMemberRequestModel = { email: model.email, username: model.username, isApproved: model.isApproved, @@ -76,12 +89,19 @@ export class UmbMemberValidationServerDataSource { }; // Maybe use: tryExecuteAndNotify - return tryExecute( + const { data, error } = await tryExecute( this.#host, MemberService.putMemberByIdValidate({ - id: model.unique, - requestBody, + path: { id: model.unique }, + body, }), + { disableNotifications: true }, ); + + if (data && typeof data === 'string') { + return { data }; + } + + return { error }; } } diff --git a/src/Umbraco.Web.UI.Client/src/packages/members/member/search/member-search.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/members/member/search/member-search.server.data-source.ts index 3f6302e948..0263e8c233 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/members/member/search/member-search.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/members/member/search/member-search.server.data-source.ts @@ -34,8 +34,10 @@ export class UmbMemberSearchServerDataSource const { data, error } = await tryExecute( this.#host, MemberService.getItemMemberSearch({ - query: args.query, - allowedMemberTypes: args.allowedContentTypes?.map((memberReference) => memberReference.unique), + query: { + query: args.query, + allowedMemberTypes: args.allowedContentTypes?.map((memberReference) => memberReference.unique), + }, }), ); diff --git a/src/Umbraco.Web.UI.Client/src/packages/packages/package-builder/workspace/workspace-package-builder.element.ts b/src/Umbraco.Web.UI.Client/src/packages/packages/package-builder/workspace/workspace-package-builder.element.ts index d1429ad544..35b7e95ccc 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/packages/package-builder/workspace/workspace-package-builder.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/packages/package-builder/workspace/workspace-package-builder.element.ts @@ -92,7 +92,7 @@ export class UmbWorkspacePackageBuilderElement extends UmbLitElement { this._submitState = 'waiting'; const unique = await this.#packageRepository.saveCreatedPackage(this._package); - if (!unique) return; + if (!unique || typeof unique !== 'string') return; this._package.unique = unique; this.requestUpdate('_package'); diff --git a/src/Umbraco.Web.UI.Client/src/packages/packages/package-section/views/installed/installed-packages-section-view-item.element.ts b/src/Umbraco.Web.UI.Client/src/packages/packages/package-section/views/installed/installed-packages-section-view-item.element.ts index fdb04b2862..6b6f3a8a2c 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/packages/package-section/views/installed/installed-packages-section-view-item.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/packages/package-section/views/installed/installed-packages-section-view-item.element.ts @@ -93,19 +93,20 @@ export class UmbInstalledPackagesSectionViewItemElement extends UmbLitElement { await umbConfirmModal(this, { color: 'positive', - headline: `Run migrations for ${this.name}?`, - content: `Do you want to start run migrations for ${this.name}`, - confirmLabel: 'Run migrations', + headline: this.name, + content: this.localize.term('packager_packageMigrationsConfirmText'), }); this._migrationButtonState = 'waiting'; - const { error } = await tryExecute(this, PackageService.postPackageByNameRunMigration({ name: this.name })); + const { error } = await tryExecute( + this, + PackageService.postPackageByNameRunMigration({ path: { name: this.name } }), + ); if (error) return; this.#notificationContext?.peek('positive', { data: { - headline: 'Migrations completed', message: this.localize.term('packager_packageMigrationsComplete'), }, }); @@ -130,9 +131,7 @@ export class UmbInstalledPackagesSectionViewItemElement extends UmbLitElement { .state=${this._migrationButtonState} color="warning" look="primary" - label=${this.localize.term('packageMigrationsRun')}> - Run pending migrations - ` + label=${this.localize.term('packageMigrationsRun')}>` : nothing} diff --git a/src/Umbraco.Web.UI.Client/src/packages/packages/package/repository/package.repository.ts b/src/Umbraco.Web.UI.Client/src/packages/packages/package/repository/package.repository.ts index df5de6c1d9..0d0282c205 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/packages/package/repository/package.repository.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/packages/package/repository/package.repository.ts @@ -3,20 +3,19 @@ import { UMB_PACKAGE_STORE_TOKEN } from './package.store.context-token.js'; import { UmbPackageServerDataSource } from './sources/package.server.data.js'; import type { UmbPackageStore } from './package.store.js'; import { isManifestBaseType } from '@umbraco-cms/backoffice/extension-api'; -import { OpenAPI } from '@umbraco-cms/backoffice/external/backend-api'; import { UmbControllerBase } from '@umbraco-cms/backoffice/class-api'; import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api'; import type { UmbApi, ManifestBase } from '@umbraco-cms/backoffice/extension-api'; +import { UMB_SERVER_CONTEXT } from '@umbraco-cms/backoffice/server'; /** * A repository for Packages which mimics a tree store. - + */ export class UmbPackageRepository extends UmbControllerBase implements UmbApi { #init!: Promise; #packageStore?: UmbPackageStore; #packageSource: UmbPackageServerDataSource; - #apiBaseUrl = OpenAPI.BASE; constructor(host: UmbControllerHost) { super(host); @@ -111,6 +110,14 @@ export class UmbPackageRepository extends UmbControllerBase implements UmbApi { store.appendItems(packages.filter((p) => p.name?.length)); const extensions: ManifestBase[] = []; + const serverContext = await this.getContext(UMB_SERVER_CONTEXT); + + if (!serverContext) { + return; + } + + const serverUrl = serverContext.getServerUrl(); + packages.forEach((p) => { p.extensions?.forEach((e) => { // Crudely validate that the extension at least follows a basic manifest structure @@ -122,17 +129,17 @@ export class UmbPackageRepository extends UmbControllerBase implements UmbApi { */ // Add base url if the js path is relative if ('js' in e && typeof e.js === 'string' && !e.js.startsWith('http')) { - e.js = `${this.#apiBaseUrl}${e.js}`; + e.js = `${serverUrl}${e.js}`; } // Add base url if the element path is relative if ('element' in e && typeof e.element === 'string' && !e.element.startsWith('http')) { - e.element = `${this.#apiBaseUrl}${e.element}`; + e.element = `${serverUrl}${e.element}`; } // Add base url if the element path api relative if ('api' in e && typeof e.api === 'string' && !e.api.startsWith('http')) { - e.api = `${this.#apiBaseUrl}${e.api}`; + e.api = `${serverUrl}${e.api}`; } extensions.push(e); diff --git a/src/Umbraco.Web.UI.Client/src/packages/packages/package/repository/sources/package.server.data.ts b/src/Umbraco.Web.UI.Client/src/packages/packages/package/repository/sources/package.server.data.ts index 80c0247c28..36d47fbe37 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/packages/package/repository/sources/package.server.data.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/packages/package/repository/sources/package.server.data.ts @@ -2,7 +2,7 @@ import { tryExecute } from '@umbraco-cms/backoffice/resources'; import { ManifestService, PackageService } from '@umbraco-cms/backoffice/external/backend-api'; import type { CreatePackageRequestModel, - UpdatePackageRequestModel, + UpdatePackageRequestModelWritable, } from '@umbraco-cms/backoffice/external/backend-api'; import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api'; @@ -14,19 +14,19 @@ export class UmbPackageServerDataSource { constructor(private readonly host: UmbControllerHost) {} async deleteCreatedPackage(unique: string) { - return await tryExecute(this.host, PackageService.deletePackageCreatedById({ id: unique })); + return await tryExecute(this.host, PackageService.deletePackageCreatedById({ path: { id: unique } })); } getCreatedPackage(unique: string) { - return tryExecute(this.host, PackageService.getPackageCreatedById({ id: unique })); + return tryExecute(this.host, PackageService.getPackageCreatedById({ path: { id: unique } })); } getCreatedPackages({ skip, take }: { skip: number; take: number }) { - return tryExecute(this.host, PackageService.getPackageCreated({ skip, take })); + return tryExecute(this.host, PackageService.getPackageCreated({ query: { skip, take } })); } getCreatePackageDownload(unique: string) { - return tryExecute(this.host, PackageService.getPackageCreatedByIdDownload({ id: unique })); + return tryExecute(this.host, PackageService.getPackageCreatedByIdDownload({ path: { id: unique } })); } /** @@ -50,14 +50,14 @@ export class UmbPackageServerDataSource { * @memberof UmbPackageServerDataSource */ getPackageMigrations() { - return tryExecute(this.host, PackageService.getPackageMigrationStatus({ skip: 0, take: 9999 })); + return tryExecute(this.host, PackageService.getPackageMigrationStatus({ query: { skip: 0, take: 9999 } })); } - async saveCreatedPackage(requestBody: CreatePackageRequestModel) { - return await tryExecute(this.host, PackageService.postPackageCreated({ requestBody })); + async saveCreatedPackage(body: CreatePackageRequestModel) { + return await tryExecute(this.host, PackageService.postPackageCreated({ body })); } - async updateCreatedPackage(id: string, requestBody: UpdatePackageRequestModel) { - return await tryExecute(this.host, PackageService.putPackageCreatedById({ id, requestBody })); + async updateCreatedPackage(id: string, body: UpdatePackageRequestModelWritable) { + return await tryExecute(this.host, PackageService.putPackageCreatedById({ path: { id }, body })); } } diff --git a/src/Umbraco.Web.UI.Client/src/packages/performance-profiling/dashboard-performance-profiling.element.ts b/src/Umbraco.Web.UI.Client/src/packages/performance-profiling/dashboard-performance-profiling.element.ts index 5146c27e5f..b850464cb9 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/performance-profiling/dashboard-performance-profiling.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/performance-profiling/dashboard-performance-profiling.element.ts @@ -35,7 +35,7 @@ export class UmbDashboardPerformanceProfilingElement extends UmbLitElement { private async _changeProfilingStatus() { const { error } = await tryExecute( this, - ProfilingService.putProfilingStatus({ requestBody: { enabled: !this._profilingStatus } }), + ProfilingService.putProfilingStatus({ body: { enabled: !this._profilingStatus } }), ); if (error) { diff --git a/src/Umbraco.Web.UI.Client/src/packages/property-editors/content-picker/dynamic-root/repository/dynamic-root.server.data.ts b/src/Umbraco.Web.UI.Client/src/packages/property-editors/content-picker/dynamic-root/repository/dynamic-root.server.data.ts index 2b0b928d27..4490c42a0c 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/property-editors/content-picker/dynamic-root/repository/dynamic-root.server.data.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/property-editors/content-picker/dynamic-root/repository/dynamic-root.server.data.ts @@ -24,12 +24,12 @@ export class UmbContentPickerDynamicRootServerDataSource { if (!args.context) throw new Error('Dynamic Root context is missing'); if (!args.query) throw new Error('Dynamic Root query is missing'); - const requestBody: DynamicRootRequestModel = { + const body: DynamicRootRequestModel = { context: args.context, query: args.query, }; - const { data } = await tryExecute(this.#host, DynamicRootService.postDynamicRootQuery({ requestBody })); + const { data } = await tryExecute(this.#host, DynamicRootService.postDynamicRootQuery({ body })); return data; } diff --git a/src/Umbraco.Web.UI.Client/src/packages/relations/relation-types/collection/repository/relation-type-collection.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/relations/relation-types/collection/repository/relation-type-collection.server.data-source.ts index 5a9e7d8845..b0664df725 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/relations/relation-types/collection/repository/relation-type-collection.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/relations/relation-types/collection/repository/relation-type-collection.server.data-source.ts @@ -30,7 +30,15 @@ export class UmbRelationTypeCollectionServerDataSource implements UmbCollectionD * @memberof UmbRelationTypeCollectionServerDataSource */ async getCollection(filter: UmbRelationTypeCollectionFilterModel) { - const { data, error } = await tryExecute(this.#host, RelationTypeService.getRelationType(filter)); + const { data, error } = await tryExecute( + this.#host, + RelationTypeService.getRelationType({ + query: { + skip: filter.skip, + take: filter.take, + }, + }), + ); if (data) { const items = data.items.map((item) => { diff --git a/src/Umbraco.Web.UI.Client/src/packages/relations/relation-types/repository/detail/relation-type-detail.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/relations/relation-types/repository/detail/relation-type-detail.server.data-source.ts index 180dd186f6..29ec85a77f 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/relations/relation-types/repository/detail/relation-type-detail.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/relations/relation-types/repository/detail/relation-type-detail.server.data-source.ts @@ -31,7 +31,10 @@ export class UmbRelationTypeDetailServerDataSource implements UmbReadDetailDataS async read(unique: string) { if (!unique) throw new Error('Unique is missing'); - const { data, error } = await tryExecute(this.#host, RelationTypeService.getRelationTypeById({ id: unique })); + const { data, error } = await tryExecute( + this.#host, + RelationTypeService.getRelationTypeById({ path: { id: unique } }), + ); if (error || !data) { return { error }; diff --git a/src/Umbraco.Web.UI.Client/src/packages/relations/relations/collection/repository/relation-collection.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/relations/relations/collection/repository/relation-collection.server.data-source.ts index f88f87ce9f..54a0877a09 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/relations/relations/collection/repository/relation-collection.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/relations/relations/collection/repository/relation-collection.server.data-source.ts @@ -30,13 +30,16 @@ export class UmbRelationCollectionServerDataSource implements UmbCollectionDataS * @memberof UmbRelationCollectionServerDataSource */ async getCollection(filter: UmbRelationCollectionFilterModel) { - const requestBody = { - skip: filter.skip, - take: filter.take, - id: filter.relationType.unique, - }; - - const { data, error } = await tryExecute(this.#host, RelationService.getRelationByRelationTypeId(requestBody)); + const { data, error } = await tryExecute( + this.#host, + RelationService.getRelationByRelationTypeId({ + path: { id: filter.relationType.unique }, + query: { + skip: filter.skip, + take: filter.take, + }, + }), + ); if (data) { const items = data.items.map((item) => { diff --git a/src/Umbraco.Web.UI.Client/src/packages/search/examine-management-dashboard/modal/fields-viewer/examine-fields-viewer-modal.token.ts b/src/Umbraco.Web.UI.Client/src/packages/search/examine-management-dashboard/modal/fields-viewer/examine-fields-viewer-modal.token.ts index c0bea59bfe..87be61af65 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/search/examine-management-dashboard/modal/fields-viewer/examine-fields-viewer-modal.token.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/search/examine-management-dashboard/modal/fields-viewer/examine-fields-viewer-modal.token.ts @@ -1,9 +1,9 @@ -import type { SearchResultResponseModel } from '@umbraco-cms/backoffice/external/backend-api'; +import type { UmbSearchResultModel } from '../../../types.js'; import { UmbModalToken } from '@umbraco-cms/backoffice/modal'; export type UmbExamineFieldsViewerModalData = { name: string; - searchResult: SearchResultResponseModel; + searchResult: UmbSearchResultModel; }; export type UmbExamineFieldsViewerModalValue = never; diff --git a/src/Umbraco.Web.UI.Client/src/packages/search/examine-management-dashboard/views/section-view-examine-indexers.ts b/src/Umbraco.Web.UI.Client/src/packages/search/examine-management-dashboard/views/section-view-examine-indexers.ts index 16085ebee4..adce05d05b 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/search/examine-management-dashboard/views/section-view-examine-indexers.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/search/examine-management-dashboard/views/section-view-examine-indexers.ts @@ -40,7 +40,10 @@ export class UmbDashboardExamineIndexElement extends UmbLitElement { } async #getIndexData() { - const { data } = await tryExecute(this, IndexerService.getIndexerByIndexName({ indexName: this.indexName })); + const { data } = await tryExecute( + this, + IndexerService.getIndexerByIndexName({ path: { indexName: this.indexName } }), + ); return data; } @@ -75,7 +78,7 @@ export class UmbDashboardExamineIndexElement extends UmbLitElement { this._buttonState = 'waiting'; const { error } = await tryExecute( this, - IndexerService.postIndexerByIndexNameRebuild({ indexName: this.indexName }), + IndexerService.postIndexerByIndexNameRebuild({ path: { indexName: this.indexName } }), ); if (error) { this._buttonState = 'failed'; diff --git a/src/Umbraco.Web.UI.Client/src/packages/search/examine-management-dashboard/views/section-view-examine-overview.ts b/src/Umbraco.Web.UI.Client/src/packages/search/examine-management-dashboard/views/section-view-examine-overview.ts index 34af67599a..ac6cfca735 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/search/examine-management-dashboard/views/section-view-examine-overview.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/search/examine-management-dashboard/views/section-view-examine-overview.ts @@ -28,14 +28,14 @@ export class UmbDashboardExamineOverviewElement extends UmbLitElement { private async _getIndexers() { this._loadingIndexers = true; - const { data } = await tryExecute(this, IndexerService.getIndexer({ take: 9999, skip: 0 })); + const { data } = await tryExecute(this, IndexerService.getIndexer({ query: { take: 9999, skip: 0 } })); this._indexers = data?.items ?? []; this._loadingIndexers = false; } private async _getSearchers() { this._loadingSearchers = true; - const { data } = await tryExecute(this, SearcherService.getSearcher({ take: 9999, skip: 0 })); + const { data } = await tryExecute(this, SearcherService.getSearcher({ query: { take: 9999, skip: 0 } })); this._searchers = data?.items ?? []; this._loadingSearchers = false; } diff --git a/src/Umbraco.Web.UI.Client/src/packages/search/examine-management-dashboard/views/section-view-examine-searchers.ts b/src/Umbraco.Web.UI.Client/src/packages/search/examine-management-dashboard/views/section-view-examine-searchers.ts index 181f2f76fa..3e31005701 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/search/examine-management-dashboard/views/section-view-examine-searchers.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/search/examine-management-dashboard/views/section-view-examine-searchers.ts @@ -1,10 +1,10 @@ +import type { UmbSearchFieldPresentationModel, UmbSearchResultModel } from '../../types.js'; import { UMB_EXAMINE_FIELDS_SETTINGS_MODAL, UMB_EXAMINE_FIELDS_VIEWER_MODAL } from '../modal/constants.js'; import { UmbTextStyles } from '@umbraco-cms/backoffice/style'; import { css, html, nothing, customElement, state, query, property } from '@umbraco-cms/backoffice/external/lit'; import { umbOpenModal } from '@umbraco-cms/backoffice/modal'; import { UMB_WORKSPACE_MODAL } from '@umbraco-cms/backoffice/workspace'; import { UmbModalRouteRegistrationController } from '@umbraco-cms/backoffice/router'; -import type { SearchResultResponseModel, FieldPresentationModel } from '@umbraco-cms/backoffice/external/backend-api'; import { SearcherService } from '@umbraco-cms/backoffice/external/backend-api'; import { UmbLitElement, umbFocus } from '@umbraco-cms/backoffice/lit-element'; import { tryExecute } from '@umbraco-cms/backoffice/resources'; @@ -20,7 +20,7 @@ export class UmbDashboardExamineSearcherElement extends UmbLitElement { searcherName!: string; @state() - private _searchResults?: SearchResultResponseModel[]; + private _searchResults?: UmbSearchResultModel[]; @state() private _exposedFields?: ExposedSearchResultField[]; @@ -61,10 +61,12 @@ export class UmbDashboardExamineSearcherElement extends UmbLitElement { const { data } = await tryExecute( this, SearcherService.getSearcherBySearcherNameQuery({ - searcherName: this.searcherName, - term: this._searchInput.value, - take: 100, - skip: 0, + path: { searcherName: this.searcherName }, + query: { + term: this._searchInput.value, + take: 100, + skip: 0, + }, }), ); @@ -103,7 +105,7 @@ export class UmbDashboardExamineSearcherElement extends UmbLitElement { this._exposedFields = value?.fields; } - async #onFieldViewClick(rowData: SearchResultResponseModel) { + async #onFieldViewClick(rowData: UmbSearchResultModel) { await umbOpenModal(this, UMB_EXAMINE_FIELDS_VIEWER_MODAL, { modal: { type: 'sidebar', @@ -142,7 +144,7 @@ export class UmbDashboardExamineSearcherElement extends UmbLitElement { } // Find the field named 'nodeName' and return its value if it exists in the fields array - private getSearchResultNodeName(searchResult: SearchResultResponseModel): string { + private getSearchResultNodeName(searchResult: UmbSearchResultModel): string { const nodeNameField = searchResult.fields?.find((field) => field.name?.toUpperCase() === 'NODENAME'); return nodeNameField?.values?.join(', ') ?? ''; } @@ -236,7 +238,7 @@ export class UmbDashboardExamineSearcherElement extends UmbLitElement { })}`; } - renderBodyCells(cellData: FieldPresentationModel[]) { + renderBodyCells(cellData: UmbSearchFieldPresentationModel[]) { return html`${this._exposedFields?.map((slot) => { return cellData.map((field) => { return slot.exposed && field.name == slot.name diff --git a/src/Umbraco.Web.UI.Client/src/packages/search/types.ts b/src/Umbraco.Web.UI.Client/src/packages/search/types.ts index a6e917353a..176c261cae 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/search/types.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/search/types.ts @@ -1,5 +1,9 @@ import type { UmbEntityModel } from '@umbraco-cms/backoffice/entity'; import type { UmbApi } from '@umbraco-cms/backoffice/extension-api'; +import type { + FieldPresentationModel, + SearchResultResponseModelReadable, +} from '@umbraco-cms/backoffice/external/backend-api'; import type { UmbPagedModel, UmbRepositoryResponse } from '@umbraco-cms/backoffice/repository'; export type { UmbSearchDataSource } from './search-data-source.interface.js'; @@ -7,6 +11,8 @@ export type { UmbSearchRepository } from './search-repository.interface.js'; export type * from './extensions/types.js'; +export type UmbSearchResultModel = SearchResultResponseModelReadable; + // TODO: lower requirement for search provider item type export type UmbSearchResultItemModel = { entityType: string; @@ -21,6 +27,8 @@ export type UmbSearchRequestArgs = { searchFrom?: UmbEntityModel; }; +export type UmbSearchFieldPresentationModel = FieldPresentationModel; + export interface UmbSearchProvider< SearchResultItemType extends UmbSearchResultItemModel = UmbSearchResultItemModel, SearchRequestArgsType extends UmbSearchRequestArgs = UmbSearchRequestArgs, diff --git a/src/Umbraco.Web.UI.Client/src/packages/static-file/repository/item/static-file-item.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/static-file/repository/item/static-file-item.server.data-source.ts index 6a00d425e9..3eba1cef8b 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/static-file/repository/item/static-file-item.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/static-file/repository/item/static-file-item.server.data-source.ts @@ -32,7 +32,7 @@ const getItems = (uniques: Array) => { const path = uniques.map((unique) => serializer.toServerPath(unique)!); /* eslint-disable local-rules/no-direct-api-import */ - return StaticFileService.getItemStaticFile({ path }); + return StaticFileService.getItemStaticFile({ query: { path } }); }; const mapper = (item: StaticFileItemResponseModel): UmbStaticFileItemModel => { diff --git a/src/Umbraco.Web.UI.Client/src/packages/static-file/tree/static-file-tree.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/static-file/tree/static-file-tree.server.data-source.ts index f80becfed9..05f9cb5e87 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/static-file/tree/static-file-tree.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/static-file/tree/static-file-tree.server.data-source.ts @@ -43,7 +43,7 @@ export class UmbStaticFileTreeServerDataSource extends UmbTreeServerDataSourceBa const getRootItems = (args: UmbTreeRootItemsRequestArgs) => // eslint-disable-next-line local-rules/no-direct-api-import - StaticFileService.getTreeStaticFileRoot({ skip: args.skip, take: args.take }); + StaticFileService.getTreeStaticFileRoot({ query: { skip: args.skip, take: args.take } }); const getChildrenOf = (args: UmbTreeChildrenOfRequestArgs) => { const parentPath = new UmbServerFilePathUniqueSerializer().toServerPath(args.parent.unique); @@ -53,9 +53,7 @@ const getChildrenOf = (args: UmbTreeChildrenOfRequestArgs) => { } else { // eslint-disable-next-line local-rules/no-direct-api-import return StaticFileService.getTreeStaticFileChildren({ - parentPath, - skip: args.skip, - take: args.take, + query: { parentPath, skip: args.skip, take: args.take }, }); } }; @@ -63,7 +61,7 @@ const getChildrenOf = (args: UmbTreeChildrenOfRequestArgs) => { const getAncestorsOf = (args: UmbTreeAncestorsOfRequestArgs) => // eslint-disable-next-line local-rules/no-direct-api-import StaticFileService.getTreeStaticFileAncestors({ - descendantPath: args.treeItem.unique, + query: { descendantPath: args.treeItem.unique }, }); const mapper = (item: FileSystemTreeItemPresentationModel): UmbStaticFileTreeItemModel => { diff --git a/src/Umbraco.Web.UI.Client/src/packages/tags/repository/sources/tag.server.data.ts b/src/Umbraco.Web.UI.Client/src/packages/tags/repository/sources/tag.server.data.ts index dfef822fb7..0b532da357 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/tags/repository/sources/tag.server.data.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/tags/repository/sources/tag.server.data.ts @@ -43,6 +43,6 @@ export class UmbTagServerDataSource { tagGroup?: string; culture?: string; }) { - return tryExecute(this.#host, TagService.getTag({ query, skip, take, tagGroup, culture })); + return tryExecute(this.#host, TagService.getTag({ query: { query, skip, take, tagGroup, culture } })); } } diff --git a/src/Umbraco.Web.UI.Client/src/packages/telemetry/dashboard-telemetry.element.ts b/src/Umbraco.Web.UI.Client/src/packages/telemetry/dashboard-telemetry.element.ts index 2b16da0871..6f8b27fd1a 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/telemetry/dashboard-telemetry.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/telemetry/dashboard-telemetry.element.ts @@ -26,7 +26,7 @@ export class UmbDashboardTelemetryElement extends UmbLitElement { } private async _setup() { - const telemetryLevels = await tryExecute(this, TelemetryService.getTelemetry({ skip: 0, take: 3 })); + const telemetryLevels = await tryExecute(this, TelemetryService.getTelemetry({ query: { skip: 0, take: 3 } })); this._telemetryLevels = telemetryLevels.data?.items ?? []; const telemetryLevel = await tryExecute(this, TelemetryService.getTelemetryLevel()); @@ -41,7 +41,7 @@ export class UmbDashboardTelemetryElement extends UmbLitElement { const { error } = await tryExecute( this, TelemetryService.postTelemetryLevel({ - requestBody: { telemetryLevel: this._telemetryFormData }, + body: { telemetryLevel: this._telemetryFormData }, }), ); diff --git a/src/Umbraco.Web.UI.Client/src/packages/templating/partial-views/entity-actions/create/options-modal/partial-view-create-options-modal.element.ts b/src/Umbraco.Web.UI.Client/src/packages/templating/partial-views/entity-actions/create/options-modal/partial-view-create-options-modal.element.ts index 4911002b2e..5324bffcca 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/templating/partial-views/entity-actions/create/options-modal/partial-view-create-options-modal.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/templating/partial-views/entity-actions/create/options-modal/partial-view-create-options-modal.element.ts @@ -21,7 +21,7 @@ export class UmbPartialViewCreateOptionsModalElement extends UmbModalBaseElement entityType: this.data.parent.entityType, meta: { icon: 'icon-folder', - label: 'New folder...', + label: this.localize.term('create_newFolder') + '...', folderRepositoryAlias: UMB_PARTIAL_VIEW_FOLDER_REPOSITORY_ALIAS, }, }); @@ -65,20 +65,29 @@ export class UmbPartialViewCreateOptionsModalElement extends UmbModalBaseElement - + - + - + - Cancel + `; } diff --git a/src/Umbraco.Web.UI.Client/src/packages/templating/partial-views/entity-actions/create/snippet-modal/create-from-snippet-modal.ts b/src/Umbraco.Web.UI.Client/src/packages/templating/partial-views/entity-actions/create/snippet-modal/create-from-snippet-modal.ts index 396b2e9208..2229bb8409 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/templating/partial-views/entity-actions/create/snippet-modal/create-from-snippet-modal.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/templating/partial-views/entity-actions/create/snippet-modal/create-from-snippet-modal.ts @@ -25,16 +25,18 @@ export class UmbPartialViewCreateFromSnippetModalElement extends UmbModalBaseEle } protected override async firstUpdated() { - const { data } = await tryExecute(this, PartialViewService.getPartialViewSnippet({ take: 10000 })); + const { data } = await tryExecute(this, PartialViewService.getPartialViewSnippet({ query: { take: 10000 } })); - if (data) { - this._snippets = data.items.map((snippet) => { - return { - name: snippet.name, - path: this.#getCreateHref(snippet), - }; - }); + if (!data) { + return; } + + this._snippets = data.items.map((snippet) => { + return { + name: snippet.name, + path: this.#getCreateHref(snippet), + }; + }); } // close the modal when navigating to data type @@ -44,7 +46,7 @@ export class UmbPartialViewCreateFromSnippetModalElement extends UmbModalBaseEle override render() { return html` - + ${this._snippets.map( (snippet) => @@ -53,7 +55,11 @@ export class UmbPartialViewCreateFromSnippetModalElement extends UmbModalBaseEle >`, )} - Close + `; } diff --git a/src/Umbraco.Web.UI.Client/src/packages/templating/partial-views/entity-actions/rename/rename-partial-view.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/templating/partial-views/entity-actions/rename/rename-partial-view.server.data-source.ts index 5128a36559..abdc3e5139 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/templating/partial-views/entity-actions/rename/rename-partial-view.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/templating/partial-views/entity-actions/rename/rename-partial-view.server.data-source.ts @@ -32,19 +32,19 @@ export class UmbRenamePartialViewServerDataSource { const path = this.#serverFilePathUniqueSerializer.toServerPath(unique); if (!path) throw new Error('Path is missing'); - const requestBody: RenameStylesheetRequestModel = { + const body: RenameStylesheetRequestModel = { name: appendFileExtensionIfNeeded(name, '.cshtml'), }; const { data, error } = await tryExecute( this.#host, PartialViewService.putPartialViewByPathRename({ - path: encodeURIComponent(path), - requestBody, + path: { path: encodeURIComponent(path) }, + body, }), ); - if (data) { + if (data && typeof data === 'string') { const newPath = decodeURIComponent(data); const newPathUnique = this.#serverFilePathUniqueSerializer.toUnique(newPath); return this.#detailDataSource.read(newPathUnique); diff --git a/src/Umbraco.Web.UI.Client/src/packages/templating/partial-views/repository/item/partial-view-item.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/templating/partial-views/repository/item/partial-view-item.server.data-source.ts index 46997b7747..b1abb4cdbe 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/templating/partial-views/repository/item/partial-view-item.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/templating/partial-views/repository/item/partial-view-item.server.data-source.ts @@ -43,7 +43,7 @@ export class UmbPartialViewItemServerDataSource implements UmbItemDataSource // eslint-disable-next-line local-rules/no-direct-api-import - PartialViewService.getTreePartialViewRoot({ skip: args.skip, take: args.take }); + PartialViewService.getTreePartialViewRoot({ query: { skip: args.skip, take: args.take } }); const getChildrenOf = (args: UmbTreeChildrenOfRequestArgs) => { const parentPath = new UmbServerFilePathUniqueSerializer().toServerPath(args.parent.unique); @@ -51,9 +51,7 @@ const getChildrenOf = (args: UmbTreeChildrenOfRequestArgs) => { } else { // eslint-disable-next-line local-rules/no-direct-api-import return PartialViewService.getTreePartialViewChildren({ - parentPath, - skip: args.skip, - take: args.take, + query: { parentPath, skip: args.skip, take: args.take }, }); } }; @@ -64,7 +62,7 @@ const getAncestorsOf = (args: UmbTreeAncestorsOfRequestArgs) => { // eslint-disable-next-line local-rules/no-direct-api-import return PartialViewService.getTreePartialViewAncestors({ - descendantPath, + query: { descendantPath }, }); }; diff --git a/src/Umbraco.Web.UI.Client/src/packages/templating/partial-views/workspace/partial-view-workspace.context.ts b/src/Umbraco.Web.UI.Client/src/packages/templating/partial-views/workspace/partial-view-workspace.context.ts index a9948c74c8..2c3636083e 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/templating/partial-views/workspace/partial-view-workspace.context.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/templating/partial-views/workspace/partial-view-workspace.context.ts @@ -115,7 +115,7 @@ export class UmbPartialViewWorkspaceContext return tryExecute( this, PartialViewService.getPartialViewSnippetById({ - id: unique, + path: { id: unique }, }), ); } diff --git a/src/Umbraco.Web.UI.Client/src/packages/templating/scripts/entity-actions/rename/rename-script.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/templating/scripts/entity-actions/rename/rename-script.server.data-source.ts index 13202d2666..eb9a6c0ec0 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/templating/scripts/entity-actions/rename/rename-script.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/templating/scripts/entity-actions/rename/rename-script.server.data-source.ts @@ -32,19 +32,19 @@ export class UmbRenameScriptServerDataSource { const path = this.#serverFilePathUniqueSerializer.toServerPath(unique); if (!path) throw new Error('Path is missing'); - const requestBody: RenameStylesheetRequestModel = { + const body: RenameStylesheetRequestModel = { name: appendFileExtensionIfNeeded(name, '.js'), }; const { data, error } = await tryExecute( this.#host, ScriptService.putScriptByPathRename({ - path: encodeURIComponent(path), - requestBody, + path: { path: encodeURIComponent(path) }, + body, }), ); - if (data) { + if (data && typeof data === 'string') { const newPath = decodeURIComponent(data); const newPathUnique = this.#serverFilePathUniqueSerializer.toUnique(newPath); return this.#detailDataSource.read(newPathUnique); diff --git a/src/Umbraco.Web.UI.Client/src/packages/templating/scripts/repository/item/script-item.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/templating/scripts/repository/item/script-item.server.data-source.ts index 247a1b0680..6c9f9e11f0 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/templating/scripts/repository/item/script-item.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/templating/scripts/repository/item/script-item.server.data-source.ts @@ -43,7 +43,7 @@ export class UmbScriptItemServerDataSource implements UmbItemDataSource} */ export class UmbScriptFolderServerDataSource implements UmbDetailDataSource { #host: UmbControllerHost; @@ -58,7 +58,7 @@ export class UmbScriptFolderServerDataSource implements UmbDetailDataSource // eslint-disable-next-line local-rules/no-direct-api-import - ScriptService.getTreeScriptRoot({ skip: args.skip, take: args.take }); + ScriptService.getTreeScriptRoot({ query: { skip: args.skip, take: args.take } }); const getChildrenOf = (args: UmbTreeChildrenOfRequestArgs) => { const parentPath = new UmbServerFilePathUniqueSerializer().toServerPath(args.parent.unique); @@ -47,9 +47,7 @@ const getChildrenOf = (args: UmbTreeChildrenOfRequestArgs) => { } else { // eslint-disable-next-line local-rules/no-direct-api-import return ScriptService.getTreeScriptChildren({ - parentPath, - skip: args.skip, - take: args.take, + query: { parentPath, skip: args.skip, take: args.take }, }); } }; @@ -60,7 +58,7 @@ const getAncestorsOf = (args: UmbTreeAncestorsOfRequestArgs) => { // eslint-disable-next-line local-rules/no-direct-api-import return ScriptService.getTreeScriptAncestors({ - descendantPath, + query: { descendantPath }, }); }; diff --git a/src/Umbraco.Web.UI.Client/src/packages/templating/stylesheets/entity-actions/rename/rename-stylesheet.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/templating/stylesheets/entity-actions/rename/rename-stylesheet.server.data-source.ts index 3209871a52..32df944f70 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/templating/stylesheets/entity-actions/rename/rename-stylesheet.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/templating/stylesheets/entity-actions/rename/rename-stylesheet.server.data-source.ts @@ -32,19 +32,19 @@ export class UmbRenameStylesheetServerDataSource { const path = this.#serverFilePathUniqueSerializer.toServerPath(unique); if (!path) throw new Error('Path is missing'); - const requestBody: RenameStylesheetRequestModel = { + const body: RenameStylesheetRequestModel = { name: appendFileExtensionIfNeeded(name, '.css'), }; const { data, error } = await tryExecute( this.#host, StylesheetService.putStylesheetByPathRename({ - path: encodeURIComponent(path), - requestBody, + path: { path: encodeURIComponent(path) }, + body, }), ); - if (data) { + if (data && typeof data === 'string') { const newPath = decodeURIComponent(data); const newPathUnique = this.#serverFilePathUniqueSerializer.toUnique(newPath); return this.#detailDataSource.read(newPathUnique); diff --git a/src/Umbraco.Web.UI.Client/src/packages/templating/stylesheets/repository/item/stylesheet-item.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/templating/stylesheets/repository/item/stylesheet-item.server.data-source.ts index 3e0f523a00..a563d999cd 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/templating/stylesheets/repository/item/stylesheet-item.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/templating/stylesheets/repository/item/stylesheet-item.server.data-source.ts @@ -43,7 +43,7 @@ export class UmbStylesheetItemServerDataSource implements UmbItemDataSource // eslint-disable-next-line local-rules/no-direct-api-import - StylesheetService.getTreeStylesheetRoot({ skip: args.skip, take: args.take }); + StylesheetService.getTreeStylesheetRoot({ query: { skip: args.skip, take: args.take } }); const getChildrenOf = (args: UmbTreeChildrenOfRequestArgs) => { const parentPath = new UmbServerFilePathUniqueSerializer().toServerPath(args.parent.unique); @@ -51,9 +51,7 @@ const getChildrenOf = (args: UmbTreeChildrenOfRequestArgs) => { } else { // eslint-disable-next-line local-rules/no-direct-api-import return StylesheetService.getTreeStylesheetChildren({ - parentPath, - skip: args.skip, - take: args.take, + query: { parentPath, skip: args.skip, take: args.take }, }); } }; @@ -64,7 +62,7 @@ const getAncestorsOf = (args: UmbTreeAncestorsOfRequestArgs) => { // eslint-disable-next-line local-rules/no-direct-api-import return StylesheetService.getTreeStylesheetAncestors({ - descendantPath, + query: { descendantPath }, }); }; diff --git a/src/Umbraco.Web.UI.Client/src/packages/templating/templates/repository/detail/template-detail.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/templating/templates/repository/detail/template-detail.server.data-source.ts index 7bcbeb500a..c6920483d7 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/templating/templates/repository/detail/template-detail.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/templating/templates/repository/detail/template-detail.server.data-source.ts @@ -59,7 +59,7 @@ export class UmbTemplateServerDataSource implements UmbDetailDataSource) => TemplateService.getItemTemplate({ id: uniques }); +const getItems = (uniques: Array) => TemplateService.getItemTemplate({ query: { id: uniques } }); const mapper = (item: TemplateItemResponseModel): UmbTemplateItemModel => { return { diff --git a/src/Umbraco.Web.UI.Client/src/packages/templating/templates/repository/query/template-query.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/templating/templates/repository/query/template-query.server.data-source.ts index 78c9b2a408..9580938170 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/templating/templates/repository/query/template-query.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/templating/templates/repository/query/template-query.server.data-source.ts @@ -37,7 +37,7 @@ export class UmbTemplateQueryServerDataSource { * @memberof UmbTemplateQueryServerDataSource */ async executeTemplateQuery(args: UmbExecuteTemplateQueryRequestModel) { - const requestBody: TemplateQueryExecuteModel = { + const body: TemplateQueryExecuteModel = { rootDocument: args.rootDocument ? { id: args.rootDocument.unique } : null, documentTypeAlias: args.documentTypeAlias, filters: args.filters, @@ -45,6 +45,6 @@ export class UmbTemplateQueryServerDataSource { take: args.take, }; - return tryExecute(this.#host, TemplateService.postTemplateQueryExecute({ requestBody })); + return tryExecute(this.#host, TemplateService.postTemplateQueryExecute({ body })); } } diff --git a/src/Umbraco.Web.UI.Client/src/packages/templating/templates/search/template-search.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/templating/templates/search/template-search.server.data-source.ts index 82109f2762..2638588b8b 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/templating/templates/search/template-search.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/templating/templates/search/template-search.server.data-source.ts @@ -32,7 +32,7 @@ export class UmbTemplateSearchServerDataSource implements UmbSearchDataSource // eslint-disable-next-line local-rules/no-direct-api-import - TemplateService.getTreeTemplateRoot({ skip: args.skip, take: args.take }); + TemplateService.getTreeTemplateRoot({ query: { skip: args.skip, take: args.take } }); const getChildrenOf = (args: UmbTreeChildrenOfRequestArgs) => { if (args.parent.unique === null) { @@ -47,9 +47,7 @@ const getChildrenOf = (args: UmbTreeChildrenOfRequestArgs) => { } else { // eslint-disable-next-line local-rules/no-direct-api-import return TemplateService.getTreeTemplateChildren({ - parentId: args.parent.unique, - skip: args.skip, - take: args.take, + query: { parentId: args.parent.unique, skip: args.skip, take: args.take }, }); } }; @@ -57,7 +55,7 @@ const getChildrenOf = (args: UmbTreeChildrenOfRequestArgs) => { const getAncestorsOf = (args: UmbTreeAncestorsOfRequestArgs) => // eslint-disable-next-line local-rules/no-direct-api-import TemplateService.getTreeTemplateAncestors({ - descendantId: args.treeItem.unique, + query: { descendantId: args.treeItem.unique }, }); const mapper = (item: NamedEntityTreeItemResponseModel): UmbTemplateTreeItemModel => { diff --git a/src/Umbraco.Web.UI.Client/src/packages/user/current-user/components/mfa-provider-default.element.ts b/src/Umbraco.Web.UI.Client/src/packages/user/current-user/components/mfa-provider-default.element.ts index 93d20041f6..97bb775d04 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/user/current-user/components/mfa-provider-default.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/user/current-user/components/mfa-provider-default.element.ts @@ -63,7 +63,7 @@ export class UmbMfaProviderDefaultElement extends UmbLitElement implements UmbMf } const { data: _data } = await tryExecute( this, - UserService.getUserCurrent2FaByProviderName({ providerName: this.providerName }), + UserService.getUserCurrent2FaByProviderName({ path: { providerName: this.providerName } }), ); const data: any = _data; if (!data) { diff --git a/src/Umbraco.Web.UI.Client/src/packages/user/current-user/repository/current-user.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/user/current-user/repository/current-user.server.data-source.ts index 6176ba0f62..e883256ce7 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/user/current-user/repository/current-user.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/user/current-user/repository/current-user.server.data-source.ts @@ -100,7 +100,7 @@ export class UmbCurrentUserServerDataSource extends UmbControllerBase { async enableMfaProvider(providerName: string, code: string, secret: string) { const { error } = await tryExecute( this, - UserService.postUserCurrent2FaByProviderName({ providerName, requestBody: { code, secret } }), + UserService.postUserCurrent2FaByProviderName({ path: { providerName }, body: { code, secret } }), ); if (error) { @@ -116,7 +116,10 @@ export class UmbCurrentUserServerDataSource extends UmbControllerBase { * @param code */ async disableMfaProvider(providerName: string, code: string) { - const { error } = await tryExecute(this, UserService.deleteUserCurrent2FaByProviderName({ providerName, code })); + const { error } = await tryExecute( + this, + UserService.deleteUserCurrent2FaByProviderName({ path: { providerName }, query: { code } }), + ); if (error) { return { error }; @@ -137,7 +140,7 @@ export class UmbCurrentUserServerDataSource extends UmbControllerBase { return tryExecute( this, UserService.postUserCurrentChangePassword({ - requestBody: { + body: { newPassword, oldPassword, }, diff --git a/src/Umbraco.Web.UI.Client/src/packages/user/user-group/collection/repository/user-group-collection.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/user/user-group/collection/repository/user-group-collection.server.data-source.ts index 311132132c..3dae6945f1 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/user/user-group/collection/repository/user-group-collection.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/user/user-group/collection/repository/user-group-collection.server.data-source.ts @@ -26,7 +26,7 @@ export class UmbUserGroupCollectionServerDataSource implements UmbCollectionData async getCollection(filter: UmbUserGroupCollectionFilterModel) { const { data, error } = await tryExecute( this.#host, - UserGroupService.getFilterUserGroup({ skip: filter.skip, take: filter.take, filter: filter.query }), + UserGroupService.getFilterUserGroup({ query: { skip: filter.skip, take: filter.take, filter: filter.query } }), ); if (data) { diff --git a/src/Umbraco.Web.UI.Client/src/packages/user/user-group/repository/detail/user-group-detail.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/user/user-group/repository/detail/user-group-detail.server.data-source.ts index 824343c253..0eecb446c5 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/user/user-group/repository/detail/user-group-detail.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/user/user-group/repository/detail/user-group-detail.server.data-source.ts @@ -59,7 +59,7 @@ export class UmbUserGroupServerDataSource async read(unique: string) { if (!unique) throw new Error('Unique is missing'); - const { data, error } = await tryExecute(this, UserGroupService.getUserGroupById({ id: unique })); + const { data, error } = await tryExecute(this, UserGroupService.getUserGroupById({ path: { id: unique } })); if (error || !data) { return { error }; @@ -123,7 +123,7 @@ export class UmbUserGroupServerDataSource const permissions = await Promise.all(permissionDataPromises); // TODO: make data mapper to prevent errors - const requestBody: CreateUserGroupRequestModel = { + const body: CreateUserGroupRequestModel = { alias: model.alias, documentRootAccess: model.documentRootAccess, documentStartNode: model.documentStartNode ? { id: model.documentStartNode.unique } : null, @@ -141,12 +141,12 @@ export class UmbUserGroupServerDataSource const { data, error } = await tryExecute( this, UserGroupService.postUserGroup({ - requestBody, + body, }), ); if (data) { - return this.read(data); + return this.read(data as never); } return { error }; @@ -173,7 +173,7 @@ export class UmbUserGroupServerDataSource const permissions = await Promise.all(permissionDataPromises); // TODO: make data mapper to prevent errors - const requestBody: UpdateUserGroupRequestModel = { + const body: UpdateUserGroupRequestModel = { alias: model.alias, documentRootAccess: model.documentRootAccess, documentStartNode: model.documentStartNode ? { id: model.documentStartNode.unique } : null, @@ -191,8 +191,8 @@ export class UmbUserGroupServerDataSource const { error } = await tryExecute( this, UserGroupService.putUserGroupById({ - id: model.unique, - requestBody, + path: { id: model.unique }, + body, }), ); @@ -215,7 +215,7 @@ export class UmbUserGroupServerDataSource return tryExecute( this, UserGroupService.deleteUserGroupById({ - id: unique, + path: { id: unique }, }), ); } diff --git a/src/Umbraco.Web.UI.Client/src/packages/user/user-group/repository/item/user-group-item.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/user/user-group/repository/item/user-group-item.server.data-source.ts index 5e4a772dec..fdb9236739 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/user/user-group/repository/item/user-group-item.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/user/user-group/repository/item/user-group-item.server.data-source.ts @@ -27,7 +27,7 @@ export class UmbUserGroupItemServerDataSource extends UmbItemServerDataSourceBas } /* eslint-disable local-rules/no-direct-api-import */ -const getItems = (uniques: Array) => UserGroupService.getItemUserGroup({ id: uniques }); +const getItems = (uniques: Array) => UserGroupService.getItemUserGroup({ query: { id: uniques } }); const mapper = (item: UserGroupItemResponseModel): UmbUserGroupItemModel => { return { diff --git a/src/Umbraco.Web.UI.Client/src/packages/user/user/client-credential/repository/data-source/user-client-credential.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/user/user/client-credential/repository/data-source/user-client-credential.server.data-source.ts index 608a814ffc..ce8cfb05eb 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/user/user/client-credential/repository/data-source/user-client-credential.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/user/user/client-credential/repository/data-source/user-client-credential.server.data-source.ts @@ -31,8 +31,8 @@ export class UmbUserClientCredentialServerDataSource implements UmbUserClientCre const { error } = await tryExecute( this.#host, UserService.postUserByIdClientCredentials({ - id: args.user.unique, - requestBody: { + path: { id: args.user.unique }, + body: { clientId: args.client.unique, clientSecret: args.client.secret, }, @@ -56,7 +56,7 @@ export class UmbUserClientCredentialServerDataSource implements UmbUserClientCre const { data, error } = await tryExecute( this.#host, UserService.getUserByIdClientCredentials({ - id: args.user.unique, + path: { id: args.user.unique }, }), ); @@ -81,8 +81,7 @@ export class UmbUserClientCredentialServerDataSource implements UmbUserClientCre return tryExecute( this.#host, UserService.deleteUserByIdClientCredentialsByClientId({ - id: args.user.unique, - clientId: args.client.unique, + path: { id: args.user.unique, clientId: args.client.unique }, }), ); } diff --git a/src/Umbraco.Web.UI.Client/src/packages/user/user/collection/repository/user-collection.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/user/user/collection/repository/user-collection.server.data-source.ts index 20ea183397..ceff7f2a90 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/user/user/collection/repository/user-collection.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/user/user/collection/repository/user-collection.server.data-source.ts @@ -39,13 +39,15 @@ export class UmbUserCollectionServerDataSource implements UmbCollectionDataSourc const { data, error } = await tryExecute( this.#host, UserService.getFilterUser({ - filter: filter.filter, - orderBy: filter.orderBy as unknown as UserOrderModel, // TODO: This is a temporary workaround to avoid a type error. - orderDirection: filter.orderDirection as unknown as DirectionModel, // TODO: This is a temporary workaround to avoid a type error. - skip: filter.skip, - take: filter.take, - userGroupIds: filter.userGroupIds, - userStates: filter.userStates as unknown as Array, // TODO: This is a temporary workaround to avoid a type error. + query: { + filter: filter.filter, + orderBy: filter.orderBy as unknown as UserOrderModel, // TODO: This is a temporary workaround to avoid a type error. + orderDirection: filter.orderDirection as unknown as DirectionModel, // TODO: This is a temporary workaround to avoid a type error. + skip: filter.skip, + take: filter.take, + userGroupIds: filter.userGroupIds, + userStates: filter.userStates as unknown as Array, // TODO: This is a temporary workaround to avoid a type error. + }, }), ); diff --git a/src/Umbraco.Web.UI.Client/src/packages/user/user/invite/repository/invite-user-server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/user/user/invite/repository/invite-user-server.data-source.ts index 198ac39c52..87955bffea 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/user/user/invite/repository/invite-user-server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/user/user/invite/repository/invite-user-server.data-source.ts @@ -31,7 +31,7 @@ export class UmbInviteUserServerDataSource implements UmbInviteUserDataSource { async invite(request: UmbInviteUserRequestModel) { if (!request) throw new Error('Request Data is missing'); - const requestBody = { + const body = { email: request.email, userName: request.userName, name: request.name, @@ -44,12 +44,12 @@ export class UmbInviteUserServerDataSource implements UmbInviteUserDataSource { const { data, error } = await tryExecute( this.#host, UserService.postUserInvite({ - requestBody, + body, }), ); if (data) { - return this.#detailSource.read(data); + return this.#detailSource.read(data as never); } return { error }; @@ -65,7 +65,7 @@ export class UmbInviteUserServerDataSource implements UmbInviteUserDataSource { if (!request.user.unique) throw new Error('User unique is missing'); if (!request) throw new Error('Request data is missing'); - const requestBody = { + const body = { user: { id: request.user.unique, }, @@ -75,7 +75,7 @@ export class UmbInviteUserServerDataSource implements UmbInviteUserDataSource { return tryExecute( this.#host, UserService.postUserInviteResend({ - requestBody, + body, }), ); } diff --git a/src/Umbraco.Web.UI.Client/src/packages/user/user/repository/avatar/user-avatar.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/user/user/repository/avatar/user-avatar.server.data-source.ts index 356b802b73..67a62d9fe8 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/user/user/repository/avatar/user-avatar.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/user/user/repository/avatar/user-avatar.server.data-source.ts @@ -19,13 +19,13 @@ export class UmbUserAvatarServerDataSource { * @memberof UmbUserServerDataSource */ createAvatar(unique: string, fileUnique: string): Promise { - const requestBody: SetAvatarRequestModel = { + const body: SetAvatarRequestModel = { file: { id: fileUnique, }, }; - return tryExecute(this.#host, UserService.postUserAvatarById({ id: unique, requestBody })); + return tryExecute(this.#host, UserService.postUserAvatarById({ path: { id: unique }, body })); } /** @@ -35,6 +35,6 @@ export class UmbUserAvatarServerDataSource { * @memberof UmbUserServerDataSource */ deleteAvatar(unique: string): Promise { - return tryExecute(this.#host, UserService.deleteUserAvatarById({ id: unique })); + return tryExecute(this.#host, UserService.deleteUserAvatarById({ path: { id: unique } })); } } diff --git a/src/Umbraco.Web.UI.Client/src/packages/user/user/repository/change-password/change-user-password.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/user/user/repository/change-password/change-user-password.server.data-source.ts index 0dcb1c63f1..54e04e24b7 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/user/user/repository/change-password/change-user-password.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/user/user/repository/change-password/change-user-password.server.data-source.ts @@ -31,8 +31,8 @@ export class UmbChangeUserPasswordServerDataSource { return tryExecute( this.#host, UserService.postUserByIdChangePassword({ - id, - requestBody: { + path: { id }, + body: { newPassword, }, }), diff --git a/src/Umbraco.Web.UI.Client/src/packages/user/user/repository/detail/user-detail.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/user/user/repository/detail/user-detail.server.data-source.ts index f33bebed5b..2468080f30 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/user/user/repository/detail/user-detail.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/user/user/repository/detail/user-detail.server.data-source.ts @@ -72,7 +72,7 @@ export class UmbUserServerDataSource implements UmbDetailDataSource { @@ -143,12 +143,12 @@ export class UmbUserServerDataSource implements UmbDetailDataSource { return { id: node.unique, @@ -192,8 +192,8 @@ export class UmbUserServerDataSource implements UmbDetailDataSource ({ id })), }, }), diff --git a/src/Umbraco.Web.UI.Client/src/packages/user/user/repository/enable/enable-user.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/user/user/repository/enable/enable-user.server.data-source.ts index 0bc90b49b0..c0492abb36 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/user/user/repository/enable/enable-user.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/user/user/repository/enable/enable-user.server.data-source.ts @@ -31,7 +31,7 @@ export class UmbEnableUserServerDataSource implements UmbEnableUserDataSource { return tryExecute( this.#host, UserService.postUserEnable({ - requestBody: { + body: { userIds: userIds.map((id) => ({ id })), }, }), diff --git a/src/Umbraco.Web.UI.Client/src/packages/user/user/repository/item/user-item.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/user/user/repository/item/user-item.server.data-source.ts index d435990d00..18f74820c8 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/user/user/repository/item/user-item.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/user/user/repository/item/user-item.server.data-source.ts @@ -25,7 +25,7 @@ export class UmbUserItemServerDataSource extends UmbItemServerDataSourceBase) => UserService.getItemUser({ id: uniques }); +const getItems = (uniques: Array) => UserService.getItemUser({ query: { id: uniques } }); const mapper = (item: UserItemResponseModel): UmbUserItemModel => { return { diff --git a/src/Umbraco.Web.UI.Client/src/packages/user/user/repository/new-password/new-user-password.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/user/user/repository/new-password/new-user-password.server.data-source.ts index 5c0ca8f16d..1a02dc58ca 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/user/user/repository/new-password/new-user-password.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/user/user/repository/new-password/new-user-password.server.data-source.ts @@ -30,7 +30,7 @@ export class UmbNewUserPasswordServerDataSource { return tryExecute( this.#host, UserService.postUserByIdResetPassword({ - id: unique, + path: { id: unique }, }), ); } diff --git a/src/Umbraco.Web.UI.Client/src/packages/user/user/repository/sources/user-mfa.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/user/user/repository/sources/user-mfa.server.data-source.ts index 391749558b..4d4a66074e 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/user/user/repository/sources/user-mfa.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/user/user/repository/sources/user-mfa.server.data-source.ts @@ -29,7 +29,7 @@ export class UmbUserMfaServerDataSource { return tryExecute( this.#host, UserService.getUserById2Fa({ - id: unique, + path: { id: unique }, }), ); } @@ -47,8 +47,7 @@ export class UmbUserMfaServerDataSource { return tryExecute( this.#host, UserService.deleteUserById2FaByProviderName({ - id: unique, - providerName, + path: { id: unique, providerName }, }), ); } diff --git a/src/Umbraco.Web.UI.Client/src/packages/user/user/repository/sources/user-set-group.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/user/user/repository/sources/user-set-group.server.data-source.ts index f1e36388ce..0eacec87e3 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/user/user/repository/sources/user-set-group.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/user/user/repository/sources/user-set-group.server.data-source.ts @@ -33,7 +33,7 @@ export class UmbUserSetGroupsServerDataSource { return tryExecute( this.#host, UserService.postUserSetUserGroups({ - requestBody: { + body: { userIds: userIds.map((id) => ({ id })), userGroupIds: userGroupIds.map((id) => ({ id })), }, diff --git a/src/Umbraco.Web.UI.Client/src/packages/user/user/repository/unlock/unlock-user.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/user/user/repository/unlock/unlock-user.server.data-source.ts index cc75fb0f75..8d60708ed6 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/user/user/repository/unlock/unlock-user.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/user/user/repository/unlock/unlock-user.server.data-source.ts @@ -31,7 +31,7 @@ export class UmbUnlockUserServerDataSource implements UmbUnlockUserDataSource { return tryExecute( this.#host, UserService.postUserUnlock({ - requestBody: { + body: { userIds: userIds.map((id) => ({ id })), }, }), diff --git a/src/Umbraco.Web.UI.Client/src/packages/webhook/webhook-delivery/collection/repository/webhook-delivery-collection.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/webhook/webhook-delivery/collection/repository/webhook-delivery-collection.server.data-source.ts index ec3fcfba79..9366bea2aa 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/webhook/webhook-delivery/collection/repository/webhook-delivery-collection.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/webhook/webhook-delivery/collection/repository/webhook-delivery-collection.server.data-source.ts @@ -8,7 +8,7 @@ import { tryExecute } from '@umbraco-cms/backoffice/resources'; /** * A data source that fetches the webhook delivery collection data from the server. * @class UmbWebhookDeliveryCollectionServerDataSource - * @implements {UmbCollectionDataSource} + * @implements {UmbWebhookDeliveryCollectionServerDataSource} */ export class UmbWebhookDeliveryCollectionServerDataSource implements UmbWebhookDeliveryCollectionServerDataSource { #host: UmbControllerHost; @@ -33,9 +33,8 @@ export class UmbWebhookDeliveryCollectionServerDataSource implements UmbWebhookD const { data, error } = await tryExecute( this.#host, WebhookService.getWebhookByIdLogs({ - id: filter.webhook.unique, - skip: filter.skip, - take: filter.take, + path: { id: filter.webhook.unique }, + query: { skip: filter.skip, take: filter.take }, }), ); diff --git a/src/Umbraco.Web.UI.Client/src/packages/webhook/webhook/collection/repository/webhook-collection.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/webhook/webhook/collection/repository/webhook-collection.server.data-source.ts index d8a9ed6add..f3aecf9d40 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/webhook/webhook/collection/repository/webhook-collection.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/webhook/webhook/collection/repository/webhook-collection.server.data-source.ts @@ -30,7 +30,7 @@ export class UmbWebhookCollectionServerDataSource implements UmbWebhookCollectio * @memberof UmbWebhookCollectionServerDataSource */ async getCollection(_filter: UmbWebhookCollectionFilterModel) { - const { data, error } = await tryExecute(this.#host, WebhookService.getWebhook(_filter)); + const { data, error } = await tryExecute(this.#host, WebhookService.getWebhook({ query: _filter })); if (error || !data) { return { error }; diff --git a/src/Umbraco.Web.UI.Client/src/packages/webhook/webhook/repository/detail/webhook-detail.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/webhook/webhook/repository/detail/webhook-detail.server.data-source.ts index 66bc254f18..fedd488ff8 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/webhook/webhook/repository/detail/webhook-detail.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/webhook/webhook/repository/detail/webhook-detail.server.data-source.ts @@ -13,7 +13,7 @@ import { tryExecute } from '@umbraco-cms/backoffice/resources'; /** * A data source for the Webhook that fetches data from the server * @class UmbWebhookDetailServerDataSource - * @implements {RepositoryDetailDataSource} + * @implements {UmbDetailDataSource} */ export class UmbWebhookDetailServerDataSource implements UmbDetailDataSource { #host: UmbControllerHost; @@ -59,7 +59,7 @@ export class UmbWebhookDetailServerDataSource implements UmbDetailDataSource event.alias), @@ -105,12 +105,12 @@ export class UmbWebhookDetailServerDataSource implements UmbDetailDataSource event.alias), enabled: model.enabled, @@ -140,8 +140,8 @@ export class UmbWebhookDetailServerDataSource implements UmbDetailDataSource) => WebhookService.getItemWebhook({ id: uniques }); +const getItems = (uniques: Array) => WebhookService.getItemWebhook({ query: { id: uniques } }); const mapper = (item: WebhookItemResponseModel): UmbWebhookItemModel => { return { diff --git a/src/Umbraco.Web.UI.Client/tsconfig.json b/src/Umbraco.Web.UI.Client/tsconfig.json index 1cb4055f7c..2f7cbe500e 100644 --- a/src/Umbraco.Web.UI.Client/tsconfig.json +++ b/src/Umbraco.Web.UI.Client/tsconfig.json @@ -79,6 +79,7 @@ DON'T EDIT THIS FILE DIRECTLY. It is generated by /devops/tsconfig/index.js "@umbraco-cms/backoffice/extension-registry": ["./src/packages/core/extension-registry/index.ts"], "@umbraco-cms/backoffice/health-check": ["./src/packages/health-check/index.ts"], "@umbraco-cms/backoffice/help": ["./src/packages/help/index.ts"], + "@umbraco-cms/backoffice/http-client": ["./src/packages/core/http-client/index.ts"], "@umbraco-cms/backoffice/icon": ["./src/packages/core/icon-registry/index.ts"], "@umbraco-cms/backoffice/id": ["./src/packages/core/id/index.ts"], "@umbraco-cms/backoffice/imaging": ["./src/packages/media/imaging/index.ts"], @@ -143,7 +144,7 @@ DON'T EDIT THIS FILE DIRECTLY. It is generated by /devops/tsconfig/index.js "@umbraco-cms/backoffice/variant": ["./src/packages/core/variant/index.ts"], "@umbraco-cms/backoffice/webhook": ["./src/packages/webhook/index.ts"], "@umbraco-cms/backoffice/workspace": ["./src/packages/core/workspace/index.ts"], - "@umbraco-cms/backoffice/external/backend-api": ["./src/external/backend-api/index.ts"], + "@umbraco-cms/backoffice/external/backend-api": ["./src/packages/core/backend-api/index.ts"], "@umbraco-cms/backoffice/external/dompurify": ["./src/external/dompurify/index.ts"], "@umbraco-cms/backoffice/external/lit": ["./src/external/lit/index.ts"], "@umbraco-cms/backoffice/external/marked": ["./src/external/marked/index.ts"], diff --git a/src/Umbraco.Web.UI.Login/openapi-ts.config.ts b/src/Umbraco.Web.UI.Login/openapi-ts.config.ts new file mode 100644 index 0000000000..a91eeeb123 --- /dev/null +++ b/src/Umbraco.Web.UI.Login/openapi-ts.config.ts @@ -0,0 +1,22 @@ +import { defineConfig } from '@hey-api/openapi-ts'; + +export default defineConfig({ + input: { + include: + '(ProblemDetails|ReferenceByIdModel|ResetPassword|PasswordConfiguration|SecurityConfiguration|InviteUser|CreateInitialPasswordUser|/security/|/user/invite/)', + path: '../Umbraco.Cms.Api.Management/OpenApi.json', + }, + output: { + path: './src/api', + }, + plugins: [ + { + name: '@hey-api/client-fetch', + }, + { + name: '@hey-api/typescript', + enums: 'typescript', + }, + '@hey-api/sdk', + ], +}); diff --git a/src/Umbraco.Web.UI.Login/package-lock.json b/src/Umbraco.Web.UI.Login/package-lock.json index 1c803ba723..22143e31df 100644 --- a/src/Umbraco.Web.UI.Login/package-lock.json +++ b/src/Umbraco.Web.UI.Login/package-lock.json @@ -6,7 +6,9 @@ "": { "name": "login", "devDependencies": { - "@umbraco-cms/backoffice": "15.2.1", + "@hey-api/client-fetch": "^0.10.0", + "@hey-api/openapi-ts": "^0.66.3", + "@umbraco-cms/backoffice": "15.3.0", "msw": "^2.7.0", "typescript": "^5.7.3", "vite": "^6.2.5", @@ -473,6 +475,62 @@ "node": ">=18" } }, + "node_modules/@hey-api/client-fetch": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/@hey-api/client-fetch/-/client-fetch-0.10.0.tgz", + "integrity": "sha512-C7vzj4t52qPiHCqjn1l8cRTI2p4pZCd7ViLtJDTHr5ZwI4sWOYC1tmv6bd529qqY6HFFbhGCz4TAZSwKAMJncg==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/hey-api" + }, + "peerDependencies": { + "@hey-api/openapi-ts": "< 2" + } + }, + "node_modules/@hey-api/json-schema-ref-parser": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@hey-api/json-schema-ref-parser/-/json-schema-ref-parser-1.0.4.tgz", + "integrity": "sha512-IaJ4yFgU5r63KZyeySHRKSM1bavFIda8KdwCFi5BxQCIklltzEByBksNOPms+yHXpWWfR+OopIusVZV8roycYg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jsdevtools/ono": "^7.1.3", + "@types/json-schema": "^7.0.15", + "js-yaml": "^4.1.0" + }, + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://github.com/sponsors/hey-api" + } + }, + "node_modules/@hey-api/openapi-ts": { + "version": "0.66.3", + "resolved": "https://registry.npmjs.org/@hey-api/openapi-ts/-/openapi-ts-0.66.3.tgz", + "integrity": "sha512-kws5hZo/M5WuapSYVvA7Nr+/4bCCjzDEzdjxUqWH8VV28MG7nob+TwZRgqaus7POZmJ2+zc2oCzHhdlvOTYVLA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@hey-api/json-schema-ref-parser": "1.0.4", + "c12": "2.0.1", + "commander": "13.0.0", + "handlebars": "4.7.8" + }, + "bin": { + "openapi-ts": "bin/index.cjs" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=22.10.0" + }, + "funding": { + "url": "https://github.com/sponsors/hey-api" + }, + "peerDependencies": { + "typescript": "^5.5.3" + } + }, "node_modules/@inquirer/confirm": { "version": "5.1.5", "resolved": "https://registry.npmjs.org/@inquirer/confirm/-/confirm-5.1.5.tgz", @@ -551,6 +609,13 @@ } } }, + "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, + "license": "MIT" + }, "node_modules/@lit-labs/ssr-dom-shim": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/@lit-labs/ssr-dom-shim/-/ssr-dom-shim-1.3.0.tgz", @@ -888,9 +953,9 @@ ] }, "node_modules/@tiptap/core": { - "version": "2.11.2", - "resolved": "https://registry.npmjs.org/@tiptap/core/-/core-2.11.2.tgz", - "integrity": "sha512-Z437c/sQg31yrRVgLJVkQuih+7Og5tjRx6FE/zE47QgEayqQ9yXH0LrTAbPiY6IfY1X+f2A0h3e5Y/WGD6rC3Q==", + "version": "2.11.5", + "resolved": "https://registry.npmjs.org/@tiptap/core/-/core-2.11.5.tgz", + "integrity": "sha512-jb0KTdUJaJY53JaN7ooY3XAxHQNoMYti/H6ANo707PsLXVeEqJ9o8+eBup1JU5CuwzrgnDc2dECt2WIGX9f8Jw==", "dev": true, "license": "MIT", "peer": true, @@ -903,9 +968,9 @@ } }, "node_modules/@tiptap/extension-blockquote": { - "version": "2.11.5", - "resolved": "https://registry.npmjs.org/@tiptap/extension-blockquote/-/extension-blockquote-2.11.5.tgz", - "integrity": "sha512-MZfcRIzKRD8/J1hkt/eYv49060GTL6qGR3NY/oTDuw2wYzbQXXLEbjk8hxAtjwNn7G+pWQv3L+PKFzZDxibLuA==", + "version": "2.11.7", + "resolved": "https://registry.npmjs.org/@tiptap/extension-blockquote/-/extension-blockquote-2.11.7.tgz", + "integrity": "sha512-liD8kWowl3CcYCG9JQlVx1eSNc/aHlt6JpVsuWvzq6J8APWX693i3+zFqyK2eCDn0k+vW62muhSBe3u09hA3Zw==", "dev": true, "license": "MIT", "peer": true, @@ -918,9 +983,9 @@ } }, "node_modules/@tiptap/extension-bold": { - "version": "2.11.5", - "resolved": "https://registry.npmjs.org/@tiptap/extension-bold/-/extension-bold-2.11.5.tgz", - "integrity": "sha512-OAq03MHEbl7MtYCUzGuwb0VpOPnM0k5ekMbEaRILFU5ZC7cEAQ36XmPIw1dQayrcuE8GZL35BKub2qtRxyC9iA==", + "version": "2.11.7", + "resolved": "https://registry.npmjs.org/@tiptap/extension-bold/-/extension-bold-2.11.7.tgz", + "integrity": "sha512-VTR3JlldBixXbjpLTFme/Bxf1xeUgZZY3LTlt5JDlCW3CxO7k05CIa+kEZ8LXpog5annytZDUVtWqxrNjmsuHQ==", "dev": true, "license": "MIT", "peer": true, @@ -933,9 +998,9 @@ } }, "node_modules/@tiptap/extension-bullet-list": { - "version": "2.11.5", - "resolved": "https://registry.npmjs.org/@tiptap/extension-bullet-list/-/extension-bullet-list-2.11.5.tgz", - "integrity": "sha512-VXwHlX6A/T6FAspnyjbKDO0TQ+oetXuat6RY1/JxbXphH42nLuBaGWJ6pgy6xMl6XY8/9oPkTNrfJw/8/eeRwA==", + "version": "2.11.7", + "resolved": "https://registry.npmjs.org/@tiptap/extension-bullet-list/-/extension-bullet-list-2.11.7.tgz", + "integrity": "sha512-WbPogE2/Q3e3/QYgbT1Sj4KQUfGAJNc5pvb7GrUbvRQsAh7HhtuO8hqdDwH8dEdD/cNUehgt17TO7u8qV6qeBw==", "dev": true, "license": "MIT", "peer": true, @@ -948,9 +1013,9 @@ } }, "node_modules/@tiptap/extension-code": { - "version": "2.11.5", - "resolved": "https://registry.npmjs.org/@tiptap/extension-code/-/extension-code-2.11.5.tgz", - "integrity": "sha512-xOvHevNIQIcCCVn9tpvXa1wBp0wHN/2umbAZGTVzS+AQtM7BTo0tz8IyzwxkcZJaImONcUVYLOLzt2AgW1LltA==", + "version": "2.11.7", + "resolved": "https://registry.npmjs.org/@tiptap/extension-code/-/extension-code-2.11.7.tgz", + "integrity": "sha512-VpPO1Uy/eF4hYOpohS/yMOcE1C07xmMj0/D989D9aS1x95jWwUVrSkwC+PlWMUBx9PbY2NRsg1ZDwVvlNKZ6yQ==", "dev": true, "license": "MIT", "peer": true, @@ -963,9 +1028,9 @@ } }, "node_modules/@tiptap/extension-code-block": { - "version": "2.11.5", - "resolved": "https://registry.npmjs.org/@tiptap/extension-code-block/-/extension-code-block-2.11.5.tgz", - "integrity": "sha512-ksxMMvqLDlC+ftcQLynqZMdlJT1iHYZorXsXw/n+wuRd7YElkRkd6YWUX/Pq/njFY6lDjKiqFLEXBJB8nrzzBA==", + "version": "2.11.7", + "resolved": "https://registry.npmjs.org/@tiptap/extension-code-block/-/extension-code-block-2.11.7.tgz", + "integrity": "sha512-To/y/2H04VWqiANy53aXjV7S6fA86c2759RsH1hTIe57jA1KyE7I5tlAofljOLZK/covkGmPeBddSPHGJbz++Q==", "dev": true, "license": "MIT", "peer": true, @@ -979,9 +1044,9 @@ } }, "node_modules/@tiptap/extension-document": { - "version": "2.11.5", - "resolved": "https://registry.npmjs.org/@tiptap/extension-document/-/extension-document-2.11.5.tgz", - "integrity": "sha512-7I4BRTpIux2a0O2qS3BDmyZ5LGp3pszKbix32CmeVh7lN9dV7W5reDqtJJ9FCZEEF+pZ6e1/DQA362dflwZw2g==", + "version": "2.11.7", + "resolved": "https://registry.npmjs.org/@tiptap/extension-document/-/extension-document-2.11.7.tgz", + "integrity": "sha512-95ouJXPjdAm9+VBRgFo4lhDoMcHovyl/awORDI8gyEn0Rdglt+ZRZYoySFzbVzer9h0cre+QdIwr9AIzFFbfdA==", "dev": true, "license": "MIT", "peer": true, @@ -994,9 +1059,9 @@ } }, "node_modules/@tiptap/extension-dropcursor": { - "version": "2.11.5", - "resolved": "https://registry.npmjs.org/@tiptap/extension-dropcursor/-/extension-dropcursor-2.11.5.tgz", - "integrity": "sha512-uIN7L3FU0904ec7FFFbndO7RQE/yiON4VzAMhNn587LFMyWO8US139HXIL4O8dpZeYwYL3d1FnDTflZl6CwLlg==", + "version": "2.11.7", + "resolved": "https://registry.npmjs.org/@tiptap/extension-dropcursor/-/extension-dropcursor-2.11.7.tgz", + "integrity": "sha512-63mL+nxQILizsr5NbmgDeOjFEWi34BLt7evwL6UUZEVM15K8V1G8pD9Y0kCXrZYpHWz0tqFRXdrhDz0Ppu8oVw==", "dev": true, "license": "MIT", "peer": true, @@ -1010,9 +1075,9 @@ } }, "node_modules/@tiptap/extension-gapcursor": { - "version": "2.11.5", - "resolved": "https://registry.npmjs.org/@tiptap/extension-gapcursor/-/extension-gapcursor-2.11.5.tgz", - "integrity": "sha512-kcWa+Xq9cb6lBdiICvLReuDtz/rLjFKHWpW3jTTF3FiP3wx4H8Rs6bzVtty7uOVTfwupxZRiKICAMEU6iT0xrQ==", + "version": "2.11.7", + "resolved": "https://registry.npmjs.org/@tiptap/extension-gapcursor/-/extension-gapcursor-2.11.7.tgz", + "integrity": "sha512-EceesmPG7FyjXZ8EgeJPUov9G1mAf2AwdypxBNH275g6xd5dmU/KvjoFZjmQ0X1ve7mS+wNupVlGxAEUYoveew==", "dev": true, "license": "MIT", "peer": true, @@ -1026,9 +1091,9 @@ } }, "node_modules/@tiptap/extension-hard-break": { - "version": "2.11.5", - "resolved": "https://registry.npmjs.org/@tiptap/extension-hard-break/-/extension-hard-break-2.11.5.tgz", - "integrity": "sha512-q9doeN+Yg9F5QNTG8pZGYfNye3tmntOwch683v0CCVCI4ldKaLZ0jG3NbBTq+mosHYdgOH2rNbIORlRRsQ+iYQ==", + "version": "2.11.7", + "resolved": "https://registry.npmjs.org/@tiptap/extension-hard-break/-/extension-hard-break-2.11.7.tgz", + "integrity": "sha512-zTkZSA6q+F5sLOdCkiC2+RqJQN0zdsJqvFIOVFL/IDVOnq6PZO5THzwRRLvOSnJJl3edRQCl/hUgS0L5sTInGQ==", "dev": true, "license": "MIT", "peer": true, @@ -1041,9 +1106,9 @@ } }, "node_modules/@tiptap/extension-heading": { - "version": "2.11.5", - "resolved": "https://registry.npmjs.org/@tiptap/extension-heading/-/extension-heading-2.11.5.tgz", - "integrity": "sha512-x/MV53psJ9baRcZ4k4WjnCUBMt8zCX7mPlKVT+9C/o+DEs/j/qxPLs95nHeQv70chZpSwCQCt93xMmuF0kPoAg==", + "version": "2.11.7", + "resolved": "https://registry.npmjs.org/@tiptap/extension-heading/-/extension-heading-2.11.7.tgz", + "integrity": "sha512-8kWh7y4Rd2fwxfWOhFFWncHdkDkMC1Z60yzIZWjIu72+6yQxvo8w3yeb7LI7jER4kffbMmadgcfhCHC/fkObBA==", "dev": true, "license": "MIT", "peer": true, @@ -1056,9 +1121,9 @@ } }, "node_modules/@tiptap/extension-history": { - "version": "2.11.5", - "resolved": "https://registry.npmjs.org/@tiptap/extension-history/-/extension-history-2.11.5.tgz", - "integrity": "sha512-b+wOS33Dz1azw6F1i9LFTEIJ/gUui0Jwz5ZvmVDpL2ZHBhq1Ui0/spTT+tuZOXq7Y/uCbKL8Liu4WoedIvhboQ==", + "version": "2.11.7", + "resolved": "https://registry.npmjs.org/@tiptap/extension-history/-/extension-history-2.11.7.tgz", + "integrity": "sha512-Cu5x3aS13I040QSRoLdd+w09G4OCVfU+azpUqxufZxeNs9BIJC+0jowPLeOxKDh6D5GGT2A8sQtxc6a/ssbs8g==", "dev": true, "license": "MIT", "peer": true, @@ -1072,9 +1137,9 @@ } }, "node_modules/@tiptap/extension-horizontal-rule": { - "version": "2.11.5", - "resolved": "https://registry.npmjs.org/@tiptap/extension-horizontal-rule/-/extension-horizontal-rule-2.11.5.tgz", - "integrity": "sha512-3up2r1Du8/5/4ZYzTC0DjTwhgPI3dn8jhOCLu73m5F3OGvK/9whcXoeWoX103hYMnGDxBlfOje71yQuN35FL4A==", + "version": "2.11.7", + "resolved": "https://registry.npmjs.org/@tiptap/extension-horizontal-rule/-/extension-horizontal-rule-2.11.7.tgz", + "integrity": "sha512-uVmQwD2dzZ5xwmvUlciy0ItxOdOfQjH6VLmu80zyJf8Yu7mvwP8JyxoXUX0vd1xHpwAhgQ9/ozjIWYGIw79DPQ==", "dev": true, "license": "MIT", "peer": true, @@ -1088,9 +1153,9 @@ } }, "node_modules/@tiptap/extension-image": { - "version": "2.11.2", - "resolved": "https://registry.npmjs.org/@tiptap/extension-image/-/extension-image-2.11.2.tgz", - "integrity": "sha512-Ag+Arj6sclTqhvR+v5I2UD5e2lsWTcXLj0aS2aEsfGpytltk6rcLj6iDjx/SmJrE1BN8ognJsdzmFdZF/rNLpg==", + "version": "2.11.5", + "resolved": "https://registry.npmjs.org/@tiptap/extension-image/-/extension-image-2.11.5.tgz", + "integrity": "sha512-HbUq9AL8gb8eSuQfY/QKkvMc66ZFN/b6jvQAILGArNOgalUfGizoC6baKTJShaExMSPjBZlaAHtJiQKPaGRHaA==", "dev": true, "license": "MIT", "peer": true, @@ -1103,9 +1168,9 @@ } }, "node_modules/@tiptap/extension-italic": { - "version": "2.11.5", - "resolved": "https://registry.npmjs.org/@tiptap/extension-italic/-/extension-italic-2.11.5.tgz", - "integrity": "sha512-9VGfb2/LfPhQ6TjzDwuYLRvw0A6VGbaIp3F+5Mql8XVdTBHb2+rhELbyhNGiGVR78CaB/EiKb6dO9xu/tBWSYA==", + "version": "2.11.7", + "resolved": "https://registry.npmjs.org/@tiptap/extension-italic/-/extension-italic-2.11.7.tgz", + "integrity": "sha512-r985bkQfG0HMpmCU0X0p/Xe7U1qgRm2mxvcp6iPCuts2FqxaCoyfNZ8YnMsgVK1mRhM7+CQ5SEg2NOmQNtHvPw==", "dev": true, "license": "MIT", "peer": true, @@ -1118,9 +1183,9 @@ } }, "node_modules/@tiptap/extension-link": { - "version": "2.11.2", - "resolved": "https://registry.npmjs.org/@tiptap/extension-link/-/extension-link-2.11.2.tgz", - "integrity": "sha512-Mbre+JotLMUg9jdWWrwIReiRVMkA2kMzmtD2Aqy/n5P+wuI84898qIZSkhPEzDOGzp0mluUO/iGsz0NdTto/JQ==", + "version": "2.11.5", + "resolved": "https://registry.npmjs.org/@tiptap/extension-link/-/extension-link-2.11.5.tgz", + "integrity": "sha512-4Iu/aPzevbYpe50xDI0ZkqRa6nkZ9eF270Ue2qaF3Ab47nehj+9Jl78XXzo8+LTyFMnrETI73TAs1aC/IGySeQ==", "dev": true, "license": "MIT", "peer": true, @@ -1137,9 +1202,9 @@ } }, "node_modules/@tiptap/extension-list-item": { - "version": "2.11.5", - "resolved": "https://registry.npmjs.org/@tiptap/extension-list-item/-/extension-list-item-2.11.5.tgz", - "integrity": "sha512-Mp5RD/pbkfW1vdc6xMVxXYcta73FOwLmblQlFNn/l/E5/X1DUSA4iGhgDDH4EWO3swbs03x2f7Zka/Xoj3+WLg==", + "version": "2.11.7", + "resolved": "https://registry.npmjs.org/@tiptap/extension-list-item/-/extension-list-item-2.11.7.tgz", + "integrity": "sha512-6ikh7Y+qAbkSuIHXPIINqfzmWs5uIGrylihdZ9adaIyvrN1KSnWIqrZIk/NcZTg5YFIJlXrnGSRSjb/QM3WUhw==", "dev": true, "license": "MIT", "peer": true, @@ -1152,9 +1217,9 @@ } }, "node_modules/@tiptap/extension-ordered-list": { - "version": "2.11.5", - "resolved": "https://registry.npmjs.org/@tiptap/extension-ordered-list/-/extension-ordered-list-2.11.5.tgz", - "integrity": "sha512-Cu8KwruBNWAaEfshRQR0yOSaUKAeEwxW7UgbvF9cN/zZuKgK5uZosPCPTehIFCcRe+TBpRtZQh+06f/gNYpYYg==", + "version": "2.11.7", + "resolved": "https://registry.npmjs.org/@tiptap/extension-ordered-list/-/extension-ordered-list-2.11.7.tgz", + "integrity": "sha512-bLGCHDMB0vbJk7uu8bRg8vES3GsvxkX7Cgjgm/6xysHFbK98y0asDtNxkW1VvuRreNGz4tyB6vkcVCfrxl4jKw==", "dev": true, "license": "MIT", "peer": true, @@ -1167,9 +1232,9 @@ } }, "node_modules/@tiptap/extension-paragraph": { - "version": "2.11.5", - "resolved": "https://registry.npmjs.org/@tiptap/extension-paragraph/-/extension-paragraph-2.11.5.tgz", - "integrity": "sha512-YFBWeg7xu/sBnsDIF/+nh9Arf7R0h07VZMd0id5Ydd2Qe3c1uIZwXxeINVtH0SZozuPIQFAT8ICe9M0RxmE+TA==", + "version": "2.11.7", + "resolved": "https://registry.npmjs.org/@tiptap/extension-paragraph/-/extension-paragraph-2.11.7.tgz", + "integrity": "sha512-Pl3B4q6DJqTvvAdraqZaNP9Hh0UWEHL5nNdxhaRNuhKaUo7lq8wbDSIxIW3lvV0lyCs0NfyunkUvSm1CXb6d4Q==", "dev": true, "license": "MIT", "peer": true, @@ -1182,9 +1247,9 @@ } }, "node_modules/@tiptap/extension-placeholder": { - "version": "2.11.2", - "resolved": "https://registry.npmjs.org/@tiptap/extension-placeholder/-/extension-placeholder-2.11.2.tgz", - "integrity": "sha512-7rv6nylqX57Q+K+AH794Kg9U7OrLyujhXXqQvd9iZdBP7bTCNUlFu0cGlIyHdM/eWJjoUblZs0VLV2IApk4xjQ==", + "version": "2.11.5", + "resolved": "https://registry.npmjs.org/@tiptap/extension-placeholder/-/extension-placeholder-2.11.5.tgz", + "integrity": "sha512-Pr+0Ju/l2ZvXMd9VQxtaoSZbs0BBp1jbBDqwms88ctpyvQFRfLSfSkqudQcSHyw2ROOz2E31p/7I7fpI8Y0CLA==", "dev": true, "license": "MIT", "peer": true, @@ -1198,9 +1263,9 @@ } }, "node_modules/@tiptap/extension-strike": { - "version": "2.11.5", - "resolved": "https://registry.npmjs.org/@tiptap/extension-strike/-/extension-strike-2.11.5.tgz", - "integrity": "sha512-PVfUiCqrjvsLpbIoVlegSY8RlkR64F1Rr2RYmiybQfGbg+AkSZXDeO0eIrc03//4gua7D9DfIozHmAKv1KN3ow==", + "version": "2.11.7", + "resolved": "https://registry.npmjs.org/@tiptap/extension-strike/-/extension-strike-2.11.7.tgz", + "integrity": "sha512-D6GYiW9F24bvAY7XMOARNZbC8YGPzdzWdXd8VOOJABhf4ynMi/oW4NNiko+kZ67jn3EGaKoz32VMJzNQgYi1HA==", "dev": true, "license": "MIT", "peer": true, @@ -1213,9 +1278,9 @@ } }, "node_modules/@tiptap/extension-subscript": { - "version": "2.11.2", - "resolved": "https://registry.npmjs.org/@tiptap/extension-subscript/-/extension-subscript-2.11.2.tgz", - "integrity": "sha512-5Q8ULogx5v50kH28qMpJOlswwHrmKu/BI8sGOT0QF9n/nVEaVNdiGf55l3+AYaIhdTl/ADiIN9b08qWF0NAwgg==", + "version": "2.11.5", + "resolved": "https://registry.npmjs.org/@tiptap/extension-subscript/-/extension-subscript-2.11.5.tgz", + "integrity": "sha512-VpaSzxku/Bcvf4SgDB2K5d0E+FNA/56iJHMygg/WXsq2F4tMMUEivQHI/n+17ndUEO4Wybz0wItnM1G2JfRuLQ==", "dev": true, "license": "MIT", "peer": true, @@ -1228,9 +1293,9 @@ } }, "node_modules/@tiptap/extension-superscript": { - "version": "2.11.2", - "resolved": "https://registry.npmjs.org/@tiptap/extension-superscript/-/extension-superscript-2.11.2.tgz", - "integrity": "sha512-daUF2FB3k8Tu99M0ro1ZXfsyRutbmE/du6kINtOzbu8TucCR5KYqCNlBrsdK3CxHpkAhoC1sLTG6RdLMu2o6qg==", + "version": "2.11.5", + "resolved": "https://registry.npmjs.org/@tiptap/extension-superscript/-/extension-superscript-2.11.5.tgz", + "integrity": "sha512-sK6v2G0zFfGW+j9CmYp2e+tyZ3FTa3dP0xY4kJzefgZcHhMJLlLnjxBRwHCSi/jj5ie6WdZT4KoEooxnPs1Vzw==", "dev": true, "license": "MIT", "peer": true, @@ -1243,9 +1308,9 @@ } }, "node_modules/@tiptap/extension-table": { - "version": "2.11.2", - "resolved": "https://registry.npmjs.org/@tiptap/extension-table/-/extension-table-2.11.2.tgz", - "integrity": "sha512-s3pVORRDrm1AHuENhvuONpI4KtLLGJbg8QLxO/a7qeScAjHR0V9lOqdpweNfPgiMwj5zMV45tGF/tweM4x2fJQ==", + "version": "2.11.5", + "resolved": "https://registry.npmjs.org/@tiptap/extension-table/-/extension-table-2.11.5.tgz", + "integrity": "sha512-NKXLhKWdAdURklm98YkCd2ai4fh8jY8HS/+X2s/2QiQt8Z98CU1keCm35fJEEExM234iB/hCqG5vY4JgTc0Tvw==", "dev": true, "license": "MIT", "peer": true, @@ -1259,9 +1324,9 @@ } }, "node_modules/@tiptap/extension-table-cell": { - "version": "2.11.2", - "resolved": "https://registry.npmjs.org/@tiptap/extension-table-cell/-/extension-table-cell-2.11.2.tgz", - "integrity": "sha512-m//QPQ/GN4mMuj2/PcT2HmUGF3bFk41zN3hDcOmfrszClsmcEVIViApVr7U6HqlIq4TFAFDLXtIK79FW9ByIDg==", + "version": "2.11.5", + "resolved": "https://registry.npmjs.org/@tiptap/extension-table-cell/-/extension-table-cell-2.11.5.tgz", + "integrity": "sha512-S967Au0pgeULstP3FaasOf/LEh72p61Ooh1PcUMF/az4x8EeGgpcEUARpVUxsGxLFvogv6LmhPHZdtcGgdHcBw==", "dev": true, "license": "MIT", "peer": true, @@ -1274,9 +1339,9 @@ } }, "node_modules/@tiptap/extension-table-header": { - "version": "2.11.2", - "resolved": "https://registry.npmjs.org/@tiptap/extension-table-header/-/extension-table-header-2.11.2.tgz", - "integrity": "sha512-y2MCki8jZWT/cM4eG/3sPwUvtsj5d/+7RibbhjWnz1u42XyPoHKTZr9ZqUOAJ67vwB8LF8n8qb7D1YDqvDyA9Q==", + "version": "2.11.5", + "resolved": "https://registry.npmjs.org/@tiptap/extension-table-header/-/extension-table-header-2.11.5.tgz", + "integrity": "sha512-O1iBtzZP1XZDi4h1Xmgq1T63il+fpKPvBIMZ0JJH9TyCw5i5rcrMLL2dyy5zaWK3BFRJuYBNSke4c+VWnr/g6w==", "dev": true, "license": "MIT", "peer": true, @@ -1289,9 +1354,9 @@ } }, "node_modules/@tiptap/extension-table-row": { - "version": "2.11.2", - "resolved": "https://registry.npmjs.org/@tiptap/extension-table-row/-/extension-table-row-2.11.2.tgz", - "integrity": "sha512-8eCWoaijS6JD0gJOsqg8BhcTNW6I1uvq6JwnAnpv3lznHj19Q5mevC7ixuFRe9Wk/qiYZaCBXk6NcpzaqB8o/g==", + "version": "2.11.5", + "resolved": "https://registry.npmjs.org/@tiptap/extension-table-row/-/extension-table-row-2.11.5.tgz", + "integrity": "sha512-+/VWhCuW24BcM5aaIc/f0bC6ZR1Q5gnuqw13MIo7gyPx7iIY6BXK8roGiZSs8wYAN4uBEf3EKFm0bSZwQuAeyg==", "dev": true, "license": "MIT", "peer": true, @@ -1304,9 +1369,9 @@ } }, "node_modules/@tiptap/extension-text": { - "version": "2.11.5", - "resolved": "https://registry.npmjs.org/@tiptap/extension-text/-/extension-text-2.11.5.tgz", - "integrity": "sha512-Gq1WwyhFpCbEDrLPIHt5A8aLSlf8bfz4jm417c8F/JyU0J5dtYdmx0RAxjnLw1i7ZHE7LRyqqAoS0sl7JHDNSQ==", + "version": "2.11.7", + "resolved": "https://registry.npmjs.org/@tiptap/extension-text/-/extension-text-2.11.7.tgz", + "integrity": "sha512-wObCn8qZkIFnXTLvBP+X8KgaEvTap/FJ/i4hBMfHBCKPGDx99KiJU6VIbDXG8d5ZcFZE0tOetK1pP5oI7qgMlQ==", "dev": true, "license": "MIT", "peer": true, @@ -1319,9 +1384,9 @@ } }, "node_modules/@tiptap/extension-text-align": { - "version": "2.11.2", - "resolved": "https://registry.npmjs.org/@tiptap/extension-text-align/-/extension-text-align-2.11.2.tgz", - "integrity": "sha512-0QfjepmK+iHubjTsJshuhSZvF54M+vaqpReDraf9NKVx+WkiZ+mxJX4S5nZwoFsp21sEz7Q7z03+uXgb/yj7mQ==", + "version": "2.11.5", + "resolved": "https://registry.npmjs.org/@tiptap/extension-text-align/-/extension-text-align-2.11.5.tgz", + "integrity": "sha512-Ei0zDpH5N9EV59ogydK4HTKa4lCPicCsQllM5n/Nf2tUJPir3aiYxzJ73FzhComD4Hpo1ANYnmssBhy8QeoPZA==", "dev": true, "license": "MIT", "peer": true, @@ -1334,9 +1399,9 @@ } }, "node_modules/@tiptap/extension-text-style": { - "version": "2.11.5", - "resolved": "https://registry.npmjs.org/@tiptap/extension-text-style/-/extension-text-style-2.11.5.tgz", - "integrity": "sha512-YUmYl0gILSd/u/ZkOmNxjNXVw+mu8fpC2f8G4I4tLODm0zCx09j9DDEJXSrM5XX72nxJQqtSQsCpNKnL0hfeEQ==", + "version": "2.11.7", + "resolved": "https://registry.npmjs.org/@tiptap/extension-text-style/-/extension-text-style-2.11.7.tgz", + "integrity": "sha512-LHO6DBg/9SkCQFdWlVfw9nolUmw+Cid94WkTY+7IwrpyG2+ZGQxnKpCJCKyeaFNbDoYAtvu0vuTsSXeCkgShcA==", "dev": true, "license": "MIT", "peer": true, @@ -1349,9 +1414,9 @@ } }, "node_modules/@tiptap/extension-underline": { - "version": "2.11.2", - "resolved": "https://registry.npmjs.org/@tiptap/extension-underline/-/extension-underline-2.11.2.tgz", - "integrity": "sha512-Gq7hfV3D/3E1zoE6JXSYZ3boKfbjebFu7IuQZ6w6QSS/IkGN8c6kW+WtkhOKN3jV7Z5uF5KIVp3XCqNIwChWNQ==", + "version": "2.11.5", + "resolved": "https://registry.npmjs.org/@tiptap/extension-underline/-/extension-underline-2.11.5.tgz", + "integrity": "sha512-YpWHXNIkSoRSuzT2cvgKpyJ2tTz3LzqkTM64uC+uTJ8cUkvXIWUWejJR42q8ma/mTlQe4lHff4IQ0Sf58Digtw==", "dev": true, "license": "MIT", "peer": true, @@ -1364,9 +1429,9 @@ } }, "node_modules/@tiptap/pm": { - "version": "2.11.2", - "resolved": "https://registry.npmjs.org/@tiptap/pm/-/pm-2.11.2.tgz", - "integrity": "sha512-lNOMFRcD0mGy7Hf8tFMHW/fnglvq3dA0grs0QrSY4cHyYbH9BHtQjLMDceczXdXbXZq7nEqC40UBWNnqtaclpw==", + "version": "2.11.5", + "resolved": "https://registry.npmjs.org/@tiptap/pm/-/pm-2.11.5.tgz", + "integrity": "sha512-z9JFtqc5ZOsdQLd9vRnXfTCQ8v5ADAfRt9Nm7SqP6FUHII8E1hs38ACzf5xursmth/VonJYb5+73Pqxk1hGIPw==", "dev": true, "license": "MIT", "peer": true, @@ -1385,7 +1450,7 @@ "prosemirror-schema-basic": "^1.2.3", "prosemirror-schema-list": "^1.4.1", "prosemirror-state": "^1.4.3", - "prosemirror-tables": "^1.6.1", + "prosemirror-tables": "^1.6.3", "prosemirror-trailing-node": "^3.0.0", "prosemirror-transform": "^1.10.2", "prosemirror-view": "^1.37.0" @@ -1396,34 +1461,34 @@ } }, "node_modules/@tiptap/starter-kit": { - "version": "2.11.2", - "resolved": "https://registry.npmjs.org/@tiptap/starter-kit/-/starter-kit-2.11.2.tgz", - "integrity": "sha512-FUIblP9BSmBzskf/aX7AIcUK5XP5Gi/VqUqm5evCkzlR1FrggLoy+vY+CX0me4oE/WYk4KAgIRXkE9tcbwotQA==", + "version": "2.11.5", + "resolved": "https://registry.npmjs.org/@tiptap/starter-kit/-/starter-kit-2.11.5.tgz", + "integrity": "sha512-SLI7Aj2ruU1t//6Mk8f+fqW+18uTqpdfLUJYgwu0CkqBckrkRZYZh6GVLk/02k3H2ki7QkFxiFbZrdbZdng0JA==", "dev": true, "license": "MIT", "peer": true, "dependencies": { - "@tiptap/core": "^2.11.2", - "@tiptap/extension-blockquote": "^2.11.2", - "@tiptap/extension-bold": "^2.11.2", - "@tiptap/extension-bullet-list": "^2.11.2", - "@tiptap/extension-code": "^2.11.2", - "@tiptap/extension-code-block": "^2.11.2", - "@tiptap/extension-document": "^2.11.2", - "@tiptap/extension-dropcursor": "^2.11.2", - "@tiptap/extension-gapcursor": "^2.11.2", - "@tiptap/extension-hard-break": "^2.11.2", - "@tiptap/extension-heading": "^2.11.2", - "@tiptap/extension-history": "^2.11.2", - "@tiptap/extension-horizontal-rule": "^2.11.2", - "@tiptap/extension-italic": "^2.11.2", - "@tiptap/extension-list-item": "^2.11.2", - "@tiptap/extension-ordered-list": "^2.11.2", - "@tiptap/extension-paragraph": "^2.11.2", - "@tiptap/extension-strike": "^2.11.2", - "@tiptap/extension-text": "^2.11.2", - "@tiptap/extension-text-style": "^2.11.2", - "@tiptap/pm": "^2.11.2" + "@tiptap/core": "^2.11.5", + "@tiptap/extension-blockquote": "^2.11.5", + "@tiptap/extension-bold": "^2.11.5", + "@tiptap/extension-bullet-list": "^2.11.5", + "@tiptap/extension-code": "^2.11.5", + "@tiptap/extension-code-block": "^2.11.5", + "@tiptap/extension-document": "^2.11.5", + "@tiptap/extension-dropcursor": "^2.11.5", + "@tiptap/extension-gapcursor": "^2.11.5", + "@tiptap/extension-hard-break": "^2.11.5", + "@tiptap/extension-heading": "^2.11.5", + "@tiptap/extension-history": "^2.11.5", + "@tiptap/extension-horizontal-rule": "^2.11.5", + "@tiptap/extension-italic": "^2.11.5", + "@tiptap/extension-list-item": "^2.11.5", + "@tiptap/extension-ordered-list": "^2.11.5", + "@tiptap/extension-paragraph": "^2.11.5", + "@tiptap/extension-strike": "^2.11.5", + "@tiptap/extension-text": "^2.11.5", + "@tiptap/extension-text-style": "^2.11.5", + "@tiptap/pm": "^2.11.5" }, "funding": { "type": "github", @@ -1438,9 +1503,9 @@ "license": "MIT" }, "node_modules/@types/diff": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/@types/diff/-/diff-6.0.0.tgz", - "integrity": "sha512-dhVCYGv3ZSbzmQaBSagrv1WJ6rXCdkyTcDyoNu1MD8JohI7pR7k8wdZEm+mvdxRKXyHVwckFzWU1vJc+Z29MlA==", + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@types/diff/-/diff-7.0.2.tgz", + "integrity": "sha512-JSWRMozjFKsGlEjiiKajUjIJVKuKdE3oVy2DNtK+fUo8q82nhFZ2CPQwicAIkXrofahDXrWJ7mjelvZphMS98Q==", "dev": true, "license": "MIT", "peer": true @@ -1452,6 +1517,13 @@ "dev": true, "license": "MIT" }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true, + "license": "MIT" + }, "node_modules/@types/linkify-it": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/@types/linkify-it/-/linkify-it-5.0.0.tgz", @@ -1503,42 +1575,41 @@ "peer": true }, "node_modules/@umbraco-cms/backoffice": { - "version": "15.2.1", - "resolved": "https://registry.npmjs.org/@umbraco-cms/backoffice/-/backoffice-15.2.1.tgz", - "integrity": "sha512-vIyIfe26mPTN3Tq25BUE2ZLUQ25cjGqT3p+ezkKyfW+gf+RsUh2kVwvFD7PnXjzCJm93OUy/kXYfT8um2Hwe2A==", + "version": "15.3.0", + "resolved": "https://registry.npmjs.org/@umbraco-cms/backoffice/-/backoffice-15.3.0.tgz", + "integrity": "sha512-kpckziSOusUOPmp9AR6htJZqdNb4EO7HP3tjunj9Mi1MPrVhKl4tJy1zwz6o+T/ncGwfJdI4phAir74OS3hoWQ==", "dev": true, "license": "MIT", "workspaces": [ "./src/packages/*" ], "engines": { - "node": ">=20.9 <21", - "npm": ">=10.1 < 11" + "node": ">=22", + "npm": ">=10.9" }, "peerDependencies": { - "@tiptap/core": "2.11.2", - "@tiptap/extension-image": "2.11.2", - "@tiptap/extension-link": "2.11.2", - "@tiptap/extension-placeholder": "2.11.2", - "@tiptap/extension-subscript": "2.11.2", - "@tiptap/extension-superscript": "2.11.2", - "@tiptap/extension-table": "2.11.2", - "@tiptap/extension-table-cell": "2.11.2", - "@tiptap/extension-table-header": "2.11.2", - "@tiptap/extension-table-row": "2.11.2", - "@tiptap/extension-text-align": "2.11.2", - "@tiptap/extension-underline": "2.11.2", - "@tiptap/pm": "2.11.2", - "@tiptap/starter-kit": "2.11.2", - "@types/diff": "^6.0.0", + "@tiptap/core": "2.11.5", + "@tiptap/extension-image": "2.11.5", + "@tiptap/extension-link": "2.11.5", + "@tiptap/extension-placeholder": "2.11.5", + "@tiptap/extension-subscript": "2.11.5", + "@tiptap/extension-superscript": "2.11.5", + "@tiptap/extension-table": "2.11.5", + "@tiptap/extension-table-cell": "2.11.5", + "@tiptap/extension-table-header": "2.11.5", + "@tiptap/extension-table-row": "2.11.5", + "@tiptap/extension-text-align": "2.11.5", + "@tiptap/extension-underline": "2.11.5", + "@tiptap/pm": "2.11.5", + "@tiptap/starter-kit": "2.11.5", + "@types/diff": "^7.0.1", "@umbraco-ui/uui": "^1.12.2", "@umbraco-ui/uui-css": "^1.12.1", - "base64-js": "^1.5.1", "diff": "^7.0.0", - "dompurify": "^3.2.3", - "element-internals-polyfill": "^1.3.12", + "dompurify": "^3.2.4", + "element-internals-polyfill": "^1.3.13", "lit": "^3.2.1", - "marked": "^15.0.6", + "marked": "^15.0.7", "monaco-editor": "^0.52.2", "rxjs": "^7.8.1", "tinymce": "^6.8.5", @@ -2606,6 +2677,19 @@ "@umbraco-ui/uui-base": "1.12.2" } }, + "node_modules/acorn": { + "version": "8.14.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.1.tgz", + "integrity": "sha512-OvQ/2pUDKmgfCg++xsTX1wGxfTaszcHVcTctW4UJB4hibJx2HXxxO5UmVgyjMa+ZDsiaf5wWLXYpRWMmBI0QHg==", + "dev": true, + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/ansi-escapes": { "version": "4.3.2", "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", @@ -2666,30 +2750,72 @@ "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "dev": true, - "license": "Python-2.0", - "peer": true + "license": "Python-2.0" }, - "node_modules/base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "node_modules/c12": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/c12/-/c12-2.0.1.tgz", + "integrity": "sha512-Z4JgsKXHG37C6PYUtIxCfLJZvo6FyhHJoClwwb9ftUkLpPSkuYqn6Tr+vnaN8hymm0kIbcg6Ey3kv/Q71k5w/A==", "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], "license": "MIT", - "peer": true + "dependencies": { + "chokidar": "^4.0.1", + "confbox": "^0.1.7", + "defu": "^6.1.4", + "dotenv": "^16.4.5", + "giget": "^1.2.3", + "jiti": "^2.3.0", + "mlly": "^1.7.1", + "ohash": "^1.1.4", + "pathe": "^1.1.2", + "perfect-debounce": "^1.0.0", + "pkg-types": "^1.2.0", + "rc9": "^2.1.2" + }, + "peerDependencies": { + "magicast": "^0.3.5" + }, + "peerDependenciesMeta": { + "magicast": { + "optional": true + } + } + }, + "node_modules/chokidar": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", + "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", + "dev": true, + "license": "MIT", + "dependencies": { + "readdirp": "^4.0.1" + }, + "engines": { + "node": ">= 14.16.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/chownr": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", + "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "node_modules/citty": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/citty/-/citty-0.1.6.tgz", + "integrity": "sha512-tskPPKEs8D2KPafUypv2gxwJP8h/OaJmC82QQGGDQcHvXX43xF2VDACcJVmZ0EuSxkpO9Kc4MlrA3q0+FG58AQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "consola": "^3.2.3" + } }, "node_modules/cli-width": { "version": "4.1.0", @@ -2762,6 +2888,33 @@ "license": "MIT", "peer": true }, + "node_modules/commander": { + "version": "13.0.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-13.0.0.tgz", + "integrity": "sha512-oPYleIY8wmTVzkvQq10AEok6YcTC4sRUBl8F9gVuwchGVUCTbl/vhLTaQqutuuySYOsu8YTgV+OxKc/8Yvx+mQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/confbox": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/confbox/-/confbox-0.1.8.tgz", + "integrity": "sha512-RMtmw0iFkeR4YV+fUOSucriAQNb9g8zFR52MWCtl+cCZOFRNL6zeB395vPzFhEjjn4fMxXudmELnl/KF/WrK6w==", + "dev": true, + "license": "MIT" + }, + "node_modules/consola": { + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/consola/-/consola-3.4.2.tgz", + "integrity": "sha512-5IKcdX0nnYavi6G7TtOhwkYzyjfJlatbjMjuLSfE2kYT5pMDOilZ4OvMhi637CcDICTmz3wARPoyhqyX1Y+XvA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^14.18.0 || >=16.10.0" + } + }, "node_modules/cookie": { "version": "0.7.2", "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.2.tgz", @@ -2798,6 +2951,20 @@ } } }, + "node_modules/defu": { + "version": "6.1.4", + "resolved": "https://registry.npmjs.org/defu/-/defu-6.1.4.tgz", + "integrity": "sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg==", + "dev": true, + "license": "MIT" + }, + "node_modules/destr": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/destr/-/destr-2.0.5.tgz", + "integrity": "sha512-ugFTXCtDZunbzasqBxrK93Ik/DRYsO6S/fedkWEMKqt04xZ4csmnmwGDBAb07QWNaGMAmnTIemsYZCksjATwsA==", + "dev": true, + "license": "MIT" + }, "node_modules/diff": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/diff/-/diff-7.0.0.tgz", @@ -2820,6 +2987,19 @@ "@types/trusted-types": "^2.0.7" } }, + "node_modules/dotenv": { + "version": "16.4.7", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.7.tgz", + "integrity": "sha512-47qPchRCykZC03FhkYAhrvwU4xDBFIj1QPqaarj6mdM/hgUzfPHcpkHJOn3mJAufFeeAxAzeGsr5X0M4k6fLZQ==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://dotenvx.com" + } + }, "node_modules/element-internals-polyfill": { "version": "1.3.13", "resolved": "https://registry.npmjs.org/element-internals-polyfill/-/element-internals-polyfill-1.3.13.tgz", @@ -2914,6 +3094,32 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/fs-minipass": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", + "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", + "dev": true, + "license": "ISC", + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/fs-minipass/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dev": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/fsevents": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", @@ -2939,6 +3145,32 @@ "node": "6.* || 8.* || >= 10.*" } }, + "node_modules/giget": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/giget/-/giget-1.2.5.tgz", + "integrity": "sha512-r1ekGw/Bgpi3HLV3h1MRBIlSAdHoIMklpaQ3OQLFcRw9PwAj2rqigvIbg+dBUI51OxVI2jsEtDywDBjSiuf7Ug==", + "dev": true, + "license": "MIT", + "dependencies": { + "citty": "^0.1.6", + "consola": "^3.4.0", + "defu": "^6.1.4", + "node-fetch-native": "^1.6.6", + "nypm": "^0.5.4", + "pathe": "^2.0.3", + "tar": "^6.2.1" + }, + "bin": { + "giget": "dist/cli.mjs" + } + }, + "node_modules/giget/node_modules/pathe": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz", + "integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==", + "dev": true, + "license": "MIT" + }, "node_modules/globrex": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/globrex/-/globrex-0.1.2.tgz", @@ -2956,6 +3188,28 @@ "node": "^12.22.0 || ^14.16.0 || ^16.0.0 || >=17.0.0" } }, + "node_modules/handlebars": { + "version": "4.7.8", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.8.tgz", + "integrity": "sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "minimist": "^1.2.5", + "neo-async": "^2.6.2", + "source-map": "^0.6.1", + "wordwrap": "^1.0.0" + }, + "bin": { + "handlebars": "bin/handlebars" + }, + "engines": { + "node": ">=0.4.7" + }, + "optionalDependencies": { + "uglify-js": "^3.1.4" + } + }, "node_modules/headers-polyfill": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/headers-polyfill/-/headers-polyfill-4.0.3.tgz", @@ -2980,6 +3234,29 @@ "dev": true, "license": "MIT" }, + "node_modules/jiti": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/jiti/-/jiti-2.4.2.tgz", + "integrity": "sha512-rg9zJN+G4n2nfJl5MW3BMygZX56zKPNVEYYqq7adpmMh4Jn2QNEwhvQlFy6jPVdcod7txZtKHWnyZiA3a0zP7A==", + "dev": true, + "license": "MIT", + "bin": { + "jiti": "lib/jiti-cli.mjs" + } + }, + "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, + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, "node_modules/linkify-it": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-5.0.0.tgz", @@ -3077,6 +3354,86 @@ "license": "MIT", "peer": true }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/minipass": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz", + "integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=8" + } + }, + "node_modules/minizlib": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", + "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", + "dev": true, + "license": "MIT", + "dependencies": { + "minipass": "^3.0.0", + "yallist": "^4.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/minizlib/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dev": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true, + "license": "MIT", + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/mlly": { + "version": "1.7.4", + "resolved": "https://registry.npmjs.org/mlly/-/mlly-1.7.4.tgz", + "integrity": "sha512-qmdSIPC4bDJXgZTCR7XosJiNKySV7O215tsPtDN9iEO/7q/76b/ijtgRu/+epFXSJhijtTCCGp3DWS549P3xKw==", + "dev": true, + "license": "MIT", + "dependencies": { + "acorn": "^8.14.0", + "pathe": "^2.0.1", + "pkg-types": "^1.3.0", + "ufo": "^1.5.4" + } + }, + "node_modules/mlly/node_modules/pathe": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz", + "integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==", + "dev": true, + "license": "MIT" + }, "node_modules/monaco-editor": { "version": "0.52.2", "resolved": "https://registry.npmjs.org/monaco-editor/-/monaco-editor-0.52.2.tgz", @@ -3166,6 +3523,55 @@ "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" } }, + "node_modules/neo-async": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", + "dev": true, + "license": "MIT" + }, + "node_modules/node-fetch-native": { + "version": "1.6.6", + "resolved": "https://registry.npmjs.org/node-fetch-native/-/node-fetch-native-1.6.6.tgz", + "integrity": "sha512-8Mc2HhqPdlIfedsuZoc3yioPuzp6b+L5jRCRY1QzuWZh2EGJVQrGppC6V6cF0bLdbW0+O2YpqCA25aF/1lvipQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/nypm": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/nypm/-/nypm-0.5.4.tgz", + "integrity": "sha512-X0SNNrZiGU8/e/zAB7sCTtdxWTMSIO73q+xuKgglm2Yvzwlo8UoC5FNySQFCvl84uPaeADkqHUZUkWy4aH4xOA==", + "dev": true, + "license": "MIT", + "dependencies": { + "citty": "^0.1.6", + "consola": "^3.4.0", + "pathe": "^2.0.3", + "pkg-types": "^1.3.1", + "tinyexec": "^0.3.2", + "ufo": "^1.5.4" + }, + "bin": { + "nypm": "dist/cli.mjs" + }, + "engines": { + "node": "^14.16.0 || >=16.10.0" + } + }, + "node_modules/nypm/node_modules/pathe": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz", + "integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==", + "dev": true, + "license": "MIT" + }, + "node_modules/ohash": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/ohash/-/ohash-1.1.6.tgz", + "integrity": "sha512-TBu7PtV8YkAZn0tSxobKY2n2aAQva936lhRrj6957aDaCf9IEtqsKbgMzXE/F/sjqYOwmrukeORHNLe5glk7Cg==", + "dev": true, + "license": "MIT" + }, "node_modules/orderedmap": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/orderedmap/-/orderedmap-2.1.1.tgz", @@ -3188,6 +3594,20 @@ "dev": true, "license": "MIT" }, + "node_modules/pathe": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-1.1.2.tgz", + "integrity": "sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/perfect-debounce": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/perfect-debounce/-/perfect-debounce-1.0.0.tgz", + "integrity": "sha512-xCy9V055GLEqoFaHoC1SoLIaLmWctgCUaBaWxDZ7/Zx4CTyX7cJQLJOok/orfjZAh9kEYpjJa4d0KcJmCbctZA==", + "dev": true, + "license": "MIT" + }, "node_modules/picocolors": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", @@ -3195,6 +3615,25 @@ "dev": true, "license": "ISC" }, + "node_modules/pkg-types": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-1.3.1.tgz", + "integrity": "sha512-/Jm5M4RvtBFVkKWRu2BLUTNP8/M2a+UwuAX+ae4770q1qVGtfjG+WTCupoZixokjmHiry8uI+dlY8KXYV5HVVQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "confbox": "^0.1.8", + "mlly": "^1.7.4", + "pathe": "^2.0.1" + } + }, + "node_modules/pkg-types/node_modules/pathe": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz", + "integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==", + "dev": true, + "license": "MIT" + }, "node_modules/postcss": { "version": "8.5.3", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.3.tgz", @@ -3247,9 +3686,9 @@ } }, "node_modules/prosemirror-commands": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/prosemirror-commands/-/prosemirror-commands-1.6.2.tgz", - "integrity": "sha512-0nDHH++qcf/BuPLYvmqZTUUsPJUCPBUXt0J1ErTcDIS369CTp773itzLGIgIXG4LJXOlwYCr44+Mh4ii6MP1QA==", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/prosemirror-commands/-/prosemirror-commands-1.7.0.tgz", + "integrity": "sha512-6toodS4R/Aah5pdsrIwnTYPEjW70SlO5a66oo5Kk+CIrgJz3ukOoS+FYDGqvQlAX5PxoGWDX1oD++tn5X3pyRA==", "dev": true, "license": "MIT", "peer": true, @@ -3301,9 +3740,9 @@ } }, "node_modules/prosemirror-inputrules": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/prosemirror-inputrules/-/prosemirror-inputrules-1.4.0.tgz", - "integrity": "sha512-6ygpPRuTJ2lcOXs9JkefieMst63wVJBgHZGl5QOytN7oSZs3Co/BYbc3Yx9zm9H37Bxw8kVzCnDsihsVsL4yEg==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/prosemirror-inputrules/-/prosemirror-inputrules-1.5.0.tgz", + "integrity": "sha512-K0xJRCmt+uSw7xesnHmcn72yBGTbY45vm8gXI4LZXbx2Z0jwh5aF9xrGQgrVPu0WbyFVFF3E/o9VhJYz6SQWnA==", "dev": true, "license": "MIT", "peer": true, @@ -3325,16 +3764,16 @@ } }, "node_modules/prosemirror-markdown": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/prosemirror-markdown/-/prosemirror-markdown-1.13.1.tgz", - "integrity": "sha512-Sl+oMfMtAjWtlcZoj/5L/Q39MpEnVZ840Xo330WJWUvgyhNmLBLN7MsHn07s53nG/KImevWHSE6fEj4q/GihHw==", + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/prosemirror-markdown/-/prosemirror-markdown-1.13.2.tgz", + "integrity": "sha512-FPD9rHPdA9fqzNmIIDhhnYQ6WgNoSWX9StUZ8LEKapaXU9i6XgykaHKhp6XMyXlOWetmaFgGDS/nu/w9/vUc5g==", "dev": true, "license": "MIT", "peer": true, "dependencies": { "@types/markdown-it": "^14.0.0", "markdown-it": "^14.0.0", - "prosemirror-model": "^1.20.0" + "prosemirror-model": "^1.25.0" } }, "node_modules/prosemirror-menu": { @@ -3352,9 +3791,9 @@ } }, "node_modules/prosemirror-model": { - "version": "1.24.1", - "resolved": "https://registry.npmjs.org/prosemirror-model/-/prosemirror-model-1.24.1.tgz", - "integrity": "sha512-YM053N+vTThzlWJ/AtPtF1j0ebO36nvbmDy4U7qA2XQB8JVaQp1FmB9Jhrps8s+z+uxhhVTny4m20ptUvhk0Mg==", + "version": "1.25.0", + "resolved": "https://registry.npmjs.org/prosemirror-model/-/prosemirror-model-1.25.0.tgz", + "integrity": "sha512-/8XUmxWf0pkj2BmtqZHYJipTBMHIdVjuvFzMvEoxrtyGNmfvdhBiRwYt/eFwy2wA9DtBW3RLqvZnjurEkHaFCw==", "dev": true, "license": "MIT", "peer": true, @@ -3363,20 +3802,20 @@ } }, "node_modules/prosemirror-schema-basic": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/prosemirror-schema-basic/-/prosemirror-schema-basic-1.2.3.tgz", - "integrity": "sha512-h+H0OQwZVqMon1PNn0AG9cTfx513zgIG2DY00eJ00Yvgb3UD+GQ/VlWW5rcaxacpCGT1Yx8nuhwXk4+QbXUfJA==", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/prosemirror-schema-basic/-/prosemirror-schema-basic-1.2.4.tgz", + "integrity": "sha512-ELxP4TlX3yr2v5rM7Sb70SqStq5NvI15c0j9j/gjsrO5vaw+fnnpovCLEGIcpeGfifkuqJwl4fon6b+KdrODYQ==", "dev": true, "license": "MIT", "peer": true, "dependencies": { - "prosemirror-model": "^1.19.0" + "prosemirror-model": "^1.25.0" } }, "node_modules/prosemirror-schema-list": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/prosemirror-schema-list/-/prosemirror-schema-list-1.5.0.tgz", - "integrity": "sha512-gg1tAfH1sqpECdhIHOA/aLg2VH3ROKBWQ4m8Qp9mBKrOxQRW61zc+gMCI8nh22gnBzd1t2u1/NPLmO3nAa3ssg==", + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/prosemirror-schema-list/-/prosemirror-schema-list-1.5.1.tgz", + "integrity": "sha512-927lFx/uwyQaGwJxLWCZRkjXG0p48KpMj6ueoYiu4JX05GGuGcgzAy62dfiV8eFZftgyBUvLx76RsMe20fJl+Q==", "dev": true, "license": "MIT", "peer": true, @@ -3432,9 +3871,9 @@ } }, "node_modules/prosemirror-transform": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/prosemirror-transform/-/prosemirror-transform-1.10.2.tgz", - "integrity": "sha512-2iUq0wv2iRoJO/zj5mv8uDUriOHWzXRnOTVgCzSXnktS/2iQRa3UUQwVlkBlYZFtygw6Nh1+X4mGqoYBINn5KQ==", + "version": "1.10.3", + "resolved": "https://registry.npmjs.org/prosemirror-transform/-/prosemirror-transform-1.10.3.tgz", + "integrity": "sha512-Nhh/+1kZGRINbEHmVu39oynhcap4hWTs/BlU7NnxWj3+l0qi8I1mu67v6mMdEe/ltD8hHvU4FV6PHiCw2VSpMw==", "dev": true, "license": "MIT", "peer": true, @@ -3443,9 +3882,9 @@ } }, "node_modules/prosemirror-view": { - "version": "1.37.2", - "resolved": "https://registry.npmjs.org/prosemirror-view/-/prosemirror-view-1.37.2.tgz", - "integrity": "sha512-ApcyrfV/cRcaL65on7TQcfWElwLyOgIjnIynfAuV+fIdlpbSvSWRwfuPaH7T5mo4AbO/FID29qOtjiDIKGWyog==", + "version": "1.39.1", + "resolved": "https://registry.npmjs.org/prosemirror-view/-/prosemirror-view-1.39.1.tgz", + "integrity": "sha512-GhLxH1xwnqa5VjhJ29LfcQITNDp+f1jzmMPXQfGW9oNrF0lfjPzKvV5y/bjIQkyKpwCX3Fp+GA4dBpMMk8g+ZQ==", "dev": true, "license": "MIT", "peer": true, @@ -3496,6 +3935,31 @@ "dev": true, "license": "MIT" }, + "node_modules/rc9": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/rc9/-/rc9-2.1.2.tgz", + "integrity": "sha512-btXCnMmRIBINM2LDZoEmOogIZU7Qe7zn4BpomSKZ/ykbLObuBdvG+mFq11DL6fjH1DRwHhrlgtYWG96bJiC7Cg==", + "dev": true, + "license": "MIT", + "dependencies": { + "defu": "^6.1.4", + "destr": "^2.0.3" + } + }, + "node_modules/readdirp": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", + "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 14.18.0" + }, + "funding": { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + }, "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -3584,6 +4048,16 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/source-map-js": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", @@ -3639,6 +4113,31 @@ "node": ">=8" } }, + "node_modules/tar": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/tar/-/tar-6.2.1.tgz", + "integrity": "sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==", + "dev": true, + "license": "ISC", + "dependencies": { + "chownr": "^2.0.0", + "fs-minipass": "^2.0.0", + "minipass": "^5.0.0", + "minizlib": "^2.1.1", + "mkdirp": "^1.0.3", + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/tinyexec": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-0.3.2.tgz", + "integrity": "sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==", + "dev": true, + "license": "MIT" + }, "node_modules/tinymce": { "version": "6.8.5", "resolved": "https://registry.npmjs.org/tinymce/-/tinymce-6.8.5.tgz", @@ -3735,6 +4234,27 @@ "license": "MIT", "peer": true }, + "node_modules/ufo": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.6.1.tgz", + "integrity": "sha512-9a4/uxlTWJ4+a5i0ooc1rU7C7YOw3wT+UGqdeNNHWnOF9qcMBgLRS+4IYUqbczewFx4mLEig6gawh7X6mFlEkA==", + "dev": true, + "license": "MIT" + }, + "node_modules/uglify-js": { + "version": "3.19.3", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.19.3.tgz", + "integrity": "sha512-v3Xu+yuwBXisp6QYTcH4UbH+xYJXqnq2m/LtQVWKWzYc1iehYnLixoQDN9FH6/j9/oybfd6W9Ghwkl8+UMKTKQ==", + "dev": true, + "license": "BSD-2-Clause", + "optional": true, + "bin": { + "uglifyjs": "bin/uglifyjs" + }, + "engines": { + "node": ">=0.8.0" + } + }, "node_modules/universalify": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz", @@ -3871,6 +4391,13 @@ "license": "MIT", "peer": true }, + "node_modules/wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==", + "dev": true, + "license": "MIT" + }, "node_modules/wrap-ansi": { "version": "6.2.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", @@ -3896,6 +4423,13 @@ "node": ">=10" } }, + "node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true, + "license": "ISC" + }, "node_modules/yargs": { "version": "17.7.2", "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", diff --git a/src/Umbraco.Web.UI.Login/package.json b/src/Umbraco.Web.UI.Login/package.json index 20b7a8bc22..4add649e72 100644 --- a/src/Umbraco.Web.UI.Login/package.json +++ b/src/Umbraco.Web.UI.Login/package.json @@ -6,14 +6,17 @@ "dev": "vite", "build": "tsc && vite build", "watch": "tsc && vite build --watch", - "preview": "vite preview" + "preview": "vite preview", + "generate:server-api": "openapi-ts" }, "engines": { "node": ">=22", "npm": ">=10.9" }, "devDependencies": { - "@umbraco-cms/backoffice": "15.2.1", + "@hey-api/client-fetch": "^0.10.0", + "@hey-api/openapi-ts": "^0.66.3", + "@umbraco-cms/backoffice": "15.3.0", "msw": "^2.7.0", "typescript": "^5.7.3", "vite": "^6.2.5", @@ -24,4 +27,4 @@ "public" ] } -} \ No newline at end of file +} diff --git a/src/Umbraco.Web.UI.Login/src/api/client.gen.ts b/src/Umbraco.Web.UI.Login/src/api/client.gen.ts new file mode 100644 index 0000000000..6759c1f28e --- /dev/null +++ b/src/Umbraco.Web.UI.Login/src/api/client.gen.ts @@ -0,0 +1,16 @@ +// This file is auto-generated by @hey-api/openapi-ts + +import type { ClientOptions } from './types.gen'; +import { type Config, type ClientOptions as DefaultClientOptions, createClient, createConfig } from '@hey-api/client-fetch'; + +/** + * The `createClientConfig()` function will be called on client initialization + * and the returned object will become the client's initial configuration. + * + * You may want to initialize your client this way instead of calling + * `setConfig()`. This is useful for example if you're using Next.js + * to ensure your client always has the correct values. + */ +export type CreateClientConfig = (override?: Config) => Config & T>; + +export const client = createClient(createConfig()); \ No newline at end of file diff --git a/src/Umbraco.Web.UI.Login/src/api/index.ts b/src/Umbraco.Web.UI.Login/src/api/index.ts new file mode 100644 index 0000000000..e64537d212 --- /dev/null +++ b/src/Umbraco.Web.UI.Login/src/api/index.ts @@ -0,0 +1,3 @@ +// This file is auto-generated by @hey-api/openapi-ts +export * from './types.gen'; +export * from './sdk.gen'; \ No newline at end of file diff --git a/src/Umbraco.Web.UI.Login/src/api/sdk.gen.ts b/src/Umbraco.Web.UI.Login/src/api/sdk.gen.ts new file mode 100644 index 0000000000..c780cbdccb --- /dev/null +++ b/src/Umbraco.Web.UI.Login/src/api/sdk.gen.ts @@ -0,0 +1,133 @@ +// This file is auto-generated by @hey-api/openapi-ts + +import type { Options as ClientOptions, TDataShape, Client } from '@hey-api/client-fetch'; +import type { GetSecurityConfigurationData, GetSecurityConfigurationResponse, PostSecurityForgotPasswordData, PostSecurityForgotPasswordError, PostSecurityForgotPasswordResetData, PostSecurityForgotPasswordResetResponse, PostSecurityForgotPasswordResetError, PostSecurityForgotPasswordVerifyData, PostSecurityForgotPasswordVerifyResponse, PostSecurityForgotPasswordVerifyError, PostUserInviteData, PostUserInviteError, PostUserInviteCreatePasswordData, PostUserInviteCreatePasswordError, PostUserInviteResendData, PostUserInviteResendError, PostUserInviteVerifyData, PostUserInviteVerifyResponse, PostUserInviteVerifyError } from './types.gen'; +import { client as _heyApiClient } from './client.gen'; + +export type Options = ClientOptions & { + /** + * You can provide a client instance returned by `createClient()` instead of + * individual options. This might be also useful if you want to implement a + * custom client. + */ + client?: Client; + /** + * You can pass arbitrary values through the `meta` object. This can be + * used to access values that aren't defined as part of the SDK function. + */ + meta?: Record; +}; + +export const getSecurityConfiguration = (options?: Options) => { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/security/configuration', + ...options + }); +}; + +export const postSecurityForgotPassword = (options?: Options) => { + return (options?.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/security/forgot-password', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +export const postSecurityForgotPasswordReset = (options?: Options) => { + return (options?.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/security/forgot-password/reset', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +export const postSecurityForgotPasswordVerify = (options?: Options) => { + return (options?.client ?? _heyApiClient).post({ + url: '/umbraco/management/api/v1/security/forgot-password/verify', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +export const postUserInvite = (options?: Options) => { + return (options?.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/user/invite', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +export const postUserInviteCreatePassword = (options?: Options) => { + return (options?.client ?? _heyApiClient).post({ + url: '/umbraco/management/api/v1/user/invite/create-password', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +export const postUserInviteResend = (options?: Options) => { + return (options?.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/user/invite/resend', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +export const postUserInviteVerify = (options?: Options) => { + return (options?.client ?? _heyApiClient).post({ + url: '/umbraco/management/api/v1/user/invite/verify', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; \ No newline at end of file diff --git a/src/Umbraco.Web.UI.Login/src/api/types.gen.ts b/src/Umbraco.Web.UI.Login/src/api/types.gen.ts new file mode 100644 index 0000000000..aad460ad8c --- /dev/null +++ b/src/Umbraco.Web.UI.Login/src/api/types.gen.ts @@ -0,0 +1,354 @@ +// This file is auto-generated by @hey-api/openapi-ts + +export type CreateInitialPasswordUserRequestModel = { + user: ReferenceByIdModel; + token: string; + password: string; +}; + +export type InviteUserRequestModel = { + email: string; + userName: string; + name: string; + userGroupIds: Array; + id?: string | null; + message?: string | null; +}; + +export type PagedProblemDetailsModel = { + total: number; + items: Array; +}; + +export type PagedReferenceByIdModel = { + total: number; + items: Array; +}; + +export type PasswordConfigurationResponseModel = { + minimumPasswordLength: number; + requireNonLetterOrDigit: boolean; + requireDigit: boolean; + requireLowercase: boolean; + requireUppercase: boolean; +}; + +export type ProblemDetails = { + type?: string | null; + title?: string | null; + status?: number | null; + detail?: string | null; + instance?: string | null; + [key: string]: unknown | (string | null) | (string | null) | (number | null) | (string | null) | (string | null) | undefined; +}; + +export type ProblemDetailsBuilderModel = { + [key: string]: never; +}; + +export type ReferenceByIdModel = { + id: string; +}; + +export type ResendInviteUserRequestModel = { + user: ReferenceByIdModel; + message?: string | null; +}; + +export type ResetPasswordRequestModel = { + email: string; +}; + +export type ResetPasswordTokenRequestModel = { + user: ReferenceByIdModel; + resetCode: string; + password: string; +}; + +export type ResetPasswordUserResponseModel = { + resetPassword?: string | null; +}; + +export type SecurityConfigurationResponseModel = { + passwordConfiguration: PasswordConfigurationResponseModel; +}; + +export type VerifyInviteUserRequestModel = { + user: ReferenceByIdModel; + token: string; +}; + +export type VerifyInviteUserResponseModel = { + passwordConfiguration: PasswordConfigurationResponseModel; +}; + +export type VerifyResetPasswordResponseModel = { + passwordConfiguration: PasswordConfigurationResponseModel; +}; + +export type VerifyResetPasswordTokenRequestModel = { + user: ReferenceByIdModel; + resetCode: string; +}; + +export type GetSecurityConfigurationData = { + body?: never; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/security/configuration'; +}; + +export type GetSecurityConfigurationErrors = { + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type GetSecurityConfigurationResponses = { + /** + * OK + */ + 200: SecurityConfigurationResponseModel; +}; + +export type GetSecurityConfigurationResponse = GetSecurityConfigurationResponses[keyof GetSecurityConfigurationResponses]; + +export type PostSecurityForgotPasswordData = { + body?: ResetPasswordRequestModel; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/security/forgot-password'; +}; + +export type PostSecurityForgotPasswordErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; +}; + +export type PostSecurityForgotPasswordError = PostSecurityForgotPasswordErrors[keyof PostSecurityForgotPasswordErrors]; + +export type PostSecurityForgotPasswordResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type PostSecurityForgotPasswordResetData = { + body?: ResetPasswordTokenRequestModel; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/security/forgot-password/reset'; +}; + +export type PostSecurityForgotPasswordResetErrors = { + /** + * Bad Request + */ + 400: ProblemDetailsBuilderModel; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetailsBuilderModel; +}; + +export type PostSecurityForgotPasswordResetError = PostSecurityForgotPasswordResetErrors[keyof PostSecurityForgotPasswordResetErrors]; + +export type PostSecurityForgotPasswordResetResponses = { + /** + * No Content + */ + 204: void; +}; + +export type PostSecurityForgotPasswordResetResponse = PostSecurityForgotPasswordResetResponses[keyof PostSecurityForgotPasswordResetResponses]; + +export type PostSecurityForgotPasswordVerifyData = { + body?: VerifyResetPasswordTokenRequestModel; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/security/forgot-password/verify'; +}; + +export type PostSecurityForgotPasswordVerifyErrors = { + /** + * Bad Request + */ + 400: ProblemDetailsBuilderModel; + /** + * Not Found + */ + 404: ProblemDetailsBuilderModel; +}; + +export type PostSecurityForgotPasswordVerifyError = PostSecurityForgotPasswordVerifyErrors[keyof PostSecurityForgotPasswordVerifyErrors]; + +export type PostSecurityForgotPasswordVerifyResponses = { + /** + * OK + */ + 200: VerifyResetPasswordResponseModel; +}; + +export type PostSecurityForgotPasswordVerifyResponse = PostSecurityForgotPasswordVerifyResponses[keyof PostSecurityForgotPasswordVerifyResponses]; + +export type PostUserInviteData = { + body?: InviteUserRequestModel; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/user/invite'; +}; + +export type PostUserInviteErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PostUserInviteError = PostUserInviteErrors[keyof PostUserInviteErrors]; + +export type PostUserInviteResponses = { + /** + * Created + */ + 201: unknown; +}; + +export type PostUserInviteCreatePasswordData = { + body?: CreateInitialPasswordUserRequestModel; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/user/invite/create-password'; +}; + +export type PostUserInviteCreatePasswordErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PostUserInviteCreatePasswordError = PostUserInviteCreatePasswordErrors[keyof PostUserInviteCreatePasswordErrors]; + +export type PostUserInviteCreatePasswordResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type PostUserInviteResendData = { + body?: ResendInviteUserRequestModel; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/user/invite/resend'; +}; + +export type PostUserInviteResendErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PostUserInviteResendError = PostUserInviteResendErrors[keyof PostUserInviteResendErrors]; + +export type PostUserInviteResendResponses = { + /** + * OK + */ + 200: unknown; +}; + +export type PostUserInviteVerifyData = { + body?: VerifyInviteUserRequestModel; + path?: never; + query?: never; + url: '/umbraco/management/api/v1/user/invite/verify'; +}; + +export type PostUserInviteVerifyErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type PostUserInviteVerifyError = PostUserInviteVerifyErrors[keyof PostUserInviteVerifyErrors]; + +export type PostUserInviteVerifyResponses = { + /** + * OK + */ + 200: VerifyInviteUserResponseModel; +}; + +export type PostUserInviteVerifyResponse = PostUserInviteVerifyResponses[keyof PostUserInviteVerifyResponses]; + +export type ClientOptions = { + baseUrl: `${string}://${string}` | (string & {}); +}; \ No newline at end of file diff --git a/src/Umbraco.Web.UI.Login/src/contexts/auth.repository.ts b/src/Umbraco.Web.UI.Login/src/contexts/auth.repository.ts index 62933575b1..d4ffc31f69 100644 --- a/src/Umbraco.Web.UI.Login/src/contexts/auth.repository.ts +++ b/src/Umbraco.Web.UI.Login/src/contexts/auth.repository.ts @@ -3,7 +3,6 @@ import { LoginResponse, MfaCodeResponse, NewPasswordResponse, - PasswordConfigurationModel, ResetPasswordResponse, ValidateInviteCodeResponse, ValidatePasswordResetCodeResponse, @@ -11,20 +10,20 @@ import { import { UmbRepositoryBase } from '@umbraco-cms/backoffice/repository'; import { UmbLocalizationController } from '@umbraco-cms/backoffice/localization-api'; import { - ApiError, - CancelError, - ProblemDetails, - SecurityService, - UserService, -} from '@umbraco-cms/backoffice/external/backend-api'; -import { tryExecuteAndNotify } from '@umbraco-cms/backoffice/resources'; + postSecurityForgotPassword, + postSecurityForgotPasswordReset, + postSecurityForgotPasswordVerify, + postUserInviteCreatePassword, + postUserInviteVerify, +} from '../api/index.js'; +import { isProblemDetails } from '../utils/is-problem-details.function.js'; export class UmbAuthRepository extends UmbRepositoryBase { #localize = new UmbLocalizationController(this); public async login(data: LoginRequestModel): Promise { try { - const request = new Request('management/api/v1/security/back-office/login', { + const request = new Request('/umbraco/management/api/v1/security/back-office/login', { method: 'POST', body: JSON.stringify({ username: data.username, @@ -70,7 +69,7 @@ export class UmbAuthRepository extends UmbRepositoryBase { public async validateMfaCode(code: string, provider: string): Promise { try { - const requestData = new Request('management/api/v1/security/back-office/verify-2fa', { + const requestData = new Request('/umbraco/management/api/v1/security/back-office/verify-2fa', { method: 'POST', body: JSON.stringify({ code, @@ -99,18 +98,15 @@ export class UmbAuthRepository extends UmbRepositoryBase { } public async resetPassword(email: string): Promise { - const response = await tryExecuteAndNotify( - this, - SecurityService.postSecurityForgotPassword({ - requestBody: { - email, - }, - }) - ); + const { error } = await postSecurityForgotPassword({ + body: { + email, + }, + }); - if (response.error) { + if (error) { return { - error: this.#getApiErrorDetailText(response.error, 'Could not reset the password'), + error: this.#getApiErrorDetailText(error, 'Could not reset the password'), }; } @@ -121,17 +117,14 @@ export class UmbAuthRepository extends UmbRepositoryBase { userId: string, resetCode: string ): Promise { - const { data, error } = await tryExecuteAndNotify( - this, - SecurityService.postSecurityForgotPasswordVerify({ - requestBody: { - user: { - id: userId, - }, - resetCode, + const { data, error } = await postSecurityForgotPasswordVerify({ + body: { + user: { + id: userId, }, - }) - ); + resetCode, + }, + }); if (error || !data) { return { @@ -139,29 +132,23 @@ export class UmbAuthRepository extends UmbRepositoryBase { }; } - return { - passwordConfiguration: (data as unknown as { passwordConfiguration: PasswordConfigurationModel }) - .passwordConfiguration, // TODO: Fix this when the API schema has been updated - }; + return data; } public async newPassword(password: string, resetCode: string, userId: string): Promise { - const response = await tryExecuteAndNotify( - this, - SecurityService.postSecurityForgotPasswordReset({ - requestBody: { - password, - resetCode, - user: { - id: userId, - }, + const { error } = await postSecurityForgotPasswordReset({ + body: { + password, + resetCode, + user: { + id: userId, }, - }) - ); + }, + }); - if (response.error) { + if (error) { return { - error: this.#getApiErrorDetailText(response.error, 'Could not reset the password'), + error: this.#getApiErrorDetailText(error, 'Could not reset the password'), }; } @@ -169,17 +156,14 @@ export class UmbAuthRepository extends UmbRepositoryBase { } public async validateInviteCode(token: string, userId: string): Promise { - const { data, error } = await tryExecuteAndNotify( - this, - UserService.postUserInviteVerify({ - requestBody: { - token, - user: { - id: userId, - }, + const { data, error } = await postUserInviteVerify({ + body: { + token, + user: { + id: userId, }, - }) - ); + }, + }); if (error || !data) { return { @@ -187,49 +171,44 @@ export class UmbAuthRepository extends UmbRepositoryBase { }; } - return { - passwordConfiguration: (data as unknown as { passwordConfiguration: PasswordConfigurationModel }) - .passwordConfiguration, // TODO: Fix this when the API schema has been updated - }; + return data; } public async newInvitedUserPassword(password: string, token: string, userId: string): Promise { - const response = await tryExecuteAndNotify( - this, - UserService.postUserInviteCreatePassword({ - requestBody: { - password, - token, - user: { - id: userId, - }, + const { error } = await postUserInviteCreatePassword({ + body: { + password, + token, + user: { + id: userId, }, - }) - ); + }, + }); - if (response.error) { + if (error) { return { - error: this.#getApiErrorDetailText(response.error, 'Could not create a password for the invited user'), + error: this.#getApiErrorDetailText(error, 'Could not create a password for the invited user'), }; } return {}; } - #getApiErrorDetailText(error: ApiError | CancelError | undefined, fallbackText?: string): string | undefined { - if (error instanceof ApiError) { - // Try to parse the body - return typeof error.body === 'object' - ? (error.body as ProblemDetails).title ?? fallbackText - : fallbackText ?? 'An unknown error occurred.'; + #getApiErrorDetailText(error: unknown, fallbackText?: string): string | undefined { + if (isProblemDetails(error)) { + return error.detail ?? error.title ?? undefined; + } + + if (false === error instanceof Error) { + return fallbackText ?? 'An unknown error occurred.'; } // Ignore cancel errors (user cancelled the request) - if (error instanceof CancelError) { + if (error.name === 'CancelError') { return undefined; } - return fallbackText ?? 'An unknown error occurred.'; + return error.message; } async #getErrorText(response: Response): Promise { diff --git a/src/Umbraco.Web.UI.Login/src/mocks/data/login.data.ts b/src/Umbraco.Web.UI.Login/src/mocks/data/login.data.ts index 2edfc29902..e822a85c25 100644 --- a/src/Umbraco.Web.UI.Login/src/mocks/data/login.data.ts +++ b/src/Umbraco.Web.UI.Login/src/mocks/data/login.data.ts @@ -25,14 +25,14 @@ class UmbLoginData { if (valid) return { data: { - passwordConfiguration: { - minimumLength: 8, - requireDigit: true, - requireLowercase: true, - requireUppercase: true, - requireNonAlphanumeric: true, - } - }, + passwordConfiguration: { + minimumLength: 8, + requireDigit: true, + requireLowercase: true, + requireUppercase: true, + requireNonAlphanumeric: true, + }, + }, status: 200, }; else @@ -51,6 +51,7 @@ class UmbLoginData { email: '2fa@umbraco.com', password: '2fa', twoFactor: true, + enabledTwoFactorProviderNames: ['sms'], }, { id: '2', @@ -58,8 +59,8 @@ class UmbLoginData { email: '2fa@umbraco.com', password: 'html', twoFactor: true, - twoFactorLoginView: '/src/mocks/customViews/my-custom-view.html', - enabledTwoFactorProviderNames: ['sms', 'email'] + twoFactorLoginView: '/src/mocks/customViews/my-custom-view.html', + enabledTwoFactorProviderNames: ['sms', 'email'], }, { id: '3', @@ -67,8 +68,8 @@ class UmbLoginData { email: '2fa@umbraco.com', password: 'js', twoFactor: true, - twoFactorLoginView: '/src/mocks/customViews/my-custom-view.js', - enabledTwoFactorProviderNames: ['sms', 'email'] + twoFactorLoginView: '/src/mocks/customViews/my-custom-view.js', + enabledTwoFactorProviderNames: ['sms', 'email'], }, { id: '4', diff --git a/src/Umbraco.Web.UI.Login/src/mocks/handlers/backoffice.handlers.ts b/src/Umbraco.Web.UI.Login/src/mocks/handlers/backoffice.handlers.ts index bce35fedf3..65628b5757 100644 --- a/src/Umbraco.Web.UI.Login/src/mocks/handlers/backoffice.handlers.ts +++ b/src/Umbraco.Web.UI.Login/src/mocks/handlers/backoffice.handlers.ts @@ -1,4 +1,4 @@ -import { HttpHandler, http, HttpResponse } from "msw"; +import { HttpHandler, http, HttpResponse } from 'msw'; import { umbracoPath } from '@umbraco-cms/backoffice/utils'; import logoUrl from '../../../../Umbraco.Cms.StaticAssets/wwwroot/umbraco/assets/logo.svg'; import logoAlternativeUrl from '../../../../Umbraco.Cms.StaticAssets/wwwroot/umbraco/assets/logo_blue.svg'; @@ -7,59 +7,54 @@ import loginLogoAlternativeUrl from '../../../../Umbraco.Cms.StaticAssets/wwwroo import loginBackgroundUrl from '../../../../Umbraco.Cms.StaticAssets/wwwroot/umbraco/assets/login.jpg'; export const handlers: HttpHandler[] = [ - http.get(umbracoPath('/security/back-office/graphics/logo'), async () => { - const imageBuffer = await fetch(logoUrl) - .then((res) => res.arrayBuffer()); + http.get(umbracoPath('/security/back-office/graphics/logo'), async () => { + const imageBuffer = await fetch(logoUrl).then((res) => res.arrayBuffer()); - return HttpResponse.arrayBuffer(imageBuffer, { - headers: { - 'Content-Length': imageBuffer.byteLength.toString(), - 'Content-Type': 'image/svg+xml' - } - }); - }), - http.get(umbracoPath('/security/back-office/graphics/logo-alternative'), async () => { - const imageBuffer = await fetch(logoAlternativeUrl) - .then((res) => res.arrayBuffer()); + return HttpResponse.arrayBuffer(imageBuffer, { + headers: { + 'Content-Length': imageBuffer.byteLength.toString(), + 'Content-Type': 'image/svg+xml', + }, + }); + }), + http.get(umbracoPath('/security/back-office/graphics/logo-alternative'), async () => { + const imageBuffer = await fetch(logoAlternativeUrl).then((res) => res.arrayBuffer()); - return HttpResponse.arrayBuffer(imageBuffer, { - headers: { - 'Content-Length': imageBuffer.byteLength.toString(), - 'Content-Type': 'image/svg+xml' - } - }); - }), + return HttpResponse.arrayBuffer(imageBuffer, { + headers: { + 'Content-Length': imageBuffer.byteLength.toString(), + 'Content-Type': 'image/svg+xml', + }, + }); + }), http.get(umbracoPath('/security/back-office/graphics/login-logo'), async () => { - const imageBuffer = await fetch(loginLogoUrl) - .then((res) => res.arrayBuffer()); + const imageBuffer = await fetch(loginLogoUrl).then((res) => res.arrayBuffer()); - return HttpResponse.arrayBuffer(imageBuffer, { - headers: { - 'Content-Length': imageBuffer.byteLength.toString(), - 'Content-Type': 'image/svg+xml' - } - }); + return HttpResponse.arrayBuffer(imageBuffer, { + headers: { + 'Content-Length': imageBuffer.byteLength.toString(), + 'Content-Type': 'image/svg+xml', + }, + }); }), http.get(umbracoPath('/security/back-office/graphics/login-logo-alternative'), async () => { - const imageBuffer = await fetch(loginLogoAlternativeUrl) - .then((res) => res.arrayBuffer()); + const imageBuffer = await fetch(loginLogoAlternativeUrl).then((res) => res.arrayBuffer()); - return HttpResponse.arrayBuffer(imageBuffer, { - headers: { - 'Content-Length': imageBuffer.byteLength.toString(), - 'Content-Type': 'image/svg+xml' - } - }); + return HttpResponse.arrayBuffer(imageBuffer, { + headers: { + 'Content-Length': imageBuffer.byteLength.toString(), + 'Content-Type': 'image/svg+xml', + }, + }); }), http.get(umbracoPath('/security/back-office/graphics/login-background'), async () => { - const imageBuffer = await fetch(loginBackgroundUrl) - .then((res) => res.arrayBuffer()); + const imageBuffer = await fetch(loginBackgroundUrl).then((res) => res.arrayBuffer()); - return HttpResponse.arrayBuffer(imageBuffer, { - headers: { - 'Content-Length': imageBuffer.byteLength.toString(), - 'Content-Type': 'image/jpeg' - } - }); + return HttpResponse.arrayBuffer(imageBuffer, { + headers: { + 'Content-Length': imageBuffer.byteLength.toString(), + 'Content-Type': 'image/jpeg', + }, + }); }), ]; diff --git a/src/Umbraco.Web.UI.Login/src/mocks/handlers/login.handlers.ts b/src/Umbraco.Web.UI.Login/src/mocks/handlers/login.handlers.ts index efd97428af..be46059fa3 100644 --- a/src/Umbraco.Web.UI.Login/src/mocks/handlers/login.handlers.ts +++ b/src/Umbraco.Web.UI.Login/src/mocks/handlers/login.handlers.ts @@ -1,59 +1,69 @@ import { umbLoginData } from '../data/login.data.js'; -import { delay, http, type HttpHandler, HttpResponse } from "msw"; -import type { ManifestResponseModel } from "@umbraco-cms/backoffice/external/backend-api"; +import { delay, http, type HttpHandler, HttpResponse } from 'msw'; +import type { ManifestResponseModel, ResetPasswordRequestModel } from '@umbraco-cms/backoffice/external/backend-api'; +import { PostSecurityForgotPasswordData } from '../../api/types.gen.js'; export const handlers: HttpHandler[] = [ - http.get>('umbraco/management/api/v1/manifest/manifest/public', async () => { - await delay(); - return HttpResponse.json>([ - { - name: 'Test Package', - version: '1.0.0', - extensions: [] - } - ]); - }), - - http.post('management/api/v1/security/back-office/login', async ({ request }) => { - const json = await request.json(); - - const username = json.username; - const password = json.password; - - const { status, data } = umbLoginData.login(username, password); - - return HttpResponse.json(data, { status }); + http.get>('/umbraco/management/api/v1/manifest/manifest/public', async () => { + await delay(); + return HttpResponse.json>([ + { + name: 'Test Package', + version: '1.0.0', + extensions: [], + }, + ]); }), - http.post('management/api/v1/security/forgot-password', async () => { - await delay(); - return new Response('', { status: 200 }); - }), + http.post( + '/umbraco/management/api/v1/security/back-office/login', + async ({ request }) => { + const json = await request.json(); - http.post('management/api/v1/security/forgot-password/verify', async ({request}) => { - const json = await request.json(); + const username = json.username; + const password = json.password; - const code = json.resetCode; + const { status, data } = umbLoginData.login(username, password); - const response = umbLoginData.validatePasswordResetCode(code); - - await delay(); - - return HttpResponse.json(response.data, { status: response.status }); - }), - - http.post('management/api/v1/security/forgot-password/reset', async () => { - await delay(); - return new Response(null, { status: 204 }); - }), - - http.post('management/api/v1/security/back-office/verify-2fa', async ({request}) => { - const body = await request.json(); - await delay(); - if (body.code === 'fail') { - return HttpResponse.json({ error: 'Invalid code' }, { status: 400 }); + return HttpResponse.json(data, { status }); } - const user = umbLoginData.users[0]; - return HttpResponse.json(user); + ), + + http.post('/umbraco/management/api/v1/security/forgot-password', async () => { + await delay(); + return new Response('', { status: 200 }); }), + + http.post( + '/umbraco/management/api/v1/security/forgot-password/verify', + async ({ request }) => { + const json = await request.json(); + + const code = json.resetCode; + + const response = umbLoginData.validatePasswordResetCode(code); + + await delay(); + + return HttpResponse.json(response.data, { status: response.status }); + } + ), + + http.post('/umbraco/management/api/v1/security/forgot-password/reset', async () => { + await delay(); + return HttpResponse.json(null, { status: 204 }); + }), + + http.post( + '/umbraco/management/api/v1/security/back-office/verify-2fa', + async ({ request }) => { + const body = await request.json(); + await delay(); + if (body.code === 'fail') { + return HttpResponse.json({ error: 'Invalid code' }, { status: 400 }); + } + const user = umbLoginData.users[0]; + return HttpResponse.json(user); + } + ), ]; diff --git a/src/Umbraco.Web.UI.Login/src/types.ts b/src/Umbraco.Web.UI.Login/src/types.ts index 8a5a42c320..803336edf0 100644 --- a/src/Umbraco.Web.UI.Login/src/types.ts +++ b/src/Umbraco.Web.UI.Login/src/types.ts @@ -1,4 +1,4 @@ -import type { PasswordConfigurationResponseModel } from "@umbraco-cms/backoffice/external/backend-api"; +import type { PasswordConfigurationResponseModel } from './api/index.js'; export type LoginRequestModel = { username: string; @@ -8,16 +8,16 @@ export type LoginRequestModel = { export type LoginResponse = { data?: { - username: string; - }; + username: string; + }; error?: string; status: number; twoFactorView?: string; - twoFactorProviders?: string[]; + twoFactorProviders?: string[]; }; export type MfaCodeResponse = { - error?: string; + error?: string; }; export type ResetPasswordResponse = { @@ -26,7 +26,7 @@ export type ResetPasswordResponse = { export type ValidatePasswordResetCodeResponse = { error?: string; - passwordConfiguration?: PasswordConfigurationModel; + passwordConfiguration?: PasswordConfigurationModel; }; export type NewPasswordResponse = { @@ -34,8 +34,24 @@ export type NewPasswordResponse = { }; export type ValidateInviteCodeResponse = { - error?: string; - passwordConfiguration?: PasswordConfigurationModel; + error?: string; + passwordConfiguration?: PasswordConfigurationModel; }; export type PasswordConfigurationModel = PasswordConfigurationResponseModel; + +export type UmbProblemDetails = { + type?: string | null; + title?: string | null; + status?: number | null; + detail?: string | null; + instance?: string | null; + [key: string]: + | unknown + | (string | null) + | (string | null) + | (number | null) + | (string | null) + | (string | null) + | undefined; +}; diff --git a/src/Umbraco.Web.UI.Login/src/utils/is-problem-details.function.ts b/src/Umbraco.Web.UI.Login/src/utils/is-problem-details.function.ts new file mode 100644 index 0000000000..8465450e27 --- /dev/null +++ b/src/Umbraco.Web.UI.Login/src/utils/is-problem-details.function.ts @@ -0,0 +1,7 @@ +import type { UmbProblemDetails } from '../types.js'; + +export function isProblemDetails(obj: unknown): obj is UmbProblemDetails { + return ( + typeof obj === 'object' && obj !== null && 'type' in obj && 'title' in obj && 'status' in obj && 'detail' in obj + ); +}