@indiciaosint/sdk 1.1.0 → 1.2.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 (205) hide show
  1. package/FUNCTIONS.md +1 -1
  2. package/README.md +53 -13
  3. package/esm/funcs/activity-delete-activity.js +3 -3
  4. package/esm/funcs/activity-delete-activity.js.map +1 -1
  5. package/esm/funcs/activity-get-activity.js +3 -3
  6. package/esm/funcs/activity-get-activity.js.map +1 -1
  7. package/esm/funcs/activity-list-activities.js +3 -3
  8. package/esm/funcs/activity-list-activities.js.map +1 -1
  9. package/esm/funcs/infrastructure-scan-ports.d.ts +2 -127
  10. package/esm/funcs/infrastructure-scan-ports.d.ts.map +1 -1
  11. package/esm/funcs/infrastructure-scan-ports.js +12 -131
  12. package/esm/funcs/infrastructure-scan-ports.js.map +1 -1
  13. package/esm/funcs/infrastructure-search-certificates.js +3 -3
  14. package/esm/funcs/infrastructure-search-certificates.js.map +1 -1
  15. package/esm/funcs/infrastructure-search-dns.js +3 -3
  16. package/esm/funcs/infrastructure-search-dns.js.map +1 -1
  17. package/esm/funcs/infrastructure-search-ip-info.js +3 -3
  18. package/esm/funcs/infrastructure-search-ip-info.js.map +1 -1
  19. package/esm/funcs/infrastructure-search-shodan.js +3 -3
  20. package/esm/funcs/infrastructure-search-shodan.js.map +1 -1
  21. package/esm/funcs/infrastructure-search-whois.js +3 -3
  22. package/esm/funcs/infrastructure-search-whois.js.map +1 -1
  23. package/esm/funcs/intelligence-geolocate-media.d.ts +2 -13
  24. package/esm/funcs/intelligence-geolocate-media.d.ts.map +1 -1
  25. package/esm/funcs/intelligence-geolocate-media.js +12 -17
  26. package/esm/funcs/intelligence-geolocate-media.js.map +1 -1
  27. package/esm/funcs/intelligence-search-address.js +3 -3
  28. package/esm/funcs/intelligence-search-address.js.map +1 -1
  29. package/esm/funcs/intelligence-search-email.js +3 -3
  30. package/esm/funcs/intelligence-search-email.js.map +1 -1
  31. package/esm/funcs/intelligence-search-face.d.ts +2 -1
  32. package/esm/funcs/intelligence-search-face.d.ts.map +1 -1
  33. package/esm/funcs/intelligence-search-face.js +12 -5
  34. package/esm/funcs/intelligence-search-face.js.map +1 -1
  35. package/esm/funcs/intelligence-search-gmail.js +3 -3
  36. package/esm/funcs/intelligence-search-gmail.js.map +1 -1
  37. package/esm/funcs/intelligence-search-hudson-rock.js +3 -3
  38. package/esm/funcs/intelligence-search-hudson-rock.js.map +1 -1
  39. package/esm/funcs/intelligence-search-person.js +3 -3
  40. package/esm/funcs/intelligence-search-person.js.map +1 -1
  41. package/esm/funcs/intelligence-search-phone.js +3 -3
  42. package/esm/funcs/intelligence-search-phone.js.map +1 -1
  43. package/esm/funcs/intelligence-search-seon.js +3 -3
  44. package/esm/funcs/intelligence-search-seon.js.map +1 -1
  45. package/esm/funcs/intelligence-search-web-databases.js +3 -3
  46. package/esm/funcs/intelligence-search-web-databases.js.map +1 -1
  47. package/esm/funcs/organizations-get-organization-audit-log.js +3 -3
  48. package/esm/funcs/organizations-get-organization-audit-log.js.map +1 -1
  49. package/esm/funcs/organizations-get-organization.js +3 -3
  50. package/esm/funcs/organizations-get-organization.js.map +1 -1
  51. package/esm/funcs/organizations-list-organization-cases.js +3 -3
  52. package/esm/funcs/organizations-list-organization-cases.js.map +1 -1
  53. package/esm/funcs/organizations-list-organization-members.js +3 -3
  54. package/esm/funcs/organizations-list-organization-members.js.map +1 -1
  55. package/esm/funcs/organizations-list-organizations.js +3 -3
  56. package/esm/funcs/organizations-list-organizations.js.map +1 -1
  57. package/esm/funcs/organizations-send-organization-credits.js +3 -3
  58. package/esm/funcs/organizations-send-organization-credits.js.map +1 -1
  59. package/esm/funcs/pricing-get-pricing.js +3 -3
  60. package/esm/funcs/pricing-get-pricing.js.map +1 -1
  61. package/esm/funcs/socials-search-discord.js +3 -3
  62. package/esm/funcs/socials-search-discord.js.map +1 -1
  63. package/esm/funcs/socials-search-github.d.ts +3 -2
  64. package/esm/funcs/socials-search-github.d.ts.map +1 -1
  65. package/esm/funcs/socials-search-github.js +14 -6
  66. package/esm/funcs/socials-search-github.js.map +1 -1
  67. package/esm/funcs/socials-search-roblox.js +3 -3
  68. package/esm/funcs/socials-search-roblox.js.map +1 -1
  69. package/esm/funcs/socials-search-tiktok.js +3 -3
  70. package/esm/funcs/socials-search-tiktok.js.map +1 -1
  71. package/esm/funcs/socials-search-username.d.ts +3 -2
  72. package/esm/funcs/socials-search-username.d.ts.map +1 -1
  73. package/esm/funcs/socials-search-username.js +14 -6
  74. package/esm/funcs/socials-search-username.js.map +1 -1
  75. package/esm/funcs/tools-bypass-double-counter.js +3 -3
  76. package/esm/funcs/tools-bypass-double-counter.js.map +1 -1
  77. package/esm/funcs/tools-download-intelx-file.js +3 -3
  78. package/esm/funcs/tools-download-intelx-file.js.map +1 -1
  79. package/esm/funcs/tools-lookup-discord-alt.js +3 -3
  80. package/esm/funcs/tools-lookup-discord-alt.js.map +1 -1
  81. package/esm/funcs/users-get-info.js +3 -3
  82. package/esm/funcs/users-get-info.js.map +1 -1
  83. package/esm/hooks/hooks.d.ts.map +1 -1
  84. package/esm/hooks/hooks.js +2 -0
  85. package/esm/hooks/hooks.js.map +1 -1
  86. package/esm/hooks/registration.d.ts +3 -0
  87. package/esm/hooks/registration.d.ts.map +1 -0
  88. package/esm/hooks/registration.js +12 -0
  89. package/esm/hooks/registration.js.map +1 -0
  90. package/esm/lib/config.d.ts +4 -4
  91. package/esm/lib/config.d.ts.map +1 -1
  92. package/esm/lib/config.js +3 -3
  93. package/esm/lib/env.d.ts +1 -1
  94. package/esm/lib/env.d.ts.map +1 -1
  95. package/esm/lib/env.js +1 -1
  96. package/esm/lib/env.js.map +1 -1
  97. package/esm/lib/event-streams.d.ts +23 -0
  98. package/esm/lib/event-streams.d.ts.map +1 -0
  99. package/esm/lib/event-streams.js +163 -0
  100. package/esm/lib/event-streams.js.map +1 -0
  101. package/esm/lib/security.js +1 -1
  102. package/esm/lib/security.js.map +1 -1
  103. package/esm/models/operations/geolocate-media.d.ts +91 -0
  104. package/esm/models/operations/geolocate-media.d.ts.map +1 -1
  105. package/esm/models/operations/geolocate-media.js +74 -0
  106. package/esm/models/operations/geolocate-media.js.map +1 -1
  107. package/esm/models/operations/scan-ports.d.ts +355 -0
  108. package/esm/models/operations/scan-ports.d.ts.map +1 -1
  109. package/esm/models/operations/scan-ports.js +473 -0
  110. package/esm/models/operations/scan-ports.js.map +1 -1
  111. package/esm/models/operations/search-face.d.ts +95 -0
  112. package/esm/models/operations/search-face.d.ts.map +1 -1
  113. package/esm/models/operations/search-face.js +97 -0
  114. package/esm/models/operations/search-face.js.map +1 -1
  115. package/esm/models/operations/search-github.d.ts +69 -7
  116. package/esm/models/operations/search-github.d.ts.map +1 -1
  117. package/esm/models/operations/search-github.js +83 -9
  118. package/esm/models/operations/search-github.js.map +1 -1
  119. package/esm/models/operations/search-username.d.ts +435 -19
  120. package/esm/models/operations/search-username.d.ts.map +1 -1
  121. package/esm/models/operations/search-username.js +738 -20
  122. package/esm/models/operations/search-username.js.map +1 -1
  123. package/esm/models/operations/search-web-databases.d.ts +4 -5
  124. package/esm/models/operations/search-web-databases.d.ts.map +1 -1
  125. package/esm/models/operations/search-web-databases.js +3 -4
  126. package/esm/models/operations/search-web-databases.js.map +1 -1
  127. package/esm/models/security.d.ts +2 -2
  128. package/esm/models/security.d.ts.map +1 -1
  129. package/esm/models/security.js +2 -2
  130. package/esm/models/security.js.map +1 -1
  131. package/esm/sdk/infrastructure.d.ts +2 -127
  132. package/esm/sdk/infrastructure.d.ts.map +1 -1
  133. package/esm/sdk/infrastructure.js +0 -126
  134. package/esm/sdk/infrastructure.js.map +1 -1
  135. package/esm/sdk/intelligence.d.ts +3 -14
  136. package/esm/sdk/intelligence.d.ts.map +1 -1
  137. package/esm/sdk/intelligence.js +0 -12
  138. package/esm/sdk/intelligence.js.map +1 -1
  139. package/esm/sdk/socials.d.ts +5 -4
  140. package/esm/sdk/socials.d.ts.map +1 -1
  141. package/esm/sdk/socials.js +2 -2
  142. package/esm/sdk/socials.js.map +1 -1
  143. package/esm/types/discriminated-union.d.ts +25 -0
  144. package/esm/types/discriminated-union.d.ts.map +1 -0
  145. package/esm/types/discriminated-union.js +61 -0
  146. package/esm/types/discriminated-union.js.map +1 -0
  147. package/esm/types/smart-union.d.ts.map +1 -1
  148. package/esm/types/smart-union.js +2 -1
  149. package/esm/types/smart-union.js.map +1 -1
  150. package/examples/usersGetInfo.example.ts +1 -1
  151. package/jsr.json +2 -1
  152. package/package.json +1 -1
  153. package/src/funcs/activity-delete-activity.ts +3 -3
  154. package/src/funcs/activity-get-activity.ts +3 -3
  155. package/src/funcs/activity-list-activities.ts +3 -3
  156. package/src/funcs/infrastructure-scan-ports.ts +21 -134
  157. package/src/funcs/infrastructure-search-certificates.ts +3 -3
  158. package/src/funcs/infrastructure-search-dns.ts +3 -3
  159. package/src/funcs/infrastructure-search-ip-info.ts +3 -3
  160. package/src/funcs/infrastructure-search-shodan.ts +3 -3
  161. package/src/funcs/infrastructure-search-whois.ts +3 -3
  162. package/src/funcs/intelligence-geolocate-media.ts +21 -20
  163. package/src/funcs/intelligence-search-address.ts +3 -3
  164. package/src/funcs/intelligence-search-email.ts +3 -3
  165. package/src/funcs/intelligence-search-face.ts +21 -8
  166. package/src/funcs/intelligence-search-gmail.ts +3 -3
  167. package/src/funcs/intelligence-search-hudson-rock.ts +3 -3
  168. package/src/funcs/intelligence-search-person.ts +3 -3
  169. package/src/funcs/intelligence-search-phone.ts +3 -3
  170. package/src/funcs/intelligence-search-seon.ts +3 -3
  171. package/src/funcs/intelligence-search-web-databases.ts +3 -3
  172. package/src/funcs/organizations-get-organization-audit-log.ts +3 -3
  173. package/src/funcs/organizations-get-organization.ts +3 -3
  174. package/src/funcs/organizations-list-organization-cases.ts +3 -3
  175. package/src/funcs/organizations-list-organization-members.ts +3 -3
  176. package/src/funcs/organizations-list-organizations.ts +3 -3
  177. package/src/funcs/organizations-send-organization-credits.ts +3 -3
  178. package/src/funcs/pricing-get-pricing.ts +3 -3
  179. package/src/funcs/socials-search-discord.ts +3 -3
  180. package/src/funcs/socials-search-github.ts +24 -9
  181. package/src/funcs/socials-search-roblox.ts +3 -3
  182. package/src/funcs/socials-search-tiktok.ts +3 -3
  183. package/src/funcs/socials-search-username.ts +26 -9
  184. package/src/funcs/tools-bypass-double-counter.ts +3 -3
  185. package/src/funcs/tools-download-intelx-file.ts +3 -3
  186. package/src/funcs/tools-lookup-discord-alt.ts +3 -3
  187. package/src/funcs/users-get-info.ts +3 -3
  188. package/src/hooks/hooks.ts +3 -0
  189. package/src/hooks/registration.ts +14 -0
  190. package/src/lib/config.ts +4 -4
  191. package/src/lib/env.ts +2 -2
  192. package/src/lib/event-streams.ts +191 -0
  193. package/src/lib/security.ts +1 -1
  194. package/src/models/operations/geolocate-media.ts +231 -0
  195. package/src/models/operations/scan-ports.ts +1223 -0
  196. package/src/models/operations/search-face.ts +261 -0
  197. package/src/models/operations/search-github.ts +225 -41
  198. package/src/models/operations/search-username.ts +1690 -92
  199. package/src/models/operations/search-web-databases.ts +9 -8
  200. package/src/models/security.ts +4 -4
  201. package/src/sdk/infrastructure.ts +2 -127
  202. package/src/sdk/intelligence.ts +3 -14
  203. package/src/sdk/socials.ts +5 -4
  204. package/src/types/discriminated-union.ts +101 -0
  205. package/src/types/smart-union.ts +2 -1
