@xpoz/xpoz 0.4.0 → 0.4.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.
package/README.md CHANGED
@@ -714,15 +714,20 @@ All fields are optional and typed as their respective TypeScript types. Unknown
714
714
  | `hashtags` | `string[]` | Hashtags in tweet |
715
715
  | `mentions` | `string[]` | Mentioned usernames |
716
716
  | `mediaUrls` | `string[]` | Media attachment URLs |
717
- | `urls` | `string[]` | URLs in tweet |
717
+ | `urls` | `string[]` | URLs in tweet text |
718
718
  | `country` | `string` | Country (if geo-tagged) |
719
719
  | `createdAt` | `string` | Creation timestamp |
720
720
  | `createdAtDate` | `string` | Creation date (YYYY-MM-DD) |
721
721
  | `conversationId` | `string` | Thread conversation ID |
722
722
  | `quotedTweetId` | `string` | ID of quoted tweet |
723
723
  | `replyToTweetId` | `string` | ID of parent tweet |
724
- | `isRetweet` | `boolean` | Whether this is a retweet |
725
724
  | `possiblySensitive` | `boolean` | Sensitive content flag |
725
+ | `isRetweet` | `boolean` | Whether this is a retweet |
726
+ | `hasBirdwatchNotes` | `boolean` | Has community notes |
727
+ | `birdwatchNotesId` | `string` | Birdwatch note ID |
728
+ | `birdwatchNotesText`| `string` | Birdwatch note text |
729
+ | `birdwatchNotesUrl` | `string` | Birdwatch note URL |
730
+ | `status` | `string` | Tweet status |
726
731
 
727
732
  ### TwitterUser
728
733
 
@@ -742,9 +747,6 @@ All fields are optional and typed as their respective TypeScript types. Unknown
742
747
  | `profileImageUrl` | `string` | Profile picture URL |
743
748
  | `createdAt` | `string` | Account creation timestamp |
744
749
  | `accountBasedIn` | `string` | Account location |
745
- | `isInauthentic` | `boolean` | Inauthenticity flag |
746
- | `isInauthenticProbScore` | `number` | Inauthenticity probability |
747
- | `avgTweetsPerDayLastMonth` | `number` | Tweeting frequency |
748
750
 
749
751
  ### InstagramPost
750
752
 
@@ -760,8 +762,10 @@ All fields are optional and typed as their respective TypeScript types. Unknown
760
762
  | `videoPlayCount` | `number` | Video play count |
761
763
  | `mediaType` | `string` | Media type |
762
764
  | `imageUrl` | `string` | Image URL |
763
- | `videoUrl` | `string` | Video URL |
764
- | `createdAtDate` | `string` | Creation date |
765
+ | `videoUrl` | `string` | Video URL |
766
+ | `createdAtDate` | `string` | Creation date |
767
+ | `genAiChatWithAiCtaInfo` | `string` | Gen AI chat CTA info |
768
+ | `hasHighRiskGenAiInformTreatment` | `boolean` | High risk Gen AI treatment flag |
765
769
 
766
770
  ### InstagramUser
767
771
 
package/dist/index.cjs CHANGED
@@ -296,7 +296,7 @@ function coerce(value) {
296
296
  }
297
297
 
298
298
  // src/version.ts
299
- var VERSION = "0.4.0";
299
+ var VERSION = "0.4.1";
300
300
 
301
301
  // src/mcp/transport.ts
302
302
  var USER_AGENT = `xpoz-ts-sdk/${VERSION}`;
@@ -540,7 +540,7 @@ var BaseNamespace = class {
540
540
  String(result["error"] ?? "Unknown error")
541
541
  );
542
542
  }
