@zernio/node 0.2.71 → 0.2.73

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
@@ -2389,7 +2389,7 @@ type RecyclingState = {
2389
2389
  lastRecycledAt?: string;
2390
2390
  };
2391
2391
  /**
2392
- * Posts are either link (with URL/media) or self (text-only). Use forceSelf to override. Subreddit defaults to the account's configured one. Some subreddits require a flair.
2392
+ * Posts are either link (with URL/media), native video (via nativeVideo), or self (text-only). Use forceSelf to override. Subreddit defaults to the account's configured one. Some subreddits require a flair.
2393
2393
  */
2394
2394
  type RedditPlatformData = {
2395
2395
  /**
@@ -2412,6 +2412,19 @@ type RedditPlatformData = {
2412
2412
  * Flair ID for the post. Required by some subreddits. Use GET /v1/accounts/{id}/reddit-flairs?subreddit=name to list flairs.
2413
2413
  */
2414
2414
  flairId?: string;
2415
+ /**
2416
+ * Controls Reddit's native video upload flow. When true (default for video mediaItems), the video is uploaded to Reddit's CDN and submitted with kind=video so it renders as an embedded Reddit video player. Reddit transcodes server-side (1080p/30fps cap). Set to false to fall back to a legacy link post. If the subreddit blocks video posts, the upload falls back to a link post automatically.
2417
+ *
2418
+ */
2419
+ nativeVideo?: boolean;
2420
+ /**
2421
+ * When true (and nativeVideo is active), submits the video as a silent videogif (kind=videogif). Use for short looping clips without audio.
2422
+ */
2423
+ videogif?: boolean;
2424
+ /**
2425
+ * Optional poster/thumbnail image URL for native video posts. If omitted, the first frame of the video is extracted and used automatically.
2426
+ */
2427
+ videoPosterUrl?: string;
2415
2428
  };
2416
2429
  /**
2417
2430
  * A normalized Reddit post returned by the feed and search endpoints
@@ -7478,23 +7491,23 @@ type GetWebhookSettingsError = ({
7478
7491
  type CreateWebhookSettingsData = {
7479
7492
  body: {
7480
7493
  /**
7481
- * Webhook name (max 50 characters)
7494
+ * Webhook name (1-50 characters)
7482
7495
  */
7483
- name?: string;
7496
+ name: string;
7484
7497
  /**
7485
- * Webhook endpoint URL (must be HTTPS in production)
7498
+ * Webhook endpoint URL (must be a valid URL, whitespace trimmed)
7486
7499
  */
7487
- url?: string;
7500
+ url: string;
7488
7501
  /**
7489
7502
  * Secret key for HMAC-SHA256 signature verification
7490
7503
  */
7491
7504
  secret?: string;
7492
7505
  /**
7493
- * Events to subscribe to
7506
+ * Events to subscribe to (at least one required)
7494
7507
  */
7495
- events?: Array<('post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled' | 'account.connected' | 'account.disconnected' | 'message.received' | 'comment.received' | 'review.new' | 'review.updated')>;
7508
+ events: Array<('post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled' | 'account.connected' | 'account.disconnected' | 'message.received' | 'comment.received' | 'review.new' | 'review.updated')>;
7496
7509
  /**
7497
- * Enable or disable webhook delivery
7510
+ * Enable or disable webhook delivery. Defaults to `true` when omitted.
7498
7511
  */
7499
7512
  isActive?: boolean;
7500
7513
  /**
@@ -7519,11 +7532,11 @@ type UpdateWebhookSettingsData = {
7519
7532
  */
7520
7533
  _id: string;
7521
7534
  /**
7522
- * Webhook name (max 50 characters)
7535
+ * Webhook name (1-50 characters). Must be non-empty if provided.
7523
7536
  */
7524
7537
  name?: string;
7525
7538
  /**
7526
- * Webhook endpoint URL (must be HTTPS in production)
7539
+ * Webhook endpoint URL (must be a valid URL, whitespace trimmed). Must be a valid URL if provided.
7527
7540
  */
7528
7541
  url?: string;
7529
7542
  /**
@@ -7531,7 +7544,7 @@ type UpdateWebhookSettingsData = {
7531
7544
  */
7532
7545
  secret?: string;
7533
7546
  /**
7534
- * Events to subscribe to
7547
+ * Events to subscribe to. Must contain at least one event if provided.
7535
7548
  */
7536
7549
  events?: Array<('post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled' | 'account.connected' | 'account.disconnected' | 'message.received' | 'comment.received' | 'review.new' | 'review.updated')>;
7537
7550
  /**
package/dist/index.d.ts CHANGED
@@ -2389,7 +2389,7 @@ type RecyclingState = {
2389
2389
  lastRecycledAt?: string;
2390
2390
  };
2391
2391
  /**
2392
- * Posts are either link (with URL/media) or self (text-only). Use forceSelf to override. Subreddit defaults to the account's configured one. Some subreddits require a flair.
2392
+ * Posts are either link (with URL/media), native video (via nativeVideo), or self (text-only). Use forceSelf to override. Subreddit defaults to the account's configured one. Some subreddits require a flair.
2393
2393
  */
