temp image upload
This commit is contained in:
@@ -23,6 +23,7 @@ export type { BarcodeTemplateUpdateRequest } from './models/BarcodeTemplateUpdat
|
||||
export type { BarcodeTemplateUpdateResponse } from './models/BarcodeTemplateUpdateResponse';
|
||||
export type { BaseEnumListSchema } from './models/BaseEnumListSchema';
|
||||
export type { BaseEnumSchema } from './models/BaseEnumSchema';
|
||||
export type { Body_upload_product_image } from './models/Body_upload_product_image';
|
||||
export type { ClientCreateRequest } from './models/ClientCreateRequest';
|
||||
export type { ClientCreateResponse } from './models/ClientCreateResponse';
|
||||
export type { ClientDeleteRequest } from './models/ClientDeleteRequest';
|
||||
@@ -98,6 +99,7 @@ export type { ProductGetResponse } from './models/ProductGetResponse';
|
||||
export type { ProductSchema } from './models/ProductSchema';
|
||||
export type { ProductUpdateRequest } from './models/ProductUpdateRequest';
|
||||
export type { ProductUpdateResponse } from './models/ProductUpdateResponse';
|
||||
export type { ProductUploadImageResponse } from './models/ProductUploadImageResponse';
|
||||
export type { ServiceCategorySchema } from './models/ServiceCategorySchema';
|
||||
export type { ServiceCreateCategoryRequest } from './models/ServiceCreateCategoryRequest';
|
||||
export type { ServiceCreateCategoryResponse } from './models/ServiceCreateCategoryResponse';
|
||||
|
||||
8
src/client/models/Body_upload_product_image.ts
Normal file
8
src/client/models/Body_upload_product_image.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
/* generated using openapi-typescript-codegen -- do no edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
export type Body_upload_product_image = {
|
||||
upload_file: Blob;
|
||||
};
|
||||
|
||||
10
src/client/models/ProductUploadImageResponse.ts
Normal file
10
src/client/models/ProductUploadImageResponse.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
/* generated using openapi-typescript-codegen -- do no edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
export type ProductUploadImageResponse = {
|
||||
ok: boolean;
|
||||
message: string;
|
||||
imageUrl?: (string | null);
|
||||
};
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type { Body_upload_product_image } from '../models/Body_upload_product_image';
|
||||
import type { GetProductBarcodeRequest } from '../models/GetProductBarcodeRequest';
|
||||
import type { GetProductBarcodeResponse } from '../models/GetProductBarcodeResponse';
|
||||
import type { ProductAddBarcodeRequest } from '../models/ProductAddBarcodeRequest';
|
||||
@@ -17,6 +18,7 @@ import type { ProductGetResponse } from '../models/ProductGetResponse';
|
||||
import type { ProductSchema } from '../models/ProductSchema';
|
||||
import type { ProductUpdateRequest } from '../models/ProductUpdateRequest';
|
||||
import type { ProductUpdateResponse } from '../models/ProductUpdateResponse';
|
||||
import type { ProductUploadImageResponse } from '../models/ProductUploadImageResponse';
|
||||
import type { CancelablePromise } from '../core/CancelablePromise';
|
||||
import { OpenAPI } from '../core/OpenAPI';
|
||||
import { request as __request } from '../core/request';
|
||||
@@ -213,4 +215,29 @@ export class ProductService {
|
||||
},
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Upload Product Image
|
||||
* @returns ProductUploadImageResponse Successful Response
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static uploadProductImage({
|
||||
productId,
|
||||
formData,
|
||||
}: {
|
||||
productId: number,
|
||||
formData: Body_upload_product_image,
|
||||
}): CancelablePromise<ProductUploadImageResponse> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'POST',
|
||||
url: '/product/images/upload/{product_id}',
|
||||
path: {
|
||||
'product_id': productId,
|
||||
},
|
||||
formData: formData,
|
||||
mediaType: 'multipart/form-data',
|
||||
errors: {
|
||||
422: `Validation Error`,
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user