feat: create user
This commit is contained in:
@@ -43,6 +43,8 @@ export type { CreatePayRateRequest } from './models/CreatePayRateRequest';
|
||||
export type { CreatePayRateResponse } from './models/CreatePayRateResponse';
|
||||
export type { CreatePositionRequest } from './models/CreatePositionRequest';
|
||||
export type { CreatePositionResponse } from './models/CreatePositionResponse';
|
||||
export type { CreateUserRequest } from './models/CreateUserRequest';
|
||||
export type { CreateUserResponse } from './models/CreateUserResponse';
|
||||
export type { DealAddProductRequest } from './models/DealAddProductRequest';
|
||||
export type { DealAddProductResponse } from './models/DealAddProductResponse';
|
||||
export type { DealAddServiceRequest } from './models/DealAddServiceRequest';
|
||||
@@ -156,6 +158,7 @@ export type { UpdateTimeTrackingRecordRequest } from './models/UpdateTimeTrackin
|
||||
export type { UpdateTimeTrackingRecordResponse } from './models/UpdateTimeTrackingRecordResponse';
|
||||
export type { UpdateUserRequest } from './models/UpdateUserRequest';
|
||||
export type { UpdateUserResponse } from './models/UpdateUserResponse';
|
||||
export type { UserCreate } from './models/UserCreate';
|
||||
export type { UserSchema } from './models/UserSchema';
|
||||
export type { UserUpdate } from './models/UserUpdate';
|
||||
export type { ValidationError } from './models/ValidationError';
|
||||
|
||||
9
src/client/models/CreateUserRequest.ts
Normal file
9
src/client/models/CreateUserRequest.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type { UserCreate } from './UserCreate';
|
||||
export type CreateUserRequest = {
|
||||
data: UserCreate;
|
||||
};
|
||||
|
||||
9
src/client/models/CreateUserResponse.ts
Normal file
9
src/client/models/CreateUserResponse.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
export type CreateUserResponse = {
|
||||
ok: boolean;
|
||||
message: string;
|
||||
};
|
||||
|
||||
19
src/client/models/UserCreate.ts
Normal file
19
src/client/models/UserCreate.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type { PayRateSchema } from './PayRateSchema';
|
||||
export type UserCreate = {
|
||||
telegramId: number;
|
||||
phoneNumber?: (string | null);
|
||||
firstName: string;
|
||||
secondName: string;
|
||||
comment: string;
|
||||
isAdmin: boolean;
|
||||
isBlocked: boolean;
|
||||
isDeleted: boolean;
|
||||
roleKey: string;
|
||||
payRate?: (PayRateSchema | null);
|
||||
positionKey?: (string | null);
|
||||
};
|
||||
|
||||
@@ -6,7 +6,6 @@ import type { PayRateSchema } from './PayRateSchema';
|
||||
import type { PositionSchema } from './PositionSchema';
|
||||
import type { RoleSchema } from './RoleSchema';
|
||||
export type UserSchema = {
|
||||
id: number;
|
||||
telegramId: number;
|
||||
phoneNumber?: (string | null);
|
||||
firstName: string;
|
||||
@@ -17,6 +16,7 @@ export type UserSchema = {
|
||||
isDeleted: boolean;
|
||||
roleKey: string;
|
||||
payRate?: (PayRateSchema | null);
|
||||
id: number;
|
||||
role: RoleSchema;
|
||||
position?: (PositionSchema | null);
|
||||
};
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
/* eslint-disable */
|
||||
import type { PayRateSchema } from './PayRateSchema';
|
||||
export type UserUpdate = {
|
||||
id: number;
|
||||
telegramId: number;
|
||||
phoneNumber?: (string | null);
|
||||
firstName: string;
|
||||
@@ -15,6 +14,7 @@ export type UserUpdate = {
|
||||
isDeleted: boolean;
|
||||
roleKey: string;
|
||||
payRate?: (PayRateSchema | null);
|
||||
id: number;
|
||||
positionKey?: (string | null);
|
||||
};
|
||||
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type { CreateUserRequest } from '../models/CreateUserRequest';
|
||||
import type { CreateUserResponse } from '../models/CreateUserResponse';
|
||||
import type { GetAllUsersResponse } from '../models/GetAllUsersResponse';
|
||||
import type { UpdateUserRequest } from '../models/UpdateUserRequest';
|
||||
import type { UpdateUserResponse } from '../models/UpdateUserResponse';
|
||||
@@ -40,4 +42,24 @@ export class UserService {
|
||||
},
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Create
|
||||
* @returns CreateUserResponse Successful Response
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static createUser({
|
||||
requestBody,
|
||||
}: {
|
||||
requestBody: CreateUserRequest,
|
||||
}): CancelablePromise<CreateUserResponse> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'POST',
|
||||
url: '/user/create',
|
||||
body: requestBody,
|
||||
mediaType: 'application/json',
|
||||
errors: {
|
||||
422: `Validation Error`,
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user