@censys/platform-sdk 0.5.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -17
- package/docs/sdks/globaldata/README.md +190 -92
- package/docs/sdks/threathunting/README.md +29 -21
- package/examples/globalDataSearch.example.ts +1 -1
- package/examples/package-lock.json +3 -3
- package/funcs/globalDataConvertLegacySearchQueries.d.ts +18 -0
- package/funcs/globalDataConvertLegacySearchQueries.d.ts.map +1 -0
- package/funcs/globalDataConvertLegacySearchQueries.js +134 -0
- package/funcs/globalDataConvertLegacySearchQueries.js.map +1 -0
- package/funcs/globalDataCreateTrackedScan.d.ts +2 -2
- package/funcs/globalDataCreateTrackedScan.js +2 -2
- package/funcs/{globalDataGetTrackedScanThreatHunting.d.ts → globalDataGetCertificateRaw.d.ts} +4 -5
- package/funcs/globalDataGetCertificateRaw.d.ts.map +1 -0
- package/funcs/{globalDataGetHostObservationsWithCertificate.js → globalDataGetCertificateRaw.js} +10 -19
- package/funcs/globalDataGetCertificateRaw.js.map +1 -0
- package/funcs/globalDataGetCertificates.d.ts +1 -1
- package/funcs/globalDataGetCertificates.d.ts.map +1 -1
- package/funcs/globalDataGetCertificates.js +9 -6
- package/funcs/globalDataGetCertificates.js.map +1 -1
- package/funcs/globalDataGetCertificatesRaw.d.ts +18 -0
- package/funcs/globalDataGetCertificatesRaw.d.ts.map +1 -0
- package/funcs/globalDataGetCertificatesRaw.js +130 -0
- package/funcs/globalDataGetCertificatesRaw.js.map +1 -0
- package/funcs/globalDataGetHostTimeline.d.ts +1 -1
- package/funcs/globalDataGetHostTimeline.js +1 -1
- package/funcs/globalDataGetHosts.d.ts +1 -1
- package/funcs/globalDataGetHosts.d.ts.map +1 -1
- package/funcs/globalDataGetHosts.js +8 -6
- package/funcs/globalDataGetHosts.js.map +1 -1
- package/funcs/globalDataGetTrackedScan.d.ts +2 -3
- package/funcs/globalDataGetTrackedScan.d.ts.map +1 -1
- package/funcs/globalDataGetTrackedScan.js +2 -3
- package/funcs/globalDataGetTrackedScan.js.map +1 -1
- package/funcs/globalDataGetWebProperties.d.ts +1 -1
- package/funcs/globalDataGetWebProperties.d.ts.map +1 -1
- package/funcs/globalDataGetWebProperties.js +9 -6
- package/funcs/globalDataGetWebProperties.js.map +1 -1
- package/funcs/threatHuntingCreateTrackedScan.d.ts +2 -2
- package/funcs/threatHuntingCreateTrackedScan.js +2 -2
- package/funcs/threatHuntingGetHostObservationsWithCertificate.d.ts +18 -0
- package/funcs/threatHuntingGetHostObservationsWithCertificate.d.ts.map +1 -0
- package/funcs/threatHuntingGetHostObservationsWithCertificate.js +141 -0
- package/funcs/threatHuntingGetHostObservationsWithCertificate.js.map +1 -0
- package/funcs/threatHuntingGetTrackedScanThreatHunting.d.ts +18 -0
- package/funcs/threatHuntingGetTrackedScanThreatHunting.d.ts.map +1 -0
- package/funcs/{globalDataGetTrackedScanThreatHunting.js → threatHuntingGetTrackedScanThreatHunting.js} +5 -6
- package/funcs/threatHuntingGetTrackedScanThreatHunting.js.map +1 -0
- package/jsr.json +1 -1
- package/lib/config.d.ts +4 -4
- package/lib/config.js +4 -4
- package/lib/security.d.ts.map +1 -1
- package/lib/security.js.map +1 -1
- package/models/components/alternativequery.d.ts +69 -0
- package/models/components/alternativequery.d.ts.map +1 -0
- package/models/components/alternativequery.js +93 -0
- package/models/components/alternativequery.js.map +1 -0
- package/models/components/assetcertificatelistinputbody.d.ts +32 -0
- package/models/components/assetcertificatelistinputbody.d.ts.map +1 -0
- package/models/components/assetcertificatelistinputbody.js +78 -0
- package/models/components/assetcertificatelistinputbody.js.map +1 -0
- package/models/components/assethostlistinputbody.d.ts +32 -0
- package/models/components/assethostlistinputbody.d.ts.map +1 -0
- package/models/components/assethostlistinputbody.js +78 -0
- package/models/components/assethostlistinputbody.js.map +1 -0
- package/models/components/assetwebpropertylistinputbody.d.ts +32 -0
- package/models/components/assetwebpropertylistinputbody.d.ts.map +1 -0
- package/models/components/assetwebpropertylistinputbody.js +78 -0
- package/models/components/assetwebpropertylistinputbody.js.map +1 -0
- package/models/components/asteriskmanagerinterface.d.ts +29 -0
- package/models/components/asteriskmanagerinterface.d.ts.map +1 -0
- package/models/components/asteriskmanagerinterface.js +69 -0
- package/models/components/asteriskmanagerinterface.js.map +1 -0
- package/models/components/convertqueryerror.d.ts +32 -0
- package/models/components/convertqueryerror.d.ts.map +1 -0
- package/models/components/convertqueryerror.js +69 -0
- package/models/components/convertqueryerror.js.map +1 -0
- package/models/components/index.d.ts +12 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +12 -0
- package/models/components/index.js.map +1 -1
- package/models/components/openvpnmgmt.d.ts +37 -0
- package/models/components/openvpnmgmt.d.ts.map +1 -0
- package/models/components/openvpnmgmt.js +92 -0
- package/models/components/openvpnmgmt.js.map +1 -0
- package/models/components/rawcertificateresponse.d.ts +31 -0
- package/models/components/rawcertificateresponse.d.ts.map +1 -0
- package/models/components/rawcertificateresponse.js +80 -0
- package/models/components/rawcertificateresponse.js.map +1 -0
- package/models/components/rdp.d.ts +2 -0
- package/models/components/rdp.d.ts.map +1 -1
- package/models/components/rdp.js +4 -0
- package/models/components/rdp.js.map +1 -1
- package/models/components/responseenvelopelistrawcertificateresponse.d.ts +30 -0
- package/models/components/responseenvelopelistrawcertificateresponse.d.ts.map +1 -0
- package/models/components/responseenvelopelistrawcertificateresponse.js +72 -0
- package/models/components/responseenvelopelistrawcertificateresponse.js.map +1 -0
- package/models/components/responseenvelopelistsearchconvertqueryresponse.d.ts +30 -0
- package/models/components/responseenvelopelistsearchconvertqueryresponse.d.ts.map +1 -0
- package/models/components/responseenvelopelistsearchconvertqueryresponse.js +72 -0
- package/models/components/responseenvelopelistsearchconvertqueryresponse.js.map +1 -0
- package/models/components/screenshot.d.ts +2 -0
- package/models/components/screenshot.d.ts.map +1 -1
- package/models/components/screenshot.js +2 -0
- package/models/components/screenshot.js.map +1 -1
- package/models/components/searchconvertqueryinputbody.d.ts +32 -0
- package/models/components/searchconvertqueryinputbody.d.ts.map +1 -0
- package/models/components/searchconvertqueryinputbody.js +69 -0
- package/models/components/searchconvertqueryinputbody.js.map +1 -0
- package/models/components/searchconvertqueryresponse.d.ts +91 -0
- package/models/components/searchconvertqueryresponse.d.ts.map +1 -0
- package/models/components/searchconvertqueryresponse.js +117 -0
- package/models/components/searchconvertqueryresponse.js.map +1 -0
- package/models/components/service.d.ts +6 -0
- package/models/components/service.d.ts.map +1 -1
- package/models/components/service.js +11 -0
- package/models/components/service.js.map +1 -1
- package/models/components/servicescan.d.ts +6 -0
- package/models/components/servicescan.d.ts.map +1 -1
- package/models/components/servicescan.js +10 -0
- package/models/components/servicescan.js.map +1 -1
- package/models/operations/index.d.ts +7 -4
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +7 -4
- package/models/operations/index.js.map +1 -1
- package/models/operations/v3globaldataassetcertificatelistpost.d.ts +91 -0
- package/models/operations/v3globaldataassetcertificatelistpost.d.ts.map +1 -0
- package/models/operations/v3globaldataassetcertificatelistpost.js +157 -0
- package/models/operations/v3globaldataassetcertificatelistpost.js.map +1 -0
- package/models/operations/v3globaldataassetcertificatelistrawpost.d.ts +91 -0
- package/models/operations/v3globaldataassetcertificatelistrawpost.d.ts.map +1 -0
- package/models/operations/v3globaldataassetcertificatelistrawpost.js +157 -0
- package/models/operations/v3globaldataassetcertificatelistrawpost.js.map +1 -0
- package/models/operations/v3globaldataassetcertificateraw.d.ts +93 -0
- package/models/operations/v3globaldataassetcertificateraw.d.ts.map +1 -0
- package/models/operations/v3globaldataassetcertificateraw.js +156 -0
- package/models/operations/v3globaldataassetcertificateraw.js.map +1 -0
- package/models/operations/v3globaldataassethostlistpost.d.ts +91 -0
- package/models/operations/v3globaldataassethostlistpost.d.ts.map +1 -0
- package/models/operations/v3globaldataassethostlistpost.js +157 -0
- package/models/operations/v3globaldataassethostlistpost.js.map +1 -0
- package/models/operations/v3globaldataassethosttimeline.d.ts +2 -2
- package/models/operations/v3globaldataassetwebpropertylistpost.d.ts +91 -0
- package/models/operations/v3globaldataassetwebpropertylistpost.d.ts.map +1 -0
- package/models/operations/v3globaldataassetwebpropertylistpost.js +157 -0
- package/models/operations/v3globaldataassetwebpropertylistpost.js.map +1 -0
- package/models/operations/v3globaldatasearchconvert.d.ts +91 -0
- package/models/operations/v3globaldatasearchconvert.d.ts.map +1 -0
- package/models/operations/v3globaldatasearchconvert.js +157 -0
- package/models/operations/v3globaldatasearchconvert.js.map +1 -0
- package/models/operations/v3threathuntinggethostobservationswithcertificate.d.ts +124 -0
- package/models/operations/v3threathuntinggethostobservationswithcertificate.d.ts.map +1 -0
- package/models/operations/v3threathuntinggethostobservationswithcertificate.js +183 -0
- package/models/operations/v3threathuntinggethostobservationswithcertificate.js.map +1 -0
- package/package.json +3 -3
- package/sdk/globaldata.d.ts +24 -19
- package/sdk/globaldata.d.ts.map +1 -1
- package/sdk/globaldata.js +29 -21
- package/sdk/globaldata.js.map +1 -1
- package/sdk/threathunting.d.ts +7 -9
- package/sdk/threathunting.d.ts.map +1 -1
- package/sdk/threathunting.js +11 -13
- package/sdk/threathunting.js.map +1 -1
- package/src/funcs/globalDataConvertLegacySearchQueries.ts +188 -0
- package/src/funcs/globalDataCreateTrackedScan.ts +2 -2
- package/src/funcs/{globalDataGetHostObservationsWithCertificate.ts → globalDataGetCertificateRaw.ts} +19 -26
- package/src/funcs/globalDataGetCertificates.ts +15 -14
- package/src/funcs/globalDataGetCertificatesRaw.ts +187 -0
- package/src/funcs/globalDataGetHostTimeline.ts +1 -1
- package/src/funcs/globalDataGetHosts.ts +24 -16
- package/src/funcs/globalDataGetTrackedScan.ts +2 -3
- package/src/funcs/globalDataGetWebProperties.ts +15 -14
- package/src/funcs/threatHuntingCreateTrackedScan.ts +2 -2
- package/src/funcs/threatHuntingGetHostObservationsWithCertificate.ts +201 -0
- package/src/funcs/{globalDataGetTrackedScanThreatHunting.ts → threatHuntingGetTrackedScanThreatHunting.ts} +3 -4
- package/src/lib/config.ts +4 -4
- package/src/lib/security.ts +4 -1
- package/src/models/components/alternativequery.ts +104 -0
- package/src/models/components/assetcertificatelistinputbody.ts +80 -0
- package/src/models/components/assethostlistinputbody.ts +78 -0
- package/src/models/components/assetwebpropertylistinputbody.ts +80 -0
- package/src/models/components/asteriskmanagerinterface.ts +66 -0
- package/src/models/components/convertqueryerror.ts +69 -0
- package/src/models/components/index.ts +12 -0
- package/src/models/components/openvpnmgmt.ts +93 -0
- package/src/models/components/rawcertificateresponse.ts +79 -0
- package/src/models/components/rdp.ts +6 -0
- package/src/models/components/responseenvelopelistrawcertificateresponse.ts +84 -0
- package/src/models/components/responseenvelopelistsearchconvertqueryresponse.ts +88 -0
- package/src/models/components/screenshot.ts +4 -0
- package/src/models/components/searchconvertqueryinputbody.ts +71 -0
- package/src/models/components/searchconvertqueryresponse.ts +166 -0
- package/src/models/components/service.ts +25 -0
- package/src/models/components/servicescan.ts +24 -0
- package/src/models/operations/index.ts +7 -4
- package/src/models/operations/v3globaldataassetcertificatelistpost.ts +265 -0
- package/src/models/operations/v3globaldataassetcertificatelistrawpost.ts +269 -0
- package/src/models/operations/v3globaldataassetcertificateraw.ts +248 -0
- package/src/models/operations/v3globaldataassethostlistpost.ts +238 -0
- package/src/models/operations/v3globaldataassethosttimeline.ts +2 -2
- package/src/models/operations/v3globaldataassetwebpropertylistpost.ts +265 -0
- package/src/models/operations/v3globaldatasearchconvert.ts +234 -0
- package/src/models/operations/v3threathuntinggethostobservationswithcertificate.ts +315 -0
- package/src/sdk/globaldata.ts +49 -35
- package/src/sdk/threathunting.ts +16 -15
- package/tests/sdk.test.ts +2 -2
- package/funcs/globalDataGetHostObservationsWithCertificate.d.ts +0 -18
- package/funcs/globalDataGetHostObservationsWithCertificate.d.ts.map +0 -1
- package/funcs/globalDataGetHostObservationsWithCertificate.js.map +0 -1
- package/funcs/globalDataGetTrackedScanThreatHunting.d.ts.map +0 -1
- package/funcs/globalDataGetTrackedScanThreatHunting.js.map +0 -1
- package/models/operations/v3globaldataassetcertificatelist.d.ts +0 -94
- package/models/operations/v3globaldataassetcertificatelist.d.ts.map +0 -1
- package/models/operations/v3globaldataassetcertificatelist.js +0 -157
- package/models/operations/v3globaldataassetcertificatelist.js.map +0 -1
- package/models/operations/v3globaldataassethostlist.d.ts +0 -94
- package/models/operations/v3globaldataassethostlist.d.ts.map +0 -1
- package/models/operations/v3globaldataassethostlist.js +0 -157
- package/models/operations/v3globaldataassethostlist.js.map +0 -1
- package/models/operations/v3globaldataassetwebpropertylist.d.ts +0 -94
- package/models/operations/v3globaldataassetwebpropertylist.d.ts.map +0 -1
- package/models/operations/v3globaldataassetwebpropertylist.js +0 -157
- package/models/operations/v3globaldataassetwebpropertylist.js.map +0 -1
- package/models/operations/v3globaldatagethostobservationswithcertificate.d.ts +0 -124
- package/models/operations/v3globaldatagethostobservationswithcertificate.d.ts.map +0 -1
- package/models/operations/v3globaldatagethostobservationswithcertificate.js +0 -178
- package/models/operations/v3globaldatagethostobservationswithcertificate.js.map +0 -1
- package/src/models/operations/v3globaldataassetcertificatelist.ts +0 -259
- package/src/models/operations/v3globaldataassethostlist.ts +0 -233
- package/src/models/operations/v3globaldataassetwebpropertylist.ts +0 -259
- package/src/models/operations/v3globaldatagethostobservationswithcertificate.ts +0 -317
package/sdk/globaldata.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"globaldata.d.ts","sourceRoot":"","sources":["../src/sdk/globaldata.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"globaldata.d.ts","sourceRoot":"","sources":["../src/sdk/globaldata.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAG5D,qBAAa,UAAW,SAAQ,SAAS;IACvC;;;;;OAKG;IACG,eAAe,CACnB,OAAO,EAAE,UAAU,CAAC,2CAA2C,EAC/D,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OAKG;IACG,iBAAiB,CACrB,OAAO,EAAE,UAAU,CAAC,8BAA8B,EAClD,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,+BAA+B,CAAC;IAQtD;;;;;OAKG;IACG,cAAc,CAClB,OAAO,EAAE,UAAU,CAAC,2BAA2B,EAC/C,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,4BAA4B,CAAC;IAQnD;;;;;OAKG;IACG,SAAS,CACb,OAAO,EAAE,UAAU,CAAC,kCAAkC,EACtD,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,mCAAmC,CAAC;IAQ1D;;;;;OAKG;IACG,0BAA0B,CAC9B,OAAO,EAAE,UAAU,CAAC,gCAAgC,EACpD,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,iCAAiC,CAAC;IAQxD;;;;;OAKG;IACG,MAAM,CACV,OAAO,EAAE,UAAU,CAAC,8BAA8B,EAClD,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,+BAA+B,CAAC;CAOvD"}
|
package/sdk/globaldata.js
CHANGED
|
@@ -5,15 +5,16 @@
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.GlobalData = void 0;
|
|
7
7
|
const globalDataAggregate_js_1 = require("../funcs/globalDataAggregate.js");
|
|
8
|
+
const globalDataConvertLegacySearchQueries_js_1 = require("../funcs/globalDataConvertLegacySearchQueries.js");
|
|
8
9
|
const globalDataCreateTrackedScan_js_1 = require("../funcs/globalDataCreateTrackedScan.js");
|
|
9
10
|
const globalDataGetCertificate_js_1 = require("../funcs/globalDataGetCertificate.js");
|
|
11
|
+
const globalDataGetCertificateRaw_js_1 = require("../funcs/globalDataGetCertificateRaw.js");
|
|
10
12
|
const globalDataGetCertificates_js_1 = require("../funcs/globalDataGetCertificates.js");
|
|
13
|
+
const globalDataGetCertificatesRaw_js_1 = require("../funcs/globalDataGetCertificatesRaw.js");
|
|
11
14
|
const globalDataGetHost_js_1 = require("../funcs/globalDataGetHost.js");
|
|
12
|
-
const globalDataGetHostObservationsWithCertificate_js_1 = require("../funcs/globalDataGetHostObservationsWithCertificate.js");
|
|
13
15
|
const globalDataGetHosts_js_1 = require("../funcs/globalDataGetHosts.js");
|
|
14
16
|
const globalDataGetHostTimeline_js_1 = require("../funcs/globalDataGetHostTimeline.js");
|
|
15
17
|
const globalDataGetTrackedScan_js_1 = require("../funcs/globalDataGetTrackedScan.js");
|
|
16
|
-
const globalDataGetTrackedScanThreatHunting_js_1 = require("../funcs/globalDataGetTrackedScanThreatHunting.js");
|
|
17
18
|
const globalDataGetWebProperties_js_1 = require("../funcs/globalDataGetWebProperties.js");
|
|
18
19
|
const globalDataGetWebProperty_js_1 = require("../funcs/globalDataGetWebProperty.js");
|
|
19
20
|
const globalDataSearch_js_1 = require("../funcs/globalDataSearch.js");
|
|
@@ -29,6 +30,15 @@ class GlobalData extends sdks_js_1.ClientSDK {
|
|
|
29
30
|
async getCertificates(request, options) {
|
|
30
31
|
return (0, fp_js_1.unwrapAsync)((0, globalDataGetCertificates_js_1.globalDataGetCertificates)(this, request, options));
|
|
31
32
|
}
|
|
33
|
+
/**
|
|
34
|
+
* Get multiple certificates in PEM format
|
|
35
|
+
*
|
|
36
|
+
* @remarks
|
|
37
|
+
* Retrieve the raw PEM-encoded format for multiple certificates. A certificate ID is its SHA-256 fingerprint in the Censys dataset.
|
|
38
|
+
*/
|
|
39
|
+
async getCertificatesRaw(request, options) {
|
|
40
|
+
return (0, fp_js_1.unwrapAsync)((0, globalDataGetCertificatesRaw_js_1.globalDataGetCertificatesRaw)(this, request, options));
|
|
41
|
+
}
|
|
32
42
|
/**
|
|
33
43
|
* Get a certificate
|
|
34
44
|
*
|
|
@@ -39,13 +49,13 @@ class GlobalData extends sdks_js_1.ClientSDK {
|
|
|
39
49
|
return (0, fp_js_1.unwrapAsync)((0, globalDataGetCertificate_js_1.globalDataGetCertificate)(this, request, options));
|
|
40
50
|
}
|
|
41
51
|
/**
|
|
42
|
-
* Get
|
|
52
|
+
* Get a certificate in PEM format
|
|
43
53
|
*
|
|
44
54
|
* @remarks
|
|
45
|
-
* Retrieve
|
|
55
|
+
* Retrieve the raw PEM-encoded format of a certificate. A certificate ID is its SHA-256 fingerprint in the Censys dataset.
|
|
46
56
|
*/
|
|
47
|
-
async
|
|
48
|
-
return (0, fp_js_1.unwrapAsync)((0,
|
|
57
|
+
async getCertificateRaw(request, options) {
|
|
58
|
+
return (0, fp_js_1.unwrapAsync)((0, globalDataGetCertificateRaw_js_1.globalDataGetCertificateRaw)(this, request, options));
|
|
49
59
|
}
|
|
50
60
|
/**
|
|
51
61
|
* Get multiple hosts
|
|
@@ -69,7 +79,7 @@ class GlobalData extends sdks_js_1.ClientSDK {
|
|
|
69
79
|
* Get host event history
|
|
70
80
|
*
|
|
71
81
|
* @remarks
|
|
72
|
-
* Retrieve event history for a host. A host ID is its IP address.
|
|
82
|
+
* Retrieve event history for a host. A host ID is its IP address.<br><br>Note that when a service protocol changes after a new scan (for example, from `UNKNOWN` to `NETBIOS`), this information will only be reflected in the `scan` object. It will not be shown in the `service_scanned diff` object.
|
|
73
83
|
*/
|
|
74
84
|
async getHostTimeline(request, options) {
|
|
75
85
|
return (0, fp_js_1.unwrapAsync)((0, globalDataGetHostTimeline_js_1.globalDataGetHostTimeline)(this, request, options));
|
|
@@ -93,20 +103,19 @@ class GlobalData extends sdks_js_1.ClientSDK {
|
|
|
93
103
|
return (0, fp_js_1.unwrapAsync)((0, globalDataGetWebProperty_js_1.globalDataGetWebProperty)(this, request, options));
|
|
94
104
|
}
|
|
95
105
|
/**
|
|
96
|
-
*
|
|
106
|
+
* Live Rescan: Initiate a new rescan
|
|
97
107
|
*
|
|
98
108
|
* @remarks
|
|
99
|
-
*
|
|
109
|
+
* Initiate a rescan for a known host service at a specific IP and port (`ip:port`) or hostname and port (`hostname:port`). This is equivalent to the [Live Rescan](https://docs.censys.com/docs/platform-live-rescan#/) feature available in the UI, but you can also target web properties in addition to hosts.<br><br>The scan may take several minutes to complete. The response will contain a scan ID that you can use to [monitor the scan's status](https://docs.censys.com/reference/v3-globaldata-scans-get#/). After the scan completes, perform a lookup on the target asset to retrieve detailed scan information.<br><br>This endpoint is available to all Enterprise customers. It costs 10 credits to execute.
|
|
100
110
|
*/
|
|
101
111
|
async createTrackedScan(request, options) {
|
|
102
112
|
return (0, fp_js_1.unwrapAsync)((0, globalDataCreateTrackedScan_js_1.globalDataCreateTrackedScan)(this, request, options));
|
|
103
113
|
}
|
|
104
114
|
/**
|
|
105
|
-
* Get
|
|
115
|
+
* Get scan status
|
|
106
116
|
*
|
|
107
117
|
* @remarks
|
|
108
|
-
* Retrieve the current status
|
|
109
|
-
* This endpoint works for both discovery scans and rescans.
|
|
118
|
+
* Retrieve the current status of a scan by its ID. This endpoint works for both [Live Discovery scans](https://docs.censys.com/reference/v3-threathunting-scans-discovery#/) and [Live Rescans](https://docs.censys.com/reference/v3-globaldata-scans-rescan#/).<br><br>If the scan was successful, perform a lookup on the target asset to retrieve detailed scan information.<br><br>This endpoint is available to all Enterprise customers. This endpoint does not cost any credits to execute.
|
|
110
119
|
*/
|
|
111
120
|
async getTrackedScan(request, options) {
|
|
112
121
|
return (0, fp_js_1.unwrapAsync)((0, globalDataGetTrackedScan_js_1.globalDataGetTrackedScan)(this, request, options));
|
|
@@ -121,23 +130,22 @@ class GlobalData extends sdks_js_1.ClientSDK {
|
|
|
121
130
|
return (0, fp_js_1.unwrapAsync)((0, globalDataAggregate_js_1.globalDataAggregate)(this, request, options));
|
|
122
131
|
}
|
|
123
132
|
/**
|
|
124
|
-
*
|
|
133
|
+
* Convert Legacy Search queries to Platform queries
|
|
125
134
|
*
|
|
126
135
|
* @remarks
|
|
127
|
-
*
|
|
136
|
+
* Convert Censys Search Language queries used in Legacy Search into Censys Query Language (CenQL) queries for use in the Platform.<br><br>Reference the [documentation on CenQL](https://docs.censys.com/docs/censys-query-language) for more information about query syntax.
|
|
128
137
|
*/
|
|
129
|
-
async
|
|
130
|
-
return (0, fp_js_1.unwrapAsync)((0,
|
|
138
|
+
async convertLegacySearchQueries(request, options) {
|
|
139
|
+
return (0, fp_js_1.unwrapAsync)((0, globalDataConvertLegacySearchQueries_js_1.globalDataConvertLegacySearchQueries)(this, request, options));
|
|
131
140
|
}
|
|
132
141
|
/**
|
|
133
|
-
*
|
|
142
|
+
* Run a search query
|
|
134
143
|
*
|
|
135
144
|
* @remarks
|
|
136
|
-
*
|
|
137
|
-
* This endpoint works for both discovery scans and rescans.
|
|
145
|
+
* Run a search query across Censys data. Reference the [documentation on Censys Query Language](https://docs.censys.com/docs/censys-query-language#/) for information about query syntax.
|
|
138
146
|
*/
|
|
139
|
-
async
|
|
140
|
-
return (0, fp_js_1.unwrapAsync)((0,
|
|
147
|
+
async search(request, options) {
|
|
148
|
+
return (0, fp_js_1.unwrapAsync)((0, globalDataSearch_js_1.globalDataSearch)(this, request, options));
|
|
141
149
|
}
|
|
142
150
|
}
|
|
143
151
|
exports.GlobalData = GlobalData;
|
package/sdk/globaldata.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"globaldata.js","sourceRoot":"","sources":["../src/sdk/globaldata.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,4EAAsE;AACtE,4FAAsF;AACtF,sFAAgF;AAChF,wFAAkF;AAClF,wEAAkE;AAClE,
|
|
1
|
+
{"version":3,"file":"globaldata.js","sourceRoot":"","sources":["../src/sdk/globaldata.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,4EAAsE;AACtE,8GAAwG;AACxG,4FAAsF;AACtF,sFAAgF;AAChF,4FAAsF;AACtF,wFAAkF;AAClF,8FAAwF;AACxF,wEAAkE;AAClE,0EAAoE;AACpE,wFAAkF;AAClF,sFAAgF;AAChF,0FAAoF;AACpF,sFAAgF;AAChF,sEAAgE;AAChE,4CAA2D;AA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AAO,CACR,CAAC,CAAC;IACL,CAAC;CACF;AA9OD,gCA8OC"}
|
package/sdk/threathunting.d.ts
CHANGED
|
@@ -2,26 +2,24 @@ import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
|
2
2
|
import * as operations from "../models/operations/index.js";
|
|
3
3
|
export declare class ThreatHunting extends ClientSDK {
|
|
4
4
|
/**
|
|
5
|
-
* Get
|
|
5
|
+
* Get host history for a certificate
|
|
6
6
|
*
|
|
7
7
|
* @remarks
|
|
8
|
-
* Retrieve the
|
|
9
|
-
* This endpoint works for both discovery scans and rescans.
|
|
8
|
+
* Retrieve the historical observations of hosts associated with a certificate. This is useful for threat hunting, detection engineering, and timeline generation. Certificate history is also visible to Threat Hunting users in the Platform UI on the [certificate timeline](https://docs.censys.com/docs/platform-threat-hunting-use-cert-history-to-build-better-detections#/).<br><br>You can define a specific time frame of interest. If you do not specify a time frame, this endpoint will search the historical dataset that is available to your account. You may also filter results by port and transport protocol.<br><br>This endpoint is available to organizations that have access to the Threat Hunting module. It costs 5 credits per page of results.
|
|
10
9
|
*/
|
|
11
|
-
|
|
10
|
+
getHostObservationsWithCertificate(request: operations.V3ThreathuntingGetHostObservationsWithCertificateRequest, options?: RequestOptions): Promise<operations.V3ThreathuntingGetHostObservationsWithCertificateResponse>;
|
|
12
11
|
/**
|
|
13
|
-
*
|
|
12
|
+
* Live Discovery: Initiate a new scan
|
|
14
13
|
*
|
|
15
14
|
* @remarks
|
|
16
|
-
*
|
|
15
|
+
* Initiate a scan to look for a currently unobserved service at a specific IP and port (`ip:port`) or hostname and port (`hostname:port`). This is equivalent to the [Live Discovery](https://docs.censys.com/docs/platform-threat-hunting-use-live-scan-and-rescan-to-validate-infrastructure#/) feature available in the UI, but you can also target web properties in addition to hosts.<br><br>The scan may take several minutes to complete. The response will contain a scan ID that you can use to [monitor the scan's status](https://docs.censys.com/reference/v3-threathunting-scans-get#/). After the scan completes, perform a lookup on the target asset to retrieve detailed scan information.<br><br>This endpoint is available to organizations that have access to the Threat Hunting module. It costs 15 credits to execute this endpoint.
|
|
17
16
|
*/
|
|
18
17
|
createTrackedScan(request: operations.V3ThreathuntingScansDiscoveryRequest, options?: RequestOptions): Promise<operations.V3ThreathuntingScansDiscoveryResponse>;
|
|
19
18
|
/**
|
|
20
|
-
* Get
|
|
19
|
+
* Get scan status
|
|
21
20
|
*
|
|
22
21
|
* @remarks
|
|
23
|
-
* Retrieve the current status
|
|
24
|
-
* This endpoint works for both discovery scans and rescans.
|
|
22
|
+
* Retrieve the current status of a scan by its ID. This endpoint works for both [Live Discovery scans](https://docs.censys.com/reference/v3-threathunting-scans-discovery#/) and [Live Rescans](https://docs.censys.com/reference/v3-globaldata-scans-rescan#/).<br><br>If the scan was successful, perform a lookup on the target asset to retrieve detailed scan information.<br><br>This endpoint is available to all Enterprise customers. This endpoint does not cost any credits to execute.
|
|
25
23
|
*/
|
|
26
24
|
getTrackedScanThreatHunting(request: operations.V3ThreathuntingScansGetRequest, options?: RequestOptions): Promise<operations.V3ThreathuntingScansGetResponse>;
|
|
27
25
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"threathunting.d.ts","sourceRoot":"","sources":["../src/sdk/threathunting.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAG5D,qBAAa,aAAc,SAAQ,SAAS;IAC1C
|
|
1
|
+
{"version":3,"file":"threathunting.d.ts","sourceRoot":"","sources":["../src/sdk/threathunting.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAG5D,qBAAa,aAAc,SAAQ,SAAS;IAC1C;;;;;OAKG;IACG,kCAAkC,CACtC,OAAO,EACL,UAAU,CAAC,wDAAwD,EACrE,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CACR,UAAU,CAAC,yDAAyD,CACrE;IAQD;;;;;OAKG;IACG,iBAAiB,CACrB,OAAO,EAAE,UAAU,CAAC,oCAAoC,EACxD,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,qCAAqC,CAAC;IAQ5D;;;;;OAKG;IACG,2BAA2B,CAC/B,OAAO,EAAE,UAAU,CAAC,8BAA8B,EAClD,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,+BAA+B,CAAC;IAQtD;;;;;OAKG;IACG,WAAW,CACf,OAAO,EAAE,UAAU,CAAC,iCAAiC,EACrD,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,kCAAkC,CAAC;CAO1D"}
|
package/sdk/threathunting.js
CHANGED
|
@@ -4,41 +4,39 @@
|
|
|
4
4
|
*/
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.ThreatHunting = void 0;
|
|
7
|
-
const globalDataGetTrackedScan_js_1 = require("../funcs/globalDataGetTrackedScan.js");
|
|
8
|
-
const globalDataGetTrackedScanThreatHunting_js_1 = require("../funcs/globalDataGetTrackedScanThreatHunting.js");
|
|
9
7
|
const threatHuntingCreateTrackedScan_js_1 = require("../funcs/threatHuntingCreateTrackedScan.js");
|
|
8
|
+
const threatHuntingGetHostObservationsWithCertificate_js_1 = require("../funcs/threatHuntingGetHostObservationsWithCertificate.js");
|
|
9
|
+
const threatHuntingGetTrackedScanThreatHunting_js_1 = require("../funcs/threatHuntingGetTrackedScanThreatHunting.js");
|
|
10
10
|
const threatHuntingValueCounts_js_1 = require("../funcs/threatHuntingValueCounts.js");
|
|
11
11
|
const sdks_js_1 = require("../lib/sdks.js");
|
|
12
12
|
const fp_js_1 = require("../types/fp.js");
|
|
13
13
|
class ThreatHunting extends sdks_js_1.ClientSDK {
|
|
14
14
|
/**
|
|
15
|
-
* Get
|
|
15
|
+
* Get host history for a certificate
|
|
16
16
|
*
|
|
17
17
|
* @remarks
|
|
18
|
-
* Retrieve the
|
|
19
|
-
* This endpoint works for both discovery scans and rescans.
|
|
18
|
+
* Retrieve the historical observations of hosts associated with a certificate. This is useful for threat hunting, detection engineering, and timeline generation. Certificate history is also visible to Threat Hunting users in the Platform UI on the [certificate timeline](https://docs.censys.com/docs/platform-threat-hunting-use-cert-history-to-build-better-detections#/).<br><br>You can define a specific time frame of interest. If you do not specify a time frame, this endpoint will search the historical dataset that is available to your account. You may also filter results by port and transport protocol.<br><br>This endpoint is available to organizations that have access to the Threat Hunting module. It costs 5 credits per page of results.
|
|
20
19
|
*/
|
|
21
|
-
async
|
|
22
|
-
return (0, fp_js_1.unwrapAsync)((0,
|
|
20
|
+
async getHostObservationsWithCertificate(request, options) {
|
|
21
|
+
return (0, fp_js_1.unwrapAsync)((0, threatHuntingGetHostObservationsWithCertificate_js_1.threatHuntingGetHostObservationsWithCertificate)(this, request, options));
|
|
23
22
|
}
|
|
24
23
|
/**
|
|
25
|
-
*
|
|
24
|
+
* Live Discovery: Initiate a new scan
|
|
26
25
|
*
|
|
27
26
|
* @remarks
|
|
28
|
-
*
|
|
27
|
+
* Initiate a scan to look for a currently unobserved service at a specific IP and port (`ip:port`) or hostname and port (`hostname:port`). This is equivalent to the [Live Discovery](https://docs.censys.com/docs/platform-threat-hunting-use-live-scan-and-rescan-to-validate-infrastructure#/) feature available in the UI, but you can also target web properties in addition to hosts.<br><br>The scan may take several minutes to complete. The response will contain a scan ID that you can use to [monitor the scan's status](https://docs.censys.com/reference/v3-threathunting-scans-get#/). After the scan completes, perform a lookup on the target asset to retrieve detailed scan information.<br><br>This endpoint is available to organizations that have access to the Threat Hunting module. It costs 15 credits to execute this endpoint.
|
|
29
28
|
*/
|
|
30
29
|
async createTrackedScan(request, options) {
|
|
31
30
|
return (0, fp_js_1.unwrapAsync)((0, threatHuntingCreateTrackedScan_js_1.threatHuntingCreateTrackedScan)(this, request, options));
|
|
32
31
|
}
|
|
33
32
|
/**
|
|
34
|
-
* Get
|
|
33
|
+
* Get scan status
|
|
35
34
|
*
|
|
36
35
|
* @remarks
|
|
37
|
-
* Retrieve the current status
|
|
38
|
-
* This endpoint works for both discovery scans and rescans.
|
|
36
|
+
* Retrieve the current status of a scan by its ID. This endpoint works for both [Live Discovery scans](https://docs.censys.com/reference/v3-threathunting-scans-discovery#/) and [Live Rescans](https://docs.censys.com/reference/v3-globaldata-scans-rescan#/).<br><br>If the scan was successful, perform a lookup on the target asset to retrieve detailed scan information.<br><br>This endpoint is available to all Enterprise customers. This endpoint does not cost any credits to execute.
|
|
39
37
|
*/
|
|
40
38
|
async getTrackedScanThreatHunting(request, options) {
|
|
41
|
-
return (0, fp_js_1.unwrapAsync)((0,
|
|
39
|
+
return (0, fp_js_1.unwrapAsync)((0, threatHuntingGetTrackedScanThreatHunting_js_1.threatHuntingGetTrackedScanThreatHunting)(this, request, options));
|
|
42
40
|
}
|
|
43
41
|
/**
|
|
44
42
|
* CensEye: Retrieve value counts to discover pivots
|
package/sdk/threathunting.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"threathunting.js","sourceRoot":"","sources":["../src/sdk/threathunting.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,
|
|
1
|
+
{"version":3,"file":"threathunting.js","sourceRoot":"","sources":["../src/sdk/threathunting.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,kGAA4F;AAC5F,oIAA8H;AAC9H,sHAAgH;AAChH,sFAAgF;AAChF,4CAA2D;AAE3D,0CAA6C;AAE7C,MAAa,aAAc,SAAQ,mBAAS;IAC1C;;;;;OAKG;IACH,KAAK,CAAC,kCAAkC,CACtC,OACqE,EACrE,OAAwB;QAIxB,OAAO,IAAA,mBAAW,EAAC,IAAA,oGAA+C,EAChE,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,iBAAiB,CACrB,OAAwD,EACxD,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,kEAA8B,EAC/C,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,2BAA2B,CAC/B,OAAkD,EAClD,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,sFAAwC,EACzD,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,WAAW,CACf,OAAqD,EACrD,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,sDAAwB,EACzC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;CACF;AAvED,sCAuEC"}
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { SDKCore } from "../core.js";
|
|
6
|
+
import { encodeFormQuery, encodeJSON } 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
|
+
* Convert Legacy Search queries to Platform queries
|
|
30
|
+
*
|
|
31
|
+
* @remarks
|
|
32
|
+
* Convert Censys Search Language queries used in Legacy Search into Censys Query Language (CenQL) queries for use in the Platform.<br><br>Reference the [documentation on CenQL](https://docs.censys.com/docs/censys-query-language) for more information about query syntax.
|
|
33
|
+
*/
|
|
34
|
+
export function globalDataConvertLegacySearchQueries(
|
|
35
|
+
client: SDKCore,
|
|
36
|
+
request: operations.V3GlobaldataSearchConvertRequest,
|
|
37
|
+
options?: RequestOptions,
|
|
38
|
+
): APIPromise<
|
|
39
|
+
Result<
|
|
40
|
+
operations.V3GlobaldataSearchConvertResponse,
|
|
41
|
+
| errors.ErrorModel
|
|
42
|
+
| SDKBaseError
|
|
43
|
+
| ResponseValidationError
|
|
44
|
+
| ConnectionError
|
|
45
|
+
| RequestAbortedError
|
|
46
|
+
| RequestTimeoutError
|
|
47
|
+
| InvalidRequestError
|
|
48
|
+
| UnexpectedClientError
|
|
49
|
+
| SDKValidationError
|
|
50
|
+
>
|
|
51
|
+
> {
|
|
52
|
+
return new APIPromise($do(
|
|
53
|
+
client,
|
|
54
|
+
request,
|
|
55
|
+
options,
|
|
56
|
+
));
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
async function $do(
|
|
60
|
+
client: SDKCore,
|
|
61
|
+
request: operations.V3GlobaldataSearchConvertRequest,
|
|
62
|
+
options?: RequestOptions,
|
|
63
|
+
): Promise<
|
|
64
|
+
[
|
|
65
|
+
Result<
|
|
66
|
+
operations.V3GlobaldataSearchConvertResponse,
|
|
67
|
+
| errors.ErrorModel
|
|
68
|
+
| SDKBaseError
|
|
69
|
+
| ResponseValidationError
|
|
70
|
+
| ConnectionError
|
|
71
|
+
| RequestAbortedError
|
|
72
|
+
| RequestTimeoutError
|
|
73
|
+
| InvalidRequestError
|
|
74
|
+
| UnexpectedClientError
|
|
75
|
+
| SDKValidationError
|
|
76
|
+
>,
|
|
77
|
+
APICall,
|
|
78
|
+
]
|
|
79
|
+
> {
|
|
80
|
+
const parsed = safeParse(
|
|
81
|
+
request,
|
|
82
|
+
(value) =>
|
|
83
|
+
operations.V3GlobaldataSearchConvertRequest$outboundSchema.parse(value),
|
|
84
|
+
"Input validation failed",
|
|
85
|
+
);
|
|
86
|
+
if (!parsed.ok) {
|
|
87
|
+
return [parsed, { status: "invalid" }];
|
|
88
|
+
}
|
|
89
|
+
const payload = parsed.value;
|
|
90
|
+
const body = encodeJSON("body", payload.SearchConvertQueryInputBody, {
|
|
91
|
+
explode: true,
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
const path = pathToFunc("/v3/global/search/convert")();
|
|
95
|
+
|
|
96
|
+
const query = encodeFormQuery({
|
|
97
|
+
"organization_id": payload.organization_id
|
|
98
|
+
?? client._options.organizationId,
|
|
99
|
+
}, { explode: false });
|
|
100
|
+
|
|
101
|
+
const headers = new Headers(compactMap({
|
|
102
|
+
"Content-Type": "application/json",
|
|
103
|
+
Accept: "application/json",
|
|
104
|
+
}));
|
|
105
|
+
|
|
106
|
+
const secConfig = await extractSecurity(client._options.personalAccessToken);
|
|
107
|
+
const securityInput = secConfig == null
|
|
108
|
+
? {}
|
|
109
|
+
: { personalAccessToken: secConfig };
|
|
110
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
111
|
+
|
|
112
|
+
const context = {
|
|
113
|
+
options: client._options,
|
|
114
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
115
|
+
operationID: "v3-globaldata-search-convert",
|
|
116
|
+
oAuth2Scopes: [],
|
|
117
|
+
|
|
118
|
+
resolvedSecurity: requestSecurity,
|
|
119
|
+
|
|
120
|
+
securitySource: client._options.personalAccessToken,
|
|
121
|
+
retryConfig: options?.retries
|
|
122
|
+
|| client._options.retryConfig
|
|
123
|
+
|| { strategy: "none" },
|
|
124
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
const requestRes = client._createRequest(context, {
|
|
128
|
+
security: requestSecurity,
|
|
129
|
+
method: "POST",
|
|
130
|
+
baseURL: options?.serverURL,
|
|
131
|
+
path: path,
|
|
132
|
+
headers: headers,
|
|
133
|
+
query: query,
|
|
134
|
+
body: body,
|
|
135
|
+
userAgent: client._options.userAgent,
|
|
136
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
137
|
+
}, options);
|
|
138
|
+
if (!requestRes.ok) {
|
|
139
|
+
return [requestRes, { status: "invalid" }];
|
|
140
|
+
}
|
|
141
|
+
const req = requestRes.value;
|
|
142
|
+
|
|
143
|
+
const doResult = await client._do(req, {
|
|
144
|
+
context,
|
|
145
|
+
errorCodes: ["401", "4XX", "500", "5XX"],
|
|
146
|
+
retryConfig: context.retryConfig,
|
|
147
|
+
retryCodes: context.retryCodes,
|
|
148
|
+
});
|
|
149
|
+
if (!doResult.ok) {
|
|
150
|
+
return [doResult, { status: "request-error", request: req }];
|
|
151
|
+
}
|
|
152
|
+
const response = doResult.value;
|
|
153
|
+
|
|
154
|
+
const responseFields = {
|
|
155
|
+
HttpMeta: { Response: response, Request: req },
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
const [result] = await M.match<
|
|
159
|
+
operations.V3GlobaldataSearchConvertResponse,
|
|
160
|
+
| errors.ErrorModel
|
|
161
|
+
| SDKBaseError
|
|
162
|
+
| ResponseValidationError
|
|
163
|
+
| ConnectionError
|
|
164
|
+
| RequestAbortedError
|
|
165
|
+
| RequestTimeoutError
|
|
166
|
+
| InvalidRequestError
|
|
167
|
+
| UnexpectedClientError
|
|
168
|
+
| SDKValidationError
|
|
169
|
+
>(
|
|
170
|
+
M.json(200, operations.V3GlobaldataSearchConvertResponse$inboundSchema, {
|
|
171
|
+
hdrs: true,
|
|
172
|
+
key: "Result",
|
|
173
|
+
}),
|
|
174
|
+
M.jsonErr(401, errors.ErrorModel$inboundSchema, {
|
|
175
|
+
ctype: "application/problem+json",
|
|
176
|
+
}),
|
|
177
|
+
M.jsonErr(500, errors.ErrorModel$inboundSchema, {
|
|
178
|
+
ctype: "application/problem+json",
|
|
179
|
+
}),
|
|
180
|
+
M.fail("4XX"),
|
|
181
|
+
M.fail("5XX"),
|
|
182
|
+
)(response, req, { extraFields: responseFields });
|
|
183
|
+
if (!result.ok) {
|
|
184
|
+
return [result, { status: "complete", request: req, response }];
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
return [result, { status: "complete", request: req, response }];
|
|
188
|
+
}
|
|
@@ -26,10 +26,10 @@ import { APICall, APIPromise } from "../types/async.js";
|
|
|
26
26
|
import { Result } from "../types/fp.js";
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
|
-
*
|
|
29
|
+
* Live Rescan: Initiate a new rescan
|
|
30
30
|
*
|
|
31
31
|
* @remarks
|
|
32
|
-
*
|
|
32
|
+
* Initiate a rescan for a known host service at a specific IP and port (`ip:port`) or hostname and port (`hostname:port`). This is equivalent to the [Live Rescan](https://docs.censys.com/docs/platform-live-rescan#/) feature available in the UI, but you can also target web properties in addition to hosts.<br><br>The scan may take several minutes to complete. The response will contain a scan ID that you can use to [monitor the scan's status](https://docs.censys.com/reference/v3-globaldata-scans-get#/). After the scan completes, perform a lookup on the target asset to retrieve detailed scan information.<br><br>This endpoint is available to all Enterprise customers. It costs 10 credits to execute.
|
|
33
33
|
*/
|
|
34
34
|
export function globalDataCreateTrackedScan(
|
|
35
35
|
client: SDKCore,
|
package/src/funcs/{globalDataGetHostObservationsWithCertificate.ts → globalDataGetCertificateRaw.ts}
RENAMED
|
@@ -26,18 +26,18 @@ import { APICall, APIPromise } from "../types/async.js";
|
|
|
26
26
|
import { Result } from "../types/fp.js";
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
|
-
* Get
|
|
29
|
+
* Get a certificate in PEM format
|
|
30
30
|
*
|
|
31
31
|
* @remarks
|
|
32
|
-
* Retrieve
|
|
32
|
+
* Retrieve the raw PEM-encoded format of a certificate. A certificate ID is its SHA-256 fingerprint in the Censys dataset.
|
|
33
33
|
*/
|
|
34
|
-
export function
|
|
34
|
+
export function globalDataGetCertificateRaw(
|
|
35
35
|
client: SDKCore,
|
|
36
|
-
request: operations.
|
|
36
|
+
request: operations.V3GlobaldataAssetCertificateRawRequest,
|
|
37
37
|
options?: RequestOptions,
|
|
38
38
|
): APIPromise<
|
|
39
39
|
Result<
|
|
40
|
-
operations.
|
|
40
|
+
operations.V3GlobaldataAssetCertificateRawResponse,
|
|
41
41
|
| errors.ErrorModel
|
|
42
42
|
| SDKBaseError
|
|
43
43
|
| ResponseValidationError
|
|
@@ -58,12 +58,12 @@ export function globalDataGetHostObservationsWithCertificate(
|
|
|
58
58
|
|
|
59
59
|
async function $do(
|
|
60
60
|
client: SDKCore,
|
|
61
|
-
request: operations.
|
|
61
|
+
request: operations.V3GlobaldataAssetCertificateRawRequest,
|
|
62
62
|
options?: RequestOptions,
|
|
63
63
|
): Promise<
|
|
64
64
|
[
|
|
65
65
|
Result<
|
|
66
|
-
operations.
|
|
66
|
+
operations.V3GlobaldataAssetCertificateRawResponse,
|
|
67
67
|
| errors.ErrorModel
|
|
68
68
|
| SDKBaseError
|
|
69
69
|
| ResponseValidationError
|
|
@@ -80,9 +80,9 @@ async function $do(
|
|
|
80
80
|
const parsed = safeParse(
|
|
81
81
|
request,
|
|
82
82
|
(value) =>
|
|
83
|
-
operations
|
|
84
|
-
|
|
85
|
-
|
|
83
|
+
operations.V3GlobaldataAssetCertificateRawRequest$outboundSchema.parse(
|
|
84
|
+
value,
|
|
85
|
+
),
|
|
86
86
|
"Input validation failed",
|
|
87
87
|
);
|
|
88
88
|
if (!parsed.ok) {
|
|
@@ -98,23 +98,17 @@ async function $do(
|
|
|
98
98
|
}),
|
|
99
99
|
};
|
|
100
100
|
|
|
101
|
-
const path = pathToFunc(
|
|
102
|
-
|
|
103
|
-
)
|
|
101
|
+
const path = pathToFunc("/v3/global/asset/certificate/{certificate_id}/raw")(
|
|
102
|
+
pathParams,
|
|
103
|
+
);
|
|
104
104
|
|
|
105
105
|
const query = encodeFormQuery({
|
|
106
|
-
"end_time": payload.end_time,
|
|
107
106
|
"organization_id": payload.organization_id
|
|
108
107
|
?? client._options.organizationId,
|
|
109
|
-
"page_size": payload.page_size,
|
|
110
|
-
"page_token": payload.page_token,
|
|
111
|
-
"port": payload.port,
|
|
112
|
-
"protocol": payload.protocol,
|
|
113
|
-
"start_time": payload.start_time,
|
|
114
108
|
}, { explode: false });
|
|
115
109
|
|
|
116
110
|
const headers = new Headers(compactMap({
|
|
117
|
-
Accept: "application/
|
|
111
|
+
Accept: "application/x-pem-file",
|
|
118
112
|
}));
|
|
119
113
|
|
|
120
114
|
const secConfig = await extractSecurity(client._options.personalAccessToken);
|
|
@@ -126,7 +120,7 @@ async function $do(
|
|
|
126
120
|
const context = {
|
|
127
121
|
options: client._options,
|
|
128
122
|
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
129
|
-
operationID: "v3-globaldata-
|
|
123
|
+
operationID: "v3-globaldata-asset-certificate-raw",
|
|
130
124
|
oAuth2Scopes: [],
|
|
131
125
|
|
|
132
126
|
resolvedSecurity: requestSecurity,
|
|
@@ -170,7 +164,7 @@ async function $do(
|
|
|
170
164
|
};
|
|
171
165
|
|
|
172
166
|
const [result] = await M.match<
|
|
173
|
-
operations.
|
|
167
|
+
operations.V3GlobaldataAssetCertificateRawResponse,
|
|
174
168
|
| errors.ErrorModel
|
|
175
169
|
| SDKBaseError
|
|
176
170
|
| ResponseValidationError
|
|
@@ -181,11 +175,10 @@ async function $do(
|
|
|
181
175
|
| UnexpectedClientError
|
|
182
176
|
| SDKValidationError
|
|
183
177
|
>(
|
|
184
|
-
M.
|
|
178
|
+
M.stream(
|
|
185
179
|
200,
|
|
186
|
-
operations
|
|
187
|
-
|
|
188
|
-
{ hdrs: true, key: "Result" },
|
|
180
|
+
operations.V3GlobaldataAssetCertificateRawResponse$inboundSchema,
|
|
181
|
+
{ ctype: "application/x-pem-file", hdrs: true, key: "Result" },
|
|
189
182
|
),
|
|
190
183
|
M.jsonErr([401, 403], errors.ErrorModel$inboundSchema, {
|
|
191
184
|
ctype: "application/problem+json",
|