@nomalism-com/types 0.10.9 → 0.10.10

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.
@@ -223,7 +223,7 @@ export interface IRepository {
223
223
  findByOwnerId(params: IShared.IFindByOwnerIdRequest): Promise<DocumentLine[]>;
224
224
  findUnallocatedStock(): Promise<IFindUnallocatedStockResponse[]>;
225
225
  findByState(data: IFindByDocumentLineStateRequest): Promise<IFindByDocumentLineStateResponse[]>;
226
- create(data: ICreateRequest[]): Promise<IDocumentLineAssoc.Entity[]>;
226
+ create(data: ICreateRequest[]): Promise<IDocumentLineAssoc.IEntityWithDocumentLine[]>;
227
227
  update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<void>;
228
228
  updateData(data: IUpdateDataRequest): Promise<IUpdateLineStatesTriggerResponse>;
229
229
  updateMany(data: IUpdateManyRequest): Promise<void>;
@@ -231,6 +231,6 @@ export interface IRepository {
231
231
  deleteMany(document_line_ids: string[]): Promise<void>;
232
232
  }
233
233
  export type IApi = Omit<IRepository, 'updateData'> & {
234
- updateData(data: IUpdateDataRequestWithoutStamps): Promise<IDocumentLineAssoc.Entity[]>;
234
+ updateData(data: IUpdateDataRequestWithoutStamps): Promise<IDocumentLineAssoc.IEntityWithDocumentLine[]>;
235
235
  };
236
236
  export type IController = IShared.IEntityWithUserToken<IRepository>;
@@ -1,11 +1,14 @@
1
1
  import * as IShared from '../../../shared/interface';
2
- import { DocumentLineAssoc } from '../../../shared/entities';
2
+ import { DocumentLineAssoc, DocumentLine } from '../../../shared/entities';
3
3
  import * as IDocumentLine from '../documentLine/interfaces';
4
4
  import * as IPlot from '../../stock/plot/interface';
5
5
  export type Entity = DocumentLineAssoc;
6
6
  export declare const Route = "documentLineAssoc";
7
7
  export declare const UpperName = "DocumentLineAssoc";
8
8
  export declare const LowerName: string;
9
+ export interface IEntityWithDocumentLine extends Entity {
10
+ document_line: DocumentLine;
11
+ }
9
12
  export interface IEntityExtended extends Entity {
10
13
  document_line: IDocumentLine.IEntityExtended;
11
14
  }
@@ -27,8 +30,8 @@ export interface IDeleteInventoryLossRequest {
27
30
  export interface IRepository {
28
31
  findById(selector: IShared.IFindByIdRequest): Promise<Entity | null>;
29
32
  findByOwnerId(data: IShared.IFindByOwnerIdRequest): Promise<IEntityExtended[]>;
30
- create(data: ICreateRequest[]): Promise<Entity[]>;
31
- update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<Entity>;
33
+ create(data: ICreateRequest[]): Promise<IEntityWithDocumentLine[]>;
34
+ update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<IEntityWithDocumentLine>;
32
35
  deleteInventoryLosses(data: IDeleteInventoryLossRequest): Promise<void>;
33
36
  }
34
37
  export type IApi = IRepository;
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "typescript",
10
10
  "helper"
11
11
  ],
12
- "version": "0.10.9",
12
+ "version": "0.10.10",
13
13
  "main": "./dist/index.js",
14
14
  "types": "./dist/index.d.ts",
15
15
  "files": [