update api types
This commit is contained in:
@@ -41,7 +41,7 @@ export class UmbBackofficeElement extends UmbLitElement {
|
||||
super();
|
||||
|
||||
new UmbBackofficeContext(this);
|
||||
new UmbServerExtensionRegistrator(this, umbExtensionsRegistry).registerAllExtensions();
|
||||
new UmbServerExtensionRegistrator(this, umbExtensionsRegistry).registerPrivateExtensions();
|
||||
|
||||
// So far local packages are this simple to registerer, so no need for a manager to do that:
|
||||
CORE_PACKAGES.forEach(async (packageImport) => {
|
||||
|
||||
@@ -195,6 +195,7 @@ export { LogLevelModel } from './models/LogLevelModel';
|
||||
export type { LogMessagePropertyPresentationModel } from './models/LogMessagePropertyPresentationModel';
|
||||
export type { LogMessageResponseModel } from './models/LogMessageResponseModel';
|
||||
export type { LogTemplateResponseModel } from './models/LogTemplateResponseModel';
|
||||
export type { ManifestResponseModel } from './models/ManifestResponseModel';
|
||||
export type { MediaCollectionResponseModel } from './models/MediaCollectionResponseModel';
|
||||
export type { MediaConfigurationResponseModel } from './models/MediaConfigurationResponseModel';
|
||||
export type { MediaItemResponseModel } from './models/MediaItemResponseModel';
|
||||
@@ -255,7 +256,6 @@ export type { OutOfDateStatusResponseModel } from './models/OutOfDateStatusRespo
|
||||
export { OutOfDateTypeModel } from './models/OutOfDateTypeModel';
|
||||
export type { PackageConfigurationResponseModel } from './models/PackageConfigurationResponseModel';
|
||||
export type { PackageDefinitionResponseModel } from './models/PackageDefinitionResponseModel';
|
||||
export type { PackageManifestResponseModel } from './models/PackageManifestResponseModel';
|
||||
export type { PackageMigrationStatusResponseModel } from './models/PackageMigrationStatusResponseModel';
|
||||
export type { PackageModelBaseModel } from './models/PackageModelBaseModel';
|
||||
export type { PagedAllowedDocumentTypeModel } from './models/PagedAllowedDocumentTypeModel';
|
||||
@@ -461,6 +461,8 @@ export type { VariantItemResponseModelBaseModel } from './models/VariantItemResp
|
||||
export type { VariantModelBaseModel } from './models/VariantModelBaseModel';
|
||||
export type { VariantResponseModelBaseModel } from './models/VariantResponseModelBaseModel';
|
||||
export type { VerifyInviteUserRequestModel } from './models/VerifyInviteUserRequestModel';
|
||||
export type { VerifyInviteUserResponseModel } from './models/VerifyInviteUserResponseModel';
|
||||
export type { VerifyResetPasswordResponseModel } from './models/VerifyResetPasswordResponseModel';
|
||||
export type { VerifyResetPasswordTokenRequestModel } from './models/VerifyResetPasswordTokenRequestModel';
|
||||
export type { WebhookEventResponseModel } from './models/WebhookEventResponseModel';
|
||||
export type { WebhookItemResponseModel } from './models/WebhookItemResponseModel';
|
||||
@@ -482,6 +484,7 @@ export { IndexerResource } from './services/IndexerResource';
|
||||
export { InstallResource } from './services/InstallResource';
|
||||
export { LanguageResource } from './services/LanguageResource';
|
||||
export { LogViewerResource } from './services/LogViewerResource';
|
||||
export { ManifestResource } from './services/ManifestResource';
|
||||
export { MediaResource } from './services/MediaResource';
|
||||
export { MediaTypeResource } from './services/MediaTypeResource';
|
||||
export { MemberResource } from './services/MemberResource';
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
export type PackageManifestResponseModel = {
|
||||
export type ManifestResponseModel = {
|
||||
name: string;
|
||||
version?: string | null;
|
||||
extensions: Array<any>;
|
||||
11
src/Umbraco.Web.UI.Client/src/external/backend-api/src/models/VerifyInviteUserResponseModel.ts
vendored
Normal file
11
src/Umbraco.Web.UI.Client/src/external/backend-api/src/models/VerifyInviteUserResponseModel.ts
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
/* generated using openapi-typescript-codegen -- do no edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
import type { PasswordConfigurationResponseModel } from './PasswordConfigurationResponseModel';
|
||||
|
||||
export type VerifyInviteUserResponseModel = {
|
||||
passwordConfiguration: PasswordConfigurationResponseModel;
|
||||
};
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
/* generated using openapi-typescript-codegen -- do no edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
import type { PasswordConfigurationResponseModel } from './PasswordConfigurationResponseModel';
|
||||
|
||||
export type VerifyResetPasswordResponseModel = {
|
||||
passwordConfiguration: PasswordConfigurationResponseModel;
|
||||
};
|
||||
|
||||
52
src/Umbraco.Web.UI.Client/src/external/backend-api/src/services/ManifestResource.ts
vendored
Normal file
52
src/Umbraco.Web.UI.Client/src/external/backend-api/src/services/ManifestResource.ts
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
/* generated using openapi-typescript-codegen -- do no edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type { ManifestResponseModel } from '../models/ManifestResponseModel';
|
||||
|
||||
import type { CancelablePromise } from '../core/CancelablePromise';
|
||||
import { OpenAPI } from '../core/OpenAPI';
|
||||
import { request as __request } from '../core/request';
|
||||
|
||||
export class ManifestResource {
|
||||
|
||||
/**
|
||||
* @returns any Success
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static getManifestManifest(): CancelablePromise<Array<ManifestResponseModel>> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'GET',
|
||||
url: '/umbraco/management/api/v1/manifest/manifest',
|
||||
errors: {
|
||||
401: `The resource is protected and requires an authentication token`,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns any Success
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static getManifestManifestPrivate(): CancelablePromise<Array<ManifestResponseModel>> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'GET',
|
||||
url: '/umbraco/management/api/v1/manifest/manifest/private',
|
||||
errors: {
|
||||
401: `The resource is protected and requires an authentication token`,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns any Success
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static getManifestManifestPublic(): CancelablePromise<Array<ManifestResponseModel>> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'GET',
|
||||
url: '/umbraco/management/api/v1/manifest/manifest/public',
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
@@ -5,7 +5,6 @@
|
||||
import type { CreatePackageRequestModel } from '../models/CreatePackageRequestModel';
|
||||
import type { PackageConfigurationResponseModel } from '../models/PackageConfigurationResponseModel';
|
||||
import type { PackageDefinitionResponseModel } from '../models/PackageDefinitionResponseModel';
|
||||
import type { PackageManifestResponseModel } from '../models/PackageManifestResponseModel';
|
||||
import type { PagedPackageDefinitionResponseModel } from '../models/PagedPackageDefinitionResponseModel';
|
||||
import type { PagedPackageMigrationStatusResponseModel } from '../models/PagedPackageMigrationStatusResponseModel';
|
||||
import type { UpdatePackageRequestModel } from '../models/UpdatePackageRequestModel';
|
||||
@@ -195,31 +194,6 @@ export class PackageResource {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns any Success
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static getPackageManifest(): CancelablePromise<Array<PackageManifestResponseModel>> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'GET',
|
||||
url: '/umbraco/management/api/v1/package/manifest',
|
||||
errors: {
|
||||
401: `The resource is protected and requires an authentication token`,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns any Success
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static getPackageManifestPublic(): CancelablePromise<Array<PackageManifestResponseModel>> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'GET',
|
||||
url: '/umbraco/management/api/v1/package/manifest/public',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns PagedPackageMigrationStatusResponseModel Success
|
||||
* @throws ApiError
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
import type { ResetPasswordRequestModel } from '../models/ResetPasswordRequestModel';
|
||||
import type { ResetPasswordTokenRequestModel } from '../models/ResetPasswordTokenRequestModel';
|
||||
import type { SecurityConfigurationResponseModel } from '../models/SecurityConfigurationResponseModel';
|
||||
import type { VerifyResetPasswordResponseModel } from '../models/VerifyResetPasswordResponseModel';
|
||||
import type { VerifyResetPasswordTokenRequestModel } from '../models/VerifyResetPasswordTokenRequestModel';
|
||||
|
||||
import type { CancelablePromise } from '../core/CancelablePromise';
|
||||
@@ -72,14 +73,14 @@ export class SecurityResource {
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns void
|
||||
* @returns any Success
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static postSecurityForgotPasswordVerify({
|
||||
requestBody,
|
||||
}: {
|
||||
requestBody?: (VerifyResetPasswordTokenRequestModel | ResetPasswordTokenRequestModel),
|
||||
}): CancelablePromise<void> {
|
||||
}): CancelablePromise<VerifyResetPasswordResponseModel> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'POST',
|
||||
url: '/umbraco/management/api/v1/security/forgot-password/verify',
|
||||
|
||||
@@ -31,6 +31,7 @@ import type { UserResponseModel } from '../models/UserResponseModel';
|
||||
import type { UserStateModel } from '../models/UserStateModel';
|
||||
import type { UserTwoFactorProviderModel } from '../models/UserTwoFactorProviderModel';
|
||||
import type { VerifyInviteUserRequestModel } from '../models/VerifyInviteUserRequestModel';
|
||||
import type { VerifyInviteUserResponseModel } from '../models/VerifyInviteUserResponseModel';
|
||||
|
||||
import type { CancelablePromise } from '../core/CancelablePromise';
|
||||
import { OpenAPI } from '../core/OpenAPI';
|
||||
@@ -755,7 +756,6 @@ export class UserResource {
|
||||
responseHeader: 'Umb-Notifications',
|
||||
errors: {
|
||||
400: `Bad Request`,
|
||||
401: `The resource is protected and requires an authentication token`,
|
||||
404: `Not Found`,
|
||||
},
|
||||
});
|
||||
@@ -785,20 +785,19 @@ export class UserResource {
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns string Success
|
||||
* @returns any Success
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static postUserInviteVerify({
|
||||
requestBody,
|
||||
}: {
|
||||
requestBody?: (VerifyInviteUserRequestModel | CreateInitialPasswordUserRequestModel),
|
||||
}): CancelablePromise<string> {
|
||||
}): CancelablePromise<VerifyInviteUserResponseModel> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'POST',
|
||||
url: '/umbraco/management/api/v1/user/invite/verify',
|
||||
body: requestBody,
|
||||
mediaType: 'application/json',
|
||||
responseHeader: 'Umb-Notifications',
|
||||
errors: {
|
||||
400: `Bad Request`,
|
||||
404: `Not Found`,
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
import type { ManifestBase } from '../types/index.js';
|
||||
import { isManifestBaseType } from '../type-guards/index.js';
|
||||
import {
|
||||
PackageResource,
|
||||
OpenAPI,
|
||||
type PackageManifestResponseModel,
|
||||
} from '@umbraco-cms/backoffice/external/backend-api';
|
||||
import { OpenAPI, ManifestResource, 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';
|
||||
@@ -26,7 +22,19 @@ export class UmbServerExtensionRegistrator extends UmbControllerBase {
|
||||
* @remark Users must have the BACKOFFICE_ACCESS permission to access this method.
|
||||
*/
|
||||
public async registerAllExtensions() {
|
||||
const { data: packages } = await tryExecuteAndNotify(this, PackageResource.getPackageManifest());
|
||||
const { data: packages } = await tryExecuteAndNotify(this, ManifestResource.getManifestManifest());
|
||||
if (packages) {
|
||||
await this.#loadServerPackages(packages);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers all private extensions from the server.
|
||||
* This is used to register all private extensions that are available to the user.
|
||||
* @remark Users must have the BACKOFFICE_ACCESS permission to access this method.
|
||||
*/
|
||||
public async registerPrivateExtensions() {
|
||||
const { data: packages } = await tryExecuteAndNotify(this, ManifestResource.getManifestManifestPrivate());
|
||||
if (packages) {
|
||||
await this.#loadServerPackages(packages);
|
||||
}
|
||||
@@ -38,13 +46,13 @@ export class UmbServerExtensionRegistrator extends UmbControllerBase {
|
||||
* @remark Any user can access this method without any permissions.
|
||||
*/
|
||||
public async registerPublicExtensions() {
|
||||
const { data: packages } = await tryExecuteAndNotify(this, PackageResource.getPackageManifestPublic());
|
||||
const { data: packages } = await tryExecuteAndNotify(this, ManifestResource.getManifestManifestPublic());
|
||||
if (packages) {
|
||||
await this.#loadServerPackages(packages);
|
||||
}
|
||||
}
|
||||
|
||||
async #loadServerPackages(packages: PackageManifestResponseModel[]) {
|
||||
async #loadServerPackages(packages: ManifestResponseModel[]) {
|
||||
const extensions: ManifestBase[] = [];
|
||||
|
||||
packages.forEach((p) => {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { PackageManifestResponseModel } from '@umbraco-cms/backoffice/external/backend-api';
|
||||
import type { ManifestResponseModel } from '@umbraco-cms/backoffice/external/backend-api';
|
||||
|
||||
export type UmbPackage = PackageManifestResponseModel;
|
||||
export type UmbPackage = ManifestResponseModel;
|
||||
|
||||
export type PackageManifestResponse = UmbPackage[];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user