@nomalism-com/types 0.35.6 → 0.35.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -12,12 +12,13 @@ export type ITagType = (typeof ITagTypeEnum)[keyof typeof ITagTypeEnum];
|
|
|
12
12
|
export declare const ITagType: string[];
|
|
13
13
|
export type ICreateRequest = Omit<Entity, 'id' | 'created_at' | 'updated_at' | 'created_by' | 'updated_by'>;
|
|
14
14
|
export type IUpdateRequest = Pick<Entity, 'index' | 'type'>;
|
|
15
|
+
export type IUpdateManyRequest = Pick<Entity, 'id' | 'index' | 'type'>;
|
|
15
16
|
export type IFindResponse = Omit<Entity, 'created_at' | 'updated_at'>;
|
|
16
17
|
export interface IRepository {
|
|
17
18
|
create(data: ICreateRequest): Promise<void>;
|
|
18
19
|
findByDocumentHeaderId(selector: IShared.IFindByIdRequest): Promise<IFindResponse[]>;
|
|
19
20
|
findById(selector: IShared.IFindByIdRequest): Promise<IFindResponse>;
|
|
20
|
-
update(
|
|
21
|
+
update(data: IUpdateRequest): Promise<void>;
|
|
21
22
|
updateMany(selectors: IShared.IFindByIdRequest[], data: IUpdateRequest): Promise<void>;
|
|
22
23
|
delete(selector: IShared.IFindByIdRequest): Promise<void>;
|
|
23
24
|
}
|
package/package.json
CHANGED
|
@@ -24,13 +24,14 @@ export type ICreateRequest = Omit<
|
|
|
24
24
|
'id' | 'created_at' | 'updated_at' | 'created_by' | 'updated_by'
|
|
25
25
|
>;
|
|
26
26
|
export type IUpdateRequest = Pick<Entity, 'index' | 'type'>;
|
|
27
|
+
export type IUpdateManyRequest = Pick<Entity, 'id' | 'index' | 'type'>;
|
|
27
28
|
export type IFindResponse = Omit<Entity, 'created_at' | 'updated_at'>;
|
|
28
29
|
|
|
29
30
|
export interface IRepository {
|
|
30
31
|
create(data: ICreateRequest): Promise<void>;
|
|
31
32
|
findByDocumentHeaderId(selector: IShared.IFindByIdRequest): Promise<IFindResponse[]>;
|
|
32
33
|
findById(selector: IShared.IFindByIdRequest): Promise<IFindResponse>;
|
|
33
|
-
update(
|
|
34
|
+
update(data: IUpdateRequest): Promise<void>;
|
|
34
35
|
updateMany(selectors: IShared.IFindByIdRequest[], data: IUpdateRequest): Promise<void>;
|
|
35
36
|
delete(selector: IShared.IFindByIdRequest): Promise<void>;
|
|
36
37
|
}
|