@indiciaosint/sdk 1.0.1-patch → 1.0.3

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 (92) hide show
  1. package/README.md +6 -6
  2. package/esm/funcs/intelligence-geolocate-media.d.ts +1 -1
  3. package/esm/funcs/intelligence-geolocate-media.js +1 -1
  4. package/esm/lib/config.d.ts +2 -2
  5. package/esm/lib/config.js +2 -2
  6. package/esm/models/operations/search-address.d.ts +18 -13
  7. package/esm/models/operations/search-address.d.ts.map +1 -1
  8. package/esm/models/operations/search-address.js +20 -13
  9. package/esm/models/operations/search-address.js.map +1 -1
  10. package/esm/models/operations/search-discord.d.ts +4 -4
  11. package/esm/models/operations/search-discord.d.ts.map +1 -1
  12. package/esm/models/operations/search-discord.js +5 -4
  13. package/esm/models/operations/search-discord.js.map +1 -1
  14. package/esm/models/operations/search-dns.d.ts +52 -20
  15. package/esm/models/operations/search-dns.d.ts.map +1 -1
  16. package/esm/models/operations/search-dns.js +76 -24
  17. package/esm/models/operations/search-dns.js.map +1 -1
  18. package/esm/models/operations/search-email.d.ts +17 -10
  19. package/esm/models/operations/search-email.d.ts.map +1 -1
  20. package/esm/models/operations/search-email.js +18 -10
  21. package/esm/models/operations/search-email.js.map +1 -1
  22. package/esm/models/operations/search-gmail.d.ts +94 -72
  23. package/esm/models/operations/search-gmail.d.ts.map +1 -1
  24. package/esm/models/operations/search-gmail.js +94 -69
  25. package/esm/models/operations/search-gmail.js.map +1 -1
  26. package/esm/models/operations/search-hudson-rock.d.ts +27 -23
  27. package/esm/models/operations/search-hudson-rock.d.ts.map +1 -1
  28. package/esm/models/operations/search-hudson-rock.js +23 -15
  29. package/esm/models/operations/search-hudson-rock.js.map +1 -1
  30. package/esm/models/operations/search-ip-info.d.ts +114 -25
  31. package/esm/models/operations/search-ip-info.d.ts.map +1 -1
  32. package/esm/models/operations/search-ip-info.js +172 -28
  33. package/esm/models/operations/search-ip-info.js.map +1 -1
  34. package/esm/models/operations/search-person.d.ts +18 -13
  35. package/esm/models/operations/search-person.d.ts.map +1 -1
  36. package/esm/models/operations/search-person.js +20 -13
  37. package/esm/models/operations/search-person.js.map +1 -1
  38. package/esm/models/operations/search-phone.d.ts +22 -28
  39. package/esm/models/operations/search-phone.d.ts.map +1 -1
  40. package/esm/models/operations/search-phone.js +25 -39
  41. package/esm/models/operations/search-phone.js.map +1 -1
  42. package/esm/models/operations/search-roblox.d.ts +9 -9
  43. package/esm/models/operations/search-roblox.d.ts.map +1 -1
  44. package/esm/models/operations/search-roblox.js +10 -10
  45. package/esm/models/operations/search-roblox.js.map +1 -1
  46. package/esm/models/operations/search-seon.d.ts +5 -5
  47. package/esm/models/operations/search-seon.d.ts.map +1 -1
  48. package/esm/models/operations/search-seon.js +5 -5
  49. package/esm/models/operations/search-seon.js.map +1 -1
  50. package/esm/models/operations/search-shodan.d.ts +94 -90
  51. package/esm/models/operations/search-shodan.d.ts.map +1 -1
  52. package/esm/models/operations/search-shodan.js +102 -96
  53. package/esm/models/operations/search-shodan.js.map +1 -1
  54. package/esm/models/operations/search-tiktok.d.ts +22 -363
  55. package/esm/models/operations/search-tiktok.d.ts.map +1 -1
  56. package/esm/models/operations/search-tiktok.js +23 -593
  57. package/esm/models/operations/search-tiktok.js.map +1 -1
  58. package/esm/models/operations/search-username.d.ts +9 -9
  59. package/esm/models/operations/search-username.d.ts.map +1 -1
  60. package/esm/models/operations/search-username.js +13 -16
  61. package/esm/models/operations/search-username.js.map +1 -1
  62. package/esm/models/operations/search-web-databases.d.ts +108 -311
  63. package/esm/models/operations/search-web-databases.d.ts.map +1 -1
  64. package/esm/models/operations/search-web-databases.js +115 -432
  65. package/esm/models/operations/search-web-databases.js.map +1 -1
  66. package/esm/models/operations/search-whois.d.ts +24 -59
  67. package/esm/models/operations/search-whois.d.ts.map +1 -1
  68. package/esm/models/operations/search-whois.js +24 -86
  69. package/esm/models/operations/search-whois.js.map +1 -1
  70. package/esm/sdk/intelligence.d.ts +1 -1
  71. package/esm/sdk/intelligence.js +1 -1
  72. package/jsr.json +1 -1
  73. package/package.json +5 -3
  74. package/src/funcs/intelligence-geolocate-media.ts +1 -1
  75. package/src/lib/config.ts +2 -2
  76. package/src/models/operations/search-address.ts +47 -26
  77. package/src/models/operations/search-discord.ts +13 -15
  78. package/src/models/operations/search-dns.ts +213 -36
  79. package/src/models/operations/search-email.ts +44 -20
  80. package/src/models/operations/search-gmail.ts +269 -152
  81. package/src/models/operations/search-hudson-rock.ts +61 -51
  82. package/src/models/operations/search-ip-info.ts +359 -52
  83. package/src/models/operations/search-person.ts +47 -26
  84. package/src/models/operations/search-phone.ts +56 -76
  85. package/src/models/operations/search-roblox.ts +27 -27
  86. package/src/models/operations/search-seon.ts +10 -10
  87. package/src/models/operations/search-shodan.ts +217 -196
  88. package/src/models/operations/search-tiktok.ts +45 -1366
  89. package/src/models/operations/search-username.ts +24 -32
  90. package/src/models/operations/search-web-databases.ts +308 -1000
  91. package/src/models/operations/search-whois.ts +49 -192
  92. package/src/sdk/intelligence.ts +1 -1
@@ -3,304 +3,41 @@
3
3
  */
4
4
 
5
5
  import * as z from "zod/v4-mini";
6
- import { remap as remap$ } from "../../lib/primitives.js";
7
6
  import { safeParse } from "../../lib/schemas.js";
8
- import * as openEnums from "../../types/enums.js";
9
- import { OpenEnum } from "../../types/enums.js";
10
7
  import { Result as SafeParseResult } from "../../types/fp.js";
11
8
  import * as types from "../../types/primitives.js";
12
- import { smartUnion } from "../../types/smart-union.js";
13
9
  import { SDKValidationError } from "../errors/sdk-validation-error.js";
14
10
 
15
11
  export type SearchTiktokRequest = {
16
12
  query: string;
17
13
  };
18
14
 
