@brandazine/solari-sdk 0.2.9 → 0.2.10

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
@@ -19,7 +19,7 @@ const thread = await solari.tools.fetch.threads.post({ url: "https://www.threads
19
19
  const tools = await solari.listTools();
20
20
  ```
21
21
 
22
- Threads is fetch-only: `solari.tools.fetch.threads.account.search({ query })` finds handles by name and `.post.search({ query })` returns Threads' top posts for a keyword (both live on every call, one page, not cached); `.account({ username })`, `.posts({ username, limit })`, and `.post({ url })` (or `{ code }`) read the profile, its newest posts, or one post with its first replies straight from the response. A first collection takes 5 to 30 seconds; repeat calls within an hour return the stored copy unless `refresh: true`.
22
+ For Threads, `solari.tools.fetch.threads.account.search({ query })` finds handles by name and `.post.search({ query })` returns Threads' top posts for a keyword (both live on every call, one page, not cached); `.account({ username })`, `.posts({ username, limit })`, and `.post({ url })` (or `{ code }`) read the profile, its newest posts, or one post with its first replies straight from the response. A first collection takes 5 to 30 seconds; repeat calls within an hour return the stored copy unless `refresh: true`.
23
23
 
24
24
  Follower and engagement trends: `solari.tools.catalog.instagram.account.history({ username, since })` returns follower, following, and post counts at each collection (`captured_at`) plus `current.collected_at`, and `solari.tools.catalog.instagram.content.history({ username, posted_since })` (or `{ post_ids }`, `{ slugs }`, `{ urls }`) returns each post's like, comment, play, and reshare counts over time. One point per UTC day by default (`granularity: "all"` for every collection); gaps between points are normal.
25
25
 
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.9";
5
+ export declare const SDK_VERSION = "0.2.10";
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.9";
4
+ export const SDK_VERSION = "0.2.10";
5
5
  export const TOKEN_ENV = "SOLARI_TOKEN";
6
6
  const DEFAULT_TIMEOUT_MS = 150_000;
7
7
  export class SolariError extends Error {
@@ -232,21 +232,21 @@ export interface FetchInstagramPostsArgs {
232
232
  /** Instagram handle, with or without a leading @. */
233
233
  "username": string;
234
234
  }
235
- /** 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. */
235
+ /** 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. 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. */
236
236
  export interface FetchThreadsAccountArgs {
237
237
  /** Threads handle, with or without a leading @. */
238
238
  "username": string;
239
239
  /** true collects the profile again even when a copy from the last hour exists. Default false. */
240
240
  "refresh"?: boolean | undefined;
241
241
  }
242
- /** 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. */
242
+ /** 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). 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, and is not cached. An empty items list means Threads matched nothing. Works with any signed-in SOLARI account. */
243
243
  export interface FetchThreadsAccountSearchArgs {
244
244
  /** Name or handle fragment, with or without a leading @. */
245
245
  "query": string;
246
246
  /** Maximum hits to return, default 10. Values above 20 are clamped to 20. */
247
247
  "limit"?: number | undefined;
248
248
  }
249
- /** 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. */
249
+ /** 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. 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. */
250
250
  export interface FetchThreadsPostArgs {
251
251
  /** Public Threads post URL such as https://www.threads.com/@<handle>/post/<code>. Provide this or code, not both. */
252
252
  "url"?: string | undefined;
@@ -257,14 +257,14 @@ export interface FetchThreadsPostArgs {
257
257
  /** true collects the post and its replies again even when a copy from the last hour exists. Default false. */
258
258
  "refresh"?: boolean | undefined;
259
259
  }
260
- /** 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. */
260
+ /** 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). 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, and is not cached. An empty items list means Threads found no public post for the keyword. Works with any signed-in SOLARI account. */
261
261
  export interface FetchThreadsPostSearchArgs {
262
262
  /** Keyword or phrase to search Threads posts for. */
263
263
  "query": string;
264
264
  /** Maximum posts to return from the one result page, default 20. Values above 25 are clamped to 25. */
265
265
  "limit"?: number | undefined;
266
266
  }
267
- /** 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. */
267
+ /** 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. 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. */
268
268
  export interface FetchThreadsPostsArgs {
269
269
  /** Threads handle, with or without a leading @. */
270
270
  "username": string;
@@ -817,18 +817,18 @@ export interface SolariTools {
817
817
  };
818
818
  threads: {
819
819
  account: {
820
- /** 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. */
820
+ /** 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. 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. */
821
821
  <T = unknown>(args: FetchThreadsAccountArgs): Promise<T>;
822
- /** 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. */
822
+ /** 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). 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, and is not cached. An empty items list means Threads matched nothing. Works with any signed-in SOLARI account. */
823
823
  search<T = unknown>(args: FetchThreadsAccountSearchArgs): Promise<T>;
824
824
  };
825
825
  post: {
826
- /** 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. */
826
+ /** 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. 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. */
827
827
  <T = unknown>(args?: FetchThreadsPostArgs): Promise<T>;
828
- /** 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. */
828
+ /** 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). 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, and is not cached. An empty items list means Threads found no public post for the keyword. Works with any signed-in SOLARI account. */
829
829
  search<T = unknown>(args: FetchThreadsPostSearchArgs): Promise<T>;
830
830
  };
831
- /** 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. */
831
+ /** 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. 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. */
832
832
  posts<T = unknown>(args: FetchThreadsPostsArgs): Promise<T>;
833
833
  };
834
834
  tiktok: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brandazine/solari-sdk",
3
- "version": "0.2.9",
3
+ "version": "0.2.10",
4
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",