@clipwright/sdk 0.62.0 → 0.64.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/index.d.ts CHANGED
@@ -1,4 +1,4 @@
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";
1
+ import { type AdRecord, type CreateAdInput, type UpdateAdInput, type CreateCutInput, type CutRecord, type FilmCutPreviewRequest, type UpdateCutInput, type AdGuide, type AdGuideQuery, type CreateFilmDraftInput, type CheckFilmInput, type FilmCheck, type FilmCutCheck, type FilmCutRequest, type FilmCutRunRequest, type FilmGuide, type FilmGuideQuery, 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
3
  export interface ApiKeyRequest {
4
4
  method: string;
@@ -109,6 +109,14 @@ export declare class ClipwrightClient {
109
109
  getFilmDraft(draftIdValue: string): Promise<FilmDraft>;
110
110
  putFilmFiles(draftIdValue: string, request: PutFilmFilesInput): Promise<FilmDraft>;
111
111
  checkFilm(draftIdValue: string, request: CheckFilmInput): Promise<FilmCheck>;
112
+ checkCut(request: FilmCutRequest): Promise<FilmCutCheck>;
113
+ quoteCut(request: FilmCutRunRequest): Promise<OwnAgentQuote>;
114
+ renderCut(request: FilmCutRunRequest, opts?: StartUgcOptions): Promise<FilmRun>;
115
+ quotePreviewCut(request: FilmCutPreviewRequest): Promise<OwnAgentQuote>;
116
+ previewCut(request: FilmCutPreviewRequest, opts?: StartUgcOptions): Promise<FilmRun>;
117
+ createCut(request: CreateCutInput): Promise<CutRecord>;
118
+ updateCut(cutIdValue: string, request: UpdateCutInput): Promise<CutRecord>;
119
+ getCut(cutIdValue: string): Promise<CutRecord>;
112
120
  quoteStills(request: FilmStillsRequest): Promise<OwnAgentQuote>;
113
121
  previewStills(request: FilmStillsRequest, opts?: StartUgcOptions): Promise<FilmRun>;
114
122
  quoteVoice(request: FilmVoiceInput): Promise<OwnAgentQuote>;
@@ -123,7 +131,7 @@ export declare class ClipwrightClient {
123
131
  takeFrames(request: TakeFramesRequest, opts?: StartUgcOptions): Promise<FilmRun>;
124
132
  quoteTakeCheck(request: TakeCheckRequest): Promise<OwnAgentQuote>;
125
133
  checkTake(request: TakeCheckRequest, opts?: StartUgcOptions): Promise<FilmRun>;
126
- getFilmGuide(): Promise<FilmGuide>;
134
+ getFilmGuide(query?: FilmGuideQuery): Promise<FilmGuide>;
127
135
  getAdGuide(query?: AdGuideQuery): Promise<AdGuide>;
128
136
  createAd(request: CreateAdInput): Promise<AdRecord>;
129
137
  updateAd(adIdValue: string, request: UpdateAdInput): Promise<AdRecord>;
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { AD_GUIDE_PATH, AD_PATH, ADS_PATH, adRecord, createAdInput, updateAdInput, adGuide, adGuideQuery, createFilmDraftInput, checkFilmInput, filmCheck, FILM_DRAFT_CHECK_PATH, FILM_DRAFT_FILES_PATH, FILM_DRAFT_PATH, FILM_DRAFTS_PATH, FILM_GUIDE_PATH, FILM_KIT_PATH, filmGuide, filmKit, filmKitQuery, filmDraft, putFilmFilesInput, FILM_HEROES_PATH, FILM_HEROES_QUOTE_PATH, filmHeroInput, FILM_EDITS_PATH, FILM_EDITS_QUOTE_PATH, filmEditInput, TAKE_CHECKS_PATH, TAKE_CHECKS_QUOTE_PATH, TAKE_FRAMES_PATH, TAKE_FRAMES_QUOTE_PATH, takeCheckInput, takeFramesInput, FILM_RENDERS_PATH, FILM_RENDERS_QUOTE_PATH, FILM_RUN_PATH, FILM_STILLS_PATH, FILM_STILLS_QUOTE_PATH, FILM_VOICES_PATH, FILM_VOICES_QUOTE_PATH, filmRenderInput, filmRun, filmStillsInput, filmVoiceInput, ownAgentQuote, account as accountSchema, ACTORS_PATH, actorDefaults, actorDefaultsPath, actorItemPath, actorsResponse, BRAND_EXTRACT_PATH, BRAND_KIT_PATH, BRAND_STYLE_PROPOSE_PATH, BRAND_STYLES_PATH, brandKitWithStyles, brandStyle, brandStyleProposal, proposeBrandStyleInput, saveBrandStyleInput, extractBrandResponse, CREATE_ACTOR_QUOTE_PATH, CREATE_ACTOR_RUN_PATH, createActorQuote, FACELESS_QUOTE_PATH, FACELESS_RUN_PATH, facelessQuoteResponse, GENERATION_MODELS_PATH, GENERATE_IMAGE_QUOTE_PATH, GENERATE_IMAGE_RUN_PATH, GENERATE_VIDEO_QUOTE_PATH, GENERATE_VIDEO_RUN_PATH, generateImageRequest, generateVideoRequest, generationModels, generationQuote, FEEDBACK_PATH, feedbackRequest, feedbackResponse, PRICES_PATH, pricesResponseRead, TEMPLATE_SOUNDS_PATH, templateSoundsList, MOVES_PATH, motionMovesList, REFERENCE_ANALYSES_PATH, REFERENCE_ANALYSIS_PATH, REFERENCE_ANALYSIS_QUOTE_PATH, analysisQuoteResponse, analyzeReferenceRequest, referenceAnalysisRead, referenceAnalysisQuery, runQuery, CREATOR_PROFILES_PATH, CREATOR_PROFILE_PATH, CREATOR_PROFILE_QUOTE_PATH, analyzeCreatorRequest, creatorProfileQuote, creatorProfileRead, creatorProfileQuery, TREND_SEARCHES_PATH, TREND_SEARCH_PATH, TREND_SEARCH_QUOTE_PATH, findTrendsInput, TREND_NICHES_PATH, trendNichesRead, trendSearchQuote, trendSearchRead, trendSearchQuery, makeFacelessInput, agentFailureReport, isRetryableFailure, parseApiFailure, PUBLIC_API_BASE_URL, retryDelayMs, run as runSchema, runRead as runReadSchema, runEditPath, runEditRead, PUBLIC_WORKFLOWS_PATH, PUBLIC_WORKFLOW_PATH, WORKFLOW_PLANS_PATH, WORKFLOW_PLAN_PATH, WORKFLOW_REFERENCE_REMAKE_PATH, WORKFLOW_REVISIONS_PATH, WORKFLOW_APPROVE_PATH, WORKFLOW_QUOTE_PATH, WORKFLOW_RUN_PATH, runShotsPath, runShotsRead, revisionQuoteRead, revisionRequest, runRevisionsPath, runRevisionsQuotePath, candidateQuoteRead, candidateRequest, runCandidatesPath, runCandidatesQuotePath, runCandidatesRead, isTerminal, FAILED_STATE, quoteResponse, RETRY_AFTER_HEADER, UPLOADS_PATH, UPLOAD_IMPORT_PATH, UPLOAD_INTENTS_PATH, UPLOAD_ITEM_PATH, uploadIntentResponse, uploadItemRead, uploadListRead, uploadResponse, ASSET_BYTES_PATH, ASSET_ITEM_PATH, ASSETS_PATH, runMediaPath, assetItemRead, assetListRead, assetRead, voicesResponse, } from "@clipwright/core";
1
+ import { AD_GUIDE_PATH, AD_PATH, ADS_PATH, adRecord, createAdInput, updateAdInput, CUT_PATH, CUT_PREVIEWS_PATH, CUT_PREVIEWS_QUOTE_PATH, CUTS_PATH, createCutInput, cutRecord, filmCutPreviewInput, updateCutInput, adGuide, adGuideQuery, createFilmDraftInput, checkFilmInput, filmCheck, FILM_CUT_CHECK_PATH, filmCutCheck, filmCutInput, filmCutRunInput, FILM_CUTS_PATH, FILM_CUTS_QUOTE_PATH, FILM_DRAFT_CHECK_PATH, FILM_DRAFT_FILES_PATH, FILM_DRAFT_PATH, FILM_DRAFTS_PATH, FILM_GUIDE_PATH, FILM_KIT_PATH, filmGuide, filmGuideQuery, filmKit, filmKitQuery, filmDraft, putFilmFilesInput, FILM_HEROES_PATH, FILM_HEROES_QUOTE_PATH, filmHeroInput, FILM_EDITS_PATH, FILM_EDITS_QUOTE_PATH, filmEditInput, TAKE_CHECKS_PATH, TAKE_CHECKS_QUOTE_PATH, TAKE_FRAMES_PATH, TAKE_FRAMES_QUOTE_PATH, takeCheckInput, takeFramesInput, FILM_RENDERS_PATH, FILM_RENDERS_QUOTE_PATH, FILM_RUN_PATH, FILM_STILLS_PATH, FILM_STILLS_QUOTE_PATH, FILM_VOICES_PATH, FILM_VOICES_QUOTE_PATH, filmRenderInput, filmRun, filmStillsInput, filmVoiceInput, ownAgentQuote, account as accountSchema, ACTORS_PATH, actorDefaults, actorDefaultsPath, actorItemPath, actorsResponse, BRAND_EXTRACT_PATH, BRAND_KIT_PATH, BRAND_STYLE_PROPOSE_PATH, BRAND_STYLES_PATH, brandKitWithStyles, brandStyle, brandStyleProposal, proposeBrandStyleInput, saveBrandStyleInput, extractBrandResponse, CREATE_ACTOR_QUOTE_PATH, CREATE_ACTOR_RUN_PATH, createActorQuote, FACELESS_QUOTE_PATH, FACELESS_RUN_PATH, facelessQuoteResponse, GENERATION_MODELS_PATH, GENERATE_IMAGE_QUOTE_PATH, GENERATE_IMAGE_RUN_PATH, GENERATE_VIDEO_QUOTE_PATH, GENERATE_VIDEO_RUN_PATH, generateImageRequest, generateVideoRequest, generationModels, generationQuote, FEEDBACK_PATH, feedbackRequest, feedbackResponse, PRICES_PATH, pricesResponseRead, TEMPLATE_SOUNDS_PATH, templateSoundsList, MOVES_PATH, motionMovesList, REFERENCE_ANALYSES_PATH, REFERENCE_ANALYSIS_PATH, REFERENCE_ANALYSIS_QUOTE_PATH, analysisQuoteResponse, analyzeReferenceRequest, referenceAnalysisRead, referenceAnalysisQuery, runQuery, CREATOR_PROFILES_PATH, CREATOR_PROFILE_PATH, CREATOR_PROFILE_QUOTE_PATH, analyzeCreatorRequest, creatorProfileQuote, creatorProfileRead, creatorProfileQuery, TREND_SEARCHES_PATH, TREND_SEARCH_PATH, TREND_SEARCH_QUOTE_PATH, findTrendsInput, TREND_NICHES_PATH, trendNichesRead, trendSearchQuote, trendSearchRead, trendSearchQuery, makeFacelessInput, agentFailureReport, isRetryableFailure, parseApiFailure, PUBLIC_API_BASE_URL, retryDelayMs, run as runSchema, runRead as runReadSchema, runEditPath, runEditRead, PUBLIC_WORKFLOWS_PATH, PUBLIC_WORKFLOW_PATH, WORKFLOW_PLANS_PATH, WORKFLOW_PLAN_PATH, WORKFLOW_REFERENCE_REMAKE_PATH, WORKFLOW_REVISIONS_PATH, WORKFLOW_APPROVE_PATH, WORKFLOW_QUOTE_PATH, WORKFLOW_RUN_PATH, runShotsPath, runShotsRead, revisionQuoteRead, revisionRequest, runRevisionsPath, runRevisionsQuotePath, candidateQuoteRead, candidateRequest, runCandidatesPath, runCandidatesQuotePath, runCandidatesRead, isTerminal, FAILED_STATE, quoteResponse, RETRY_AFTER_HEADER, UPLOADS_PATH, UPLOAD_IMPORT_PATH, UPLOAD_INTENTS_PATH, UPLOAD_ITEM_PATH, uploadIntentResponse, uploadItemRead, uploadListRead, uploadResponse, ASSET_BYTES_PATH, ASSET_ITEM_PATH, ASSETS_PATH, runMediaPath, assetItemRead, assetListRead, assetRead, voicesResponse, } from "@clipwright/core";
2
2
  import { actorIdempotencyKeyFor, candidateIdempotencyKeyFor, facelessIdempotencyKeyFor, generationIdempotencyKeyFor, idempotencyKeyFor, ownAgentIdempotencyKeyFor, revisionIdempotencyKeyFor, uploadRequestIdempotencyKeyFor, assetBytesIdempotencyKeyFor, assetRequestIdempotencyKeyFor, } from "@clipwright/core/idempotency";
3
3
  import { createWorkflowPlan, saveWorkflowPlan, approveWorkflowPlan, launchWorkflow, planReferenceRemakeRequest, workflowCatalogResponseRead, workflowMethodResponseRead, workflowPlanRead, workflowQuoteBindingRead, workflowLaunchResponseRead, workflowRunRead, workflowRunIdentityRead } from '@clipwright/core/workflows';
4
4
  import { resolveClientId } from "./client-id.js";
@@ -475,6 +475,35 @@ export class ClipwrightClient {
475
475
  const body = await this.#request(path, true, { method: "POST", body: JSON.stringify(checkFilmInput.parse(request)) });
476
476
  return parseResponse(filmCheck, body, path, true);
477
477
  }
478
+ async checkCut(request) {
479
+ const body = await this.#request(FILM_CUT_CHECK_PATH, true, { method: "POST", body: JSON.stringify(filmCutInput.parse(request)) });
480
+ return parseResponse(filmCutCheck, body, FILM_CUT_CHECK_PATH, true);
481
+ }
482
+ async quoteCut(request) {
483
+ return this.#quoteFilm(FILM_CUTS_QUOTE_PATH, filmCutRunInput.parse(request));
484
+ }
485
+ async renderCut(request, opts) {
486
+ return this.#startFilm("film_cut", FILM_CUTS_PATH, filmCutRunInput.parse(request), opts);
487
+ }
488
+ async quotePreviewCut(request) {
489
+ return this.#quoteFilm(CUT_PREVIEWS_QUOTE_PATH, filmCutPreviewInput.parse(request));
490
+ }
491
+ async previewCut(request, opts) {
492
+ return this.#startFilm("film_cut_preview", CUT_PREVIEWS_PATH, filmCutPreviewInput.parse(request), opts);
493
+ }
494
+ async createCut(request) {
495
+ const body = await this.#request(CUTS_PATH, true, { method: "POST", body: JSON.stringify(createCutInput.parse(request)) });
496
+ return parseResponse(cutRecord, body, CUTS_PATH, true);
497
+ }
498
+ async updateCut(cutIdValue, request) {
499
+ const path = CUT_PATH.replace(":id", encodeURIComponent(cutIdValue));
500
+ const body = await this.#request(path, true, { method: "POST", body: JSON.stringify(updateCutInput.parse(request)) });
501
+ return parseResponse(cutRecord, body, path, true);
502
+ }
503
+ async getCut(cutIdValue) {
504
+ const path = CUT_PATH.replace(":id", encodeURIComponent(cutIdValue));
505
+ return parseResponse(cutRecord, await this.#request(path, false), path, false);
506
+ }
478
507
  async quoteStills(request) {
479
508
  return this.#quoteFilm(FILM_STILLS_QUOTE_PATH, filmStillsInput.parse(request));
480
509
  }
@@ -517,8 +546,15 @@ export class ClipwrightClient {
517
546
  async checkTake(request, opts) {
518
547
  return this.#startFilm("film_take_check", TAKE_CHECKS_PATH, takeCheckInput.parse(request), opts);
519
548
  }
520
- async getFilmGuide() {
521
- return parseResponse(filmGuide, await this.#request(FILM_GUIDE_PATH, false), FILM_GUIDE_PATH, false);
549
+ async getFilmGuide(query = {}) {
550
+ const { format, section } = filmGuideQuery.parse(query);
551
+ const params = new URLSearchParams();
552
+ if (format)
553
+ params.set("format", format);
554
+ if (section)
555
+ params.set("section", section);
556
+ const path = params.size ? `${FILM_GUIDE_PATH}?${params}` : FILM_GUIDE_PATH;
557
+ return parseResponse(filmGuide, await this.#request(path, false), path, false);
522
558
  }
523
559
  async getAdGuide(query = {}) {
524
560
  const { section } = adGuideQuery.parse(query);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clipwright/sdk",
3
- "version": "0.62.0",
3
+ "version": "0.64.0",
4
4
  "description": "TypeScript client for the Clipwright UGC video API",
5
5
  "repository": {
6
6
  "type": "git",
@@ -28,7 +28,7 @@
28
28
  },
29
29
  "dependencies": {
30
30
  "zod": "^4.6.7",
31
- "@clipwright/core": "0.62.0"
31
+ "@clipwright/core": "0.64.0"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@types/node": "^26.1.1"