add preset parameter to create scaffold interface

To align with repository interface
This commit is contained in:
Julia Gru
2023-07-18 13:13:25 +02:00
parent 32d21488ef
commit ec078bcc96

View File

@@ -1,7 +1,10 @@
import type { DataSourceResponse } from '@umbraco-cms/backoffice/repository';
export interface UmbDataSource<CreateRequestType, CreateResponseType, UpdateRequestType, ResponseType> {
createScaffold(parentId: string | null): Promise<DataSourceResponse<CreateRequestType>>;
createScaffold(
parentId: string | null,
preset?: Partial<CreateRequestType>
): Promise<DataSourceResponse<CreateRequestType>>;
get(unique: string): Promise<DataSourceResponse<ResponseType>>;
insert(data: CreateRequestType): Promise<DataSourceResponse<CreateResponseType>>;
update(unique: string, data: UpdateRequestType): Promise<DataSourceResponse<ResponseType>>;