@censys/platform-sdk 0.10.4 → 0.10.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/docs/sdks/adversaryinvestigation/README.md +1 -1
- package/docs/sdks/threathunting/README.md +84 -1
- package/funcs/accountManagementGetMemberCreditUsage.d.ts.map +1 -1
- package/funcs/accountManagementGetMemberCreditUsage.js +2 -1
- package/funcs/accountManagementGetMemberCreditUsage.js.map +1 -1
- package/funcs/accountManagementGetOrganizationCreditUsage.d.ts.map +1 -1
- package/funcs/accountManagementGetOrganizationCreditUsage.js +2 -1
- package/funcs/accountManagementGetOrganizationCreditUsage.js.map +1 -1
- package/funcs/accountManagementGetOrganizationCredits.d.ts.map +1 -1
- package/funcs/accountManagementGetOrganizationCredits.js +2 -1
- package/funcs/accountManagementGetOrganizationCredits.js.map +1 -1
- package/funcs/accountManagementGetOrganizationDetails.d.ts.map +1 -1
- package/funcs/accountManagementGetOrganizationDetails.js +2 -1
- package/funcs/accountManagementGetOrganizationDetails.js.map +1 -1
- package/funcs/accountManagementGetUserCredits.d.ts.map +1 -1
- package/funcs/accountManagementGetUserCredits.js +2 -1
- package/funcs/accountManagementGetUserCredits.js.map +1 -1
- package/funcs/accountManagementGetUserCreditsUsage.d.ts.map +1 -1
- package/funcs/accountManagementGetUserCreditsUsage.js +2 -1
- package/funcs/accountManagementGetUserCreditsUsage.js.map +1 -1
- package/funcs/accountManagementInviteUserToOrganization.d.ts.map +1 -1
- package/funcs/accountManagementInviteUserToOrganization.js +2 -1
- package/funcs/accountManagementInviteUserToOrganization.js.map +1 -1
- package/funcs/accountManagementListOrganizationMembers.d.ts.map +1 -1
- package/funcs/accountManagementListOrganizationMembers.js +2 -1
- package/funcs/accountManagementListOrganizationMembers.js.map +1 -1
- package/funcs/accountManagementRemoveOrganizationMember.d.ts.map +1 -1
- package/funcs/accountManagementRemoveOrganizationMember.js +2 -1
- package/funcs/accountManagementRemoveOrganizationMember.js.map +1 -1
- package/funcs/accountManagementUpdateOrganizationMember.d.ts.map +1 -1
- package/funcs/accountManagementUpdateOrganizationMember.js +2 -1
- package/funcs/accountManagementUpdateOrganizationMember.js.map +1 -1
- package/funcs/collectionsAggregate.d.ts.map +1 -1
- package/funcs/collectionsAggregate.js +2 -1
- package/funcs/collectionsAggregate.js.map +1 -1
- package/funcs/collectionsCreate.d.ts.map +1 -1
- package/funcs/collectionsCreate.js +2 -1
- package/funcs/collectionsCreate.js.map +1 -1
- package/funcs/collectionsDelete.d.ts.map +1 -1
- package/funcs/collectionsDelete.js +2 -1
- package/funcs/collectionsDelete.js.map +1 -1
- package/funcs/collectionsGet.d.ts.map +1 -1
- package/funcs/collectionsGet.js +2 -1
- package/funcs/collectionsGet.js.map +1 -1
- package/funcs/collectionsList.d.ts.map +1 -1
- package/funcs/collectionsList.js +2 -1
- package/funcs/collectionsList.js.map +1 -1
- package/funcs/collectionsListEvents.d.ts.map +1 -1
- package/funcs/collectionsListEvents.js +2 -1
- package/funcs/collectionsListEvents.js.map +1 -1
- package/funcs/collectionsSearch.d.ts.map +1 -1
- package/funcs/collectionsSearch.js +2 -1
- package/funcs/collectionsSearch.js.map +1 -1
- package/funcs/collectionsUpdate.d.ts.map +1 -1
- package/funcs/collectionsUpdate.js +2 -1
- package/funcs/collectionsUpdate.js.map +1 -1
- package/funcs/globalDataAggregate.d.ts.map +1 -1
- package/funcs/globalDataAggregate.js +2 -1
- package/funcs/globalDataAggregate.js.map +1 -1
- package/funcs/globalDataConvertLegacySearchQueries.d.ts.map +1 -1
- package/funcs/globalDataConvertLegacySearchQueries.js +2 -1
- package/funcs/globalDataConvertLegacySearchQueries.js.map +1 -1
- package/funcs/globalDataCreateTrackedScan.d.ts.map +1 -1
- package/funcs/globalDataCreateTrackedScan.js +2 -1
- package/funcs/globalDataCreateTrackedScan.js.map +1 -1
- package/funcs/globalDataGetCertificate.d.ts.map +1 -1
- package/funcs/globalDataGetCertificate.js +2 -1
- package/funcs/globalDataGetCertificate.js.map +1 -1
- package/funcs/globalDataGetCertificateRaw.d.ts.map +1 -1
- package/funcs/globalDataGetCertificateRaw.js +2 -1
- package/funcs/globalDataGetCertificateRaw.js.map +1 -1
- package/funcs/globalDataGetCertificates.d.ts.map +1 -1
- package/funcs/globalDataGetCertificates.js +2 -1
- package/funcs/globalDataGetCertificates.js.map +1 -1
- package/funcs/globalDataGetCertificatesRaw.d.ts.map +1 -1
- package/funcs/globalDataGetCertificatesRaw.js +2 -1
- package/funcs/globalDataGetCertificatesRaw.js.map +1 -1
- package/funcs/globalDataGetHost.d.ts.map +1 -1
- package/funcs/globalDataGetHost.js +2 -1
- package/funcs/globalDataGetHost.js.map +1 -1
- package/funcs/globalDataGetHostTimeline.d.ts.map +1 -1
- package/funcs/globalDataGetHostTimeline.js +2 -1
- package/funcs/globalDataGetHostTimeline.js.map +1 -1
- package/funcs/globalDataGetHosts.d.ts.map +1 -1
- package/funcs/globalDataGetHosts.js +2 -1
- package/funcs/globalDataGetHosts.js.map +1 -1
- package/funcs/globalDataGetTrackedScan.d.ts.map +1 -1
- package/funcs/globalDataGetTrackedScan.js +2 -1
- package/funcs/globalDataGetTrackedScan.js.map +1 -1
- package/funcs/globalDataGetWebProperties.d.ts.map +1 -1
- package/funcs/globalDataGetWebProperties.js +2 -1
- package/funcs/globalDataGetWebProperties.js.map +1 -1
- package/funcs/globalDataGetWebProperty.d.ts.map +1 -1
- package/funcs/globalDataGetWebProperty.js +2 -1
- package/funcs/globalDataGetWebProperty.js.map +1 -1
- package/funcs/globalDataListServicesOnHost.d.ts.map +1 -1
- package/funcs/globalDataListServicesOnHost.js +2 -1
- package/funcs/globalDataListServicesOnHost.js.map +1 -1
- package/funcs/globalDataSearch.d.ts.map +1 -1
- package/funcs/globalDataSearch.js +2 -1
- package/funcs/globalDataSearch.js.map +1 -1
- package/funcs/threatHuntingCreateCenseyeJob.d.ts +1 -1
- package/funcs/threatHuntingCreateCenseyeJob.d.ts.map +1 -1
- package/funcs/threatHuntingCreateCenseyeJob.js +3 -2
- package/funcs/threatHuntingCreateCenseyeJob.js.map +1 -1
- package/funcs/threatHuntingCreateTrackedScan.d.ts.map +1 -1
- package/funcs/threatHuntingCreateTrackedScan.js +2 -1
- package/funcs/threatHuntingCreateTrackedScan.js.map +1 -1
- package/funcs/threatHuntingGetCenseyeJob.d.ts.map +1 -1
- package/funcs/threatHuntingGetCenseyeJob.js +2 -1
- package/funcs/threatHuntingGetCenseyeJob.js.map +1 -1
- package/funcs/threatHuntingGetCenseyeJobResults.d.ts.map +1 -1
- package/funcs/threatHuntingGetCenseyeJobResults.js +2 -1
- package/funcs/threatHuntingGetCenseyeJobResults.js.map +1 -1
- package/funcs/threatHuntingGetHostObservationsWithCertificate.d.ts.map +1 -1
- package/funcs/threatHuntingGetHostObservationsWithCertificate.js +2 -1
- package/funcs/threatHuntingGetHostObservationsWithCertificate.js.map +1 -1
- package/funcs/threatHuntingGetTrackedScanThreatHunting.d.ts.map +1 -1
- package/funcs/threatHuntingGetTrackedScanThreatHunting.js +2 -1
- package/funcs/threatHuntingGetTrackedScanThreatHunting.js.map +1 -1
- package/funcs/threatHuntingListCenseyeJobs.d.ts +18 -0
- package/funcs/threatHuntingListCenseyeJobs.d.ts.map +1 -0
- package/funcs/threatHuntingListCenseyeJobs.js +134 -0
- package/funcs/threatHuntingListCenseyeJobs.js.map +1 -0
- package/funcs/threatHuntingListThreats.d.ts.map +1 -1
- package/funcs/threatHuntingListThreats.js +2 -1
- package/funcs/threatHuntingListThreats.js.map +1 -1
- package/funcs/threatHuntingValueCounts.d.ts.map +1 -1
- package/funcs/threatHuntingValueCounts.js +2 -1
- package/funcs/threatHuntingValueCounts.js.map +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +4 -4
- package/lib/config.js +4 -4
- package/lib/encodings.d.ts +1 -0
- package/lib/encodings.d.ts.map +1 -1
- package/lib/encodings.js +7 -0
- package/lib/encodings.js.map +1 -1
- package/lib/sdks.d.ts +1 -1
- package/lib/sdks.d.ts.map +1 -1
- package/lib/sdks.js +2 -4
- package/lib/sdks.js.map +1 -1
- package/models/components/censeyejobslistresponse.d.ts +18 -0
- package/models/components/censeyejobslistresponse.d.ts.map +1 -0
- package/models/components/censeyejobslistresponse.js +57 -0
- package/models/components/censeyejobslistresponse.js.map +1 -0
- package/models/components/endpointscan.d.ts +2 -0
- package/models/components/endpointscan.d.ts.map +1 -1
- package/models/components/endpointscan.js +2 -0
- package/models/components/endpointscan.js.map +1 -1
- package/models/components/endpointscanstate.d.ts +2 -0
- package/models/components/endpointscanstate.d.ts.map +1 -1
- package/models/components/endpointscanstate.js +2 -0
- package/models/components/endpointscanstate.js.map +1 -1
- package/models/components/greynoise.d.ts +4 -0
- package/models/components/greynoise.d.ts.map +1 -1
- package/models/components/greynoise.js +6 -0
- package/models/components/greynoise.js.map +1 -1
- package/models/components/index.d.ts +6 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +6 -0
- package/models/components/index.js.map +1 -1
- package/models/components/mcp.d.ts +18 -0
- package/models/components/mcp.d.ts.map +1 -0
- package/models/components/mcp.js +66 -0
- package/models/components/mcp.js.map +1 -0
- package/models/components/mcpprompt.d.ts +10 -0
- package/models/components/mcpprompt.d.ts.map +1 -0
- package/models/components/mcpprompt.js +50 -0
- package/models/components/mcpprompt.js.map +1 -0
- package/models/components/mcpresource.d.ts +14 -0
- package/models/components/mcpresource.d.ts.map +1 -0
- package/models/components/mcpresource.js +59 -0
- package/models/components/mcpresource.js.map +1 -0
- package/models/components/mcptool.d.ts +11 -0
- package/models/components/mcptool.d.ts.map +1 -0
- package/models/components/mcptool.js +51 -0
- package/models/components/mcptool.js.map +1 -0
- package/models/components/responseenvelopecenseyejobslistresponse.d.ts +11 -0
- package/models/components/responseenvelopecenseyejobslistresponse.d.ts.map +1 -0
- package/models/components/responseenvelopecenseyejobslistresponse.js +51 -0
- package/models/components/responseenvelopecenseyejobslistresponse.js.map +1 -0
- package/models/operations/index.d.ts +1 -0
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +1 -0
- package/models/operations/index.js.map +1 -1
- package/models/operations/v3threathuntingcenseyejobslist.d.ts +55 -0
- package/models/operations/v3threathuntingcenseyejobslist.d.ts.map +1 -0
- package/models/operations/v3threathuntingcenseyejobslist.js +80 -0
- package/models/operations/v3threathuntingcenseyejobslist.js.map +1 -0
- package/package.json +1 -1
- package/sdk/adversaryinvestigation.d.ts +1 -1
- package/sdk/adversaryinvestigation.js +1 -1
- package/sdk/threathunting.d.ts +8 -1
- package/sdk/threathunting.d.ts.map +1 -1
- package/sdk/threathunting.js +11 -1
- package/sdk/threathunting.js.map +1 -1
- package/src/funcs/accountManagementGetMemberCreditUsage.ts +3 -1
- package/src/funcs/accountManagementGetOrganizationCreditUsage.ts +3 -1
- package/src/funcs/accountManagementGetOrganizationCredits.ts +3 -1
- package/src/funcs/accountManagementGetOrganizationDetails.ts +3 -1
- package/src/funcs/accountManagementGetUserCredits.ts +3 -1
- package/src/funcs/accountManagementGetUserCreditsUsage.ts +3 -1
- package/src/funcs/accountManagementInviteUserToOrganization.ts +3 -1
- package/src/funcs/accountManagementListOrganizationMembers.ts +3 -1
- package/src/funcs/accountManagementRemoveOrganizationMember.ts +3 -1
- package/src/funcs/accountManagementUpdateOrganizationMember.ts +3 -1
- package/src/funcs/collectionsAggregate.ts +3 -1
- package/src/funcs/collectionsCreate.ts +3 -1
- package/src/funcs/collectionsDelete.ts +3 -1
- package/src/funcs/collectionsGet.ts +3 -1
- package/src/funcs/collectionsList.ts +3 -1
- package/src/funcs/collectionsListEvents.ts +3 -1
- package/src/funcs/collectionsSearch.ts +3 -1
- package/src/funcs/collectionsUpdate.ts +3 -1
- package/src/funcs/globalDataAggregate.ts +3 -1
- package/src/funcs/globalDataConvertLegacySearchQueries.ts +3 -1
- package/src/funcs/globalDataCreateTrackedScan.ts +3 -1
- package/src/funcs/globalDataGetCertificate.ts +3 -1
- package/src/funcs/globalDataGetCertificateRaw.ts +3 -1
- package/src/funcs/globalDataGetCertificates.ts +3 -1
- package/src/funcs/globalDataGetCertificatesRaw.ts +3 -1
- package/src/funcs/globalDataGetHost.ts +3 -1
- package/src/funcs/globalDataGetHostTimeline.ts +3 -1
- package/src/funcs/globalDataGetHosts.ts +3 -1
- package/src/funcs/globalDataGetTrackedScan.ts +3 -1
- package/src/funcs/globalDataGetWebProperties.ts +3 -1
- package/src/funcs/globalDataGetWebProperty.ts +3 -1
- package/src/funcs/globalDataListServicesOnHost.ts +3 -1
- package/src/funcs/globalDataSearch.ts +3 -1
- package/src/funcs/threatHuntingCreateCenseyeJob.ts +4 -2
- package/src/funcs/threatHuntingCreateTrackedScan.ts +3 -1
- package/src/funcs/threatHuntingGetCenseyeJob.ts +3 -1
- package/src/funcs/threatHuntingGetCenseyeJobResults.ts +3 -1
- package/src/funcs/threatHuntingGetHostObservationsWithCertificate.ts +3 -1
- package/src/funcs/threatHuntingGetTrackedScanThreatHunting.ts +3 -1
- package/src/funcs/threatHuntingListCenseyeJobs.ts +199 -0
- package/src/funcs/threatHuntingListThreats.ts +3 -1
- package/src/funcs/threatHuntingValueCounts.ts +3 -1
- package/src/lib/config.ts +4 -4
- package/src/lib/encodings.ts +9 -0
- package/src/lib/sdks.ts +3 -6
- package/src/models/components/censeyejobslistresponse.ts +45 -0
- package/src/models/components/endpointscan.ts +3 -0
- package/src/models/components/endpointscanstate.ts +3 -0
- package/src/models/components/greynoise.ts +10 -0
- package/src/models/components/index.ts +6 -0
- package/src/models/components/mcp.ts +48 -0
- package/src/models/components/mcpprompt.ts +31 -0
- package/src/models/components/mcpresource.ts +44 -0
- package/src/models/components/mcptool.ts +30 -0
- package/src/models/components/responseenvelopecenseyejobslistresponse.ts +41 -0
- package/src/models/operations/index.ts +1 -0
- package/src/models/operations/v3threathuntingcenseyejobslist.ts +115 -0
- package/src/sdk/adversaryinvestigation.ts +1 -1
- package/src/sdk/threathunting.ts +19 -1
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import { SDKCore } from "../core.js";
|
|
6
6
|
import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
|
|
7
|
+
import { matchStatusCode } from "../lib/http.js";
|
|
7
8
|
import * as M from "../lib/matchers.js";
|
|
8
9
|
import { compactMap } from "../lib/primitives.js";
|
|
9
10
|
import { safeParse } from "../lib/schemas.js";
|
|
@@ -147,7 +148,8 @@ async function $do(
|
|
|
147
148
|
|
|
148
149
|
const doResult = await client._do(req, {
|
|
149
150
|
context,
|
|
150
|
-
|
|
151
|
+
isErrorStatusCode: (statusCode: number) =>
|
|
152
|
+
matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
|
|
151
153
|
retryConfig: context.retryConfig,
|
|
152
154
|
retryCodes: context.retryCodes,
|
|
153
155
|
});
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import { SDKCore } from "../core.js";
|
|
6
6
|
import { encodeFormQuery, encodeJSON } from "../lib/encodings.js";
|
|
7
|
+
import { matchStatusCode } from "../lib/http.js";
|
|
7
8
|
import * as M from "../lib/matchers.js";
|
|
8
9
|
import { compactMap } from "../lib/primitives.js";
|
|
9
10
|
import { safeParse } from "../lib/schemas.js";
|
|
@@ -145,7 +146,8 @@ async function $do(
|
|
|
145
146
|
|
|
146
147
|
const doResult = await client._do(req, {
|
|
147
148
|
context,
|
|
148
|
-
|
|
149
|
+
isErrorStatusCode: (statusCode: number) =>
|
|
150
|
+
matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
|
|
149
151
|
retryConfig: context.retryConfig,
|
|
150
152
|
retryCodes: context.retryCodes,
|
|
151
153
|
});
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import { SDKCore } from "../core.js";
|
|
6
6
|
import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
|
|
7
|
+
import { matchStatusCode } from "../lib/http.js";
|
|
7
8
|
import * as M from "../lib/matchers.js";
|
|
8
9
|
import { compactMap } from "../lib/primitives.js";
|
|
9
10
|
import { safeParse } from "../lib/schemas.js";
|
|
@@ -152,7 +153,8 @@ async function $do(
|
|
|
152
153
|
|
|
153
154
|
const doResult = await client._do(req, {
|
|
154
155
|
context,
|
|
155
|
-
|
|
156
|
+
isErrorStatusCode: (statusCode: number) =>
|
|
157
|
+
matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
|
|
156
158
|
retryConfig: context.retryConfig,
|
|
157
159
|
retryCodes: context.retryCodes,
|
|
158
160
|
});
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import { SDKCore } from "../core.js";
|
|
6
6
|
import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
|
|
7
|
+
import { matchStatusCode } from "../lib/http.js";
|
|
7
8
|
import * as M from "../lib/matchers.js";
|
|
8
9
|
import { compactMap } from "../lib/primitives.js";
|
|
9
10
|
import { safeParse } from "../lib/schemas.js";
|
|
@@ -157,7 +158,8 @@ async function $do(
|
|
|
157
158
|
|
|
158
159
|
const doResult = await client._do(req, {
|
|
159
160
|
context,
|
|
160
|
-
|
|
161
|
+
isErrorStatusCode: (statusCode: number) =>
|
|
162
|
+
matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
|
|
161
163
|
retryConfig: context.retryConfig,
|
|
162
164
|
retryCodes: context.retryCodes,
|
|
163
165
|
});
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import { SDKCore } from "../core.js";
|
|
6
6
|
import { encodeFormQuery, encodeJSON } from "../lib/encodings.js";
|
|
7
|
+
import { matchStatusCode } from "../lib/http.js";
|
|
7
8
|
import * as M from "../lib/matchers.js";
|
|
8
9
|
import { compactMap } from "../lib/primitives.js";
|
|
9
10
|
import { safeParse } from "../lib/schemas.js";
|
|
@@ -144,7 +145,8 @@ async function $do(
|
|
|
144
145
|
|
|
145
146
|
const doResult = await client._do(req, {
|
|
146
147
|
context,
|
|
147
|
-
|
|
148
|
+
isErrorStatusCode: (statusCode: number) =>
|
|
149
|
+
matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
|
|
148
150
|
retryConfig: context.retryConfig,
|
|
149
151
|
retryCodes: context.retryCodes,
|
|
150
152
|
});
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import { SDKCore } from "../core.js";
|
|
6
6
|
import { encodeFormQuery, encodeJSON } from "../lib/encodings.js";
|
|
7
|
+
import { matchStatusCode } from "../lib/http.js";
|
|
7
8
|
import * as M from "../lib/matchers.js";
|
|
8
9
|
import { compactMap } from "../lib/primitives.js";
|
|
9
10
|
import { safeParse } from "../lib/schemas.js";
|
|
@@ -29,7 +30,7 @@ import { Result } from "../types/fp.js";
|
|
|
29
30
|
* CensEye: Create a pivot analysis job
|
|
30
31
|
*
|
|
31
32
|
* @remarks
|
|
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
|
+
* 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.<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
34
|
*/
|
|
34
35
|
export function threatHuntingCreateCenseyeJob(
|
|
35
36
|
client: SDKCore,
|
|
@@ -146,7 +147,8 @@ async function $do(
|
|
|
146
147
|
|
|
147
148
|
const doResult = await client._do(req, {
|
|
148
149
|
context,
|
|
149
|
-
|
|
150
|
+
isErrorStatusCode: (statusCode: number) =>
|
|
151
|
+
matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
|
|
150
152
|
retryConfig: context.retryConfig,
|
|
151
153
|
retryCodes: context.retryCodes,
|
|
152
154
|
});
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import { SDKCore } from "../core.js";
|
|
6
6
|
import { encodeFormQuery, encodeJSON } from "../lib/encodings.js";
|
|
7
|
+
import { matchStatusCode } from "../lib/http.js";
|
|
7
8
|
import * as M from "../lib/matchers.js";
|
|
8
9
|
import { compactMap } from "../lib/primitives.js";
|
|
9
10
|
import { safeParse } from "../lib/schemas.js";
|
|
@@ -146,7 +147,8 @@ async function $do(
|
|
|
146
147
|
|
|
147
148
|
const doResult = await client._do(req, {
|
|
148
149
|
context,
|
|
149
|
-
|
|
150
|
+
isErrorStatusCode: (statusCode: number) =>
|
|
151
|
+
matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
|
|
150
152
|
retryConfig: context.retryConfig,
|
|
151
153
|
retryCodes: context.retryCodes,
|
|
152
154
|
});
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import { SDKCore } from "../core.js";
|
|
6
6
|
import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
|
|
7
|
+
import { matchStatusCode } from "../lib/http.js";
|
|
7
8
|
import * as M from "../lib/matchers.js";
|
|
8
9
|
import { compactMap } from "../lib/primitives.js";
|
|
9
10
|
import { safeParse } from "../lib/schemas.js";
|
|
@@ -151,7 +152,8 @@ async function $do(
|
|
|
151
152
|
|
|
152
153
|
const doResult = await client._do(req, {
|
|
153
154
|
context,
|
|
154
|
-
|
|
155
|
+
isErrorStatusCode: (statusCode: number) =>
|
|
156
|
+
matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
|
|
155
157
|
retryConfig: context.retryConfig,
|
|
156
158
|
retryCodes: context.retryCodes,
|
|
157
159
|
});
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import { SDKCore } from "../core.js";
|
|
6
6
|
import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
|
|
7
|
+
import { matchStatusCode } from "../lib/http.js";
|
|
7
8
|
import * as M from "../lib/matchers.js";
|
|
8
9
|
import { compactMap } from "../lib/primitives.js";
|
|
9
10
|
import { safeParse } from "../lib/schemas.js";
|
|
@@ -153,7 +154,8 @@ async function $do(
|
|
|
153
154
|
|
|
154
155
|
const doResult = await client._do(req, {
|
|
155
156
|
context,
|
|
156
|
-
|
|
157
|
+
isErrorStatusCode: (statusCode: number) =>
|
|
158
|
+
matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
|
|
157
159
|
retryConfig: context.retryConfig,
|
|
158
160
|
retryCodes: context.retryCodes,
|
|
159
161
|
});
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import { SDKCore } from "../core.js";
|
|
6
6
|
import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
|
|
7
|
+
import { matchStatusCode } from "../lib/http.js";
|
|
7
8
|
import * as M from "../lib/matchers.js";
|
|
8
9
|
import { compactMap } from "../lib/primitives.js";
|
|
9
10
|
import { safeParse } from "../lib/schemas.js";
|
|
@@ -157,7 +158,8 @@ async function $do(
|
|
|
157
158
|
|
|
158
159
|
const doResult = await client._do(req, {
|
|
159
160
|
context,
|
|
160
|
-
|
|
161
|
+
isErrorStatusCode: (statusCode: number) =>
|
|
162
|
+
matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
|
|
161
163
|
retryConfig: context.retryConfig,
|
|
162
164
|
retryCodes: context.retryCodes,
|
|
163
165
|
});
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import { SDKCore } from "../core.js";
|
|
6
6
|
import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
|
|
7
|
+
import { matchStatusCode } from "../lib/http.js";
|
|
7
8
|
import * as M from "../lib/matchers.js";
|
|
8
9
|
import { compactMap } from "../lib/primitives.js";
|
|
9
10
|
import { safeParse } from "../lib/schemas.js";
|
|
@@ -147,7 +148,8 @@ async function $do(
|
|
|
147
148
|
|
|
148
149
|
const doResult = await client._do(req, {
|
|
149
150
|
context,
|
|
150
|
-
|
|
151
|
+
isErrorStatusCode: (statusCode: number) =>
|
|
152
|
+
matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
|
|
151
153
|
retryConfig: context.retryConfig,
|
|
152
154
|
retryCodes: context.retryCodes,
|
|
153
155
|
});
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { SDKCore } from "../core.js";
|
|
6
|
+
import { encodeFormQuery } from "../lib/encodings.js";
|
|
7
|
+
import { matchStatusCode } from "../lib/http.js";
|
|
8
|
+
import * as M from "../lib/matchers.js";
|
|
9
|
+
import { compactMap } from "../lib/primitives.js";
|
|
10
|
+
import { safeParse } from "../lib/schemas.js";
|
|
11
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
12
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
13
|
+
import { pathToFunc } from "../lib/url.js";
|
|
14
|
+
import {
|
|
15
|
+
ConnectionError,
|
|
16
|
+
InvalidRequestError,
|
|
17
|
+
RequestAbortedError,
|
|
18
|
+
RequestTimeoutError,
|
|
19
|
+
UnexpectedClientError,
|
|
20
|
+
} from "../models/errors/httpclienterrors.js";
|
|
21
|
+
import * as errors from "../models/errors/index.js";
|
|
22
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
23
|
+
import { SDKBaseError } from "../models/errors/sdkbaseerror.js";
|
|
24
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
25
|
+
import * as operations from "../models/operations/index.js";
|
|
26
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
27
|
+
import { Result } from "../types/fp.js";
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* CensEye: List jobs
|
|
31
|
+
*
|
|
32
|
+
* @remarks
|
|
33
|
+
* List CensEye pivot analysis jobs for the current organization. Results are paginated. Optionally filter by asset (host, web property, or certificate).
|
|
34
|
+
*/
|
|
35
|
+
export function threatHuntingListCenseyeJobs(
|
|
36
|
+
client: SDKCore,
|
|
37
|
+
request: operations.V3ThreathuntingCenseyeJobsListRequest,
|
|
38
|
+
options?: RequestOptions,
|
|
39
|
+
): APIPromise<
|
|
40
|
+
Result<
|
|
41
|
+
operations.V3ThreathuntingCenseyeJobsListResponse,
|
|
42
|
+
| errors.AuthenticationError
|
|
43
|
+
| errors.ErrorModel
|
|
44
|
+
| SDKBaseError
|
|
45
|
+
| ResponseValidationError
|
|
46
|
+
| ConnectionError
|
|
47
|
+
| RequestAbortedError
|
|
48
|
+
| RequestTimeoutError
|
|
49
|
+
| InvalidRequestError
|
|
50
|
+
| UnexpectedClientError
|
|
51
|
+
| SDKValidationError
|
|
52
|
+
>
|
|
53
|
+
> {
|
|
54
|
+
return new APIPromise($do(
|
|
55
|
+
client,
|
|
56
|
+
request,
|
|
57
|
+
options,
|
|
58
|
+
));
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
async function $do(
|
|
62
|
+
client: SDKCore,
|
|
63
|
+
request: operations.V3ThreathuntingCenseyeJobsListRequest,
|
|
64
|
+
options?: RequestOptions,
|
|
65
|
+
): Promise<
|
|
66
|
+
[
|
|
67
|
+
Result<
|
|
68
|
+
operations.V3ThreathuntingCenseyeJobsListResponse,
|
|
69
|
+
| errors.AuthenticationError
|
|
70
|
+
| errors.ErrorModel
|
|
71
|
+
| SDKBaseError
|
|
72
|
+
| ResponseValidationError
|
|
73
|
+
| ConnectionError
|
|
74
|
+
| RequestAbortedError
|
|
75
|
+
| RequestTimeoutError
|
|
76
|
+
| InvalidRequestError
|
|
77
|
+
| UnexpectedClientError
|
|
78
|
+
| SDKValidationError
|
|
79
|
+
>,
|
|
80
|
+
APICall,
|
|
81
|
+
]
|
|
82
|
+
> {
|
|
83
|
+
const parsed = safeParse(
|
|
84
|
+
request,
|
|
85
|
+
(value) =>
|
|
86
|
+
operations.V3ThreathuntingCenseyeJobsListRequest$outboundSchema.parse(
|
|
87
|
+
value,
|
|
88
|
+
),
|
|
89
|
+
"Input validation failed",
|
|
90
|
+
);
|
|
91
|
+
if (!parsed.ok) {
|
|
92
|
+
return [parsed, { status: "invalid" }];
|
|
93
|
+
}
|
|
94
|
+
const payload = parsed.value;
|
|
95
|
+
const body = null;
|
|
96
|
+
|
|
97
|
+
const path = pathToFunc("/v3/threat-hunting/censeye/jobs")();
|
|
98
|
+
|
|
99
|
+
const query = encodeFormQuery({
|
|
100
|
+
"certificate_id": payload.certificate_id,
|
|
101
|
+
"host_id": payload.host_id,
|
|
102
|
+
"organization_id": payload.organization_id
|
|
103
|
+
?? client._options.organizationId,
|
|
104
|
+
"page_size": payload.page_size,
|
|
105
|
+
"page_token": payload.page_token,
|
|
106
|
+
"webproperty_id": payload.webproperty_id,
|
|
107
|
+
}, { explode: false });
|
|
108
|
+
|
|
109
|
+
const headers = new Headers(compactMap({
|
|
110
|
+
Accept: "application/json",
|
|
111
|
+
}));
|
|
112
|
+
|
|
113
|
+
const secConfig = await extractSecurity(client._options.personalAccessToken);
|
|
114
|
+
const securityInput = secConfig == null
|
|
115
|
+
? {}
|
|
116
|
+
: { personalAccessToken: secConfig };
|
|
117
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
118
|
+
|
|
119
|
+
const context = {
|
|
120
|
+
options: client._options,
|
|
121
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
122
|
+
operationID: "v3-threathunting-censeye-jobs-list",
|
|
123
|
+
oAuth2Scopes: null,
|
|
124
|
+
|
|
125
|
+
resolvedSecurity: requestSecurity,
|
|
126
|
+
|
|
127
|
+
securitySource: client._options.personalAccessToken,
|
|
128
|
+
retryConfig: options?.retries
|
|
129
|
+
|| client._options.retryConfig
|
|
130
|
+
|| { strategy: "none" },
|
|
131
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
const requestRes = client._createRequest(context, {
|
|
135
|
+
security: requestSecurity,
|
|
136
|
+
method: "GET",
|
|
137
|
+
baseURL: options?.serverURL,
|
|
138
|
+
path: path,
|
|
139
|
+
headers: headers,
|
|
140
|
+
query: query,
|
|
141
|
+
body: body,
|
|
142
|
+
userAgent: client._options.userAgent,
|
|
143
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
144
|
+
}, options);
|
|
145
|
+
if (!requestRes.ok) {
|
|
146
|
+
return [requestRes, { status: "invalid" }];
|
|
147
|
+
}
|
|
148
|
+
const req = requestRes.value;
|
|
149
|
+
|
|
150
|
+
const doResult = await client._do(req, {
|
|
151
|
+
context,
|
|
152
|
+
isErrorStatusCode: (statusCode: number) =>
|
|
153
|
+
matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
|
|
154
|
+
retryConfig: context.retryConfig,
|
|
155
|
+
retryCodes: context.retryCodes,
|
|
156
|
+
});
|
|
157
|
+
if (!doResult.ok) {
|
|
158
|
+
return [doResult, { status: "request-error", request: req }];
|
|
159
|
+
}
|
|
160
|
+
const response = doResult.value;
|
|
161
|
+
|
|
162
|
+
const responseFields = {
|
|
163
|
+
HttpMeta: { Response: response, Request: req },
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
const [result] = await M.match<
|
|
167
|
+
operations.V3ThreathuntingCenseyeJobsListResponse,
|
|
168
|
+
| errors.AuthenticationError
|
|
169
|
+
| errors.ErrorModel
|
|
170
|
+
| SDKBaseError
|
|
171
|
+
| ResponseValidationError
|
|
172
|
+
| ConnectionError
|
|
173
|
+
| RequestAbortedError
|
|
174
|
+
| RequestTimeoutError
|
|
175
|
+
| InvalidRequestError
|
|
176
|
+
| UnexpectedClientError
|
|
177
|
+
| SDKValidationError
|
|
178
|
+
>(
|
|
179
|
+
M.json(
|
|
180
|
+
200,
|
|
181
|
+
operations.V3ThreathuntingCenseyeJobsListResponse$inboundSchema,
|
|
182
|
+
{ hdrs: true, key: "Result" },
|
|
183
|
+
),
|
|
184
|
+
M.jsonErr(401, errors.AuthenticationError$inboundSchema),
|
|
185
|
+
M.jsonErr([400, 403, 409], errors.ErrorModel$inboundSchema, {
|
|
186
|
+
ctype: "application/problem+json",
|
|
187
|
+
}),
|
|
188
|
+
M.jsonErr(500, errors.ErrorModel$inboundSchema, {
|
|
189
|
+
ctype: "application/problem+json",
|
|
190
|
+
}),
|
|
191
|
+
M.fail("4XX"),
|
|
192
|
+
M.fail("5XX"),
|
|
193
|
+
)(response, req, { extraFields: responseFields });
|
|
194
|
+
if (!result.ok) {
|
|
195
|
+
return [result, { status: "complete", request: req, response }];
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
return [result, { status: "complete", request: req, response }];
|
|
199
|
+
}
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import { SDKCore } from "../core.js";
|
|
6
6
|
import { encodeFormQuery } from "../lib/encodings.js";
|
|
7
|
+
import { matchStatusCode } from "../lib/http.js";
|
|
7
8
|
import * as M from "../lib/matchers.js";
|
|
8
9
|
import { compactMap } from "../lib/primitives.js";
|
|
9
10
|
import { safeParse } from "../lib/schemas.js";
|
|
@@ -142,7 +143,8 @@ async function $do(
|
|
|
142
143
|
|
|
143
144
|
const doResult = await client._do(req, {
|
|
144
145
|
context,
|
|
145
|
-
|
|
146
|
+
isErrorStatusCode: (statusCode: number) =>
|
|
147
|
+
matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
|
|
146
148
|
retryConfig: context.retryConfig,
|
|
147
149
|
retryCodes: context.retryCodes,
|
|
148
150
|
});
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import { SDKCore } from "../core.js";
|
|
6
6
|
import { encodeFormQuery, encodeJSON } from "../lib/encodings.js";
|
|
7
|
+
import { matchStatusCode } from "../lib/http.js";
|
|
7
8
|
import * as M from "../lib/matchers.js";
|
|
8
9
|
import { compactMap } from "../lib/primitives.js";
|
|
9
10
|
import { safeParse } from "../lib/schemas.js";
|
|
@@ -144,7 +145,8 @@ async function $do(
|
|
|
144
145
|
|
|
145
146
|
const doResult = await client._do(req, {
|
|
146
147
|
context,
|
|
147
|
-
|
|
148
|
+
isErrorStatusCode: (statusCode: number) =>
|
|
149
|
+
matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
|
|
148
150
|
retryConfig: context.retryConfig,
|
|
149
151
|
retryCodes: context.retryCodes,
|
|
150
152
|
});
|
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.10.
|
|
70
|
-
genVersion: "2.
|
|
68
|
+
openapiDocVersion: "1.0.92",
|
|
69
|
+
sdkVersion: "0.10.5",
|
|
70
|
+
genVersion: "2.881.4",
|
|
71
71
|
userAgent:
|
|
72
|
-
"speakeasy-sdk/typescript 0.10.
|
|
72
|
+
"speakeasy-sdk/typescript 0.10.5 2.881.4 1.0.92 @censys/platform-sdk",
|
|
73
73
|
} as const;
|
package/src/lib/encodings.ts
CHANGED
|
@@ -514,3 +514,12 @@ export function appendForm(
|
|
|
514
514
|
fd.append(key, String(value));
|
|
515
515
|
}
|
|
516
516
|
}
|
|
517
|
+
|
|
518
|
+
export async function normalizeBlob(
|
|
519
|
+
value: Pick<Blob, "arrayBuffer" | "type">,
|
|
520
|
+
): Promise<Blob> {
|
|
521
|
+
if (value instanceof Blob) {
|
|
522
|
+
return value;
|
|
523
|
+
}
|
|
524
|
+
return new Blob([await value.arrayBuffer()], { type: value.type });
|
|
525
|
+
}
|
package/src/lib/sdks.ts
CHANGED
|
@@ -21,7 +21,6 @@ import {
|
|
|
21
21
|
isConnectionError,
|
|
22
22
|
isTimeoutError,
|
|
23
23
|
matchContentType,
|
|
24
|
-
matchStatusCode,
|
|
25
24
|
} from "./http.js";
|
|
26
25
|
import { Logger } from "./logger.js";
|
|
27
26
|
import { retry, RetryConfig } from "./retries.js";
|
|
@@ -230,7 +229,7 @@ export class ClientSDK {
|
|
|
230
229
|
request: Request,
|
|
231
230
|
options: {
|
|
232
231
|
context: HookContext;
|
|
233
|
-
|
|
232
|
+
isErrorStatusCode: (statusCode: number) => boolean;
|
|
234
233
|
retryConfig: RetryConfig;
|
|
235
234
|
retryCodes: string[];
|
|
236
235
|
},
|
|
@@ -243,7 +242,7 @@ export class ClientSDK {
|
|
|
243
242
|
| UnexpectedClientError
|
|
244
243
|
>
|
|
245
244
|
> {
|
|
246
|
-
const { context,
|
|
245
|
+
const { context, isErrorStatusCode } = options;
|
|
247
246
|
|
|
248
247
|
return retry(
|
|
249
248
|
async () => {
|
|
@@ -255,7 +254,7 @@ export class ClientSDK {
|
|
|
255
254
|
let response = await this.#httpClient.request(req);
|
|
256
255
|
|
|
257
256
|
try {
|
|
258
|
-
if (
|
|
257
|
+
if (isErrorStatusCode(response.status)) {
|
|
259
258
|
const result = await this.#hooks.afterError(
|
|
260
259
|
context,
|
|
261
260
|
response,
|
|
@@ -379,8 +378,6 @@ async function logResponse(
|
|
|
379
378
|
break;
|
|
380
379
|
case matchContentType(res, "application/jsonl")
|
|
381
380
|
|| jsonlLikeContentTypeRE.test(ct):
|
|
382
|
-
logger.log(await res.clone().text());
|
|
383
|
-
break;
|
|
384
381
|
case matchContentType(res, "text/event-stream"):
|
|
385
382
|
logger.log(`<${contentType}>`);
|
|
386
383
|
break;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
import { CenseyeJob, CenseyeJob$inboundSchema } from "./censeyejob.js";
|
|
11
|
+
|
|
12
|
+
export type CenseyeJobsListResponse = {
|
|
13
|
+
/**
|
|
14
|
+
* List of CensEye jobs.
|
|
15
|
+
*/
|
|
16
|
+
jobs: Array<CenseyeJob> | null;
|
|
17
|
+
/**
|
|
18
|
+
* Token to retrieve the next page of jobs.
|
|
19
|
+
*/
|
|
20
|
+
nextPageToken?: string | undefined;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
/** @internal */
|
|
24
|
+
export const CenseyeJobsListResponse$inboundSchema: z.ZodType<
|
|
25
|
+
CenseyeJobsListResponse,
|
|
26
|
+
z.ZodTypeDef,
|
|
27
|
+
unknown
|
|
28
|
+
> = z.object({
|
|
29
|
+
jobs: z.nullable(z.array(CenseyeJob$inboundSchema)),
|
|
30
|
+
next_page_token: z.string().optional(),
|
|
31
|
+
}).transform((v) => {
|
|
32
|
+
return remap$(v, {
|
|
33
|
+
"next_page_token": "nextPageToken",
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
export function censeyeJobsListResponseFromJSON(
|
|
38
|
+
jsonString: string,
|
|
39
|
+
): SafeParseResult<CenseyeJobsListResponse, SDKValidationError> {
|
|
40
|
+
return safeParse(
|
|
41
|
+
jsonString,
|
|
42
|
+
(x) => CenseyeJobsListResponse$inboundSchema.parse(JSON.parse(x)),
|
|
43
|
+
`Failed to parse 'CenseyeJobsListResponse' from JSON`,
|
|
44
|
+
);
|
|
45
|
+
}
|
|
@@ -24,6 +24,7 @@ import {
|
|
|
24
24
|
} from "./ivantiavalanche.js";
|
|
25
25
|
import { Jenkins, Jenkins$inboundSchema } from "./jenkins.js";
|
|
26
26
|
import { Kubernetes, Kubernetes$inboundSchema } from "./kubernetes.js";
|
|
27
|
+
import { Mcp, Mcp$inboundSchema } from "./mcp.js";
|
|
27
28
|
import { Ollama, Ollama$inboundSchema } from "./ollama.js";
|
|
28
29
|
import { OpenDirectory, OpenDirectory$inboundSchema } from "./opendirectory.js";
|
|
29
30
|
import {
|
|
@@ -68,6 +69,7 @@ export type EndpointScan = {
|
|
|
68
69
|
ivantiAvalanche?: IvantiAvalanche | undefined;
|
|
69
70
|
jenkins?: Jenkins | undefined;
|
|
70
71
|
kubernetes?: Kubernetes | undefined;
|
|
72
|
+
mcp?: Mcp | undefined;
|
|
71
73
|
ollama?: Ollama | undefined;
|
|
72
74
|
openDirectory?: OpenDirectory | undefined;
|
|
73
75
|
path?: string | undefined;
|
|
@@ -112,6 +114,7 @@ export const EndpointScan$inboundSchema: z.ZodType<
|
|
|
112
114
|
ivanti_avalanche: IvantiAvalanche$inboundSchema.optional(),
|
|
113
115
|
jenkins: Jenkins$inboundSchema.optional(),
|
|
114
116
|
kubernetes: Kubernetes$inboundSchema.optional(),
|
|
117
|
+
mcp: Mcp$inboundSchema.optional(),
|
|
115
118
|
ollama: Ollama$inboundSchema.optional(),
|
|
116
119
|
open_directory: OpenDirectory$inboundSchema.optional(),
|
|
117
120
|
path: z.string().optional(),
|
|
@@ -28,6 +28,7 @@ import {
|
|
|
28
28
|
} from "./ivantiavalanche.js";
|
|
29
29
|
import { Jenkins, Jenkins$inboundSchema } from "./jenkins.js";
|
|
30
30
|
import { Kubernetes, Kubernetes$inboundSchema } from "./kubernetes.js";
|
|
31
|
+
import { Mcp, Mcp$inboundSchema } from "./mcp.js";
|
|
31
32
|
import { Ollama, Ollama$inboundSchema } from "./ollama.js";
|
|
32
33
|
import { OpenDirectory, OpenDirectory$inboundSchema } from "./opendirectory.js";
|
|
33
34
|
import {
|
|
@@ -71,6 +72,7 @@ export type EndpointScanState = {
|
|
|
71
72
|
ivantiAvalanche?: IvantiAvalanche | undefined;
|
|
72
73
|
jenkins?: Jenkins | undefined;
|
|
73
74
|
kubernetes?: Kubernetes | undefined;
|
|
75
|
+
mcp?: Mcp | undefined;
|
|
74
76
|
ollama?: Ollama | undefined;
|
|
75
77
|
openDirectory?: OpenDirectory | undefined;
|
|
76
78
|
path?: string | undefined;
|
|
@@ -114,6 +116,7 @@ export const EndpointScanState$inboundSchema: z.ZodType<
|
|
|
114
116
|
ivanti_avalanche: IvantiAvalanche$inboundSchema.optional(),
|
|
115
117
|
jenkins: Jenkins$inboundSchema.optional(),
|
|
116
118
|
kubernetes: Kubernetes$inboundSchema.optional(),
|
|
119
|
+
mcp: Mcp$inboundSchema.optional(),
|
|
117
120
|
ollama: Ollama$inboundSchema.optional(),
|
|
118
121
|
open_directory: OpenDirectory$inboundSchema.optional(),
|
|
119
122
|
path: z.string().optional(),
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
6
7
|
import { safeParse } from "../../lib/schemas.js";
|
|
7
8
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
9
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
@@ -17,6 +18,10 @@ export type Greynoise = {
|
|
|
17
18
|
* The classification of the IP address.
|
|
18
19
|
*/
|
|
19
20
|
classification?: string | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* The last time the IP address was observed.
|
|
23
|
+
*/
|
|
24
|
+
lastObservedTime?: string | undefined;
|
|
20
25
|
/**
|
|
21
26
|
* The tags associated with the IP address.
|
|
22
27
|
*/
|
|
@@ -31,7 +36,12 @@ export const Greynoise$inboundSchema: z.ZodType<
|
|
|
31
36
|
> = z.object({
|
|
32
37
|
actor: z.string().optional(),
|
|
33
38
|
classification: z.string().optional(),
|
|
39
|
+
last_observed_time: z.string().optional(),
|
|
34
40
|
tags: z.nullable(z.array(GreynoiseTag$inboundSchema)).optional(),
|
|
41
|
+
}).transform((v) => {
|
|
42
|
+
return remap$(v, {
|
|
43
|
+
"last_observed_time": "lastObservedTime",
|
|
44
|
+
});
|
|
35
45
|
});
|
|
36
46
|
|
|
37
47
|
export function greynoiseFromJSON(
|