This commit is contained in:
2024-04-10 03:46:06 +03:00
parent 6328ac877a
commit 4ce516307d
18 changed files with 435 additions and 22 deletions

View File

@@ -9,10 +9,16 @@ export type { OpenAPIConfig } from './core/OpenAPI';
export type { AuthLoginRequest } from './models/AuthLoginRequest';
export type { AuthLoginResponse } from './models/AuthLoginResponse';
export type { ClientCreateRequest } from './models/ClientCreateRequest';
export type { ClientCreateResponse } from './models/ClientCreateResponse';
export type { ClientDeleteRequest } from './models/ClientDeleteRequest';
export type { ClientDeleteResponse } from './models/ClientDeleteResponse';
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 { ClientUpdateRequest } from './models/ClientUpdateRequest';
export type { ClientUpdateResponse } from './models/ClientUpdateResponse';
export type { DealAddServicesRequest } from './models/DealAddServicesRequest';
export type { DealAddServicesResponse } from './models/DealAddServicesResponse';
export type { DealChangeStatusRequest } from './models/DealChangeStatusRequest';

View File

@@ -0,0 +1,9 @@
/* generated using openapi-typescript-codegen -- do no edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { ClientSchema } from './ClientSchema';
export type ClientCreateRequest = {
data: ClientSchema;
};

View File

@@ -0,0 +1,9 @@
/* generated using openapi-typescript-codegen -- do no edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type ClientCreateResponse = {
ok: boolean;
message: string;
};

View File

@@ -0,0 +1,8 @@
/* generated using openapi-typescript-codegen -- do no edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type ClientDeleteRequest = {
clientId: number;
};

View File

@@ -0,0 +1,9 @@
/* generated using openapi-typescript-codegen -- do no edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type ClientDeleteResponse = {
ok: boolean;
message: string;
};

View File

@@ -0,0 +1,9 @@
/* generated using openapi-typescript-codegen -- do no edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { ClientSchema } from './ClientSchema';
export type ClientUpdateRequest = {
data: ClientSchema;
};

View File

@@ -0,0 +1,9 @@
/* generated using openapi-typescript-codegen -- do no edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type ClientUpdateResponse = {
ok: boolean;
message: string;
};

View File

@@ -2,8 +2,14 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { ClientCreateRequest } from '../models/ClientCreateRequest';
import type { ClientCreateResponse } from '../models/ClientCreateResponse';
import type { ClientDeleteRequest } from '../models/ClientDeleteRequest';
import type { ClientDeleteResponse } from '../models/ClientDeleteResponse';
import type { ClientGetAllResponse } from '../models/ClientGetAllResponse';
import type { ClientUpdateDetailsRequest } from '../models/ClientUpdateDetailsRequest';
import type { ClientUpdateRequest } from '../models/ClientUpdateRequest';
import type { ClientUpdateResponse } from '../models/ClientUpdateResponse';
import type { CancelablePromise } from '../core/CancelablePromise';
import { OpenAPI } from '../core/OpenAPI';
import { request as __request } from '../core/request';
@@ -60,4 +66,64 @@ export class ClientService {
url: '/client/get-all',
});
}
/**
* Create Client
* @returns ClientCreateResponse Successful Response
* @throws ApiError
*/
public static createClient({
requestBody,
}: {
requestBody: ClientCreateRequest,
}): CancelablePromise<ClientCreateResponse> {
return __request(OpenAPI, {
method: 'POST',
url: '/client/create',
body: requestBody,
mediaType: 'application/json',
errors: {
422: `Validation Error`,
},
});
}
/**
* Update Client
* @returns ClientUpdateResponse Successful Response
* @throws ApiError
*/
public static updateClient({
requestBody,
}: {
requestBody: ClientUpdateRequest,
}): CancelablePromise<ClientUpdateResponse> {
return __request(OpenAPI, {
method: 'POST',
url: '/client/update',
body: requestBody,
mediaType: 'application/json',
errors: {
422: `Validation Error`,
},
});
}
/**
* Delete Client
* @returns ClientDeleteResponse Successful Response
* @throws ApiError
*/
public static deleteClient({
requestBody,
}: {
requestBody: ClientDeleteRequest,
}): CancelablePromise<ClientDeleteResponse> {
return __request(OpenAPI, {
method: 'POST',
url: '/client/delete',
body: requestBody,
mediaType: 'application/json',
errors: {
422: `Validation Error`,
},
});
}
}