influship 0.3.2 → 0.5.0

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 (62) hide show
  1. package/CHANGELOG.md +66 -0
  2. package/README.md +2 -2
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts.map +1 -1
  5. package/client.js +11 -0
  6. package/client.js.map +1 -1
  7. package/client.mjs +11 -0
  8. package/client.mjs.map +1 -1
  9. package/internal/types.d.mts +6 -6
  10. package/internal/types.d.mts.map +1 -1
  11. package/internal/types.d.ts +6 -6
  12. package/internal/types.d.ts.map +1 -1
  13. package/internal/utils/env.js +2 -2
  14. package/internal/utils/env.js.map +1 -1
  15. package/internal/utils/env.mjs +2 -2
  16. package/internal/utils/env.mjs.map +1 -1
  17. package/package.json +1 -1
  18. package/resources/creators.d.mts +2 -3
  19. package/resources/creators.d.mts.map +1 -1
  20. package/resources/creators.d.ts +2 -3
  21. package/resources/creators.d.ts.map +1 -1
  22. package/resources/creators.js +2 -3
  23. package/resources/creators.js.map +1 -1
  24. package/resources/creators.mjs +2 -3
  25. package/resources/creators.mjs.map +1 -1
  26. package/resources/profiles.d.mts +5 -0
  27. package/resources/profiles.d.mts.map +1 -1
  28. package/resources/profiles.d.ts +5 -0
  29. package/resources/profiles.d.ts.map +1 -1
  30. package/resources/profiles.js +5 -0
  31. package/resources/profiles.js.map +1 -1
  32. package/resources/profiles.mjs +5 -0
  33. package/resources/profiles.mjs.map +1 -1
  34. package/resources/raw/instagram.d.mts +48 -157
  35. package/resources/raw/instagram.d.mts.map +1 -1
  36. package/resources/raw/instagram.d.ts +48 -157
  37. package/resources/raw/instagram.d.ts.map +1 -1
  38. package/resources/raw/youtube.d.mts +69 -25
  39. package/resources/raw/youtube.d.mts.map +1 -1
  40. package/resources/raw/youtube.d.ts +69 -25
  41. package/resources/raw/youtube.d.ts.map +1 -1
  42. package/resources/search.d.mts +1 -2
  43. package/resources/search.d.mts.map +1 -1
  44. package/resources/search.d.ts +1 -2
  45. package/resources/search.d.ts.map +1 -1
  46. package/resources/search.js +1 -2
  47. package/resources/search.js.map +1 -1
  48. package/resources/search.mjs +1 -2
  49. package/resources/search.mjs.map +1 -1
  50. package/src/client.ts +12 -0
  51. package/src/internal/types.ts +6 -8
  52. package/src/internal/utils/env.ts +2 -2
  53. package/src/resources/creators.ts +2 -3
  54. package/src/resources/profiles.ts +5 -0
  55. package/src/resources/raw/instagram.ts +79 -179
  56. package/src/resources/raw/youtube.ts +81 -27
  57. package/src/resources/search.ts +1 -2
  58. package/src/version.ts +1 -1
  59. package/version.d.mts +1 -1
  60. package/version.d.ts +1 -1
  61. package/version.js +1 -1
  62. package/version.mjs +1 -1
@@ -34,219 +34,119 @@ export class Instagram extends APIResource {
34
34
  }
35
35
 
36
36
  export interface InstagramGetProfileResponse {
37
- /**
38
- * Live scraped profile data
39
- */
40
37
  data: InstagramGetProfileResponse.Data;
41
38
  }
42
39
 
