Api methods and Dtos update

This commit is contained in:
KharchenkoVV 2021-09-10 15:24:55 +05:00
parent be6072e641
commit 700dbe2154
15 changed files with 783 additions and 2 deletions

View File

@ -21,6 +21,7 @@ export type { StatOperationsDto } from './models/StatOperationsDto';
export type { StatOperationsDtoPlanFactBase } from './models/StatOperationsDtoPlanFactBase';
export type { StatSectionDto } from './models/StatSectionDto';
export type { StatWellDto } from './models/StatWellDto';
export type { TelemetryDto } from './models/TelemetryDto';
export type { TelemetryInfoDto } from './models/TelemetryInfoDto';
export type { TelemetryMessageDto } from './models/TelemetryMessageDto';
export type { TelemetryOperationDto } from './models/TelemetryOperationDto';
@ -28,6 +29,7 @@ export type { TelemetryOperationDtoPaginationContainer } from './models/Telemetr
export type { TelemetryOperationDurationDto } from './models/TelemetryOperationDurationDto';
export type { TelemetryUserDto } from './models/TelemetryUserDto';
export type { UserDto } from './models/UserDto';
export type { UserRoleDto } from './models/UserRoleDto';
export type { UserTokenDto } from './models/UserTokenDto';
export type { WellDepthToDayDto } from './models/WellDepthToDayDto';
export type { WellDepthToIntervalDto } from './models/WellDepthToIntervalDto';
@ -37,6 +39,13 @@ export type { WellOperationDto } from './models/WellOperationDto';
export type { WellOperationDtoPaginationContainer } from './models/WellOperationDtoPaginationContainer';
export type { WellOperationDtoPlanFactPredictBase } from './models/WellOperationDtoPlanFactPredictBase';
export { AdminClusterService } from './services/AdminClusterService';
export { AdminCompanyService } from './services/AdminCompanyService';
export { AdminDepositService } from './services/AdminDepositService';
export { AdminTelemetryService } from './services/AdminTelemetryService';
export { AdminUserRoleService } from './services/AdminUserRoleService';
export { AdminUserService } from './services/AdminUserService';
export { AdminWellService } from './services/AdminWellService';
export { AuthService } from './services/AuthService';
export { ClusterService } from './services/ClusterService';
export { DataService } from './services/DataService';

View File

@ -0,0 +1,11 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { TelemetryInfoDto } from './TelemetryInfoDto';
export type TelemetryDto = {
id?: number;
remoteUid?: string | null;
info?: TelemetryInfoDto;
}

View File

@ -0,0 +1,11 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { UserDto } from './UserDto';
export type UserRoleDto = {
id?: number;
caption?: string | null;
users?: Array<UserDto> | null;
}

View File

