@nomalism-com/types 0.22.59 → 0.22.61

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 { ProductGoogleSheets } from "main";
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<ProductGoogleSheets.IEntityWithStock | null>;
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,4 @@
1
- import { Cabide, CabideProduct, ProductImage, ProductVirtuals, UnitOfMeasure, VatTax, VatTaxZone } from "../../../shared/entities";
1
+ import { ProductImage, 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,18 +52,6 @@ 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
- }
67
55
  export interface IRepository {
68
56
  findByReferenceOnSheets(params: IFindProductSheetByReference): Promise<IProductSheetsWithIndex>;
69
57
  findByReferenceOnNoma(params: IFindProductSheetByReference): Promise<IProduct | null>;
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "typescript",
10
10
  "helper"
11
11
  ],
12
- "version": "0.22.59",
12
+ "version": "0.22.61",
13
13
  "main": "./dist/index.min.js",
14
14
  "types": "./dist/index.d.ts",
15
15
  "files": [