2394
2394
  type RedditPlatformData = {
2395
2395
  /**
@@ -2412,6 +2412,19 @@ type RedditPlatformData = {
2412
2412
  * Flair ID for the post. Required by some subreddits. Use GET /v1/accounts/{id}/reddit-flairs?subreddit=name to list flairs.
2413
2413
  */
2414
2414
  flairId?: string;
2415
+ /**
2416
+ * Controls Reddit's native video upload flow. When true (default for video mediaItems), the video is uploaded to Reddit's CDN and submitted with kind=video so it renders as an embedded Reddit video player. Reddit transcodes server-side (1080p/30fps cap). Set to false to fall back to a legacy link post. If the subreddit blocks video posts, the upload falls back to a link post automatically.
2417
+ *
2418
+ */
2419
+ nativeVideo?: boolean;
2420
+ /**
2421
+ * When true (and nativeVideo is active), submits the video as a silent videogif (kind=videogif). Use for short looping clips without audio.
2422
+ */
2423
+ videogif?: boolean;
2424
+ /**
2425
+ * Optional poster/thumbnail image URL for native video posts. If omitted, the first frame of the video is extracted and used automatically.
2426
+ */
2427
+ videoPosterUrl?: string;
2415
2428
  };
2416
2429
  /**
2417
2430
  * A normalized Reddit post returned by the feed and search endpoints
@@ -7478,23 +7491,23 @@ type GetWebhookSettingsError = ({
7478
7491
  type CreateWebhookSettingsData = {
7479
7492
  body: {
7480
7493
  /**
7481
- * Webhook name (max 50 characters)
7494
+ * Webhook name (1-50 characters)
7482
7495
  */
7483
- name?: string;
7496
+ name: string;
7484
7497
  /**
7485
- * Webhook endpoint URL (must be HTTPS in production)
7498
+ * Webhook endpoint URL (must be a valid URL, whitespace trimmed)
7486
7499
  */
7487
- url?: string;
7500
+ url: string;
7488
7501
  /**
7489
7502
  * Secret key for HMAC-SHA256 signature verification
7490
7503
  */
7491
7504
  secret?: string;
7492
7505
  /**
7493
- * Events to subscribe to
7506
+ * Events to subscribe to (at least one required)
7494
7507
  */
7495
- events?: Array<('post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled' | 'account.connected' | 'account.disconnected' | 'message.received' | 'comment.received' | 'review.new' | 'review.updated')>;
7508
+ events: Array<('post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled' | 'account.connected' | 'account.disconnected' | 'message.received' | 'comment.received' | 'review.new' | 'review.updated')>;
7496
7509
  /**
7497
- * Enable or disable webhook delivery
7510
+ * Enable or disable webhook delivery. Defaults to `true` when omitted.
7498
7511
  */
7499
7512
  isActive?: boolean;
7500
7513
  /**
@@ -7519,11 +7532,11 @@ type UpdateWebhookSettingsData = {
7519
7532
  */
7520
7533
  _id: string;
7521
7534
  /**
7522
- * Webhook name (max 50 characters)
7535
+ * Webhook name (1-50 characters). Must be non-empty if provided.
7523
7536
  */
7524
7537
  name?: string;
7525
7538
  /**
7526
- * Webhook endpoint URL (must be HTTPS in production)
7539
+ * Webhook endpoint URL (must be a valid URL, whitespace trimmed). Must be a valid URL if provided.
7527
7540
  */
7528
7541
  url?: string;
7529
7542
  /**
@@ -7531,7 +7544,7 @@ type UpdateWebhookSettingsData = {
7531
7544
  */
7532
7545
  secret?: string;
7533
7546
  /**
7534
- * Events to subscribe to
7547
+ * Events to subscribe to. Must contain at least one event if provided.
7535
7548
  */
7536
7549
  events?: Array<('post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled' | 'account.connected' | 'account.disconnected' | 'message.received' | 'comment.received' | 'review.new' | 'review.updated')>;
7537
7550
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zernio/node",
3
- "version": "0.2.71",
3
+ "version": "0.2.73",
4
4
  "description": "The official Node.js library for the Zernio API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -1459,6 +1459,8 @@ export const getWebhookSettings = <ThrowOnError extends boolean = false>(options
1459
1459
  * Create webhook
1460
1460
  * Create a new webhook configuration. Maximum 10 webhooks per user.
1461
1461
  *
1462
+ * `name`, `url` and `events` are required. `url` must be a valid URL and `events` must contain at least one event. Whitespace is trimmed from `url` before validation.
1463
+ *
1462
1464
  * Webhooks are automatically disabled after 10 consecutive delivery failures.
1463
1465
  *
1464
1466
  */
