@censys/platform-sdk 0.10.0 → 0.10.2
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 +8 -0
- package/docs/sdks/collections/README.md +8 -0
- package/docs/sdks/globaldata/README.md +91 -0
- package/docs/sdks/threathunting/README.md +250 -1
- package/funcs/accountManagementGetMemberCreditUsage.js.map +1 -1
- package/funcs/accountManagementGetOrganizationCreditUsage.js.map +1 -1
- package/funcs/accountManagementGetOrganizationCredits.js.map +1 -1
- package/funcs/accountManagementGetOrganizationDetails.js.map +1 -1
- package/funcs/accountManagementInviteUserToOrganization.js.map +1 -1
- package/funcs/accountManagementListOrganizationMembers.js.map +1 -1
- package/funcs/accountManagementRemoveOrganizationMember.js.map +1 -1
- package/funcs/accountManagementUpdateOrganizationMember.js.map +1 -1
- package/funcs/collectionsAggregate.js.map +1 -1
- package/funcs/collectionsDelete.js.map +1 -1
- package/funcs/collectionsGet.js.map +1 -1
- package/funcs/collectionsList.js +1 -0
- package/funcs/collectionsList.js.map +1 -1
- package/funcs/collectionsListEvents.js.map +1 -1
- package/funcs/collectionsSearch.js.map +1 -1
- package/funcs/collectionsUpdate.js.map +1 -1
- package/funcs/globalDataGetCertificate.js.map +1 -1
- package/funcs/globalDataGetCertificateRaw.js.map +1 -1
- package/funcs/globalDataGetHost.js.map +1 -1
- package/funcs/globalDataGetHostTimeline.js.map +1 -1
- package/funcs/globalDataGetTrackedScan.js.map +1 -1
- package/funcs/globalDataGetWebProperty.js.map +1 -1
- package/funcs/globalDataListServicesOnHost.d.ts +18 -0
- package/funcs/globalDataListServicesOnHost.d.ts.map +1 -0
- package/funcs/globalDataListServicesOnHost.js +145 -0
- package/funcs/globalDataListServicesOnHost.js.map +1 -0
- package/funcs/threatHuntingCreateCenseyeJob.d.ts +18 -0
- package/funcs/threatHuntingCreateCenseyeJob.d.ts.map +1 -0
- package/funcs/threatHuntingCreateCenseyeJob.js +131 -0
- package/funcs/threatHuntingCreateCenseyeJob.js.map +1 -0
- package/funcs/threatHuntingGetCenseyeJob.d.ts +18 -0
- package/funcs/threatHuntingGetCenseyeJob.d.ts.map +1 -0
- package/funcs/threatHuntingGetCenseyeJob.js +134 -0
- package/funcs/threatHuntingGetCenseyeJob.js.map +1 -0
- package/funcs/threatHuntingGetCenseyeJobResults.d.ts +18 -0
- package/funcs/threatHuntingGetCenseyeJobResults.d.ts.map +1 -0
- package/funcs/threatHuntingGetCenseyeJobResults.js +136 -0
- package/funcs/threatHuntingGetCenseyeJobResults.js.map +1 -0
- package/funcs/threatHuntingGetHostObservationsWithCertificate.js.map +1 -1
- package/funcs/threatHuntingGetTrackedScanThreatHunting.js.map +1 -1
- package/funcs/threatHuntingValueCounts.d.ts +1 -1
- package/funcs/threatHuntingValueCounts.js +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +4 -4
- package/lib/config.js +4 -4
- package/lib/config.js.map +1 -1
- package/lib/encodings.d.ts.map +1 -1
- package/lib/encodings.js +20 -5
- package/lib/encodings.js.map +1 -1
- package/lib/files.d.ts +13 -0
- package/lib/files.d.ts.map +1 -1
- package/lib/files.js +19 -0
- package/lib/files.js.map +1 -1
- package/lib/matchers.d.ts.map +1 -1
- package/lib/matchers.js +0 -1
- package/lib/matchers.js.map +1 -1
- package/lib/sdks.d.ts.map +1 -1
- package/lib/sdks.js +8 -4
- package/lib/sdks.js.map +1 -1
- package/lib/security.d.ts.map +1 -1
- package/lib/security.js +1 -2
- package/lib/security.js.map +1 -1
- package/lib/url.d.ts.map +1 -1
- package/lib/url.js +4 -2
- package/lib/url.js.map +1 -1
- package/models/components/anermacfforth.d.ts +14 -0
- package/models/components/anermacfforth.d.ts.map +1 -0
- package/models/components/anermacfforth.js +60 -0
- package/models/components/anermacfforth.js.map +1 -0
- package/models/components/censeyejob.d.ts +59 -0
- package/models/components/censeyejob.d.ts.map +1 -0
- package/models/components/censeyejob.js +85 -0
- package/models/components/censeyejob.js.map +1 -0
- package/models/components/censeyeresult.d.ts +18 -0
- package/models/components/censeyeresult.d.ts.map +1 -0
- package/models/components/censeyeresult.js +57 -0
- package/models/components/censeyeresult.js.map +1 -0
- package/models/components/censeyeresultsresponse.d.ts +18 -0
- package/models/components/censeyeresultsresponse.d.ts.map +1 -0
- package/models/components/censeyeresultsresponse.js +57 -0
- package/models/components/censeyeresultsresponse.js.map +1 -0
- package/models/components/censeyetarget.d.ts +30 -0
- package/models/components/censeyetarget.d.ts.map +1 -0
- package/models/components/censeyetarget.js +75 -0
- package/models/components/censeyetarget.js.map +1 -0
- package/models/components/countcondition.d.ts +1 -1
- package/models/components/createcenseyejobinputbody.d.ts +13 -0
- package/models/components/createcenseyejobinputbody.d.ts.map +1 -0
- package/models/components/createcenseyejobinputbody.js +50 -0
- package/models/components/createcenseyejobinputbody.js.map +1 -0
- package/models/components/cursorontarget.d.ts +11 -0
- package/models/components/cursorontarget.d.ts.map +1 -0
- package/models/components/cursorontarget.js +51 -0
- package/models/components/cursorontarget.js.map +1 -0
- package/models/components/cursorontargetevent.d.ts +25 -0
- package/models/components/cursorontargetevent.d.ts.map +1 -0
- package/models/components/cursorontargetevent.js +70 -0
- package/models/components/cursorontargetevent.js.map +1 -0
- package/models/components/cursorontargetpoint.d.ts +14 -0
- package/models/components/cursorontargetpoint.d.ts.map +1 -0
- package/models/components/cursorontargetpoint.js +54 -0
- package/models/components/cursorontargetpoint.js.map +1 -0
- package/models/components/cursorontargetstatus.d.ts +10 -0
- package/models/components/cursorontargetstatus.d.ts.map +1 -0
- package/models/components/cursorontargetstatus.js +50 -0
- package/models/components/cursorontargetstatus.js.map +1 -0
- package/models/components/cursorontargettakv.d.ts +13 -0
- package/models/components/cursorontargettakv.d.ts.map +1 -0
- package/models/components/cursorontargettakv.js +53 -0
- package/models/components/cursorontargettakv.js.map +1 -0
- package/models/components/fieldvaluepair.d.ts +5 -0
- package/models/components/fieldvaluepair.d.ts.map +1 -1
- package/models/components/fieldvaluepair.js +11 -1
- package/models/components/fieldvaluepair.js.map +1 -1
- package/models/components/frps.d.ts +12 -0
- package/models/components/frps.d.ts.map +1 -0
- package/models/components/frps.js +58 -0
- package/models/components/frps.js.map +1 -0
- package/models/components/host.d.ts +12 -0
- package/models/components/host.d.ts.map +1 -1
- package/models/components/host.js +7 -0
- package/models/components/host.js.map +1 -1
- package/models/components/icap.d.ts +11 -0
- package/models/components/icap.d.ts.map +1 -0
- package/models/components/icap.js +57 -0
- package/models/components/icap.js.map +1 -0
- package/models/components/icapoptionsresponse.d.ts +21 -0
- package/models/components/icapoptionsresponse.d.ts.map +1 -0
- package/models/components/icapoptionsresponse.js +73 -0
- package/models/components/icapoptionsresponse.js.map +1 -0
- package/models/components/index.d.ts +40 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +40 -0
- package/models/components/index.js.map +1 -1
- package/models/components/networkclassification.d.ts +27 -0
- package/models/components/networkclassification.d.ts.map +1 -0
- package/models/components/networkclassification.js +60 -0
- package/models/components/networkclassification.js.map +1 -0
- package/models/components/networkmobileinfo.d.ts +21 -0
- package/models/components/networkmobileinfo.d.ts.map +1 -0
- package/models/components/networkmobileinfo.js +57 -0
- package/models/components/networkmobileinfo.js.map +1 -0
- package/models/components/privacy.d.ts +39 -0
- package/models/components/privacy.d.ts.map +1 -0
- package/models/components/privacy.js +64 -0
- package/models/components/privacy.js.map +1 -0
- package/models/components/privacytorinfo.d.ts +11 -0
- package/models/components/privacytorinfo.d.ts.map +1 -0
- package/models/components/privacytorinfo.js +51 -0
- package/models/components/privacytorinfo.js.map +1 -0
- package/models/components/privacytorinforelay.d.ts +140 -0
- package/models/components/privacytorinforelay.d.ts.map +1 -0
- package/models/components/privacytorinforelay.js +114 -0
- package/models/components/privacytorinforelay.js.map +1 -0
- package/models/components/privacytorinforelayexitpolicysummary.d.ts +17 -0
- package/models/components/privacytorinforelayexitpolicysummary.d.ts.map +1 -0
- package/models/components/privacytorinforelayexitpolicysummary.js +51 -0
- package/models/components/privacytorinforelayexitpolicysummary.js.map +1 -0
- package/models/components/reputation.d.ts +26 -0
- package/models/components/reputation.d.ts.map +1 -0
- package/models/components/reputation.js +71 -0
- package/models/components/reputation.js.map +1 -0
- package/models/components/reputationevidence.d.ts +17 -0
- package/models/components/reputationevidence.d.ts.map +1 -0
- package/models/components/reputationevidence.js +65 -0
- package/models/components/reputationevidence.js.map +1 -0
- package/models/components/reputationevidenceexternalsignal.d.ts +23 -0
- package/models/components/reputationevidenceexternalsignal.d.ts.map +1 -0
- package/models/components/reputationevidenceexternalsignal.js +62 -0
- package/models/components/reputationevidenceexternalsignal.js.map +1 -0
- package/models/components/reputationevidencefieldvalue.d.ts +11 -0
- package/models/components/reputationevidencefieldvalue.d.ts.map +1 -0
- package/models/components/reputationevidencefieldvalue.js +51 -0
- package/models/components/reputationevidencefieldvalue.js.map +1 -0
- package/models/components/reputationevidencethreat.d.ts +12 -0
- package/models/components/reputationevidencethreat.d.ts.map +1 -0
- package/models/components/reputationevidencethreat.js +59 -0
- package/models/components/reputationevidencethreat.js.map +1 -0
- package/models/components/responseenvelopecenseyejob.d.ts +11 -0
- package/models/components/responseenvelopecenseyejob.d.ts.map +1 -0
- package/models/components/responseenvelopecenseyejob.js +51 -0
- package/models/components/responseenvelopecenseyejob.js.map +1 -0
- package/models/components/responseenvelopecenseyeresultsresponse.d.ts +11 -0
- package/models/components/responseenvelopecenseyeresultsresponse.d.ts.map +1 -0
- package/models/components/responseenvelopecenseyeresultsresponse.js +51 -0
- package/models/components/responseenvelopecenseyeresultsresponse.js.map +1 -0
- package/models/components/responseenvelopeservicesonhostresponse.d.ts +11 -0
- package/models/components/responseenvelopeservicesonhostresponse.d.ts.map +1 -0
- package/models/components/responseenvelopeservicesonhostresponse.js +51 -0
- package/models/components/responseenvelopeservicesonhostresponse.js.map +1 -0
- package/models/components/sapient.d.ts +15 -0
- package/models/components/sapient.d.ts.map +1 -0
- package/models/components/sapient.js +60 -0
- package/models/components/sapient.js.map +1 -0
- package/models/components/sapienterror.d.ts +11 -0
- package/models/components/sapienterror.d.ts.map +1 -0
- package/models/components/sapienterror.js +56 -0
- package/models/components/sapienterror.js.map +1 -0
- package/models/components/sapientregistrationack.d.ts +11 -0
- package/models/components/sapientregistrationack.d.ts.map +1 -0
- package/models/components/sapientregistrationack.js +56 -0
- package/models/components/sapientregistrationack.js.map +1 -0
- package/models/components/searchvaluecountsinputbody.d.ts +1 -1
- package/models/components/service.d.ts +12 -0
- package/models/components/service.d.ts.map +1 -1
- package/models/components/service.js +14 -0
- package/models/components/service.js.map +1 -1
- package/models/components/serviceonhostrange.d.ts +33 -0
- package/models/components/serviceonhostrange.d.ts.map +1 -0
- package/models/components/serviceonhostrange.js +62 -0
- package/models/components/serviceonhostrange.js.map +1 -0
- package/models/components/servicescan.d.ts +12 -0
- package/models/components/servicescan.d.ts.map +1 -1
- package/models/components/servicescan.js +14 -0
- package/models/components/servicescan.js.map +1 -1
- package/models/components/servicesonhostresponse.d.ts +18 -0
- package/models/components/servicesonhostresponse.d.ts.map +1 -0
- package/models/components/servicesonhostresponse.js +57 -0
- package/models/components/servicesonhostresponse.js.map +1 -0
- package/models/components/sourceusagebreakdown.d.ts +2 -2
- package/models/components/sourceusagebreakdown.d.ts.map +1 -1
- package/models/components/sourceusagebreakdown.js +2 -2
- package/models/components/sourceusagebreakdown.js.map +1 -1
- package/models/components/stun.d.ts +17 -0
- package/models/components/stun.d.ts.map +1 -0
- package/models/components/stun.js +67 -0
- package/models/components/stun.js.map +1 -0
- package/models/components/stunbindingerrorresponse.d.ts +13 -0
- package/models/components/stunbindingerrorresponse.d.ts.map +1 -0
- package/models/components/stunbindingerrorresponse.js +60 -0
- package/models/components/stunbindingerrorresponse.js.map +1 -0
- package/models/components/stunbindingsuccessresponse.d.ts +13 -0
- package/models/components/stunbindingsuccessresponse.d.ts.map +1 -0
- package/models/components/stunbindingsuccessresponse.js +59 -0
- package/models/components/stunbindingsuccessresponse.js.map +1 -0
- package/models/components/stunmappedaddress.d.ts +11 -0
- package/models/components/stunmappedaddress.d.ts.map +1 -0
- package/models/components/stunmappedaddress.js +51 -0
- package/models/components/stunmappedaddress.js.map +1 -0
- package/models/components/stunturn.d.ts +15 -0
- package/models/components/stunturn.d.ts.map +1 -0
- package/models/components/stunturn.js +65 -0
- package/models/components/stunturn.js.map +1 -0
- package/models/components/stunturnallocateerrorresponse.d.ts +15 -0
- package/models/components/stunturnallocateerrorresponse.d.ts.map +1 -0
- package/models/components/stunturnallocateerrorresponse.js +62 -0
- package/models/components/stunturnallocateerrorresponse.js.map +1 -0
- package/models/components/stunturnallocatesuccessresponse.d.ts +13 -0
- package/models/components/stunturnallocatesuccessresponse.d.ts.map +1 -0
- package/models/components/stunturnallocatesuccessresponse.js +59 -0
- package/models/components/stunturnallocatesuccessresponse.js.map +1 -0
- package/models/operations/index.d.ts +4 -0
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +4 -0
- package/models/operations/index.js.map +1 -1
- package/models/operations/v3collectionscrudlist.d.ts +15 -0
- package/models/operations/v3collectionscrudlist.d.ts.map +1 -1
- package/models/operations/v3collectionscrudlist.js +12 -1
- package/models/operations/v3collectionscrudlist.js.map +1 -1
- package/models/operations/v3globaldataserviceonhost.d.ts +101 -0
- package/models/operations/v3globaldataserviceonhost.d.ts.map +1 -0
- package/models/operations/v3globaldataserviceonhost.js +107 -0
- package/models/operations/v3globaldataserviceonhost.js.map +1 -0
- package/models/operations/v3threathuntingcenseyejobresults.d.ts +45 -0
- package/models/operations/v3threathuntingcenseyejobresults.d.ts.map +1 -0
- package/models/operations/v3threathuntingcenseyejobresults.js +76 -0
- package/models/operations/v3threathuntingcenseyejobresults.js.map +1 -0
- package/models/operations/v3threathuntingcenseyejobscreate.d.ts +32 -0
- package/models/operations/v3threathuntingcenseyejobscreate.d.ts.map +1 -0
- package/models/operations/v3threathuntingcenseyejobscreate.js +72 -0
- package/models/operations/v3threathuntingcenseyejobscreate.js.map +1 -0
- package/models/operations/v3threathuntingcenseyejobsget.d.ts +35 -0
- package/models/operations/v3threathuntingcenseyejobsget.d.ts.map +1 -0
- package/models/operations/v3threathuntingcenseyejobsget.js +72 -0
- package/models/operations/v3threathuntingcenseyejobsget.js.map +1 -0
- package/package.json +1 -1
- package/sdk/globaldata.d.ts +7 -0
- package/sdk/globaldata.d.ts.map +1 -1
- package/sdk/globaldata.js +10 -0
- package/sdk/globaldata.js.map +1 -1
- package/sdk/threathunting.d.ts +22 -1
- package/sdk/threathunting.d.ts.map +1 -1
- package/sdk/threathunting.js +31 -1
- package/sdk/threathunting.js.map +1 -1
- package/src/funcs/accountManagementGetMemberCreditUsage.ts +0 -1
- package/src/funcs/accountManagementGetOrganizationCreditUsage.ts +0 -1
- package/src/funcs/accountManagementGetOrganizationCredits.ts +0 -1
- package/src/funcs/accountManagementGetOrganizationDetails.ts +0 -1
- package/src/funcs/accountManagementInviteUserToOrganization.ts +0 -1
- package/src/funcs/accountManagementListOrganizationMembers.ts +0 -1
- package/src/funcs/accountManagementRemoveOrganizationMember.ts +0 -1
- package/src/funcs/accountManagementUpdateOrganizationMember.ts +0 -1
- package/src/funcs/collectionsAggregate.ts +0 -1
- package/src/funcs/collectionsDelete.ts +0 -1
- package/src/funcs/collectionsGet.ts +0 -1
- package/src/funcs/collectionsList.ts +1 -0
- package/src/funcs/collectionsListEvents.ts +0 -1
- package/src/funcs/collectionsSearch.ts +0 -1
- package/src/funcs/collectionsUpdate.ts +0 -1
- package/src/funcs/globalDataGetCertificate.ts +0 -1
- package/src/funcs/globalDataGetCertificateRaw.ts +0 -1
- package/src/funcs/globalDataGetHost.ts +0 -1
- package/src/funcs/globalDataGetHostTimeline.ts +0 -1
- package/src/funcs/globalDataGetTrackedScan.ts +0 -1
- package/src/funcs/globalDataGetWebProperty.ts +0 -1
- package/src/funcs/globalDataListServicesOnHost.ts +205 -0
- package/src/funcs/threatHuntingCreateCenseyeJob.ts +195 -0
- package/src/funcs/threatHuntingGetCenseyeJob.ts +200 -0
- package/src/funcs/threatHuntingGetCenseyeJobResults.ts +202 -0
- package/src/funcs/threatHuntingGetHostObservationsWithCertificate.ts +0 -1
- package/src/funcs/threatHuntingGetTrackedScanThreatHunting.ts +0 -1
- package/src/funcs/threatHuntingValueCounts.ts +1 -1
- package/src/lib/config.ts +4 -4
- package/src/lib/encodings.ts +23 -4
- package/src/lib/files.ts +22 -0
- package/src/lib/matchers.ts +3 -2
- package/src/lib/sdks.ts +7 -5
- package/src/lib/security.ts +1 -2
- package/src/lib/url.ts +16 -14
- package/src/models/components/anermacfforth.ts +45 -0
- package/src/models/components/censeyejob.ts +106 -0
- package/src/models/components/censeyeresult.ts +48 -0
- package/src/models/components/censeyeresultsresponse.ts +45 -0
- package/src/models/components/censeyetarget.ts +77 -0
- package/src/models/components/countcondition.ts +1 -1
- package/src/models/components/createcenseyejobinputbody.ts +36 -0
- package/src/models/components/cursorontarget.ts +35 -0
- package/src/models/components/cursorontargetevent.ts +72 -0
- package/src/models/components/cursorontargetpoint.ts +39 -0
- package/src/models/components/cursorontargetstatus.ts +31 -0
- package/src/models/components/cursorontargettakv.ts +37 -0
- package/src/models/components/fieldvaluepair.ts +21 -0
- package/src/models/components/frps.ts +37 -0
- package/src/models/components/host.ts +19 -0
- package/src/models/components/icap.ts +37 -0
- package/src/models/components/icapoptionsresponse.ts +65 -0
- package/src/models/components/index.ts +40 -0
- package/src/models/components/networkclassification.ts +60 -0
- package/src/models/components/networkmobileinfo.ts +49 -0
- package/src/models/components/privacy.ts +73 -0
- package/src/models/components/privacytorinfo.ts +35 -0
- package/src/models/components/privacytorinforelay.ts +227 -0
- package/src/models/components/privacytorinforelayexitpolicysummary.ts +40 -0
- package/src/models/components/reputation.ts +66 -0
- package/src/models/components/reputationevidence.ts +63 -0
- package/src/models/components/reputationevidenceexternalsignal.ts +50 -0
- package/src/models/components/reputationevidencefieldvalue.ts +33 -0
- package/src/models/components/reputationevidencethreat.ts +42 -0
- package/src/models/components/responseenvelopecenseyejob.ts +32 -0
- package/src/models/components/responseenvelopecenseyeresultsresponse.ts +36 -0
- package/src/models/components/responseenvelopeservicesonhostresponse.ts +36 -0
- package/src/models/components/sapient.ts +44 -0
- package/src/models/components/sapienterror.ts +38 -0
- package/src/models/components/sapientregistrationack.ts +38 -0
- package/src/models/components/searchvaluecountsinputbody.ts +1 -1
- package/src/models/components/service.ts +23 -0
- package/src/models/components/serviceonhostrange.ts +66 -0
- package/src/models/components/servicescan.ts +23 -0
- package/src/models/components/servicesonhostresponse.ts +48 -0
- package/src/models/components/sourceusagebreakdown.ts +4 -4
- package/src/models/components/stun.ts +54 -0
- package/src/models/components/stunbindingerrorresponse.ts +44 -0
- package/src/models/components/stunbindingsuccessresponse.ts +45 -0
- package/src/models/components/stunmappedaddress.ts +33 -0
- package/src/models/components/stunturn.ts +55 -0
- package/src/models/components/stunturnallocateerrorresponse.ts +48 -0
- package/src/models/components/stunturnallocatesuccessresponse.ts +45 -0
- package/src/models/operations/index.ts +4 -0
- package/src/models/operations/v3collectionscrudlist.ts +22 -0
- package/src/models/operations/v3globaldataserviceonhost.ts +173 -0
- package/src/models/operations/v3threathuntingcenseyejobresults.ts +107 -0
- package/src/models/operations/v3threathuntingcenseyejobscreate.ts +91 -0
- package/src/models/operations/v3threathuntingcenseyejobsget.ts +87 -0
- package/src/sdk/globaldata.ts +18 -0
- package/src/sdk/threathunting.ts +55 -1
- package/tests/sdk.test.ts +412 -259
- package/examples/package-lock.json +0 -610
- package/examples/package.json +0 -18
- package/tests/package-lock.json +0 -1448
- package/tests/package.json +0 -11
- package/tsconfig.json +0 -40
package/src/lib/files.ts
CHANGED
|
@@ -80,3 +80,25 @@ export function getContentTypeFromFileName(fileName: string): string | null {
|
|
|
80
80
|
|
|
81
81
|
return mimeTypes[ext] || null;
|
|
82
82
|
}
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Creates a Blob from file content with the given MIME type.
|
|
86
|
+
*
|
|
87
|
+
* Node.js Buffers are Uint8Array subclasses that may share a pooled
|
|
88
|
+
* ArrayBuffer (byteOffset > 0, byteLength < buffer.byteLength). Passing
|
|
89
|
+
* such a Buffer directly to `new Blob([buf])` can include the entire
|
|
90
|
+
* underlying pool on some runtimes, producing a Blob with extra bytes
|
|
91
|
+
* that corrupts multipart uploads.
|
|
92
|
+
*
|
|
93
|
+
* Copying into a standalone Uint8Array ensures the Blob receives only the
|
|
94
|
+
* intended bytes regardless of runtime behaviour.
|
|
95
|
+
*/
|
|
96
|
+
export function bytesToBlob(
|
|
97
|
+
content: Uint8Array<ArrayBufferLike> | ArrayBuffer | Blob | string,
|
|
98
|
+
contentType: string,
|
|
99
|
+
): Blob {
|
|
100
|
+
if (content instanceof Uint8Array) {
|
|
101
|
+
return new Blob([new Uint8Array(content)], { type: contentType });
|
|
102
|
+
}
|
|
103
|
+
return new Blob([content as BlobPart], { type: contentType });
|
|
104
|
+
}
|
package/src/lib/matchers.ts
CHANGED
|
@@ -248,8 +248,9 @@ export function match<T, E>(
|
|
|
248
248
|
raw = body;
|
|
249
249
|
break;
|
|
250
250
|
default:
|
|
251
|
-
|
|
252
|
-
|
|
251
|
+
throw new Error(
|
|
252
|
+
`Unsupported response type: ${encoding satisfies never}`,
|
|
253
|
+
);
|
|
253
254
|
}
|
|
254
255
|
|
|
255
256
|
if (matcher.enc === "fail") {
|
package/src/lib/sdks.ts
CHANGED
|
@@ -124,13 +124,15 @@ export class ClientSDK {
|
|
|
124
124
|
if (!base) {
|
|
125
125
|
return ERR(new InvalidRequestError("No base URL provided for operation"));
|
|
126
126
|
}
|
|
127
|
-
const
|
|
128
|
-
|
|
129
|
-
|
|
127
|
+
const baseURL = new URL(base);
|
|
128
|
+
let reqURL: URL;
|
|
130
129
|
if (path) {
|
|
131
|
-
|
|
132
|
-
reqURL
|
|
130
|
+
baseURL.pathname = baseURL.pathname.replace(/\/+$/, "") + "/";
|
|
131
|
+
reqURL = new URL(path, baseURL);
|
|
132
|
+
} else {
|
|
133
|
+
reqURL = baseURL;
|
|
133
134
|
}
|
|
135
|
+
reqURL.hash = "";
|
|
134
136
|
|
|
135
137
|
let finalQuery = query || "";
|
|
136
138
|
|
package/src/lib/security.ts
CHANGED
|
@@ -197,8 +197,7 @@ export function resolveSecurity(
|
|
|
197
197
|
applyBearer(state, spec);
|
|
198
198
|
break;
|
|
199
199
|
default:
|
|
200
|
-
spec satisfies never;
|
|
201
|
-
throw SecurityError.unrecognizedType(type);
|
|
200
|
+
throw SecurityError.unrecognizedType((spec satisfies never, type));
|
|
202
201
|
}
|
|
203
202
|
});
|
|
204
203
|
|
package/src/lib/url.ts
CHANGED
|
@@ -13,21 +13,23 @@ export function pathToFunc(
|
|
|
13
13
|
const paramRE = /\{([a-zA-Z0-9_][a-zA-Z0-9_-]*?)\}/g;
|
|
14
14
|
|
|
15
15
|
return function buildURLPath(params: Record<string, unknown> = {}): string {
|
|
16
|
-
return pathPattern
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
return pathPattern
|
|
17
|
+
.replace(paramRE, function (_, placeholder) {
|
|
18
|
+
if (!hasOwn.call(params, placeholder)) {
|
|
19
|
+
throw new Error(`Parameter '${placeholder}' is required`);
|
|
20
|
+
}
|
|
20
21
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
const value = params[placeholder];
|
|
23
|
+
if (typeof value !== "string" && typeof value !== "number") {
|
|
24
|
+
throw new Error(
|
|
25
|
+
`Parameter '${placeholder}' must be a string or number`,
|
|
26
|
+
);
|
|
27
|
+
}
|
|
27
28
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
return options?.charEncoding === "percent"
|
|
30
|
+
? encodeURIComponent(`${value}`)
|
|
31
|
+
: `${value}`;
|
|
32
|
+
})
|
|
33
|
+
.replace(/^\/+/, "");
|
|
32
34
|
};
|
|
33
35
|
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
|
|
11
|
+
export type AnermaCfForth = {
|
|
12
|
+
ip?: string | undefined;
|
|
13
|
+
product?: string | undefined;
|
|
14
|
+
serialNumber?: string | undefined;
|
|
15
|
+
unitName?: string | undefined;
|
|
16
|
+
version?: string | undefined;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
/** @internal */
|
|
20
|
+
export const AnermaCfForth$inboundSchema: z.ZodType<
|
|
21
|
+
AnermaCfForth,
|
|
22
|
+
z.ZodTypeDef,
|
|
23
|
+
unknown
|
|
24
|
+
> = z.object({
|
|
25
|
+
ip: z.string().optional(),
|
|
26
|
+
product: z.string().optional(),
|
|
27
|
+
serial_number: z.string().optional(),
|
|
28
|
+
unit_name: z.string().optional(),
|
|
29
|
+
version: z.string().optional(),
|
|
30
|
+
}).transform((v) => {
|
|
31
|
+
return remap$(v, {
|
|
32
|
+
"serial_number": "serialNumber",
|
|
33
|
+
"unit_name": "unitName",
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
export function anermaCfForthFromJSON(
|
|
38
|
+
jsonString: string,
|
|
39
|
+
): SafeParseResult<AnermaCfForth, SDKValidationError> {
|
|
40
|
+
return safeParse(
|
|
41
|
+
jsonString,
|
|
42
|
+
(x) => AnermaCfForth$inboundSchema.parse(JSON.parse(x)),
|
|
43
|
+
`Failed to parse 'AnermaCfForth' from JSON`,
|
|
44
|
+
);
|
|
45
|
+
}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import * as openEnums from "../../types/enums.js";
|
|
9
|
+
import { OpenEnum } from "../../types/enums.js";
|
|
10
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
11
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
12
|
+
import { CenseyeTarget, CenseyeTarget$inboundSchema } from "./censeyetarget.js";
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Current state of the job.
|
|
16
|
+
*/
|
|
17
|
+
export const State = {
|
|
18
|
+
Started: "started",
|
|
19
|
+
Completed: "completed",
|
|
20
|
+
Failed: "failed",
|
|
21
|
+
Unknown: "unknown",
|
|
22
|
+
} as const;
|
|
23
|
+
/**
|
|
24
|
+
* Current state of the job.
|
|
25
|
+
*/
|
|
26
|
+
export type State = OpenEnum<typeof State>;
|
|
27
|
+
|
|
28
|
+
export type CenseyeJob = {
|
|
29
|
+
/**
|
|
30
|
+
* The point-in-time the asset data was evaluated at.
|
|
31
|
+
*/
|
|
32
|
+
atTime?: Date | undefined;
|
|
33
|
+
/**
|
|
34
|
+
* When the job was created.
|
|
35
|
+
*/
|
|
36
|
+
createTime?: Date | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* When the job and results will be deleted.
|
|
39
|
+
*/
|
|
40
|
+
deleteTime?: Date | undefined;
|
|
41
|
+
/**
|
|
42
|
+
* Error message if the job failed.
|
|
43
|
+
*/
|
|
44
|
+
error?: string | undefined;
|
|
45
|
+
/**
|
|
46
|
+
* Unique identifier of the job.
|
|
47
|
+
*/
|
|
48
|
+
jobId: string;
|
|
49
|
+
/**
|
|
50
|
+
* Total number of result field-value pairs.
|
|
51
|
+
*/
|
|
52
|
+
resultCount?: number | undefined;
|
|
53
|
+
/**
|
|
54
|
+
* Current state of the job.
|
|
55
|
+
*/
|
|
56
|
+
state: State;
|
|
57
|
+
target: CenseyeTarget;
|
|
58
|
+
/**
|
|
59
|
+
* When the job was last updated.
|
|
60
|
+
*/
|
|
61
|
+
updateTime?: Date | undefined;
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
/** @internal */
|
|
65
|
+
export const State$inboundSchema: z.ZodType<State, z.ZodTypeDef, unknown> =
|
|
66
|
+
openEnums.inboundSchema(State);
|
|
67
|
+
|
|
68
|
+
/** @internal */
|
|
69
|
+
export const CenseyeJob$inboundSchema: z.ZodType<
|
|
70
|
+
CenseyeJob,
|
|
71
|
+
z.ZodTypeDef,
|
|
72
|
+
unknown
|
|
73
|
+
> = z.object({
|
|
74
|
+
at_time: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
75
|
+
.optional(),
|
|
76
|
+
create_time: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
77
|
+
.optional(),
|
|
78
|
+
delete_time: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
79
|
+
.optional(),
|
|
80
|
+
error: z.string().optional(),
|
|
81
|
+
job_id: z.string(),
|
|
82
|
+
result_count: z.number().int().optional(),
|
|
83
|
+
state: State$inboundSchema,
|
|
84
|
+
target: CenseyeTarget$inboundSchema,
|
|
85
|
+
update_time: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
86
|
+
.optional(),
|
|
87
|
+
}).transform((v) => {
|
|
88
|
+
return remap$(v, {
|
|
89
|
+
"at_time": "atTime",
|
|
90
|
+
"create_time": "createTime",
|
|
91
|
+
"delete_time": "deleteTime",
|
|
92
|
+
"job_id": "jobId",
|
|
93
|
+
"result_count": "resultCount",
|
|
94
|
+
"update_time": "updateTime",
|
|
95
|
+
});
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
export function censeyeJobFromJSON(
|
|
99
|
+
jsonString: string,
|
|
100
|
+
): SafeParseResult<CenseyeJob, SDKValidationError> {
|
|
101
|
+
return safeParse(
|
|
102
|
+
jsonString,
|
|
103
|
+
(x) => CenseyeJob$inboundSchema.parse(JSON.parse(x)),
|
|
104
|
+
`Failed to parse 'CenseyeJob' from JSON`,
|
|
105
|
+
);
|
|
106
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
import {
|
|
11
|
+
FieldValuePair,
|
|
12
|
+
FieldValuePair$inboundSchema,
|
|
13
|
+
} from "./fieldvaluepair.js";
|
|
14
|
+
|
|
15
|
+
export type CenseyeResult = {
|
|
16
|
+
/**
|
|
17
|
+
* Number of matching documents for this field-value combination.
|
|
18
|
+
*/
|
|
19
|
+
count: number;
|
|
20
|
+
/**
|
|
21
|
+
* The field-value pairs that were counted.
|
|
22
|
+
*/
|
|
23
|
+
fieldValuePairs: Array<FieldValuePair> | null;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
/** @internal */
|
|
27
|
+
export const CenseyeResult$inboundSchema: z.ZodType<
|
|
28
|
+
CenseyeResult,
|
|
29
|
+
z.ZodTypeDef,
|
|
30
|
+
unknown
|
|
31
|
+
> = z.object({
|
|
32
|
+
count: z.number(),
|
|
33
|
+
field_value_pairs: z.nullable(z.array(FieldValuePair$inboundSchema)),
|
|
34
|
+
}).transform((v) => {
|
|
35
|
+
return remap$(v, {
|
|
36
|
+
"field_value_pairs": "fieldValuePairs",
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
export function censeyeResultFromJSON(
|
|
41
|
+
jsonString: string,
|
|
42
|
+
): SafeParseResult<CenseyeResult, SDKValidationError> {
|
|
43
|
+
return safeParse(
|
|
44
|
+
jsonString,
|
|
45
|
+
(x) => CenseyeResult$inboundSchema.parse(JSON.parse(x)),
|
|
46
|
+
`Failed to parse 'CenseyeResult' from JSON`,
|
|
47
|
+
);
|
|
48
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
import { CenseyeResult, CenseyeResult$inboundSchema } from "./censeyeresult.js";
|
|
11
|
+
|
|
12
|
+
export type CenseyeResultsResponse = {
|
|
13
|
+
/**
|
|
14
|
+
* Token to retrieve the next page of results.
|
|
15
|
+
*/
|
|
16
|
+
nextPageToken?: string | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* List of count results.
|
|
19
|
+
*/
|
|
20
|
+
results: Array<CenseyeResult> | null;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
/** @internal */
|
|
24
|
+
export const CenseyeResultsResponse$inboundSchema: z.ZodType<
|
|
25
|
+
CenseyeResultsResponse,
|
|
26
|
+
z.ZodTypeDef,
|
|
27
|
+
unknown
|
|
28
|
+
> = z.object({
|
|
29
|
+
next_page_token: z.string().optional(),
|
|
30
|
+
results: z.nullable(z.array(CenseyeResult$inboundSchema)),
|
|
31
|
+
}).transform((v) => {
|
|
32
|
+
return remap$(v, {
|
|
33
|
+
"next_page_token": "nextPageToken",
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
export function censeyeResultsResponseFromJSON(
|
|
38
|
+
jsonString: string,
|
|
39
|
+
): SafeParseResult<CenseyeResultsResponse, SDKValidationError> {
|
|
40
|
+
return safeParse(
|
|
41
|
+
jsonString,
|
|
42
|
+
(x) => CenseyeResultsResponse$inboundSchema.parse(JSON.parse(x)),
|
|
43
|
+
`Failed to parse 'CenseyeResultsResponse' from JSON`,
|
|
44
|
+
);
|
|
45
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
|
|
11
|
+
export type CenseyeTarget = {
|
|
12
|
+
/**
|
|
13
|
+
* SHA-256 fingerprint of the certificate to analyze.
|
|
14
|
+
*/
|
|
15
|
+
certificateId?: string | undefined;
|
|
16
|
+
/**
|
|
17
|
+
* IP address of the host to analyze.
|
|
18
|
+
*/
|
|
19
|
+
hostId?: string | undefined;
|
|
20
|
+
/**
|
|
21
|
+
* Web property identifier (hostname:port) to analyze.
|
|
22
|
+
*/
|
|
23
|
+
webpropertyId?: string | undefined;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
/** @internal */
|
|
27
|
+
export const CenseyeTarget$inboundSchema: z.ZodType<
|
|
28
|
+
CenseyeTarget,
|
|
29
|
+
z.ZodTypeDef,
|
|
30
|
+
unknown
|
|
31
|
+
> = z.object({
|
|
32
|
+
certificate_id: z.string().optional(),
|
|
33
|
+
host_id: z.string().optional(),
|
|
34
|
+
webproperty_id: z.string().optional(),
|
|
35
|
+
}).transform((v) => {
|
|
36
|
+
return remap$(v, {
|
|
37
|
+
"certificate_id": "certificateId",
|
|
38
|
+
"host_id": "hostId",
|
|
39
|
+
"webproperty_id": "webpropertyId",
|
|
40
|
+
});
|
|
41
|
+
});
|
|
42
|
+
/** @internal */
|
|
43
|
+
export type CenseyeTarget$Outbound = {
|
|
44
|
+
certificate_id?: string | undefined;
|
|
45
|
+
host_id?: string | undefined;
|
|
46
|
+
webproperty_id?: string | undefined;
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
/** @internal */
|
|
50
|
+
export const CenseyeTarget$outboundSchema: z.ZodType<
|
|
51
|
+
CenseyeTarget$Outbound,
|
|
52
|
+
z.ZodTypeDef,
|
|
53
|
+
CenseyeTarget
|
|
54
|
+
> = z.object({
|
|
55
|
+
certificateId: z.string().optional(),
|
|
56
|
+
hostId: z.string().optional(),
|
|
57
|
+
webpropertyId: z.string().optional(),
|
|
58
|
+
}).transform((v) => {
|
|
59
|
+
return remap$(v, {
|
|
60
|
+
certificateId: "certificate_id",
|
|
61
|
+
hostId: "host_id",
|
|
62
|
+
webpropertyId: "webproperty_id",
|
|
63
|
+
});
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
export function censeyeTargetToJSON(censeyeTarget: CenseyeTarget): string {
|
|
67
|
+
return JSON.stringify(CenseyeTarget$outboundSchema.parse(censeyeTarget));
|
|
68
|
+
}
|
|
69
|
+
export function censeyeTargetFromJSON(
|
|
70
|
+
jsonString: string,
|
|
71
|
+
): SafeParseResult<CenseyeTarget, SDKValidationError> {
|
|
72
|
+
return safeParse(
|
|
73
|
+
jsonString,
|
|
74
|
+
(x) => CenseyeTarget$inboundSchema.parse(JSON.parse(x)),
|
|
75
|
+
`Failed to parse 'CenseyeTarget' from JSON`,
|
|
76
|
+
);
|
|
77
|
+
}
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
|
|
13
13
|
export type CountCondition = {
|
|
14
14
|
/**
|
|
15
|
-
* Field-value pairs to count matches for. Must target fields from the same nested object.
|
|
15
|
+
* Field-value pairs to count matches for. Must target fields from the same nested object and may contain at most 5 pairs per group.
|
|
16
16
|
*/
|
|
17
17
|
fieldValuePairs: Array<FieldValuePair> | null;
|
|
18
18
|
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import {
|
|
7
|
+
CenseyeTarget,
|
|
8
|
+
CenseyeTarget$Outbound,
|
|
9
|
+
CenseyeTarget$outboundSchema,
|
|
10
|
+
} from "./censeyetarget.js";
|
|
11
|
+
|
|
12
|
+
export type CreateCenseyeJobInputBody = {
|
|
13
|
+
target: CenseyeTarget;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
/** @internal */
|
|
17
|
+
export type CreateCenseyeJobInputBody$Outbound = {
|
|
18
|
+
target: CenseyeTarget$Outbound;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
/** @internal */
|
|
22
|
+
export const CreateCenseyeJobInputBody$outboundSchema: z.ZodType<
|
|
23
|
+
CreateCenseyeJobInputBody$Outbound,
|
|
24
|
+
z.ZodTypeDef,
|
|
25
|
+
CreateCenseyeJobInputBody
|
|
26
|
+
> = z.object({
|
|
27
|
+
target: CenseyeTarget$outboundSchema,
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
export function createCenseyeJobInputBodyToJSON(
|
|
31
|
+
createCenseyeJobInputBody: CreateCenseyeJobInputBody,
|
|
32
|
+
): string {
|
|
33
|
+
return JSON.stringify(
|
|
34
|
+
CreateCenseyeJobInputBody$outboundSchema.parse(createCenseyeJobInputBody),
|
|
35
|
+
);
|
|
36
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
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
|
+
CursorOnTargetEvent,
|
|
11
|
+
CursorOnTargetEvent$inboundSchema,
|
|
12
|
+
} from "./cursorontargetevent.js";
|
|
13
|
+
|
|
14
|
+
export type CursorOnTarget = {
|
|
15
|
+
events?: Array<CursorOnTargetEvent> | null | undefined;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
/** @internal */
|
|
19
|
+
export const CursorOnTarget$inboundSchema: z.ZodType<
|
|
20
|
+
CursorOnTarget,
|
|
21
|
+
z.ZodTypeDef,
|
|
22
|
+
unknown
|
|
23
|
+
> = z.object({
|
|
24
|
+
events: z.nullable(z.array(CursorOnTargetEvent$inboundSchema)).optional(),
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
export function cursorOnTargetFromJSON(
|
|
28
|
+
jsonString: string,
|
|
29
|
+
): SafeParseResult<CursorOnTarget, SDKValidationError> {
|
|
30
|
+
return safeParse(
|
|
31
|
+
jsonString,
|
|
32
|
+
(x) => CursorOnTarget$inboundSchema.parse(JSON.parse(x)),
|
|
33
|
+
`Failed to parse 'CursorOnTarget' from JSON`,
|
|
34
|
+
);
|
|
35
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
import {
|
|
11
|
+
CursorOnTargetPoint,
|
|
12
|
+
CursorOnTargetPoint$inboundSchema,
|
|
13
|
+
} from "./cursorontargetpoint.js";
|
|
14
|
+
import {
|
|
15
|
+
CursorOnTargetStatus,
|
|
16
|
+
CursorOnTargetStatus$inboundSchema,
|
|
17
|
+
} from "./cursorontargetstatus.js";
|
|
18
|
+
import {
|
|
19
|
+
CursorOnTargetTakv,
|
|
20
|
+
CursorOnTargetTakv$inboundSchema,
|
|
21
|
+
} from "./cursorontargettakv.js";
|
|
22
|
+
|
|
23
|
+
export type CursorOnTargetEvent = {
|
|
24
|
+
callsign?: string | undefined;
|
|
25
|
+
endpoint?: string | undefined;
|
|
26
|
+
how?: string | undefined;
|
|
27
|
+
point?: CursorOnTargetPoint | undefined;
|
|
28
|
+
stale?: string | undefined;
|
|
29
|
+
start?: string | undefined;
|
|
30
|
+
status?: CursorOnTargetStatus | undefined;
|
|
31
|
+
takv?: CursorOnTargetTakv | undefined;
|
|
32
|
+
time?: string | undefined;
|
|
33
|
+
type?: string | undefined;
|
|
34
|
+
uid?: string | undefined;
|
|
35
|
+
version?: string | undefined;
|
|
36
|
+
videoUrl?: string | undefined;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
/** @internal */
|
|
40
|
+
export const CursorOnTargetEvent$inboundSchema: z.ZodType<
|
|
41
|
+
CursorOnTargetEvent,
|
|
42
|
+
z.ZodTypeDef,
|
|
43
|
+
unknown
|
|
44
|
+
> = z.object({
|
|
45
|
+
callsign: z.string().optional(),
|
|
46
|
+
endpoint: z.string().optional(),
|
|
47
|
+
how: z.string().optional(),
|
|
48
|
+
point: CursorOnTargetPoint$inboundSchema.optional(),
|
|
49
|
+
stale: z.string().optional(),
|
|
50
|
+
start: z.string().optional(),
|
|
51
|
+
status: CursorOnTargetStatus$inboundSchema.optional(),
|
|
52
|
+
takv: CursorOnTargetTakv$inboundSchema.optional(),
|
|
53
|
+
time: z.string().optional(),
|
|
54
|
+
type: z.string().optional(),
|
|
55
|
+
uid: z.string().optional(),
|
|
56
|
+
version: z.string().optional(),
|
|
57
|
+
video_url: z.string().optional(),
|
|
58
|
+
}).transform((v) => {
|
|
59
|
+
return remap$(v, {
|
|
60
|
+
"video_url": "videoUrl",
|
|
61
|
+
});
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
export function cursorOnTargetEventFromJSON(
|
|
65
|
+
jsonString: string,
|
|
66
|
+
): SafeParseResult<CursorOnTargetEvent, SDKValidationError> {
|
|
67
|
+
return safeParse(
|
|
68
|
+
jsonString,
|
|
69
|
+
(x) => CursorOnTargetEvent$inboundSchema.parse(JSON.parse(x)),
|
|
70
|
+
`Failed to parse 'CursorOnTargetEvent' from JSON`,
|
|
71
|
+
);
|
|
72
|
+
}
|
|
@@ -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 { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
|
|
10
|
+
export type CursorOnTargetPoint = {
|
|
11
|
+
ce?: number | undefined;
|
|
12
|
+
hae?: number | undefined;
|
|
13
|
+
lat?: number | undefined;
|
|
14
|
+
le?: number | undefined;
|
|
15
|
+
lon?: number | undefined;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
/** @internal */
|
|
19
|
+
export const CursorOnTargetPoint$inboundSchema: z.ZodType<
|
|
20
|
+
CursorOnTargetPoint,
|
|
21
|
+
z.ZodTypeDef,
|
|
22
|
+
unknown
|
|
23
|
+
> = z.object({
|
|
24
|
+
ce: z.number().optional(),
|
|
25
|
+
hae: z.number().optional(),
|
|
26
|
+
lat: z.number().optional(),
|
|
27
|
+
le: z.number().optional(),
|
|
28
|
+
lon: z.number().optional(),
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
export function cursorOnTargetPointFromJSON(
|
|
32
|
+
jsonString: string,
|
|
33
|
+
): SafeParseResult<CursorOnTargetPoint, SDKValidationError> {
|
|
34
|
+
return safeParse(
|
|
35
|
+
jsonString,
|
|
36
|
+
(x) => CursorOnTargetPoint$inboundSchema.parse(JSON.parse(x)),
|
|
37
|
+
`Failed to parse 'CursorOnTargetPoint' from JSON`,
|
|
38
|
+
);
|
|
39
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
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
|
+
export type CursorOnTargetStatus = {
|
|
11
|
+
battery?: string | undefined;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
/** @internal */
|
|
15
|
+
export const CursorOnTargetStatus$inboundSchema: z.ZodType<
|
|
16
|
+
CursorOnTargetStatus,
|
|
17
|
+
z.ZodTypeDef,
|
|
18
|
+
unknown
|
|
19
|
+
> = z.object({
|
|
20
|
+
battery: z.string().optional(),
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
export function cursorOnTargetStatusFromJSON(
|
|
24
|
+
jsonString: string,
|
|
25
|
+
): SafeParseResult<CursorOnTargetStatus, SDKValidationError> {
|
|
26
|
+
return safeParse(
|
|
27
|
+
jsonString,
|
|
28
|
+
(x) => CursorOnTargetStatus$inboundSchema.parse(JSON.parse(x)),
|
|
29
|
+
`Failed to parse 'CursorOnTargetStatus' from JSON`,
|
|
30
|
+
);
|
|
31
|
+
}
|