@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
@@ -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" },
@@ -102,8 +102,8 @@ async function $do(
102
102
  Accept: "application/json",
103
103
  }));
104
104
 
105
- const secConfig = await extractSecurity(client._options.apiKeyAuth);
106
- const securityInput = secConfig == null ? {} : { apiKeyAuth: secConfig };
105
+ const secConfig = await extractSecurity(client._options.apiKey);
106
+ const securityInput = secConfig == null ? {} : { apiKey: secConfig };
107
107
  const requestSecurity = resolveGlobalSecurity(securityInput);
108
108
 
109
109
  const context = {
@@ -114,7 +114,7 @@ async function $do(
114
114
 
115
115
  resolvedSecurity: requestSecurity,
116
116
 
117
- securitySource: client._options.apiKeyAuth,
117
+ securitySource: client._options.apiKey,
118
118
  retryConfig: options?.retries
119
119
  || client._options.retryConfig
120
120
  || { strategy: "none" },
@@ -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" },
@@ -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" },
@@ -73,8 +73,8 @@ async function $do(
73
73
  Accept: "application/json",
74
74
  }));
75
75
 
76
- const secConfig = await extractSecurity(client._options.apiKeyAuth);
77
- const securityInput = secConfig == null ? {} : { apiKeyAuth: secConfig };
76
+ const secConfig = await extractSecurity(client._options.apiKey);
77
+ const securityInput = secConfig == null ? {} : { apiKey: secConfig };
78
78
  const requestSecurity = resolveGlobalSecurity(securityInput);
79
79
 
