@beeperbot/sdk 0.2.3 → 0.2.4

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.d.cts CHANGED
@@ -276,6 +276,11 @@ interface SimpleFilters {
276
276
  }>;
277
277
  fids?: number[];
278
278
  userIds?: string[];
279
+ castEngagement?: {
280
+ castHash?: string;
281
+ castUrl?: string;
282
+ require?: Array<'like' | 'recast'>;
283
+ };
279
284
  orderBy?: 'attention_price_asc' | 'attention_price_desc' | 'neynar_score_desc' | 'followers_desc' | 'followers_asc' | 'recent_activity' | 'battery_desc' | 'random';
280
285
  }
281
286
  /** Estimate request input */
package/dist/index.d.ts CHANGED
@@ -276,6 +276,11 @@ interface SimpleFilters {
276
276
  }>;
277
277
  fids?: number[];
278
278
  userIds?: string[];
279
+ castEngagement?: {
280
+ castHash?: string;
281
+ castUrl?: string;
282
+ require?: Array<'like' | 'recast'>;
283
+ };
279
284
  orderBy?: 'attention_price_asc' | 'attention_price_desc' | 'neynar_score_desc' | 'followers_desc' | 'followers_asc' | 'recent_activity' | 'battery_desc' | 'random';
280
285
  }
281
286
  /** Estimate request input */
package/dist/index.js CHANGED
@@ -706,6 +706,48 @@ var FILTER_SCHEMA = [
706
706
  }
707
707
  ]
708
708
  },
709
+ {
710
+ name: "Cast Engagement",
711
+ description: "Target users who engaged with a specific Farcaster cast",
712
+ filters: [
713
+ {
714
+ name: "castEngagement",
715
+ description: "Users who liked and/or recasted a specific cast. If require is omitted, any engagement counts.",
716
+ type: "object",
717
+ example: {
718
+ castUrl: "https://warpcast.com/username/0xabc123",
719
+ require: ["like", "recast"]
720
+ },
721
+ properties: {
722
+ castUrl: {
723
+ name: "castUrl",
724
+ description: "Farcaster cast URL (warpcast.com, farcaster.xyz, base.app)",
725
+ type: "string",
726
+ example: "https://warpcast.com/username/0xabc123"
727
+ },
728
+ castHash: {
729
+ name: "castHash",
730
+ description: "Cast hash (0x...) if you already have it",
731
+ type: "string",
732
+ example: "0xabc123"
733
+ },
734
+ require: {
735
+ name: "require",
736
+ description: "Required engagement types. Use ['like','recast'] to require both.",
737
+ type: "array",
738
+ items: {
739
+ name: "engagement",
740
+ description: "Engagement type",
741
+ type: "string",
742
+ enum: ["like", "recast"],
743
+ example: "like"
744
+ },
745
+ example: ["like", "recast"]
746
+ }
747
+ }
748
+ }
749
+ ]
750
+ },
709
751
  {
710
752
  name: "Token Filters",
711
753
  description: "Filter by token preferences or holdings. IMPORTANT: Signal tokens and token holders are different concepts.",
@@ -1252,7 +1294,7 @@ var CHAIN_ID_MAP = {
1252
1294
  optimism: 10
1253
1295
  };
1254
1296
  function hasSubstantiveFilters(filters) {
1255
- return !!(filters.platform || filters.minFollowers || filters.maxFollowers || filters.fids?.length || filters.userIds?.length || filters.activeInLastDays || filters.countries?.length || filters.neynarScoreMin || filters.tokenHolders?.length || filters.maxAttentionPriceUsd || filters.hasBaseWallet || filters.spamLabel);
1297
+ return !!(filters.platform || filters.minFollowers || filters.maxFollowers || filters.fids?.length || filters.userIds?.length || filters.castEngagement?.castHash || filters.castEngagement?.castUrl || filters.activeInLastDays || filters.countries?.length || filters.neynarScoreMin || filters.tokenHolders?.length || filters.maxAttentionPriceUsd || filters.hasBaseWallet || filters.spamLabel);
1256
1298
  }
1257
1299
  function normalizeAgentFilters(filters) {
1258
1300
  const normalized = { ...filters };
@@ -1303,6 +1345,17 @@ function normalizeAgentFilters(filters) {
1303
1345
  stripEmptyArray("countries");
1304
1346
  stripEmptyArray("fids");
1305
1347
  stripEmptyArray("userIds");
1348
+ if (normalized.castEngagement) {
1349
+ const { castHash, castUrl, require: require2 } = normalized.castEngagement;
1350
+ if (!castHash && !castUrl) {
1351
+ delete normalized.castEngagement;
1352
+ } else if (Array.isArray(require2) && require2.length === 0) {
1353
+ normalized.castEngagement = {
1354
+ ...castHash != null && { castHash },
1355
+ ...castUrl != null && { castUrl }
1356
+ };
1357
+ }
1358
+ }
1306
1359
  if (normalized.neynarScoreMin === 0) delete normalized.neynarScoreMin;
1307
1360
  if (normalized.neynarScoreMax === 1) delete normalized.neynarScoreMax;
1308
1361
  if (normalized.quotientScoreMin === 0) delete normalized.quotientScoreMin;