Skip to content

Commit

Permalink
feat: #1540 create a user access history page (#1607)
Browse files Browse the repository at this point in the history
  • Loading branch information
craigyu authored Oct 3, 2024
1 parent 51b4cd3 commit 6b507c6
Show file tree
Hide file tree
Showing 70 changed files with 3,120 additions and 2,133 deletions.
2,898 changes: 1,485 additions & 1,413 deletions client-code-gen/app-access-control-openapi.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,57 @@ import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError, ope
// @ts-ignore
import { FamApplicationUserRoleAssignmentGetSchema } from '../model';
// @ts-ignore
import { FamUserInfoSchema } from '../model';
// @ts-ignore
import { HTTPValidationError } from '../model';
/**
* FAMApplicationsApi - axios parameter creator
* @export
*/
export const FAMApplicationsApiAxiosParamCreator = function (configuration?: Configuration) {
return {
/**
* Retrieve the user data for a given user id under an authorized application. Args: userId (int): The ID of the user. applicationId (int): The ID of the application the user has access to. Returns: FamUserInfoSchema: The user information corresponding to the provided userId.
* @summary Retrieve User Information by User ID under an application
* @param {number} userId
* @param {number} applicationId
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getApplicationUserById: async (userId: number, applicationId: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'userId' is not null or undefined
assertParamExists('getApplicationUserById', 'userId', userId)
// verify required parameter 'applicationId' is not null or undefined
assertParamExists('getApplicationUserById', 'applicationId', applicationId)
const localVarPath = `/fam_applications/{application_id}/users/{user_id}`
.replace(`{${"user_id"}}`, encodeURIComponent(String(userId)))
.replace(`{${"application_id"}}`, encodeURIComponent(String(applicationId)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}

const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;

// authentication 6jfveou69mgford233or30hmta required
// oauth required
await setOAuthToObject(localVarHeaderParameter, "6jfveou69mgford233or30hmta", [], configuration)



setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* gets the roles assignment associated with an application
* @summary Get Fam Application User Role Assignment
Expand Down Expand Up @@ -79,6 +123,20 @@ export const FAMApplicationsApiAxiosParamCreator = function (configuration?: Con
export const FAMApplicationsApiFp = function(configuration?: Configuration) {
const localVarAxiosParamCreator = FAMApplicationsApiAxiosParamCreator(configuration)
return {
/**
* Retrieve the user data for a given user id under an authorized application. Args: userId (int): The ID of the user. applicationId (int): The ID of the application the user has access to. Returns: FamUserInfoSchema: The user information corresponding to the provided userId.
* @summary Retrieve User Information by User ID under an application
* @param {number} userId
* @param {number} applicationId
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getApplicationUserById(userId: number, applicationId: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<FamUserInfoSchema>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.getApplicationUserById(userId, applicationId, options);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath = operationServerMap['FAMApplicationsApi.getApplicationUserById']?.[localVarOperationServerIndex]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
},
/**
* gets the roles assignment associated with an application
* @summary Get Fam Application User Role Assignment
Expand All @@ -102,6 +160,17 @@ export const FAMApplicationsApiFp = function(configuration?: Configuration) {
export const FAMApplicationsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
const localVarFp = FAMApplicationsApiFp(configuration)
return {
/**
* Retrieve the user data for a given user id under an authorized application. Args: userId (int): The ID of the user. applicationId (int): The ID of the application the user has access to. Returns: FamUserInfoSchema: The user information corresponding to the provided userId.
* @summary Retrieve User Information by User ID under an application
* @param {number} userId
* @param {number} applicationId
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getApplicationUserById(userId: number, applicationId: number, options?: any): AxiosPromise<FamUserInfoSchema> {
return localVarFp.getApplicationUserById(userId, applicationId, options).then((request) => request(axios, basePath));
},
/**
* gets the roles assignment associated with an application
* @summary Get Fam Application User Role Assignment
Expand All @@ -121,6 +190,17 @@ export const FAMApplicationsApiFactory = function (configuration?: Configuration
* @interface FAMApplicationsApi
*/
export interface FAMApplicationsApiInterface {
/**
* Retrieve the user data for a given user id under an authorized application. Args: userId (int): The ID of the user. applicationId (int): The ID of the application the user has access to. Returns: FamUserInfoSchema: The user information corresponding to the provided userId.
* @summary Retrieve User Information by User ID under an application
* @param {number} userId
* @param {number} applicationId
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof FAMApplicationsApiInterface
*/
getApplicationUserById(userId: number, applicationId: number, options?: RawAxiosRequestConfig): AxiosPromise<FamUserInfoSchema>;

/**
* gets the roles assignment associated with an application
* @summary Get Fam Application User Role Assignment
Expand All @@ -140,6 +220,19 @@ export interface FAMApplicationsApiInterface {
* @extends {BaseAPI}
*/
export class FAMApplicationsApi extends BaseAPI implements FAMApplicationsApiInterface {
/**
* Retrieve the user data for a given user id under an authorized application. Args: userId (int): The ID of the user. applicationId (int): The ID of the application the user has access to. Returns: FamUserInfoSchema: The user information corresponding to the provided userId.
* @summary Retrieve User Information by User ID under an application
* @param {number} userId
* @param {number} applicationId
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof FAMApplicationsApi
*/
public getApplicationUserById(userId: number, applicationId: number, options?: RawAxiosRequestConfig) {
return FAMApplicationsApiFp(this.configuration).getApplicationUserById(userId, applicationId, options).then((request) => request(this.axios, this.basePath));
}

/**
* gets the roles assignment associated with an application
* @summary Get Fam Application User Role Assignment
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,5 +74,11 @@ export interface PermissionAduitHistoryRes {
* @memberof PermissionAduitHistoryRes
*/
'change_performer_user_id': number | null;
/**
*
* @type {string}
* @memberof PermissionAduitHistoryRes
*/
'privilege_change_type_description': string;
}

2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@ services:

networks:
fam:
driver: bridge
driver: bridge
166 changes: 163 additions & 3 deletions frontend/package-lock.json

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

Loading

0 comments on commit 6b507c6

Please sign in to comment.