@xpoz/xpoz 0.3.1 → 0.3.2

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/dist/index.cjs CHANGED
@@ -36,6 +36,8 @@ __export(index_exports, {
36
36
  OperationTimeoutError: () => OperationTimeoutError,
37
37
  PaginatedResult: () => PaginatedResult,
38
38
  ResponseType: () => ResponseType,
39
+ TrackedItemPlatform: () => TrackedItemPlatform,
40
+ TrackedItemType: () => TrackedItemType,
39
41
  VERSION: () => VERSION,
40
42
  XpozClient: () => XpozClient,
41
43
  XpozConnectionError: () => XpozConnectionError,
@@ -294,7 +296,7 @@ function coerce(value) {
294
296
  }
295
297
 
296
298
  // src/version.ts
297
- var VERSION = "0.3.1";
299
+ var VERSION = "0.3.2";
298
300
 
299
301
  // src/mcp/transport.ts
300
302
  var USER_AGENT = `xpoz-ts-sdk/${VERSION}`;
@@ -625,6 +627,9 @@ var GET_TIKTOK_COMMENTS = "getTiktokCommentsByPostId";
625
627
  var GET_TIKTOK_USER = "getTiktokUser";
626
628
  var SEARCH_TIKTOK_USERS = "searchTiktokUsers";
627
629
  var GET_TIKTOK_USERS_BY_KEYWORDS = "getTiktokUsersByKeywords";
630
+ var GET_TRACKED_ITEMS = "getTrackedItems";
631
+ var ADD_TRACKED_ITEMS = "addTrackedItems";
632
+ var REMOVE_TRACKED_ITEMS = "removeTrackedItems";
628
633
 
629
634
  // src/namespaces/twitter.ts
630
635
  function parseTwitterPost(item) {
@@ -1118,6 +1123,24 @@ var TiktokNamespace = class extends BaseNamespace {
1118
1123
  }
1119
1124
  };
1120
1125
 
1126
+ // src/namespaces/tracking.ts
1127
+ var TrackingNamespace = class extends BaseNamespace {
1128
+ async getTrackedItems() {
1129
+ const result = await this.callTool(GET_TRACKED_ITEMS, {});
1130
+ return result["data"] ?? [];
1131
+ }
1132
+ async addTrackedItems(items) {
1133
+ const args = this.buildArgs({ items });
1134
+ const result = await this.callTool(ADD_TRACKED_ITEMS, args);
1135
+ return result;
1136
+ }
1137
+ async removeTrackedItems(items) {
1138
+ const args = this.buildArgs({ items });
1139
+ const result = await this.callTool(REMOVE_TRACKED_ITEMS, args);
1140
+ return result;
1141
+ }
1142
+ };
1143
+
1121
1144
  // src/versionCheck.ts
1122
1145
  var NPM_REGISTRY_URL = "https://registry.npmjs.org/@xpoz/xpoz/latest";
1123
1146
  var CHECK_TIMEOUT_MS = 3e3;
@@ -1164,6 +1187,7 @@ var XpozClient = class {
1164
1187
  instagram;
1165
1188
  reddit;
1166
1189
  tiktok;
1190
+ tracking;
1167
1191
  transport;
1168
1192
  versionCheck;
1169
1193
  constructor(options = {}) {
@@ -1182,6 +1206,7 @@ var XpozClient = class {
1182
1206
  this.instagram = new InstagramNamespace(callTool, timeoutMs);
1183
1207
  this.reddit = new RedditNamespace(callTool, timeoutMs);
1184
1208
  this.tiktok = new TiktokNamespace(callTool, timeoutMs);
1209
+ this.tracking = new TrackingNamespace(callTool, timeoutMs);
1185
1210
  }
1186
1211
  async connect() {
1187
1212
  await this.transport.connect();
@@ -1196,6 +1221,21 @@ var XpozClient = class {
1196
1221
  await this.close();
1197
1222
  }
1198
1223
  };
1224
+
1225
+ // src/types/tracking.ts
1226
+ var TrackedItemType = /* @__PURE__ */ ((TrackedItemType2) => {
1227
+ TrackedItemType2["Keyword"] = "keyword";
1228
+ TrackedItemType2["User"] = "user";
1229
+ TrackedItemType2["Subreddit"] = "subreddit";
1230
+ return TrackedItemType2;
1231
+ })(TrackedItemType || {});
1232
+ var TrackedItemPlatform = /* @__PURE__ */ ((TrackedItemPlatform2) => {
1233
+ TrackedItemPlatform2["Twitter"] = "twitter";
1234
+ TrackedItemPlatform2["Instagram"] = "instagram";
1235
+ TrackedItemPlatform2["Reddit"] = "reddit";
1236
+ TrackedItemPlatform2["TikTok"] = "tiktok";
1237
+ return TrackedItemPlatform2;
1238
+ })(TrackedItemPlatform || {});
1199
1239
  // Annotate the CommonJS export names for ESM import in node:
1200
1240
  0 && (module.exports = {
1201
1241
  AuthenticationError,
@@ -1204,6 +1244,8 @@ var XpozClient = class {
1204
1244
  OperationTimeoutError,
1205
1245
  PaginatedResult,
1206
1246
  ResponseType,
1247
+ TrackedItemPlatform,
1248
+ TrackedItemType,
1207
1249
  VERSION,
1208
1250
  XpozClient,
1209
1251
  XpozConnectionError,
package/dist/index.d.cts CHANGED
@@ -679,11 +679,48 @@ declare class TiktokNamespace extends BaseNamespace {
679
679
  }): Promise<PaginatedResult<TiktokUser>>;
680
680
  }
681
681
 
682
+ declare enum TrackedItemType {
683
+ Keyword = "keyword",
684
+ User = "user",
685
+ Subreddit = "subreddit"
686
+ }
687
+ declare enum TrackedItemPlatform {
688
+ Twitter = "twitter",
689
+ Instagram = "instagram",
690
+ Reddit = "reddit",
691
+ TikTok = "tiktok"
692
+ }
693
+ interface TrackedItem {
694
+ phrase?: string;
695
+ type?: TrackedItemType;
696
+ platform?: TrackedItemPlatform;
697
+ }
698
+ interface AddTrackedItemsResult {
699
+ success?: boolean;
700
+ addedCount?: number;
701
+ message?: string;
702
+ currentCount?: number;
703
+ maxTrackedItems?: number;
704
+ planName?: string;
705
+ }
706
+ interface RemoveTrackedItemsResult {
707
+ success?: boolean;
708
+ removedCount?: number;
709
+ message?: string;
710
+ }
711
+
712
+ declare class TrackingNamespace extends BaseNamespace {
713
+ getTrackedItems(): Promise<TrackedItem[]>;
714
+ addTrackedItems(items: TrackedItem[]): Promise<AddTrackedItemsResult>;
715
+ removeTrackedItems(items: TrackedItem[]): Promise<RemoveTrackedItemsResult>;
716
+ }
717
+
682
718
  declare class XpozClient {
683
719
  twitter: TwitterNamespace;
684
720
  instagram: InstagramNamespace;
685
721
  reddit: RedditNamespace;
686
722
  tiktok: TiktokNamespace;
723
+ tracking: TrackingNamespace;
687
724
  private transport;
688
725
  private versionCheck;
689
726
  constructor(options?: {
@@ -721,8 +758,8 @@ declare class OperationCancelledError extends XpozError {
721
758
  constructor(operationId: string);
722
759
  }
723
760
 
724
- declare const VERSION = "0.3.1";
761
+ declare const VERSION = "0.3.2";
725
762
 
726
763
  declare function checkForUpdates(): Promise<void>;
727
764
 
728
- export { AuthenticationError, type InstagramComment, type InstagramPost, type InstagramUser, OperationCancelledError, OperationFailedError, OperationTimeoutError, PaginatedResult, type PaginationInfo, type RedditComment, type RedditPost, type RedditPostWithComments, type RedditSubreddit, type RedditUser, ResponseType, type SubredditWithPosts, type TiktokComment, type TiktokPost, type TiktokUser, type TwitterPost, type TwitterUser, VERSION, XpozClient, XpozConnectionError, XpozError, checkForUpdates };
765
+ export { type AddTrackedItemsResult, AuthenticationError, type InstagramComment, type InstagramPost, type InstagramUser, OperationCancelledError, OperationFailedError, OperationTimeoutError, PaginatedResult, type PaginationInfo, type RedditComment, type RedditPost, type RedditPostWithComments, type RedditSubreddit, type RedditUser, type RemoveTrackedItemsResult, ResponseType, type SubredditWithPosts, type TiktokComment, type TiktokPost, type TiktokUser, type TrackedItem, TrackedItemPlatform, TrackedItemType, type TwitterPost, type TwitterUser, VERSION, XpozClient, XpozConnectionError, XpozError, checkForUpdates };
package/dist/index.d.ts CHANGED
@@ -679,11 +679,48 @@ declare class TiktokNamespace extends BaseNamespace {
679
679
  }): Promise<PaginatedResult<TiktokUser>>;
680
680
  }
681
681
 
682
+ declare enum TrackedItemType {
683
+ Keyword = "keyword",
684
+ User = "user",
685
+ Subreddit = "subreddit"
686
+ }
687
+ declare enum TrackedItemPlatform {
688
+ Twitter = "twitter",
689
+ Instagram = "instagram",
690
+ Reddit = "reddit",
691
+ TikTok = "tiktok"
692
+ }
693
+ interface TrackedItem {
694
+ phrase?: string;
695
+ type?: TrackedItemType;
696
+ platform?: TrackedItemPlatform;
697
+ }
698
+ interface AddTrackedItemsResult {
699
+ success?: boolean;
700
+ addedCount?: number;
701
+ message?: string;
702
+ currentCount?: number;
703
+ maxTrackedItems?: number;
704
+ planName?: string;
705
+ }
706
+ interface RemoveTrackedItemsResult {
707
+ success?: boolean;
708
+ removedCount?: number;
709
+ message?: string;
710
+ }
711
+
712
+ declare class TrackingNamespace extends BaseNamespace {
713
+ getTrackedItems(): Promise<TrackedItem[]>;
714
+ addTrackedItems(items: TrackedItem[]): Promise<AddTrackedItemsResult>;
715
+ removeTrackedItems(items: TrackedItem[]): Promise<RemoveTrackedItemsResult>;
716
+ }
717
+
682
718
  declare class XpozClient {
683
719
  twitter: TwitterNamespace;
684
720
  instagram: InstagramNamespace;
685
721
  reddit: RedditNamespace;
686
722
  tiktok: TiktokNamespace;
723
+ tracking: TrackingNamespace;
687
724
  private transport;
688
725
  private versionCheck;
689
726
  constructor(options?: {
@@ -721,8 +758,8 @@ declare class OperationCancelledError extends XpozError {
721
758
  constructor(operationId: string);
722
759
  }
723
760
 
724
- declare const VERSION = "0.3.1";
761
+ declare const VERSION = "0.3.2";
725
762
 
726
763
  declare function checkForUpdates(): Promise<void>;
727
764
 
728
- export { AuthenticationError, type InstagramComment, type InstagramPost, type InstagramUser, OperationCancelledError, OperationFailedError, OperationTimeoutError, PaginatedResult, type PaginationInfo, type RedditComment, type RedditPost, type RedditPostWithComments, type RedditSubreddit, type RedditUser, ResponseType, type SubredditWithPosts, type TiktokComment, type TiktokPost, type TiktokUser, type TwitterPost, type TwitterUser, VERSION, XpozClient, XpozConnectionError, XpozError, checkForUpdates };
765
+ export { type AddTrackedItemsResult, AuthenticationError, type InstagramComment, type InstagramPost, type InstagramUser, OperationCancelledError, OperationFailedError, OperationTimeoutError, PaginatedResult, type PaginationInfo, type RedditComment, type RedditPost, type RedditPostWithComments, type RedditSubreddit, type RedditUser, type RemoveTrackedItemsResult, ResponseType, type SubredditWithPosts, type TiktokComment, type TiktokPost, type TiktokUser, type TrackedItem, TrackedItemPlatform, TrackedItemType, type TwitterPost, type TwitterUser, VERSION, XpozClient, XpozConnectionError, XpozError, checkForUpdates };
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.3.1";
251
+ var VERSION = "0.3.2";
252
252
 
253
253
  // src/mcp/transport.ts
254
254
  var USER_AGENT = `xpoz-ts-sdk/${VERSION}`;
@@ -579,6 +579,9 @@ var GET_TIKTOK_COMMENTS = "getTiktokCommentsByPostId";
579
579
  var GET_TIKTOK_USER = "getTiktokUser";
580
580
  var SEARCH_TIKTOK_USERS = "searchTiktokUsers";
581
581
  var GET_TIKTOK_USERS_BY_KEYWORDS = "getTiktokUsersByKeywords";
582
+ var GET_TRACKED_ITEMS = "getTrackedItems";
583
+ var ADD_TRACKED_ITEMS = "addTrackedItems";
584
+ var REMOVE_TRACKED_ITEMS = "removeTrackedItems";
582
585
 
583
586
  // src/namespaces/twitter.ts
584
587
  function parseTwitterPost(item) {
@@ -1072,6 +1075,24 @@ var TiktokNamespace = class extends BaseNamespace {
1072
1075
  }
1073
1076
  };
1074
1077
 
1078
+ // src/namespaces/tracking.ts
1079
+ var TrackingNamespace = class extends BaseNamespace {
1080
+ async getTrackedItems() {
1081
+ const result = await this.callTool(GET_TRACKED_ITEMS, {});
1082
+ return result["data"] ?? [];
1083
+ }
1084
+ async addTrackedItems(items) {
1085
+ const args = this.buildArgs({ items });
1086
+ const result = await this.callTool(ADD_TRACKED_ITEMS, args);
1087
+ return result;
1088
+ }
1089
+ async removeTrackedItems(items) {
1090
+ const args = this.buildArgs({ items });
1091
+ const result = await this.callTool(REMOVE_TRACKED_ITEMS, args);
1092
+ return result;
1093
+ }
1094
+ };
1095
+
1075
1096
  // src/versionCheck.ts
1076
1097
  var NPM_REGISTRY_URL = "https://registry.npmjs.org/@xpoz/xpoz/latest";
1077
1098
  var CHECK_TIMEOUT_MS = 3e3;
@@ -1118,6 +1139,7 @@ var XpozClient = class {
1118
1139
  instagram;
1119
1140
  reddit;
1120
1141
  tiktok;
1142
+ tracking;
1121
1143
  transport;
1122
1144
  versionCheck;
1123
1145
  constructor(options = {}) {
@@ -1136,6 +1158,7 @@ var XpozClient = class {
1136
1158
  this.instagram = new InstagramNamespace(callTool, timeoutMs);
1137
1159
  this.reddit = new RedditNamespace(callTool, timeoutMs);
1138
1160
  this.tiktok = new TiktokNamespace(callTool, timeoutMs);
1161
+ this.tracking = new TrackingNamespace(callTool, timeoutMs);
1139
1162
  }
1140
1163
  async connect() {
1141
1164
  await this.transport.connect();
@@ -1150,6 +1173,21 @@ var XpozClient = class {
1150
1173
  await this.close();
1151
1174
  }
1152
1175
  };
1176
+
1177
+ // src/types/tracking.ts
1178
+ var TrackedItemType = /* @__PURE__ */ ((TrackedItemType2) => {
1179
+ TrackedItemType2["Keyword"] = "keyword";
1180
+ TrackedItemType2["User"] = "user";
1181
+ TrackedItemType2["Subreddit"] = "subreddit";
1182
+ return TrackedItemType2;
1183
+ })(TrackedItemType || {});
1184
+ var TrackedItemPlatform = /* @__PURE__ */ ((TrackedItemPlatform2) => {
1185
+ TrackedItemPlatform2["Twitter"] = "twitter";
1186
+ TrackedItemPlatform2["Instagram"] = "instagram";
1187
+ TrackedItemPlatform2["Reddit"] = "reddit";
1188
+ TrackedItemPlatform2["TikTok"] = "tiktok";
1189
+ return TrackedItemPlatform2;
1190
+ })(TrackedItemPlatform || {});
1153
1191
  export {
1154
1192
  AuthenticationError,
1155
1193
  OperationCancelledError,
@@ -1157,6 +1195,8 @@ export {
1157
1195
  OperationTimeoutError,
1158
1196
  PaginatedResult,
1159
1197
  ResponseType,
1198
+ TrackedItemPlatform,
1199
+ TrackedItemType,
1160
1200
  VERSION,
1161
1201
  XpozClient,
1162
1202
  XpozConnectionError,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xpoz/xpoz",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "description": "TypeScript SDK for the Xpoz social media intelligence platform",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",