diff --git a/src/api/core/OpenAPI.ts b/src/api/core/OpenAPI.ts index c701e5f..a33ae32 100644 --- a/src/api/core/OpenAPI.ts +++ b/src/api/core/OpenAPI.ts @@ -133,15 +133,3 @@ export const OpenAPI_Portal_Prod: OpenAPIConfig = { HEADERS: undefined, ENCODE_PATH: undefined, }; - -export const OpenAPI_userImpersonate: OpenAPIConfig = { - BASE: `https://api-amplify-portal-${noLocalhostEnvironmentName}.radix.equinor.com`, - VERSION: '1.0', - WITH_CREDENTIALS: false, - CREDENTIALS: 'include', - TOKEN: getPortalToken, - USERNAME: undefined, - PASSWORD: undefined, - HEADERS: { userImpersonation: '' }, - ENCODE_PATH: undefined, -}; diff --git a/src/api/services/ImpersonateUserService.ts b/src/api/services/ImpersonateUserService.ts index cfa551a..7dfa519 100644 --- a/src/api/services/ImpersonateUserService.ts +++ b/src/api/services/ImpersonateUserService.ts @@ -5,7 +5,7 @@ import type { ImpersonateUserDto } from 'src/api/models/ImpersonateUserDto'; import type { ImpersonateUserUpdateDto } from 'src/api/models/ImpersonateUserUpdateDto'; import type { CancelablePromise } from 'src/api'; -import { OpenAPI_userImpersonate } from '../core/OpenAPI'; +import { OpenAPI_Portal } from '../core/OpenAPI'; import { request as __request } from '../core/request'; export class ImpersonateUserService { /** @@ -16,7 +16,7 @@ export class ImpersonateUserService { public static getApiV1ImpersonateUser(): CancelablePromise< Array > { - return __request(OpenAPI_userImpersonate, { + return __request(OpenAPI_Portal, { method: 'GET', url: '/api/v1/ImpersonateUser', errors: { @@ -33,7 +33,7 @@ export class ImpersonateUserService { public static createImpersonateUser( requestBody?: ImpersonateUserUpdateDto ): CancelablePromise { - return __request(OpenAPI_userImpersonate, { + return __request(OpenAPI_Portal, { method: 'POST', url: '/api/v1/ImpersonateUser', body: requestBody, @@ -54,7 +54,7 @@ export class ImpersonateUserService { public static putImpersonateUser( requestBody?: ImpersonateUserDto ): CancelablePromise { - return __request(OpenAPI_userImpersonate, { + return __request(OpenAPI_Portal, { method: 'PUT', url: '/api/v1/ImpersonateUser', body: requestBody, @@ -73,7 +73,7 @@ export class ImpersonateUserService { public static getApiV1ImpersonateUserGetImpersonateUserForApp( appName: string ): CancelablePromise> { - return __request(OpenAPI_userImpersonate, { + return __request(OpenAPI_Portal, { method: 'GET', url: '/api/v1/ImpersonateUser/GetImpersonateUserForApp/{appName}', path: { @@ -91,7 +91,7 @@ export class ImpersonateUserService { * @throws ApiError */ public static getAllActiveUsers(): CancelablePromise { - return __request(OpenAPI_userImpersonate, { + return __request(OpenAPI_Portal, { method: 'GET', url: '/api/v1/ImpersonateUser/ActiveUsers', errors: { @@ -106,7 +106,7 @@ export class ImpersonateUserService { * @throws ApiError */ public static getActiveUser(): CancelablePromise { - return __request(OpenAPI_userImpersonate, { + return __request(OpenAPI_Portal, { method: 'GET', url: '/api/v1/ImpersonateUser/ActiveUser', errors: { @@ -124,7 +124,7 @@ export class ImpersonateUserService { public static getImpersonateUserById( id?: string ): CancelablePromise { - return __request(OpenAPI_userImpersonate, { + return __request(OpenAPI_Portal, { method: 'GET', url: '/api/v1/ImpersonateUser/ImpersonateUser', query: { @@ -145,7 +145,7 @@ export class ImpersonateUserService { public static getImpersonateUserByUserName( username?: string ): CancelablePromise { - return __request(OpenAPI_userImpersonate, { + return __request(OpenAPI_Portal, { method: 'GET', url: '/api/v1/ImpersonateUser/ImpersonateUserByUserName', query: { @@ -162,7 +162,7 @@ export class ImpersonateUserService { * @throws ApiError */ public static canImpersonate(): CancelablePromise { - return __request(OpenAPI_userImpersonate, { + return __request(OpenAPI_Portal, { method: 'GET', url: '/api/v1/ImpersonateUser/CanImpersonate', errors: { @@ -180,7 +180,7 @@ export class ImpersonateUserService { public static startImpersonating( username?: string ): CancelablePromise { - return __request(OpenAPI_userImpersonate, { + return __request(OpenAPI_Portal, { method: 'PUT', url: '/api/v1/ImpersonateUser/StartImpersonating', query: { @@ -198,7 +198,7 @@ export class ImpersonateUserService { * @throws ApiError */ public static stopImpersonating(): CancelablePromise { - return __request(OpenAPI_userImpersonate, { + return __request(OpenAPI_Portal, { method: 'PUT', url: '/api/v1/ImpersonateUser/StopImpersonating', errors: {