feat: CRUD for product barcode images
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type { Body_upload_product_barcode_image } from '../models/Body_upload_product_barcode_image';
|
||||
import type { Body_upload_product_image } from '../models/Body_upload_product_image';
|
||||
import type { GetProductBarcodePdfRequest } from '../models/GetProductBarcodePdfRequest';
|
||||
import type { GetProductBarcodePdfResponse } from '../models/GetProductBarcodePdfResponse';
|
||||
@@ -11,15 +12,18 @@ import type { ProductAddBarcodeRequest } from '../models/ProductAddBarcodeReques
|
||||
import type { ProductAddBarcodeResponse } from '../models/ProductAddBarcodeResponse';
|
||||
import type { ProductCreateRequest } from '../models/ProductCreateRequest';
|
||||
import type { ProductCreateResponse } from '../models/ProductCreateResponse';
|
||||
import type { ProductDeleteBarcodeImageResponse } from '../models/ProductDeleteBarcodeImageResponse';
|
||||
import type { ProductDeleteRequest } from '../models/ProductDeleteRequest';
|
||||
import type { ProductDeleteResponse } from '../models/ProductDeleteResponse';
|
||||
import type { ProductExistsBarcodeResponse } from '../models/ProductExistsBarcodeResponse';
|
||||
import type { ProductGenerateBarcodeRequest } from '../models/ProductGenerateBarcodeRequest';
|
||||
import type { ProductGenerateBarcodeResponse } from '../models/ProductGenerateBarcodeResponse';
|
||||
import type { ProductGetBarcodeImageResponse } from '../models/ProductGetBarcodeImageResponse';
|
||||
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 { ProductUploadBarcodeImageResponse } from '../models/ProductUploadBarcodeImageResponse';
|
||||
import type { ProductUploadImageResponse } from '../models/ProductUploadImageResponse';
|
||||
import type { CancelablePromise } from '../core/CancelablePromise';
|
||||
import { OpenAPI } from '../core/OpenAPI';
|
||||
@@ -265,4 +269,71 @@ export class ProductService {
|
||||
},
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Upload Product Barcode Image
|
||||
* @returns ProductUploadBarcodeImageResponse Successful Response
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static uploadProductBarcodeImage({
|
||||
productId,
|
||||
formData,
|
||||
}: {
|
||||
productId: number,
|
||||
formData: Body_upload_product_barcode_image,
|
||||
}): CancelablePromise<ProductUploadBarcodeImageResponse> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'POST',
|
||||
url: '/product/barcode/upload-image/{product_id}',
|
||||
path: {
|
||||
'product_id': productId,
|
||||
},
|
||||
formData: formData,
|
||||
mediaType: 'multipart/form-data',
|
||||
errors: {
|
||||
422: `Validation Error`,
|
||||
},
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Delete Product Barcode Image
|
||||
* @returns ProductDeleteBarcodeImageResponse Successful Response
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static deleteProductBarcodeImage({
|
||||
productId,
|
||||
}: {
|
||||
productId: number,
|
||||
}): CancelablePromise<ProductDeleteBarcodeImageResponse> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'POST',
|
||||
url: '/product/barcode/delete-image/{product_id}',
|
||||
path: {
|
||||
'product_id': productId,
|
||||
},
|
||||
errors: {
|
||||
422: `Validation Error`,
|
||||
},
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Get Product Barcode Image
|
||||
* @returns ProductGetBarcodeImageResponse Successful Response
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static getProductBarcodeImage({
|
||||
productId,
|
||||
}: {
|
||||
productId: number,
|
||||
}): CancelablePromise<ProductGetBarcodeImageResponse> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'POST',
|
||||
url: '/product/barcode/image/{product_id}',
|
||||
path: {
|
||||
'product_id': productId,
|
||||
},
|
||||
errors: {
|
||||
422: `Validation Error`,
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user