@censys/platform-sdk 0.12.12 → 0.12.14
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/docs/sdks/adversaryinvestigation/README.md +8 -8
- package/docs/sdks/collections/README.md +6 -6
- package/docs/sdks/globaldata/README.md +38 -22
- package/docs/sdks/tagsandcomments/README.md +1 -1
- package/docs/sdks/threathunting/README.md +9 -9
- package/funcs/collectionsAggregate.d.ts +1 -1
- package/funcs/collectionsAggregate.js +1 -1
- package/funcs/collectionsCreate.d.ts +1 -1
- package/funcs/collectionsCreate.js +1 -1
- package/funcs/collectionsGet.d.ts +1 -1
- package/funcs/collectionsGet.js +1 -1
- package/funcs/collectionsListEvents.d.ts +1 -1
- package/funcs/collectionsListEvents.js +1 -1
- package/funcs/collectionsSearch.d.ts +1 -1
- package/funcs/collectionsSearch.js +1 -1
- package/funcs/collectionsUpdate.d.ts +1 -1
- package/funcs/collectionsUpdate.js +1 -1
- package/funcs/globalDataAggregate.d.ts +1 -1
- package/funcs/globalDataAggregate.js +1 -1
- package/funcs/globalDataCreateTrackedScan.d.ts +1 -1
- package/funcs/globalDataCreateTrackedScan.js +1 -1
- package/funcs/globalDataGetCertificate.d.ts +1 -1
- package/funcs/globalDataGetCertificate.js +4 -2
- package/funcs/globalDataGetCertificate.js.map +1 -1
- package/funcs/globalDataGetCertificateRaw.d.ts +1 -1
- package/funcs/globalDataGetCertificateRaw.js +1 -1
- package/funcs/globalDataGetCertificates.d.ts +1 -1
- package/funcs/globalDataGetCertificates.js +1 -1
- package/funcs/globalDataGetCertificatesRaw.d.ts +1 -1
- package/funcs/globalDataGetCertificatesRaw.js +1 -1
- package/funcs/globalDataGetHost.d.ts +1 -1
- package/funcs/globalDataGetHost.js +4 -2
- package/funcs/globalDataGetHost.js.map +1 -1
- package/funcs/globalDataGetHostEnrichment.d.ts +1 -1
- package/funcs/globalDataGetHostEnrichment.js +4 -2
- package/funcs/globalDataGetHostEnrichment.js.map +1 -1
- package/funcs/globalDataGetHostTimeline.d.ts +1 -1
- package/funcs/globalDataGetHostTimeline.js +1 -1
- package/funcs/globalDataGetHosts.d.ts +1 -1
- package/funcs/globalDataGetHosts.js +1 -1
- package/funcs/globalDataGetTrackedScan.d.ts +1 -1
- package/funcs/globalDataGetTrackedScan.js +1 -1
- package/funcs/globalDataGetWebProperties.d.ts +1 -1
- package/funcs/globalDataGetWebProperties.js +1 -1
- package/funcs/globalDataGetWebProperty.d.ts +1 -1
- package/funcs/globalDataGetWebProperty.js +3 -1
- package/funcs/globalDataGetWebProperty.js.map +1 -1
- package/funcs/globalDataListDnsIpResolutionBounds.d.ts +1 -1
- package/funcs/globalDataListDnsIpResolutionBounds.js +1 -1
- package/funcs/globalDataListDnsIpResolutionRanges.d.ts +1 -1
- package/funcs/globalDataListDnsIpResolutionRanges.js +1 -1
- package/funcs/globalDataListDnsNameResolutionBounds.d.ts +1 -1
- package/funcs/globalDataListDnsNameResolutionBounds.js +1 -1
- package/funcs/globalDataListDnsNameResolutionRanges.d.ts +1 -1
- package/funcs/globalDataListDnsNameResolutionRanges.js +1 -1
- package/funcs/globalDataListServicesOnHost.d.ts +1 -1
- package/funcs/globalDataListServicesOnHost.js +1 -1
- package/funcs/globalDataSearch.d.ts +1 -1
- package/funcs/globalDataSearch.js +1 -1
- package/funcs/tagsAndCommentsUpdateTag.d.ts +1 -1
- package/funcs/tagsAndCommentsUpdateTag.js +1 -1
- package/funcs/threatHuntingCreateCenseyeJob.d.ts +1 -1
- package/funcs/threatHuntingCreateCenseyeJob.js +1 -1
- package/funcs/threatHuntingCreateInvestigationFileUpload.d.ts +1 -1
- package/funcs/threatHuntingCreateInvestigationFileUpload.js +1 -1
- package/funcs/threatHuntingCreateInvestigationJob.d.ts +1 -1
- package/funcs/threatHuntingCreateInvestigationJob.js +1 -1
- package/funcs/threatHuntingCreateTrackedScan.d.ts +1 -1
- package/funcs/threatHuntingCreateTrackedScan.js +1 -1
- package/funcs/threatHuntingGetCenseyeJobResults.d.ts +1 -1
- package/funcs/threatHuntingGetCenseyeJobResults.js +1 -1
- package/funcs/threatHuntingGetHostObservationsWithCertificate.d.ts +1 -1
- package/funcs/threatHuntingGetHostObservationsWithCertificate.js +1 -1
- package/funcs/threatHuntingGetTrackedScanThreatHunting.d.ts +1 -1
- package/funcs/threatHuntingGetTrackedScanThreatHunting.js +1 -1
- package/funcs/threatHuntingListThreats.d.ts +1 -1
- package/funcs/threatHuntingListThreats.js +1 -1
- package/funcs/threatHuntingValueCounts.d.ts +1 -1
- package/funcs/threatHuntingValueCounts.js +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +4 -4
- package/lib/config.js +4 -4
- package/models/components/collection.d.ts +18 -1
- package/models/components/collection.d.ts.map +1 -1
- package/models/components/collection.js +11 -1
- package/models/components/collection.js.map +1 -1
- package/models/components/crudcreateinputbody.d.ts +19 -0
- package/models/components/crudcreateinputbody.d.ts.map +1 -1
- package/models/components/crudcreateinputbody.js +11 -1
- package/models/components/crudcreateinputbody.js.map +1 -1
- package/models/components/crudupdateinputbody.d.ts +19 -0
- package/models/components/crudupdateinputbody.d.ts.map +1 -1
- package/models/components/crudupdateinputbody.js +11 -1
- package/models/components/crudupdateinputbody.js.map +1 -1
- package/models/components/http.d.ts +6 -0
- package/models/components/http.d.ts.map +1 -1
- package/models/components/http.js +4 -0
- package/models/components/http.js.map +1 -1
- package/models/components/httpcopyright.d.ts +17 -0
- package/models/components/httpcopyright.d.ts.map +1 -0
- package/models/components/httpcopyright.js +51 -0
- package/models/components/httpcopyright.js.map +1 -0
- package/models/components/index.d.ts +1 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +1 -0
- package/models/components/index.js.map +1 -1
- package/models/operations/v3globaldataassetcertificate.d.ts +10 -0
- package/models/operations/v3globaldataassetcertificate.d.ts.map +1 -1
- package/models/operations/v3globaldataassetcertificate.js +3 -0
- package/models/operations/v3globaldataassetcertificate.js.map +1 -1
- package/models/operations/v3globaldataassethost.d.ts +10 -0
- package/models/operations/v3globaldataassethost.d.ts.map +1 -1
- package/models/operations/v3globaldataassethost.js +3 -0
- package/models/operations/v3globaldataassethost.js.map +1 -1
- package/models/operations/v3globaldataassethostenrichment.d.ts +10 -0
- package/models/operations/v3globaldataassethostenrichment.d.ts.map +1 -1
- package/models/operations/v3globaldataassethostenrichment.js +3 -0
- package/models/operations/v3globaldataassethostenrichment.js.map +1 -1
- package/models/operations/v3globaldataassetwebproperty.d.ts +10 -0
- package/models/operations/v3globaldataassetwebproperty.d.ts.map +1 -1
- package/models/operations/v3globaldataassetwebproperty.js +3 -0
- package/models/operations/v3globaldataassetwebproperty.js.map +1 -1
- package/package.json +2 -2
- package/sdk/adversaryinvestigation.d.ts +8 -8
- package/sdk/adversaryinvestigation.js +8 -8
- package/sdk/collections.d.ts +6 -6
- package/sdk/collections.js +6 -6
- package/sdk/globaldata.d.ts +19 -19
- package/sdk/globaldata.js +19 -19
- package/sdk/tagsandcomments.d.ts +1 -1
- package/sdk/tagsandcomments.js +1 -1
- package/sdk/threathunting.d.ts +9 -9
- package/sdk/threathunting.js +9 -9
- package/src/funcs/collectionsAggregate.ts +1 -1
- package/src/funcs/collectionsCreate.ts +1 -1
- package/src/funcs/collectionsGet.ts +1 -1
- package/src/funcs/collectionsListEvents.ts +1 -1
- package/src/funcs/collectionsSearch.ts +1 -1
- package/src/funcs/collectionsUpdate.ts +1 -1
- package/src/funcs/globalDataAggregate.ts +1 -1
- package/src/funcs/globalDataCreateTrackedScan.ts +1 -1
- package/src/funcs/globalDataGetCertificate.ts +4 -2
- package/src/funcs/globalDataGetCertificateRaw.ts +1 -1
- package/src/funcs/globalDataGetCertificates.ts +1 -1
- package/src/funcs/globalDataGetCertificatesRaw.ts +1 -1
- package/src/funcs/globalDataGetHost.ts +4 -2
- package/src/funcs/globalDataGetHostEnrichment.ts +4 -2
- package/src/funcs/globalDataGetHostTimeline.ts +1 -1
- package/src/funcs/globalDataGetHosts.ts +1 -1
- package/src/funcs/globalDataGetTrackedScan.ts +1 -1
- package/src/funcs/globalDataGetWebProperties.ts +1 -1
- package/src/funcs/globalDataGetWebProperty.ts +3 -1
- package/src/funcs/globalDataListDnsIpResolutionBounds.ts +1 -1
- package/src/funcs/globalDataListDnsIpResolutionRanges.ts +1 -1
- package/src/funcs/globalDataListDnsNameResolutionBounds.ts +1 -1
- package/src/funcs/globalDataListDnsNameResolutionRanges.ts +1 -1
- package/src/funcs/globalDataListServicesOnHost.ts +1 -1
- package/src/funcs/globalDataSearch.ts +1 -1
- package/src/funcs/tagsAndCommentsUpdateTag.ts +1 -1
- package/src/funcs/threatHuntingCreateCenseyeJob.ts +1 -1
- package/src/funcs/threatHuntingCreateInvestigationFileUpload.ts +1 -1
- package/src/funcs/threatHuntingCreateInvestigationJob.ts +1 -1
- package/src/funcs/threatHuntingCreateTrackedScan.ts +1 -1
- package/src/funcs/threatHuntingGetCenseyeJobResults.ts +1 -1
- package/src/funcs/threatHuntingGetHostObservationsWithCertificate.ts +1 -1
- package/src/funcs/threatHuntingGetTrackedScanThreatHunting.ts +1 -1
- package/src/funcs/threatHuntingListThreats.ts +1 -1
- package/src/funcs/threatHuntingValueCounts.ts +1 -1
- package/src/lib/config.ts +4 -4
- package/src/models/components/collection.ts +25 -1
- package/src/models/components/crudcreateinputbody.ts +26 -0
- package/src/models/components/crudupdateinputbody.ts +26 -0
- package/src/models/components/http.ts +9 -0
- package/src/models/components/httpcopyright.ts +39 -0
- package/src/models/components/index.ts +1 -0
- package/src/models/operations/v3globaldataassetcertificate.ts +13 -0
- package/src/models/operations/v3globaldataassethost.ts +13 -0
- package/src/models/operations/v3globaldataassethostenrichment.ts +13 -0
- package/src/models/operations/v3globaldataassetwebproperty.ts +13 -0
- package/src/sdk/adversaryinvestigation.ts +8 -8
- package/src/sdk/collections.ts +6 -6
- package/src/sdk/globaldata.ts +19 -19
- package/src/sdk/tagsandcomments.ts +1 -1
- package/src/sdk/threathunting.ts +9 -9
|
@@ -30,7 +30,7 @@ import { Result } from "../types/fp.js";
|
|
|
30
30
|
* Get host enrichment
|
|
31
31
|
*
|
|
32
32
|
* @remarks
|
|
33
|
-
* Retrieve enrichment data for a single host. This endpoint is optimized for high-volume SOC enrichment use cases.<br><br>This endpoint does not consume standard Censys credits. Core organizations may perform up to 20,000 enrichment calls per day. Core + Unlimited Enrichment organizations may perform an unlimited amount of enrichment calls per day.<br><br>[Learn more about the enrichment API here](https://docs.censys.com/docs/host-enrichment).
|
|
33
|
+
* Retrieve enrichment data for a single host. This endpoint is optimized for high-volume SOC enrichment use cases.<br><br>Use this endpoint to add Censys context (location, ASN, labels, reputation, and more) to IPs in your SIEM or SOAR at high volume, without spending standard credits.<br><br>This endpoint does not consume standard Censys credits. Core organizations may perform up to 20,000 enrichment calls per day. Core + Unlimited Enrichment organizations may perform an unlimited amount of enrichment calls per day.<br><br>[Learn more about the enrichment API here](https://docs.censys.com/docs/host-enrichment).
|
|
34
34
|
*/
|
|
35
35
|
export function globalDataGetHostEnrichment(
|
|
36
36
|
client: SDKCore,
|
|
@@ -105,6 +105,8 @@ async function $do(
|
|
|
105
105
|
);
|
|
106
106
|
|
|
107
107
|
const query = encodeFormQuery({
|
|
108
|
+
"exclude_fields": payload.exclude_fields,
|
|
109
|
+
"fields": payload.fields,
|
|
108
110
|
"organization_id": payload.organization_id
|
|
109
111
|
?? client._options.organizationId,
|
|
110
112
|
}, { explode: false });
|
|
@@ -189,7 +191,7 @@ async function $do(
|
|
|
189
191
|
},
|
|
190
192
|
),
|
|
191
193
|
M.jsonErr(401, errors.AuthenticationError$inboundSchema),
|
|
192
|
-
M.jsonErr([400, 403, 404, 409], errors.ErrorModel$inboundSchema, {
|
|
194
|
+
M.jsonErr([400, 403, 404, 409, 422], errors.ErrorModel$inboundSchema, {
|
|
193
195
|
ctype: "application/problem+json",
|
|
194
196
|
}),
|
|
195
197
|
M.jsonErr(429, errors.ErrorModel$inboundSchema, {
|
|
@@ -30,7 +30,7 @@ import { Result } from "../types/fp.js";
|
|
|
30
30
|
* Get host event history
|
|
31
31
|
*
|
|
32
32
|
* @remarks
|
|
33
|
-
* 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 be reflected in the `scan` object.
|
|
33
|
+
* 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 be reflected in the `scan` object.<br><br>In a SOC environment, use this endpoint to see what changed on an IP over time, such as new services, certificate swaps, and software changes, to reconstruct when attacker infrastructure was stood up or modified.
|
|
34
34
|
*/
|
|
35
35
|
export function globalDataGetHostTimeline(
|
|
36
36
|
client: SDKCore,
|
|
@@ -30,7 +30,7 @@ import { Result } from "../types/fp.js";
|
|
|
30
30
|
* Retrieve multiple hosts
|
|
31
31
|
*
|
|
32
32
|
* @remarks
|
|
33
|
-
* Retrieve information about multiple hosts. You can retrieve up to 100 hosts per call. A host ID is its IP address.
|
|
33
|
+
* Retrieve information about multiple hosts. You can retrieve up to 100 hosts per call. A host ID is its IP address.<br><br>In a SOC environment, use this endpoint to look up multiple IPs from an alert, log, or threat feed in one call, so you can triage a whole indicator list quickly.
|
|
34
34
|
*/
|
|
35
35
|
export function globalDataGetHosts(
|
|
36
36
|
client: SDKCore,
|
|
@@ -30,7 +30,7 @@ import { Result } from "../types/fp.js";
|
|
|
30
30
|
* Get scan status
|
|
31
31
|
*
|
|
32
32
|
* @remarks
|
|
33
|
-
* 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
|
|
33
|
+
* 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>Use this endpoint to check whether a Live Discovery or Live Rescan scan has finished, so automation knows when fresh data is ready to pull.<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.
|
|
34
34
|
*/
|
|
35
35
|
export function globalDataGetTrackedScan(
|
|
36
36
|
client: SDKCore,
|
|
@@ -30,7 +30,7 @@ import { Result } from "../types/fp.js";
|
|
|
30
30
|
* Retrieve multiple web properties
|
|
31
31
|
*
|
|
32
32
|
* @remarks
|
|
33
|
-
* Retrieve information about multiple web properties. You can retrieve up to 100 web properties per call. Web properties are identified using a combination of a hostname and port joined with a colon, such as `platform.censys.io:80
|
|
33
|
+
* Retrieve information about multiple web properties. You can retrieve up to 100 web properties per call. Web properties are identified using a combination of a hostname and port joined with a colon, such as `platform.censys.io:80`.<br><br>In a SOC environment, use this endpoint to check up to 100 suspicious hostnames at once, such as domains from phishing reports or proxy logs, to find the live and malicious ones.
|
|
34
34
|
*/
|
|
35
35
|
export function globalDataGetWebProperties(
|
|
36
36
|
client: SDKCore,
|
|
@@ -30,7 +30,7 @@ import { Result } from "../types/fp.js";
|
|
|
30
30
|
* Get a web property
|
|
31
31
|
*
|
|
32
32
|
* @remarks
|
|
33
|
-
* Retrieve information about a single web property. Web properties are identified using a combination of a hostname and port joined with a colon, such as `platform.censys.io:80
|
|
33
|
+
* Retrieve information about a single web property. Web properties are identified using a combination of a hostname and port joined with a colon, such as `platform.censys.io:80`.<br><br>In a SOC environment, use this endpoint to inspect the current content, technologies, and certificate for a hostname and port from a phishing or C2 alert.
|
|
34
34
|
*/
|
|
35
35
|
export function globalDataGetWebProperty(
|
|
36
36
|
client: SDKCore,
|
|
@@ -106,6 +106,8 @@ async function $do(
|
|
|
106
106
|
|
|
107
107
|
const query = encodeFormQuery({
|
|
108
108
|
"at_time": payload.at_time,
|
|
109
|
+
"exclude_fields": payload.exclude_fields,
|
|
110
|
+
"fields": payload.fields,
|
|
109
111
|
"organization_id": payload.organization_id
|
|
110
112
|
?? client._options.organizationId,
|
|
111
113
|
}, { explode: false });
|
|
@@ -30,7 +30,7 @@ import { Result } from "../types/fp.js";
|
|
|
30
30
|
* Get DNS names that resolved to an IP (aggregated bounds)
|
|
31
31
|
*
|
|
32
32
|
* @remarks
|
|
33
|
-
* Retrieve the domain names that resolved to an IP during a time frame. You can narrow results with `record_types` (A or AAAA).<br><br>Results are aggregated per domain name and multiple distinct ranges for a name will be grouped into one row of results. For example, if `censys.com` resolved to `1.1.1.1` from January 1 to January 7 during two different ranges of January 1 to January 3 and January 5 to January 7, and you targeted January 1 through January 7 with your API call, then this endpoint will group those ranges into one entry for `censys.com` in the response.<br><br>To retrieve domain names for an IP with each record broken down by time range, use the [ranges endpoint](https://docs.censys.com/reference/v3-globaldata-dns-ip-resolution-ranges)<br><br>This endpoint is only available to organizations on the Censys Search and Censys Core plans.<br><br>[Learn more about Censys Active DNS](https://docs.censys.com/docs/platform-active-dns).
|
|
33
|
+
* Retrieve the domain names that resolved to an IP during a time frame. You can narrow results with `record_types` (A or AAAA).<br><br>Results are aggregated per domain name and multiple distinct ranges for a name will be grouped into one row of results. For example, if `censys.com` resolved to `1.1.1.1` from January 1 to January 7 during two different ranges of January 1 to January 3 and January 5 to January 7, and you targeted January 1 through January 7 with your API call, then this endpoint will group those ranges into one entry for `censys.com` in the response.<br><br>To retrieve domain names for an IP with each record broken down by time range, use the [ranges endpoint](https://docs.censys.com/reference/v3-globaldata-dns-ip-resolution-ranges)<br><br>In a SOC environment, use this endpoint to find every domain that has pointed at a malicious IP, with first- and last-seen bounds per name, so you can discover related domains and block them.<br><br>This endpoint is only available to organizations on the Censys Search and Censys Core plans.<br><br>[Learn more about Censys Active DNS](https://docs.censys.com/docs/platform-active-dns).
|
|
34
34
|
*/
|
|
35
35
|
export function globalDataListDnsIpResolutionBounds(
|
|
36
36
|
client: SDKCore,
|
|
@@ -30,7 +30,7 @@ import { Result } from "../types/fp.js";
|
|
|
30
30
|
* Get DNS names that resolved to an IP (ranges)
|
|
31
31
|
*
|
|
32
32
|
* @remarks
|
|
33
|
-
* Retrieve the domain names that resolved to an IP during a time frame. You can narrow results with `record_types` (A or AAAA).<br><br>Record results are broken down based on time range. For example, if `censys.com` resolved to `1.1.1.1` from January 1 to January 7 during two different ranges of January 1 to January 3 and January 5 to January 7, and you targeted January 1 through January 7 with your API call, then this endpoint will return one row for each of those distinct ranges.<br><br>To retrieve domain names for an IP with each result aggregated by name, use the [bounds endpoint endpoint](https://docs.censys.com/reference/v3-globaldata-dns-ip-resolution-bound).<br><br>This endpoint is only available to organizations on the Censys Search and Censys Core plans.<br><br>[Learn more about Censys Active DNS](https://docs.censys.com/docs/platform-active-dns).
|
|
33
|
+
* Retrieve the domain names that resolved to an IP during a time frame. You can narrow results with `record_types` (A or AAAA).<br><br>Record results are broken down based on time range. For example, if `censys.com` resolved to `1.1.1.1` from January 1 to January 7 during two different ranges of January 1 to January 3 and January 5 to January 7, and you targeted January 1 through January 7 with your API call, then this endpoint will return one row for each of those distinct ranges.<br><br>To retrieve domain names for an IP with each result aggregated by name, use the [bounds endpoint endpoint](https://docs.censys.com/reference/v3-globaldata-dns-ip-resolution-bound).<br><br>In a SOC environment, use this endpoint to see the exact time ranges a domain resolved to an IP, to confirm it was active during the incident window or to spot infrastructure reuse.<br><br>This endpoint is only available to organizations on the Censys Search and Censys Core plans.<br><br>[Learn more about Censys Active DNS](https://docs.censys.com/docs/platform-active-dns).
|
|
34
34
|
*/
|
|
35
35
|
export function globalDataListDnsIpResolutionRanges(
|
|
36
36
|
client: SDKCore,
|
|
@@ -30,7 +30,7 @@ import { Result } from "../types/fp.js";
|
|
|
30
30
|
* Get DNS resolution records for a name (aggregated bounds)
|
|
31
31
|
*
|
|
32
32
|
* @remarks
|
|
33
|
-
* Retrieve the DNS resolution records for a name. This endpoint returns observed A, AAAA, MX, NS, SOA, and TXT records for the name you provide. You can filter by one or more record types using record_types.<br><br>Results are aggregated per record distinct ranges for a record will be grouped into one row of results. For example, if `censys.com` resolved to `1.1.1.1` from January 1 to January 7 during two different ranges of January 1 to January 3 and January 5 to January 7, and you targeted January 1 through January 7 with your API call, then this endpoint will group those ranges into one entry for the `1.1.1.1` A record in the response.<br><br>To retrieve records for a name with each record broken down by time range, use the [ranges endpoint](https://docs.censys.com/reference/v3-globaldata-dns-name-resolution-ranges).<br><br>This endpoint is only available to organizations on the Censys Search and Censys Core plans.<br><br>[Learn more about Censys Active DNS](https://docs.censys.com/docs/platform-active-dns).
|
|
33
|
+
* Retrieve the DNS resolution records for a name. This endpoint returns observed A, AAAA, MX, NS, SOA, and TXT records for the name you provide. You can filter by one or more record types using record_types.<br><br>Results are aggregated per record distinct ranges for a record will be grouped into one row of results. For example, if `censys.com` resolved to `1.1.1.1` from January 1 to January 7 during two different ranges of January 1 to January 3 and January 5 to January 7, and you targeted January 1 through January 7 with your API call, then this endpoint will group those ranges into one entry for the `1.1.1.1` A record in the response.<br><br>To retrieve records for a name with each record broken down by time range, use the [ranges endpoint](https://docs.censys.com/reference/v3-globaldata-dns-name-resolution-ranges).<br><br>In a SOC environment, use this endpoint to see the A, AAAA, MX, NS, SOA, and TXT records observed for a suspicious domain, to pivot to its hosting and mail infrastructure.<br><br>This endpoint is only available to organizations on the Censys Search and Censys Core plans.<br><br>[Learn more about Censys Active DNS](https://docs.censys.com/docs/platform-active-dns).
|
|
34
34
|
*/
|
|
35
35
|
export function globalDataListDnsNameResolutionBounds(
|
|
36
36
|
client: SDKCore,
|
|
@@ -30,7 +30,7 @@ import { Result } from "../types/fp.js";
|
|
|
30
30
|
* Get DNS resolution records for a name (ranges)
|
|
31
31
|
*
|
|
32
32
|
* @remarks
|
|
33
|
-
* Retrieve the records that resolved for a name during a time frame. This endpoint returns observed A, AAAA, MX, NS, SOA, and TXT records for the name you provide. You can filter by one or more record types using `record_types`.<br><br>Record results are broken down based on time range. For example, if `censys.com` resolved to `1.1.1.1` from January 1 to January 7 during two different ranges of January 1 to January 3 and January 5 to January 7, and you targeted January 1 through January 7 with your API call, then this endpoint will return one row for each of those distinct ranges for the `1.1.1.1` A record.<br><br>To retrieve records for a name with each result aggregated per record, use the [bounds endpoint endpoint](https://docs.censys.com/reference/v3-globaldata-dns-name-resolution-bound).<br><br>This endpoint is only available to organizations on the Censys Search and Censys Core plans.<br><br>[Learn more about Censys Active DNS](https://docs.censys.com/docs/platform-active-dns).
|
|
33
|
+
* Retrieve the records that resolved for a name during a time frame. This endpoint returns observed A, AAAA, MX, NS, SOA, and TXT records for the name you provide. You can filter by one or more record types using `record_types`.<br><br>Record results are broken down based on time range. For example, if `censys.com` resolved to `1.1.1.1` from January 1 to January 7 during two different ranges of January 1 to January 3 and January 5 to January 7, and you targeted January 1 through January 7 with your API call, then this endpoint will return one row for each of those distinct ranges for the `1.1.1.1` A record.<br><br>To retrieve records for a name with each result aggregated per record, use the [bounds endpoint endpoint](https://docs.censys.com/reference/v3-globaldata-dns-name-resolution-bound).<br><br>In a SOC environment, use this endpoint to see when a domain's records changed over time, such as a sudden hosting move after takedown.<br><br>This endpoint is only available to organizations on the Censys Search and Censys Core plans.<br><br>[Learn more about Censys Active DNS](https://docs.censys.com/docs/platform-active-dns).
|
|
34
34
|
*/
|
|
35
35
|
export function globalDataListDnsNameResolutionRanges(
|
|
36
36
|
client: SDKCore,
|
|
@@ -30,7 +30,7 @@ import { Result } from "../types/fp.js";
|
|
|
30
30
|
* Get service history for a host
|
|
31
31
|
*
|
|
32
32
|
* @remarks
|
|
33
|
-
* Retrieve historical service observations for a host. This endpoint returns time ranges during which services were detected on the host.<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.<br><br>You can filter by port number, protocol, and transport protocol.
|
|
33
|
+
* Retrieve historical service observations for a host. This endpoint returns time ranges during which services were detected on the host.<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.<br><br>You can filter by port number, protocol, and transport protocol.<br><br>In a SOC environment, use this endpoint to see when a specific service was exposed on an IP, so you can check whether it was live during the window of a suspected incident.
|
|
34
34
|
*/
|
|
35
35
|
export function globalDataListServicesOnHost(
|
|
36
36
|
client: SDKCore,
|
|
@@ -30,7 +30,7 @@ import { Result } from "../types/fp.js";
|
|
|
30
30
|
* Run a search query
|
|
31
31
|
*
|
|
32
32
|
* @remarks
|
|
33
|
-
* 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
|
|
33
|
+
* 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.<br><br>Host services that match your search criteria will be returned in a `matched_services` object.<br><br>In a SOC environment, use this endpoint to hunt for hosts, web properties, or certificates that match an indicator, such as a C2 banner, JARM, or favicon hash to scope infrastructure tied to an alert.
|
|
34
34
|
*/
|
|
35
35
|
export function globalDataSearch(
|
|
36
36
|
client: SDKCore,
|
|
@@ -30,7 +30,7 @@ import { Result } from "../types/fp.js";
|
|
|
30
30
|
* Update a tag
|
|
31
31
|
*
|
|
32
32
|
* @remarks
|
|
33
|
-
* Update an existing tag in your organization. Only the fields provided in the request body will be updated; omitted fields are left unchanged.<br><br>Only the tag's creator or an organization admin can update a `private` tag. Tags with the `shared` setting can be updated by any organization member
|
|
33
|
+
* Update an existing tag in your organization. Only the fields provided in the request body will be updated; omitted fields are left unchanged.<br><br>Only the tag's creator or an organization admin can update a `private` tag. Tags with the `shared` setting can be updated by any organization member. A `shared` tag cannot be made `private`.<br><br>This endpoint does not cost any credits to execute.
|
|
34
34
|
*/
|
|
35
35
|
export function tagsAndCommentsUpdateTag(
|
|
36
36
|
client: SDKCore,
|
|
@@ -30,7 +30,7 @@ import { Result } from "../types/fp.js";
|
|
|
30
30
|
* CensEye: Create a pivot analysis job
|
|
31
31
|
*
|
|
32
32
|
* @remarks
|
|
33
|
-
* 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 Adversary Investigation 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.
|
|
33
|
+
* 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>Use this endpoint to start an analysis of a suspicious host, web property, or certificate that finds the rare attributes it shares with other assets, so you can uncover related attacker infrastructure.<br><br>To use this endpoint, your organization must have access to the Adversary Investigation 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.
|
|
34
34
|
*/
|
|
35
35
|
export function threatHuntingCreateCenseyeJob(
|
|
36
36
|
client: SDKCore,
|
|
@@ -30,7 +30,7 @@ import { Result } from "../types/fp.js";
|
|
|
30
30
|
* Investigations: Create file upload
|
|
31
31
|
*
|
|
32
32
|
* @remarks
|
|
33
|
-
* Prepare to attach an evidence file to an investigation. This endpoint does not accept the file. It returns a URL to send the file to and an identifier to pass to the [create job endpoint](https://docs.censys.com/reference/v3-threathunting-investigations-jobs-create) afterwards.<br><br>Upload the file with an HTTP PUT to `upload_url` and send `upload_headers` exactly as returned by this endpoint. The URL grants access to that one file and stops working at `expire_time`; a file uploaded before that stays usable afterwards. Prepare one upload per file.<br><br>Start the investigation promptly after uploading. There is a limit on how many uploaded files you may hold without using them and starting an investigation from a file releases its slot. A file that no investigation references is discarded once it passes the service's retention window for unused uploads. A file an investigation does reference is kept with that investigation for as long as the investigation itself.<br><br>To use this endpoint, your organization must have access to the Adversary Investigation module.<br><br>This endpoint does not cost any credits to execute.
|
|
33
|
+
* Prepare to attach an evidence file to an investigation. Use this endpoint to stage evidence, such as logs, malware reports, or alert exports, so an AI investigation can use it.<br><br>This endpoint does not accept the file. It returns a URL to send the file to and an identifier to pass to the [create job endpoint](https://docs.censys.com/reference/v3-threathunting-investigations-jobs-create) afterwards.<br><br>Upload the file with an HTTP PUT to `upload_url` and send `upload_headers` exactly as returned by this endpoint. The URL grants access to that one file and stops working at `expire_time`; a file uploaded before that stays usable afterwards. Prepare one upload per file.<br><br>Start the investigation promptly after uploading. There is a limit on how many uploaded files you may hold without using them and starting an investigation from a file releases its slot. A file that no investigation references is discarded once it passes the service's retention window for unused uploads. A file an investigation does reference is kept with that investigation for as long as the investigation itself.<br><br>To use this endpoint, your organization must have access to the Adversary Investigation module.<br><br>This endpoint does not cost any credits to execute.
|
|
34
34
|
*/
|
|
35
35
|
export function threatHuntingCreateInvestigationFileUpload(
|
|
36
36
|
client: SDKCore,
|
|
@@ -30,7 +30,7 @@ import { Result } from "../types/fp.js";
|
|
|
30
30
|
* Investigations: Create job
|
|
31
31
|
*
|
|
32
32
|
* @remarks
|
|
33
|
-
* Start an [AI investigation](https://docs.censys.com/docs/platform-ai-investigations) from a set of indicators, a set of previously uploaded evidence files, or both
|
|
33
|
+
* Start an [AI investigation](https://docs.censys.com/docs/platform-ai-investigations) from a set of indicators, a set of previously uploaded evidence files, or both to obtain a report on suspect infrastructure without doing the pivots by hand.<br><br>Supply at least one `indicators` or `file_ids`. To use files, upload them first with the [create file upload endpoint](https://docs.censys.com/reference/v3-threathunting-investigations-files-create).<br><br>This endpoint returns a `job_id` that you can poll to retrieve its status and results.<br><br>Provide `start_time` and `end_time` to scope the investigation to a time frame, or `start_time` alone to scope it from that time up to now. Omit both to investigate current data.<br><br>To use this endpoint, your organization must have access to the Adversary Investigation module.
|
|
34
34
|
*/
|
|
35
35
|
export function threatHuntingCreateInvestigationJob(
|
|
36
36
|
client: SDKCore,
|
|
@@ -30,7 +30,7 @@ import { Result } from "../types/fp.js";
|
|
|
30
30
|
* Live Discovery: Initiate a new scan
|
|
31
31
|
*
|
|
32
32
|
* @remarks
|
|
33
|
-
* 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
|
+
* 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>Use this endpoint to scan for a service at an `ip:port` or `hostname:port`, such as a new IOC from an incident, so you can get data on it right away.<br><br>This endpoint is available to organizations that have access to the Adversary Investigation module. It costs 15 credits to execute this endpoint.
|
|
34
34
|
*/
|
|
35
35
|
export function threatHuntingCreateTrackedScan(
|
|
36
36
|
client: SDKCore,
|
|
@@ -30,7 +30,7 @@ import { Result } from "../types/fp.js";
|
|
|
30
30
|
* CensEye: Get job results
|
|
31
31
|
*
|
|
32
32
|
* @remarks
|
|
33
|
-
* 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
|
+
* Retrieve the results of a completed CensEye pivot analysis job. Use this endpoint to retrieve the pivots from a finished job, then turn the most distinctive ones into searches or blocklist candidates.<br><br>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.
|
|
34
34
|
*/
|
|
35
35
|
export function threatHuntingGetCenseyeJobResults(
|
|
36
36
|
client: SDKCore,
|
|
@@ -30,7 +30,7 @@ import { Result } from "../types/fp.js";
|
|
|
30
30
|
* Get host history for a certificate
|
|
31
31
|
*
|
|
32
32
|
* @remarks
|
|
33
|
-
* Retrieve the historical observations of hosts associated with a certificate.
|
|
33
|
+
* Retrieve the historical observations of hosts associated with a certificate. Use this endpoint to see every host that has presented a given certificate over time, so you can build a timeline and find other infrastructure using it.<br><br>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.<br><br>For workspaces with a history limit, the API returns observation ranges that overlap the allowed history window. The window starts at 00:00 UTC the allowed number of days ago and ends at the time of the request. Ranges are returned in full, with their original start and end times, even if they extend outside the window.<br><br>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. This endpoint costs one credit per page of results.
|
|
34
34
|
*/
|
|
35
35
|
export function threatHuntingGetHostObservationsWithCertificate(
|
|
36
36
|
client: SDKCore,
|
|
@@ -30,7 +30,7 @@ import { Result } from "../types/fp.js";
|
|
|
30
30
|
* Get scan status
|
|
31
31
|
*
|
|
32
32
|
* @remarks
|
|
33
|
-
* 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
|
|
33
|
+
* 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>Use this endpoint to check whether a Live Discovery or Live Rescan scan has finished, so automation knows when fresh data is ready to pull.<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.
|
|
34
34
|
*/
|
|
35
35
|
export function threatHuntingGetTrackedScanThreatHunting(
|
|
36
36
|
client: SDKCore,
|
|
@@ -30,7 +30,7 @@ import { Result } from "../types/fp.js";
|
|
|
30
30
|
* List active threats
|
|
31
31
|
*
|
|
32
32
|
* @remarks
|
|
33
|
-
* 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
|
+
* Retrieve a list of active threats observed by Censys by aggregating threat IDs across hosts and web properties. Use this endpoint to see currently active threats so you can prioritize which malicious infrastructure to hunt or block first.<br><br>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.
|
|
34
34
|
*/
|
|
35
35
|
export function threatHuntingListThreats(
|
|
36
36
|
client: SDKCore,
|
|
@@ -30,7 +30,7 @@ import { Result } from "../types/fp.js";
|
|
|
30
30
|
* CensEye: Retrieve value counts to discover pivots
|
|
31
31
|
*
|
|
32
32
|
* @remarks
|
|
33
|
-
* 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
|
+
* 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>Use this endpoint to see how many assets share a given field value, so you can tell which attributes are rare enough to pivot on and which are too common to be useful.<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.
|
|
34
34
|
*/
|
|
35
35
|
export function threatHuntingValueCounts(
|
|
36
36
|
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.12.
|
|
70
|
-
genVersion: "2.
|
|
68
|
+
openapiDocVersion: "1.0.163",
|
|
69
|
+
sdkVersion: "0.12.14",
|
|
70
|
+
genVersion: "2.961.1",
|
|
71
71
|
userAgent:
|
|
72
|
-
"speakeasy-sdk/typescript 0.12.
|
|
72
|
+
"speakeasy-sdk/typescript 0.12.14 2.961.1 1.0.163 @censys/platform-sdk",
|
|
73
73
|
} as const;
|
|
@@ -10,6 +10,18 @@ import { OpenEnum } from "../../types/enums.js";
|
|
|
10
10
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
11
11
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
12
12
|
|
|
13
|
+
/**
|
|
14
|
+
* Collection visibility. `private` collections are visible to their creator and organization admins. `shared` collections are also visible to all organization members. Only the creator and organization admins can edit a collection.
|
|
15
|
+
*/
|
|
16
|
+
export const CollectionPrivacy = {
|
|
17
|
+
Private: "private",
|
|
18
|
+
Shared: "shared",
|
|
19
|
+
} as const;
|
|
20
|
+
/**
|
|
21
|
+
* Collection visibility. `private` collections are visible to their creator and organization admins. `shared` collections are also visible to all organization members. Only the creator and organization admins can edit a collection.
|
|
22
|
+
*/
|
|
23
|
+
export type CollectionPrivacy = OpenEnum<typeof CollectionPrivacy>;
|
|
24
|
+
|
|
13
25
|
export const CollectionStatus = {
|
|
14
26
|
Unspecified: "unspecified",
|
|
15
27
|
Populating: "populating",
|
|
@@ -34,12 +46,16 @@ export type Collection = {
|
|
|
34
46
|
addedAssets24Hours: number;
|
|
35
47
|
createTime: Date;
|
|
36
48
|
/**
|
|
37
|
-
* The ID of
|
|
49
|
+
* The ID of the user or service account that created the collection.
|
|
38
50
|
*/
|
|
39
51
|
createdBy?: string | undefined;
|
|
40
52
|
description: string;
|
|
41
53
|
id: string;
|
|
42
54
|
name: string;
|
|
55
|
+
/**
|
|
56
|
+
* Collection visibility. `private` collections are visible to their creator and organization admins. `shared` collections are also visible to all organization members. Only the creator and organization admins can edit a collection.
|
|
57
|
+
*/
|
|
58
|
+
privacy: CollectionPrivacy;
|
|
43
59
|
query: string;
|
|
44
60
|
removedAssets24Hours: number;
|
|
45
61
|
status: CollectionStatus;
|
|
@@ -47,6 +63,13 @@ export type Collection = {
|
|
|
47
63
|
totalAssets: number;
|
|
48
64
|
};
|
|
49
65
|
|
|
66
|
+
/** @internal */
|
|
67
|
+
export const CollectionPrivacy$inboundSchema: z.ZodType<
|
|
68
|
+
CollectionPrivacy,
|
|
69
|
+
z.ZodTypeDef,
|
|
70
|
+
unknown
|
|
71
|
+
> = openEnums.inboundSchema(CollectionPrivacy);
|
|
72
|
+
|
|
50
73
|
/** @internal */
|
|
51
74
|
export const CollectionStatus$inboundSchema: z.ZodType<
|
|
52
75
|
CollectionStatus,
|
|
@@ -75,6 +98,7 @@ export const Collection$inboundSchema: z.ZodType<
|
|
|
75
98
|
description: z.string(),
|
|
76
99
|
id: z.string(),
|
|
77
100
|
name: z.string(),
|
|
101
|
+
privacy: CollectionPrivacy$inboundSchema,
|
|
78
102
|
query: z.string(),
|
|
79
103
|
removed_assets_24_hours: z.number().int(),
|
|
80
104
|
status: CollectionStatus$inboundSchema,
|
|
@@ -3,6 +3,21 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v3";
|
|
6
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Collection visibility. `private` collections are visible to their creator and organization admins. `shared` collections are also visible to all organization members. Only the creator and organization admins can edit a collection.
|
|
10
|
+
*/
|
|
11
|
+
export const CrudCreateInputBodyPrivacy = {
|
|
12
|
+
Private: "private",
|
|
13
|
+
Shared: "shared",
|
|
14
|
+
} as const;
|
|
15
|
+
/**
|
|
16
|
+
* Collection visibility. `private` collections are visible to their creator and organization admins. `shared` collections are also visible to all organization members. Only the creator and organization admins can edit a collection.
|
|
17
|
+
*/
|
|
18
|
+
export type CrudCreateInputBodyPrivacy = ClosedEnum<
|
|
19
|
+
typeof CrudCreateInputBodyPrivacy
|
|
20
|
+
>;
|
|
6
21
|
|
|
7
22
|
export type CrudCreateInputBody = {
|
|
8
23
|
/**
|
|
@@ -13,16 +28,26 @@ export type CrudCreateInputBody = {
|
|
|
13
28
|
* name of the collection
|
|
14
29
|
*/
|
|
15
30
|
name: string;
|
|
31
|
+
/**
|
|
32
|
+
* Collection visibility. `private` collections are visible to their creator and organization admins. `shared` collections are also visible to all organization members. Only the creator and organization admins can edit a collection.
|
|
33
|
+
*/
|
|
34
|
+
privacy?: CrudCreateInputBodyPrivacy | undefined;
|
|
16
35
|
/**
|
|
17
36
|
* query string to search upon to build the collection
|
|
18
37
|
*/
|
|
19
38
|
query: string;
|
|
20
39
|
};
|
|
21
40
|
|
|
41
|
+
/** @internal */
|
|
42
|
+
export const CrudCreateInputBodyPrivacy$outboundSchema: z.ZodNativeEnum<
|
|
43
|
+
typeof CrudCreateInputBodyPrivacy
|
|
44
|
+
> = z.nativeEnum(CrudCreateInputBodyPrivacy);
|
|
45
|
+
|
|
22
46
|
/** @internal */
|
|
23
47
|
export type CrudCreateInputBody$Outbound = {
|
|
24
48
|
description?: string | undefined;
|
|
25
49
|
name: string;
|
|
50
|
+
privacy: string;
|
|
26
51
|
query: string;
|
|
27
52
|
};
|
|
28
53
|
|
|
@@ -34,6 +59,7 @@ export const CrudCreateInputBody$outboundSchema: z.ZodType<
|
|
|
34
59
|
> = z.object({
|
|
35
60
|
description: z.string().optional(),
|
|
36
61
|
name: z.string(),
|
|
62
|
+
privacy: CrudCreateInputBodyPrivacy$outboundSchema.default("private"),
|
|
37
63
|
query: z.string(),
|
|
38
64
|
});
|
|
39
65
|
|
|
@@ -3,6 +3,21 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v3";
|
|
6
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Collection visibility. `private` collections are visible to their creator and organization admins. `shared` collections are also visible to all organization members. Only the creator and organization admins can edit a collection.
|
|
10
|
+
*/
|
|
11
|
+
export const CrudUpdateInputBodyPrivacy = {
|
|
12
|
+
Private: "private",
|
|
13
|
+
Shared: "shared",
|
|
14
|
+
} as const;
|
|
15
|
+
/**
|
|
16
|
+
* Collection visibility. `private` collections are visible to their creator and organization admins. `shared` collections are also visible to all organization members. Only the creator and organization admins can edit a collection.
|
|
17
|
+
*/
|
|
18
|
+
export type CrudUpdateInputBodyPrivacy = ClosedEnum<
|
|
19
|
+
typeof CrudUpdateInputBodyPrivacy
|
|
20
|
+
>;
|
|
6
21
|
|
|
7
22
|
export type CrudUpdateInputBody = {
|
|
8
23
|
/**
|
|
@@ -13,16 +28,26 @@ export type CrudUpdateInputBody = {
|
|
|
13
28
|
* name of the collection
|
|
14
29
|
*/
|
|
15
30
|
name: string;
|
|
31
|
+
/**
|
|
32
|
+
* Collection visibility. `private` collections are visible to their creator and organization admins. `shared` collections are also visible to all organization members. Only the creator and organization admins can edit a collection.
|
|
33
|
+
*/
|
|
34
|
+
privacy?: CrudUpdateInputBodyPrivacy | undefined;
|
|
16
35
|
/**
|
|
17
36
|
* query string to search upon to build the collection
|
|
18
37
|
*/
|
|
19
38
|
query: string;
|
|
20
39
|
};
|
|
21
40
|
|
|
41
|
+
/** @internal */
|
|
42
|
+
export const CrudUpdateInputBodyPrivacy$outboundSchema: z.ZodNativeEnum<
|
|
43
|
+
typeof CrudUpdateInputBodyPrivacy
|
|
44
|
+
> = z.nativeEnum(CrudUpdateInputBodyPrivacy);
|
|
45
|
+
|
|
22
46
|
/** @internal */
|
|
23
47
|
export type CrudUpdateInputBody$Outbound = {
|
|
24
48
|
description?: string | undefined;
|
|
25
49
|
name: string;
|
|
50
|
+
privacy?: string | undefined;
|
|
26
51
|
query: string;
|
|
27
52
|
};
|
|
28
53
|
|
|
@@ -34,6 +59,7 @@ export const CrudUpdateInputBody$outboundSchema: z.ZodType<
|
|
|
34
59
|
> = z.object({
|
|
35
60
|
description: z.string().optional(),
|
|
36
61
|
name: z.string(),
|
|
62
|
+
privacy: CrudUpdateInputBodyPrivacy$outboundSchema.optional(),
|
|
37
63
|
query: z.string(),
|
|
38
64
|
});
|
|
39
65
|
|
|
@@ -7,6 +7,7 @@ import { remap as remap$ } from "../../lib/primitives.js";
|
|
|
7
7
|
import { safeParse } from "../../lib/schemas.js";
|
|
8
8
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
9
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
import { HttpCopyright, HttpCopyright$inboundSchema } from "./httpcopyright.js";
|
|
10
11
|
import { HttpFavicon, HttpFavicon$inboundSchema } from "./httpfavicon.js";
|
|
11
12
|
import {
|
|
12
13
|
HttpRedirectChainLink,
|
|
@@ -30,7 +31,12 @@ export type Http = {
|
|
|
30
31
|
* The length, in bytes, of services.http.response.body; at most, 64KB.
|
|
31
32
|
*/
|
|
32
33
|
bodySize?: number | undefined;
|
|
34
|
+
/**
|
|
35
|
+
* Copyright notices declared by or found in the page, the one most likely to be the site's own first.
|
|
36
|
+
*/
|
|
37
|
+
copyrights?: Array<HttpCopyright> | null | undefined;
|
|
33
38
|
favicons?: Array<HttpFavicon> | null | undefined;
|
|
39
|
+
googleSiteVerification?: Array<string> | null | undefined;
|
|
34
40
|
/**
|
|
35
41
|
* The key-value header pairs included in the response.
|
|
36
42
|
*/
|
|
@@ -75,7 +81,9 @@ export const Http$inboundSchema: z.ZodType<Http, z.ZodTypeDef, unknown> = z
|
|
|
75
81
|
body_hash_sha256: z.string().optional(),
|
|
76
82
|
body_hash_tlsh: z.string().optional(),
|
|
77
83
|
body_size: z.number().int().optional(),
|
|
84
|
+
copyrights: z.nullable(z.array(HttpCopyright$inboundSchema)).optional(),
|
|
78
85
|
favicons: z.nullable(z.array(HttpFavicon$inboundSchema)).optional(),
|
|
86
|
+
google_site_verification: z.nullable(z.array(z.string())).optional(),
|
|
79
87
|
headers: z.record(HttpRepeatedHeaders$inboundSchema).optional(),
|
|
80
88
|
html_tags: z.nullable(z.array(z.string())).optional(),
|
|
81
89
|
html_title: z.string().optional(),
|
|
@@ -93,6 +101,7 @@ export const Http$inboundSchema: z.ZodType<Http, z.ZodTypeDef, unknown> = z
|
|
|
93
101
|
"body_hash_sha256": "bodyHashSha256",
|
|
94
102
|
"body_hash_tlsh": "bodyHashTlsh",
|
|
95
103
|
"body_size": "bodySize",
|
|
104
|
+
"google_site_verification": "googleSiteVerification",
|
|
96
105
|
"html_tags": "htmlTags",
|
|
97
106
|
"html_title": "htmlTitle",
|
|
98
107
|
"network_log": "networkLog",
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
|
|
10
|
+
export type HttpCopyright = {
|
|
11
|
+
/**
|
|
12
|
+
* Where in the response the notice was found: meta (a copyright meta tag) or body (text matched in the response body).
|
|
13
|
+
*/
|
|
14
|
+
source?: string | undefined;
|
|
15
|
+
/**
|
|
16
|
+
* The copyright notice as it appears in the response.
|
|
17
|
+
*/
|
|
18
|
+
text?: string | undefined;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
/** @internal */
|
|
22
|
+
export const HttpCopyright$inboundSchema: z.ZodType<
|
|
23
|
+
HttpCopyright,
|
|
24
|
+
z.ZodTypeDef,
|
|
25
|
+
unknown
|
|
26
|
+
> = z.object({
|
|
27
|
+
source: z.string().optional(),
|
|
28
|
+
text: z.string().optional(),
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
export function httpCopyrightFromJSON(
|
|
32
|
+
jsonString: string,
|
|
33
|
+
): SafeParseResult<HttpCopyright, SDKValidationError> {
|
|
34
|
+
return safeParse(
|
|
35
|
+
jsonString,
|
|
36
|
+
(x) => HttpCopyright$inboundSchema.parse(JSON.parse(x)),
|
|
37
|
+
`Failed to parse 'HttpCopyright' from JSON`,
|
|
38
|
+
);
|
|
39
|
+
}
|
|
@@ -251,6 +251,7 @@ export * from "./hosttimeline.js";
|
|
|
251
251
|
export * from "./hosttimelineevent.js";
|
|
252
252
|
export * from "./hosttimelineeventasset.js";
|
|
253
253
|
export * from "./http.js";
|
|
254
|
+
export * from "./httpcopyright.js";
|
|
254
255
|
export * from "./httpfavicon.js";
|
|
255
256
|
export * from "./httpredirectchainlink.js";
|
|
256
257
|
export * from "./httpredirectchainlinkhttpstatus.js";
|
|
@@ -22,6 +22,14 @@ export type V3GlobaldataAssetCertificateRequest = {
|
|
|
22
22
|
* The SHA-256 certificate fingerprint.
|
|
23
23
|
*/
|
|
24
24
|
certificateId: string;
|
|
25
|
+
/**
|
|
26
|
+
* Comma-separated list of fields to include in the response, in dot notation (for example `services.port`). Repeated fields are filtered per element. Omit the parameter or pass `*` to return every field. Unknown fields are rejected.
|
|
27
|
+
*/
|
|
28
|
+
fields?: string | undefined;
|
|
29
|
+
/**
|
|
30
|
+
* Comma-separated list of fields to exclude from the response, in dot notation (for example `services.banner`). Repeated fields are filtered per element. Unknown fields are rejected. Cannot be used together with `fields`.
|
|
31
|
+
*/
|
|
32
|
+
excludeFields?: string | undefined;
|
|
25
33
|
};
|
|
26
34
|
|
|
27
35
|
export type V3GlobaldataAssetCertificateResponse = {
|
|
@@ -33,6 +41,8 @@ export type V3GlobaldataAssetCertificateResponse = {
|
|
|
33
41
|
export type V3GlobaldataAssetCertificateRequest$Outbound = {
|
|
34
42
|
organization_id?: string | undefined;
|
|
35
43
|
certificate_id: string;
|
|
44
|
+
fields?: string | undefined;
|
|
45
|
+
exclude_fields?: string | undefined;
|
|
36
46
|
};
|
|
37
47
|
|
|
38
48
|
/** @internal */
|
|
@@ -43,10 +53,13 @@ export const V3GlobaldataAssetCertificateRequest$outboundSchema: z.ZodType<
|
|
|
43
53
|
> = z.object({
|
|
44
54
|
organizationId: z.string().optional(),
|
|
45
55
|
certificateId: z.string(),
|
|
56
|
+
fields: z.string().optional(),
|
|
57
|
+
excludeFields: z.string().optional(),
|
|
46
58
|
}).transform((v) => {
|
|
47
59
|
return remap$(v, {
|
|
48
60
|
organizationId: "organization_id",
|
|
49
61
|
certificateId: "certificate_id",
|
|
62
|
+
excludeFields: "exclude_fields",
|
|
50
63
|
});
|
|
51
64
|
});
|
|
52
65
|
|