19
- export type GeoIndicators = {
20
- top10LanguagesInDescription: Array<string>;
21
- top10RegionsFromVideos: Array<string>;
22
- };
23
-
24
- export type PerformanceByDay = {
25
- avgViews: number;
26
- posts: number;
27
- totalEngagement: number;
28
- totalViews: number;
29
- };
30
-
31
- export type PerformanceByHour = {
32
- avgViews: number;
33
- posts: number;
34
- totalEngagement: number;
35
- totalViews: number;
36
- };
37
-
38
- export type PostingFrequency = {
39
- averagePostsPerWeek?: number | undefined;
40
- postingConsistencyScore?: number | undefined;
41
- };
42
-
43
- export type PostingSchedule = {
44
- mostActiveDay: string;
45
- mostActiveHourUtc: string;
46
- optimalPostingDay: string;
47
- optimalPostingHourUtc: string;
48
- performanceByDay: { [k: string]: PerformanceByDay };
49
- performanceByHour: { [k: string]: PerformanceByHour };
50
- postingHeatmapDayVsHourUtc: { [k: string]: { [k: string]: number } };
51
- postingFrequency?: PostingFrequency | undefined;
52
- };
53
-
54
- export type AudienceAndTimingInsights = {
55
- geoIndicators: GeoIndicators;
56
- postingSchedule: PostingSchedule;
57
- };
58
-
59
- export type TrendingHashtag = {
60
- hashtag: string;
61
- olderUsage: number;
62
- recentUsage: number;
63
- trendScore: number;
64
- };
65
-
66
- export type ContentTrends = {
67
- contentConsistencyScore: number;
68
- recentPopularHashtags: Array<string>;
69
- trendingHashtags: Array<TrendingHashtag>;
70
- };
71
-
72
- export type VideoLengthAnalysisSeconds = {
73
- averageDuration: number;
74
- longestDuration: number;
75
- optimalDurationRange: string;
76
- shortestDuration: number;
77
- };
78
-
79
- export type ContentStrategyDeepDive = {
80
- contentTrends: ContentTrends;
81
- top10EffectsUsed: Array<string>;
82
- top10MusicTitlesUsed: Array<string>;
83
- top15HashtagsUsed: Array<string>;
84
- videoLengthAnalysisSeconds: VideoLengthAnalysisSeconds;
85
- };
86
-
87
- export type AccountStatistics = {
88
- followersCount: number;
89
- followingCount: number;
90
- totalLikesReceivedOnAllVideos: number;
91
- };
92
-
93
- export type AveragePerformancePerVideo = {
94
- avgComments: number;
95
- avgFavorites: number;
96
- avgLikes: number;
97
- avgShares: number;
98
- avgViews: number;
99
- };
100
-
101
- export type EngagementRatePerFollower = {
102
- explanation: string;
103
- value: string;
104
- };
105
-
106
- export type EngagementRatePerView = {
107
- explanation: string;
108
- value: string;
109
- };
110
-
111
- export type EngagementRatios = {
112
- commentToViewRatio: string;
113
- engagementRatePerFollower: EngagementRatePerFollower;
114
- engagementRatePerView: EngagementRatePerView;
115
- favoriteToViewRatio: string;
116
- likeToViewRatio: string;
117
- shareToViewRatio: string;
118
- };
119
-
120
- export type PerformanceSummaryAcrossAnalyzedVideos = {
121
- totalComments: number;
122
- totalFavorites: number;
123
- totalLikes: number;
124
- totalShares: number;
125
- totalVideosAnalyzed: number;
126
- totalViews: number;
127
- };
128
-
129
- export type KeyMetrics = {
130
- accountStatistics: AccountStatistics;
131
- averagePerformancePerVideo: AveragePerformancePerVideo;
132
- engagementRatios: EngagementRatios;
133
- performanceSummaryAcrossAnalyzedVideos:
134
- PerformanceSummaryAcrossAnalyzedVideos;
135
- };
136
-
137
- export const IsPrivateAccount = {
138
- No: "No",
139
- Yes: "Yes",
140
- } as const;
141
- export type IsPrivateAccount = OpenEnum<typeof IsPrivateAccount>;
142
-
143
- export type ProfileSummary = {
144
- isPrivateAccount: IsPrivateAccount;
145
- nickname: string;
146
- signature: string;
147
- username: string;
148
- };
149
-
150
- export type HistoricalPerformance = {
151
- avgComments: number;
152
- avgLikes: number;
153
- avgShares: number;
154
- avgViews: number;
155
- engagementRate: string;
156
- };
157
-
158
- export type RecentPerformance = {
159
- avgComments: number;
160
- avgLikes: number;
161
- avgShares: number;
162
- avgViews: number;
163
- engagementRate: string;
164
- };
165
-
166
- export type DetailedMetrics = {
167
- historicalPerformance: HistoricalPerformance;
168
- recentPerformance: RecentPerformance;
169
- };
170
-
171
- export type ShadowBanRiskAssessmentResult = {
172
- assessment: string;
173
- confidenceLevel: string;
174
- detailedMetrics: DetailedMetrics;
175
- probabilityPercentage: string;
176
- reasoning: string;
177
- };
178
-
179
- export type ShadowBanRiskAssessment = {
180
- explanation: string;
181
- result: ShadowBanRiskAssessmentResult;
182
- };
183
-
184
- export type ByComment = {
185
- createdDate: string;
186
- description: string;
187
- engagementRate: string;
188
- value: number;
189
- videoId: string;
190
- videoUrl: string;
191
- };
192
-
193
- export type ByLike = {
194
- createdDate: string;
195
- description: string;
196
- engagementRate: string;
197
- value: number;
198
- videoId: string;
199
- videoUrl: string;
200
- };
201
-
202
- export type ByShare = {
203
- createdDate: string;
204
- description: string;
205
- engagementRate: string;
206
- value: number;
207
- videoId: string;
208
- videoUrl: string;
209
- };
210
-
211
- export type ByView = {
212
- createdDate: string;
213
- description: string;
214
- engagementRate: string;
215
- value: number;
216
- videoId: string;
217
- videoUrl: string;
218
- };
219
-
220
- export type TopPerformingVideosSnapshot = {
221
- byComments: Array<ByComment>;
222
- byLikes: Array<ByLike>;
223
- byShares: Array<ByShare>;
224
- byViews: Array<ByView>;
225
- };
226
-
227
- export type BestPerformingVideo = {
228
- likes: number;
229
- videoId: string;
230
- views: number;
231
- };
232
-
233
- export type ViralPotentialAnalysisResult = {
234
- assessment: string;
235
- bestPerformingVideo: BestPerformingVideo;
236
- factors: Array<string>;
237
- score: number;
238
- viralVideosCount: number;
239
- };
240
-
241
- export type ViralPotentialAnalysis = {
242
- explanation: string;
243
- result: ViralPotentialAnalysisResult;
244
- };
245
-
246
- export type SearchTiktokData2 = {
247
- audienceAndTimingInsights: AudienceAndTimingInsights;
248
- contentStrategyDeepDive: ContentStrategyDeepDive;
249
- keyMetrics: KeyMetrics;
250
- profileSummary: ProfileSummary;
251
- reportGeneratedUtc: string;
252
- shadowBanRiskAssessment: ShadowBanRiskAssessment;
253
- topPerformingVideosSnapshot: TopPerformingVideosSnapshot;
254
- viralPotentialAnalysis: ViralPotentialAnalysis;
255
- };
256
-
257
- export type SearchTiktokProfile = {
258
- accountCreated: string;
259
- avatarURL: string;
260
- bioLink: string;
261
- country: string;
262
- language: string;
263
- nicknameLastModified: string;
264
- nickname: string;
265
- secUID: string;
266
- userID: string;
267
- usernameLastModified: string;
268
- username: string;
269
- about?: string | undefined;
270
- };
271
-
272
- export type SearchTiktokStats = {
273
- followers: string;
274
- following: string;
275
- friends: string;
276
- hearts: string;
277
- videos: string;
278
- };
279
-
280
- export type SearchTiktokData1 = {
281
- profile?: SearchTiktokProfile | undefined;
282
- stats?: SearchTiktokStats | undefined;
283
- };
284
-
285
- export type SearchTiktokDataUnion = SearchTiktokData2 | SearchTiktokData1;
286
-
287
- export const SearchType = {
288
- Basic: "basic",
289
- Full: "full",
290
- } as const;
291
- export type SearchType = OpenEnum<typeof SearchType>;
292
-
293
- export type SearchTiktokData3 = {
294
- data: Array<SearchTiktokData2 | SearchTiktokData1>;
295
- searchType: SearchType;
296
- success: boolean;
15
+ export type SearchTiktokData = {
16
+ bio?: string | undefined;
17
+ commerce?: boolean | undefined;
18
+ created?: number | undefined;
19
+ display?: string | undefined;
20
+ error?: string | undefined;
21
+ followers?: string | undefined;
22
+ following?: string | undefined;
23
+ friends?: string | undefined;
24
+ id?: string | undefined;
25
+ language?: string | undefined;
26
+ likes?: string | undefined;
27
+ picture?: string | undefined;
28
+ private?: boolean | undefined;
29
+ region?: string | undefined;
30
+ ttseller?: boolean | undefined;
31
+ username?: string | undefined;
32
+ verified?: boolean | undefined;
33
+ videos?: string | undefined;
297
34
  };
298
35
 
299
36
  /**
300
37
  * Search successful
301
38
  */
302
39
  export type SearchTiktokResponse = {
303
- data: SearchTiktokData3;
40
+ data: SearchTiktokData;
304
41
  success: boolean;
305
42
  error?: string | undefined;
306
43
  };
@@ -327,1095 +64,37 @@ export function searchTiktokRequestToJSON(
327
64
  }
328
65
 
329
66
  /** @internal */
330
- export const GeoIndicators$inboundSchema: z.ZodMiniType<
331
- GeoIndicators,
332
- unknown
333
- > = z.pipe(
334
- z.object({
335
- top_10_languages_in_description: z.array(types.string()),
336
- top_10_regions_from_videos: z.array(types.string()),
337
- }),
338
- z.transform((v) => {
339
- return remap$(v, {
340
- "top_10_languages_in_description": "top10LanguagesInDescription",
341
- "top_10_regions_from_videos": "top10RegionsFromVideos",
342
- });
343
- }),
344
- );
345
-
346
- export function geoIndicatorsFromJSON(
347
- jsonString: string,
348
- ): SafeParseResult<GeoIndicators, SDKValidationError> {
349
- return safeParse(
350
- jsonString,
351
- (x) => GeoIndicators$inboundSchema.parse(JSON.parse(x)),
352
- `Failed to parse 'GeoIndicators' from JSON`,
353
- );
354
- }
355
-
356
- /** @internal */
357
- export const PerformanceByDay$inboundSchema: z.ZodMiniType<
358
- PerformanceByDay,
359
- unknown
360
- > = z.object({
361
- avgViews: types.number(),
362
- posts: types.number(),
363
- totalEngagement: types.number(),
364
- totalViews: types.number(),
365
- });
366
-
367
- export function performanceByDayFromJSON(
368
- jsonString: string,
369
- ): SafeParseResult<PerformanceByDay, SDKValidationError> {
370
- return safeParse(
371
- jsonString,
372
- (x) => PerformanceByDay$inboundSchema.parse(JSON.parse(x)),
373
- `Failed to parse 'PerformanceByDay' from JSON`,
374
- );
375
- }
376
-
377
- /** @internal */
378
- export const PerformanceByHour$inboundSchema: z.ZodMiniType<
379
- PerformanceByHour,
380
- unknown
381
- > = z.object({
382
- avgViews: types.number(),
383
- posts: types.number(),
384
- totalEngagement: types.number(),
385
- totalViews: types.number(),
386
- });
387
-
388
- export function performanceByHourFromJSON(
389
- jsonString: string,
390
- ): SafeParseResult<PerformanceByHour, SDKValidationError> {
391
- return safeParse(
392
- jsonString,
393
- (x) => PerformanceByHour$inboundSchema.parse(JSON.parse(x)),
394
- `Failed to parse 'PerformanceByHour' from JSON`,
395
- );
396
- }
397
-
398
- /** @internal */
399
- export const PostingFrequency$inboundSchema: z.ZodMiniType<
400
- PostingFrequency,
401
- unknown
402
- > = z.pipe(
403
- z.object({
404
- average_posts_per_week: types.optional(types.number()),
405
- posting_consistency_score: types.optional(types.number()),
406
- }),
407
- z.transform((v) => {
408
- return remap$(v, {
409
- "average_posts_per_week": "averagePostsPerWeek",
410
- "posting_consistency_score": "postingConsistencyScore",
411
- });
412
- }),
413
- );
414
-
415
- export function postingFrequencyFromJSON(
416
- jsonString: string,
417
- ): SafeParseResult<PostingFrequency, SDKValidationError> {
418
- return safeParse(
419
- jsonString,
420
- (x) => PostingFrequency$inboundSchema.parse(JSON.parse(x)),
421
- `Failed to parse 'PostingFrequency' from JSON`,
422
- );
423
- }
424
-
425
- /** @internal */
426
- export const PostingSchedule$inboundSchema: z.ZodMiniType<
427
- PostingSchedule,
428
- unknown
429
- > = z.pipe(
430
- z.object({
431
- most_active_day: types.string(),
432
- most_active_hour_utc: types.string(),
433
- optimal_posting_day: types.string(),
434
- optimal_posting_hour_utc: types.string(),
435
- performance_by_day: z.record(
436
- z.string(),
437
- z.lazy(() => PerformanceByDay$inboundSchema),
438
- ),
439
- performance_by_hour: z.record(
440
- z.string(),
441
- z.lazy(() => PerformanceByHour$inboundSchema),
442
- ),
443
- posting_heatmap_day_vs_hour_utc: z.record(
444
- z.string(),
445
- z.record(z.string(), types.number()),
446
- ),
447
- posting_frequency: types.optional(
448
- z.lazy(() => PostingFrequency$inboundSchema),
449
- ),
450
- }),
451
- z.transform((v) => {
452
- return remap$(v, {
453
- "most_active_day": "mostActiveDay",
454
- "most_active_hour_utc": "mostActiveHourUtc",
455
- "optimal_posting_day": "optimalPostingDay",
456
- "optimal_posting_hour_utc": "optimalPostingHourUtc",
457
- "performance_by_day": "performanceByDay",
458
- "performance_by_hour": "performanceByHour",
459
- "posting_heatmap_day_vs_hour_utc": "postingHeatmapDayVsHourUtc",
460
- "posting_frequency": "postingFrequency",
461
- });
462
- }),
463
- );
464
-
465
- export function postingScheduleFromJSON(
466
- jsonString: string,
467
- ): SafeParseResult<PostingSchedule, SDKValidationError> {
468
- return safeParse(
469
- jsonString,
470
- (x) => PostingSchedule$inboundSchema.parse(JSON.parse(x)),
471
- `Failed to parse 'PostingSchedule' from JSON`,
472
- );
473
- }
474
-
475
- /** @internal */
476
- export const AudienceAndTimingInsights$inboundSchema: z.ZodMiniType<
477
- AudienceAndTimingInsights,
478
- unknown
479
- > = z.pipe(
480
- z.object({
481
- geo_indicators: z.lazy(() => GeoIndicators$inboundSchema),
482
- posting_schedule: z.lazy(() => PostingSchedule$inboundSchema),
483
- }),
484
- z.transform((v) => {
485
- return remap$(v, {
486
- "geo_indicators": "geoIndicators",
487
- "posting_schedule": "postingSchedule",
488
- });
489
- }),
490
- );
491
-
492
- export function audienceAndTimingInsightsFromJSON(
493
- jsonString: string,
494
- ): SafeParseResult<AudienceAndTimingInsights, SDKValidationError> {
495
- return safeParse(
496
- jsonString,
497
- (x) => AudienceAndTimingInsights$inboundSchema.parse(JSON.parse(x)),
498
- `Failed to parse 'AudienceAndTimingInsights' from JSON`,
499
- );
500
- }
501
-
502
- /** @internal */
503
- export const TrendingHashtag$inboundSchema: z.ZodMiniType<
504
- TrendingHashtag,
505
- unknown
506
- > = z.pipe(
507
- z.object({
508
- hashtag: types.string(),
509
- older_usage: types.number(),
510
- recent_usage: types.number(),
511
- trend_score: types.number(),
512
- }),
513
- z.transform((v) => {
514
- return remap$(v, {
515
- "older_usage": "olderUsage",
516
- "recent_usage": "recentUsage",
517
- "trend_score": "trendScore",
518
- });
519
- }),
520
- );
521
-
522
- export function trendingHashtagFromJSON(
523
- jsonString: string,
524
- ): SafeParseResult<TrendingHashtag, SDKValidationError> {
525
- return safeParse(
526
- jsonString,
527
- (x) => TrendingHashtag$inboundSchema.parse(JSON.parse(x)),
528
- `Failed to parse 'TrendingHashtag' from JSON`,
529
- );
530
- }
531
-
532
- /** @internal */
533
- export const ContentTrends$inboundSchema: z.ZodMiniType<
534
- ContentTrends,
535
- unknown
536
- > = z.pipe(
537
- z.object({
538
- content_consistency_score: types.number(),
539
- recent_popular_hashtags: z.array(types.string()),
540
- trending_hashtags: z.array(z.lazy(() => TrendingHashtag$inboundSchema)),
541
- }),
542
- z.transform((v) => {
543
- return remap$(v, {
544
- "content_consistency_score": "contentConsistencyScore",
545
- "recent_popular_hashtags": "recentPopularHashtags",
546
- "trending_hashtags": "trendingHashtags",
547
- });
548
- }),
549
- );
550
-
551
- export function contentTrendsFromJSON(
552
- jsonString: string,
553
- ): SafeParseResult<ContentTrends, SDKValidationError> {
554
- return safeParse(
555
- jsonString,
556
- (x) => ContentTrends$inboundSchema.parse(JSON.parse(x)),
557
- `Failed to parse 'ContentTrends' from JSON`,
558
- );
559
- }
560
-
561
- /** @internal */
562
- export const VideoLengthAnalysisSeconds$inboundSchema: z.ZodMiniType<
563
- VideoLengthAnalysisSeconds,
564
- unknown
565
- > = z.pipe(
566
- z.object({
567
- average_duration: types.number(),
568
- longest_duration: types.number(),
569
- optimal_duration_range: types.string(),
570
- shortest_duration: types.number(),
571
- }),
572
- z.transform((v) => {
573
- return remap$(v, {
574
- "average_duration": "averageDuration",
575
- "longest_duration": "longestDuration",
576
- "optimal_duration_range": "optimalDurationRange",
577
- "shortest_duration": "shortestDuration",
578
- });
579
- }),
580
- );
581
-
582
- export function videoLengthAnalysisSecondsFromJSON(
583
- jsonString: string,
584
- ): SafeParseResult<VideoLengthAnalysisSeconds, SDKValidationError> {
585
- return safeParse(
586
- jsonString,
587
- (x) => VideoLengthAnalysisSeconds$inboundSchema.parse(JSON.parse(x)),
588
- `Failed to parse 'VideoLengthAnalysisSeconds' from JSON`,
589
- );
590
- }
591
-
592
- /** @internal */
593
- export const ContentStrategyDeepDive$inboundSchema: z.ZodMiniType<
594
- ContentStrategyDeepDive,
595
- unknown
596
- > = z.pipe(
597
- z.object({
598
- content_trends: z.lazy(() => ContentTrends$inboundSchema),
599
- top_10_effects_used: z.array(types.string()),
600
- top_10_music_titles_used: z.array(types.string()),
601
- top_15_hashtags_used: z.array(types.string()),
602
- video_length_analysis_seconds: z.lazy(() =>
603
- VideoLengthAnalysisSeconds$inboundSchema
604
- ),
605
- }),
606
- z.transform((v) => {
607
- return remap$(v, {
608
- "content_trends": "contentTrends",
609
- "top_10_effects_used": "top10EffectsUsed",
610
- "top_10_music_titles_used": "top10MusicTitlesUsed",
611
- "top_15_hashtags_used": "top15HashtagsUsed",
612
- "video_length_analysis_seconds": "videoLengthAnalysisSeconds",
613
- });
614
- }),
615
- );
616
-
617
- export function contentStrategyDeepDiveFromJSON(
618
- jsonString: string,
619
- ): SafeParseResult<ContentStrategyDeepDive, SDKValidationError> {
620
- return safeParse(
621
- jsonString,
622
- (x) => ContentStrategyDeepDive$inboundSchema.parse(JSON.parse(x)),
623
- `Failed to parse 'ContentStrategyDeepDive' from JSON`,
624
- );
625
- }
626
-
627
- /** @internal */
628
- export const AccountStatistics$inboundSchema: z.ZodMiniType<
629
- AccountStatistics,
630
- unknown
631
- > = z.pipe(
632
- z.object({
633
- followers_count: types.number(),
634
- following_count: types.number(),
635
- total_likes_received_on_all_videos: types.number(),
636
- }),
637
- z.transform((v) => {
638
- return remap$(v, {
639
- "followers_count": "followersCount",
640
- "following_count": "followingCount",
641
- "total_likes_received_on_all_videos": "totalLikesReceivedOnAllVideos",
642
- });
643
- }),
644
- );
645
-
646
- export function accountStatisticsFromJSON(
647
- jsonString: string,
648
- ): SafeParseResult<AccountStatistics, SDKValidationError> {
649
- return safeParse(
650
- jsonString,
651
- (x) => AccountStatistics$inboundSchema.parse(JSON.parse(x)),
652
- `Failed to parse 'AccountStatistics' from JSON`,
653
- );
654
- }
655
-
656
- /** @internal */
657
- export const AveragePerformancePerVideo$inboundSchema: z.ZodMiniType<
658
- AveragePerformancePerVideo,
659
- unknown
660
- > = z.pipe(
661
- z.object({
662
- avg_comments: types.number(),
663
- avg_favorites: types.number(),
664
- avg_likes: types.number(),
665
- avg_shares: types.number(),
666
- avg_views: types.number(),
667
- }),
668
- z.transform((v) => {
669
- return remap$(v, {
670
- "avg_comments": "avgComments",
671
- "avg_favorites": "avgFavorites",
672
- "avg_likes": "avgLikes",
673
- "avg_shares": "avgShares",
674
- "avg_views": "avgViews",
675
- });
676
- }),
677
- );
678
-
679
- export function averagePerformancePerVideoFromJSON(
680
- jsonString: string,
681
- ): SafeParseResult<AveragePerformancePerVideo, SDKValidationError> {
682
- return safeParse(
683
- jsonString,
684
- (x) => AveragePerformancePerVideo$inboundSchema.parse(JSON.parse(x)),
685
- `Failed to parse 'AveragePerformancePerVideo' from JSON`,
686
- );
687
- }
688
-
689
- /** @internal */
690
- export const EngagementRatePerFollower$inboundSchema: z.ZodMiniType<
691
- EngagementRatePerFollower,
692
- unknown
693
- > = z.object({
694
- explanation: types.string(),
695
- value: types.string(),
696
- });
697
-
698
- export function engagementRatePerFollowerFromJSON(
699
- jsonString: string,
700
- ): SafeParseResult<EngagementRatePerFollower, SDKValidationError> {
701
- return safeParse(
702
- jsonString,
703
- (x) => EngagementRatePerFollower$inboundSchema.parse(JSON.parse(x)),
704
- `Failed to parse 'EngagementRatePerFollower' from JSON`,
705
- );
706
- }
707
-
708
- /** @internal */
709
- export const EngagementRatePerView$inboundSchema: z.ZodMiniType<
710
- EngagementRatePerView,
67
+ export const SearchTiktokData$inboundSchema: z.ZodMiniType<
68
+ SearchTiktokData,
711
69
  unknown
712
70
  > = z.object({
713
- explanation: types.string(),
714
- value: types.string(),
715
- });
716
-
717
- export function engagementRatePerViewFromJSON(
718
- jsonString: string,
719
- ): SafeParseResult<EngagementRatePerView, SDKValidationError> {
720
- return safeParse(
721
- jsonString,
722
- (x) => EngagementRatePerView$inboundSchema.parse(JSON.parse(x)),
723
- `Failed to parse 'EngagementRatePerView' from JSON`,
724
- );
725
- }
726
-
727
- /** @internal */
728
- export const EngagementRatios$inboundSchema: z.ZodMiniType<
729
- EngagementRatios,
730
- unknown
731
- > = z.pipe(
732
- z.object({
733
- comment_to_view_ratio: types.string(),
734
- engagement_rate_per_follower: z.lazy(() =>
735
- EngagementRatePerFollower$inboundSchema
736
- ),
737
- engagement_rate_per_view: z.lazy(() => EngagementRatePerView$inboundSchema),
738
- favorite_to_view_ratio: types.string(),
739
- like_to_view_ratio: types.string(),
740
- share_to_view_ratio: types.string(),
741
- }),
742
- z.transform((v) => {
743
- return remap$(v, {
744
- "comment_to_view_ratio": "commentToViewRatio",
745
- "engagement_rate_per_follower": "engagementRatePerFollower",
746
- "engagement_rate_per_view": "engagementRatePerView",
747
- "favorite_to_view_ratio": "favoriteToViewRatio",
748
- "like_to_view_ratio": "likeToViewRatio",
749
- "share_to_view_ratio": "shareToViewRatio",
750
- });
751
- }),
752
- );
753
-
754
- export function engagementRatiosFromJSON(
755
- jsonString: string,
756
- ): SafeParseResult<EngagementRatios, SDKValidationError> {
757
- return safeParse(
758
- jsonString,
759
- (x) => EngagementRatios$inboundSchema.parse(JSON.parse(x)),
760
- `Failed to parse 'EngagementRatios' from JSON`,
761
- );
762
- }
763
-
764
- /** @internal */
765
- export const PerformanceSummaryAcrossAnalyzedVideos$inboundSchema:
766
- z.ZodMiniType<PerformanceSummaryAcrossAnalyzedVideos, unknown> = z.pipe(
767
- z.object({
768
- total_comments: types.number(),
769
- total_favorites: types.number(),
770
- total_likes: types.number(),
771
- total_shares: types.number(),
772
- total_videos_analyzed: types.number(),
773
- total_views: types.number(),
774
- }),
775
- z.transform((v) => {
776
- return remap$(v, {
777
- "total_comments": "totalComments",
778
- "total_favorites": "totalFavorites",
779
- "total_likes": "totalLikes",
780
- "total_shares": "totalShares",
781
- "total_videos_analyzed": "totalVideosAnalyzed",
782
- "total_views": "totalViews",
783
- });
784
- }),
785
- );
786
-
787
- export function performanceSummaryAcrossAnalyzedVideosFromJSON(
788
- jsonString: string,
789
- ): SafeParseResult<PerformanceSummaryAcrossAnalyzedVideos, SDKValidationError> {
790
- return safeParse(
791
- jsonString,
792
- (x) =>
793
- PerformanceSummaryAcrossAnalyzedVideos$inboundSchema.parse(JSON.parse(x)),
794
- `Failed to parse 'PerformanceSummaryAcrossAnalyzedVideos' from JSON`,
795
- );
796
- }
797
-
798
- /** @internal */
799
- export const KeyMetrics$inboundSchema: z.ZodMiniType<KeyMetrics, unknown> = z
800
- .pipe(
801
- z.object({
802
- account_statistics: z.lazy(() => AccountStatistics$inboundSchema),
803
- average_performance_per_video: z.lazy(() =>
804
- AveragePerformancePerVideo$inboundSchema
805
- ),
806
- engagement_ratios: z.lazy(() => EngagementRatios$inboundSchema),
807
- performance_summary_across_analyzed_videos: z.lazy(() =>
808
- PerformanceSummaryAcrossAnalyzedVideos$inboundSchema
809
- ),
810
- }),
811
- z.transform((v) => {
812
- return remap$(v, {
813
- "account_statistics": "accountStatistics",
814
- "average_performance_per_video": "averagePerformancePerVideo",
815
- "engagement_ratios": "engagementRatios",
816
- "performance_summary_across_analyzed_videos":
817
- "performanceSummaryAcrossAnalyzedVideos",
818
- });
819
- }),
820
- );
821
-
822
- export function keyMetricsFromJSON(
823
- jsonString: string,
824
- ): SafeParseResult<KeyMetrics, SDKValidationError> {
825
- return safeParse(
826
- jsonString,
827
- (x) => KeyMetrics$inboundSchema.parse(JSON.parse(x)),
828
- `Failed to parse 'KeyMetrics' from JSON`,
829
- );
830
- }
831
-
832
- /** @internal */
833
- export const IsPrivateAccount$inboundSchema: z.ZodMiniType<
834
- IsPrivateAccount,
835
- unknown
836
- > = openEnums.inboundSchema(IsPrivateAccount);
837
-
838
- /** @internal */
839
- export const ProfileSummary$inboundSchema: z.ZodMiniType<
840
- ProfileSummary,
841
- unknown
842
- > = z.pipe(
843
- z.object({
844
- is_private_account: IsPrivateAccount$inboundSchema,
845
- nickname: types.string(),
846
- signature: types.string(),
847
- username: types.string(),
848
- }),
849
- z.transform((v) => {
850
- return remap$(v, {
851
- "is_private_account": "isPrivateAccount",
852
- });
853
- }),
854
- );
855
-
856
- export function profileSummaryFromJSON(
857
- jsonString: string,
858
- ): SafeParseResult<ProfileSummary, SDKValidationError> {
859
- return safeParse(
860
- jsonString,
861
- (x) => ProfileSummary$inboundSchema.parse(JSON.parse(x)),
862
- `Failed to parse 'ProfileSummary' from JSON`,
863
- );
864
- }
865
-
866
- /** @internal */
867
- export const HistoricalPerformance$inboundSchema: z.ZodMiniType<
868
- HistoricalPerformance,
869
- unknown
870
- > = z.pipe(
871
- z.object({
872
- avg_comments: types.number(),
873
- avg_likes: types.number(),
874
- avg_shares: types.number(),
875
- avg_views: types.number(),
876
- engagement_rate: types.string(),
877
- }),
878
- z.transform((v) => {
879
- return remap$(v, {
880
- "avg_comments": "avgComments",
881
- "avg_likes": "avgLikes",
882
- "avg_shares": "avgShares",
883
- "avg_views": "avgViews",
884
- "engagement_rate": "engagementRate",
885
- });
886
- }),
887
- );
888
-
889
- export function historicalPerformanceFromJSON(
890
- jsonString: string,
891
- ): SafeParseResult<HistoricalPerformance, SDKValidationError> {
892
- return safeParse(
893
- jsonString,
894
- (x) => HistoricalPerformance$inboundSchema.parse(JSON.parse(x)),
895
- `Failed to parse 'HistoricalPerformance' from JSON`,
896
- );
897
- }
898
-
899
- /** @internal */
900
- export const RecentPerformance$inboundSchema: z.ZodMiniType<
901
- RecentPerformance,
902
- unknown
903
- > = z.pipe(
904
- z.object({
905
- avg_comments: types.number(),
906
- avg_likes: types.number(),
907
- avg_shares: types.number(),
908
- avg_views: types.number(),
909
- engagement_rate: types.string(),
910
- }),
911
- z.transform((v) => {
912
- return remap$(v, {
913
- "avg_comments": "avgComments",
914
- "avg_likes": "avgLikes",
915
- "avg_shares": "avgShares",
916
- "avg_views": "avgViews",
917
- "engagement_rate": "engagementRate",
918
- });
919
- }),
920
- );
921
-
922
- export function recentPerformanceFromJSON(
923
- jsonString: string,
924
- ): SafeParseResult<RecentPerformance, SDKValidationError> {
925
- return safeParse(
926
- jsonString,
927
- (x) => RecentPerformance$inboundSchema.parse(JSON.parse(x)),
928
- `Failed to parse 'RecentPerformance' from JSON`,
929
- );
930
- }
931
-
932
- /** @internal */
933
- export const DetailedMetrics$inboundSchema: z.ZodMiniType<
934
- DetailedMetrics,
935
- unknown
936
- > = z.pipe(
937
- z.object({
938
- historical_performance: z.lazy(() => HistoricalPerformance$inboundSchema),
939
- recent_performance: z.lazy(() => RecentPerformance$inboundSchema),
940
- }),
941
- z.transform((v) => {
942
- return remap$(v, {
943
- "historical_performance": "historicalPerformance",
944
- "recent_performance": "recentPerformance",
945
- });
946
- }),
947
- );
948
-
949
- export function detailedMetricsFromJSON(
950
- jsonString: string,
951
- ): SafeParseResult<DetailedMetrics, SDKValidationError> {
952
- return safeParse(
953
- jsonString,
954
- (x) => DetailedMetrics$inboundSchema.parse(JSON.parse(x)),
955
- `Failed to parse 'DetailedMetrics' from JSON`,
956
- );
957
- }
958
-
959
- /** @internal */
960
- export const ShadowBanRiskAssessmentResult$inboundSchema: z.ZodMiniType<
961
- ShadowBanRiskAssessmentResult,
962
- unknown
963
- > = z.pipe(
964
- z.object({
965
- assessment: types.string(),
966
- confidence_level: types.string(),
967
- detailed_metrics: z.lazy(() => DetailedMetrics$inboundSchema),
968
- probability_percentage: types.string(),
969
- reasoning: types.string(),
970
- }),
971
- z.transform((v) => {
972
- return remap$(v, {
973
- "confidence_level": "confidenceLevel",
974
- "detailed_metrics": "detailedMetrics",
975
- "probability_percentage": "probabilityPercentage",
976
- });
977
- }),
978
- );
979
-
980
- export function shadowBanRiskAssessmentResultFromJSON(
981
- jsonString: string,
982
- ): SafeParseResult<ShadowBanRiskAssessmentResult, SDKValidationError> {
983
- return safeParse(
984
- jsonString,
985
- (x) => ShadowBanRiskAssessmentResult$inboundSchema.parse(JSON.parse(x)),
986
- `Failed to parse 'ShadowBanRiskAssessmentResult' from JSON`,
987
- );
988
- }
989
-
990
- /** @internal */
991
- export const ShadowBanRiskAssessment$inboundSchema: z.ZodMiniType<
992
- ShadowBanRiskAssessment,
993
- unknown
994
- > = z.object({
995
- explanation: types.string(),
996
- result: z.lazy(() => ShadowBanRiskAssessmentResult$inboundSchema),
997
- });
998
-
999
- export function shadowBanRiskAssessmentFromJSON(
1000
- jsonString: string,
1001
- ): SafeParseResult<ShadowBanRiskAssessment, SDKValidationError> {
1002
- return safeParse(
1003
- jsonString,
1004
- (x) => ShadowBanRiskAssessment$inboundSchema.parse(JSON.parse(x)),
1005
- `Failed to parse 'ShadowBanRiskAssessment' from JSON`,
1006
- );
1007
- }
1008
-
1009
- /** @internal */
1010
- export const ByComment$inboundSchema: z.ZodMiniType<ByComment, unknown> = z
1011
- .pipe(
1012
- z.object({
1013
- created_date: types.string(),
1014
- description: types.string(),
1015
- engagement_rate: types.string(),
1016
- value: types.number(),
1017
- video_id: types.string(),
1018
- video_url: types.string(),
1019
- }),
1020
- z.transform((v) => {
1021
- return remap$(v, {
1022
- "created_date": "createdDate",
1023
- "engagement_rate": "engagementRate",
1024
- "video_id": "videoId",
1025
- "video_url": "videoUrl",
1026
- });
1027
- }),
1028
- );
1029
-
1030
- export function byCommentFromJSON(
1031
- jsonString: string,
1032
- ): SafeParseResult<ByComment, SDKValidationError> {
1033
- return safeParse(
1034
- jsonString,
1035
- (x) => ByComment$inboundSchema.parse(JSON.parse(x)),
1036
- `Failed to parse 'ByComment' from JSON`,
1037
- );
1038
- }
1039
-
1040
- /** @internal */
1041
- export const ByLike$inboundSchema: z.ZodMiniType<ByLike, unknown> = z.pipe(
1042
- z.object({
1043
- created_date: types.string(),
1044
- description: types.string(),
1045
- engagement_rate: types.string(),
1046
- value: types.number(),
1047
- video_id: types.string(),
1048
- video_url: types.string(),
1049
- }),
1050
- z.transform((v) => {
1051
- return remap$(v, {
1052
- "created_date": "createdDate",
1053
- "engagement_rate": "engagementRate",
1054
- "video_id": "videoId",
1055
- "video_url": "videoUrl",
1056
- });
1057
- }),
1058
- );
1059
-
1060
- export function byLikeFromJSON(
1061
- jsonString: string,
1062
- ): SafeParseResult<ByLike, SDKValidationError> {
1063
- return safeParse(
1064
- jsonString,
1065
- (x) => ByLike$inboundSchema.parse(JSON.parse(x)),
1066
- `Failed to parse 'ByLike' from JSON`,
1067
- );
1068
- }
1069
-
1070
- /** @internal */
1071
- export const ByShare$inboundSchema: z.ZodMiniType<ByShare, unknown> = z.pipe(
1072
- z.object({
1073
- created_date: types.string(),
1074
- description: types.string(),
1075
- engagement_rate: types.string(),
1076
- value: types.number(),
1077
- video_id: types.string(),
1078
- video_url: types.string(),
1079
- }),
1080
- z.transform((v) => {
1081
- return remap$(v, {
1082
- "created_date": "createdDate",
1083
- "engagement_rate": "engagementRate",
1084
- "video_id": "videoId",
1085
- "video_url": "videoUrl",
1086
- });
1087
- }),
1088
- );
1089
-
1090
- export function byShareFromJSON(
1091
- jsonString: string,
1092
- ): SafeParseResult<ByShare, SDKValidationError> {
1093
- return safeParse(
1094
- jsonString,
1095
- (x) => ByShare$inboundSchema.parse(JSON.parse(x)),
1096
- `Failed to parse 'ByShare' from JSON`,
1097
- );
1098
- }
1099
-
1100
- /** @internal */
1101
- export const ByView$inboundSchema: z.ZodMiniType<ByView, unknown> = z.pipe(
1102
- z.object({
1103
- created_date: types.string(),
1104
- description: types.string(),
1105
- engagement_rate: types.string(),
1106
- value: types.number(),
1107
- video_id: types.string(),
1108
- video_url: types.string(),
1109
- }),
1110
- z.transform((v) => {
1111
- return remap$(v, {
1112
- "created_date": "createdDate",
1113
- "engagement_rate": "engagementRate",
1114
- "video_id": "videoId",
1115
- "video_url": "videoUrl",
1116
- });
1117
- }),
1118
- );
1119
-
1120
- export function byViewFromJSON(
1121
- jsonString: string,
1122
- ): SafeParseResult<ByView, SDKValidationError> {
1123
- return safeParse(
1124
- jsonString,
1125
- (x) => ByView$inboundSchema.parse(JSON.parse(x)),
1126
- `Failed to parse 'ByView' from JSON`,
1127
- );
1128
- }
1129
-
1130
- /** @internal */
1131
- export const TopPerformingVideosSnapshot$inboundSchema: z.ZodMiniType<
1132
- TopPerformingVideosSnapshot,
1133
- unknown
1134
- > = z.pipe(
1135
- z.object({
1136
- by_comments: z.array(z.lazy(() => ByComment$inboundSchema)),
1137
- by_likes: z.array(z.lazy(() => ByLike$inboundSchema)),
1138
- by_shares: z.array(z.lazy(() => ByShare$inboundSchema)),
1139
- by_views: z.array(z.lazy(() => ByView$inboundSchema)),
1140
- }),
1141
- z.transform((v) => {
1142
- return remap$(v, {
1143
- "by_comments": "byComments",
1144
- "by_likes": "byLikes",
1145
- "by_shares": "byShares",
1146
- "by_views": "byViews",
1147
- });
1148
- }),
1149
- );
1150
-
1151
- export function topPerformingVideosSnapshotFromJSON(
1152
- jsonString: string,
1153
- ): SafeParseResult<TopPerformingVideosSnapshot, SDKValidationError> {
1154
- return safeParse(
1155
- jsonString,
1156
- (x) => TopPerformingVideosSnapshot$inboundSchema.parse(JSON.parse(x)),
1157
- `Failed to parse 'TopPerformingVideosSnapshot' from JSON`,
1158
- );
1159
- }
1160
-
1161
- /** @internal */
1162
- export const BestPerformingVideo$inboundSchema: z.ZodMiniType<
1163
- BestPerformingVideo,
1164
- unknown
1165
- > = z.pipe(
1166
- z.object({
1167
- likes: types.number(),
1168
- video_id: types.string(),
1169
- views: types.number(),
1170
- }),
1171
- z.transform((v) => {
1172
- return remap$(v, {
1173
- "video_id": "videoId",
1174
- });
1175
- }),
1176
- );
1177
-
1178
- export function bestPerformingVideoFromJSON(
1179
- jsonString: string,
1180
- ): SafeParseResult<BestPerformingVideo, SDKValidationError> {
1181
- return safeParse(
1182
- jsonString,
1183
- (x) => BestPerformingVideo$inboundSchema.parse(JSON.parse(x)),
1184
- `Failed to parse 'BestPerformingVideo' from JSON`,
1185
- );
1186
- }
1187
-
1188
- /** @internal */
1189
- export const ViralPotentialAnalysisResult$inboundSchema: z.ZodMiniType<
1190
- ViralPotentialAnalysisResult,
1191
- unknown
1192
- > = z.pipe(
1193
- z.object({
1194
- assessment: types.string(),
1195
- best_performing_video: z.lazy(() => BestPerformingVideo$inboundSchema),
1196
- factors: z.array(types.string()),
1197
- score: types.number(),
1198
- viral_videos_count: types.number(),
1199
- }),
1200
- z.transform((v) => {
1201
- return remap$(v, {
1202
- "best_performing_video": "bestPerformingVideo",
1203
- "viral_videos_count": "viralVideosCount",
1204
- });
1205
- }),
1206
- );
1207
-
1208
- export function viralPotentialAnalysisResultFromJSON(
1209
- jsonString: string,
1210
- ): SafeParseResult<ViralPotentialAnalysisResult, SDKValidationError> {
1211
- return safeParse(
1212
- jsonString,
1213
- (x) => ViralPotentialAnalysisResult$inboundSchema.parse(JSON.parse(x)),
1214
- `Failed to parse 'ViralPotentialAnalysisResult' from JSON`,
1215
- );
1216
- }
1217
-
1218
- /** @internal */
1219
- export const ViralPotentialAnalysis$inboundSchema: z.ZodMiniType<
1220
- ViralPotentialAnalysis,
1221
- unknown
1222
- > = z.object({
1223
- explanation: types.string(),
1224
- result: z.lazy(() => ViralPotentialAnalysisResult$inboundSchema),
1225
- });
1226
-
1227
- export function viralPotentialAnalysisFromJSON(
1228
- jsonString: string,
1229
- ): SafeParseResult<ViralPotentialAnalysis, SDKValidationError> {
1230
- return safeParse(
1231
- jsonString,
1232
- (x) => ViralPotentialAnalysis$inboundSchema.parse(JSON.parse(x)),
1233
- `Failed to parse 'ViralPotentialAnalysis' from JSON`,
1234
- );
1235
- }
1236
-
1237
- /** @internal */
1238
- export const SearchTiktokData2$inboundSchema: z.ZodMiniType<
1239
- SearchTiktokData2,
1240
- unknown
1241
- > = z.pipe(
1242
- z.object({
1243
- audience_and_timing_insights: z.lazy(() =>
1244
- AudienceAndTimingInsights$inboundSchema
1245
- ),
1246
- content_strategy_deep_dive: z.lazy(() =>
1247
- ContentStrategyDeepDive$inboundSchema
1248
- ),
1249
- key_metrics: z.lazy(() => KeyMetrics$inboundSchema),
1250
- profile_summary: z.lazy(() => ProfileSummary$inboundSchema),
1251
- report_generated_utc: types.string(),
1252
- shadow_ban_risk_assessment: z.lazy(() =>
1253
- ShadowBanRiskAssessment$inboundSchema
1254
- ),
1255
- top_performing_videos_snapshot: z.lazy(() =>
1256
- TopPerformingVideosSnapshot$inboundSchema
1257
- ),
1258
- viral_potential_analysis: z.lazy(() =>
1259
- ViralPotentialAnalysis$inboundSchema
1260
- ),
1261
- }),
1262
- z.transform((v) => {
1263
- return remap$(v, {
1264
- "audience_and_timing_insights": "audienceAndTimingInsights",
1265
- "content_strategy_deep_dive": "contentStrategyDeepDive",
1266
- "key_metrics": "keyMetrics",
1267
- "profile_summary": "profileSummary",
1268
- "report_generated_utc": "reportGeneratedUtc",
1269
- "shadow_ban_risk_assessment": "shadowBanRiskAssessment",
1270
- "top_performing_videos_snapshot": "topPerformingVideosSnapshot",
1271
- "viral_potential_analysis": "viralPotentialAnalysis",
1272
- });
1273
- }),
1274
- );
1275
-
1276
- export function searchTiktokData2FromJSON(
1277
- jsonString: string,
1278
- ): SafeParseResult<SearchTiktokData2, SDKValidationError> {
1279
- return safeParse(
1280
- jsonString,
1281
- (x) => SearchTiktokData2$inboundSchema.parse(JSON.parse(x)),
1282
- `Failed to parse 'SearchTiktokData2' from JSON`,
1283
- );
1284
- }
1285
-
1286
- /** @internal */
1287
- export const SearchTiktokProfile$inboundSchema: z.ZodMiniType<
1288
- SearchTiktokProfile,
1289
- unknown
1290
- > = z.pipe(
1291
- z.object({
1292
- "Account Created": types.string(),
1293
- "Avatar URL": types.string(),
1294
- "Bio Link": types.string(),
1295
- Country: types.string(),
1296
- Language: types.string(),
1297
- "Nickname Last Modified": types.string(),
1298
- Nickname: types.string(),
1299
- SecUID: types.string(),
1300
- "User ID": types.string(),
1301
- "Username Last Modified": types.string(),
1302
- Username: types.string(),
1303
- About: types.optional(types.string()),
1304
- }),
1305
- z.transform((v) => {
1306
- return remap$(v, {
1307
- "Account Created": "accountCreated",
1308
- "Avatar URL": "avatarURL",
1309
- "Bio Link": "bioLink",
1310
- "Country": "country",
1311
- "Language": "language",
1312
- "Nickname Last Modified": "nicknameLastModified",
1313
- "Nickname": "nickname",
1314
- "SecUID": "secUID",
1315
- "User ID": "userID",
1316
- "Username Last Modified": "usernameLastModified",
1317
- "Username": "username",
1318
- "About": "about",
1319
- });
1320
- }),
1321
- );
1322
-
1323
- export function searchTiktokProfileFromJSON(
1324
- jsonString: string,
1325
- ): SafeParseResult<SearchTiktokProfile, SDKValidationError> {
1326
- return safeParse(
1327
- jsonString,
1328
- (x) => SearchTiktokProfile$inboundSchema.parse(JSON.parse(x)),
1329
- `Failed to parse 'SearchTiktokProfile' from JSON`,
1330
- );
1331
- }
1332
-
1333
- /** @internal */
1334
- export const SearchTiktokStats$inboundSchema: z.ZodMiniType<
1335
- SearchTiktokStats,
1336
- unknown
1337
- > = z.object({
1338
- followers: types.string(),
1339
- following: types.string(),
1340
- friends: types.string(),
1341
- hearts: types.string(),
1342
- videos: types.string(),
1343
- });
1344
-
1345
- export function searchTiktokStatsFromJSON(
1346
- jsonString: string,
1347
- ): SafeParseResult<SearchTiktokStats, SDKValidationError> {
1348
- return safeParse(
1349
- jsonString,
1350
- (x) => SearchTiktokStats$inboundSchema.parse(JSON.parse(x)),
1351
- `Failed to parse 'SearchTiktokStats' from JSON`,
1352
- );
1353
- }
1354
-
1355
- /** @internal */
1356
- export const SearchTiktokData1$inboundSchema: z.ZodMiniType<
1357
- SearchTiktokData1,
1358
- unknown
1359
- > = z.object({
1360
- profile: types.optional(z.lazy(() => SearchTiktokProfile$inboundSchema)),
1361
- stats: types.optional(z.lazy(() => SearchTiktokStats$inboundSchema)),
1362
- });
1363
-
1364
- export function searchTiktokData1FromJSON(
1365
- jsonString: string,
1366
- ): SafeParseResult<SearchTiktokData1, SDKValidationError> {
1367
- return safeParse(
1368
- jsonString,
1369
- (x) => SearchTiktokData1$inboundSchema.parse(JSON.parse(x)),
1370
- `Failed to parse 'SearchTiktokData1' from JSON`,
1371
- );
1372
- }
1373
-
1374
- /** @internal */
1375
- export const SearchTiktokDataUnion$inboundSchema: z.ZodMiniType<
1376
- SearchTiktokDataUnion,
1377
- unknown
1378
- > = smartUnion([
1379
- z.lazy(() => SearchTiktokData2$inboundSchema),
1380
- z.lazy(() => SearchTiktokData1$inboundSchema),
1381
- ]);
1382
-
1383
- export function searchTiktokDataUnionFromJSON(
1384
- jsonString: string,
1385
- ): SafeParseResult<SearchTiktokDataUnion, SDKValidationError> {
1386
- return safeParse(
1387
- jsonString,
1388
- (x) => SearchTiktokDataUnion$inboundSchema.parse(JSON.parse(x)),
1389
- `Failed to parse 'SearchTiktokDataUnion' from JSON`,
1390
- );
1391
- }
1392
-
1393
- /** @internal */
1394
- export const SearchType$inboundSchema: z.ZodMiniType<SearchType, unknown> =
1395
- openEnums.inboundSchema(SearchType);
1396
-
1397
- /** @internal */
1398
- export const SearchTiktokData3$inboundSchema: z.ZodMiniType<
1399
- SearchTiktokData3,
1400
- unknown
1401
- > = z.object({
1402
- data: z.array(
1403
- smartUnion([
1404
- z.lazy(() => SearchTiktokData2$inboundSchema),
1405
- z.lazy(() => SearchTiktokData1$inboundSchema),
1406
- ]),
1407
- ),
1408
- searchType: SearchType$inboundSchema,
1409
- success: types.boolean(),
71
+ bio: types.optional(types.string()),
72
+ commerce: types.optional(types.boolean()),
73
+ created: types.optional(types.number()),
74
+ display: types.optional(types.string()),
75
+ error: types.optional(types.string()),
76
+ followers: types.optional(types.string()),
77
+ following: types.optional(types.string()),
78
+ friends: types.optional(types.string()),
79
+ id: types.optional(types.string()),
80
+ language: types.optional(types.string()),
81
+ likes: types.optional(types.string()),
82
+ picture: types.optional(types.string()),
83
+ private: types.optional(types.boolean()),
84
+ region: types.optional(types.string()),
85
+ ttseller: types.optional(types.boolean()),
86
+ username: types.optional(types.string()),
87
+ verified: types.optional(types.boolean()),
88
+ videos: types.optional(types.string()),
1410
89
  });
1411
90
 
1412
- export function searchTiktokData3FromJSON(
91
+ export function searchTiktokDataFromJSON(
1413
92
  jsonString: string,
1414
- ): SafeParseResult<SearchTiktokData3, SDKValidationError> {
93
+ ): SafeParseResult<SearchTiktokData, SDKValidationError> {
1415
94
  return safeParse(
1416
95
  jsonString,
1417
- (x) => SearchTiktokData3$inboundSchema.parse(JSON.parse(x)),
1418
- `Failed to parse 'SearchTiktokData3' from JSON`,
96
+ (x) => SearchTiktokData$inboundSchema.parse(JSON.parse(x)),
97
+ `Failed to parse 'SearchTiktokData' from JSON`,
1419
98
  );
1420
99
  }
1421
100
 
@@ -1424,7 +103,7 @@ export const SearchTiktokResponse$inboundSchema: z.ZodMiniType<
1424
103
  SearchTiktokResponse,
1425
104
  unknown
1426
105
  > = z.object({
1427
- data: z.lazy(() => SearchTiktokData3$inboundSchema),
106
+ data: z.lazy(() => SearchTiktokData$inboundSchema),
1428
107
  success: types.boolean(),
1429
108
  error: types.optional(types.string()),
1430
109
  });