@nomalism-com/types 0.9.516 → 0.9.518

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.
@@ -5,11 +5,12 @@ export type Entity = SavedEmPicking;
5
5
  export declare const Route = "saved_em_picking";
6
6
  export declare const UpperName = "SavedEmPicking";
7
7
  export declare const LowerName: string;
8
+ export type ISavedEmPickingData = Pick<IUnfinishedPickingLineGroupExtended, 'clientOrders' | 'stock' | 'not_ok'>;
8
9
  export interface ICreateRequest {
9
10
  provider_id: string;
10
11
  document_header_id: string;
11
12
  group_id: string;
12
- data: IUnfinishedPickingLineGroupExtended;
13
+ data: ISavedEmPickingData;
13
14
  }
14
15
  export interface IRepository {
15
16
  create(data: ICreateRequest): Promise<Entity>;
@@ -1,3 +1,2 @@
1
1
  import joi from 'joi';
2
- export declare const entradaDeMaterialDocumentHeaderBody: joi.ObjectSchema<any>;
3
2
  export declare const createBody: joi.ObjectSchema<any>;
@@ -13,7 +13,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
13
13
  };
14
14
  var _a, _b;
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.createBody = exports.entradaDeMaterialDocumentHeaderBody = void 0;
16
+ exports.createBody = void 0;
17
17
  var joi_1 = __importDefault(require("joi"));
18
18
  var messages_1 = require("../../../shared/messages");
19
19
  var interfaces_1 = require("../../document/materialEntrance/interfaces");
@@ -78,14 +78,14 @@ var entradaDeMaterialDocumentHeaderBodyKeys = {
78
78
  product_id: joi_1.default.string().uuid().required(),
79
79
  saved_id: joi_1.default.string().uuid().allow(null),
80
80
  };
81
- exports.entradaDeMaterialDocumentHeaderBody = joi_1.default
81
+ var entradaDeMaterialDocumentHeaderBody = joi_1.default
82
82
  .object()
83
83
  .keys(entradaDeMaterialDocumentHeaderBodyKeys)
84
84
  .messages(messages_1.messages);
85
85
  var createBodyKeys = {
86
- data: joi_1.default.any(),
87
- document_header_id: joi_1.default.string().uuid().required(),
88
86
  provider_id: joi_1.default.string().uuid().required(),
87
+ document_header_id: joi_1.default.string().uuid().required(),
89
88
  group_id: joi_1.default.string().uuid().required(),
89
+ data: entradaDeMaterialDocumentHeaderBody,
90
90
  };
91
91
  exports.createBody = joi_1.default.object().keys(createBodyKeys).messages(messages_1.messages);
@@ -1,5 +1,5 @@
1
1
  import * as IShared from '../../../shared/interface';
2
- import { DocumentLine, DocumentLineVirtuals, DocumentLineFolder, DocumentLinePendingConflict } from '../../../shared/entities';
2
+ import { DocumentLine, DocumentLineBaseVirtuals, DocumentLineVirtuals, DocumentLineFolder, DocumentLinePendingConflict } from '../../../shared/entities';
3
3
  import * as IDocumentLineAssoc from '../documentLineAssoc/interfaces';
4
4
  import * as IDocumentHeader from '../documentHeader/interfaces';
5
5
  import * as IDocumentType from '../documentType/interfaces';
@@ -9,6 +9,7 @@ export declare const Route = "documentLine";
9
9
  export declare const UpperName = "DocumentLine";
10
10
  export declare const LowerName: string;
11
11
  export type IDocumentLineVirtuals = DocumentLineVirtuals;
12
+ export type IDocumentLineBaseVirtuals = DocumentLineBaseVirtuals;
12
13
  export declare enum IMetadataPlugins {
13
14
  almofada = "almofada",
14
15
  atoalhado = "atoalhado",
@@ -127,7 +128,8 @@ export type IDocumentLineDocuments = Pick<IDocumentHeader.Entity, 'pdf_link' | '
127
128
  };
