extend interface of the create scaffold preset
This commit is contained in:
@@ -1,9 +1,15 @@
|
||||
import type { DataSourceResponse } from '@umbraco-cms/backoffice/repository';
|
||||
|
||||
export interface UmbDataSource<CreateRequestType, CreateResponseType, UpdateRequestType, ResponseType> {
|
||||
export interface UmbDataSource<
|
||||
CreateRequestType,
|
||||
CreateResponseType,
|
||||
UpdateRequestType,
|
||||
ResponseType,
|
||||
CreateScaffoldPresetType = Partial<CreateRequestType>
|
||||
> {
|
||||
createScaffold(
|
||||
parentId: string | null,
|
||||
preset?: Partial<CreateRequestType>
|
||||
preset?: Partial<CreateRequestType> | CreateScaffoldPresetType
|
||||
): Promise<DataSourceResponse<CreateRequestType>>;
|
||||
get(unique: string): Promise<DataSourceResponse<ResponseType>>;
|
||||
insert(data: CreateRequestType): Promise<DataSourceResponse<CreateResponseType>>;
|
||||
|
||||
@@ -5,11 +5,12 @@ export interface UmbDetailRepository<
|
||||
CreateRequestType = any,
|
||||
CreateResponseType = any,
|
||||
UpdateRequestType = any,
|
||||
ResponseType = any
|
||||
ResponseType = any,
|
||||
CreateScaffoldPresetType = Partial<CreateRequestType>
|
||||
> {
|
||||
createScaffold(
|
||||
parentId: string | null,
|
||||
preset?: Partial<CreateRequestType>
|
||||
preset?: Partial<CreateRequestType> | CreateScaffoldPresetType
|
||||
): Promise<DataSourceResponse<CreateRequestType>>;
|
||||
requestById(id: string): Promise<DataSourceResponse<ResponseType | undefined>>;
|
||||
byId(id: string): Promise<Observable<ResponseType | undefined>>;
|
||||
|
||||
Reference in New Issue
Block a user