@nomalism-com/types 0.10.9 → 0.10.11

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.
@@ -89,9 +89,6 @@ export interface IPrintLabelParamsRequest {
89
89
  document_line_assoc_id: string;
90
90
  quantity: number;
91
91
  }
92
- export interface IPrintLabelQueryRequest {
93
- token: string;
94
- }
95
92
  interface IRepository {
96
93
  finalizarEntradaMaterial(data: IFinalizarEntradaDeMaterialRequest): Promise<IShared.IBrokerMessage<IShared.IBrokerTopic>[]>;
97
94
  undoEntradaMaterial(data: IUndoEntradaDeMaterialRequest): Promise<void>;
@@ -2,4 +2,3 @@ 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.printLabelQuery = exports.printLabelParams = exports.undoEntradaDeMaterialBody = exports.finalizarEntradaDeMaterialBody = void 0;
6
+ 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 = {
@@ -31,10 +31,3 @@ exports.printLabelParams = joi_1.default
31
31
  .object()
32
32
  .keys(printLabelParamsKeys)
33
33
  .messages(messages_1.messages);
34
- var printLabelQueryKeys = {
35
- token: joi_1.default.string().required(),
36
- };
37
- exports.printLabelQuery = joi_1.default
38
- .object()
39
- .keys(printLabelQueryKeys)
40
- .messages(messages_1.messages);
@@ -156,6 +156,7 @@ export interface IPrintLabelParamsRequest {
156
156
  label_origin: ILabelOrigin;
157
157
  }
158
158
  export interface IPrintLabelQueryRequest {
159
+ pc_name?: string | null;
159
160
  quantity: number;
160
161
  }
161
162
  export interface IPrintLabelQueryWithTokenRequest extends IPrintLabelQueryRequest {
@@ -79,6 +79,7 @@ exports.printLabelParams = joi_1.default
79
79
  .keys(printLabelParamsKeys)
80
80
  .messages(messages_1.messages);
81
81
  var printLabelQueryKeys = {
82
+ pc_name: joi_1.default.string().allow(null).optional(),
82
83
  quantity: joi_1.default.number().positive().required(),
83
84
  token: joi_1.default.string().required(),
84
85
  };
@@ -223,7 +223,7 @@ export interface IRepository {
223
223
  findByOwnerId(params: IShared.IFindByOwnerIdRequest): Promise<DocumentLine[]>;
224
224
  findUnallocatedStock(): Promise<IFindUnallocatedStockResponse[]>;
225
225
  findByState(data: IFindByDocumentLineStateRequest): Promise<IFindByDocumentLineStateResponse[]>;
226
- create(data: ICreateRequest[]): Promise<IDocumentLineAssoc.Entity[]>;
226
+ create(data: ICreateRequest[]): Promise<IDocumentLineAssoc.IEntityWithDocumentLine[]>;
227
227
  update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<void>;
228
228
  updateData(data: IUpdateDataRequest): Promise<IUpdateLineStatesTriggerResponse>;
229
229
  updateMany(data: IUpdateManyRequest): Promise<void>;
@@ -231,6 +231,6 @@ export interface IRepository {
231
231
  deleteMany(document_line_ids: string[]): Promise<void>;
232
232
  }
233
233
  export type IApi = Omit<IRepository, 'updateData'> & {
234
- updateData(data: IUpdateDataRequestWithoutStamps): Promise<IDocumentLineAssoc.Entity[]>;
234
+ updateData(data: IUpdateDataRequestWithoutStamps): Promise<IDocumentLineAssoc.IEntityWithDocumentLine[]>;
235
235
  };
236
236
  export type IController = IShared.IEntityWithUserToken<IRepository>;
@@ -1,11 +1,14 @@
1
1
  import * as IShared from '../../../shared/interface';
2
- import { DocumentLineAssoc } from '../../../shared/entities';
2
+ import { DocumentLineAssoc, DocumentLine } from '../../../shared/entities';
3
3
  import * as IDocumentLine from '../documentLine/interfaces';
4
4
  import * as IPlot from '../../stock/plot/interface';
5
5
  export type Entity = DocumentLineAssoc;
6
6
  export declare const Route = "documentLineAssoc";
7
7
  export declare const UpperName = "DocumentLineAssoc";
8
8
  export declare const LowerName: string;
9
+ export interface IEntityWithDocumentLine extends Entity {
10
+ document_line: DocumentLine;
11
+ }
9
12
  export interface IEntityExtended extends Entity {
10
13
  document_line: IDocumentLine.IEntityExtended;
11
14
  }
@@ -27,8 +30,8 @@ export interface IDeleteInventoryLossRequest {
27
30
  export interface IRepository {
28
31
  findById(selector: IShared.IFindByIdRequest): Promise<Entity | null>;
29
32
  findByOwnerId(data: IShared.IFindByOwnerIdRequest): Promise<IEntityExtended[]>;
30
- create(data: ICreateRequest[]): Promise<Entity[]>;
31
- update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<Entity>;
33
+ create(data: ICreateRequest[]): Promise<IEntityWithDocumentLine[]>;
34
+ update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<IEntityWithDocumentLine>;
32
35
  deleteInventoryLosses(data: IDeleteInventoryLossRequest): Promise<void>;
33
36
  }
34
37
  export type IApi = IRepository;
package/package.json CHANGED
@@ -1,55 +1,55 @@
1
- {
2
- "name": "@nomalism-com/types",
3
- "description": "A nomalism package with all necessary types and validations for developing APIs",
4
- "author": "Nomalism <it.nomalism@gmail.com> (https://https://nomalism.com/)",
5
- "keywords": [
6
- "nomalism",
7
- "api",
8
- "types",
9
- "typescript",
10
- "helper"
11
- ],
12
- "version": "0.10.9",
13
- "main": "./dist/index.js",
14
- "types": "./dist/index.d.ts",
15
- "files": [
16
- "dist"
17
- ],
18
- "browserslist": "> 0.25%, not dead",
19
- "license": "UNLICENSED",
20
- "homepage": "https://gitlab.com/nomalism-develop/types",
21
- "bugs": {
22
- "url": "https://gitlab.com/nomalism-develop/types/issues"
23
- },
24
- "repository": {
25
- "type": "git",
26
- "url": "git+https://gitlab.com/nomalism-develop/types.git"
27
- },
28
- "scripts": {
29
- "lint": "eslint src --ext .ts,.js --ignore-pattern node_modules --ignore-pattern dist --cache",
30
- "build": "rm -rf dist && tsc --project tsconfig.json",
31
- "start": "tsx --tsconfig ./tsconfig.json src/index.ts",
32
- "prepack": "concurrently --success all \"npm run lint\" \"npm run build\" \"npm run start\""
33
- },
34
- "dependencies": {
35
- "convert-units": "^2.3.4",
36
- "joi": "^17.10.2",
37
- "joi-to-swagger": "^6.2.0"
38
- },
39
- "devDependencies": {
40
- "@types/convert-units": "^2.3.7",
41
- "@types/node": "^18.18.1",
42
- "@typescript-eslint/eslint-plugin": "^6.7.3",
43
- "@typescript-eslint/parser": "^6.7.3",
44
- "concurrently": "^8.2.1",
45
- "eslint": "^8.50.0",
46
- "eslint-config-airbnb-base": "^15.0.0",
47
- "eslint-config-prettier": "^9.0.0",
48
- "eslint-import-resolver-typescript": "^3.6.1",
49
- "eslint-plugin-import": "^2.28.1",
50
- "eslint-plugin-prettier": "^5.0.0",
51
- "prettier": "^3.0.3",
52
- "tsx": "^3.13.0",
53
- "typescript": "^5.2.2"
54
- }
55
- }
1
+ {
2
+ "name": "@nomalism-com/types",
3
+ "description": "A nomalism package with all necessary types and validations for developing APIs",
4
+ "author": "Nomalism <it.nomalism@gmail.com> (https://https://nomalism.com/)",
5
+ "keywords": [
6
+ "nomalism",
7
+ "api",
8
+ "types",
9
+ "typescript",
10
+ "helper"
11
+ ],
12
+ "version": "0.10.11",
13
+ "main": "./dist/index.js",
14
+ "types": "./dist/index.d.ts",
15
+ "files": [
16
+ "dist"
17
+ ],
18
+ "browserslist": "> 0.25%, not dead",
19
+ "license": "UNLICENSED",
20
+ "homepage": "https://gitlab.com/nomalism-develop/types",
21
+ "bugs": {
22
+ "url": "https://gitlab.com/nomalism-develop/types/issues"
23
+ },
24
+ "repository": {
25
+ "type": "git",
26
+ "url": "git+https://gitlab.com/nomalism-develop/types.git"
27
+ },
28
+ "scripts": {
29
+ "lint": "eslint src --ext .ts,.js --ignore-pattern node_modules --ignore-pattern dist --cache",
30
+ "build": "rm -rf dist && tsc --project tsconfig.json",
31
+ "start": "tsx --tsconfig ./tsconfig.json src/index.ts",
32
+ "prepack": "concurrently --success all \"npm run lint\" \"npm run build\" \"npm run start\""
33
+ },
34
+ "dependencies": {
35
+ "convert-units": "^2.3.4",
36
+ "joi": "^17.10.2",
37
+ "joi-to-swagger": "^6.2.0"
38
+ },
39
+ "devDependencies": {
40
+ "@types/convert-units": "^2.3.7",
41
+ "@types/node": "^18.18.1",
42
+ "@typescript-eslint/eslint-plugin": "^6.7.3",
43
+ "@typescript-eslint/parser": "^6.7.3",
44
+ "concurrently": "^8.2.1",
45
+ "eslint": "^8.50.0",
46
+ "eslint-config-airbnb-base": "^15.0.0",
47
+ "eslint-config-prettier": "^9.0.0",
48
+ "eslint-import-resolver-typescript": "^3.6.1",
49
+ "eslint-plugin-import": "^2.28.1",
50
+ "eslint-plugin-prettier": "^5.0.0",
51
+ "prettier": "^3.0.3",
52
+ "tsx": "^3.13.0",
53
+ "typescript": "^5.2.2"
54
+ }
55
+ }