@nomalism-com/types 0.10.8 → 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.
@@ -207,8 +207,8 @@ export interface IFindByDocumentLineStateResponse {
207
207
  name: string;
208
208
  count: number;
209
209
  }
210
- export interface IUpdateLineStatesTriggerResponse<T> {
211
- data: T;
210
+ export interface IUpdateLineStatesTriggerResponse {
211
+ document_header_id: string;
212
212
  trigger_event: boolean;
213
213
  broker_topic?: IShared.IBrokerTopic;
214
214
  }
@@ -223,15 +223,14 @@ 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<string>;
226
+ create(data: ICreateRequest[]): Promise<IDocumentLineAssoc.IEntityWithDocumentLine[]>;
227
227
  update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<void>;
228
- updateData(data: IUpdateDataRequest): Promise<IUpdateLineStatesTriggerResponse<IDocumentLineAssoc.Entity[]>>;
228
+ updateData(data: IUpdateDataRequest): Promise<IUpdateLineStatesTriggerResponse>;
229
229
  updateMany(data: IUpdateManyRequest): Promise<void>;
230
230
  updateIndexes(document_line_ids: string[]): Promise<void>;
231
231
  deleteMany(document_line_ids: string[]): Promise<void>;
232
232
  }
233
- export type IApi = Omit<IRepository, 'create' | 'updateData'> & {
234
- create(data: ICreateRequest[]): Promise<IDocumentLineAssoc.Entity[]>;
235
- updateData(data: IUpdateDataRequestWithoutStamps): Promise<IDocumentLineAssoc.Entity[]>;
233
+ export type IApi = Omit<IRepository, 'updateData'> & {
234
+ updateData(data: IUpdateDataRequestWithoutStamps): Promise<IDocumentLineAssoc.IEntityWithDocumentLine[]>;
236
235
  };
237
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.8",
12
+ "version": "0.10.10",
13
13
  "main": "./dist/index.js",
14
14
  "types": "./dist/index.d.ts",
15
15
  "files": [