@getlatedev/node 0.2.21 → 0.2.22

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.mts CHANGED
@@ -3643,6 +3643,14 @@ type UpdatePostMetadataData = {
3643
3643
  * The platform to update metadata on
3644
3644
  */
3645
3645
  platform: 'youtube';
3646
+ /**
3647
+ * YouTube video ID (required for direct mode, ignored for post-based mode)
3648
+ */
3649
+ videoId?: string;
3650
+ /**
3651
+ * Zernio social account ID (required for direct mode, ignored for post-based mode)
3652
+ */
3653
+ accountId?: string;
3646
3654
  /**
3647
3655
  * New video title (max 100 characters for YouTube)
3648
3656
  */
@@ -3665,12 +3673,19 @@ type UpdatePostMetadataData = {
3665
3673
  privacyStatus?: 'public' | 'private' | 'unlisted';
3666
3674
  };
3667
3675
  path: {
3676
+ /**
3677
+ * Zernio post ID, or "_" when using direct video ID mode
3678
+ */
3668
3679
  postId: string;
3669
3680
  };
3670
3681
  };
3671
3682
  type UpdatePostMetadataResponse = ({
3672
3683
  success?: boolean;
3673
3684
  message?: string;
3685
+ /**
3686
+ * Only present in direct video ID mode
3687
+ */
3688
+ videoId?: string;
3674
3689
  updatedFields?: Array<(string)>;
3675
3690
  });
3676
3691
  type UpdatePostMetadataError = (unknown | {
package/dist/index.d.ts CHANGED
@@ -3643,6 +3643,14 @@ type UpdatePostMetadataData = {
3643
3643
  * The platform to update metadata on
3644
3644
  */
3645
3645
  platform: 'youtube';
3646
+ /**
3647
+ * YouTube video ID (required for direct mode, ignored for post-based mode)
3648
+ */
3649
+ videoId?: string;
3650
+ /**
3651
+ * Zernio social account ID (required for direct mode, ignored for post-based mode)
3652
+ */
3653
+ accountId?: string;
3646
3654
  /**
3647
3655
  * New video title (max 100 characters for YouTube)
3648
3656
  */
@@ -3665,12 +3673,19 @@ type UpdatePostMetadataData = {
3665
3673
  privacyStatus?: 'public' | 'private' | 'unlisted';
3666
3674
  };
3667
3675
  path: {
3676
+ /**
3677
+ * Zernio post ID, or "_" when using direct video ID mode
3678
+ */
3668
3679
  postId: string;
3669
3680
  };
3670
3681
  };
3671
3682
  type UpdatePostMetadataResponse = ({
3672
3683
  success?: boolean;
3673
3684
  message?: string;
3685
+ /**
3686
+ * Only present in direct video ID mode
3687
+ */
3688
+ videoId?: string;
3674
3689
  updatedFields?: Array<(string)>;
3675
3690
  });
3676
3691
  type UpdatePostMetadataError = (unknown | {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getlatedev/node",
3
- "version": "0.2.21",
3
+ "version": "0.2.22",
4
4
  "description": "The official Node.js library for the Zernio API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -511,9 +511,15 @@ export const unpublishPost = <ThrowOnError extends boolean = false>(options: Opt
511
511
 
512
512
  /**
513
513
  * Update post metadata
514
- * Updates metadata of an already-published post on the specified platform without re-uploading the media.
515
- * Currently only supported for YouTube videos (title, description, tags, category, privacy status).
516
- * The post must have "published" status on the target platform. At least one updatable field is required.
514
+ * Updates metadata of a published video on the specified platform without re-uploading.
515
+ * Currently only supported for YouTube. At least one updatable field is required.
516
+ *
517
+ * **Two modes:**
518
+ *
519
+ * 1. **Post-based** (video published through Zernio): pass the Zernio postId in the URL and `platform` in the body.
520
+ * 2. **Direct video ID** (video uploaded outside Zernio, e.g. directly to YouTube): use `_` as the postId,
521
+ * and pass `videoId` + `accountId` + `platform` in the body. The accountId is the Zernio social account ID
522
+ * for the connected YouTube channel.
517
523
  *
518
524
  */
519
525
  export const updatePostMetadata = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<UpdatePostMetadataData, ThrowOnError>) => {
@@ -3342,6 +3342,14 @@ export type UpdatePostMetadataData = {
3342
3342
  * The platform to update metadata on
3343
3343
  */
3344
3344
  platform: 'youtube';
3345
+ /**
3346
+ * YouTube video ID (required for direct mode, ignored for post-based mode)
3347
+ */
3348
+ videoId?: string;
3349
+ /**
3350
+ * Zernio social account ID (required for direct mode, ignored for post-based mode)
3351
+ */
3352
+ accountId?: string;
3345
3353
  /**
3346
3354
  * New video title (max 100 characters for YouTube)
3347
3355
  */
@@ -3364,6 +3372,9 @@ export type UpdatePostMetadataData = {
3364
3372
  privacyStatus?: 'public' | 'private' | 'unlisted';
3365
3373
  };
3366
3374
  path: {
3375
+ /**
3376
+ * Zernio post ID, or "_" when using direct video ID mode
3377
+ */
3367
3378
  postId: string;
3368
3379
  };
3369
3380
  };
@@ -3371,6 +3382,10 @@ export type UpdatePostMetadataData = {
3371
3382
  export type UpdatePostMetadataResponse = ({
3372
3383
  success?: boolean;
3373
3384
  message?: string;
3385
+ /**
3386
+ * Only present in direct video ID mode
3387
+ */
3388
+ videoId?: string;
3374
3389
  updatedFields?: Array<(string)>;
3375
3390
  });
3376
3391