@censys/platform-sdk 0.10.3 → 0.10.4

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.
Files changed (42) hide show
  1. package/README.md +21 -2
  2. package/docs/sdks/adversaryinvestigation/README.md +625 -0
  3. package/docs/sdks/threathunting/README.md +8 -8
  4. package/funcs/threatHuntingCreateCenseyeJob.d.ts +1 -1
  5. package/funcs/threatHuntingCreateCenseyeJob.js +1 -1
  6. package/funcs/threatHuntingCreateTrackedScan.d.ts +1 -1
  7. package/funcs/threatHuntingCreateTrackedScan.js +1 -1
  8. package/funcs/threatHuntingGetCenseyeJob.d.ts +1 -1
  9. package/funcs/threatHuntingGetCenseyeJob.js +1 -1
  10. package/funcs/threatHuntingGetCenseyeJobResults.d.ts +1 -1
  11. package/funcs/threatHuntingGetCenseyeJobResults.js +1 -1
  12. package/funcs/threatHuntingGetHostObservationsWithCertificate.d.ts +1 -1
  13. package/funcs/threatHuntingGetHostObservationsWithCertificate.js +1 -1
  14. package/funcs/threatHuntingListThreats.d.ts +1 -1
  15. package/funcs/threatHuntingListThreats.js +1 -1
  16. package/funcs/threatHuntingValueCounts.d.ts +1 -1
  17. package/funcs/threatHuntingValueCounts.js +1 -1
  18. package/jsr.json +1 -1
  19. package/lib/config.d.ts +3 -3
  20. package/lib/config.js +3 -3
  21. package/package.json +1 -1
  22. package/sdk/adversaryinvestigation.d.ts +54 -0
  23. package/sdk/adversaryinvestigation.d.ts.map +1 -0
  24. package/sdk/adversaryinvestigation.js +82 -0
  25. package/sdk/adversaryinvestigation.js.map +1 -0
  26. package/sdk/sdk.d.ts +3 -0
  27. package/sdk/sdk.d.ts.map +1 -1
  28. package/sdk/sdk.js +4 -0
  29. package/sdk/sdk.js.map +1 -1
  30. package/sdk/threathunting.d.ts +7 -7
  31. package/sdk/threathunting.js +7 -7
  32. package/src/funcs/threatHuntingCreateCenseyeJob.ts +1 -1
  33. package/src/funcs/threatHuntingCreateTrackedScan.ts +1 -1
  34. package/src/funcs/threatHuntingGetCenseyeJob.ts +1 -1
  35. package/src/funcs/threatHuntingGetCenseyeJobResults.ts +1 -1
  36. package/src/funcs/threatHuntingGetHostObservationsWithCertificate.ts +1 -1
  37. package/src/funcs/threatHuntingListThreats.ts +1 -1
  38. package/src/funcs/threatHuntingValueCounts.ts +1 -1
  39. package/src/lib/config.ts +3 -3
  40. package/src/sdk/adversaryinvestigation.ts +138 -0
  41. package/src/sdk/sdk.ts +8 -0
  42. package/src/sdk/threathunting.ts +7 -7
