feat: new barcodes system

This commit is contained in:
2024-06-01 04:26:08 +03:00
parent 0536b5d9d4
commit c4dc887305
9 changed files with 106 additions and 6 deletions

View File

@@ -82,6 +82,8 @@ export type { GetAllBarcodeTemplateSizesResponse } from './models/GetAllBarcodeT
export type { GetAllBarcodeTemplatesResponse } from './models/GetAllBarcodeTemplatesResponse';
export type { GetBarcodeTemplateByIdRequest } from './models/GetBarcodeTemplateByIdRequest';
export type { GetBarcodeTemplateByIdResponse } from './models/GetBarcodeTemplateByIdResponse';
export type { GetProductBarcodePdfRequest } from './models/GetProductBarcodePdfRequest';
export type { GetProductBarcodePdfResponse } from './models/GetProductBarcodePdfResponse';
export type { GetProductBarcodeRequest } from './models/GetProductBarcodeRequest';
export type { GetProductBarcodeResponse } from './models/GetProductBarcodeResponse';
export type { HTTPValidationError } from './models/HTTPValidationError';
@@ -96,6 +98,7 @@ export type { ProductExistsBarcodeResponse } from './models/ProductExistsBarcode
export type { ProductGenerateBarcodeRequest } from './models/ProductGenerateBarcodeRequest';
export type { ProductGenerateBarcodeResponse } from './models/ProductGenerateBarcodeResponse';
export type { ProductGetResponse } from './models/ProductGetResponse';
export type { ProductImageSchema } from './models/ProductImageSchema';
export type { ProductSchema } from './models/ProductSchema';
export type { ProductUpdateRequest } from './models/ProductUpdateRequest';
export type { ProductUpdateResponse } from './models/ProductUpdateResponse';

View File

@@ -0,0 +1,11 @@
/* generated using openapi-typescript-codegen -- do no edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type GetProductBarcodePdfRequest = {
productId: number;
barcode: string;
barcodeTemplateId?: (number | null);
quantity: number;
};

View File

@@ -0,0 +1,10 @@
/* generated using openapi-typescript-codegen -- do no edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type GetProductBarcodePdfResponse = {
base64String: string;
filename: string;
mimeType: string;
};

View File

@@ -3,6 +3,7 @@
/* tslint:disable */
/* eslint-disable */
import type { BarcodeTemplateSchema } from './BarcodeTemplateSchema';
import type { ProductImageSchema } from './ProductImageSchema';
export type ProductCreateRequest = {
name: string;
article?: (string | null);
@@ -15,5 +16,6 @@ export type ProductCreateRequest = {
size?: (string | null);
additionalInfo?: (string | null);
imageUrl?: (string | null);
images?: (Array<ProductImageSchema> | null);
};

View File

@@ -0,0 +1,10 @@
/* generated using openapi-typescript-codegen -- do no edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type ProductImageSchema = {
id: number;
productId: number;
imageUrl: string;
};

View File

@@ -3,6 +3,7 @@
/* tslint:disable */
/* eslint-disable */
import type { BarcodeTemplateSchema } from './BarcodeTemplateSchema';
import type { ProductImageSchema } from './ProductImageSchema';
export type ProductSchema = {
name: string;
article?: (string | null);
@@ -15,6 +16,7 @@ export type ProductSchema = {
size?: (string | null);
additionalInfo?: (string | null);
imageUrl?: (string | null);
images?: (Array<ProductImageSchema> | null);
id: number;
};

View File

@@ -3,6 +3,8 @@
/* tslint:disable */
/* eslint-disable */
import type { Body_upload_product_image } from '../models/Body_upload_product_image';
import type { GetProductBarcodePdfRequest } from '../models/GetProductBarcodePdfRequest';
import type { GetProductBarcodePdfResponse } from '../models/GetProductBarcodePdfResponse';
import type { GetProductBarcodeRequest } from '../models/GetProductBarcodeRequest';
import type { GetProductBarcodeResponse } from '../models/GetProductBarcodeResponse';
import type { ProductAddBarcodeRequest } from '../models/ProductAddBarcodeRequest';
@@ -215,6 +217,26 @@ export class ProductService {
},
});
}
/**
* Get Product Barcode Pdf
* @returns GetProductBarcodePdfResponse Successful Response
* @throws ApiError
*/
public static getProductBarcodePdf({
requestBody,
}: {
requestBody: GetProductBarcodePdfRequest,
}): CancelablePromise<GetProductBarcodePdfResponse> {
return __request(OpenAPI, {
method: 'POST',
url: '/product/barcode/get-pdf',
body: requestBody,
mediaType: 'application/json',
errors: {
422: `Validation Error`,
},
});
}
/**
* Upload Product Image
* @returns ProductUploadImageResponse Successful Response