From b1cd942e99063b1272814652fb867d7444d64fc8 Mon Sep 17 00:00:00 2001 From: nevidomyi Date: Fri, 13 Mar 2026 11:51:06 +0200 Subject: [PATCH 1/2] Add Video Center API Co-Authored-By: Claude Sonnet 4.6 --- .changeset/add-video-center-api.md | 5 +++++ src/api/index.ts | 2 ++ src/api/video-center/index.ts | 20 ++++++++++++++++++++ src/api/video-center/types.ts | 26 ++++++++++++++++++++++++++ src/types/index.ts | 1 + 5 files changed, 54 insertions(+) create mode 100644 .changeset/add-video-center-api.md create mode 100644 src/api/video-center/index.ts create mode 100644 src/api/video-center/types.ts diff --git a/.changeset/add-video-center-api.md b/.changeset/add-video-center-api.md new file mode 100644 index 0000000..9f2df99 --- /dev/null +++ b/.changeset/add-video-center-api.md @@ -0,0 +1,5 @@ +--- +'@code.store/arcxp-sdk-ts': minor +--- + +Add VideoCenter API with importVideo, deleteVideo, and updateVideoUrl methods diff --git a/src/api/index.ts b/src/api/index.ts index da559af..6494ac9 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -16,6 +16,7 @@ import { ArcSales, ArcSalesV2 } from './sales/index.js'; import { ArcSigningService } from './signing-service/index.js'; import { ArcSite } from './site/index.js'; import { ArcTags } from './tags/index.js'; +import { ArcVideoCenter } from './video-center/index.js'; import { ArcWebsked } from './websked/index.js'; export const ArcAPI = (options: ArcAPIOptions) => { @@ -38,6 +39,7 @@ export const ArcAPI = (options: ArcAPIOptions) => { ContentOps: new ArcContentOps(options), RetailEvents: new ArcRetailEvents(options), DeveloperRetail: new ArcDeveloperRetail(options), + VideoCenter: new ArcVideoCenter(options), Custom: new Custom(options), }; diff --git a/src/api/video-center/index.ts b/src/api/video-center/index.ts new file mode 100644 index 0000000..6041851 --- /dev/null +++ b/src/api/video-center/index.ts @@ -0,0 +1,20 @@ +import { ArcAbstractAPI, type ArcAPIOptions } from '../abstract-api.js'; +import type { DeleteVideoParams, ImportVideoParams, ImportVideoPayload, UpdateVideoUrlParams } from './types.js'; + +export class ArcVideoCenter extends ArcAbstractAPI { + constructor(options: ArcAPIOptions) { + super({ ...options, apiPath: 'goldfish' }); + } + + async importVideo(payload: ImportVideoPayload, params: ImportVideoParams): Promise { + await this.client.post('/video/v2/import/ans', payload, { params }); + } + + async deleteVideo(params: DeleteVideoParams): Promise { + await this.client.delete('/video/v2/import/ans', { params }); + } + + async updateVideoUrl(params: UpdateVideoUrlParams): Promise { + await this.client.post('/video/v2/url/update', undefined, { params }); + } +} diff --git a/src/api/video-center/types.ts b/src/api/video-center/types.ts new file mode 100644 index 0000000..050240a --- /dev/null +++ b/src/api/video-center/types.ts @@ -0,0 +1,26 @@ +export type ImportVideoParams = { + encode: boolean; + isLive: boolean; + useLastUpdated: boolean; +}; + +export type ImportVideoPayload = { + id?: string; + type?: 'AUTHOR' | 'CLARIFICATION' | 'CORRECTION' | 'IMAGE' | 'REDIRECT' | 'REFERENCE' | 'SECTION' | 'SITE' | 'STORY' | 'VIDEO'; + version?: '_0_5_7' | '_0_5_8' | '_0_5_9' | '_0_6_0' | '_0_6_2' | '_0_8_0'; + canonicalWebsite?: string; + embedHtml?: string; + promoImage?: Record; + promoItems?: { basic?: Record }; + streams?: Record[]; + websites?: Record; +}; + +export type DeleteVideoParams = { + uuid: string; + hardDelete?: boolean; +}; + +export type UpdateVideoUrlParams = { + uuid: string; +}; diff --git a/src/types/index.ts b/src/types/index.ts index 3ea780b..53acd2a 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -13,6 +13,7 @@ export * from '../api/sales/types.js'; export * from '../api/signing-service/types.js'; export * from '../api/site/types.js'; export * from '../api/tags/types.js'; +export * from '../api/video-center/types.js'; export * from '../api/websked/types.js'; export * from '../content-elements/types.js'; export * as ANS from './ans-types'; From 735c5a9af84350e4bd665068458fd36f85875830 Mon Sep 17 00:00:00 2001 From: nevidomyi Date: Fri, 13 Mar 2026 11:55:58 +0200 Subject: [PATCH 2/2] Version packages Co-Authored-By: Claude Sonnet 4.6 --- .changeset/add-video-center-api.md | 5 ----- CHANGELOG.md | 6 ++++++ package.json | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) delete mode 100644 .changeset/add-video-center-api.md diff --git a/.changeset/add-video-center-api.md b/.changeset/add-video-center-api.md deleted file mode 100644 index 9f2df99..0000000 --- a/.changeset/add-video-center-api.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@code.store/arcxp-sdk-ts': minor ---- - -Add VideoCenter API with importVideo, deleteVideo, and updateVideoUrl methods diff --git a/CHANGELOG.md b/CHANGELOG.md index f6de849..1b5b82c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # @code.store/arcxp-sdk-ts +## 5.6.0 + +### Minor Changes + +- b1cd942: Add VideoCenter API with importVideo, deleteVideo, and updateVideoUrl methods + ## 5.5.0 ### Minor Changes diff --git a/package.json b/package.json index 7bdb8ed..5d95a2c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@code.store/arcxp-sdk-ts", - "version": "5.5.0", + "version": "5.6.0", "description": "A strongly typed set of ArcXP API's and utilities reduce the amount of work required to develop with ArcXP, starting with reducing the boilerplate code you have to write.", "type": "module", "main": "./dist/index.js",