@nomalism-com/types 0.21.27 → 0.21.28
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as IShared from "../../../shared/interface";
|
|
2
|
-
import { DocumentHeader, DocumentHeaderClientVirtuals, DocumentHeaderProviderVirtuals, DocumentHeaderVirtuals, DocumentHeaderBaseVirtuals, DocumentType, StartDocumentHeaderVirtuals, DocumentHeaderClientPaymentVirtuals, DocumentLineNote } from "../../../shared/entities";
|
|
2
|
+
import { DocumentHeader, DocumentHeaderClientVirtuals, DocumentHeaderProviderVirtuals, DocumentHeaderVirtuals, DocumentHeaderBaseVirtuals, DocumentType, StartDocumentHeaderVirtuals, DocumentHeaderClientPaymentVirtuals, DocumentLineNote, ChatToken } from "../../../shared/entities";
|
|
3
3
|
import * as IDocumentType from "../documentType/interfaces";
|
|
4
4
|
import * as IPayment from "../payment/interface";
|
|
5
5
|
export type Entity = Omit<DocumentHeader, "external_data">;
|
|
@@ -12,9 +12,12 @@ export type IDocumentHeaderClientVirtuals = DocumentHeaderClientVirtuals;
|
|
|
12
12
|
export type IDocumentHeaderProviderVirtuals = DocumentHeaderProviderVirtuals;
|
|
13
13
|
export type IStartDocumentHeaderVirtuals = StartDocumentHeaderVirtuals;
|
|
14
14
|
export type IDocumentHeaderClientPaymentVirtuals = DocumentHeaderClientPaymentVirtuals;
|
|
15
|
-
|
|
15
|
+
interface IFindOneBase extends Omit<Entity, "external_data"> {
|
|
16
16
|
document_type: IDocumentType.IEntityExtended;
|
|
17
17
|
}
|
|
18
|
+
export interface IFindOneStartResponse extends IFindOneBase {
|
|
19
|
+
chat_token: Pick<ChatToken, "active">;
|
|
20
|
+
}
|
|
18
21
|
export interface IFindOneResponse extends IFindOneBase {
|
|
19
22
|
base_virtual: IDocumentHeaderBaseVirtuals | null;
|
|
20
23
|
}
|
|
@@ -410,7 +413,7 @@ export interface ICreateProForma {
|
|
|
410
413
|
}
|
|
411
414
|
export interface IRepository {
|
|
412
415
|
findOne(selector: IShared.IFindByIdRequest): Promise<IFindOneResponse | null>;
|
|
413
|
-
findStart(selector: IShared.IFindByIdRequest): Promise<
|
|
416
|
+
findStart(selector: IShared.IFindByIdRequest): Promise<IFindOneStartResponse | null>;
|
|
414
417
|
findStartVirtual(selector: IShared.IFindByIdRequest): Promise<IStartDocumentHeaderVirtuals | null>;
|
|
415
418
|
findByDocumentLineState(params: IFindByDocumentLineStateRequest): Promise<IFindByDocumentLineStateResponse[]>;
|
|
416
419
|
findByType(params: IFindByTypeRequest): Promise<IFindByTypeResponse[]>;
|
|
@@ -450,3 +453,4 @@ export type IApi = Omit<IRepository, "createFromHeader" | "createProductionOrder
|
|
|
450
453
|
createProForma(params: ICreateProForma): Promise<IShared.ITaskCluster[]>;
|
|
451
454
|
};
|
|
452
455
|
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
456
|
+
export {};
|
|
@@ -11,6 +11,7 @@ export import BankData = User.BankData;
|
|
|
11
11
|
export import Clients = User.Clients;
|
|
12
12
|
export import ClientType = User.ClientType;
|
|
13
13
|
export import Chat = Stock.Chat;
|
|
14
|
+
export import ChatToken = Stock.ChatToken;
|
|
14
15
|
export import Color = Stock.Color;
|
|
15
16
|
export import Commissioner = User.Commissioner;
|
|
16
17
|
export import Composition = Stock.Composition;
|
|
@@ -50,6 +50,14 @@ export type Chat = {
|
|
|
50
50
|
created_at: Date;
|
|
51
51
|
updated_at: Date;
|
|
52
52
|
};
|
|
53
|
+
export type ChatToken = {
|
|
54
|
+
id: string;
|
|
55
|
+
active: boolean;
|
|
56
|
+
created_by: string;
|
|
57
|
+
updated_by: string;
|
|
58
|
+
created_at: Date;
|
|
59
|
+
updated_at: Date;
|
|
60
|
+
};
|
|
53
61
|
export type Color = {
|
|
54
62
|
id: string;
|
|
55
63
|
primary_color_id: string;
|