@nomalism-com/types 0.16.7 → 0.16.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.
@@ -21,6 +21,7 @@ export interface IGetMaterialEntranceInfoClientOrder {
21
21
  pc_dla_id: string;
22
22
  }
23
23
  export interface IEntradaDeMaterialClientOrder extends IGetMaterialEntranceInfoClientOrder {
24
+ document_line_id: string;
24
25
  quantity: number;
25
26
  option: ICreateMaterialEntranceClientOrderOption | null;
26
27
  observation: string | null;
@@ -46,6 +47,7 @@ export interface IGetMaterialEntranceInfoStock {
46
47
  ordered_quantity: number;
47
48
  }
48
49
  export interface IEntradaDeMaterialStock extends IGetMaterialEntranceInfoStock {
50
+ document_line_id: string;
49
51
  quantity: number;
50
52
  option: ICreateMaterialEntranceStockOption | ICreateMaterialEntranceStockWithoutOrderOption | null;
51
53
  observation: string | null;
@@ -54,6 +56,7 @@ export interface IEntradaDeMaterialStock extends IGetMaterialEntranceInfoStock {
54
56
  export interface IEntradaDeMaterialNC {
55
57
  ef_dla_id: null;
56
58
  ordered_quantity: 0;
59
+ document_line_id: string;
57
60
  quantity: number;
58
61
  option: null;
59
62
  observation: string | null;
@@ -83,14 +86,20 @@ export interface IUndoEntradaDeMaterialRequest {
83
86
  export interface IFinalizarEntradaDeMaterialRequest {
84
87
  provider_id: string;
85
88
  }
86
- export interface IPrintLabelParamsRequest {
87
- document_line_assoc_id: string;
88
- quantity: number;
89
- }
90
89
  export interface IFinalizarEntradaDeMaterialResponse {
91
90
  broker_messages: IShared.IBrokerMessage<IShared.IBrokerTopic>[];
92
91
  document_number: string;
93
92
  }
93
+ export interface IPrintLabelParamsRequest {
94
+ document_line_id: string;
95
+ }
96
+ export interface IPrintLabelQueryRequest {
97
+ pc_document_number?: number | null;
98
+ quantity: number;
99
+ }
100
+ export interface IPrintLabelQueryWithTokenRequest extends IPrintLabelQueryRequest {
101
+ token: string;
102
+ }
94
103
  interface IRepository {
95
104
  finalizarEntradaMaterial(data: IFinalizarEntradaDeMaterialRequest): Promise<IFinalizarEntradaDeMaterialResponse>;
96
105
  undoEntradaMaterial(data: IUndoEntradaDeMaterialRequest): Promise<void>;
@@ -2,3 +2,4 @@ import joi from 'joi';
2
2
  export declare const finalizarEntradaDeMaterialBody: joi.ObjectSchema<any>;
3
3
  export declare const undoEntradaDeMaterialBody: joi.ObjectSchema<any>;
4
4
  export declare const printLabelParams: joi.ObjectSchema<any>;
5
+ export declare const printLabelQuery: joi.ObjectSchema<any>;
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.printLabelParams = exports.undoEntradaDeMaterialBody = exports.finalizarEntradaDeMaterialBody = void 0;
6
+ exports.printLabelQuery = exports.printLabelParams = exports.undoEntradaDeMaterialBody = exports.finalizarEntradaDeMaterialBody = void 0;
7
7
  var joi_1 = __importDefault(require("joi"));
8
8
  var messages_1 = require("../../../shared/messages");
9
9
  var finalizarEntradaDeMaterialBodyKeys = {
@@ -24,10 +24,23 @@ exports.undoEntradaDeMaterialBody = joi_1.default
24
24
  .keys(undoEntradaDeMaterialBodyKeys)
25
25
  .messages(messages_1.messages);
26
26
  var printLabelParamsKeys = {
27
- document_line_assoc_id: joi_1.default.string().uuid().required(),
28
- quantity: joi_1.default.number().positive().required(),
27
+ document_line_id: joi_1.default.string().uuid().required(),
29
28
  };
30
29
  exports.printLabelParams = joi_1.default
31
30
  .object()
32
31
  .keys(printLabelParamsKeys)
33
32
  .messages(messages_1.messages);
33
+ var printLabelQueryKeys = {
34
+ pc_document_number: joi_1.default
35
+ .number()
36
+ .integer()
37
+ .positive()
38
+ .allow(null)
39
+ .optional(),
40
+ quantity: joi_1.default.number().positive().required(),
41
+ token: joi_1.default.string().required(),
42
+ };
43
+ exports.printLabelQuery = joi_1.default
44
+ .object()
45
+ .keys(printLabelQueryKeys)
46
+ .messages(messages_1.messages);
@@ -24,6 +24,7 @@ var entradaDeMaterialClientOrderBodyKeys = {
24
24
  pc_owner_id: joi_1.default.string().uuid().required(),
25
25
  pc_dh_number: joi_1.default.number().integer().positive().required(),
26
26
  pc_dla_id: joi_1.default.string().uuid().required(),
27
+ document_line_id: joi_1.default.string().uuid().required(),
27
28
  quantity: joi_1.default.number().positive().allow(0).required(),
28
29
  option: (_a = joi_1.default
29
30
  .string())
@@ -39,6 +40,7 @@ var entradaDeMaterialClientOrderBody = joi_1.default
39
40
  var entradaDeMaterialStockBodyKeys = {
40
41
  ef_dla_id: joi_1.default.string().uuid().allow(null).required(),
41
42
  ordered_quantity: joi_1.default.number().positive().allow(0).required(),
43
+ document_line_id: joi_1.default.string().uuid().required(),
42
44
  quantity: joi_1.default.number().positive().allow(0).required(),
43
45
  option: (_b = joi_1.default
44
46
  .string())
@@ -55,6 +57,7 @@ var entradaDeMaterialStockBody = joi_1.default
55
57
  var entradaDeMaterialNCBodyKeys = {
56
58
  ef_dla_id: joi_1.default.valid(null).required(),
57
59
  ordered_quantity: joi_1.default.number().valid(0).required(),
60
+ document_line_id: joi_1.default.string().uuid().required(),
58
61
  quantity: joi_1.default.number().positive().allow(0).required(),
59
62
  option: joi_1.default.valid(null).required(),
60
63
  observation: joi_1.default.string().allow(null),
@@ -81,5 +81,5 @@ export interface IRepository {
81
81
  update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<Entity | null>;
82
82
  deleteOne(selector: IShared.IFindByIdRequest): Promise<void>;
83
83
  }
84
- export type IApi = Omit<IRepository, 'printLabelToPdf'>;
84
+ export type IApi = IRepository;
85
85
  export type IController = IShared.IEntityWithUserToken<IRepository>;
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "typescript",
10
10
  "helper"
11
11
  ],
12
- "version": "0.16.7",
12
+ "version": "0.16.10",
13
13
  "main": "./dist/index.js",
14
14
  "types": "./dist/index.d.ts",
15
15
  "files": [