@censys/platform-sdk 0.10.0 → 0.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (157) hide show
  1. package/README.md +2 -0
  2. package/docs/sdks/collections/README.md +8 -0
  3. package/docs/sdks/globaldata/README.md +91 -0
  4. package/funcs/collectionsList.js +1 -0
  5. package/funcs/collectionsList.js.map +1 -1
  6. package/funcs/globalDataListServicesOnHost.d.ts +18 -0
  7. package/funcs/globalDataListServicesOnHost.d.ts.map +1 -0
  8. package/funcs/globalDataListServicesOnHost.js +145 -0
  9. package/funcs/globalDataListServicesOnHost.js.map +1 -0
  10. package/jsr.json +1 -1
  11. package/lib/config.d.ts +4 -4
  12. package/lib/config.js +4 -4
  13. package/lib/config.js.map +1 -1
  14. package/models/components/anermacfforth.d.ts +14 -0
  15. package/models/components/anermacfforth.d.ts.map +1 -0
  16. package/models/components/anermacfforth.js +60 -0
  17. package/models/components/anermacfforth.js.map +1 -0
  18. package/models/components/cursorontarget.d.ts +11 -0
  19. package/models/components/cursorontarget.d.ts.map +1 -0
  20. package/models/components/cursorontarget.js +51 -0
  21. package/models/components/cursorontarget.js.map +1 -0
  22. package/models/components/cursorontargetevent.d.ts +25 -0
  23. package/models/components/cursorontargetevent.d.ts.map +1 -0
  24. package/models/components/cursorontargetevent.js +70 -0
  25. package/models/components/cursorontargetevent.js.map +1 -0
  26. package/models/components/cursorontargetpoint.d.ts +14 -0
  27. package/models/components/cursorontargetpoint.d.ts.map +1 -0
  28. package/models/components/cursorontargetpoint.js +54 -0
  29. package/models/components/cursorontargetpoint.js.map +1 -0
  30. package/models/components/cursorontargetstatus.d.ts +10 -0
  31. package/models/components/cursorontargetstatus.d.ts.map +1 -0
  32. package/models/components/cursorontargetstatus.js +50 -0
  33. package/models/components/cursorontargetstatus.js.map +1 -0
  34. package/models/components/cursorontargettakv.d.ts +13 -0
  35. package/models/components/cursorontargettakv.d.ts.map +1 -0
  36. package/models/components/cursorontargettakv.js +53 -0
  37. package/models/components/cursorontargettakv.js.map +1 -0
  38. package/models/components/frps.d.ts +12 -0
  39. package/models/components/frps.d.ts.map +1 -0
  40. package/models/components/frps.js +58 -0
  41. package/models/components/frps.js.map +1 -0
  42. package/models/components/icap.d.ts +11 -0
  43. package/models/components/icap.d.ts.map +1 -0
  44. package/models/components/icap.js +57 -0
  45. package/models/components/icap.js.map +1 -0
  46. package/models/components/icapoptionsresponse.d.ts +21 -0
  47. package/models/components/icapoptionsresponse.d.ts.map +1 -0
  48. package/models/components/icapoptionsresponse.js +73 -0
  49. package/models/components/icapoptionsresponse.js.map +1 -0
  50. package/models/components/index.d.ts +19 -0
  51. package/models/components/index.d.ts.map +1 -1
  52. package/models/components/index.js +19 -0
  53. package/models/components/index.js.map +1 -1
  54. package/models/components/responseenvelopeservicesonhostresponse.d.ts +11 -0
  55. package/models/components/responseenvelopeservicesonhostresponse.d.ts.map +1 -0
  56. package/models/components/responseenvelopeservicesonhostresponse.js +51 -0
  57. package/models/components/responseenvelopeservicesonhostresponse.js.map +1 -0
  58. package/models/components/service.d.ts +10 -0
  59. package/models/components/service.d.ts.map +1 -1
  60. package/models/components/service.js +12 -0
  61. package/models/components/service.js.map +1 -1
  62. package/models/components/serviceonhostrange.d.ts +33 -0
  63. package/models/components/serviceonhostrange.d.ts.map +1 -0
  64. package/models/components/serviceonhostrange.js +62 -0
  65. package/models/components/serviceonhostrange.js.map +1 -0
  66. package/models/components/servicescan.d.ts +10 -0
  67. package/models/components/servicescan.d.ts.map +1 -1
  68. package/models/components/servicescan.js +12 -0
  69. package/models/components/servicescan.js.map +1 -1
  70. package/models/components/servicesonhostresponse.d.ts +12 -0
  71. package/models/components/servicesonhostresponse.d.ts.map +1 -0
  72. package/models/components/servicesonhostresponse.js +58 -0
  73. package/models/components/servicesonhostresponse.js.map +1 -0
  74. package/models/components/sourceusagebreakdown.d.ts +2 -2
  75. package/models/components/sourceusagebreakdown.d.ts.map +1 -1
  76. package/models/components/sourceusagebreakdown.js +2 -2
  77. package/models/components/sourceusagebreakdown.js.map +1 -1
  78. package/models/components/stun.d.ts +17 -0
  79. package/models/components/stun.d.ts.map +1 -0
  80. package/models/components/stun.js +67 -0
  81. package/models/components/stun.js.map +1 -0
  82. package/models/components/stunbindingerrorresponse.d.ts +13 -0
  83. package/models/components/stunbindingerrorresponse.d.ts.map +1 -0
  84. package/models/components/stunbindingerrorresponse.js +60 -0
  85. package/models/components/stunbindingerrorresponse.js.map +1 -0
  86. package/models/components/stunbindingsuccessresponse.d.ts +13 -0
  87. package/models/components/stunbindingsuccessresponse.d.ts.map +1 -0
  88. package/models/components/stunbindingsuccessresponse.js +59 -0
  89. package/models/components/stunbindingsuccessresponse.js.map +1 -0
  90. package/models/components/stunmappedaddress.d.ts +11 -0
  91. package/models/components/stunmappedaddress.d.ts.map +1 -0
  92. package/models/components/stunmappedaddress.js +51 -0
  93. package/models/components/stunmappedaddress.js.map +1 -0
  94. package/models/components/stunturn.d.ts +15 -0
  95. package/models/components/stunturn.d.ts.map +1 -0
  96. package/models/components/stunturn.js +65 -0
  97. package/models/components/stunturn.js.map +1 -0
  98. package/models/components/stunturnallocateerrorresponse.d.ts +15 -0
  99. package/models/components/stunturnallocateerrorresponse.d.ts.map +1 -0
  100. package/models/components/stunturnallocateerrorresponse.js +62 -0
  101. package/models/components/stunturnallocateerrorresponse.js.map +1 -0
  102. package/models/components/stunturnallocatesuccessresponse.d.ts +13 -0
  103. package/models/components/stunturnallocatesuccessresponse.d.ts.map +1 -0
  104. package/models/components/stunturnallocatesuccessresponse.js +59 -0
  105. package/models/components/stunturnallocatesuccessresponse.js.map +1 -0
  106. package/models/operations/index.d.ts +1 -0
  107. package/models/operations/index.d.ts.map +1 -1
  108. package/models/operations/index.js +1 -0
  109. package/models/operations/index.js.map +1 -1
  110. package/models/operations/v3collectionscrudlist.d.ts +15 -0
  111. package/models/operations/v3collectionscrudlist.d.ts.map +1 -1
  112. package/models/operations/v3collectionscrudlist.js +12 -1
  113. package/models/operations/v3collectionscrudlist.js.map +1 -1
  114. package/models/operations/v3globaldataserviceonhost.d.ts +101 -0
  115. package/models/operations/v3globaldataserviceonhost.d.ts.map +1 -0
  116. package/models/operations/v3globaldataserviceonhost.js +107 -0
  117. package/models/operations/v3globaldataserviceonhost.js.map +1 -0
  118. package/package.json +1 -1
  119. package/sdk/globaldata.d.ts +7 -0
  120. package/sdk/globaldata.d.ts.map +1 -1
  121. package/sdk/globaldata.js +10 -0
  122. package/sdk/globaldata.js.map +1 -1
  123. package/src/funcs/collectionsList.ts +1 -0
  124. package/src/funcs/globalDataListServicesOnHost.ts +206 -0
  125. package/src/lib/config.ts +4 -4
  126. package/src/models/components/anermacfforth.ts +45 -0
  127. package/src/models/components/cursorontarget.ts +35 -0
  128. package/src/models/components/cursorontargetevent.ts +72 -0
  129. package/src/models/components/cursorontargetpoint.ts +39 -0
  130. package/src/models/components/cursorontargetstatus.ts +31 -0
  131. package/src/models/components/cursorontargettakv.ts +37 -0
  132. package/src/models/components/frps.ts +37 -0
  133. package/src/models/components/icap.ts +37 -0
  134. package/src/models/components/icapoptionsresponse.ts +65 -0
  135. package/src/models/components/index.ts +19 -0
  136. package/src/models/components/responseenvelopeservicesonhostresponse.ts +36 -0
  137. package/src/models/components/service.ts +20 -0
  138. package/src/models/components/serviceonhostrange.ts +66 -0
  139. package/src/models/components/servicescan.ts +20 -0
  140. package/src/models/components/servicesonhostresponse.ts +43 -0
  141. package/src/models/components/sourceusagebreakdown.ts +4 -4
  142. package/src/models/components/stun.ts +54 -0
  143. package/src/models/components/stunbindingerrorresponse.ts +44 -0
  144. package/src/models/components/stunbindingsuccessresponse.ts +45 -0
  145. package/src/models/components/stunmappedaddress.ts +33 -0
  146. package/src/models/components/stunturn.ts +55 -0
  147. package/src/models/components/stunturnallocateerrorresponse.ts +48 -0
  148. package/src/models/components/stunturnallocatesuccessresponse.ts +45 -0
  149. package/src/models/operations/index.ts +1 -0
  150. package/src/models/operations/v3collectionscrudlist.ts +22 -0
  151. package/src/models/operations/v3globaldataserviceonhost.ts +173 -0
  152. package/src/sdk/globaldata.ts +18 -0
  153. package/examples/package-lock.json +0 -610
  154. package/examples/package.json +0 -18
  155. package/tests/package-lock.json +0 -1448
  156. package/tests/package.json +0 -11
  157. package/tsconfig.json +0 -40