@@ -96,8 +96,8 @@ async function $do(
96
96
  Accept: "application/json",
97
97
  }));
98
98
 
99
- const secConfig = await extractSecurity(client._options.apiKeyAuth);
100
- const securityInput = secConfig == null ? {} : { apiKeyAuth: secConfig };
99
+ const secConfig = await extractSecurity(client._options.apiKey);
100
+ const securityInput = secConfig == null ? {} : { apiKey: secConfig };
101
101
  const requestSecurity = resolveGlobalSecurity(securityInput);
102
102
 
103
103
  const context = {
@@ -108,7 +108,7 @@ async function $do(
108
108
 
109
109
  resolvedSecurity: requestSecurity,
110
110
 
111
- securitySource: client._options.apiKeyAuth,
111
+ securitySource: client._options.apiKey,
112
112
  retryConfig: options?.retries
113
113
  || client._options.retryConfig
114
114
  || { strategy: "none" },
@@ -99,8 +99,8 @@ async function $do(
99
99
  Accept: "application/json",
100
100
  }));
101
101
 
102
- const secConfig = await extractSecurity(client._options.apiKeyAuth);
103
- const securityInput = secConfig == null ? {} : { apiKeyAuth: secConfig };
102
+ const secConfig = await extractSecurity(client._options.apiKey);
103
+ const securityInput = secConfig == null ? {} : { apiKey: secConfig };
104
104
  const requestSecurity = resolveGlobalSecurity(securityInput);