128
129
  export interface IEntityExtended extends DocumentLine {
129
130
  data: IData;
130
- virtual: IDocumentLineVirtuals | null;
131
+ extended_virtual: IDocumentLineVirtuals | null;
132
+ virtual: IDocumentLineBaseVirtuals | null;
131
133
  document_headers: IDocumentLineDocuments[];
132
134
  document_line_folder: DocumentLineFolder | null;
133
135
  plot: IPlot.IFindDetailedResponseWithoutCurrentDocumentLine | null;
@@ -93,6 +93,7 @@ export import ZipCode = User.ZipCode;
93
93
  export import DocumentSet = Stock.DocumentSet;
94
94
  export import ExternalDocumentType = Stock.ExternalDocumentType;
95
95
  export import File = Integration.File;
96
+ export import DocumentLineBaseVirtuals = Stock.DocumentLineBaseVirtuals;
96
97
  export import DocumentLineVirtuals = Stock.DocumentLineVirtuals;
97
98
  export import StartDocumentHeaderVirtuals = Stock.StartDocumentHeaderVirtuals;
98
99
  export import DocumentHeaderVirtuals = Stock.DocumentHeaderVirtuals;
@@ -9,6 +9,7 @@ import { IQueryParameterDatatype } from '../../modules/stock/queryParameter/inte
9
9
  import * as IDocumentLine from '../../modules/supply/documentLine/interfaces';
10
10
  import * as IProduct from '../../modules/stock/product/interface';
11
11
  import * as IClientCurrentAccount from '../../modules/supply/clientCurrentAccount/interfaces';
12
+ import { ISavedEmPickingData } from '../../modules/stock/savedEmPicking/interfaces';
12
13
  export type Attribute = {
13
14
  id: string;
14
15
  name: string;
@@ -904,9 +905,8 @@ export type PlotVirtuals = {
904
905
  available: boolean;
905
906
  current_document_line_id: string | null;
906
907
  };
907
- export type DocumentLineVirtuals = {
908
+ export type DocumentLineBaseVirtuals = {
908
909
  document_line_id: string;
909
- commission_total: number;
910
910
  client_unit_total_without_tax: number;
911
911
  client_unit_total_without_discount: number;
912
912
  client_unit_total: number;
@@ -927,35 +927,43 @@ export type DocumentLineVirtuals = {
927
927
  provider_total: number;
928
928
  provider_total_discount: number;
929
929
  provider_total_tax: number;
930
+ commission_percentage: number;
931
+ commission_total: number;
930
932
  cancelled: boolean;
933
+ phc_closed: boolean;
931
934
  closed: boolean;
932
- state: string;
933
- provider_state: string;
935
+ purchased_from_provider: boolean;
936
+ pending_return_to_provider: boolean;
937
+ available_for_client_order: boolean;
938
+ already_client_order: boolean;
939
+ to_order: boolean;
940
+ already_material_entrance: boolean;
941
+ rejected_return_to_provider: boolean;
942
+ inventory_loss: boolean;
943
+ return_to_provider_without_credit_note: boolean;
944
+ returned_to_provider: boolean;
945
+ awaiting_production: boolean;
946
+ ordered: boolean;
947
+ group_header: boolean;
934
948
  waiting_for_bulk_order: boolean;
935
949
  waiting_for_order: boolean;
950
+ documents: IDocumentTypeCodeType[];
936
951
  invoice_external_id: string | null;
937
952
  returned_from_invoice_external_id: string | null;
938
953
  invoice_document_header_external_id: string | null;
939
954
  returned_from_invoice_document_header_external_id: string | null;
940
- client_start_id: string | null;
941
- provider_start_id: string | null;
942
955
  invoice_id: string | null;
943
- invoice_name: string | null;
944
956
  returned_from_invoice_id: string | null;
945
957
  return_id: string | null;
946
- available_for_client_order: boolean;
947
- already_client_order: boolean;
948
- already_material_entrance: boolean;
949
- to_order: boolean;
950
- purchased_from_provider: boolean;
951
- pending_return_to_provider: boolean;
952
- rejected_return_to_provider: boolean;
953
- inventory_loss: boolean;
954
- return_to_provider_without_credit_note: boolean;
955
- returned_to_provider: boolean;
956
958
  credit_note_id: string | null;
957
- group_header: boolean;
958
- awaiting_production: boolean;
959
+ };
960
+ export type DocumentLineVirtuals = {
961
+ document_line_id: string;
962
+ state: string;
963
+ provider_state: string;
964
+ client_start_id: string | null;
965
+ provider_start_id: string | null;
966
+ invoice_name: string | null;
959
967
  };
960
968
  export type StartDocumentHeaderLastUpdateVirtuals = {
961
969
  p_id: string;
@@ -1058,9 +1066,12 @@ export type ProviderProductView = {
1058
1066
  };
1059
1067
  export type SavedEmPicking = {
1060
1068
  id: string;
1061
- owner_id: string;
1062
1069
  provider_id: string;
1063
- group_id: string;
1064
1070
  document_header_id: string;
1065
- data: unknown;
1071
+ group_id: string;
1072
+ data: ISavedEmPickingData;
1073
+ created_at: Date;
1074
+ updated_at: Date;
1075
+ created_by: string;
1076
+ updated_by: string;
1066
1077
  };
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.9.516",
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.9.2",
37
- "joi-to-swagger": "^6.2.0"
38
- },
39
- "devDependencies": {
40
- "@types/convert-units": "^2.3.6",
41
- "@types/node": "^18.16.19",
42
- "@typescript-eslint/eslint-plugin": "^5.62.0",
43
- "@typescript-eslint/parser": "^5.62.0",
44
- "concurrently": "^8.2.0",
45
- "eslint": "^8.44.0",
46
- "eslint-config-airbnb-base": "^15.0.0",
47
- "eslint-config-prettier": "^8.8.0",
48
- "eslint-import-resolver-typescript": "^3.5.5",
49
- "eslint-plugin-import": "^2.27.5",
50
- "eslint-plugin-prettier": "^4.2.1",
51
- "prettier": "^2.8.8",
52
- "tsx": "^3.12.7",
53
- "typescript": "^5.1.6"
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.9.518",
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.9.2",
37
+ "joi-to-swagger": "^6.2.0"
38
+ },
39
+ "devDependencies": {
40
+ "@types/convert-units": "^2.3.6",
41
+ "@types/node": "^18.16.19",
42
+ "@typescript-eslint/eslint-plugin": "^5.62.0",
43
+ "@typescript-eslint/parser": "^5.62.0",
44
+ "concurrently": "^8.2.0",
45
+ "eslint": "^8.44.0",
46
+ "eslint-config-airbnb-base": "^15.0.0",
47
+ "eslint-config-prettier": "^8.8.0",
48
+ "eslint-import-resolver-typescript": "^3.5.5",
49
+ "eslint-plugin-import": "^2.27.5",
50
+ "eslint-plugin-prettier": "^4.2.1",
51
+ "prettier": "^2.8.8",
52
+ "tsx": "^3.12.7",
53
+ "typescript": "^5.1.6"
54
+ }
55
+ }