@clipwright/sdk 0.60.0 → 0.62.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/client-id.js +0 -8
- package/dist/index.d.ts +11 -126
- package/dist/index.js +38 -188
- package/dist/tolerant.d.ts +0 -2
- package/dist/tolerant.js +0 -6
- package/package.json +3 -3
- package/dist/client-id.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/tolerant.js.map +0 -1
package/dist/client-id.js
CHANGED
|
@@ -2,9 +2,6 @@ import { randomUUID } from "node:crypto";
|
|
|
2
2
|
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
3
3
|
import { homedir } from "node:os";
|
|
4
4
|
import { join } from "node:path";
|
|
5
|
-
/** Stable per-install identity that prefixes the idempotency key, so retries */
|
|
6
|
-
/** deduplicate across restarts without merging different users' runs. */
|
|
7
|
-
/** An explicit env value wins and skips the file entirely. */
|
|
8
5
|
const ENV_VAR = "CLIPWRIGHT_CLIENT_ID";
|
|
9
6
|
export function resolveClientId() {
|
|
10
7
|
const fromEnv = process.env[ENV_VAR];
|
|
@@ -20,19 +17,14 @@ export function resolveClientId() {
|
|
|
20
17
|
return existing;
|
|
21
18
|
}
|
|
22
19
|
}
|
|
23
|
-
// First run on this install: persist a stable id. Dashless UUID keeps the
|
|
24
|
-
// Idempotency-Key header short.
|
|
25
20
|
const id = randomUUID().replace(/-/g, "");
|
|
26
21
|
mkdirSync(dir, { recursive: true });
|
|
27
22
|
writeFileSync(file, id, "utf8");
|
|
28
23
|
return id;
|
|
29
24
|
}
|
|
30
25
|
catch (cause) {
|
|
31
|
-
// No silent ephemeral id: a fresh id per start disables dedup and turns
|
|
32
|
-
// every retry into a second paid render.
|
|
33
26
|
throw new Error(`Cannot read or create ~/.clipwright/client-id. Set the ${ENV_VAR} ` +
|
|
34
27
|
`environment variable to a stable per-install identifier so idempotent ` +
|
|
35
28
|
`retries deduplicate instead of billing twice.`, { cause });
|
|
36
29
|
}
|
|
37
30
|
}
|
|
38
|
-
//# sourceMappingURL=client-id.js.map
|
package/dist/index.d.ts
CHANGED
|
@@ -1,102 +1,58 @@
|
|
|
1
|
-
import { type AdGuide, type CreateFilmDraftInput, type CheckFilmInput, type FilmCheck, type FilmGuide, type FilmKit, type FilmKitQuery, type FilmDraft, type PutFilmFilesInput, type FilmHeroInput, type FilmRenderInput, type FilmRun, type FilmStillsRequest, type FilmVoiceInput, type OwnAgentQuote, type Account, type ActorDefaults, type ActorDefaultsInput, type ActorCatalogEntry, type BrandKitWithStyles, type BrandKitInput, type BrandStyle, type BrandStyleProposal, type ProposeBrandStyleInput, type SaveBrandStyleInput, type DesignInput, type ExtractBrandResponse, type CreateActorInputArgs, type CreateActorQuote, type FacelessQuoteResponse, type GenerateImageRequest, type GenerateVideoRequest, type GenerationModels, type GenerationQuote, type FeedbackRequest, type FeedbackResponse, type PricesResponseRead, type TemplateSoundsList, type MotionMovesList, type MotionMovesQueryArgs, type AnalysisQuoteResponse, type AnalyzeReferenceRequest, type ReferenceAnalysisRead, type ReferenceAnalysisQuery, type RunQuery, type AnalyzeCreatorRequest, type CreatorProfileQuote, type CreatorProfileRead, type CreatorProfileQuery, type FindTrendsArgs, type FindTrendsInput, type TrendNichesRead, type TrendNichesInput, type TrendSearchQuote, type TrendSearchRead, type TrendSearchQuery, type MakeFacelessInputArgs, type RunEditRead, type RunShotsRead, type RevisionQuoteRead, type RevisionRequest, type CandidateQuoteRead, type CandidateRequest, type RunCandidatesRead, type SaveRunEditArgs, type UploadIntentRequest, type UploadIntentResponse, type UploadItemRead, type UploadListRead, type UploadMediaType, type UploadResponse, type AssetItemRead, type AssetListQuery, type AssetListRead, type AssetPutMediaType, type AssetRead, type AssetRole, type CreateAssetRequest, type UpdateAssetRequest, type VoicesQuery, type VoiceCatalogEntry as CoreVoiceCatalogEntry, type AgentFailureReport, type ApiFailure, type MakeUgcInput, type MakeUgcInputArgs, type QuoteResponse, type Run, type RunRead } from "@clipwright/core";
|
|
1
|
+
import { type AdRecord, type CreateAdInput, type UpdateAdInput, type AdGuide, type AdGuideQuery, type CreateFilmDraftInput, type CheckFilmInput, type FilmCheck, type FilmGuide, type FilmKit, type FilmKitQuery, type FilmDraft, type PutFilmFilesInput, type FilmHeroInput, type FilmEditRequest, type TakeCheckRequest, type TakeFramesRequest, type FilmRenderInput, type FilmRun, type FilmStillsRequest, type FilmVoiceInput, type OwnAgentQuote, type Account, type ActorDefaults, type ActorDefaultsInput, type ActorCatalogEntry, type BrandKitWithStyles, type BrandKitInput, type BrandStyle, type BrandStyleProposal, type ProposeBrandStyleInput, type SaveBrandStyleInput, type DesignInput, type ExtractBrandResponse, type CreateActorInputArgs, type CreateActorQuote, type FacelessQuoteResponse, type GenerateImageRequest, type GenerateVideoRequest, type GenerationModels, type GenerationQuote, type FeedbackRequest, type FeedbackResponse, type PricesResponseRead, type TemplateSoundsList, type MotionMovesList, type MotionMovesQueryArgs, type AnalysisQuoteResponse, type AnalyzeReferenceRequest, type ReferenceAnalysisRead, type ReferenceAnalysisQuery, type RunQuery, type AnalyzeCreatorRequest, type CreatorProfileQuote, type CreatorProfileRead, type CreatorProfileQuery, type FindTrendsArgs, type FindTrendsInput, type TrendNichesRead, type TrendNichesInput, type TrendSearchQuote, type TrendSearchRead, type TrendSearchQuery, type MakeFacelessInputArgs, type RunEditRead, type RunShotsRead, type RevisionQuoteRead, type RevisionRequest, type CandidateQuoteRead, type CandidateRequest, type RunCandidatesRead, type SaveRunEditArgs, type UploadIntentRequest, type UploadIntentResponse, type UploadItemRead, type UploadListRead, type UploadMediaType, type UploadResponse, type AssetItemRead, type AssetListQuery, type AssetListRead, type AssetPutMediaType, type AssetRead, type AssetRole, type CreateAssetRequest, type UpdateAssetRequest, type VoicesQuery, type VoiceCatalogEntry as CoreVoiceCatalogEntry, type AgentFailureReport, type ApiFailure, type MakeUgcInput, type MakeUgcInputArgs, type QuoteResponse, type Run, type RunRead } from "@clipwright/core";
|
|
2
2
|
import { type PlanReferenceRemakeArgs, type CreateWorkflowPlanArgs, type SaveWorkflowPlanArgs, type ApproveWorkflowPlanArgs, type LaunchWorkflowArgs, type WorkflowCatalogRead, type WorkflowMethodRead, type WorkflowPlanRead, type WorkflowQuoteRead, type WorkflowLaunchRead, type WorkflowRunRead } from '@clipwright/core/workflows';
|
|
3
|
-
/** What a credential callback is asked to cover: one request exactly as it is sent. */
|
|
4
3
|
export interface ApiKeyRequest {
|
|
5
|
-
/** The method in upper case. */
|
|
6
4
|
method: string;
|
|
7
|
-
/** The path with its query string. */
|
|
8
5
|
path: string;
|
|
9
|
-
/** The body as sent; the empty string when there is none. */
|
|
10
6
|
body: string | Uint8Array;
|
|
11
|
-
/** The `Idempotency-Key` header, or the empty string. */
|
|
12
7
|
idempotencyKey: string;
|
|
13
8
|
}
|
|
14
9
|
export interface ClipwrightClientOptions {
|
|
15
|
-
/** A key, or a callback that makes a credential for each request (a per-request signature). */
|
|
16
10
|
apiKey: string | ((request: ApiKeyRequest) => string);
|
|
17
|
-
/** The install identity of idempotency keys. When set, neither the environment nor `~/.clipwright` is read. */
|
|
18
11
|
clientId?: string | undefined;
|
|
19
12
|
baseUrl?: string | undefined;
|
|
20
|
-
/** Run status polling interval, ms. */
|
|
21
13
|
pollIntervalMs?: number | undefined;
|
|
22
|
-
/** Timeout of ONE request, ms (default 30_000). `maxWaitMs` bounds the */
|
|
23
|
-
/** whole `makeUgc`; this bounds each call separately. */
|
|
24
14
|
requestTimeoutMs?: number | undefined;
|
|
25
15
|
}
|
|
26
|
-
/** Run start options. `attempt` sets the `:N` suffix; an explicit key overrides it. */
|
|
27
16
|
export interface StartUgcOptions {
|
|
28
|
-
/** Attempt number (default 1) → `:N` suffix of the idempotency key. */
|
|
29
17
|
attempt?: number | undefined;
|
|
30
|
-
/** Explicit key for an intentionally new run; overrides the computed one. */
|
|
31
18
|
idempotencyKey?: string | undefined;
|
|
32
19
|
}
|
|
33
|
-
/** Options of `getRun`: the server-side wait (#1036) and a signal that cancels the read. */
|
|
34
20
|
export type GetRunOptions = RunQuery & {
|
|
35
21
|
signal?: AbortSignal | undefined;
|
|
36
22
|
};
|
|
37
|
-
/** Options of the blocking `makeUgc`: `attempt` plus a polling deadline. */
|
|
38
23
|
export interface MakeUgcOptions {
|
|
39
24
|
attempt?: number | undefined;
|
|
40
|
-
/** Deadline for reaching a terminal state, ms (default 10 min). */
|
|
41
25
|
maxWaitMs?: number | undefined;
|
|
42
26
|
}
|
|
43
|
-
/** An unparseable server response, distinct from rejected input: after */
|
|
44
|
-
/** `POST /run` the run may already exist and be charged. */
|
|
45
27
|
export declare class ClipwrightResponseError extends Error {
|
|
46
28
|
#private;
|
|
47
|
-
/** Path whose response failed to parse. */
|
|
48
29
|
readonly path: string;
|
|
49
|
-
/** Whether the request may already have changed state (created a run, spent credits). */
|
|
50
30
|
readonly mayHaveTakenEffect: boolean;
|
|
51
|
-
/** `false` means delivery is unconfirmed, not that it failed: HTTP cannot */
|
|
52
|
-
/** tell a lost request from a lost response. */
|
|
53
31
|
readonly deliveryConfirmed: boolean;
|
|
54
32
|
constructor(path: string, mayHaveTakenEffect: boolean, cause: unknown, deliveryConfirmed?: boolean);
|
|
55
33
|
}
|
|
56
|
-
/** One `/v1/voices` preset, derived from the response schema so the two */
|
|
57
|
-
/** shapes cannot drift apart. */
|
|
58
34
|
export type VoiceCatalogEntry = CoreVoiceCatalogEntry;
|
|
59
|
-
/** An API refusal with status, code and server-set pause intact. The shape */
|
|
60
|
-
/** comes from core, so SDK, CLI and MCP answer "retry or not" identically. */
|
|
61
35
|
export declare class ClipwrightApiError extends Error {
|
|
62
|
-
/** Parsed refusal: kind, numbers, pause. Shape comes from core. */
|
|
63
36
|
readonly failure: ApiFailure;
|
|
64
37
|
readonly status: number;
|
|
65
|
-
/** Refusal code; `http_<status>` for foreign bodies without one. */
|
|
66
38
|
readonly code: string;
|
|
67
|
-
/** Server-set pause in seconds; `undefined` if the server named none. */
|
|
68
39
|
readonly retryAfterSeconds: number | undefined;
|
|
69
40
|
constructor(failure: ApiFailure);
|
|
70
|
-
/** Whether repeating the same call makes sense. Core decides, not this surface. */
|
|
71
41
|
get retryable(): boolean;
|
|
72
|
-
/** The refusal expanded for an agent: numbers, instruction, retry flag. */
|
|
73
42
|
report(): AgentFailureReport;
|
|
74
43
|
}
|
|
75
44
|
export declare class ClipwrightClient {
|
|
76
45
|
#private;
|
|
77
46
|
constructor(opts: ClipwrightClientOptions);
|
|
78
|
-
/** Cost estimate; spends no credits. */
|
|
79
47
|
quoteUgc(input: MakeUgcInputArgs): Promise<QuoteResponse>;
|
|
80
|
-
/** Starts a render and returns the run at once (state=queued). The key is built */
|
|
81
|
-
/** here with an always-present `:N` suffix, so MCP and CLI dedupe alike. */
|
|
82
48
|
startUgc(input: MakeUgcInputArgs, opts?: StartUgcOptions): Promise<Run>;
|
|
83
|
-
/** Uploads an image; returns its reference for later runs. */
|
|
84
49
|
uploadImage(bytes: Uint8Array<ArrayBuffer>, mediaType: UploadMediaType): Promise<UploadResponse>;
|
|
85
|
-
/** The account's uploads a revision still takes, newest first, each with a link signed now and its `usable_until`. Free. */
|
|
86
50
|
listUploads(): Promise<UploadListRead>;
|
|
87
|
-
/** The server downloads a public https PNG or JPEG into an upload. Free; a repeat within a day answers the same upload. */
|
|
88
51
|
importUpload(url: string): Promise<UploadResponse>;
|
|
89
|
-
/** A presigned PUT for a local file of the declared type, size and sha256; the upload is usable once the PUT lands. Free. */
|
|
90
52
|
createUpload(input: UploadIntentRequest): Promise<UploadIntentResponse>;
|
|
91
|
-
/** One upload with a fresh link; after `createUpload` it also confirms the PUT. Free. */
|
|
92
53
|
getUpload(uploadIdValue: string): Promise<UploadItemRead>;
|
|
93
|
-
/** Deletes an upload: unusable at once, its file erased later. The answer is 204 with no body, a repeat too. Free. */
|
|
94
54
|
deleteUpload(uploadIdValue: string): Promise<void>;
|
|
95
|
-
/** Saves an asset of the account from a generation, an upload, a url, base64 or a PUT. Free; a repeat within a day answers the */
|
|
96
|
-
/** same asset. A clip by url and a PUT answer a pending asset: read it with `getAsset` until its state is ready or failed. */
|
|
97
55
|
createAsset(input: CreateAssetRequest): Promise<AssetItemRead>;
|
|
98
|
-
/** Saves a local PNG or JPEG (10 MB) or MP4 (32 MB) as an asset; `rights_confirmed` states you may use the people and works in it, */
|
|
99
|
-
/** `analysis_only` keeps it for analyzeReference alone. A clip answers a pending asset that is checked before use. Free. */
|
|
100
56
|
createAssetFromBytes(bytes: Uint8Array<ArrayBuffer>, mediaType: AssetPutMediaType, meta: {
|
|
101
57
|
role: AssetRole;
|
|
102
58
|
name: string;
|
|
@@ -105,164 +61,93 @@ export declare class ClipwrightClient {
|
|
|
105
61
|
} | {
|
|
106
62
|
analysis_only: true;
|
|
107
63
|
})): Promise<AssetItemRead>;
|
|
108
|
-
/** The account's live assets, newest first, with its usage of the caps. Free. */
|
|
109
64
|
listAssets(query?: AssetListQuery): Promise<AssetListRead>;
|
|
110
|
-
/** One asset with a link signed now, or its pending state; after a PUT this read hands the file to processing. Free. */
|
|
111
65
|
getAsset(assetIdValue: string): Promise<AssetItemRead>;
|
|
112
|
-
/** A new name or role for an asset. Free. */
|
|
113
66
|
updateAsset(assetIdValue: string, patch: UpdateAssetRequest): Promise<AssetRead>;
|
|
114
|
-
/** Deletes an asset; the answer is 204 with no body. Free. */
|
|
115
67
|
deleteAsset(assetIdValue: string): Promise<void>;
|
|
116
|
-
/** Deletes the files of a finished run; the run and its charge stay. The answer is 204 with no body, a repeat too. Free. */
|
|
117
68
|
deleteRunMedia(runIdValue: string): Promise<void>;
|
|
118
|
-
/** Curated voice catalog for `voice`/`voice_id`; other voices stay reachable by raw `voice_id`. */
|
|
119
69
|
listVoices(filters?: VoicesQuery): Promise<VoiceCatalogEntry[]>;
|
|
120
|
-
/** Account state via `GET /v1/account`. Free. */
|
|
121
70
|
getAccount(): Promise<Account>;
|
|
122
71
|
listActors(): Promise<ActorCatalogEntry[]>;
|
|
123
72
|
getActorDefaults(id: string): Promise<ActorDefaults>;
|
|
124
73
|
setActorDefaults(id: string, input: ActorDefaultsInput): Promise<ActorDefaults>;
|
|
125
|
-
/** The account's saved design DNA (#1122), `null` when none is saved, and its saved styles (#1364). */
|
|
126
74
|
getBrandKit(): Promise<BrandKitWithStyles>;
|
|
127
|
-
/** Saves the account's design DNA, or clears it with `null`; spends no credits. The saved script voice stays as it is. */
|
|
128
75
|
setBrandKit(design: DesignInput | null): Promise<BrandKitWithStyles>;
|
|
129
|
-
/** Saves each part of the brand kit given: design DNA, script voice or both; `null` clears a part, an omitted one stays. Free. */
|
|
130
76
|
saveBrandKit(input: BrandKitInput): Promise<BrandKitWithStyles>;
|
|
131
|
-
/** A style proposed from a finished analysis of a video you like, for the customer to confirm; spends no credits. */
|
|
132
77
|
proposeBrandStyle(input: ProposeBrandStyleInput): Promise<BrandStyleProposal>;
|
|
133
|
-
/** Saves a confirmed style by name beside the brand kit, replacing one of that name; spends no credits. */
|
|
134
78
|
saveBrandStyle(input: SaveBrandStyleInput): Promise<BrandStyle>;
|
|
135
|
-
/** A proposed design DNA read from a public site, for the customer to confirm; spends no credits. */
|
|
136
79
|
extractBrand(url: string): Promise<ExtractBrandResponse>;
|
|
137
|
-
/** `create_actor` estimate; spends no credits. */
|
|
138
80
|
quoteActor(input: CreateActorInputArgs): Promise<CreateActorQuote>;
|
|
139
|
-
/** Starts `create_actor`; returns the run at once (state=queued), like `startUgc`. */
|
|
140
|
-
/** The key uses its own schema: the `make_ugc` one would strip actor fields. */
|
|
141
81
|
createActor(input: CreateActorInputArgs, opts?: StartUgcOptions): Promise<Run>;
|
|
142
|
-
/** `make_faceless` estimate; spends no credits. Mismatched script/brief is refused before sending. */
|
|
143
82
|
quoteFaceless(input: MakeFacelessInputArgs): Promise<FacelessQuoteResponse>;
|
|
144
|
-
/** Starts `make_faceless`; returns the run at once (state=queued), keyed like `createActor`. */
|
|
145
83
|
startFaceless(input: MakeFacelessInputArgs, opts?: StartUgcOptions): Promise<Run>;
|
|
146
|
-
/** What a revision of a run would change and cost; spends no credits. Read tolerantly, as the shots are. */
|
|
147
84
|
quoteRevision(runId: string, request: RevisionRequest): Promise<RevisionQuoteRead>;
|
|
148
|
-
/** Starts a revision: a new run, returned at once (state=queued). The same request and attempt send the same key, */
|
|
149
|
-
/** so a resend returns the first run; `attempt: 2` starts a deliberate second one. */
|
|
150
85
|
startRevision(runId: string, request: RevisionRequest, opts?: StartUgcOptions): Promise<RunRead>;
|
|
151
|
-
/** What one shot candidate would cost; spends no credits. Read tolerantly, as a revision quote is. */
|
|
152
86
|
quoteCandidate(runId: string, request: CandidateRequest): Promise<CandidateQuoteRead>;
|
|
153
|
-
/** Starts a shot candidate: a new run, returned at once (state=queued). The key is the run and the request with */
|
|
154
|
-
/** its `take`, so a resend returns the first run; `take: 2` makes a deliberate second candidate. */
|
|
155
87
|
createCandidate(runId: string, request: CandidateRequest, opts?: {
|
|
156
88
|
idempotencyKey?: string | undefined;
|
|
157
89
|
}): Promise<RunRead>;
|
|
158
|
-
/** The shot candidates of a run's family, oldest first, each with its state, charge and preview. Free. */
|
|
159
90
|
listCandidates(runId: string): Promise<RunCandidatesRead>;
|
|
160
|
-
/** The generation models with their measured shapes and prices. Free. */
|
|
161
91
|
listGenerationModels(): Promise<GenerationModels>;
|
|
162
|
-
/** The price of every action in credits, a fixed number per unit or a formula. Free, and answered without a key. */
|
|
163
92
|
listPrices(): Promise<PricesResponseRead>;
|
|
164
|
-
/** The template sounds a make_ugc run may name per beat, with each beat's default. Free. */
|
|
165
93
|
listTemplateSounds(): Promise<TemplateSoundsList>;
|
|
166
|
-
/** The catalogue of moves to put on lines of a script (#1175), filtered and paged; short lines unless detail full or names. Free. */
|
|
167
94
|
listMoves(filters?: MotionMovesQueryArgs): Promise<MotionMovesList>;
|
|
168
|
-
/** What analyzeReference would hold and charge for this asset now: 0 when a live analysis of it would answer. Free. */
|
|
169
95
|
quoteAnalysis(request: AnalyzeReferenceRequest): Promise<AnalysisQuoteResponse>;
|
|
170
|
-
/** Starts reading an MP4 asset into a reference profile, answered at once (state=queued); the same asset answers the */
|
|
171
|
-
/** same analysis unless it failed, so a retry needs no key. Paid: the price is held now and charged once it succeeds. */
|
|
172
96
|
analyzeReference(request: AnalyzeReferenceRequest): Promise<ReferenceAnalysisRead>;
|
|
173
|
-
/** Tells Clipwright what is missing, confusing, wrong or slow; we read every one. Free; the same feedback within 24 h */
|
|
174
|
-
/** answers the same feedback_id, so a retry files nothing twice. */
|
|
175
97
|
sendFeedback(request: FeedbackRequest): Promise<FeedbackResponse>;
|
|
176
|
-
/** One reference analysis: queued, analyzing, succeeded with its profile and warnings, or failed with its error. Free. */
|
|
177
|
-
/** `frames_from`/`frames_to` page its one-a-second frames; `wait_seconds` (≤ 50) lets the server hold the read until it finishes. */
|
|
178
98
|
getReferenceAnalysis(analysisIdValue: string, query?: ReferenceAnalysisQuery): Promise<ReferenceAnalysisRead>;
|
|
179
|
-
/** What analyzeCreator would hold and charge for this link now: 0 when a recent profile of the same creator would answer. Free. */
|
|
180
99
|
quoteCreatorProfile(request: AnalyzeCreatorRequest): Promise<CreatorProfileQuote>;
|
|
181
|
-
/** Starts a creator's profile from a profile or video link, answered at once (state=queued); the same creator within an hour */
|
|
182
|
-
/** answers the same profile, so a retry needs no key. Paid: the price is held now and charged once it succeeds. */
|
|
183
100
|
analyzeCreator(request: AnalyzeCreatorRequest): Promise<CreatorProfileRead>;
|
|
184
|
-
/** One creator profile; `wait_seconds` (≤ 50) lets the server hold the read until it finishes. Free. */
|
|
185
101
|
getCreatorProfile(profileIdValue: string, query?: CreatorProfileQuery): Promise<CreatorProfileRead>;
|
|
186
|
-
/** Deletes a finished creator profile; its run and charge stay. The answer is 204 with no body, a repeat too. Free. */
|
|
187
102
|
deleteCreatorProfile(profileIdValue: string): Promise<void>;
|
|
188
|
-
/** What findTrends would hold and charge for this query now: 0 when a search of the same query from the last hour would answer. Free. */
|
|
189
|
-
/** Without keywords it prices the primary saved niche. */
|
|
190
103
|
quoteTrends(request: FindTrendsInput): Promise<TrendSearchQuote>;
|
|
191
|
-
/** Starts a search for reels on a topic, answered at once (state=queued); the same query within an hour answers the same search, so a */
|
|
192
|
-
/** retry needs no key. Paid: held now, charged once it succeeds. Without keywords: the primary saved niche, named in the answer. */
|
|
193
104
|
findTrends(request: FindTrendsInput): Promise<TrendSearchRead>;
|
|
194
|
-
/** The account's saved niches, the primary first. Free. */
|
|
195
105
|
getTrendNiches(): Promise<TrendNichesRead>;
|
|
196
|
-
/** Saves the account's niches, at most three, replacing the saved list; [] clears it. Free. */
|
|
197
106
|
setTrendNiches(input: TrendNichesInput): Promise<TrendNichesRead>;
|
|
198
|
-
/** One topic search; `wait_seconds` (≤ 50) lets the server hold the read until it finishes. Free. */
|
|
199
107
|
getTrendSearch(searchIdValue: string, query?: TrendSearchQuery): Promise<TrendSearchRead>;
|
|
200
|
-
/** A new film draft for your own agent's scene code, under the account's brand theme frozen now. Free. */
|
|
201
108
|
createFilmDraft(request?: Partial<CreateFilmDraftInput>): Promise<FilmDraft>;
|
|
202
|
-
/** One live film draft of the account. Free. */
|
|
203
109
|
getFilmDraft(draftIdValue: string): Promise<FilmDraft>;
|
|
204
|
-
/** A change to a draft's files, anchors, sounds or captions on the revision you read; a stale revision is refused with 409. Free. */
|
|
205
110
|
putFilmFiles(draftIdValue: string, request: PutFilmFilesInput): Promise<FilmDraft>;
|
|
206
|
-
/** The checks stills and the render run before money, on a draft revision (with unsaved changes laid over it) and a delivered voice: refusals
|
|
207
|
-
* as `file:line`, warnings, each anchor's second and the voice's end. Free; a stale revision is refused with 409. */
|
|
208
111
|
checkFilm(draftIdValue: string, request: CheckFilmInput): Promise<FilmCheck>;
|
|
209
|
-
/** What stills of a draft revision would hold, and how many of them are free; spends no credits. */
|
|
210
112
|
quoteStills(request: FilmStillsRequest): Promise<OwnAgentQuote>;
|
|
211
|
-
/** Stills of a draft revision on a delivered voice, gated first; a draft's first stills in any 24 hours are free, the rest charged per still drawn.
|
|
212
|
-
* Returns at once; read it with getFilmRun. */
|
|
213
113
|
previewStills(request: FilmStillsRequest, opts?: StartUgcOptions): Promise<FilmRun>;
|
|
214
|
-
/** What a voice for this text would hold; spends no credits. */
|
|
215
114
|
quoteVoice(request: FilmVoiceInput): Promise<OwnAgentQuote>;
|
|
216
|
-
/** A voice with word timings, charged per second delivered. Returns at once; read it with getFilmRun. */
|
|
217
115
|
makeVoice(request: FilmVoiceInput, opts?: StartUgcOptions): Promise<FilmRun>;
|
|
218
|
-
/** What rendering a draft revision on a voice would hold; spends no credits. */
|
|
219
116
|
quoteRender(request: FilmRenderInput): Promise<OwnAgentQuote>;
|
|
220
|
-
/** The film rendered from a draft revision on a delivered voice, charged by its length only when delivered. Returns at once. */
|
|
221
117
|
renderFilm(request: FilmRenderInput, opts?: StartUgcOptions): Promise<FilmRun>;
|
|
222
|
-
/** What making a hero would hold: every pose; spends no credits. */
|
|
223
118
|
quoteFilmHero(request: FilmHeroInput): Promise<OwnAgentQuote>;
|
|
224
|
-
/** A hero's poses, saved as the account's mascot, charged per pose published. Returns at once; read it with getFilmRun. */
|
|
225
119
|
makeFilmHero(request: FilmHeroInput, opts?: StartUgcOptions): Promise<FilmRun>;
|
|
226
|
-
|
|
120
|
+
quoteEdit(request: FilmEditRequest): Promise<OwnAgentQuote>;
|
|
121
|
+
renderEdit(request: FilmEditRequest, opts?: StartUgcOptions): Promise<FilmRun>;
|
|
122
|
+
quoteTakeFrames(request: TakeFramesRequest): Promise<OwnAgentQuote>;
|
|
123
|
+
takeFrames(request: TakeFramesRequest, opts?: StartUgcOptions): Promise<FilmRun>;
|
|
124
|
+
quoteTakeCheck(request: TakeCheckRequest): Promise<OwnAgentQuote>;
|
|
125
|
+
checkTake(request: TakeCheckRequest, opts?: StartUgcOptions): Promise<FilmRun>;
|
|
227
126
|
getFilmGuide(): Promise<FilmGuide>;
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
127
|
+
getAdGuide(query?: AdGuideQuery): Promise<AdGuide>;
|
|
128
|
+
createAd(request: CreateAdInput): Promise<AdRecord>;
|
|
129
|
+
updateAd(adIdValue: string, request: UpdateAdInput): Promise<AdRecord>;
|
|
130
|
+
getAd(adIdValue: string): Promise<AdRecord>;
|
|
231
131
|
getFilmKit(query?: FilmKitQuery): Promise<FilmKit>;
|
|
232
|
-
/** One own-agent run of the account and what it delivered. Free. */
|
|
233
132
|
getFilmRun(runIdValue: string): Promise<FilmRun>;
|
|
234
|
-
/** What one image would cost and its size; spends no credits. */
|
|
235
133
|
quoteImage(request: GenerateImageRequest): Promise<GenerationQuote>;
|
|
236
|
-
/** Starts an image generation, returned at once (state=queued); the same request and attempt return the same run. */
|
|
237
134
|
generateImage(request: GenerateImageRequest, opts?: StartUgcOptions): Promise<RunRead>;
|
|
238
|
-
/** What one clip would cost and its size; spends no credits. */
|
|
239
135
|
quoteVideo(request: GenerateVideoRequest): Promise<GenerationQuote>;
|
|
240
|
-
/** Starts a clip generation, returned at once (state=queued); the same request and attempt return the same run. */
|
|
241
136
|
generateVideo(request: GenerateVideoRequest, opts?: StartUgcOptions): Promise<RunRead>;
|
|
242
|
-
/** Deletes a personal actor. The answer is 204 with no body. */
|
|
243
137
|
deleteActor(id: string): Promise<void>;
|
|
244
|
-
/** Reads a run tolerantly, falling back to the raw body for a newer server stage. */
|
|
245
|
-
/** `wait_seconds` (≤ 50) lets the server hold the read until the run ends; `signal` cancels it. */
|
|
246
138
|
getRun(runId: string, opts?: GetRunOptions): Promise<WorkflowRunRead>;
|
|
247
139
|
listWorkflows(): Promise<WorkflowCatalogRead>;
|
|
248
140
|
getWorkflow(methodId: string): Promise<WorkflowMethodRead>;
|
|
249
141
|
createWorkflowPlan(input: CreateWorkflowPlanArgs): Promise<WorkflowPlanRead>;
|
|
250
|
-
/** Free: the server compiles a reference profile, or the analysis_id that holds one, and the accepted script into a new plan, or with plan_id and base_version into a draft revision of it; warnings name what it does not reproduce. */
|
|
251
142
|
planReferenceRemake(input: PlanReferenceRemakeArgs): Promise<WorkflowPlanRead>;
|
|
252
143
|
getWorkflowPlan(planId: string): Promise<WorkflowPlanRead>;
|
|
253
144
|
saveWorkflowPlan(planId: string, input: SaveWorkflowPlanArgs): Promise<WorkflowPlanRead>;
|
|
254
145
|
approveWorkflowPlan(planId: string, input: ApproveWorkflowPlanArgs): Promise<WorkflowPlanRead>;
|
|
255
146
|
quoteWorkflowPlan(planId: string): Promise<WorkflowQuoteRead>;
|
|
256
147
|
runWorkflowPlan(planId: string, input: LaunchWorkflowArgs): Promise<WorkflowLaunchRead>;
|
|
257
|
-
/** The shots of a run, read tolerantly: a kind, action or line of a newer server still parses. Free. */
|
|
258
148
|
getRunShots(runId: string): Promise<RunShotsRead>;
|
|
259
|
-
/** The draft of a run's edit, read as tolerantly. Version 0 is a run with nothing stored. Free. */
|
|
260
149
|
getRunEdit(runId: string): Promise<RunEditRead>;
|
|
261
|
-
/** Saves the draft against the version it was read at; charges nothing. One request, never repeated */
|
|
262
|
-
/** here: after a lost answer the same save answers `edit_conflict`, and a read of the draft tells why. */
|
|
263
150
|
saveRunEdit(runId: string, input: SaveRunEditArgs): Promise<RunEditRead>;
|
|
264
|
-
/** Start plus polling to a terminal state. `maxWaitMs` is one deadline that */
|
|
265
|
-
/** aborts both the pause and the request itself. */
|
|
266
151
|
makeUgc(input: MakeUgcInputArgs, opts?: MakeUgcOptions, onProgress?: (run: RunRead) => void): Promise<RunRead>;
|
|
267
152
|
}
|
|
268
153
|
export { resolveClientId } from "./client-id.js";
|