-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* rectifying data type mismatches, add un-defined Enums and attributes, adding in-line comments * add AdrCertificateDetails interface and parsing function * adding guidanceNotes Enum * adding m145 attribute as per documentation change * feat: adr details added, test resource for technoical record added, unit test added * style: rearrange enums * fix: replace ! with ? for optional attributes * fix: memosApplyEnum value updated * fix: 2 new attributes added to adrDetails, as per documentation * feat: tab le definition * fix: enum updated * feat: adr tables added to the tech record list of tables * feat: new function added for partial upsert based on condition attribute * feat: some adr table detail updated * feat: upsert fun ctionality added for adr-details attributes in tech record * feat: adr parts added to tech record integration test * feat: docker's mysql image updated to version 8 - consistent with recent RDS engine upgarde for NOP * feat: adr attribute values updated * feat: test updated as adr attribute values updated in json file * fix: changes reverted back to original * fix: changes reverted back to original * fix: changes reverted back to original * feat: cleaning and bringing in adr pass certificate * feat: cleaning and bringing in adr pass certificate * feat: cleaning and bringing in adr pass certificate * fix: removed async keyword to avoid error when running the test * fix: bringing in to be able to run integration tests on my mac and be able to push changes into repo * fix: bringing in to be able to run integration tests on my mac and be able to push changes into repo * fix: bringing in to be able to run integration tests on my mac and be able to push changes into repo * fix: updating adr pass certificate function * fix: updating adr pass certificate field name * fix: updating adr pass certificate var name * feat: adding integration tests for additional test scenarios * feat: adding adr pass certificate attribute * feat: adding adr pass certificate attribute test to unit test * fix: syntax fixed --------- Co-authored-by: Meys Torkaman <meys.torkaman@MacBook-Pro.local> Co-authored-by: meys-bjss <140601718+meys-bjss@users.noreply.github.com>
- Loading branch information
1 parent
88d3f69
commit 577351f
Showing
13 changed files
with
2,361 additions
and
41 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import { DynamoDbImage } from "../services/dynamodb-images"; | ||
import { Maybe } from "./optionals"; | ||
|
||
// define Enums | ||
export type AdrPassCertificateTypeEnum = "PASS" | "REPLACEMENT"; | ||
|
||
export type AdrPassCertificateDetails = AdrPassCertificateDetailsItems[]; | ||
|
||
export interface AdrPassCertificateDetailsItems { | ||
createdByName?: string; | ||
certificateType?: AdrPassCertificateTypeEnum; | ||
generatedTimestamp?: string; | ||
certificateId?: string; | ||
} | ||
|
||
export const parseAdrCertificateDetails = ( | ||
adrPassCertificateDetailsImage?: DynamoDbImage | ||
): Maybe<AdrPassCertificateDetails> => { | ||
if (!adrPassCertificateDetailsImage) { | ||
return undefined; | ||
} | ||
|
||
const adrPassCertificateDetails: AdrPassCertificateDetails = []; | ||
|
||
for (const key of adrPassCertificateDetailsImage.getKeys()) { | ||
const adrPassCertificateDetailsItemImage = adrPassCertificateDetailsImage.getMap( | ||
key | ||
)!; | ||
adrPassCertificateDetails.push({ | ||
createdByName: adrPassCertificateDetailsItemImage.getString( | ||
"createdByName" | ||
), | ||
certificateType: adrPassCertificateDetailsItemImage.getString( | ||
"certificateType" | ||
) as AdrPassCertificateTypeEnum, | ||
generatedTimestamp: adrPassCertificateDetailsItemImage.getDate( | ||
"generatedTimestamp" | ||
), | ||
certificateId: adrPassCertificateDetailsItemImage.getString( | ||
"certificateId" | ||
), | ||
}); | ||
} | ||
return adrPassCertificateDetails; | ||
}; |
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
Oops, something went wrong.