@@ -16,11 +16,11 @@ export type SourceUsageBreakdown = {
16
16
  /**
17
17
  * The amount of credits consumed through auto-replenishment.
18
18
  */
19
- autoReplenishment: number;
19
+ autoReplenishment?: number | undefined;
20
20
  /**
21
21
  * The amount of credits consumed through other operations.
22
22
  */
23
- other: number;
23
+ other?: number | undefined;
24
24
  /**
25
25
  * The amount of credits consumed through the Platform UI.
26
26
  */
@@ -34,8 +34,8 @@ export const SourceUsageBreakdown$inboundSchema: z.ZodType<
34
34
  unknown
35
35
  > = z.object({
36
36
  api: z.number().int(),
37
- auto_replenishment: z.number().int(),
38
- other: z.number().int(),
37
+ auto_replenishment: z.number().int().optional(),
38
+ other: z.number().int().optional(),
39
39
  ui: z.number().int(),
40
40
  }).transform((v) => {
41
41
  return remap$(v, {
@@ -0,0 +1,54 @@
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 {
11
+ StunBindingErrorResponse,
12
+ StunBindingErrorResponse$inboundSchema,
13
+ } from "./stunbindingerrorresponse.js";
14
+ import {
15
+ StunBindingSuccessResponse,
16
+ StunBindingSuccessResponse$inboundSchema,
17
+ } from "./stunbindingsuccessresponse.js";
18
+ import { StunTurn, StunTurn$inboundSchema } from "./stunturn.js";
19
+
20
+ export type Stun = {
21
+ bindingErrorResponse?: StunBindingErrorResponse | undefined;
22
+ bindingSuccessResponse?: StunBindingSuccessResponse | undefined;
23
+ responseType?: number | undefined;
24
+ responseTypeName?: string | undefined;
25
+ turn?: StunTurn | undefined;
26
+ };
27
+
28
+ /** @internal */
29
+ export const Stun$inboundSchema: z.ZodType<Stun, z.ZodTypeDef, unknown> = z
30
+ .object({
31
+ binding_error_response: StunBindingErrorResponse$inboundSchema.optional(),
32
+ binding_success_response: StunBindingSuccessResponse$inboundSchema
33
+ .optional(),
34
+ response_type: z.number().int().optional(),
35
+ response_type_name: z.string().optional(),
36
+ turn: StunTurn$inboundSchema.optional(),
37
+ }).transform((v) => {
38
+ return remap$(v, {
39
+ "binding_error_response": "bindingErrorResponse",
40
+ "binding_success_response": "bindingSuccessResponse",
41
+ "response_type": "responseType",
42
+ "response_type_name": "responseTypeName",
43
+ });
44
+ });
45
+
46
+ export function stunFromJSON(
47
+ jsonString: string,
48
+ ): SafeParseResult<Stun, SDKValidationError> {
49
+ return safeParse(
50
+ jsonString,
51
+ (x) => Stun$inboundSchema.parse(JSON.parse(x)),
52
+ `Failed to parse 'Stun' from JSON`,
53
+ );
54
+ }
@@ -0,0 +1,44 @@
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 StunBindingErrorResponse = {
12
+ errorCode?: number | undefined;
13
+ errorReason?: string | undefined;
14
+ hasFingerprint?: boolean | undefined;
15
+ software?: string | undefined;
16
+ };
17
+
18
+ /** @internal */
19
+ export const StunBindingErrorResponse$inboundSchema: z.ZodType<
20
+ StunBindingErrorResponse,
21
+ z.ZodTypeDef,
22
+ unknown
23
+ > = z.object({
24
+ error_code: z.number().int().optional(),
25
+ error_reason: z.string().optional(),
26
+ has_fingerprint: z.boolean().optional(),
27
+ software: z.string().optional(),
28
+ }).transform((v) => {
29
+ return remap$(v, {
30
+ "error_code": "errorCode",
31
+ "error_reason": "errorReason",
32
+ "has_fingerprint": "hasFingerprint",
33
+ });
34
+ });
35
+
36
+ export function stunBindingErrorResponseFromJSON(
37
+ jsonString: string,
38
+ ): SafeParseResult<StunBindingErrorResponse, SDKValidationError> {
39
+ return safeParse(
40
+ jsonString,
41
+ (x) => StunBindingErrorResponse$inboundSchema.parse(JSON.parse(x)),
42
+ `Failed to parse 'StunBindingErrorResponse' from JSON`,
43
+ );
44
+ }
@@ -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 {
11
+ StunMappedAddress,
12
+ StunMappedAddress$inboundSchema,
13
+ } from "./stunmappedaddress.js";
14
+
15
+ export type StunBindingSuccessResponse = {
16
+ hasFingerprint?: boolean | undefined;
17
+ otherAddress?: StunMappedAddress | undefined;
18
+ software?: string | undefined;
19
+ };
20
+
21
+ /** @internal */
22
+ export const StunBindingSuccessResponse$inboundSchema: z.ZodType<
23
+ StunBindingSuccessResponse,
24
+ z.ZodTypeDef,
25
+ unknown
26
+ > = z.object({
27
+ has_fingerprint: z.boolean().optional(),
28
+ other_address: StunMappedAddress$inboundSchema.optional(),
29
+ software: z.string().optional(),
30
+ }).transform((v) => {
31
+ return remap$(v, {
32
+ "has_fingerprint": "hasFingerprint",
33
+ "other_address": "otherAddress",
34
+ });
35
+ });
36
+
37
+ export function stunBindingSuccessResponseFromJSON(
38
+ jsonString: string,
39
+ ): SafeParseResult<StunBindingSuccessResponse, SDKValidationError> {
40
+ return safeParse(
41
+ jsonString,
42
+ (x) => StunBindingSuccessResponse$inboundSchema.parse(JSON.parse(x)),
43
+ `Failed to parse 'StunBindingSuccessResponse' from JSON`,
44
+ );
45
+ }
@@ -0,0 +1,33 @@
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 StunMappedAddress = {
11
+ ip?: string | undefined;
12
+ port?: number | undefined;
13
+ };
14
+
15
+ /** @internal */
16
+ export const StunMappedAddress$inboundSchema: z.ZodType<
17
+ StunMappedAddress,
18
+ z.ZodTypeDef,
19
+ unknown
20
+ > = z.object({
21
+ ip: z.string().optional(),
22
+ port: z.number().int().optional(),
23
+ });
24
+
25
+ export function stunMappedAddressFromJSON(
26
+ jsonString: string,
27
+ ): SafeParseResult<StunMappedAddress, SDKValidationError> {
28
+ return safeParse(
29
+ jsonString,
30
+ (x) => StunMappedAddress$inboundSchema.parse(JSON.parse(x)),
31
+ `Failed to parse 'StunMappedAddress' from JSON`,
32
+ );
33
+ }
@@ -0,0 +1,55 @@
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 {
11
+ StunTurnAllocateErrorResponse,
12
+ StunTurnAllocateErrorResponse$inboundSchema,
13
+ } from "./stunturnallocateerrorresponse.js";
14
+ import {
15
+ StunTurnAllocateSuccessResponse,
16
+ StunTurnAllocateSuccessResponse$inboundSchema,
17
+ } from "./stunturnallocatesuccessresponse.js";
18
+
19
+ export type StunTurn = {
20
+ allocateErrorResponse?: StunTurnAllocateErrorResponse | undefined;
21
+ allocateSuccessResponse?: StunTurnAllocateSuccessResponse | undefined;
22
+ responseType?: number | undefined;
23
+ responseTypeName?: string | undefined;
24
+ };
25
+
26
+ /** @internal */
27
+ export const StunTurn$inboundSchema: z.ZodType<
28
+ StunTurn,
29
+ z.ZodTypeDef,
30
+ unknown
31
+ > = z.object({
32
+ allocate_error_response: StunTurnAllocateErrorResponse$inboundSchema
33
+ .optional(),
34
+ allocate_success_response: StunTurnAllocateSuccessResponse$inboundSchema
35
+ .optional(),
36
+ response_type: z.number().int().optional(),
37
+ response_type_name: z.string().optional(),
38
+ }).transform((v) => {
39
+ return remap$(v, {
40
+ "allocate_error_response": "allocateErrorResponse",
41
+ "allocate_success_response": "allocateSuccessResponse",
42
+ "response_type": "responseType",
43
+ "response_type_name": "responseTypeName",
44
+ });
45
+ });
46
+
47
+ export function stunTurnFromJSON(
48
+ jsonString: string,
49
+ ): SafeParseResult<StunTurn, SDKValidationError> {
50
+ return safeParse(
51
+ jsonString,
52
+ (x) => StunTurn$inboundSchema.parse(JSON.parse(x)),
53
+ `Failed to parse 'StunTurn' from JSON`,
54
+ );
55
+ }
@@ -0,0 +1,48 @@
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 StunTurnAllocateErrorResponse = {
12
+ errorCode?: number | undefined;
13
+ errorReason?: string | undefined;
14
+ hasFingerprint?: boolean | undefined;
15
+ nonce?: string | undefined;
16
+ realm?: string | undefined;
17
+ software?: string | undefined;
18
+ };
19
+
20
+ /** @internal */
21
+ export const StunTurnAllocateErrorResponse$inboundSchema: z.ZodType<
22
+ StunTurnAllocateErrorResponse,
23
+ z.ZodTypeDef,
24
+ unknown
25
+ > = z.object({
26
+ error_code: z.number().int().optional(),
27
+ error_reason: z.string().optional(),
28
+ has_fingerprint: z.boolean().optional(),
29
+ nonce: z.string().optional(),
30
+ realm: z.string().optional(),
31
+ software: z.string().optional(),
32
+ }).transform((v) => {
33
+ return remap$(v, {
34
+ "error_code": "errorCode",
35
+ "error_reason": "errorReason",
36
+ "has_fingerprint": "hasFingerprint",
37
+ });
38
+ });
39
+
40
+ export function stunTurnAllocateErrorResponseFromJSON(
41
+ jsonString: string,
42
+ ): SafeParseResult<StunTurnAllocateErrorResponse, SDKValidationError> {
43
+ return safeParse(
44
+ jsonString,
45
+ (x) => StunTurnAllocateErrorResponse$inboundSchema.parse(JSON.parse(x)),
46
+ `Failed to parse 'StunTurnAllocateErrorResponse' from JSON`,
47
+ );
48
+ }
@@ -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 {
11
+ StunMappedAddress,
12
+ StunMappedAddress$inboundSchema,
13
+ } from "./stunmappedaddress.js";
14
+
15
+ export type StunTurnAllocateSuccessResponse = {
16
+ hasFingerprint?: boolean | undefined;
17
+ relayAddress?: StunMappedAddress | undefined;
18
+ software?: string | undefined;
19
+ };
20
+
21
+ /** @internal */
22
+ export const StunTurnAllocateSuccessResponse$inboundSchema: z.ZodType<
23
+ StunTurnAllocateSuccessResponse,
24
+ z.ZodTypeDef,
25
+ unknown
26
+ > = z.object({
27
+ has_fingerprint: z.boolean().optional(),
28
+ relay_address: StunMappedAddress$inboundSchema.optional(),
29
+ software: z.string().optional(),
30
+ }).transform((v) => {
31
+ return remap$(v, {
32
+ "has_fingerprint": "hasFingerprint",
33
+ "relay_address": "relayAddress",
34
+ });
35
+ });
36
+
37
+ export function stunTurnAllocateSuccessResponseFromJSON(
38
+ jsonString: string,
39
+ ): SafeParseResult<StunTurnAllocateSuccessResponse, SDKValidationError> {
40
+ return safeParse(
41
+ jsonString,
42
+ (x) => StunTurnAllocateSuccessResponse$inboundSchema.parse(JSON.parse(x)),
43
+ `Failed to parse 'StunTurnAllocateSuccessResponse' from JSON`,
44
+ );
45
+ }
@@ -34,6 +34,7 @@ export * from "./v3globaldatascansrescan.js";
34
34
  export * from "./v3globaldatasearchaggregate.js";
35
35
  export * from "./v3globaldatasearchconvert.js";
36
36
  export * from "./v3globaldatasearchquery.js";
37
+ export * from "./v3globaldataserviceonhost.js";
37
38
  export * from "./v3threathuntinggethostobservationswithcertificate.js";
38
39
  export * from "./v3threathuntingscansdiscovery.js";
39
40
  export * from "./v3threathuntingscansget.js";
@@ -5,6 +5,7 @@
5
5
  import * as z from "zod/v3";
6
6
  import { remap as remap$ } from "../../lib/primitives.js";
7
7
  import { safeParse } from "../../lib/schemas.js";
8
+ import { ClosedEnum } from "../../types/enums.js";
8
9
  import { Result as SafeParseResult } from "../../types/fp.js";
9
10
  import * as components from "../components/index.js";
10
11
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
@@ -13,6 +14,14 @@ export type V3CollectionsCrudListGlobals = {
13
14
  organizationId?: string | undefined;
14
15
  };
15
16
 
17
+ export const CollectionStatuses = {
18
+ Populating: "populating",
19
+ Active: "active",
20
+ Paused: "paused",
21
+ Archived: "archived",
22
+ } as const;
23
+ export type CollectionStatuses = ClosedEnum<typeof CollectionStatuses>;
24
+
16
25
  export type V3CollectionsCrudListRequest = {
17
26
  /**
18
27
  * 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.
@@ -26,6 +35,10 @@ export type V3CollectionsCrudListRequest = {
26
35
  * amount of results to return per page
27
36
  */
28
37
  pageSize?: number | undefined;
38
+ /**
39
+ * statuses of collection for results to be filtered on.
40
+ */
41
+ collectionStatuses?: Array<CollectionStatuses> | null | undefined;
29
42
  };
30
43
 
31
44
  export type V3CollectionsCrudListResponse = {
@@ -33,11 +46,17 @@ export type V3CollectionsCrudListResponse = {
33
46
  result: components.ResponseEnvelopeListCollectionsResponseV1;
34
47
  };
35
48
 
49
+ /** @internal */
50
+ export const CollectionStatuses$outboundSchema: z.ZodNativeEnum<
51
+ typeof CollectionStatuses
52
+ > = z.nativeEnum(CollectionStatuses);
53
+
36
54
  /** @internal */
37
55
  export type V3CollectionsCrudListRequest$Outbound = {
38
56
  organization_id?: string | undefined;
39
57
  page_token?: string | undefined;
40
58
  page_size?: number | undefined;
59
+ collection_statuses?: Array<string> | null | undefined;
41
60
  };
42
61
 
43
62
  /** @internal */
@@ -49,11 +68,14 @@ export const V3CollectionsCrudListRequest$outboundSchema: z.ZodType<
49
68
  organizationId: z.string().optional(),
50
69
  pageToken: z.string().optional(),
51
70
  pageSize: z.number().int().optional(),
71
+ collectionStatuses: z.nullable(z.array(CollectionStatuses$outboundSchema))
72
+ .optional(),
52
73
  }).transform((v) => {
53
74
  return remap$(v, {
54
75
  organizationId: "organization_id",
55
76
  pageToken: "page_token",
56
77
  pageSize: "page_size",
78
+ collectionStatuses: "collection_statuses",
57
79
  });
58
80
  });
59
81
 
@@ -0,0 +1,173 @@
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 { ClosedEnum } from "../../types/enums.js";
9
+ import { Result as SafeParseResult } from "../../types/fp.js";
10
+ import * as components from "../components/index.js";
11
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
12
+
13
+ export type V3GlobaldataServiceOnHostGlobals = {
14
+ organizationId?: string | undefined;
15
+ };
16
+
17
+ /**
18
+ * Filter by transport protocol
19
+ */
20
+ export const TransportProtocol = {
21
+ Tcp: "tcp",
22
+ Udp: "udp",
23
+ Quic: "quic",
24
+ } as const;
25
+ /**
26
+ * Filter by transport protocol
27
+ */
28
+ export type TransportProtocol = ClosedEnum<typeof TransportProtocol>;
29
+
30
+ export const OrderBy = {
31
+ PortASC: "port ASC",
32
+ PortDESC: "port DESC",
33
+ ProtocolASC: "protocol ASC",
34
+ ProtocolDESC: "protocol DESC",
35
+ TransportProtocolASC: "transport_protocol ASC",
36
+ TransportProtocolDESC: "transport_protocol DESC",
37
+ } as const;
38
+ export type OrderBy = ClosedEnum<typeof OrderBy>;
39
+
40
+ export type V3GlobaldataServiceOnHostRequest = {
41
+ /**
42
+ * 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.
43
+ */
44
+ organizationId?: string | undefined;
45
+ /**
46
+ * Start of date range (RFC3339 format, e.g., 2024-01-01T00:00:00Z). If not specified, defaults to the maximum query window back from the end time.
47
+ */
48
+ startTime?: string | undefined;
49
+ /**
50
+ * End of date range (RFC3339 format, e.g., 2024-01-31T23:59:59Z). If not specified, defaults to now. Cannot be in the future.
51
+ */
52
+ endTime?: string | undefined;
53
+ /**
54
+ * Number of results per page (max 100)
55
+ */
56
+ pageSize?: number | undefined;
57
+ /**
58
+ * Pagination token from previous response
59
+ */
60
+ pageToken?: string | undefined;
61
+ /**
62
+ * Filter by port number
63
+ */
64
+ port?: number | undefined;
65
+ /**
66
+ * Filter by application protocol
67
+ */
68
+ protocol?: string | undefined;
69
+ /**
70
+ * Filter by transport protocol
71
+ */
72
+ transportProtocol?: TransportProtocol | undefined;
73
+ /**
74
+ * The IP address of a host.
75
+ */
76
+ hostId: string;
77
+ /**
78
+ * Order observations by these fields. Multiple values can be provided to sort by multiple fields (e.g., ['port DESC', 'protocol ASC']).
79
+ */
80
+ orderBy?: Array<OrderBy> | null | undefined;
81
+ };
82
+
83
+ export type V3GlobaldataServiceOnHostResponse = {
84
+ headers: { [k: string]: Array<string> };
85
+ result: components.ResponseEnvelopeServicesOnHostResponse;
86
+ };
87
+
88
+ /** @internal */
89
+ export const TransportProtocol$outboundSchema: z.ZodNativeEnum<
90
+ typeof TransportProtocol
91
+ > = z.nativeEnum(TransportProtocol);
92
+
93
+ /** @internal */
94
+ export const OrderBy$outboundSchema: z.ZodNativeEnum<typeof OrderBy> = z
95
+ .nativeEnum(OrderBy);
96
+
97
+ /** @internal */
98
+ export type V3GlobaldataServiceOnHostRequest$Outbound = {
99
+ organization_id?: string | undefined;
100
+ start_time?: string | undefined;
101
+ end_time?: string | undefined;
102
+ page_size: number;
103
+ page_token?: string | undefined;
104
+ port?: number | undefined;
105
+ protocol?: string | undefined;
106
+ transport_protocol?: string | undefined;
107
+ host_id: string;
108
+ order_by?: Array<string> | null | undefined;
109
+ };
110
+
111
+ /** @internal */
112
+ export const V3GlobaldataServiceOnHostRequest$outboundSchema: z.ZodType<
113
+ V3GlobaldataServiceOnHostRequest$Outbound,
114
+ z.ZodTypeDef,
115
+ V3GlobaldataServiceOnHostRequest
116
+ > = z.object({
117
+ organizationId: z.string().optional(),
118
+ startTime: z.string().optional(),
119
+ endTime: z.string().optional(),
120
+ pageSize: z.number().int().default(100),
121
+ pageToken: z.string().optional(),
122
+ port: z.number().int().optional(),
123
+ protocol: z.string().optional(),
124
+ transportProtocol: TransportProtocol$outboundSchema.optional(),
125
+ hostId: z.string(),
126
+ orderBy: z.nullable(z.array(OrderBy$outboundSchema)).optional(),
127
+ }).transform((v) => {
128
+ return remap$(v, {
129
+ organizationId: "organization_id",
130
+ startTime: "start_time",
131
+ endTime: "end_time",
132
+ pageSize: "page_size",
133
+ pageToken: "page_token",
134
+ transportProtocol: "transport_protocol",
135
+ hostId: "host_id",
136
+ orderBy: "order_by",
137
+ });
138
+ });
139
+
140
+ export function v3GlobaldataServiceOnHostRequestToJSON(
141
+ v3GlobaldataServiceOnHostRequest: V3GlobaldataServiceOnHostRequest,
142
+ ): string {
143
+ return JSON.stringify(
144
+ V3GlobaldataServiceOnHostRequest$outboundSchema.parse(
145
+ v3GlobaldataServiceOnHostRequest,
146
+ ),
147
+ );
148
+ }
149
+
150
+ /** @internal */
151
+ export const V3GlobaldataServiceOnHostResponse$inboundSchema: z.ZodType<
152
+ V3GlobaldataServiceOnHostResponse,
153
+ z.ZodTypeDef,
154
+ unknown
155
+ > = z.object({
156
+ Headers: z.record(z.array(z.string())).default({}),
157
+ Result: components.ResponseEnvelopeServicesOnHostResponse$inboundSchema,
158
+ }).transform((v) => {
159
+ return remap$(v, {
160
+ "Headers": "headers",
161
+ "Result": "result",
162
+ });
163
+ });
164
+
165
+ export function v3GlobaldataServiceOnHostResponseFromJSON(
166
+ jsonString: string,
167
+ ): SafeParseResult<V3GlobaldataServiceOnHostResponse, SDKValidationError> {
168
+ return safeParse(
169
+ jsonString,
170
+ (x) => V3GlobaldataServiceOnHostResponse$inboundSchema.parse(JSON.parse(x)),
171
+ `Failed to parse 'V3GlobaldataServiceOnHostResponse' from JSON`,
172
+ );
173
+ }
@@ -15,6 +15,7 @@ import { globalDataGetHostTimeline } from "../funcs/globalDataGetHostTimeline.js
15
15
  import { globalDataGetTrackedScan } from "../funcs/globalDataGetTrackedScan.js";
16
16
  import { globalDataGetWebProperties } from "../funcs/globalDataGetWebProperties.js";
17
17
  import { globalDataGetWebProperty } from "../funcs/globalDataGetWebProperty.js";
18
+ import { globalDataListServicesOnHost } from "../funcs/globalDataListServicesOnHost.js";
18
19
  import { globalDataSearch } from "../funcs/globalDataSearch.js";
19
20
  import { ClientSDK, RequestOptions } from "../lib/sdks.js";
20
21
  import * as operations from "../models/operations/index.js";
@@ -123,6 +124,23 @@ export class GlobalData extends ClientSDK {
123
124
  ));
124
125
  }
125
126
 
127
+ /**
128
+ * Get service history for a host
129
+ *
130
+ * @remarks
131
+ * 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.
132
+ */
133
+ async listServicesOnHost(
134
+ request: operations.V3GlobaldataServiceOnHostRequest,
135
+ options?: RequestOptions,
136
+ ): Promise<operations.V3GlobaldataServiceOnHostResponse> {
137
+ return unwrapAsync(globalDataListServicesOnHost(
138
+ this,
139
+ request,
140
+ options,
141
+ ));
142
+ }
143
+
126
144
  /**
127
145
  * Get host event history
128
146
  *