@nomalism-com/types 0.22.33 → 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/cabide/interface.d.ts +2 -2
- 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 -1
- 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;
|
|
@@ -38,7 +38,7 @@ export interface ICreateRequest {
|
|
|
38
38
|
export interface IFindRequest {
|
|
39
39
|
cabide_state: IStateType;
|
|
40
40
|
}
|
|
41
|
-
export interface IFindResponse extends Entity {
|
|
41
|
+
export interface IFindResponse extends Omit<Entity, "created_at" | "created_by" | "updated_at" | "updated_by" | "product_id" | "id" | "type"> {
|
|
42
42
|
product_counter: number;
|
|
43
43
|
}
|
|
44
44
|
export interface IUpdateRequest {
|
|
@@ -54,7 +54,7 @@ export interface IDeleteRequest {
|
|
|
54
54
|
export interface IFindByIdProviderRequest {
|
|
55
55
|
id_provider: number;
|
|
56
56
|
}
|
|
57
|
-
export type IFindByIdProviderResponse = Entity
|
|
57
|
+
export type IFindByIdProviderResponse = Omit<Entity, "created_at" | "created_by" | "updated_at" | "updated_by" | "product_id" | "id" | "type">;
|
|
58
58
|
export interface IFindCabideProvidersResponse {
|
|
59
59
|
id_provider: number;
|
|
60
60
|
name: string;
|
|
@@ -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;
|
|
@@ -201,7 +201,6 @@ export type Cabide = {
|
|
|
201
201
|
id_provider: number;
|
|
202
202
|
type: ICabideType;
|
|
203
203
|
counter: number;
|
|
204
|
-
product_id: string;
|
|
205
204
|
inactive: boolean;
|
|
206
205
|
origin_id: string | null;
|
|
207
206
|
created_at: Date;
|
|
@@ -1213,3 +1212,29 @@ export type SavedProviderProposal = {
|
|
|
1213
1212
|
created_by: string;
|
|
1214
1213
|
updated_by: string;
|
|
1215
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
|
+
};
|