influship 0.2.0 → 0.3.2
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/CHANGELOG.md +62 -30
- package/LICENSE +1 -1
- package/README.md +88 -43
- package/client.d.mts +49 -29
- package/client.d.mts.map +1 -1
- package/client.d.ts +49 -29
- package/client.d.ts.map +1 -1
- package/client.js +89 -56
- package/client.js.map +1 -1
- package/client.mjs +89 -56
- package/client.mjs.map +1 -1
- package/core/api-promise.d.mts +2 -2
- package/core/api-promise.d.mts.map +1 -1
- package/core/api-promise.d.ts +2 -2
- package/core/api-promise.d.ts.map +1 -1
- package/core/api-promise.js.map +1 -1
- package/core/api-promise.mjs.map +1 -1
- package/core/error.d.mts +2 -2
- package/core/error.d.mts.map +1 -1
- package/core/error.d.ts +2 -2
- package/core/error.d.ts.map +1 -1
- package/core/error.js +4 -4
- package/core/error.js.map +1 -1
- package/core/error.mjs +2 -2
- package/core/error.mjs.map +1 -1
- package/core/pagination.d.mts +75 -0
- package/core/pagination.d.mts.map +1 -0
- package/core/pagination.d.ts +75 -0
- package/core/pagination.d.ts.map +1 -0
- package/core/pagination.js +139 -0
- package/core/pagination.js.map +1 -0
- package/core/pagination.mjs +132 -0
- package/core/pagination.mjs.map +1 -0
- package/core/resource.d.mts +3 -3
- package/core/resource.d.mts.map +1 -1
- package/core/resource.d.ts +3 -3
- package/core/resource.d.ts.map +1 -1
- package/core/resource.js.map +1 -1
- package/core/resource.mjs.map +1 -1
- package/index.d.mts +4 -3
- package/index.d.mts.map +1 -1
- package/index.d.ts +4 -3
- package/index.d.ts.map +1 -1
- package/index.js +6 -4
- package/index.js.map +1 -1
- package/index.mjs +4 -3
- package/index.mjs.map +1 -1
- package/internal/parse.d.mts +2 -2
- package/internal/parse.d.mts.map +1 -1
- package/internal/parse.d.ts +2 -2
- package/internal/parse.d.ts.map +1 -1
- package/internal/parse.js +5 -0
- package/internal/parse.js.map +1 -1
- package/internal/parse.mjs +5 -0
- package/internal/parse.mjs.map +1 -1
- package/internal/shims.js +1 -1
- package/internal/shims.js.map +1 -1
- package/internal/shims.mjs +1 -1
- package/internal/shims.mjs.map +1 -1
- package/internal/tslib.js +17 -17
- package/internal/uploads.d.mts +4 -4
- package/internal/uploads.d.mts.map +1 -1
- package/internal/uploads.d.ts +4 -4
- package/internal/uploads.d.ts.map +1 -1
- package/internal/uploads.js.map +1 -1
- package/internal/uploads.mjs.map +1 -1
- package/internal/utils/base64.js +2 -2
- package/internal/utils/base64.js.map +1 -1
- package/internal/utils/base64.mjs +3 -3
- package/internal/utils/base64.mjs.map +1 -1
- package/internal/utils/log.d.mts +3 -3
- package/internal/utils/log.d.mts.map +1 -1
- package/internal/utils/log.d.ts +3 -3
- package/internal/utils/log.d.ts.map +1 -1
- package/internal/utils/log.js.map +1 -1
- package/internal/utils/log.mjs.map +1 -1
- package/internal/utils/path.js +1 -1
- package/internal/utils/path.js.map +1 -1
- package/internal/utils/path.mjs +2 -2
- package/internal/utils/path.mjs.map +1 -1
- package/internal/utils/query.d.mts +2 -0
- package/internal/utils/query.d.mts.map +1 -0
- package/internal/utils/query.d.ts +2 -0
- package/internal/utils/query.d.ts.map +1 -0
- package/internal/utils/query.js +10 -0
- package/internal/utils/query.js.map +1 -0
- package/internal/utils/query.mjs +6 -0
- package/internal/utils/query.mjs.map +1 -0
- package/internal/utils/values.js +5 -5
- package/internal/utils/values.js.map +1 -1
- package/internal/utils/values.mjs +6 -6
- package/internal/utils/values.mjs.map +1 -1
- package/internal/utils.d.mts +1 -0
- package/internal/utils.d.ts +1 -0
- package/internal/utils.js +1 -0
- package/internal/utils.js.map +1 -1
- package/internal/utils.mjs +1 -0
- package/package.json +24 -3
- package/pagination.d.mts +2 -0
- package/pagination.d.mts.map +1 -0
- package/pagination.d.ts +2 -0
- package/pagination.d.ts.map +1 -0
- package/pagination.js +6 -0
- package/pagination.js.map +1 -0
- package/pagination.mjs +2 -0
- package/pagination.mjs.map +1 -0
- package/resources/creators.d.mts +326 -247
- package/resources/creators.d.mts.map +1 -1
- package/resources/creators.d.ts +326 -247
- package/resources/creators.d.ts.map +1 -1
- package/resources/creators.js +80 -63
- package/resources/creators.js.map +1 -1
- package/resources/creators.mjs +80 -63
- package/resources/creators.mjs.map +1 -1
- package/resources/health.d.mts +13 -1
- package/resources/health.d.mts.map +1 -1
- package/resources/health.d.ts +13 -1
- package/resources/health.d.ts.map +1 -1
- package/resources/health.js +4 -1
- package/resources/health.js.map +1 -1
- package/resources/health.mjs +4 -1
- package/resources/health.mjs.map +1 -1
- package/resources/index.d.mts +6 -7
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +6 -7
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +5 -7
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +2 -3
- package/resources/index.mjs.map +1 -1
- package/resources/posts.d.mts +82 -202
- package/resources/posts.d.mts.map +1 -1
- package/resources/posts.d.ts +82 -202
- package/resources/posts.d.ts.map +1 -1
- package/resources/posts.js +17 -38
- package/resources/posts.js.map +1 -1
- package/resources/posts.mjs +17 -38
- package/resources/posts.mjs.map +1 -1
- package/resources/profiles.d.mts +208 -58
- package/resources/profiles.d.mts.map +1 -1
- package/resources/profiles.d.ts +208 -58
- package/resources/profiles.d.ts.map +1 -1
- package/resources/profiles.js +37 -41
- package/resources/profiles.js.map +1 -1
- package/resources/profiles.mjs +37 -41
- package/resources/profiles.mjs.map +1 -1
- package/resources/raw/index.d.mts +4 -0
- package/resources/raw/index.d.mts.map +1 -0
- package/resources/raw/index.d.ts +4 -0
- package/resources/raw/index.d.ts.map +1 -0
- package/resources/raw/index.js +11 -0
- package/resources/raw/index.js.map +1 -0
- package/resources/raw/index.mjs +5 -0
- package/resources/raw/index.mjs.map +1 -0
- package/resources/raw/instagram.d.mts +215 -0
- package/resources/raw/instagram.d.mts.map +1 -0
- package/resources/raw/instagram.d.ts +215 -0
- package/resources/raw/instagram.d.ts.map +1 -0
- package/resources/raw/instagram.js +31 -0
- package/resources/raw/instagram.js.map +1 -0
- package/resources/raw/instagram.mjs +27 -0
- package/resources/raw/instagram.mjs.map +1 -0
- package/resources/raw/raw.d.mts +14 -0
- package/resources/raw/raw.d.mts.map +1 -0
- package/resources/raw/raw.d.ts +14 -0
- package/resources/raw/raw.d.ts.map +1 -0
- package/resources/raw/raw.js +21 -0
- package/resources/raw/raw.js.map +1 -0
- package/resources/raw/raw.mjs +16 -0
- package/resources/raw/raw.mjs.map +1 -0
- package/resources/raw/youtube.d.mts +455 -0
- package/resources/raw/youtube.d.mts.map +1 -0
- package/resources/raw/youtube.d.ts +455 -0
- package/resources/raw/youtube.d.ts.map +1 -0
- package/resources/raw/youtube.js +61 -0
- package/resources/raw/youtube.js.map +1 -0
- package/resources/raw/youtube.mjs +57 -0
- package/resources/raw/youtube.mjs.map +1 -0
- package/resources/raw.d.mts +2 -0
- package/resources/raw.d.mts.map +1 -0
- package/resources/raw.d.ts +2 -0
- package/resources/raw.d.ts.map +1 -0
- package/resources/raw.js +6 -0
- package/resources/raw.js.map +1 -0
- package/resources/raw.mjs +3 -0
- package/resources/raw.mjs.map +1 -0
- package/resources/search.d.mts +126 -117
- package/resources/search.d.mts.map +1 -1
- package/resources/search.d.ts +126 -117
- package/resources/search.d.ts.map +1 -1
- package/resources/search.js +46 -13
- package/resources/search.js.map +1 -1
- package/resources/search.mjs +46 -13
- package/resources/search.mjs.map +1 -1
- package/resources/shared.d.mts +55 -0
- package/resources/shared.d.mts.map +1 -0
- package/resources/shared.d.ts +55 -0
- package/resources/shared.d.ts.map +1 -0
- package/resources/shared.js +4 -0
- package/resources/shared.js.map +1 -0
- package/resources/shared.mjs +3 -0
- package/resources/shared.mjs.map +1 -0
- package/src/client.ts +153 -127
- package/src/core/api-promise.ts +4 -4
- package/src/core/error.ts +2 -2
- package/src/core/pagination.ts +232 -0
- package/src/core/resource.ts +3 -3
- package/src/index.ts +4 -3
- package/src/internal/parse.ts +8 -2
- package/src/internal/shims.ts +1 -1
- package/src/internal/uploads.ts +5 -5
- package/src/internal/utils/base64.ts +3 -3
- package/src/internal/utils/log.ts +3 -3
- package/src/internal/utils/path.ts +2 -2
- package/src/internal/utils/query.ts +7 -0
- package/src/internal/utils/values.ts +6 -6
- package/src/internal/utils.ts +1 -0
- package/src/pagination.ts +2 -0
- package/src/resources/creators.ts +369 -271
- package/src/resources/health.ts +13 -1
- package/src/resources/index.ts +22 -41
- package/src/resources/posts.ts +89 -232
- package/src/resources/profiles.ts +252 -59
- package/src/resources/raw/index.ts +16 -0
- package/src/resources/raw/instagram.ts +271 -0
- package/src/resources/raw/raw.ts +47 -0
- package/src/resources/raw/youtube.ts +585 -0
- package/src/resources/raw.ts +3 -0
- package/src/resources/search.ts +145 -131
- package/src/resources/shared.ts +66 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
- package/resources/brand-safety.d.mts +0 -234
- package/resources/brand-safety.d.mts.map +0 -1
- package/resources/brand-safety.d.ts +0 -234
- package/resources/brand-safety.d.ts.map +0 -1
- package/resources/brand-safety.js +0 -75
- package/resources/brand-safety.js.map +0 -1
- package/resources/brand-safety.mjs +0 -71
- package/resources/brand-safety.mjs.map +0 -1
- package/resources/lookalike.d.mts +0 -142
- package/resources/lookalike.d.mts.map +0 -1
- package/resources/lookalike.d.ts +0 -142
- package/resources/lookalike.d.ts.map +0 -1
- package/resources/lookalike.js +0 -28
- package/resources/lookalike.js.map +0 -1
- package/resources/lookalike.mjs +0 -24
- package/resources/lookalike.mjs.map +0 -1
- package/resources/match.d.mts +0 -90
- package/resources/match.d.mts.map +0 -1
- package/resources/match.d.ts +0 -90
- package/resources/match.d.ts.map +0 -1
- package/resources/match.js +0 -22
- package/resources/match.js.map +0 -1
- package/resources/match.mjs +0 -18
- package/resources/match.mjs.map +0 -1
- package/src/resources/brand-safety.ts +0 -304
- package/src/resources/lookalike.ts +0 -186
- package/src/resources/match.ts +0 -115
package/resources/index.js
CHANGED
|
@@ -1,21 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.Search = exports.
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
exports.Search = exports.Raw = exports.Profiles = exports.Posts = exports.Health = exports.Creators = void 0;
|
|
5
|
+
const tslib_1 = require("../internal/tslib.js");
|
|
6
|
+
tslib_1.__exportStar(require("./shared.js"), exports);
|
|
7
7
|
var creators_1 = require("./creators.js");
|
|
8
8
|
Object.defineProperty(exports, "Creators", { enumerable: true, get: function () { return creators_1.Creators; } });
|
|
9
9
|
var health_1 = require("./health.js");
|
|
10
10
|
Object.defineProperty(exports, "Health", { enumerable: true, get: function () { return health_1.Health; } });
|
|
11
|
-
var lookalike_1 = require("./lookalike.js");
|
|
12
|
-
Object.defineProperty(exports, "Lookalike", { enumerable: true, get: function () { return lookalike_1.Lookalike; } });
|
|
13
|
-
var match_1 = require("./match.js");
|
|
14
|
-
Object.defineProperty(exports, "Match", { enumerable: true, get: function () { return match_1.Match; } });
|
|
15
11
|
var posts_1 = require("./posts.js");
|
|
16
12
|
Object.defineProperty(exports, "Posts", { enumerable: true, get: function () { return posts_1.Posts; } });
|
|
17
13
|
var profiles_1 = require("./profiles.js");
|
|
18
14
|
Object.defineProperty(exports, "Profiles", { enumerable: true, get: function () { return profiles_1.Profiles; } });
|
|
15
|
+
var raw_1 = require("./raw/raw.js");
|
|
16
|
+
Object.defineProperty(exports, "Raw", { enumerable: true, get: function () { return raw_1.Raw; } });
|
|
19
17
|
var search_1 = require("./search.js");
|
|
20
18
|
Object.defineProperty(exports, "Search", { enumerable: true, get: function () { return search_1.Search; } });
|
|
21
19
|
//# sourceMappingURL=index.js.map
|
package/resources/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":";AAAA,sFAAsF
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,sDAAyB;AACzB,0CAWoB;AAVlB,oGAAA,QAAQ,OAAA;AAWV,sCAA4D;AAAnD,gGAAA,MAAM,OAAA;AACf,oCAKiB;AAJf,8FAAA,KAAK,OAAA;AAKP,0CAUoB;AATlB,oGAAA,QAAQ,OAAA;AAUV,oCAAgC;AAAvB,0FAAA,GAAG,OAAA;AACZ,sCAQkB;AAPhB,gGAAA,MAAM,OAAA"}
|
package/resources/index.mjs
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
export
|
|
2
|
+
export * from "./shared.mjs";
|
|
3
3
|
export { Creators, } from "./creators.mjs";
|
|
4
4
|
export { Health } from "./health.mjs";
|
|
5
|
-
export { Lookalike, } from "./lookalike.mjs";
|
|
6
|
-
export { Match, } from "./match.mjs";
|
|
7
5
|
export { Posts, } from "./posts.mjs";
|
|
8
6
|
export { Profiles, } from "./profiles.mjs";
|
|
7
|
+
export { Raw } from "./raw/raw.mjs";
|
|
9
8
|
export { Search, } from "./search.mjs";
|
|
10
9
|
//# sourceMappingURL=index.mjs.map
|
package/resources/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAAA,sFAAsF
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;;OAG/E,EACL,QAAQ,GAUT;OACM,EAAE,MAAM,EAA4B;OACpC,EACL,KAAK,GAIN;OACM,EACL,QAAQ,GAST;OACM,EAAE,GAAG,EAAE;OACP,EACL,MAAM,GAOP"}
|
package/resources/posts.d.mts
CHANGED
|
@@ -1,284 +1,164 @@
|
|
|
1
1
|
import { APIResource } from "../core/resource.mjs";
|
|
2
|
-
import
|
|
3
|
-
import { APIPromise } from "../core/api-promise.mjs";
|
|
2
|
+
import { PagePromise, QueryCursor, type QueryCursorParams } from "../core/pagination.mjs";
|
|
4
3
|
import { RequestOptions } from "../internal/request-options.mjs";
|
|
4
|
+
/**
|
|
5
|
+
* Retrieve and analyze social media posts with engagement metrics, media content, and performance data.
|
|
6
|
+
*/
|
|
5
7
|
export declare class Posts extends APIResource {
|
|
6
8
|
/**
|
|
7
|
-
*
|
|
8
|
-
* safety.
|
|
9
|
-
*
|
|
10
|
-
* Provide post via URL or post_id+platform. Optionally include AI analysis and/or
|
|
11
|
-
* brand safety features.
|
|
12
|
-
*
|
|
13
|
-
* **Pricing**:
|
|
9
|
+
* Retrieve posts for a creator or profile with engagement metrics and media data.
|
|
14
10
|
*
|
|
15
|
-
*
|
|
16
|
-
* - AI Analysis feature: +0.5 credits (includes summary and transcript)
|
|
17
|
-
* - Brand Safety feature: +0.5 credits (includes rating and risk flags)
|
|
18
|
-
* - **Example**: 1 post with both features = 1.0 + 0.5 + 0.5 = 2.0 credits
|
|
11
|
+
* **Query options:**
|
|
19
12
|
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
* const postAnalysis = await client.posts.analyze({
|
|
23
|
-
* url: 'https://example.com',
|
|
24
|
-
* });
|
|
25
|
-
* ```
|
|
26
|
-
*/
|
|
27
|
-
analyze(body: PostAnalyzeParams, options?: RequestOptions): APIPromise<PostAnalysis>;
|
|
28
|
-
/**
|
|
29
|
-
* Retrieve posts for a specific creator using cursor-based pagination.
|
|
13
|
+
* - By creator: Use `creator_id` to get posts across all their profiles
|
|
14
|
+
* - By profile: Use `platform` + `username` for a specific profile's posts
|
|
30
15
|
*
|
|
31
|
-
*
|
|
32
|
-
* with optional analysis features and date filtering.
|
|
16
|
+
* **Sort options:**
|
|
33
17
|
*
|
|
34
|
-
*
|
|
18
|
+
* - `recent`: Most recent posts first (default)
|
|
19
|
+
* - `top_engagement`: Highest engagement rate first
|
|
20
|
+
* - `most_likes`: Most likes first
|
|
21
|
+
* - `most_views`: Most views first (video content)
|
|
22
|
+
* - `most_comments`: Most comments first
|
|
35
23
|
*
|
|
36
|
-
*
|
|
37
|
-
* - The more posts you request, the more you pay
|
|
38
|
-
* - Use the `limit` parameter to control costs
|
|
39
|
-
* - **Example**: 25 posts = 0.25 credits
|
|
40
|
-
* - **Example**: 100 posts = 1.0 credit
|
|
41
|
-
*
|
|
42
|
-
* @example
|
|
43
|
-
* ```ts
|
|
44
|
-
* const response = await client.posts.listByCreator();
|
|
45
|
-
* ```
|
|
24
|
+
* **Pricing**: 0.05 credits per post returned ($0.0005)
|
|
46
25
|
*/
|
|
47
|
-
|
|
26
|
+
list(query?: PostListParams | null | undefined, options?: RequestOptions): PagePromise<PostListResponsesQueryCursor, PostListResponse>;
|
|
48
27
|
}
|
|
28
|
+
export type PostListResponsesQueryCursor = QueryCursor<PostListResponse>;
|
|
49
29
|
/**
|
|
50
|
-
*
|
|
51
|
-
* requested.
|
|
30
|
+
* Full post details
|
|
52
31
|
*/
|
|
53
|
-
export interface
|
|
32
|
+
export interface PostListResponse {
|
|
54
33
|
/**
|
|
55
|
-
*
|
|
34
|
+
* Post unique identifier
|
|
56
35
|
*/
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* Transcription of spoken words in video. null for photo posts or videos without
|
|
60
|
-
* speech.
|
|
61
|
-
*/
|
|
62
|
-
transcript?: string | null;
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* Cursor-based pagination metadata. Use this to navigate through paginated results
|
|
66
|
-
* efficiently.
|
|
67
|
-
*/
|
|
68
|
-
export interface CursorPagination {
|
|
36
|
+
id: string;
|
|
69
37
|
/**
|
|
70
|
-
*
|
|
71
|
-
*
|
|
72
|
-
* - `true`: Additional pages exist, use the `cursor` to fetch them
|
|
73
|
-
* - `false`: This is the last page of results
|
|
38
|
+
* Post caption
|
|
74
39
|
*/
|
|
75
|
-
|
|
40
|
+
caption: string | null;
|
|
76
41
|
/**
|
|
77
|
-
*
|
|
78
|
-
* as the `cursor` query parameter in your next request. null when `has_more` is
|
|
79
|
-
* false (no more pages available). Do not attempt to decode or construct cursor
|
|
80
|
-
* values manually.
|
|
42
|
+
* Hashtags used in the post
|
|
81
43
|
*/
|
|
82
|
-
|
|
83
|
-
}
|
|
84
|
-
/**
|
|
85
|
-
* Analysis result for a single social media post
|
|
86
|
-
*/
|
|
87
|
-
export interface PostAnalysis {
|
|
44
|
+
hashtags: Array<string>;
|
|
88
45
|
/**
|
|
89
|
-
*
|
|
46
|
+
* Post location information
|
|
90
47
|
*/
|
|
91
|
-
|
|
48
|
+
location: PostListResponse.Location | null;
|
|
92
49
|
/**
|
|
93
|
-
*
|
|
50
|
+
* Post media information
|
|
94
51
|
*/
|
|
95
|
-
|
|
52
|
+
media: PostListResponse.Media;
|
|
96
53
|
/**
|
|
97
|
-
*
|
|
98
|
-
* for photo posts.
|
|
54
|
+
* Usernames mentioned in the post
|
|
99
55
|
*/
|
|
100
|
-
|
|
56
|
+
mentions: Array<string>;
|
|
101
57
|
/**
|
|
102
|
-
*
|
|
103
|
-
* first item.
|
|
58
|
+
* Post engagement metrics
|
|
104
59
|
*/
|
|
105
|
-
|
|
60
|
+
metrics: PostListResponse.Metrics;
|
|
106
61
|
/**
|
|
107
62
|
* Social media platform
|
|
108
63
|
*/
|
|
109
|
-
platform: 'instagram'
|
|
64
|
+
platform: 'instagram';
|
|
110
65
|
/**
|
|
111
|
-
* Platform-specific
|
|
112
|
-
* (Instagram: numeric ID, TikTok: alphanumeric).
|
|
66
|
+
* Platform-specific post ID
|
|
113
67
|
*/
|
|
114
|
-
|
|
68
|
+
platform_id: string;
|
|
115
69
|
/**
|
|
116
|
-
*
|
|
70
|
+
* Post timestamp
|
|
117
71
|
*/
|
|
118
72
|
posted_at: string;
|
|
119
73
|
/**
|
|
120
|
-
*
|
|
121
|
-
* image content. null if unavailable.
|
|
122
|
-
*/
|
|
123
|
-
accessibility_caption?: string | null;
|
|
124
|
-
/**
|
|
125
|
-
* AI-powered content analysis. Only present when `ai_analysis` feature is
|
|
126
|
-
* requested.
|
|
127
|
-
*/
|
|
128
|
-
ai_analysis?: AIAnalysis;
|
|
129
|
-
/**
|
|
130
|
-
* Brand safety analysis results
|
|
131
|
-
*/
|
|
132
|
-
brand_safety?: BrandSafetyAPI.BrandSafetyAnalysis;
|
|
133
|
-
/**
|
|
134
|
-
* Post caption text written by the creator. null if no caption was provided.
|
|
135
|
-
*/
|
|
136
|
-
caption?: string | null;
|
|
137
|
-
/**
|
|
138
|
-
* Total comments on post. null if unavailable.
|
|
139
|
-
*/
|
|
140
|
-
comments_count?: number | null;
|
|
141
|
-
/**
|
|
142
|
-
* Total likes on post. null if platform hides like counts or data unavailable.
|
|
143
|
-
*/
|
|
144
|
-
likes_count?: number | null;
|
|
145
|
-
/**
|
|
146
|
-
* Array of all media URLs in this post. Contains multiple items for carousel
|
|
147
|
-
* posts, single item for regular posts.
|
|
74
|
+
* Profile unique identifier
|
|
148
75
|
*/
|
|
149
|
-
|
|
76
|
+
profile_id: string;
|
|
150
77
|
/**
|
|
151
|
-
*
|
|
152
|
-
* accurate as of this time.
|
|
78
|
+
* Type of post
|
|
153
79
|
*/
|
|
154
|
-
|
|
80
|
+
type: 'image' | 'video' | 'carousel' | 'reel' | 'story';
|
|
155
81
|
/**
|
|
156
|
-
*
|
|
157
|
-
* present for Instagram posts, null for other platforms.
|
|
82
|
+
* Post URL
|
|
158
83
|
*/
|
|
159
|
-
|
|
160
|
-
/**
|
|
161
|
-
* Thumbnail image URL for video posts. Only present when is_video is true, null
|
|
162
|
-
* for photo posts.
|
|
163
|
-
*/
|
|
164
|
-
thumbnail_url?: string | null;
|
|
165
|
-
/**
|
|
166
|
-
* Video length in seconds. null for photo posts.
|
|
167
|
-
*/
|
|
168
|
-
video_duration_seconds?: number | null;
|
|
169
|
-
/**
|
|
170
|
-
* Video view count. null for photo posts or if unavailable.
|
|
171
|
-
*/
|
|
172
|
-
video_view_count?: number | null;
|
|
84
|
+
url: string;
|
|
173
85
|
}
|
|
174
|
-
export declare namespace
|
|
86
|
+
export declare namespace PostListResponse {
|
|
175
87
|
/**
|
|
176
|
-
*
|
|
88
|
+
* Post location information
|
|
177
89
|
*/
|
|
178
|
-
interface
|
|
179
|
-
/**
|
|
180
|
-
* Creator UUID
|
|
181
|
-
*/
|
|
182
|
-
id: string;
|
|
90
|
+
interface Location {
|
|
183
91
|
/**
|
|
184
|
-
*
|
|
92
|
+
* Location name
|
|
185
93
|
*/
|
|
186
|
-
|
|
187
|
-
/**
|
|
188
|
-
* Social media username
|
|
189
|
-
*/
|
|
190
|
-
username: string;
|
|
94
|
+
name: string | null;
|
|
191
95
|
}
|
|
192
|
-
}
|
|
193
|
-
/**
|
|
194
|
-
* Response for getting posts by creator
|
|
195
|
-
*/
|
|
196
|
-
export interface PostListByCreatorResponse {
|
|
197
|
-
/**
|
|
198
|
-
* Cursor-based pagination metadata. Use this to navigate through paginated results
|
|
199
|
-
* efficiently.
|
|
200
|
-
*/
|
|
201
|
-
pagination: CursorPagination;
|
|
202
96
|
/**
|
|
203
|
-
*
|
|
97
|
+
* Post media information
|
|
204
98
|
*/
|
|
205
|
-
|
|
206
|
-
}
|
|
207
|
-
export type PostAnalyzeParams = PostAnalyzeParams.Variant0 | PostAnalyzeParams.Variant1;
|
|
208
|
-
export declare namespace PostAnalyzeParams {
|
|
209
|
-
interface Variant0 {
|
|
99
|
+
interface Media {
|
|
210
100
|
/**
|
|
211
|
-
*
|
|
101
|
+
* Video duration in seconds
|
|
212
102
|
*/
|
|
213
|
-
|
|
103
|
+
duration_seconds: number | null;
|
|
214
104
|
/**
|
|
215
|
-
*
|
|
105
|
+
* Thumbnail URL
|
|
216
106
|
*/
|
|
217
|
-
|
|
107
|
+
thumbnail_url: string | null;
|
|
218
108
|
/**
|
|
219
|
-
*
|
|
109
|
+
* Media URL
|
|
220
110
|
*/
|
|
221
|
-
|
|
111
|
+
url: string | null;
|
|
222
112
|
/**
|
|
223
|
-
*
|
|
113
|
+
* Video URL (for video content)
|
|
224
114
|
*/
|
|
225
|
-
|
|
115
|
+
video_url: string | null;
|
|
226
116
|
}
|
|
227
|
-
|
|
117
|
+
/**
|
|
118
|
+
* Post engagement metrics
|
|
119
|
+
*/
|
|
120
|
+
interface Metrics {
|
|
228
121
|
/**
|
|
229
|
-
*
|
|
122
|
+
* Comment count
|
|
230
123
|
*/
|
|
231
|
-
|
|
124
|
+
comments: number | null;
|
|
232
125
|
/**
|
|
233
|
-
*
|
|
126
|
+
* Engagement rate for this post as a percentage (e.g. 3.8 means 3.8%)
|
|
234
127
|
*/
|
|
235
|
-
|
|
128
|
+
engagement_rate: number | null;
|
|
236
129
|
/**
|
|
237
|
-
*
|
|
130
|
+
* Like count
|
|
238
131
|
*/
|
|
239
|
-
|
|
132
|
+
likes: number | null;
|
|
240
133
|
/**
|
|
241
|
-
*
|
|
134
|
+
* Share count
|
|
242
135
|
*/
|
|
243
|
-
|
|
136
|
+
shares: number | null;
|
|
137
|
+
/**
|
|
138
|
+
* View count (for video content)
|
|
139
|
+
*/
|
|
140
|
+
views: number | null;
|
|
244
141
|
}
|
|
245
142
|
}
|
|
246
|
-
export interface
|
|
143
|
+
export interface PostListParams extends QueryCursorParams {
|
|
247
144
|
/**
|
|
248
|
-
* Creator
|
|
145
|
+
* Creator ID (use this OR platform+username)
|
|
249
146
|
*/
|
|
250
147
|
creator_id?: string;
|
|
251
148
|
/**
|
|
252
|
-
*
|
|
253
|
-
*/
|
|
254
|
-
cursor?: string;
|
|
255
|
-
/**
|
|
256
|
-
* Start date for filtering posts (ISO 8601)
|
|
149
|
+
* Platform (required with username)
|
|
257
150
|
*/
|
|
258
|
-
|
|
151
|
+
platform?: 'instagram';
|
|
259
152
|
/**
|
|
260
|
-
*
|
|
261
|
-
*/
|
|
262
|
-
date_to?: string;
|
|
263
|
-
/**
|
|
264
|
-
* Optional analysis features. `ai_analysis` adds summary/transcript.
|
|
265
|
-
* `brand_safety` adds rating/flags. Each feature has additional cost.
|
|
266
|
-
*/
|
|
267
|
-
features?: Array<'ai_analysis' | 'brand_safety'>;
|
|
268
|
-
/**
|
|
269
|
-
* Number of posts per page. Min 1, max 100, default 25.
|
|
270
|
-
*/
|
|
271
|
-
limit?: number;
|
|
272
|
-
/**
|
|
273
|
-
* Social media platform
|
|
153
|
+
* Sort order
|
|
274
154
|
*/
|
|
275
|
-
|
|
155
|
+
sort?: 'recent' | 'top_engagement' | 'most_likes' | 'most_views' | 'most_comments';
|
|
276
156
|
/**
|
|
277
|
-
*
|
|
157
|
+
* Username (required with platform)
|
|
278
158
|
*/
|
|
279
159
|
username?: string;
|
|
280
160
|
}
|
|
281
161
|
export declare namespace Posts {
|
|
282
|
-
export { type
|
|
162
|
+
export { type PostListResponse as PostListResponse, type PostListResponsesQueryCursor as PostListResponsesQueryCursor, type PostListParams as PostListParams, };
|
|
283
163
|
}
|
|
284
164
|
//# sourceMappingURL=posts.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"posts.d.mts","sourceRoot":"","sources":["../src/resources/posts.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,
|
|
1
|
+
{"version":3,"file":"posts.d.mts","sourceRoot":"","sources":["../src/resources/posts.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,WAAW,EAAE,WAAW,EAAE,KAAK,iBAAiB,EAAE;OACpD,EAAE,cAAc,EAAE;AAEzB;;GAEG;AACH,qBAAa,KAAM,SAAQ,WAAW;IACpC;;;;;;;;;;;;;;;;;OAiBG;IACH,IAAI,CACF,KAAK,GAAE,cAAc,GAAG,IAAI,GAAG,SAAc,EAC7C,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,4BAA4B,EAAE,gBAAgB,CAAC;CAG/D;AAED,MAAM,MAAM,4BAA4B,GAAG,WA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