@nomalism-com/types 0.22.34 → 0.22.35
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/modules/stock/product/interface.d.ts +0 -5
- package/dist/modules/stock/productGoogleSheets/interface.d.ts +6 -1
- package/dist/modules/supply/cabideProduct/interface.d.ts +3 -0
- package/dist/shared/entities/index.d.ts +1 -0
- package/dist/shared/entities/stock.d.ts +26 -0
- package/package.json +1 -1
|
@@ -10,10 +10,6 @@ export declare const LowerName: string;
|
|
|
10
10
|
export type IProductVirtuals = ProductVirtuals;
|
|
11
11
|
export type IProductBaseVirtuals = ProductBaseVirtuals;
|
|
12
12
|
export type IProductPromotionVirtuals = ProductPromotionVirtuals;
|
|
13
|
-
export interface IEntityFromCabide extends Pick<Entity, "id" | "cabide_product_color" | "designation" | "vat_tax_id" | "id_provider" | "width"> {
|
|
14
|
-
thumbnail: string | null;
|
|
15
|
-
virtual: ProductBaseVirtuals | null;
|
|
16
|
-
}
|
|
17
13
|
export interface IEntityWithStock extends Entity {
|
|
18
14
|
unit_of_measure_quantity: UnitOfMeasure;
|
|
19
15
|
unit_of_measure_weight: UnitOfMeasure;
|
|
@@ -242,7 +238,6 @@ export interface IFindForMobileResponse {
|
|
|
242
238
|
}
|
|
243
239
|
export interface IRepository {
|
|
244
240
|
findForMobile(params: IFindForMobileRequest): Promise<IFindForMobileResponse | null>;
|
|
245
|
-
findByIdFromCabide(selector: IShared.IFindByIdRequest): Promise<IEntityFromCabide | null>;
|
|
246
241
|
findByIdWithStock(selector: IShared.IFindByIdRequest): Promise<IEntityWithStock | null>;
|
|
247
242
|
findByOwnerId(params: IShared.IFindByOwnerIdRequest): Promise<IFindByOwnerIdResponse[]>;
|
|
248
243
|
checkStockByIds(data: ICheckStockByIdsRequest): Promise<ICheckStockByIdsResponse[]>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ProductImage, UnitOfMeasure, VatTax, VatTaxZone } from "../../../shared/entities";
|
|
1
|
+
import { ProductImage, UnitOfMeasure, VatTax, VatTaxZone, ProductSheet } from "../../../shared/entities";
|
|
2
2
|
import { IProductPromotionVirtuals, IProductVirtuals } from "../product/interface";
|
|
3
3
|
export declare const Route = "products_sheets";
|
|
4
4
|
export declare const UpperName = "ProductsSheets";
|
|
@@ -6,6 +6,7 @@ export declare const LowerName: string;
|
|
|
6
6
|
export interface IProductsSheetsRequest {
|
|
7
7
|
products_google_sheet_id: string;
|
|
8
8
|
}
|
|
9
|
+
export type Entity = ProductSheet;
|
|
9
10
|
export type IProductsForSheetsResponse = Record<string, any>;
|
|
10
11
|
export type IProductFromSheetsValues = Record<string, any>;
|
|
11
12
|
export type SheetsCreateOrUpdate = "create" | "update";
|
|
@@ -15,6 +16,10 @@ export interface IProductsForNomaResponse {
|
|
|
15
16
|
state: string;
|
|
16
17
|
values: IProductsForSheetsResponse;
|
|
17
18
|
}
|
|
19
|
+
export interface IEntityFromCabide extends Pick<Entity, "id" | "cabide_product_color" | "vat_tax_id" | "id_provider" | "width"> {
|
|
20
|
+
thumbnail: string | null;
|
|
21
|
+
virtual: IProductVirtuals | null;
|
|
22
|
+
}
|
|
18
23
|
export interface IProduct extends Omit<IProductsForNomaResponse, "values"> {
|
|
19
24
|
id: string;
|
|
20
25
|
created_at: Date;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ProductGoogleSheets } from "main";
|
|
1
2
|
import { CabideProduct } from "../../../shared/entities";
|
|
2
3
|
import * as IShared from "../../../shared/interface";
|
|
3
4
|
import * as Attribute from "../../stock/attribute/interfaces";
|
|
@@ -82,8 +83,10 @@ export interface IRepository {
|
|
|
82
83
|
findById(select: IShared.IFindByIdRequest): Promise<IFindCabideByOwnerResponse | null>;
|
|
83
84
|
findByOwner(selector: IShared.IFindByOwnerIdRequest): Promise<IFindCabideByOwnerResponse[]>;
|
|
84
85
|
findByOwnerPaginated(selector: IFindPaginatedRequest): Promise<IFindWithPaginationResponse>;
|
|
86
|
+
findProductByCabideProductId(selector: IShared.IFindByIdRequest): Promise<ProductGoogleSheets.IEntityFromCabide[]>;
|
|
85
87
|
create(data: ICreateRequest): Promise<Entity>;
|
|
86
88
|
update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<Entity | null>;
|
|
89
|
+
createProductByCabideProductId(data: ICreateProductByCabideProductIdRequest): Promise<ProductGoogleSheets.IEntityFromCabide>;
|
|
87
90
|
deleteOne(selector: IShared.IFindByIdRequest): Promise<void>;
|
|
88
91
|
}
|
|
89
92
|
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
@@ -127,3 +127,4 @@ export import EmailTemplateAttachment = Integration.EmailTemplateAttachment;
|
|
|
127
127
|
export import GoogleSheetImports = Stock.GoogleSheetImports;
|
|
128
128
|
export import DocumentLineNote = Stock.DocumentLineNote;
|
|
129
129
|
export import SavedProviderProposal = Stock.SavedProviderProposal;
|
|
130
|
+
export import ProductSheet = Stock.ProductSheet;
|
|
@@ -1212,3 +1212,29 @@ export type SavedProviderProposal = {
|
|
|
1212
1212
|
created_by: string;
|
|
1213
1213
|
updated_by: string;
|
|
1214
1214
|
};
|
|
1215
|
+
export type ProductSheet = {
|
|
1216
|
+
id: boolean;
|
|
1217
|
+
reference: boolean;
|
|
1218
|
+
type: boolean;
|
|
1219
|
+
state: boolean;
|
|
1220
|
+
values: boolean;
|
|
1221
|
+
imported_from_sheets: boolean;
|
|
1222
|
+
imported_from_product_sheets: boolean;
|
|
1223
|
+
origin_cabide_product_id: boolean;
|
|
1224
|
+
vat_tax_id: boolean;
|
|
1225
|
+
unit_of_measure_quantity_id: boolean;
|
|
1226
|
+
cabide_product_color: boolean;
|
|
1227
|
+
weight: boolean;
|
|
1228
|
+
width: boolean;
|
|
1229
|
+
height: boolean;
|
|
1230
|
+
length: boolean;
|
|
1231
|
+
diameter: boolean;
|
|
1232
|
+
no_discount: boolean;
|
|
1233
|
+
provider_ref: boolean;
|
|
1234
|
+
margin: boolean;
|
|
1235
|
+
id_provider: boolean;
|
|
1236
|
+
created_at: Date;
|
|
1237
|
+
updated_at: Date;
|
|
1238
|
+
created_by: string;
|
|
1239
|
+
updated_by: string;
|
|
1240
|
+
};
|