Сервисы обновлены

This commit is contained in:
Александр Сироткин 2021-12-13 10:19:07 +05:00
parent c6d3814313
commit 494fd8128c
11 changed files with 72 additions and 50 deletions

View File

@ -20,6 +20,7 @@ export type { FilePublishInfoDto } from './models/FilePublishInfoDto';
export type { MeasureDto } from './models/MeasureDto'; export type { MeasureDto } from './models/MeasureDto';
export type { MessageDto } from './models/MessageDto'; export type { MessageDto } from './models/MessageDto';
export type { MessageDtoPaginationContainer } from './models/MessageDtoPaginationContainer'; export type { MessageDtoPaginationContainer } from './models/MessageDtoPaginationContainer';
export type { PermissionBaseDto } from './models/PermissionBaseDto';
export type { PermissionDto } from './models/PermissionDto'; export type { PermissionDto } from './models/PermissionDto';
export type { PermissionInfoDto } from './models/PermissionInfoDto'; export type { PermissionInfoDto } from './models/PermissionInfoDto';
export type { SetpointInfoDto } from './models/SetpointInfoDto'; export type { SetpointInfoDto } from './models/SetpointInfoDto';
@ -40,6 +41,8 @@ export type { TelemetryOperationDurationDto } from './models/TelemetryOperationD
export type { TelemetryTimeZoneDto } from './models/TelemetryTimeZoneDto'; export type { TelemetryTimeZoneDto } from './models/TelemetryTimeZoneDto';
export type { TelemetryUserDto } from './models/TelemetryUserDto'; export type { TelemetryUserDto } from './models/TelemetryUserDto';
export type { UserDto } from './models/UserDto'; export type { UserDto } from './models/UserDto';
export type { UserExtendedDto } from './models/UserExtendedDto';
export type { UserRegistrationDto } from './models/UserRegistrationDto';
export type { UserRoleDto } from './models/UserRoleDto'; export type { UserRoleDto } from './models/UserRoleDto';
export type { UserTokenDto } from './models/UserTokenDto'; export type { UserTokenDto } from './models/UserTokenDto';
export type { WellCompositeDto } from './models/WellCompositeDto'; export type { WellCompositeDto } from './models/WellCompositeDto';

View File

@ -0,0 +1,9 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type PermissionBaseDto = {
idPermissionInfo?: number;
permissionName?: string | null;
value?: number;
}

View File

@ -3,7 +3,8 @@
/* eslint-disable */ /* eslint-disable */
export type PermissionDto = { export type PermissionDto = {
idPermissionInfo?: number;
permissionName?: string | null;
value?: number;
idUserRole?: number; idUserRole?: number;
idPermission?: number;
permissionValue?: number;
} }

View File

