@brandazine/solari-sdk 0.2.10 → 0.2.11
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 +2 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/tools.generated.d.ts +32 -4
- package/dist/tools.generated.js +2 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -21,6 +21,8 @@ const tools = await solari.listTools();
|
|
|
21
21
|
|
|
22
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
|
+
For TikTok live search, `solari.tools.fetch.tiktok.account.search({ query })` finds accounts by name and `.post.search({ query })` finds videos by keyword, in TikTok's own order (live on every call, not cached, nothing stored). When `has_more` is true, pass `next_cursor` back as `cursor` with the same query for the next page. Account hits carry `account_id` when already in the catalog, else `.account({ username })` adds one; `.post({ url })` collects and stores a video hit.
|
|
25
|
+
|
|
24
26
|
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
27
|
|
|
26
28
|
Create an API key on your [SOLARI My page](https://solari.brandazine.com/me/api-keys) (long-lived, `solari_sk_…`, shown once), or mint a short-lived token with `solari auth token` on a machine signed in to the [solari CLI](https://solari.sh/docs). With no `token` option the client reads `SOLARI_TOKEN`.
|
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.11";
|
|
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.11";
|
|
5
5
|
export const TOKEN_ENV = "SOLARI_TOKEN";
|
|
6
6
|
const DEFAULT_TIMEOUT_MS = 150_000;
|
|
7
7
|
export class SolariError extends Error {
|
|
@@ -278,11 +278,29 @@ export interface FetchTiktokAccountArgs {
|
|
|
278
278
|
/** TikTok handle, with or without a leading @. */
|
|
279
279
|
"username": string;
|
|
280
280
|
}
|
|
281
|
+
/** Looks TikTok accounts up live by name or handle fragment and returns thin hits in TikTok's own order: username, nickname, bio, verified flag, follower count, profile picture and URL (limit up to 30, default 10). Use it when solari_catalog_tiktok_account_search does not know the account, or when you know a name but not the exact handle. Hits already in the SOLARI catalog carry account_id for the solari_catalog_tiktok_* tools; for the rest account_id is null, so call solari_fetch_tiktok_account with the chosen username to add it. When has_more is true, pass next_cursor back as cursor with the same query for the next page; next_cursor is null on the last page. Nothing is stored. Every call asks TikTok live, takes a few seconds, and is not cached. An empty items list means TikTok matched nothing. Works with any signed-in SOLARI account. */
|
|
282
|
+
export interface FetchTiktokAccountSearchArgs {
|
|
283
|
+
/** Name or handle fragment, with or without a leading @. */
|
|
284
|
+
"query": string;
|
|
285
|
+
/** Maximum hits to return, default 10. Values above 30 are clamped to 30. */
|
|
286
|
+
"limit"?: number | undefined;
|
|
287
|
+
/** next_cursor from the previous response for the same query. Omit for the first page. */
|
|
288
|
+
"cursor"?: string | undefined;
|
|
289
|
+
}
|
|
281
290
|
/** Collects one TikTok post into the SOLARI catalog by its public URL and returns it with its author. Use it when solari_catalog_tiktok_content_detail answers item=null for a link you were given and you do not know who posted it. Accepts https://www.tiktok.com/@<handle>/video/<id> links and vm.tiktok.com / vt.tiktok.com short links. If the post is already stored, nothing is scraped. A first-time collect takes a few seconds. The author arrives as a name-only account: call solari_fetch_tiktok_account with the returned username to crawl their profile and posts. item is null when TikTok has no public post at that URL. The post carries assets with a direct-download asset_url. Works with any signed-in SOLARI account. */
|
|
282
291
|
export interface FetchTiktokPostArgs {
|
|
283
292
|
/** Public TikTok post URL such as https://www.tiktok.com/@<handle>/video/<id>, or a vm.tiktok.com / vt.tiktok.com short link. */
|
|
284
293
|
"url": string;
|
|
285
294
|
}
|
|
295
|
+
/** Searches TikTok live for videos matching a keyword and returns thin hits in TikTok's own relevance order: video_id, url, author username, caption, posted_at, play, like, comment and share counts, duration and cover image (limit up to 30, default 20). Use it when you want what people post on TikTok about a topic, brand or phrase and have no handle to start from. Hits are not stored and carry no post_id; call solari_fetch_tiktok_post with a hit's url to collect and store the full post with its author. When has_more is true, pass next_cursor back as cursor with the same query for the next page; next_cursor is null on the last page. Every call asks TikTok live, takes a few seconds, and is not cached. An empty items list, with a note, means TikTok found no public video for the keyword. Works with any signed-in SOLARI account. */
|
|
296
|
+
export interface FetchTiktokPostSearchArgs {
|
|
297
|
+
/** Keyword or phrase to search TikTok videos for. */
|
|
298
|
+
"query": string;
|
|
299
|
+
/** Maximum videos to return, default 20. Values above 30 are clamped to 30. */
|
|
300
|
+
"limit"?: number | undefined;
|
|
301
|
+
/** next_cursor from the previous response for the same query. Omit for the first page. */
|
|
302
|
+
"cursor"?: string | undefined;
|
|
303
|
+
}
|
|
286
304
|
/** Collects posts for one TikTok account into the SOLARI catalog by exact username. This is not a post listing: use solari_catalog_tiktok_account_posts to read stored rows. If the handle is already stored, nothing is scraped. A first-time ingest can take 10 to 40 seconds and only recent posts exist until the crawl finishes. Works with any signed-in SOLARI account. */
|
|
287
305
|
export interface FetchTiktokPostsArgs {
|
|
288
306
|
/** TikTok handle, with or without a leading @. */
|
|
@@ -690,7 +708,9 @@ export interface SolariToolMap {
|
|
|
690
708
|
"solari_fetch_threads_post_search": FetchThreadsPostSearchArgs;
|
|
691
709
|
"solari_fetch_threads_posts": FetchThreadsPostsArgs;
|
|
692
710
|
"solari_fetch_tiktok_account": FetchTiktokAccountArgs;
|
|
711
|
+
"solari_fetch_tiktok_account_search": FetchTiktokAccountSearchArgs;
|
|
693
712
|
"solari_fetch_tiktok_post": FetchTiktokPostArgs;
|
|
713
|
+
"solari_fetch_tiktok_post_search": FetchTiktokPostSearchArgs;
|
|
694
714
|
"solari_fetch_tiktok_posts": FetchTiktokPostsArgs;
|
|
695
715
|
"solari_insight_instagram_account_ad_posts": InsightInstagramAccountAdPostsArgs;
|
|
696
716
|
"solari_insight_instagram_account_collabs": InsightInstagramAccountCollabsArgs;
|
|
@@ -832,10 +852,18 @@ export interface SolariTools {
|
|
|
832
852
|
posts<T = unknown>(args: FetchThreadsPostsArgs): Promise<T>;
|
|
833
853
|
};
|
|
834
854
|
tiktok: {
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
855
|
+
account: {
|
|
856
|
+
/** 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. */
|
|
857
|
+
<T = unknown>(args: FetchTiktokAccountArgs): Promise<T>;
|
|
858
|
+
/** Looks TikTok accounts up live by name or handle fragment and returns thin hits in TikTok's own order: username, nickname, bio, verified flag, follower count, profile picture and URL (limit up to 30, default 10). Use it when solari_catalog_tiktok_account_search does not know the account, or when you know a name but not the exact handle. Hits already in the SOLARI catalog carry account_id for the solari_catalog_tiktok_* tools; for the rest account_id is null, so call solari_fetch_tiktok_account with the chosen username to add it. When has_more is true, pass next_cursor back as cursor with the same query for the next page; next_cursor is null on the last page. Nothing is stored. Every call asks TikTok live, takes a few seconds, and is not cached. An empty items list means TikTok matched nothing. Works with any signed-in SOLARI account. */
|
|
859
|
+
search<T = unknown>(args: FetchTiktokAccountSearchArgs): Promise<T>;
|
|
860
|
+
};
|
|
861
|
+
post: {
|
|
862
|
+
/** Collects one TikTok post into the SOLARI catalog by its public URL and returns it with its author. Use it when solari_catalog_tiktok_content_detail answers item=null for a link you were given and you do not know who posted it. Accepts https://www.tiktok.com/@<handle>/video/<id> links and vm.tiktok.com / vt.tiktok.com short links. If the post is already stored, nothing is scraped. A first-time collect takes a few seconds. The author arrives as a name-only account: call solari_fetch_tiktok_account with the returned username to crawl their profile and posts. item is null when TikTok has no public post at that URL. The post carries assets with a direct-download asset_url. Works with any signed-in SOLARI account. */
|
|
863
|
+
<T = unknown>(args: FetchTiktokPostArgs): Promise<T>;
|
|
864
|
+
/** Searches TikTok live for videos matching a keyword and returns thin hits in TikTok's own relevance order: video_id, url, author username, caption, posted_at, play, like, comment and share counts, duration and cover image (limit up to 30, default 20). Use it when you want what people post on TikTok about a topic, brand or phrase and have no handle to start from. Hits are not stored and carry no post_id; call solari_fetch_tiktok_post with a hit's url to collect and store the full post with its author. When has_more is true, pass next_cursor back as cursor with the same query for the next page; next_cursor is null on the last page. Every call asks TikTok live, takes a few seconds, and is not cached. An empty items list, with a note, means TikTok found no public video for the keyword. Works with any signed-in SOLARI account. */
|
|
865
|
+
search<T = unknown>(args: FetchTiktokPostSearchArgs): Promise<T>;
|
|
866
|
+
};
|
|
839
867
|
/** Collects posts for one TikTok account into the SOLARI catalog by exact username. This is not a post listing: use solari_catalog_tiktok_account_posts to read stored rows. If the handle is already stored, nothing is scraped. A first-time ingest can take 10 to 40 seconds and only recent posts exist until the crawl finishes. Works with any signed-in SOLARI account. */
|
|
840
868
|
posts<T = unknown>(args: FetchTiktokPostsArgs): Promise<T>;
|
|
841
869
|
};
|
package/dist/tools.generated.js
CHANGED
|
@@ -28,7 +28,9 @@ export const SOLARI_TOOL_NAMES = [
|
|
|
28
28
|
"solari_fetch_threads_post_search",
|
|
29
29
|
"solari_fetch_threads_posts",
|
|
30
30
|
"solari_fetch_tiktok_account",
|
|
31
|
+
"solari_fetch_tiktok_account_search",
|
|
31
32
|
"solari_fetch_tiktok_post",
|
|
33
|
+
"solari_fetch_tiktok_post_search",
|
|
32
34
|
"solari_fetch_tiktok_posts",
|
|
33
35
|
"solari_insight_instagram_account_ad_posts",
|
|
34
36
|
"solari_insight_instagram_account_collabs",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brandazine/solari-sdk",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.11",
|
|
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",
|