43
40
  export namespace InstagramGetProfileResponse {
44
- /**
45
- * Live scraped profile data
46
- */
47
41
  export interface Data {
48
- /**
49
- * Profile unique identifier
50
- */
51
- id: string;
52
-
53
- activity: Data.Activity;
54
-
55
- /**
56
- * Avatar URL
57
- */
58
- avatar_url: string | null;
59
-
60
- /**
61
- * Profile bio
62
- */
63
- bio: string | null;
64
-
65
- /**
66
- * Account category
67
- */
68
- category: string | null;
69
-
70
- /**
71
- * Creator unique identifier
72
- */
73
- creator_id: string;
74
-
75
- /**
76
- * Last data refresh timestamp
77
- */
78
- data_updated_at: string | null;
79
-
80
- /**
81
- * Display name
82
- */
83
- display_name: string | null;
84
-
85
- /**
86
- * External website URL
87
- */
42
+ bio_links: Array<Data.BioLink>;
43
+
44
+ biography: string;
45
+
46
+ category_name: string | null;
47
+
48
+ engagement_rate: number;
49
+
88
50
  external_url: string | null;
89
51
 
90
- growth: Data.Growth;
52
+ follower_count: number;
53
+
54
+ following_count: number;
55
+
56
+ full_name: string;
57
+
58
+ highlight_reel_count: number;
91
59
 
92
- /**
93
- * Whether this is a business account
94
- */
95
60
  is_business: boolean;
96
61
 
97
- /**
98
- * Whether the account is private
99
- */
100
62
  is_private: boolean;
101
63
 
102
- /**
103
- * Whether the account is verified
104
- */
64
+ is_professional: boolean;
65
+
105
66
  is_verified: boolean;
106
67
 
107
- metrics: Data.Metrics;
68
+ media_count: number;
69
+
70
+ posts: Array<Data.Post>;
71
+
72
+ profile_pic_url: string;
108
73
 
109
- /**
110
- * Social media platform
111
- */
112
- platform: 'instagram';
74
+ pronouns: Array<string>;
113
75
 
114
- /**
115
- * Listed pronouns
116
- */
117
- pronouns: Array<string> | null;
76
+ related_profiles: Array<Data.RelatedProfile>;
118
77
 
119
- /**
120
- * When this data was scraped
121
- */
122
78
  scraped_at: string;
123
79
 
124
- /**
125
- * Profile URL
126
- */
127
- url: string;
80
+ user_id: string;
128
81
 
129
- /**
130
- * Profile username
131
- */
132
82
  username: string;
133
83
 
134
- /**
135
- * Recent posts (only included when include_posts=true)
136
- */
137
- posts?: Array<Data.Post>;
84
+ profile_pic_url_hd?: string;
138
85
  }
139
86
 
140
87
  export namespace Data {
141
- export interface Activity {
142
- /**
143
- * Timestamp of last post
144
- */
145
- last_post_at: string | null;
146
- }
88
+ export interface BioLink {
89
+ title: string;
147
90
 
148
- export interface Growth {
149
- /**
150
- * Follower growth percentage over 30 days (e.g. 2.5 means +2.5%)
151
- */
152
- followers_30d_pct: number;
153
- }
91
+ url: string;
154
92
 
155
- export interface Metrics {
156
- /**
157
- * Average comments on recent posts
158
- */
159
- avg_comments_recent: number;
160
-
161
- /**
162
- * Average likes on recent posts
163
- */
164
- avg_likes_recent: number;
165
-
166
- /**
167
- * Average views on recent posts
168
- */
169
- avg_views_recent: number | null;
170
-
171
- /**
172
- * Engagement rate as a percentage (e.g. 3.5 means 3.5%)
173
- */
174
- engagement_rate: number;
175
-
176
- /**
177
- * Follower count
178
- */
179
- followers: number;
180
-
181
- /**
182
- * Following count
183
- */
184
- following: number;
185
-
186
- /**
187
- * Total post count
188
- */
189
- posts: number;
190
-
191
- /**
192
- * Posts in the last 30 days
193
- */
194
- posts_last_30d: number;
195
-
196
- /**
197
- * Average posts per week
198
- */
199
- posts_per_week: number;
93
+ link_type?: string;
200
94
  }
201
95
 
202
- /**
203
- * Simplified post from live scrape
204
- */
205
96
  export interface Post {
206
- /**
207
- * Post unique identifier
208
- */
209
97
  id: string;
210
98
 
211
- /**
212
- * Post caption
213
- */
214
99
  caption: string | null;
215
100
 
216
- /**
217
- * Comment count
218
- */
219
- comments_count: number | null;
220
-
221
- /**
222
- * Like count
223
- */
224
- likes_count: number | null;
225
-
226
- /**
227
- * Primary media URL
228
- */
229
- media_url: string | null;
230
-
231
- /**
232
- * Platform-specific post ID
233
- */
234
- platform_id: string;
235
-
236
- /**
237
- * Post timestamp
238
- */
239
- posted_at: string;
240
-
241
- /**
242
- * Type of post
243
- */
244
- type: 'image' | 'video' | 'carousel' | 'reel' | 'story';
245
-
246
- /**
247
- * Post URL
248
- */
249
- url: string;
101
+ comment_count: number;
102
+
103
+ display_url: string;
104
+
105
+ is_video: boolean;
106
+
107
+ like_count: number;
108
+
109
+ post_type: 'image' | 'video' | 'carousel';
110
+
111
+ shortcode: string;
112
+
113
+ taken_at: number | null;
114
+
115
+ accessibility_caption?: string | null;
116
+
117
+ carousel_items?: Array<Post.CarouselItem>;
118
+
119
+ thumbnail_url?: string;
120
+
121
+ video_url?: string;
122
+
123
+ view_count?: number;
124
+ }
125
+
126
+ export namespace Post {
127
+ export interface CarouselItem {
128
+ display_url: string;
129
+
130
+ index: number;
131
+
132
+ is_video: boolean;
133
+
134
+ thumbnail_url?: string;
135
+
136
+ video_url?: string;
137
+ }
138
+ }
139
+
140
+ export interface RelatedProfile {
141
+ full_name: string | null;
142
+
143
+ is_private: boolean;
144
+
145
+ is_verified: boolean;
146
+
147
+ profile_pic_url: string | null;
148
+
149
+ username: string;
250
150
  }
251
151
  }
252
152
  }
@@ -103,15 +103,35 @@ export namespace YoutubeGetChannelResponse {
103
103
  */
104
104
  avatar_url: string | null;
105
105
 
106
+ /**
107
+ * Channel banner image URL
108
+ */
109
+ banner_url: string | null;
110
+
111
+ /**
112
+ * YouTube channel ID
113
+ */
114
+ channel_id: string;
115
+
116
+ /**
117
+ * Channel country code
118
+ */
119
+ country: string | null;
120
+
106
121
  /**
107
122
  * Channel description
108
123
  */
109
- description: string | null;
124
+ description: string;
110
125
 
111
126
  /**
112
- * Channel handle
127
+ * Channel handle (without @)
113
128
  */
114
- handle: string;
129
+ handle: string | null;
130
+
131
+ /**
132
+ * Channel keywords / tags
133
+ */
134
+ keywords: Array<string>;
115
135
 
116
136
  /**
117
137
  * Channel name
@@ -126,50 +146,45 @@ export namespace YoutubeGetChannelResponse {
126
146
  /**
127
147
  * Subscriber count
128
148
  */
129
- subscribers: number;
149
+ subscribers: number | null;
130
150
 
131
151
  /**
132
- * Total video count
152
+ * Subscriber count text as displayed by YouTube
153
+ */
154
+ subscribers_text: string | null;
155
+
156
+ /**
157
+ * Recent videos (empty when include_videos=false)
133
158
  */
134
- videos_count: number;
159
+ videos: Array<Data.Video>;
135
160
 
136
161
  /**
137
- * Total view count
162
+ * Total video count
138
163
  */
139
- views_total: number;
164
+ videos_count: number | null;
140
165
 
141
166
  /**
142
- * Recent videos (only included when include_videos=true)
167
+ * Total view count across all videos
143
168
  */
144
- videos?: Array<Data.Video>;
169
+ views_total: number | null;
145
170
  }
146
171
 
147
172
  export namespace Data {
148
173
  export interface Video {
149
- /**
150
- * Video ID
151
- */
152
- id: string;
153
-
154
- /**
155
- * Comment count
156
- */
157
- comments: number | null;
158
-
159
174
  /**
160
175
  * Video duration in seconds
161
176
  */
162
177
  duration_seconds: number | null;
163
178
 
164
179
  /**
165
- * Like count
180
+ * Video duration text (e.g., "30:45")
166
181
  */
167
- likes: number | null;
182
+ duration_text: string | null;
168
183
 
169
184
  /**
170
- * Publish timestamp
185
+ * Relative publish time as displayed by YouTube
171
186
  */
172
- published_at: string;
187
+ published_text: string | null;
173
188
 
174
189
  /**
175
190
  * Thumbnail URL
@@ -186,10 +201,20 @@ export namespace YoutubeGetChannelResponse {
186
201
  */
187
202
  url: string;
188
203
 
204
+ /**
205
+ * YouTube video ID
206
+ */
207
+ video_id: string;
208
+
189
209
  /**
190
210
  * View count
191
211
  */
192
- views: number | null;
212
+ view_count: number | null;
213
+
214
+ /**
215
+ * View count text as displayed by YouTube
216
+ */
217
+ view_count_text: string | null;
193
218
  }
194
219
  }
195
220
  }
