@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
@@ -16,6 +16,341 @@ export type SearchUsernameRequest = {
16
16
  query: string;
17
17
  };
18
18
 
19
+ export type SearchUsernameDataError = {
20
+ status: "error";
21
+ success: false;
22
+ /**
23
+ * Human-readable error message.
24
+ */
25
+ error: string;
26
+ };
27
+
28
+ /**
29
+ * A data-only event indicating the search failed.
30
+ */
31
+ export type SearchUsernameErrorEvent = {
32
+ data: SearchUsernameDataError;
33
+ };
34
+
35
+ export const ResultType = {
36
+ Email: "email",
37
+ Username: "username",
38
+ } as const;
39
+ export type ResultType = OpenEnum<typeof ResultType>;
40
+
41
+ export type ResultId = number | string;
42
+
43
+ export type ResultAccount = {
44
+ domain?: string | undefined;
45
+ shortname?: string | undefined;
46
+ url?: string | undefined;
47
+ verified?: boolean | undefined;
48
+ };
49
+
50
+ export type AwardResult = {};
51
+
52
+ export type ResultAwardUnion = number | AwardResult | string | boolean;
53
+
54
+ export type BadgeResult = {};
55
+
56
+ export type ResultBadgeUnion = number | BadgeResult | string | boolean;
57
+
58
+ export type ResultBands = number | string;
59
+
60
+ export type BioLinkResult = {};
61
+
62
+ export type ResultBioLinkUnion = number | BioLinkResult | string | boolean;
63
+
64
+ export type ClubResult = {};
65
+
66
+ export type ResultClubUnion = number | ClubResult | string | boolean;
67
+
68
+ export type ResultCollections = number | string;
69
+
70
+ export type ResultConnection = {
71
+ name?: string | undefined;
72
+ provider?: string | undefined;
73
+ };
74
+
75
+ export type ResultCourse = {
76
+ crowns?: number | undefined;
77
+ title?: string | undefined;
78
+ xp?: number | undefined;
79
+ };
80
+
81
+ export type CryptoAddressResult = {};
82
+
83
+ export type ResultCryptoAddressUnion =
84
+ | number
85
+ | CryptoAddressResult
86
+ | string
87
+ | boolean;
88
+
89
+ export type ResultFollowers = number | string;
90
+
91
+ export type ResultFollowing = number | string;
92
+
93
+ export type LatestPasteResult = {};
94
+
95
+ export type ResultLatestPasteUnion =
96
+ | number
97
+ | LatestPasteResult
98
+ | string
99
+ | boolean;
100
+
101
+ export type LinkResult = {};
102
+
103
+ export type ResultLinkUnion = number | LinkResult | string | boolean;
104
+
105
+ export type ResultOrganization = {
106
+ name?: string | undefined;
107
+ url?: string | undefined;
108
+ };
109
+
110
+ export type PlatformResult = {};
111
+
112
+ export type ResultPlatformUnion = number | PlatformResult | string | boolean;
113
+
114
+ export type ResultPlays = number | string;
115
+
116
+ export type ProofResult = {};
117
+
118
+ export type ResultProofUnion = number | ProofResult | string | boolean;
119
+
120
+ export type RoleResult = {};
121
+
122
+ export type ResultRoleUnion = number | RoleResult | string | boolean;
123
+
124
+ export type SocialLinkResult = {};
125
+
126
+ export type ResultSocialLinkUnion =
127
+ | number
128
+ | SocialLinkResult
129
+ | string
130
+ | boolean;
131
+
132
+ export type SocialsResult = {
133
+ facebook?: string | undefined;
134
+ instagram?: string | undefined;
135
+ twitter?: string | undefined;
136
+ website?: string | undefined;
137
+ };
138
+
139
+ export type ResultSocialsUnion = SocialsResult | Array<string>;
140
+
141
+ export type StatusResult = {
142
+ isCoach?: boolean | undefined;
143
+ isModerator?: boolean | undefined;
144
+ isStaff?: boolean | undefined;
145
+ isStreamer?: boolean | undefined;
146
+ isTopBlogger?: boolean | undefined;
147
+ };
148
+
149
+ export type ResultStatusUnion = string | StatusResult;
150
+
151
+ export type UrlEntityResult = {};
152
+
153
+ export type ResultUrlEntityUnion = number | UrlEntityResult | string | boolean;
154
+
155
+ export type ResultUrl = {
156
+ title?: string | undefined;
157
+ value?: string | undefined;
158
+ };
159
+
160
+ export type ResultMetadata = {
161
+ accentColor?: string | undefined;
162
+ accountType?: string | undefined;
163
+ accounts?: Array<ResultAccount> | undefined;
164
+ address?: string | undefined;
165
+ awardeeKarma?: number | undefined;
166
+ awarderKarma?: number | undefined;
167
+ awards?: Array<number | AwardResult | string | boolean | null> | undefined;
168
+ backgroundPicture?: string | undefined;
169
+ badges?: Array<number | BadgeResult | string | boolean | null> | undefined;
170
+ bands?: number | string | undefined;
171
+ bioLinks?:
172
+ | Array<number | BioLinkResult | string | boolean | null>
173
+ | undefined;
174
+ blog?: string | undefined;
175
+ boardCount?: number | undefined;
176
+ broadcasterType?: string | undefined;
177
+ capeUrl?: string | undefined;
178
+ cashtagUrl?: string | undefined;
179
+ channelId?: string | undefined;
180
+ clubs?: Array<number | ClubResult | string | boolean | null> | undefined;
181
+ collections?: number | string | undefined;
182
+ company?: string | undefined;
183
+ connections?: Array<ResultConnection> | undefined;
184
+ courses?: Array<ResultCourse> | undefined;
185
+ coverImage?: string | undefined;
186
+ createdAt?: string | undefined;
187
+ createdDate?: string | undefined;
188
+ createdOn?: string | undefined;
189
+ createdUtc?: number | undefined;
190
+ cryptoAddresses?:
191
+ | Array<number | CryptoAddressResult | string | boolean | null>
192
+ | undefined;
193
+ currency?: string | undefined;
194
+ currentStreak?: number | undefined;
195
+ devices?: Array<string> | undefined;
196
+ emails?: Array<string> | undefined;
197
+ externalUrl?: string | undefined;
198
+ familyName?: string | undefined;
199
+ followers?: number | string | undefined;
200
+ following?: number | string | undefined;
201
+ friendCount?: number | undefined;
202
+ genres?: Array<string> | undefined;
203
+ givenName?: string | undefined;
204
+ hasPlus?: boolean | undefined;
205
+ hasVerifiedEmail?: boolean | undefined;
206
+ inspiredBy?: Array<string> | undefined;
207
+ isAffiliate?: boolean | undefined;
208
+ isBanned?: boolean | undefined;
209
+ isBusiness?: boolean | undefined;
210
+ isChannel?: boolean | undefined;
211
+ isConfirmed?: boolean | undefined;
212
+ isGold?: boolean | undefined;
213
+ isGroup?: boolean | undefined;
214
+ isHacker?: boolean | undefined;
215
+ isJunior?: boolean | undefined;
216
+ isLegacy?: boolean | undefined;
217
+ isMetaBlocked?: boolean | undefined;
218
+ isMod?: boolean | undefined;
219
+ isPartner?: boolean | undefined;
220
+ isPremium?: boolean | undefined;
221
+ isProfessional?: boolean | undefined;
222
+ isSuspended?: boolean | undefined;
223
+ isVerified?: boolean | null | undefined;
224
+ joinedAt?: string | undefined;
225
+ keywords?: Array<string> | undefined;
226
+ lastModified?: string | undefined;
227
+ lastSeen?: string | undefined;
228
+ latestPastes?:
229
+ | Array<number | LatestPasteResult | string | boolean | null>
230
+ | undefined;
231
+ learningLanguage?: string | undefined;
232
+ likes?: number | undefined;
233
+ likesReceived?: number | undefined;
234
+ links?: Array<number | LinkResult | string | boolean | null> | undefined;
235
+ listedCount?: number | undefined;
236
+ mediaCount?: number | undefined;
237
+ memberType?: string | undefined;
238
+ organizations?: Array<ResultOrganization> | undefined;
239
+ pageViews?: number | undefined;
240
+ pastUsernames?: Array<string> | undefined;
241
+ pasteViews?: number | undefined;
242
+ pins?: number | undefined;
243
+ platformId?: string | undefined;
244
+ platforms?:
245
+ | Array<number | PlatformResult | string | boolean | null>
246
+ | undefined;
247
+ playlistCount?: number | undefined;
248
+ plays?: number | string | undefined;
249
+ posts?: number | undefined;
250
+ postsCount?: number | undefined;
251
+ primaryTeam?: string | undefined;
252
+ profileViews?: number | undefined;
253
+ proofs?: Array<number | ProofResult | string | boolean | null> | undefined;
254
+ provider?: string | undefined;
255
+ providerId?: string | undefined;
256
+ publicGists?: number | undefined;
257
+ publicRepos?: number | undefined;
258
+ ratePlan?: string | undefined;
259
+ realName?: string | undefined;
260
+ recentActivity?: any | undefined;
261
+ recoveryEmail?: string | undefined;
262
+ region?: string | undefined;
263
+ registeredSince?: string | undefined;
264
+ reputation?: number | undefined;
265
+ reputationLabel?: string | undefined;
266
+ roles?: Array<number | RoleResult | string | boolean | null> | undefined;
267
+ scratchTeam?: boolean | undefined;
268
+ skills?: Array<string> | undefined;
269
+ skinUrl?: string | undefined;
270
+ socialLinks?:
271
+ | Array<number | SocialLinkResult | string | boolean | null>
272
+ | undefined;
273
+ socials?: SocialsResult | Array<string> | undefined;
274
+ status?: string | StatusResult | undefined;
275
+ steamId64?: string | undefined;
276
+ streak?: number | undefined;
277
+ subscriberCount?: number | undefined;
278
+ subscribers?: number | undefined;
279
+ themeTitle?: string | undefined;
280
+ thumbnail?: string | undefined;
281
+ title?: string | undefined;
282
+ totalKarma?: number | undefined;
283
+ totalScrobbles?: number | undefined;
284
+ totalXp?: number | undefined;
285
+ trackCount?: number | undefined;
286
+ trnRank?: string | undefined;
287
+ trnRating?: string | undefined;
288
+ trophies?: Array<string> | undefined;
289
+ tweets?: number | undefined;
290
+ twitterUsername?: string | undefined;
291
+ updatedAt?: string | undefined;
292
+ upvotes?: number | undefined;
293
+ urlEntities?:
294
+ | Array<number | UrlEntityResult | string | boolean | null>
295
+ | undefined;
296
+ urls?: Array<ResultUrl> | undefined;
297
+ uuid?: string | undefined;
298
+ videoCount?: number | undefined;
299
+ visibleCollectionCount?: number | undefined;
300
+ visibleWishlistCount?: number | undefined;
301
+ website?: string | undefined;
302
+ };
303
+
304
+ export type ResultData = {
305
+ avatar?: string | undefined;
306
+ bio?: string | undefined;
307
+ country?: string | undefined;
308
+ displayName?: string | undefined;
309
+ id?: number | string | undefined;
310
+ isPrivate?: boolean | undefined;
311
+ isVerified?: boolean | undefined;
312
+ metadata?: ResultMetadata | undefined;
313
+ url?: string | undefined;
314
+ username?: string | undefined;
315
+ };
316
+
317
+ /**
318
+ * A single service's username lookup result.
319
+ */
320
+ export type ResultOsintResult = {
321
+ durationMs: number;
322
+ exists: boolean;
323
+ service: string;
324
+ type: ResultType;
325
+ data?: ResultData | undefined;
326
+ error?: string | undefined;
327
+ };
328
+
329
+ /**
330
+ * The complete result set, emitted once every service has run.
331
+ */
332
+ export type UsernameSearchComplete = {
333
+ /**
334
+ * All OSINT results collected across every checked service.
335
+ */
336
+ results: Array<ResultOsintResult>;
337
+ /**
338
+ * Activity log id for this search, or null.
339
+ */
340
+ activityId?: string | null | undefined;
341
+ };
342
+
343
+ /**
344
+ * Terminal `all` event with the complete result set.
345
+ */
346
+ export type AllEvent = {
347
+ /**
348
+ * The complete result set, emitted once every service has run.
349
+ */
350
+ data: UsernameSearchComplete;
351
+ event: "all";
352
+ };
353
+
19
354
  export const SearchUsernameType = {
20
355
  Email: "email",
21
356
  Username: "username",
@@ -110,7 +445,7 @@ export type Socials = {
110
445
 
111
446
  export type SocialsUnion = Socials | Array<string>;
112
447
 
113
- export type Status = {
448
+ export type SearchUsernameStatus = {
114
449
  isCoach?: boolean | undefined;
115
450
  isModerator?: boolean | undefined;
116
451
  isStaff?: boolean | undefined;
@@ -118,7 +453,7 @@ export type Status = {
118
453
  isTopBlogger?: boolean | undefined;
119
454
  };
120
455
 
121
- export type StatusUnion = string | Status;
456
+ export type Status = string | SearchUsernameStatus;
122
457
 
123
458
  export type UrlEntity = {};
124
459
 
@@ -243,7 +578,7 @@ export type Metadata = {
243
578
  | Array<number | SocialLink | string | boolean | null>
244
579
  | undefined;
245
580
  socials?: Socials | Array<string> | undefined;
246
- status?: string | Status | undefined;
581
+ status?: string | SearchUsernameStatus | undefined;
247
582
  steamId64?: string | undefined;
248
583
  streak?: number | undefined;
249
584
  subscriberCount?: number | undefined;
@@ -271,55 +606,1275 @@ export type Metadata = {
271
606
  website?: string | undefined;
272
607
  };
273
608
 
274
- export type SearchUsernameDataData = {
275
- avatar?: string | undefined;
276
- bio?: string | undefined;
277
- country?: string | undefined;
278
- displayName?: string | undefined;
279
- id?: number | string | undefined;
280
- isPrivate?: boolean | undefined;
281
- isVerified?: boolean | undefined;
282
- metadata?: Metadata | undefined;
283
- url?: string | undefined;
284
- username?: string | undefined;
285
- };
609
+ export type SearchUsernameData = {
610
+ avatar?: string | undefined;
611
+ bio?: string | undefined;
612
+ country?: string | undefined;
613
+ displayName?: string | undefined;
614
+ id?: number | string | undefined;
615
+ isPrivate?: boolean | undefined;
616
+ isVerified?: boolean | undefined;
617
+ metadata?: Metadata | undefined;
618
+ url?: string | undefined;
619
+ username?: string | undefined;
620
+ };
621
+
622
+ /**
623
+ * A single service's username lookup result.
624
+ */
625
+ export type OsintResult = {
626
+ durationMs: number;
627
+ exists: boolean;
628
+ service: string;
629
+ type: SearchUsernameType;
630
+ data?: SearchUsernameData | undefined;
631
+ error?: string | undefined;
632
+ };
633
+
634
+ /**
635
+ * Emitted as the `individual` event for each service checked.
636
+ */
637
+ export type IndividualEvent = {
638
+ /**
639
+ * A single service's username lookup result.
640
+ */
641
+ data: OsintResult;
642
+ event: "individual";
643
+ };
644
+
645
+ /**
646
+ * A Server-Sent Event. The `event:` field names the type ("individual" or "all"); errors are delivered as a data-only event.
647
+ */
648
+ export type UsernameSearchEvent =
649
+ | IndividualEvent
650
+ | AllEvent
651
+ | SearchUsernameErrorEvent;
652
+
653
+ /** @internal */
654
+ export type SearchUsernameRequest$Outbound = {
655
+ query: string;
656
+ };
657
+
658
+ /** @internal */
659
+ export const SearchUsernameRequest$outboundSchema: z.ZodMiniType<
660
+ SearchUsernameRequest$Outbound,
661
+ SearchUsernameRequest
662
+ > = z.object({
663
+ query: z.string(),
664
+ });
665
+
666
+ export function searchUsernameRequestToJSON(
667
+ searchUsernameRequest: SearchUsernameRequest,
668
+ ): string {
669
+ return JSON.stringify(
670
+ SearchUsernameRequest$outboundSchema.parse(searchUsernameRequest),
671
+ );
672
+ }
673
+
674
+ /** @internal */
675
+ export const SearchUsernameDataError$inboundSchema: z.ZodMiniType<
676
+ SearchUsernameDataError,
677
+ unknown
678
+ > = z.object({
679
+ status: types.literal("error"),
680
+ success: types.literal(false),
681
+ error: types.string(),
682
+ });
683
+
684
+ export function searchUsernameDataErrorFromJSON(
685
+ jsonString: string,
686
+ ): SafeParseResult<SearchUsernameDataError, SDKValidationError> {
687
+ return safeParse(
688
+ jsonString,
689
+ (x) => SearchUsernameDataError$inboundSchema.parse(JSON.parse(x)),
690
+ `Failed to parse 'SearchUsernameDataError' from JSON`,
691
+ );
692
+ }
693
+
694
+ /** @internal */
695
+ export const SearchUsernameErrorEvent$inboundSchema: z.ZodMiniType<
696
+ SearchUsernameErrorEvent,
697
+ unknown
698
+ > = z.object({
699
+ data: z.pipe(
700
+ z.pipe(
701
+ z.unknown(),
702
+ z.transform((v, ctx) => {
703
+ if (typeof v !== "string") return v;
704
+ try {
705
+ return JSON.parse(v);
706
+ } catch (err) {
707
+ ctx.issues.push({
708
+ input: v,
709
+ code: "custom",
710
+ message: `malformed json: ${err}`,
711
+ });
712
+ return z.NEVER;
713
+ }
714
+ }),
715
+ ),
716
+ z.lazy(() => SearchUsernameDataError$inboundSchema),
717
+ ),
718
+ });
719
+
720
+ export function searchUsernameErrorEventFromJSON(
721
+ jsonString: string,
722
+ ): SafeParseResult<SearchUsernameErrorEvent, SDKValidationError> {
723
+ return safeParse(
724
+ jsonString,
725
+ (x) => SearchUsernameErrorEvent$inboundSchema.parse(JSON.parse(x)),
726
+ `Failed to parse 'SearchUsernameErrorEvent' from JSON`,
727
+ );
728
+ }
729
+
730
+ /** @internal */
731
+ export const ResultType$inboundSchema: z.ZodMiniType<ResultType, unknown> =
732
+ openEnums.inboundSchema(ResultType);
733
+
734
+ /** @internal */
735
+ export const ResultId$inboundSchema: z.ZodMiniType<ResultId, unknown> =
736
+ smartUnion([types.number(), types.string()]);
737
+
738
+ export function resultIdFromJSON(
739
+ jsonString: string,
740
+ ): SafeParseResult<ResultId, SDKValidationError> {
741
+ return safeParse(
742
+ jsonString,
743
+ (x) => ResultId$inboundSchema.parse(JSON.parse(x)),
744
+ `Failed to parse 'ResultId' from JSON`,
745
+ );
746
+ }
747
+
748
+ /** @internal */
749
+ export const ResultAccount$inboundSchema: z.ZodMiniType<
750
+ ResultAccount,
751
+ unknown
752
+ > = z.object({
753
+ domain: types.optional(types.string()),
754
+ shortname: types.optional(types.string()),
755
+ url: types.optional(types.string()),
756
+ verified: types.optional(types.boolean()),
757
+ });
758
+
759
+ export function resultAccountFromJSON(
760
+ jsonString: string,
761
+ ): SafeParseResult<ResultAccount, SDKValidationError> {
762
+ return safeParse(
763
+ jsonString,
764
+ (x) => ResultAccount$inboundSchema.parse(JSON.parse(x)),
765
+ `Failed to parse 'ResultAccount' from JSON`,
766
+ );
767
+ }
768
+
769
+ /** @internal */
770
+ export const AwardResult$inboundSchema: z.ZodMiniType<AwardResult, unknown> = z
771
+ .object({});
772
+
773
+ export function awardResultFromJSON(
774
+ jsonString: string,
775
+ ): SafeParseResult<AwardResult, SDKValidationError> {
776
+ return safeParse(
777
+ jsonString,
778
+ (x) => AwardResult$inboundSchema.parse(JSON.parse(x)),
779
+ `Failed to parse 'AwardResult' from JSON`,
780
+ );
781
+ }
782
+
783
+ /** @internal */
784
+ export const ResultAwardUnion$inboundSchema: z.ZodMiniType<
785
+ ResultAwardUnion,
786
+ unknown
787
+ > = smartUnion([
788
+ types.number(),
789
+ z.lazy(() => AwardResult$inboundSchema),
790
+ types.string(),
791
+ types.boolean(),
792
+ ]);
793
+
794
+ export function resultAwardUnionFromJSON(
795
+ jsonString: string,
796
+ ): SafeParseResult<ResultAwardUnion, SDKValidationError> {
797
+ return safeParse(
798
+ jsonString,
799
+ (x) => ResultAwardUnion$inboundSchema.parse(JSON.parse(x)),
800
+ `Failed to parse 'ResultAwardUnion' from JSON`,
801
+ );
802
+ }
803
+
804
+ /** @internal */
805
+ export const BadgeResult$inboundSchema: z.ZodMiniType<BadgeResult, unknown> = z
806
+ .object({});
807
+
808
+ export function badgeResultFromJSON(
809
+ jsonString: string,
810
+ ): SafeParseResult<BadgeResult, SDKValidationError> {
811
+ return safeParse(
812
+ jsonString,
813
+ (x) => BadgeResult$inboundSchema.parse(JSON.parse(x)),
814
+ `Failed to parse 'BadgeResult' from JSON`,
815
+ );
816
+ }
817
+
818
+ /** @internal */
819
+ export const ResultBadgeUnion$inboundSchema: z.ZodMiniType<
820
+ ResultBadgeUnion,
821
+ unknown
822
+ > = smartUnion([
823
+ types.number(),
824
+ z.lazy(() => BadgeResult$inboundSchema),
825
+ types.string(),
826
+ types.boolean(),
827
+ ]);
828
+
829
+ export function resultBadgeUnionFromJSON(
830
+ jsonString: string,
831
+ ): SafeParseResult<ResultBadgeUnion, SDKValidationError> {
832
+ return safeParse(
833
+ jsonString,
834
+ (x) => ResultBadgeUnion$inboundSchema.parse(JSON.parse(x)),
835
+ `Failed to parse 'ResultBadgeUnion' from JSON`,
836
+ );
837
+ }
838
+
839
+ /** @internal */
840
+ export const ResultBands$inboundSchema: z.ZodMiniType<ResultBands, unknown> =
841
+ smartUnion([types.number(), types.string()]);
842
+
843
+ export function resultBandsFromJSON(
844
+ jsonString: string,
845
+ ): SafeParseResult<ResultBands, SDKValidationError> {
846
+ return safeParse(
847
+ jsonString,
848
+ (x) => ResultBands$inboundSchema.parse(JSON.parse(x)),
849
+ `Failed to parse 'ResultBands' from JSON`,
850
+ );
851
+ }
852
+
853
+ /** @internal */
854
+ export const BioLinkResult$inboundSchema: z.ZodMiniType<
855
+ BioLinkResult,
856
+ unknown
857
+ > = z.object({});
858
+
859
+ export function bioLinkResultFromJSON(
860
+ jsonString: string,
861
+ ): SafeParseResult<BioLinkResult, SDKValidationError> {
862
+ return safeParse(
863
+ jsonString,
864
+ (x) => BioLinkResult$inboundSchema.parse(JSON.parse(x)),
865
+ `Failed to parse 'BioLinkResult' from JSON`,
866
+ );
867
+ }
868
+
869
+ /** @internal */
870
+ export const ResultBioLinkUnion$inboundSchema: z.ZodMiniType<
871
+ ResultBioLinkUnion,
872
+ unknown
873
+ > = smartUnion([
874
+ types.number(),
875
+ z.lazy(() => BioLinkResult$inboundSchema),
876
+ types.string(),
877
+ types.boolean(),
878
+ ]);
879
+
880
+ export function resultBioLinkUnionFromJSON(
881
+ jsonString: string,
882
+ ): SafeParseResult<ResultBioLinkUnion, SDKValidationError> {
883
+ return safeParse(
884
+ jsonString,
885
+ (x) => ResultBioLinkUnion$inboundSchema.parse(JSON.parse(x)),
886
+ `Failed to parse 'ResultBioLinkUnion' from JSON`,
887
+ );
888
+ }
889
+
890
+ /** @internal */
891
+ export const ClubResult$inboundSchema: z.ZodMiniType<ClubResult, unknown> = z
892
+ .object({});
893
+
894
+ export function clubResultFromJSON(
895
+ jsonString: string,
896
+ ): SafeParseResult<ClubResult, SDKValidationError> {
897
+ return safeParse(
898
+ jsonString,
899
+ (x) => ClubResult$inboundSchema.parse(JSON.parse(x)),
900
+ `Failed to parse 'ClubResult' from JSON`,
901
+ );
902
+ }
903
+
904
+ /** @internal */
905
+ export const ResultClubUnion$inboundSchema: z.ZodMiniType<
906
+ ResultClubUnion,
907
+ unknown
908
+ > = smartUnion([
909
+ types.number(),
910
+ z.lazy(() => ClubResult$inboundSchema),
911
+ types.string(),
912
+ types.boolean(),
913
+ ]);
914
+
915
+ export function resultClubUnionFromJSON(
916
+ jsonString: string,
917
+ ): SafeParseResult<ResultClubUnion, SDKValidationError> {
918
+ return safeParse(
919
+ jsonString,
920
+ (x) => ResultClubUnion$inboundSchema.parse(JSON.parse(x)),
921
+ `Failed to parse 'ResultClubUnion' from JSON`,
922
+ );
923
+ }
924
+
925
+ /** @internal */
926
+ export const ResultCollections$inboundSchema: z.ZodMiniType<
927
+ ResultCollections,
928
+ unknown
929
+ > = smartUnion([types.number(), types.string()]);
930
+
931
+ export function resultCollectionsFromJSON(
932
+ jsonString: string,
933
+ ): SafeParseResult<ResultCollections, SDKValidationError> {
934
+ return safeParse(
935
+ jsonString,
936
+ (x) => ResultCollections$inboundSchema.parse(JSON.parse(x)),
937
+ `Failed to parse 'ResultCollections' from JSON`,
938
+ );
939
+ }
940
+
941
+ /** @internal */
942
+ export const ResultConnection$inboundSchema: z.ZodMiniType<
943
+ ResultConnection,
944
+ unknown
945
+ > = z.object({
946
+ name: types.optional(types.string()),
947
+ provider: types.optional(types.string()),
948
+ });
949
+
950
+ export function resultConnectionFromJSON(
951
+ jsonString: string,
952
+ ): SafeParseResult<ResultConnection, SDKValidationError> {
953
+ return safeParse(
954
+ jsonString,
955
+ (x) => ResultConnection$inboundSchema.parse(JSON.parse(x)),
956
+ `Failed to parse 'ResultConnection' from JSON`,
957
+ );
958
+ }
959
+
960
+ /** @internal */
961
+ export const ResultCourse$inboundSchema: z.ZodMiniType<ResultCourse, unknown> =
962
+ z.object({
963
+ crowns: types.optional(types.number()),
964
+ title: types.optional(types.string()),
965
+ xp: types.optional(types.number()),
966
+ });
967
+
968
+ export function resultCourseFromJSON(
969
+ jsonString: string,
970
+ ): SafeParseResult<ResultCourse, SDKValidationError> {
971
+ return safeParse(
972
+ jsonString,
973
+ (x) => ResultCourse$inboundSchema.parse(JSON.parse(x)),
974
+ `Failed to parse 'ResultCourse' from JSON`,
975
+ );
976
+ }
977
+
978
+ /** @internal */
979
+ export const CryptoAddressResult$inboundSchema: z.ZodMiniType<
980
+ CryptoAddressResult,
981
+ unknown
982
+ > = z.object({});
983
+
984
+ export function cryptoAddressResultFromJSON(
985
+ jsonString: string,
986
+ ): SafeParseResult<CryptoAddressResult, SDKValidationError> {
987
+ return safeParse(
988
+ jsonString,
989
+ (x) => CryptoAddressResult$inboundSchema.parse(JSON.parse(x)),
990
+ `Failed to parse 'CryptoAddressResult' from JSON`,
991
+ );
992
+ }
993
+
994
+ /** @internal */
995
+ export const ResultCryptoAddressUnion$inboundSchema: z.ZodMiniType<
996
+ ResultCryptoAddressUnion,
997
+ unknown
998
+ > = smartUnion([
999
+ types.number(),
1000
+ z.lazy(() => CryptoAddressResult$inboundSchema),
1001
+ types.string(),
1002
+ types.boolean(),
1003
+ ]);
1004
+
1005
+ export function resultCryptoAddressUnionFromJSON(
1006
+ jsonString: string,
1007
+ ): SafeParseResult<ResultCryptoAddressUnion, SDKValidationError> {
1008
+ return safeParse(
1009
+ jsonString,
1010
+ (x) => ResultCryptoAddressUnion$inboundSchema.parse(JSON.parse(x)),
1011
+ `Failed to parse 'ResultCryptoAddressUnion' from JSON`,
1012
+ );
1013
+ }
1014
+
1015
+ /** @internal */
1016
+ export const ResultFollowers$inboundSchema: z.ZodMiniType<
1017
+ ResultFollowers,
1018
+ unknown
1019
+ > = smartUnion([types.number(), types.string()]);
1020
+
1021
+ export function resultFollowersFromJSON(
1022
+ jsonString: string,
1023
+ ): SafeParseResult<ResultFollowers, SDKValidationError> {
1024
+ return safeParse(
1025
+ jsonString,
1026
+ (x) => ResultFollowers$inboundSchema.parse(JSON.parse(x)),
1027
+ `Failed to parse 'ResultFollowers' from JSON`,
1028
+ );
1029
+ }
1030
+
1031
+ /** @internal */
1032
+ export const ResultFollowing$inboundSchema: z.ZodMiniType<
1033
+ ResultFollowing,
1034
+ unknown
1035
+ > = smartUnion([types.number(), types.string()]);
1036
+
1037
+ export function resultFollowingFromJSON(
1038
+ jsonString: string,
1039
+ ): SafeParseResult<ResultFollowing, SDKValidationError> {
1040
+ return safeParse(
1041
+ jsonString,
1042
+ (x) => ResultFollowing$inboundSchema.parse(JSON.parse(x)),
1043
+ `Failed to parse 'ResultFollowing' from JSON`,
1044
+ );
1045
+ }
1046
+
1047
+ /** @internal */
1048
+ export const LatestPasteResult$inboundSchema: z.ZodMiniType<
1049
+ LatestPasteResult,
1050
+ unknown
1051
+ > = z.object({});
1052
+
1053
+ export function latestPasteResultFromJSON(
1054
+ jsonString: string,
1055
+ ): SafeParseResult<LatestPasteResult, SDKValidationError> {
1056
+ return safeParse(
1057
+ jsonString,
1058
+ (x) => LatestPasteResult$inboundSchema.parse(JSON.parse(x)),
1059
+ `Failed to parse 'LatestPasteResult' from JSON`,
1060
+ );
1061
+ }
1062
+
1063
+ /** @internal */
1064
+ export const ResultLatestPasteUnion$inboundSchema: z.ZodMiniType<
1065
+ ResultLatestPasteUnion,
1066
+ unknown
1067
+ > = smartUnion([
1068
+ types.number(),
1069
+ z.lazy(() => LatestPasteResult$inboundSchema),
1070
+ types.string(),
1071
+ types.boolean(),
1072
+ ]);
1073
+
1074
+ export function resultLatestPasteUnionFromJSON(
1075
+ jsonString: string,
1076
+ ): SafeParseResult<ResultLatestPasteUnion, SDKValidationError> {
1077
+ return safeParse(
1078
+ jsonString,
1079
+ (x) => ResultLatestPasteUnion$inboundSchema.parse(JSON.parse(x)),
1080
+ `Failed to parse 'ResultLatestPasteUnion' from JSON`,
1081
+ );
1082
+ }
1083
+
1084
+ /** @internal */
1085
+ export const LinkResult$inboundSchema: z.ZodMiniType<LinkResult, unknown> = z
1086
+ .object({});
1087
+
1088
+ export function linkResultFromJSON(
1089
+ jsonString: string,
1090
+ ): SafeParseResult<LinkResult, SDKValidationError> {
1091
+ return safeParse(
1092
+ jsonString,
1093
+ (x) => LinkResult$inboundSchema.parse(JSON.parse(x)),
1094
+ `Failed to parse 'LinkResult' from JSON`,
1095
+ );
1096
+ }
1097
+
1098
+ /** @internal */
1099
+ export const ResultLinkUnion$inboundSchema: z.ZodMiniType<
1100
+ ResultLinkUnion,
1101
+ unknown
1102
+ > = smartUnion([
1103
+ types.number(),
1104
+ z.lazy(() => LinkResult$inboundSchema),
1105
+ types.string(),
1106
+ types.boolean(),
1107
+ ]);
1108
+
1109
+ export function resultLinkUnionFromJSON(
1110
+ jsonString: string,
1111
+ ): SafeParseResult<ResultLinkUnion, SDKValidationError> {
1112
+ return safeParse(
1113
+ jsonString,
1114
+ (x) => ResultLinkUnion$inboundSchema.parse(JSON.parse(x)),
1115
+ `Failed to parse 'ResultLinkUnion' from JSON`,
1116
+ );
1117
+ }
1118
+
1119
+ /** @internal */
1120
+ export const ResultOrganization$inboundSchema: z.ZodMiniType<
1121
+ ResultOrganization,
1122
+ unknown
1123
+ > = z.object({
1124
+ name: types.optional(types.string()),
1125
+ url: types.optional(types.string()),
1126
+ });
1127
+
1128
+ export function resultOrganizationFromJSON(
1129
+ jsonString: string,
1130
+ ): SafeParseResult<ResultOrganization, SDKValidationError> {
1131
+ return safeParse(
1132
+ jsonString,
1133
+ (x) => ResultOrganization$inboundSchema.parse(JSON.parse(x)),
1134
+ `Failed to parse 'ResultOrganization' from JSON`,
1135
+ );
1136
+ }
1137
+
1138
+ /** @internal */
1139
+ export const PlatformResult$inboundSchema: z.ZodMiniType<
1140
+ PlatformResult,
1141
+ unknown
1142
+ > = z.object({});
1143
+
1144
+ export function platformResultFromJSON(
1145
+ jsonString: string,
1146
+ ): SafeParseResult<PlatformResult, SDKValidationError> {
1147
+ return safeParse(
1148
+ jsonString,
1149
+ (x) => PlatformResult$inboundSchema.parse(JSON.parse(x)),
1150
+ `Failed to parse 'PlatformResult' from JSON`,
1151
+ );
1152
+ }
1153
+
1154
+ /** @internal */
1155
+ export const ResultPlatformUnion$inboundSchema: z.ZodMiniType<
1156
+ ResultPlatformUnion,
1157
+ unknown
1158
+ > = smartUnion([
1159
+ types.number(),
1160
+ z.lazy(() => PlatformResult$inboundSchema),
1161
+ types.string(),
1162
+ types.boolean(),
1163
+ ]);
1164
+
1165
+ export function resultPlatformUnionFromJSON(
1166
+ jsonString: string,
1167
+ ): SafeParseResult<ResultPlatformUnion, SDKValidationError> {
1168
+ return safeParse(
1169
+ jsonString,
1170
+ (x) => ResultPlatformUnion$inboundSchema.parse(JSON.parse(x)),
1171
+ `Failed to parse 'ResultPlatformUnion' from JSON`,
1172
+ );
1173
+ }
1174
+
1175
+ /** @internal */
1176
+ export const ResultPlays$inboundSchema: z.ZodMiniType<ResultPlays, unknown> =
1177
+ smartUnion([types.number(), types.string()]);
1178
+
1179
+ export function resultPlaysFromJSON(
1180
+ jsonString: string,
1181
+ ): SafeParseResult<ResultPlays, SDKValidationError> {
1182
+ return safeParse(
1183
+ jsonString,
1184
+ (x) => ResultPlays$inboundSchema.parse(JSON.parse(x)),
1185
+ `Failed to parse 'ResultPlays' from JSON`,
1186
+ );
1187
+ }
1188
+
1189
+ /** @internal */
1190
+ export const ProofResult$inboundSchema: z.ZodMiniType<ProofResult, unknown> = z
1191
+ .object({});
1192
+
1193
+ export function proofResultFromJSON(
1194
+ jsonString: string,
1195
+ ): SafeParseResult<ProofResult, SDKValidationError> {
1196
+ return safeParse(
1197
+ jsonString,
1198
+ (x) => ProofResult$inboundSchema.parse(JSON.parse(x)),
1199
+ `Failed to parse 'ProofResult' from JSON`,
1200
+ );
1201
+ }
1202
+
1203
+ /** @internal */
1204
+ export const ResultProofUnion$inboundSchema: z.ZodMiniType<
1205
+ ResultProofUnion,
1206
+ unknown
1207
+ > = smartUnion([
1208
+ types.number(),
1209
+ z.lazy(() => ProofResult$inboundSchema),
1210
+ types.string(),
1211
+ types.boolean(),
1212
+ ]);
1213
+
1214
+ export function resultProofUnionFromJSON(
1215
+ jsonString: string,
1216
+ ): SafeParseResult<ResultProofUnion, SDKValidationError> {
1217
+ return safeParse(
1218
+ jsonString,
1219
+ (x) => ResultProofUnion$inboundSchema.parse(JSON.parse(x)),
1220
+ `Failed to parse 'ResultProofUnion' from JSON`,
1221
+ );
1222
+ }
1223
+
1224
+ /** @internal */
1225
+ export const RoleResult$inboundSchema: z.ZodMiniType<RoleResult, unknown> = z
1226
+ .object({});
1227
+
1228
+ export function roleResultFromJSON(
1229
+ jsonString: string,
1230
+ ): SafeParseResult<RoleResult, SDKValidationError> {
1231
+ return safeParse(
1232
+ jsonString,
1233
+ (x) => RoleResult$inboundSchema.parse(JSON.parse(x)),
1234
+ `Failed to parse 'RoleResult' from JSON`,
1235
+ );
1236
+ }
1237
+
1238
+ /** @internal */
1239
+ export const ResultRoleUnion$inboundSchema: z.ZodMiniType<
1240
+ ResultRoleUnion,
1241
+ unknown
1242
+ > = smartUnion([
1243
+ types.number(),
1244
+ z.lazy(() => RoleResult$inboundSchema),
1245
+ types.string(),
1246
+ types.boolean(),
1247
+ ]);
1248
+
1249
+ export function resultRoleUnionFromJSON(
1250
+ jsonString: string,
1251
+ ): SafeParseResult<ResultRoleUnion, SDKValidationError> {
1252
+ return safeParse(
1253
+ jsonString,
1254
+ (x) => ResultRoleUnion$inboundSchema.parse(JSON.parse(x)),
1255
+ `Failed to parse 'ResultRoleUnion' from JSON`,
1256
+ );
1257
+ }
1258
+
1259
+ /** @internal */
1260
+ export const SocialLinkResult$inboundSchema: z.ZodMiniType<
1261
+ SocialLinkResult,
1262
+ unknown
1263
+ > = z.object({});
1264
+
1265
+ export function socialLinkResultFromJSON(
1266
+ jsonString: string,
1267
+ ): SafeParseResult<SocialLinkResult, SDKValidationError> {
1268
+ return safeParse(
1269
+ jsonString,
1270
+ (x) => SocialLinkResult$inboundSchema.parse(JSON.parse(x)),
1271
+ `Failed to parse 'SocialLinkResult' from JSON`,
1272
+ );
1273
+ }
1274
+
1275
+ /** @internal */
1276
+ export const ResultSocialLinkUnion$inboundSchema: z.ZodMiniType<
1277
+ ResultSocialLinkUnion,
1278
+ unknown
1279
+ > = smartUnion([
1280
+ types.number(),
1281
+ z.lazy(() => SocialLinkResult$inboundSchema),
1282
+ types.string(),
1283
+ types.boolean(),
1284
+ ]);
1285
+
1286
+ export function resultSocialLinkUnionFromJSON(
1287
+ jsonString: string,
1288
+ ): SafeParseResult<ResultSocialLinkUnion, SDKValidationError> {
1289
+ return safeParse(
1290
+ jsonString,
1291
+ (x) => ResultSocialLinkUnion$inboundSchema.parse(JSON.parse(x)),
1292
+ `Failed to parse 'ResultSocialLinkUnion' from JSON`,
1293
+ );
1294
+ }
1295
+
1296
+ /** @internal */
1297
+ export const SocialsResult$inboundSchema: z.ZodMiniType<
1298
+ SocialsResult,
1299
+ unknown
1300
+ > = z.object({
1301
+ facebook: types.optional(types.string()),
1302
+ instagram: types.optional(types.string()),
1303
+ twitter: types.optional(types.string()),
1304
+ website: types.optional(types.string()),
1305
+ });
1306
+
1307
+ export function socialsResultFromJSON(
1308
+ jsonString: string,
1309
+ ): SafeParseResult<SocialsResult, SDKValidationError> {
1310
+ return safeParse(
1311
+ jsonString,
1312
+ (x) => SocialsResult$inboundSchema.parse(JSON.parse(x)),
1313
+ `Failed to parse 'SocialsResult' from JSON`,
1314
+ );
1315
+ }
1316
+
1317
+ /** @internal */
1318
+ export const ResultSocialsUnion$inboundSchema: z.ZodMiniType<
1319
+ ResultSocialsUnion,
1320
+ unknown
1321
+ > = smartUnion([
1322
+ z.lazy(() => SocialsResult$inboundSchema),
1323
+ z.array(types.string()),
1324
+ ]);
1325
+
1326
+ export function resultSocialsUnionFromJSON(
1327
+ jsonString: string,
1328
+ ): SafeParseResult<ResultSocialsUnion, SDKValidationError> {
1329
+ return safeParse(
1330
+ jsonString,
1331
+ (x) => ResultSocialsUnion$inboundSchema.parse(JSON.parse(x)),
1332
+ `Failed to parse 'ResultSocialsUnion' from JSON`,
1333
+ );
1334
+ }
1335
+
1336
+ /** @internal */
1337
+ export const StatusResult$inboundSchema: z.ZodMiniType<StatusResult, unknown> =
1338
+ z.pipe(
1339
+ z.object({
1340
+ is_coach: types.optional(types.boolean()),
1341
+ is_moderator: types.optional(types.boolean()),
1342
+ is_staff: types.optional(types.boolean()),
1343
+ is_streamer: types.optional(types.boolean()),
1344
+ is_top_blogger: types.optional(types.boolean()),
1345
+ }),
1346
+ z.transform((v) => {
1347
+ return remap$(v, {
1348
+ "is_coach": "isCoach",
1349
+ "is_moderator": "isModerator",
1350
+ "is_staff": "isStaff",
1351
+ "is_streamer": "isStreamer",
1352
+ "is_top_blogger": "isTopBlogger",
1353
+ });
1354
+ }),
1355
+ );
1356
+
1357
+ export function statusResultFromJSON(
1358
+ jsonString: string,
1359
+ ): SafeParseResult<StatusResult, SDKValidationError> {
1360
+ return safeParse(
1361
+ jsonString,
1362
+ (x) => StatusResult$inboundSchema.parse(JSON.parse(x)),
1363
+ `Failed to parse 'StatusResult' from JSON`,
1364
+ );
1365
+ }
1366
+
1367
+ /** @internal */
1368
+ export const ResultStatusUnion$inboundSchema: z.ZodMiniType<
1369
+ ResultStatusUnion,
1370
+ unknown
1371
+ > = smartUnion([types.string(), z.lazy(() => StatusResult$inboundSchema)]);
1372
+
1373
+ export function resultStatusUnionFromJSON(
1374
+ jsonString: string,
1375
+ ): SafeParseResult<ResultStatusUnion, SDKValidationError> {
1376
+ return safeParse(
1377
+ jsonString,
1378
+ (x) => ResultStatusUnion$inboundSchema.parse(JSON.parse(x)),
1379
+ `Failed to parse 'ResultStatusUnion' from JSON`,
1380
+ );
1381
+ }
1382
+
1383
+ /** @internal */
1384
+ export const UrlEntityResult$inboundSchema: z.ZodMiniType<
1385
+ UrlEntityResult,
1386
+ unknown
1387
+ > = z.object({});
1388
+
1389
+ export function urlEntityResultFromJSON(
1390
+ jsonString: string,
1391
+ ): SafeParseResult<UrlEntityResult, SDKValidationError> {
1392
+ return safeParse(
1393
+ jsonString,
1394
+ (x) => UrlEntityResult$inboundSchema.parse(JSON.parse(x)),
1395
+ `Failed to parse 'UrlEntityResult' from JSON`,
1396
+ );
1397
+ }
1398
+
1399
+ /** @internal */
1400
+ export const ResultUrlEntityUnion$inboundSchema: z.ZodMiniType<
1401
+ ResultUrlEntityUnion,
1402
+ unknown
1403
+ > = smartUnion([
1404
+ types.number(),
1405
+ z.lazy(() => UrlEntityResult$inboundSchema),
1406
+ types.string(),
1407
+ types.boolean(),
1408
+ ]);
1409
+
1410
+ export function resultUrlEntityUnionFromJSON(
1411
+ jsonString: string,
1412
+ ): SafeParseResult<ResultUrlEntityUnion, SDKValidationError> {
1413
+ return safeParse(
1414
+ jsonString,
1415
+ (x) => ResultUrlEntityUnion$inboundSchema.parse(JSON.parse(x)),
1416
+ `Failed to parse 'ResultUrlEntityUnion' from JSON`,
1417
+ );
1418
+ }
1419
+
1420
+ /** @internal */
1421
+ export const ResultUrl$inboundSchema: z.ZodMiniType<ResultUrl, unknown> = z
1422
+ .object({
1423
+ title: types.optional(types.string()),
1424
+ value: types.optional(types.string()),
1425
+ });
1426
+
1427
+ export function resultUrlFromJSON(
1428
+ jsonString: string,
1429
+ ): SafeParseResult<ResultUrl, SDKValidationError> {
1430
+ return safeParse(
1431
+ jsonString,
1432
+ (x) => ResultUrl$inboundSchema.parse(JSON.parse(x)),
1433
+ `Failed to parse 'ResultUrl' from JSON`,
1434
+ );
1435
+ }
1436
+
1437
+ /** @internal */
1438
+ export const ResultMetadata$inboundSchema: z.ZodMiniType<
1439
+ ResultMetadata,
1440
+ unknown
1441
+ > = z.pipe(
1442
+ z.object({
1443
+ accent_color: types.optional(types.string()),
1444
+ account_type: types.optional(types.string()),
1445
+ accounts: types.optional(
1446
+ z.array(z.lazy(() => ResultAccount$inboundSchema)),
1447
+ ),
1448
+ address: types.optional(types.string()),
1449
+ awardee_karma: types.optional(types.number()),
1450
+ awarder_karma: types.optional(types.number()),
1451
+ awards: types.optional(
1452
+ z.array(types.nullable(smartUnion([
1453
+ types.number(),
1454
+ z.lazy(() => AwardResult$inboundSchema),
1455
+ types.string(),
1456
+ types.boolean(),
1457
+ ]))),
1458
+ ),
1459
+ background_picture: types.optional(types.string()),
1460
+ badges: types.optional(
1461
+ z.array(types.nullable(smartUnion([
1462
+ types.number(),
1463
+ z.lazy(() => BadgeResult$inboundSchema),
1464
+ types.string(),
1465
+ types.boolean(),
1466
+ ]))),
1467
+ ),
1468
+ bands: types.optional(smartUnion([types.number(), types.string()])),
1469
+ bio_links: types.optional(
1470
+ z.array(types.nullable(smartUnion([
1471
+ types.number(),
1472
+ z.lazy(() => BioLinkResult$inboundSchema),
1473
+ types.string(),
1474
+ types.boolean(),
1475
+ ]))),
1476
+ ),
1477
+ blog: types.optional(types.string()),
1478
+ board_count: types.optional(types.number()),
1479
+ broadcaster_type: types.optional(types.string()),
1480
+ cape_url: types.optional(types.string()),
1481
+ cashtag_url: types.optional(types.string()),
1482
+ channel_id: types.optional(types.string()),
1483
+ clubs: types.optional(
1484
+ z.array(types.nullable(smartUnion([
1485
+ types.number(),
1486
+ z.lazy(() => ClubResult$inboundSchema),
1487
+ types.string(),
1488
+ types.boolean(),
1489
+ ]))),
1490
+ ),
1491
+ collections: types.optional(smartUnion([types.number(), types.string()])),
1492
+ company: types.optional(types.string()),
1493
+ connections: types.optional(
1494
+ z.array(z.lazy(() => ResultConnection$inboundSchema)),
1495
+ ),
1496
+ courses: types.optional(z.array(z.lazy(() => ResultCourse$inboundSchema))),
1497
+ cover_image: types.optional(types.string()),
1498
+ created_at: types.optional(types.string()),
1499
+ created_date: types.optional(types.string()),
1500
+ created_on: types.optional(types.string()),
1501
+ created_utc: types.optional(types.number()),
1502
+ crypto_addresses: types.optional(
1503
+ z.array(types.nullable(smartUnion([
1504
+ types.number(),
1505
+ z.lazy(() => CryptoAddressResult$inboundSchema),
1506
+ types.string(),
1507
+ types.boolean(),
1508
+ ]))),
1509
+ ),
1510
+ currency: types.optional(types.string()),
1511
+ current_streak: types.optional(types.number()),
1512
+ devices: types.optional(z.array(types.string())),
1513
+ emails: types.optional(z.array(types.string())),
1514
+ external_url: types.optional(types.string()),
1515
+ family_name: types.optional(types.string()),
1516
+ followers: types.optional(smartUnion([types.number(), types.string()])),
1517
+ following: types.optional(smartUnion([types.number(), types.string()])),
1518
+ friend_count: types.optional(types.number()),
1519
+ genres: types.optional(z.array(types.string())),
1520
+ given_name: types.optional(types.string()),
1521
+ has_plus: types.optional(types.boolean()),
1522
+ has_verified_email: types.optional(types.boolean()),
1523
+ inspired_by: types.optional(z.array(types.string())),
1524
+ is_affiliate: types.optional(types.boolean()),
1525
+ is_banned: types.optional(types.boolean()),
1526
+ is_business: types.optional(types.boolean()),
1527
+ is_channel: types.optional(types.boolean()),
1528
+ is_confirmed: types.optional(types.boolean()),
1529
+ is_gold: types.optional(types.boolean()),
1530
+ is_group: types.optional(types.boolean()),
1531
+ is_hacker: types.optional(types.boolean()),
1532
+ is_junior: types.optional(types.boolean()),
1533
+ is_legacy: types.optional(types.boolean()),
1534
+ is_meta_blocked: types.optional(types.boolean()),
1535
+ is_mod: types.optional(types.boolean()),
1536
+ is_partner: types.optional(types.boolean()),
1537
+ is_premium: types.optional(types.boolean()),
1538
+ is_professional: types.optional(types.boolean()),
1539
+ is_suspended: types.optional(types.boolean()),
1540
+ is_verified: z.optional(z.nullable(types.boolean())),
1541
+ joined_at: types.optional(types.string()),
1542
+ keywords: types.optional(z.array(types.string())),
1543
+ last_modified: types.optional(types.string()),
1544
+ last_seen: types.optional(types.string()),
1545
+ latest_pastes: types.optional(
1546
+ z.array(types.nullable(smartUnion([
1547
+ types.number(),
1548
+ z.lazy(() => LatestPasteResult$inboundSchema),
1549
+ types.string(),
1550
+ types.boolean(),
1551
+ ]))),
1552
+ ),
1553
+ learning_language: types.optional(types.string()),
1554
+ likes: types.optional(types.number()),
1555
+ likes_received: types.optional(types.number()),
1556
+ links: types.optional(
1557
+ z.array(types.nullable(smartUnion([
1558
+ types.number(),
1559
+ z.lazy(() => LinkResult$inboundSchema),
1560
+ types.string(),
1561
+ types.boolean(),
1562
+ ]))),
1563
+ ),
1564
+ listed_count: types.optional(types.number()),
1565
+ media_count: types.optional(types.number()),
1566
+ member_type: types.optional(types.string()),
1567
+ organizations: types.optional(
1568
+ z.array(z.lazy(() => ResultOrganization$inboundSchema)),
1569
+ ),
1570
+ page_views: types.optional(types.number()),
1571
+ past_usernames: types.optional(z.array(types.string())),
1572
+ paste_views: types.optional(types.number()),
1573
+ pins: types.optional(types.number()),
1574
+ platform_id: types.optional(types.string()),
1575
+ platforms: types.optional(
1576
+ z.array(types.nullable(smartUnion([
1577
+ types.number(),
1578
+ z.lazy(() => PlatformResult$inboundSchema),
1579
+ types.string(),
1580
+ types.boolean(),
1581
+ ]))),
1582
+ ),
1583
+ playlist_count: types.optional(types.number()),
1584
+ plays: types.optional(smartUnion([types.number(), types.string()])),
1585
+ posts: types.optional(types.number()),
1586
+ posts_count: types.optional(types.number()),
1587
+ primary_team: types.optional(types.string()),
1588
+ profile_views: types.optional(types.number()),
1589
+ proofs: types.optional(
1590
+ z.array(types.nullable(smartUnion([
1591
+ types.number(),
1592
+ z.lazy(() => ProofResult$inboundSchema),
1593
+ types.string(),
1594
+ types.boolean(),
1595
+ ]))),
1596
+ ),
1597
+ provider: types.optional(types.string()),
1598
+ provider_id: types.optional(types.string()),
1599
+ public_gists: types.optional(types.number()),
1600
+ public_repos: types.optional(types.number()),
1601
+ rate_plan: types.optional(types.string()),
1602
+ real_name: types.optional(types.string()),
1603
+ recent_activity: types.optional(z.any()),
1604
+ recovery_email: types.optional(types.string()),
1605
+ region: types.optional(types.string()),
1606
+ registered_since: types.optional(types.string()),
1607
+ reputation: types.optional(types.number()),
1608
+ reputation_label: types.optional(types.string()),
1609
+ roles: types.optional(
1610
+ z.array(types.nullable(smartUnion([
1611
+ types.number(),
1612
+ z.lazy(() => RoleResult$inboundSchema),
1613
+ types.string(),
1614
+ types.boolean(),
1615
+ ]))),
1616
+ ),
1617
+ scratch_team: types.optional(types.boolean()),
1618
+ skills: types.optional(z.array(types.string())),
1619
+ skin_url: types.optional(types.string()),
1620
+ social_links: types.optional(
1621
+ z.array(types.nullable(smartUnion([
1622
+ types.number(),
1623
+ z.lazy(() => SocialLinkResult$inboundSchema),
1624
+ types.string(),
1625
+ types.boolean(),
1626
+ ]))),
1627
+ ),
1628
+ socials: types.optional(
1629
+ smartUnion([
1630
+ z.lazy(() => SocialsResult$inboundSchema),
1631
+ z.array(types.string()),
1632
+ ]),
1633
+ ),
1634
+ status: types.optional(
1635
+ smartUnion([types.string(), z.lazy(() => StatusResult$inboundSchema)]),
1636
+ ),
1637
+ steam_id_64: types.optional(types.string()),
1638
+ streak: types.optional(types.number()),
1639
+ subscriber_count: types.optional(types.number()),
1640
+ subscribers: types.optional(types.number()),
1641
+ theme_title: types.optional(types.string()),
1642
+ thumbnail: types.optional(types.string()),
1643
+ title: types.optional(types.string()),
1644
+ total_karma: types.optional(types.number()),
1645
+ total_scrobbles: types.optional(types.number()),
1646
+ total_xp: types.optional(types.number()),
1647
+ track_count: types.optional(types.number()),
1648
+ trn_rank: types.optional(types.string()),
1649
+ trn_rating: types.optional(types.string()),
1650
+ trophies: types.optional(z.array(types.string())),
1651
+ tweets: types.optional(types.number()),
1652
+ twitter_username: types.optional(types.string()),
1653
+ updated_at: types.optional(types.string()),
1654
+ upvotes: types.optional(types.number()),
1655
+ url_entities: types.optional(
1656
+ z.array(types.nullable(smartUnion([
1657
+ types.number(),
1658
+ z.lazy(() => UrlEntityResult$inboundSchema),
1659
+ types.string(),
1660
+ types.boolean(),
1661
+ ]))),
1662
+ ),
1663
+ urls: types.optional(z.array(z.lazy(() => ResultUrl$inboundSchema))),
1664
+ uuid: types.optional(types.string()),
1665
+ video_count: types.optional(types.number()),
1666
+ visible_collection_count: types.optional(types.number()),
1667
+ visible_wishlist_count: types.optional(types.number()),
1668
+ website: types.optional(types.string()),
1669
+ }),
1670
+ z.transform((v) => {
1671
+ return remap$(v, {
1672
+ "accent_color": "accentColor",
1673
+ "account_type": "accountType",
1674
+ "awardee_karma": "awardeeKarma",
1675
+ "awarder_karma": "awarderKarma",
1676
+ "background_picture": "backgroundPicture",
1677
+ "bio_links": "bioLinks",
1678
+ "board_count": "boardCount",
1679
+ "broadcaster_type": "broadcasterType",
1680
+ "cape_url": "capeUrl",
1681
+ "cashtag_url": "cashtagUrl",
1682
+ "channel_id": "channelId",
1683
+ "cover_image": "coverImage",
1684
+ "created_at": "createdAt",
1685
+ "created_date": "createdDate",
1686
+ "created_on": "createdOn",
1687
+ "created_utc": "createdUtc",
1688
+ "crypto_addresses": "cryptoAddresses",
1689
+ "current_streak": "currentStreak",
1690
+ "external_url": "externalUrl",
1691
+ "family_name": "familyName",
1692
+ "friend_count": "friendCount",
1693
+ "given_name": "givenName",
1694
+ "has_plus": "hasPlus",
1695
+ "has_verified_email": "hasVerifiedEmail",
1696
+ "inspired_by": "inspiredBy",
1697
+ "is_affiliate": "isAffiliate",
1698
+ "is_banned": "isBanned",
1699
+ "is_business": "isBusiness",
1700
+ "is_channel": "isChannel",
1701
+ "is_confirmed": "isConfirmed",
1702
+ "is_gold": "isGold",
1703
+ "is_group": "isGroup",
1704
+ "is_hacker": "isHacker",
1705
+ "is_junior": "isJunior",
1706
+ "is_legacy": "isLegacy",
1707
+ "is_meta_blocked": "isMetaBlocked",
1708
+ "is_mod": "isMod",
1709
+ "is_partner": "isPartner",
1710
+ "is_premium": "isPremium",
1711
+ "is_professional": "isProfessional",
1712
+ "is_suspended": "isSuspended",
1713
+ "is_verified": "isVerified",
1714
+ "joined_at": "joinedAt",
1715
+ "last_modified": "lastModified",
1716
+ "last_seen": "lastSeen",
1717
+ "latest_pastes": "latestPastes",
1718
+ "learning_language": "learningLanguage",
1719
+ "likes_received": "likesReceived",
1720
+ "listed_count": "listedCount",
1721
+ "media_count": "mediaCount",
1722
+ "member_type": "memberType",
1723
+ "page_views": "pageViews",
1724
+ "past_usernames": "pastUsernames",
1725
+ "paste_views": "pasteViews",
1726
+ "platform_id": "platformId",
1727
+ "playlist_count": "playlistCount",
1728
+ "posts_count": "postsCount",
1729
+ "primary_team": "primaryTeam",
1730
+ "profile_views": "profileViews",
1731
+ "provider_id": "providerId",
1732
+ "public_gists": "publicGists",
1733
+ "public_repos": "publicRepos",
1734
+ "rate_plan": "ratePlan",
1735
+ "real_name": "realName",
1736
+ "recent_activity": "recentActivity",
1737
+ "recovery_email": "recoveryEmail",
1738
+ "registered_since": "registeredSince",
1739
+ "reputation_label": "reputationLabel",
1740
+ "scratch_team": "scratchTeam",
1741
+ "skin_url": "skinUrl",
1742
+ "social_links": "socialLinks",
1743
+ "steam_id_64": "steamId64",
1744
+ "subscriber_count": "subscriberCount",
1745
+ "theme_title": "themeTitle",
1746
+ "total_karma": "totalKarma",
1747
+ "total_scrobbles": "totalScrobbles",
1748
+ "total_xp": "totalXp",
1749
+ "track_count": "trackCount",
1750
+ "trn_rank": "trnRank",
1751
+ "trn_rating": "trnRating",
1752
+ "twitter_username": "twitterUsername",
1753
+ "updated_at": "updatedAt",
1754
+ "url_entities": "urlEntities",
1755
+ "video_count": "videoCount",
1756
+ "visible_collection_count": "visibleCollectionCount",
1757
+ "visible_wishlist_count": "visibleWishlistCount",
1758
+ });
1759
+ }),
1760
+ );
1761
+
1762
+ export function resultMetadataFromJSON(
1763
+ jsonString: string,
1764
+ ): SafeParseResult<ResultMetadata, SDKValidationError> {
1765
+ return safeParse(
1766
+ jsonString,
1767
+ (x) => ResultMetadata$inboundSchema.parse(JSON.parse(x)),
1768
+ `Failed to parse 'ResultMetadata' from JSON`,
1769
+ );
1770
+ }
286
1771
 
287
- export type SearchUsernameData = {
288
- durationMs: number;
289
- exists: boolean;
290
- service: string;
291
- type: SearchUsernameType;
292
- data?: SearchUsernameDataData | undefined;
293
- error?: string | undefined;
294
- };
1772
+ /** @internal */
1773
+ export const ResultData$inboundSchema: z.ZodMiniType<ResultData, unknown> = z
1774
+ .object({
1775
+ avatar: types.optional(types.string()),
1776
+ bio: types.optional(types.string()),
1777
+ country: types.optional(types.string()),
1778
+ displayName: types.optional(types.string()),
1779
+ id: types.optional(smartUnion([types.number(), types.string()])),
1780
+ isPrivate: types.optional(types.boolean()),
1781
+ isVerified: types.optional(types.boolean()),
1782
+ metadata: types.optional(z.lazy(() => ResultMetadata$inboundSchema)),
1783
+ url: types.optional(types.string()),
1784
+ username: types.optional(types.string()),
1785
+ });
295
1786
 
296
- /**
297
- * Search successful
298
- */
299
- export type SearchUsernameResponse = {
300
- data: Array<SearchUsernameData>;
301
- success: boolean;
302
- error?: string | undefined;
303
- };
1787
+ export function resultDataFromJSON(
1788
+ jsonString: string,
1789
+ ): SafeParseResult<ResultData, SDKValidationError> {
1790
+ return safeParse(
1791
+ jsonString,
1792
+ (x) => ResultData$inboundSchema.parse(JSON.parse(x)),
1793
+ `Failed to parse 'ResultData' from JSON`,
1794
+ );
1795
+ }
304
1796
 
305
1797
  /** @internal */
306
- export type SearchUsernameRequest$Outbound = {
307
- query: string;
308
- };
1798
+ export const ResultOsintResult$inboundSchema: z.ZodMiniType<
1799
+ ResultOsintResult,
1800
+ unknown
1801
+ > = z.pipe(
1802
+ z.object({
1803
+ duration_ms: types.number(),
1804
+ exists: types.boolean(),
1805
+ service: types.string(),
1806
+ type: ResultType$inboundSchema,
1807
+ data: types.optional(z.lazy(() => ResultData$inboundSchema)),
1808
+ error: types.optional(types.string()),
1809
+ }),
1810
+ z.transform((v) => {
1811
+ return remap$(v, {
1812
+ "duration_ms": "durationMs",
1813
+ });
1814
+ }),
1815
+ );
1816
+
1817
+ export function resultOsintResultFromJSON(
1818
+ jsonString: string,
1819
+ ): SafeParseResult<ResultOsintResult, SDKValidationError> {
1820
+ return safeParse(
1821
+ jsonString,
1822
+ (x) => ResultOsintResult$inboundSchema.parse(JSON.parse(x)),
1823
+ `Failed to parse 'ResultOsintResult' from JSON`,
1824
+ );
1825
+ }
309
1826
 
310
1827
  /** @internal */
311
- export const SearchUsernameRequest$outboundSchema: z.ZodMiniType<
312
- SearchUsernameRequest$Outbound,
313
- SearchUsernameRequest
1828
+ export const UsernameSearchComplete$inboundSchema: z.ZodMiniType<
1829
+ UsernameSearchComplete,
1830
+ unknown
314
1831
  > = z.object({
315
- query: z.string(),
1832
+ results: z.array(z.lazy(() => ResultOsintResult$inboundSchema)),
1833
+ activityId: z.optional(z.nullable(types.string())),
316
1834
  });
317
1835
 
318
- export function searchUsernameRequestToJSON(
319
- searchUsernameRequest: SearchUsernameRequest,
320
- ): string {
321
- return JSON.stringify(
322
- SearchUsernameRequest$outboundSchema.parse(searchUsernameRequest),
1836
+ export function usernameSearchCompleteFromJSON(
1837
+ jsonString: string,
1838
+ ): SafeParseResult<UsernameSearchComplete, SDKValidationError> {
1839
+ return safeParse(
1840
+ jsonString,
1841
+ (x) => UsernameSearchComplete$inboundSchema.parse(JSON.parse(x)),
1842
+ `Failed to parse 'UsernameSearchComplete' from JSON`,
1843
+ );
1844
+ }
1845
+
1846
+ /** @internal */
1847
+ export const AllEvent$inboundSchema: z.ZodMiniType<AllEvent, unknown> = z
1848
+ .object({
1849
+ data: z.pipe(
1850
+ z.pipe(
1851
+ z.unknown(),
1852
+ z.transform((v, ctx) => {
1853
+ if (typeof v !== "string") return v;
1854
+ try {
1855
+ return JSON.parse(v);
1856
+ } catch (err) {
1857
+ ctx.issues.push({
1858
+ input: v,
1859
+ code: "custom",
1860
+ message: `malformed json: ${err}`,
1861
+ });
1862
+ return z.NEVER;
1863
+ }
1864
+ }),
1865
+ ),
1866
+ z.lazy(() => UsernameSearchComplete$inboundSchema),
1867
+ ),
1868
+ event: types.literal("all"),
1869
+ });
1870
+
1871
+ export function allEventFromJSON(
1872
+ jsonString: string,
1873
+ ): SafeParseResult<AllEvent, SDKValidationError> {
1874
+ return safeParse(
1875
+ jsonString,
1876
+ (x) => AllEvent$inboundSchema.parse(JSON.parse(x)),
1877
+ `Failed to parse 'AllEvent' from JSON`,
323
1878
  );
324
1879
  }
325
1880
 
@@ -895,7 +2450,10 @@ export function socialsUnionFromJSON(
895
2450
  }
896
2451
 
897
2452
  /** @internal */
898
- export const Status$inboundSchema: z.ZodMiniType<Status, unknown> = z.pipe(
2453
+ export const SearchUsernameStatus$inboundSchema: z.ZodMiniType<
2454
+ SearchUsernameStatus,
2455
+ unknown
2456
+ > = z.pipe(
899
2457
  z.object({
900
2458
  is_coach: types.optional(types.boolean()),
901
2459
  is_moderator: types.optional(types.boolean()),
@@ -914,27 +2472,29 @@ export const Status$inboundSchema: z.ZodMiniType<Status, unknown> = z.pipe(
914
2472
  }),
915
2473
  );
916
2474
 
917
- export function statusFromJSON(
2475
+ export function searchUsernameStatusFromJSON(
918
2476
  jsonString: string,
919
- ): SafeParseResult<Status, SDKValidationError> {
2477
+ ): SafeParseResult<SearchUsernameStatus, SDKValidationError> {
920
2478
  return safeParse(
921
2479
  jsonString,
922
- (x) => Status$inboundSchema.parse(JSON.parse(x)),
923
- `Failed to parse 'Status' from JSON`,
2480
+ (x) => SearchUsernameStatus$inboundSchema.parse(JSON.parse(x)),
2481
+ `Failed to parse 'SearchUsernameStatus' from JSON`,
924
2482
  );
925
2483
  }
926
2484
 
927
2485
  /** @internal */
928
- export const StatusUnion$inboundSchema: z.ZodMiniType<StatusUnion, unknown> =
929
- smartUnion([types.string(), z.lazy(() => Status$inboundSchema)]);
2486
+ export const Status$inboundSchema: z.ZodMiniType<Status, unknown> = smartUnion([
2487
+ types.string(),
2488
+ z.lazy(() => SearchUsernameStatus$inboundSchema),
2489
+ ]);
930
2490
 
931
- export function statusUnionFromJSON(
2491
+ export function statusFromJSON(
932
2492
  jsonString: string,
933
- ): SafeParseResult<StatusUnion, SDKValidationError> {
2493
+ ): SafeParseResult<Status, SDKValidationError> {
934
2494
  return safeParse(
935
2495
  jsonString,
936
- (x) => StatusUnion$inboundSchema.parse(JSON.parse(x)),
937
- `Failed to parse 'StatusUnion' from JSON`,
2496
+ (x) => Status$inboundSchema.parse(JSON.parse(x)),
2497
+ `Failed to parse 'Status' from JSON`,
938
2498
  );
939
2499
  }
940
2500
 
@@ -1182,7 +2742,10 @@ export const Metadata$inboundSchema: z.ZodMiniType<Metadata, unknown> = z.pipe(
1182
2742
  ]),
1183
2743
  ),
1184
2744
  status: types.optional(
1185
- smartUnion([types.string(), z.lazy(() => Status$inboundSchema)]),
2745
+ smartUnion([
2746
+ types.string(),
2747
+ z.lazy(() => SearchUsernameStatus$inboundSchema),
2748
+ ]),
1186
2749
  ),
1187
2750
  steam_id_64: types.optional(types.string()),
1188
2751
  streak: types.optional(types.number()),
@@ -1320,8 +2883,8 @@ export function metadataFromJSON(
1320
2883
  }
1321
2884
 
1322
2885
  /** @internal */
1323
- export const SearchUsernameDataData$inboundSchema: z.ZodMiniType<
1324
- SearchUsernameDataData,
2886
+ export const SearchUsernameData$inboundSchema: z.ZodMiniType<
2887
+ SearchUsernameData,
1325
2888
  unknown
1326
2889
  > = z.object({
1327
2890
  avatar: types.optional(types.string()),
@@ -1336,62 +2899,97 @@ export const SearchUsernameDataData$inboundSchema: z.ZodMiniType<
1336
2899
  username: types.optional(types.string()),
1337
2900
  });
1338
2901
 
1339
- export function searchUsernameDataDataFromJSON(
2902
+ export function searchUsernameDataFromJSON(
1340
2903
  jsonString: string,
1341
- ): SafeParseResult<SearchUsernameDataData, SDKValidationError> {
2904
+ ): SafeParseResult<SearchUsernameData, SDKValidationError> {
1342
2905
  return safeParse(
1343
2906
  jsonString,
1344
- (x) => SearchUsernameDataData$inboundSchema.parse(JSON.parse(x)),
1345
- `Failed to parse 'SearchUsernameDataData' from JSON`,
2907
+ (x) => SearchUsernameData$inboundSchema.parse(JSON.parse(x)),
2908
+ `Failed to parse 'SearchUsernameData' from JSON`,
1346
2909
  );
1347
2910
  }
1348
2911
 
1349
2912
  /** @internal */
1350
- export const SearchUsernameData$inboundSchema: z.ZodMiniType<
1351
- SearchUsernameData,
1352
- unknown
1353
- > = z.pipe(
1354
- z.object({
1355
- duration_ms: types.number(),
1356
- exists: types.boolean(),
1357
- service: types.string(),
1358
- type: SearchUsernameType$inboundSchema,
1359
- data: types.optional(z.lazy(() => SearchUsernameDataData$inboundSchema)),
1360
- error: types.optional(types.string()),
1361
- }),
1362
- z.transform((v) => {
1363
- return remap$(v, {
1364
- "duration_ms": "durationMs",
1365
- });
1366
- }),
1367
- );
2913
+ export const OsintResult$inboundSchema: z.ZodMiniType<OsintResult, unknown> = z
2914
+ .pipe(
2915
+ z.object({
2916
+ duration_ms: types.number(),
2917
+ exists: types.boolean(),
2918
+ service: types.string(),
2919
+ type: SearchUsernameType$inboundSchema,
2920
+ data: types.optional(z.lazy(() => SearchUsernameData$inboundSchema)),
2921
+ error: types.optional(types.string()),
2922
+ }),
2923
+ z.transform((v) => {
2924
+ return remap$(v, {
2925
+ "duration_ms": "durationMs",
2926
+ });
2927
+ }),
2928
+ );
1368
2929
 
1369
- export function searchUsernameDataFromJSON(
2930
+ export function osintResultFromJSON(
1370
2931
  jsonString: string,
1371
- ): SafeParseResult<SearchUsernameData, SDKValidationError> {
2932
+ ): SafeParseResult<OsintResult, SDKValidationError> {
1372
2933
  return safeParse(
1373
2934
  jsonString,
1374
- (x) => SearchUsernameData$inboundSchema.parse(JSON.parse(x)),
1375
- `Failed to parse 'SearchUsernameData' from JSON`,
2935
+ (x) => OsintResult$inboundSchema.parse(JSON.parse(x)),
2936
+ `Failed to parse 'OsintResult' from JSON`,
1376
2937
  );
1377
2938
  }
1378
2939
 
1379
2940
  /** @internal */
1380
- export const SearchUsernameResponse$inboundSchema: z.ZodMiniType<
1381
- SearchUsernameResponse,
2941
+ export const IndividualEvent$inboundSchema: z.ZodMiniType<
2942
+ IndividualEvent,
1382
2943
  unknown
1383
2944
  > = z.object({
1384
- data: z.array(z.lazy(() => SearchUsernameData$inboundSchema)),
1385
- success: types.boolean(),
1386
- error: types.optional(types.string()),
2945
+ data: z.pipe(
2946
+ z.pipe(
2947
+ z.unknown(),
2948
+ z.transform((v, ctx) => {
2949
+ if (typeof v !== "string") return v;
2950
+ try {
2951
+ return JSON.parse(v);
2952
+ } catch (err) {
2953
+ ctx.issues.push({
2954
+ input: v,
2955
+ code: "custom",
2956
+ message: `malformed json: ${err}`,
2957
+ });
2958
+ return z.NEVER;
2959
+ }
2960
+ }),
2961
+ ),
2962
+ z.lazy(() => OsintResult$inboundSchema),
2963
+ ),
2964
+ event: types.literal("individual"),
1387
2965
  });
1388
2966
 
1389
- export function searchUsernameResponseFromJSON(
2967
+ export function individualEventFromJSON(
2968
+ jsonString: string,
2969
+ ): SafeParseResult<IndividualEvent, SDKValidationError> {
2970
+ return safeParse(
2971
+ jsonString,
2972
+ (x) => IndividualEvent$inboundSchema.parse(JSON.parse(x)),
2973
+ `Failed to parse 'IndividualEvent' from JSON`,
2974
+ );
2975
+ }
2976
+
2977
+ /** @internal */
2978
+ export const UsernameSearchEvent$inboundSchema: z.ZodMiniType<
2979
+ UsernameSearchEvent,
2980
+ unknown
2981
+ > = smartUnion([
2982
+ z.lazy(() => IndividualEvent$inboundSchema),
2983
+ z.lazy(() => AllEvent$inboundSchema),
2984
+ z.lazy(() => SearchUsernameErrorEvent$inboundSchema),
2985
+ ]);
2986
+
2987
+ export function usernameSearchEventFromJSON(
1390
2988
  jsonString: string,
1391
- ): SafeParseResult<SearchUsernameResponse, SDKValidationError> {
2989
+ ): SafeParseResult<UsernameSearchEvent, SDKValidationError> {
1392
2990
  return safeParse(
1393
2991
  jsonString,
1394
- (x) => SearchUsernameResponse$inboundSchema.parse(JSON.parse(x)),
1395
- `Failed to parse 'SearchUsernameResponse' from JSON`,
2992
+ (x) => UsernameSearchEvent$inboundSchema.parse(JSON.parse(x)),
2993
+ `Failed to parse 'UsernameSearchEvent' from JSON`,
1396
2994
  );
1397
2995
  }