@ -2,6 +2,8 @@
/* tslint:disable */
/* eslint-disable */
import type { TelemetryDto } from './TelemetryDto';
export type WellDto = {
caption?: string | null;
cluster?: string | null;
@ -10,4 +12,5 @@ export type WellDto = {
latitude?: number | null;
longitude?: number | null;
wellType?: string | null;
telemetry?: TelemetryDto;
}

View File

@ -0,0 +1,99 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { ClusterDto } from '../models/ClusterDto';
import { request as __request } from '../core/request';
export class AdminClusterService {
/**
* Получить страницу с записями в PaginationContainer
* @param skip пропустить skip записей
* @param take получить take записей
* @returns any Success
* @throws ApiError
*/
public static async getPage(
skip: number,
take: number = 32,
): Promise<any> {
const result = await __request({
method: 'GET',
path: `/api/admin/cluster`,
query: {
'skip': skip,
'take': take,
},
});
return result.body;
}
/**
* Добавить запись
* @param requestBody запись
* @returns any Success
* @throws ApiError
*/
public static async insert(
requestBody?: ClusterDto,
): Promise<any> {
const result = await __request({
method: 'POST',
path: `/api/admin/cluster`,
body: requestBody,
});
return result.body;
}
/**
* Получить одну запись по Id
* @param id id записи
* @returns any Success
* @throws ApiError
*/
public static async get(
id: number,
): Promise<any> {
const result = await __request({
method: 'GET',
path: `/api/admin/cluster/${id}`,
});
return result.body;
}
/**
* Редактировать запись по id
* @param id id записи
* @param requestBody запись
* @returns any Success
* @throws ApiError
*/
public static async put(
id: number,
requestBody?: ClusterDto,
): Promise<any> {
const result = await __request({
method: 'PUT',
path: `/api/admin/cluster/${id}`,
body: requestBody,
});
return result.body;
}
/**
* Удалить запись по id
* @param id id записи
* @returns any Success
* @throws ApiError
*/
public static async delete(
id: number,
): Promise<any> {
const result = await __request({
method: 'DELETE',
path: `/api/admin/cluster/${id}`,
});
return result.body;
}
}

View File

@ -0,0 +1,99 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { CompanyDto } from '../models/CompanyDto';
import { request as __request } from '../core/request';
export class AdminCompanyService {
/**
* Получить страницу с записями в PaginationContainer
* @param skip пропустить skip записей
* @param take получить take записей
* @returns any Success
* @throws ApiError
*/
public static async getPage(
skip: number,
take: number = 32,
): Promise<any> {
const result = await __request({
method: 'GET',
path: `/api/admin/company`,
query: {
'skip': skip,
'take': take,
},
});
return result.body;
}
/**
* Добавить запись
* @param requestBody запись
* @returns any Success
* @throws ApiError
*/
public static async insert(
requestBody?: CompanyDto,
): Promise<any> {
const result = await __request({
method: 'POST',
path: `/api/admin/company`,
body: requestBody,
});
return result.body;
}
/**
* Получить одну запись по Id
* @param id id записи
* @returns any Success
* @throws ApiError
*/
public static async get(
id: number,
): Promise<any> {
const result = await __request({
method: 'GET',
path: `/api/admin/company/${id}`,
});
return result.body;
}
/**
* Редактировать запись по id
* @param id id записи
* @param requestBody запись
* @returns any Success
* @throws ApiError
*/
public static async put(
id: number,
requestBody?: CompanyDto,
): Promise<any> {
const result = await __request({
method: 'PUT',
path: `/api/admin/company/${id}`,
body: requestBody,
});
return result.body;
}
/**
* Удалить запись по id
* @param id id записи
* @returns any Success
* @throws ApiError
*/
public static async delete(
id: number,
): Promise<any> {
const result = await __request({
method: 'DELETE',
path: `/api/admin/company/${id}`,
});
return result.body;
}
}

View File

@ -0,0 +1,99 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { DepositDto } from '../models/DepositDto';
import { request as __request } from '../core/request';
export class AdminDepositService {
/**
* Получить страницу с записями в PaginationContainer
* @param skip пропустить skip записей
* @param take получить take записей
* @returns any Success
* @throws ApiError
*/
public static async getPage(
skip: number,
take: number = 32,
): Promise<any> {
const result = await __request({
method: 'GET',
path: `/api/admin/deposit`,
query: {
'skip': skip,
'take': take,
},
});
return result.body;
}
/**
* Добавить запись
* @param requestBody запись
* @returns any Success
* @throws ApiError
*/
public static async insert(
requestBody?: DepositDto,
): Promise<any> {
const result = await __request({
method: 'POST',
path: `/api/admin/deposit`,
body: requestBody,
});
return result.body;
}
/**
* Получить одну запись по Id
* @param id id записи
* @returns any Success
* @throws ApiError
*/
public static async get(
id: number,
): Promise<any> {
const result = await __request({
method: 'GET',
path: `/api/admin/deposit/${id}`,
});
return result.body;
}
/**
* Редактировать запись по id
* @param id id записи
* @param requestBody запись
* @returns any Success
* @throws ApiError
*/
public static async put(
id: number,
requestBody?: DepositDto,
): Promise<any> {
const result = await __request({
method: 'PUT',
path: `/api/admin/deposit/${id}`,
body: requestBody,
});
return result.body;
}
/**
* Удалить запись по id
* @param id id записи
* @returns any Success
* @throws ApiError
*/
public static async delete(
id: number,
): Promise<any> {
const result = await __request({
method: 'DELETE',
path: `/api/admin/deposit/${id}`,
});
return result.body;
}
}

View File

@ -0,0 +1,99 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { TelemetryDto } from '../models/TelemetryDto';
import { request as __request } from '../core/request';
export class AdminTelemetryService {
/**
* Получить страницу с записями в PaginationContainer
* @param skip пропустить skip записей
* @param take получить take записей
* @returns any Success
* @throws ApiError
*/
public static async getPage(
skip: number,
take: number = 32,
): Promise<any> {
const result = await __request({
method: 'GET',
path: `/api/admin/telemetry`,
query: {
'skip': skip,
'take': take,
},
});
return result.body;
}
/**
* Добавить запись
* @param requestBody запись
* @returns any Success
* @throws ApiError
*/
public static async insert(
requestBody?: TelemetryDto,
): Promise<any> {
const result = await __request({
method: 'POST',
path: `/api/admin/telemetry`,
body: requestBody,
});
return result.body;
}
/**
* Получить одну запись по Id
* @param id id записи
* @returns any Success
* @throws ApiError
*/
public static async get(
id: number,
): Promise<any> {
const result = await __request({
method: 'GET',
path: `/api/admin/telemetry/${id}`,
});
return result.body;
}
/**
* Редактировать запись по id
* @param id id записи
* @param requestBody запись
* @returns any Success
* @throws ApiError
*/
public static async put(
id: number,
requestBody?: TelemetryDto,
): Promise<any> {
const result = await __request({
method: 'PUT',
path: `/api/admin/telemetry/${id}`,
body: requestBody,
});
return result.body;
}
/**
* Удалить запись по id
* @param id id записи
* @returns any Success
* @throws ApiError
*/
public static async delete(
id: number,
): Promise<any> {
const result = await __request({
method: 'DELETE',
path: `/api/admin/telemetry/${id}`,
});
return result.body;
}
}

View File

@ -0,0 +1,99 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { UserRoleDto } from '../models/UserRoleDto';
import { request as __request } from '../core/request';
export class AdminUserRoleService {
/**
* Получить страницу с записями в PaginationContainer
* @param skip пропустить skip записей
* @param take получить take записей
* @returns any Success
* @throws ApiError
*/
public static async getPage(
skip: number,
take: number = 32,
): Promise<any> {
const result = await __request({
method: 'GET',
path: `/api/admin/user/role`,
query: {
'skip': skip,
'take': take,
},
});
return result.body;
}
/**
* Добавить запись
* @param requestBody запись
* @returns any Success
* @throws ApiError
*/
public static async insert(
requestBody?: UserRoleDto,
): Promise<any> {
const result = await __request({
method: 'POST',
path: `/api/admin/user/role`,
body: requestBody,
});
return result.body;
}
/**
* Получить одну запись по Id
* @param id id записи
* @returns any Success
* @throws ApiError
*/
public static async get(
id: number,
): Promise<any> {
const result = await __request({
method: 'GET',
path: `/api/admin/user/role/${id}`,
});
return result.body;
}
/**
* Редактировать запись по id
* @param id id записи
* @param requestBody запись
* @returns any Success
* @throws ApiError
*/
public static async put(
id: number,
requestBody?: UserRoleDto,
): Promise<any> {
const result = await __request({
method: 'PUT',
path: `/api/admin/user/role/${id}`,
body: requestBody,
});
return result.body;
}
/**
* Удалить запись по id
* @param id id записи
* @returns any Success
* @throws ApiError
*/
public static async delete(
id: number,
): Promise<any> {
const result = await __request({
method: 'DELETE',
path: `/api/admin/user/role/${id}`,
});
return result.body;
}
}

View File

@ -0,0 +1,99 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { UserDto } from '../models/UserDto';
import { request as __request } from '../core/request';
export class AdminUserService {
/**
* Получить страницу с записями в PaginationContainer
* @param skip пропустить skip записей
* @param take получить take записей
* @returns any Success
* @throws ApiError
*/
public static async getPage(
skip: number,
take: number = 32,
): Promise<any> {
const result = await __request({
method: 'GET',
path: `/api/admin/user`,
query: {
'skip': skip,
'take': take,
},
});
return result.body;
}
/**
* Добавить запись
* @param requestBody запись
* @returns any Success
* @throws ApiError
*/
public static async insert(
requestBody?: UserDto,
): Promise<any> {
const result = await __request({
method: 'POST',
path: `/api/admin/user`,
body: requestBody,
});
return result.body;
}
/**
* Получить одну запись по Id
* @param id id записи
* @returns any Success
* @throws ApiError
*/
public static async get(
id: number,
): Promise<any> {
const result = await __request({
method: 'GET',
path: `/api/admin/user/${id}`,
});
return result.body;
}
/**
* Редактировать запись по id
* @param id id записи
* @param requestBody запись
* @returns any Success
* @throws ApiError
*/
public static async put(
id: number,
requestBody?: UserDto,
): Promise<any> {
const result = await __request({
method: 'PUT',
path: `/api/admin/user/${id}`,
body: requestBody,
});
return result.body;
}
/**
* Удалить запись по id
* @param id id записи
* @returns any Success
* @throws ApiError
*/
public static async delete(
id: number,
): Promise<any> {
const result = await __request({
method: 'DELETE',
path: `/api/admin/user/${id}`,
});
return result.body;
}
}

View File

@ -0,0 +1,99 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { WellDto } from '../models/WellDto';
import { request as __request } from '../core/request';
export class AdminWellService {
/**
* Получить страницу с записями в PaginationContainer
* @param skip пропустить skip записей
* @param take получить take записей
* @returns any Success
* @throws ApiError
*/
public static async getPage(
skip: number,
take: number = 32,
): Promise<any> {
const result = await __request({
method: 'GET',
path: `/api/admin/well`,
query: {
'skip': skip,
'take': take,
},
});
return result.body;
}
/**
* Добавить запись
* @param requestBody запись
* @returns any Success
* @throws ApiError
*/
public static async insert(
requestBody?: WellDto,
): Promise<any> {
const result = await __request({
method: 'POST',
path: `/api/admin/well`,
body: requestBody,
});
return result.body;
}
/**
* Получить одну запись по Id
* @param id id записи
* @returns any Success
* @throws ApiError
*/
public static async get(
id: number,
): Promise<any> {
const result = await __request({
method: 'GET',
path: `/api/admin/well/${id}`,
});
return result.body;
}
/**
* Редактировать запись по id
* @param id id записи
* @param requestBody запись
* @returns any Success
* @throws ApiError
*/
public static async put(
id: number,
requestBody?: WellDto,
): Promise<any> {
const result = await __request({
method: 'PUT',
path: `/api/admin/well/${id}`,
body: requestBody,
});
return result.body;
}
/**
* Удалить запись по id
* @param id id записи
* @returns any Success
* @throws ApiError
*/
public static async delete(
id: number,
): Promise<any> {
const result = await __request({
method: 'DELETE',
path: `/api/admin/well/${id}`,
});
return result.body;
}
}

View File

@ -2,6 +2,7 @@
/* tslint:disable */
/* eslint-disable */
import type { AuthDto } from '../models/AuthDto';
import type { UserDto } from '../models/UserDto';
import type { UserTokenDto } from '../models/UserTokenDto';
import { request as __request } from '../core/request';
@ -40,4 +41,40 @@ requestBody?: AuthDto,
return result.body;
}
/**
* Регистрация пользователя. Доступна администратору
* @param requestBody
* @returns any Success
* @throws ApiError
*/
public static async register(
requestBody?: UserDto,
): Promise<any> {
const result = await __request({
method: 'POST',
path: `/auth`,
body: requestBody,
});
return result.body;
}
/**
* Смена пароля пользователя. Доступна пользователю и администратору
* @param idUser
* @param requestBody
* @returns any Success
* @throws ApiError
*/
public static async changePassword(
idUser: number,
requestBody?: string,
): Promise<any> {
const result = await __request({
method: 'PUT',
path: `/auth/${idUser}/ChangePassword`,
body: requestBody,
});
return result.body;
}
}

