[6126] usage export button - #604
Draft
strongmindsaln wants to merge 2 commits into
Draft
Conversation
There was a problem hiding this comment.
Pull request overview
This PR mainly updates the generated V1 API client layer for Excel-related endpoints, splitting the old shared Excel client into a local-admin-specific service plus a new IT-system-usage export service. In the codebase, these files sit under the autogenerated src/app/api/v1/ surface that other frontend services import from.
Changes:
- Renamed the existing V1 Excel client to
LocalAdminExcelServiceand renamed its request/method types accordingly. - Added a new generated
ExcelExportServicefor/api/excel/it-system-usage/{systemUsageUuid}. - Updated the V1 API barrel/module/generated file manifest to expose the new services.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
src/app/api/v1/api/localAdminExcel.service.ts |
Renames the old generated Excel client to a local-admin-specific service and updates its generated method/type names. |
src/app/api/v1/api/excelExport.service.ts |
Adds a new generated V1 client for IT system usage Excel export. |
src/app/api/v1/api/api.ts |
Updates the V1 barrel exports and APIS list to reference the new Excel services. |
src/app/api/v1/api.module.ts |
Adjusts generated API module imports to match the renamed/new Excel services. |
src/app/api/v1/.openapi-generator/FILES |
Updates the OpenAPI generator manifest for the renamed/new generated service files. |
Comment on lines
+7
to
+8
| export * from './excelExport.service'; | ||
| import { ExcelExportService } from './excelExport.service'; |
Comment on lines
+101
to
+145
| public getSingleExcelExportGetItSystemUsageByUuid(requestParameters: GetSingleExcelExportGetItSystemUsageByUuidRequestParams, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable<any>; | ||
| public getSingleExcelExportGetItSystemUsageByUuid(requestParameters: GetSingleExcelExportGetItSystemUsageByUuidRequestParams, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable<HttpResponse<any>>; | ||
| public getSingleExcelExportGetItSystemUsageByUuid(requestParameters: GetSingleExcelExportGetItSystemUsageByUuidRequestParams, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable<HttpEvent<any>>; | ||
| public getSingleExcelExportGetItSystemUsageByUuid(requestParameters: GetSingleExcelExportGetItSystemUsageByUuidRequestParams, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable<any> { | ||
| const systemUsageUuid = requestParameters.systemUsageUuid; | ||
| if (systemUsageUuid === null || systemUsageUuid === undefined) { | ||
| throw new Error('Required parameter systemUsageUuid was null or undefined when calling getSingleExcelExportGetItSystemUsageByUuid.'); | ||
| } | ||
|
|
||
| let localVarHeaders = this.defaultHeaders; | ||
|
|
||
| let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; | ||
| if (localVarHttpHeaderAcceptSelected === undefined) { | ||
| // to determine the Accept header | ||
| const httpHeaderAccepts: string[] = [ | ||
| ]; | ||
| localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); | ||
| } | ||
| if (localVarHttpHeaderAcceptSelected !== undefined) { | ||
| localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); | ||
| } | ||
|
|
||
| let localVarHttpContext: HttpContext | undefined = options && options.context; | ||
| if (localVarHttpContext === undefined) { | ||
| localVarHttpContext = new HttpContext(); | ||
| } | ||
|
|
||
|
|
||
| let responseType_: 'text' | 'json' | 'blob' = 'json'; | ||
| if (localVarHttpHeaderAcceptSelected) { | ||
| if (localVarHttpHeaderAcceptSelected.startsWith('text')) { | ||
| responseType_ = 'text'; | ||
| } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { | ||
| responseType_ = 'json'; | ||
| } else { | ||
| responseType_ = 'blob'; | ||
| } | ||
| } | ||
|
|
||
| let localVarPath = `/api/excel/it-system-usage/${this.configuration.encodeParam({name: "systemUsageUuid", value: systemUsageUuid, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: "uuid"})}`; | ||
| return this.httpClient.request<any>('get', `${this.configuration.basePath}${localVarPath}`, | ||
| { | ||
| context: localVarHttpContext, | ||
| responseType: <any>responseType_, | ||
| withCredentials: this.configuration.withCredentials, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR requirements
Follow this guide to test and review: https://strongminds.atlassian.net/wiki/spaces/KITOS/pages/993984514/QA
Description
Describe what was changed in this branch, and WHY it was changed.
Checklist
Look through the Figma wireframe with similar elements and validate the implementation
Did you remember to run
yarn i18n?Make sure you are testing your changes and how they co-exist with the latest version of master
Test all of the changes made
This is part of the PR checks, so look at the PR page itself
Before requesting a review do a yet another self-review
Under "Description" above, explain what was changed in this branch, and WHY it was changed
Tag whomever you wish to review your code