@brandazine/solari-sdk 0.2.4 → 0.2.5

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.ts CHANGED
@@ -2,7 +2,7 @@ import type { SolariToolMap, SolariToolName, SolariTools, SolariToolsWithoutRequ
2
2
  export * from "./tools.generated.js";
3
3
  export declare const DEFAULT_BASE_URL = "https://solari.sh";
4
4
  export declare const API_PREFIX = "/mcp/api/v1";
5
- export declare const SDK_VERSION = "0.2.4";
5
+ export declare const SDK_VERSION = "0.2.5";
6
6
  export declare const TOKEN_ENV = "SOLARI_TOKEN";
7
7
  export interface SolariTool {
8
8
  name: string;
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  export * from "./tools.generated.js";
2
2
  export const DEFAULT_BASE_URL = "https://solari.sh";
3
3
  export const API_PREFIX = "/mcp/api/v1";
4
- export const SDK_VERSION = "0.2.4";
4
+ export const SDK_VERSION = "0.2.5";
5
5
  export const TOKEN_ENV = "SOLARI_TOKEN";
6
6
  const DEFAULT_TIMEOUT_MS = 150_000;
7
7
  export class SolariError extends Error {
@@ -194,6 +194,47 @@ export interface FetchInstagramPostsArgs {
194
194
  /** Instagram handle, with or without a leading @. */
195
195
  "username": string;
196
196
  }
197
+ /** Reads one Meta Threads account by exact username and returns its profile: display name, biography, follower count, verified and private flags, bio links, profile picture and URL. Threads is fetch-only in SOLARI: there are no catalog or insight tools for it, so call this directly with the exact handle and read the answer from the response; when you only know a name, find the handle with solari_fetch_threads_account_search first. A handle SOLARI has never collected is collected live now, which takes roughly 5 to 30 seconds, and fetched_on_demand=true marks that case; repeat calls within an hour return the stored copy (fetched_on_demand=false) unless refresh=true forces a new collection. stale=true means the live collection failed and an older stored copy is returned; collected_at says when. Media URLs right after a collection may be temporary, so read them promptly. Nothing is enrolled in ongoing tracking. A handle with no Threads profile answers a not-found error. Works with any signed-in SOLARI account. */
198
+ export interface FetchThreadsAccountArgs {
199
+ /** Threads handle, with or without a leading @. */
200
+ "username": string;
201
+ /** true collects the profile again even when a copy from the last hour exists. Default false. */
202
+ "refresh"?: boolean | undefined;
203
+ }
204
+ /** Looks Meta Threads accounts up live by name or handle fragment and returns thin hits in Threads' own order: username, display name, profile picture, verified flag and URL (limit up to 20, default 10). Threads is fetch-only in SOLARI: there are no catalog or insight tools for it, and this is its account search, so use it when you know a name but not the exact handle. Official accounts may not rank first, so check the hits before choosing one. Hits carry no account_id and nothing is stored; call solari_fetch_threads_account with the chosen username for the full profile (follower count, biography, bio links) and solari_fetch_threads_posts for its posts. Every call asks Threads live, takes a second or two, is not cached, and costs 1 credit. An empty items list means Threads matched nothing. Works with any signed-in SOLARI account. */
205
+ export interface FetchThreadsAccountSearchArgs {
206
+ /** Name or handle fragment, with or without a leading @. */
207
+ "query": string;
208
+ /** Maximum hits to return, default 10. Values above 20 are clamped to 20. */
209
+ "limit"?: number | undefined;
210
+ }
211
+ /** Reads one Meta Threads post by its public URL or permalink code and returns it with its author and the first batch of direct replies (replies_limit, default 20, max 50, most liked first; 0 skips them). Accepts https://www.threads.com/@<handle>/post/<code> (threads.net too) as url, or the bare code. Threads is fetch-only in SOLARI: there are no catalog or insight tools for it, so call this directly and read the post from the response. A post SOLARI has never collected is collected live now, which takes roughly 5 to 30 seconds (fetched_on_demand=true); repeat calls within an hour return the stored copy (fetched_on_demand=false) unless refresh=true forces a new collection. stale=true means the live collection failed and an older stored copy is returned. Replies are the first batch only, so the post's reply_count can exceed the replies returned. Media URLs right after a collection may be temporary, so read them promptly; assets carry a direct-download asset_url. A reference with no public post answers a not-found error. Run next with the returned username to read the author's profile and posts. Works with any signed-in SOLARI account. */
212
+ export interface FetchThreadsPostArgs {
213
+ /** Public Threads post URL such as https://www.threads.com/@<handle>/post/<code>. Provide this or code, not both. */
214
+ "url"?: string | undefined;
215
+ /** Permalink code of the post, the segment after /post/ in its URL. Provide this or url, not both. */
216
+ "code"?: string | undefined;
217
+ /** Replies to return, default 20. 0 returns none. Values above 50 are clamped to 50. */
218
+ "replies_limit"?: number | undefined;
219
+ /** true collects the post and its replies again even when a copy from the last hour exists. Default false. */
220
+ "refresh"?: boolean | undefined;
221
+ }
222
+ /** Searches Meta Threads live for posts matching a keyword and returns Threads' top results: one page of about 20 posts (limit up to 25) in Threads' own relevance order, each with full post fields (text, hashtags, mentions, like, reply, repost and quote counts, author username, url, and assets with a direct-download asset_url). Threads is fetch-only in SOLARI: there are no catalog or insight tools for it, and this is its keyword search. Only Threads' top tab is available: there is no recent tab and no further page, so calling again with the same query returns the same page, and results may include loosely related posts. The matching posts are collected and stored, so solari_fetch_threads_post can read any of them with its replies and solari_fetch_threads_account can read an author. Every call asks Threads live, takes a few seconds, is not cached, and costs 1 credit. An empty items list means Threads found no public post for the keyword. Works with any signed-in SOLARI account. */
223
+ export interface FetchThreadsPostSearchArgs {
224
+ /** Keyword or phrase to search Threads posts for. */
225
+ "query": string;
226
+ /** Maximum posts to return from the one result page, default 20. Values above 25 are clamped to 25. */
227
+ "limit"?: number | undefined;
228
+ }
229
+ /** Reads the recent top-level posts of one Meta Threads account by exact username, newest first, together with its profile. limit picks how many (default 12, max 25); each post carries text, hashtags, mentions, links, like, reply, repost and quote counts, the quoted post, and assets with a direct-download asset_url. Threads is fetch-only in SOLARI: there are no catalog or insight tools for it, so call this directly with the handle and read the posts from the response. A handle SOLARI has never collected is collected live now, which takes roughly 5 to 30 seconds (fetched_on_demand=true); repeat calls within an hour return the stored copy (fetched_on_demand=false) unless refresh=true forces a new collection. stale=true means the live collection failed and an older stored copy is returned. Media URLs right after a collection may be temporary, so read them promptly. A private account answers its profile with posts empty. The account's own replies are not listed: solari_fetch_threads_post reads one post with its replies. A handle with no Threads profile answers a not-found error. Works with any signed-in SOLARI account. */
230
+ export interface FetchThreadsPostsArgs {
231
+ /** Threads handle, with or without a leading @. */
232
+ "username": string;
233
+ /** Posts to return, default 12. Values above 25 are clamped to 25. */
234
+ "limit"?: number | undefined;
235
+ /** true collects the account and its posts again even when a copy from the last hour exists. Default false. */
236
+ "refresh"?: boolean | undefined;
237
+ }
197
238
  /** Adds one TikTok account to the SOLARI catalog by exact username. This is not a search and not a profile reader: use solari_catalog_tiktok_account_search to resolve a name, then solari_catalog_tiktok_account_profile to read it. If the handle is already stored, nothing is scraped. A first-time ingest can take 10 to 40 seconds; only recent posts exist until the crawl finishes. Works with any signed-in SOLARI account. */
198
239
  export interface FetchTiktokAccountArgs {
199
240
  /** TikTok handle, with or without a leading @. */
@@ -603,6 +644,11 @@ export interface SolariToolMap {
603
644
  "solari_fetch_instagram_hashtag_search": FetchInstagramHashtagSearchArgs;
604
645
  "solari_fetch_instagram_post": FetchInstagramPostArgs;
605
646
  "solari_fetch_instagram_posts": FetchInstagramPostsArgs;
647
+ "solari_fetch_threads_account": FetchThreadsAccountArgs;
648
+ "solari_fetch_threads_account_search": FetchThreadsAccountSearchArgs;
649
+ "solari_fetch_threads_post": FetchThreadsPostArgs;
650
+ "solari_fetch_threads_post_search": FetchThreadsPostSearchArgs;
651
+ "solari_fetch_threads_posts": FetchThreadsPostsArgs;
606
652
  "solari_fetch_tiktok_account": FetchTiktokAccountArgs;
607
653
  "solari_fetch_tiktok_post": FetchTiktokPostArgs;
608
654
  "solari_fetch_tiktok_posts": FetchTiktokPostsArgs;
@@ -642,6 +688,7 @@ export type SolariToolsWithoutRequiredArgs = {
642
688
  "solari_catalog_tiktok_account_profile": true;
643
689
  "solari_catalog_tiktok_content_detail": true;
644
690
  "solari_fetch_instagram_post": true;
691
+ "solari_fetch_threads_post": true;
645
692
  "solari_insight_instagram_account_ad_posts": true;
646
693
  "solari_insight_instagram_account_collabs": true;
647
694
  "solari_insight_instagram_brand_lookalike_content": true;
@@ -722,6 +769,22 @@ export interface SolariTools {
722
769
  /** Collects posts for one Instagram account into the SOLARI catalog by exact username. This is not a post listing: use solari_catalog_instagram_account_posts to read stored rows. If the handle is already crawled, nothing is scraped; a handle the catalog only knows by name from a tag or mention is crawled now and its posts are queued right away. A first-time ingest can take several seconds and the posts land shortly after, so re-read the catalog after a short wait. Works with any signed-in SOLARI account. */
723
770
  posts<T = unknown>(args: FetchInstagramPostsArgs): Promise<T>;
724
771
  };
772
+ threads: {
773
+ account: {
774
+ /** Reads one Meta Threads account by exact username and returns its profile: display name, biography, follower count, verified and private flags, bio links, profile picture and URL. Threads is fetch-only in SOLARI: there are no catalog or insight tools for it, so call this directly with the exact handle and read the answer from the response; when you only know a name, find the handle with solari_fetch_threads_account_search first. A handle SOLARI has never collected is collected live now, which takes roughly 5 to 30 seconds, and fetched_on_demand=true marks that case; repeat calls within an hour return the stored copy (fetched_on_demand=false) unless refresh=true forces a new collection. stale=true means the live collection failed and an older stored copy is returned; collected_at says when. Media URLs right after a collection may be temporary, so read them promptly. Nothing is enrolled in ongoing tracking. A handle with no Threads profile answers a not-found error. Works with any signed-in SOLARI account. */
775
+ <T = unknown>(args: FetchThreadsAccountArgs): Promise<T>;
776
+ /** Looks Meta Threads accounts up live by name or handle fragment and returns thin hits in Threads' own order: username, display name, profile picture, verified flag and URL (limit up to 20, default 10). Threads is fetch-only in SOLARI: there are no catalog or insight tools for it, and this is its account search, so use it when you know a name but not the exact handle. Official accounts may not rank first, so check the hits before choosing one. Hits carry no account_id and nothing is stored; call solari_fetch_threads_account with the chosen username for the full profile (follower count, biography, bio links) and solari_fetch_threads_posts for its posts. Every call asks Threads live, takes a second or two, is not cached, and costs 1 credit. An empty items list means Threads matched nothing. Works with any signed-in SOLARI account. */
777
+ search<T = unknown>(args: FetchThreadsAccountSearchArgs): Promise<T>;
778
+ };
779
+ post: {
780
+ /** Reads one Meta Threads post by its public URL or permalink code and returns it with its author and the first batch of direct replies (replies_limit, default 20, max 50, most liked first; 0 skips them). Accepts https://www.threads.com/@<handle>/post/<code> (threads.net too) as url, or the bare code. Threads is fetch-only in SOLARI: there are no catalog or insight tools for it, so call this directly and read the post from the response. A post SOLARI has never collected is collected live now, which takes roughly 5 to 30 seconds (fetched_on_demand=true); repeat calls within an hour return the stored copy (fetched_on_demand=false) unless refresh=true forces a new collection. stale=true means the live collection failed and an older stored copy is returned. Replies are the first batch only, so the post's reply_count can exceed the replies returned. Media URLs right after a collection may be temporary, so read them promptly; assets carry a direct-download asset_url. A reference with no public post answers a not-found error. Run next with the returned username to read the author's profile and posts. Works with any signed-in SOLARI account. */
781
+ <T = unknown>(args?: FetchThreadsPostArgs): Promise<T>;
782
+ /** Searches Meta Threads live for posts matching a keyword and returns Threads' top results: one page of about 20 posts (limit up to 25) in Threads' own relevance order, each with full post fields (text, hashtags, mentions, like, reply, repost and quote counts, author username, url, and assets with a direct-download asset_url). Threads is fetch-only in SOLARI: there are no catalog or insight tools for it, and this is its keyword search. Only Threads' top tab is available: there is no recent tab and no further page, so calling again with the same query returns the same page, and results may include loosely related posts. The matching posts are collected and stored, so solari_fetch_threads_post can read any of them with its replies and solari_fetch_threads_account can read an author. Every call asks Threads live, takes a few seconds, is not cached, and costs 1 credit. An empty items list means Threads found no public post for the keyword. Works with any signed-in SOLARI account. */
783
+ search<T = unknown>(args: FetchThreadsPostSearchArgs): Promise<T>;
784
+ };
785
+ /** Reads the recent top-level posts of one Meta Threads account by exact username, newest first, together with its profile. limit picks how many (default 12, max 25); each post carries text, hashtags, mentions, links, like, reply, repost and quote counts, the quoted post, and assets with a direct-download asset_url. Threads is fetch-only in SOLARI: there are no catalog or insight tools for it, so call this directly with the handle and read the posts from the response. A handle SOLARI has never collected is collected live now, which takes roughly 5 to 30 seconds (fetched_on_demand=true); repeat calls within an hour return the stored copy (fetched_on_demand=false) unless refresh=true forces a new collection. stale=true means the live collection failed and an older stored copy is returned. Media URLs right after a collection may be temporary, so read them promptly. A private account answers its profile with posts empty. The account's own replies are not listed: solari_fetch_threads_post reads one post with its replies. A handle with no Threads profile answers a not-found error. Works with any signed-in SOLARI account. */
786
+ posts<T = unknown>(args: FetchThreadsPostsArgs): Promise<T>;
787
+ };
725
788
  tiktok: {
726
789
  /** Adds one TikTok account to the SOLARI catalog by exact username. This is not a search and not a profile reader: use solari_catalog_tiktok_account_search to resolve a name, then solari_catalog_tiktok_account_profile to read it. If the handle is already stored, nothing is scraped. A first-time ingest can take 10 to 40 seconds; only recent posts exist until the crawl finishes. Works with any signed-in SOLARI account. */
727
790
  account<T = unknown>(args: FetchTiktokAccountArgs): Promise<T>;
@@ -20,6 +20,11 @@ export const SOLARI_TOOL_NAMES = [
20
20
  "solari_fetch_instagram_hashtag_search",
21
21
  "solari_fetch_instagram_post",
22
22
  "solari_fetch_instagram_posts",
23
+ "solari_fetch_threads_account",
24
+ "solari_fetch_threads_account_search",
25
+ "solari_fetch_threads_post",
26
+ "solari_fetch_threads_post_search",
27
+ "solari_fetch_threads_posts",
23
28
  "solari_fetch_tiktok_account",
24
29
  "solari_fetch_tiktok_post",
25
30
  "solari_fetch_tiktok_posts",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@brandazine/solari-sdk",
3
- "version": "0.2.4",
4
- "description": "TypeScript client for the SOLARI API — creator and brand intelligence across Instagram and TikTok.",
3
+ "version": "0.2.5",
4
+ "description": "TypeScript client for the SOLARI API — creator and brand intelligence across Instagram and TikTok, plus Meta Threads profiles and posts.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://solari.sh/api",
7
7
  "keywords": [
@@ -9,6 +9,7 @@
9
9
  "brandazine",
10
10
  "instagram",
11
11
  "tiktok",
12
+ "threads",
12
13
  "creator",
13
14
  "influencer",
14
15
  "brand",