feat: filling deals from excel file
This commit is contained in:
@@ -30,12 +30,14 @@ export type { BaseShippingWarehouseSchema } from './models/BaseShippingWarehouse
|
||||
export type { BaseTransactionTagSchema } from './models/BaseTransactionTagSchema';
|
||||
export type { BillPaymentStatus } from './models/BillPaymentStatus';
|
||||
export type { BillStatusUpdateRequest } from './models/BillStatusUpdateRequest';
|
||||
export type { Body_parse_deals_excel } from './models/Body_parse_deals_excel';
|
||||
export type { Body_upload_passport_image } from './models/Body_upload_passport_image';
|
||||
export type { Body_upload_product_barcode_image } from './models/Body_upload_product_barcode_image';
|
||||
export type { Body_upload_product_image } from './models/Body_upload_product_image';
|
||||
export type { BoxSchema } from './models/BoxSchema';
|
||||
export type { CancelDealBillRequest } from './models/CancelDealBillRequest';
|
||||
export type { CancelDealBillResponse } from './models/CancelDealBillResponse';
|
||||
export type { CityBreakdownFromExcelSchema } from './models/CityBreakdownFromExcelSchema';
|
||||
export type { ClientCreateRequest } from './models/ClientCreateRequest';
|
||||
export type { ClientCreateResponse } from './models/ClientCreateResponse';
|
||||
export type { ClientDeleteRequest } from './models/ClientDeleteRequest';
|
||||
@@ -52,6 +54,8 @@ export type { CreateBoxInDealSchema } from './models/CreateBoxInDealSchema';
|
||||
export type { CreateBoxInPalletSchema } from './models/CreateBoxInPalletSchema';
|
||||
export type { CreateDealBillRequest } from './models/CreateDealBillRequest';
|
||||
export type { CreateDealBillResponse } from './models/CreateDealBillResponse';
|
||||
export type { CreateDealsFromExcelRequest } from './models/CreateDealsFromExcelRequest';
|
||||
export type { CreateDealsFromExcelResponse } from './models/CreateDealsFromExcelResponse';
|
||||
export type { CreateDepartmentRequest } from './models/CreateDepartmentRequest';
|
||||
export type { CreateDepartmentResponse } from './models/CreateDepartmentResponse';
|
||||
export type { CreateDepartmentSectionRequest } from './models/CreateDepartmentSectionRequest';
|
||||
@@ -222,8 +226,12 @@ export type { ManageEmployeeResponse } from './models/ManageEmployeeResponse';
|
||||
export type { MarketplaceCreateSchema } from './models/MarketplaceCreateSchema';
|
||||
export type { MarketplaceSchema } from './models/MarketplaceSchema';
|
||||
export type { NotificationChannel } from './models/NotificationChannel';
|
||||
export type { OptionalShippingWarehouseSchema } from './models/OptionalShippingWarehouseSchema';
|
||||
export type { PaginationInfoSchema } from './models/PaginationInfoSchema';
|
||||
export type { PalletSchema } from './models/PalletSchema';
|
||||
export type { ParsedCityBreakdownSchema } from './models/ParsedCityBreakdownSchema';
|
||||
export type { ParseDealsExcelResponse } from './models/ParseDealsExcelResponse';
|
||||
export type { ParsedProductRowSchema } from './models/ParsedProductRowSchema';
|
||||
export type { PassportImageSchema } from './models/PassportImageSchema';
|
||||
export type { PaymentRecordCreateSchema } from './models/PaymentRecordCreateSchema';
|
||||
export type { PaymentRecordGetSchema } from './models/PaymentRecordGetSchema';
|
||||
@@ -240,6 +248,7 @@ export type { ProductDeleteBarcodeImageResponse } from './models/ProductDeleteBa
|
||||
export type { ProductDeleteRequest } from './models/ProductDeleteRequest';
|
||||
export type { ProductDeleteResponse } from './models/ProductDeleteResponse';
|
||||
export type { ProductExistsBarcodeResponse } from './models/ProductExistsBarcodeResponse';
|
||||
export type { ProductFromExcelSchema } from './models/ProductFromExcelSchema';
|
||||
export type { ProductGenerateBarcodeRequest } from './models/ProductGenerateBarcodeRequest';
|
||||
export type { ProductGenerateBarcodeResponse } from './models/ProductGenerateBarcodeResponse';
|
||||
export type { ProductGetBarcodeImageResponse } from './models/ProductGetBarcodeImageResponse';
|
||||
|
||||
8
src/client/models/Body_parse_deals_excel.ts
Normal file
8
src/client/models/Body_parse_deals_excel.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
export type Body_parse_deals_excel = {
|
||||
upload_file: Blob;
|
||||
};
|
||||
|
||||
12
src/client/models/CityBreakdownFromExcelSchema.ts
Normal file
12
src/client/models/CityBreakdownFromExcelSchema.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type { BaseMarketplaceSchema } from './BaseMarketplaceSchema';
|
||||
import type { OptionalShippingWarehouseSchema } from './OptionalShippingWarehouseSchema';
|
||||
export type CityBreakdownFromExcelSchema = {
|
||||
baseMarketplace: BaseMarketplaceSchema;
|
||||
shippingWarehouse: OptionalShippingWarehouseSchema;
|
||||
quantity: number;
|
||||
};
|
||||
|
||||
10
src/client/models/CreateDealsFromExcelRequest.ts
Normal file
10
src/client/models/CreateDealsFromExcelRequest.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type { ProductFromExcelSchema } from './ProductFromExcelSchema';
|
||||
export type CreateDealsFromExcelRequest = {
|
||||
clientId: number;
|
||||
products: Array<ProductFromExcelSchema>;
|
||||
};
|
||||
|
||||
9
src/client/models/CreateDealsFromExcelResponse.ts
Normal file
9
src/client/models/CreateDealsFromExcelResponse.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
export type CreateDealsFromExcelResponse = {
|
||||
ok: boolean;
|
||||
message: string;
|
||||
};
|
||||
|
||||
9
src/client/models/OptionalShippingWarehouseSchema.ts
Normal file
9
src/client/models/OptionalShippingWarehouseSchema.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
export type OptionalShippingWarehouseSchema = {
|
||||
name: string;
|
||||
id?: (number | null);
|
||||
};
|
||||
|
||||
10
src/client/models/ParseDealsExcelResponse.ts
Normal file
10
src/client/models/ParseDealsExcelResponse.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type { ParsedProductRowSchema } from './ParsedProductRowSchema';
|
||||
export type ParseDealsExcelResponse = {
|
||||
rows: Array<ParsedProductRowSchema>;
|
||||
errors: Array<string>;
|
||||
};
|
||||
|
||||
12
src/client/models/ParsedCityBreakdownSchema.ts
Normal file
12
src/client/models/ParsedCityBreakdownSchema.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type { BaseMarketplaceSchema } from './BaseMarketplaceSchema';
|
||||
import type { OptionalShippingWarehouseSchema } from './OptionalShippingWarehouseSchema';
|
||||
export type ParsedCityBreakdownSchema = {
|
||||
baseMarketplace: BaseMarketplaceSchema;
|
||||
shippingWarehouse: OptionalShippingWarehouseSchema;
|
||||
quantity: number;
|
||||
};
|
||||
|
||||
12
src/client/models/ParsedProductRowSchema.ts
Normal file
12
src/client/models/ParsedProductRowSchema.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type { ParsedCityBreakdownSchema } from './ParsedCityBreakdownSchema';
|
||||
import type { ProductSchema } from './ProductSchema';
|
||||
export type ParsedProductRowSchema = {
|
||||
barcode: string;
|
||||
products: Array<ProductSchema>;
|
||||
breakdowns: Array<ParsedCityBreakdownSchema>;
|
||||
};
|
||||
|
||||
10
src/client/models/ProductFromExcelSchema.ts
Normal file
10
src/client/models/ProductFromExcelSchema.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type { CityBreakdownFromExcelSchema } from './CityBreakdownFromExcelSchema';
|
||||
export type ProductFromExcelSchema = {
|
||||
productId: number;
|
||||
citiesBreakdown: Array<CityBreakdownFromExcelSchema>;
|
||||
};
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type { Body_parse_deals_excel } from '../models/Body_parse_deals_excel';
|
||||
import type { CreateDealsFromExcelRequest } from '../models/CreateDealsFromExcelRequest';
|
||||
import type { CreateDealsFromExcelResponse } from '../models/CreateDealsFromExcelResponse';
|
||||
import type { DealAddKitRequest } from '../models/DealAddKitRequest';
|
||||
import type { DealAddKitResponse } from '../models/DealAddKitResponse';
|
||||
import type { DealAddProductRequest } from '../models/DealAddProductRequest';
|
||||
@@ -66,6 +69,7 @@ import type { GetDealProductsBarcodesPdfRequest } from '../models/GetDealProduct
|
||||
import type { GetDealProductsBarcodesPdfResponse } from '../models/GetDealProductsBarcodesPdfResponse';
|
||||
import type { ManageEmployeeRequest } from '../models/ManageEmployeeRequest';
|
||||
import type { ManageEmployeeResponse } from '../models/ManageEmployeeResponse';
|
||||
import type { ParseDealsExcelResponse } from '../models/ParseDealsExcelResponse';
|
||||
import type { CancelablePromise } from '../core/CancelablePromise';
|
||||
import { OpenAPI } from '../core/OpenAPI';
|
||||
import { request as __request } from '../core/request';
|
||||
@@ -426,6 +430,46 @@ export class DealService {
|
||||
},
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Parse Deals Excel
|
||||
* @returns ParseDealsExcelResponse Successful Response
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static parseDealsExcel({
|
||||
formData,
|
||||
}: {
|
||||
formData: Body_parse_deals_excel,
|
||||
}): CancelablePromise<ParseDealsExcelResponse> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'POST',
|
||||
url: '/deal/prefill/excel/parse',
|
||||
formData: formData,
|
||||
mediaType: 'multipart/form-data',
|
||||
errors: {
|
||||
422: `Validation Error`,
|
||||
},
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Create Deals From Excel
|
||||
* @returns CreateDealsFromExcelResponse Successful Response
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static createDealsExcel({
|
||||
requestBody,
|
||||
}: {
|
||||
requestBody: CreateDealsFromExcelRequest,
|
||||
}): CancelablePromise<CreateDealsFromExcelResponse> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'POST',
|
||||
url: '/deal/prefill/excel/create',
|
||||
body: requestBody,
|
||||
mediaType: 'application/json',
|
||||
errors: {
|
||||
422: `Validation Error`,
|
||||
},
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Services Add
|
||||
* @returns DealAddServicesResponse Successful Response
|
||||
|
||||
Reference in New Issue
Block a user