Merge pull request #1284 from umbraco/chore/remove-unused-data-source-utils
Chore: Remove unused data source utils + clean up folders
This commit is contained in:
@@ -9,8 +9,7 @@ import { UmbSelectionManager, UmbPaginationManager } from '@umbraco-cms/backoffi
|
||||
import { UmbChangeEvent } from '@umbraco-cms/backoffice/event';
|
||||
import type { ManifestCollection, ManifestRepository } from '@umbraco-cms/backoffice/extension-registry';
|
||||
import type { UmbApi } from '@umbraco-cms/backoffice/extension-api';
|
||||
import type { UmbCollectionFilterModel } from '@umbraco-cms/backoffice/collection';
|
||||
import type { UmbCollectionRepository } from '@umbraco-cms/backoffice/repository';
|
||||
import type { UmbCollectionFilterModel, UmbCollectionRepository } from '@umbraco-cms/backoffice/collection';
|
||||
import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
|
||||
|
||||
export class UmbDefaultCollectionContext<
|
||||
|
||||
@@ -13,3 +13,4 @@ export { UMB_COLLECTION_ALIAS_CONDITION } from './collection-alias.condition.js'
|
||||
export { UMB_COLLECTION_BULK_ACTION_PERMISSION_CONDITION } from './collection-bulk-action-permission.condition.js';
|
||||
|
||||
export { UmbCollectionActionElement, UmbCollectionActionBase } from './action/index.js';
|
||||
export type { UmbCollectionDataSource, UmbCollectionRepository } from './repository/index.js';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { DataSourceResponse } from '../index.js';
|
||||
import type { UmbPagedModel } from './types.js';
|
||||
import type { DataSourceResponse } from '../../repository/index.js';
|
||||
import type { UmbPagedModel } from '../../repository/types.js';
|
||||
|
||||
export interface UmbCollectionDataSource<CollectionItemType, FilterType = unknown> {
|
||||
getCollection(filter: FilterType): Promise<DataSourceResponse<UmbPagedModel<CollectionItemType>>>;
|
||||
@@ -0,0 +1,2 @@
|
||||
export type { UmbCollectionDataSource } from './collection-data-source.interface.js';
|
||||
export type { UmbCollectionRepository } from './collection-repository.interface.js';
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { UmbPagedModel } from '../../repository/data-source/types.js';
|
||||
import type { UmbPagedModel } from '../../repository/types.js';
|
||||
import type { UmbContentTypeStructureDataSource } from './content-type-structure-data-source.interface.js';
|
||||
import type { AllowedContentTypeModel, ItemResponseModelBaseModel } from '@umbraco-cms/backoffice/external/backend-api';
|
||||
import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import { umbExtensionsRegistry } from '../../registry.js';
|
||||
import type { ManifestTypes } from '../../models/index.js';
|
||||
import { UmbRepositoryBase, type UmbCollectionRepository } from '@umbraco-cms/backoffice/repository';
|
||||
import { UmbRepositoryBase } from '@umbraco-cms/backoffice/repository';
|
||||
import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
|
||||
import type { UmbCollectionRepository } from '@umbraco-cms/backoffice/collection';
|
||||
|
||||
export interface UmbExtensionCollectionFilter {
|
||||
skip: number;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { DataSourceResponse } from './data-source/index.js';
|
||||
import type { DataSourceResponse } from '../data-source-response.interface.js';
|
||||
|
||||
export interface UmbCopyRepository {
|
||||
copy(unique: string, targetUnique: string): Promise<DataSourceResponse<string>>;
|
||||
@@ -0,0 +1,2 @@
|
||||
export type { UmbCopyDataSource } from './copy-data-source.interface.js';
|
||||
export type { UmbCopyRepository } from './copy-repository.interface.js';
|
||||
@@ -1,19 +0,0 @@
|
||||
import type { DataSourceResponse } from '@umbraco-cms/backoffice/repository';
|
||||
|
||||
export interface UmbDataSource<
|
||||
CreateRequestType,
|
||||
CreateResponseType,
|
||||
UpdateRequestType,
|
||||
ResponseType,
|
||||
CreateScaffoldPresetType = Partial<CreateRequestType>,
|
||||
ScaffoldResponseType = Partial<ResponseType>,
|
||||
> {
|
||||
createScaffold(
|
||||
parentId: string | null,
|
||||
preset?: Partial<CreateRequestType> | CreateScaffoldPresetType,
|
||||
): Promise<DataSourceResponse<ScaffoldResponseType>>;
|
||||
create(data: CreateRequestType): Promise<DataSourceResponse<CreateResponseType>>;
|
||||
read(unique: string): Promise<DataSourceResponse<ResponseType>>;
|
||||
update(unique: string, data: UpdateRequestType): Promise<DataSourceResponse<ResponseType>>;
|
||||
delete(unique: string): Promise<DataSourceResponse>;
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
import type { DataSourceResponse, UmbPagedModel } from '../index.js';
|
||||
import type { Diff } from '@umbraco-cms/backoffice/utils';
|
||||
|
||||
/**
|
||||
* This function extends the data set of a paged DataSourceResponse.
|
||||
* Provide the desired type as a generic type parameter.
|
||||
* This will require the appendData argument to fill in the missing properties of the items.
|
||||
* @param response {DataSourceResponse<UmbPagedModel<object>>}
|
||||
* @param appendData {object} Additional properties to append to the data set.
|
||||
* @returns {DataSourceResponse<UmbPagedModel<object>>}
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* type originalResponseType = { foo: string };
|
||||
* type extendedResponseType = { foo: string, bar: string };
|
||||
*
|
||||
* const extendedResponse = extendDataSourcePagedResponseData<extendedResponseType>(originalResponse, { bar: 'some additional data' });
|
||||
*
|
||||
* extendedResponse.data.items[0].bar is now equal to 'some additional data'
|
||||
*/
|
||||
export function extendDataSourcePagedResponseData<
|
||||
ExtendedDataType extends IncomingDataType,
|
||||
IncomingDataType extends object = object,
|
||||
MissingPropsType extends object = Diff<IncomingDataType, ExtendedDataType>,
|
||||
// Maybe this Omit<..., "$ype"> can be removed, but for now it kept showing up as a difference, though its not a difference on the two types.
|
||||
ToType = IncomingDataType & ExtendedDataType,
|
||||
>(
|
||||
response: DataSourceResponse<UmbPagedModel<IncomingDataType>>,
|
||||
appendData: MissingPropsType,
|
||||
): DataSourceResponse<UmbPagedModel<ToType>> {
|
||||
if (response.data === undefined) return response as unknown as DataSourceResponse<UmbPagedModel<ToType>>;
|
||||
return {
|
||||
...response,
|
||||
data: {
|
||||
...response.data,
|
||||
items: response.data.items.map((x) => {
|
||||
return { ...x, ...appendData } as unknown as ToType;
|
||||
}),
|
||||
},
|
||||
};
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
import { expect } from '@open-wc/testing';
|
||||
import type { UmbPagedModel } from './types.js';
|
||||
import type { DataSourceResponse } from './data-source-response.interface.js';
|
||||
import { extendDataSourcePagedResponseData } from './extend-data-source-paged-response-data.function.js';
|
||||
|
||||
describe('extendDataSourcePagedResponseData', () => {
|
||||
it('is a function', () => {
|
||||
expect(extendDataSourcePagedResponseData).that.is.a('function');
|
||||
});
|
||||
|
||||
describe('Extending data set', () => {
|
||||
it('has an controllerAlias property', () => {
|
||||
const response: DataSourceResponse<UmbPagedModel<object>> = {
|
||||
data: {
|
||||
items: [
|
||||
{
|
||||
original: 'prop',
|
||||
},
|
||||
{
|
||||
original: 'prop',
|
||||
},
|
||||
],
|
||||
total: 2,
|
||||
},
|
||||
};
|
||||
|
||||
const extendedResponse = extendDataSourcePagedResponseData(response, { foo: 'bar' });
|
||||
|
||||
expect(extendedResponse.data).that.is.a('object');
|
||||
expect(extendedResponse.data?.items[1])
|
||||
.to.have.property('original')
|
||||
.to.be.equal('prop');
|
||||
expect(extendedResponse.data?.items[1])
|
||||
.to.have.property('foo')
|
||||
.to.be.equal('bar');
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -1,29 +0,0 @@
|
||||
import type { DataSourceResponse } from '../index.js';
|
||||
import type { Diff } from '@umbraco-cms/backoffice/utils';
|
||||
|
||||
/**
|
||||
* This function extends the data set of a DataSourceResponse.
|
||||
* Provide the desired type as a generic type parameter.
|
||||
* This will require the appendData argument to fill in the missing properties of the data.
|
||||
* @param response {DataSourceResponse<object>}
|
||||
* @param appendData {object} Additional properties to append to the data.
|
||||
* @returns {DataSourceResponse<object>}
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* type originalResponseType = { foo: string };
|
||||
* type extendedResponseType = { foo: string, bar: string };
|
||||
*
|
||||
* const extendedResponse = extendDataSourceResponseData<extendedResponseType>(originalResponse, { bar: 'some additional data' });
|
||||
*
|
||||
* extendedResponse.data.bar is now equal to 'some additional data'
|
||||
*/
|
||||
export function extendDataSourceResponseData<
|
||||
ExtendedDataType extends IncomingDataType,
|
||||
IncomingDataType extends object = object,
|
||||
MissingPropsType extends object = Diff<IncomingDataType, ExtendedDataType>,
|
||||
ToType = IncomingDataType & ExtendedDataType,
|
||||
>(response: DataSourceResponse<IncomingDataType>, appendData: MissingPropsType): DataSourceResponse<ToType> {
|
||||
if (response.data === undefined) return response as unknown as DataSourceResponse<ToType>;
|
||||
return { ...response, data: { ...response.data, ...appendData } as unknown as ToType };
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
import { expect } from '@open-wc/testing';
|
||||
import { extendDataSourceResponseData } from './extend-data-source-response-data.function.js';
|
||||
import type { DataSourceResponse } from './data-source-response.interface.js';
|
||||
|
||||
describe('extendDataSourceResponseData', () => {
|
||||
it('is a function', () => {
|
||||
expect(extendDataSourceResponseData).that.is.a('function');
|
||||
});
|
||||
|
||||
describe('Extending data set', () => {
|
||||
it('has extended data of DataSourceResponse', () => {
|
||||
const response: DataSourceResponse<object> = {
|
||||
data: {
|
||||
original: 'prop',
|
||||
},
|
||||
};
|
||||
|
||||
const extendedResponse = extendDataSourceResponseData(response, { foo: 'bar' });
|
||||
|
||||
expect(extendedResponse.data).to.have.property('original').to.be.equal('prop');
|
||||
expect(extendedResponse.data).to.have.property('foo').to.be.equal('bar');
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -1,8 +0,0 @@
|
||||
export * from './collection-data-source.interface.js';
|
||||
export * from './copy-data-source.interface.js';
|
||||
export * from './data-source-response.interface.js';
|
||||
export * from './data-source.interface.js';
|
||||
export * from './extend-data-source-paged-response-data.function.js';
|
||||
export * from './extend-data-source-response-data.function.js';
|
||||
export * from './move-data-source.interface.js';
|
||||
export * from './types.js';
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { DataSourceResponse } from '../data-source/index.js';
|
||||
import type { DataSourceResponse } from '../data-source-response.interface.js';
|
||||
import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
|
||||
|
||||
export interface UmbDetailDataSourceConstructor<DetailType = any> {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { DataSourceResponse, UmbDataSourceErrorResponse } from '../data-source/index.js';
|
||||
import type { DataSourceResponse, UmbDataSourceErrorResponse } from '../data-source-response.interface.js';
|
||||
import type { Observable } from '@umbraco-cms/backoffice/external/rxjs';
|
||||
|
||||
export interface UmbDetailRepository<DetailModelType> {
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
export type { UmbDetailDataSource, UmbDetailDataSourceConstructor } from './detail-data-source.interface.js';
|
||||
export { UmbDetailRepositoryBase } from './detail-repository-base.js';
|
||||
export type { UmbDetailRepository } from './detail-repository.interface.js';
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
export * from './data-source/index.js';
|
||||
export * from './detail/detail-repository.interface.js';
|
||||
export * from './collection-repository.interface.js';
|
||||
export * from './move-repository.interface.js';
|
||||
export * from './copy-repository.interface.js';
|
||||
export * from './repository-items.manager.js';
|
||||
export * from './repository-base.js';
|
||||
|
||||
export * from './item/index.js';
|
||||
export * from './detail/index.js';
|
||||
|
||||
export type { DataSourceResponse, UmbDataSourceErrorResponse } from './data-source-response.interface.js';
|
||||
export type { UmbMoveDataSource, UmbMoveRepository } from './move/index.js';
|
||||
export type { UmbCopyDataSource, UmbCopyRepository } from './copy/index.js';
|
||||
export type { UmbPagedModel } from './types.js';
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
export type { UmbMoveDataSource } from './move-data-source.interface.js';
|
||||
export type { UmbMoveRepository } from './move-repository.interface.js';
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { UmbDataSourceErrorResponse } from './data-source/index.js';
|
||||
import type { UmbDataSourceErrorResponse } from '../data-source-response.interface.js';
|
||||
|
||||
export interface UmbMoveRepository {
|
||||
move(unique: string, targetUnique: string): Promise<UmbDataSourceErrorResponse>;
|
||||
@@ -1,7 +1,4 @@
|
||||
import type {
|
||||
DataSourceResponse,
|
||||
UmbDataSourceErrorResponse,
|
||||
} from '../../repository/data-source/data-source-response.interface.js';
|
||||
import type { DataSourceResponse, UmbDataSourceErrorResponse } from '@umbraco-cms/backoffice/repository';
|
||||
import type { UmbCreateFolderModel, UmbFolderModel, UmbUpdateFolderModel } from './types.js';
|
||||
import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { DataSourceResponse, UmbDataSourceErrorResponse } from '../../repository/data-source/index.js';
|
||||
import type { UmbCreateFolderModel, UmbFolderModel, UmbUpdateFolderModel } from './types.js';
|
||||
import type { DataSourceResponse, UmbDataSourceErrorResponse } from '@umbraco-cms/backoffice/repository';
|
||||
import type { UmbApi } from '@umbraco-cms/backoffice/extension-api';
|
||||
export interface UmbFolderRepository extends UmbApi {
|
||||
createScaffold(parentUnique: string | null): Promise<DataSourceResponse<UmbFolderModel>>;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { UmbDictionaryCollectionFilterModel } from '../types.js';
|
||||
import { UmbDictionaryCollectionServerDataSource } from './dictionary-collection.server.data-source.js';
|
||||
import type { UmbDictionaryCollectionDataSource } from './types.js';
|
||||
import type { UmbCollectionRepository } from '@umbraco-cms/backoffice/repository';
|
||||
import type { UmbCollectionRepository } from '@umbraco-cms/backoffice/collection';
|
||||
import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
|
||||
|
||||
export class UmbDictionaryCollectionRepository implements UmbCollectionRepository {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { UmbDictionaryCollectionFilterModel, UmbDictionaryCollectionModel } from '../types.js';
|
||||
import { UMB_DICTIONARY_ENTITY_TYPE } from '../../entity.js';
|
||||
import type { UmbCollectionDataSource } from '@umbraco-cms/backoffice/repository';
|
||||
import type { UmbCollectionDataSource } from '@umbraco-cms/backoffice/collection';
|
||||
import { DictionaryResource } from '@umbraco-cms/backoffice/external/backend-api';
|
||||
import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
|
||||
import { tryExecuteAndNotify } from '@umbraco-cms/backoffice/resources';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { UmbDictionaryCollectionFilterModel, UmbDictionaryCollectionModel } from '../types.js';
|
||||
import type { UmbCollectionDataSource } from '@umbraco-cms/backoffice/repository';
|
||||
import type { UmbCollectionDataSource } from '@umbraco-cms/backoffice/collection';
|
||||
|
||||
export type UmbDictionaryCollectionDataSource = UmbCollectionDataSource<
|
||||
UmbDictionaryCollectionModel,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { UmbDocumentCollectionFilterModel } from '../types.js';
|
||||
import { UmbDocumentCollectionServerDataSource } from './document-collection.server.data-source.js';
|
||||
import type { UmbCollectionRepository } from '@umbraco-cms/backoffice/repository';
|
||||
import type { UmbCollectionRepository } from '@umbraco-cms/backoffice/collection';
|
||||
import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
|
||||
|
||||
export class UmbDocumentCollectionRepository implements UmbCollectionRepository {
|
||||
|
||||
@@ -2,7 +2,7 @@ import type { UmbDocumentCollectionFilterModel, UmbDocumentCollectionItemModel }
|
||||
import { DirectionModel, DocumentResource } from '@umbraco-cms/backoffice/external/backend-api';
|
||||
import { tryExecuteAndNotify } from '@umbraco-cms/backoffice/resources';
|
||||
import type { DocumentCollectionResponseModel } from '@umbraco-cms/backoffice/external/backend-api';
|
||||
import type { UmbCollectionDataSource } from '@umbraco-cms/backoffice/repository';
|
||||
import type { UmbCollectionDataSource } from '@umbraco-cms/backoffice/collection';
|
||||
import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
|
||||
|
||||
export class UmbDocumentCollectionServerDataSource implements UmbCollectionDataSource<UmbDocumentCollectionItemModel> {
|
||||
@@ -36,7 +36,6 @@ export class UmbDocumentCollectionServerDataSource implements UmbCollectionDataS
|
||||
|
||||
if (data) {
|
||||
const items = data.items.map((item: DocumentCollectionResponseModel) => {
|
||||
|
||||
// TODO: [LK] Temp solution, review how to get the name from the corresponding variant.
|
||||
const variant = item.variants[0];
|
||||
|
||||
@@ -49,7 +48,9 @@ export class UmbDocumentCollectionServerDataSource implements UmbCollectionDataS
|
||||
state: variant.state,
|
||||
updateDate: new Date(variant.updateDate),
|
||||
updater: item.updater,
|
||||
values: item.values.map((item) => { return { alias: item.alias, value: item.value }; }),
|
||||
values: item.values.map((item) => {
|
||||
return { alias: item.alias, value: item.value };
|
||||
}),
|
||||
};
|
||||
return model;
|
||||
});
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { UmbLanguageCollectionFilterModel } from '../types.js';
|
||||
import { UmbLanguageCollectionServerDataSource } from './language-collection.server.data-source.js';
|
||||
import type { UmbLanguageCollectionDataSource } from './types.js';
|
||||
import type { UmbCollectionRepository } from '@umbraco-cms/backoffice/repository';
|
||||
import type { UmbCollectionRepository } from '@umbraco-cms/backoffice/collection';
|
||||
import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
|
||||
|
||||
export class UmbLanguageCollectionRepository implements UmbCollectionRepository {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { UmbLanguageCollectionFilterModel } from '../types.js';
|
||||
import type { UmbLanguageDetailModel } from '../../types.js';
|
||||
import { UMB_LANGUAGE_ENTITY_TYPE } from '../../entity.js';
|
||||
import type { UmbCollectionDataSource } from '@umbraco-cms/backoffice/repository';
|
||||
import type { UmbCollectionDataSource } from '@umbraco-cms/backoffice/collection';
|
||||
import { LanguageResource } from '@umbraco-cms/backoffice/external/backend-api';
|
||||
import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
|
||||
import { tryExecuteAndNotify } from '@umbraco-cms/backoffice/resources';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { UmbLanguageDetailModel } from '../../types.js';
|
||||
import type { UmbLanguageCollectionFilterModel } from '../types.js';
|
||||
import type { UmbCollectionDataSource } from '@umbraco-cms/backoffice/repository';
|
||||
import type { UmbCollectionDataSource } from '@umbraco-cms/backoffice/collection';
|
||||
|
||||
export type UmbLanguageCollectionDataSource = UmbCollectionDataSource<
|
||||
UmbLanguageDetailModel,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { UmbMediaCollectionFilterModel } from '../types.js';
|
||||
import { UmbMediaCollectionServerDataSource } from './media-collection.server.data-source.js';
|
||||
import type { UmbCollectionRepository } from '@umbraco-cms/backoffice/repository';
|
||||
import type { UmbCollectionRepository } from '@umbraco-cms/backoffice/collection';
|
||||
import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
|
||||
|
||||
export class UmbMediaCollectionRepository implements UmbCollectionRepository {
|
||||
|
||||
@@ -2,7 +2,7 @@ import type { UmbMediaCollectionFilterModel, UmbMediaCollectionItemModel } from
|
||||
import { DirectionModel, MediaResource } from '@umbraco-cms/backoffice/external/backend-api';
|
||||
import { tryExecuteAndNotify } from '@umbraco-cms/backoffice/resources';
|
||||
import type { MediaCollectionResponseModel } from '@umbraco-cms/backoffice/external/backend-api';
|
||||
import type { UmbCollectionDataSource } from '@umbraco-cms/backoffice/repository';
|
||||
import type { UmbCollectionDataSource } from '@umbraco-cms/backoffice/collection';
|
||||
import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
|
||||
|
||||
export class UmbMediaCollectionServerDataSource implements UmbCollectionDataSource<UmbMediaCollectionItemModel> {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { UmbMemberGroupCollectionFilterModel } from '../types.js';
|
||||
import { UmbMemberGroupCollectionServerDataSource } from './member-group-collection.server.data-source.js';
|
||||
import type { UmbMemberGroupCollectionDataSource } from './types.js';
|
||||
import type { UmbCollectionRepository } from '@umbraco-cms/backoffice/repository';
|
||||
import type { UmbCollectionRepository } from '@umbraco-cms/backoffice/collection';
|
||||
import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
|
||||
|
||||
export class UmbMemberGroupCollectionRepository implements UmbCollectionRepository {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { UmbMemberGroupCollectionFilterModel, UmbMemberGroupCollectionModel } from '../types.js';
|
||||
import type { UmbMemberGroupDetailModel } from '../../types.js';
|
||||
import { UMB_MEMBER_GROUP_ENTITY_TYPE } from '../../entity.js';
|
||||
import type { UmbCollectionDataSource } from '@umbraco-cms/backoffice/repository';
|
||||
import type { UmbCollectionDataSource } from '@umbraco-cms/backoffice/collection';
|
||||
import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
|
||||
import { tryExecuteAndNotify } from '@umbraco-cms/backoffice/resources';
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { UmbMemberGroupCollectionFilterModel, UmbMemberGroupCollectionModel } from '../types.js';
|
||||
import type { UmbCollectionDataSource } from '@umbraco-cms/backoffice/repository';
|
||||
import type { UmbCollectionDataSource } from '@umbraco-cms/backoffice/collection';
|
||||
|
||||
export type UmbMemberGroupCollectionDataSource = UmbCollectionDataSource<
|
||||
UmbMemberGroupCollectionModel,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { UmbMemberCollectionFilterModel } from '../types.js';
|
||||
import { UmbMemberCollectionServerDataSource } from './member-collection.server.data-source.js';
|
||||
import type { UmbMemberCollectionDataSource } from './types.js';
|
||||
import type { UmbCollectionRepository } from '@umbraco-cms/backoffice/repository';
|
||||
import type { UmbCollectionRepository } from '@umbraco-cms/backoffice/collection';
|
||||
import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
|
||||
|
||||
export class UmbMemberCollectionRepository implements UmbCollectionRepository {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { UmbMemberCollectionFilterModel, UmbMemberCollectionModel } from '../types.js';
|
||||
import type { UmbMemberDetailModel } from '../../types.js';
|
||||
import { UMB_MEMBER_ENTITY_TYPE } from '../../entity.js';
|
||||
import type { UmbCollectionDataSource } from '@umbraco-cms/backoffice/repository';
|
||||
import type { UmbCollectionDataSource } from '@umbraco-cms/backoffice/collection';
|
||||
import { MemberResource } from '@umbraco-cms/backoffice/external/backend-api';
|
||||
import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
|
||||
import { tryExecuteAndNotify } from '@umbraco-cms/backoffice/resources';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { UmbMemberDetailModel } from '../../types.js';
|
||||
import type { UmbMemberCollectionFilterModel } from '../types.js';
|
||||
import type { UmbCollectionDataSource } from '@umbraco-cms/backoffice/repository';
|
||||
import type { UmbCollectionDataSource } from '@umbraco-cms/backoffice/collection';
|
||||
|
||||
export type UmbMemberCollectionDataSource = UmbCollectionDataSource<
|
||||
UmbMemberDetailModel,
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import type { UmbDataSource } from '@umbraco-cms/backoffice/repository';
|
||||
import type {
|
||||
RelationTypeResponseModel,
|
||||
CreateRelationTypeRequestModel,
|
||||
@@ -15,10 +14,7 @@ import { UmbId } from '@umbraco-cms/backoffice/id';
|
||||
* @class UmbRelationTypeServerDataSource
|
||||
* @implements {RepositoryDetailDataSource}
|
||||
*/
|
||||
export class UmbRelationTypeServerDataSource
|
||||
implements
|
||||
UmbDataSource<CreateRelationTypeRequestModel, any, UpdateRelationTypeRequestModel, RelationTypeResponseModel>
|
||||
{
|
||||
export class UmbRelationTypeServerDataSource {
|
||||
#host: UmbControllerHost;
|
||||
|
||||
/**
|
||||
|
||||
@@ -3,7 +3,7 @@ import type { UmbUserGroupDetailStore } from '../../repository/index.js';
|
||||
import { UMB_USER_GROUP_DETAIL_STORE_CONTEXT } from '../../repository/index.js';
|
||||
import type { UmbUserGroupCollectionFilterModel } from '../types.js';
|
||||
import { UmbUserGroupCollectionServerDataSource } from './user-group-collection.server.data-source.js';
|
||||
import type { UmbCollectionDataSource, UmbCollectionRepository } from '@umbraco-cms/backoffice/repository';
|
||||
import type { UmbCollectionDataSource, UmbCollectionRepository } from '@umbraco-cms/backoffice/collection';
|
||||
import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
|
||||
import { UmbBaseController } from '@umbraco-cms/backoffice/class-api';
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import type { UmbUserGroupCollectionFilterModel } from '../types.js';
|
||||
import type { UmbUserGroupDetailModel } from '../../types.js';
|
||||
import { UMB_USER_GROUP_ENTITY_TYPE } from '../../entity.js';
|
||||
import { UserGroupResource } from '@umbraco-cms/backoffice/external/backend-api';
|
||||
import type { UmbCollectionDataSource } from '@umbraco-cms/backoffice/repository';
|
||||
import type { UmbCollectionDataSource } from '@umbraco-cms/backoffice/collection';
|
||||
import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
|
||||
import { tryExecuteAndNotify } from '@umbraco-cms/backoffice/resources';
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { UmbUserDetailModel } from '../../types.js';
|
||||
import type { UmbUserCollectionFilterModel } from '../types.js';
|
||||
import type { UmbCollectionDataSource } from '@umbraco-cms/backoffice/repository';
|
||||
import type { UmbCollectionDataSource } from '@umbraco-cms/backoffice/collection';
|
||||
|
||||
export interface UmbUserCollectionDataSource
|
||||
extends UmbCollectionDataSource<UmbUserDetailModel, UmbUserCollectionFilterModel> {}
|
||||
|
||||
@@ -2,7 +2,7 @@ import { UmbUserRepositoryBase } from '../../repository/user-repository-base.js'
|
||||
import type { UmbUserCollectionFilterModel } from '../types.js';
|
||||
import { UmbUserCollectionServerDataSource } from './user-collection.server.data-source.js';
|
||||
import type { UmbUserCollectionDataSource } from './types.js';
|
||||
import type { UmbCollectionRepository } from '@umbraco-cms/backoffice/repository';
|
||||
import type { UmbCollectionRepository } from '@umbraco-cms/backoffice/collection';
|
||||
import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
|
||||
|
||||
export class UmbUserCollectionRepository extends UmbUserRepositoryBase implements UmbCollectionRepository {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { UmbUserDetailModel } from '../../types.js';
|
||||
import { UMB_USER_ENTITY_TYPE } from '../../entity.js';
|
||||
import type { UmbUserCollectionFilterModel } from '../types.js';
|
||||
import type { UmbCollectionDataSource } from '@umbraco-cms/backoffice/repository';
|
||||
import type { UmbCollectionDataSource } from '@umbraco-cms/backoffice/collection';
|
||||
import type { UserResponseModel } from '@umbraco-cms/backoffice/external/backend-api';
|
||||
import { UserResource } from '@umbraco-cms/backoffice/external/backend-api';
|
||||
import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
|
||||
|
||||
Reference in New Issue
Block a user