80
80
  const context = {
@@ -85,7 +85,7 @@ async function $do(
85
85
 
86
86
  resolvedSecurity: requestSecurity,
87
87
 
88
- securitySource: client._options.apiKeyAuth,
88
+ securitySource: client._options.apiKey,
89
89
  retryConfig: options?.retries
90
90
  || client._options.retryConfig
91
91
  || { 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" },
@@ -73,8 +73,8 @@ async function $do(
73
73
  Accept: "application/json",
74
74
  }));
75
75
 
76
- const secConfig = await extractSecurity(client._options.apiKeyAuth);
77
- const securityInput = secConfig == null ? {} : { apiKeyAuth: secConfig };
76
+ const secConfig = await extractSecurity(client._options.apiKey);
77
+ const securityInput = secConfig == null ? {} : { apiKey: secConfig };
78
78
  const requestSecurity = resolveGlobalSecurity(securityInput);
79
79
 
80
80
  const context = {
@@ -85,7 +85,7 @@ async function $do(
85
85
 
86
86
  resolvedSecurity: requestSecurity,
87
87
 
88
- securitySource: client._options.apiKeyAuth,
88
+ securitySource: client._options.apiKey,
89
89
  retryConfig: options?.retries
90
90
  || client._options.retryConfig
91
91
  || { 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 { 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";
@@ -31,7 +32,7 @@ import { Result } from "../types/fp.js";
31
32
  * GitHub Search
32
33
  *
33
34
  * @remarks
34
- * Search GitHub profiles, info, and commit emails
35
+ * Search GitHub profiles, info, and commit emails. Streams progress updates via Server-Sent Events.
35
36
  */
36
37
  export function socialsSearchGithub(
37
38
  client: IndiciaCore,
@@ -39,7 +40,7 @@ export function socialsSearchGithub(
39
40
  options?: RequestOptions,
40
41
  ): APIPromise<
41
42
  Result<
42
- operations.SearchGithubResponse,
43
+ EventStream<operations.GithubSearchEvent>,
43
44
  | errors.FailedResponseError
44
45
  | IndiciaError
45
46
  | ResponseValidationError
@@ -65,7 +66,7 @@ async function $do(
65
66
  ): Promise<
66
67
  [
67
68
  Result<
68
- operations.SearchGithubResponse,
69
+ EventStream<operations.GithubSearchEvent>,
69
70
  | errors.FailedResponseError
70
71
  | IndiciaError
71
72
  | ResponseValidationError
@@ -94,11 +95,11 @@ async function $do(
94
95
 
95
96
  const headers = new Headers(compactMap({
96
97
  "Content-Type": "application/json",
97
- Accept: "application/json",
98
+ Accept: "text/event-stream",
98
99
  }));
99
100
 
100
- const secConfig = await extractSecurity(client._options.apiKeyAuth);
101
- const securityInput = secConfig == null ? {} : { apiKeyAuth: secConfig };
101
+ const secConfig = await extractSecurity(client._options.apiKey);
102
+ const securityInput = secConfig == null ? {} : { apiKey: secConfig };
102
103
  const requestSecurity = resolveGlobalSecurity(securityInput);
103
104
 
104
105
  const context = {
@@ -109,7 +110,7 @@ async function $do(
109
110
 
110
111
  resolvedSecurity: requestSecurity,
111
112
 
112
- securitySource: client._options.apiKeyAuth,
113
+ securitySource: client._options.apiKey,
113
114
  retryConfig: options?.retries
114
115
  || client._options.retryConfig
115
116
  || { strategy: "none" },
@@ -148,7 +149,7 @@ async function $do(
148
149
  };
149
150
 
150
151
  const [result] = await M.match<
151
- operations.SearchGithubResponse,
152
+ EventStream<operations.GithubSearchEvent>,
152
153
  | errors.FailedResponseError
153
154
  | IndiciaError
154
155
  | ResponseValidationError
@@ -159,7 +160,21 @@ async function $do(
159
160
  | UnexpectedClientError
160
161
  | SDKValidationError
161
162
  >(
162
- M.json(200, operations.SearchGithubResponse$inboundSchema),
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.GithubSearchEvent$inboundSchema.parse(rawEvent),
172
+ };
173
+ });
174
+ }),
175
+ ),
176
+ ),
177
+ M.jsonErr([400, 402], errors.FailedResponseError$inboundSchema),
163
178
  M.jsonErr(500, errors.FailedResponseError$inboundSchema),
164
179
  M.fail("4XX"),
165
180
  M.fail("5XX"),
@@ -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 { 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";
@@ -31,7 +32,7 @@ import { Result } from "../types/fp.js";
31
32
  * Username Search V2
32
33
  *
33
34
  * @remarks
34
- * Search various sites for a specific username
35
+ * Search various sites for a specific username. Streams progress updates via Server-Sent Events.
35
36
  */
36
37
  export function socialsSearchUsername(
37
38
  client: IndiciaCore,
@@ -39,7 +40,7 @@ export function socialsSearchUsername(
39
40
  options?: RequestOptions,
40
41
  ): APIPromise<
41
42
  Result<
42
- operations.SearchUsernameResponse,
43
+ EventStream<operations.UsernameSearchEvent>,
43
44
  | errors.FailedResponseError
44
45
  | IndiciaError
45
46
  | ResponseValidationError
@@ -65,7 +66,7 @@ async function $do(
65
66
  ): Promise<
66
67
  [
67
68
  Result<
68
- operations.SearchUsernameResponse,
69
+ EventStream<operations.UsernameSearchEvent>,
69
70
  | errors.FailedResponseError
70
71
  | IndiciaError
71
72
  | ResponseValidationError
@@ -94,11 +95,11 @@ async function $do(
94
95
 
95
96
  const headers = new Headers(compactMap({
96
97
  "Content-Type": "application/json",
97
- Accept: "application/json",
98
+ Accept: "text/event-stream",
98
99
  }));
99
100
 
100
- const secConfig = await extractSecurity(client._options.apiKeyAuth);
101
- const securityInput = secConfig == null ? {} : { apiKeyAuth: secConfig };
101
+ const secConfig = await extractSecurity(client._options.apiKey);
102
+ const securityInput = secConfig == null ? {} : { apiKey: secConfig };
102
103
  const requestSecurity = resolveGlobalSecurity(securityInput);
103
104
 
104
105
  const context = {
@@ -109,7 +110,7 @@ async function $do(
109
110
 
110
111
  resolvedSecurity: requestSecurity,
111
112
 
112
- securitySource: client._options.apiKeyAuth,
113
+ securitySource: client._options.apiKey,
113
114
  retryConfig: options?.retries
114
115
  || client._options.retryConfig
115
116
  || { strategy: "none" },
@@ -148,7 +149,7 @@ async function $do(
148
149
  };
149
150
 
150
151
  const [result] = await M.match<
151
- operations.SearchUsernameResponse,
152
+ EventStream<operations.UsernameSearchEvent>,
152
153
  | errors.FailedResponseError
153
154
  | IndiciaError
154
155
  | ResponseValidationError
@@ -159,7 +160,23 @@ async function $do(
159
160
  | UnexpectedClientError
160
161
  | SDKValidationError
161
162
  >(
162
- M.json(200, operations.SearchUsernameResponse$inboundSchema),
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.UsernameSearchEvent$inboundSchema.parse(
172
+ rawEvent,
173
+ ),
174
+ };
175
+ });
176
+ }),
177
+ ),
178
+ ),
179
+ M.jsonErr([400, 402], errors.FailedResponseError$inboundSchema),
163
180
  M.jsonErr(500, errors.FailedResponseError$inboundSchema),
164
181
  M.fail("4XX"),
165
182
  M.fail("5XX"),
@@ -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" },
@@ -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" },
@@ -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" },
@@ -73,8 +73,8 @@ async function $do(
73
73
  Accept: "application/json",
74
74
  }));
75
75
 
76
- const secConfig = await extractSecurity(client._options.apiKeyAuth);
77
- const securityInput = secConfig == null ? {} : { apiKeyAuth: secConfig };
76
+ const secConfig = await extractSecurity(client._options.apiKey);
77
+ const securityInput = secConfig == null ? {} : { apiKey: secConfig };
78
78
  const requestSecurity = resolveGlobalSecurity(securityInput);
79
79
 
80
80
  const context = {
@@ -85,7 +85,7 @@ async function $do(
85
85
 
86
86
  resolvedSecurity: requestSecurity,
87
87
 
88
- securitySource: client._options.apiKeyAuth,
88
+ securitySource: client._options.apiKey,
89
89
  retryConfig: options?.retries
90
90
  || client._options.retryConfig
91
91
  || { strategy: "none" },
@@ -18,6 +18,8 @@ import {
18
18
  SDKInitHook,
19
19
  } from "./types.js";
20
20
 
21
+ import { initHooks } from "./registration.js";
22
+
21
23
  export class SDKHooks implements Hooks {
22
24
  sdkInitHooks: SDKInitHook[] = [];
23
25
  beforeCreateRequestHooks: BeforeCreateRequestHook[] = [];
@@ -45,6 +47,7 @@ export class SDKHooks implements Hooks {
45
47
  this.registerAfterErrorHook(hook);
46
48
  }
47
49
  }
50
+ initHooks(this);
48
51
  }
49
52
 
50
53
  registerSDKInitHook(hook: SDKInitHook) {
@@ -0,0 +1,14 @@
1
+ import { Hooks } from "./types.js";
2
+
3
+ /*
4
+ * This file is only ever generated once on the first generation and then is free to be modified.
5
+ * Any hooks you wish to add should be registered in the initHooks function. Feel free to define them
6
+ * in this file or in separate files in the hooks folder.
7
+ */
8
+
9
+ // @ts-expect-error remove this line when you add your first hook and hooks is used
10
+ export function initHooks(hooks: Hooks) {
11
+ // Add hooks by calling hooks.register{ClientInit/BeforeCreateRequest/BeforeRequest/AfterSuccess/AfterError}Hook
12
+ // with an instance of a hook that implements that specific Hook interface
13
+ // Hooks are registered per SDK instance, and are valid for the lifetime of the SDK instance
14
+ }
package/src/lib/config.ts CHANGED
@@ -15,7 +15,7 @@ export const ServerList = [
15
15
  ] as const;
16
16
 
17
17
  export type SDKOptions = {
18
- apiKeyAuth?: string | (() => Promise<string>) | undefined;
18
+ apiKey?: string | (() => Promise<string>) | undefined;
19
19
 
20
20
  httpClient?: HTTPClient;
21
21
  /**
@@ -58,7 +58,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
58
58
  export const SDK_METADATA = {
59
59
  language: "typescript",
60
60
  openapiDocVersion: "1.0.0",
61
- sdkVersion: "1.1.0",
62
- genVersion: "2.911.3",
63
- userAgent: "speakeasy-sdk/typescript 1.1.0 2.911.3 1.0.0 @indiciaosint/sdk",
61
+ sdkVersion: "1.2.1",
62
+ genVersion: "2.912.1",
63
+ userAgent: "speakeasy-sdk/typescript 1.2.1 2.912.1 1.0.0 @indiciaosint/sdk",
64
64
  } as const;
package/src/lib/env.ts CHANGED
@@ -5,13 +5,13 @@
5
5
  import * as z from "zod/v4-mini";
6
6
 
7
7
  export interface Env {
8
- INDICIA_API_KEY_AUTH?: string | undefined;
8
+ INDICIA_API_KEY?: string | undefined;
9
9
 
10
10
  INDICIA_DEBUG?: boolean | undefined;
11
11
  }
12
12
 
13
13
  export const envSchema: z.ZodMiniType<Env, unknown> = z.object({
14
- INDICIA_API_KEY_AUTH: z.optional(z.string()),
14
+ INDICIA_API_KEY: z.optional(z.string()),
15
15
 
16
16
  INDICIA_DEBUG: z.optional(z.coerce.boolean()),
17
17
  });