@recursiv/sdk 0.7.37 → 0.7.39

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.
@@ -5,6 +5,11 @@ export declare class PostsResource {
5
5
  constructor(client: HttpClient);
6
6
  /** List posts with optional filters */
7
7
  list(params?: ListPostsParams): Promise<PaginatedResponse<Post>>;
8
+ /** Broad categories currently enabled for public posts in this app. */
9
+ categories(): Promise<SingleResponse<Array<{
10
+ id: string;
11
+ name: string;
12
+ }>>>;
8
13
  /** List posts the authenticated caller has upvoted. */
9
14
  liked(params?: Pick<ListPostsParams, 'limit' | 'offset' | 'cursor'>): Promise<PaginatedResponse<Post>>;
10
15
  /** Get a single post with replies */
@@ -7,6 +7,10 @@ export class PostsResource {
7
7
  list(params) {
8
8
  return this.client.get('/posts', params);
9
9
  }
10
+ /** Broad categories currently enabled for public posts in this app. */
11
+ categories() {
12
+ return this.client.get('/posts/categories');
13
+ }
10
14
  /** List posts the authenticated caller has upvoted. */
11
15
  liked(params) {
12
16
  return this.list({ ...params, liked: true });
@@ -784,6 +784,11 @@ export interface SocialNetwork {
784
784
  capabilities: Array<'profile_search' | 'profile_read' | 'original_author_posts' | 'minds_subscription' | 'following_feed' | 'conversation_read' | 'public_trends' | 'trend_feed' | 'popular_accounts' | 'post_search'>;
785
785
  profileSearchPagination: boolean;
786
786
  postSearchAccountRequired?: boolean;
787
+ /** Categories available from the current app configuration. */
788
+ categories?: Array<{
789
+ id: string;
790
+ name: string;
791
+ }>;
787
792
  conversationCoverage?: string;
788
793
  }
789
794
  /** Public source identity, independent of any local Minds user or handle. */
@@ -887,6 +892,12 @@ export interface SocialTrendProvenance {
887
892
  coverage: 'provider_ranked_window';
888
893
  /** Exact ranking interval is not supplied by these providers. */
889
894
  rankingWindow: null;
895
+ categoryFilter?: {
896
+ selected: string;
897
+ status: 'complete' | 'partial';
898
+ classified: number;
899
+ unclassified: number;
900
+ };
890
901
  }
891
902
  export interface SocialTrend {
892
903
  protocol: string;
@@ -1012,6 +1023,7 @@ export declare class ProtocolsResource {
1012
1023
  limit?: number;
1013
1024
  cursor?: string;
1014
1025
  includePreviews?: boolean;
1026
+ category?: string;
1015
1027
  }): Promise<SingleResponse<SocialTrends>>;
1016
1028
  /** Open a topic currently listed by the provider. Use its nativeId as topic and preserve the opaque cursor. */
1017
1029
  getPublicTrendFeed(params: {
@@ -1019,6 +1031,7 @@ export declare class ProtocolsResource {
1019
1031
  topic: string;
1020
1032
  limit?: number;
1021
1033
  cursor?: string;
1034
+ category?: string;
1022
1035
  }): Promise<SingleResponse<SocialTrendFeed>>;
1023
1036
  /** Provider-ranked public accounts with explicit provenance; served from the app's index when a fresh snapshot exists. */
1024
1037
  getPublicPopularProfiles(params: {
@@ -110,11 +110,13 @@ export class ProtocolsResource {
110
110
  /** Current provider-ranked topics or posts, with explicit source and coverage. Does not ingest content. */
111
111
  getPublicTrends(params) {
112
112
  return this.client.get('/protocols/social/trends', { protocol: params.protocol, limit: params.limit, cursor: params.cursor,
113
- ...(params.includePreviews !== undefined ? { includePreviews: params.includePreviews } : {}) });
113
+ ...(params.includePreviews !== undefined ? { includePreviews: params.includePreviews } : {}),
114
+ ...(params.category !== undefined ? { category: params.category } : {}) });
114
115
  }
115
116
  /** Open a topic currently listed by the provider. Use its nativeId as topic and preserve the opaque cursor. */
116
117
  getPublicTrendFeed(params) {
117
- return this.client.get('/protocols/social/trend-feed', { protocol: params.protocol, topic: params.topic, limit: params.limit, cursor: params.cursor });
118
+ return this.client.get('/protocols/social/trend-feed', { protocol: params.protocol, topic: params.topic, limit: params.limit, cursor: params.cursor,
119
+ ...(params.category !== undefined ? { category: params.category } : {}) });
118
120
  }
119
121
  /** Provider-ranked public accounts with explicit provenance; served from the app's index when a fresh snapshot exists. */
120
122
  getPublicPopularProfiles(params) {
package/dist/types.d.ts CHANGED
@@ -171,6 +171,8 @@ export interface UpdatePostInput {
171
171
  }
172
172
  export type ReactionType = 'like' | 'heart' | 'fire' | 'laugh' | 'sad' | 'angry' | 'upvote' | 'downvote';
173
173
  export interface ListPostsParams extends PaginationParams {
174
+ /** Public-only broad category. Requires an enabled app experiment; limit <=25. */
175
+ category?: string;
174
176
  community_id?: string;
175
177
  author_id?: string;
176
178
  organization_id?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@recursiv/sdk",
3
- "version": "0.7.37",
3
+ "version": "0.7.39",
4
4
  "description": "TypeScript SDK for the Recursiv API",
5
5
  "license": "FSL-1.1-ALv2",
6
6
  "type": "module",