crap
This commit is contained in:
@@ -13,14 +13,21 @@ export type { ClientDetailsSchema } from './models/ClientDetailsSchema';
|
||||
export type { ClientGetAllResponse } from './models/ClientGetAllResponse';
|
||||
export type { ClientSchema } from './models/ClientSchema';
|
||||
export type { ClientUpdateDetailsRequest } from './models/ClientUpdateDetailsRequest';
|
||||
export type { DealAddServicesRequest } from './models/DealAddServicesRequest';
|
||||
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 { DealQuickCreateRequest } from './models/DealQuickCreateRequest';
|
||||
export type { DealQuickCreateResponse } from './models/DealQuickCreateResponse';
|
||||
export type { DealServiceSchema } from './models/DealServiceSchema';
|
||||
export type { DealSummary } from './models/DealSummary';
|
||||
export type { DealSummaryResponse } from './models/DealSummaryResponse';
|
||||
export type { HTTPValidationError } from './models/HTTPValidationError';
|
||||
export type { ProductCreateRequest } from './models/ProductCreateRequest';
|
||||
export type { ProductCreateResponse } from './models/ProductCreateResponse';
|
||||
export type { ProductGetResponse } from './models/ProductGetResponse';
|
||||
export type { ProductSchema } from './models/ProductSchema';
|
||||
export type { ServiceCategorySchema } from './models/ServiceCategorySchema';
|
||||
export type { ServiceCreateCategoryRequest } from './models/ServiceCreateCategoryRequest';
|
||||
export type { ServiceCreateCategoryResponse } from './models/ServiceCreateCategoryResponse';
|
||||
@@ -34,4 +41,5 @@ export type { ValidationError } from './models/ValidationError';
|
||||
export { AuthService } from './services/AuthService';
|
||||
export { ClientService } from './services/ClientService';
|
||||
export { DealService } from './services/DealService';
|
||||
export { ProductService } from './services/ProductService';
|
||||
export { ServiceService } from './services/ServiceService';
|
||||
|
||||
10
src/client/models/DealAddServicesRequest.ts
Normal file
10
src/client/models/DealAddServicesRequest.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
/* generated using openapi-typescript-codegen -- do no edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type { DealServiceSchema } from './DealServiceSchema';
|
||||
export type DealAddServicesRequest = {
|
||||
deal_id: number;
|
||||
services: Array<DealServiceSchema>;
|
||||
};
|
||||
|
||||
9
src/client/models/DealAddServicesResponse.ts
Normal file
9
src/client/models/DealAddServicesResponse.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
/* generated using openapi-typescript-codegen -- do no edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
export type DealAddServicesResponse = {
|
||||
ok: boolean;
|
||||
message: string;
|
||||
};
|
||||
|
||||
9
src/client/models/DealServiceSchema.ts
Normal file
9
src/client/models/DealServiceSchema.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
/* generated using openapi-typescript-codegen -- do no edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
export type DealServiceSchema = {
|
||||
id: number;
|
||||
quantity: number;
|
||||
};
|
||||
|
||||
@@ -8,5 +8,6 @@ export type DealSummary = {
|
||||
client_name: string;
|
||||
changed_at: string;
|
||||
status: number;
|
||||
total_price: number;
|
||||
};
|
||||
|
||||
|
||||
10
src/client/models/ProductCreateRequest.ts
Normal file
10
src/client/models/ProductCreateRequest.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
/* generated using openapi-typescript-codegen -- do no edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
export type ProductCreateRequest = {
|
||||
name: string;
|
||||
article: string;
|
||||
client_id: number;
|
||||
};
|
||||
|
||||
8
src/client/models/ProductCreateResponse.ts
Normal file
8
src/client/models/ProductCreateResponse.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
/* generated using openapi-typescript-codegen -- do no edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
export type ProductCreateResponse = {
|
||||
product_id: number;
|
||||
};
|
||||
|
||||
9
src/client/models/ProductGetResponse.ts
Normal file
9
src/client/models/ProductGetResponse.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
/* generated using openapi-typescript-codegen -- do no edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type { ProductSchema } from './ProductSchema';
|
||||
export type ProductGetResponse = {
|
||||
products: Array<ProductSchema>;
|
||||
};
|
||||
|
||||
11
src/client/models/ProductSchema.ts
Normal file
11
src/client/models/ProductSchema.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
/* generated using openapi-typescript-codegen -- do no edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
export type ProductSchema = {
|
||||
id: number;
|
||||
name: string;
|
||||
article: string;
|
||||
client_id: number;
|
||||
};
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type { DealAddServicesRequest } from '../models/DealAddServicesRequest';
|
||||
import type { DealAddServicesResponse } from '../models/DealAddServicesResponse';
|
||||
import type { DealChangeStatusRequest } from '../models/DealChangeStatusRequest';
|
||||
import type { DealChangeStatusResponse } from '../models/DealChangeStatusResponse';
|
||||
import type { DealCreateRequest } from '../models/DealCreateRequest';
|
||||
@@ -83,4 +85,24 @@ export class DealService {
|
||||
url: '/deal/summaries',
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Services Add
|
||||
* @returns DealAddServicesResponse Successful Response
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static servicesAddDealServicesAddPost({
|
||||
requestBody,
|
||||
}: {
|
||||
requestBody: DealAddServicesRequest,
|
||||
}): CancelablePromise<DealAddServicesResponse> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'POST',
|
||||
url: '/deal/services/add',
|
||||
body: requestBody,
|
||||
mediaType: 'application/json',
|
||||
errors: {
|
||||
422: `Validation Error`,
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
59
src/client/services/ProductService.ts
Normal file
59
src/client/services/ProductService.ts
Normal file
@@ -0,0 +1,59 @@
|
||||
/* generated using openapi-typescript-codegen -- do no edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type { ProductCreateRequest } from '../models/ProductCreateRequest';
|
||||
import type { ProductCreateResponse } from '../models/ProductCreateResponse';
|
||||
import type { ProductGetResponse } from '../models/ProductGetResponse';
|
||||
import type { CancelablePromise } from '../core/CancelablePromise';
|
||||
import { OpenAPI } from '../core/OpenAPI';
|
||||
import { request as __request } from '../core/request';
|
||||
export class ProductService {
|
||||
/**
|
||||
* Create Product
|
||||
* @returns ProductCreateResponse Successful Response
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static createProductProductCreatePost({
|
||||
requestBody,
|
||||
}: {
|
||||
requestBody: ProductCreateRequest,
|
||||
}): CancelablePromise<ProductCreateResponse> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'POST',
|
||||
url: '/product/create',
|
||||
body: requestBody,
|
||||
mediaType: 'application/json',
|
||||
errors: {
|
||||
422: `Validation Error`,
|
||||
},
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Get Product
|
||||
* @returns ProductGetResponse Successful Response
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static getProductsByClientId({
|
||||
clientId,
|
||||
page,
|
||||
itemsPerPage,
|
||||
}: {
|
||||
clientId: number,
|
||||
page: number,
|
||||
itemsPerPage: number,
|
||||
}): CancelablePromise<ProductGetResponse> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'GET',
|
||||
url: '/product/get',
|
||||
query: {
|
||||
'client_id': clientId,
|
||||
'page': page,
|
||||
'items_per_page': itemsPerPage,
|
||||
},
|
||||
errors: {
|
||||
422: `Validation Error`,
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user