creatorriver 0.2.2 → 0.4.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/dist/creatorriver.js +322 -28
- package/package.json +1 -1
package/dist/creatorriver.js
CHANGED
|
@@ -102,13 +102,41 @@ 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})`);
|
|
108
111
|
var count = (what) => z3.number().int().min(0).optional().describe(what);
|
|
109
112
|
var PLATFORMS = ["youtube", "instagram", "tiktok"];
|
|
110
113
|
var LAST_POST_WITHIN_DAYS = [7, 14, 30, 90, 180];
|
|
114
|
+
var CREATOR_NICHES = [
|
|
115
|
+
"music",
|
|
116
|
+
"gaming",
|
|
117
|
+
"tech",
|
|
118
|
+
"beauty",
|
|
119
|
+
"food",
|
|
120
|
+
"sports",
|
|
121
|
+
"fitness",
|
|
122
|
+
"travel",
|
|
123
|
+
"pets",
|
|
124
|
+
"fashion",
|
|
125
|
+
"health",
|
|
126
|
+
"education",
|
|
127
|
+
"comedy",
|
|
128
|
+
"cars",
|
|
129
|
+
"parenting"
|
|
130
|
+
];
|
|
111
131
|
var engagementRate = (what) => z3.number().min(0).max(1).optional().describe(what);
|
|
132
|
+
var REPLY_DISPOSITIONS = ["positive", "neutral", "negative"];
|
|
133
|
+
var CAMPAIGN_STATUS_STAGES = [
|
|
134
|
+
"discovery",
|
|
135
|
+
"outreach",
|
|
136
|
+
"negotiation",
|
|
137
|
+
"collaboration",
|
|
138
|
+
"monitoring"
|
|
139
|
+
];
|
|
112
140
|
var CAMPAIGN_STATUSES = [
|
|
113
141
|
"draft",
|
|
114
142
|
"active",
|
|
@@ -125,6 +153,39 @@ var getAccount = defineOperation({
|
|
|
125
153
|
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.",
|
|
126
154
|
input: z3.object({})
|
|
127
155
|
});
|
|
156
|
+
var creatorFilters = {
|
|
157
|
+
platforms: z3.array(z3.enum(PLATFORMS)).optional().describe("Only creators on these platforms"),
|
|
158
|
+
niches: z3.array(z3.enum(CREATOR_NICHES)).optional().describe(
|
|
159
|
+
"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"
|
|
160
|
+
),
|
|
161
|
+
markets: z3.array(z3.string().trim().min(1)).optional().describe(
|
|
162
|
+
"Only creators based in these countries: two-letter codes, e.g. us, gb, jp"
|
|
163
|
+
),
|
|
164
|
+
audienceCountries: z3.array(z3.string().trim().min(1)).optional().describe(
|
|
165
|
+
"Only creators whose largest audience is in these countries: two-letter codes, e.g. us, gb, th"
|
|
166
|
+
),
|
|
167
|
+
languages: z3.array(z3.string().trim().min(1)).optional().describe(
|
|
168
|
+
"Only creators posting in these languages: two-letter codes, e.g. en, es, ja"
|
|
169
|
+
),
|
|
170
|
+
lastPostWithinDays: z3.number().int().refine(
|
|
171
|
+
(days) => LAST_POST_WITHIN_DAYS.includes(days),
|
|
172
|
+
{
|
|
173
|
+
message: "Must be 7, 14, 30, 90 or 180"
|
|
174
|
+
}
|
|
175
|
+
).optional().describe(
|
|
176
|
+
"Only creators whose latest post is at most this many days old: 7, 14, 30, 90 or 180"
|
|
177
|
+
),
|
|
178
|
+
minFollowers: count("At least this many followers"),
|
|
179
|
+
maxFollowers: count("At most this many followers"),
|
|
180
|
+
minAvgViews: count("At least this many average views per post"),
|
|
181
|
+
maxAvgViews: count("At most this many average views per post"),
|
|
182
|
+
minEngagementRate: engagementRate(
|
|
183
|
+
"At least this engagement rate, as a fraction: 0.02 for 2%"
|
|
184
|
+
),
|
|
185
|
+
maxEngagementRate: engagementRate(
|
|
186
|
+
"At most this engagement rate, as a fraction: 0.1 for 10%"
|
|
187
|
+
)
|
|
188
|
+
};
|
|
128
189
|
var searchCreators = defineOperation({
|
|
129
190
|
name: "search_creators",
|
|
130
191
|
command: ["creators", "search"],
|
|
@@ -132,37 +193,131 @@ var searchCreators = defineOperation({
|
|
|
132
193
|
path: "/searches",
|
|
133
194
|
kind: "read",
|
|
134
195
|
summary: "Find creators by description and filters",
|
|
135
|
-
description: "Searches the creator database by meaning: describe the creators you want in plain words (niche, content, audience), and optionally narrow by platform, creator country, audience country, language, size, engagement rate and how recently they posted. Free, but each call counts against the daily search limit (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.",
|
|
196
|
+
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. Free, but each call counts against the daily search limit (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.",
|
|
136
197
|
input: z3.object({
|
|
137
|
-
query: z3.string().trim().min(1).max(1e3).describe(
|
|
138
|
-
|
|
139
|
-
markets: z3.array(z3.string().trim().min(1)).optional().describe("Only creators in these countries, e.g. us, gb, jp"),
|
|
140
|
-
audienceCountries: z3.array(z3.string().trim().min(1)).optional().describe(
|
|
141
|
-
"Only creators whose largest audience is in these countries, e.g. us, gb, th"
|
|
198
|
+
query: z3.string().trim().min(1).max(1e3).describe(
|
|
199
|
+
"The creators you want, in plain words: niche, what their content is like, who watches it"
|
|
142
200
|
),
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
201
|
+
exampleCreators: z3.array(z3.string().trim().min(1).max(300)).max(10).optional().describe(
|
|
202
|
+
"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"
|
|
203
|
+
),
|
|
204
|
+
...creatorFilters,
|
|
205
|
+
campaignId: campaignId.optional().describe("Rank for this campaign and record the search in it"),
|
|
206
|
+
limit: limit(100, 20)
|
|
207
|
+
})
|
|
208
|
+
});
|
|
209
|
+
var browseCreators = defineOperation({
|
|
210
|
+
name: "browse_creators",
|
|
211
|
+
command: ["creators", "browse"],
|
|
212
|
+
method: "GET",
|
|
213
|
+
path: "/creators/browse",
|
|
214
|
+
kind: "read",
|
|
215
|
+
summary: "List the biggest creators matching filters",
|
|
216
|
+
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. Free, does not count against the daily search limit and is not kept as a search. 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.",
|
|
217
|
+
input: z3.object({ ...creatorFilters, limit: limit(100, 20) })
|
|
218
|
+
});
|
|
219
|
+
var findCreator = defineOperation({
|
|
220
|
+
name: "find_creator",
|
|
221
|
+
command: ["creators", "find"],
|
|
222
|
+
method: "GET",
|
|
223
|
+
path: "/creators/lookup",
|
|
224
|
+
kind: "read",
|
|
225
|
+
summary: "Find a creator by handle or profile link",
|
|
226
|
+
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.",
|
|
227
|
+
input: z3.object({
|
|
228
|
+
reference: z3.string().trim().min(1).max(300).describe(
|
|
229
|
+
"An @handle or a profile link, e.g. @mkbhd or https://www.youtube.com/@mkbhd"
|
|
230
|
+
)
|
|
231
|
+
})
|
|
232
|
+
});
|
|
233
|
+
var findSimilarCreators = defineOperation({
|
|
234
|
+
name: "find_similar_creators",
|
|
235
|
+
command: ["creators", "similar"],
|
|
236
|
+
method: "POST",
|
|
237
|
+
path: "/creators/{creatorId}/similar",
|
|
238
|
+
kind: "read",
|
|
239
|
+
summary: "Find creators like one you already have",
|
|
240
|
+
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. Free, but each call counts against the daily search limit (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.",
|
|
241
|
+
input: z3.object({
|
|
242
|
+
creatorId: creatorId.describe(
|
|
243
|
+
"The creator to find more like, from search_creators or another result"
|
|
244
|
+
),
|
|
245
|
+
campaignId: campaignId.optional().describe("Leave out creators this campaign already has or excluded"),
|
|
246
|
+
markets: z3.array(z3.string().trim().min(1)).optional().describe(
|
|
247
|
+
"Only creators based in these countries: two-letter codes, e.g. us, gb, jp"
|
|
248
|
+
),
|
|
249
|
+
languages: z3.array(z3.string().trim().min(1)).optional().describe(
|
|
250
|
+
"Only creators posting in these languages: two-letter codes, e.g. en, es, ja"
|
|
151
251
|
),
|
|
152
252
|
minFollowers: count("At least this many followers"),
|
|
153
253
|
maxFollowers: count("At most this many followers"),
|
|
154
254
|
minAvgViews: count("At least this many average views per post"),
|
|
155
255
|
maxAvgViews: count("At most this many average views per post"),
|
|
156
|
-
minEngagementRate: engagementRate(
|
|
157
|
-
"At least this engagement rate, as a fraction: 0.02 for 2%"
|
|
158
|
-
),
|
|
159
|
-
maxEngagementRate: engagementRate(
|
|
160
|
-
"At most this engagement rate, as a fraction: 0.1 for 10%"
|
|
161
|
-
),
|
|
162
|
-
campaignId: campaignId.optional().describe("Rank for this campaign and record the search in it"),
|
|
163
256
|
limit: limit(100, 20)
|
|
164
257
|
})
|
|
165
258
|
});
|
|
259
|
+
var listSearches = defineOperation({
|
|
260
|
+
name: "list_searches",
|
|
261
|
+
command: ["searches", "list"],
|
|
262
|
+
method: "GET",
|
|
263
|
+
path: "/searches",
|
|
264
|
+
kind: "read",
|
|
265
|
+
summary: "List past searches",
|
|
266
|
+
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.",
|
|
267
|
+
input: z3.object({
|
|
268
|
+
campaignId: campaignId.optional().describe("Only the searches run for this campaign"),
|
|
269
|
+
includeArchived: z3.boolean().optional().describe("Also list archived searches (default false)"),
|
|
270
|
+
page: z3.number().int().min(1).optional().describe("Page number, from 1"),
|
|
271
|
+
limit: limit(100, 20)
|
|
272
|
+
})
|
|
273
|
+
});
|
|
274
|
+
var getSearch = defineOperation({
|
|
275
|
+
name: "get_search",
|
|
276
|
+
command: ["searches", "get"],
|
|
277
|
+
method: "GET",
|
|
278
|
+
path: "/searches/{searchId}",
|
|
279
|
+
kind: "read",
|
|
280
|
+
summary: "Read a past search\u2019s results again",
|
|
281
|
+
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.",
|
|
282
|
+
input: z3.object({ searchId })
|
|
283
|
+
});
|
|
284
|
+
var getSearchFilters = defineOperation({
|
|
285
|
+
name: "get_search_filters",
|
|
286
|
+
command: ["searches", "filters"],
|
|
287
|
+
method: "GET",
|
|
288
|
+
path: "/searches/filters",
|
|
289
|
+
kind: "read",
|
|
290
|
+
summary: "List the values the search filters take",
|
|
291
|
+
description: "Returns the values the search and browse filters accept: platforms, creator countries and languages present in the database, niches and activity windows. Free.",
|
|
292
|
+
input: z3.object({})
|
|
293
|
+
});
|
|
294
|
+
var updateSearch = defineOperation({
|
|
295
|
+
name: "update_search",
|
|
296
|
+
command: ["searches", "update"],
|
|
297
|
+
method: "PATCH",
|
|
298
|
+
path: "/searches/{searchId}",
|
|
299
|
+
kind: "write",
|
|
300
|
+
summary: "Rename or archive a past search",
|
|
301
|
+
description: "Names a past search, or archives it so list_searches leaves it out (archived: false brings it back). Free.",
|
|
302
|
+
input: z3.object({
|
|
303
|
+
searchId,
|
|
304
|
+
name: z3.string().trim().min(1).max(80).optional().describe("New name"),
|
|
305
|
+
archived: z3.boolean().optional().describe("true leaves it out of list_searches; false brings it back")
|
|
306
|
+
})
|
|
307
|
+
});
|
|
308
|
+
var exportSearch = defineOperation({
|
|
309
|
+
name: "export_search",
|
|
310
|
+
command: ["searches", "export"],
|
|
311
|
+
method: "GET",
|
|
312
|
+
path: "/searches/{searchId}/export",
|
|
313
|
+
kind: "read",
|
|
314
|
+
summary: "Export a search\u2019s results as CSV",
|
|
315
|
+
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. Free. Save csv to a file named filename.",
|
|
316
|
+
input: z3.object({
|
|
317
|
+
searchId,
|
|
318
|
+
scope: z3.enum(["all", "added"]).optional().describe("all results (default), or only the ones added to a campaign")
|
|
319
|
+
})
|
|
320
|
+
});
|
|
166
321
|
var getCreator = defineOperation({
|
|
167
322
|
name: "get_creator",
|
|
168
323
|
command: ["creators", "get"],
|
|
@@ -182,10 +337,46 @@ var unlockCreator = defineOperation({
|
|
|
182
337
|
method: "POST",
|
|
183
338
|
path: "/creators/{creatorId}/unlock",
|
|
184
339
|
kind: "spend",
|
|
185
|
-
summary: "Unlock a creator\u2019s
|
|
340
|
+
summary: "Unlock a creator\u2019s handle and profile link",
|
|
186
341
|
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.",
|
|
187
342
|
input: z3.object({ creatorId })
|
|
188
343
|
});
|
|
344
|
+
var saveCreator = defineOperation({
|
|
345
|
+
name: "save_creator",
|
|
346
|
+
command: ["creators", "save"],
|
|
347
|
+
method: "POST",
|
|
348
|
+
path: "/creators/{creatorId}/save",
|
|
349
|
+
kind: "spend",
|
|
350
|
+
summary: "Save a creator to the account\u2019s saved list",
|
|
351
|
+
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.",
|
|
352
|
+
input: z3.object({
|
|
353
|
+
creatorId,
|
|
354
|
+
searchId: z3.string().trim().min(1).optional().describe("The search the creator was found in")
|
|
355
|
+
})
|
|
356
|
+
});
|
|
357
|
+
var unsaveCreator = defineOperation({
|
|
358
|
+
name: "unsave_creator",
|
|
359
|
+
command: ["creators", "unsave"],
|
|
360
|
+
method: "DELETE",
|
|
361
|
+
path: "/creators/{creatorId}/save",
|
|
362
|
+
kind: "write",
|
|
363
|
+
summary: "Remove a creator from the saved list",
|
|
364
|
+
description: "Removes a creator from the account\u2019s saved list. Free; the creator stays unlocked and in any campaign.",
|
|
365
|
+
input: z3.object({ creatorId })
|
|
366
|
+
});
|
|
367
|
+
var listSavedCreators = defineOperation({
|
|
368
|
+
name: "list_saved_creators",
|
|
369
|
+
command: ["creators", "saved"],
|
|
370
|
+
method: "GET",
|
|
371
|
+
path: "/creators/saved",
|
|
372
|
+
kind: "read",
|
|
373
|
+
summary: "List saved creators",
|
|
374
|
+
description: "Lists the creators on the account\u2019s saved list, most recently saved first. Free.",
|
|
375
|
+
input: z3.object({
|
|
376
|
+
page: z3.number().int().min(1).optional().describe("Page number, from 1"),
|
|
377
|
+
limit: limit(100, 20)
|
|
378
|
+
})
|
|
379
|
+
});
|
|
189
380
|
var listCampaigns = defineOperation({
|
|
190
381
|
name: "list_campaigns",
|
|
191
382
|
command: ["campaigns", "list"],
|
|
@@ -214,6 +405,22 @@ var createCampaign = defineOperation({
|
|
|
214
405
|
status: z3.enum(CAMPAIGN_STATUSES).optional().describe("Workflow status (default draft)")
|
|
215
406
|
})
|
|
216
407
|
});
|
|
408
|
+
var updateCampaign = defineOperation({
|
|
409
|
+
name: "update_campaign",
|
|
410
|
+
command: ["campaigns", "update"],
|
|
411
|
+
method: "PATCH",
|
|
412
|
+
path: "/campaigns/{campaignId}",
|
|
413
|
+
kind: "write",
|
|
414
|
+
summary: "Change a campaign\u2019s name, brief or status",
|
|
415
|
+
description: "Changes a campaign: its name, its brief, its status, or whether it is archived. Pass only what changes. Free. A new brief is kept as the next revision, and searches with this campaignId rank against it from then on; creators already in the campaign stay.",
|
|
416
|
+
input: z3.object({
|
|
417
|
+
campaignId,
|
|
418
|
+
name: z3.string().trim().min(1).max(200).optional().describe("New name"),
|
|
419
|
+
brief: z3.string().trim().min(1).max(1e4).optional().describe("New brief: product, goal and the creators you want"),
|
|
420
|
+
status: z3.enum(CAMPAIGN_STATUSES).optional().describe("New workflow status"),
|
|
421
|
+
archived: z3.boolean().optional().describe("true hides the campaign from the list; false brings it back")
|
|
422
|
+
})
|
|
423
|
+
});
|
|
217
424
|
var getCampaignStatus = defineOperation({
|
|
218
425
|
name: "get_campaign_status",
|
|
219
426
|
command: ["campaigns", "status"],
|
|
@@ -221,9 +428,13 @@ var getCampaignStatus = defineOperation({
|
|
|
221
428
|
path: "/campaigns/{campaignId}/status",
|
|
222
429
|
kind: "read",
|
|
223
430
|
summary: "Show a campaign\u2019s pipeline",
|
|
224
|
-
description: "Shows where a campaign stands: the searches run for it, and its creators by stage (outreach, negotiation, collaboration), each with the next action. Free. Use it to decide what to do next across a campaign.",
|
|
431
|
+
description: "Shows where a campaign stands: the searches run for it, and its creators by stage (outreach, negotiation, collaboration), each with the next action and who the conversation is waiting on. Free. Counts cover the whole campaign; each stage lists its most recently active items first. To go through every creator at one stage, pass stage and read page 1, 2, \u2026 until you have count items. Use it to decide what to do next across a campaign.",
|
|
225
432
|
input: z3.object({
|
|
226
433
|
campaignId,
|
|
434
|
+
stage: z3.enum(CAMPAIGN_STATUS_STAGES).optional().describe(
|
|
435
|
+
"List items for this stage only; the other stages still show their counts"
|
|
436
|
+
),
|
|
437
|
+
page: z3.number().int().min(1).optional().describe("Page of the stage\u2019s items, from 1 (needs stage)"),
|
|
227
438
|
limit: limit(100, 12).describe(
|
|
228
439
|
"How many items to return per stage, 1-100 (default 12)"
|
|
229
440
|
)
|
|
@@ -265,24 +476,106 @@ var getConversation = defineOperation({
|
|
|
265
476
|
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.",
|
|
266
477
|
input: z3.object({ campaignId, creatorId })
|
|
267
478
|
});
|
|
479
|
+
var price = z3.string().trim().min(1).max(200).optional().describe("Price the creator named or agreed, as said, e.g. $300 per video");
|
|
480
|
+
var liveWindow = z3.string().trim().min(1).max(200).optional().describe("When the content would go live, as said, e.g. late March");
|
|
481
|
+
var recordReply = defineOperation({
|
|
482
|
+
name: "record_reply",
|
|
483
|
+
command: ["conversations", "record"],
|
|
484
|
+
method: "POST",
|
|
485
|
+
path: "/campaigns/{campaignId}/creators/{creatorId}/replies",
|
|
486
|
+
kind: "write",
|
|
487
|
+
summary: "Record a reply the creator sent outside Creator River",
|
|
488
|
+
description: "Records a reply that reached the user some other way (a DM, another inbox, a call) and how it went. positive or neutral moves the creator to negotiation (a confirmed collaboration stays), waiting on the user; negative records that they declined and closes the conversation. Free. Replies to emails sent with send_email arrive on their own (see get_conversation), so never record those. Needs an email sent first. Recording the same reply again changes nothing.",
|
|
489
|
+
input: z3.object({
|
|
490
|
+
campaignId,
|
|
491
|
+
creatorId,
|
|
492
|
+
disposition: z3.enum(REPLY_DISPOSITIONS).describe(
|
|
493
|
+
"How the reply went: positive (interested), neutral, or negative (declined)"
|
|
494
|
+
),
|
|
495
|
+
summary: z3.string().trim().min(1).max(5e3).describe("What the creator said, quoted or in a sentence"),
|
|
496
|
+
price,
|
|
497
|
+
liveWindow
|
|
498
|
+
})
|
|
499
|
+
});
|
|
500
|
+
var confirmCollaboration = defineOperation({
|
|
501
|
+
name: "confirm_collaboration",
|
|
502
|
+
command: ["conversations", "confirm"],
|
|
503
|
+
method: "POST",
|
|
504
|
+
path: "/campaigns/{campaignId}/creators/{creatorId}/collaboration",
|
|
505
|
+
kind: "write",
|
|
506
|
+
summary: "Record that a creator agreed to collaborate",
|
|
507
|
+
description: "Records that the creator agreed to work with the user, with the agreed terms, and moves them to the collaboration stage, waiting on the user to prepare it. Free. Call it only once the creator has clearly said yes to the terms; it sends nothing to the creator. Needs an email sent first. Confirming the same terms again changes nothing.",
|
|
508
|
+
input: z3.object({
|
|
509
|
+
campaignId,
|
|
510
|
+
creatorId,
|
|
511
|
+
terms: z3.string().trim().min(1).max(5e3).describe("What was agreed: deliverables, fee, dates, usage"),
|
|
512
|
+
deliverables: z3.array(z3.string().trim().min(1).max(500)).max(20).optional().describe("Each agreed deliverable, e.g. one 60-second integration"),
|
|
513
|
+
price,
|
|
514
|
+
liveWindow
|
|
515
|
+
})
|
|
516
|
+
});
|
|
517
|
+
var addCreator = defineOperation({
|
|
518
|
+
name: "add_creator",
|
|
519
|
+
command: ["campaigns", "add"],
|
|
520
|
+
method: "POST",
|
|
521
|
+
path: "/campaigns/{campaignId}/creators/{creatorId}",
|
|
522
|
+
kind: "spend",
|
|
523
|
+
summary: "Shortlist a creator in a campaign",
|
|
524
|
+
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.",
|
|
525
|
+
input: z3.object({
|
|
526
|
+
campaignId,
|
|
527
|
+
creatorId,
|
|
528
|
+
searchId: z3.string().trim().min(1).optional().describe("The search the creator came from, to mark it added there")
|
|
529
|
+
})
|
|
530
|
+
});
|
|
531
|
+
var excludeCreator = defineOperation({
|
|
532
|
+
name: "exclude_creator",
|
|
533
|
+
command: ["campaigns", "exclude"],
|
|
534
|
+
method: "POST",
|
|
535
|
+
path: "/campaigns/{campaignId}/creators/{creatorId}/exclusion",
|
|
536
|
+
kind: "write",
|
|
537
|
+
summary: "Take a creator out of a campaign",
|
|
538
|
+
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.",
|
|
539
|
+
input: z3.object({
|
|
540
|
+
campaignId,
|
|
541
|
+
creatorId,
|
|
542
|
+
searchId: z3.string().trim().min(1).optional().describe("A search to drop the creator from as well")
|
|
543
|
+
})
|
|
544
|
+
});
|
|
268
545
|
var operations = [
|
|
269
546
|
getAccount,
|
|
270
547
|
searchCreators,
|
|
548
|
+
browseCreators,
|
|
549
|
+
findCreator,
|
|
550
|
+
findSimilarCreators,
|
|
551
|
+
listSearches,
|
|
552
|
+
getSearch,
|
|
553
|
+
getSearchFilters,
|
|
554
|
+
updateSearch,
|
|
555
|
+
exportSearch,
|
|
271
556
|
getCreator,
|
|
272
557
|
unlockCreator,
|
|
558
|
+
saveCreator,
|
|
559
|
+
unsaveCreator,
|
|
560
|
+
listSavedCreators,
|
|
273
561
|
listCampaigns,
|
|
274
562
|
createCampaign,
|
|
563
|
+
updateCampaign,
|
|
275
564
|
getCampaignStatus,
|
|
565
|
+
addCreator,
|
|
276
566
|
revealContact,
|
|
277
567
|
sendEmail,
|
|
278
|
-
getConversation
|
|
568
|
+
getConversation,
|
|
569
|
+
recordReply,
|
|
570
|
+
confirmCollaboration,
|
|
571
|
+
excludeCreator
|
|
279
572
|
];
|
|
280
573
|
|
|
281
574
|
// src/cli.ts
|
|
282
575
|
import { Command, CommanderError } from "commander";
|
|
283
576
|
|
|
284
577
|
// package.json
|
|
285
|
-
var version = "0.
|
|
578
|
+
var version = "0.4.0";
|
|
286
579
|
|
|
287
580
|
// src/http.ts
|
|
288
581
|
var DEFAULT_API_URL = "https://www.creatorriver.com";
|
|
@@ -505,11 +798,12 @@ async function waitForLogin(endpoint2, io, login, waitSeconds) {
|
|
|
505
798
|
// src/cli.ts
|
|
506
799
|
var LOGIN_HINT = "run `creatorriver auth login`";
|
|
507
800
|
var GROUP_DESCRIPTIONS = {
|
|
508
|
-
creators: "Find, inspect and
|
|
509
|
-
campaigns: "Create
|
|
801
|
+
creators: "Find, inspect, unlock and save creators, and find more like one",
|
|
802
|
+
campaigns: "Create, change and follow campaigns and the creators in them",
|
|
510
803
|
contacts: "Reveal creator email addresses",
|
|
511
804
|
emails: "Send outreach emails",
|
|
512
|
-
conversations: "Read email threads with creators"
|
|
805
|
+
conversations: "Read email threads with creators and record their replies",
|
|
806
|
+
searches: "Reopen, rename, archive and export past searches, and list filter values"
|
|
513
807
|
};
|
|
514
808
|
function forCli(text, operations2) {
|
|
515
809
|
return operations2.reduce(
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "creatorriver",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.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",
|