@censys/platform-sdk 0.8.0 → 0.9.1
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 +14 -8
- package/docs/sdks/accountmanagement/README.md +169 -5
- package/docs/sdks/collections/README.md +6 -7
- package/docs/sdks/globaldata/README.md +0 -1
- package/docs/sdks/threathunting/README.md +78 -1
- package/examples/package-lock.json +1 -1
- package/funcs/accountManagementGetMemberCreditUsage.d.ts +2 -2
- package/funcs/accountManagementGetMemberCreditUsage.js +5 -2
- package/funcs/accountManagementGetMemberCreditUsage.js.map +1 -1
- package/funcs/accountManagementGetOrganizationCreditUsage.d.ts +1 -1
- package/funcs/accountManagementGetOrganizationCreditUsage.js +5 -1
- package/funcs/accountManagementGetOrganizationCreditUsage.js.map +1 -1
- package/funcs/accountManagementGetOrganizationCredits.d.ts +1 -1
- package/funcs/accountManagementGetOrganizationCredits.js +1 -1
- package/funcs/accountManagementGetUserCredits.d.ts +18 -0
- package/funcs/accountManagementGetUserCredits.d.ts.map +1 -0
- package/funcs/accountManagementGetUserCredits.js +112 -0
- package/funcs/accountManagementGetUserCredits.js.map +1 -0
- package/funcs/accountManagementGetUserCreditsUsage.d.ts +18 -0
- package/funcs/accountManagementGetUserCreditsUsage.d.ts.map +1 -0
- package/funcs/accountManagementGetUserCreditsUsage.js +129 -0
- package/funcs/accountManagementGetUserCreditsUsage.js.map +1 -0
- package/funcs/collectionsCreate.d.ts +1 -1
- package/funcs/collectionsCreate.js +1 -1
- package/funcs/collectionsDelete.d.ts +1 -1
- package/funcs/collectionsDelete.js +1 -1
- package/funcs/collectionsGet.d.ts +1 -1
- package/funcs/collectionsGet.js +1 -1
- package/funcs/collectionsList.d.ts +1 -1
- package/funcs/collectionsList.js +1 -1
- package/funcs/collectionsListEvents.d.ts +1 -1
- package/funcs/collectionsListEvents.js +1 -1
- package/funcs/collectionsUpdate.d.ts +1 -1
- package/funcs/collectionsUpdate.js +1 -1
- package/funcs/threatHuntingListThreats.d.ts +18 -0
- package/funcs/threatHuntingListThreats.d.ts.map +1 -0
- package/funcs/threatHuntingListThreats.js +130 -0
- package/funcs/threatHuntingListThreats.js.map +1 -0
- package/jsr.json +1 -1
- package/lib/config.d.ts +4 -4
- package/lib/config.js +4 -4
- package/lib/encodings.d.ts +1 -0
- package/lib/encodings.d.ts.map +1 -1
- package/lib/encodings.js +12 -1
- package/lib/encodings.js.map +1 -1
- package/lib/sdks.js +2 -2
- package/lib/sdks.js.map +1 -1
- package/models/components/alternativequery.d.ts +3 -3
- package/models/components/alternativequery.d.ts.map +1 -1
- package/models/components/alternativequery.js +2 -2
- package/models/components/alternativequery.js.map +1 -1
- package/models/components/attribute.d.ts +4 -3
- package/models/components/attribute.d.ts.map +1 -1
- package/models/components/attribute.js +3 -2
- package/models/components/attribute.js.map +1 -1
- package/models/components/certificate.d.ts +5 -5
- package/models/components/certificate.d.ts.map +1 -1
- package/models/components/certificate.js +3 -3
- package/models/components/certificate.js.map +1 -1
- package/models/components/certificaterevocationrevocationinfo.d.ts +3 -3
- package/models/components/certificaterevocationrevocationinfo.d.ts.map +1 -1
- package/models/components/certificaterevocationrevocationinfo.js +2 -2
- package/models/components/certificaterevocationrevocationinfo.js.map +1 -1
- package/models/components/cobaltstrikeconfig.d.ts +1 -0
- package/models/components/cobaltstrikeconfig.d.ts.map +1 -1
- package/models/components/cobaltstrikeconfig.js +2 -0
- package/models/components/cobaltstrikeconfig.js.map +1 -1
- package/models/components/collection.d.ts +9 -5
- package/models/components/collection.d.ts.map +1 -1
- package/models/components/collection.js +5 -2
- package/models/components/collection.js.map +1 -1
- package/models/components/creditexpiration.d.ts +4 -0
- package/models/components/creditexpiration.d.ts.map +1 -1
- package/models/components/creditexpiration.js +2 -0
- package/models/components/creditexpiration.js.map +1 -1
- package/models/components/creditusagereport.d.ts +44 -5
- package/models/components/creditusagereport.d.ts.map +1 -1
- package/models/components/creditusagereport.js +28 -7
- package/models/components/creditusagereport.js.map +1 -1
- package/models/components/creditusagereportperiod.d.ts +33 -0
- package/models/components/creditusagereportperiod.d.ts.map +1 -0
- package/models/components/creditusagereportperiod.js +65 -0
- package/models/components/creditusagereportperiod.js.map +1 -0
- package/models/components/cvsscomponents.d.ts +17 -17
- package/models/components/cvsscomponents.d.ts.map +1 -1
- package/models/components/cvsscomponents.js +9 -9
- package/models/components/cvsscomponents.js.map +1 -1
- package/models/components/cvssv4components.d.ts +29 -29
- package/models/components/cvssv4components.d.ts.map +1 -1
- package/models/components/cvssv4components.js +15 -17
- package/models/components/cvssv4components.js.map +1 -1
- package/models/components/dns.d.ts +5 -5
- package/models/components/dns.d.ts.map +1 -1
- package/models/components/dns.js +3 -3
- package/models/components/dns.js.map +1 -1
- package/models/components/dnsresourcerecord.d.ts +3 -3
- package/models/components/dnsresourcerecord.d.ts.map +1 -1
- package/models/components/dnsresourcerecord.js +2 -1
- package/models/components/dnsresourcerecord.js.map +1 -1
- package/models/components/endpointscan.d.ts +3 -3
- package/models/components/endpointscan.d.ts.map +1 -1
- package/models/components/endpointscan.js +2 -1
- package/models/components/endpointscan.js.map +1 -1
- package/models/components/endpointscanstate.d.ts +5 -3
- package/models/components/endpointscanstate.d.ts.map +1 -1
- package/models/components/endpointscanstate.js +4 -1
- package/models/components/endpointscanstate.js.map +1 -1
- package/models/components/eventassetchange.d.ts +3 -3
- package/models/components/eventassetchange.d.ts.map +1 -1
- package/models/components/eventassetchange.js +2 -2
- package/models/components/eventassetchange.js.map +1 -1
- package/models/components/eventstatuschange.d.ts +5 -5
- package/models/components/eventstatuschange.d.ts.map +1 -1
- package/models/components/eventstatuschange.js +3 -4
- package/models/components/eventstatuschange.js.map +1 -1
- package/models/components/extractedendpointdata.d.ts +17 -0
- package/models/components/extractedendpointdata.d.ts.map +1 -0
- package/models/components/extractedendpointdata.js +65 -0
- package/models/components/extractedendpointdata.js.map +1 -0
- package/models/components/extractedendpointdataanalyticsservice.d.ts +11 -0
- package/models/components/extractedendpointdataanalyticsservice.d.ts.map +1 -0
- package/models/components/extractedendpointdataanalyticsservice.js +51 -0
- package/models/components/extractedendpointdataanalyticsservice.js.map +1 -0
- package/models/components/extractedendpointdatacopyright.d.ts +13 -0
- package/models/components/extractedendpointdatacopyright.d.ts.map +1 -0
- package/models/components/extractedendpointdatacopyright.js +59 -0
- package/models/components/extractedendpointdatacopyright.js.map +1 -0
- package/models/components/hajime.d.ts +10 -0
- package/models/components/hajime.d.ts.map +1 -0
- package/models/components/hajime.js +56 -0
- package/models/components/hajime.js.map +1 -0
- package/models/components/hostdnsforwardresolution.d.ts +3 -3
- package/models/components/hostdnsforwardresolution.d.ts.map +1 -1
- package/models/components/hostdnsforwardresolution.js +2 -2
- package/models/components/hostdnsforwardresolution.js.map +1 -1
- package/models/components/http.d.ts +7 -0
- package/models/components/http.d.ts.map +1 -1
- package/models/components/http.js +7 -0
- package/models/components/http.js.map +1 -1
- package/models/components/httpredirectchainlink.d.ts +25 -0
- package/models/components/httpredirectchainlink.d.ts.map +1 -0
- package/models/components/httpredirectchainlink.js +70 -0
- package/models/components/httpredirectchainlink.js.map +1 -0
- package/models/components/index.d.ts +14 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +14 -0
- package/models/components/index.js.map +1 -1
- package/models/components/jarmscan.d.ts +3 -3
- package/models/components/jarmscan.d.ts.map +1 -1
- package/models/components/jarmscan.js +2 -1
- package/models/components/jarmscan.js.map +1 -1
- package/models/components/kev.d.ts +3 -3
- package/models/components/kev.d.ts.map +1 -1
- package/models/components/kev.js +2 -2
- package/models/components/kev.js.map +1 -1
- package/models/components/label.d.ts +4 -3
- package/models/components/label.d.ts.map +1 -1
- package/models/components/label.js +3 -2
- package/models/components/label.js.map +1 -1
- package/models/components/matchedservice.d.ts +3 -3
- package/models/components/matchedservice.d.ts.map +1 -1
- package/models/components/matchedservice.js +2 -1
- package/models/components/matchedservice.js.map +1 -1
- package/models/components/networklog.d.ts +18 -0
- package/models/components/networklog.d.ts.map +1 -0
- package/models/components/networklog.js +58 -0
- package/models/components/networklog.js.map +1 -0
- package/models/components/networklogresourceinfo.d.ts +49 -0
- package/models/components/networklogresourceinfo.d.ts.map +1 -0
- package/models/components/networklogresourceinfo.js +64 -0
- package/models/components/networklogresourceinfo.js.map +1 -0
- package/models/components/paginationinfo.d.ts +1 -1
- package/models/components/reject.d.ts +3 -3
- package/models/components/reject.d.ts.map +1 -1
- package/models/components/reject.js +2 -2
- package/models/components/reject.js.map +1 -1
- package/models/components/representativeinfo.d.ts +3 -3
- package/models/components/representativeinfo.d.ts.map +1 -1
- package/models/components/representativeinfo.js +2 -1
- package/models/components/representativeinfo.js.map +1 -1
- package/models/components/responseenvelopethreatslistresponse.d.ts +11 -0
- package/models/components/responseenvelopethreatslistresponse.d.ts.map +1 -0
- package/models/components/responseenvelopethreatslistresponse.js +51 -0
- package/models/components/responseenvelopethreatslistresponse.js.map +1 -0
- package/models/components/responseenvelopeusercredits.d.ts +11 -0
- package/models/components/responseenvelopeusercredits.d.ts.map +1 -0
- package/models/components/responseenvelopeusercredits.js +51 -0
- package/models/components/responseenvelopeusercredits.js.map +1 -0
- package/models/components/risk.d.ts +8 -7
- package/models/components/risk.d.ts.map +1 -1
- package/models/components/risk.js +5 -6
- package/models/components/risk.js.map +1 -1
- package/models/components/rootstore.d.ts +3 -3
- package/models/components/rootstore.d.ts.map +1 -1
- package/models/components/rootstore.js +2 -1
- package/models/components/rootstore.js.map +1 -1
- package/models/components/searchconvertqueryresponse.d.ts +3 -3
- package/models/components/searchconvertqueryresponse.d.ts.map +1 -1
- package/models/components/searchconvertqueryresponse.js +2 -1
- package/models/components/searchconvertqueryresponse.js.map +1 -1
- package/models/components/service.d.ts +5 -3
- package/models/components/service.d.ts.map +1 -1
- package/models/components/service.js +4 -1
- package/models/components/service.js.map +1 -1
- package/models/components/serviceid.d.ts +3 -3
- package/models/components/serviceid.d.ts.map +1 -1
- package/models/components/serviceid.js +2 -1
- package/models/components/serviceid.js.map +1 -1
- package/models/components/servicescan.d.ts +5 -3
- package/models/components/servicescan.d.ts.map +1 -1
- package/models/components/servicescan.js +4 -1
- package/models/components/servicescan.js.map +1 -1
- package/models/components/sourceusagebreakdown.d.ts +9 -1
- package/models/components/sourceusagebreakdown.d.ts.map +1 -1
- package/models/components/sourceusagebreakdown.js +7 -0
- package/models/components/sourceusagebreakdown.js.map +1 -1
- package/models/components/threat.d.ts +4 -3
- package/models/components/threat.d.ts.map +1 -1
- package/models/components/threat.js +3 -1
- package/models/components/threat.js.map +1 -1
- package/models/components/threatlistitem.d.ts +42 -0
- package/models/components/threatlistitem.d.ts.map +1 -0
- package/models/components/threatlistitem.js +66 -0
- package/models/components/threatlistitem.js.map +1 -0
- package/models/components/threatreference.d.ts +13 -0
- package/models/components/threatreference.d.ts.map +1 -0
- package/models/components/threatreference.js +50 -0
- package/models/components/threatreference.js.map +1 -0
- package/models/components/threatslistresponse.d.ts +14 -0
- package/models/components/threatslistresponse.d.ts.map +1 -0
- package/models/components/threatslistresponse.js +51 -0
- package/models/components/threatslistresponse.js.map +1 -0
- package/models/components/tls.d.ts +3 -3
- package/models/components/tls.d.ts.map +1 -1
- package/models/components/tls.js +2 -1
- package/models/components/tls.js.map +1 -1
- package/models/components/tlsversiondata.d.ts +3 -3
- package/models/components/tlsversiondata.d.ts.map +1 -1
- package/models/components/tlsversiondata.js +2 -2
- package/models/components/tlsversiondata.js.map +1 -1
- package/models/components/trackedscantask.d.ts +3 -3
- package/models/components/trackedscantask.d.ts.map +1 -1
- package/models/components/trackedscantask.js +2 -1
- package/models/components/trackedscantask.js.map +1 -1
- package/models/components/usercredits.d.ts +17 -0
- package/models/components/usercredits.d.ts.map +1 -0
- package/models/components/usercredits.js +57 -0
- package/models/components/usercredits.js.map +1 -0
- package/models/components/vuln.d.ts +8 -7
- package/models/components/vuln.d.ts.map +1 -1
- package/models/components/vuln.js +5 -4
- package/models/components/vuln.js.map +1 -1
- package/models/operations/index.d.ts +3 -0
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +3 -0
- package/models/operations/index.js.map +1 -1
- package/models/operations/v3accountmanagementmembercreditsusage.d.ts +33 -3
- package/models/operations/v3accountmanagementmembercreditsusage.d.ts.map +1 -1
- package/models/operations/v3accountmanagementmembercreditsusage.js +17 -2
- package/models/operations/v3accountmanagementmembercreditsusage.js.map +1 -1
- package/models/operations/v3accountmanagementorgcreditsusage.d.ts +38 -3
- package/models/operations/v3accountmanagementorgcreditsusage.d.ts.map +1 -1
- package/models/operations/v3accountmanagementorgcreditsusage.js +20 -2
- package/models/operations/v3accountmanagementorgcreditsusage.js.map +1 -1
- package/models/operations/v3accountmanagementusercredits.d.ts +14 -0
- package/models/operations/v3accountmanagementusercredits.d.ts.map +1 -0
- package/models/operations/v3accountmanagementusercredits.js +58 -0
- package/models/operations/v3accountmanagementusercredits.js.map +1 -0
- package/models/operations/v3accountmanagementusercreditsusage.d.ts +57 -0
- package/models/operations/v3accountmanagementusercreditsusage.d.ts.map +1 -0
- package/models/operations/v3accountmanagementusercreditsusage.js +85 -0
- package/models/operations/v3accountmanagementusercreditsusage.js.map +1 -0
- package/models/operations/v3globaldatasearchaggregate.d.ts +1 -1
- package/models/operations/v3globaldatasearchquery.d.ts +1 -1
- package/models/operations/v3threathuntingthreatslist.d.ts +35 -0
- package/models/operations/v3threathuntingthreatslist.d.ts.map +1 -0
- package/models/operations/v3threathuntingthreatslist.js +71 -0
- package/models/operations/v3threathuntingthreatslist.js.map +1 -0
- package/package.json +1 -1
- package/sdk/accountmanagement.d.ts +18 -4
- package/sdk/accountmanagement.d.ts.map +1 -1
- package/sdk/accountmanagement.js +24 -4
- package/sdk/accountmanagement.js.map +1 -1
- package/sdk/collections.d.ts +6 -6
- package/sdk/collections.js +6 -6
- package/sdk/threathunting.d.ts +7 -0
- package/sdk/threathunting.d.ts.map +1 -1
- package/sdk/threathunting.js +10 -0
- package/sdk/threathunting.js.map +1 -1
- package/src/funcs/accountManagementGetMemberCreditUsage.ts +5 -2
- package/src/funcs/accountManagementGetOrganizationCreditUsage.ts +5 -1
- package/src/funcs/accountManagementGetOrganizationCredits.ts +1 -1
- package/src/funcs/accountManagementGetUserCredits.ts +163 -0
- package/src/funcs/accountManagementGetUserCreditsUsage.ts +190 -0
- package/src/funcs/collectionsCreate.ts +1 -1
- package/src/funcs/collectionsDelete.ts +1 -1
- package/src/funcs/collectionsGet.ts +1 -1
- package/src/funcs/collectionsList.ts +1 -1
- package/src/funcs/collectionsListEvents.ts +1 -1
- package/src/funcs/collectionsUpdate.ts +1 -1
- package/src/funcs/threatHuntingListThreats.ts +187 -0
- package/src/lib/config.ts +4 -4
- package/src/lib/encodings.ts +17 -3
- package/src/lib/sdks.ts +2 -2
- package/src/models/components/alternativequery.ts +5 -4
- package/src/models/components/attribute.ts +6 -4
- package/src/models/components/certificate.ts +14 -8
- package/src/models/components/certificaterevocationrevocationinfo.ts +5 -4
- package/src/models/components/cobaltstrikeconfig.ts +3 -0
- package/src/models/components/collection.ts +20 -8
- package/src/models/components/creditexpiration.ts +6 -0
- package/src/models/components/creditusagereport.ts +70 -11
- package/src/models/components/creditusagereportperiod.ts +69 -0
- package/src/models/components/cvsscomponents.ts +47 -30
- package/src/models/components/cvssv4components.ts +83 -53
- package/src/models/components/dns.ts +11 -8
- package/src/models/components/dnsresourcerecord.ts +8 -5
- package/src/models/components/endpointscan.ts +8 -5
- package/src/models/components/endpointscanstate.ts +14 -5
- package/src/models/components/eventassetchange.ts +8 -4
- package/src/models/components/eventstatuschange.ts +14 -7
- package/src/models/components/extractedendpointdata.ts +62 -0
- package/src/models/components/extractedendpointdataanalyticsservice.ts +34 -0
- package/src/models/components/extractedendpointdatacopyright.ts +43 -0
- package/src/models/components/hajime.ts +33 -0
- package/src/models/components/hostdnsforwardresolution.ts +8 -4
- package/src/models/components/http.ts +15 -0
- package/src/models/components/httpredirectchainlink.ts +65 -0
- package/src/models/components/index.ts +14 -0
- package/src/models/components/jarmscan.ts +8 -5
- package/src/models/components/kev.ts +8 -4
- package/src/models/components/label.ts +9 -4
- package/src/models/components/matchedservice.ts +8 -5
- package/src/models/components/networklog.ts +49 -0
- package/src/models/components/networklogresourceinfo.ts +84 -0
- package/src/models/components/paginationinfo.ts +1 -1
- package/src/models/components/reject.ts +8 -4
- package/src/models/components/representativeinfo.ts +8 -5
- package/src/models/components/responseenvelopethreatslistresponse.ts +36 -0
- package/src/models/components/responseenvelopeusercredits.ts +32 -0
- package/src/models/components/risk.ts +21 -10
- package/src/models/components/rootstore.ts +5 -5
- package/src/models/components/searchconvertqueryresponse.ts +8 -5
- package/src/models/components/service.ts +11 -5
- package/src/models/components/serviceid.ts +8 -5
- package/src/models/components/servicescan.ts +11 -5
- package/src/models/components/sourceusagebreakdown.ts +16 -1
- package/src/models/components/threat.ts +9 -4
- package/src/models/components/threatlistitem.ts +81 -0
- package/src/models/components/threatreference.ts +34 -0
- package/src/models/components/threatslistresponse.ts +38 -0
- package/src/models/components/tls.ts +8 -5
- package/src/models/components/tlsversiondata.ts +5 -4
- package/src/models/components/trackedscantask.ts +8 -5
- package/src/models/components/usercredits.ts +45 -0
- package/src/models/components/vuln.ts +21 -11
- package/src/models/operations/index.ts +3 -0
- package/src/models/operations/v3accountmanagementmembercreditsusage.ts +43 -4
- package/src/models/operations/v3accountmanagementorgcreditsusage.ts +49 -4
- package/src/models/operations/v3accountmanagementusercredits.ts +41 -0
- package/src/models/operations/v3accountmanagementusercreditsusage.ts +128 -0
- package/src/models/operations/v3globaldatasearchaggregate.ts +1 -1
- package/src/models/operations/v3globaldatasearchquery.ts +1 -1
- package/src/models/operations/v3threathuntingthreatslist.ts +86 -0
- package/src/sdk/accountmanagement.ts +38 -4
- package/src/sdk/collections.ts +6 -6
- package/src/sdk/threathunting.ts +18 -0
- package/src/types/enums.ts +38 -9
- package/src/types/index.ts +2 -2
- package/src/types/unrecognized.ts +35 -0
- package/tsconfig.json +1 -2
- package/types/enums.d.ts +8 -11
- package/types/enums.d.ts.map +1 -1
- package/types/enums.js +59 -3
- package/types/enums.js.map +1 -1
- package/types/index.d.ts +2 -2
- package/types/index.d.ts.map +1 -1
- package/types/index.js +16 -3
- package/types/index.js.map +1 -1
- package/types/unrecognized.d.ts +16 -0
- package/types/unrecognized.d.ts.map +1 -0
- package/types/unrecognized.js +34 -0
- package/types/unrecognized.js.map +1 -0
|
@@ -9,7 +9,7 @@ import * as operations from "../models/operations/index.js";
|
|
|
9
9
|
import { APIPromise } from "../types/async.js";
|
|
10
10
|
import { Result } from "../types/fp.js";
|
|
11
11
|
/**
|
|
12
|
-
* Get organization credit
|
|
12
|
+
* Get organization credit balance
|
|
13
13
|
*
|
|
14
14
|
* @remarks
|
|
15
15
|
* Retrieve credit balance and expiration information for an organization. <br><br>Credits expire 12 months after they are acquired.<br><br>This endpoint does not cost any credits to execute.
|
|
@@ -47,7 +47,7 @@ const errors = __importStar(require("../models/errors/index.js"));
|
|
|
47
47
|
const operations = __importStar(require("../models/operations/index.js"));
|
|
48
48
|
const async_js_1 = require("../types/async.js");
|
|
49
49
|
/**
|
|
50
|
-
* Get organization credit
|
|
50
|
+
* Get organization credit balance
|
|
51
51
|
*
|
|
52
52
|
* @remarks
|
|
53
53
|
* Retrieve credit balance and expiration information for an organization. <br><br>Credits expire 12 months after they are acquired.<br><br>This endpoint does not cost any credits to execute.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { SDKCore } from "../core.js";
|
|
2
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
3
|
+
import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/httpclienterrors.js";
|
|
4
|
+
import * as errors from "../models/errors/index.js";
|
|
5
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
6
|
+
import { SDKBaseError } from "../models/errors/sdkbaseerror.js";
|
|
7
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
8
|
+
import * as operations from "../models/operations/index.js";
|
|
9
|
+
import { APIPromise } from "../types/async.js";
|
|
10
|
+
import { Result } from "../types/fp.js";
|
|
11
|
+
/**
|
|
12
|
+
* Get Free user credit balance
|
|
13
|
+
*
|
|
14
|
+
* @remarks
|
|
15
|
+
* Retrieve your Free user account credit balance and refresh information. To retrieve the credit balance for a Starter or Enterprise account, use the [get organization credit balance endpoint](https://docs.censys.com/reference/v3-accountmanagement-org-credits).<br><br>This endpoint does not cost any credits to execute.
|
|
16
|
+
*/
|
|
17
|
+
export declare function accountManagementGetUserCredits(client: SDKCore, options?: RequestOptions): APIPromise<Result<operations.V3AccountmanagementUserCreditsResponse, errors.AuthenticationError | errors.ErrorModel | SDKBaseError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
18
|
+
//# sourceMappingURL=accountManagementGetUserCredits.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accountManagementGetUserCredits.d.ts","sourceRoot":"","sources":["../src/funcs/accountManagementGetUserCredits.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAGrC,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,MAAM,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AACtF,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAChE,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC;;;;;GAKG;AACH,wBAAgB,+BAA+B,CAC7C,MAAM,EAAE,OAAO,EACf,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CACX,MAAM,CACJ,UAAU,CAAC,sCAAsC,EAC/C,MAAM,CAAC,mBAAmB,GAC1B,MAAM,CAAC,UAAU,GACjB,YAAY,GACZ,uBAAuB,GACvB,eAAe,GACf,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,qBAAqB,GACrB,kBAAkB,CACrB,CACF,CAKA"}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.accountManagementGetUserCredits = accountManagementGetUserCredits;
|
|
40
|
+
const M = __importStar(require("../lib/matchers.js"));
|
|
41
|
+
const primitives_js_1 = require("../lib/primitives.js");
|
|
42
|
+
const security_js_1 = require("../lib/security.js");
|
|
43
|
+
const url_js_1 = require("../lib/url.js");
|
|
44
|
+
const errors = __importStar(require("../models/errors/index.js"));
|
|
45
|
+
const operations = __importStar(require("../models/operations/index.js"));
|
|
46
|
+
const async_js_1 = require("../types/async.js");
|
|
47
|
+
/**
|
|
48
|
+
* Get Free user credit balance
|
|
49
|
+
*
|
|
50
|
+
* @remarks
|
|
51
|
+
* Retrieve your Free user account credit balance and refresh information. To retrieve the credit balance for a Starter or Enterprise account, use the [get organization credit balance endpoint](https://docs.censys.com/reference/v3-accountmanagement-org-credits).<br><br>This endpoint does not cost any credits to execute.
|
|
52
|
+
*/
|
|
53
|
+
function accountManagementGetUserCredits(client, options) {
|
|
54
|
+
return new async_js_1.APIPromise($do(client, options));
|
|
55
|
+
}
|
|
56
|
+
async function $do(client, options) {
|
|
57
|
+
const path = (0, url_js_1.pathToFunc)("/v3/accounts/users/credits")();
|
|
58
|
+
const headers = new Headers((0, primitives_js_1.compactMap)({
|
|
59
|
+
Accept: "application/json",
|
|
60
|
+
}));
|
|
61
|
+
const secConfig = await (0, security_js_1.extractSecurity)(client._options.personalAccessToken);
|
|
62
|
+
const securityInput = secConfig == null
|
|
63
|
+
? {}
|
|
64
|
+
: { personalAccessToken: secConfig };
|
|
65
|
+
const requestSecurity = (0, security_js_1.resolveGlobalSecurity)(securityInput);
|
|
66
|
+
const context = {
|
|
67
|
+
options: client._options,
|
|
68
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
69
|
+
operationID: "v3-accountmanagement-user-credits",
|
|
70
|
+
oAuth2Scopes: null,
|
|
71
|
+
resolvedSecurity: requestSecurity,
|
|
72
|
+
securitySource: client._options.personalAccessToken,
|
|
73
|
+
retryConfig: options?.retries
|
|
74
|
+
|| client._options.retryConfig
|
|
75
|
+
|| { strategy: "none" },
|
|
76
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
77
|
+
};
|
|
78
|
+
const requestRes = client._createRequest(context, {
|
|
79
|
+
security: requestSecurity,
|
|
80
|
+
method: "GET",
|
|
81
|
+
baseURL: options?.serverURL,
|
|
82
|
+
path: path,
|
|
83
|
+
headers: headers,
|
|
84
|
+
userAgent: client._options.userAgent,
|
|
85
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
86
|
+
}, options);
|
|
87
|
+
if (!requestRes.ok) {
|
|
88
|
+
return [requestRes, { status: "invalid" }];
|
|
89
|
+
}
|
|
90
|
+
const req = requestRes.value;
|
|
91
|
+
const doResult = await client._do(req, {
|
|
92
|
+
context,
|
|
93
|
+
errorCodes: ["401", "404", "4XX", "5XX"],
|
|
94
|
+
retryConfig: context.retryConfig,
|
|
95
|
+
retryCodes: context.retryCodes,
|
|
96
|
+
});
|
|
97
|
+
if (!doResult.ok) {
|
|
98
|
+
return [doResult, { status: "request-error", request: req }];
|
|
99
|
+
}
|
|
100
|
+
const response = doResult.value;
|
|
101
|
+
const responseFields = {
|
|
102
|
+
HttpMeta: { Response: response, Request: req },
|
|
103
|
+
};
|
|
104
|
+
const [result] = await M.match(M.json(200, operations.V3AccountmanagementUserCreditsResponse$inboundSchema, { hdrs: true, key: "Result" }), M.jsonErr(401, errors.AuthenticationError$inboundSchema), M.jsonErr(404, errors.ErrorModel$inboundSchema, {
|
|
105
|
+
ctype: "application/problem+json",
|
|
106
|
+
}), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
|
|
107
|
+
if (!result.ok) {
|
|
108
|
+
return [result, { status: "complete", request: req, response }];
|
|
109
|
+
}
|
|
110
|
+
return [result, { status: "complete", request: req, response }];
|
|
111
|
+
}
|
|
112
|
+
//# sourceMappingURL=accountManagementGetUserCredits.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accountManagementGetUserCredits.js","sourceRoot":"","sources":["../src/funcs/accountManagementGetUserCredits.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BH,0EAsBC;AAhDD,sDAAwC;AACxC,wDAAkD;AAElD,oDAA4E;AAC5E,0CAA2C;AAQ3C,kEAAoD;AAIpD,0EAA4D;AAC5D,gDAAwD;AAGxD;;;;;GAKG;AACH,SAAgB,+BAA+B,CAC7C,MAAe,EACf,OAAwB;IAgBxB,OAAO,IAAI,qBAAU,CAAC,GAAG,CACvB,MAAM,EACN,OAAO,CACR,CAAC,CAAC;AACL,CAAC;AAED,KAAK,UAAU,GAAG,CAChB,MAAe,EACf,OAAwB;IAmBxB,MAAM,IAAI,GAAG,IAAA,mBAAU,EAAC,4BAA4B,CAAC,EAAE,CAAC;IAExD,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,IAAA,0BAAU,EAAC;QACrC,MAAM,EAAE,kBAAkB;KAC3B,CAAC,CAAC,CAAC;IAEJ,MAAM,SAAS,GAAG,MAAM,IAAA,6BAAe,EAAC,MAAM,CAAC,QAAQ,CAAC,mBAAmB,CAAC,CAAC;IAC7E,MAAM,aAAa,GAAG,SAAS,IAAI,IAAI;QACrC,CAAC,CAAC,EAAE;QACJ,CAAC,CAAC,EAAE,mBAAmB,EAAE,SAAS,EAAE,CAAC;IACvC,MAAM,eAAe,GAAG,IAAA,mCAAqB,EAAC,aAAa,CAAC,CAAC;IAE7D,MA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from "../core.js";
|
|
2
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
3
|
+
import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/httpclienterrors.js";
|
|
4
|
+
import * as errors from "../models/errors/index.js";
|
|
5
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
6
|
+
import { SDKBaseError } from "../models/errors/sdkbaseerror.js";
|
|
7
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
8
|
+
import * as operations from "../models/operations/index.js";
|
|
9
|
+
import { APIPromise } from "../types/async.js";
|
|
10
|
+
import { Result } from "../types/fp.js";
|
|
11
|
+
/**
|
|
12
|
+
* Get Free user credit usage
|
|
13
|
+
*
|
|
14
|
+
* @remarks
|
|
15
|
+
* Retrieve your Free user account credit consumption information over a specific date range. You must include a start date in your request.<br><br>This endpoint does not cost any credits to execute.
|
|
16
|
+
*/
|
|
17
|
+
export declare function accountManagementGetUserCreditsUsage(client: SDKCore, request: operations.V3AccountmanagementUserCreditsUsageRequest, options?: RequestOptions): APIPromise<Result<operations.V3AccountmanagementUserCreditsUsageResponse, errors.AuthenticationError | errors.ErrorModel | SDKBaseError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
18
|
+
//# sourceMappingURL=accountManagementGetUserCreditsUsage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accountManagementGetUserCreditsUsage.d.ts","sourceRoot":"","sources":["../src/funcs/accountManagementGetUserCreditsUsage.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAKrC,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,MAAM,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AACtF,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAChE,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC;;;;;GAKG;AACH,wBAAgB,oCAAoC,CAClD,MAAM,EAAE,OAAO,EACf,OAAO,EAAE,UAAU,CAAC,0CAA0C,EAC9D,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CACX,MAAM,CACJ,UAAU,CAAC,2CAA2C,EACpD,MAAM,CAAC,mBAAmB,GAC1B,MAAM,CAAC,UAAU,GACjB,YAAY,GACZ,uBAAuB,GACvB,eAAe,GACf,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,qBAAqB,GACrB,kBAAkB,CACrB,CACF,CAMA"}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.accountManagementGetUserCreditsUsage = accountManagementGetUserCreditsUsage;
|
|
40
|
+
const encodings_js_1 = require("../lib/encodings.js");
|
|
41
|
+
const M = __importStar(require("../lib/matchers.js"));
|
|
42
|
+
const primitives_js_1 = require("../lib/primitives.js");
|
|
43
|
+
const schemas_js_1 = require("../lib/schemas.js");
|
|
44
|
+
const security_js_1 = require("../lib/security.js");
|
|
45
|
+
const url_js_1 = require("../lib/url.js");
|
|
46
|
+
const errors = __importStar(require("../models/errors/index.js"));
|
|
47
|
+
const operations = __importStar(require("../models/operations/index.js"));
|
|
48
|
+
const async_js_1 = require("../types/async.js");
|
|
49
|
+
/**
|
|
50
|
+
* Get Free user credit usage
|
|
51
|
+
*
|
|
52
|
+
* @remarks
|
|
53
|
+
* Retrieve your Free user account credit consumption information over a specific date range. You must include a start date in your request.<br><br>This endpoint does not cost any credits to execute.
|
|
54
|
+
*/
|
|
55
|
+
function accountManagementGetUserCreditsUsage(client, request, options) {
|
|
56
|
+
return new async_js_1.APIPromise($do(client, request, options));
|
|
57
|
+
}
|
|
58
|
+
async function $do(client, request, options) {
|
|
59
|
+
const parsed = (0, schemas_js_1.safeParse)(request, (value) => operations.V3AccountmanagementUserCreditsUsageRequest$outboundSchema
|
|
60
|
+
.parse(value), "Input validation failed");
|
|
61
|
+
if (!parsed.ok) {
|
|
62
|
+
return [parsed, { status: "invalid" }];
|
|
63
|
+
}
|
|
64
|
+
const payload = parsed.value;
|
|
65
|
+
const body = null;
|
|
66
|
+
const path = (0, url_js_1.pathToFunc)("/v3/accounts/users/credits/usage")();
|
|
67
|
+
const query = (0, encodings_js_1.encodeFormQuery)({
|
|
68
|
+
"date": payload.date,
|
|
69
|
+
"end_date": payload.end_date,
|
|
70
|
+
"granularity": payload.granularity,
|
|
71
|
+
"start_date": payload.start_date,
|
|
72
|
+
}, { explode: false });
|
|
73
|
+
const headers = new Headers((0, primitives_js_1.compactMap)({
|
|
74
|
+
Accept: "application/json",
|
|
75
|
+
}));
|
|
76
|
+
const secConfig = await (0, security_js_1.extractSecurity)(client._options.personalAccessToken);
|
|
77
|
+
const securityInput = secConfig == null
|
|
78
|
+
? {}
|
|
79
|
+
: { personalAccessToken: secConfig };
|
|
80
|
+
const requestSecurity = (0, security_js_1.resolveGlobalSecurity)(securityInput);
|
|
81
|
+
const context = {
|
|
82
|
+
options: client._options,
|
|
83
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
84
|
+
operationID: "v3-accountmanagement-user-credits-usage",
|
|
85
|
+
oAuth2Scopes: null,
|
|
86
|
+
resolvedSecurity: requestSecurity,
|
|
87
|
+
securitySource: client._options.personalAccessToken,
|
|
88
|
+
retryConfig: options?.retries
|
|
89
|
+
|| client._options.retryConfig
|
|
90
|
+
|| { strategy: "none" },
|
|
91
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
92
|
+
};
|
|
93
|
+
const requestRes = client._createRequest(context, {
|
|
94
|
+
security: requestSecurity,
|
|
95
|
+
method: "GET",
|
|
96
|
+
baseURL: options?.serverURL,
|
|
97
|
+
path: path,
|
|
98
|
+
headers: headers,
|
|
99
|
+
query: query,
|
|
100
|
+
body: body,
|
|
101
|
+
userAgent: client._options.userAgent,
|
|
102
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
103
|
+
}, options);
|
|
104
|
+
if (!requestRes.ok) {
|
|
105
|
+
return [requestRes, { status: "invalid" }];
|
|
106
|
+
}
|
|
107
|
+
const req = requestRes.value;
|
|
108
|
+
const doResult = await client._do(req, {
|
|
109
|
+
context,
|
|
110
|
+
errorCodes: ["401", "404", "4XX", "5XX"],
|
|
111
|
+
retryConfig: context.retryConfig,
|
|
112
|
+
retryCodes: context.retryCodes,
|
|
113
|
+
});
|
|
114
|
+
if (!doResult.ok) {
|
|
115
|
+
return [doResult, { status: "request-error", request: req }];
|
|
116
|
+
}
|
|
117
|
+
const response = doResult.value;
|
|
118
|
+
const responseFields = {
|
|
119
|
+
HttpMeta: { Response: response, Request: req },
|
|
120
|
+
};
|
|
121
|
+
const [result] = await M.match(M.json(200, operations.V3AccountmanagementUserCreditsUsageResponse$inboundSchema, { hdrs: true, key: "Result" }), M.jsonErr(401, errors.AuthenticationError$inboundSchema), M.jsonErr(404, errors.ErrorModel$inboundSchema, {
|
|
122
|
+
ctype: "application/problem+json",
|
|
123
|
+
}), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
|
|
124
|
+
if (!result.ok) {
|
|
125
|
+
return [result, { status: "complete", request: req, response }];
|
|
126
|
+
}
|
|
127
|
+
return [result, { status: "complete", request: req, response }];
|
|
128
|
+
}
|
|
129
|
+
//# sourceMappingURL=accountManagementGetUserCreditsUsage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accountManagementGetUserCredit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C,KAAK,CAAC,CACd,CAAC,QAAQ,EAAE,GAAG,EAAE,EAAE,WAAW,EAAE,cAAc,EAAE,CAAC,CAAC;IAClD,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;QACf,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;IAClE,CAAC;IAED,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;AAClE,CAAC"}
|
|
@@ -12,7 +12,7 @@ import { Result } from "../types/fp.js";
|
|
|
12
12
|
* Create a collection
|
|
13
13
|
*
|
|
14
14
|
* @remarks
|
|
15
|
-
* Create a new collection.
|
|
15
|
+
* Create a new collection.<br><br>This endpoint does not cost credits to execute.
|
|
16
16
|
*/
|
|
17
17
|
export declare function collectionsCreate(client: SDKCore, request: operations.V3CollectionsCrudCreateRequest, options?: RequestOptions): APIPromise<Result<operations.V3CollectionsCrudCreateResponse, errors.AuthenticationError | errors.ErrorModel | SDKBaseError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
18
18
|
//# sourceMappingURL=collectionsCreate.d.ts.map
|
|
@@ -50,7 +50,7 @@ const async_js_1 = require("../types/async.js");
|
|
|
50
50
|
* Create a collection
|
|
51
51
|
*
|
|
52
52
|
* @remarks
|
|
53
|
-
* Create a new collection.
|
|
53
|
+
* Create a new collection.<br><br>This endpoint does not cost credits to execute.
|
|
54
54
|
*/
|
|
55
55
|
function collectionsCreate(client, request, options) {
|
|
56
56
|
return new async_js_1.APIPromise($do(client, request, options));
|
|
@@ -16,7 +16,7 @@ export declare enum DeleteAcceptEnum {
|
|
|
16
16
|
* Delete a collection
|
|
17
17
|
*
|
|
18
18
|
* @remarks
|
|
19
|
-
* Delete a collection.
|
|
19
|
+
* Delete a collection.<br><br>This endpoint does not cost credits to execute.
|
|
20
20
|
*/
|
|
21
21
|
export declare function collectionsDelete(client: SDKCore, request: operations.V3CollectionsCrudDeleteRequest, options?: RequestOptions & {
|
|
22
22
|
acceptHeaderOverride?: DeleteAcceptEnum;
|
|
@@ -56,7 +56,7 @@ var DeleteAcceptEnum;
|
|
|
56
56
|
* Delete a collection
|
|
57
57
|
*
|
|
58
58
|
* @remarks
|
|
59
|
-
* Delete a collection.
|
|
59
|
+
* Delete a collection.<br><br>This endpoint does not cost credits to execute.
|
|
60
60
|
*/
|
|
61
61
|
function collectionsDelete(client, request, options) {
|
|
62
62
|
return new async_js_1.APIPromise($do(client, request, options));
|
|
@@ -12,7 +12,7 @@ import { Result } from "../types/fp.js";
|
|
|
12
12
|
* Get a collection
|
|
13
13
|
*
|
|
14
14
|
* @remarks
|
|
15
|
-
* Retrieve information about a collection. Retrieved information includes its name, query, description, status, and asset count.
|
|
15
|
+
* Retrieve information about a collection. Retrieved information includes its name, query, description, status, and asset count.<br><br>This endpoint does not cost credits to execute.
|
|
16
16
|
*/
|
|
17
17
|
export declare function collectionsGet(client: SDKCore, request: operations.V3CollectionsCrudGetRequest, options?: RequestOptions): APIPromise<Result<operations.V3CollectionsCrudGetResponse, errors.AuthenticationError | errors.ErrorModel | SDKBaseError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
18
18
|
//# sourceMappingURL=collectionsGet.d.ts.map
|
package/funcs/collectionsGet.js
CHANGED
|
@@ -50,7 +50,7 @@ const async_js_1 = require("../types/async.js");
|
|
|
50
50
|
* Get a collection
|
|
51
51
|
*
|
|
52
52
|
* @remarks
|
|
53
|
-
* Retrieve information about a collection. Retrieved information includes its name, query, description, status, and asset count.
|
|
53
|
+
* Retrieve information about a collection. Retrieved information includes its name, query, description, status, and asset count.<br><br>This endpoint does not cost credits to execute.
|
|
54
54
|
*/
|
|
55
55
|
function collectionsGet(client, request, options) {
|
|
56
56
|
return new async_js_1.APIPromise($do(client, request, options));
|
|
@@ -12,7 +12,7 @@ import { Result } from "../types/fp.js";
|
|
|
12
12
|
* List collections
|
|
13
13
|
*
|
|
14
14
|
* @remarks
|
|
15
|
-
* List all collections for an organization. Retrieved information includes collection ID, name, query, description, status, and asset count.
|
|
15
|
+
* List all collections for an organization. Retrieved information includes collection ID, name, query, description, status, and asset count.<br><br>This endpoint does not cost credits to execute.
|
|
16
16
|
*/
|
|
17
17
|
export declare function collectionsList(client: SDKCore, request: operations.V3CollectionsCrudListRequest, options?: RequestOptions): APIPromise<Result<operations.V3CollectionsCrudListResponse, errors.AuthenticationError | errors.ErrorModel | SDKBaseError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
18
18
|
//# sourceMappingURL=collectionsList.d.ts.map
|
package/funcs/collectionsList.js
CHANGED
|
@@ -50,7 +50,7 @@ const async_js_1 = require("../types/async.js");
|
|
|
50
50
|
* List collections
|
|
51
51
|
*
|
|
52
52
|
* @remarks
|
|
53
|
-
* List all collections for an organization. Retrieved information includes collection ID, name, query, description, status, and asset count.
|
|
53
|
+
* List all collections for an organization. Retrieved information includes collection ID, name, query, description, status, and asset count.<br><br>This endpoint does not cost credits to execute.
|
|
54
54
|
*/
|
|
55
55
|
function collectionsList(client, request, options) {
|
|
56
56
|
return new async_js_1.APIPromise($do(client, request, options));
|
|
@@ -12,7 +12,7 @@ import { Result } from "../types/fp.js";
|
|
|
12
12
|
* Get a collection's events
|
|
13
13
|
*
|
|
14
14
|
* @remarks
|
|
15
|
-
* Retrieve the event history for a collection. This includes the addition or removal of assets as well as collection status changes.
|
|
15
|
+
* Retrieve the event history for a collection. This includes the addition or removal of assets as well as collection status changes.<br><br>This endpoint does not cost credits to execute.
|
|
16
16
|
*/
|
|
17
17
|
export declare function collectionsListEvents(client: SDKCore, request: operations.V3CollectionsListEventsRequest, options?: RequestOptions): APIPromise<Result<operations.V3CollectionsListEventsResponse, errors.AuthenticationError | errors.ErrorModel | SDKBaseError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
18
18
|
//# sourceMappingURL=collectionsListEvents.d.ts.map
|
|
@@ -50,7 +50,7 @@ const async_js_1 = require("../types/async.js");
|
|
|
50
50
|
* Get a collection's events
|
|
51
51
|
*
|
|
52
52
|
* @remarks
|
|
53
|
-
* Retrieve the event history for a collection. This includes the addition or removal of assets as well as collection status changes.
|
|
53
|
+
* Retrieve the event history for a collection. This includes the addition or removal of assets as well as collection status changes.<br><br>This endpoint does not cost credits to execute.
|
|
54
54
|
*/
|
|
55
55
|
function collectionsListEvents(client, request, options) {
|
|
56
56
|
return new async_js_1.APIPromise($do(client, request, options));
|
|
@@ -12,7 +12,7 @@ import { Result } from "../types/fp.js";
|
|
|
12
12
|
* Update a collection
|
|
13
13
|
*
|
|
14
14
|
* @remarks
|
|
15
|
-
* Update a collection's name, description, and/or query.
|
|
15
|
+
* Update a collection's name, description, and/or query.<br><br>This endpoint does not cost credits to execute.
|
|
16
16
|
*/
|
|
17
17
|
export declare function collectionsUpdate(client: SDKCore, request: operations.V3CollectionsCrudUpdateRequest, options?: RequestOptions): APIPromise<Result<operations.V3CollectionsCrudUpdateResponse, errors.AuthenticationError | errors.ErrorModel | SDKBaseError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
18
18
|
//# sourceMappingURL=collectionsUpdate.d.ts.map
|
|
@@ -50,7 +50,7 @@ const async_js_1 = require("../types/async.js");
|
|
|
50
50
|
* Update a collection
|
|
51
51
|
*
|
|
52
52
|
* @remarks
|
|
53
|
-
* Update a collection's name, description, and/or query.
|
|
53
|
+
* Update a collection's name, description, and/or query.<br><br>This endpoint does not cost credits to execute.
|
|
54
54
|
*/
|
|
55
55
|
function collectionsUpdate(client, request, options) {
|
|
56
56
|
return new async_js_1.APIPromise($do(client, request, options));
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { SDKCore } from "../core.js";
|
|
2
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
3
|
+
import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/httpclienterrors.js";
|
|
4
|
+
import * as errors from "../models/errors/index.js";
|
|
5
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
6
|
+
import { SDKBaseError } from "../models/errors/sdkbaseerror.js";
|
|
7
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
8
|
+
import * as operations from "../models/operations/index.js";
|
|
9
|
+
import { APIPromise } from "../types/async.js";
|
|
10
|
+
import { Result } from "../types/fp.js";
|
|
11
|
+
/**
|
|
12
|
+
* List active threats
|
|
13
|
+
*
|
|
14
|
+
* @remarks
|
|
15
|
+
* Retrieve a list of active threats observed by Censys by aggregating threat IDs across hosts and web properties. Threats are active if their fingerprint has been identified on hosts or web properties by Censys scans. This information is also available on the [Explore Threats page in the Platform web UI](https://platform.censys.io/threats).<br><br>This endpoint is available to organizations that have access to the Threat Hunting module.
|
|
16
|
+
*/
|
|
17
|
+
export declare function threatHuntingListThreats(client: SDKCore, request: operations.V3ThreathuntingThreatsListRequest, options?: RequestOptions): APIPromise<Result<operations.V3ThreathuntingThreatsListResponse, errors.AuthenticationError | errors.ErrorModel | SDKBaseError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
18
|
+
//# sourceMappingURL=threatHuntingListThreats.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"threatHuntingListThreats.d.ts","sourceRoot":"","sources":["../src/funcs/threatHuntingListThreats.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAKrC,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,MAAM,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AACtF,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAChE,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC;;;;;GAKG;AACH,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,OAAO,EACf,OAAO,EAAE,UAAU,CAAC,iCAAiC,EACrD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CACX,MAAM,CACJ,UAAU,CAAC,kCAAkC,EAC3C,MAAM,CAAC,mBAAmB,GAC1B,MAAM,CAAC,UAAU,GACjB,YAAY,GACZ,uBAAuB,GACvB,eAAe,GACf,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,qBAAqB,GACrB,kBAAkB,CACrB,CACF,CAMA"}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.threatHuntingListThreats = threatHuntingListThreats;
|
|
40
|
+
const encodings_js_1 = require("../lib/encodings.js");
|
|
41
|
+
const M = __importStar(require("../lib/matchers.js"));
|
|
42
|
+
const primitives_js_1 = require("../lib/primitives.js");
|
|
43
|
+
const schemas_js_1 = require("../lib/schemas.js");
|
|
44
|
+
const security_js_1 = require("../lib/security.js");
|
|
45
|
+
const url_js_1 = require("../lib/url.js");
|
|
46
|
+
const errors = __importStar(require("../models/errors/index.js"));
|
|
47
|
+
const operations = __importStar(require("../models/operations/index.js"));
|
|
48
|
+
const async_js_1 = require("../types/async.js");
|
|
49
|
+
/**
|
|
50
|
+
* List active threats
|
|
51
|
+
*
|
|
52
|
+
* @remarks
|
|
53
|
+
* Retrieve a list of active threats observed by Censys by aggregating threat IDs across hosts and web properties. Threats are active if their fingerprint has been identified on hosts or web properties by Censys scans. This information is also available on the [Explore Threats page in the Platform web UI](https://platform.censys.io/threats).<br><br>This endpoint is available to organizations that have access to the Threat Hunting module.
|
|
54
|
+
*/
|
|
55
|
+
function threatHuntingListThreats(client, request, options) {
|
|
56
|
+
return new async_js_1.APIPromise($do(client, request, options));
|
|
57
|
+
}
|
|
58
|
+
async function $do(client, request, options) {
|
|
59
|
+
const parsed = (0, schemas_js_1.safeParse)(request, (value) => operations.V3ThreathuntingThreatsListRequest$outboundSchema.parse(value), "Input validation failed");
|
|
60
|
+
if (!parsed.ok) {
|
|
61
|
+
return [parsed, { status: "invalid" }];
|
|
62
|
+
}
|
|
63
|
+
const payload = parsed.value;
|
|
64
|
+
const body = null;
|
|
65
|
+
const path = (0, url_js_1.pathToFunc)("/v3/threat-hunting/threats")();
|
|
66
|
+
const query = (0, encodings_js_1.encodeFormQuery)({
|
|
67
|
+
"organization_id": payload.organization_id
|
|
68
|
+
?? client._options.organizationId,
|
|
69
|
+
"query": payload.query,
|
|
70
|
+
}, { explode: false });
|
|
71
|
+
const headers = new Headers((0, primitives_js_1.compactMap)({
|
|
72
|
+
Accept: "application/json",
|
|
73
|
+
}));
|
|
74
|
+
const secConfig = await (0, security_js_1.extractSecurity)(client._options.personalAccessToken);
|
|
75
|
+
const securityInput = secConfig == null
|
|
76
|
+
? {}
|
|
77
|
+
: { personalAccessToken: secConfig };
|
|
78
|
+
const requestSecurity = (0, security_js_1.resolveGlobalSecurity)(securityInput);
|
|
79
|
+
const context = {
|
|
80
|
+
options: client._options,
|
|
81
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
82
|
+
operationID: "v3-threathunting-threats-list",
|
|
83
|
+
oAuth2Scopes: null,
|
|
84
|
+
resolvedSecurity: requestSecurity,
|
|
85
|
+
securitySource: client._options.personalAccessToken,
|
|
86
|
+
retryConfig: options?.retries
|
|
87
|
+
|| client._options.retryConfig
|
|
88
|
+
|| { strategy: "none" },
|
|
89
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
90
|
+
};
|
|
91
|
+
const requestRes = client._createRequest(context, {
|
|
92
|
+
security: requestSecurity,
|
|
93
|
+
method: "GET",
|
|
94
|
+
baseURL: options?.serverURL,
|
|
95
|
+
path: path,
|
|
96
|
+
headers: headers,
|
|
97
|
+
query: query,
|
|
98
|
+
body: body,
|
|
99
|
+
userAgent: client._options.userAgent,
|
|
100
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
101
|
+
}, options);
|
|
102
|
+
if (!requestRes.ok) {
|
|
103
|
+
return [requestRes, { status: "invalid" }];
|
|
104
|
+
}
|
|
105
|
+
const req = requestRes.value;
|
|
106
|
+
const doResult = await client._do(req, {
|
|
107
|
+
context,
|
|
108
|
+
errorCodes: ["401", "403", "422", "4XX", "5XX"],
|
|
109
|
+
retryConfig: context.retryConfig,
|
|
110
|
+
retryCodes: context.retryCodes,
|
|
111
|
+
});
|
|
112
|
+
if (!doResult.ok) {
|
|
113
|
+
return [doResult, { status: "request-error", request: req }];
|
|
114
|
+
}
|
|
115
|
+
const response = doResult.value;
|
|
116
|
+
const responseFields = {
|
|
117
|
+
HttpMeta: { Response: response, Request: req },
|
|
118
|
+
};
|
|
119
|
+
const [result] = await M.match(M.json(200, operations.V3ThreathuntingThreatsListResponse$inboundSchema, {
|
|
120
|
+
hdrs: true,
|
|
121
|
+
key: "Result",
|
|
122
|
+
}), M.jsonErr(401, errors.AuthenticationError$inboundSchema), M.jsonErr([403, 422], errors.ErrorModel$inboundSchema, {
|
|
123
|
+
ctype: "application/problem+json",
|
|
124
|
+
}), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
|
|
125
|
+
if (!result.ok) {
|
|
126
|
+
return [result, { status: "complete", request: req, response }];
|
|
127
|
+
}
|
|
128
|
+
return [result, { status: "complete", request: req, response }];
|
|
129
|
+
}
|
|
130
|
+
//# sourceMappingURL=threatHuntingListThreats.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"threatHuntingListThreats.js","sourceRoot":"","sources":["../src/funcs/threatHuntingListThreats.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BH,4DAwBC;AApDD,sDAAsD;AACtD,sDAAwC;AACxC,wDAAkD;AAClD,kDAA8C;AAE9C,oDAA4E;AAC5E,0CAA2C;AAQ3C,kEAAoD;AAIpD,0EAA4D;AAC5D,gDAAwD;AAGxD;;;;;GAKG;AACH,SAAgB,wBAAwB,CACtC,MAAe,EACf,OAAqD,EACrD,OAAwB;IAgBxB,OAAO,IAAI,qBAAU,CAAC,GAAG,CACvB,MAAM,EACN,OAAO,EACP,OAAO,CACR,CAAC,CAAC;AACL,CAAC;AAED,KAAK,UAAU,GAAG,CAChB,MAAe,EACf,OAAqD,EACrD,OAAwB;IAmBxB,MAAM,MAAM,GAAG,IAAA,sBAAS,EACtB,OAAO,EACP,CAAC,KAAK,EAAE,EAAE,CACR,UAAU,CAAC,gDAAgD,CAAC,KAAK,CAAC,KAAK,CAAC,EAC1E,yBAAyB,CAC1B,CAAC;IACF,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;QACf,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC;IACzC,CAAC;IACD,MAAM,OAAO,GAAG,MAAM,CAAC,KAAK,CAAC;IAC7B,MAAM,IAAI,GAAG,IAAI,CAAC;IAElB,MAAM,IAAI,GAAG,IAAA,mBAAU,EAAC,4BAA4B,CAAC,EAAE,CAAC;IAExD,MAAM,KAAK,GAAG,IAAA,8BAAe,EAAC;QAC5B,iBAAiB,EAAE,OAAO,CAAC,eAAe;eACrC,MAA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