vanta-auditor-api-sdk 0.6.3 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -0
- package/docs/sdks/audits/README.md +470 -0
- package/funcs/auditsGetVulnerableAssets.d.ts +22 -0
- package/funcs/auditsGetVulnerableAssets.d.ts.map +1 -0
- package/funcs/auditsGetVulnerableAssets.js +134 -0
- package/funcs/auditsGetVulnerableAssets.js.map +1 -0
- package/funcs/auditsListMonitoredComputersInAuditScope.d.ts +24 -0
- package/funcs/auditsListMonitoredComputersInAuditScope.d.ts.map +1 -0
- package/funcs/auditsListMonitoredComputersInAuditScope.js +133 -0
- package/funcs/auditsListMonitoredComputersInAuditScope.js.map +1 -0
- package/funcs/auditsListPeopleInAuditScope.d.ts +22 -0
- package/funcs/auditsListPeopleInAuditScope.d.ts.map +1 -0
- package/funcs/auditsListPeopleInAuditScope.js +133 -0
- package/funcs/auditsListPeopleInAuditScope.js.map +1 -0
- package/funcs/auditsListVendorsInAuditScope.d.ts +22 -0
- package/funcs/auditsListVendorsInAuditScope.d.ts.map +1 -0
- package/funcs/auditsListVendorsInAuditScope.js +130 -0
- package/funcs/auditsListVendorsInAuditScope.js.map +1 -0
- package/funcs/auditsListVulnerabilities.d.ts +22 -0
- package/funcs/auditsListVulnerabilities.d.ts.map +1 -0
- package/funcs/auditsListVulnerabilities.js +141 -0
- package/funcs/auditsListVulnerabilities.js.map +1 -0
- package/funcs/auditsListVulnerabilityRemediationsInAuditScope.d.ts +22 -0
- package/funcs/auditsListVulnerabilityRemediationsInAuditScope.d.ts.map +1 -0
- package/funcs/auditsListVulnerabilityRemediationsInAuditScope.js +136 -0
- package/funcs/auditsListVulnerabilityRemediationsInAuditScope.js.map +1 -0
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/lib/config.js.map +1 -1
- package/models/components/acceptpoliciestasksummary.d.ts +67 -0
- package/models/components/acceptpoliciestasksummary.d.ts.map +1 -0
- package/models/components/acceptpoliciestasksummary.js +83 -0
- package/models/components/acceptpoliciestasksummary.js.map +1 -0
- package/models/components/auditorapivulnerability.d.ts +119 -0
- package/models/components/auditorapivulnerability.d.ts.map +1 -0
- package/models/components/auditorapivulnerability.js +83 -0
- package/models/components/auditorapivulnerability.js.map +1 -0
- package/models/components/completebackgroundcheckstasksummary.d.ts +47 -0
- package/models/components/completebackgroundcheckstasksummary.d.ts.map +1 -0
- package/models/components/completebackgroundcheckstasksummary.js +65 -0
- package/models/components/completebackgroundcheckstasksummary.js.map +1 -0
- package/models/components/completecustomtaskstasksummary.d.ts +56 -0
- package/models/components/completecustomtaskstasksummary.d.ts.map +1 -0
- package/models/components/completecustomtaskstasksummary.js +68 -0
- package/models/components/completecustomtaskstasksummary.js.map +1 -0
- package/models/components/completeoffboardingcustomtaskstasksummary.d.ts +56 -0
- package/models/components/completeoffboardingcustomtaskstasksummary.d.ts.map +1 -0
- package/models/components/completeoffboardingcustomtaskstasksummary.js +68 -0
- package/models/components/completeoffboardingcustomtaskstasksummary.js.map +1 -0
- package/models/components/completetrainingstasksummary.d.ts +56 -0
- package/models/components/completetrainingstasksummary.d.ts.map +1 -0
- package/models/components/completetrainingstasksummary.js +68 -0
- package/models/components/completetrainingstasksummary.js.map +1 -0
- package/models/components/computerstatus.d.ts +23 -0
- package/models/components/computerstatus.d.ts.map +1 -0
- package/models/components/computerstatus.js +51 -0
- package/models/components/computerstatus.js.map +1 -0
- package/models/components/computerstatusfilter.d.ts +33 -0
- package/models/components/computerstatusfilter.d.ts.map +1 -0
- package/models/components/computerstatusfilter.js +60 -0
- package/models/components/computerstatusfilter.js.map +1 -0
- package/models/components/computerstatusoutcome.d.ts +30 -0
- package/models/components/computerstatusoutcome.d.ts.map +1 -0
- package/models/components/computerstatusoutcome.js +58 -0
- package/models/components/computerstatusoutcome.js.map +1 -0
- package/models/components/currencycode.d.ts +32 -0
- package/models/components/currencycode.d.ts.map +1 -0
- package/models/components/currencycode.js +69 -0
- package/models/components/currencycode.js.map +1 -0
- package/models/components/customtask.d.ts +13 -0
- package/models/components/customtask.d.ts.map +1 -0
- package/models/components/customtask.js +50 -0
- package/models/components/customtask.js.map +1 -0
- package/models/components/employmentstatus.d.ts +33 -0
- package/models/components/employmentstatus.d.ts.map +1 -0
- package/models/components/employmentstatus.js +60 -0
- package/models/components/employmentstatus.js.map +1 -0
- package/models/components/externalfindingseverity.d.ts +18 -0
- package/models/components/externalfindingseverity.d.ts.map +1 -0
- package/models/components/externalfindingseverity.js +52 -0
- package/models/components/externalfindingseverity.js.map +1 -0
- package/models/components/externalfindingseveritytype.d.ts +12 -0
- package/models/components/externalfindingseveritytype.d.ts.map +1 -0
- package/models/components/externalfindingseveritytype.js +49 -0
- package/models/components/externalfindingseveritytype.js.map +1 -0
- package/models/components/index.d.ts +50 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +50 -0
- package/models/components/index.js.map +1 -1
- package/models/components/installdevicemonitoringtasksummary.d.ts +47 -0
- package/models/components/installdevicemonitoringtasksummary.d.ts.map +1 -0
- package/models/components/installdevicemonitoringtasksummary.js +65 -0
- package/models/components/installdevicemonitoringtasksummary.js.map +1 -0
- package/models/components/integrationbasedpersoninfosource.d.ts +15 -0
- package/models/components/integrationbasedpersoninfosource.d.ts.map +1 -0
- package/models/components/integrationbasedpersoninfosource.js +52 -0
- package/models/components/integrationbasedpersoninfosource.js.map +1 -0
- package/models/components/keyvaluepair.d.ts +17 -0
- package/models/components/keyvaluepair.d.ts.map +1 -0
- package/models/components/keyvaluepair.js +51 -0
- package/models/components/keyvaluepair.js.map +1 -0
- package/models/components/leavestatus.d.ts +16 -0
- package/models/components/leavestatus.d.ts.map +1 -0
- package/models/components/leavestatus.js +51 -0
- package/models/components/leavestatus.js.map +1 -0
- package/models/components/monitoredcomputer.d.ts +91 -0
- package/models/components/monitoredcomputer.d.ts.map +1 -0
- package/models/components/monitoredcomputer.js +81 -0
- package/models/components/monitoredcomputer.js.map +1 -0
- package/models/components/operatingsystemtype.d.ts +17 -0
- package/models/components/operatingsystemtype.d.ts.map +1 -0
- package/models/components/operatingsystemtype.js +51 -0
- package/models/components/operatingsystemtype.js.map +1 -0
- package/models/components/paginatedresponseauditorapivulnerability.d.ts +22 -0
- package/models/components/paginatedresponseauditorapivulnerability.d.ts.map +1 -0
- package/models/components/paginatedresponseauditorapivulnerability.js +61 -0
- package/models/components/paginatedresponseauditorapivulnerability.js.map +1 -0
- package/models/components/paginatedresponsemonitoredcomputer.d.ts +22 -0
- package/models/components/paginatedresponsemonitoredcomputer.d.ts.map +1 -0
- package/models/components/paginatedresponsemonitoredcomputer.js +61 -0
- package/models/components/paginatedresponsemonitoredcomputer.js.map +1 -0
- package/models/components/paginatedresponseperson.d.ts +22 -0
- package/models/components/paginatedresponseperson.d.ts.map +1 -0
- package/models/components/paginatedresponseperson.js +61 -0
- package/models/components/paginatedresponseperson.js.map +1 -0
- package/models/components/paginatedresponsevendor.d.ts +22 -0
- package/models/components/paginatedresponsevendor.d.ts.map +1 -0
- package/models/components/paginatedresponsevendor.js +61 -0
- package/models/components/paginatedresponsevendor.js.map +1 -0
- package/models/components/paginatedresponsevulnerabilityremediation.d.ts +22 -0
- package/models/components/paginatedresponsevulnerabilityremediation.d.ts.map +1 -0
- package/models/components/paginatedresponsevulnerabilityremediation.js +61 -0
- package/models/components/paginatedresponsevulnerabilityremediation.js.map +1 -0
- package/models/components/paginatedresponsevulnerableasset.d.ts +22 -0
- package/models/components/paginatedresponsevulnerableasset.d.ts.map +1 -0
- package/models/components/paginatedresponsevulnerableasset.js +61 -0
- package/models/components/paginatedresponsevulnerableasset.js.map +1 -0
- package/models/components/person.d.ts +169 -0
- package/models/components/person.d.ts.map +1 -0
- package/models/components/person.js +125 -0
- package/models/components/person.js.map +1 -0
- package/models/components/personinfosource.d.ts +14 -0
- package/models/components/personinfosource.d.ts.map +1 -0
- package/models/components/personinfosource.js +55 -0
- package/models/components/personinfosource.js.map +1 -0
- package/models/components/personnelperson.d.ts +8 -8
- package/models/components/personnelperson.d.ts.map +1 -1
- package/models/components/personnelperson.js +11 -9
- package/models/components/personnelperson.js.map +1 -1
- package/models/components/scimbasedpersoninfosource.d.ts +13 -0
- package/models/components/scimbasedpersoninfosource.d.ts.map +1 -0
- package/models/components/scimbasedpersoninfosource.js +50 -0
- package/models/components/scimbasedpersoninfosource.js.map +1 -0
- package/models/components/taskssummarystatus.d.ts +44 -0
- package/models/components/taskssummarystatus.d.ts.map +1 -0
- package/models/components/taskssummarystatus.js +68 -0
- package/models/components/taskssummarystatus.js.map +1 -0
- package/models/components/taskstatus.d.ts +32 -0
- package/models/components/taskstatus.d.ts.map +1 -0
- package/models/components/taskstatus.js +61 -0
- package/models/components/taskstatus.js.map +1 -0
- package/models/components/tasksummarydetails.d.ts +42 -0
- package/models/components/tasksummarydetails.d.ts.map +1 -0
- package/models/components/tasksummarydetails.js +61 -0
- package/models/components/tasksummarydetails.js.map +1 -0
- package/models/components/tasktype.d.ts +34 -0
- package/models/components/tasktype.d.ts.map +1 -0
- package/models/components/tasktype.js +62 -0
- package/models/components/tasktype.js.map +1 -0
- package/models/components/tasktypeacceptpolicies.d.ts +9 -0
- package/models/components/tasktypeacceptpolicies.d.ts.map +1 -0
- package/models/components/tasktypeacceptpolicies.js +46 -0
- package/models/components/tasktypeacceptpolicies.js.map +1 -0
- package/models/components/tasktypecompletebackgroundchecks.d.ts +9 -0
- package/models/components/tasktypecompletebackgroundchecks.d.ts.map +1 -0
- package/models/components/tasktypecompletebackgroundchecks.js +46 -0
- package/models/components/tasktypecompletebackgroundchecks.js.map +1 -0
- package/models/components/tasktypecompletecustomoffboardingtasks.d.ts +9 -0
- package/models/components/tasktypecompletecustomoffboardingtasks.d.ts.map +1 -0
- package/models/components/tasktypecompletecustomoffboardingtasks.js +46 -0
- package/models/components/tasktypecompletecustomoffboardingtasks.js.map +1 -0
- package/models/components/tasktypecompletecustomtasks.d.ts +9 -0
- package/models/components/tasktypecompletecustomtasks.d.ts.map +1 -0
- package/models/components/tasktypecompletecustomtasks.js +46 -0
- package/models/components/tasktypecompletecustomtasks.js.map +1 -0
- package/models/components/tasktypecompletetrainings.d.ts +9 -0
- package/models/components/tasktypecompletetrainings.d.ts.map +1 -0
- package/models/components/tasktypecompletetrainings.js +46 -0
- package/models/components/tasktypecompletetrainings.js.map +1 -0
- package/models/components/tasktypeinstalldevicemonitoring.d.ts +9 -0
- package/models/components/tasktypeinstalldevicemonitoring.d.ts.map +1 -0
- package/models/components/tasktypeinstalldevicemonitoring.js +46 -0
- package/models/components/tasktypeinstalldevicemonitoring.js.map +1 -0
- package/models/components/training.d.ts +13 -0
- package/models/components/training.d.ts.map +1 -0
- package/models/components/training.js +50 -0
- package/models/components/training.js.map +1 -0
- package/models/components/vantabasedpersoninfosource.d.ts +13 -0
- package/models/components/vantabasedpersoninfosource.d.ts.map +1 -0
- package/models/components/vantabasedpersoninfosource.js +50 -0
- package/models/components/vantabasedpersoninfosource.js.map +1 -0
- package/models/components/vendor.d.ts +498 -0
- package/models/components/vendor.d.ts.map +1 -0
- package/models/components/vendor.js +408 -0
- package/models/components/vendor.js.map +1 -0
- package/models/components/vendordecisionstatus.d.ts +11 -0
- package/models/components/vendordecisionstatus.d.ts.map +1 -0
- package/models/components/vendordecisionstatus.js +48 -0
- package/models/components/vendordecisionstatus.js.map +1 -0
- package/models/components/vendorrisklevel.d.ts +33 -0
- package/models/components/vendorrisklevel.d.ts.map +1 -0
- package/models/components/vendorrisklevel.js +60 -0
- package/models/components/vendorrisklevel.js.map +1 -0
- package/models/components/vendorstatus.d.ts +27 -0
- package/models/components/vendorstatus.d.ts.map +1 -0
- package/models/components/vendorstatus.js +56 -0
- package/models/components/vendorstatus.js.map +1 -0
- package/models/components/vulnerabilityremediation.d.ts +37 -0
- package/models/components/vulnerabilityremediation.d.ts.map +1 -0
- package/models/components/vulnerabilityremediation.js +56 -0
- package/models/components/vulnerabilityremediation.js.map +1 -0
- package/models/components/vulnerabilitytype.d.ts +11 -0
- package/models/components/vulnerabilitytype.d.ts.map +1 -0
- package/models/components/vulnerabilitytype.js +48 -0
- package/models/components/vulnerabilitytype.js.map +1 -0
- package/models/components/vulnerableasset.d.ts +35 -0
- package/models/components/vulnerableasset.d.ts.map +1 -0
- package/models/components/vulnerableasset.js +57 -0
- package/models/components/vulnerableasset.js.map +1 -0
- package/models/components/vulnerableassetscanner.d.ts +70 -0
- package/models/components/vulnerableassetscanner.d.ts.map +1 -0
- package/models/components/vulnerableassetscanner.js +65 -0
- package/models/components/vulnerableassetscanner.js.map +1 -0
- package/models/components/vulnerableassettype.d.ts +25 -0
- package/models/components/vulnerableassettype.d.ts.map +1 -0
- package/models/components/vulnerableassettype.js +59 -0
- package/models/components/vulnerableassettype.js.map +1 -0
- package/models/operations/getvulnerableassets.d.ts +40 -0
- package/models/operations/getvulnerableassets.d.ts.map +1 -0
- package/models/operations/getvulnerableassets.js +56 -0
- package/models/operations/getvulnerableassets.js.map +1 -0
- package/models/operations/index.d.ts +6 -0
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +6 -0
- package/models/operations/index.js.map +1 -1
- package/models/operations/listmonitoredcomputersinauditscope.d.ts +22 -0
- package/models/operations/listmonitoredcomputersinauditscope.d.ts.map +1 -0
- package/models/operations/listmonitoredcomputersinauditscope.js +53 -0
- package/models/operations/listmonitoredcomputersinauditscope.js.map +1 -0
- package/models/operations/listpeopleinauditscope.d.ts +38 -0
- package/models/operations/listpeopleinauditscope.d.ts.map +1 -0
- package/models/operations/listpeopleinauditscope.js +56 -0
- package/models/operations/listpeopleinauditscope.js.map +1 -0
- package/models/operations/listvendorsinauditscope.d.ts +16 -0
- package/models/operations/listvendorsinauditscope.d.ts.map +1 -0
- package/models/operations/listvendorsinauditscope.js +51 -0
- package/models/operations/listvendorsinauditscope.js.map +1 -0
- package/models/operations/listvulnerabilities.d.ts +75 -0
- package/models/operations/listvulnerabilities.d.ts.map +1 -0
- package/models/operations/listvulnerabilities.js +63 -0
- package/models/operations/listvulnerabilities.js.map +1 -0
- package/models/operations/listvulnerabilityremediationsinauditscope.d.ts +45 -0
- package/models/operations/listvulnerabilityremediationsinauditscope.d.ts.map +1 -0
- package/models/operations/listvulnerabilityremediationsinauditscope.js +57 -0
- package/models/operations/listvulnerabilityremediationsinauditscope.js.map +1 -0
- package/package.json +1 -1
- package/sdk/audits.d.ts +68 -0
- package/sdk/audits.d.ts.map +1 -1
- package/sdk/audits.js +86 -0
- package/sdk/audits.js.map +1 -1
- package/src/funcs/auditsGetVulnerableAssets.ts +183 -0
- package/src/funcs/auditsListMonitoredComputersInAuditScope.ts +185 -0
- package/src/funcs/auditsListPeopleInAuditScope.ts +182 -0
- package/src/funcs/auditsListVendorsInAuditScope.ts +179 -0
- package/src/funcs/auditsListVulnerabilities.ts +194 -0
- package/src/funcs/auditsListVulnerabilityRemediationsInAuditScope.ts +190 -0
- package/src/lib/config.ts +3 -3
- package/src/models/components/acceptpoliciestasksummary.ts +155 -0
- package/src/models/components/auditorapivulnerability.ts +200 -0
- package/src/models/components/completebackgroundcheckstasksummary.ts +107 -0
- package/src/models/components/completecustomtaskstasksummary.ts +111 -0
- package/src/models/components/completeoffboardingcustomtaskstasksummary.ts +125 -0
- package/src/models/components/completetrainingstasksummary.ts +108 -0
- package/src/models/components/computerstatus.ts +47 -0
- package/src/models/components/computerstatusfilter.ts +40 -0
- package/src/models/components/computerstatusoutcome.ts +37 -0
- package/src/models/components/currencycode.ts +38 -0
- package/src/models/components/customtask.ts +34 -0
- package/src/models/components/employmentstatus.ts +40 -0
- package/src/models/components/externalfindingseverity.ts +27 -0
- package/src/models/components/externalfindingseveritytype.ts +21 -0
- package/src/models/components/index.ts +50 -0
- package/src/models/components/installdevicemonitoringtasksummary.ts +104 -0
- package/src/models/components/integrationbasedpersoninfosource.ts +38 -0
- package/src/models/components/keyvaluepair.ts +39 -0
- package/src/models/components/leavestatus.ts +22 -0
- package/src/models/components/monitoredcomputer.ts +167 -0
- package/src/models/components/operatingsystemtype.ts +24 -0
- package/src/models/components/paginatedresponseauditorapivulnerability.ts +79 -0
- package/src/models/components/paginatedresponsemonitoredcomputer.ts +73 -0
- package/src/models/components/paginatedresponseperson.ts +61 -0
- package/src/models/components/paginatedresponsevendor.ts +61 -0
- package/src/models/components/paginatedresponsevulnerabilityremediation.ts +79 -0
- package/src/models/components/paginatedresponsevulnerableasset.ts +70 -0
- package/src/models/components/person.ts +323 -0
- package/src/models/components/personinfosource.ts +49 -0
- package/src/models/components/personnelperson.ts +20 -16
- package/src/models/components/scimbasedpersoninfosource.ts +34 -0
- package/src/models/components/taskssummarystatus.ts +53 -0
- package/src/models/components/taskstatus.ts +39 -0
- package/src/models/components/tasksummarydetails.ts +87 -0
- package/src/models/components/tasktype.ts +40 -0
- package/src/models/components/tasktypeacceptpolicies.ts +16 -0
- package/src/models/components/tasktypecompletebackgroundchecks.ts +18 -0
- package/src/models/components/tasktypecompletecustomoffboardingtasks.ts +19 -0
- package/src/models/components/tasktypecompletecustomtasks.ts +18 -0
- package/src/models/components/tasktypecompletetrainings.ts +18 -0
- package/src/models/components/tasktypeinstalldevicemonitoring.ts +18 -0
- package/src/models/components/training.ts +34 -0
- package/src/models/components/vantabasedpersoninfosource.ts +34 -0
- package/src/models/components/vendor.ts +669 -0
- package/src/models/components/vendordecisionstatus.ts +18 -0
- package/src/models/components/vendorrisklevel.ts +40 -0
- package/src/models/components/vendorstatus.ts +33 -0
- package/src/models/components/vulnerabilityremediation.ts +70 -0
- package/src/models/components/vulnerabilitytype.ts +18 -0
- package/src/models/components/vulnerableasset.ts +67 -0
- package/src/models/components/vulnerableassetscanner.ts +107 -0
- package/src/models/components/vulnerableassettype.ts +34 -0
- package/src/models/operations/getvulnerableassets.ts +65 -0
- package/src/models/operations/index.ts +6 -0
- package/src/models/operations/listmonitoredcomputersinauditscope.ts +52 -0
- package/src/models/operations/listpeopleinauditscope.ts +69 -0
- package/src/models/operations/listvendorsinauditscope.ts +39 -0
- package/src/models/operations/listvulnerabilities.ts +107 -0
- package/src/models/operations/listvulnerabilityremediationsinauditscope.ts +75 -0
- package/src/sdk/audits.ts +134 -0
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
import {
|
|
10
|
+
ExternalFindingSeverityType,
|
|
11
|
+
ExternalFindingSeverityType$inboundSchema,
|
|
12
|
+
} from "./externalfindingseveritytype.js";
|
|
13
|
+
import {
|
|
14
|
+
VulnerabilityType,
|
|
15
|
+
VulnerabilityType$inboundSchema,
|
|
16
|
+
} from "./vulnerabilitytype.js";
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Metadata for the deactivation of the vulnerability.
|
|
20
|
+
*/
|
|
21
|
+
export type DeactivateMetadata = {
|
|
22
|
+
/**
|
|
23
|
+
* Whether the vulnerability is deactivated indefinitely.
|
|
24
|
+
*/
|
|
25
|
+
isVulnDeactivatedIndefinitely: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Date when the vulnerability will be reactivated.
|
|
28
|
+
*/
|
|
29
|
+
deactivatedUntilDate: Date | null;
|
|
30
|
+
/**
|
|
31
|
+
* Reason for deactivating the vulnerability.
|
|
32
|
+
*/
|
|
33
|
+
deactivationReason: string;
|
|
34
|
+
/**
|
|
35
|
+
* Date when the vulnerability was deactivated.
|
|
36
|
+
*/
|
|
37
|
+
deactivatedOnDate: Date;
|
|
38
|
+
/**
|
|
39
|
+
* Identifier of the user who deactivated the vulnerability.
|
|
40
|
+
*/
|
|
41
|
+
deactivatedBy: string;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export type AuditorApiVulnerability = {
|
|
45
|
+
/**
|
|
46
|
+
* Unique identifier for the vulnerability.
|
|
47
|
+
*/
|
|
48
|
+
id: string;
|
|
49
|
+
/**
|
|
50
|
+
* Display name of the vulnerability.
|
|
51
|
+
*/
|
|
52
|
+
name: string;
|
|
53
|
+
/**
|
|
54
|
+
* Description of the vulnerability.
|
|
55
|
+
*/
|
|
56
|
+
description: string;
|
|
57
|
+
/**
|
|
58
|
+
* Integration that the vulnerability is scanned by.
|
|
59
|
+
*/
|
|
60
|
+
integrationId: string;
|
|
61
|
+
/**
|
|
62
|
+
* Identifier for the package that the vulnerability is found on.
|
|
63
|
+
*
|
|
64
|
+
* @remarks
|
|
65
|
+
* Only relevant to vulnerabilities of type COMMON or GROUPED.
|
|
66
|
+
*/
|
|
67
|
+
packageIdentifier: string | null;
|
|
68
|
+
vulnerabilityType: VulnerabilityType;
|
|
69
|
+
/**
|
|
70
|
+
* Unique identifier for the underlying resource that the vulnerability is found on.
|
|
71
|
+
*/
|
|
72
|
+
targetId: string;
|
|
73
|
+
/**
|
|
74
|
+
* Date when the vulnerability was first detected by Vanta.
|
|
75
|
+
*/
|
|
76
|
+
firstDetectedDate: Date;
|
|
77
|
+
/**
|
|
78
|
+
* Date when the vulnerability was first detected by the source.
|
|
79
|
+
*/
|
|
80
|
+
sourceDetectedDate: Date | null;
|
|
81
|
+
/**
|
|
82
|
+
* Date when the vulnerability was last detected.
|
|
83
|
+
*/
|
|
84
|
+
lastDetectedDate: Date | null;
|
|
85
|
+
severity: ExternalFindingSeverityType;
|
|
86
|
+
/**
|
|
87
|
+
* CVSS severity score of the vulnerability.
|
|
88
|
+
*/
|
|
89
|
+
cvssSeverityScore: number | null;
|
|
90
|
+
/**
|
|
91
|
+
* Scanner score of the vulnerability.
|
|
92
|
+
*/
|
|
93
|
+
scannerScore: number | null;
|
|
94
|
+
/**
|
|
95
|
+
* Whether the vulnerability is fixable.
|
|
96
|
+
*/
|
|
97
|
+
isFixable: boolean;
|
|
98
|
+
/**
|
|
99
|
+
* Date when the vulnerability should be remediated by.
|
|
100
|
+
*/
|
|
101
|
+
remediateByDate: Date | null;
|
|
102
|
+
/**
|
|
103
|
+
* Related vulnerabilities.
|
|
104
|
+
*
|
|
105
|
+
* @remarks
|
|
106
|
+
* Only relevant to vulnerabilities of type GROUPED.
|
|
107
|
+
*/
|
|
108
|
+
relatedVulns: Array<string>;
|
|
109
|
+
/**
|
|
110
|
+
* Related URLs.
|
|
111
|
+
*/
|
|
112
|
+
relatedUrls: Array<string>;
|
|
113
|
+
/**
|
|
114
|
+
* External URL for the vulnerability.
|
|
115
|
+
*/
|
|
116
|
+
externalURL: string;
|
|
117
|
+
/**
|
|
118
|
+
* Scanning tool that detected the vulnerability
|
|
119
|
+
*/
|
|
120
|
+
scanSource?: string | undefined;
|
|
121
|
+
/**
|
|
122
|
+
* Metadata for the deactivation of the vulnerability.
|
|
123
|
+
*/
|
|
124
|
+
deactivateMetadata: DeactivateMetadata | null;
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
/** @internal */
|
|
128
|
+
export const DeactivateMetadata$inboundSchema: z.ZodType<
|
|
129
|
+
DeactivateMetadata,
|
|
130
|
+
z.ZodTypeDef,
|
|
131
|
+
unknown
|
|
132
|
+
> = z.object({
|
|
133
|
+
isVulnDeactivatedIndefinitely: z.boolean(),
|
|
134
|
+
deactivatedUntilDate: z.nullable(
|
|
135
|
+
z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
136
|
+
),
|
|
137
|
+
deactivationReason: z.string(),
|
|
138
|
+
deactivatedOnDate: z.string().datetime({ offset: true }).transform(v =>
|
|
139
|
+
new Date(v)
|
|
140
|
+
),
|
|
141
|
+
deactivatedBy: z.string(),
|
|
142
|
+
});
|
|
143
|
+
|
|
144
|
+
export function deactivateMetadataFromJSON(
|
|
145
|
+
jsonString: string,
|
|
146
|
+
): SafeParseResult<DeactivateMetadata, SDKValidationError> {
|
|
147
|
+
return safeParse(
|
|
148
|
+
jsonString,
|
|
149
|
+
(x) => DeactivateMetadata$inboundSchema.parse(JSON.parse(x)),
|
|
150
|
+
`Failed to parse 'DeactivateMetadata' from JSON`,
|
|
151
|
+
);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
/** @internal */
|
|
155
|
+
export const AuditorApiVulnerability$inboundSchema: z.ZodType<
|
|
156
|
+
AuditorApiVulnerability,
|
|
157
|
+
z.ZodTypeDef,
|
|
158
|
+
unknown
|
|
159
|
+
> = z.object({
|
|
160
|
+
id: z.string(),
|
|
161
|
+
name: z.string(),
|
|
162
|
+
description: z.string(),
|
|
163
|
+
integrationId: z.string(),
|
|
164
|
+
packageIdentifier: z.nullable(z.string()),
|
|
165
|
+
vulnerabilityType: VulnerabilityType$inboundSchema,
|
|
166
|
+
targetId: z.string(),
|
|
167
|
+
firstDetectedDate: z.string().datetime({ offset: true }).transform(v =>
|
|
168
|
+
new Date(v)
|
|
169
|
+
),
|
|
170
|
+
sourceDetectedDate: z.nullable(
|
|
171
|
+
z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
172
|
+
),
|
|
173
|
+
lastDetectedDate: z.nullable(
|
|
174
|
+
z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
175
|
+
),
|
|
176
|
+
severity: ExternalFindingSeverityType$inboundSchema,
|
|
177
|
+
cvssSeverityScore: z.nullable(z.number()),
|
|
178
|
+
scannerScore: z.nullable(z.number()),
|
|
179
|
+
isFixable: z.boolean(),
|
|
180
|
+
remediateByDate: z.nullable(
|
|
181
|
+
z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
182
|
+
),
|
|
183
|
+
relatedVulns: z.array(z.string()),
|
|
184
|
+
relatedUrls: z.array(z.string()),
|
|
185
|
+
externalURL: z.string(),
|
|
186
|
+
scanSource: z.string().optional(),
|
|
187
|
+
deactivateMetadata: z.nullable(
|
|
188
|
+
z.lazy(() => DeactivateMetadata$inboundSchema),
|
|
189
|
+
),
|
|
190
|
+
});
|
|
191
|
+
|
|
192
|
+
export function auditorApiVulnerabilityFromJSON(
|
|
193
|
+
jsonString: string,
|
|
194
|
+
): SafeParseResult<AuditorApiVulnerability, SDKValidationError> {
|
|
195
|
+
return safeParse(
|
|
196
|
+
jsonString,
|
|
197
|
+
(x) => AuditorApiVulnerability$inboundSchema.parse(JSON.parse(x)),
|
|
198
|
+
`Failed to parse 'AuditorApiVulnerability' from JSON`,
|
|
199
|
+
);
|
|
200
|
+
}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
import { TaskStatus, TaskStatus$inboundSchema } from "./taskstatus.js";
|
|
10
|
+
import {
|
|
11
|
+
TaskTypeCOMPLETEBACKGROUNDCHECKS,
|
|
12
|
+
TaskTypeCOMPLETEBACKGROUNDCHECKS$inboundSchema,
|
|
13
|
+
} from "./tasktypecompletebackgroundchecks.js";
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* If the task is disabled, the reason and date when it was disabled.
|
|
17
|
+
*/
|
|
18
|
+
export type CompleteBackgroundChecksTaskSummaryDisabled = {
|
|
19
|
+
date: Date;
|
|
20
|
+
reason: string | null;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Task summary for completing background checks.
|
|
25
|
+
*/
|
|
26
|
+
export type CompleteBackgroundChecksTaskSummary = {
|
|
27
|
+
taskType: TaskTypeCOMPLETEBACKGROUNDCHECKS;
|
|
28
|
+
/**
|
|
29
|
+
* The status of a task.
|
|
30
|
+
*
|
|
31
|
+
* @remarks
|
|
32
|
+
* - COMPLETE: The task has been completed.
|
|
33
|
+
* - DUE_SOON: The task is due soon.
|
|
34
|
+
* - OVERDUE: The task is overdue.
|
|
35
|
+
* - NONE: The task is not assigned.
|
|
36
|
+
*/
|
|
37
|
+
status: TaskStatus;
|
|
38
|
+
/**
|
|
39
|
+
* The due date of the task.
|
|
40
|
+
*/
|
|
41
|
+
dueDate: Date | null;
|
|
42
|
+
/**
|
|
43
|
+
* The date the task was completed.
|
|
44
|
+
*/
|
|
45
|
+
completionDate: Date | null;
|
|
46
|
+
/**
|
|
47
|
+
* If the task is disabled, the reason and date when it was disabled.
|
|
48
|
+
*/
|
|
49
|
+
disabled: CompleteBackgroundChecksTaskSummaryDisabled | null;
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
/** @internal */
|
|
53
|
+
export const CompleteBackgroundChecksTaskSummaryDisabled$inboundSchema:
|
|
54
|
+
z.ZodType<
|
|
55
|
+
CompleteBackgroundChecksTaskSummaryDisabled,
|
|
56
|
+
z.ZodTypeDef,
|
|
57
|
+
unknown
|
|
58
|
+
> = z.object({
|
|
59
|
+
date: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
60
|
+
reason: z.nullable(z.string()),
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
export function completeBackgroundChecksTaskSummaryDisabledFromJSON(
|
|
64
|
+
jsonString: string,
|
|
65
|
+
): SafeParseResult<
|
|
66
|
+
CompleteBackgroundChecksTaskSummaryDisabled,
|
|
67
|
+
SDKValidationError
|
|
68
|
+
> {
|
|
69
|
+
return safeParse(
|
|
70
|
+
jsonString,
|
|
71
|
+
(x) =>
|
|
72
|
+
CompleteBackgroundChecksTaskSummaryDisabled$inboundSchema.parse(
|
|
73
|
+
JSON.parse(x),
|
|
74
|
+
),
|
|
75
|
+
`Failed to parse 'CompleteBackgroundChecksTaskSummaryDisabled' from JSON`,
|
|
76
|
+
);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/** @internal */
|
|
80
|
+
export const CompleteBackgroundChecksTaskSummary$inboundSchema: z.ZodType<
|
|
81
|
+
CompleteBackgroundChecksTaskSummary,
|
|
82
|
+
z.ZodTypeDef,
|
|
83
|
+
unknown
|
|
84
|
+
> = z.object({
|
|
85
|
+
taskType: TaskTypeCOMPLETEBACKGROUNDCHECKS$inboundSchema,
|
|
86
|
+
status: TaskStatus$inboundSchema,
|
|
87
|
+
dueDate: z.nullable(
|
|
88
|
+
z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
89
|
+
),
|
|
90
|
+
completionDate: z.nullable(
|
|
91
|
+
z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
92
|
+
),
|
|
93
|
+
disabled: z.nullable(
|
|
94
|
+
z.lazy(() => CompleteBackgroundChecksTaskSummaryDisabled$inboundSchema),
|
|
95
|
+
),
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
export function completeBackgroundChecksTaskSummaryFromJSON(
|
|
99
|
+
jsonString: string,
|
|
100
|
+
): SafeParseResult<CompleteBackgroundChecksTaskSummary, SDKValidationError> {
|
|
101
|
+
return safeParse(
|
|
102
|
+
jsonString,
|
|
103
|
+
(x) =>
|
|
104
|
+
CompleteBackgroundChecksTaskSummary$inboundSchema.parse(JSON.parse(x)),
|
|
105
|
+
`Failed to parse 'CompleteBackgroundChecksTaskSummary' from JSON`,
|
|
106
|
+
);
|
|
107
|
+
}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
import { CustomTask, CustomTask$inboundSchema } from "./customtask.js";
|
|
10
|
+
import { TaskStatus, TaskStatus$inboundSchema } from "./taskstatus.js";
|
|
11
|
+
import {
|
|
12
|
+
TaskTypeCOMPLETECUSTOMTASKS,
|
|
13
|
+
TaskTypeCOMPLETECUSTOMTASKS$inboundSchema,
|
|
14
|
+
} from "./tasktypecompletecustomtasks.js";
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* If the task is disabled, the reason and date when it was disabled.
|
|
18
|
+
*/
|
|
19
|
+
export type CompleteCustomTasksTaskSummaryDisabled = {
|
|
20
|
+
date: Date;
|
|
21
|
+
reason: string | null;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Task summary for completing all custom tasks.
|
|
26
|
+
*/
|
|
27
|
+
export type CompleteCustomTasksTaskSummary = {
|
|
28
|
+
taskType: TaskTypeCOMPLETECUSTOMTASKS;
|
|
29
|
+
/**
|
|
30
|
+
* The status of a task.
|
|
31
|
+
*
|
|
32
|
+
* @remarks
|
|
33
|
+
* - COMPLETE: The task has been completed.
|
|
34
|
+
* - DUE_SOON: The task is due soon.
|
|
35
|
+
* - OVERDUE: The task is overdue.
|
|
36
|
+
* - NONE: The task is not assigned.
|
|
37
|
+
*/
|
|
38
|
+
status: TaskStatus;
|
|
39
|
+
/**
|
|
40
|
+
* The due date of the task.
|
|
41
|
+
*/
|
|
42
|
+
dueDate: Date | null;
|
|
43
|
+
/**
|
|
44
|
+
* The date the task was completed.
|
|
45
|
+
*/
|
|
46
|
+
completionDate: Date | null;
|
|
47
|
+
/**
|
|
48
|
+
* If the task is disabled, the reason and date when it was disabled.
|
|
49
|
+
*/
|
|
50
|
+
disabled: CompleteCustomTasksTaskSummaryDisabled | null;
|
|
51
|
+
/**
|
|
52
|
+
* Incomplete custom tasks that are relevant given a person's requirements.
|
|
53
|
+
*/
|
|
54
|
+
incompleteCustomTasks: Array<CustomTask>;
|
|
55
|
+
/**
|
|
56
|
+
* Custom tasks that have been completed and are relevant given a person's current requirements.
|
|
57
|
+
*/
|
|
58
|
+
completedCustomTasks: Array<CustomTask>;
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
/** @internal */
|
|
62
|
+
export const CompleteCustomTasksTaskSummaryDisabled$inboundSchema: z.ZodType<
|
|
63
|
+
CompleteCustomTasksTaskSummaryDisabled,
|
|
64
|
+
z.ZodTypeDef,
|
|
65
|
+
unknown
|
|
66
|
+
> = z.object({
|
|
67
|
+
date: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
68
|
+
reason: z.nullable(z.string()),
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
export function completeCustomTasksTaskSummaryDisabledFromJSON(
|
|
72
|
+
jsonString: string,
|
|
73
|
+
): SafeParseResult<CompleteCustomTasksTaskSummaryDisabled, SDKValidationError> {
|
|
74
|
+
return safeParse(
|
|
75
|
+
jsonString,
|
|
76
|
+
(x) =>
|
|
77
|
+
CompleteCustomTasksTaskSummaryDisabled$inboundSchema.parse(JSON.parse(x)),
|
|
78
|
+
`Failed to parse 'CompleteCustomTasksTaskSummaryDisabled' from JSON`,
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/** @internal */
|
|
83
|
+
export const CompleteCustomTasksTaskSummary$inboundSchema: z.ZodType<
|
|
84
|
+
CompleteCustomTasksTaskSummary,
|
|
85
|
+
z.ZodTypeDef,
|
|
86
|
+
unknown
|
|
87
|
+
> = z.object({
|
|
88
|
+
taskType: TaskTypeCOMPLETECUSTOMTASKS$inboundSchema,
|
|
89
|
+
status: TaskStatus$inboundSchema,
|
|
90
|
+
dueDate: z.nullable(
|
|
91
|
+
z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
92
|
+
),
|
|
93
|
+
completionDate: z.nullable(
|
|
94
|
+
z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
95
|
+
),
|
|
96
|
+
disabled: z.nullable(
|
|
97
|
+
z.lazy(() => CompleteCustomTasksTaskSummaryDisabled$inboundSchema),
|
|
98
|
+
),
|
|
99
|
+
incompleteCustomTasks: z.array(CustomTask$inboundSchema),
|
|
100
|
+
completedCustomTasks: z.array(CustomTask$inboundSchema),
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
export function completeCustomTasksTaskSummaryFromJSON(
|
|
104
|
+
jsonString: string,
|
|
105
|
+
): SafeParseResult<CompleteCustomTasksTaskSummary, SDKValidationError> {
|
|
106
|
+
return safeParse(
|
|
107
|
+
jsonString,
|
|
108
|
+
(x) => CompleteCustomTasksTaskSummary$inboundSchema.parse(JSON.parse(x)),
|
|
109
|
+
`Failed to parse 'CompleteCustomTasksTaskSummary' from JSON`,
|
|
110
|
+
);
|
|
111
|
+
}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
import { CustomTask, CustomTask$inboundSchema } from "./customtask.js";
|
|
10
|
+
import { TaskStatus, TaskStatus$inboundSchema } from "./taskstatus.js";
|
|
11
|
+
import {
|
|
12
|
+
TaskTypeCOMPLETECUSTOMOFFBOARDINGTASKS,
|
|
13
|
+
TaskTypeCOMPLETECUSTOMOFFBOARDINGTASKS$inboundSchema,
|
|
14
|
+
} from "./tasktypecompletecustomoffboardingtasks.js";
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* If the task is disabled, the reason and date when it was disabled.
|
|
18
|
+
*/
|
|
19
|
+
export type CompleteOffboardingCustomTasksTaskSummaryDisabled = {
|
|
20
|
+
date: Date;
|
|
21
|
+
reason: string | null;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Task summary for completing all offboarding custom tasks.
|
|
26
|
+
*/
|
|
27
|
+
export type CompleteOffboardingCustomTasksTaskSummary = {
|
|
28
|
+
taskType: TaskTypeCOMPLETECUSTOMOFFBOARDINGTASKS;
|
|
29
|
+
/**
|
|
30
|
+
* The status of a task.
|
|
31
|
+
*
|
|
32
|
+
* @remarks
|
|
33
|
+
* - COMPLETE: The task has been completed.
|
|
34
|
+
* - DUE_SOON: The task is due soon.
|
|
35
|
+
* - OVERDUE: The task is overdue.
|
|
36
|
+
* - NONE: The task is not assigned.
|
|
37
|
+
*/
|
|
38
|
+
status: TaskStatus;
|
|
39
|
+
/**
|
|
40
|
+
* The due date of the task.
|
|
41
|
+
*/
|
|
42
|
+
dueDate: Date | null;
|
|
43
|
+
/**
|
|
44
|
+
* The date the task was completed.
|
|
45
|
+
*/
|
|
46
|
+
completionDate: Date | null;
|
|
47
|
+
/**
|
|
48
|
+
* If the task is disabled, the reason and date when it was disabled.
|
|
49
|
+
*/
|
|
50
|
+
disabled: CompleteOffboardingCustomTasksTaskSummaryDisabled | null;
|
|
51
|
+
/**
|
|
52
|
+
* Incomplete custom tasks that are relevant given a person's requirements.
|
|
53
|
+
*/
|
|
54
|
+
incompleteCustomOffboardingTasks: Array<CustomTask>;
|
|
55
|
+
/**
|
|
56
|
+
* Custom tasks that have been completed and are relevant given a person's current requirements.
|
|
57
|
+
*/
|
|
58
|
+
completedCustomOffboardingTasks: Array<CustomTask>;
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
/** @internal */
|
|
62
|
+
export const CompleteOffboardingCustomTasksTaskSummaryDisabled$inboundSchema:
|
|
63
|
+
z.ZodType<
|
|
64
|
+
CompleteOffboardingCustomTasksTaskSummaryDisabled,
|
|
65
|
+
z.ZodTypeDef,
|
|
66
|
+
unknown
|
|
67
|
+
> = z.object({
|
|
68
|
+
date: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
69
|
+
reason: z.nullable(z.string()),
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
export function completeOffboardingCustomTasksTaskSummaryDisabledFromJSON(
|
|
73
|
+
jsonString: string,
|
|
74
|
+
): SafeParseResult<
|
|
75
|
+
CompleteOffboardingCustomTasksTaskSummaryDisabled,
|
|
76
|
+
SDKValidationError
|
|
77
|
+
> {
|
|
78
|
+
return safeParse(
|
|
79
|
+
jsonString,
|
|
80
|
+
(x) =>
|
|
81
|
+
CompleteOffboardingCustomTasksTaskSummaryDisabled$inboundSchema.parse(
|
|
82
|
+
JSON.parse(x),
|
|
83
|
+
),
|
|
84
|
+
`Failed to parse 'CompleteOffboardingCustomTasksTaskSummaryDisabled' from JSON`,
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/** @internal */
|
|
89
|
+
export const CompleteOffboardingCustomTasksTaskSummary$inboundSchema: z.ZodType<
|
|
90
|
+
CompleteOffboardingCustomTasksTaskSummary,
|
|
91
|
+
z.ZodTypeDef,
|
|
92
|
+
unknown
|
|
93
|
+
> = z.object({
|
|
94
|
+
taskType: TaskTypeCOMPLETECUSTOMOFFBOARDINGTASKS$inboundSchema,
|
|
95
|
+
status: TaskStatus$inboundSchema,
|
|
96
|
+
dueDate: z.nullable(
|
|
97
|
+
z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
98
|
+
),
|
|
99
|
+
completionDate: z.nullable(
|
|
100
|
+
z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
101
|
+
),
|
|
102
|
+
disabled: z.nullable(
|
|
103
|
+
z.lazy(() =>
|
|
104
|
+
CompleteOffboardingCustomTasksTaskSummaryDisabled$inboundSchema
|
|
105
|
+
),
|
|
106
|
+
),
|
|
107
|
+
incompleteCustomOffboardingTasks: z.array(CustomTask$inboundSchema),
|
|
108
|
+
completedCustomOffboardingTasks: z.array(CustomTask$inboundSchema),
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
export function completeOffboardingCustomTasksTaskSummaryFromJSON(
|
|
112
|
+
jsonString: string,
|
|
113
|
+
): SafeParseResult<
|
|
114
|
+
CompleteOffboardingCustomTasksTaskSummary,
|
|
115
|
+
SDKValidationError
|
|
116
|
+
> {
|
|
117
|
+
return safeParse(
|
|
118
|
+
jsonString,
|
|
119
|
+
(x) =>
|
|
120
|
+
CompleteOffboardingCustomTasksTaskSummary$inboundSchema.parse(
|
|
121
|
+
JSON.parse(x),
|
|
122
|
+
),
|
|
123
|
+
`Failed to parse 'CompleteOffboardingCustomTasksTaskSummary' from JSON`,
|
|
124
|
+
);
|
|
125
|
+
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
import { TaskStatus, TaskStatus$inboundSchema } from "./taskstatus.js";
|
|
10
|
+
import {
|
|
11
|
+
TaskTypeCOMPLETETRAININGS,
|
|
12
|
+
TaskTypeCOMPLETETRAININGS$inboundSchema,
|
|
13
|
+
} from "./tasktypecompletetrainings.js";
|
|
14
|
+
import { Training, Training$inboundSchema } from "./training.js";
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* If the task is disabled, the reason and date when it was disabled.
|
|
18
|
+
*/
|
|
19
|
+
export type Disabled = {
|
|
20
|
+
date: Date;
|
|
21
|
+
reason: string | null;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Task summary for completing all trainings.
|
|
26
|
+
*/
|
|
27
|
+
export type CompleteTrainingsTaskSummary = {
|
|
28
|
+
taskType: TaskTypeCOMPLETETRAININGS;
|
|
29
|
+
/**
|
|
30
|
+
* The status of a task.
|
|
31
|
+
*
|
|
32
|
+
* @remarks
|
|
33
|
+
* - COMPLETE: The task has been completed.
|
|
34
|
+
* - DUE_SOON: The task is due soon.
|
|
35
|
+
* - OVERDUE: The task is overdue.
|
|
36
|
+
* - NONE: The task is not assigned.
|
|
37
|
+
*/
|
|
38
|
+
status: TaskStatus;
|
|
39
|
+
/**
|
|
40
|
+
* The due date of the task.
|
|
41
|
+
*/
|
|
42
|
+
dueDate: Date | null;
|
|
43
|
+
/**
|
|
44
|
+
* The date the task was completed.
|
|
45
|
+
*/
|
|
46
|
+
completionDate: Date | null;
|
|
47
|
+
/**
|
|
48
|
+
* If the task is disabled, the reason and date when it was disabled.
|
|
49
|
+
*/
|
|
50
|
+
disabled: Disabled | null;
|
|
51
|
+
/**
|
|
52
|
+
* Incomplete security trainings that are relevant given a person's requirements.
|
|
53
|
+
*/
|
|
54
|
+
incompleteTrainings: Array<Training>;
|
|
55
|
+
/**
|
|
56
|
+
* Security trainings that have been completed and are relevant given a person's current requirements.
|
|
57
|
+
*/
|
|
58
|
+
completedTrainings: Array<Training>;
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
/** @internal */
|
|
62
|
+
export const Disabled$inboundSchema: z.ZodType<
|
|
63
|
+
Disabled,
|
|
64
|
+
z.ZodTypeDef,
|
|
65
|
+
unknown
|
|
66
|
+
> = z.object({
|
|
67
|
+
date: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
68
|
+
reason: z.nullable(z.string()),
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
export function disabledFromJSON(
|
|
72
|
+
jsonString: string,
|
|
73
|
+
): SafeParseResult<Disabled, SDKValidationError> {
|
|
74
|
+
return safeParse(
|
|
75
|
+
jsonString,
|
|
76
|
+
(x) => Disabled$inboundSchema.parse(JSON.parse(x)),
|
|
77
|
+
`Failed to parse 'Disabled' from JSON`,
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/** @internal */
|
|
82
|
+
export const CompleteTrainingsTaskSummary$inboundSchema: z.ZodType<
|
|
83
|
+
CompleteTrainingsTaskSummary,
|
|
84
|
+
z.ZodTypeDef,
|
|
85
|
+
unknown
|
|
86
|
+
> = z.object({
|
|
87
|
+
taskType: TaskTypeCOMPLETETRAININGS$inboundSchema,
|
|
88
|
+
status: TaskStatus$inboundSchema,
|
|
89
|
+
dueDate: z.nullable(
|
|
90
|
+
z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
91
|
+
),
|
|
92
|
+
completionDate: z.nullable(
|
|
93
|
+
z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
94
|
+
),
|
|
95
|
+
disabled: z.nullable(z.lazy(() => Disabled$inboundSchema)),
|
|
96
|
+
incompleteTrainings: z.array(Training$inboundSchema),
|
|
97
|
+
completedTrainings: z.array(Training$inboundSchema),
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
export function completeTrainingsTaskSummaryFromJSON(
|
|
101
|
+
jsonString: string,
|
|
102
|
+
): SafeParseResult<CompleteTrainingsTaskSummary, SDKValidationError> {
|
|
103
|
+
return safeParse(
|
|
104
|
+
jsonString,
|
|
105
|
+
(x) => CompleteTrainingsTaskSummary$inboundSchema.parse(JSON.parse(x)),
|
|
106
|
+
`Failed to parse 'CompleteTrainingsTaskSummary' from JSON`,
|
|
107
|
+
);
|
|
108
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
import {
|
|
10
|
+
ComputerStatusOutcome,
|
|
11
|
+
ComputerStatusOutcome$inboundSchema,
|
|
12
|
+
} from "./computerstatusoutcome.js";
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* The a status check for a computer. Representation for screenlock, diskEncryption, passwordManager, and antivirusInstallation.
|
|
16
|
+
*/
|
|
17
|
+
export type ComputerStatus = {
|
|
18
|
+
/**
|
|
19
|
+
* The possible outcomes of a status check. The outcome can be one of the following:
|
|
20
|
+
*
|
|
21
|
+
* @remarks
|
|
22
|
+
* FAIL: The check is failing.
|
|
23
|
+
* IN_PROGRESS: The check needs further data from the given computer in order to evaluate. The field(s) needed from a computer to calculate the ComputerStatusOutcome were null.
|
|
24
|
+
* NA: The check is not applicable for the given computer.
|
|
25
|
+
* PASS: The check is passing.
|
|
26
|
+
*/
|
|
27
|
+
outcome: ComputerStatusOutcome;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
/** @internal */
|
|
31
|
+
export const ComputerStatus$inboundSchema: z.ZodType<
|
|
32
|
+
ComputerStatus,
|
|
33
|
+
z.ZodTypeDef,
|
|
34
|
+
unknown
|
|
35
|
+
> = z.object({
|
|
36
|
+
outcome: ComputerStatusOutcome$inboundSchema,
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
export function computerStatusFromJSON(
|
|
40
|
+
jsonString: string,
|
|
41
|
+
): SafeParseResult<ComputerStatus, SDKValidationError> {
|
|
42
|
+
return safeParse(
|
|
43
|
+
jsonString,
|
|
44
|
+
(x) => ComputerStatus$inboundSchema.parse(JSON.parse(x)),
|
|
45
|
+
`Failed to parse 'ComputerStatus' from JSON`,
|
|
46
|
+
);
|
|
47
|
+
}
|