@censys/platform-sdk 0.8.0 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -6
- package/docs/sdks/accountmanagement/README.md +72 -2
- package/docs/sdks/collections/README.md +0 -1
- package/docs/sdks/globaldata/README.md +0 -1
- package/docs/sdks/threathunting/README.md +78 -1
- package/examples/package-lock.json +1 -1
- package/funcs/accountManagementGetOrganizationCredits.d.ts +1 -1
- package/funcs/accountManagementGetOrganizationCredits.js +1 -1
- package/funcs/accountManagementGetUserCredits.d.ts +18 -0
- package/funcs/accountManagementGetUserCredits.d.ts.map +1 -0
- package/funcs/accountManagementGetUserCredits.js +112 -0
- package/funcs/accountManagementGetUserCredits.js.map +1 -0
- package/funcs/threatHuntingListThreats.d.ts +18 -0
- package/funcs/threatHuntingListThreats.d.ts.map +1 -0
- package/funcs/threatHuntingListThreats.js +130 -0
- package/funcs/threatHuntingListThreats.js.map +1 -0
- 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 +12 -1
- package/lib/encodings.js.map +1 -1
- package/models/components/cobaltstrikeconfig.d.ts +1 -0
- package/models/components/cobaltstrikeconfig.d.ts.map +1 -1
- package/models/components/cobaltstrikeconfig.js +2 -0
- package/models/components/cobaltstrikeconfig.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/responseenvelopethreatslistresponse.d.ts +11 -0
- package/models/components/responseenvelopethreatslistresponse.d.ts.map +1 -0
- package/models/components/responseenvelopethreatslistresponse.js +51 -0
- package/models/components/responseenvelopethreatslistresponse.js.map +1 -0
- package/models/components/responseenvelopeusercredits.d.ts +11 -0
- package/models/components/responseenvelopeusercredits.d.ts.map +1 -0
- package/models/components/responseenvelopeusercredits.js +51 -0
- package/models/components/responseenvelopeusercredits.js.map +1 -0
- package/models/components/threatlistitem.d.ts +42 -0
- package/models/components/threatlistitem.d.ts.map +1 -0
- package/models/components/threatlistitem.js +66 -0
- package/models/components/threatlistitem.js.map +1 -0
- package/models/components/threatreference.d.ts +13 -0
- package/models/components/threatreference.d.ts.map +1 -0
- package/models/components/threatreference.js +50 -0
- package/models/components/threatreference.js.map +1 -0
- package/models/components/threatslistresponse.d.ts +14 -0
- package/models/components/threatslistresponse.d.ts.map +1 -0
- package/models/components/threatslistresponse.js +51 -0
- package/models/components/threatslistresponse.js.map +1 -0
- package/models/components/usercredits.d.ts +17 -0
- package/models/components/usercredits.d.ts.map +1 -0
- package/models/components/usercredits.js +57 -0
- package/models/components/usercredits.js.map +1 -0
- package/models/operations/index.d.ts +2 -0
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +2 -0
- package/models/operations/index.js.map +1 -1
- package/models/operations/v3accountmanagementusercredits.d.ts +14 -0
- package/models/operations/v3accountmanagementusercredits.d.ts.map +1 -0
- package/models/operations/v3accountmanagementusercredits.js +58 -0
- package/models/operations/v3accountmanagementusercredits.js.map +1 -0
- package/models/operations/v3globaldatasearchaggregate.d.ts +1 -1
- package/models/operations/v3globaldatasearchquery.d.ts +1 -1
- package/models/operations/v3threathuntingthreatslist.d.ts +35 -0
- package/models/operations/v3threathuntingthreatslist.d.ts.map +1 -0
- package/models/operations/v3threathuntingthreatslist.js +71 -0
- package/models/operations/v3threathuntingthreatslist.js.map +1 -0
- package/package.json +1 -1
- package/sdk/accountmanagement.d.ts +8 -1
- package/sdk/accountmanagement.d.ts.map +1 -1
- package/sdk/accountmanagement.js +11 -1
- package/sdk/accountmanagement.js.map +1 -1
- package/sdk/threathunting.d.ts +7 -0
- package/sdk/threathunting.d.ts.map +1 -1
- package/sdk/threathunting.js +10 -0
- package/sdk/threathunting.js.map +1 -1
- package/src/funcs/accountManagementGetOrganizationCredits.ts +1 -1
- package/src/funcs/accountManagementGetUserCredits.ts +163 -0
- package/src/funcs/threatHuntingListThreats.ts +187 -0
- package/src/lib/config.ts +4 -4
- package/src/lib/encodings.ts +17 -3
- package/src/models/components/cobaltstrikeconfig.ts +3 -0
- package/src/models/components/index.ts +6 -0
- package/src/models/components/responseenvelopethreatslistresponse.ts +36 -0
- package/src/models/components/responseenvelopeusercredits.ts +32 -0
- package/src/models/components/threatlistitem.ts +81 -0
- package/src/models/components/threatreference.ts +34 -0
- package/src/models/components/threatslistresponse.ts +38 -0
- package/src/models/components/usercredits.ts +45 -0
- package/src/models/operations/index.ts +2 -0
- package/src/models/operations/v3accountmanagementusercredits.ts +41 -0
- package/src/models/operations/v3globaldatasearchaggregate.ts +1 -1
- package/src/models/operations/v3globaldatasearchquery.ts +1 -1
- package/src/models/operations/v3threathuntingthreatslist.ts +86 -0
- package/src/sdk/accountmanagement.ts +17 -1
- package/src/sdk/threathunting.ts +18 -0
- package/src/types/enums.ts +38 -9
- package/src/types/index.ts +2 -2
- package/src/types/unrecognized.ts +35 -0
- package/tsconfig.json +1 -2
- package/types/enums.d.ts +8 -11
- package/types/enums.d.ts.map +1 -1
- package/types/enums.js +59 -3
- package/types/enums.js.map +1 -1
- package/types/index.d.ts +2 -2
- package/types/index.d.ts.map +1 -1
- package/types/index.js +16 -3
- package/types/index.js.map +1 -1
- package/types/unrecognized.d.ts +16 -0
- package/types/unrecognized.d.ts.map +1 -0
- package/types/unrecognized.js +34 -0
- package/types/unrecognized.js.map +1 -0
|
@@ -0,0 +1,34 @@
|
|
|
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 ThreatReference = {
|
|
11
|
+
/**
|
|
12
|
+
* URL reference link for the threat.
|
|
13
|
+
*/
|
|
14
|
+
link: string;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
/** @internal */
|
|
18
|
+
export const ThreatReference$inboundSchema: z.ZodType<
|
|
19
|
+
ThreatReference,
|
|
20
|
+
z.ZodTypeDef,
|
|
21
|
+
unknown
|
|
22
|
+
> = z.object({
|
|
23
|
+
link: z.string(),
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
export function threatReferenceFromJSON(
|
|
27
|
+
jsonString: string,
|
|
28
|
+
): SafeParseResult<ThreatReference, SDKValidationError> {
|
|
29
|
+
return safeParse(
|
|
30
|
+
jsonString,
|
|
31
|
+
(x) => ThreatReference$inboundSchema.parse(JSON.parse(x)),
|
|
32
|
+
`Failed to parse 'ThreatReference' from JSON`,
|
|
33
|
+
);
|
|
34
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
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
|
+
import {
|
|
10
|
+
ThreatListItem,
|
|
11
|
+
ThreatListItem$inboundSchema,
|
|
12
|
+
} from "./threatlistitem.js";
|
|
13
|
+
|
|
14
|
+
export type ThreatsListResponse = {
|
|
15
|
+
/**
|
|
16
|
+
* List of active threats observed on the platform.
|
|
17
|
+
*/
|
|
18
|
+
threats: Array<ThreatListItem> | null;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
/** @internal */
|
|
22
|
+
export const ThreatsListResponse$inboundSchema: z.ZodType<
|
|
23
|
+
ThreatsListResponse,
|
|
24
|
+
z.ZodTypeDef,
|
|
25
|
+
unknown
|
|
26
|
+
> = z.object({
|
|
27
|
+
threats: z.nullable(z.array(ThreatListItem$inboundSchema)),
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
export function threatsListResponseFromJSON(
|
|
31
|
+
jsonString: string,
|
|
32
|
+
): SafeParseResult<ThreatsListResponse, SDKValidationError> {
|
|
33
|
+
return safeParse(
|
|
34
|
+
jsonString,
|
|
35
|
+
(x) => ThreatsListResponse$inboundSchema.parse(JSON.parse(x)),
|
|
36
|
+
`Failed to parse 'ThreatsListResponse' from JSON`,
|
|
37
|
+
);
|
|
38
|
+
}
|
|
@@ -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
|
+
|
|
11
|
+
export type UserCredits = {
|
|
12
|
+
/**
|
|
13
|
+
* The current credit balance for the user.
|
|
14
|
+
*/
|
|
15
|
+
balance: number;
|
|
16
|
+
/**
|
|
17
|
+
* The date that the user's credits will be reset.
|
|
18
|
+
*/
|
|
19
|
+
resetsAt?: Date | undefined;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
/** @internal */
|
|
23
|
+
export const UserCredits$inboundSchema: z.ZodType<
|
|
24
|
+
UserCredits,
|
|
25
|
+
z.ZodTypeDef,
|
|
26
|
+
unknown
|
|
27
|
+
> = z.object({
|
|
28
|
+
balance: z.number().int(),
|
|
29
|
+
resets_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
30
|
+
.optional(),
|
|
31
|
+
}).transform((v) => {
|
|
32
|
+
return remap$(v, {
|
|
33
|
+
"resets_at": "resetsAt",
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
export function userCreditsFromJSON(
|
|
38
|
+
jsonString: string,
|
|
39
|
+
): SafeParseResult<UserCredits, SDKValidationError> {
|
|
40
|
+
return safeParse(
|
|
41
|
+
jsonString,
|
|
42
|
+
(x) => UserCredits$inboundSchema.parse(JSON.parse(x)),
|
|
43
|
+
`Failed to parse 'UserCredits' from JSON`,
|
|
44
|
+
);
|
|
45
|
+
}
|
|
@@ -10,6 +10,7 @@ export * from "./v3accountmanagementorgcreditsusage.js";
|
|
|
10
10
|
export * from "./v3accountmanagementorgdetails.js";
|
|
11
11
|
export * from "./v3accountmanagementremoveorgmember.js";
|
|
12
12
|
export * from "./v3accountmanagementupdateorgmember.js";
|
|
13
|
+
export * from "./v3accountmanagementusercredits.js";
|
|
13
14
|
export * from "./v3collectionscrudcreate.js";
|
|
14
15
|
export * from "./v3collectionscruddelete.js";
|
|
15
16
|
export * from "./v3collectionscrudget.js";
|
|
@@ -35,4 +36,5 @@ export * from "./v3globaldatasearchquery.js";
|
|
|
35
36
|
export * from "./v3threathuntinggethostobservationswithcertificate.js";
|
|
36
37
|
export * from "./v3threathuntingscansdiscovery.js";
|
|
37
38
|
export * from "./v3threathuntingscansget.js";
|
|
39
|
+
export * from "./v3threathuntingthreatslist.js";
|
|
38
40
|
export * from "./v3threathuntingvaluecounts.js";
|
|
@@ -0,0 +1,41 @@
|
|
|
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 * as components from "../components/index.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
|
|
12
|
+
export type V3AccountmanagementUserCreditsResponse = {
|
|
13
|
+
headers: { [k: string]: Array<string> };
|
|
14
|
+
result: components.ResponseEnvelopeUserCredits;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
/** @internal */
|
|
18
|
+
export const V3AccountmanagementUserCreditsResponse$inboundSchema: z.ZodType<
|
|
19
|
+
V3AccountmanagementUserCreditsResponse,
|
|
20
|
+
z.ZodTypeDef,
|
|
21
|
+
unknown
|
|
22
|
+
> = z.object({
|
|
23
|
+
Headers: z.record(z.array(z.string())).default({}),
|
|
24
|
+
Result: components.ResponseEnvelopeUserCredits$inboundSchema,
|
|
25
|
+
}).transform((v) => {
|
|
26
|
+
return remap$(v, {
|
|
27
|
+
"Headers": "headers",
|
|
28
|
+
"Result": "result",
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
export function v3AccountmanagementUserCreditsResponseFromJSON(
|
|
33
|
+
jsonString: string,
|
|
34
|
+
): SafeParseResult<V3AccountmanagementUserCreditsResponse, SDKValidationError> {
|
|
35
|
+
return safeParse(
|
|
36
|
+
jsonString,
|
|
37
|
+
(x) =>
|
|
38
|
+
V3AccountmanagementUserCreditsResponse$inboundSchema.parse(JSON.parse(x)),
|
|
39
|
+
`Failed to parse 'V3AccountmanagementUserCreditsResponse' from JSON`,
|
|
40
|
+
);
|
|
41
|
+
}
|
|
@@ -15,7 +15,7 @@ export type V3GlobaldataSearchAggregateGlobals = {
|
|
|
15
15
|
|
|
16
16
|
export type V3GlobaldataSearchAggregateRequest = {
|
|
17
17
|
/**
|
|
18
|
-
* The ID of a Censys organization to associate the request with. See the [Getting Started docs](https://docs.censys.com/reference/get-started#step-3-find-and-use-your-organization-id-optional) for more information.
|
|
18
|
+
* The ID of a Censys organization to associate the request with. If omitted, the request will be processed using the authenticated user's free wallet where applicable. See the [Getting Started docs](https://docs.censys.com/reference/get-started#step-3-find-and-use-your-organization-id-optional) for more information.
|
|
19
19
|
*/
|
|
20
20
|
organizationId?: string | undefined;
|
|
21
21
|
searchAggregateInputBody: components.SearchAggregateInputBody;
|
|
@@ -15,7 +15,7 @@ export type V3GlobaldataSearchQueryGlobals = {
|
|
|
15
15
|
|
|
16
16
|
export type V3GlobaldataSearchQueryRequest = {
|
|
17
17
|
/**
|
|
18
|
-
* The ID of a Censys organization to associate the request with. See the [Getting Started docs](https://docs.censys.com/reference/get-started#step-3-find-and-use-your-organization-id-optional) for more information.
|
|
18
|
+
* The ID of a Censys organization to associate the request with. If omitted, the request will be processed using the authenticated user's free wallet where applicable. See the [Getting Started docs](https://docs.censys.com/reference/get-started#step-3-find-and-use-your-organization-id-optional) for more information.
|
|
19
19
|
*/
|
|
20
20
|
organizationId?: string | undefined;
|
|
21
21
|
searchQueryInputBody: components.SearchQueryInputBody;
|
|
@@ -0,0 +1,86 @@
|
|
|
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 * as components from "../components/index.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
|
|
12
|
+
export type V3ThreathuntingThreatsListGlobals = {
|
|
13
|
+
organizationId?: string | undefined;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export type V3ThreathuntingThreatsListRequest = {
|
|
17
|
+
/**
|
|
18
|
+
* The ID of a Censys organization to associate the request with. See the [Getting Started docs](https://docs.censys.com/reference/get-started#step-3-find-and-use-your-organization-id-optional) for more information.
|
|
19
|
+
*/
|
|
20
|
+
organizationId?: string | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* Optional CenQL filter to constrain threats list
|
|
23
|
+
*/
|
|
24
|
+
query?: string | undefined;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export type V3ThreathuntingThreatsListResponse = {
|
|
28
|
+
headers: { [k: string]: Array<string> };
|
|
29
|
+
result: components.ResponseEnvelopeThreatsListResponse;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
/** @internal */
|
|
33
|
+
export type V3ThreathuntingThreatsListRequest$Outbound = {
|
|
34
|
+
organization_id?: string | undefined;
|
|
35
|
+
query?: string | undefined;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
/** @internal */
|
|
39
|
+
export const V3ThreathuntingThreatsListRequest$outboundSchema: z.ZodType<
|
|
40
|
+
V3ThreathuntingThreatsListRequest$Outbound,
|
|
41
|
+
z.ZodTypeDef,
|
|
42
|
+
V3ThreathuntingThreatsListRequest
|
|
43
|
+
> = z.object({
|
|
44
|
+
organizationId: z.string().optional(),
|
|
45
|
+
query: z.string().optional(),
|
|
46
|
+
}).transform((v) => {
|
|
47
|
+
return remap$(v, {
|
|
48
|
+
organizationId: "organization_id",
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
export function v3ThreathuntingThreatsListRequestToJSON(
|
|
53
|
+
v3ThreathuntingThreatsListRequest: V3ThreathuntingThreatsListRequest,
|
|
54
|
+
): string {
|
|
55
|
+
return JSON.stringify(
|
|
56
|
+
V3ThreathuntingThreatsListRequest$outboundSchema.parse(
|
|
57
|
+
v3ThreathuntingThreatsListRequest,
|
|
58
|
+
),
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/** @internal */
|
|
63
|
+
export const V3ThreathuntingThreatsListResponse$inboundSchema: z.ZodType<
|
|
64
|
+
V3ThreathuntingThreatsListResponse,
|
|
65
|
+
z.ZodTypeDef,
|
|
66
|
+
unknown
|
|
67
|
+
> = z.object({
|
|
68
|
+
Headers: z.record(z.array(z.string())).default({}),
|
|
69
|
+
Result: components.ResponseEnvelopeThreatsListResponse$inboundSchema,
|
|
70
|
+
}).transform((v) => {
|
|
71
|
+
return remap$(v, {
|
|
72
|
+
"Headers": "headers",
|
|
73
|
+
"Result": "result",
|
|
74
|
+
});
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
export function v3ThreathuntingThreatsListResponseFromJSON(
|
|
78
|
+
jsonString: string,
|
|
79
|
+
): SafeParseResult<V3ThreathuntingThreatsListResponse, SDKValidationError> {
|
|
80
|
+
return safeParse(
|
|
81
|
+
jsonString,
|
|
82
|
+
(x) =>
|
|
83
|
+
V3ThreathuntingThreatsListResponse$inboundSchema.parse(JSON.parse(x)),
|
|
84
|
+
`Failed to parse 'V3ThreathuntingThreatsListResponse' from JSON`,
|
|
85
|
+
);
|
|
86
|
+
}
|
|
@@ -6,6 +6,7 @@ import { accountManagementGetMemberCreditUsage } from "../funcs/accountManagemen
|
|
|
6
6
|
import { accountManagementGetOrganizationCredits } from "../funcs/accountManagementGetOrganizationCredits.js";
|
|
7
7
|
import { accountManagementGetOrganizationCreditUsage } from "../funcs/accountManagementGetOrganizationCreditUsage.js";
|
|
8
8
|
import { accountManagementGetOrganizationDetails } from "../funcs/accountManagementGetOrganizationDetails.js";
|
|
9
|
+
import { accountManagementGetUserCredits } from "../funcs/accountManagementGetUserCredits.js";
|
|
9
10
|
import {
|
|
10
11
|
accountManagementInviteUserToOrganization,
|
|
11
12
|
InviteUserToOrganizationAcceptEnum,
|
|
@@ -48,7 +49,7 @@ export class AccountManagement extends ClientSDK {
|
|
|
48
49
|
}
|
|
49
50
|
|
|
50
51
|
/**
|
|
51
|
-
* Get organization credit
|
|
52
|
+
* Get organization credit details
|
|
52
53
|
*
|
|
53
54
|
* @remarks
|
|
54
55
|
* Retrieve credit balance and expiration information for an organization. <br><br>Credits expire 12 months after they are acquired.<br><br>This endpoint does not cost any credits to execute.
|
|
@@ -177,4 +178,19 @@ export class AccountManagement extends ClientSDK {
|
|
|
177
178
|
options,
|
|
178
179
|
));
|
|
179
180
|
}
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* Get Free user credit details
|
|
184
|
+
*
|
|
185
|
+
* @remarks
|
|
186
|
+
* Retrieve your Free user account credit balance and refresh information. To retrieve the credit balance for a Starter or Enterprise account, use the [get organization credit details endpoint](https://docs.censys.com/reference/v3-accountmanagement-org-credits).<br><br>This endpoint does not cost any credits to execute.
|
|
187
|
+
*/
|
|
188
|
+
async getUserCredits(
|
|
189
|
+
options?: RequestOptions,
|
|
190
|
+
): Promise<operations.V3AccountmanagementUserCreditsResponse> {
|
|
191
|
+
return unwrapAsync(accountManagementGetUserCredits(
|
|
192
|
+
this,
|
|
193
|
+
options,
|
|
194
|
+
));
|
|
195
|
+
}
|
|
180
196
|
}
|
package/src/sdk/threathunting.ts
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import { threatHuntingCreateTrackedScan } from "../funcs/threatHuntingCreateTrackedScan.js";
|
|
6
6
|
import { threatHuntingGetHostObservationsWithCertificate } from "../funcs/threatHuntingGetHostObservationsWithCertificate.js";
|
|
7
7
|
import { threatHuntingGetTrackedScanThreatHunting } from "../funcs/threatHuntingGetTrackedScanThreatHunting.js";
|
|
8
|
+
import { threatHuntingListThreats } from "../funcs/threatHuntingListThreats.js";
|
|
8
9
|
import { threatHuntingValueCounts } from "../funcs/threatHuntingValueCounts.js";
|
|
9
10
|
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
10
11
|
import * as operations from "../models/operations/index.js";
|
|
@@ -65,6 +66,23 @@ export class ThreatHunting extends ClientSDK {
|
|
|
65
66
|
));
|
|
66
67
|
}
|
|
67
68
|
|
|
69
|
+
/**
|
|
70
|
+
* List active threats
|
|
71
|
+
*
|
|
72
|
+
* @remarks
|
|
73
|
+
* 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).
|
|
74
|
+
*/
|
|
75
|
+
async listThreats(
|
|
76
|
+
request: operations.V3ThreathuntingThreatsListRequest,
|
|
77
|
+
options?: RequestOptions,
|
|
78
|
+
): Promise<operations.V3ThreathuntingThreatsListResponse> {
|
|
79
|
+
return unwrapAsync(threatHuntingListThreats(
|
|
80
|
+
this,
|
|
81
|
+
request,
|
|
82
|
+
options,
|
|
83
|
+
));
|
|
84
|
+
}
|
|
85
|
+
|
|
68
86
|
/**
|
|
69
87
|
* CensEye: Retrieve value counts to discover pivots
|
|
70
88
|
*
|
package/src/types/enums.ts
CHANGED
|
@@ -2,15 +2,44 @@
|
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { Unrecognized, unrecognized } from "./unrecognized.js";
|
|
7
7
|
|
|
8
|
-
export
|
|
9
|
-
|
|
8
|
+
export type ClosedEnum<T extends Readonly<Record<string, string | number>>> =
|
|
9
|
+
T[keyof T];
|
|
10
|
+
export type OpenEnum<T extends Readonly<Record<string, string | number>>> =
|
|
11
|
+
| T[keyof T]
|
|
12
|
+
| Unrecognized<T[keyof T] extends number ? number : string>;
|
|
13
|
+
|
|
14
|
+
export function inboundSchema<T extends Record<string, string>>(
|
|
15
|
+
enumObj: T,
|
|
16
|
+
): z.ZodType<OpenEnum<T>, z.ZodTypeDef, unknown> {
|
|
17
|
+
const options = Object.values(enumObj);
|
|
18
|
+
return z.union([
|
|
19
|
+
...options.map(x => z.literal(x)),
|
|
20
|
+
z.string().transform(x => unrecognized(x)),
|
|
21
|
+
] as any);
|
|
10
22
|
}
|
|
11
23
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
24
|
+
export function inboundSchemaInt<T extends Record<string, number | string>>(
|
|
25
|
+
enumObj: T,
|
|
26
|
+
): z.ZodType<OpenEnum<T>, z.ZodTypeDef, unknown> {
|
|
27
|
+
// For numeric enums, Object.values returns both numbers and string keys
|
|
28
|
+
const options = Object.values(enumObj).filter(v => typeof v === "number");
|
|
29
|
+
return z.union([
|
|
30
|
+
...options.map(x => z.literal(x)),
|
|
31
|
+
z.number().int().transform(x => unrecognized(x)),
|
|
32
|
+
] as any);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export function outboundSchema<T extends Record<string, string>>(
|
|
36
|
+
_: T,
|
|
37
|
+
): z.ZodType<string, z.ZodTypeDef, OpenEnum<T>> {
|
|
38
|
+
return z.string() as any;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export function outboundSchemaInt<T extends Record<string, number | string>>(
|
|
42
|
+
_: T,
|
|
43
|
+
): z.ZodType<number, z.ZodTypeDef, OpenEnum<T>> {
|
|
44
|
+
return z.number().int() as any;
|
|
45
|
+
}
|
package/src/types/index.ts
CHANGED
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
export { blobLikeSchema, isBlobLike } from "./blobs.js";
|
|
6
|
-
export {
|
|
7
|
-
export type { ClosedEnum, OpenEnum, Unrecognized } from "./enums.js";
|
|
6
|
+
export type { ClosedEnum, OpenEnum } from "./enums.js";
|
|
8
7
|
export type { Result } from "./fp.js";
|
|
9
8
|
export type { PageIterator, Paginator } from "./operations.js";
|
|
10
9
|
export { createPageIterator } from "./operations.js";
|
|
11
10
|
export { RFCDate } from "./rfcdate.js";
|
|
11
|
+
export * from "./unrecognized.js";
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
declare const __brand: unique symbol;
|
|
6
|
+
export type Unrecognized<T> = T & { [__brand]: "unrecognized" };
|
|
7
|
+
|
|
8
|
+
function unrecognized<T>(value: T): Unrecognized<T> {
|
|
9
|
+
globalCount++;
|
|
10
|
+
return value as Unrecognized<T>;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
let globalCount = 0;
|
|
14
|
+
let refCount = 0;
|
|
15
|
+
export function startCountingUnrecognized() {
|
|
16
|
+
refCount++;
|
|
17
|
+
const start = globalCount;
|
|
18
|
+
return {
|
|
19
|
+
/**
|
|
20
|
+
* Ends counting and returns the delta.
|
|
21
|
+
* @param delta - If provided, only this amount is added to the parent counter
|
|
22
|
+
* (used for nested unions where we only want to record the winning option's count).
|
|
23
|
+
* If not provided, records all counts since start().
|
|
24
|
+
*/
|
|
25
|
+
end: (delta?: number) => {
|
|
26
|
+
const count = globalCount - start;
|
|
27
|
+
// Reset globalCount back to start, then add only the specified delta
|
|
28
|
+
globalCount = start + (delta ?? count);
|
|
29
|
+
if (--refCount === 0) globalCount = 0;
|
|
30
|
+
return count;
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export { unrecognized };
|
package/tsconfig.json
CHANGED
package/types/enums.d.ts
CHANGED
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export declare function
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
export type ClosedEnum<T> = T[keyof T];
|
|
10
|
-
export type OpenEnum<T> = Prettify<T[keyof T]> | Unrecognized<T[keyof T] extends number ? number : string>;
|
|
11
|
-
export {};
|
|
1
|
+
import * as z from "zod/v3";
|
|
2
|
+
import { Unrecognized } from "./unrecognized.js";
|
|
3
|
+
export type ClosedEnum<T extends Readonly<Record<string, string | number>>> = T[keyof T];
|
|
4
|
+
export type OpenEnum<T extends Readonly<Record<string, string | number>>> = T[keyof T] | Unrecognized<T[keyof T] extends number ? number : string>;
|
|
5
|
+
export declare function inboundSchema<T extends Record<string, string>>(enumObj: T): z.ZodType<OpenEnum<T>, z.ZodTypeDef, unknown>;
|
|
6
|
+
export declare function inboundSchemaInt<T extends Record<string, number | string>>(enumObj: T): z.ZodType<OpenEnum<T>, z.ZodTypeDef, unknown>;
|
|
7
|
+
export declare function outboundSchema<T extends Record<string, string>>(_: T): z.ZodType<string, z.ZodTypeDef, OpenEnum<T>>;
|
|
8
|
+
export declare function outboundSchemaInt<T extends Record<string, number | string>>(_: T): z.ZodType<number, z.ZodTypeDef, OpenEnum<T>>;
|
|
12
9
|
//# sourceMappingURL=enums.d.ts.map
|
package/types/enums.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enums.d.ts","sourceRoot":"","sources":["../src/types/enums.ts"],"names":[],"mappings":"AAIA,OAAO,CAAC,MAAM,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"enums.d.ts","sourceRoot":"","sources":["../src/types/enums.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,YAAY,EAAgB,MAAM,mBAAmB,CAAC;AAE/D,MAAM,MAAM,UAAU,CAAC,CAAC,SAAS,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC,IACxE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AACb,MAAM,MAAM,QAAQ,CAAC,CAAC,SAAS,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC,IACpE,CAAC,CAAC,MAAM,CAAC,CAAC,GACV,YAAY,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC,CAAC;AAE9D,wBAAgB,aAAa,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC5D,OAAO,EAAE,CAAC,GACT,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,UAAU,EAAE,OAAO,CAAC,CAM/C;AAED,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,EACxE,OAAO,EAAE,CAAC,GACT,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,UAAU,EAAE,OAAO,CAAC,CAO/C;AAED,wBAAgB,cAAc,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC7D,CAAC,EAAE,CAAC,GACH,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAE9C;AAED,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,EACzE,CAAC,EAAE,CAAC,GACH,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAE9C"}
|
package/types/enums.js
CHANGED
|
@@ -2,9 +2,65 @@
|
|
|
2
2
|
/*
|
|
3
3
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
4
|
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
5
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
7
|
-
|
|
8
|
-
|
|
39
|
+
exports.inboundSchema = inboundSchema;
|
|
40
|
+
exports.inboundSchemaInt = inboundSchemaInt;
|
|
41
|
+
exports.outboundSchema = outboundSchema;
|
|
42
|
+
exports.outboundSchemaInt = outboundSchemaInt;
|
|
43
|
+
const z = __importStar(require("zod/v3"));
|
|
44
|
+
const unrecognized_js_1 = require("./unrecognized.js");
|
|
45
|
+
function inboundSchema(enumObj) {
|
|
46
|
+
const options = Object.values(enumObj);
|
|
47
|
+
return z.union([
|
|
48
|
+
...options.map(x => z.literal(x)),
|
|
49
|
+
z.string().transform(x => (0, unrecognized_js_1.unrecognized)(x)),
|
|
50
|
+
]);
|
|
51
|
+
}
|
|
52
|
+
function inboundSchemaInt(enumObj) {
|
|
53
|
+
// For numeric enums, Object.values returns both numbers and string keys
|
|
54
|
+
const options = Object.values(enumObj).filter(v => typeof v === "number");
|
|
55
|
+
return z.union([
|
|
56
|
+
...options.map(x => z.literal(x)),
|
|
57
|
+
z.number().int().transform(x => (0, unrecognized_js_1.unrecognized)(x)),
|
|
58
|
+
]);
|
|
59
|
+
}
|
|
60
|
+
function outboundSchema(_) {
|
|
61
|
+
return z.string();
|
|
62
|
+
}
|
|
63
|
+
function outboundSchemaInt(_) {
|
|
64
|
+
return z.number().int();
|
|
9
65
|
}
|
|
10
66
|
//# sourceMappingURL=enums.js.map
|
package/types/enums.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enums.js","sourceRoot":"","sources":["../src/types/enums.ts"],"names":[],"mappings":";AAAA;;GAEG
|
|
1
|
+
{"version":3,"file":"enums.js","sourceRoot":"","sources":["../src/types/enums.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAWH,sCAQC;AAED,4CASC;AAED,wCAIC;AAED,8CAIC;AAxCD,0CAA4B;AAC5B,uDAA+D;AAQ/D,SAAgB,aAAa,CAC3B,OAAU;IAEV,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IACvC,OAAO,CAAC,CAAC,KAAK,CAAC;QACb,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;QACjC,CAAC,CAAC,MAAM,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,IAAA,8BAAY,EAAC,CAAC,CAAC,CAAC;KACpC,CAAC,CAAC;AACZ,CAAC;AAED,SAAgB,gBAAgB,CAC9B,OAAU;IAEV,wEAAwE;IACxE,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,KAAK,QAAQ,CAAC,CAAC;IAC1E,OAAO,CAAC,CAAC,KAAK,CAAC;QACb,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;QACjC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,IAAA,8BAAY,EAAC,CAAC,CAAC,CAAC;KAC1C,CAAC,CAAC;AACZ,CAAC;AAED,SAAgB,cAAc,CAC5B,CAAI;IAEJ,OAAO,CAAC,CAAC,MAAM,EAAS,CAAC;AAC3B,CAAC;AAED,SAAgB,iBAAiB,CAC/B,CAAI;IAEJ,OAAO,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAS,CAAC;AACjC,CAAC"}
|
package/types/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export { blobLikeSchema, isBlobLike } from "./blobs.js";
|
|
2
|
-
export {
|
|
3
|
-
export type { ClosedEnum, OpenEnum, Unrecognized } from "./enums.js";
|
|
2
|
+
export type { ClosedEnum, OpenEnum } from "./enums.js";
|
|
4
3
|
export type { Result } from "./fp.js";
|
|
5
4
|
export type { PageIterator, Paginator } from "./operations.js";
|
|
6
5
|
export { createPageIterator } from "./operations.js";
|
|
7
6
|
export { RFCDate } from "./rfcdate.js";
|
|
7
|
+
export * from "./unrecognized.js";
|
|
8
8
|
//# sourceMappingURL=index.d.ts.map
|
package/types/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/types/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxD,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/types/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxD,YAAY,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACvD,YAAY,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACtC,YAAY,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,cAAc,mBAAmB,CAAC"}
|
package/types/index.js
CHANGED
|
@@ -2,15 +2,28 @@
|
|
|
2
2
|
/*
|
|
3
3
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
4
|
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
17
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
18
|
+
};
|
|
5
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.RFCDate = exports.createPageIterator = exports.
|
|
20
|
+
exports.RFCDate = exports.createPageIterator = exports.isBlobLike = exports.blobLikeSchema = void 0;
|
|
7
21
|
var blobs_js_1 = require("./blobs.js");
|
|
8
22
|
Object.defineProperty(exports, "blobLikeSchema", { enumerable: true, get: function () { return blobs_js_1.blobLikeSchema; } });
|
|
9
23
|
Object.defineProperty(exports, "isBlobLike", { enumerable: true, get: function () { return blobs_js_1.isBlobLike; } });
|
|
10
|
-
var enums_js_1 = require("./enums.js");
|
|
11
|
-
Object.defineProperty(exports, "catchUnrecognizedEnum", { enumerable: true, get: function () { return enums_js_1.catchUnrecognizedEnum; } });
|
|
12
24
|
var operations_js_1 = require("./operations.js");
|
|
13
25
|
Object.defineProperty(exports, "createPageIterator", { enumerable: true, get: function () { return operations_js_1.createPageIterator; } });
|
|
14
26
|
var rfcdate_js_1 = require("./rfcdate.js");
|
|
15
27
|
Object.defineProperty(exports, "RFCDate", { enumerable: true, get: function () { return rfcdate_js_1.RFCDate; } });
|
|
28
|
+
__exportStar(require("./unrecognized.js"), exports);
|
|
16
29
|
//# sourceMappingURL=index.js.map
|
package/types/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/types/index.ts"],"names":[],"mappings":";AAAA;;GAEG
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/types/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;AAEH,uCAAwD;AAA/C,0GAAA,cAAc,OAAA;AAAE,sGAAA,UAAU,OAAA;AAInC,iDAAqD;AAA5C,mHAAA,kBAAkB,OAAA;AAC3B,2CAAuC;AAA9B,qGAAA,OAAO,OAAA;AAChB,oDAAkC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
declare const __brand: unique symbol;
|
|
2
|
+
export type Unrecognized<T> = T & {
|
|
3
|
+
[__brand]: "unrecognized";
|
|
4
|
+
};
|
|
5
|
+
declare function unrecognized<T>(value: T): Unrecognized<T>;
|
|
6
|
+
export declare function startCountingUnrecognized(): {
|
|
7
|
+
/**
|
|
8
|
+
* Ends counting and returns the delta.
|
|
9
|
+
* @param delta - If provided, only this amount is added to the parent counter
|
|
10
|
+
* (used for nested unions where we only want to record the winning option's count).
|
|
11
|
+
* If not provided, records all counts since start().
|
|
12
|
+
*/
|
|
13
|
+
end: (delta?: number) => number;
|
|
14
|
+
};
|
|
15
|
+
export { unrecognized };
|
|
16
|
+
//# sourceMappingURL=unrecognized.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unrecognized.d.ts","sourceRoot":"","sources":["../src/types/unrecognized.ts"],"names":[],"mappings":"AAIA,OAAO,CAAC,MAAM,OAAO,EAAE,OAAO,MAAM,CAAC;AACrC,MAAM,MAAM,YAAY,CAAC,CAAC,IAAI,CAAC,GAAG;IAAE,CAAC,OAAO,CAAC,EAAE,cAAc,CAAA;CAAE,CAAC;AAEhE,iBAAS,YAAY,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,YAAY,CAAC,CAAC,CAAC,CAGlD;AAID,wBAAgB,yBAAyB;IAIrC;;;;;OAKG;kBACW,MAAM;EAQvB;AAED,OAAO,EAAE,YAAY,EAAE,CAAC"}
|