-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use generated types for account and audit listing
- Loading branch information
Showing
6 changed files
with
31 additions
and
37 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
16 changes: 16 additions & 0 deletions
16
confiture-rest-api/src/audits/dto/audit-listing-item.dto.ts
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { ApiProperty } from "@nestjs/swagger"; | ||
import { AuditType } from "@prisma/client"; | ||
|
||
export class AuditListingItemDto { | ||
procedureName: string; | ||
editUniqueId: string; | ||
consultUniqueId: string; | ||
creationDate: Date; | ||
@ApiProperty({ enum: AuditType }) | ||
auditType: AuditType; | ||
complianceLevel: number; | ||
@ApiProperty({ enum: ["NOT_STARTED", "COMPLETED", "IN_PROGRESS"] }) | ||
status: "NOT_STARTED" | "COMPLETED" | "IN_PROGRESS"; | ||
estimatedCsvSize: number; | ||
statementIsPublished: boolean; | ||
} |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,9 @@ | ||
import { AuditStatus, AuditType } from "./types"; | ||
import { components, paths } from "./confiture-api"; | ||
|
||
export interface Account { | ||
id: string; | ||
email: string; | ||
name?: string; | ||
orgName?: string; | ||
} | ||
export type UpdateProfileRequestData = | ||
paths["/profile"]["patch"]["requestBody"]["content"]["application/json"]; | ||
|
||
export interface UpdateProfileRequestData { | ||
/** John Doe */ | ||
name: string | null; | ||
/** ACME */ | ||
orgName?: string | null; | ||
} | ||
export type AccountDeletionResponse = | ||
paths["/auth/account"]["delete"]["responses"]["200"]["content"]["application/json"]; | ||
|
||
export interface AccountDeletionResponse { | ||
feedbackToken: string; | ||
} | ||
|
||
export interface AccountAudit { | ||
procedureName: string; | ||
status: | ||
| AuditStatus.NOT_STARTED | ||
| AuditStatus.IN_PROGRESS | ||
| AuditStatus.COMPLETED; | ||
creationDate: string; | ||
auditType: AuditType; | ||
complianceLevel: number; | ||
editUniqueId: string; | ||
consultUniqueId: string; | ||
estimatedCsvSize: number; | ||
statementIsPublished: boolean; | ||
} | ||
export type AccountAudit = components["schemas"]["AuditListingItemDto"]; |