@nomalism-com/types 0.49.32 → 0.49.34

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,5 +1,5 @@
1
1
  import * as IShared from "../../../shared/interface";
2
- import type { IProductState } from "../productGoogleSheets/interface";
2
+ import type { IProductState, IProductType } from "../productGoogleSheets/interface";
3
3
  export declare const Route = "product_update";
4
4
  export interface IExtractRequest {
5
5
  multimedia_ids: string[];
@@ -145,9 +145,28 @@ export interface IAnalyzeResponse {
145
145
  unchanged_count: number;
146
146
  without_provider_ref: IAnalyzeProduct[];
147
147
  }
148
+ export interface IExecuteNewProducts {
149
+ type: IProductType;
150
+ unit_of_measure_quantity_id: string;
151
+ }
152
+ export interface IExecuteRequest extends IAnalyzeRequest {
153
+ update_product_ids: string[];
154
+ create_provider_refs: string[];
155
+ discontinue_product_ids: string[];
156
+ new_products?: IExecuteNewProducts;
157
+ }
158
+ export interface IExecuteResponse {
159
+ updated: number;
160
+ created: {
161
+ provider_ref: string;
162
+ reference: string;
163
+ }[];
164
+ discontinued: number;
165
+ }
148
166
  export interface IRepository {
149
167
  extract(data: IExtractRequest): Promise<IExtractResponse>;
150
168
  analyze(data: IAnalyzeRequest): Promise<IAnalyzeResponse>;
169
+ execute(data: IExecuteRequest): Promise<IExecuteResponse>;
151
170
  }
152
171
  export type IController = IShared.IEntityWithUserToken<IRepository>;
153
172
  export {};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@nomalism-com/types",
3
3
  "description": "A nomalism package with all necessary types and validations for developing APIs",
4
- "version": "0.49.32",
4
+ "version": "0.49.34",
5
5
  "author": "Nomalism <it.nomalism@gmail.com> (https://nomalism.com/)",
6
6
  "license": "UNLICENSED",
7
7
  "type": "module",