View File

@ -51,7 +51,7 @@ companyName?: string,
fileName?: string,
begin?: string,
end?: string,
skip: number =0,
skip?: number,
take: number = 32,
): Promise<FileInfoDtoPaginationContainer> {
const result = await __request({

View File

@ -1,6 +1,7 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { DatesRangeDto } from '../models/DatesRangeDto';
import type { TelemetryOperationDtoPaginationContainer } from '../models/TelemetryOperationDtoPaginationContainer';
import type { TelemetryOperationDurationDto } from '../models/TelemetryOperationDurationDto';
import type { WellDepthToDayDto } from '../models/WellDepthToDayDto';
@ -130,4 +131,20 @@ workBeginSeconds?: number,
return result.body;
}
/**
* Возвращает даты первой и последней операций на скважине
* @param idWell id скважины
* @returns DatesRangeDto Success
* @throws ApiError
*/
public static async getOperationsDateRange(
idWell: number,
): Promise<DatesRangeDto> {
const result = await __request({
method: 'GET',
path: `/api/well/${idWell}/telemetryAnalytics/datesRange`,
});
return result.body;
}
}

View File

@ -48,7 +48,7 @@ begin?: string,
end?: string,
minDepth: number = -1.7976931348623157e+308,
maxDepth: number = 1.7976931348623157e+308,
skip: number =0,
skip?: number,
take: number = 32,
): Promise<WellOperationDtoPaginationContainer> {
const result = await __request({