@nomalism-com/types 0.20.4 → 0.21.1
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.
- package/dist/index.min.js +1 -1
- package/dist/main.d.ts +255 -251
- package/dist/modules/document/materialEntrance/interfaces.d.ts +2 -4
- package/dist/modules/document/order/interfaces.d.ts +0 -4
- package/dist/modules/document/purchase/interfaces.d.ts +1 -3
- package/dist/modules/stock/chat/interfaces.d.ts +23 -0
- package/dist/modules/stock/chat/route.schema.d.ts +3 -0
- package/dist/modules/stock/productGoogleSheets/interface.d.ts +28 -0
- package/dist/modules/stock/productGoogleSheets/route.schema.d.ts +2 -0
- package/dist/modules/supply/documentHeader/interfaces.d.ts +2 -2
- package/dist/modules/supply/documentLine/interfaces.d.ts +2 -2
- package/dist/modules/supply/orderManagement/interface.d.ts +2 -6
- package/dist/modules/user/persona/interface.d.ts +1 -3
- package/dist/modules/user/users/interface.d.ts +1 -3
- package/dist/shared/entities/index.d.ts +1 -0
- package/dist/shared/entities/stock.d.ts +13 -4
- package/dist/shared/interface.d.ts +13 -1
- package/package.json +2 -2
|
@@ -14,7 +14,6 @@ export declare const createMaterialEntranceClientOrderOptions: string[];
|
|
|
14
14
|
export interface IGetMaterialEntranceInfoClientOrder {
|
|
15
15
|
ef_dla_id: string;
|
|
16
16
|
ordered_quantity: number;
|
|
17
|
-
pc_owner_id: string;
|
|
18
17
|
pc_dh_id: string;
|
|
19
18
|
pc_dh_number: number;
|
|
20
19
|
pc_virtual_name: string;
|
|
@@ -76,7 +75,6 @@ export interface IUnfinishedPickingLineGroup {
|
|
|
76
75
|
product_thumbnail: string | null;
|
|
77
76
|
product_provider_ref: string | null;
|
|
78
77
|
product_measure: string | null;
|
|
79
|
-
product_stock: number;
|
|
80
78
|
ordered_quantity: number;
|
|
81
79
|
provider_estimated_delivery_date: string;
|
|
82
80
|
ef_dla_ids: string[];
|
|
@@ -84,7 +82,7 @@ export interface IUnfinishedPickingLineGroup {
|
|
|
84
82
|
export type IUnfinishedPickingLineGroupExtended = IUnfinishedPickingLineGroup & IGetMaterialEntranceInfoResponse;
|
|
85
83
|
export interface IUnfinishedPickingsResponse extends Pick<DocumentHeader, "id" | "owner_id"> {
|
|
86
84
|
identifier: string;
|
|
87
|
-
|
|
85
|
+
start_document_header_id: string;
|
|
88
86
|
lineGroups: IUnfinishedPickingLineGroupExtended[];
|
|
89
87
|
}
|
|
90
88
|
export interface IUndoEntradaDeMaterialRequest {
|
|
@@ -100,9 +98,9 @@ export interface IFinalizarEntradaDeMaterialResponse {
|
|
|
100
98
|
}
|
|
101
99
|
export interface IPrintLabelParamsRequest {
|
|
102
100
|
product_id: string;
|
|
101
|
+
document_line_id: string;
|
|
103
102
|
}
|
|
104
103
|
export interface IPrintLabelQueryRequest {
|
|
105
|
-
ef_name: string;
|
|
106
104
|
pc_document_number?: number | null;
|
|
107
105
|
prison: boolean;
|
|
108
106
|
quantity: number;
|
|
@@ -72,12 +72,8 @@ export interface IFindRequest {
|
|
|
72
72
|
export type IOrderType = "VA" | "Stock";
|
|
73
73
|
export interface IFindResponse {
|
|
74
74
|
order_type: IOrderType;
|
|
75
|
-
client_id?: string;
|
|
76
75
|
pc_id?: string;
|
|
77
|
-
pc_closed?: boolean;
|
|
78
|
-
provider_id?: string;
|
|
79
76
|
pf_id?: string;
|
|
80
|
-
pf_closed?: boolean;
|
|
81
77
|
document_line_id: string;
|
|
82
78
|
document_line_quantity: number;
|
|
83
79
|
product_id: string;
|
|
@@ -9,7 +9,7 @@ export interface IUnpaidMaterialEntranceLineDetails {
|
|
|
9
9
|
quantity: number;
|
|
10
10
|
notes: DocumentLineNote[];
|
|
11
11
|
pc_name: string | null;
|
|
12
|
-
|
|
12
|
+
pc_id: string | null;
|
|
13
13
|
}
|
|
14
14
|
export interface IUnpaidMaterialEntranceLineResponse {
|
|
15
15
|
group: string;
|
|
@@ -19,10 +19,8 @@ export interface IUnpaidMaterialEntranceLineResponse {
|
|
|
19
19
|
designation: string;
|
|
20
20
|
multimedia_id: string | null;
|
|
21
21
|
provider_ref: string | null;
|
|
22
|
-
pf_owner_id: string;
|
|
23
22
|
pf_id: string;
|
|
24
23
|
ef_name: string;
|
|
25
|
-
pf_closed: boolean;
|
|
26
24
|
quantity: number;
|
|
27
25
|
discount: number;
|
|
28
26
|
provider_purchase_discount: number;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as IShared from "../../../shared/interface";
|
|
2
|
+
import { Chat } from "../../../shared/entities";
|
|
3
|
+
export type Entity = Chat;
|
|
4
|
+
export declare const Route = "chat";
|
|
5
|
+
export declare const UpperName = "Chat";
|
|
6
|
+
export declare const LowerName: string;
|
|
7
|
+
export interface ICreateRequest {
|
|
8
|
+
document_header_id: string;
|
|
9
|
+
message: string;
|
|
10
|
+
}
|
|
11
|
+
export interface IUpdateRequest {
|
|
12
|
+
message?: string;
|
|
13
|
+
email_sent?: boolean;
|
|
14
|
+
whatsapp_sent?: boolean;
|
|
15
|
+
token_active?: boolean;
|
|
16
|
+
}
|
|
17
|
+
export interface IRepository {
|
|
18
|
+
findByOwnerId(params: IShared.IFindByOwnerIdRequest): Promise<Chat[]>;
|
|
19
|
+
create(data: ICreateRequest): Promise<Chat>;
|
|
20
|
+
update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<void>;
|
|
21
|
+
deleteOne(selector: IShared.IFindByIdRequest): Promise<void>;
|
|
22
|
+
}
|
|
23
|
+
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export declare const Route = "products_sheets";
|
|
2
|
+
export declare const UpperName = "ProductsSheets";
|
|
3
|
+
export declare const LowerName: string;
|
|
4
|
+
export interface IProductsSheetsRequest {
|
|
5
|
+
products_google_sheet_id: string;
|
|
6
|
+
}
|
|
7
|
+
export type IProductsForSheetsResponse = Record<string, any>;
|
|
8
|
+
export type IProductFromSheets = Record<string, any>;
|
|
9
|
+
export type SheetsCreateOrUpdate = "create" | "update";
|
|
10
|
+
export interface IProductsForNomaResponse {
|
|
11
|
+
reference: string;
|
|
12
|
+
type: string;
|
|
13
|
+
state: string;
|
|
14
|
+
values: IProductsForSheetsResponse;
|
|
15
|
+
}
|
|
16
|
+
export interface IProduct extends Omit<IProductsForNomaResponse, "values"> {
|
|
17
|
+
id: string;
|
|
18
|
+
created_at: Date;
|
|
19
|
+
updated_at: Date;
|
|
20
|
+
values: IProductFromSheets;
|
|
21
|
+
}
|
|
22
|
+
export interface IProductSheetsWithIndex {
|
|
23
|
+
index: number;
|
|
24
|
+
values: IProductFromSheets;
|
|
25
|
+
}
|
|
26
|
+
export interface IRepository {
|
|
27
|
+
createOrUpdateNomaFromGoogleSheets(params: number, body: IProductsForSheetsResponse): Promise<void>;
|
|
28
|
+
}
|
|
@@ -38,7 +38,6 @@ export interface IFindByDocumentLineStateResponse {
|
|
|
38
38
|
created_by: string;
|
|
39
39
|
who_handles: string | null;
|
|
40
40
|
tags: string | null;
|
|
41
|
-
url: string;
|
|
42
41
|
upfront_total: number;
|
|
43
42
|
}
|
|
44
43
|
export interface IBasicSearchRequest extends IShared.IPaginationRequest {
|
|
@@ -51,7 +50,8 @@ export interface IBasicSearchResponse {
|
|
|
51
50
|
name: string | null;
|
|
52
51
|
user_number: number;
|
|
53
52
|
document_line_count: number;
|
|
54
|
-
|
|
53
|
+
document_header_id: string | null;
|
|
54
|
+
start_document_header_id: string | null;
|
|
55
55
|
pdf_link: string | null;
|
|
56
56
|
updated_at: Date;
|
|
57
57
|
}
|
|
@@ -36,7 +36,7 @@ export interface IDataPagamento {
|
|
|
36
36
|
export interface IDocumentLineDocuments {
|
|
37
37
|
code: IDocumentTypeCodeType;
|
|
38
38
|
user_type: IDocumentTypeUserType;
|
|
39
|
-
|
|
39
|
+
start_document_header_id: string | null;
|
|
40
40
|
pdf_link: string | null;
|
|
41
41
|
}
|
|
42
42
|
export interface IHistory {
|
|
@@ -122,7 +122,7 @@ export interface IPrintLabelQueryRequest {
|
|
|
122
122
|
}
|
|
123
123
|
export interface IRepository {
|
|
124
124
|
findByState(data: IFindByDocumentLineStateRequest): Promise<IFindByDocumentLineStateResponse[]>;
|
|
125
|
-
create(data: ICreateRequest[]): Promise<IDocumentLineAssoc.
|
|
125
|
+
create(data: ICreateRequest[]): Promise<IDocumentLineAssoc.IEntityExtended[]>;
|
|
126
126
|
update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<void>;
|
|
127
127
|
updateData(data: IUpdateDataRequest): Promise<IUpdateLineStatesTriggerResponse>;
|
|
128
128
|
updateMany(data: IUpdateManyRequest): Promise<void>;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { IDocumentTypeUserType } from "../documentType/interfaces";
|
|
2
1
|
import { IProductType } from "../../stock/product/interface";
|
|
3
2
|
export declare const Route = "order_management";
|
|
4
3
|
export declare const UpperName = "OrderManagement";
|
|
@@ -8,7 +7,7 @@ export interface IFindProviderProductsRequest {
|
|
|
8
7
|
}
|
|
9
8
|
export interface IFindProposals {
|
|
10
9
|
name: string;
|
|
11
|
-
|
|
10
|
+
start_document_header_id: string;
|
|
12
11
|
pdf_link: string | null;
|
|
13
12
|
}
|
|
14
13
|
export interface IFindProviderProductsResponse {
|
|
@@ -46,10 +45,7 @@ export interface IFindProductHistoryProviderOrder {
|
|
|
46
45
|
export interface IFindProductHistoryMovement {
|
|
47
46
|
date: Date;
|
|
48
47
|
document_name: string;
|
|
49
|
-
|
|
50
|
-
link_owner_id: string | null;
|
|
51
|
-
link_document_header_id: string | null;
|
|
52
|
-
link_closed: boolean | null;
|
|
48
|
+
document_header_id: string | null;
|
|
53
49
|
quantity_in: number;
|
|
54
50
|
quantity_out: number;
|
|
55
51
|
stock_to_date: number;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import * as IShared from "../../../shared/interface";
|
|
2
2
|
import { Persona, Country } from "../../../shared/entities";
|
|
3
|
-
import { IDocumentTypeUserType } from "../../supply/documentType/interfaces";
|
|
4
3
|
export type Entity = Persona;
|
|
5
4
|
export declare const Route = "persona";
|
|
6
5
|
export declare const UpperName = "Persona";
|
|
@@ -44,8 +43,7 @@ export interface IBasicSearchRequest extends IShared.IPaginationRequest {
|
|
|
44
43
|
inactive?: boolean;
|
|
45
44
|
}
|
|
46
45
|
export interface IBasicSearchResponse {
|
|
47
|
-
|
|
48
|
-
user_type: IDocumentTypeUserType;
|
|
46
|
+
id: string;
|
|
49
47
|
name: string;
|
|
50
48
|
number: number;
|
|
51
49
|
persona_name?: string;
|
|
@@ -5,9 +5,7 @@ export declare const Route = "users";
|
|
|
5
5
|
export declare const UpperName = "Users";
|
|
6
6
|
export declare const LowerName: string;
|
|
7
7
|
export interface IFindByEmailResponse extends Entity {
|
|
8
|
-
store_operator:
|
|
9
|
-
location_id: string;
|
|
10
|
-
} | null;
|
|
8
|
+
store_operator: Pick<StoreOperator, "id" | "location_id"> | null;
|
|
11
9
|
}
|
|
12
10
|
export interface IFindByIdResponse extends Entity {
|
|
13
11
|
provider: (Providers & {
|
|
@@ -10,6 +10,7 @@ export import AttributeValue = Stock.AttributeValue;
|
|
|
10
10
|
export import BankData = User.BankData;
|
|
11
11
|
export import Clients = User.Clients;
|
|
12
12
|
export import ClientType = User.ClientType;
|
|
13
|
+
export import Chat = Stock.Chat;
|
|
13
14
|
export import Color = Stock.Color;
|
|
14
15
|
export import Commissioner = User.Commissioner;
|
|
15
16
|
export import Composition = Stock.Composition;
|
|
@@ -33,6 +33,18 @@ export type AttributeValue = {
|
|
|
33
33
|
created_by: string;
|
|
34
34
|
updated_by: string;
|
|
35
35
|
};
|
|
36
|
+
export type Chat = {
|
|
37
|
+
id: string;
|
|
38
|
+
document_header_id: string;
|
|
39
|
+
message: string;
|
|
40
|
+
email_sent: boolean;
|
|
41
|
+
whatsapp_sent: boolean;
|
|
42
|
+
created_by: string;
|
|
43
|
+
updated_by: string;
|
|
44
|
+
created_at: Date;
|
|
45
|
+
updated_at: Date;
|
|
46
|
+
deleted: boolean;
|
|
47
|
+
};
|
|
36
48
|
export type Color = {
|
|
37
49
|
id: string;
|
|
38
50
|
primary_color_id: string;
|
|
@@ -1117,10 +1129,7 @@ export type StockMovement = {
|
|
|
1117
1129
|
emission_date: string;
|
|
1118
1130
|
name: string;
|
|
1119
1131
|
pdf_link: string | null;
|
|
1120
|
-
|
|
1121
|
-
link_owner_id: string | null;
|
|
1122
|
-
link_document_header_id: string | null;
|
|
1123
|
-
link_closed: boolean | null;
|
|
1132
|
+
parent_document_header_id: string | null;
|
|
1124
1133
|
created_by: string;
|
|
1125
1134
|
quantity: number;
|
|
1126
1135
|
stock_to_date: number;
|
|
@@ -126,7 +126,8 @@ export declare enum IBrokerTopic {
|
|
|
126
126
|
perform_task = "perform_task",
|
|
127
127
|
warning_email = "warning_email",
|
|
128
128
|
retry_errored_emails = "retry_errored_emails",
|
|
129
|
-
send_errored_emails_summary = "send_errored_emails_summary"
|
|
129
|
+
send_errored_emails_summary = "send_errored_emails_summary",
|
|
130
|
+
dispatch_chat_message = "dispatch_chat_message"
|
|
130
131
|
}
|
|
131
132
|
export type IBrokerTopicPayload = {
|
|
132
133
|
[IBrokerTopic.create]: Record<string, unknown>;
|
|
@@ -236,6 +237,17 @@ export type IBrokerTopicPayload = {
|
|
|
236
237
|
[IBrokerTopic.send_errored_emails_summary]: {
|
|
237
238
|
warningErrors: string[];
|
|
238
239
|
};
|
|
240
|
+
[IBrokerTopic.dispatch_chat_message]: {
|
|
241
|
+
email: string;
|
|
242
|
+
name: string;
|
|
243
|
+
phone_number: string | null;
|
|
244
|
+
reply_url: string;
|
|
245
|
+
document_header_id: string;
|
|
246
|
+
document_name: string;
|
|
247
|
+
chat_id: string;
|
|
248
|
+
message: string;
|
|
249
|
+
created_by: string;
|
|
250
|
+
};
|
|
239
251
|
};
|
|
240
252
|
export interface IBrokerMessage<T extends IBrokerTopic = IBrokerTopic> {
|
|
241
253
|
topic: T;
|
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"typescript",
|
|
10
10
|
"helper"
|
|
11
11
|
],
|
|
12
|
-
"version": "0.
|
|
12
|
+
"version": "0.21.1",
|
|
13
13
|
"main": "./dist/index.min.js",
|
|
14
14
|
"types": "./dist/index.d.ts",
|
|
15
15
|
"files": [
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@rollup/plugin-terser": "^0.4.4",
|
|
41
41
|
"@rollup/plugin-typescript": "^11.1.6",
|
|
42
|
-
"@types/node": "^20.12.
|
|
42
|
+
"@types/node": "^20.12.12",
|
|
43
43
|
"@typescript-eslint/eslint-plugin": "^7.11.0",
|
|
44
44
|
"@typescript-eslint/parser": "^7.11.0",
|
|
45
45
|
"eslint": "^8.57.0",
|