This commit is contained in:
2024-04-24 01:21:02 +03:00
parent 862f3fa3c1
commit c4e106576e
13 changed files with 205 additions and 86 deletions

View File

@@ -45,6 +45,8 @@ 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 { DealSummaryReorderRequest } from './models/DealSummaryReorderRequest';
export type { DealSummaryReorderResponse } from './models/DealSummaryReorderResponse';
export type { DealSummaryResponse } from './models/DealSummaryResponse';
export type { DealUpdateGeneralInfoRequest } from './models/DealUpdateGeneralInfoRequest';
export type { DealUpdateGeneralInfoResponse } from './models/DealUpdateGeneralInfoResponse';

View File

@@ -5,7 +5,7 @@
export type ClientDetailsSchema = {
address?: (string | null);
phoneNumber?: (string | null);
inn?: (number | null);
inn?: (string | null);
email?: (string | null);
};

View File

@@ -6,5 +6,6 @@ export type DealGeneralInfoSchema = {
name: string;
isDeleted: boolean;
isCompleted: boolean;
comment: string;
};

View File

@@ -18,5 +18,6 @@ export type DealSchema = {
isDeleted: boolean;
isCompleted: boolean;
client: ClientSchema;
comment: string;
};

View File

@@ -9,5 +9,6 @@ export type DealSummary = {
changedAt: string;
status: number;
totalPrice: number;
rank: number;
};

View File

@@ -0,0 +1,12 @@
/* generated using openapi-typescript-codegen -- do no edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type DealSummaryReorderRequest = {
dealId: number;
newStatus: number;
rank: number;
nextStatusDeadline: string;
comment: string;
};

View File

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

View File

@@ -23,6 +23,8 @@ import type { DealGetAllResponse } from '../models/DealGetAllResponse';
import type { DealQuickCreateRequest } from '../models/DealQuickCreateRequest';
import type { DealQuickCreateResponse } from '../models/DealQuickCreateResponse';
import type { DealSchema } from '../models/DealSchema';
import type { DealSummaryReorderRequest } from '../models/DealSummaryReorderRequest';
import type { DealSummaryReorderResponse } from '../models/DealSummaryReorderResponse';
import type { DealSummaryResponse } from '../models/DealSummaryResponse';
import type { DealUpdateGeneralInfoRequest } from '../models/DealUpdateGeneralInfoRequest';
import type { DealUpdateGeneralInfoResponse } from '../models/DealUpdateGeneralInfoResponse';
@@ -105,6 +107,26 @@ export class DealService {
url: '/deal/summaries',
});
}
/**
* Reorder
* @returns DealSummaryReorderResponse Successful Response
* @throws ApiError
*/
public static reorderDealSummaries({
requestBody,
}: {
requestBody: DealSummaryReorderRequest,
}): CancelablePromise<DealSummaryReorderResponse> {
return __request(OpenAPI, {
method: 'POST',
url: '/deal/summaries/reorder',
body: requestBody,
mediaType: 'application/json',
errors: {
422: `Validation Error`,
},
});
}
/**
* Get All
* @returns DealGetAllResponse Successful Response