@nomalism-com/types 0.22.60 → 0.22.62
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.
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import * as IShared from "../../../shared/interface";
|
|
2
|
-
import { Product, UnitOfMeasure, ProductVirtuals, ProductBaseVirtuals, ProductPromotionVirtuals, CabideProduct, Cabide } from "../../../shared/entities";
|
|
2
|
+
import { Attribute, Product, ProductName, UnitOfMeasure, ProductSubCategory, ProductCategory, TypeOfInventory, ProductImage, VatTax, VatTaxZone, ProductVirtuals, ProductBaseVirtuals, ProductPromotionVirtuals, CabideProduct, Cabide } from "../../../shared/entities";
|
|
3
3
|
import * as IProductPart from "../productPart/interface";
|
|
4
4
|
import * as IProductAttribute from "../productAttribute/interface";
|
|
5
5
|
import * as IDocumentLine from "../../supply/documentLine/interfaces";
|
|
6
|
-
import * as ProductGoogleSheets from "../../stock/productGoogleSheets/interface";
|
|
7
6
|
export type Entity = Product;
|
|
8
7
|
export declare const Route = "product";
|
|
9
8
|
export declare const UpperName = "Product";
|
|
@@ -18,6 +17,27 @@ export interface IEntityFromCabide extends Pick<Entity, "id" | "cabide_product_c
|
|
|
18
17
|
}) | null;
|
|
19
18
|
virtual: ProductBaseVirtuals | null;
|
|
20
19
|
}
|
|
20
|
+
export interface IEntityWithStock extends Entity {
|
|
21
|
+
unit_of_measure_quantity: UnitOfMeasure;
|
|
22
|
+
unit_of_measure_weight: UnitOfMeasure;
|
|
23
|
+
name: ProductName | null;
|
|
24
|
+
product_sub_category: ProductSubCategory & {
|
|
25
|
+
product_category: ProductCategory & {
|
|
26
|
+
attributes: Attribute[];
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
type_of_inventory: TypeOfInventory;
|
|
30
|
+
vat_tax: VatTax & {
|
|
31
|
+
vat_tax_zones: VatTaxZone[];
|
|
32
|
+
};
|
|
33
|
+
promotions: IProductPromotionVirtuals[];
|
|
34
|
+
product_images: ProductImage[];
|
|
35
|
+
product_parts: IProductPart.IFindByRefProduct[];
|
|
36
|
+
cabide_product: (CabideProduct & {
|
|
37
|
+
cabide: Cabide;
|
|
38
|
+
}) | null;
|
|
39
|
+
extended_virtual: ProductVirtuals | null;
|
|
40
|
+
}
|
|
21
41
|
export interface IEntityMinified {
|
|
22
42
|
id: string;
|
|
23
43
|
id_provider: number;
|
|
@@ -229,7 +249,7 @@ export interface IFindForMobileResponse {
|
|
|
229
249
|
export interface IRepository {
|
|
230
250
|
findForMobile(params: IFindForMobileRequest): Promise<IFindForMobileResponse | null>;
|
|
231
251
|
findByIdFromCabide(selector: IShared.IFindByIdRequest): Promise<IEntityFromCabide | null>;
|
|
232
|
-
findByIdWithStock(selector: IShared.IFindByIdRequest): Promise<
|
|
252
|
+
findByIdWithStock(selector: IShared.IFindByIdRequest): Promise<IEntityWithStock | null>;
|
|
233
253
|
findByOwnerId(params: IShared.IFindByOwnerIdRequest): Promise<IFindByOwnerIdResponse[]>;
|
|
234
254
|
checkStockByIds(data: ICheckStockByIdsRequest): Promise<ICheckStockByIdsResponse[]>;
|
|
235
255
|
validateByRef(selector: IValidateByReferenceRequest): Promise<IEntityMinified | null>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ProductImage, UnitOfMeasure, VatTax, VatTaxZone } from "../../../shared/entities";
|
|
2
|
+
import * as IShared from "../../../shared/interface";
|
|
2
3
|
import { IProductPromotionVirtuals, IProductVirtuals } from "../product/interface";
|
|
3
4
|
import { ProductSheet } from "../../../shared/entities";
|
|
4
5
|
export declare const Route = "products_sheets";
|
|
@@ -52,17 +53,26 @@ export interface IProductSheetsWithIndex {
|
|
|
52
53
|
export interface IFindProductSheetByReference {
|
|
53
54
|
reference: string;
|
|
54
55
|
}
|
|
55
|
-
export interface
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
56
|
+
export interface IProductSheetBasicSearchRequest extends IShared.IPaginationRequest {
|
|
57
|
+
search_value: string | null;
|
|
58
|
+
active?: boolean;
|
|
59
|
+
inactive?: boolean;
|
|
60
|
+
dnt_come_anymore?: boolean;
|
|
61
|
+
type_stock: boolean;
|
|
62
|
+
type_encomenda: boolean;
|
|
63
|
+
type_servico: boolean;
|
|
64
|
+
}
|
|
65
|
+
export interface IProductSheetBasicSearchResponse {
|
|
66
|
+
id: string;
|
|
67
|
+
reference: string;
|
|
68
|
+
designation: string;
|
|
69
|
+
price: number;
|
|
70
|
+
promotion_price: number | null;
|
|
71
|
+
thumbnail?: string | null;
|
|
72
|
+
stock: number;
|
|
73
|
+
updated_at: Date;
|
|
74
|
+
active: boolean;
|
|
75
|
+
dnt_come_anymore: boolean;
|
|
66
76
|
}
|
|
67
77
|
export interface IRepository {
|
|
68
78
|
findByReferenceOnSheets(params: IFindProductSheetByReference): Promise<IProductSheetsWithIndex>;
|