543
- if (result["status"] === "success" || "results" in result) {
543
+ if (result["status"] === "success" || result["status"] === "no_data" || "results" in result) {
544
544
  return result;
545
545
  }
546
546
  const operationId = result["operationId"];
package/dist/index.d.cts CHANGED
@@ -53,11 +53,15 @@ interface TwitterPost {
53
53
  conversationId?: string | null;
54
54
  lang?: string | null;
55
55
  source?: string | null;
56
- status?: string | null;
57
56
  deleted?: boolean | null;
58
57
  suspended?: boolean | null;
59
58
  possiblySensitive?: boolean | null;
60
59
  isRetweet?: boolean | null;
60
+ hasBirdwatchNotes?: boolean | null;
61
+ birdwatchNotesId?: string | null;
62
+ birdwatchNotesText?: string | null;
63
+ birdwatchNotesUrl?: string | null;
64
+ status?: string | null;
61
65
  likeCount?: number | null;
62
66
  retweetCount?: number | null;
63
67
  replyCount?: number | null;
@@ -71,22 +75,16 @@ interface TwitterPost {
71
75
  replyToUsername?: string | null;
72
76
  originalTweetId?: string | null;
73
77
  editedTweets?: string[] | null;
74
- replySettings?: string | null;
75
78
  hashtags?: string[] | null;
76
79
  mentions?: string[] | null;
77
80
  mediaUrls?: string[] | null;
78
- grokGeneratedContent?: Record<string, unknown>[] | null;
79
81
  urls?: string[] | null;
82
+ grokGeneratedContent?: Record<string, unknown>[] | null;
80
83
  country?: string | null;
81
84
  region?: string | null;
82
85
  city?: string | null;
83
- hasBirdwatchNotes?: boolean | null;
84
- birdwatchNotesId?: string | null;
85
- birdwatchNotesText?: string | null;
86
- birdwatchNotesUrl?: string | null;
87
86
  createdAt?: string | null;
88
87
  createdAtDate?: string | null;
89
- xFetchedAt?: string | null;
90
88
  [key: string]: unknown;
91
89
  }
92
90
  interface TwitterUser {
@@ -115,25 +113,13 @@ interface TwitterUser {
115
113
  locationAccurate?: boolean | null;
116
114
  label?: string | null;
117
115
  labelType?: string | null;
118
- collectedFollowingCount?: number | null;
119
- collectedFollowersCount?: number | null;
120
- collectedFollowersCoverage?: number | null;
121
- collectedFollowingCoverage?: number | null;
122
- avgTweetsPerDayLastMonth?: number | null;
123
116
  nLang?: number | null;
124
117
  nLangsFiltered?: number | null;
125
- inauthenticType?: string | null;
126
- isInauthentic?: boolean | null;
127
- isInauthenticProbScore?: number | null;
128
- isInauthenticCalculatedAt?: string | null;
129
118
  verifiedSinceDatetime?: string | null;
130
119
  usernameChanges?: string[] | null;
131
120
  lastUsernameChangeDatetime?: string | null;
132
121
  createdAt?: string | null;
133
- createdAtDate?: string | null;
134
- xFetchedAt?: string | null;
135
122
  modifiedAt?: string | null;
136
- xModifiedAt?: string | null;
137
123
  aggRelevance?: number | null;
138
124
  relevantTweetsCount?: number | null;
139
125
  relevantTweetsImpressionsSum?: number | null;
@@ -246,12 +232,11 @@ interface InstagramPost {
246
232
  reshareCount?: number | null;
247
233
  videoPlayCount?: number | null;
248
234
  location?: string | null;
235
+ genAiChatWithAiCtaInfo?: string | null;
236
+ hasHighRiskGenAiInformTreatment?: boolean | null;
249
237
  createdAt?: string | null;
250
238
  createdAtTimestamp?: number | null;
251
239
  createdAtDate?: string | null;
252
- lastFetch?: string | null;
253
- lastFetchDatetime?: string | null;
254
- xLastUpdated?: string | null;
255
240
  [key: string]: unknown;
256
241
  }
257
242
  interface InstagramUser {
@@ -269,9 +254,6 @@ interface InstagramUser {
269
254
  profileUrl?: string | null;
270
255
  externalUrl?: string | null;
271
256
  hasAnonymousProfilePicture?: boolean | null;
272
- lastFetch?: string | null;
273
- lastFetchDatetime?: string | null;
274
- xLastUpdated?: string | null;
275
257
  aggRelevance?: number | null;
276
258
  relevantPostsCount?: number | null;
277
259
  relevantPostsLikesSum?: number | null;
@@ -299,9 +281,6 @@ interface InstagramComment {
299
281
  createdAt?: string | null;
300
282
  createdAtTimestamp?: number | null;
301
283
  createdAtDate?: string | null;
302
- lastFetch?: string | null;
303
- lastFetchDatetime?: string | null;
304
- xLastUpdated?: string | null;
305
284
  [key: string]: unknown;
306
285
  }
307
286
 
@@ -392,9 +371,6 @@ interface RedditPost {
392
371
  createdAt?: string | null;
393
372
  createdAtTimestamp?: number | null;
394
373
  createdAtDate?: string | null;
395
- lastFetch?: string | null;
396
- lastFetchDatetime?: string | null;
397
- xLastUpdated?: string | null;
398
374
  [key: string]: unknown;
399
375
  }
400
376
  interface RedditUser {
@@ -425,9 +401,6 @@ interface RedditUser {
425
401
  createdAt?: string | null;
426
402
  createdAtTimestamp?: number | null;
427
403
  createdAtDate?: string | null;
428
- lastFetch?: string | null;
429
- lastFetchDatetime?: string | null;
430
- xLastUpdated?: string | null;
431
404
  aggRelevance?: number | null;
432
405
  relevantPostsCount?: number | null;
433
406
  relevantPostsUpvotesSum?: number | null;
@@ -456,9 +429,6 @@ interface RedditComment {
456
429
  createdAt?: string | null;
457
430
  createdAtTimestamp?: number | null;
458
431
  createdAtDate?: string | null;
459
- lastFetch?: string | null;
460
- lastFetchDatetime?: string | null;
461
- xLastUpdated?: string | null;
462
432
  [key: string]: unknown;
463
433
  }
464
434
  interface RedditSubreddit {
@@ -481,9 +451,6 @@ interface RedditSubreddit {
481
451
  createdAt?: string | null;
482
452
  createdAtTimestamp?: number | null;
483
453
  createdAtDate?: string | null;
484
- lastFetch?: string | null;
485
- lastFetchDatetime?: string | null;
486
- xLastUpdated?: string | null;
487
454
  aggRelevance?: number | null;
488
455
  relevantPostsCount?: number | null;
489
456
  relevantPostsUpvotesSum?: number | null;
@@ -578,15 +545,6 @@ interface TiktokPost {
578
545
  createdAt?: string | null;
579
546
  createdAtTimestamp?: number | null;
580
547
  createdAtDate?: string | null;
581
- lastFetch?: string | null;
582
- lastFetchDatetime?: string | null;
583
- xLastUpdated?: string | null;
584
- aggRelevance?: number | null;
585
- relevantPostsCount?: number | null;
586
- relevantPostsLikesSum?: number | null;
587
- relevantPostsCommentsSum?: number | null;
588
- relevantPostsPlaysSum?: number | null;
589
- relevantPostsForwardsSum?: number | null;
590
548
  [key: string]: unknown;
591
549
  }
592
550
  interface TiktokUser {
@@ -606,9 +564,6 @@ interface TiktokUser {
606
564
  region?: string | null;
607
565
  createdAt?: string | null;
608
566
  usernameModifyTime?: string | null;
609
- lastFetch?: string | null;
610
- lastFetchDatetime?: string | null;
611
- xLastUpdated?: string | null;
612
567
  aggRelevance?: number | null;
613
568
  relevantPostsCount?: number | null;
614
569
  relevantPostsLikesSum?: number | null;
@@ -627,9 +582,6 @@ interface TiktokComment {
627
582
  createdAt?: string | null;
628
583
  createdAtTimestamp?: number | null;
629
584
  createdAtDate?: string | null;
630
- lastFetch?: string | null;
631
- lastFetchDatetime?: string | null;
632
- xLastUpdated?: string | null;
633
585
  [key: string]: unknown;
634
586
  }
635
587
 
@@ -758,7 +710,7 @@ declare class OperationCancelledError extends XpozError {
758
710
  constructor(operationId: string);
759
711
  }
760
712
 
761
- declare const VERSION = "0.4.0";
713
+ declare const VERSION = "0.4.1";
762
714
 
763
715
  declare function checkForUpdates(): Promise<void>;
764
716
 
package/dist/index.d.ts CHANGED
@@ -53,11 +53,15 @@ interface TwitterPost {
53
53
  conversationId?: string | null;
54
54
  lang?: string | null;
55
55
  source?: string | null;
56
- status?: string | null;
57
56
  deleted?: boolean | null;
58
57
  suspended?: boolean | null;
59
58
  possiblySensitive?: boolean | null;
60
59
  isRetweet?: boolean | null;
60
+ hasBirdwatchNotes?: boolean | null;
61
+ birdwatchNotesId?: string | null;
62
+ birdwatchNotesText?: string | null;
63
+ birdwatchNotesUrl?: string | null;
64
+ status?: string | null;
61
65
  likeCount?: number | null;
62
66
  retweetCount?: number | null;
63
67
  replyCount?: number | null;
@@ -71,22 +75,16 @@ interface TwitterPost {
71
75
  replyToUsername?: string | null;
72
76
  originalTweetId?: string | null;
73
77
  editedTweets?: string[] | null;
74
- replySettings?: string | null;
75
78
  hashtags?: string[] | null;
76
79
  mentions?: string[] | null;
77
80
  mediaUrls?: string[] | null;
78
- grokGeneratedContent?: Record<string, unknown>[] | null;
79
81
  urls?: string[] | null;
82
+ grokGeneratedContent?: Record<string, unknown>[] | null;
80
83
  country?: string | null;
81
84
  region?: string | null;
82
85
  city?: string | null;
83
- hasBirdwatchNotes?: boolean | null;
84
- birdwatchNotesId?: string | null;
85
- birdwatchNotesText?: string | null;
86
- birdwatchNotesUrl?: string | null;
87
86
  createdAt?: string | null;
88
87
  createdAtDate?: string | null;
89
- xFetchedAt?: string | null;
90
88
  [key: string]: unknown;
91
89
  }
92
90
  interface TwitterUser {
@@ -115,25 +113,13 @@ interface TwitterUser {
115
113
  locationAccurate?: boolean | null;
116
114
  label?: string | null;
117
115
  labelType?: string | null;
118
- collectedFollowingCount?: number | null;
119
- collectedFollowersCount?: number | null;
120
- collectedFollowersCoverage?: number | null;
121
- collectedFollowingCoverage?: number | null;
122
- avgTweetsPerDayLastMonth?: number | null;
123
116
  nLang?: number | null;
124
117
  nLangsFiltered?: number | null;
125
- inauthenticType?: string | null;
126
- isInauthentic?: boolean | null;
127
- isInauthenticProbScore?: number | null;
128
- isInauthenticCalculatedAt?: string | null;
129
118
  verifiedSinceDatetime?: string | null;
130
119
  usernameChanges?: string[] | null;
131
120
  lastUsernameChangeDatetime?: string | null;
132
121
  createdAt?: string | null;
133
- createdAtDate?: string | null;
134
- xFetchedAt?: string | null;
135
122
  modifiedAt?: string | null;
136
- xModifiedAt?: string | null;
137
123
  aggRelevance?: number | null;
138
124
  relevantTweetsCount?: number | null;
139
125
  relevantTweetsImpressionsSum?: number | null;
@@ -246,12 +232,11 @@ interface InstagramPost {
246
232
  reshareCount?: number | null;
247
233
  videoPlayCount?: number | null;
248
234
  location?: string | null;
235
+ genAiChatWithAiCtaInfo?: string | null;
236
+ hasHighRiskGenAiInformTreatment?: boolean | null;
249
237
  createdAt?: string | null;
250
238
  createdAtTimestamp?: number | null;
251
239
  createdAtDate?: string | null;
252
- lastFetch?: string | null;
253
- lastFetchDatetime?: string | null;
254
- xLastUpdated?: string | null;
255
240
  [key: string]: unknown;
256
241
  }
257
242
  interface InstagramUser {
@@ -269,9 +254,6 @@ interface InstagramUser {
269
254
  profileUrl?: string | null;
270
255
  externalUrl?: string | null;
271
256
  hasAnonymousProfilePicture?: boolean | null;
272
- lastFetch?: string | null;
273
- lastFetchDatetime?: string | null;
274
- xLastUpdated?: string | null;
275
257
  aggRelevance?: number | null;
276
258
  relevantPostsCount?: number | null;
277
259
  relevantPostsLikesSum?: number | null;
@@ -299,9 +281,6 @@ interface InstagramComment {
299
281
  createdAt?: string | null;
300
282
  createdAtTimestamp?: number | null;
301
283
  createdAtDate?: string | null;
302
- lastFetch?: string | null;
303
- lastFetchDatetime?: string | null;
304
- xLastUpdated?: string | null;
305
284
  [key: string]: unknown;
306
285
  }
307
286
 
@@ -392,9 +371,6 @@ interface RedditPost {
392
371
  createdAt?: string | null;
393
372
  createdAtTimestamp?: number | null;
394
373
  createdAtDate?: string | null;
395
- lastFetch?: string | null;
396
- lastFetchDatetime?: string | null;
397
- xLastUpdated?: string | null;
398
374
  [key: string]: unknown;
399
375
  }
400
376
  interface RedditUser {
@@ -425,9 +401,6 @@ interface RedditUser {
425
401
  createdAt?: string | null;
426
402
  createdAtTimestamp?: number | null;
427
403
  createdAtDate?: string | null;
428
- lastFetch?: string | null;
429
- lastFetchDatetime?: string | null;
430
- xLastUpdated?: string | null;
431
404
  aggRelevance?: number | null;
432
405
  relevantPostsCount?: number | null;
433
406
  relevantPostsUpvotesSum?: number | null;
@@ -456,9 +429,6 @@ interface RedditComment {
456
429
  createdAt?: string | null;
457
430
  createdAtTimestamp?: number | null;
458
431
  createdAtDate?: string | null;
459
- lastFetch?: string | null;
460
- lastFetchDatetime?: string | null;
461
- xLastUpdated?: string | null;
462
432
  [key: string]: unknown;
463
433
  }
464
434
  interface RedditSubreddit {
@@ -481,9 +451,6 @@ interface RedditSubreddit {
481
451
  createdAt?: string | null;
482
452
  createdAtTimestamp?: number | null;
483
453
  createdAtDate?: string | null;
484
- lastFetch?: string | null;
485
- lastFetchDatetime?: string | null;
486
- xLastUpdated?: string | null;
487
454
  aggRelevance?: number | null;
488
455
  relevantPostsCount?: number | null;
489
456
  relevantPostsUpvotesSum?: number | null;
@@ -578,15 +545,6 @@ interface TiktokPost {
578
545
  createdAt?: string | null;
579
546
  createdAtTimestamp?: number | null;
580
547
  createdAtDate?: string | null;
581
- lastFetch?: string | null;
582
- lastFetchDatetime?: string | null;
583
- xLastUpdated?: string | null;
584
- aggRelevance?: number | null;
585
- relevantPostsCount?: number | null;
586
- relevantPostsLikesSum?: number | null;
587
- relevantPostsCommentsSum?: number | null;
588
- relevantPostsPlaysSum?: number | null;
589
- relevantPostsForwardsSum?: number | null;
590
548
  [key: string]: unknown;
591
549
  }
592
550
  interface TiktokUser {
@@ -606,9 +564,6 @@ interface TiktokUser {
606
564
  region?: string | null;
607
565
  createdAt?: string | null;
608
566
  usernameModifyTime?: string | null;
609
- lastFetch?: string | null;
610
- lastFetchDatetime?: string | null;
611
- xLastUpdated?: string | null;
612
567
  aggRelevance?: number | null;
613
568
  relevantPostsCount?: number | null;
614
569
  relevantPostsLikesSum?: number | null;
@@ -627,9 +582,6 @@ interface TiktokComment {
627
582
  createdAt?: string | null;
628
583
  createdAtTimestamp?: number | null;
629
584
  createdAtDate?: string | null;
630
- lastFetch?: string | null;
631
- lastFetchDatetime?: string | null;
632
- xLastUpdated?: string | null;
633
585
  [key: string]: unknown;
634
586
  }
635
587
 
@@ -758,7 +710,7 @@ declare class OperationCancelledError extends XpozError {
758
710
  constructor(operationId: string);
759
711
  }
760
712
 
761
- declare const VERSION = "0.4.0";
713
+ declare const VERSION = "0.4.1";
762
714
 
763
715
  declare function checkForUpdates(): Promise<void>;
764
716
 
package/dist/index.js CHANGED
@@ -248,7 +248,7 @@ function coerce(value) {
248
248
  }
249
249
 
250
250
  // src/version.ts
251
- var VERSION = "0.4.0";
251
+ var VERSION = "0.4.1";
252
252
 
253
253
  // src/mcp/transport.ts
254
254
  var USER_AGENT = `xpoz-ts-sdk/${VERSION}`;
@@ -492,7 +492,7 @@ var BaseNamespace = class {
492
492
  String(result["error"] ?? "Unknown error")
493
493
  );
494
494
  }
495
- if (result["status"] === "success" || "results" in result) {
495
+ if (result["status"] === "success" || result["status"] === "no_data" || "results" in result) {
496
496
  return result;
497
497
  }
498
498
  const operationId = result["operationId"];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xpoz/xpoz",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "TypeScript SDK for the Xpoz social media intelligence platform",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -18,6 +18,8 @@
18
18
  ],
19
19
  "scripts": {
20
20
  "build": "tsup src/index.ts --format cjs,esm --dts --clean",
21
+ "build:scripts": "tsup src/scripts/generate-expectations.ts --format esm --out-dir dist/scripts",
22
+ "generate-expectations": "node dist/scripts/generate-expectations.js",
21
23
  "typecheck": "tsc --noEmit",
22
24
  "test": "vitest run",
23
25
  "prepublishOnly": "npm run build"