creatorriver 0.3.0 → 0.5.0
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 +3 -0
- package/dist/creatorriver.js +204 -49
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -25,11 +25,14 @@ creatorriver account
|
|
|
25
25
|
creatorriver campaigns create --brief "Skincare brand looking for US beauty creators" --status active
|
|
26
26
|
creatorriver creators search --query "US beauty creators reviewing skincare" --platforms youtube,tiktok --campaign-id <campaign-id>
|
|
27
27
|
creatorriver contacts reveal --campaign-id <campaign-id> --creator-id <creator-id>
|
|
28
|
+
creatorriver contacts reveal-batch --campaign-id <campaign-id> --creator-ids <first-id>,<second-id>
|
|
28
29
|
creatorriver emails send --campaign-id <campaign-id> --creator-id <creator-id> --subject "Partnership" --body "Hi! ..."
|
|
29
30
|
creatorriver conversations get --campaign-id <campaign-id> --creator-id <creator-id>
|
|
30
31
|
creatorriver campaigns status --campaign-id <campaign-id>
|
|
31
32
|
```
|
|
32
33
|
|
|
34
|
+
To find new prospects, pass `--exclude-contacted` to `creators search`, `creators browse` or `creators similar`. Use `--exclude-exported` or `--exclude-uploaded` to also omit past exports or the list uploaded on the website. Filtered browsing counts toward the search allowance shown by `account`. For a follow-up in an existing conversation you can omit `--subject`.
|
|
35
|
+
|
|
33
36
|
Every command prints one line of JSON: `{"ok":true,"data":...}` on stdout, or `{"ok":false,"error":{"code","message","requestId"}}` on stderr with an exit code per error: 1 internal, 2 invalid_input, 3 unauthorized, 4 not_found, 5 conflict, 6 insufficient_credits, 7 rate_limited, 8 network_error, 9 login_pending. Each command's `--help` lists its flags, what it costs and what it needs first. `--input-json '{...}'` passes the whole input as JSON.
|
|
34
37
|
|
|
35
38
|
The same operations are available as an MCP server at `https://www.creatorriver.com/api/mcp` and as a REST API at `https://www.creatorriver.com/api/v1`, both with `Authorization: Bearer <key>`.
|
package/dist/creatorriver.js
CHANGED
|
@@ -102,6 +102,9 @@ function fillPath(template, input) {
|
|
|
102
102
|
|
|
103
103
|
// ../contract/src/operations.ts
|
|
104
104
|
import { z as z3 } from "zod";
|
|
105
|
+
var searchId = z3.string().trim().min(1).describe(
|
|
106
|
+
"Search id, from search_creators, find_similar_creators or list_searches"
|
|
107
|
+
);
|
|
105
108
|
var creatorId = z3.string().trim().min(1).describe("Creator id, from search_creators results");
|
|
106
109
|
var campaignId = z3.string().trim().min(1).describe("Campaign id, from list_campaigns or create_campaign");
|
|
107
110
|
var limit = (max, fallback) => z3.number().int().min(1).max(max).optional().describe(`How many to return, 1-${max} (default ${fallback})`);
|
|
@@ -147,9 +150,50 @@ var getAccount = defineOperation({
|
|
|
147
150
|
path: "/account",
|
|
148
151
|
kind: "read",
|
|
149
152
|
summary: "Show the credit balance, prices and today\u2019s usage",
|
|
150
|
-
description: "Returns the credit balance, what each paid action costs, the plan, and today\u2019s usage against the daily limits. Free. Call it first to confirm the API key works, and before spending credits.",
|
|
153
|
+
description: "Returns the credit balance, what each paid action costs, the plan, the maximum results per search, and today\u2019s usage against the daily limits. Free. Call it first to confirm the API key works, and before spending credits.",
|
|
151
154
|
input: z3.object({})
|
|
152
155
|
});
|
|
156
|
+
var accountExclusionFilters = {
|
|
157
|
+
excludeContacted: z3.boolean().optional().describe(
|
|
158
|
+
"Exclude this account\u2019s contacted or do-not-contact creators across all campaigns"
|
|
159
|
+
),
|
|
160
|
+
excludeExported: z3.boolean().optional().describe("Exclude creators this account previously exported"),
|
|
161
|
+
excludeUploaded: z3.boolean().optional().describe("Apply this account\u2019s uploaded prospect exclude list")
|
|
162
|
+
};
|
|
163
|
+
var creatorFilters = {
|
|
164
|
+
...accountExclusionFilters,
|
|
165
|
+
platforms: z3.array(z3.enum(PLATFORMS)).optional().describe("Only creators on these platforms"),
|
|
166
|
+
niches: z3.array(z3.enum(CREATOR_NICHES)).optional().describe(
|
|
167
|
+
"Only creators whose main content is one of these niches. Creators who cover many topics are filed under none, so leave this out for broad lifestyle searches"
|
|
168
|
+
),
|
|
169
|
+
markets: z3.array(z3.string().trim().min(1)).optional().describe(
|
|
170
|
+
"Only creators based in these countries: two-letter codes, e.g. us, gb, jp"
|
|
171
|
+
),
|
|
172
|
+
audienceCountries: z3.array(z3.string().trim().min(1)).optional().describe(
|
|
173
|
+
"Only creators whose largest audience is in these countries: two-letter codes, e.g. us, gb, th"
|
|
174
|
+
),
|
|
175
|
+
languages: z3.array(z3.string().trim().min(1)).optional().describe(
|
|
176
|
+
"Only creators posting in these languages: two-letter codes, e.g. en, es, ja"
|
|
177
|
+
),
|
|
178
|
+
lastPostWithinDays: z3.number().int().refine(
|
|
179
|
+
(days) => LAST_POST_WITHIN_DAYS.includes(days),
|
|
180
|
+
{
|
|
181
|
+
message: "Must be 7, 14, 30, 90 or 180"
|
|
182
|
+
}
|
|
183
|
+
).optional().describe(
|
|
184
|
+
"Only creators whose latest post is at most this many days old: 7, 14, 30, 90 or 180"
|
|
185
|
+
),
|
|
186
|
+
minFollowers: count("At least this many followers"),
|
|
187
|
+
maxFollowers: count("At most this many followers"),
|
|
188
|
+
minAvgViews: count("At least this many average views per post"),
|
|
189
|
+
maxAvgViews: count("At most this many average views per post"),
|
|
190
|
+
minEngagementRate: engagementRate(
|
|
191
|
+
"At least this engagement rate, as a fraction: 0.02 for 2%"
|
|
192
|
+
),
|
|
193
|
+
maxEngagementRate: engagementRate(
|
|
194
|
+
"At most this engagement rate, as a fraction: 0.1 for 10%"
|
|
195
|
+
)
|
|
196
|
+
};
|
|
153
197
|
var searchCreators = defineOperation({
|
|
154
198
|
name: "search_creators",
|
|
155
199
|
command: ["creators", "search"],
|
|
@@ -157,49 +201,43 @@ var searchCreators = defineOperation({
|
|
|
157
201
|
path: "/searches",
|
|
158
202
|
kind: "read",
|
|
159
203
|
summary: "Find creators by description and filters",
|
|
160
|
-
description: "Searches the creator database by meaning: describe the creators you want in plain words (niche, content, audience), and optionally narrow by platform, niche, creator country, audience country, language, size, engagement rate and how recently they posted. To find creators like ones the user already knows, pass their handles or profile links as exampleCreators.
|
|
204
|
+
description: "Searches the creator database by meaning: describe the creators you want in plain words (niche, content, audience), and optionally narrow by platform, niche, creator country, audience country, language, size, engagement rate and how recently they posted. To find creators like ones the user already knows, pass their handles or profile links as exampleCreators. A new search counts toward the daily search allowance and costs no credits. Repeating the same successful search that day uses no extra allowance (see get_account). Results show each creator\u2019s name but no handle or profile link. Pass campaignId to rank against that campaign\u2019s brief and record the search in it.",
|
|
161
205
|
input: z3.object({
|
|
162
206
|
query: z3.string().trim().min(1).max(1e3).describe(
|
|
163
207
|
"The creators you want, in plain words: niche, what their content is like, who watches it"
|
|
164
208
|
),
|
|
165
|
-
platforms: z3.array(z3.enum(PLATFORMS)).optional().describe("Only creators on these platforms"),
|
|
166
|
-
niches: z3.array(z3.enum(CREATOR_NICHES)).optional().describe(
|
|
167
|
-
"Only creators whose main content is one of these niches. Creators who cover many topics are filed under none, so leave this out for broad lifestyle searches"
|
|
168
|
-
),
|
|
169
209
|
exampleCreators: z3.array(z3.string().trim().min(1).max(300)).max(10).optional().describe(
|
|
170
210
|
"Creators to find more like: @handles or profile links, e.g. @mkbhd or https://www.tiktok.com/@khaby.lame. The query still says what they should share. Ones not found are listed in warnings"
|
|
171
211
|
),
|
|
172
|
-
|
|
173
|
-
"Only creators based in these countries: two-letter codes, e.g. us, gb, jp"
|
|
174
|
-
),
|
|
175
|
-
audienceCountries: z3.array(z3.string().trim().min(1)).optional().describe(
|
|
176
|
-
"Only creators whose largest audience is in these countries: two-letter codes, e.g. us, gb, th"
|
|
177
|
-
),
|
|
178
|
-
languages: z3.array(z3.string().trim().min(1)).optional().describe(
|
|
179
|
-
"Only creators posting in these languages: two-letter codes, e.g. en, es, ja"
|
|
180
|
-
),
|
|
181
|
-
lastPostWithinDays: z3.number().int().refine(
|
|
182
|
-
(days) => LAST_POST_WITHIN_DAYS.includes(days),
|
|
183
|
-
{
|
|
184
|
-
message: "Must be 7, 14, 30, 90 or 180"
|
|
185
|
-
}
|
|
186
|
-
).optional().describe(
|
|
187
|
-
"Only creators whose latest post is at most this many days old: 7, 14, 30, 90 or 180"
|
|
188
|
-
),
|
|
189
|
-
minFollowers: count("At least this many followers"),
|
|
190
|
-
maxFollowers: count("At most this many followers"),
|
|
191
|
-
minAvgViews: count("At least this many average views per post"),
|
|
192
|
-
maxAvgViews: count("At most this many average views per post"),
|
|
193
|
-
minEngagementRate: engagementRate(
|
|
194
|
-
"At least this engagement rate, as a fraction: 0.02 for 2%"
|
|
195
|
-
),
|
|
196
|
-
maxEngagementRate: engagementRate(
|
|
197
|
-
"At most this engagement rate, as a fraction: 0.1 for 10%"
|
|
198
|
-
),
|
|
212
|
+
...creatorFilters,
|
|
199
213
|
campaignId: campaignId.optional().describe("Rank for this campaign and record the search in it"),
|
|
200
214
|
limit: limit(100, 20)
|
|
201
215
|
})
|
|
202
216
|
});
|
|
217
|
+
var browseCreators = defineOperation({
|
|
218
|
+
name: "browse_creators",
|
|
219
|
+
command: ["creators", "browse"],
|
|
220
|
+
method: "GET",
|
|
221
|
+
path: "/creators/browse",
|
|
222
|
+
kind: "read",
|
|
223
|
+
summary: "List the biggest creators matching filters",
|
|
224
|
+
description: "Lists the creators that match the filters, most followed first, with no description to match, as the dashboard\u2019s Discover list does before a search. Browsing costs no credits. A filtered list uses the daily search allowance. The default unfiltered list and repeats of the same successful filtered list that day use no allowance. Browse lists stay out of search history. Use it for asks like the biggest beauty creators in the US; use search_creators when the user describes what the content should be about. Results show names but no handles.",
|
|
225
|
+
input: z3.object({ ...creatorFilters, limit: limit(100, 20) })
|
|
226
|
+
});
|
|
227
|
+
var findCreator = defineOperation({
|
|
228
|
+
name: "find_creator",
|
|
229
|
+
command: ["creators", "find"],
|
|
230
|
+
method: "GET",
|
|
231
|
+
path: "/creators/lookup",
|
|
232
|
+
kind: "read",
|
|
233
|
+
summary: "Find a creator by handle or profile link",
|
|
234
|
+
description: "Looks up a creator the user names by @handle or profile link, on every platform where that exact handle is in Creator River, and returns their creatorId for get_creator, add_creator or reveal_contact. Free. An empty list means Creator River does not have them.",
|
|
235
|
+
input: z3.object({
|
|
236
|
+
reference: z3.string().trim().min(1).max(300).describe(
|
|
237
|
+
"An @handle or a profile link, e.g. @mkbhd or https://www.youtube.com/@mkbhd"
|
|
238
|
+
)
|
|
239
|
+
})
|
|
240
|
+
});
|
|
203
241
|
var findSimilarCreators = defineOperation({
|
|
204
242
|
name: "find_similar_creators",
|
|
205
243
|
command: ["creators", "similar"],
|
|
@@ -207,11 +245,12 @@ var findSimilarCreators = defineOperation({
|
|
|
207
245
|
path: "/creators/{creatorId}/similar",
|
|
208
246
|
kind: "read",
|
|
209
247
|
summary: "Find creators like one you already have",
|
|
210
|
-
description: "Finds creators whose content is closest to one creator\u2019s, on the same platform: pass the creatorId of a search result, no handle or unlock needed.
|
|
248
|
+
description: "Finds creators whose content is closest to one creator\u2019s, on the same platform: pass the creatorId of a search result, no handle or unlock needed. A new similar search counts toward the daily search allowance and costs no credits (see get_account). With campaignId, creators already in that campaign or excluded from it are left out. Results show names but no handles, as search_creators does, each with a matchScore from 0 to 1; the search is kept, so list_searches and get_search can read it again.",
|
|
211
249
|
input: z3.object({
|
|
212
250
|
creatorId: creatorId.describe(
|
|
213
251
|
"The creator to find more like, from search_creators or another result"
|
|
214
252
|
),
|
|
253
|
+
...accountExclusionFilters,
|
|
215
254
|
campaignId: campaignId.optional().describe("Leave out creators this campaign already has or excluded"),
|
|
216
255
|
markets: z3.array(z3.string().trim().min(1)).optional().describe(
|
|
217
256
|
"Only creators based in these countries: two-letter codes, e.g. us, gb, jp"
|
|
@@ -236,6 +275,7 @@ var listSearches = defineOperation({
|
|
|
236
275
|
description: "Lists the searches run before, newest first, with their query, filters and how many results they had, including find_similar_creators ones. Free, and does not count against the daily search limit. To see a search\u2019s results again, call get_search instead of searching again.",
|
|
237
276
|
input: z3.object({
|
|
238
277
|
campaignId: campaignId.optional().describe("Only the searches run for this campaign"),
|
|
278
|
+
includeArchived: z3.boolean().optional().describe("Also list archived searches (default false)"),
|
|
239
279
|
page: z3.number().int().min(1).optional().describe("Page number, from 1"),
|
|
240
280
|
limit: limit(100, 20)
|
|
241
281
|
})
|
|
@@ -248,10 +288,43 @@ var getSearch = defineOperation({
|
|
|
248
288
|
kind: "read",
|
|
249
289
|
summary: "Read a past search\u2019s results again",
|
|
250
290
|
description: "Returns a past search and its results, in the order they were ranked, as search_creators returned them. Free, and does not count against the daily search limit.",
|
|
291
|
+
input: z3.object({ searchId })
|
|
292
|
+
});
|
|
293
|
+
var getSearchFilters = defineOperation({
|
|
294
|
+
name: "get_search_filters",
|
|
295
|
+
command: ["searches", "filters"],
|
|
296
|
+
method: "GET",
|
|
297
|
+
path: "/searches/filters",
|
|
298
|
+
kind: "read",
|
|
299
|
+
summary: "List the values the search filters take",
|
|
300
|
+
description: "Returns the values the search and browse filters accept: platforms, creator countries and languages present in the database, niches and activity windows. Free.",
|
|
301
|
+
input: z3.object({})
|
|
302
|
+
});
|
|
303
|
+
var updateSearch = defineOperation({
|
|
304
|
+
name: "update_search",
|
|
305
|
+
command: ["searches", "update"],
|
|
306
|
+
method: "PATCH",
|
|
307
|
+
path: "/searches/{searchId}",
|
|
308
|
+
kind: "write",
|
|
309
|
+
summary: "Rename or archive a past search",
|
|
310
|
+
description: "Names a past search, or archives it so list_searches leaves it out (archived: false brings it back). Free.",
|
|
251
311
|
input: z3.object({
|
|
252
|
-
searchId
|
|
253
|
-
|
|
254
|
-
)
|
|
312
|
+
searchId,
|
|
313
|
+
name: z3.string().trim().min(1).max(80).optional().describe("New name"),
|
|
314
|
+
archived: z3.boolean().optional().describe("true leaves it out of list_searches; false brings it back")
|
|
315
|
+
})
|
|
316
|
+
});
|
|
317
|
+
var exportSearch = defineOperation({
|
|
318
|
+
name: "export_search",
|
|
319
|
+
command: ["searches", "export"],
|
|
320
|
+
method: "GET",
|
|
321
|
+
path: "/searches/{searchId}/export",
|
|
322
|
+
kind: "write",
|
|
323
|
+
summary: "Export a search\u2019s results as CSV",
|
|
324
|
+
description: "Returns a search\u2019s results as CSV text, one row per creator in rank order, as the dashboard\u2019s export does: handles and profile links only for unlocked creators, and emails only for ones already revealed. Exporting costs no credits and records the returned creators as exported for this account. Later searches can omit them with excludeExported. Save csv to a file named filename.",
|
|
325
|
+
input: z3.object({
|
|
326
|
+
searchId,
|
|
327
|
+
scope: z3.enum(["all", "added"]).optional().describe("all results (default), or only the ones added to a campaign")
|
|
255
328
|
})
|
|
256
329
|
});
|
|
257
330
|
var getCreator = defineOperation({
|
|
@@ -277,6 +350,42 @@ var unlockCreator = defineOperation({
|
|
|
277
350
|
description: "Unlocks the creator and returns the full profile with handle, profile link and recent video titles and links. Costs 0.5 credits the first time for each creator; unlocking again is free. It does not reveal the email address; use reveal_contact for that.",
|
|
278
351
|
input: z3.object({ creatorId })
|
|
279
352
|
});
|
|
353
|
+
var saveCreator = defineOperation({
|
|
354
|
+
name: "save_creator",
|
|
355
|
+
command: ["creators", "save"],
|
|
356
|
+
method: "POST",
|
|
357
|
+
path: "/creators/{creatorId}/save",
|
|
358
|
+
kind: "spend",
|
|
359
|
+
summary: "Save a creator to the account\u2019s saved list",
|
|
360
|
+
description: "Saves a creator to the account\u2019s saved list, which is the user\u2019s own bookmarks outside any campaign (the dashboard\u2019s Saved page). Saving unlocks the creator, which costs 0.5 credits the first time for each creator; saving again is free. Pass searchId to remember where they were found.",
|
|
361
|
+
input: z3.object({
|
|
362
|
+
creatorId,
|
|
363
|
+
searchId: z3.string().trim().min(1).optional().describe("The search the creator was found in")
|
|
364
|
+
})
|
|
365
|
+
});
|
|
366
|
+
var unsaveCreator = defineOperation({
|
|
367
|
+
name: "unsave_creator",
|
|
368
|
+
command: ["creators", "unsave"],
|
|
369
|
+
method: "DELETE",
|
|
370
|
+
path: "/creators/{creatorId}/save",
|
|
371
|
+
kind: "write",
|
|
372
|
+
summary: "Remove a creator from the saved list",
|
|
373
|
+
description: "Removes a creator from the account\u2019s saved list. Free; the creator stays unlocked and in any campaign.",
|
|
374
|
+
input: z3.object({ creatorId })
|
|
375
|
+
});
|
|
376
|
+
var listSavedCreators = defineOperation({
|
|
377
|
+
name: "list_saved_creators",
|
|
378
|
+
command: ["creators", "saved"],
|
|
379
|
+
method: "GET",
|
|
380
|
+
path: "/creators/saved",
|
|
381
|
+
kind: "read",
|
|
382
|
+
summary: "List saved creators",
|
|
383
|
+
description: "Lists the creators on the account\u2019s saved list, most recently saved first. Free.",
|
|
384
|
+
input: z3.object({
|
|
385
|
+
page: z3.number().int().min(1).optional().describe("Page number, from 1"),
|
|
386
|
+
limit: limit(100, 20)
|
|
387
|
+
})
|
|
388
|
+
});
|
|
280
389
|
var listCampaigns = defineOperation({
|
|
281
390
|
name: "list_campaigns",
|
|
282
391
|
command: ["campaigns", "list"],
|
|
@@ -347,9 +456,23 @@ var revealContact = defineOperation({
|
|
|
347
456
|
path: "/campaigns/{campaignId}/creators/{creatorId}/contact",
|
|
348
457
|
kind: "spend",
|
|
349
458
|
summary: "Reveal a creator\u2019s email for a campaign",
|
|
350
|
-
description: "Returns the creator\u2019s email address so you can contact them in this campaign, adding the creator to the campaign first if needed. Adding unlocks the creator, which costs 0.5 credits the first time for each creator. Revealing costs 0.2 credits the first time for each creator; revealing again, in any campaign, is free.
|
|
459
|
+
description: "Returns the creator\u2019s email address so you can contact them in this campaign, adding the creator to the campaign first if needed. Adding unlocks the creator, which costs 0.5 credits the first time for each creator. Revealing costs 0.2 credits the first time for each creator; revealing again, in any campaign, is free. Use this or reveal_contacts before send_email.",
|
|
351
460
|
input: z3.object({ campaignId, creatorId })
|
|
352
461
|
});
|
|
462
|
+
var revealContacts = defineOperation({
|
|
463
|
+
name: "reveal_contacts",
|
|
464
|
+
command: ["contacts", "reveal-batch"],
|
|
465
|
+
method: "POST",
|
|
466
|
+
path: "/campaigns/{campaignId}/contacts/reveal",
|
|
467
|
+
kind: "spend",
|
|
468
|
+
summary: "Reveal selected creators\u2019 emails for a campaign",
|
|
469
|
+
description: "Reveals emails for up to 10 selected creators in this campaign. Each available contact is added to the campaign. The first unlock costs 0.5 credits and the first email reveal costs 0.2 credits per creator across the account. Check the budget for the whole selection before calling. Read items for each unique creator in input order: successful items include revealedContact, and other items report why the reveal failed. Earlier successes are kept. Retrying reuses previous charges.",
|
|
470
|
+
input: z3.object({
|
|
471
|
+
campaignId,
|
|
472
|
+
creatorIds: z3.array(creatorId).min(1).max(10).describe("1 to 10 selected creator IDs"),
|
|
473
|
+
searchId: searchId.optional().describe("Mark successful additions in this search")
|
|
474
|
+
})
|
|
475
|
+
});
|
|
353
476
|
var sendEmail = defineOperation({
|
|
354
477
|
name: "send_email",
|
|
355
478
|
command: ["emails", "send"],
|
|
@@ -357,12 +480,16 @@ var sendEmail = defineOperation({
|
|
|
357
480
|
path: "/campaigns/{campaignId}/creators/{creatorId}/emails",
|
|
358
481
|
kind: "send",
|
|
359
482
|
summary: "Email a creator",
|
|
360
|
-
description:
|
|
483
|
+
description: 'Sends a plain-text email to the creator\u2019s revealed address (call reveal_contact first). Replies arrive in the conversation (see get_conversation). A later email to the same creator in the same campaign is a follow-up: it joins the creator\u2019s existing email thread, keeps the conversation\u2019s stage, and copies whoever last replied for the creator (a manager, say); leave subject out to reply as "Re: <subject>". Subject and body can carry variables, filled in for this creator when it is sent, so one draft fits every creator: {name} (how to address them, cleaned from the channel name), {handle} (@handle), {platform}, {followers} (e.g. 75K) and {country}. A misspelled variable, or one this creator has no value for, fails the send with a message naming it. The first 100 emails each day are free; after that each costs 0.1 credits, up to the daily limit (see get_account). Sending the same subject and body to the same creator in the same campaign again returns the first send instead of emailing twice; pass a new idempotencyKey to send it again on purpose, for example after a send that failed.',
|
|
361
484
|
input: z3.object({
|
|
362
485
|
campaignId,
|
|
363
486
|
creatorId,
|
|
364
|
-
subject: z3.string().trim().min(1).max(200).describe(
|
|
365
|
-
|
|
487
|
+
subject: z3.string().trim().min(1).max(200).optional().describe(
|
|
488
|
+
"Email subject. Required for the first email; leave it out on a follow-up to reply in the same thread"
|
|
489
|
+
),
|
|
490
|
+
body: z3.string().trim().min(1).max(5e4).describe(
|
|
491
|
+
"Email body, plain text; may use {name}, {handle}, {platform}, {followers} and {country}"
|
|
492
|
+
),
|
|
366
493
|
idempotencyKey: z3.string().trim().min(1).max(200).optional().describe("Retries with the same key never send twice")
|
|
367
494
|
})
|
|
368
495
|
});
|
|
@@ -373,7 +500,7 @@ var getConversation = defineOperation({
|
|
|
373
500
|
path: "/campaigns/{campaignId}/creators/{creatorId}/conversation",
|
|
374
501
|
kind: "read",
|
|
375
502
|
summary: "Read the email conversation with a creator",
|
|
376
|
-
description: "Returns the email thread with a creator in a campaign: its stage, who it is waiting on, the next action and agreed facts, plus every message and event, oldest first. Free. Check it for replies after send_email. The thread is null until the first email is sent.",
|
|
503
|
+
description: "Returns the email thread with a creator in a campaign: its stage, who it is waiting on, the next action and agreed facts, plus every message and event, oldest first. Free. Check it for replies after send_email. An out-of-office or other automatic answer appears as an auto_reply event and leaves the thread waiting on the creator. The thread is null until the first email is sent.",
|
|
377
504
|
input: z3.object({ campaignId, creatorId })
|
|
378
505
|
});
|
|
379
506
|
var price = z3.string().trim().min(1).max(200).optional().describe("Price the creator named or agreed, as said, e.g. $300 per video");
|
|
@@ -414,6 +541,20 @@ var confirmCollaboration = defineOperation({
|
|
|
414
541
|
liveWindow
|
|
415
542
|
})
|
|
416
543
|
});
|
|
544
|
+
var addCreator = defineOperation({
|
|
545
|
+
name: "add_creator",
|
|
546
|
+
command: ["campaigns", "add"],
|
|
547
|
+
method: "POST",
|
|
548
|
+
path: "/campaigns/{campaignId}/creators/{creatorId}",
|
|
549
|
+
kind: "spend",
|
|
550
|
+
summary: "Shortlist a creator in a campaign",
|
|
551
|
+
description: "Adds a creator to a campaign, at the outreach stage, without revealing the email: use it to build a shortlist before deciding whom to contact (reveal_contact adds the creator too). Adding unlocks the creator, which costs 0.5 credits the first time for each creator; adding again is free. Pass searchId to mark the creator as added in that search. A creator excluded from the campaign cannot be added.",
|
|
552
|
+
input: z3.object({
|
|
553
|
+
campaignId,
|
|
554
|
+
creatorId,
|
|
555
|
+
searchId: z3.string().trim().min(1).optional().describe("The search the creator came from, to mark it added there")
|
|
556
|
+
})
|
|
557
|
+
});
|
|
417
558
|
var excludeCreator = defineOperation({
|
|
418
559
|
name: "exclude_creator",
|
|
419
560
|
command: ["campaigns", "exclude"],
|
|
@@ -421,22 +562,36 @@ var excludeCreator = defineOperation({
|
|
|
421
562
|
path: "/campaigns/{campaignId}/creators/{creatorId}/exclusion",
|
|
422
563
|
kind: "write",
|
|
423
564
|
summary: "Take a creator out of a campaign",
|
|
424
|
-
description: "Takes a creator out of a campaign for good: they move to closed and reveal_contact will
|
|
425
|
-
input: z3.object({
|
|
565
|
+
description: "Takes a creator out of a campaign for good: they move to closed and neither add_creator nor reveal_contact will put them back in this campaign. Their conversation stays readable. Pass searchId to also drop them from that search\u2019s results (get_search). Free; credits already spent are not refunded. Use it when the user rules a creator out.",
|
|
566
|
+
input: z3.object({
|
|
567
|
+
campaignId,
|
|
568
|
+
creatorId,
|
|
569
|
+
searchId: z3.string().trim().min(1).optional().describe("A search to drop the creator from as well")
|
|
570
|
+
})
|
|
426
571
|
});
|
|
427
572
|
var operations = [
|
|
428
573
|
getAccount,
|
|
429
574
|
searchCreators,
|
|
575
|
+
browseCreators,
|
|
576
|
+
findCreator,
|
|
430
577
|
findSimilarCreators,
|
|
431
578
|
listSearches,
|
|
432
579
|
getSearch,
|
|
580
|
+
getSearchFilters,
|
|
581
|
+
updateSearch,
|
|
582
|
+
exportSearch,
|
|
433
583
|
getCreator,
|
|
434
584
|
unlockCreator,
|
|
585
|
+
saveCreator,
|
|
586
|
+
unsaveCreator,
|
|
587
|
+
listSavedCreators,
|
|
435
588
|
listCampaigns,
|
|
436
589
|
createCampaign,
|
|
437
590
|
updateCampaign,
|
|
438
591
|
getCampaignStatus,
|
|
592
|
+
addCreator,
|
|
439
593
|
revealContact,
|
|
594
|
+
revealContacts,
|
|
440
595
|
sendEmail,
|
|
441
596
|
getConversation,
|
|
442
597
|
recordReply,
|
|
@@ -448,7 +603,7 @@ var operations = [
|
|
|
448
603
|
import { Command, CommanderError } from "commander";
|
|
449
604
|
|
|
450
605
|
// package.json
|
|
451
|
-
var version = "0.
|
|
606
|
+
var version = "0.5.0";
|
|
452
607
|
|
|
453
608
|
// src/http.ts
|
|
454
609
|
var DEFAULT_API_URL = "https://www.creatorriver.com";
|
|
@@ -671,12 +826,12 @@ async function waitForLogin(endpoint2, io, login, waitSeconds) {
|
|
|
671
826
|
// src/cli.ts
|
|
672
827
|
var LOGIN_HINT = "run `creatorriver auth login`";
|
|
673
828
|
var GROUP_DESCRIPTIONS = {
|
|
674
|
-
creators: "Find, inspect and
|
|
829
|
+
creators: "Find, inspect, unlock and save creators, and find more like one",
|
|
675
830
|
campaigns: "Create, change and follow campaigns and the creators in them",
|
|
676
|
-
contacts: "Reveal
|
|
831
|
+
contacts: "Reveal email addresses for one or more selected creators",
|
|
677
832
|
emails: "Send outreach emails",
|
|
678
833
|
conversations: "Read email threads with creators and record their replies",
|
|
679
|
-
searches: "
|
|
834
|
+
searches: "Reopen, rename, archive and export past searches, and list filter values"
|
|
680
835
|
};
|
|
681
836
|
function forCli(text, operations2) {
|
|
682
837
|
return operations2.reduce(
|
|
@@ -807,7 +962,7 @@ Exit codes: 0 ok, ${Object.entries(EXIT_CODES).sort(([, a], [, b]) => a - b).map
|
|
|
807
962
|
"the whole input as a JSON object; flags override its fields"
|
|
808
963
|
).action(async (options) => {
|
|
809
964
|
try {
|
|
810
|
-
const parsed = operation.input.safeParse(buildInput(fields, options));
|
|
965
|
+
const parsed = operation.input.strict().safeParse(buildInput(fields, options));
|
|
811
966
|
if (!parsed.success) {
|
|
812
967
|
throw new CliError("invalid_input", "Invalid input", {
|
|
813
968
|
issues: parsed.error.issues.map((issue) => ({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "creatorriver",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "Creator River CLI: search 1.8M+ YouTube, TikTok and Instagram creators, every one with a contact email, and run outreach from your terminal or AI agent",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"creator-river",
|
|
@@ -34,11 +34,11 @@
|
|
|
34
34
|
"zod": "^4.1.5"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@cde/contract": "0.1.0",
|
|
38
37
|
"@types/node": "^20",
|
|
39
38
|
"tsup": "^8.3.6",
|
|
40
39
|
"tsx": "^4.20.3",
|
|
41
|
-
"typescript": "^5"
|
|
40
|
+
"typescript": "^5",
|
|
41
|
+
"@cde/contract": "0.1.0"
|
|
42
42
|
},
|
|
43
43
|
"scripts": {
|
|
44
44
|
"dev": "tsx src/bin/creatorriver.ts",
|