From aee1bd236bfb5de0a25bfbe982f468eee8513927 Mon Sep 17 00:00:00 2001 From: Marius Tobiassen Bungum Date: Fri, 9 Aug 2024 14:55:48 +0200 Subject: [PATCH 1/2] :alien: Got latest user impersonate api changes --- package-lock.json | 4 ++-- package.json | 2 +- src/api/models/JToken.ts | 5 +++++ src/api/services/AmplifyApplicationService.ts | 19 ++++++++++++++++++- src/api/services/ImpersonateUserService.ts | 18 +++++++++++++++++- src/api/services/SlackService.ts | 1 - src/api/services/TutorialService.ts | 2 +- 7 files changed, 44 insertions(+), 7 deletions(-) create mode 100644 src/api/models/JToken.ts diff --git a/package-lock.json b/package-lock.json index 7aaf716..cc64a05 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@equinor/subsurface-app-management", - "version": "1.1.2", + "version": "1.1.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@equinor/subsurface-app-management", - "version": "1.1.2", + "version": "1.1.3", "license": "ISC", "dependencies": { "@azure/msal-browser": "3.10.0", diff --git a/package.json b/package.json index d993022..3a0b9ba 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@equinor/subsurface-app-management", - "version": "1.1.2", + "version": "1.1.3", "description": "React Typescript components/hooks to communicate with equinor/sam", "types": "dist/index.d.ts", "type": "module", diff --git a/src/api/models/JToken.ts b/src/api/models/JToken.ts new file mode 100644 index 0000000..e0551d7 --- /dev/null +++ b/src/api/models/JToken.ts @@ -0,0 +1,5 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export type JToken = Array; diff --git a/src/api/services/AmplifyApplicationService.ts b/src/api/services/AmplifyApplicationService.ts index 0b1510b..a73470b 100644 --- a/src/api/services/AmplifyApplicationService.ts +++ b/src/api/services/AmplifyApplicationService.ts @@ -4,8 +4,9 @@ /* eslint-disable */ import type { AmplifyApplication } from '../models/AmplifyApplication'; import type { CancelablePromise } from '../core/CancelablePromise'; -import { OpenAPI_Portal_Prod } from '../core/OpenAPI'; +import { OpenAPI_Portal, OpenAPI_Portal_Prod } from '../core/OpenAPI'; import { request as __request } from '../core/request'; +import { JToken } from '../models/JToken'; export class AmplifyApplicationService { /** * Get all applications that user has access to @@ -24,4 +25,20 @@ export class AmplifyApplicationService { }, }); } + /** + * @param appClientId + * @returns JToken Success + * @throws ApiError + */ + public static getAllAppRoles( + appClientId: string + ): CancelablePromise> { + return __request(OpenAPI_Portal, { + method: 'GET', + url: '/api/v1/AmplifyApplication/application/{appClientId}/groups', + path: { + appClientId: appClientId, + }, + }); + } } diff --git a/src/api/services/ImpersonateUserService.ts b/src/api/services/ImpersonateUserService.ts index f26ec37..a1039d1 100644 --- a/src/api/services/ImpersonateUserService.ts +++ b/src/api/services/ImpersonateUserService.ts @@ -2,7 +2,8 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import { CancelablePromise, ImpersonateUser } from 'src/api'; +import type { ImpersonateUser } from '../models/ImpersonateUser'; +import type { CancelablePromise } from '../core/CancelablePromise'; import { OpenAPI_Portal } from '../core/OpenAPI'; import { request as __request } from '../core/request'; export class ImpersonateUserService { @@ -140,6 +141,21 @@ export class ImpersonateUserService { }, }); } + /** + * @returns boolean Success + * @throws ApiError + */ + public static canImpersonate(): CancelablePromise { + return __request(OpenAPI_Portal, { + method: 'GET', + url: '/api/v1/ImpersonateUser/CanImpersonate', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Server Error`, + }, + }); + } /** * @param username * @returns ImpersonateUser Success diff --git a/src/api/services/SlackService.ts b/src/api/services/SlackService.ts index b88a9a3..a461ab7 100644 --- a/src/api/services/SlackService.ts +++ b/src/api/services/SlackService.ts @@ -35,5 +35,4 @@ export class SlackService { body: formData, }); } - } diff --git a/src/api/services/TutorialService.ts b/src/api/services/TutorialService.ts index 5fd692b..a9d978a 100644 --- a/src/api/services/TutorialService.ts +++ b/src/api/services/TutorialService.ts @@ -2,7 +2,7 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import {CancelablePromise, Tutorial} from 'src/api'; +import { CancelablePromise, Tutorial } from 'src/api'; import { OpenAPI_Portal_Prod } from '../core/OpenAPI'; import { request as __request } from '../core/request'; export class TutorialService { From 5e2e15da63e1d02c757808a729b9a96f4eb12c60 Mon Sep 17 00:00:00 2001 From: Marius Tobiassen Bungum Date: Mon, 12 Aug 2024 08:13:41 +0200 Subject: [PATCH 2/2] :bookmark: 1.1.4 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index cc64a05..26cda96 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@equinor/subsurface-app-management", - "version": "1.1.3", + "version": "1.1.4", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@equinor/subsurface-app-management", - "version": "1.1.3", + "version": "1.1.4", "license": "ISC", "dependencies": { "@azure/msal-browser": "3.10.0", diff --git a/package.json b/package.json index 3a0b9ba..d5c003f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@equinor/subsurface-app-management", - "version": "1.1.3", + "version": "1.1.4", "description": "React Typescript components/hooks to communicate with equinor/sam", "types": "dist/index.d.ts", "type": "module",