@nomalism-com/types 0.40.17 → 0.40.18
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
CHANGED
|
@@ -1704,7 +1704,8 @@ var interfaces_exports9 = {};
|
|
|
1704
1704
|
// src/modules/document/proforma/route.schema.ts
|
|
1705
1705
|
var route_schema_exports12 = {};
|
|
1706
1706
|
__export(route_schema_exports12, {
|
|
1707
|
-
createBody: () => createBody10
|
|
1707
|
+
createBody: () => createBody10,
|
|
1708
|
+
createFromLinesBody: () => createFromLinesBody
|
|
1708
1709
|
});
|
|
1709
1710
|
import joi13 from "joi";
|
|
1710
1711
|
var createBody10 = joi13.object().keys({
|
|
@@ -1714,6 +1715,12 @@ var createBody10 = joi13.object().keys({
|
|
|
1714
1715
|
price_sale: joi13.number().positive().required(),
|
|
1715
1716
|
product_designation: joi13.string().required()
|
|
1716
1717
|
}).messages(messages);
|
|
1718
|
+
var createFromLinesBody = joi13.object().keys({
|
|
1719
|
+
document_header_id: joi13.string().uuid().optional(),
|
|
1720
|
+
document_type_id: joi13.number().integer().positive().required(),
|
|
1721
|
+
from_document_header_id: joi13.string().uuid().required(),
|
|
1722
|
+
document_line_ids: joi13.array().items(joi13.string().uuid().required()).required()
|
|
1723
|
+
}).messages(messages);
|
|
1717
1724
|
|
|
1718
1725
|
// src/modules/document/propostaFornecedor/interfaces.ts
|
|
1719
1726
|
var interfaces_exports10 = {};
|
package/dist/index.js
CHANGED
|
@@ -1704,7 +1704,8 @@ var interfaces_exports9 = {};
|
|
|
1704
1704
|
// src/modules/document/proforma/route.schema.ts
|
|
1705
1705
|
var route_schema_exports12 = {};
|
|
1706
1706
|
__export(route_schema_exports12, {
|
|
1707
|
-
createBody: () => createBody10
|
|
1707
|
+
createBody: () => createBody10,
|
|
1708
|
+
createFromLinesBody: () => createFromLinesBody
|
|
1708
1709
|
});
|
|
1709
1710
|
import joi13 from "joi";
|
|
1710
1711
|
var createBody10 = joi13.object().keys({
|
|
@@ -1714,6 +1715,12 @@ var createBody10 = joi13.object().keys({
|
|
|
1714
1715
|
price_sale: joi13.number().positive().required(),
|
|
1715
1716
|
product_designation: joi13.string().required()
|
|
1716
1717
|
}).messages(messages);
|
|
1718
|
+
var createFromLinesBody = joi13.object().keys({
|
|
1719
|
+
document_header_id: joi13.string().uuid().optional(),
|
|
1720
|
+
document_type_id: joi13.number().integer().positive().required(),
|
|
1721
|
+
from_document_header_id: joi13.string().uuid().required(),
|
|
1722
|
+
document_line_ids: joi13.array().items(joi13.string().uuid().required()).required()
|
|
1723
|
+
}).messages(messages);
|
|
1717
1724
|
|
|
1718
1725
|
// src/modules/document/propostaFornecedor/interfaces.ts
|
|
1719
1726
|
var interfaces_exports10 = {};
|
|
@@ -6,7 +6,14 @@ export interface ICreateRequest {
|
|
|
6
6
|
product_designation: string;
|
|
7
7
|
price_sale: number;
|
|
8
8
|
}
|
|
9
|
+
export interface ICreateFromLinesRequest {
|
|
10
|
+
document_header_id?: string;
|
|
11
|
+
from_document_header_id: string;
|
|
12
|
+
document_type_id: number;
|
|
13
|
+
document_line_ids: string[];
|
|
14
|
+
}
|
|
9
15
|
export interface IRepository {
|
|
10
16
|
create(params: ICreateRequest): Promise<void>;
|
|
17
|
+
createFromLines(params: ICreateFromLinesRequest): Promise<void>;
|
|
11
18
|
}
|
|
12
19
|
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import joi from 'joi';
|
|
2
|
-
import { type ICreateRequest } from './interfaces';
|
|
2
|
+
import { type ICreateFromLinesRequest, type ICreateRequest } from './interfaces';
|
|
3
3
|
export declare const createBody: joi.ObjectSchema<ICreateRequest>;
|
|
4
|
+
export declare const createFromLinesBody: joi.ObjectSchema<ICreateFromLinesRequest>;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nomalism-com/types",
|
|
3
3
|
"description": "A nomalism package with all necessary types and validations for developing APIs",
|
|
4
|
-
"version": "0.40.
|
|
4
|
+
"version": "0.40.18",
|
|
5
5
|
"author": "Nomalism <it.nomalism@gmail.com> (https://nomalism.com/)",
|
|
6
6
|
"license": "UNLICENSED",
|
|
7
7
|
"type": "module",
|