crap
This commit is contained in:
@@ -19,6 +19,8 @@ export type { ClientSchema } from './models/ClientSchema';
|
||||
export type { ClientUpdateDetailsRequest } from './models/ClientUpdateDetailsRequest';
|
||||
export type { ClientUpdateRequest } from './models/ClientUpdateRequest';
|
||||
export type { ClientUpdateResponse } from './models/ClientUpdateResponse';
|
||||
export type { DealAddProductRequest } from './models/DealAddProductRequest';
|
||||
export type { DealAddProductResponse } from './models/DealAddProductResponse';
|
||||
export type { DealAddServiceRequest } from './models/DealAddServiceRequest';
|
||||
export type { DealAddServiceResponse } from './models/DealAddServiceResponse';
|
||||
export type { DealAddServicesRequest } from './models/DealAddServicesRequest';
|
||||
@@ -26,26 +28,41 @@ export type { DealAddServicesResponse } from './models/DealAddServicesResponse';
|
||||
export type { DealChangeStatusRequest } from './models/DealChangeStatusRequest';
|
||||
export type { DealChangeStatusResponse } from './models/DealChangeStatusResponse';
|
||||
export type { DealCreateRequest } from './models/DealCreateRequest';
|
||||
export type { DealDeleteProductRequest } from './models/DealDeleteProductRequest';
|
||||
export type { DealDeleteProductResponse } from './models/DealDeleteProductResponse';
|
||||
export type { DealDeleteProductsRequest } from './models/DealDeleteProductsRequest';
|
||||
export type { DealDeleteProductsResponse } from './models/DealDeleteProductsResponse';
|
||||
export type { DealDeleteServiceRequest } from './models/DealDeleteServiceRequest';
|
||||
export type { DealDeleteServiceResponse } from './models/DealDeleteServiceResponse';
|
||||
export type { DealDeleteServicesRequest } from './models/DealDeleteServicesRequest';
|
||||
export type { DealDeleteServicesResponse } from './models/DealDeleteServicesResponse';
|
||||
export type { DealGeneralInfoSchema } from './models/DealGeneralInfoSchema';
|
||||
export type { DealGetAllResponse } from './models/DealGetAllResponse';
|
||||
export type { DealProductSchema } from './models/DealProductSchema';
|
||||
export type { DealQuickCreateRequest } from './models/DealQuickCreateRequest';
|
||||
export type { DealQuickCreateResponse } from './models/DealQuickCreateResponse';
|
||||
export type { DealSchema } from './models/DealSchema';
|
||||
export type { DealServiceSchema } from './models/DealServiceSchema';
|
||||
export type { DealStatusHistorySchema } from './models/DealStatusHistorySchema';
|
||||
export type { DealSummary } from './models/DealSummary';
|
||||
export type { DealSummaryResponse } from './models/DealSummaryResponse';
|
||||
export type { DealUpdateGeneralInfoRequest } from './models/DealUpdateGeneralInfoRequest';
|
||||
export type { DealUpdateGeneralInfoResponse } from './models/DealUpdateGeneralInfoResponse';
|
||||
export type { DealUpdateProductQuantityRequest } from './models/DealUpdateProductQuantityRequest';
|
||||
export type { DealUpdateProductQuantityResponse } from './models/DealUpdateProductQuantityResponse';
|
||||
export type { DealUpdateServiceQuantityRequest } from './models/DealUpdateServiceQuantityRequest';
|
||||
export type { DealUpdateServiceQuantityResponse } from './models/DealUpdateServiceQuantityResponse';
|
||||
export type { HTTPValidationError } from './models/HTTPValidationError';
|
||||
export type { PaginationInfoSchema } from './models/PaginationInfoSchema';
|
||||
export type { ProductAddBarcodeRequest } from './models/ProductAddBarcodeRequest';
|
||||
export type { ProductAddBarcodeResponse } from './models/ProductAddBarcodeResponse';
|
||||
export type { ProductCreateRequest } from './models/ProductCreateRequest';
|
||||
export type { ProductCreateResponse } from './models/ProductCreateResponse';
|
||||
export type { ProductDeleteRequest } from './models/ProductDeleteRequest';
|
||||
export type { ProductDeleteResponse } from './models/ProductDeleteResponse';
|
||||
export type { ProductExistsBarcodeResponse } from './models/ProductExistsBarcodeResponse';
|
||||
export type { ProductGenerateBarcodeRequest } from './models/ProductGenerateBarcodeRequest';
|
||||
export type { ProductGenerateBarcodeResponse } from './models/ProductGenerateBarcodeResponse';
|
||||
export type { ProductGetResponse } from './models/ProductGetResponse';
|
||||
export type { ProductSchema } from './models/ProductSchema';
|
||||
export type { ProductUpdateRequest } from './models/ProductUpdateRequest';
|
||||
@@ -58,6 +75,7 @@ export type { ServiceCreateResponse } from './models/ServiceCreateResponse';
|
||||
export type { ServiceGetAllCategoriesResponse } from './models/ServiceGetAllCategoriesResponse';
|
||||
export type { ServiceGetAllResponse } from './models/ServiceGetAllResponse';
|
||||
export type { ServiceSchema } from './models/ServiceSchema';
|
||||
export type { UserSchema } from './models/UserSchema';
|
||||
export type { ValidationError } from './models/ValidationError';
|
||||
|
||||
export { AuthService } from './services/AuthService';
|
||||
|
||||
10
src/client/models/DealAddProductRequest.ts
Normal file
10
src/client/models/DealAddProductRequest.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
/* generated using openapi-typescript-codegen -- do no edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
export type DealAddProductRequest = {
|
||||
dealId: number;
|
||||
productId: number;
|
||||
quantity: number;
|
||||
};
|
||||
|
||||
9
src/client/models/DealAddProductResponse.ts
Normal file
9
src/client/models/DealAddProductResponse.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
/* generated using openapi-typescript-codegen -- do no edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
export type DealAddProductResponse = {
|
||||
ok: boolean;
|
||||
message: string;
|
||||
};
|
||||
|
||||
9
src/client/models/DealDeleteProductRequest.ts
Normal file
9
src/client/models/DealDeleteProductRequest.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
/* generated using openapi-typescript-codegen -- do no edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
export type DealDeleteProductRequest = {
|
||||
dealId: number;
|
||||
productId: number;
|
||||
};
|
||||
|
||||
9
src/client/models/DealDeleteProductResponse.ts
Normal file
9
src/client/models/DealDeleteProductResponse.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
/* generated using openapi-typescript-codegen -- do no edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
export type DealDeleteProductResponse = {
|
||||
ok: boolean;
|
||||
message: string;
|
||||
};
|
||||
|
||||
9
src/client/models/DealDeleteProductsRequest.ts
Normal file
9
src/client/models/DealDeleteProductsRequest.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
/* generated using openapi-typescript-codegen -- do no edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
export type DealDeleteProductsRequest = {
|
||||
dealId: number;
|
||||
productIds: Array<number>;
|
||||
};
|
||||
|
||||
9
src/client/models/DealDeleteProductsResponse.ts
Normal file
9
src/client/models/DealDeleteProductsResponse.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
/* generated using openapi-typescript-codegen -- do no edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
export type DealDeleteProductsResponse = {
|
||||
ok: boolean;
|
||||
message: string;
|
||||
};
|
||||
|
||||
10
src/client/models/DealGeneralInfoSchema.ts
Normal file
10
src/client/models/DealGeneralInfoSchema.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
/* generated using openapi-typescript-codegen -- do no edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
export type DealGeneralInfoSchema = {
|
||||
name: string;
|
||||
isDeleted: boolean;
|
||||
isCompleted: boolean;
|
||||
};
|
||||
|
||||
@@ -2,8 +2,10 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type { ClientSchema } from './ClientSchema';
|
||||
import type { DealProductSchema } from './DealProductSchema';
|
||||
import type { DealServiceSchema } from './DealServiceSchema';
|
||||
import type { DealStatusHistorySchema } from './DealStatusHistorySchema';
|
||||
export type DealSchema = {
|
||||
id: number;
|
||||
name: string;
|
||||
@@ -12,5 +14,9 @@ export type DealSchema = {
|
||||
currentStatus: number;
|
||||
services: Array<DealServiceSchema>;
|
||||
products: Array<DealProductSchema>;
|
||||
statusHistory: Array<DealStatusHistorySchema>;
|
||||
isDeleted: boolean;
|
||||
isCompleted: boolean;
|
||||
client: ClientSchema;
|
||||
};
|
||||
|
||||
|
||||
13
src/client/models/DealStatusHistorySchema.ts
Normal file
13
src/client/models/DealStatusHistorySchema.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
/* generated using openapi-typescript-codegen -- do no edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type { UserSchema } from './UserSchema';
|
||||
export type DealStatusHistorySchema = {
|
||||
user: UserSchema;
|
||||
changedAt: string;
|
||||
fromStatus: number;
|
||||
toStatus: number;
|
||||
nextStatusDeadline: string;
|
||||
};
|
||||
|
||||
10
src/client/models/DealUpdateGeneralInfoRequest.ts
Normal file
10
src/client/models/DealUpdateGeneralInfoRequest.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
/* generated using openapi-typescript-codegen -- do no edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type { DealGeneralInfoSchema } from './DealGeneralInfoSchema';
|
||||
export type DealUpdateGeneralInfoRequest = {
|
||||
dealId: number;
|
||||
data: DealGeneralInfoSchema;
|
||||
};
|
||||
|
||||
9
src/client/models/DealUpdateGeneralInfoResponse.ts
Normal file
9
src/client/models/DealUpdateGeneralInfoResponse.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
/* generated using openapi-typescript-codegen -- do no edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
export type DealUpdateGeneralInfoResponse = {
|
||||
ok: boolean;
|
||||
message: string;
|
||||
};
|
||||
|
||||
10
src/client/models/DealUpdateProductQuantityRequest.ts
Normal file
10
src/client/models/DealUpdateProductQuantityRequest.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
/* generated using openapi-typescript-codegen -- do no edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
export type DealUpdateProductQuantityRequest = {
|
||||
dealId: number;
|
||||
productId: number;
|
||||
quantity: number;
|
||||
};
|
||||
|
||||
9
src/client/models/DealUpdateProductQuantityResponse.ts
Normal file
9
src/client/models/DealUpdateProductQuantityResponse.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
/* generated using openapi-typescript-codegen -- do no edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
export type DealUpdateProductQuantityResponse = {
|
||||
ok: boolean;
|
||||
message: string;
|
||||
};
|
||||
|
||||
9
src/client/models/ProductAddBarcodeRequest.ts
Normal file
9
src/client/models/ProductAddBarcodeRequest.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
/* generated using openapi-typescript-codegen -- do no edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
export type ProductAddBarcodeRequest = {
|
||||
productId: number;
|
||||
barcode: string;
|
||||
};
|
||||
|
||||
9
src/client/models/ProductAddBarcodeResponse.ts
Normal file
9
src/client/models/ProductAddBarcodeResponse.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
/* generated using openapi-typescript-codegen -- do no edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
export type ProductAddBarcodeResponse = {
|
||||
ok: boolean;
|
||||
message: string;
|
||||
};
|
||||
|
||||
8
src/client/models/ProductExistsBarcodeResponse.ts
Normal file
8
src/client/models/ProductExistsBarcodeResponse.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
/* generated using openapi-typescript-codegen -- do no edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
export type ProductExistsBarcodeResponse = {
|
||||
exists: boolean;
|
||||
};
|
||||
|
||||
8
src/client/models/ProductGenerateBarcodeRequest.ts
Normal file
8
src/client/models/ProductGenerateBarcodeRequest.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
/* generated using openapi-typescript-codegen -- do no edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
export type ProductGenerateBarcodeRequest = {
|
||||
productId: number;
|
||||
};
|
||||
|
||||
10
src/client/models/ProductGenerateBarcodeResponse.ts
Normal file
10
src/client/models/ProductGenerateBarcodeResponse.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
/* generated using openapi-typescript-codegen -- do no edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
export type ProductGenerateBarcodeResponse = {
|
||||
ok: boolean;
|
||||
message: string;
|
||||
barcode: string;
|
||||
};
|
||||
|
||||
11
src/client/models/UserSchema.ts
Normal file
11
src/client/models/UserSchema.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
/* generated using openapi-typescript-codegen -- do no edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
export type UserSchema = {
|
||||
id: number;
|
||||
telegramId: number;
|
||||
phoneNumber?: (string | null);
|
||||
isAdmin: boolean;
|
||||
};
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type { DealAddProductRequest } from '../models/DealAddProductRequest';
|
||||
import type { DealAddProductResponse } from '../models/DealAddProductResponse';
|
||||
import type { DealAddServiceRequest } from '../models/DealAddServiceRequest';
|
||||
import type { DealAddServiceResponse } from '../models/DealAddServiceResponse';
|
||||
import type { DealAddServicesRequest } from '../models/DealAddServicesRequest';
|
||||
@@ -9,6 +11,10 @@ import type { DealAddServicesResponse } from '../models/DealAddServicesResponse'
|
||||
import type { DealChangeStatusRequest } from '../models/DealChangeStatusRequest';
|
||||
import type { DealChangeStatusResponse } from '../models/DealChangeStatusResponse';
|
||||
import type { DealCreateRequest } from '../models/DealCreateRequest';
|
||||
import type { DealDeleteProductRequest } from '../models/DealDeleteProductRequest';
|
||||
import type { DealDeleteProductResponse } from '../models/DealDeleteProductResponse';
|
||||
import type { DealDeleteProductsRequest } from '../models/DealDeleteProductsRequest';
|
||||
import type { DealDeleteProductsResponse } from '../models/DealDeleteProductsResponse';
|
||||
import type { DealDeleteServiceRequest } from '../models/DealDeleteServiceRequest';
|
||||
import type { DealDeleteServiceResponse } from '../models/DealDeleteServiceResponse';
|
||||
import type { DealDeleteServicesRequest } from '../models/DealDeleteServicesRequest';
|
||||
@@ -18,6 +24,10 @@ import type { DealQuickCreateRequest } from '../models/DealQuickCreateRequest';
|
||||
import type { DealQuickCreateResponse } from '../models/DealQuickCreateResponse';
|
||||
import type { DealSchema } from '../models/DealSchema';
|
||||
import type { DealSummaryResponse } from '../models/DealSummaryResponse';
|
||||
import type { DealUpdateGeneralInfoRequest } from '../models/DealUpdateGeneralInfoRequest';
|
||||
import type { DealUpdateGeneralInfoResponse } from '../models/DealUpdateGeneralInfoResponse';
|
||||
import type { DealUpdateProductQuantityRequest } from '../models/DealUpdateProductQuantityRequest';
|
||||
import type { DealUpdateProductQuantityResponse } from '../models/DealUpdateProductQuantityResponse';
|
||||
import type { DealUpdateServiceQuantityRequest } from '../models/DealUpdateServiceQuantityRequest';
|
||||
import type { DealUpdateServiceQuantityResponse } from '../models/DealUpdateServiceQuantityResponse';
|
||||
import type { CancelablePromise } from '../core/CancelablePromise';
|
||||
@@ -95,6 +105,58 @@ export class DealService {
|
||||
url: '/deal/summaries',
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Get All
|
||||
* @returns DealGetAllResponse Successful Response
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static getAllDeals(): CancelablePromise<DealGetAllResponse> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'GET',
|
||||
url: '/deal/get-all',
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Get Deal By Id
|
||||
* @returns DealSchema Successful Response
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static getDealById({
|
||||
dealId,
|
||||
}: {
|
||||
dealId: number,
|
||||
}): CancelablePromise<DealSchema> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'GET',
|
||||
url: '/deal/get/{deal_id}',
|
||||
path: {
|
||||
'deal_id': dealId,
|
||||
},
|
||||
errors: {
|
||||
422: `Validation Error`,
|
||||
},
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Update General Info
|
||||
* @returns DealUpdateGeneralInfoResponse Successful Response
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static updateDealGeneralInfo({
|
||||
requestBody,
|
||||
}: {
|
||||
requestBody: DealUpdateGeneralInfoRequest,
|
||||
}): CancelablePromise<DealUpdateGeneralInfoResponse> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'POST',
|
||||
url: '/deal/update-general-info',
|
||||
body: requestBody,
|
||||
mediaType: 'application/json',
|
||||
errors: {
|
||||
422: `Validation Error`,
|
||||
},
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Services Add
|
||||
* @returns DealAddServicesResponse Successful Response
|
||||
@@ -196,32 +258,80 @@ export class DealService {
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Get All
|
||||
* @returns DealGetAllResponse Successful Response
|
||||
* Products Update
|
||||
* @returns DealUpdateProductQuantityResponse Successful Response
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static getAllDeals(): CancelablePromise<DealGetAllResponse> {
|
||||
public static updateDealProductQuantity({
|
||||
requestBody,
|
||||
}: {
|
||||
requestBody: DealUpdateProductQuantityRequest,
|
||||
}): CancelablePromise<DealUpdateProductQuantityResponse> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'GET',
|
||||
url: '/deal/get-all',
|
||||
method: 'POST',
|
||||
url: '/deal/products/update-quantity',
|
||||
body: requestBody,
|
||||
mediaType: 'application/json',
|
||||
errors: {
|
||||
422: `Validation Error`,
|
||||
},
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Get Deal By Id
|
||||
* @returns DealSchema Successful Response
|
||||
* Products Add
|
||||
* @returns DealAddProductResponse Successful Response
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static getDealById({
|
||||
dealId,
|
||||
public static addDealProduct({
|
||||
requestBody,
|
||||
}: {
|
||||
dealId: number,
|
||||
}): CancelablePromise<DealSchema> {
|
||||
requestBody: DealAddProductRequest,
|
||||
}): CancelablePromise<DealAddProductResponse> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'GET',
|
||||
url: '/deal/get/{deal_id}',
|
||||
path: {
|
||||
'deal_id': dealId,
|
||||
method: 'POST',
|
||||
url: '/deal/products/add',
|
||||
body: requestBody,
|
||||
mediaType: 'application/json',
|
||||
errors: {
|
||||
422: `Validation Error`,
|
||||
},
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Products Delete
|
||||
* @returns DealDeleteProductResponse Successful Response
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static deleteDealProduct({
|
||||
requestBody,
|
||||
}: {
|
||||
requestBody: DealDeleteProductRequest,
|
||||
}): CancelablePromise<DealDeleteProductResponse> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'POST',
|
||||
url: '/deal/products/delete',
|
||||
body: requestBody,
|
||||
mediaType: 'application/json',
|
||||
errors: {
|
||||
422: `Validation Error`,
|
||||
},
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Products Delete
|
||||
* @returns DealDeleteProductsResponse Successful Response
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static deleteMultipleDealProducts({
|
||||
requestBody,
|
||||
}: {
|
||||
requestBody: DealDeleteProductsRequest,
|
||||
}): CancelablePromise<DealDeleteProductsResponse> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'POST',
|
||||
url: '/deal/products/delete/multiple',
|
||||
body: requestBody,
|
||||
mediaType: 'application/json',
|
||||
errors: {
|
||||
422: `Validation Error`,
|
||||
},
|
||||
|
||||
@@ -2,11 +2,17 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type { ProductAddBarcodeRequest } from '../models/ProductAddBarcodeRequest';
|
||||
import type { ProductAddBarcodeResponse } from '../models/ProductAddBarcodeResponse';
|
||||
import type { ProductCreateRequest } from '../models/ProductCreateRequest';
|
||||
import type { ProductCreateResponse } from '../models/ProductCreateResponse';
|
||||
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 { ProductGetResponse } from '../models/ProductGetResponse';
|
||||
import type { ProductSchema } from '../models/ProductSchema';
|
||||
import type { ProductUpdateRequest } from '../models/ProductUpdateRequest';
|
||||
import type { ProductUpdateResponse } from '../models/ProductUpdateResponse';
|
||||
import type { CancelablePromise } from '../core/CancelablePromise';
|
||||
@@ -100,4 +106,89 @@ export class ProductService {
|
||||
},
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Get Product By Id
|
||||
* @returns ProductSchema Successful Response
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static getProductById({
|
||||
productId,
|
||||
}: {
|
||||
productId: number,
|
||||
}): CancelablePromise<ProductSchema> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'GET',
|
||||
url: '/product/get-by-id',
|
||||
query: {
|
||||
'product_id': productId,
|
||||
},
|
||||
errors: {
|
||||
422: `Validation Error`,
|
||||
},
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Add Product Barcode
|
||||
* @returns ProductAddBarcodeResponse Successful Response
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static addProductBarcode({
|
||||
requestBody,
|
||||
}: {
|
||||
requestBody: ProductAddBarcodeRequest,
|
||||
}): CancelablePromise<ProductAddBarcodeResponse> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'POST',
|
||||
url: '/product/barcode/add',
|
||||
body: requestBody,
|
||||
mediaType: 'application/json',
|
||||
errors: {
|
||||
422: `Validation Error`,
|
||||
},
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Exists Product Barcode
|
||||
* @returns ProductExistsBarcodeResponse Successful Response
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static existsProductBarcode({
|
||||
productId,
|
||||
barcode,
|
||||
}: {
|
||||
productId: number,
|
||||
barcode: string,
|
||||
}): CancelablePromise<ProductExistsBarcodeResponse> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'GET',
|
||||
url: '/product/barcode/exists',
|
||||
query: {
|
||||
'product_id': productId,
|
||||
'barcode': barcode,
|
||||
},
|
||||
errors: {
|
||||
422: `Validation Error`,
|
||||
},
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Generate Product Barcode
|
||||
* @returns ProductGenerateBarcodeResponse Successful Response
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static generateProductBarcode({
|
||||
requestBody,
|
||||
}: {
|
||||
requestBody: ProductGenerateBarcodeRequest,
|
||||
}): CancelablePromise<ProductGenerateBarcodeResponse> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'POST',
|
||||
url: '/product/barcode/generate',
|
||||
body: requestBody,
|
||||
mediaType: 'application/json',
|
||||
errors: {
|
||||
422: `Validation Error`,
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user