diff --git a/src/services/api/index.ts b/src/services/api/index.ts index 1e4e6e8..3b92c51 100644 --- a/src/services/api/index.ts +++ b/src/services/api/index.ts @@ -6,13 +6,10 @@ export { OpenAPI } from './core/OpenAPI'; export type { AuthDto } from './models/AuthDto'; export type { ClusterDto } from './models/ClusterDto'; -export type { ClusterDtoPaginationContainer } from './models/ClusterDtoPaginationContainer'; export type { ClusterRopStatDto } from './models/ClusterRopStatDto'; export type { CompanyDto } from './models/CompanyDto'; -export type { CompanyDtoPaginationContainer } from './models/CompanyDtoPaginationContainer'; export type { DatesRangeDto } from './models/DatesRangeDto'; export type { DepositDto } from './models/DepositDto'; -export type { DepositDtoPaginationContainer } from './models/DepositDtoPaginationContainer'; export type { DrillFlowChartDto } from './models/DrillFlowChartDto'; export type { DrillParamsDto } from './models/DrillParamsDto'; export type { EventDto } from './models/EventDto'; @@ -23,6 +20,8 @@ export type { FilePublishInfoDto } from './models/FilePublishInfoDto'; export type { MeasureDto } from './models/MeasureDto'; export type { MessageDto } from './models/MessageDto'; export type { MessageDtoPaginationContainer } from './models/MessageDtoPaginationContainer'; +export type { PermissionDto } from './models/PermissionDto'; +export type { PermissionInfoDto } from './models/PermissionInfoDto'; export type { SetpointInfoDto } from './models/SetpointInfoDto'; export type { SetpointsRequestDto } from './models/SetpointsRequestDto'; export type { StatClusterDto } from './models/StatClusterDto'; @@ -33,7 +32,6 @@ export type { StatWellDto } from './models/StatWellDto'; export type { TelemetryDataSaubDto } from './models/TelemetryDataSaubDto'; export type { TelemetryDataSpinDto } from './models/TelemetryDataSpinDto'; export type { TelemetryDto } from './models/TelemetryDto'; -export type { TelemetryDtoPaginationContainer } from './models/TelemetryDtoPaginationContainer'; export type { TelemetryInfoDto } from './models/TelemetryInfoDto'; export type { TelemetryMessageDto } from './models/TelemetryMessageDto'; export type { TelemetryOperationDto } from './models/TelemetryOperationDto'; @@ -42,15 +40,12 @@ export type { TelemetryOperationDurationDto } from './models/TelemetryOperationD export type { TelemetryTimeZoneDto } from './models/TelemetryTimeZoneDto'; export type { TelemetryUserDto } from './models/TelemetryUserDto'; export type { UserDto } from './models/UserDto'; -export type { UserDtoPaginationContainer } from './models/UserDtoPaginationContainer'; export type { UserRoleDto } from './models/UserRoleDto'; -export type { UserRoleDtoPaginationContainer } from './models/UserRoleDtoPaginationContainer'; export type { UserTokenDto } from './models/UserTokenDto'; export type { WellCompositeDto } from './models/WellCompositeDto'; export type { WellDepthToDayDto } from './models/WellDepthToDayDto'; export type { WellDepthToIntervalDto } from './models/WellDepthToIntervalDto'; export type { WellDto } from './models/WellDto'; -export type { WellDtoPaginationContainer } from './models/WellDtoPaginationContainer'; export type { WellOperationCategoryDto } from './models/WellOperationCategoryDto'; export type { WellOperationDto } from './models/WellOperationDto'; export type { WellOperationDtoPaginationContainer } from './models/WellOperationDtoPaginationContainer'; @@ -60,6 +55,8 @@ export type { WellParamsDto } from './models/WellParamsDto'; export { AdminClusterService } from './services/AdminClusterService'; export { AdminCompanyService } from './services/AdminCompanyService'; export { AdminDepositService } from './services/AdminDepositService'; +export { AdminPermissionInfoService } from './services/AdminPermissionInfoService'; +export { AdminPermissionService } from './services/AdminPermissionService'; export { AdminTelemetryService } from './services/AdminTelemetryService'; export { AdminUserRoleService } from './services/AdminUserRoleService'; export { AdminUserService } from './services/AdminUserService'; diff --git a/src/services/api/models/ClusterDto.ts b/src/services/api/models/ClusterDto.ts index 226f3a0..b802a01 100644 --- a/src/services/api/models/ClusterDto.ts +++ b/src/services/api/models/ClusterDto.ts @@ -7,7 +7,6 @@ import type { WellDto } from './WellDto'; export type ClusterDto = { id?: number; caption?: string | null; - description?: string | null; latitude?: number | null; longitude?: number | null; wells?: Array | null; diff --git a/src/services/api/models/ClusterDtoPaginationContainer.ts b/src/services/api/models/ClusterDtoPaginationContainer.ts deleted file mode 100644 index 5b6d4e3..0000000 --- a/src/services/api/models/ClusterDtoPaginationContainer.ts +++ /dev/null @@ -1,12 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { ClusterDto } from './ClusterDto'; - -export type ClusterDtoPaginationContainer = { - skip?: number; - take?: number; - count?: number; - items?: Array | null; -} diff --git a/src/services/api/models/CompanyDtoPaginationContainer.ts b/src/services/api/models/CompanyDtoPaginationContainer.ts deleted file mode 100644 index e3a7dcc..0000000 --- a/src/services/api/models/CompanyDtoPaginationContainer.ts +++ /dev/null @@ -1,12 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { CompanyDto } from './CompanyDto'; - -export type CompanyDtoPaginationContainer = { - skip?: number; - take?: number; - count?: number; - items?: Array | null; -} diff --git a/src/services/api/models/DepositDto.ts b/src/services/api/models/DepositDto.ts index c57ae4a..8b140b7 100644 --- a/src/services/api/models/DepositDto.ts +++ b/src/services/api/models/DepositDto.ts @@ -7,7 +7,6 @@ import type { ClusterDto } from './ClusterDto'; export type DepositDto = { id?: number; caption?: string | null; - description?: string | null; latitude?: number | null; longitude?: number | null; clusters?: Array | null; diff --git a/src/services/api/models/DepositDtoPaginationContainer.ts b/src/services/api/models/DepositDtoPaginationContainer.ts deleted file mode 100644 index 704269c..0000000 --- a/src/services/api/models/DepositDtoPaginationContainer.ts +++ /dev/null @@ -1,12 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { DepositDto } from './DepositDto'; - -export type DepositDtoPaginationContainer = { - skip?: number; - take?: number; - count?: number; - items?: Array | null; -} diff --git a/src/services/api/models/PermissionDto.ts b/src/services/api/models/PermissionDto.ts new file mode 100644 index 0000000..8e68b66 --- /dev/null +++ b/src/services/api/models/PermissionDto.ts @@ -0,0 +1,9 @@ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +export type PermissionDto = { + idUserRole?: number; + idPermission?: number; + permissionValue?: number; +} diff --git a/src/services/api/models/PermissionInfoDto.ts b/src/services/api/models/PermissionInfoDto.ts new file mode 100644 index 0000000..191d91c --- /dev/null +++ b/src/services/api/models/PermissionInfoDto.ts @@ -0,0 +1,10 @@ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +export type PermissionInfoDto = { + id?: number; + name?: string | null; + description?: string | null; + bitDescription?: Record | null; +} diff --git a/src/services/api/models/TelemetryDtoPaginationContainer.ts b/src/services/api/models/TelemetryDtoPaginationContainer.ts deleted file mode 100644 index ef7a641..0000000 --- a/src/services/api/models/TelemetryDtoPaginationContainer.ts +++ /dev/null @@ -1,12 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { TelemetryDto } from './TelemetryDto'; - -export type TelemetryDtoPaginationContainer = { - skip?: number; - take?: number; - count?: number; - items?: Array | null; -} diff --git a/src/services/api/models/UserDto.ts b/src/services/api/models/UserDto.ts index 748389f..627f214 100644 --- a/src/services/api/models/UserDto.ts +++ b/src/services/api/models/UserDto.ts @@ -6,7 +6,6 @@ import type { CompanyDto } from './CompanyDto'; export type UserDto = { login?: string | null; - level?: number | null; name?: string | null; surname?: string | null; patronymic?: string | null; @@ -15,7 +14,6 @@ export type UserDto = { position?: string | null; id?: number; idCompany?: number | null; - idRole?: number | null; password?: string | null; company?: CompanyDto; } diff --git a/src/services/api/models/UserDtoPaginationContainer.ts b/src/services/api/models/UserDtoPaginationContainer.ts deleted file mode 100644 index d1b285d..0000000 --- a/src/services/api/models/UserDtoPaginationContainer.ts +++ /dev/null @@ -1,12 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { UserDto } from './UserDto'; - -export type UserDtoPaginationContainer = { - skip?: number; - take?: number; - count?: number; - items?: Array | null; -} diff --git a/src/services/api/models/UserRoleDto.ts b/src/services/api/models/UserRoleDto.ts index c0810e1..7fb6dbb 100644 --- a/src/services/api/models/UserRoleDto.ts +++ b/src/services/api/models/UserRoleDto.ts @@ -2,10 +2,12 @@ /* tslint:disable */ /* eslint-disable */ -import type { UserDto } from './UserDto'; +import type { PermissionDto } from './PermissionDto'; export type UserRoleDto = { id?: number; caption?: string | null; - users?: Array | null; + idParent?: number | null; + idType?: number; + permissions?: Array | null; } diff --git a/src/services/api/models/UserRoleDtoPaginationContainer.ts b/src/services/api/models/UserRoleDtoPaginationContainer.ts deleted file mode 100644 index aa0e25a..0000000 --- a/src/services/api/models/UserRoleDtoPaginationContainer.ts +++ /dev/null @@ -1,12 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { UserRoleDto } from './UserRoleDto'; - -export type UserRoleDtoPaginationContainer = { - skip?: number; - take?: number; - count?: number; - items?: Array | null; -} diff --git a/src/services/api/models/UserTokenDto.ts b/src/services/api/models/UserTokenDto.ts index c7a5f92..2a0957d 100644 --- a/src/services/api/models/UserTokenDto.ts +++ b/src/services/api/models/UserTokenDto.ts @@ -4,7 +4,6 @@ export type UserTokenDto = { login?: string | null; - level?: number | null; name?: string | null; surname?: string | null; patronymic?: string | null; @@ -13,6 +12,7 @@ export type UserTokenDto = { position?: string | null; id?: number; companyName?: string | null; - roleName?: string | null; + roleNames?: Array | null; + permissions?: Record | null; token?: string | null; } diff --git a/src/services/api/models/WellDtoPaginationContainer.ts b/src/services/api/models/WellDtoPaginationContainer.ts deleted file mode 100644 index d0bec27..0000000 --- a/src/services/api/models/WellDtoPaginationContainer.ts +++ /dev/null @@ -1,12 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { WellDto } from './WellDto'; - -export type WellDtoPaginationContainer = { - skip?: number; - take?: number; - count?: number; - items?: Array | null; -} diff --git a/src/services/api/services/AdminClusterService.ts b/src/services/api/services/AdminClusterService.ts index f76b7bb..7bdd2c2 100644 --- a/src/services/api/services/AdminClusterService.ts +++ b/src/services/api/services/AdminClusterService.ts @@ -2,46 +2,19 @@ /* tslint:disable */ /* eslint-disable */ import type { ClusterDto } from '../models/ClusterDto'; -import type { ClusterDtoPaginationContainer } from '../models/ClusterDtoPaginationContainer'; import { request as __request } from '../core/request'; export class AdminClusterService { /** - * Получить страницу с записями в PaginationContainer - * @param skip пропустить skip записей - * @param take получить take записей - * @returns ClusterDtoPaginationContainer Success + * Получить все записи + * @returns ClusterDto Success * @throws ApiError */ - public static async getPage( - skip: number, - take: number = 32, - ): Promise { + public static async getAll(): Promise> { const result = await __request({ method: 'GET', - path: `/api/admin/cluster`, - query: { - 'skip': skip, - 'take': take, - }, - }); - return result.body; - } - - /** - * Добавить запись - * @param requestBody запись - * @returns number Success - * @throws ApiError - */ - public static async insert( - requestBody?: ClusterDto, - ): Promise { - const result = await __request({ - method: 'POST', - path: `/api/admin/cluster`, - body: requestBody, + path: `/api/admin/cluster/all`, }); return result.body; } @@ -97,4 +70,21 @@ export class AdminClusterService { return result.body; } + /** + * Добавить запись + * @param requestBody запись + * @returns number Success + * @throws ApiError + */ + public static async insert( + requestBody?: ClusterDto, + ): Promise { + const result = await __request({ + method: 'POST', + path: `/api/admin/cluster`, + body: requestBody, + }); + return result.body; + } + } \ No newline at end of file diff --git a/src/services/api/services/AdminCompanyService.ts b/src/services/api/services/AdminCompanyService.ts index fd07059..d515840 100644 --- a/src/services/api/services/AdminCompanyService.ts +++ b/src/services/api/services/AdminCompanyService.ts @@ -2,46 +2,19 @@ /* tslint:disable */ /* eslint-disable */ import type { CompanyDto } from '../models/CompanyDto'; -import type { CompanyDtoPaginationContainer } from '../models/CompanyDtoPaginationContainer'; import { request as __request } from '../core/request'; export class AdminCompanyService { /** - * Получить страницу с записями в PaginationContainer - * @param skip пропустить skip записей - * @param take получить take записей - * @returns CompanyDtoPaginationContainer Success + * Получить все записи + * @returns CompanyDto Success * @throws ApiError */ - public static async getPage( - skip: number, - take: number = 32, - ): Promise { + public static async getAll(): Promise> { const result = await __request({ method: 'GET', - path: `/api/admin/company`, - query: { - 'skip': skip, - 'take': take, - }, - }); - return result.body; - } - - /** - * Добавить запись - * @param requestBody запись - * @returns number Success - * @throws ApiError - */ - public static async insert( - requestBody?: CompanyDto, - ): Promise { - const result = await __request({ - method: 'POST', - path: `/api/admin/company`, - body: requestBody, + path: `/api/admin/company/all`, }); return result.body; } @@ -97,4 +70,21 @@ export class AdminCompanyService { return result.body; } + /** + * Добавить запись + * @param requestBody запись + * @returns number Success + * @throws ApiError + */ + public static async insert( + requestBody?: CompanyDto, + ): Promise { + const result = await __request({ + method: 'POST', + path: `/api/admin/company`, + body: requestBody, + }); + return result.body; + } + } \ No newline at end of file diff --git a/src/services/api/services/AdminDepositService.ts b/src/services/api/services/AdminDepositService.ts index eca13dc..498be0b 100644 --- a/src/services/api/services/AdminDepositService.ts +++ b/src/services/api/services/AdminDepositService.ts @@ -2,46 +2,19 @@ /* tslint:disable */ /* eslint-disable */ import type { DepositDto } from '../models/DepositDto'; -import type { DepositDtoPaginationContainer } from '../models/DepositDtoPaginationContainer'; import { request as __request } from '../core/request'; export class AdminDepositService { /** - * Получить страницу с записями в PaginationContainer - * @param skip пропустить skip записей - * @param take получить take записей - * @returns DepositDtoPaginationContainer Success + * Получить все записи + * @returns DepositDto Success * @throws ApiError */ - public static async getPage( - skip: number, - take: number = 32, - ): Promise { + public static async getAll(): Promise> { const result = await __request({ method: 'GET', - path: `/api/admin/deposit`, - query: { - 'skip': skip, - 'take': take, - }, - }); - return result.body; - } - - /** - * Добавить запись - * @param requestBody запись - * @returns number Success - * @throws ApiError - */ - public static async insert( - requestBody?: DepositDto, - ): Promise { - const result = await __request({ - method: 'POST', - path: `/api/admin/deposit`, - body: requestBody, + path: `/api/admin/deposit/all`, }); return result.body; } @@ -97,4 +70,21 @@ export class AdminDepositService { return result.body; } + /** + * Добавить запись + * @param requestBody запись + * @returns number Success + * @throws ApiError + */ + public static async insert( + requestBody?: DepositDto, + ): Promise { + const result = await __request({ + method: 'POST', + path: `/api/admin/deposit`, + body: requestBody, + }); + return result.body; + } + } \ No newline at end of file diff --git a/src/services/api/services/AdminPermissionInfoService.ts b/src/services/api/services/AdminPermissionInfoService.ts new file mode 100644 index 0000000..bb4519f --- /dev/null +++ b/src/services/api/services/AdminPermissionInfoService.ts @@ -0,0 +1,90 @@ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { PermissionInfoDto } from '../models/PermissionInfoDto'; +import { request as __request } from '../core/request'; + +export class AdminPermissionInfoService { + + /** + * Получить все записи + * @returns PermissionInfoDto Success + * @throws ApiError + */ + public static async getAll(): Promise> { + const result = await __request({ + method: 'GET', + path: `/api/admin/permissionInfo/all`, + }); + return result.body; + } + + /** + * Получить одну запись по Id + * @param id id записи + * @returns PermissionInfoDto Success + * @throws ApiError + */ + public static async get( + id: number, + ): Promise { + const result = await __request({ + method: 'GET', + path: `/api/admin/permissionInfo/${id}`, + }); + return result.body; + } + + /** + * Редактировать запись по id + * @param id id записи + * @param requestBody запись + * @returns number Success + * @throws ApiError + */ + public static async put( + id: number, + requestBody?: PermissionInfoDto, + ): Promise { + const result = await __request({ + method: 'PUT', + path: `/api/admin/permissionInfo/${id}`, + body: requestBody, + }); + return result.body; + } + + /** + * Удалить запись по id + * @param id id записи + * @returns number Success + * @throws ApiError + */ + public static async delete( + id: number, + ): Promise { + const result = await __request({ + method: 'DELETE', + path: `/api/admin/permissionInfo/${id}`, + }); + return result.body; + } + + /** + * Добавить запись + * @param requestBody запись + * @returns number Success + * @throws ApiError + */ + public static async insert( + requestBody?: PermissionInfoDto, + ): Promise { + const result = await __request({ + method: 'POST', + path: `/api/admin/permissionInfo`, + body: requestBody, + }); + return result.body; + } + +} \ No newline at end of file diff --git a/src/services/api/services/AdminPermissionService.ts b/src/services/api/services/AdminPermissionService.ts new file mode 100644 index 0000000..580599f --- /dev/null +++ b/src/services/api/services/AdminPermissionService.ts @@ -0,0 +1,80 @@ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { PermissionDto } from '../models/PermissionDto'; +import { request as __request } from '../core/request'; + +export class AdminPermissionService { + + /** + * Получает список всех разрешений для роли + * @param idRole id роли + * @returns PermissionDto Success + * @throws ApiError + */ + public static async getByIdRole( + idRole?: number, + ): Promise> { + const result = await __request({ + method: 'GET', + path: `/api/admin/permission`, + query: { + 'idRole': idRole, + }, + }); + return result.body; + } + + /** + * Добавляет разрешения для роли + * @param requestBody Объекты новых разрешений для справочника + * @returns number Success + * @throws ApiError + */ + public static async insertRange( + requestBody?: Array, + ): Promise { + const result = await __request({ + method: 'POST', + path: `/api/admin/permission`, + body: requestBody, + }); + return result.body; + } + + /** + * Обновляет разрешение для роли + * @param requestBody Объект разрешения для справочника + * @returns number Success + * @throws ApiError + */ + public static async update( + requestBody?: PermissionDto, + ): Promise { + const result = await __request({ + method: 'PUT', + path: `/api/admin/permission`, + body: requestBody, + }); + return result.body; + } + + /** + * Удаляет разрешение для роли + * @param idUserRole id роли для удаления разрешения + * @param idPermission id разрешения + * @returns number Success + * @throws ApiError + */ + public static async delete( + idUserRole: number, + idPermission: number, + ): Promise { + const result = await __request({ + method: 'DELETE', + path: `/api/admin/permission/${idPermission}/${idUserRole}`, + }); + return result.body; + } + +} \ No newline at end of file diff --git a/src/services/api/services/AdminTelemetryService.ts b/src/services/api/services/AdminTelemetryService.ts index ce56002..5744944 100644 --- a/src/services/api/services/AdminTelemetryService.ts +++ b/src/services/api/services/AdminTelemetryService.ts @@ -2,7 +2,6 @@ /* tslint:disable */ /* eslint-disable */ import type { TelemetryDto } from '../models/TelemetryDto'; -import type { TelemetryDtoPaginationContainer } from '../models/TelemetryDtoPaginationContainer'; import { request as __request } from '../core/request'; export class AdminTelemetryService { @@ -37,40 +36,14 @@ export class AdminTelemetryService { } /** - * Получить страницу с записями в PaginationContainer - * @param skip пропустить skip записей - * @param take получить take записей - * @returns TelemetryDtoPaginationContainer Success + * Получить все записи + * @returns TelemetryDto Success * @throws ApiError */ - public static async getPage( - skip: number, - take: number = 32, - ): Promise { + public static async getAll(): Promise> { const result = await __request({ method: 'GET', - path: `/api/admin/telemetry`, - query: { - 'skip': skip, - 'take': take, - }, - }); - return result.body; - } - - /** - * Добавить запись - * @param requestBody запись - * @returns number Success - * @throws ApiError - */ - public static async insert( - requestBody?: TelemetryDto, - ): Promise { - const result = await __request({ - method: 'POST', - path: `/api/admin/telemetry`, - body: requestBody, + path: `/api/admin/telemetry/all`, }); return result.body; } @@ -126,4 +99,21 @@ export class AdminTelemetryService { return result.body; } + /** + * Добавить запись + * @param requestBody запись + * @returns number Success + * @throws ApiError + */ + public static async insert( + requestBody?: TelemetryDto, + ): Promise { + const result = await __request({ + method: 'POST', + path: `/api/admin/telemetry`, + body: requestBody, + }); + return result.body; + } + } \ No newline at end of file diff --git a/src/services/api/services/AdminUserRoleService.ts b/src/services/api/services/AdminUserRoleService.ts index 0abe50b..7dd8d44 100644 --- a/src/services/api/services/AdminUserRoleService.ts +++ b/src/services/api/services/AdminUserRoleService.ts @@ -2,46 +2,19 @@ /* tslint:disable */ /* eslint-disable */ import type { UserRoleDto } from '../models/UserRoleDto'; -import type { UserRoleDtoPaginationContainer } from '../models/UserRoleDtoPaginationContainer'; import { request as __request } from '../core/request'; export class AdminUserRoleService { /** - * Получить страницу с записями в PaginationContainer - * @param skip пропустить skip записей - * @param take получить take записей - * @returns UserRoleDtoPaginationContainer Success + * Получить все записи + * @returns UserRoleDto Success * @throws ApiError */ - public static async getPage( - skip: number, - take: number = 32, - ): Promise { + public static async getAll(): Promise> { const result = await __request({ method: 'GET', - path: `/api/admin/user/role`, - query: { - 'skip': skip, - 'take': take, - }, - }); - return result.body; - } - - /** - * Добавить запись - * @param requestBody запись - * @returns number Success - * @throws ApiError - */ - public static async insert( - requestBody?: UserRoleDto, - ): Promise { - const result = await __request({ - method: 'POST', - path: `/api/admin/user/role`, - body: requestBody, + path: `/api/admin/role/all`, }); return result.body; } @@ -57,7 +30,7 @@ export class AdminUserRoleService { ): Promise { const result = await __request({ method: 'GET', - path: `/api/admin/user/role/${id}`, + path: `/api/admin/role/${id}`, }); return result.body; } @@ -75,7 +48,7 @@ export class AdminUserRoleService { ): Promise { const result = await __request({ method: 'PUT', - path: `/api/admin/user/role/${id}`, + path: `/api/admin/role/${id}`, body: requestBody, }); return result.body; @@ -92,7 +65,24 @@ export class AdminUserRoleService { ): Promise { const result = await __request({ method: 'DELETE', - path: `/api/admin/user/role/${id}`, + path: `/api/admin/role/${id}`, + }); + return result.body; + } + + /** + * Добавить запись + * @param requestBody запись + * @returns number Success + * @throws ApiError + */ + public static async insert( + requestBody?: UserRoleDto, + ): Promise { + const result = await __request({ + method: 'POST', + path: `/api/admin/role`, + body: requestBody, }); return result.body; } diff --git a/src/services/api/services/AdminUserService.ts b/src/services/api/services/AdminUserService.ts index 7f4e2bb..b2b6fc5 100644 --- a/src/services/api/services/AdminUserService.ts +++ b/src/services/api/services/AdminUserService.ts @@ -2,46 +2,19 @@ /* tslint:disable */ /* eslint-disable */ import type { UserDto } from '../models/UserDto'; -import type { UserDtoPaginationContainer } from '../models/UserDtoPaginationContainer'; import { request as __request } from '../core/request'; export class AdminUserService { /** - * Получить страницу с записями в PaginationContainer - * @param skip пропустить skip записей - * @param take получить take записей - * @returns UserDtoPaginationContainer Success + * Получить все записи + * @returns UserDto Success * @throws ApiError */ - public static async getPage( - skip: number, - take: number = 32, - ): Promise { + public static async getAll(): Promise> { const result = await __request({ method: 'GET', - path: `/api/admin/user`, - query: { - 'skip': skip, - 'take': take, - }, - }); - return result.body; - } - - /** - * Добавить запись - * @param requestBody запись - * @returns number Success - * @throws ApiError - */ - public static async insert( - requestBody?: UserDto, - ): Promise { - const result = await __request({ - method: 'POST', - path: `/api/admin/user`, - body: requestBody, + path: `/api/admin/user/all`, }); return result.body; } @@ -97,4 +70,21 @@ export class AdminUserService { return result.body; } + /** + * Добавить запись + * @param requestBody запись + * @returns number Success + * @throws ApiError + */ + public static async insert( + requestBody?: UserDto, + ): Promise { + const result = await __request({ + method: 'POST', + path: `/api/admin/user`, + body: requestBody, + }); + return result.body; + } + } \ No newline at end of file diff --git a/src/services/api/services/AdminWellService.ts b/src/services/api/services/AdminWellService.ts index 6c4a54d..2eca5a7 100644 --- a/src/services/api/services/AdminWellService.ts +++ b/src/services/api/services/AdminWellService.ts @@ -2,46 +2,19 @@ /* tslint:disable */ /* eslint-disable */ import type { WellDto } from '../models/WellDto'; -import type { WellDtoPaginationContainer } from '../models/WellDtoPaginationContainer'; import { request as __request } from '../core/request'; export class AdminWellService { /** - * Получить страницу с записями в PaginationContainer - * @param skip пропустить skip записей - * @param take получить take записей - * @returns WellDtoPaginationContainer Success + * Получить все записи + * @returns WellDto Success * @throws ApiError */ - public static async getPage( - skip: number, - take: number = 32, - ): Promise { + public static async getAll(): Promise> { const result = await __request({ method: 'GET', - path: `/api/admin/well`, - query: { - 'skip': skip, - 'take': take, - }, - }); - return result.body; - } - - /** - * Добавить запись - * @param requestBody запись - * @returns number Success - * @throws ApiError - */ - public static async insert( - requestBody?: WellDto, - ): Promise { - const result = await __request({ - method: 'POST', - path: `/api/admin/well`, - body: requestBody, + path: `/api/admin/well/all`, }); return result.body; } @@ -97,4 +70,21 @@ export class AdminWellService { return result.body; } + /** + * Добавить запись + * @param requestBody запись + * @returns number Success + * @throws ApiError + */ + public static async insert( + requestBody?: WellDto, + ): Promise { + const result = await __request({ + method: 'POST', + path: `/api/admin/well`, + body: requestBody, + }); + return result.body; + } + } \ No newline at end of file diff --git a/src/services/api/services/RequerstTrackerService.ts b/src/services/api/services/RequerstTrackerService.ts index 6ddead7..2cb94f8 100644 --- a/src/services/api/services/RequerstTrackerService.ts +++ b/src/services/api/services/RequerstTrackerService.ts @@ -6,7 +6,8 @@ import { request as __request } from '../core/request'; export class RequerstTrackerService { /** - * @param take + * Получить последние `take` запросов к серверу + * @param take от 1 до 1000 * @returns any Success * @throws ApiError */ @@ -24,7 +25,8 @@ export class RequerstTrackerService { } /** - * @param take + * Получить последние `take` быстрых запросов к серверу + * @param take от 1 до 1000 * @returns any Success * @throws ApiError */ @@ -42,7 +44,8 @@ export class RequerstTrackerService { } /** - * @param take + * Получить последние `take` медленных запросов к серверу + * @param take от 1 до 1000 * @returns any Success * @throws ApiError */ @@ -60,7 +63,8 @@ export class RequerstTrackerService { } /** - * @param take + * Получить последние `take` ошибок при выполнении запросов + * @param take от 1 до 1000 * @returns any Success * @throws ApiError */ @@ -78,7 +82,8 @@ export class RequerstTrackerService { } /** - * @param take + * Получить последних пользователей обращавшихся к серверу. Уникальность пользователя проверяется по логину и Ip. + * @param take от 1 до 1000 * @returns any Success * @throws ApiError */