@@ -308,9 +333,9 @@ export interface YoutubeGetTranscriptResponse {
308
333
  export namespace YoutubeGetTranscriptResponse {
309
334
  export interface Data {
310
335
  /**
311
- * Available transcript languages
336
+ * All caption tracks available on this video
312
337
  */
313
- available_languages: Array<string>;
338
+ available_languages: Array<Data.AvailableLanguage>;
314
339
 
315
340
  /**
316
341
  * Full transcript as plain text
@@ -322,6 +347,16 @@ export namespace YoutubeGetTranscriptResponse {
322
347
  */
323
348
  language: string;
324
349
 
350
+ /**
351
+ * When this data was scraped
352
+ */
353
+ scraped_at: string;
354
+
355
+ /**
356
+ * Caption source — manual subtitles or auto-generated
357
+ */
358
+ source: 'manual' | 'auto_generated';
359
+
325
360
  /**
326
361
  * Video title
327
362
  */
@@ -347,6 +382,25 @@ export namespace YoutubeGetTranscriptResponse {
347
382
  */
348
383
  word_count: number;
349
384
  }
385
+
386
+ export namespace Data {
387
+ export interface AvailableLanguage {
388
+ /**
389
+ * Language code (e.g., "en", "es", "en-orig")
390
+ */
391
+ code: string;
392
+
393
+ /**
394
+ * Whether this track is auto-generated
395
+ */
396
+ is_auto: boolean;
397
+
398
+ /**
399
+ * Human-readable language name
400
+ */
401
+ name: string;
402
+ }
403
+ }
350
404
  }
351
405
 
352
406
  export interface YoutubeSearchResponse {
@@ -32,8 +32,7 @@ export class Search extends APIResource {
32
32
  * @example
33
33
  * ```ts
34
34
  * const search = await client.search.create({
35
- * query:
36
- * 'fitness influencers with 100k+ followers who post workout videos',
35
+ * query: 'fitness influencers who post workout videos',
37
36
  * });
38
37
  * ```
39
38
  */
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.3.2'; // x-release-please-version
1
+ export const VERSION = '0.5.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.3.2";
1
+ export declare const VERSION = "0.5.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.3.2";
1
+ export declare const VERSION = "0.5.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '0.3.2'; // x-release-please-version
4
+ exports.VERSION = '0.5.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.3.2'; // x-release-please-version
1
+ export const VERSION = '0.5.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map