@@ -19,7 +19,7 @@ class ThreatHunting extends sdks_js_1.ClientSDK {
19
19
  * CensEye: Create a pivot analysis job
20
20
  *
21
21
  * @remarks
22
- * Create an asynchronous CensEye pivot analysis job for a host, web property, or certificate. The job extracts [default pivot fields](https://docs.censys.com/docs/platform-threat-hunting-use-censeye-to-build-detections#default-pivot-fields) from the target asset and counts matching documents for each field-value pair. Poll the job status endpoint to track progress, then retrieve results when complete.<br><br>To use this endpoint, your organization must have access to the Threat Hunting module.<br><br>This endpoint costs 44 credits to execute for a host, 28 credits to execute for a web property, and 7 credits to execute for a certificate.
22
+ * Create an asynchronous CensEye pivot analysis job for a host, web property, or certificate. The job extracts default pivot fields from the target asset and counts matching documents for each field-value pair. Poll the job status endpoint to track progress, then retrieve results when complete.<br><br>To use this endpoint, your organization must have access to the Adversary Investigation module.
23
23
  */
24
24
  async createCenseyeJob(request, options) {
25
25
  return (0, fp_js_1.unwrapAsync)((0, threatHuntingCreateCenseyeJob_js_1.threatHuntingCreateCenseyeJob)(this, request, options));
@@ -28,7 +28,7 @@ class ThreatHunting extends sdks_js_1.ClientSDK {
28
28
  * CensEye: Get job status
29
29
  *
30
30
  * @remarks
31
- * Retrieve the current status of a CensEye pivot analysis job. Use this to poll for completion before fetching results.<br><br>To use this endpoint, your organization must have access to the Threat Hunting module.
31
+ * Retrieve the current status of a CensEye pivot analysis job. Use this to poll for completion before fetching results.<br><br>To use this endpoint, your organization must have access to the Adversary Investigation module.
32
32
  */
33
33
  async getCenseyeJob(request, options) {
34
34
  return (0, fp_js_1.unwrapAsync)((0, threatHuntingGetCenseyeJob_js_1.threatHuntingGetCenseyeJob)(this, request, options));
@@ -37,7 +37,7 @@ class ThreatHunting extends sdks_js_1.ClientSDK {
37
37
  * CensEye: Get job results
38
38
  *
39
39
  * @remarks
40
- * Retrieve the results of a completed CensEye pivot analysis job. Each result contains a count and the field-value pairs that were analyzed. Results may be empty if the job is still running.<br><br>Results are paginated. Use the `next_page_token` from the response to fetch subsequent pages.<br><br>To use this endpoint, your organization must have access to the Threat Hunting module.
40
+ * Retrieve the results of a completed CensEye pivot analysis job. Each result contains a count and the field-value pairs that were analyzed. Results may be empty if the job is still running.<br><br>Results are paginated. Use the `next_page_token` from the response to fetch subsequent pages.<br><br>To use this endpoint, your organization must have access to the Adversary Investigation module.
41
41
  */
42
42
  async getCenseyeJobResults(request, options) {
43
43
  return (0, fp_js_1.unwrapAsync)((0, threatHuntingGetCenseyeJobResults_js_1.threatHuntingGetCenseyeJobResults)(this, request, options));
@@ -46,7 +46,7 @@ class ThreatHunting extends sdks_js_1.ClientSDK {
46
46
  * Get host history for a certificate
47
47
  *
48
48
  * @remarks
49
- * 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.
49
+ * 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 Adversary Investigation 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 Adversary Investigation module. It costs 5 credits per page of results.
50
50
  */
51
51
  async getHostObservationsWithCertificate(request, options) {
52
52
  return (0, fp_js_1.unwrapAsync)((0, threatHuntingGetHostObservationsWithCertificate_js_1.threatHuntingGetHostObservationsWithCertificate)(this, request, options));
@@ -55,7 +55,7 @@ class ThreatHunting extends sdks_js_1.ClientSDK {
55
55
  * Live Discovery: Initiate a new scan
56
56
  *
57
57
  * @remarks
58
- * 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.
58
+ * 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 Adversary Investigation module. It costs 15 credits to execute this endpoint.
59
59
  */
60
60
  async createTrackedScan(request, options) {
61
61
  return (0, fp_js_1.unwrapAsync)((0, threatHuntingCreateTrackedScan_js_1.threatHuntingCreateTrackedScan)(this, request, options));
@@ -73,7 +73,7 @@ class ThreatHunting extends sdks_js_1.ClientSDK {
73
73
  * List active threats
74
74
  *
75
75
  * @remarks
76
- * 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.
76
+ * 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 Adversary Investigation module.
77
77
  */
78
78
  async listThreats(request, options) {
79
79
  return (0, fp_js_1.unwrapAsync)((0, threatHuntingListThreats_js_1.threatHuntingListThreats)(this, request, options));
@@ -82,7 +82,7 @@ class ThreatHunting extends sdks_js_1.ClientSDK {
82
82
  * CensEye: Retrieve value counts to discover pivots
83
83
  *
84
84
  * @remarks
85
- * Get counts of web assets for specific field-value pairs and combinations of field-value pairs. This is similar to the [CensEye functionality](https://docs.censys.com/docs/platform-threat-hunting-use-censeye-to-build-detections#/) available in the Platform web UI, but it allows you to define specific fields of interest rather than the [default fields](https://docs.censys.com/docs/platform-threat-hunting-use-censeye-to-build-detections#default-pivot-fields) leveraged by the tool in the UI.<br><br>Each array can only target fields within the same nested object and may contain at most 5 field-value pairs. For example, you can combine `host.services.port=80` and `host.services.protocol=SSH` in the same array, but you cannot combine `host.services.port=80` and `host.location.country="United States"` in the same array. You can input multiple arrays of objects in each API call.<br><br>To use this endpoint, your organization must have access to the Threat Hunting Module. This endpoint costs 1 credit per count condition (array of objects) included in the API call.
85
+ * Get counts of web assets for specific field-value pairs and combinations of field-value pairs. This is similar to the [CensEye functionality](https://docs.censys.com/docs/platform-threat-hunting-use-censeye-to-build-detections#/) available in the Platform web UI, but it allows you to define specific fields of interest rather than the [default fields](https://docs.censys.com/docs/platform-threat-hunting-use-censeye-to-build-detections#default-pivot-fields) leveraged by the tool in the UI.<br><br>Each array can only target fields within the same nested object and may contain at most 5 field-value pairs. For example, you can combine `host.services.port=80` and `host.services.protocol=SSH` in the same array, but you cannot combine `host.services.port=80` and `host.location.country="United States"` in the same array. You can input multiple arrays of objects in each API call.<br><br>To use this endpoint, your organization must have access to the Adversary Investigation module. This endpoint costs 1 credit per count condition (array of objects) included in the API call.
86
86
  */
87
87
  async valueCounts(request, options) {
88
88
  return (0, fp_js_1.unwrapAsync)((0, threatHuntingValueCounts_js_1.threatHuntingValueCounts)(this, request, options));
@@ -29,7 +29,7 @@ import { Result } from "../types/fp.js";
29
29
  * CensEye: Create a pivot analysis job
30
30
  *
31
31
  * @remarks
32
- * Create an asynchronous CensEye pivot analysis job for a host, web property, or certificate. The job extracts [default pivot fields](https://docs.censys.com/docs/platform-threat-hunting-use-censeye-to-build-detections#default-pivot-fields) from the target asset and counts matching documents for each field-value pair. Poll the job status endpoint to track progress, then retrieve results when complete.<br><br>To use this endpoint, your organization must have access to the Threat Hunting module.<br><br>This endpoint costs 44 credits to execute for a host, 28 credits to execute for a web property, and 7 credits to execute for a certificate.
32
+ * Create an asynchronous CensEye pivot analysis job for a host, web property, or certificate. The job extracts default pivot fields from the target asset and counts matching documents for each field-value pair. Poll the job status endpoint to track progress, then retrieve results when complete.<br><br>To use this endpoint, your organization must have access to the Adversary Investigation module.
33
33
  */
34
34
  export function threatHuntingCreateCenseyeJob(
35
35
  client: SDKCore,
@@ -29,7 +29,7 @@ import { Result } from "../types/fp.js";
29
29
  * Live Discovery: Initiate a new scan
30
30
  *
31
31
  * @remarks
32
- * 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.
32
+ * 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 Adversary Investigation module. It costs 15 credits to execute this endpoint.
33
33
  */
34
34
  export function threatHuntingCreateTrackedScan(
35
35
  client: SDKCore,
@@ -29,7 +29,7 @@ import { Result } from "../types/fp.js";
29
29
  * CensEye: Get job status
30
30
  *
31
31
  * @remarks
32
- * Retrieve the current status of a CensEye pivot analysis job. Use this to poll for completion before fetching results.<br><br>To use this endpoint, your organization must have access to the Threat Hunting module.
32
+ * Retrieve the current status of a CensEye pivot analysis job. Use this to poll for completion before fetching results.<br><br>To use this endpoint, your organization must have access to the Adversary Investigation module.
33
33
  */
34
34
  export function threatHuntingGetCenseyeJob(
35
35
  client: SDKCore,
@@ -29,7 +29,7 @@ import { Result } from "../types/fp.js";
29
29
  * CensEye: Get job results
30
30
  *
31
31
  * @remarks
32
- * Retrieve the results of a completed CensEye pivot analysis job. Each result contains a count and the field-value pairs that were analyzed. Results may be empty if the job is still running.<br><br>Results are paginated. Use the `next_page_token` from the response to fetch subsequent pages.<br><br>To use this endpoint, your organization must have access to the Threat Hunting module.
32
+ * Retrieve the results of a completed CensEye pivot analysis job. Each result contains a count and the field-value pairs that were analyzed. Results may be empty if the job is still running.<br><br>Results are paginated. Use the `next_page_token` from the response to fetch subsequent pages.<br><br>To use this endpoint, your organization must have access to the Adversary Investigation module.
33
33
  */
34
34
  export function threatHuntingGetCenseyeJobResults(
35
35
  client: SDKCore,
@@ -29,7 +29,7 @@ import { Result } from "../types/fp.js";
29
29
  * Get host history for a certificate
30
30
  *
31
31
  * @remarks
32
- * 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.
32
+ * 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 Adversary Investigation 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 Adversary Investigation module. It costs 5 credits per page of results.
33
33
  */
34
34
  export function threatHuntingGetHostObservationsWithCertificate(
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).<br><br>This endpoint is available to organizations that have access to the Threat Hunting module.
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 Adversary Investigation module.
33
33
  */
34
34
  export function threatHuntingListThreats(
35
35
  client: SDKCore,
@@ -29,7 +29,7 @@ import { Result } from "../types/fp.js";
29
29
  * CensEye: Retrieve value counts to discover pivots
30
30
  *
31
31
  * @remarks
32
- * Get counts of web assets for specific field-value pairs and combinations of field-value pairs. This is similar to the [CensEye functionality](https://docs.censys.com/docs/platform-threat-hunting-use-censeye-to-build-detections#/) available in the Platform web UI, but it allows you to define specific fields of interest rather than the [default fields](https://docs.censys.com/docs/platform-threat-hunting-use-censeye-to-build-detections#default-pivot-fields) leveraged by the tool in the UI.<br><br>Each array can only target fields within the same nested object and may contain at most 5 field-value pairs. For example, you can combine `host.services.port=80` and `host.services.protocol=SSH` in the same array, but you cannot combine `host.services.port=80` and `host.location.country="United States"` in the same array. You can input multiple arrays of objects in each API call.<br><br>To use this endpoint, your organization must have access to the Threat Hunting Module. This endpoint costs 1 credit per count condition (array of objects) included in the API call.
32
+ * Get counts of web assets for specific field-value pairs and combinations of field-value pairs. This is similar to the [CensEye functionality](https://docs.censys.com/docs/platform-threat-hunting-use-censeye-to-build-detections#/) available in the Platform web UI, but it allows you to define specific fields of interest rather than the [default fields](https://docs.censys.com/docs/platform-threat-hunting-use-censeye-to-build-detections#default-pivot-fields) leveraged by the tool in the UI.<br><br>Each array can only target fields within the same nested object and may contain at most 5 field-value pairs. For example, you can combine `host.services.port=80` and `host.services.protocol=SSH` in the same array, but you cannot combine `host.services.port=80` and `host.location.country="United States"` in the same array. You can input multiple arrays of objects in each API call.<br><br>To use this endpoint, your organization must have access to the Adversary Investigation module. This endpoint costs 1 credit per count condition (array of objects) included in the API call.
33
33
  */
34
34
  export function threatHuntingValueCounts(
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.88",
69
- sdkVersion: "0.10.3",
68
+ openapiDocVersion: "1.0.89",
69
+ sdkVersion: "0.10.4",
70
70
  genVersion: "2.879.1",
71
71
  userAgent:
72
- "speakeasy-sdk/typescript 0.10.3 2.879.1 1.0.88 @censys/platform-sdk",
72
+ "speakeasy-sdk/typescript 0.10.4 2.879.1 1.0.89 @censys/platform-sdk",
73
73
  } as const;
@@ -0,0 +1,138 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { threatHuntingCreateCenseyeJob } from "../funcs/threatHuntingCreateCenseyeJob.js";
6
+ import { threatHuntingCreateTrackedScan } from "../funcs/threatHuntingCreateTrackedScan.js";
7
+ import { threatHuntingGetCenseyeJob } from "../funcs/threatHuntingGetCenseyeJob.js";
8
+ import { threatHuntingGetCenseyeJobResults } from "../funcs/threatHuntingGetCenseyeJobResults.js";
9
+ import { threatHuntingGetHostObservationsWithCertificate } from "../funcs/threatHuntingGetHostObservationsWithCertificate.js";
10
+ import { threatHuntingListThreats } from "../funcs/threatHuntingListThreats.js";
11
+ import { threatHuntingValueCounts } from "../funcs/threatHuntingValueCounts.js";
12
+ import { ClientSDK, RequestOptions } from "../lib/sdks.js";
13
+ import * as operations from "../models/operations/index.js";
14
+ import { unwrapAsync } from "../types/fp.js";
15
+
16
+ export class AdversaryInvestigation extends ClientSDK {
17
+ /**
18
+ * CensEye: Create a pivot analysis job
19
+ *
20
+ * @remarks
21
+ * Create an asynchronous CensEye pivot analysis job for a host, web property, or certificate. The job extracts default pivot fields from the target asset and counts matching documents for each field-value pair. Poll the job status endpoint to track progress, then retrieve results when complete.<br><br>To use this endpoint, your organization must have access to the Adversary Investigation module.
22
+ */
23
+ async createCenseyeJob(
24
+ request: operations.V3ThreathuntingCenseyeJobsCreateRequest,
25
+ options?: RequestOptions,
26
+ ): Promise<operations.V3ThreathuntingCenseyeJobsCreateResponse> {
27
+ return unwrapAsync(threatHuntingCreateCenseyeJob(
28
+ this,
29
+ request,
30
+ options,
31
+ ));
32
+ }
33
+
34
+ /**
35
+ * CensEye: Get job status
36
+ *
37
+ * @remarks
38
+ * Retrieve the current status of a CensEye pivot analysis job. Use this to poll for completion before fetching results.<br><br>To use this endpoint, your organization must have access to the Adversary Investigation module.
39
+ */
40
+ async getCenseyeJob(
41
+ request: operations.V3ThreathuntingCenseyeJobsGetRequest,
42
+ options?: RequestOptions,
43
+ ): Promise<operations.V3ThreathuntingCenseyeJobsGetResponse> {
44
+ return unwrapAsync(threatHuntingGetCenseyeJob(
45
+ this,
46
+ request,
47
+ options,
48
+ ));
49
+ }
50
+
51
+ /**
52
+ * CensEye: Get job results
53
+ *
54
+ * @remarks
55
+ * Retrieve the results of a completed CensEye pivot analysis job. Each result contains a count and the field-value pairs that were analyzed. Results may be empty if the job is still running.<br><br>Results are paginated. Use the `next_page_token` from the response to fetch subsequent pages.<br><br>To use this endpoint, your organization must have access to the Adversary Investigation module.
56
+ */
57
+ async getCenseyeJobResults(
58
+ request: operations.V3ThreathuntingCenseyeJobResultsRequest,
59
+ options?: RequestOptions,
60
+ ): Promise<operations.V3ThreathuntingCenseyeJobResultsResponse> {
61
+ return unwrapAsync(threatHuntingGetCenseyeJobResults(
62
+ this,
63
+ request,
64
+ options,
65
+ ));
66
+ }
67
+
68
+ /**
69
+ * Get host history for a certificate
70
+ *
71
+ * @remarks
72
+ * 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 Adversary Investigation 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 Adversary Investigation module. It costs 5 credits per page of results.
73
+ */
74
+ async getHostObservationsWithCertificate(
75
+ request:
76
+ operations.V3ThreathuntingGetHostObservationsWithCertificateRequest,
77
+ options?: RequestOptions,
78
+ ): Promise<
79
+ operations.V3ThreathuntingGetHostObservationsWithCertificateResponse
80
+ > {
81
+ return unwrapAsync(threatHuntingGetHostObservationsWithCertificate(
82
+ this,
83
+ request,
84
+ options,
85
+ ));
86
+ }
87
+
88
+ /**
89
+ * Live Discovery: Initiate a new scan
90
+ *
91
+ * @remarks
92
+ * 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 Adversary Investigation module. It costs 15 credits to execute this endpoint.
93
+ */
94
+ async createTrackedScan(
95
+ request: operations.V3ThreathuntingScansDiscoveryRequest,
96
+ options?: RequestOptions,
97
+ ): Promise<operations.V3ThreathuntingScansDiscoveryResponse> {
98
+ return unwrapAsync(threatHuntingCreateTrackedScan(
99
+ this,
100
+ request,
101
+ options,
102
+ ));
103
+ }
104
+
105
+ /**
106
+ * List active threats
107
+ *
108
+ * @remarks
109
+ * 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 Adversary Investigation module.
110
+ */
111
+ async listThreats(
112
+ request: operations.V3ThreathuntingThreatsListRequest,
113
+ options?: RequestOptions,
114
+ ): Promise<operations.V3ThreathuntingThreatsListResponse> {
115
+ return unwrapAsync(threatHuntingListThreats(
116
+ this,
117
+ request,
118
+ options,
119
+ ));
120
+ }
121
+
122
+ /**
123
+ * CensEye: Retrieve value counts to discover pivots
124
+ *
125
+ * @remarks
126
+ * Get counts of web assets for specific field-value pairs and combinations of field-value pairs. This is similar to the [CensEye functionality](https://docs.censys.com/docs/platform-threat-hunting-use-censeye-to-build-detections#/) available in the Platform web UI, but it allows you to define specific fields of interest rather than the [default fields](https://docs.censys.com/docs/platform-threat-hunting-use-censeye-to-build-detections#default-pivot-fields) leveraged by the tool in the UI.<br><br>Each array can only target fields within the same nested object and may contain at most 5 field-value pairs. For example, you can combine `host.services.port=80` and `host.services.protocol=SSH` in the same array, but you cannot combine `host.services.port=80` and `host.location.country="United States"` in the same array. You can input multiple arrays of objects in each API call.<br><br>To use this endpoint, your organization must have access to the Adversary Investigation module. This endpoint costs 1 credit per count condition (array of objects) included in the API call.
127
+ */
128
+ async valueCounts(
129
+ request: operations.V3ThreathuntingValueCountsRequest,
130
+ options?: RequestOptions,
131
+ ): Promise<operations.V3ThreathuntingValueCountsResponse> {
132
+ return unwrapAsync(threatHuntingValueCounts(
133
+ this,
134
+ request,
135
+ options,
136
+ ));
137
+ }
138
+ }
package/src/sdk/sdk.ts CHANGED
@@ -4,6 +4,7 @@
4
4
 
5
5
  import { ClientSDK } from "../lib/sdks.js";
6
6
  import { AccountManagement } from "./accountmanagement.js";
7
+ import { AdversaryInvestigation } from "./adversaryinvestigation.js";
7
8
  import { Collections } from "./collections.js";
8
9
  import { GlobalData } from "./globaldata.js";
9
10
  import { ThreatHunting } from "./threathunting.js";
@@ -28,4 +29,11 @@ export class SDK extends ClientSDK {
28
29
  get threatHunting(): ThreatHunting {
29
30
  return (this._threatHunting ??= new ThreatHunting(this._options));
30
31
  }
32
+
33
+ private _adversaryInvestigation?: AdversaryInvestigation;
34
+ get adversaryInvestigation(): AdversaryInvestigation {
35
+ return (this._adversaryInvestigation ??= new AdversaryInvestigation(
36
+ this._options,
37
+ ));
38
+ }
31
39
  }
@@ -19,7 +19,7 @@ export class ThreatHunting extends ClientSDK {
19
19
  * CensEye: Create a pivot analysis job
20
20
  *
21
21
  * @remarks
22
- * Create an asynchronous CensEye pivot analysis job for a host, web property, or certificate. The job extracts [default pivot fields](https://docs.censys.com/docs/platform-threat-hunting-use-censeye-to-build-detections#default-pivot-fields) from the target asset and counts matching documents for each field-value pair. Poll the job status endpoint to track progress, then retrieve results when complete.<br><br>To use this endpoint, your organization must have access to the Threat Hunting module.<br><br>This endpoint costs 44 credits to execute for a host, 28 credits to execute for a web property, and 7 credits to execute for a certificate.
22
+ * Create an asynchronous CensEye pivot analysis job for a host, web property, or certificate. The job extracts default pivot fields from the target asset and counts matching documents for each field-value pair. Poll the job status endpoint to track progress, then retrieve results when complete.<br><br>To use this endpoint, your organization must have access to the Adversary Investigation module.
23
23
  */
24
24
  async createCenseyeJob(
25
25
  request: operations.V3ThreathuntingCenseyeJobsCreateRequest,
@@ -36,7 +36,7 @@ export class ThreatHunting extends ClientSDK {
36
36
  * CensEye: Get job status
37
37
  *
38
38
  * @remarks
39
- * Retrieve the current status of a CensEye pivot analysis job. Use this to poll for completion before fetching results.<br><br>To use this endpoint, your organization must have access to the Threat Hunting module.
39
+ * Retrieve the current status of a CensEye pivot analysis job. Use this to poll for completion before fetching results.<br><br>To use this endpoint, your organization must have access to the Adversary Investigation module.
40
40
  */
41
41
  async getCenseyeJob(
42
42
  request: operations.V3ThreathuntingCenseyeJobsGetRequest,
@@ -53,7 +53,7 @@ export class ThreatHunting extends ClientSDK {
53
53
  * CensEye: Get job results
54
54
  *
55
55
  * @remarks
56
- * Retrieve the results of a completed CensEye pivot analysis job. Each result contains a count and the field-value pairs that were analyzed. Results may be empty if the job is still running.<br><br>Results are paginated. Use the `next_page_token` from the response to fetch subsequent pages.<br><br>To use this endpoint, your organization must have access to the Threat Hunting module.
56
+ * Retrieve the results of a completed CensEye pivot analysis job. Each result contains a count and the field-value pairs that were analyzed. Results may be empty if the job is still running.<br><br>Results are paginated. Use the `next_page_token` from the response to fetch subsequent pages.<br><br>To use this endpoint, your organization must have access to the Adversary Investigation module.
57
57
  */
58
58
  async getCenseyeJobResults(
59
59
  request: operations.V3ThreathuntingCenseyeJobResultsRequest,
@@ -70,7 +70,7 @@ export class ThreatHunting extends ClientSDK {
70
70
  * Get host history for a certificate
71
71
  *
72
72
  * @remarks
73
- * 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.
73
+ * 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 Adversary Investigation 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 Adversary Investigation module. It costs 5 credits per page of results.
74
74
  */
75
75
  async getHostObservationsWithCertificate(
76
76
  request:
@@ -90,7 +90,7 @@ export class ThreatHunting extends ClientSDK {
90
90
  * Live Discovery: Initiate a new scan
91
91
  *
92
92
  * @remarks
93
- * 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.
93
+ * 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 Adversary Investigation module. It costs 15 credits to execute this endpoint.
94
94
  */
95
95
  async createTrackedScan(
96
96
  request: operations.V3ThreathuntingScansDiscoveryRequest,
@@ -124,7 +124,7 @@ export class ThreatHunting extends ClientSDK {
124
124
  * List active threats
125
125
  *
126
126
  * @remarks
127
- * 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.
127
+ * 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 Adversary Investigation module.
128
128
  */
129
129
  async listThreats(
130
130
  request: operations.V3ThreathuntingThreatsListRequest,
@@ -141,7 +141,7 @@ export class ThreatHunting extends ClientSDK {
141
141
  * CensEye: Retrieve value counts to discover pivots
142
142
  *
143
143
  * @remarks
144
- * Get counts of web assets for specific field-value pairs and combinations of field-value pairs. This is similar to the [CensEye functionality](https://docs.censys.com/docs/platform-threat-hunting-use-censeye-to-build-detections#/) available in the Platform web UI, but it allows you to define specific fields of interest rather than the [default fields](https://docs.censys.com/docs/platform-threat-hunting-use-censeye-to-build-detections#default-pivot-fields) leveraged by the tool in the UI.<br><br>Each array can only target fields within the same nested object and may contain at most 5 field-value pairs. For example, you can combine `host.services.port=80` and `host.services.protocol=SSH` in the same array, but you cannot combine `host.services.port=80` and `host.location.country="United States"` in the same array. You can input multiple arrays of objects in each API call.<br><br>To use this endpoint, your organization must have access to the Threat Hunting Module. This endpoint costs 1 credit per count condition (array of objects) included in the API call.
144
+ * Get counts of web assets for specific field-value pairs and combinations of field-value pairs. This is similar to the [CensEye functionality](https://docs.censys.com/docs/platform-threat-hunting-use-censeye-to-build-detections#/) available in the Platform web UI, but it allows you to define specific fields of interest rather than the [default fields](https://docs.censys.com/docs/platform-threat-hunting-use-censeye-to-build-detections#default-pivot-fields) leveraged by the tool in the UI.<br><br>Each array can only target fields within the same nested object and may contain at most 5 field-value pairs. For example, you can combine `host.services.port=80` and `host.services.protocol=SSH` in the same array, but you cannot combine `host.services.port=80` and `host.location.country="United States"` in the same array. You can input multiple arrays of objects in each API call.<br><br>To use this endpoint, your organization must have access to the Adversary Investigation module. This endpoint costs 1 credit per count condition (array of objects) included in the API call.
145
145
  */
146
146
  async valueCounts(
147
147
  request: operations.V3ThreathuntingValueCountsRequest,