Skip to content

Commit

Permalink
👽 Got latest user impersonate api changes
Browse files Browse the repository at this point in the history
  • Loading branch information
mariush2 committed Aug 9, 2024
1 parent 633ad62 commit aee1bd2
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 7 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
5 changes: 5 additions & 0 deletions src/api/models/JToken.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type JToken = Array<JToken>;
19 changes: 18 additions & 1 deletion src/api/services/AmplifyApplicationService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -24,4 +25,20 @@ export class AmplifyApplicationService {
},
});
}
/**
* @param appClientId
* @returns JToken Success
* @throws ApiError
*/
public static getAllAppRoles(
appClientId: string
): CancelablePromise<Array<JToken>> {
return __request(OpenAPI_Portal, {
method: 'GET',
url: '/api/v1/AmplifyApplication/application/{appClientId}/groups',
path: {
appClientId: appClientId,
},
});
}
}
18 changes: 17 additions & 1 deletion src/api/services/ImpersonateUserService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -140,6 +141,21 @@ export class ImpersonateUserService {
},
});
}
/**
* @returns boolean Success
* @throws ApiError
*/
public static canImpersonate(): CancelablePromise<boolean> {
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
Expand Down
1 change: 0 additions & 1 deletion src/api/services/SlackService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,4 @@ export class SlackService {
body: formData,
});
}

}
2 changes: 1 addition & 1 deletion src/api/services/TutorialService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit aee1bd2

Please sign in to comment.