Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat/newst-userimpersonate #26

Merged
merged 3 commits into from
Aug 12, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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",
mariush2 marked this conversation as resolved.
Show resolved Hide resolved
"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