@nomalism-com/types 1.3.49 → 1.3.51
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 +170 -139
- package/dist/index.js +147 -117
- package/dist/main.d.ts +2 -1
- package/dist/modules/document/billOfLading/interfaces.d.ts +9 -0
- package/dist/modules/stock/productGoogleSheets/interface.d.ts +34 -2
- package/dist/modules/supply/documentType/interfaces.d.ts +6 -0
- package/dist/modules/ui/storeOperatorSaftLock/interface.d.ts +9 -0
- package/dist/modules/user/sessions/interface.d.ts +1 -0
- package/dist/modules/user/storeOperator/interface.d.ts +1 -0
- package/dist/shared/entities/stock.d.ts +13 -2
- package/package.json +1 -1
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { type ProductBaseVirtuals, type ProductImage, type ProductPromotionVirtuals, type ProductSheet, type ProductVirtuals, type UnitOfMeasure, type VatTax, type VatTaxZone } from "../../../shared/entities/stock";
|
|
1
|
+
import { type ProductBaseVirtuals, type ProductImage, type ProductPromotionVirtuals, type ProductSaftLockVirtuals, type ProductSheet, type ProductVirtuals, type UnitOfMeasure, type VatTax, type VatTaxZone } from "../../../shared/entities/stock";
|
|
2
2
|
import * as IShared from "../../../shared/interface";
|
|
3
3
|
import * as IDocumentLine from "../../supply/documentLine/interfaces";
|
|
4
4
|
export declare const Route = "product_sheets";
|
|
5
5
|
export type IProductPromotionVirtuals = ProductPromotionVirtuals;
|
|
6
6
|
export type IProductVirtuals = ProductVirtuals;
|
|
7
7
|
export type IProductBaseVirtuals = ProductBaseVirtuals;
|
|
8
|
+
export type IProductSaftLockVirtuals = ProductSaftLockVirtuals;
|
|
8
9
|
export type Entity = ProductSheet;
|
|
9
10
|
export type IProductsForSheetsResponse = Record<string, unknown>;
|
|
10
11
|
export type IProductFromSheetsValues = Record<string, unknown>;
|
|
@@ -26,9 +27,40 @@ export declare const ProductTypeEnum: {
|
|
|
26
27
|
Portes: "Portes";
|
|
27
28
|
RM: "RM";
|
|
28
29
|
Montagem: "Montagem";
|
|
30
|
+
Adiantamento: "Adiantamento";
|
|
29
31
|
};
|
|
30
32
|
export type IProductType = (typeof ProductTypeEnum)[keyof typeof ProductTypeEnum];
|
|
31
33
|
export declare const productTypes: string[];
|
|
34
|
+
/**
|
|
35
|
+
* Indicador de produto ou serviço do SAF-T (PT) — ponto 2.4.1 (ProductType):
|
|
36
|
+
* P - Produtos, S - Serviços, O - Outros (ex.: portes debitados, adiantamentos
|
|
37
|
+
* recebidos ou alienação de ativos).
|
|
38
|
+
*
|
|
39
|
+
* É o valor de `product_sheet.saft_product_type`, coluna gerada a partir de
|
|
40
|
+
* `product_sheet.type` (o mapeamento vive na migração, não em código).
|
|
41
|
+
*/
|
|
42
|
+
export declare const SaftProductTypeEnum: {
|
|
43
|
+
P: "P";
|
|
44
|
+
S: "S";
|
|
45
|
+
O: "O";
|
|
46
|
+
};
|
|
47
|
+
export type ISaftProductType = (typeof SaftProductTypeEnum)[keyof typeof SaftProductTypeEnum];
|
|
48
|
+
/**
|
|
49
|
+
* Categoria do produto na comunicação de inventários à AT
|
|
50
|
+
* (`product_sheet.type_of_inventory`): M - Mercadorias, P - Matérias-primas,
|
|
51
|
+
* A - Produtos acabados, S - Subprodutos, T - Produtos em curso, B - Ativos
|
|
52
|
+
* biológicos. As letras P/S NÃO têm o mesmo significado que no SAF-T de
|
|
53
|
+
* faturação (`ISaftProductType`).
|
|
54
|
+
*/
|
|
55
|
+
export declare const InventoryCategoryEnum: {
|
|
56
|
+
M: "M";
|
|
57
|
+
P: "P";
|
|
58
|
+
A: "A";
|
|
59
|
+
S: "S";
|
|
60
|
+
T: "T";
|
|
61
|
+
B: "B";
|
|
62
|
+
};
|
|
63
|
+
export type IInventoryCategory = (typeof InventoryCategoryEnum)[keyof typeof InventoryCategoryEnum];
|
|
32
64
|
export interface ICreateRequest {
|
|
33
65
|
id?: string;
|
|
34
66
|
reference?: string;
|
|
@@ -40,7 +72,6 @@ export interface ICreateRequest {
|
|
|
40
72
|
short_description?: string | null;
|
|
41
73
|
state?: IProductSheetState;
|
|
42
74
|
type?: IProductType;
|
|
43
|
-
type_of_inventory?: string;
|
|
44
75
|
vat_tax_id?: string;
|
|
45
76
|
reason_for_exemption?: string | null;
|
|
46
77
|
weight?: number | null;
|
|
@@ -85,6 +116,7 @@ interface IProductSheetEntityBase extends Omit<Entity, "values"> {
|
|
|
85
116
|
}
|
|
86
117
|
export interface IProductSheetEntity extends IProductSheetEntityBase {
|
|
87
118
|
base_virtual: ProductBaseVirtuals | null;
|
|
119
|
+
saft_lock: ProductSaftLockVirtuals | null;
|
|
88
120
|
}
|
|
89
121
|
export interface IProductCabideColors {
|
|
90
122
|
id: string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type * as IShared from "../../../shared/interface";
|
|
2
|
+
export declare const Route = "store_operator_saft_lock";
|
|
3
|
+
export interface IFindResponseItem {
|
|
4
|
+
store_operator_id: string;
|
|
5
|
+
}
|
|
6
|
+
export interface IRepository {
|
|
7
|
+
find(): Promise<IFindResponseItem[]>;
|
|
8
|
+
}
|
|
9
|
+
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
@@ -7,6 +7,7 @@ export interface IFindResponse extends Pick<Entity, "id" | "number" | "pin" | "i
|
|
|
7
7
|
user: Pick<Users, "id">;
|
|
8
8
|
main_persona: Pick<Persona, "id" | "name" | "email">;
|
|
9
9
|
sidemenu_highlights: string[];
|
|
10
|
+
has_saft_document: boolean;
|
|
10
11
|
}
|
|
11
12
|
export interface ICreateRequest {
|
|
12
13
|
main_persona_name: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IMotivosDeEsperaData } from "../../modules/document/order/interfaces";
|
|
2
2
|
import { IConflict } from "../../modules/document/propostaSheets/interface";
|
|
3
3
|
import { IEstadoEncomenda } from "../../modules/stock/conferirEncomenda/interface";
|
|
4
|
-
import { IExpectDeliveryDates, IProductType } from "../../modules/stock/productGoogleSheets/interface";
|
|
4
|
+
import { IExpectDeliveryDates, IInventoryCategory, IProductType, ISaftProductType } from "../../modules/stock/productGoogleSheets/interface";
|
|
5
5
|
import { IProductSheetState } from "../../modules/stock/productGoogleSheets/interface";
|
|
6
6
|
import { IImageType } from "../../modules/stock/productImage/interface";
|
|
7
7
|
import { IQueryParameterDatatype } from "../../modules/stock/queryParameter/interfaces";
|
|
@@ -690,7 +690,8 @@ export type ProductSheet = {
|
|
|
690
690
|
name: string | null;
|
|
691
691
|
designation: string;
|
|
692
692
|
origin_id: string | null;
|
|
693
|
-
|
|
693
|
+
saft_product_type: ISaftProductType;
|
|
694
|
+
type_of_inventory: IInventoryCategory | null;
|
|
694
695
|
max_discount: number;
|
|
695
696
|
maintenances: string;
|
|
696
697
|
compositions: string;
|
|
@@ -848,6 +849,16 @@ export type ProductBaseVirtuals = {
|
|
|
848
849
|
last_avg_unit_cost: number;
|
|
849
850
|
margin: number | null;
|
|
850
851
|
};
|
|
852
|
+
/**
|
|
853
|
+
* Model ProductSaftLockVirtuals
|
|
854
|
+
*
|
|
855
|
+
* Ponto 9.1 — isolada de ProductBaseVirtuals/ProductVirtuals de propósito
|
|
856
|
+
* (ver nota no schema.prisma / nomalism-db/productSheetSaftLockView).
|
|
857
|
+
*/
|
|
858
|
+
export type ProductSaftLockVirtuals = {
|
|
859
|
+
product_id: string;
|
|
860
|
+
has_saft_document: boolean;
|
|
861
|
+
};
|
|
851
862
|
/**
|
|
852
863
|
* Model ProductVirtuals
|
|
853
864
|
*
|
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": "1.3.
|
|
4
|
+
"version": "1.3.51",
|
|
5
5
|
"author": "Nomalism <it.nomalism@gmail.com> (https://nomalism.com/)",
|
|
6
6
|
"license": "UNLICENSED",
|
|
7
7
|
"type": "module",
|