105
105
 
106
106
  const context = {
@@ -111,7 +111,7 @@ async function $do(
111
111
 
112
112
  resolvedSecurity: requestSecurity,
113
113
 
114
- securitySource: client._options.apiKeyAuth,
114
+ securitySource: client._options.apiKey,
115
115
  retryConfig: options?.retries
116
116
  || client._options.retryConfig
117
117
  || { strategy: "none" },
@@ -5,6 +5,7 @@
5
5
  import * as z from "zod/v4-mini";
6
6
  import { IndiciaCore } from "../core.js";
7
7
  import { encodeJSON } from "../lib/encodings.js";
8
+ import { EventStream } from "../lib/event-streams.js";
8
9
  import { matchStatusCode } from "../lib/http.js";
9
10
  import * as M from "../lib/matchers.js";
10
11
  import { compactMap } from "../lib/primitives.js";
@@ -26,139 +27,12 @@ import { SDKValidationError } from "../models/errors/sdk-validation-error.js";
26
27
  import * as operations from "../models/operations/index.js";
27
28
  import { APICall, APIPromise } from "../types/async.js";
28
29
  import { Result } from "../types/fp.js";
29
- import * as types$ from "../types/primitives.js";
30
30
 
31
31
  /**
32
32
  * Port Scan
33
33
  *
34
34
  * @remarks
35
35
  * Perform a port scan on a given IP address or domain.
36
- *
37
- * Response type:
38
- * ```ts
39
- * interface NmapScanResult {
40
- * $: {
41
- * scanner: string;
42
- * args: string;
43
- * start: string;
44
- * startstr: string;
45
- * version: string;
46
- * xmloutputversion: string;
47
- * };
48
- * scaninfo: Array<{
49
- * $: {
50
- * type: string;
51
- * protocol: string;
52
- * numservices: string;
53
- * services: string;
54
- * };
55
- * }>;
56
- * verbose: Array<{ $: { level: string } }>;
57
- * debugging: Array<{ $: { level: string } }>;
58
- * taskprogress?: Array<{
59
- * $: {
60
- * task: string;
61
- * time: string;
62
- * percent: string;
63
- * remaining: string;
64
- * etc: string;
65
- * };
66
- * }>;
67
- * host?: Array<{
68
- * $: {
69
- * starttime: string;
70
- * endtime: string;
71
- * };
72
- * status: Array<{
73
- * $: {
74
- * state: string;
75
- * reason: string;
76
- * reason_ttl: string;
77
- * };
78
- * }>;
79
- * address: Array<{
80
- * $: {
81
- * addr: string;
82
- * addrtype: string;
83
- * };
84
- * }>;
85
- * hostnames?: Array<{
86
- * hostname: Array<{
87
- * $: {
88
- * name: string;
89
- * type: string;
90
- * };
91
- * }>;
92
- * }>;
93
- * ports?: Array<{
94
- * extraports?: Array<{
95
- * $: {
96
- * state: string;
97
- * count: string;
98
- * };
99
- * extrareasons: Array<{
100
- * $: {
101
- * reason: string;
102
- * count: string;
103
- * proto: string;
104
- * ports: string;
105
- * };
106
- * }>;
107
- * }>;
108
- * port?: Array<{
109
- * $: {
110
- * protocol: string;
111
- * portid: string;
112
- * };
113
- * state: Array<{
114
- * $: {
115
- * state: string;
116
- * reason: string;
117
- * reason_ttl: string;
118
- * };
119
- * }>;
120
- * service?: Array<{
121
- * $: {
122
- * name: string;
123
- * product?: string;
124
- * version?: string;
125
- * extrainfo?: string;
126
- * ostype?: string;
127
- * method: string;
128
- * conf: string;
129
- * };
130
- * cpe?: string[];
131
- * }>;
132
- * }>;
133
- * }>;
134
- * times?: Array<{
135
- * $: {
136
- * srtt: string;
137
- * rttvar: string;
138
- * to: string;
139
- * };
140
- * }>;
141
- * }>;
142
- * runstats: Array<{
143
- * finished: Array<{
144
- * $: {
145
- * time: string;
146
- * timestr: string;
147
- * summary: string;
148
- * elapsed: string;
149
- * exit: string;
150
- * };
151
- * }>;
152
- * hosts: Array<{
153
- * $: {
154
- * up: string;
155
- * down: string;
156
- * total: string;
157
- * };
158
- * }>;
159
- * }>;
160
- * }
161
- * ```
162
36
  */
163
37
  export function infrastructureScanPorts(
164
38
  client: IndiciaCore,
@@ -166,7 +40,7 @@ export function infrastructureScanPorts(
166
40
  options?: RequestOptions,
167
41
  ): APIPromise<
168
42
  Result<
169
- string,
43
+ EventStream<operations.PortscanEvent>,
170
44
  | errors.FailedResponseError
171
45
  | IndiciaError
172
46
  | ResponseValidationError
@@ -192,7 +66,7 @@ async function $do(
192
66
  ): Promise<
193
67
  [
194
68
  Result<
195
- string,
69
+ EventStream<operations.PortscanEvent>,
196
70
  | errors.FailedResponseError
197
71
  | IndiciaError
198
72
  | ResponseValidationError
@@ -224,8 +98,8 @@ async function $do(
224
98
  Accept: "text/event-stream",
225
99
  }));
226
100
 
227
- const secConfig = await extractSecurity(client._options.apiKeyAuth);
228
- const securityInput = secConfig == null ? {} : { apiKeyAuth: secConfig };
101
+ const secConfig = await extractSecurity(client._options.apiKey);
102
+ const securityInput = secConfig == null ? {} : { apiKey: secConfig };
229
103
  const requestSecurity = resolveGlobalSecurity(securityInput);
230
104
 
231
105
  const context = {
@@ -236,7 +110,7 @@ async function $do(
236
110
 
237
111
  resolvedSecurity: requestSecurity,
238
112
 
239
- securitySource: client._options.apiKeyAuth,
113
+ securitySource: client._options.apiKey,
240
114
  retryConfig: options?.retries
241
115
  || client._options.retryConfig
242
116
  || { strategy: "none" },
@@ -275,7 +149,7 @@ async function $do(
275
149
  };
276
150
 
277
151
  const [result] = await M.match<
278
- string,
152
+ EventStream<operations.PortscanEvent>,
279
153
  | errors.FailedResponseError
280
154
  | IndiciaError
281
155
  | ResponseValidationError
@@ -286,7 +160,20 @@ async function $do(
286
160
  | UnexpectedClientError
287
161
  | SDKValidationError
288
162
  >(
289
- M.text(200, types$.string(), { ctype: "text/event-stream" }),
163
+ M.sse(
164
+ 200,
165
+ z.pipe(
166
+ z.custom<ReadableStream<Uint8Array>>(x => x instanceof ReadableStream),
167
+ z.transform(stream => {
168
+ return new EventStream(stream, rawEvent => {
169
+ return {
170
+ done: false,
171
+ value: operations.PortscanEvent$inboundSchema.parse(rawEvent),
172
+ };
173
+ });
174
+ }),
175
+ ),
176
+ ),
290
177
  M.jsonErr([400, 402], errors.FailedResponseError$inboundSchema),
291
178
  M.jsonErr(500, errors.FailedResponseError$inboundSchema),
292
179
  M.fail("4XX"),
@@ -98,8 +98,8 @@ async function $do(
98
98
  Accept: "application/json",
99
99
  }));
100
100
 
101
- const secConfig = await extractSecurity(client._options.apiKeyAuth);
102
- const securityInput = secConfig == null ? {} : { apiKeyAuth: secConfig };
101
+ const secConfig = await extractSecurity(client._options.apiKey);
102
+ const securityInput = secConfig == null ? {} : { apiKey: secConfig };
103
103
  const requestSecurity = resolveGlobalSecurity(securityInput);
104
104
 
105
105
  const context = {
@@ -110,7 +110,7 @@ async function $do(
110
110
 
111
111
  resolvedSecurity: requestSecurity,
112
112
 
113
- securitySource: client._options.apiKeyAuth,
113
+ securitySource: client._options.apiKey,
114
114
  retryConfig: options?.retries
115
115
  || client._options.retryConfig
116
116
  || { strategy: "none" },
@@ -97,8 +97,8 @@ async function $do(
97
97
  Accept: "application/json",
98
98
  }));
99
99
 
100
- const secConfig = await extractSecurity(client._options.apiKeyAuth);
101
- const securityInput = secConfig == null ? {} : { apiKeyAuth: secConfig };
100
+ const secConfig = await extractSecurity(client._options.apiKey);
101
+ const securityInput = secConfig == null ? {} : { apiKey: secConfig };
102
102
  const requestSecurity = resolveGlobalSecurity(securityInput);
103
103
 
104
104
  const context = {
@@ -109,7 +109,7 @@ async function $do(
109
109
 
110
110
  resolvedSecurity: requestSecurity,
111
111
 
112
- securitySource: client._options.apiKeyAuth,
112
+ securitySource: client._options.apiKey,
113
113
  retryConfig: options?.retries
114
114
  || client._options.retryConfig
115
115
  || { strategy: "none" },
@@ -97,8 +97,8 @@ async function $do(
97
97
  Accept: "application/json",
98
98
  }));
99
99
 
100
- const secConfig = await extractSecurity(client._options.apiKeyAuth);
101
- const securityInput = secConfig == null ? {} : { apiKeyAuth: secConfig };
100
+ const secConfig = await extractSecurity(client._options.apiKey);
101
+ const securityInput = secConfig == null ? {} : { apiKey: secConfig };
102
102
  const requestSecurity = resolveGlobalSecurity(securityInput);
103
103
 
104
104
  const context = {
@@ -109,7 +109,7 @@ async function $do(
109
109
 
110
110
  resolvedSecurity: requestSecurity,
111
111
 
112
- securitySource: client._options.apiKeyAuth,
112
+ securitySource: client._options.apiKey,
113
113
  retryConfig: options?.retries
114
114
  || client._options.retryConfig
115
115
  || { strategy: "none" },
@@ -97,8 +97,8 @@ async function $do(
97
97
  Accept: "application/json",
98
98
  }));
99
99
 
100
- const secConfig = await extractSecurity(client._options.apiKeyAuth);
101
- const securityInput = secConfig == null ? {} : { apiKeyAuth: secConfig };
100
+ const secConfig = await extractSecurity(client._options.apiKey);
101
+ const securityInput = secConfig == null ? {} : { apiKey: secConfig };
102
102
  const requestSecurity = resolveGlobalSecurity(securityInput);
103
103
 
104
104
  const context = {
@@ -109,7 +109,7 @@ async function $do(
109
109
 
110
110
  resolvedSecurity: requestSecurity,
111
111
 
112
- securitySource: client._options.apiKeyAuth,
112
+ securitySource: client._options.apiKey,
113
113
  retryConfig: options?.retries
114
114
  || client._options.retryConfig
115
115
  || { strategy: "none" },
@@ -97,8 +97,8 @@ async function $do(
97
97
  Accept: "application/json",
98
98
  }));
99
99
 
100
- const secConfig = await extractSecurity(client._options.apiKeyAuth);
101
- const securityInput = secConfig == null ? {} : { apiKeyAuth: secConfig };
100
+ const secConfig = await extractSecurity(client._options.apiKey);
101
+ const securityInput = secConfig == null ? {} : { apiKey: secConfig };
102
102
  const requestSecurity = resolveGlobalSecurity(securityInput);
103
103
 
104
104
  const context = {
@@ -109,7 +109,7 @@ async function $do(
109
109
 
110
110
  resolvedSecurity: requestSecurity,
111
111
 
112
- securitySource: client._options.apiKeyAuth,
112
+ securitySource: client._options.apiKey,
113
113
  retryConfig: options?.retries
114
114
  || client._options.retryConfig
115
115
  || { strategy: "none" },
@@ -5,6 +5,7 @@
5
5
  import * as z from "zod/v4-mini";
6
6
  import { IndiciaCore } from "../core.js";
7
7
  import { appendForm, normalizeBlob } from "../lib/encodings.js";
8
+ import { EventStream } from "../lib/event-streams.js";
8
9
  import {
9
10
  bytesToBlob,
10
11
  getContentTypeFromFileName,
@@ -32,7 +33,6 @@ import * as operations from "../models/operations/index.js";
32
33
  import { APICall, APIPromise } from "../types/async.js";
33
34
  import { isBlobLike } from "../types/blobs.js";
34
35
  import { Result } from "../types/fp.js";
35
- import * as types$ from "../types/primitives.js";
36
36
  import { isReadableStream } from "../types/streams.js";
37
37
 
38
38
  /**
@@ -40,18 +40,6 @@ import { isReadableStream } from "../types/streams.js";
40
40
  *
41
41
  * @remarks
42
42
  * Geolocate an image using AI-powered analysis. Streams progress updates via Server-Sent Events.
43
- *
44
- * Response type:
45
- *
46
- * ```ts
47
- * interface GeolocationResponse {
48
- * location: string | null;
49
- * coordinates: string | null;
50
- * certainty: string;
51
- * reasoning: string;
52
- * mapsUrl?: `https://www.google.com/maps/search/?api=1&query=${string}`;
53
- * }
54
- * ```
55
43
  */
56
44
  export function intelligenceGeolocateMedia(
57
45
  client: IndiciaCore,
@@ -59,7 +47,7 @@ export function intelligenceGeolocateMedia(
59
47
  options?: RequestOptions,
60
48
  ): APIPromise<
61
49
  Result<
62
- string,
50
+ EventStream<operations.GeolocationEvent>,
63
51
  | errors.FailedResponseError
64
52
  | IndiciaError
65
53
  | ResponseValidationError
@@ -85,7 +73,7 @@ async function $do(
85
73
  ): Promise<
86
74
  [
87
75
  Result<
88
- string,
76
+ EventStream<operations.GeolocationEvent>,
89
77
  | errors.FailedResponseError
90
78
  | IndiciaError
91
79
  | ResponseValidationError
@@ -148,8 +136,8 @@ async function $do(
148
136
  Accept: "text/event-stream",
149
137
  }));
150
138
 
151
- const secConfig = await extractSecurity(client._options.apiKeyAuth);
152
- const securityInput = secConfig == null ? {} : { apiKeyAuth: secConfig };
139
+ const secConfig = await extractSecurity(client._options.apiKey);
140
+ const securityInput = secConfig == null ? {} : { apiKey: secConfig };
153
141
  const requestSecurity = resolveGlobalSecurity(securityInput);
154
142
 
155
143
  const context = {
@@ -160,7 +148,7 @@ async function $do(
160
148
 
161
149
  resolvedSecurity: requestSecurity,
162
150
 
163
- securitySource: client._options.apiKeyAuth,
151
+ securitySource: client._options.apiKey,
164
152
  retryConfig: options?.retries
165
153
  || client._options.retryConfig
166
154
  || { strategy: "none" },
@@ -199,7 +187,7 @@ async function $do(
199
187
  };
200
188
 
201
189
  const [result] = await M.match<
202
- string,
190
+ EventStream<operations.GeolocationEvent>,
203
191
  | errors.FailedResponseError
204
192
  | IndiciaError
205
193
  | ResponseValidationError
@@ -210,7 +198,20 @@ async function $do(
210
198
  | UnexpectedClientError
211
199
  | SDKValidationError
212
200
  >(
213
- M.text(200, types$.string(), { ctype: "text/event-stream" }),
201
+ M.sse(
202
+ 200,
203
+ z.pipe(
204
+ z.custom<ReadableStream<Uint8Array>>(x => x instanceof ReadableStream),
205
+ z.transform(stream => {
206
+ return new EventStream(stream, rawEvent => {
207
+ return {
208
+ done: false,
209
+ value: operations.GeolocationEvent$inboundSchema.parse(rawEvent),
210
+ };
211
+ });
212
+ }),
213
+ ),
214
+ ),
214
215
  M.jsonErr([400, 402], errors.FailedResponseError$inboundSchema),
215
216
  M.jsonErr(500, errors.FailedResponseError$inboundSchema),
216
217
  M.fail("4XX"),
@@ -94,8 +94,8 @@ async function $do(
94
94
  Accept: "application/json",
95
95
  }));
96
96
 
97
- const secConfig = await extractSecurity(client._options.apiKeyAuth);
98
- const securityInput = secConfig == null ? {} : { apiKeyAuth: secConfig };
97
+ const secConfig = await extractSecurity(client._options.apiKey);
98
+ const securityInput = secConfig == null ? {} : { apiKey: secConfig };
99
99
  const requestSecurity = resolveGlobalSecurity(securityInput);
100
100
 
101
101
  const context = {
@@ -106,7 +106,7 @@ async function $do(
106
106
 
107
107
  resolvedSecurity: requestSecurity,
108
108
 
109
- securitySource: client._options.apiKeyAuth,
109
+ securitySource: client._options.apiKey,
110
110
  retryConfig: options?.retries
111
111
  || client._options.retryConfig
112
112
  || { strategy: "none" },
@@ -97,8 +97,8 @@ async function $do(
97
97
  Accept: "application/json",
98
98
  }));
99
99
 
100
- const secConfig = await extractSecurity(client._options.apiKeyAuth);
101
- const securityInput = secConfig == null ? {} : { apiKeyAuth: secConfig };
100
+ const secConfig = await extractSecurity(client._options.apiKey);
101
+ const securityInput = secConfig == null ? {} : { apiKey: secConfig };
102
102
  const requestSecurity = resolveGlobalSecurity(securityInput);
103
103
 
104
104
  const context = {
@@ -109,7 +109,7 @@ async function $do(
109
109
 
110
110
  resolvedSecurity: requestSecurity,
111
111
 
112
- securitySource: client._options.apiKeyAuth,
112
+ securitySource: client._options.apiKey,
113
113
  retryConfig: options?.retries
114
114
  || client._options.retryConfig
115
115
  || { strategy: "none" },
@@ -5,6 +5,7 @@
5
5
  import * as z from "zod/v4-mini";
6
6
  import { IndiciaCore } from "../core.js";
7
7
  import { appendForm, normalizeBlob } from "../lib/encodings.js";
8
+ import { EventStream } from "../lib/event-streams.js";
8
9
  import {
9
10
  bytesToBlob,
10
11
  getContentTypeFromFileName,
@@ -32,7 +33,6 @@ import * as operations from "../models/operations/index.js";
32
33
  import { APICall, APIPromise } from "../types/async.js";
33
34
  import { isBlobLike } from "../types/blobs.js";
34
35
  import { Result } from "../types/fp.js";
35
- import * as types$ from "../types/primitives.js";
36
36
  import { isReadableStream } from "../types/streams.js";
37
37
 
38
38
  /**
@@ -47,7 +47,7 @@ export function intelligenceSearchFace(
47
47
  options?: RequestOptions,
48
48
  ): APIPromise<
49
49
  Result<
50
- string,
50
+ EventStream<operations.FacialSearchEvent>,
51
51
  | errors.FailedResponseError
52
52
  | IndiciaError
53
53
  | ResponseValidationError
@@ -73,7 +73,7 @@ async function $do(
73
73
  ): Promise<
74
74
  [
75
75
  Result<
76
- string,
76
+ EventStream<operations.FacialSearchEvent>,
77
77
  | errors.FailedResponseError
78
78
  | IndiciaError
79
79
  | ResponseValidationError
@@ -130,8 +130,8 @@ async function $do(
130
130
  Accept: "text/event-stream",
131
131
  }));
132
132
 
133
- const secConfig = await extractSecurity(client._options.apiKeyAuth);
134
- const securityInput = secConfig == null ? {} : { apiKeyAuth: secConfig };
133
+ const secConfig = await extractSecurity(client._options.apiKey);
134
+ const securityInput = secConfig == null ? {} : { apiKey: secConfig };
135
135
  const requestSecurity = resolveGlobalSecurity(securityInput);
136
136
 
137
137
  const context = {
@@ -142,7 +142,7 @@ async function $do(
142
142
 
143
143
  resolvedSecurity: requestSecurity,
144
144
 
145
- securitySource: client._options.apiKeyAuth,
145
+ securitySource: client._options.apiKey,
146
146
  retryConfig: options?.retries
147
147
  || client._options.retryConfig
148
148
  || { strategy: "none" },
@@ -181,7 +181,7 @@ async function $do(
181
181
  };
182
182
 
183
183
  const [result] = await M.match<
184
- string,
184
+ EventStream<operations.FacialSearchEvent>,
185
185
  | errors.FailedResponseError
186
186
  | IndiciaError
187
187
  | ResponseValidationError
@@ -192,7 +192,20 @@ async function $do(
192
192
  | UnexpectedClientError
193
193
  | SDKValidationError
194
194
  >(
195
- M.text(200, types$.string(), { ctype: "text/event-stream" }),
195
+ M.sse(
196
+ 200,
197
+ z.pipe(
198
+ z.custom<ReadableStream<Uint8Array>>(x => x instanceof ReadableStream),
199
+ z.transform(stream => {
200
+ return new EventStream(stream, rawEvent => {
201
+ return {
202
+ done: false,
203
+ value: operations.FacialSearchEvent$inboundSchema.parse(rawEvent),
204
+ };
205
+ });
206
+ }),
207
+ ),
208
+ ),
196
209
  M.jsonErr([400, 402], errors.FailedResponseError$inboundSchema),
197
210
  M.jsonErr(500, errors.FailedResponseError$inboundSchema),
198
211
  M.fail("4XX"),
@@ -97,8 +97,8 @@ async function $do(
97
97
  Accept: "application/json",
98
98
  }));
99
99
 
100
- const secConfig = await extractSecurity(client._options.apiKeyAuth);
101
- const securityInput = secConfig == null ? {} : { apiKeyAuth: secConfig };
100
+ const secConfig = await extractSecurity(client._options.apiKey);
101
+ const securityInput = secConfig == null ? {} : { apiKey: secConfig };
102
102
  const requestSecurity = resolveGlobalSecurity(securityInput);
103
103
 
104
104
  const context = {
@@ -109,7 +109,7 @@ async function $do(
109
109
 
110
110
  resolvedSecurity: requestSecurity,
111
111
 
112
- securitySource: client._options.apiKeyAuth,
112
+ securitySource: client._options.apiKey,
113
113
  retryConfig: options?.retries
114
114
  || client._options.retryConfig
115
115
  || { strategy: "none" },
@@ -98,8 +98,8 @@ async function $do(
98
98
  Accept: "application/json",
99
99
  }));
100
100
 
101
- const secConfig = await extractSecurity(client._options.apiKeyAuth);
102
- const securityInput = secConfig == null ? {} : { apiKeyAuth: secConfig };
101
+ const secConfig = await extractSecurity(client._options.apiKey);
102
+ const securityInput = secConfig == null ? {} : { apiKey: secConfig };
103
103
  const requestSecurity = resolveGlobalSecurity(securityInput);
104
104
 
105
105
  const context = {
@@ -110,7 +110,7 @@ async function $do(
110
110
 
111
111
  resolvedSecurity: requestSecurity,
112
112
 
113
- securitySource: client._options.apiKeyAuth,
113
+ securitySource: client._options.apiKey,
114
114
  retryConfig: options?.retries
115
115
  || client._options.retryConfig
116
116
  || { strategy: "none" },
@@ -97,8 +97,8 @@ async function $do(
97
97
  Accept: "application/json",
98
98
  }));
99
99
 
100
- const secConfig = await extractSecurity(client._options.apiKeyAuth);
101
- const securityInput = secConfig == null ? {} : { apiKeyAuth: secConfig };
100
+ const secConfig = await extractSecurity(client._options.apiKey);
101
+ const securityInput = secConfig == null ? {} : { apiKey: secConfig };
102
102
  const requestSecurity = resolveGlobalSecurity(securityInput);
103
103
 
104
104
  const context = {
@@ -109,7 +109,7 @@ async function $do(
109
109
 
110
110
  resolvedSecurity: requestSecurity,
111
111
 
112
- securitySource: client._options.apiKeyAuth,
112
+ securitySource: client._options.apiKey,
113
113
  retryConfig: options?.retries
114
114
  || client._options.retryConfig
115
115
  || { strategy: "none" },
@@ -97,8 +97,8 @@ async function $do(
97
97
  Accept: "application/json",
98
98
  }));
99
99
 
100
- const secConfig = await extractSecurity(client._options.apiKeyAuth);
101
- const securityInput = secConfig == null ? {} : { apiKeyAuth: secConfig };
100
+ const secConfig = await extractSecurity(client._options.apiKey);
101
+ const securityInput = secConfig == null ? {} : { apiKey: secConfig };
102
102
  const requestSecurity = resolveGlobalSecurity(securityInput);
103
103
 
104
104
  const context = {
@@ -109,7 +109,7 @@ async function $do(
109
109
 
110
110
  resolvedSecurity: requestSecurity,
111
111
 
112
- securitySource: client._options.apiKeyAuth,
112
+ securitySource: client._options.apiKey,
113
113
  retryConfig: options?.retries
114
114
  || client._options.retryConfig
115
115
  || { strategy: "none" },