Skip to content

Commit

Permalink
Updates assessment codec (#381)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelfarrell76 authored Jan 24, 2025
1 parent 925b974 commit e461409
Show file tree
Hide file tree
Showing 10 changed files with 46 additions and 13 deletions.
10 changes: 5 additions & 5 deletions .pnp.cjs

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

Binary file not shown.
Binary file not shown.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"author": "Transcend Inc.",
"name": "@transcend-io/cli",
"description": "Small package containing useful typescript utilities.",
"version": "6.14.0",
"version": "6.14.1",
"homepage": "https://github.com/transcend-io/cli",
"repository": {
"type": "git",
Expand Down Expand Up @@ -68,7 +68,7 @@
"@transcend-io/handlebars-utils": "^1.1.0",
"@transcend-io/internationalization": "^1.6.0",
"@transcend-io/persisted-state": "^1.0.4",
"@transcend-io/privacy-types": "^4.105.3",
"@transcend-io/privacy-types": "^4.105.4",
"@transcend-io/secret-value": "^1.2.0",
"@transcend-io/type-utils": "^1.8.0",
"bluebird": "^3.7.2",
Expand Down
4 changes: 4 additions & 0 deletions src/codecs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1536,6 +1536,10 @@ export const RiskLogicInput = t.intersection([
t.partial({
/** The risk level to assign to the question */
'risk-level': t.string,
/** The risk matrix column to assign to a question. */
'risk-matrix-column': t.string,
/** The risk matrix row to assign to a question. */
'risk-matrix-row': t.string,
}),
]);

Expand Down
4 changes: 3 additions & 1 deletion src/graphql/parseAssessmentRiskLogic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ import * as t from 'io-ts';

export const AssessmentRiskLogic = t.intersection([
t.partial({
riskAssignment: t.type({
riskAssignment: t.partial({
riskLevelId: t.string,
riskMatrixRowId: t.string,
riskMatrixColumnId: t.string,
}),
}),
t.type({
Expand Down
3 changes: 3 additions & 0 deletions src/graphql/pullTranscendConfiguration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -724,6 +724,9 @@ export async function pullTranscendConfiguration(
const parsed = parseAssessmentRiskLogic(logic);
return {
'risk-level': parsed.riskAssignment?.riskLevelId,
'risk-matrix-row': parsed.riskAssignment?.riskMatrixRowId,
'risk-matrix-column':
parsed.riskAssignment?.riskMatrixColumnId,
'comparison-operands': parsed.comparisonOperands,
'comparison-operator': parsed.comparisonOperator,
};
Expand Down
12 changes: 12 additions & 0 deletions transcend-yml-schema-latest.json
Original file line number Diff line number Diff line change
Expand Up @@ -41606,6 +41606,12 @@
"properties": {
"risk-level": {
"type": "string"
},
"risk-matrix-column": {
"type": "string"
},
"risk-matrix-row": {
"type": "string"
}
}
}
Expand Down Expand Up @@ -42069,6 +42075,12 @@
"properties": {
"risk-level": {
"type": "string"
},
"risk-matrix-column": {
"type": "string"
},
"risk-matrix-row": {
"type": "string"
}
}
}
Expand Down
12 changes: 12 additions & 0 deletions transcend-yml-schema-v6.json
Original file line number Diff line number Diff line change
Expand Up @@ -41606,6 +41606,12 @@
"properties": {
"risk-level": {
"type": "string"
},
"risk-matrix-column": {
"type": "string"
},
"risk-matrix-row": {
"type": "string"
}
}
}
Expand Down Expand Up @@ -42069,6 +42075,12 @@
"properties": {
"risk-level": {
"type": "string"
},
"risk-matrix-column": {
"type": "string"
},
"risk-matrix-row": {
"type": "string"
}
}
}
Expand Down
10 changes: 5 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ __metadata:
"@transcend-io/handlebars-utils": ^1.1.0
"@transcend-io/internationalization": ^1.6.0
"@transcend-io/persisted-state": ^1.0.4
"@transcend-io/privacy-types": ^4.105.3
"@transcend-io/privacy-types": ^4.105.4
"@transcend-io/secret-value": ^1.2.0
"@transcend-io/type-utils": ^1.8.0
"@types/bluebird": ^3.5.38
Expand Down Expand Up @@ -647,14 +647,14 @@ __metadata:
languageName: node
linkType: hard

"@transcend-io/privacy-types@npm:^4.105.3":
version: 4.105.3
resolution: "@transcend-io/privacy-types@npm:4.105.3"
"@transcend-io/privacy-types@npm:^4.105.4":
version: 4.105.4
resolution: "@transcend-io/privacy-types@npm:4.105.4"
dependencies:
"@transcend-io/type-utils": ^1.0.5
fp-ts: ^2.16.1
io-ts: ^2.2.21
checksum: 180272a6d5a20a0f6d33b790c945d5fafc313d319c5ac23affde12775d987c03cdba6b81e3a554fcd3a1f2385555b46e73059c36177b30d805f63e44ced45364
checksum: 8e2ce5d232dc3862b8aee0e080247eb6aa03db1d966f63906edbae67848eb897b95bd82964111929e21dd1e0b3584bbff762eadce91054f93ac7d81d38a184af
languageName: node
linkType: hard

Expand Down

0 comments on commit e461409

Please sign in to comment.