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
|
@@ -1,304 +0,0 @@
|
|
|
1
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
|
|
3
|
-
import { APIResource } from '../core/resource';
|
|
4
|
-
import * as ProfilesAPI from './profiles';
|
|
5
|
-
import { APIPromise } from '../core/api-promise';
|
|
6
|
-
import { RequestOptions } from '../internal/request-options';
|
|
7
|
-
|
|
8
|
-
export class BrandSafety extends APIResource {
|
|
9
|
-
/**
|
|
10
|
-
* Analyze creators for brand safety risks using AI-powered content analysis.
|
|
11
|
-
*
|
|
12
|
-
* This endpoint evaluates creators for potential brand safety issues including
|
|
13
|
-
* controversial content, inappropriate associations, and reputation risks.
|
|
14
|
-
*
|
|
15
|
-
* **Pricing**: 2.0 credits per creator analyzed
|
|
16
|
-
*
|
|
17
|
-
* @example
|
|
18
|
-
* ```ts
|
|
19
|
-
* const response = await client.brandSafety.analyzeCreators({
|
|
20
|
-
* creator_ids: [
|
|
21
|
-
* '123e4567-e89b-12d3-a456-426614174000',
|
|
22
|
-
* '987fcdeb-51a2-43d1-9f12-345678901234',
|
|
23
|
-
* ],
|
|
24
|
-
* });
|
|
25
|
-
* ```
|
|
26
|
-
*/
|
|
27
|
-
analyzeCreators(
|
|
28
|
-
body: BrandSafetyAnalyzeCreatorsParams,
|
|
29
|
-
options?: RequestOptions,
|
|
30
|
-
): APIPromise<BrandSafetyAnalyzeCreatorsResponse> {
|
|
31
|
-
return this._client.post('/v1/brand-safety/creators', { body, ...options });
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* Analyze individual posts for brand safety risks.
|
|
36
|
-
*
|
|
37
|
-
* This endpoint evaluates specific posts for potential brand safety issues.
|
|
38
|
-
*
|
|
39
|
-
* **Pricing**: 0.5 credits per post analyzed
|
|
40
|
-
*
|
|
41
|
-
* @example
|
|
42
|
-
* ```ts
|
|
43
|
-
* const response = await client.brandSafety.analyzePosts({
|
|
44
|
-
* posts: [
|
|
45
|
-
* {
|
|
46
|
-
* platform: 'instagram',
|
|
47
|
-
* url: 'https://www.instagram.com/p/Cx123Sample/',
|
|
48
|
-
* },
|
|
49
|
-
* {
|
|
50
|
-
* platform: 'instagram',
|
|
51
|
-
* post_id: '9876543210987654321',
|
|
52
|
-
* },
|
|
53
|
-
* ],
|
|
54
|
-
* });
|
|
55
|
-
* ```
|
|
56
|
-
*/
|
|
57
|
-
analyzePosts(
|
|
58
|
-
body: BrandSafetyAnalyzePostsParams,
|
|
59
|
-
options?: RequestOptions,
|
|
60
|
-
): APIPromise<BrandSafetyAnalyzePostsResponse> {
|
|
61
|
-
return this._client.post('/v1/brand-safety/posts', { body, ...options });
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
* Analyze social media profiles for brand safety risks.
|
|
66
|
-
*
|
|
67
|
-
* This endpoint evaluates profiles by username for potential brand safety issues.
|
|
68
|
-
*
|
|
69
|
-
* **Pricing**: 2.0 credits per profile analyzed
|
|
70
|
-
*
|
|
71
|
-
* @example
|
|
72
|
-
* ```ts
|
|
73
|
-
* const response = await client.brandSafety.analyzeProfiles({
|
|
74
|
-
* profiles: [
|
|
75
|
-
* { platform: 'instagram', username: 'wellnessdaily' },
|
|
76
|
-
* ],
|
|
77
|
-
* });
|
|
78
|
-
* ```
|
|
79
|
-
*/
|
|
80
|
-
analyzeProfiles(
|
|
81
|
-
body: BrandSafetyAnalyzeProfilesParams,
|
|
82
|
-
options?: RequestOptions,
|
|
83
|
-
): APIPromise<BrandSafetyAnalyzeProfilesResponse> {
|
|
84
|
-
return this._client.post('/v1/brand-safety/profiles', { body, ...options });
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
/**
|
|
89
|
-
* Brand safety analysis results
|
|
90
|
-
*/
|
|
91
|
-
export interface BrandSafetyAnalysis {
|
|
92
|
-
/**
|
|
93
|
-
* Specific safety concerns detected. Empty array = no issues found.
|
|
94
|
-
*/
|
|
95
|
-
flags: Array<BrandSafetyFlag>;
|
|
96
|
-
|
|
97
|
-
metadata: BrandSafetyAnalysis.Metadata;
|
|
98
|
-
|
|
99
|
-
/**
|
|
100
|
-
* Whether the analysis completed successfully
|
|
101
|
-
*/
|
|
102
|
-
ok: boolean;
|
|
103
|
-
|
|
104
|
-
/**
|
|
105
|
-
* Confidence score (0-1) for the rating. >0.8 = high confidence.
|
|
106
|
-
*/
|
|
107
|
-
overall_confidence: number;
|
|
108
|
-
|
|
109
|
-
/**
|
|
110
|
-
* Brand safety rating. A = safe (no risks), B = moderate concerns, C = significant
|
|
111
|
-
* risks.
|
|
112
|
-
*/
|
|
113
|
-
rating: 'A' | 'B' | 'C';
|
|
114
|
-
|
|
115
|
-
/**
|
|
116
|
-
* Detailed reasoning explaining the analysis result. Includes context about
|
|
117
|
-
* content analyzed and decision factors.
|
|
118
|
-
*/
|
|
119
|
-
reasoning: string;
|
|
120
|
-
|
|
121
|
-
/**
|
|
122
|
-
* Human-readable summary of the assessment.
|
|
123
|
-
*/
|
|
124
|
-
summary: string;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
export namespace BrandSafetyAnalysis {
|
|
128
|
-
export interface Metadata {
|
|
129
|
-
/**
|
|
130
|
-
* When the analysis was performed
|
|
131
|
-
*/
|
|
132
|
-
analysis_date: string;
|
|
133
|
-
|
|
134
|
-
/**
|
|
135
|
-
* Information about the content that was analyzed
|
|
136
|
-
*/
|
|
137
|
-
content_analyzed: Metadata.ContentAnalyzed;
|
|
138
|
-
|
|
139
|
-
/**
|
|
140
|
-
* Version of the AI model used for analysis
|
|
141
|
-
*/
|
|
142
|
-
model_version: string;
|
|
143
|
-
|
|
144
|
-
/**
|
|
145
|
-
* Processing time in milliseconds
|
|
146
|
-
*/
|
|
147
|
-
processing_time_ms: number;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
export namespace Metadata {
|
|
151
|
-
/**
|
|
152
|
-
* Information about the content that was analyzed
|
|
153
|
-
*/
|
|
154
|
-
export interface ContentAnalyzed {
|
|
155
|
-
/**
|
|
156
|
-
* Number of posts analyzed (for profile/creator analysis)
|
|
157
|
-
*/
|
|
158
|
-
posts_count?: number;
|
|
159
|
-
|
|
160
|
-
/**
|
|
161
|
-
* Length of text content analyzed
|
|
162
|
-
*/
|
|
163
|
-
text_length?: number;
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
/**
|
|
169
|
-
* Individual brand safety flag with detailed information
|
|
170
|
-
*/
|
|
171
|
-
export interface BrandSafetyFlag {
|
|
172
|
-
/**
|
|
173
|
-
* Confidence score for this specific flag (0-1). Higher values indicate greater
|
|
174
|
-
* certainty about this concern.
|
|
175
|
-
*/
|
|
176
|
-
confidence: number;
|
|
177
|
-
|
|
178
|
-
/**
|
|
179
|
-
* Human-readable description explaining the concern. Provides context about what
|
|
180
|
-
* was detected.
|
|
181
|
-
*/
|
|
182
|
-
description: string;
|
|
183
|
-
|
|
184
|
-
/**
|
|
185
|
-
* Severity level of the concern:
|
|
186
|
-
*
|
|
187
|
-
* - `low`: Minor issue, may be acceptable for some brands
|
|
188
|
-
* - `medium`: Moderate concern, evaluate based on brand guidelines
|
|
189
|
-
* - `high`: Significant risk, likely unsuitable for most brands
|
|
190
|
-
*/
|
|
191
|
-
severity: 'low' | 'medium' | 'high';
|
|
192
|
-
|
|
193
|
-
/**
|
|
194
|
-
* Category of brand safety concern detected:
|
|
195
|
-
*
|
|
196
|
-
* - `adult_sexual_content`: Sexually explicit or suggestive content
|
|
197
|
-
* - `profanity_strong_language`: Profanity or offensive language
|
|
198
|
-
* - `drugs_alcohol_tobacco`: Drug, alcohol, or tobacco-related content
|
|
199
|
-
* - `violence_weapons`: Violent content or weapon references
|
|
200
|
-
* - `hate_discrimination`: Hate speech or discriminatory content
|
|
201
|
-
* - `political_social_issues`: Politically divisive or controversial topics
|
|
202
|
-
* - `misinformation_conspiracy`: Misinformation or conspiracy theories
|
|
203
|
-
* - `misc`: Other brand safety concerns
|
|
204
|
-
*/
|
|
205
|
-
type:
|
|
206
|
-
| 'adult_sexual_content'
|
|
207
|
-
| 'profanity_strong_language'
|
|
208
|
-
| 'drugs_alcohol_tobacco'
|
|
209
|
-
| 'violence_weapons'
|
|
210
|
-
| 'hate_discrimination'
|
|
211
|
-
| 'political_social_issues'
|
|
212
|
-
| 'misinformation_conspiracy'
|
|
213
|
-
| 'misc';
|
|
214
|
-
|
|
215
|
-
/**
|
|
216
|
-
* Specific examples or evidence that triggered this flag. May include post
|
|
217
|
-
* excerpts or contextual information.
|
|
218
|
-
*/
|
|
219
|
-
evidence?: Array<string>;
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
/**
|
|
223
|
-
* Result of brand safety analysis
|
|
224
|
-
*/
|
|
225
|
-
export interface BrandSafetyResult {
|
|
226
|
-
/**
|
|
227
|
-
* Unique identifier for the analysis result
|
|
228
|
-
*/
|
|
229
|
-
id: string;
|
|
230
|
-
|
|
231
|
-
/**
|
|
232
|
-
* Brand safety analysis results
|
|
233
|
-
*/
|
|
234
|
-
analysis: BrandSafetyAnalysis;
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
export interface BrandSafetyAnalyzeCreatorsResponse {
|
|
238
|
-
results?: Array<BrandSafetyResult>;
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
export interface BrandSafetyAnalyzePostsResponse {
|
|
242
|
-
results?: Array<BrandSafetyResult>;
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
export interface BrandSafetyAnalyzeProfilesResponse {
|
|
246
|
-
results?: Array<BrandSafetyResult>;
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
export interface BrandSafetyAnalyzeCreatorsParams {
|
|
250
|
-
/**
|
|
251
|
-
* Creator IDs to analyze
|
|
252
|
-
*/
|
|
253
|
-
creator_ids: Array<string>;
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
export interface BrandSafetyAnalyzePostsParams {
|
|
257
|
-
posts: Array<
|
|
258
|
-
BrandSafetyAnalyzePostsParams.BrandSafetyPostByURL | BrandSafetyAnalyzePostsParams.BrandSafetyPostByID
|
|
259
|
-
>;
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
export namespace BrandSafetyAnalyzePostsParams {
|
|
263
|
-
export interface BrandSafetyPostByURL {
|
|
264
|
-
/**
|
|
265
|
-
* Social media platform hosting the post
|
|
266
|
-
*/
|
|
267
|
-
platform: 'instagram';
|
|
268
|
-
|
|
269
|
-
/**
|
|
270
|
-
* URL of the post to scan
|
|
271
|
-
*/
|
|
272
|
-
url: string;
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
export interface BrandSafetyPostByID {
|
|
276
|
-
/**
|
|
277
|
-
* Social media platform hosting the post
|
|
278
|
-
*/
|
|
279
|
-
platform: 'instagram';
|
|
280
|
-
|
|
281
|
-
/**
|
|
282
|
-
* Platform-specific post identifier
|
|
283
|
-
*/
|
|
284
|
-
post_id: string;
|
|
285
|
-
}
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
export interface BrandSafetyAnalyzeProfilesParams {
|
|
289
|
-
profiles: Array<ProfilesAPI.CreatorReferenceByHandle>;
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
export declare namespace BrandSafety {
|
|
293
|
-
export {
|
|
294
|
-
type BrandSafetyAnalysis as BrandSafetyAnalysis,
|
|
295
|
-
type BrandSafetyFlag as BrandSafetyFlag,
|
|
296
|
-
type BrandSafetyResult as BrandSafetyResult,
|
|
297
|
-
type BrandSafetyAnalyzeCreatorsResponse as BrandSafetyAnalyzeCreatorsResponse,
|
|
298
|
-
type BrandSafetyAnalyzePostsResponse as BrandSafetyAnalyzePostsResponse,
|
|
299
|
-
type BrandSafetyAnalyzeProfilesResponse as BrandSafetyAnalyzeProfilesResponse,
|
|
300
|
-
type BrandSafetyAnalyzeCreatorsParams as BrandSafetyAnalyzeCreatorsParams,
|
|
301
|
-
type BrandSafetyAnalyzePostsParams as BrandSafetyAnalyzePostsParams,
|
|
302
|
-
type BrandSafetyAnalyzeProfilesParams as BrandSafetyAnalyzeProfilesParams,
|
|
303
|
-
};
|
|
304
|
-
}
|
|
@@ -1,186 +0,0 @@
|
|
|
1
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
|
|
3
|
-
import { APIResource } from '../core/resource';
|
|
4
|
-
import * as LookalikeAPI from './lookalike';
|
|
5
|
-
import * as MatchAPI from './match';
|
|
6
|
-
import * as ProfilesAPI from './profiles';
|
|
7
|
-
import * as SearchAPI from './search';
|
|
8
|
-
import { APIPromise } from '../core/api-promise';
|
|
9
|
-
import { RequestOptions } from '../internal/request-options';
|
|
10
|
-
|
|
11
|
-
export class Lookalike extends APIResource {
|
|
12
|
-
/**
|
|
13
|
-
* Find creators similar to your seed creators using AI-powered similarity
|
|
14
|
-
* analysis.
|
|
15
|
-
*
|
|
16
|
-
* This endpoint analyzes your seed creators and finds similar influencers based on
|
|
17
|
-
* audience demographics, content style, and engagement patterns.
|
|
18
|
-
*
|
|
19
|
-
* **Pricing**:
|
|
20
|
-
*
|
|
21
|
-
* - Base: 1.0 credit per creator returned
|
|
22
|
-
* - Detailed mode: Additional 0.05 credits per social account profile
|
|
23
|
-
* - **Example**: 25 lookalike creators in lite mode = 25 credits
|
|
24
|
-
* - **Example**: 25 creators with avg 3 profiles each in detailed mode = 25 + (25
|
|
25
|
-
* × 3 × 0.05) = 28.75 credits
|
|
26
|
-
*/
|
|
27
|
-
findSimilarCreators(
|
|
28
|
-
params: LookalikeFindSimilarCreatorsParams,
|
|
29
|
-
options?: RequestOptions,
|
|
30
|
-
): APIPromise<LookalikeFindSimilarCreatorsResponse> {
|
|
31
|
-
const { cursor, limit, ...body } = params;
|
|
32
|
-
return this._client.post('/v1/lookalike', { query: { cursor, limit }, body, ...options });
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
export interface LookalikeSeedBase {
|
|
37
|
-
/**
|
|
38
|
-
* Weight for this seed in similarity calculation
|
|
39
|
-
*/
|
|
40
|
-
weight?: number;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export interface LookalikeFindSimilarCreatorsResponse {
|
|
44
|
-
/**
|
|
45
|
-
* Current billing plan
|
|
46
|
-
*/
|
|
47
|
-
billing_plan?: string;
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* Credits consumed for this request
|
|
51
|
-
*/
|
|
52
|
-
credits_charged?: number;
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* Features used in this request
|
|
56
|
-
*/
|
|
57
|
-
features?: Array<string>;
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* Total number of results after filtering
|
|
61
|
-
*/
|
|
62
|
-
filtered_total?: number;
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
* Whether there are more results available
|
|
66
|
-
*/
|
|
67
|
-
has_more?: boolean;
|
|
68
|
-
|
|
69
|
-
items?: Array<SearchAPI.SearchItem>;
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
* Cursor for next page of results
|
|
73
|
-
*/
|
|
74
|
-
next_cursor?: string;
|
|
75
|
-
|
|
76
|
-
rate_limit?: LookalikeFindSimilarCreatorsResponse.RateLimit;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
export namespace LookalikeFindSimilarCreatorsResponse {
|
|
80
|
-
export interface RateLimit {
|
|
81
|
-
/**
|
|
82
|
-
* Rate limit for this endpoint
|
|
83
|
-
*/
|
|
84
|
-
limit?: number;
|
|
85
|
-
|
|
86
|
-
/**
|
|
87
|
-
* Remaining requests in current window
|
|
88
|
-
*/
|
|
89
|
-
remaining?: number;
|
|
90
|
-
|
|
91
|
-
/**
|
|
92
|
-
* Unix timestamp when rate limit resets
|
|
93
|
-
*/
|
|
94
|
-
reset?: number;
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
export interface LookalikeFindSimilarCreatorsParams {
|
|
99
|
-
/**
|
|
100
|
-
* Body param: Seed creators to find lookalikes for. Max 10 seeds, each with
|
|
101
|
-
* optional weight (0-10, default 1).
|
|
102
|
-
*/
|
|
103
|
-
seeds: Array<
|
|
104
|
-
| LookalikeFindSimilarCreatorsParams.LookalikeSeedByID
|
|
105
|
-
| LookalikeFindSimilarCreatorsParams.LookalikeSeedByHandle
|
|
106
|
-
>;
|
|
107
|
-
|
|
108
|
-
/**
|
|
109
|
-
* Query param: Opaque pagination cursor from previous response's `next_cursor`. Do
|
|
110
|
-
* not construct manually.
|
|
111
|
-
*/
|
|
112
|
-
cursor?: string;
|
|
113
|
-
|
|
114
|
-
/**
|
|
115
|
-
* Query param: Maximum number of results to return
|
|
116
|
-
*/
|
|
117
|
-
limit?: number;
|
|
118
|
-
|
|
119
|
-
/**
|
|
120
|
-
* Body param:
|
|
121
|
-
*/
|
|
122
|
-
filters?: LookalikeFindSimilarCreatorsParams.Filters;
|
|
123
|
-
|
|
124
|
-
/**
|
|
125
|
-
* Body param: Response detail level
|
|
126
|
-
*/
|
|
127
|
-
mode?: 'lite' | 'detailed';
|
|
128
|
-
|
|
129
|
-
/**
|
|
130
|
-
* Body param: Filter which social media profiles to include in the response for
|
|
131
|
-
* each creator.
|
|
132
|
-
*
|
|
133
|
-
* - If not specified, all profiles for each creator are returned
|
|
134
|
-
* - If specified, only profiles from these platforms are included
|
|
135
|
-
* - This allows you to control which platforms you want to see results from
|
|
136
|
-
* - Independent of your seed creators' platforms - you can mix seed types freely
|
|
137
|
-
* Example: ["instagram"] to only see instagram profiles, ["instagram", "tiktok"]
|
|
138
|
-
* for both
|
|
139
|
-
* - This allows you to get cross-platform creators but only show specific platform
|
|
140
|
-
* profiles
|
|
141
|
-
*/
|
|
142
|
-
profile_platforms?: Array<'instagram' | 'tiktok'>;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
export namespace LookalikeFindSimilarCreatorsParams {
|
|
146
|
-
export interface LookalikeSeedByID extends LookalikeAPI.LookalikeSeedBase, MatchAPI.CreatorReferenceByID {}
|
|
147
|
-
|
|
148
|
-
export interface LookalikeSeedByHandle
|
|
149
|
-
extends LookalikeAPI.LookalikeSeedBase,
|
|
150
|
-
ProfilesAPI.CreatorReferenceByHandle {}
|
|
151
|
-
|
|
152
|
-
export interface Filters {
|
|
153
|
-
audience_size?: Filters.AudienceSize;
|
|
154
|
-
|
|
155
|
-
engagement_rate?: Filters.EngagementRate;
|
|
156
|
-
|
|
157
|
-
/**
|
|
158
|
-
* Filter by platforms
|
|
159
|
-
*/
|
|
160
|
-
platform?: Array<string>;
|
|
161
|
-
|
|
162
|
-
verified?: boolean;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
export namespace Filters {
|
|
166
|
-
export interface AudienceSize {
|
|
167
|
-
max?: number;
|
|
168
|
-
|
|
169
|
-
min?: number;
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
export interface EngagementRate {
|
|
173
|
-
max?: number;
|
|
174
|
-
|
|
175
|
-
min?: number;
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
export declare namespace Lookalike {
|
|
181
|
-
export {
|
|
182
|
-
type LookalikeSeedBase as LookalikeSeedBase,
|
|
183
|
-
type LookalikeFindSimilarCreatorsResponse as LookalikeFindSimilarCreatorsResponse,
|
|
184
|
-
type LookalikeFindSimilarCreatorsParams as LookalikeFindSimilarCreatorsParams,
|
|
185
|
-
};
|
|
186
|
-
}
|
package/src/resources/match.ts
DELETED
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
|
|
3
|
-
import { APIResource } from '../core/resource';
|
|
4
|
-
import * as ProfilesAPI from './profiles';
|
|
5
|
-
import { APIPromise } from '../core/api-promise';
|
|
6
|
-
import { RequestOptions } from '../internal/request-options';
|
|
7
|
-
|
|
8
|
-
export class Match extends APIResource {
|
|
9
|
-
/**
|
|
10
|
-
* Evaluate how well creators align with campaign requirements using AI-powered
|
|
11
|
-
* analysis.
|
|
12
|
-
*
|
|
13
|
-
* Provide creator references and campaign description to receive match scores
|
|
14
|
-
* (0-100), AI decisions (good/neutral/avoid), explanations, and supporting
|
|
15
|
-
* evidence.
|
|
16
|
-
*
|
|
17
|
-
* **Pricing**: 0.1 credits per creator analyzed
|
|
18
|
-
*/
|
|
19
|
-
analyze(body: MatchAnalyzeParams, options?: RequestOptions): APIPromise<MatchAnalyzeResponse> {
|
|
20
|
-
return this._client.post('/v1/match', { body, ...options });
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export interface CreatorReferenceByID {
|
|
25
|
-
/**
|
|
26
|
-
* Unique creator identifier
|
|
27
|
-
*/
|
|
28
|
-
id: string;
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* Platform name (optional when using the ID)
|
|
32
|
-
*/
|
|
33
|
-
platform?: 'instagram';
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
export interface MatchResult {
|
|
37
|
-
creator?: MatchResult.Creator;
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* AI recommendation decision:
|
|
41
|
-
*
|
|
42
|
-
* - `good`: Strong fit for the campaign, recommended
|
|
43
|
-
* - `neutral`: Acceptable fit, evaluate based on other factors
|
|
44
|
-
* - `avoid`: Not recommended for this campaign
|
|
45
|
-
*/
|
|
46
|
-
decision?: 'good' | 'neutral' | 'avoid';
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* Array of specific evidence supporting the match decision. Includes relevant
|
|
50
|
-
* content examples and audience insights.
|
|
51
|
-
*/
|
|
52
|
-
evidence?: Array<string>;
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* Human-readable explanation of the match assessment. Summarizes why this creator
|
|
56
|
-
* fits or doesn't fit the campaign.
|
|
57
|
-
*/
|
|
58
|
-
explanation?: string;
|
|
59
|
-
|
|
60
|
-
/**
|
|
61
|
-
* Match score from 0 to 100 indicating campaign fit.
|
|
62
|
-
*
|
|
63
|
-
* - 80-100: Excellent match
|
|
64
|
-
* - 60-79: Good match
|
|
65
|
-
* - 40-59: Moderate match
|
|
66
|
-
* - 0-39: Poor match
|
|
67
|
-
*/
|
|
68
|
-
match_score?: number;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
export namespace MatchResult {
|
|
72
|
-
export interface Creator {
|
|
73
|
-
id?: string;
|
|
74
|
-
|
|
75
|
-
platform?: 'instagram';
|
|
76
|
-
|
|
77
|
-
username?: string;
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
export interface MatchAnalyzeResponse {
|
|
82
|
-
items?: Array<MatchResult>;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
export interface MatchAnalyzeParams {
|
|
86
|
-
/**
|
|
87
|
-
* Creators to match against campaign. Max 100 creators per request.
|
|
88
|
-
*/
|
|
89
|
-
creators: Array<CreatorReferenceByID | ProfilesAPI.CreatorReferenceByHandle>;
|
|
90
|
-
|
|
91
|
-
search_intent: MatchAnalyzeParams.SearchIntent;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
export namespace MatchAnalyzeParams {
|
|
95
|
-
export interface SearchIntent {
|
|
96
|
-
/**
|
|
97
|
-
* Campaign search intent
|
|
98
|
-
*/
|
|
99
|
-
query: string;
|
|
100
|
-
|
|
101
|
-
/**
|
|
102
|
-
* Additional context for matching
|
|
103
|
-
*/
|
|
104
|
-
context?: string;
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
export declare namespace Match {
|
|
109
|
-
export {
|
|
110
|
-
type CreatorReferenceByID as CreatorReferenceByID,
|
|
111
|
-
type MatchResult as MatchResult,
|
|
112
|
-
type MatchAnalyzeResponse as MatchAnalyzeResponse,
|
|
113
|
-
type MatchAnalyzeParams as MatchAnalyzeParams,
|
|
114
|
-
};
|
|
115
|
-
}
|