@censys/platform-sdk 0.9.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 +8 -6
- package/docs/sdks/accountmanagement/README.md +100 -6
- package/docs/sdks/collections/README.md +6 -6
- package/docs/sdks/threathunting/README.md +1 -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 +2 -2
- package/funcs/accountManagementGetUserCredits.js +2 -2
- 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 +1 -1
- package/funcs/threatHuntingListThreats.js +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +4 -4
- package/lib/config.js +4 -4
- 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/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 +8 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +8 -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/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/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/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 +1 -0
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +1 -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/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/package.json +1 -1
- package/sdk/accountmanagement.d.ts +13 -6
- package/sdk/accountmanagement.d.ts.map +1 -1
- package/sdk/accountmanagement.js +16 -6
- 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 +1 -1
- package/sdk/threathunting.js +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 +2 -2
- 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 +1 -1
- package/src/lib/config.ts +4 -4
- 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/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 +8 -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/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/tls.ts +8 -5
- package/src/models/components/tlsversiondata.ts +5 -4
- package/src/models/components/trackedscantask.ts +8 -5
- package/src/models/components/vuln.ts +21 -11
- package/src/models/operations/index.ts +1 -0
- package/src/models/operations/v3accountmanagementmembercreditsusage.ts +43 -4
- package/src/models/operations/v3accountmanagementorgcreditsusage.ts +49 -4
- package/src/models/operations/v3accountmanagementusercreditsusage.ts +128 -0
- package/src/sdk/accountmanagement.ts +24 -6
- package/src/sdk/collections.ts +6 -6
- package/src/sdk/threathunting.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accountmanagement.d.ts","sourceRoot":"","sources":["../src/sdk/accountmanagement.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"accountmanagement.d.ts","sourceRoot":"","sources":["../src/sdk/accountmanagement.ts"],"names":[],"mappings":"AAUA,OAAO,EAEL,kCAAkC,EACnC,MAAM,uDAAuD,CAAC;AAE/D,OAAO,EAEL,kCAAkC,EACnC,MAAM,uDAAuD,CAAC;AAC/D,OAAO,EAEL,kCAAkC,EACnC,MAAM,uDAAuD,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAG5D,OAAO,EAAE,kCAAkC,EAAE,MAAM,uDAAuD,CAAC;AAE3G,OAAO,EAAE,kCAAkC,EAAE,MAAM,uDAAuD,CAAC;AAE3G,OAAO,EAAE,kCAAkC,EAAE,MAAM,uDAAuD,CAAC;AAE3G,qBAAa,iBAAkB,SAAQ,SAAS;IAC9C;;;;;OAKG;IACG,sBAAsB,CAC1B,OAAO,EAAE,UAAU,CAAC,oCAAoC,EACxD,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,qCAAqC,CAAC;IAQ5D;;;;;OAKG;IACG,sBAAsB,CAC1B,OAAO,EAAE,UAAU,CAAC,o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CAAC,sCAAsC,CAAC;IAO7D;;;;;OAKG;IACG,mBAAmB,CACvB,OAAO,EAAE,UAAU,CAAC,0CAA0C,EAC9D,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,2CAA2C,CAAC;CAOnE"}
|
package/sdk/accountmanagement.js
CHANGED
|
@@ -9,6 +9,7 @@ const accountManagementGetOrganizationCredits_js_1 = require("../funcs/accountMa
|
|
|
9
9
|
const accountManagementGetOrganizationCreditUsage_js_1 = require("../funcs/accountManagementGetOrganizationCreditUsage.js");
|
|
10
10
|
const accountManagementGetOrganizationDetails_js_1 = require("../funcs/accountManagementGetOrganizationDetails.js");
|
|
11
11
|
const accountManagementGetUserCredits_js_1 = require("../funcs/accountManagementGetUserCredits.js");
|
|
12
|
+
const accountManagementGetUserCreditsUsage_js_1 = require("../funcs/accountManagementGetUserCreditsUsage.js");
|
|
12
13
|
const accountManagementInviteUserToOrganization_js_1 = require("../funcs/accountManagementInviteUserToOrganization.js");
|
|
13
14
|
const accountManagementListOrganizationMembers_js_1 = require("../funcs/accountManagementListOrganizationMembers.js");
|
|
14
15
|
const accountManagementRemoveOrganizationMember_js_1 = require("../funcs/accountManagementRemoveOrganizationMember.js");
|
|
@@ -32,7 +33,7 @@ class AccountManagement extends sdks_js_1.ClientSDK {
|
|
|
32
33
|
return (0, fp_js_1.unwrapAsync)((0, accountManagementGetOrganizationDetails_js_1.accountManagementGetOrganizationDetails)(this, request, options));
|
|
33
34
|
}
|
|
34
35
|
/**
|
|
35
|
-
* Get organization credit
|
|
36
|
+
* Get organization credit balance
|
|
36
37
|
*
|
|
37
38
|
* @remarks
|
|
38
39
|
* 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.
|
|
@@ -44,7 +45,7 @@ class AccountManagement extends sdks_js_1.ClientSDK {
|
|
|
44
45
|
* Get organization credit usage
|
|
45
46
|
*
|
|
46
47
|
* @remarks
|
|
47
|
-
* Retrieve credit
|
|
48
|
+
* Retrieve credit information for an organization over a specific date range. You must include a start date in your request.<br><br>Admins can obtain credit usage information for all users in their organization. Members may only retrieve usage information for their own account.<br><br>This endpoint does not cost any credits to execute.
|
|
48
49
|
*/
|
|
49
50
|
async getOrganizationCreditUsage(request, options) {
|
|
50
51
|
return (0, fp_js_1.unwrapAsync)((0, accountManagementGetOrganizationCreditUsage_js_1.accountManagementGetOrganizationCreditUsage)(this, request, options));
|
|
@@ -86,23 +87,32 @@ class AccountManagement extends sdks_js_1.ClientSDK {
|
|
|
86
87
|
return (0, fp_js_1.unwrapAsync)((0, accountManagementUpdateOrganizationMember_js_1.accountManagementUpdateOrganizationMember)(this, request, options));
|
|
87
88
|
}
|
|
88
89
|
/**
|
|
89
|
-
* Get member credit usage
|
|
90
|
+
* Get organization member credit usage
|
|
90
91
|
*
|
|
91
92
|
* @remarks
|
|
92
|
-
* Retrieve credit consumption information for an organization member
|
|
93
|
+
* Retrieve credit consumption information for an organization member 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.
|
|
93
94
|
*/
|
|
94
95
|
async getMemberCreditUsage(request, options) {
|
|
95
96
|
return (0, fp_js_1.unwrapAsync)((0, accountManagementGetMemberCreditUsage_js_1.accountManagementGetMemberCreditUsage)(this, request, options));
|
|
96
97
|
}
|
|
97
98
|
/**
|
|
98
|
-
* Get Free user credit
|
|
99
|
+
* Get Free user credit balance
|
|
99
100
|
*
|
|
100
101
|
* @remarks
|
|
101
|
-
* 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
|
|
102
|
+
* 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.
|
|
102
103
|
*/
|
|
103
104
|
async getUserCredits(options) {
|
|
104
105
|
return (0, fp_js_1.unwrapAsync)((0, accountManagementGetUserCredits_js_1.accountManagementGetUserCredits)(this, options));
|
|
105
106
|
}
|
|
107
|
+
/**
|
|
108
|
+
* Get Free user credit usage
|
|
109
|
+
*
|
|
110
|
+
* @remarks
|
|
111
|
+
* 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.
|
|
112
|
+
*/
|
|
113
|
+
async getUserCreditsUsage(request, options) {
|
|
114
|
+
return (0, fp_js_1.unwrapAsync)((0, accountManagementGetUserCreditsUsage_js_1.accountManagementGetUserCreditsUsage)(this, request, options));
|
|
115
|
+
}
|
|
106
116
|
}
|
|
107
117
|
exports.AccountManagement = AccountManagement;
|
|
108
118
|
//# sourceMappingURL=accountmanagement.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accountmanagement.js","sourceRoot":"","sources":["../src/sdk/accountmanagement.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,gHAA0G;AAC1G,oHAA8G;AAC9G,4HAAsH;AACtH,oHAA8G;AAC9G,oGAA8F;AAC9F,wHAG+D;AAC/D,sHAAgH;AAChH,wHAG+D;AAC/D,wHAG+D;AAC/D,4CAA2D;AAE3D,0CAA6C;AAE7C,sHAA2G;AAAlG,kKAAA,kCAAkC,OAAA;AAE3C,sHAA2G;AAAlG,kKAAA,kCAAkC,OAAA;AAE3C,sHAA2G;AAAlG,kKAAA,kCAAkC,OAAA;AAE3C,MAAa,iBAAkB,SAAQ,mBAAS;IAC9C;;;;;OAKG;IACH,KAAK,CAAC,sBAAsB,CAC1B,OAAwD,EACxD,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,oFAAuC,EACxD,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,sBAAsB,CAC1B,OAAwD,EACxD,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,oFAAuC,EACxD,IAAI,EACJ,OAAO,EACP,OAAO,CACR,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AC5D,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,sFAAwC,EACzD,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,wBAAwB,CAC5B,OAA6D,EAC7D,OAEC;QAID,OAAO,IAAA,mBAAW,EAAC,IAAA,wFAAyC,EAC1D,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,wBAAwB,CAC5B,OAA6D,EAC7D,OAEC;QAID,OAAO,IAAA,mBAAW,EAAC,IAAA,wFAAyC,EAC1D,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,oBAAoB,CACxB,OAAgE,EAChE,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,gFAAqC,EACtD,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,cAAc,CAClB,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,oEAA+B,EAChD,IAAI,EACJ,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,mBAAmB,CACvB,OAA8D,EAC9D,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,8EAAoC,EACrD,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;CACF;AApLD,8CAoLC"}
|
package/sdk/collections.d.ts
CHANGED
|
@@ -7,21 +7,21 @@ export declare class Collections extends ClientSDK {
|
|
|
7
7
|
* List collections
|
|
8
8
|
*
|
|
9
9
|
* @remarks
|
|
10
|
-
* List all collections for an organization. Retrieved information includes collection ID, name, query, description, status, and asset count.
|
|
10
|
+
* 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.
|
|
11
11
|
*/
|
|
12
12
|
list(request: operations.V3CollectionsCrudListRequest, options?: RequestOptions): Promise<operations.V3CollectionsCrudListResponse>;
|
|
13
13
|
/**
|
|
14
14
|
* Create a collection
|
|
15
15
|
*
|
|
16
16
|
* @remarks
|
|
17
|
-
* Create a new collection.
|
|
17
|
+
* Create a new collection.<br><br>This endpoint does not cost credits to execute.
|
|
18
18
|
*/
|
|
19
19
|
create(request: operations.V3CollectionsCrudCreateRequest, options?: RequestOptions): Promise<operations.V3CollectionsCrudCreateResponse>;
|
|
20
20
|
/**
|
|
21
21
|
* Delete a collection
|
|
22
22
|
*
|
|
23
23
|
* @remarks
|
|
24
|
-
* Delete a collection.
|
|
24
|
+
* Delete a collection.<br><br>This endpoint does not cost credits to execute.
|
|
25
25
|
*/
|
|
26
26
|
delete(request: operations.V3CollectionsCrudDeleteRequest, options?: RequestOptions & {
|
|
27
27
|
acceptHeaderOverride?: DeleteAcceptEnum;
|
|
@@ -30,21 +30,21 @@ export declare class Collections extends ClientSDK {
|
|
|
30
30
|
* Get a collection
|
|
31
31
|
*
|
|
32
32
|
* @remarks
|
|
33
|
-
* Retrieve information about a collection. Retrieved information includes its name, query, description, status, and asset count.
|
|
33
|
+
* 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.
|
|
34
34
|
*/
|
|
35
35
|
get(request: operations.V3CollectionsCrudGetRequest, options?: RequestOptions): Promise<operations.V3CollectionsCrudGetResponse>;
|
|
36
36
|
/**
|
|
37
37
|
* Update a collection
|
|
38
38
|
*
|
|
39
39
|
* @remarks
|
|
40
|
-
* Update a collection's name, description, and/or query.
|
|
40
|
+
* Update a collection's name, description, and/or query.<br><br>This endpoint does not cost credits to execute.
|
|
41
41
|
*/
|
|
42
42
|
update(request: operations.V3CollectionsCrudUpdateRequest, options?: RequestOptions): Promise<operations.V3CollectionsCrudUpdateResponse>;
|
|
43
43
|
/**
|
|
44
44
|
* Get a collection's events
|
|
45
45
|
*
|
|
46
46
|
* @remarks
|
|
47
|
-
* Retrieve the event history for a collection. This includes the addition or removal of assets as well as collection status changes.
|
|
47
|
+
* 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.
|
|
48
48
|
*/
|
|
49
49
|
listEvents(request: operations.V3CollectionsListEventsRequest, options?: RequestOptions): Promise<operations.V3CollectionsListEventsResponse>;
|
|
50
50
|
/**
|
package/sdk/collections.js
CHANGED
|
@@ -21,7 +21,7 @@ class Collections extends sdks_js_1.ClientSDK {
|
|
|
21
21
|
* List collections
|
|
22
22
|
*
|
|
23
23
|
* @remarks
|
|
24
|
-
* List all collections for an organization. Retrieved information includes collection ID, name, query, description, status, and asset count.
|
|
24
|
+
* 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.
|
|
25
25
|
*/
|
|
26
26
|
async list(request, options) {
|
|
27
27
|
return (0, fp_js_1.unwrapAsync)((0, collectionsList_js_1.collectionsList)(this, request, options));
|
|
@@ -30,7 +30,7 @@ class Collections extends sdks_js_1.ClientSDK {
|
|
|
30
30
|
* Create a collection
|
|
31
31
|
*
|
|
32
32
|
* @remarks
|
|
33
|
-
* Create a new collection.
|
|
33
|
+
* Create a new collection.<br><br>This endpoint does not cost credits to execute.
|
|
34
34
|
*/
|
|
35
35
|
async create(request, options) {
|
|
36
36
|
return (0, fp_js_1.unwrapAsync)((0, collectionsCreate_js_1.collectionsCreate)(this, request, options));
|
|
@@ -39,7 +39,7 @@ class Collections extends sdks_js_1.ClientSDK {
|
|
|
39
39
|
* Delete a collection
|
|
40
40
|
*
|
|
41
41
|
* @remarks
|
|
42
|
-
* Delete a collection.
|
|
42
|
+
* Delete a collection.<br><br>This endpoint does not cost credits to execute.
|
|
43
43
|
*/
|
|
44
44
|
async delete(request, options) {
|
|
45
45
|
return (0, fp_js_1.unwrapAsync)((0, collectionsDelete_js_1.collectionsDelete)(this, request, options));
|
|
@@ -48,7 +48,7 @@ class Collections extends sdks_js_1.ClientSDK {
|
|
|
48
48
|
* Get a collection
|
|
49
49
|
*
|
|
50
50
|
* @remarks
|
|
51
|
-
* Retrieve information about a collection. Retrieved information includes its name, query, description, status, and asset count.
|
|
51
|
+
* 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.
|
|
52
52
|
*/
|
|
53
53
|
async get(request, options) {
|
|
54
54
|
return (0, fp_js_1.unwrapAsync)((0, collectionsGet_js_1.collectionsGet)(this, request, options));
|
|
@@ -57,7 +57,7 @@ class Collections extends sdks_js_1.ClientSDK {
|
|
|
57
57
|
* Update a collection
|
|
58
58
|
*
|
|
59
59
|
* @remarks
|
|
60
|
-
* Update a collection's name, description, and/or query.
|
|
60
|
+
* Update a collection's name, description, and/or query.<br><br>This endpoint does not cost credits to execute.
|
|
61
61
|
*/
|
|
62
62
|
async update(request, options) {
|
|
63
63
|
return (0, fp_js_1.unwrapAsync)((0, collectionsUpdate_js_1.collectionsUpdate)(this, request, options));
|
|
@@ -66,7 +66,7 @@ class Collections extends sdks_js_1.ClientSDK {
|
|
|
66
66
|
* Get a collection's events
|
|
67
67
|
*
|
|
68
68
|
* @remarks
|
|
69
|
-
* Retrieve the event history for a collection. This includes the addition or removal of assets as well as collection status changes.
|
|
69
|
+
* 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.
|
|
70
70
|
*/
|
|
71
71
|
async listEvents(request, options) {
|
|
72
72
|
return (0, fp_js_1.unwrapAsync)((0, collectionsListEvents_js_1.collectionsListEvents)(this, request, options));
|
package/sdk/threathunting.d.ts
CHANGED
|
@@ -26,7 +26,7 @@ export declare class ThreatHunting extends ClientSDK {
|
|
|
26
26
|
* List active threats
|
|
27
27
|
*
|
|
28
28
|
* @remarks
|
|
29
|
-
* 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).
|
|
29
|
+
* 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.
|
|
30
30
|
*/
|
|
31
31
|
listThreats(request: operations.V3ThreathuntingThreatsListRequest, options?: RequestOptions): Promise<operations.V3ThreathuntingThreatsListResponse>;
|
|
32
32
|
/**
|
package/sdk/threathunting.js
CHANGED
|
@@ -43,7 +43,7 @@ class ThreatHunting extends sdks_js_1.ClientSDK {
|
|
|
43
43
|
* List active threats
|
|
44
44
|
*
|
|
45
45
|
* @remarks
|
|
46
|
-
* 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).
|
|
46
|
+
* 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.
|
|
47
47
|
*/
|
|
48
48
|
async listThreats(request, options) {
|
|
49
49
|
return (0, fp_js_1.unwrapAsync)((0, threatHuntingListThreats_js_1.threatHuntingListThreats)(this, request, options));
|
|
@@ -26,10 +26,10 @@ import { APICall, APIPromise } from "../types/async.js";
|
|
|
26
26
|
import { Result } from "../types/fp.js";
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
|
-
* Get member credit usage
|
|
29
|
+
* Get organization member credit usage
|
|
30
30
|
*
|
|
31
31
|
* @remarks
|
|
32
|
-
* Retrieve credit consumption information for an organization member
|
|
32
|
+
* Retrieve credit consumption information for an organization member 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.
|
|
33
33
|
*/
|
|
34
34
|
export function accountManagementGetMemberCreditUsage(
|
|
35
35
|
client: SDKCore,
|
|
@@ -109,6 +109,9 @@ async function $do(
|
|
|
109
109
|
|
|
110
110
|
const query = encodeFormQuery({
|
|
111
111
|
"date": payload.date,
|
|
112
|
+
"end_date": payload.end_date,
|
|
113
|
+
"granularity": payload.granularity,
|
|
114
|
+
"start_date": payload.start_date,
|
|
112
115
|
}, { explode: false });
|
|
113
116
|
|
|
114
117
|
const headers = new Headers(compactMap({
|
|
@@ -29,7 +29,7 @@ import { Result } from "../types/fp.js";
|
|
|
29
29
|
* Get organization credit usage
|
|
30
30
|
*
|
|
31
31
|
* @remarks
|
|
32
|
-
* Retrieve credit
|
|
32
|
+
* Retrieve credit information for an organization over a specific date range. You must include a start date in your request.<br><br>Admins can obtain credit usage information for all users in their organization. Members may only retrieve usage information for their own account.<br><br>This endpoint does not cost any credits to execute.
|
|
33
33
|
*/
|
|
34
34
|
export function accountManagementGetOrganizationCreditUsage(
|
|
35
35
|
client: SDKCore,
|
|
@@ -106,6 +106,10 @@ async function $do(
|
|
|
106
106
|
|
|
107
107
|
const query = encodeFormQuery({
|
|
108
108
|
"date": payload.date,
|
|
109
|
+
"end_date": payload.end_date,
|
|
110
|
+
"granularity": payload.granularity,
|
|
111
|
+
"include_consumer_breakdown": payload.include_consumer_breakdown,
|
|
112
|
+
"start_date": payload.start_date,
|
|
109
113
|
}, { explode: false });
|
|
110
114
|
|
|
111
115
|
const headers = new Headers(compactMap({
|
|
@@ -26,7 +26,7 @@ import { APICall, APIPromise } from "../types/async.js";
|
|
|
26
26
|
import { Result } from "../types/fp.js";
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
|
-
* Get organization credit
|
|
29
|
+
* Get organization credit balance
|
|
30
30
|
*
|
|
31
31
|
* @remarks
|
|
32
32
|
* 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.
|
|
@@ -24,10 +24,10 @@ import { APICall, APIPromise } from "../types/async.js";
|
|
|
24
24
|
import { Result } from "../types/fp.js";
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
|
-
* Get Free user credit
|
|
27
|
+
* Get Free user credit balance
|
|
28
28
|
*
|
|
29
29
|
* @remarks
|
|
30
|
-
* 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
|
|
30
|
+
* 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.
|
|
31
31
|
*/
|
|
32
32
|
export function accountManagementGetUserCredits(
|
|
33
33
|
client: SDKCore,
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { SDKCore } from "../core.js";
|
|
6
|
+
import { encodeFormQuery } from "../lib/encodings.js";
|
|
7
|
+
import * as M from "../lib/matchers.js";
|
|
8
|
+
import { compactMap } from "../lib/primitives.js";
|
|
9
|
+
import { safeParse } from "../lib/schemas.js";
|
|
10
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
11
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
12
|
+
import { pathToFunc } from "../lib/url.js";
|
|
13
|
+
import {
|
|
14
|
+
ConnectionError,
|
|
15
|
+
InvalidRequestError,
|
|
16
|
+
RequestAbortedError,
|
|
17
|
+
RequestTimeoutError,
|
|
18
|
+
UnexpectedClientError,
|
|
19
|
+
} from "../models/errors/httpclienterrors.js";
|
|
20
|
+
import * as errors from "../models/errors/index.js";
|
|
21
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
22
|
+
import { SDKBaseError } from "../models/errors/sdkbaseerror.js";
|
|
23
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
24
|
+
import * as operations from "../models/operations/index.js";
|
|
25
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
26
|
+
import { Result } from "../types/fp.js";
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Get Free user credit usage
|
|
30
|
+
*
|
|
31
|
+
* @remarks
|
|
32
|
+
* 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.
|
|
33
|
+
*/
|
|
34
|
+
export function accountManagementGetUserCreditsUsage(
|
|
35
|
+
client: SDKCore,
|
|
36
|
+
request: operations.V3AccountmanagementUserCreditsUsageRequest,
|
|
37
|
+
options?: RequestOptions,
|
|
38
|
+
): APIPromise<
|
|
39
|
+
Result<
|
|
40
|
+
operations.V3AccountmanagementUserCreditsUsageResponse,
|
|
41
|
+
| errors.AuthenticationError
|
|
42
|
+
| errors.ErrorModel
|
|
43
|
+
| SDKBaseError
|
|
44
|
+
| ResponseValidationError
|
|
45
|
+
| ConnectionError
|
|
46
|
+
| RequestAbortedError
|
|
47
|
+
| RequestTimeoutError
|
|
48
|
+
| InvalidRequestError
|
|
49
|
+
| UnexpectedClientError
|
|
50
|
+
| SDKValidationError
|
|
51
|
+
>
|
|
52
|
+
> {
|
|
53
|
+
return new APIPromise($do(
|
|
54
|
+
client,
|
|
55
|
+
request,
|
|
56
|
+
options,
|
|
57
|
+
));
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
async function $do(
|
|
61
|
+
client: SDKCore,
|
|
62
|
+
request: operations.V3AccountmanagementUserCreditsUsageRequest,
|
|
63
|
+
options?: RequestOptions,
|
|
64
|
+
): Promise<
|
|
65
|
+
[
|
|
66
|
+
Result<
|
|
67
|
+
operations.V3AccountmanagementUserCreditsUsageResponse,
|
|
68
|
+
| errors.AuthenticationError
|
|
69
|
+
| errors.ErrorModel
|
|
70
|
+
| SDKBaseError
|
|
71
|
+
| ResponseValidationError
|
|
72
|
+
| ConnectionError
|
|
73
|
+
| RequestAbortedError
|
|
74
|
+
| RequestTimeoutError
|
|
75
|
+
| InvalidRequestError
|
|
76
|
+
| UnexpectedClientError
|
|
77
|
+
| SDKValidationError
|
|
78
|
+
>,
|
|
79
|
+
APICall,
|
|
80
|
+
]
|
|
81
|
+
> {
|
|
82
|
+
const parsed = safeParse(
|
|
83
|
+
request,
|
|
84
|
+
(value) =>
|
|
85
|
+
operations.V3AccountmanagementUserCreditsUsageRequest$outboundSchema
|
|
86
|
+
.parse(value),
|
|
87
|
+
"Input validation failed",
|
|
88
|
+
);
|
|
89
|
+
if (!parsed.ok) {
|
|
90
|
+
return [parsed, { status: "invalid" }];
|
|
91
|
+
}
|
|
92
|
+
const payload = parsed.value;
|
|
93
|
+
const body = null;
|
|
94
|
+
|
|
95
|
+
const path = pathToFunc("/v3/accounts/users/credits/usage")();
|
|
96
|
+
|
|
97
|
+
const query = encodeFormQuery({
|
|
98
|
+
"date": payload.date,
|
|
99
|
+
"end_date": payload.end_date,
|
|
100
|
+
"granularity": payload.granularity,
|
|
101
|
+
"start_date": payload.start_date,
|
|
102
|
+
}, { explode: false });
|
|
103
|
+
|
|
104
|
+
const headers = new Headers(compactMap({
|
|
105
|
+
Accept: "application/json",
|
|
106
|
+
}));
|
|
107
|
+
|
|
108
|
+
const secConfig = await extractSecurity(client._options.personalAccessToken);
|
|
109
|
+
const securityInput = secConfig == null
|
|
110
|
+
? {}
|
|
111
|
+
: { personalAccessToken: secConfig };
|
|
112
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
113
|
+
|
|
114
|
+
const context = {
|
|
115
|
+
options: client._options,
|
|
116
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
117
|
+
operationID: "v3-accountmanagement-user-credits-usage",
|
|
118
|
+
oAuth2Scopes: null,
|
|
119
|
+
|
|
120
|
+
resolvedSecurity: requestSecurity,
|
|
121
|
+
|
|
122
|
+
securitySource: client._options.personalAccessToken,
|
|
123
|
+
retryConfig: options?.retries
|
|
124
|
+
|| client._options.retryConfig
|
|
125
|
+
|| { strategy: "none" },
|
|
126
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
const requestRes = client._createRequest(context, {
|
|
130
|
+
security: requestSecurity,
|
|
131
|
+
method: "GET",
|
|
132
|
+
baseURL: options?.serverURL,
|
|
133
|
+
path: path,
|
|
134
|
+
headers: headers,
|
|
135
|
+
query: query,
|
|
136
|
+
body: body,
|
|
137
|
+
userAgent: client._options.userAgent,
|
|
138
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
139
|
+
}, options);
|
|
140
|
+
if (!requestRes.ok) {
|
|
141
|
+
return [requestRes, { status: "invalid" }];
|
|
142
|
+
}
|
|
143
|
+
const req = requestRes.value;
|
|
144
|
+
|
|
145
|
+
const doResult = await client._do(req, {
|
|
146
|
+
context,
|
|
147
|
+
errorCodes: ["401", "404", "4XX", "5XX"],
|
|
148
|
+
retryConfig: context.retryConfig,
|
|
149
|
+
retryCodes: context.retryCodes,
|
|
150
|
+
});
|
|
151
|
+
if (!doResult.ok) {
|
|
152
|
+
return [doResult, { status: "request-error", request: req }];
|
|
153
|
+
}
|
|
154
|
+
const response = doResult.value;
|
|
155
|
+
|
|
156
|
+
const responseFields = {
|
|
157
|
+
HttpMeta: { Response: response, Request: req },
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
const [result] = await M.match<
|
|
161
|
+
operations.V3AccountmanagementUserCreditsUsageResponse,
|
|
162
|
+
| errors.AuthenticationError
|
|
163
|
+
| errors.ErrorModel
|
|
164
|
+
| SDKBaseError
|
|
165
|
+
| ResponseValidationError
|
|
166
|
+
| ConnectionError
|
|
167
|
+
| RequestAbortedError
|
|
168
|
+
| RequestTimeoutError
|
|
169
|
+
| InvalidRequestError
|
|
170
|
+
| UnexpectedClientError
|
|
171
|
+
| SDKValidationError
|
|
172
|
+
>(
|
|
173
|
+
M.json(
|
|
174
|
+
200,
|
|
175
|
+
operations.V3AccountmanagementUserCreditsUsageResponse$inboundSchema,
|
|
176
|
+
{ hdrs: true, key: "Result" },
|
|
177
|
+
),
|
|
178
|
+
M.jsonErr(401, errors.AuthenticationError$inboundSchema),
|
|
179
|
+
M.jsonErr(404, errors.ErrorModel$inboundSchema, {
|
|
180
|
+
ctype: "application/problem+json",
|
|
181
|
+
}),
|
|
182
|
+
M.fail("4XX"),
|
|
183
|
+
M.fail("5XX"),
|
|
184
|
+
)(response, req, { extraFields: responseFields });
|
|
185
|
+
if (!result.ok) {
|
|
186
|
+
return [result, { status: "complete", request: req, response }];
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
return [result, { status: "complete", request: req, response }];
|
|
190
|
+
}
|
|
@@ -29,7 +29,7 @@ import { Result } from "../types/fp.js";
|
|
|
29
29
|
* Create a collection
|
|
30
30
|
*
|
|
31
31
|
* @remarks
|
|
32
|
-
* Create a new collection.
|
|
32
|
+
* Create a new collection.<br><br>This endpoint does not cost credits to execute.
|
|
33
33
|
*/
|
|
34
34
|
export function collectionsCreate(
|
|
35
35
|
client: SDKCore,
|
|
@@ -29,7 +29,7 @@ import { Result } from "../types/fp.js";
|
|
|
29
29
|
* Get a collection
|
|
30
30
|
*
|
|
31
31
|
* @remarks
|
|
32
|
-
* Retrieve information about a collection. Retrieved information includes its name, query, description, status, and asset count.
|
|
32
|
+
* 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.
|
|
33
33
|
*/
|
|
34
34
|
export function collectionsGet(
|
|
35
35
|
client: SDKCore,
|
|
@@ -29,7 +29,7 @@ import { Result } from "../types/fp.js";
|
|
|
29
29
|
* List collections
|
|
30
30
|
*
|
|
31
31
|
* @remarks
|
|
32
|
-
* List all collections for an organization. Retrieved information includes collection ID, name, query, description, status, and asset count.
|
|
32
|
+
* 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.
|
|
33
33
|
*/
|
|
34
34
|
export function collectionsList(
|
|
35
35
|
client: SDKCore,
|
|
@@ -29,7 +29,7 @@ import { Result } from "../types/fp.js";
|
|
|
29
29
|
* Get a collection's events
|
|
30
30
|
*
|
|
31
31
|
* @remarks
|
|
32
|
-
* Retrieve the event history for a collection. This includes the addition or removal of assets as well as collection status changes.
|
|
32
|
+
* 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.
|
|
33
33
|
*/
|
|
34
34
|
export function collectionsListEvents(
|
|
35
35
|
client: SDKCore,
|
|
@@ -29,7 +29,7 @@ import { Result } from "../types/fp.js";
|
|
|
29
29
|
* Update a collection
|
|
30
30
|
*
|
|
31
31
|
* @remarks
|
|
32
|
-
* Update a collection's name, description, and/or query.
|
|
32
|
+
* Update a collection's name, description, and/or query.<br><br>This endpoint does not cost credits to execute.
|
|
33
33
|
*/
|
|
34
34
|
export function collectionsUpdate(
|
|
35
35
|
client: SDKCore,
|
|
@@ -29,7 +29,7 @@ import { Result } from "../types/fp.js";
|
|
|
29
29
|
* List active threats
|
|
30
30
|
*
|
|
31
31
|
* @remarks
|
|
32
|
-
* 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).
|
|
32
|
+
* 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.
|
|
33
33
|
*/
|
|
34
34
|
export function threatHuntingListThreats(
|
|
35
35
|
client: SDKCore,
|
package/src/lib/config.ts
CHANGED
|
@@ -65,9 +65,9 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
65
65
|
|
|
66
66
|
export const SDK_METADATA = {
|
|
67
67
|
language: "typescript",
|
|
68
|
-
openapiDocVersion: "1.0.
|
|
69
|
-
sdkVersion: "0.9.
|
|
70
|
-
genVersion: "2.
|
|
68
|
+
openapiDocVersion: "1.0.71",
|
|
69
|
+
sdkVersion: "0.9.1",
|
|
70
|
+
genVersion: "2.801.2",
|
|
71
71
|
userAgent:
|
|
72
|
-
"speakeasy-sdk/typescript 0.9.
|
|
72
|
+
"speakeasy-sdk/typescript 0.9.1 2.801.2 1.0.71 @censys/platform-sdk",
|
|
73
73
|
} as const;
|
package/src/lib/sdks.ts
CHANGED
|
@@ -304,9 +304,9 @@ export class ClientSDK {
|
|
|
304
304
|
}
|
|
305
305
|
}
|
|
306
306
|
|
|
307
|
-
const jsonLikeContentTypeRE =
|
|
307
|
+
const jsonLikeContentTypeRE = /^(application|text)\/([^+]+\+)*json.*/;
|
|
308
308
|
const jsonlLikeContentTypeRE =
|
|
309
|
-
|
|
309
|
+
/^(application|text)\/([^+]+\+)*(jsonl|x-ndjson)\b.*/;
|
|
310
310
|
async function logRequest(logger: Logger | undefined, req: Request) {
|
|
311
311
|
if (!logger) {
|
|
312
312
|
return;
|
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v3";
|
|
6
6
|
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
-
import
|
|
7
|
+
import * as openEnums from "../../types/enums.js";
|
|
8
|
+
import { OpenEnum } from "../../types/enums.js";
|
|
8
9
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
10
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
11
|
|
|
@@ -14,7 +15,7 @@ export const Targets = {
|
|
|
14
15
|
Cert: "cert",
|
|
15
16
|
Unknown: "unknown",
|
|
16
17
|
} as const;
|
|
17
|
-
export type Targets =
|
|
18
|
+
export type Targets = OpenEnum<typeof Targets>;
|
|
18
19
|
|
|
19
20
|
export type AlternativeQuery = {
|
|
20
21
|
/**
|
|
@@ -28,8 +29,8 @@ export type AlternativeQuery = {
|
|
|
28
29
|
};
|
|
29
30
|
|
|
30
31
|
/** @internal */
|
|
31
|
-
export const Targets$inboundSchema: z.
|
|
32
|
-
.
|
|
32
|
+
export const Targets$inboundSchema: z.ZodType<Targets, z.ZodTypeDef, unknown> =
|
|
33
|
+
openEnums.inboundSchema(Targets);
|
|
33
34
|
|
|
34
35
|
/** @internal */
|
|
35
36
|
export const AlternativeQuery$inboundSchema: z.ZodType<
|
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
import * as z from "zod/v3";
|
|
6
6
|
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
7
|
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
-
import
|
|
8
|
+
import * as openEnums from "../../types/enums.js";
|
|
9
|
+
import { OpenEnum } from "../../types/enums.js";
|
|
9
10
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
11
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
12
|
import { Cpe, Cpe$inboundSchema } from "./cpe.js";
|
|
@@ -18,8 +19,9 @@ export const Source = {
|
|
|
18
19
|
Recog: "recog",
|
|
19
20
|
Wappalyzer: "wappalyzer",
|
|
20
21
|
ThirdParty: "third_party",
|
|
22
|
+
HtmlMetaExtractor: "html_meta_extractor",
|
|
21
23
|
} as const;
|
|
22
|
-
export type Source =
|
|
24
|
+
export type Source = OpenEnum<typeof Source>;
|
|
23
25
|
|
|
24
26
|
export type Attribute = {
|
|
25
27
|
components?: Array<Cpe> | null | undefined;
|
|
@@ -38,8 +40,8 @@ export type Attribute = {
|
|
|
38
40
|
};
|
|
39
41
|
|
|
40
42
|
/** @internal */
|
|
41
|
-
export const Source$inboundSchema: z.
|
|
42
|
-
.
|
|
43
|
+
export const Source$inboundSchema: z.ZodType<Source, z.ZodTypeDef, unknown> =
|
|
44
|
+
openEnums.inboundSchema(Source);
|
|
43
45
|
|
|
44
46
|
/** @internal */
|
|
45
47
|
export const Attribute$inboundSchema: z.ZodType<
|