@clipwright/sdk 0.61.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/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { type AdGuide, 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 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
3
  export interface ApiKeyRequest {
4
4
  method: string;
@@ -124,7 +124,10 @@ export declare class ClipwrightClient {
124
124
  quoteTakeCheck(request: TakeCheckRequest): Promise<OwnAgentQuote>;
125
125
  checkTake(request: TakeCheckRequest, opts?: StartUgcOptions): Promise<FilmRun>;
126
126
  getFilmGuide(): Promise<FilmGuide>;
127
- getAdGuide(): Promise<AdGuide>;
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>;
128
131
  getFilmKit(query?: FilmKitQuery): Promise<FilmKit>;
129
132
  getFilmRun(runIdValue: string): Promise<FilmRun>;
130
133
  quoteImage(request: GenerateImageRequest): Promise<GenerationQuote>;
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { AD_GUIDE_PATH, adGuide, 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, 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";
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";
@@ -520,8 +520,23 @@ export class ClipwrightClient {
520
520
  async getFilmGuide() {
521
521
  return parseResponse(filmGuide, await this.#request(FILM_GUIDE_PATH, false), FILM_GUIDE_PATH, false);
522
522
  }
523
- async getAdGuide() {
524
- return parseResponse(adGuide, await this.#request(AD_GUIDE_PATH, false), AD_GUIDE_PATH, false);
523
+ async getAdGuide(query = {}) {
524
+ const { section } = adGuideQuery.parse(query);
525
+ const path = section ? `${AD_GUIDE_PATH}?section=${encodeURIComponent(section)}` : AD_GUIDE_PATH;
526
+ return parseResponse(adGuide, await this.#request(path, false), path, false);
527
+ }
528
+ async createAd(request) {
529
+ const body = await this.#request(ADS_PATH, true, { method: "POST", body: JSON.stringify(createAdInput.parse(request)) });
530
+ return parseResponse(adRecord, body, ADS_PATH, true);
531
+ }
532
+ async updateAd(adIdValue, request) {
533
+ const path = AD_PATH.replace(":id", encodeURIComponent(adIdValue));
534
+ const body = await this.#request(path, true, { method: "POST", body: JSON.stringify(updateAdInput.parse(request)) });
535
+ return parseResponse(adRecord, body, path, true);
536
+ }
537
+ async getAd(adIdValue) {
538
+ const path = AD_PATH.replace(":id", encodeURIComponent(adIdValue));
539
+ return parseResponse(adRecord, await this.#request(path, false), path, false);
525
540
  }
526
541
  async getFilmKit(query = {}) {
527
542
  const { path: file } = filmKitQuery.parse(query);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clipwright/sdk",
3
- "version": "0.61.0",
3
+ "version": "0.62.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.61.0"
31
+ "@clipwright/core": "0.62.0"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@types/node": "^26.1.1"