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,323 @@
|
|
|
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
|
+
EmploymentStatus,
|
|
11
|
+
EmploymentStatus$inboundSchema,
|
|
12
|
+
} from "./employmentstatus.js";
|
|
13
|
+
import { LeaveStatus, LeaveStatus$inboundSchema } from "./leavestatus.js";
|
|
14
|
+
import {
|
|
15
|
+
PersonInfoSource,
|
|
16
|
+
PersonInfoSource$inboundSchema,
|
|
17
|
+
} from "./personinfosource.js";
|
|
18
|
+
import {
|
|
19
|
+
TasksSummaryStatus,
|
|
20
|
+
TasksSummaryStatus$inboundSchema,
|
|
21
|
+
} from "./taskssummarystatus.js";
|
|
22
|
+
import {
|
|
23
|
+
TaskSummaryDetails,
|
|
24
|
+
TaskSummaryDetails$inboundSchema,
|
|
25
|
+
} from "./tasksummarydetails.js";
|
|
26
|
+
|
|
27
|
+
export type Employment = {
|
|
28
|
+
/**
|
|
29
|
+
* The employment status of a person:
|
|
30
|
+
*
|
|
31
|
+
* @remarks
|
|
32
|
+
* - UPCOMING: The person is not yet employed and will start employment in the future.
|
|
33
|
+
* - CURRENT: The person is currently employed.
|
|
34
|
+
* - ON_LEAVE: The person is on leave.
|
|
35
|
+
* - INACTIVE: The person's employment is inactive.
|
|
36
|
+
* - FORMER: The person was previously employed.
|
|
37
|
+
*/
|
|
38
|
+
status: EmploymentStatus;
|
|
39
|
+
/**
|
|
40
|
+
* The date the person's employment started.
|
|
41
|
+
*/
|
|
42
|
+
startDate: Date;
|
|
43
|
+
/**
|
|
44
|
+
* The person's job title.
|
|
45
|
+
*/
|
|
46
|
+
jobTitle: string | null;
|
|
47
|
+
/**
|
|
48
|
+
* If present, the date the person's employment ended.
|
|
49
|
+
*/
|
|
50
|
+
endDate: Date | null;
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* If present, the user's active/upcoming leave. Empty if the user has no active/upcoming leave.
|
|
55
|
+
*/
|
|
56
|
+
export type LeaveInfo = {
|
|
57
|
+
/**
|
|
58
|
+
* The start of the person's leave.
|
|
59
|
+
*/
|
|
60
|
+
startDate: Date;
|
|
61
|
+
/**
|
|
62
|
+
* The end of the person's leave. Null endDate implies indefinite leave.
|
|
63
|
+
*/
|
|
64
|
+
endDate: Date | null;
|
|
65
|
+
/**
|
|
66
|
+
* User can be active or upcoming leave period
|
|
67
|
+
*/
|
|
68
|
+
status: LeaveStatus;
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
export type Name = {
|
|
72
|
+
/**
|
|
73
|
+
* The person's first (given) name.
|
|
74
|
+
*/
|
|
75
|
+
first: string | null;
|
|
76
|
+
/**
|
|
77
|
+
* The person's last (family) name.
|
|
78
|
+
*/
|
|
79
|
+
last: string | null;
|
|
80
|
+
/**
|
|
81
|
+
* The person's display name, used in Vanta.
|
|
82
|
+
*/
|
|
83
|
+
display: string;
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
export type PersonEmployment = {
|
|
87
|
+
/**
|
|
88
|
+
* The source of the person's information.
|
|
89
|
+
*/
|
|
90
|
+
endDate: PersonInfoSource;
|
|
91
|
+
/**
|
|
92
|
+
* The source of the person's information.
|
|
93
|
+
*/
|
|
94
|
+
startDate: PersonInfoSource;
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* The sources of the person's information.
|
|
99
|
+
*/
|
|
100
|
+
export type Sources = {
|
|
101
|
+
employment: PersonEmployment;
|
|
102
|
+
/**
|
|
103
|
+
* The source of the person's information.
|
|
104
|
+
*/
|
|
105
|
+
emailAddress: PersonInfoSource;
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* The person's tasks summary, which aggregates their current status across
|
|
110
|
+
*
|
|
111
|
+
* @remarks
|
|
112
|
+
* all of their relevant tasks.
|
|
113
|
+
*/
|
|
114
|
+
export type TasksSummary = {
|
|
115
|
+
/**
|
|
116
|
+
* All detailed information about a person's tasks, split across task categories.
|
|
117
|
+
*/
|
|
118
|
+
details: TaskSummaryDetails;
|
|
119
|
+
/**
|
|
120
|
+
* The overall status of a person's outstanding tasks:
|
|
121
|
+
*
|
|
122
|
+
* @remarks
|
|
123
|
+
* - NONE: There are no tasks.
|
|
124
|
+
* - DUE_SOON: At least one task is due soon.
|
|
125
|
+
* - OVERDUE: At least one task is overdue. Has a higher priority than DUE_SOON.
|
|
126
|
+
* - COMPLETE: All tasks are complete.
|
|
127
|
+
* - PAUSED: All tasks are paused.
|
|
128
|
+
* - OFFBOARDING_DUE_SOON: At least one offboarding task is due soon.
|
|
129
|
+
* - OFFBOARDING_OVERDUE: At least one offboarding task is overdue. Has a higher priority than OFFBOARDING_DUE_SOON.
|
|
130
|
+
* - OFFBOARDING_COMPLETE: All offboarding tasks are complete.
|
|
131
|
+
*/
|
|
132
|
+
status: TasksSummaryStatus;
|
|
133
|
+
/**
|
|
134
|
+
* The due date of the person's earliest-due task.
|
|
135
|
+
*/
|
|
136
|
+
dueDate: Date | null;
|
|
137
|
+
/**
|
|
138
|
+
* The date when person's tasks were completed.
|
|
139
|
+
*/
|
|
140
|
+
completionDate: Date | null;
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
export type Person = {
|
|
144
|
+
id: string;
|
|
145
|
+
/**
|
|
146
|
+
* The ID of the Vanta user account associated with this person, if one exists.
|
|
147
|
+
*/
|
|
148
|
+
userId: string | null;
|
|
149
|
+
emailAddress: string;
|
|
150
|
+
employment: Employment;
|
|
151
|
+
/**
|
|
152
|
+
* If present, the user's active/upcoming leave. Empty if the user has no active/upcoming leave.
|
|
153
|
+
*/
|
|
154
|
+
leaveInfo: LeaveInfo | null;
|
|
155
|
+
/**
|
|
156
|
+
* The id of each group the user belongs to. This includes both manually created groups in Vanta and groups imported from an identity provider.
|
|
157
|
+
*/
|
|
158
|
+
groupIds: Array<string>;
|
|
159
|
+
name: Name;
|
|
160
|
+
/**
|
|
161
|
+
* The sources of the person's information.
|
|
162
|
+
*/
|
|
163
|
+
sources: Sources;
|
|
164
|
+
/**
|
|
165
|
+
* The person's tasks summary, which aggregates their current status across
|
|
166
|
+
*
|
|
167
|
+
* @remarks
|
|
168
|
+
* all of their relevant tasks.
|
|
169
|
+
*/
|
|
170
|
+
tasksSummary: TasksSummary;
|
|
171
|
+
};
|
|
172
|
+
|
|
173
|
+
/** @internal */
|
|
174
|
+
export const Employment$inboundSchema: z.ZodType<
|
|
175
|
+
Employment,
|
|
176
|
+
z.ZodTypeDef,
|
|
177
|
+
unknown
|
|
178
|
+
> = z.object({
|
|
179
|
+
status: EmploymentStatus$inboundSchema,
|
|
180
|
+
startDate: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
181
|
+
jobTitle: z.nullable(z.string()),
|
|
182
|
+
endDate: z.nullable(
|
|
183
|
+
z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
184
|
+
),
|
|
185
|
+
});
|
|
186
|
+
|
|
187
|
+
export function employmentFromJSON(
|
|
188
|
+
jsonString: string,
|
|
189
|
+
): SafeParseResult<Employment, SDKValidationError> {
|
|
190
|
+
return safeParse(
|
|
191
|
+
jsonString,
|
|
192
|
+
(x) => Employment$inboundSchema.parse(JSON.parse(x)),
|
|
193
|
+
`Failed to parse 'Employment' from JSON`,
|
|
194
|
+
);
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
/** @internal */
|
|
198
|
+
export const LeaveInfo$inboundSchema: z.ZodType<
|
|
199
|
+
LeaveInfo,
|
|
200
|
+
z.ZodTypeDef,
|
|
201
|
+
unknown
|
|
202
|
+
> = z.object({
|
|
203
|
+
startDate: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
204
|
+
endDate: z.nullable(
|
|
205
|
+
z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
206
|
+
),
|
|
207
|
+
status: LeaveStatus$inboundSchema,
|
|
208
|
+
});
|
|
209
|
+
|
|
210
|
+
export function leaveInfoFromJSON(
|
|
211
|
+
jsonString: string,
|
|
212
|
+
): SafeParseResult<LeaveInfo, SDKValidationError> {
|
|
213
|
+
return safeParse(
|
|
214
|
+
jsonString,
|
|
215
|
+
(x) => LeaveInfo$inboundSchema.parse(JSON.parse(x)),
|
|
216
|
+
`Failed to parse 'LeaveInfo' from JSON`,
|
|
217
|
+
);
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
/** @internal */
|
|
221
|
+
export const Name$inboundSchema: z.ZodType<Name, z.ZodTypeDef, unknown> = z
|
|
222
|
+
.object({
|
|
223
|
+
first: z.nullable(z.string()),
|
|
224
|
+
last: z.nullable(z.string()),
|
|
225
|
+
display: z.string(),
|
|
226
|
+
});
|
|
227
|
+
|
|
228
|
+
export function nameFromJSON(
|
|
229
|
+
jsonString: string,
|
|
230
|
+
): SafeParseResult<Name, SDKValidationError> {
|
|
231
|
+
return safeParse(
|
|
232
|
+
jsonString,
|
|
233
|
+
(x) => Name$inboundSchema.parse(JSON.parse(x)),
|
|
234
|
+
`Failed to parse 'Name' from JSON`,
|
|
235
|
+
);
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
/** @internal */
|
|
239
|
+
export const PersonEmployment$inboundSchema: z.ZodType<
|
|
240
|
+
PersonEmployment,
|
|
241
|
+
z.ZodTypeDef,
|
|
242
|
+
unknown
|
|
243
|
+
> = z.object({
|
|
244
|
+
endDate: PersonInfoSource$inboundSchema,
|
|
245
|
+
startDate: PersonInfoSource$inboundSchema,
|
|
246
|
+
});
|
|
247
|
+
|
|
248
|
+
export function personEmploymentFromJSON(
|
|
249
|
+
jsonString: string,
|
|
250
|
+
): SafeParseResult<PersonEmployment, SDKValidationError> {
|
|
251
|
+
return safeParse(
|
|
252
|
+
jsonString,
|
|
253
|
+
(x) => PersonEmployment$inboundSchema.parse(JSON.parse(x)),
|
|
254
|
+
`Failed to parse 'PersonEmployment' from JSON`,
|
|
255
|
+
);
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
/** @internal */
|
|
259
|
+
export const Sources$inboundSchema: z.ZodType<Sources, z.ZodTypeDef, unknown> =
|
|
260
|
+
z.object({
|
|
261
|
+
employment: z.lazy(() => PersonEmployment$inboundSchema),
|
|
262
|
+
emailAddress: PersonInfoSource$inboundSchema,
|
|
263
|
+
});
|
|
264
|
+
|
|
265
|
+
export function sourcesFromJSON(
|
|
266
|
+
jsonString: string,
|
|
267
|
+
): SafeParseResult<Sources, SDKValidationError> {
|
|
268
|
+
return safeParse(
|
|
269
|
+
jsonString,
|
|
270
|
+
(x) => Sources$inboundSchema.parse(JSON.parse(x)),
|
|
271
|
+
`Failed to parse 'Sources' from JSON`,
|
|
272
|
+
);
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
/** @internal */
|
|
276
|
+
export const TasksSummary$inboundSchema: z.ZodType<
|
|
277
|
+
TasksSummary,
|
|
278
|
+
z.ZodTypeDef,
|
|
279
|
+
unknown
|
|
280
|
+
> = z.object({
|
|
281
|
+
details: TaskSummaryDetails$inboundSchema,
|
|
282
|
+
status: TasksSummaryStatus$inboundSchema,
|
|
283
|
+
dueDate: z.nullable(
|
|
284
|
+
z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
285
|
+
),
|
|
286
|
+
completionDate: z.nullable(
|
|
287
|
+
z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
288
|
+
),
|
|
289
|
+
});
|
|
290
|
+
|
|
291
|
+
export function tasksSummaryFromJSON(
|
|
292
|
+
jsonString: string,
|
|
293
|
+
): SafeParseResult<TasksSummary, SDKValidationError> {
|
|
294
|
+
return safeParse(
|
|
295
|
+
jsonString,
|
|
296
|
+
(x) => TasksSummary$inboundSchema.parse(JSON.parse(x)),
|
|
297
|
+
`Failed to parse 'TasksSummary' from JSON`,
|
|
298
|
+
);
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
/** @internal */
|
|
302
|
+
export const Person$inboundSchema: z.ZodType<Person, z.ZodTypeDef, unknown> = z
|
|
303
|
+
.object({
|
|
304
|
+
id: z.string(),
|
|
305
|
+
userId: z.nullable(z.string()),
|
|
306
|
+
emailAddress: z.string(),
|
|
307
|
+
employment: z.lazy(() => Employment$inboundSchema),
|
|
308
|
+
leaveInfo: z.nullable(z.lazy(() => LeaveInfo$inboundSchema)),
|
|
309
|
+
groupIds: z.array(z.string()),
|
|
310
|
+
name: z.lazy(() => Name$inboundSchema),
|
|
311
|
+
sources: z.lazy(() => Sources$inboundSchema),
|
|
312
|
+
tasksSummary: z.lazy(() => TasksSummary$inboundSchema),
|
|
313
|
+
});
|
|
314
|
+
|
|
315
|
+
export function personFromJSON(
|
|
316
|
+
jsonString: string,
|
|
317
|
+
): SafeParseResult<Person, SDKValidationError> {
|
|
318
|
+
return safeParse(
|
|
319
|
+
jsonString,
|
|
320
|
+
(x) => Person$inboundSchema.parse(JSON.parse(x)),
|
|
321
|
+
`Failed to parse 'Person' from JSON`,
|
|
322
|
+
);
|
|
323
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
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
|
+
IntegrationBasedPersonInfoSource,
|
|
11
|
+
IntegrationBasedPersonInfoSource$inboundSchema,
|
|
12
|
+
} from "./integrationbasedpersoninfosource.js";
|
|
13
|
+
import {
|
|
14
|
+
ScimBasedPersonInfoSource,
|
|
15
|
+
ScimBasedPersonInfoSource$inboundSchema,
|
|
16
|
+
} from "./scimbasedpersoninfosource.js";
|
|
17
|
+
import {
|
|
18
|
+
VantaBasedPersonInfoSource,
|
|
19
|
+
VantaBasedPersonInfoSource$inboundSchema,
|
|
20
|
+
} from "./vantabasedpersoninfosource.js";
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* The source of the person's information.
|
|
24
|
+
*/
|
|
25
|
+
export type PersonInfoSource =
|
|
26
|
+
| VantaBasedPersonInfoSource
|
|
27
|
+
| ScimBasedPersonInfoSource
|
|
28
|
+
| IntegrationBasedPersonInfoSource;
|
|
29
|
+
|
|
30
|
+
/** @internal */
|
|
31
|
+
export const PersonInfoSource$inboundSchema: z.ZodType<
|
|
32
|
+
PersonInfoSource,
|
|
33
|
+
z.ZodTypeDef,
|
|
34
|
+
unknown
|
|
35
|
+
> = z.union([
|
|
36
|
+
VantaBasedPersonInfoSource$inboundSchema,
|
|
37
|
+
ScimBasedPersonInfoSource$inboundSchema,
|
|
38
|
+
IntegrationBasedPersonInfoSource$inboundSchema,
|
|
39
|
+
]);
|
|
40
|
+
|
|
41
|
+
export function personInfoSourceFromJSON(
|
|
42
|
+
jsonString: string,
|
|
43
|
+
): SafeParseResult<PersonInfoSource, SDKValidationError> {
|
|
44
|
+
return safeParse(
|
|
45
|
+
jsonString,
|
|
46
|
+
(x) => PersonInfoSource$inboundSchema.parse(JSON.parse(x)),
|
|
47
|
+
`Failed to parse 'PersonInfoSource' from JSON`,
|
|
48
|
+
);
|
|
49
|
+
}
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
/**
|
|
20
20
|
* Employment status, or null if not available.
|
|
21
21
|
*/
|
|
22
|
-
export const
|
|
22
|
+
export const PersonnelPersonEmploymentStatus = {
|
|
23
23
|
CurrentlyEmployed: "CURRENTLY_EMPLOYED",
|
|
24
24
|
InactiveEmployee: "INACTIVE_EMPLOYEE",
|
|
25
25
|
NotPeople: "NOT_PEOPLE",
|
|
@@ -30,7 +30,9 @@ export const EmploymentStatus = {
|
|
|
30
30
|
/**
|
|
31
31
|
* Employment status, or null if not available.
|
|
32
32
|
*/
|
|
33
|
-
export type
|
|
33
|
+
export type PersonnelPersonEmploymentStatus = ClosedEnum<
|
|
34
|
+
typeof PersonnelPersonEmploymentStatus
|
|
35
|
+
>;
|
|
34
36
|
|
|
35
37
|
export type Groups = {
|
|
36
38
|
name: string;
|
|
@@ -59,7 +61,7 @@ export type Source = {
|
|
|
59
61
|
* @remarks
|
|
60
62
|
* Full Audit View only - omitted in Controlled Audit View.
|
|
61
63
|
*/
|
|
62
|
-
export type
|
|
64
|
+
export type PersonnelPersonTaskStatus = {
|
|
63
65
|
/**
|
|
64
66
|
* Overall user task status.
|
|
65
67
|
*/
|
|
@@ -241,7 +243,7 @@ export type PersonnelPerson = {
|
|
|
241
243
|
/**
|
|
242
244
|
* Employment status, or null if not available.
|
|
243
245
|
*/
|
|
244
|
-
employmentStatus?:
|
|
246
|
+
employmentStatus?: PersonnelPersonEmploymentStatus | null | undefined;
|
|
245
247
|
/**
|
|
246
248
|
* Start date in ISO 8601 format (YYYY-MM-DD), or null if not available.
|
|
247
249
|
*
|
|
@@ -274,7 +276,7 @@ export type PersonnelPerson = {
|
|
|
274
276
|
* @remarks
|
|
275
277
|
* Full Audit View only - omitted in Controlled Audit View.
|
|
276
278
|
*/
|
|
277
|
-
taskStatus?:
|
|
279
|
+
taskStatus?: PersonnelPersonTaskStatus | null | undefined;
|
|
278
280
|
/**
|
|
279
281
|
* Last date user was sent an onboarding reminder email in ISO 8601 format, or null if never reminded.
|
|
280
282
|
*
|
|
@@ -327,9 +329,9 @@ export type PersonnelPerson = {
|
|
|
327
329
|
};
|
|
328
330
|
|
|
329
331
|
/** @internal */
|
|
330
|
-
export const
|
|
331
|
-
typeof
|
|
332
|
-
> = z.nativeEnum(
|
|
332
|
+
export const PersonnelPersonEmploymentStatus$inboundSchema: z.ZodNativeEnum<
|
|
333
|
+
typeof PersonnelPersonEmploymentStatus
|
|
334
|
+
> = z.nativeEnum(PersonnelPersonEmploymentStatus);
|
|
333
335
|
|
|
334
336
|
/** @internal */
|
|
335
337
|
export const Groups$inboundSchema: z.ZodType<Groups, z.ZodTypeDef, unknown> = z
|
|
@@ -365,8 +367,8 @@ export function sourceFromJSON(
|
|
|
365
367
|
}
|
|
366
368
|
|
|
367
369
|
/** @internal */
|
|
368
|
-
export const
|
|
369
|
-
|
|
370
|
+
export const PersonnelPersonTaskStatus$inboundSchema: z.ZodType<
|
|
371
|
+
PersonnelPersonTaskStatus,
|
|
370
372
|
z.ZodTypeDef,
|
|
371
373
|
unknown
|
|
372
374
|
> = z.object({
|
|
@@ -378,13 +380,13 @@ export const TaskStatus$inboundSchema: z.ZodType<
|
|
|
378
380
|
numTasksDueSoon: z.nullable(z.number()),
|
|
379
381
|
});
|
|
380
382
|
|
|
381
|
-
export function
|
|
383
|
+
export function personnelPersonTaskStatusFromJSON(
|
|
382
384
|
jsonString: string,
|
|
383
|
-
): SafeParseResult<
|
|
385
|
+
): SafeParseResult<PersonnelPersonTaskStatus, SDKValidationError> {
|
|
384
386
|
return safeParse(
|
|
385
387
|
jsonString,
|
|
386
|
-
(x) =>
|
|
387
|
-
`Failed to parse '
|
|
388
|
+
(x) => PersonnelPersonTaskStatus$inboundSchema.parse(JSON.parse(x)),
|
|
389
|
+
`Failed to parse 'PersonnelPersonTaskStatus' from JSON`,
|
|
388
390
|
);
|
|
389
391
|
}
|
|
390
392
|
|
|
@@ -524,12 +526,14 @@ export const PersonnelPerson$inboundSchema: z.ZodType<
|
|
|
524
526
|
name: z.string(),
|
|
525
527
|
email: z.string(),
|
|
526
528
|
jobTitle: z.nullable(z.string()).optional(),
|
|
527
|
-
employmentStatus: z.nullable(
|
|
529
|
+
employmentStatus: z.nullable(PersonnelPersonEmploymentStatus$inboundSchema)
|
|
530
|
+
.optional(),
|
|
528
531
|
startDate: z.nullable(z.string()).optional(),
|
|
529
532
|
endDate: z.nullable(z.string()).optional(),
|
|
530
533
|
groups: z.array(z.lazy(() => Groups$inboundSchema)).optional(),
|
|
531
534
|
source: z.nullable(z.lazy(() => Source$inboundSchema)).optional(),
|
|
532
|
-
taskStatus: z.nullable(z.lazy(() =>
|
|
535
|
+
taskStatus: z.nullable(z.lazy(() => PersonnelPersonTaskStatus$inboundSchema))
|
|
536
|
+
.optional(),
|
|
533
537
|
lastReminded: z.nullable(z.string()).optional(),
|
|
534
538
|
policies: z.nullable(z.lazy(() => Policies$inboundSchema)).optional(),
|
|
535
539
|
trainings: z.nullable(z.lazy(() => Trainings$inboundSchema)).optional(),
|
|
@@ -0,0 +1,34 @@
|
|
|
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
|
+
|
|
10
|
+
/**
|
|
11
|
+
* The person's information comes from SCIM.
|
|
12
|
+
*/
|
|
13
|
+
export type ScimBasedPersonInfoSource = {
|
|
14
|
+
type: "SCIM";
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
/** @internal */
|
|
18
|
+
export const ScimBasedPersonInfoSource$inboundSchema: z.ZodType<
|
|
19
|
+
ScimBasedPersonInfoSource,
|
|
20
|
+
z.ZodTypeDef,
|
|
21
|
+
unknown
|
|
22
|
+
> = z.object({
|
|
23
|
+
type: z.literal("SCIM"),
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
export function scimBasedPersonInfoSourceFromJSON(
|
|
27
|
+
jsonString: string,
|
|
28
|
+
): SafeParseResult<ScimBasedPersonInfoSource, SDKValidationError> {
|
|
29
|
+
return safeParse(
|
|
30
|
+
jsonString,
|
|
31
|
+
(x) => ScimBasedPersonInfoSource$inboundSchema.parse(JSON.parse(x)),
|
|
32
|
+
`Failed to parse 'ScimBasedPersonInfoSource' from JSON`,
|
|
33
|
+
);
|
|
34
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* The overall status of a person's outstanding tasks:
|
|
10
|
+
*
|
|
11
|
+
* @remarks
|
|
12
|
+
* - NONE: There are no tasks.
|
|
13
|
+
* - DUE_SOON: At least one task is due soon.
|
|
14
|
+
* - OVERDUE: At least one task is overdue. Has a higher priority than DUE_SOON.
|
|
15
|
+
* - COMPLETE: All tasks are complete.
|
|
16
|
+
* - PAUSED: All tasks are paused.
|
|
17
|
+
* - OFFBOARDING_DUE_SOON: At least one offboarding task is due soon.
|
|
18
|
+
* - OFFBOARDING_OVERDUE: At least one offboarding task is overdue. Has a higher priority than OFFBOARDING_DUE_SOON.
|
|
19
|
+
* - OFFBOARDING_COMPLETE: All offboarding tasks are complete.
|
|
20
|
+
*/
|
|
21
|
+
export const TasksSummaryStatus = {
|
|
22
|
+
Complete: "COMPLETE",
|
|
23
|
+
DueSoon: "DUE_SOON",
|
|
24
|
+
None: "NONE",
|
|
25
|
+
OffboardingComplete: "OFFBOARDING_COMPLETE",
|
|
26
|
+
OffboardingDueSoon: "OFFBOARDING_DUE_SOON",
|
|
27
|
+
OffboardingOverdue: "OFFBOARDING_OVERDUE",
|
|
28
|
+
Overdue: "OVERDUE",
|
|
29
|
+
Paused: "PAUSED",
|
|
30
|
+
} as const;
|
|
31
|
+
/**
|
|
32
|
+
* The overall status of a person's outstanding tasks:
|
|
33
|
+
*
|
|
34
|
+
* @remarks
|
|
35
|
+
* - NONE: There are no tasks.
|
|
36
|
+
* - DUE_SOON: At least one task is due soon.
|
|
37
|
+
* - OVERDUE: At least one task is overdue. Has a higher priority than DUE_SOON.
|
|
38
|
+
* - COMPLETE: All tasks are complete.
|
|
39
|
+
* - PAUSED: All tasks are paused.
|
|
40
|
+
* - OFFBOARDING_DUE_SOON: At least one offboarding task is due soon.
|
|
41
|
+
* - OFFBOARDING_OVERDUE: At least one offboarding task is overdue. Has a higher priority than OFFBOARDING_DUE_SOON.
|
|
42
|
+
* - OFFBOARDING_COMPLETE: All offboarding tasks are complete.
|
|
43
|
+
*/
|
|
44
|
+
export type TasksSummaryStatus = ClosedEnum<typeof TasksSummaryStatus>;
|
|
45
|
+
|
|
46
|
+
/** @internal */
|
|
47
|
+
export const TasksSummaryStatus$inboundSchema: z.ZodNativeEnum<
|
|
48
|
+
typeof TasksSummaryStatus
|
|
49
|
+
> = z.nativeEnum(TasksSummaryStatus);
|
|
50
|
+
/** @internal */
|
|
51
|
+
export const TasksSummaryStatus$outboundSchema: z.ZodNativeEnum<
|
|
52
|
+
typeof TasksSummaryStatus
|
|
53
|
+
> = TasksSummaryStatus$inboundSchema;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* The status of a task.
|
|
10
|
+
*
|
|
11
|
+
* @remarks
|
|
12
|
+
* - COMPLETE: The task has been completed.
|
|
13
|
+
* - DUE_SOON: The task is due soon.
|
|
14
|
+
* - OVERDUE: The task is overdue.
|
|
15
|
+
* - NONE: The task is not assigned.
|
|
16
|
+
*/
|
|
17
|
+
export const TaskStatus = {
|
|
18
|
+
Complete: "COMPLETE",
|
|
19
|
+
DueSoon: "DUE_SOON",
|
|
20
|
+
Overdue: "OVERDUE",
|
|
21
|
+
None: "NONE",
|
|
22
|
+
} as const;
|
|
23
|
+
/**
|
|
24
|
+
* The status of a task.
|
|
25
|
+
*
|
|
26
|
+
* @remarks
|
|
27
|
+
* - COMPLETE: The task has been completed.
|
|
28
|
+
* - DUE_SOON: The task is due soon.
|
|
29
|
+
* - OVERDUE: The task is overdue.
|
|
30
|
+
* - NONE: The task is not assigned.
|
|
31
|
+
*/
|
|
32
|
+
export type TaskStatus = ClosedEnum<typeof TaskStatus>;
|
|
33
|
+
|
|
34
|
+
/** @internal */
|
|
35
|
+
export const TaskStatus$inboundSchema: z.ZodNativeEnum<typeof TaskStatus> = z
|
|
36
|
+
.nativeEnum(TaskStatus);
|
|
37
|
+
/** @internal */
|
|
38
|
+
export const TaskStatus$outboundSchema: z.ZodNativeEnum<typeof TaskStatus> =
|
|
39
|
+
TaskStatus$inboundSchema;
|
|
@@ -0,0 +1,87 @@
|
|
|
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
|
+
AcceptPoliciesTaskSummary,
|
|
11
|
+
AcceptPoliciesTaskSummary$inboundSchema,
|
|
12
|
+
} from "./acceptpoliciestasksummary.js";
|
|
13
|
+
import {
|
|
14
|
+
CompleteBackgroundChecksTaskSummary,
|
|
15
|
+
CompleteBackgroundChecksTaskSummary$inboundSchema,
|
|
16
|
+
} from "./completebackgroundcheckstasksummary.js";
|
|
17
|
+
import {
|
|
18
|
+
CompleteCustomTasksTaskSummary,
|
|
19
|
+
CompleteCustomTasksTaskSummary$inboundSchema,
|
|
20
|
+
} from "./completecustomtaskstasksummary.js";
|
|
21
|
+
import {
|
|
22
|
+
CompleteOffboardingCustomTasksTaskSummary,
|
|
23
|
+
CompleteOffboardingCustomTasksTaskSummary$inboundSchema,
|
|
24
|
+
} from "./completeoffboardingcustomtaskstasksummary.js";
|
|
25
|
+
import {
|
|
26
|
+
CompleteTrainingsTaskSummary,
|
|
27
|
+
CompleteTrainingsTaskSummary$inboundSchema,
|
|
28
|
+
} from "./completetrainingstasksummary.js";
|
|
29
|
+
import {
|
|
30
|
+
InstallDeviceMonitoringTaskSummary,
|
|
31
|
+
InstallDeviceMonitoringTaskSummary$inboundSchema,
|
|
32
|
+
} from "./installdevicemonitoringtasksummary.js";
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* All detailed information about a person's tasks, split across task categories.
|
|
36
|
+
*/
|
|
37
|
+
export type TaskSummaryDetails = {
|
|
38
|
+
/**
|
|
39
|
+
* Task summary for completing all trainings.
|
|
40
|
+
*/
|
|
41
|
+
completeTrainings: CompleteTrainingsTaskSummary;
|
|
42
|
+
/**
|
|
43
|
+
* Policy acceptance details for a person.
|
|
44
|
+
*/
|
|
45
|
+
acceptPolicies: AcceptPoliciesTaskSummary;
|
|
46
|
+
/**
|
|
47
|
+
* Task summary for completing all custom tasks.
|
|
48
|
+
*/
|
|
49
|
+
completeCustomTasks: CompleteCustomTasksTaskSummary;
|
|
50
|
+
/**
|
|
51
|
+
* Task summary for completing all offboarding custom tasks.
|
|
52
|
+
*/
|
|
53
|
+
completeOffboardingCustomTasks: CompleteOffboardingCustomTasksTaskSummary;
|
|
54
|
+
/**
|
|
55
|
+
* Task summary for installing device monitoring.
|
|
56
|
+
*/
|
|
57
|
+
installDeviceMonitoring: InstallDeviceMonitoringTaskSummary;
|
|
58
|
+
/**
|
|
59
|
+
* Task summary for completing background checks.
|
|
60
|
+
*/
|
|
61
|
+
completeBackgroundChecks: CompleteBackgroundChecksTaskSummary;
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
/** @internal */
|
|
65
|
+
export const TaskSummaryDetails$inboundSchema: z.ZodType<
|
|
66
|
+
TaskSummaryDetails,
|
|
67
|
+
z.ZodTypeDef,
|
|
68
|
+
unknown
|
|
69
|
+
> = z.object({
|
|
70
|
+
completeTrainings: CompleteTrainingsTaskSummary$inboundSchema,
|
|
71
|
+
acceptPolicies: AcceptPoliciesTaskSummary$inboundSchema,
|
|
72
|
+
completeCustomTasks: CompleteCustomTasksTaskSummary$inboundSchema,
|
|
73
|
+
completeOffboardingCustomTasks:
|
|
74
|
+
CompleteOffboardingCustomTasksTaskSummary$inboundSchema,
|
|
75
|
+
installDeviceMonitoring: InstallDeviceMonitoringTaskSummary$inboundSchema,
|
|
76
|
+
completeBackgroundChecks: CompleteBackgroundChecksTaskSummary$inboundSchema,
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
export function taskSummaryDetailsFromJSON(
|
|
80
|
+
jsonString: string,
|
|
81
|
+
): SafeParseResult<TaskSummaryDetails, SDKValidationError> {
|
|
82
|
+
return safeParse(
|
|
83
|
+
jsonString,
|
|
84
|
+
(x) => TaskSummaryDetails$inboundSchema.parse(JSON.parse(x)),
|
|
85
|
+
`Failed to parse 'TaskSummaryDetails' from JSON`,
|
|
86
|
+
);
|
|
87
|
+
}
|