@ -5,6 +5,7 @@
import type { CompanyDto } from './CompanyDto'; import type { CompanyDto } from './CompanyDto';
export type UserDto = { export type UserDto = {
id?: number;
login?: string | null; login?: string | null;
name?: string | null; name?: string | null;
surname?: string | null; surname?: string | null;
@ -12,8 +13,6 @@ export type UserDto = {
email?: string | null; email?: string | null;
phone?: string | null; phone?: string | null;
position?: string | null; position?: string | null;
id?: number;
idCompany?: number | null; idCompany?: number | null;
password?: string | null;
company?: CompanyDto; company?: CompanyDto;
} }

View File

@ -0,0 +1,19 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { CompanyDto } from './CompanyDto';
export type UserExtendedDto = {
id?: number;
login?: string | null;
name?: string | null;
surname?: string | null;
patronymic?: string | null;
email?: string | null;
phone?: string | null;
position?: string | null;
idCompany?: number | null;
company?: CompanyDto;
roleNames?: Array<string> | null;
}

View File

@ -0,0 +1,19 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { CompanyDto } from './CompanyDto';
export type UserRegistrationDto = {
id?: number;
login?: string | null;
name?: string | null;
surname?: string | null;
patronymic?: string | null;
email?: string | null;
phone?: string | null;
position?: string | null;
idCompany?: number | null;
company?: CompanyDto;
password?: string | null;
}

View File

@ -2,12 +2,12 @@
/* tslint:disable */ /* tslint:disable */
/* eslint-disable */ /* eslint-disable */
import type { PermissionDto } from './PermissionDto'; import type { PermissionBaseDto } from './PermissionBaseDto';
export type UserRoleDto = { export type UserRoleDto = {
id?: number; id?: number;
caption?: string | null; caption?: string | null;
idParent?: number | null; idParent?: number | null;
idType?: number; idType?: number;
permissions?: Array<PermissionDto> | null; permissions?: Array<PermissionBaseDto> | null;
} }

View File

@ -2,7 +2,11 @@
/* tslint:disable */ /* tslint:disable */
/* eslint-disable */ /* eslint-disable */
import type { CompanyDto } from './CompanyDto';
import type { PermissionBaseDto } from './PermissionBaseDto';
export type UserTokenDto = { export type UserTokenDto = {
id?: number;
login?: string | null; login?: string | null;
name?: string | null; name?: string | null;
surname?: string | null; surname?: string | null;
@ -10,9 +14,9 @@ export type UserTokenDto = {
email?: string | null; email?: string | null;
phone?: string | null; phone?: string | null;
position?: string | null; position?: string | null;
id?: number; idCompany?: number | null;
companyName?: string | null; company?: CompanyDto;
roleNames?: Array<string> | null; roleNames?: Array<string> | null;
permissions?: Record<string, number> | null; permissions?: Array<PermissionBaseDto> | null;
token?: string | null; token?: string | null;
} }

View File

@ -1,17 +1,17 @@
/* istanbul ignore file */ /* istanbul ignore file */
/* tslint:disable */ /* tslint:disable */
/* eslint-disable */ /* eslint-disable */
import type { UserDto } from '../models/UserDto'; import type { UserExtendedDto } from '../models/UserExtendedDto';
import { request as __request } from '../core/request'; import { request as __request } from '../core/request';
export class AdminUserService { export class AdminUserService {
/** /**
* Получить все записи * Получить все записи
* @returns UserDto Success * @returns UserExtendedDto Success
* @throws ApiError * @throws ApiError
*/ */
public static async getAll(): Promise<Array<UserDto>> { public static async getAll(): Promise<Array<UserExtendedDto>> {
const result = await __request({ const result = await __request({
method: 'GET', method: 'GET',
path: `/api/admin/user/all`, path: `/api/admin/user/all`,
@ -22,12 +22,12 @@ export class AdminUserService {
/** /**
* Получить одну запись по Id * Получить одну запись по Id
* @param id id записи * @param id id записи
* @returns UserDto Success * @returns UserExtendedDto Success
* @throws ApiError * @throws ApiError
*/ */
public static async get( public static async get(
id: number, id: number,
): Promise<UserDto> { ): Promise<UserExtendedDto> {
const result = await __request({ const result = await __request({
method: 'GET', method: 'GET',
path: `/api/admin/user/${id}`, path: `/api/admin/user/${id}`,
@ -44,7 +44,7 @@ export class AdminUserService {
*/ */
public static async put( public static async put(
id: number, id: number,
requestBody?: UserDto, requestBody?: UserExtendedDto,
): Promise<number> { ): Promise<number> {
const result = await __request({ const result = await __request({
method: 'PUT', method: 'PUT',
@ -77,7 +77,7 @@ export class AdminUserService {
* @throws ApiError * @throws ApiError
*/ */
public static async insert( public static async insert(
requestBody?: UserDto, requestBody?: UserExtendedDto,
): Promise<number> { ): Promise<number> {
const result = await __request({ const result = await __request({
method: 'POST', method: 'POST',

View File

@ -2,7 +2,7 @@
/* tslint:disable */ /* tslint:disable */
/* eslint-disable */ /* eslint-disable */
import type { AuthDto } from '../models/AuthDto'; import type { AuthDto } from '../models/AuthDto';
import type { UserDto } from '../models/UserDto'; import type { UserRegistrationDto } from '../models/UserRegistrationDto';
import type { UserTokenDto } from '../models/UserTokenDto'; import type { UserTokenDto } from '../models/UserTokenDto';
import { request as __request } from '../core/request'; import { request as __request } from '../core/request';
@ -48,7 +48,7 @@ export class AuthService {
* @throws ApiError * @throws ApiError
*/ */
public static async register( public static async register(
requestBody?: UserDto, requestBody?: UserRegistrationDto,
): Promise<any> { ): Promise<any> {
const result = await __request({ const result = await __request({
method: 'POST', method: 'POST',

View File

@ -52,38 +52,6 @@ export class ReportService {
return result.body; return result.body;
} }
/**
* @deprecated
* Возвращает имена отчетов, хранящихся на диске,
* которые подходят под указанные параметры
* @param idWell id скважины
* @param stepSeconds шаг интервала
* @param format формат отчета (0-PDF, 1-LAS)
* @param begin дата начала интервала
* @param end дата окончания интервала
* @returns string Success
* @throws ApiError
*/
public static async getSuitableReportsNames(
idWell: number,
stepSeconds?: number,
format?: number,
begin?: string,
end?: string,
): Promise<Array<string>> {
const result = await __request({
method: 'GET',
path: `/api/well/${idWell}/report/suitableReports`,
query: {
'stepSeconds': stepSeconds,
'format': format,
'begin': begin,
'end': end,
},
});
return result.body;
}
/** /**
* Возвращает прогнозируемое количество страниц будущего отчета * Возвращает прогнозируемое количество страниц будущего отчета
* @param idWell id скважины * @param idWell id скважины