@@ -1471,7 +1473,9 @@ export const createWebhookSettings = <ThrowOnError extends boolean = false>(opti
1471
1473
 
1472
1474
  /**
1473
1475
  * Update webhook
1474
- * Update an existing webhook configuration. All fields except _id are optional; only provided fields will be updated.
1476
+ * Update an existing webhook configuration. All fields except `_id` are optional; only provided fields will be updated.
1477
+ *
1478
+ * When provided, `name` must be 1-50 characters, `url` must be a valid URL, and `events` must contain at least one event. Whitespace is trimmed from `url` before validation.
1475
1479
  *
1476
1480
  * Webhooks are automatically disabled after 10 consecutive delivery failures.
1477
1481
  *
@@ -1899,7 +1899,7 @@ export type RecyclingState = {
1899
1899
  };
1900
1900
 
1901
1901
  /**
1902
- * Posts are either link (with URL/media) or self (text-only). Use forceSelf to override. Subreddit defaults to the account's configured one. Some subreddits require a flair.
1902
+ * Posts are either link (with URL/media), native video (via nativeVideo), or self (text-only). Use forceSelf to override. Subreddit defaults to the account's configured one. Some subreddits require a flair.
1903
1903
  */
1904
1904
  export type RedditPlatformData = {
1905
1905
  /**
@@ -1922,6 +1922,19 @@ export type RedditPlatformData = {
1922
1922
  * Flair ID for the post. Required by some subreddits. Use GET /v1/accounts/{id}/reddit-flairs?subreddit=name to list flairs.
1923
1923
  */
1924
1924
  flairId?: string;
1925
+ /**
1926
+ * Controls Reddit's native video upload flow. When true (default for video mediaItems), the video is uploaded to Reddit's CDN and submitted with kind=video so it renders as an embedded Reddit video player. Reddit transcodes server-side (1080p/30fps cap). Set to false to fall back to a legacy link post. If the subreddit blocks video posts, the upload falls back to a link post automatically.
1927
+ *
1928
+ */
1929
+ nativeVideo?: boolean;
1930
+ /**
1931
+ * When true (and nativeVideo is active), submits the video as a silent videogif (kind=videogif). Use for short looping clips without audio.
1932
+ */
1933
+ videogif?: boolean;
1934
+ /**
1935
+ * Optional poster/thumbnail image URL for native video posts. If omitted, the first frame of the video is extracted and used automatically.
1936
+ */
1937
+ videoPosterUrl?: string;
1925
1938
  };
1926
1939
 
1927
1940
  /**
@@ -7389,23 +7402,23 @@ export type GetWebhookSettingsError = ({
7389
7402
  export type CreateWebhookSettingsData = {
7390
7403
  body: {
7391
7404
  /**
7392
- * Webhook name (max 50 characters)
7405
+ * Webhook name (1-50 characters)
7393
7406
  */
7394
- name?: string;
7407
+ name: string;
7395
7408
  /**
7396
- * Webhook endpoint URL (must be HTTPS in production)
7409
+ * Webhook endpoint URL (must be a valid URL, whitespace trimmed)
7397
7410
  */
7398
- url?: string;
7411
+ url: string;
7399
7412
  /**
7400
7413
  * Secret key for HMAC-SHA256 signature verification
7401
7414
  */
7402
7415
  secret?: string;
7403
7416
  /**
7404
- * Events to subscribe to
7417
+ * Events to subscribe to (at least one required)
7405
7418
  */
7406
- events?: Array<('post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled' | 'account.connected' | 'account.disconnected' | 'message.received' | 'comment.received' | 'review.new' | 'review.updated')>;
7419
+ events: Array<('post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled' | 'account.connected' | 'account.disconnected' | 'message.received' | 'comment.received' | 'review.new' | 'review.updated')>;
7407
7420
  /**
7408
- * Enable or disable webhook delivery
7421
+ * Enable or disable webhook delivery. Defaults to `true` when omitted.
7409
7422
  */
7410
7423
  isActive?: boolean;
7411
7424
  /**
@@ -7433,11 +7446,11 @@ export type UpdateWebhookSettingsData = {
7433
7446
  */
7434
7447
  _id: string;
7435
7448
  /**
7436
- * Webhook name (max 50 characters)
7449
+ * Webhook name (1-50 characters). Must be non-empty if provided.
7437
7450
  */
7438
7451
  name?: string;
7439
7452
  /**
7440
- * Webhook endpoint URL (must be HTTPS in production)
7453
+ * Webhook endpoint URL (must be a valid URL, whitespace trimmed). Must be a valid URL if provided.
7441
7454
  */
7442
7455
  url?: string;
7443
7456
  /**
@@ -7445,7 +7458,7 @@ export type UpdateWebhookSettingsData = {
7445
7458
  */
7446
7459
  secret?: string;
7447
7460
  /**
7448
- * Events to subscribe to
7461
+ * Events to subscribe to. Must contain at least one event if provided.
7449
7462
  */
7450
7463
  events?: Array<('post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled' | 'account.connected' | 'account.disconnected' | 'message.received' | 'comment.received' | 'review.new' | 'review.updated')>;
7451
7464
  /**