@zernio/node 0.2.71 → 0.2.72

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
@@ -7478,23 +7478,23 @@ type GetWebhookSettingsError = ({
7478
7478
  type CreateWebhookSettingsData = {
7479
7479
  body: {
7480
7480
  /**
7481
- * Webhook name (max 50 characters)
7481
+ * Webhook name (1-50 characters)
7482
7482
  */
7483
- name?: string;
7483
+ name: string;
7484
7484
  /**
7485
- * Webhook endpoint URL (must be HTTPS in production)
7485
+ * Webhook endpoint URL (must be a valid URL, whitespace trimmed)
7486
7486
  */
7487
- url?: string;
7487
+ url: string;
7488
7488
  /**
7489
7489
  * Secret key for HMAC-SHA256 signature verification
7490
7490
  */
7491
7491
  secret?: string;
7492
7492
  /**
7493
- * Events to subscribe to
7493
+ * Events to subscribe to (at least one required)
7494
7494
  */
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')>;
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')>;
7496
7496
  /**
7497
- * Enable or disable webhook delivery
7497
+ * Enable or disable webhook delivery. Defaults to `true` when omitted.
7498
7498
  */
7499
7499
  isActive?: boolean;
7500
7500
  /**
@@ -7519,11 +7519,11 @@ type UpdateWebhookSettingsData = {
7519
7519
  */
7520
7520
  _id: string;
7521
7521
  /**
7522
- * Webhook name (max 50 characters)
7522
+ * Webhook name (1-50 characters). Must be non-empty if provided.
7523
7523
  */
7524
7524
  name?: string;
7525
7525
  /**
7526
- * Webhook endpoint URL (must be HTTPS in production)
7526
+ * Webhook endpoint URL (must be a valid URL, whitespace trimmed). Must be a valid URL if provided.
7527
7527
  */
7528
7528
  url?: string;
7529
7529
  /**
@@ -7531,7 +7531,7 @@ type UpdateWebhookSettingsData = {
7531
7531
  */
7532
7532
  secret?: string;
7533
7533
  /**
7534
- * Events to subscribe to
7534
+ * Events to subscribe to. Must contain at least one event if provided.
7535
7535
  */
7536
7536
  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
7537
  /**
package/dist/index.d.ts CHANGED
@@ -7478,23 +7478,23 @@ type GetWebhookSettingsError = ({
7478
7478
  type CreateWebhookSettingsData = {
7479
7479
  body: {
7480
7480
  /**
7481
- * Webhook name (max 50 characters)
7481
+ * Webhook name (1-50 characters)
7482
7482
  */
7483
- name?: string;
7483
+ name: string;
7484
7484
  /**
7485
- * Webhook endpoint URL (must be HTTPS in production)
7485
+ * Webhook endpoint URL (must be a valid URL, whitespace trimmed)
7486
7486
  */
7487
- url?: string;
7487
+ url: string;
7488
7488
  /**
7489
7489
  * Secret key for HMAC-SHA256 signature verification
7490
7490
  */
7491
7491
  secret?: string;
7492
7492
  /**
7493
- * Events to subscribe to
7493
+ * Events to subscribe to (at least one required)
7494
7494
  */
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')>;
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')>;
7496
7496
  /**
7497
- * Enable or disable webhook delivery
7497
+ * Enable or disable webhook delivery. Defaults to `true` when omitted.
7498
7498
  */
7499
7499
  isActive?: boolean;
7500
7500
  /**
@@ -7519,11 +7519,11 @@ type UpdateWebhookSettingsData = {
7519
7519
  */
7520
7520
  _id: string;
7521
7521
  /**
7522
- * Webhook name (max 50 characters)
7522
+ * Webhook name (1-50 characters). Must be non-empty if provided.
7523
7523
  */
7524
7524
  name?: string;
7525
7525
  /**
7526
- * Webhook endpoint URL (must be HTTPS in production)
7526
+ * Webhook endpoint URL (must be a valid URL, whitespace trimmed). Must be a valid URL if provided.
7527
7527
  */
7528
7528
  url?: string;
7529
7529
  /**
@@ -7531,7 +7531,7 @@ type UpdateWebhookSettingsData = {
7531
7531
  */
7532
7532
  secret?: string;
7533
7533
  /**
7534
- * Events to subscribe to
7534
+ * Events to subscribe to. Must contain at least one event if provided.
7535
7535
  */
7536
7536
  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
7537
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zernio/node",
3
- "version": "0.2.71",
3
+ "version": "0.2.72",
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
  *
@@ -7389,23 +7389,23 @@ export type GetWebhookSettingsError = ({
7389
7389
  export type CreateWebhookSettingsData = {
7390
7390
  body: {
7391
7391
  /**
7392
- * Webhook name (max 50 characters)
7392
+ * Webhook name (1-50 characters)
7393
7393
  */
7394
- name?: string;
7394
+ name: string;
7395
7395
  /**
7396
- * Webhook endpoint URL (must be HTTPS in production)
7396
+ * Webhook endpoint URL (must be a valid URL, whitespace trimmed)
7397
7397
  */
7398
- url?: string;
7398
+ url: string;
7399
7399
  /**
7400
7400
  * Secret key for HMAC-SHA256 signature verification
7401
7401
  */
7402
7402
  secret?: string;
7403
7403
  /**
7404
- * Events to subscribe to
7404
+ * Events to subscribe to (at least one required)
7405
7405
  */
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')>;
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')>;
7407
7407
  /**
7408
- * Enable or disable webhook delivery
7408
+ * Enable or disable webhook delivery. Defaults to `true` when omitted.
7409
7409
  */
7410
7410
  isActive?: boolean;
7411
7411
  /**
@@ -7433,11 +7433,11 @@ export type UpdateWebhookSettingsData = {
7433
7433
  */
7434
7434
  _id: string;
7435
7435
  /**
7436
- * Webhook name (max 50 characters)
7436
+ * Webhook name (1-50 characters). Must be non-empty if provided.
7437
7437
  */
7438
7438
  name?: string;
7439
7439
  /**
7440
- * Webhook endpoint URL (must be HTTPS in production)
7440
+ * Webhook endpoint URL (must be a valid URL, whitespace trimmed). Must be a valid URL if provided.
7441
7441
  */
7442
7442
  url?: string;
7443
7443
  /**
@@ -7445,7 +7445,7 @@ export type UpdateWebhookSettingsData = {
7445
7445
  */
7446
7446
  secret?: string;
7447
7447
  /**
7448
- * Events to subscribe to
7448
+ * Events to subscribe to. Must contain at least one event if provided.
7449
7449
  */
7450
7450
  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
7451
  /**