@nomalism-com/types 0.36.28 → 0.36.30
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.cjs +9 -1
- package/dist/index.js +9 -1
- package/dist/modules/stock/task/interface.d.ts +6 -0
- package/dist/modules/stock/task/route.schema.d.ts +1 -0
- package/dist/modules/supply/documentLineMT/interface.d.ts +1 -0
- package/dist/shared/entities/stock.d.ts +1 -0
- package/package.json +1 -1
- package/src/modules/stock/task/interface.ts +9 -0
- package/src/modules/stock/task/route.schema.ts +18 -1
- package/src/modules/supply/documentLineMT/interface.ts +2 -0
- package/src/modules/supply/documentLineMT/route.schema.ts +2 -0
- package/src/shared/entities/stock.ts +1 -0
package/dist/index.cjs
CHANGED
|
@@ -5508,6 +5508,7 @@ var historyStatusDataType = Object.keys(IHistoryStatusDataTypeEnum);
|
|
|
5508
5508
|
var route_schema_exports100 = {};
|
|
5509
5509
|
__export(route_schema_exports100, {
|
|
5510
5510
|
createBody: () => createBody65,
|
|
5511
|
+
createFromDossierBody: () => createFromDossierBody,
|
|
5511
5512
|
findTaskParams: () => findTaskParams,
|
|
5512
5513
|
updateBody: () => updateBody56
|
|
5513
5514
|
});
|
|
@@ -5516,6 +5517,12 @@ var createBodyKeys64 = {
|
|
|
5516
5517
|
task: joi101.string().required()
|
|
5517
5518
|
};
|
|
5518
5519
|
var createBody65 = joi101.object().keys(createBodyKeys64).messages(messages);
|
|
5520
|
+
var createFromDossierBodyKeys = {
|
|
5521
|
+
from: joi101.string().uuid().required(),
|
|
5522
|
+
to: joi101.string().uuid().allow(null).required(),
|
|
5523
|
+
task: joi101.string().required()
|
|
5524
|
+
};
|
|
5525
|
+
var createFromDossierBody = joi101.object().keys(createFromDossierBodyKeys).messages(messages);
|
|
5519
5526
|
var updateBodyKeys56 = {
|
|
5520
5527
|
from: joi101.string().uuid().optional(),
|
|
5521
5528
|
to: joi101.string().uuid().allow(null).optional(),
|
|
@@ -5804,7 +5811,8 @@ var updateKeys2 = {
|
|
|
5804
5811
|
mt_order_date: joi110.date().optional().allow(null),
|
|
5805
5812
|
mt_execution_by: joi110.string().uuid().optional().allow(null),
|
|
5806
5813
|
mt_execution_date: joi110.date().optional().allow(null),
|
|
5807
|
-
mt_execution_when: joi110.date().optional().allow(null)
|
|
5814
|
+
mt_execution_when: joi110.date().optional().allow(null),
|
|
5815
|
+
mt_order_with_notification: joi110.boolean().optional().default(false)
|
|
5808
5816
|
};
|
|
5809
5817
|
var updateBody60 = joi110.object().keys(updateKeys2).messages(messages);
|
|
5810
5818
|
|
package/dist/index.js
CHANGED
|
@@ -5508,6 +5508,7 @@ var historyStatusDataType = Object.keys(IHistoryStatusDataTypeEnum);
|
|
|
5508
5508
|
var route_schema_exports100 = {};
|
|
5509
5509
|
__export(route_schema_exports100, {
|
|
5510
5510
|
createBody: () => createBody65,
|
|
5511
|
+
createFromDossierBody: () => createFromDossierBody,
|
|
5511
5512
|
findTaskParams: () => findTaskParams,
|
|
5512
5513
|
updateBody: () => updateBody56
|
|
5513
5514
|
});
|
|
@@ -5516,6 +5517,12 @@ var createBodyKeys64 = {
|
|
|
5516
5517
|
task: joi101.string().required()
|
|
5517
5518
|
};
|
|
5518
5519
|
var createBody65 = joi101.object().keys(createBodyKeys64).messages(messages);
|
|
5520
|
+
var createFromDossierBodyKeys = {
|
|
5521
|
+
from: joi101.string().uuid().required(),
|
|
5522
|
+
to: joi101.string().uuid().allow(null).required(),
|
|
5523
|
+
task: joi101.string().required()
|
|
5524
|
+
};
|
|
5525
|
+
var createFromDossierBody = joi101.object().keys(createFromDossierBodyKeys).messages(messages);
|
|
5519
5526
|
var updateBodyKeys56 = {
|
|
5520
5527
|
from: joi101.string().uuid().optional(),
|
|
5521
5528
|
to: joi101.string().uuid().allow(null).optional(),
|
|
@@ -5804,7 +5811,8 @@ var updateKeys2 = {
|
|
|
5804
5811
|
mt_order_date: joi110.date().optional().allow(null),
|
|
5805
5812
|
mt_execution_by: joi110.string().uuid().optional().allow(null),
|
|
5806
5813
|
mt_execution_date: joi110.date().optional().allow(null),
|
|
5807
|
-
mt_execution_when: joi110.date().optional().allow(null)
|
|
5814
|
+
mt_execution_when: joi110.date().optional().allow(null),
|
|
5815
|
+
mt_order_with_notification: joi110.boolean().optional().default(false)
|
|
5808
5816
|
};
|
|
5809
5817
|
var updateBody60 = joi110.object().keys(updateKeys2).messages(messages);
|
|
5810
5818
|
|
|
@@ -14,6 +14,11 @@ export declare const taskStatusDataType: string[];
|
|
|
14
14
|
export type ICreateRequest = {
|
|
15
15
|
task: string;
|
|
16
16
|
};
|
|
17
|
+
export type ICreateFromDossierRequest = {
|
|
18
|
+
from: string;
|
|
19
|
+
to: string | null;
|
|
20
|
+
task: string;
|
|
21
|
+
};
|
|
17
22
|
export type IUpdateRequest = {
|
|
18
23
|
from?: string;
|
|
19
24
|
to?: string | null;
|
|
@@ -75,6 +80,7 @@ export interface IRepository {
|
|
|
75
80
|
find(selector: IFindTasksRequest): Promise<IFindResponse[]>;
|
|
76
81
|
findWithMessages(id: IShared.IFindByIdRequest): Promise<IFindWithMessagesResponse>;
|
|
77
82
|
create(data: ICreateRequest): Promise<Entity>;
|
|
83
|
+
createFromDossier(data: ICreateFromDossierRequest): Promise<Entity>;
|
|
78
84
|
update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<void>;
|
|
79
85
|
delete(selector: IShared.IFindByIdRequest): Promise<void>;
|
|
80
86
|
findByOwnerId: (selector: IShared.IFindByOwnerIdRequest) => Promise<IFindByOwnerResponse[]>;
|
|
@@ -11,6 +11,7 @@ export interface IUpdateRequest {
|
|
|
11
11
|
mt_execution_by?: string | null;
|
|
12
12
|
mt_execution_date?: Date | null;
|
|
13
13
|
mt_execution_when?: Date | null;
|
|
14
|
+
mt_order_with_notification?: boolean;
|
|
14
15
|
}
|
|
15
16
|
export interface IRepository {
|
|
16
17
|
update(data: IUpdateRequest): Promise<void>;
|
|
@@ -1213,6 +1213,7 @@ export type DocumentLineMT = {
|
|
|
1213
1213
|
mt_execution_by: string | null;
|
|
1214
1214
|
mt_execution_date: Date | null;
|
|
1215
1215
|
mt_execution_when: Date | null;
|
|
1216
|
+
mt_order_with_notification: boolean;
|
|
1216
1217
|
created_by: string;
|
|
1217
1218
|
updated_by: string;
|
|
1218
1219
|
created_at: Date;
|
package/package.json
CHANGED
|
@@ -24,6 +24,13 @@ export const taskStatusDataType = Object.keys(ITaskStatusDataTypeEnum);
|
|
|
24
24
|
export type ICreateRequest = {
|
|
25
25
|
task: string;
|
|
26
26
|
};
|
|
27
|
+
|
|
28
|
+
export type ICreateFromDossierRequest = {
|
|
29
|
+
from: string;
|
|
30
|
+
to: string | null;
|
|
31
|
+
task: string;
|
|
32
|
+
};
|
|
33
|
+
|
|
27
34
|
export type IUpdateRequest = {
|
|
28
35
|
from?: string;
|
|
29
36
|
to?: string | null;
|
|
@@ -107,6 +114,8 @@ export interface IRepository {
|
|
|
107
114
|
|
|
108
115
|
create(data: ICreateRequest): Promise<Entity>;
|
|
109
116
|
|
|
117
|
+
createFromDossier(data: ICreateFromDossierRequest): Promise<Entity>;
|
|
118
|
+
|
|
110
119
|
update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<void>;
|
|
111
120
|
|
|
112
121
|
delete(selector: IShared.IFindByIdRequest): Promise<void>;
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import joi from 'joi';
|
|
2
2
|
import { messages } from '../../../shared/messages';
|
|
3
3
|
import * as IShared from '../../../shared/interface';
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
ICreateRequest,
|
|
6
|
+
IUpdateRequest,
|
|
7
|
+
IFindTasksRequest,
|
|
8
|
+
taskStatusDataType,
|
|
9
|
+
ICreateFromDossierRequest,
|
|
10
|
+
} from './interface';
|
|
5
11
|
|
|
6
12
|
// create body validation
|
|
7
13
|
const createBodyKeys: IShared.IRouteRequest<ICreateRequest> = {
|
|
@@ -9,6 +15,17 @@ const createBodyKeys: IShared.IRouteRequest<ICreateRequest> = {
|
|
|
9
15
|
};
|
|
10
16
|
export const createBody = joi.object().keys(createBodyKeys).messages(messages);
|
|
11
17
|
|
|
18
|
+
// createFromDossier body validation
|
|
19
|
+
const createFromDossierBodyKeys: IShared.IRouteRequest<ICreateFromDossierRequest> = {
|
|
20
|
+
from: joi.string().uuid().required(),
|
|
21
|
+
to: joi.string().uuid().allow(null).required(),
|
|
22
|
+
task: joi.string().required(),
|
|
23
|
+
};
|
|
24
|
+
export const createFromDossierBody = joi
|
|
25
|
+
.object()
|
|
26
|
+
.keys(createFromDossierBodyKeys)
|
|
27
|
+
.messages(messages);
|
|
28
|
+
|
|
12
29
|
// update body validation
|
|
13
30
|
const updateBodyKeys: IShared.IRouteRequest<IUpdateRequest> = {
|
|
14
31
|
from: joi.string().uuid().optional(),
|
|
@@ -11,6 +11,8 @@ const updateKeys: IShared.IRouteRequest<IUpdateRequest> = {
|
|
|
11
11
|
mt_execution_by: joi.string().uuid().optional().allow(null),
|
|
12
12
|
mt_execution_date: joi.date().optional().allow(null),
|
|
13
13
|
mt_execution_when: joi.date().optional().allow(null),
|
|
14
|
+
|
|
15
|
+
mt_order_with_notification: joi.boolean().optional().default(false),
|
|
14
16
|
};
|
|
15
17
|
|
|
16
18
|
export const updateBody = joi.object().keys(updateKeys).messages(messages);
|