@brandazine/solari-sdk 0.2.8 → 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 +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/tools.generated.d.ts +12 -12
- package/package.json +1 -1
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
|
|
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.
|
|
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.
|
|
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 {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** Recorded profile values of one collected Instagram account over time, for follower growth and trend comparisons. points lists follower_count, following_count, post_count, is_verified, and is_private, oldest first, each with captured_at: the moment the catalog collected those values. current holds the catalog's current values, and current.collected_at says when the profile was last collected from Instagram; check it before treating the numbers as today's. granularity=day (default) keeps the last point of each UTC day; all returns every recorded point. The range is since/until (UTC dates, inclusive) and defaults to the last 90 days; truncated=true means older points were dropped, so narrow since. Points exist only when the account was collected, so gaps are normal, and most accounts have no points
|
|
1
|
+
/** Recorded profile values of one collected Instagram account over time, for follower growth and trend comparisons. points lists follower_count, following_count, post_count, is_verified, and is_private, oldest first, each with captured_at: the moment the catalog collected those values. current holds the catalog's current values, and current.collected_at says when the profile was last collected from Instagram; check it before treating the numbers as today's. granularity=day (default) keeps the last point of each UTC day; all returns every recorded point. The range is since/until (UTC dates, inclusive) and defaults to the last 90 days; truncated=true means older points were dropped, so narrow since. Points exist only when the account was collected, so gaps are normal, and most accounts have no points from 2025-08-26 to 2025-09-27. Identify the account by account_id (UUID from solari_catalog_instagram_account_search) or by username. This reads the catalog only; found=false means the handle is not in the catalog — call solari_fetch_instagram_account first, which cannot backfill past values. Works with any signed-in SOLARI account. */
|
|
2
2
|
export interface CatalogInstagramAccountHistoryArgs {
|
|
3
3
|
/** account_id of the account (SOLARI account UUID). Provide this or username. */
|
|
4
4
|
"account_id"?: string | undefined;
|
|
@@ -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.
|
|
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).
|
|
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.
|
|
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).
|
|
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.
|
|
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;
|
|
@@ -749,7 +749,7 @@ export interface SolariTools {
|
|
|
749
749
|
catalog: {
|
|
750
750
|
instagram: {
|
|
751
751
|
account: {
|
|
752
|
-
/** Recorded profile values of one collected Instagram account over time, for follower growth and trend comparisons. points lists follower_count, following_count, post_count, is_verified, and is_private, oldest first, each with captured_at: the moment the catalog collected those values. current holds the catalog's current values, and current.collected_at says when the profile was last collected from Instagram; check it before treating the numbers as today's. granularity=day (default) keeps the last point of each UTC day; all returns every recorded point. The range is since/until (UTC dates, inclusive) and defaults to the last 90 days; truncated=true means older points were dropped, so narrow since. Points exist only when the account was collected, so gaps are normal, and most accounts have no points
|
|
752
|
+
/** Recorded profile values of one collected Instagram account over time, for follower growth and trend comparisons. points lists follower_count, following_count, post_count, is_verified, and is_private, oldest first, each with captured_at: the moment the catalog collected those values. current holds the catalog's current values, and current.collected_at says when the profile was last collected from Instagram; check it before treating the numbers as today's. granularity=day (default) keeps the last point of each UTC day; all returns every recorded point. The range is since/until (UTC dates, inclusive) and defaults to the last 90 days; truncated=true means older points were dropped, so narrow since. Points exist only when the account was collected, so gaps are normal, and most accounts have no points from 2025-08-26 to 2025-09-27. Identify the account by account_id (UUID from solari_catalog_instagram_account_search) or by username. This reads the catalog only; found=false means the handle is not in the catalog — call solari_fetch_instagram_account first, which cannot backfill past values. Works with any signed-in SOLARI account. */
|
|
753
753
|
history<T = unknown>(args?: CatalogInstagramAccountHistoryArgs): Promise<T>;
|
|
754
754
|
/** Posts by one collected Instagram account, newest first, with pagination and filters. Identify the account by account_id (UUID from solari_catalog_instagram_account_search) or by username (Instagram handle). Each item has post_id (SOLARI post UUID), slug and url (public Instagram permalink), post_type (reel, video, photo, or carousel), posted_at, caption text, like/comment/play counts, media_count, is_paid_partnership, a medias array (every media of the post in carousel order, each with media_type, media/thumbnail URLs, video_duration, and tags — accounts and hashtags tagged on that media, with account_id when the tagged account is tracked), and a representative thumbnail_url. The response carries found, account_id, username, total, has_more, and items; page with limit and offset, narrow with since/until (UTC dates, inclusive) and post_type. posts_collected_at is how far the stored posts reach, stored_post_count against profile_post_count shows whether collection is incomplete, and refreshes_regularly says whether the account is re-collected on a schedule; when the requested dates run past posts_collected_at, note explains that later posts are not in the catalog yet — an empty result then does not mean the account posted nothing, so call solari_fetch_instagram_posts to re-collect it. This reads the catalog only; found=false means the handle is not in the catalog (note says when Instagram no longer has it) — call solari_fetch_instagram_posts with that username first. Each post carries assets: its media files in order, each with a direct-download asset_url for the full-size image or video; when a response is too large, assets is replaced by an assets_omitted count — request fewer posts to keep it. Works with any signed-in SOLARI account. */
|
|
755
755
|
posts<T = unknown>(args?: CatalogInstagramAccountPostsArgs): Promise<T>;
|
|
@@ -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.
|
|
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).
|
|
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.
|
|
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).
|
|
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.
|
|
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.
|
|
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",
|