@nomalism-com/types 0.24.4 → 0.24.6

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.
@@ -7,9 +7,6 @@ export declare const LowerName: string;
7
7
  export type IProductPromotionVirtuals = ProductPromotionVirtuals;
8
8
  export type IProductVirtuals = ProductVirtuals;
9
9
  export type IProductBaseVirtuals = ProductBaseVirtuals;
10
- export interface IProductsSheetsRequest {
11
- products_google_sheet_id: string;
12
- }
13
10
  export type Entity = ProductSheet;
14
11
  export type IProductsForSheetsResponse = Record<string, any>;
15
12
  export type IProductFromSheetsValues = Record<string, any>;
@@ -30,12 +27,6 @@ export declare const ProductTypeEnum: {
30
27
  };
31
28
  export type IProductType = (typeof ProductTypeEnum)[keyof typeof ProductTypeEnum];
32
29
  export declare const productTypes: string[];
33
- export interface IProductsForNomaResponse {
34
- reference: string;
35
- type: IProductType;
36
- state: IProductSheetState;
37
- values: IProductsForSheetsResponse;
38
- }
39
30
  export interface ICreateRequest {
40
31
  id?: string;
41
32
  reference?: string;
@@ -70,61 +61,8 @@ export interface ICreateRequest {
70
61
  created_by?: string;
71
62
  updated_by?: string;
72
63
  }
73
- export interface IProduct extends Omit<IProductsForNomaResponse, "values"> {
74
- id: string;
75
- designation: string;
76
- values: IProductFromSheetsValues;
77
- imported_from_sheets: boolean;
78
- id_provider: number;
79
- origin_cabide_product_id?: string | null;
80
- vat_tax_id: string;
81
- unit_of_measure_quantity_id: string;
82
- cabide_product_color?: string | null;
83
- weight?: number | null;
84
- width?: number | null;
85
- height?: number | null;
86
- length?: number | null;
87
- diameter?: number | null;
88
- provider_ref?: string | null;
89
- extended_virtual: ProductVirtuals | null;
90
- margin?: number;
91
- unit_of_measure_quantity: UnitOfMeasure;
92
- vat_tax: VatTax & {
93
- vat_tax_zones: VatTaxZone[];
94
- };
95
- promotions: ProductPromotionVirtuals[];
96
- product_images: ProductImage[];
97
- type_of_inventory: string;
98
- created_at: Date;
99
- updated_at: Date;
100
- }
101
- export interface IProductSheetsWithIndex {
102
- index: number;
103
- values: IProductFromSheetsValues;
104
- }
105
64
  export interface IFindProductSheetByReference {
106
- reference: string;
107
- }
108
- export interface IProductSheetBasicSearchRequest extends IShared.IPaginationRequest {
109
- search_value: string | null;
110
- active?: boolean;
111
- inactive?: boolean;
112
- dnt_come_anymore?: boolean;
113
- type_stock: boolean;
114
- type_encomenda: boolean;
115
- type_servico: boolean;
116
- }
117
- export interface IProductSheetBasicSearchResponse {
118
- id: string;
119
- reference: string;
120
- designation: string;
121
- price: number;
122
- promotion_price: number | null;
123
- thumbnail?: string | null;
124
- stock: number;
125
- updated_at: Date;
126
- active: boolean;
127
- dnt_come_anymore: boolean;
65
+ selector: string;
128
66
  }
129
67
  export interface IProductSheetEntityWithStock extends Omit<Entity, "values"> {
130
68
  unit_of_measure_quantity: UnitOfMeasure;
@@ -184,11 +122,6 @@ export interface IFindByReferenceRequest {
184
122
  available?: boolean;
185
123
  type?: IProductType;
186
124
  }
187
- export interface IFindByOwnerIdResponse {
188
- id: string;
189
- reference: string;
190
- thumbnail: string | null;
191
- }
192
125
  export interface IValidateByReferenceRequest extends IFindByReferenceRequest {
193
126
  billing_country_id?: string;
194
127
  }
@@ -288,17 +221,17 @@ export type ProductSheetActionData = {
288
221
  };
289
222
  };
290
223
  export interface IRepository {
291
- findForMobile(params: IFindForMobileRequest): Promise<IFindForMobileResponse | null>;
292
- findByReferenceOnSheets(params: IFindProductSheetByReference): Promise<IProductSheetsWithIndex>;
293
- findByReferenceOnNoma(params: IFindProductSheetByReference): Promise<IProduct | null>;
294
- findRowPositionOnSheetsWithColumns(params: IFindProductSheetByReference): Promise<string>;
295
224
  basicSearch(params: IBasicSearchRequest): Promise<IShared.IPaginationResponse<IBasicSearchResponse>>;
225
+ findForMobile(params: IFindForMobileRequest): Promise<IFindForMobileResponse | null>;
296
226
  validateByRef(selector: IValidateByReferenceRequest): Promise<IEntityMinified | null>;
297
227
  findSimilarProductsByName(params: IFindSimilarProductsByNameRequest): Promise<IFindSimilarProductsByNameResponse[]>;
298
228
  findByProductType(params: IFindByProductTypeRequest): Promise<IFindByProductTypeResponse[]>;
229
+ findByIdWithStock(selector: IShared.IFindByIdRequest): Promise<IProductSheetEntityWithStock>;
299
230
  googleSheetsFieldsByRef(selector: IFindByReferenceRequest): Promise<string>;
231
+ findRowPositionOnSheetsWithColumns(params: IFindProductSheetByReference): Promise<string | null>;
300
232
  checkStockByIds(data: ICheckStockByIdsRequest): Promise<ICheckStockByIdsResponse[]>;
301
233
  create(data: ICreateRequest): Promise<string>;
302
- deleteOne(params: IShared.IFindByIdRequest): Promise<void>;
303
234
  fromSheets(data: ProductSheetActionData): Promise<string>;
235
+ deleteOne(params: IShared.IFindByIdRequest): Promise<void>;
304
236
  }
237
+ export type IController = IShared.IEntityWithUserToken<IRepository>;
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "typescript",
10
10
  "helper"
11
11
  ],
12
- "version": "0.24.4",
12
+ "version": "0.24.6",
13
13
  "main": "./dist/index.min.js",
14
14
  "types": "./dist/index.d.ts",
15
15
  "files": [
@@ -42,8 +42,8 @@
42
42
  "@types/node": "^20.16.5",
43
43
  "@typescript-eslint/eslint-plugin": "^7.18.0",
44
44
  "@typescript-eslint/parser": "^7.18.0",
45
- "eslint": "^8.57.0",
46
- "rollup": "^4.21.2",
45
+ "eslint": "^8.57.1",
46
+ "rollup": "^4.21.3",
47
47
  "tslib": "^2.7.0"
48
48
  }
49
49
  }