@contenthero/sdk 0.3.3 → 0.3.5
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/client.d.ts +70 -56
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +139 -100
- package/dist/client.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/types.d.ts +213 -91
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/client.d.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* SDK offers both a fire-and-forget `generate` and a `generateAndWait` that
|
|
7
7
|
* polls to a terminal state for you.
|
|
8
8
|
*/
|
|
9
|
-
import type { Folder, DerivedFolder, FolderItem,
|
|
9
|
+
import type { Folder, DerivedFolder, FolderItem, CreateFolderInput, UpdateFolderInput, AddBrandKnowledgeInput, Avatar, AvatarSummary, Balance, BrandKit, BrandKitSummary, BrandKnowledgeDetail, BrandKnowledgeItem, BrandKnowledgeListResult, BrandKnowledgeMatch, ConnectedAccount, ListAccountsOptions, ListContentOptions, GetContentOptions, ContentListResult, ContentDetail, AccountDetail, SearchBrandKnowledgeOptions, CostEstimate, CreatePostInput, UpdateBrandKitInput, CreateBrandKitInput, ExtractionOutcome, TrackedAccount, GenerateBoardRequest, GenerateRequest, GenerateResult, Generation, EditAudioRequest, EditAudioResult, ListMediaOptions, ListVoicesOptions, ListBrandKitsOptions, ListPostsOptions, FavoriteInput, ArchiveInput, ApplyEditorOpsInput, ApplyEditorOpsResult, ProjectSummary, ProjectDetail, LiveContextResult, GetContextInput, PreviewInput, PreviewJob, PreviewStatus, ListProjectsInput, CreateProjectInput, ImportProjectInput, StartExportInput, ExportJob, ExportFormatCatalog, LayerTypeCatalog, TimelineTypeCatalog, TranscriptResult, MediaItem, MediaSummary, MediaSource, SearchMediaResult, SearchMediaOptions, MediaBatchItem, MediaBatchResult, CreateMediaUploadInput, CreateMediaUploadResult, ImportMediaInput, UploadedMedia, ModelInfo, PlatformSummary, PlatformSchema, Element, CreateElementRequest, PipelineStage, PostDetail, PostListResult, PostPlatform, PostSummary, Tag, PublishPostResult, TranscribeRequest, Transcription, UpdatePostInput, Voice, VoiceSummary, WaitOptions } from './types.js';
|
|
10
10
|
/** Minimal fetch signature, so a custom implementation can be injected. */
|
|
11
11
|
export type FetchLike = (input: string, init?: RequestInit) => Promise<Response>;
|
|
12
12
|
export interface ContentHeroOptions {
|
|
@@ -133,6 +133,31 @@ export declare class ContentHero {
|
|
|
133
133
|
getVoice(voiceId: string): Promise<Voice>;
|
|
134
134
|
/** List the account's brand kits (the list half of the list+get pair). */
|
|
135
135
|
listBrandKits(options?: ListBrandKitsOptions): Promise<BrandKitSummary[]>;
|
|
136
|
+
/**
|
|
137
|
+
* Create a brand kit. Requires the `brandkit:write` scope.
|
|
138
|
+
*
|
|
139
|
+
* Three sources, and the input decides which: EMPTY (just a name), FROM A WEBSITE
|
|
140
|
+
* (`websiteUrl` + `extract: true`), or A COPY (`duplicateFrom`).
|
|
141
|
+
*
|
|
142
|
+
* ⚠️ WITH `extract` IT RETURNS IMMEDIATELY, before the kit has any content. That empty kit is the HANDLE:
|
|
143
|
+
* the thing to poll and the row the UI renders at once. Poll `extractionStatus` via `getBrandKit`.
|
|
144
|
+
*/
|
|
145
|
+
createBrandKit(input: CreateBrandKitInput & {
|
|
146
|
+
duplicateFrom?: string;
|
|
147
|
+
}): Promise<{
|
|
148
|
+
brandKit: BrandKit;
|
|
149
|
+
extraction?: ExtractionOutcome;
|
|
150
|
+
}>;
|
|
151
|
+
/**
|
|
152
|
+
* Re-run website extraction for an existing kit. Returns at once; poll `extractionStatus`.
|
|
153
|
+
* Requires the kit to already have a `websiteUrl`, and the `brandkit:write` scope.
|
|
154
|
+
*/
|
|
155
|
+
extractBrandKit(brandKitId: string): Promise<ExtractionOutcome>;
|
|
156
|
+
/**
|
|
157
|
+
* Reorder the account's brand kits. Collection-level because ordering is a property of the SET: a per-kit
|
|
158
|
+
* position would let two kits claim one slot. Pass every id, in the order you want.
|
|
159
|
+
*/
|
|
160
|
+
reorderBrandKits(orderedIds: string[]): Promise<BrandKitSummary[]>;
|
|
136
161
|
/** Get one brand kit, fully assembled (the get half). Throws NotFoundError if absent. */
|
|
137
162
|
getBrandKit(brandKitId: string): Promise<BrandKit>;
|
|
138
163
|
/**
|
|
@@ -141,10 +166,6 @@ export declare class ContentHero {
|
|
|
141
166
|
* updated kit.
|
|
142
167
|
*/
|
|
143
168
|
updateBrandKit(brandKitId: string, input: UpdateBrandKitInput): Promise<BrandKit>;
|
|
144
|
-
/** Add a curated section to a brand kit. Requires the `brandkit:write` scope. */
|
|
145
|
-
addBrandKitSection(brandKitId: string, input: AddBrandKitSectionInput): Promise<BrandKitSectionRecord>;
|
|
146
|
-
/** Update a brand-kit section. Requires the `brandkit:write` scope. */
|
|
147
|
-
updateBrandKitSection(brandKitId: string, sectionId: string, input: UpdateBrandKitSectionInput): Promise<BrandKitSectionRecord>;
|
|
148
169
|
/** The complete, paginated index of a brand kit's knowledge items. Requires `brandkit:read`. */
|
|
149
170
|
listBrandKnowledge(brandKitId: string, options?: {
|
|
150
171
|
limit?: number;
|
|
@@ -195,11 +216,17 @@ export declare class ContentHero {
|
|
|
195
216
|
items: FolderItem[];
|
|
196
217
|
}>;
|
|
197
218
|
createFolder(input: CreateFolderInput): Promise<Folder>;
|
|
219
|
+
/**
|
|
220
|
+
* Update a folder: rename it, move it (`parentId`), re-query a smart folder, and file or unfile items.
|
|
221
|
+
*
|
|
222
|
+
* `addItems` / `removeItems` are DELTAS, because folder membership is many-to-many: an item lives in
|
|
223
|
+
* several folders at once, so a declarative list would silently unfile everything absent from it.
|
|
224
|
+
* `folderIds` applies the patch to several folders; attribute fields still need exactly one.
|
|
225
|
+
*/
|
|
198
226
|
updateFolder(folderId: string, patch: UpdateFolderInput): Promise<Folder>;
|
|
227
|
+
/** Patch several folders at once (bulk moves and filing). Returns every folder that was found. */
|
|
228
|
+
updateFolders(folderIds: string[], patch: UpdateFolderInput): Promise<Folder[]>;
|
|
199
229
|
deleteFolder(folderId: string): Promise<void>;
|
|
200
|
-
/** File an item into a manual folder (a pointer; no bytes move). */
|
|
201
|
-
addToFolder(folderId: string, ref: FolderItemRef): Promise<void>;
|
|
202
|
-
removeFromFolder(folderId: string, ref: FolderItemRef): Promise<void>;
|
|
203
230
|
/**
|
|
204
231
|
* Resolve a batch of media references to vision-ready URLs + light metadata (the
|
|
205
232
|
* micro drill-in behind get_context's macro screenshot). Each item is a raw
|
|
@@ -303,25 +330,6 @@ export declare class ContentHero {
|
|
|
303
330
|
* per-account customizable.
|
|
304
331
|
*/
|
|
305
332
|
listPipelineStages(): Promise<PipelineStage[]>;
|
|
306
|
-
/** Attach (or replace) a destination on a post. Upserts on platform. */
|
|
307
|
-
addPostDestination(postId: string, input: AddDestinationInput): Promise<PostDestination>;
|
|
308
|
-
/** Update one of a post's destinations. */
|
|
309
|
-
updatePostDestination(postId: string, destinationId: string, input: UpdateDestinationInput): Promise<PostDestination>;
|
|
310
|
-
/** Attach an asset to a post by URL or outputId. */
|
|
311
|
-
addPostAsset(postId: string, input: AddAssetInput): Promise<PostAsset>;
|
|
312
|
-
/**
|
|
313
|
-
* Reorder a post's assets (e.g. carousel slide order). `assetIds` must list all
|
|
314
|
-
* of the post's asset ids in the desired order. Returns the assets reordered.
|
|
315
|
-
*/
|
|
316
|
-
reorderPostAssets(postId: string, assetIds: string[]): Promise<PostAsset[]>;
|
|
317
|
-
/** Detach an asset from a post. */
|
|
318
|
-
removePostAsset(postId: string, assetId: string): Promise<{
|
|
319
|
-
id: string;
|
|
320
|
-
}>;
|
|
321
|
-
/** Detach a destination from a post. */
|
|
322
|
-
removePostDestination(postId: string, destinationId: string): Promise<{
|
|
323
|
-
id: string;
|
|
324
|
-
}>;
|
|
325
333
|
/** List the account's tags. */
|
|
326
334
|
listTags(): Promise<Tag[]>;
|
|
327
335
|
/** Create a tag (the name is lowercased). Throws if it already exists. */
|
|
@@ -332,11 +340,6 @@ export declare class ContentHero {
|
|
|
332
340
|
deleteTag(id: string): Promise<{
|
|
333
341
|
id: string;
|
|
334
342
|
}>;
|
|
335
|
-
/**
|
|
336
|
-
* Schedule a post: set (or clear, with null) the publish time on the post and
|
|
337
|
-
* all its destinations. This queues; publishing now is `publishPost`.
|
|
338
|
-
*/
|
|
339
|
-
schedulePost(postId: string, scheduledAt: string | null): Promise<PostSummary>;
|
|
340
343
|
/**
|
|
341
344
|
* Publish a post NOW. Publishes a single platform when `platform` is given,
|
|
342
345
|
* otherwise every destination. Requires a key with the `publish:write` scope.
|
|
@@ -345,18 +348,35 @@ export declare class ContentHero {
|
|
|
345
348
|
publishPost(postId: string, options?: {
|
|
346
349
|
platform?: PostPlatform;
|
|
347
350
|
}): Promise<PublishPostResult>;
|
|
348
|
-
/**
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
/**
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
351
|
+
/**
|
|
352
|
+
* The social accounts the caller tracks, both tiers by default.
|
|
353
|
+
*
|
|
354
|
+
* `accountType` narrows to `inspiration` (creators and competitors they learn from) or `brand` (their own
|
|
355
|
+
* profiles). Every row reports its own `accountType`, so one list answers both questions. This replaces
|
|
356
|
+
* `listInspirationAccounts` and `listBrandAccounts`, which were one query with a different literal.
|
|
357
|
+
*/
|
|
358
|
+
listAccounts(options?: ListAccountsOptions): Promise<TrackedAccount[]>;
|
|
359
|
+
/**
|
|
360
|
+
* One tracked account with its performance: content count, totals, averages, top and recent content.
|
|
361
|
+
* Works for either tier; the tier is reported, not required.
|
|
362
|
+
*/
|
|
363
|
+
getAccount(accountId: string): Promise<AccountDetail>;
|
|
364
|
+
/**
|
|
365
|
+
* The social content the caller tracks, ranked by outlier score by default.
|
|
366
|
+
*
|
|
367
|
+
* Spans the creators they watch AND their own posts (`scope`, default `all`); each row carries `isOwn`.
|
|
368
|
+
* Filter by platform, content type, a published window, and ranges over score, views, duration and
|
|
369
|
+
* follower count.
|
|
370
|
+
*/
|
|
371
|
+
listContent(options?: ListContentOptions): Promise<ContentListResult>;
|
|
372
|
+
/**
|
|
373
|
+
* One tracked post in full: engagement, outlier score, hashtags, keywords, mentions, audio info.
|
|
374
|
+
*
|
|
375
|
+
* The transcript is OPT-IN and windowable, because a sixty-minute video is a large document: ask for
|
|
376
|
+
* `text` or `segments`, and narrow segments with `startMs`/`endMs` or `transcriptSearch`. Throws
|
|
377
|
+
* NotFoundError both when the post does not exist and when the caller has no relationship to it.
|
|
378
|
+
*/
|
|
379
|
+
getContent(contentId: string, options?: GetContentOptions): Promise<ContentDetail>;
|
|
360
380
|
/** List the account's connected social accounts (publish targets), default first. */
|
|
361
381
|
listConnectedAccounts(): Promise<ConnectedAccount[]>;
|
|
362
382
|
/** Get one connected account by id. Throws NotFoundError if absent. */
|
|
@@ -367,28 +387,22 @@ export declare class ContentHero {
|
|
|
367
387
|
* Pass `{ assetType, id }` for a top-level asset (post, voice, brand_kit,
|
|
368
388
|
* project, inspiration_content, gallery), or `{ id, variationIndex }` to
|
|
369
389
|
* favorite a single studio output variation slot (id is a studio output id).
|
|
370
|
-
*
|
|
390
|
+
*
|
|
391
|
+
* `favorited` defaults to true; pass false to CLEAR it. That boolean is what replaced the separate
|
|
392
|
+
* `unfavorite` method, which was this call with one value flipped. Idempotent in both directions.
|
|
371
393
|
*/
|
|
372
394
|
favorite(input: FavoriteInput): Promise<void>;
|
|
373
|
-
/**
|
|
374
|
-
* Clear the favorite flag on an asset. Requires the `favorites:write` scope.
|
|
375
|
-
* Same target shape as `favorite`. Idempotent.
|
|
376
|
-
*/
|
|
377
|
-
unfavorite(input: FavoriteInput): Promise<void>;
|
|
378
395
|
/**
|
|
379
396
|
* Archive an asset. Requires the `favorites:write` scope.
|
|
380
397
|
*
|
|
381
398
|
* Pass `{ assetType, id }` for a top-level asset (post, brand_kit,
|
|
382
399
|
* brand_kit_section, project), or `{ id, variationIndex }` to archive a single
|
|
383
400
|
* studio output variation slot. Archiving a post sets its status to 'archived'.
|
|
384
|
-
*
|
|
401
|
+
*
|
|
402
|
+
* `archived` defaults to true; pass false to RESTORE (a post goes back to 'draft'). That boolean is what
|
|
403
|
+
* replaced the separate `unarchive` method. Idempotent in both directions.
|
|
385
404
|
*/
|
|
386
405
|
archive(input: ArchiveInput): Promise<void>;
|
|
387
|
-
/**
|
|
388
|
-
* Unarchive an asset. Requires the `favorites:write` scope. Same target shape
|
|
389
|
-
* as `archive`. Unarchiving a post restores it to 'draft'. Idempotent.
|
|
390
|
-
*/
|
|
391
|
-
unarchive(input: ArchiveInput): Promise<void>;
|
|
392
406
|
/**
|
|
393
407
|
* List the caller's projects (both editor + canvas) as lightweight summaries. Filter by archived /
|
|
394
408
|
* favorited state, by `kind`, or by a title search. Requires the `editor:read` scope.
|
package/dist/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAQH,OAAO,KAAK,EACV,MAAM,EACN,aAAa,EACb,UAAU,EACV,aAAa,EACb,iBAAiB,EACjB,iBAAiB,EACjB,aAAa,EACb,uBAAuB,EACvB,sBAAsB,EACtB,mBAAmB,EACnB,MAAM,EACN,aAAa,EACb,OAAO,EACP,uBAAuB,EACvB,QAAQ,EACR,qBAAqB,EACrB,eAAe,EACf,oBAAoB,EACpB,kBAAkB,EAClB,wBAAwB,EACxB,mBAAmB,EACnB,gBAAgB,EAChB,0BAA0B,EAC1B,2BAA2B,EAC3B,YAAY,EACZ,eAAe,EACf,mBAAmB,EACnB,0BAA0B,EAC1B,wBAAwB,EACxB,kBAAkB,EAClB,mBAAmB,EAEnB,cAAc,EACd,cAAc,EACd,oBAAoB,EACpB,eAAe,EACf,cAAc,EACd,UAAU,EACV,gBAAgB,EAChB,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D,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC;IAIrD,kGAAkG;IAC5F,gBAAgB,IAAI,OAAO,CAAC,mBAAmB,CAAC;IAItD;;;;OAIG;IACG,oBAAoB,CACxB,SAAS,EAAE,MAAM,EACjB,KAAK,GAAE,gBAAqB,EAC5B,OAAO,GAAE,WAAgB,GACxB,OAAO,CAAC,SAAS,CAAC;IASrB,8CAA8C;IACxC,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,GAAE,WAAgB,GAAG,OAAO,CAAC,SAAS,CAAC;IAYpF;;;OAGG;IACG,aAAa,IAAI,OAAO,CAAC,gBAAgB,CAAC;IAIhD;;;OAGG;IACG,gBAAgB,IAAI,OAAO,CAAC,mBAAmB,CAAC;IAItD;;;;;;;;;;OAUG;IACG,aAAa,CACjB,SAAS,EAAE,MAAM,EACjB,OAAO,GAAE;QACP,MAAM,CAAC,EAAE,MAAM,CAAA;QACf,OAAO,CAAC,EAAE,MAAM,CAAA;QAChB,KAAK,CAAC,EAAE,MAAM,CAAA;QACd,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;QAC7B,eAAe,CAAC,EAAE,MAAM,CAAA;QACxB,cAAc,CAAC,EAAE,MAAM,CAAA;QACvB,YAAY,CAAC,EAAE,MAAM,CAAA;KACjB,GACL,OAAO,CAAC,gBAAgB,CAAC;IAY5B,gFAAgF;YAClE,OAAO;CAoCtB"}
|
package/dist/client.js
CHANGED
|
@@ -235,6 +235,42 @@ export class ContentHero {
|
|
|
235
235
|
const data = await this.request('GET', `/api/v1/brand-kits${qs ? `?${qs}` : ''}`);
|
|
236
236
|
return data.brandKits;
|
|
237
237
|
}
|
|
238
|
+
/**
|
|
239
|
+
* Create a brand kit. Requires the `brandkit:write` scope.
|
|
240
|
+
*
|
|
241
|
+
* Three sources, and the input decides which: EMPTY (just a name), FROM A WEBSITE
|
|
242
|
+
* (`websiteUrl` + `extract: true`), or A COPY (`duplicateFrom`).
|
|
243
|
+
*
|
|
244
|
+
* ⚠️ WITH `extract` IT RETURNS IMMEDIATELY, before the kit has any content. That empty kit is the HANDLE:
|
|
245
|
+
* the thing to poll and the row the UI renders at once. Poll `extractionStatus` via `getBrandKit`.
|
|
246
|
+
*/
|
|
247
|
+
async createBrandKit(input) {
|
|
248
|
+
// A copy is a create with a source, so it shares this method rather than owning a verb of its own.
|
|
249
|
+
if (input.duplicateFrom) {
|
|
250
|
+
const { duplicateFrom, name } = input;
|
|
251
|
+
const data = await this.request('POST', `/api/v1/brand-kits/${encodeURIComponent(duplicateFrom)}/duplicate`, name ? { name } : {});
|
|
252
|
+
return { brandKit: data.brandKit };
|
|
253
|
+
}
|
|
254
|
+
return this.request('POST', '/api/v1/brand-kits', input);
|
|
255
|
+
}
|
|
256
|
+
/**
|
|
257
|
+
* Re-run website extraction for an existing kit. Returns at once; poll `extractionStatus`.
|
|
258
|
+
* Requires the kit to already have a `websiteUrl`, and the `brandkit:write` scope.
|
|
259
|
+
*/
|
|
260
|
+
async extractBrandKit(brandKitId) {
|
|
261
|
+
const data = await this.request('POST', `/api/v1/brand-kits/${encodeURIComponent(brandKitId)}/extract`);
|
|
262
|
+
return data.extraction;
|
|
263
|
+
}
|
|
264
|
+
/**
|
|
265
|
+
* Reorder the account's brand kits. Collection-level because ordering is a property of the SET: a per-kit
|
|
266
|
+
* position would let two kits claim one slot. Pass every id, in the order you want.
|
|
267
|
+
*/
|
|
268
|
+
async reorderBrandKits(orderedIds) {
|
|
269
|
+
const data = await this.request('PATCH', '/api/v1/brand-kits', {
|
|
270
|
+
orderedIds,
|
|
271
|
+
});
|
|
272
|
+
return data.brandKits;
|
|
273
|
+
}
|
|
238
274
|
/** Get one brand kit, fully assembled (the get half). Throws NotFoundError if absent. */
|
|
239
275
|
async getBrandKit(brandKitId) {
|
|
240
276
|
return this.request('GET', `/api/v1/brand-kits/${encodeURIComponent(brandKitId)}`);
|
|
@@ -247,16 +283,6 @@ export class ContentHero {
|
|
|
247
283
|
async updateBrandKit(brandKitId, input) {
|
|
248
284
|
return this.request('PATCH', `/api/v1/brand-kits/${encodeURIComponent(brandKitId)}`, input);
|
|
249
285
|
}
|
|
250
|
-
/** Add a curated section to a brand kit. Requires the `brandkit:write` scope. */
|
|
251
|
-
async addBrandKitSection(brandKitId, input) {
|
|
252
|
-
const data = await this.request('POST', `/api/v1/brand-kits/${encodeURIComponent(brandKitId)}/sections`, input);
|
|
253
|
-
return data.section;
|
|
254
|
-
}
|
|
255
|
-
/** Update a brand-kit section. Requires the `brandkit:write` scope. */
|
|
256
|
-
async updateBrandKitSection(brandKitId, sectionId, input) {
|
|
257
|
-
const data = await this.request('PATCH', `/api/v1/brand-kits/${encodeURIComponent(brandKitId)}/sections/${encodeURIComponent(sectionId)}`, input);
|
|
258
|
-
return data.section;
|
|
259
|
-
}
|
|
260
286
|
// -------------------------------------------------------------------------
|
|
261
287
|
// Brand knowledge (a brand kit's knowledge base)
|
|
262
288
|
// -------------------------------------------------------------------------
|
|
@@ -364,20 +390,31 @@ export class ContentHero {
|
|
|
364
390
|
const data = await this.request('POST', '/api/v1/library/folders', input);
|
|
365
391
|
return data.folder;
|
|
366
392
|
}
|
|
393
|
+
/**
|
|
394
|
+
* Update a folder: rename it, move it (`parentId`), re-query a smart folder, and file or unfile items.
|
|
395
|
+
*
|
|
396
|
+
* `addItems` / `removeItems` are DELTAS, because folder membership is many-to-many: an item lives in
|
|
397
|
+
* several folders at once, so a declarative list would silently unfile everything absent from it.
|
|
398
|
+
* `folderIds` applies the patch to several folders; attribute fields still need exactly one.
|
|
399
|
+
*/
|
|
367
400
|
async updateFolder(folderId, patch) {
|
|
368
401
|
const data = await this.request('PATCH', `/api/v1/library/folders/${encodeURIComponent(folderId)}`, patch);
|
|
369
402
|
return data.folder;
|
|
370
403
|
}
|
|
404
|
+
/** Patch several folders at once (bulk moves and filing). Returns every folder that was found. */
|
|
405
|
+
async updateFolders(folderIds, patch) {
|
|
406
|
+
const first = folderIds[0];
|
|
407
|
+
if (!first)
|
|
408
|
+
throw new Error('updateFolders needs at least one folder id');
|
|
409
|
+
const data = await this.request('PATCH',
|
|
410
|
+
// The path names one folder because the route is per-folder; `folderIds` in the body is what widens
|
|
411
|
+
// it. The first id is as good as any for addressing.
|
|
412
|
+
`/api/v1/library/folders/${encodeURIComponent(first)}`, { ...patch, folderIds });
|
|
413
|
+
return data.folders;
|
|
414
|
+
}
|
|
371
415
|
async deleteFolder(folderId) {
|
|
372
416
|
await this.request('DELETE', `/api/v1/library/folders/${encodeURIComponent(folderId)}`);
|
|
373
417
|
}
|
|
374
|
-
/** File an item into a manual folder (a pointer; no bytes move). */
|
|
375
|
-
async addToFolder(folderId, ref) {
|
|
376
|
-
await this.request('POST', `/api/v1/library/folders/${encodeURIComponent(folderId)}/items`, ref);
|
|
377
|
-
}
|
|
378
|
-
async removeFromFolder(folderId, ref) {
|
|
379
|
-
await this.request('DELETE', `/api/v1/library/folders/${encodeURIComponent(folderId)}/items`, ref);
|
|
380
|
-
}
|
|
381
418
|
/**
|
|
382
419
|
* Resolve a batch of media references to vision-ready URLs + light metadata (the
|
|
383
420
|
* micro drill-in behind get_context's macro screenshot). Each item is a raw
|
|
@@ -540,8 +577,6 @@ export class ContentHero {
|
|
|
540
577
|
q.set('platform', options.platform);
|
|
541
578
|
if (options.pipelineStage)
|
|
542
579
|
q.set('pipeline_stage', options.pipelineStage);
|
|
543
|
-
if (options.folderId)
|
|
544
|
-
q.set('folder_id', options.folderId);
|
|
545
580
|
if (options.isFavorite)
|
|
546
581
|
q.set('is_favorite', 'true');
|
|
547
582
|
if (options.search)
|
|
@@ -577,37 +612,6 @@ export class ContentHero {
|
|
|
577
612
|
const data = await this.request('GET', '/api/v1/pipeline-stages');
|
|
578
613
|
return data.stages;
|
|
579
614
|
}
|
|
580
|
-
/** Attach (or replace) a destination on a post. Upserts on platform. */
|
|
581
|
-
async addPostDestination(postId, input) {
|
|
582
|
-
const data = await this.request('POST', `/api/v1/posts/${encodeURIComponent(postId)}/destinations`, input);
|
|
583
|
-
return data.destination;
|
|
584
|
-
}
|
|
585
|
-
/** Update one of a post's destinations. */
|
|
586
|
-
async updatePostDestination(postId, destinationId, input) {
|
|
587
|
-
const data = await this.request('PATCH', `/api/v1/posts/${encodeURIComponent(postId)}/destinations?destination_id=${encodeURIComponent(destinationId)}`, input);
|
|
588
|
-
return data.destination;
|
|
589
|
-
}
|
|
590
|
-
/** Attach an asset to a post by URL or outputId. */
|
|
591
|
-
async addPostAsset(postId, input) {
|
|
592
|
-
const data = await this.request('POST', `/api/v1/posts/${encodeURIComponent(postId)}/assets`, input);
|
|
593
|
-
return data.asset;
|
|
594
|
-
}
|
|
595
|
-
/**
|
|
596
|
-
* Reorder a post's assets (e.g. carousel slide order). `assetIds` must list all
|
|
597
|
-
* of the post's asset ids in the desired order. Returns the assets reordered.
|
|
598
|
-
*/
|
|
599
|
-
async reorderPostAssets(postId, assetIds) {
|
|
600
|
-
const data = await this.request('PATCH', `/api/v1/posts/${encodeURIComponent(postId)}/assets`, { assetIds });
|
|
601
|
-
return data.assets;
|
|
602
|
-
}
|
|
603
|
-
/** Detach an asset from a post. */
|
|
604
|
-
async removePostAsset(postId, assetId) {
|
|
605
|
-
return this.request('DELETE', `/api/v1/posts/${encodeURIComponent(postId)}/assets?asset_id=${encodeURIComponent(assetId)}`);
|
|
606
|
-
}
|
|
607
|
-
/** Detach a destination from a post. */
|
|
608
|
-
async removePostDestination(postId, destinationId) {
|
|
609
|
-
return this.request('DELETE', `/api/v1/posts/${encodeURIComponent(postId)}/destinations?destination_id=${encodeURIComponent(destinationId)}`);
|
|
610
|
-
}
|
|
611
615
|
// -------------------------------------------------------------------------
|
|
612
616
|
// Tags (the organizational tag library; set a post's tags via the `tags`
|
|
613
617
|
// field on createPost / updatePost)
|
|
@@ -631,14 +635,6 @@ export class ContentHero {
|
|
|
631
635
|
async deleteTag(id) {
|
|
632
636
|
return this.request('DELETE', `/api/v1/tags/${encodeURIComponent(id)}`);
|
|
633
637
|
}
|
|
634
|
-
/**
|
|
635
|
-
* Schedule a post: set (or clear, with null) the publish time on the post and
|
|
636
|
-
* all its destinations. This queues; publishing now is `publishPost`.
|
|
637
|
-
*/
|
|
638
|
-
async schedulePost(postId, scheduledAt) {
|
|
639
|
-
const data = await this.request('POST', `/api/v1/posts/${encodeURIComponent(postId)}/schedule`, { scheduledAt });
|
|
640
|
-
return data.post;
|
|
641
|
-
}
|
|
642
638
|
/**
|
|
643
639
|
* Publish a post NOW. Publishes a single platform when `platform` is given,
|
|
644
640
|
* otherwise every destination. Requires a key with the `publish:write` scope.
|
|
@@ -650,29 +646,77 @@ export class ContentHero {
|
|
|
650
646
|
// -------------------------------------------------------------------------
|
|
651
647
|
// Inspiration / research reads
|
|
652
648
|
// -------------------------------------------------------------------------
|
|
653
|
-
/**
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
649
|
+
/**
|
|
650
|
+
* The social accounts the caller tracks, both tiers by default.
|
|
651
|
+
*
|
|
652
|
+
* `accountType` narrows to `inspiration` (creators and competitors they learn from) or `brand` (their own
|
|
653
|
+
* profiles). Every row reports its own `accountType`, so one list answers both questions. This replaces
|
|
654
|
+
* `listInspirationAccounts` and `listBrandAccounts`, which were one query with a different literal.
|
|
655
|
+
*/
|
|
656
|
+
async listAccounts(options = {}) {
|
|
657
|
+
const q = new URLSearchParams();
|
|
658
|
+
if (options.accountType)
|
|
659
|
+
q.set('account_type', options.accountType);
|
|
660
|
+
if (options.brandKitId)
|
|
661
|
+
q.set('brand_kit_id', options.brandKitId);
|
|
662
|
+
const qs = q.toString();
|
|
663
|
+
const data = await this.request('GET', `/api/v1/accounts${qs ? `?${qs}` : ''}`);
|
|
657
664
|
return data.accounts;
|
|
658
665
|
}
|
|
659
|
-
/**
|
|
660
|
-
|
|
661
|
-
|
|
666
|
+
/**
|
|
667
|
+
* One tracked account with its performance: content count, totals, averages, top and recent content.
|
|
668
|
+
* Works for either tier; the tier is reported, not required.
|
|
669
|
+
*/
|
|
670
|
+
async getAccount(accountId) {
|
|
671
|
+
return this.request('GET', `/api/v1/accounts/${encodeURIComponent(accountId)}`);
|
|
662
672
|
}
|
|
663
|
-
/**
|
|
664
|
-
|
|
673
|
+
/**
|
|
674
|
+
* The social content the caller tracks, ranked by outlier score by default.
|
|
675
|
+
*
|
|
676
|
+
* Spans the creators they watch AND their own posts (`scope`, default `all`); each row carries `isOwn`.
|
|
677
|
+
* Filter by platform, content type, a published window, and ranges over score, views, duration and
|
|
678
|
+
* follower count.
|
|
679
|
+
*/
|
|
680
|
+
async listContent(options = {}) {
|
|
665
681
|
const q = new URLSearchParams();
|
|
682
|
+
if (options.scope)
|
|
683
|
+
q.set('scope', options.scope);
|
|
666
684
|
if (options.platform)
|
|
667
685
|
q.set('platform', options.platform);
|
|
668
686
|
if (options.contentType)
|
|
669
687
|
q.set('content_type', options.contentType);
|
|
670
|
-
if (options.
|
|
671
|
-
q.set('
|
|
688
|
+
if (options.outlierScoreMin != null)
|
|
689
|
+
q.set('outlier_score_min', String(options.outlierScoreMin));
|
|
690
|
+
if (options.outlierScoreMax != null)
|
|
691
|
+
q.set('outlier_score_max', String(options.outlierScoreMax));
|
|
692
|
+
if (options.viewsMin != null)
|
|
693
|
+
q.set('views_min', String(options.viewsMin));
|
|
694
|
+
if (options.viewsMax != null)
|
|
695
|
+
q.set('views_max', String(options.viewsMax));
|
|
696
|
+
if (options.durationMin != null)
|
|
697
|
+
q.set('duration_min', String(options.durationMin));
|
|
698
|
+
if (options.durationMax != null)
|
|
699
|
+
q.set('duration_max', String(options.durationMax));
|
|
700
|
+
if (options.subscribersMin != null)
|
|
701
|
+
q.set('subscribers_min', String(options.subscribersMin));
|
|
702
|
+
if (options.subscribersMax != null)
|
|
703
|
+
q.set('subscribers_max', String(options.subscribersMax));
|
|
704
|
+
if (options.publishedAfter)
|
|
705
|
+
q.set('published_after', options.publishedAfter);
|
|
706
|
+
if (options.publishedBefore)
|
|
707
|
+
q.set('published_before', options.publishedBefore);
|
|
708
|
+
if (options.publicationDate)
|
|
709
|
+
q.set('publication_date', options.publicationDate);
|
|
672
710
|
if (options.search)
|
|
673
711
|
q.set('search', options.search);
|
|
674
712
|
if (options.sortBy)
|
|
675
713
|
q.set('sort_by', options.sortBy);
|
|
714
|
+
if (options.sortOrder)
|
|
715
|
+
q.set('sort_order', options.sortOrder);
|
|
716
|
+
if (options.accountIds?.length)
|
|
717
|
+
q.set('account_ids', options.accountIds.join(','));
|
|
718
|
+
if (options.addedByYou)
|
|
719
|
+
q.set('added_by_you', 'true');
|
|
676
720
|
if (options.brandKitId)
|
|
677
721
|
q.set('brand_kit_id', options.brandKitId);
|
|
678
722
|
if (options.favorited)
|
|
@@ -682,22 +726,27 @@ export class ContentHero {
|
|
|
682
726
|
if (options.offset != null)
|
|
683
727
|
q.set('offset', String(options.offset));
|
|
684
728
|
const qs = q.toString();
|
|
685
|
-
return this.request('GET', `/api/v1/
|
|
686
|
-
}
|
|
687
|
-
/** Get one tracked-content item in full (incl. transcript, engagement, hashtags). */
|
|
688
|
-
async getInspirationContent(contentId) {
|
|
689
|
-
const data = await this.request('GET', `/api/v1/inspiration/content/${encodeURIComponent(contentId)}`);
|
|
690
|
-
return data.content;
|
|
729
|
+
return this.request('GET', `/api/v1/content${qs ? `?${qs}` : ''}`);
|
|
691
730
|
}
|
|
692
|
-
/**
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
async
|
|
700
|
-
|
|
731
|
+
/**
|
|
732
|
+
* One tracked post in full: engagement, outlier score, hashtags, keywords, mentions, audio info.
|
|
733
|
+
*
|
|
734
|
+
* The transcript is OPT-IN and windowable, because a sixty-minute video is a large document: ask for
|
|
735
|
+
* `text` or `segments`, and narrow segments with `startMs`/`endMs` or `transcriptSearch`. Throws
|
|
736
|
+
* NotFoundError both when the post does not exist and when the caller has no relationship to it.
|
|
737
|
+
*/
|
|
738
|
+
async getContent(contentId, options = {}) {
|
|
739
|
+
const q = new URLSearchParams();
|
|
740
|
+
if (options.transcript)
|
|
741
|
+
q.set('transcript', options.transcript);
|
|
742
|
+
if (options.startMs != null)
|
|
743
|
+
q.set('start_ms', String(options.startMs));
|
|
744
|
+
if (options.endMs != null)
|
|
745
|
+
q.set('end_ms', String(options.endMs));
|
|
746
|
+
if (options.transcriptSearch)
|
|
747
|
+
q.set('transcript_search', options.transcriptSearch);
|
|
748
|
+
const qs = q.toString();
|
|
749
|
+
return this.request('GET', `/api/v1/content/${encodeURIComponent(contentId)}${qs ? `?${qs}` : ''}`);
|
|
701
750
|
}
|
|
702
751
|
// -------------------------------------------------------------------------
|
|
703
752
|
// Connected accounts (publish targets)
|
|
@@ -721,36 +770,26 @@ export class ContentHero {
|
|
|
721
770
|
* Pass `{ assetType, id }` for a top-level asset (post, voice, brand_kit,
|
|
722
771
|
* project, inspiration_content, gallery), or `{ id, variationIndex }` to
|
|
723
772
|
* favorite a single studio output variation slot (id is a studio output id).
|
|
724
|
-
*
|
|
773
|
+
*
|
|
774
|
+
* `favorited` defaults to true; pass false to CLEAR it. That boolean is what replaced the separate
|
|
775
|
+
* `unfavorite` method, which was this call with one value flipped. Idempotent in both directions.
|
|
725
776
|
*/
|
|
726
777
|
async favorite(input) {
|
|
727
778
|
await this.request('POST', '/api/v1/favorite', input);
|
|
728
779
|
}
|
|
729
|
-
/**
|
|
730
|
-
* Clear the favorite flag on an asset. Requires the `favorites:write` scope.
|
|
731
|
-
* Same target shape as `favorite`. Idempotent.
|
|
732
|
-
*/
|
|
733
|
-
async unfavorite(input) {
|
|
734
|
-
await this.request('POST', '/api/v1/unfavorite', input);
|
|
735
|
-
}
|
|
736
780
|
/**
|
|
737
781
|
* Archive an asset. Requires the `favorites:write` scope.
|
|
738
782
|
*
|
|
739
783
|
* Pass `{ assetType, id }` for a top-level asset (post, brand_kit,
|
|
740
784
|
* brand_kit_section, project), or `{ id, variationIndex }` to archive a single
|
|
741
785
|
* studio output variation slot. Archiving a post sets its status to 'archived'.
|
|
742
|
-
*
|
|
786
|
+
*
|
|
787
|
+
* `archived` defaults to true; pass false to RESTORE (a post goes back to 'draft'). That boolean is what
|
|
788
|
+
* replaced the separate `unarchive` method. Idempotent in both directions.
|
|
743
789
|
*/
|
|
744
790
|
async archive(input) {
|
|
745
791
|
await this.request('POST', '/api/v1/archive', input);
|
|
746
792
|
}
|
|
747
|
-
/**
|
|
748
|
-
* Unarchive an asset. Requires the `favorites:write` scope. Same target shape
|
|
749
|
-
* as `archive`. Unarchiving a post restores it to 'draft'. Idempotent.
|
|
750
|
-
*/
|
|
751
|
-
async unarchive(input) {
|
|
752
|
-
await this.request('POST', '/api/v1/unarchive', input);
|
|
753
|
-
}
|
|
754
793
|
// -------------------------------------------------------------------------
|
|
755
794
|
// Editor / canvas ops (programmatic parity with the manual UI + in-app agent)
|
|
756
795
|
// -------------------------------------------------------------------------
|