@nomalism-com/types 0.22.58 → 0.22.59
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,8 +1,9 @@
|
|
|
1
1
|
import * as IShared from "../../../shared/interface";
|
|
2
|
-
import {
|
|
2
|
+
import { Product, UnitOfMeasure, 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 { ProductGoogleSheets } from "main";
|
|
6
7
|
export type Entity = Product;
|
|
7
8
|
export declare const Route = "product";
|
|
8
9
|
export declare const UpperName = "Product";
|
|
@@ -17,27 +18,6 @@ export interface IEntityFromCabide extends Pick<Entity, "id" | "cabide_product_c
|
|
|
17
18
|
}) | null;
|
|
18
19
|
virtual: ProductBaseVirtuals | null;
|
|
19
20
|
}
|
|
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
|
-
}
|
|
41
21
|
export interface IEntityMinified {
|
|
42
22
|
id: string;
|
|
43
23
|
id_provider: number;
|
|
@@ -249,7 +229,7 @@ export interface IFindForMobileResponse {
|
|
|
249
229
|
export interface IRepository {
|
|
250
230
|
findForMobile(params: IFindForMobileRequest): Promise<IFindForMobileResponse | null>;
|
|
251
231
|
findByIdFromCabide(selector: IShared.IFindByIdRequest): Promise<IEntityFromCabide | null>;
|
|
252
|
-
findByIdWithStock(selector: IShared.IFindByIdRequest): Promise<IEntityWithStock | null>;
|
|
232
|
+
findByIdWithStock(selector: IShared.IFindByIdRequest): Promise<ProductGoogleSheets.IEntityWithStock | null>;
|
|
253
233
|
findByOwnerId(params: IShared.IFindByOwnerIdRequest): Promise<IFindByOwnerIdResponse[]>;
|
|
254
234
|
checkStockByIds(data: ICheckStockByIdsRequest): Promise<ICheckStockByIdsResponse[]>;
|
|
255
235
|
validateByRef(selector: IValidateByReferenceRequest): Promise<IEntityMinified | null>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ProductImage, UnitOfMeasure, VatTax, VatTaxZone } from "../../../shared/entities";
|
|
1
|
+
import { Cabide, CabideProduct, ProductImage, ProductVirtuals, UnitOfMeasure, VatTax, VatTaxZone } from "../../../shared/entities";
|
|
2
2
|
import { IProductPromotionVirtuals, IProductVirtuals } from "../product/interface";
|
|
3
3
|
import { ProductSheet } from "../../../shared/entities";
|
|
4
4
|
export declare const Route = "products_sheets";
|
|
@@ -52,6 +52,18 @@ export interface IProductSheetsWithIndex {
|
|
|
52
52
|
export interface IFindProductSheetByReference {
|
|
53
53
|
reference: string;
|
|
54
54
|
}
|
|
55
|
+
export interface IEntityWithStock extends Entity {
|
|
56
|
+
unit_of_measure_quantity: UnitOfMeasure;
|
|
57
|
+
vat_tax: VatTax & {
|
|
58
|
+
vat_tax_zones: VatTaxZone[];
|
|
59
|
+
};
|
|
60
|
+
promotions: IProductPromotionVirtuals[];
|
|
61
|
+
product_images: ProductImage[];
|
|
62
|
+
cabide_product: (CabideProduct & {
|
|
63
|
+
cabide: Cabide;
|
|
64
|
+
}) | null;
|
|
65
|
+
extended_virtual: ProductVirtuals | null;
|
|
66
|
+
}
|
|
55
67
|
export interface IRepository {
|
|
56
68
|
findByReferenceOnSheets(params: IFindProductSheetByReference): Promise<IProductSheetsWithIndex>;
|
|
57
69
|
findByReferenceOnNoma(params: IFindProductSheetByReference): Promise<IProduct | null>;
|