@zernio/node 0.2.855 → 0.2.857

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
@@ -500,7 +500,7 @@ declare class Zernio {
500
500
  getWebhookSettings: <ThrowOnError extends boolean = false>(options?: _hey_api_client_fetch.OptionsLegacyParser<unknown, ThrowOnError>) => _hey_api_client_fetch.RequestResult<GetWebhookSettingsResponse, GetWebhookSettingsError, ThrowOnError>;
501
501
  createWebhookSettings: <ThrowOnError extends boolean = false>(options: _hey_api_client_fetch.OptionsLegacyParser<CreateWebhookSettingsData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<CreateWebhookSettingsResponse, unknown, ThrowOnError>;
502
502
  updateWebhookSettings: <ThrowOnError extends boolean = false>(options: _hey_api_client_fetch.OptionsLegacyParser<UpdateWebhookSettingsData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<UpdateWebhookSettingsResponse, unknown, ThrowOnError>;
503
- deleteWebhookSettings: <ThrowOnError extends boolean = false>(options: _hey_api_client_fetch.OptionsLegacyParser<DeleteWebhookSettingsData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<DeleteWebhookSettingsResponse, unknown, ThrowOnError>;
503
+ deleteWebhookSettings: <ThrowOnError extends boolean = false>(options?: _hey_api_client_fetch.OptionsLegacyParser<DeleteWebhookSettingsData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<DeleteWebhookSettingsResponse, unknown, ThrowOnError>;
504
504
  getWebhookLogs: <ThrowOnError extends boolean = false>(options?: _hey_api_client_fetch.OptionsLegacyParser<GetWebhookLogsData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<GetWebhookLogsResponse, unknown, ThrowOnError>;
505
505
  redeliverWebhookEvent: <ThrowOnError extends boolean = false>(options: _hey_api_client_fetch.OptionsLegacyParser<RedeliverWebhookEventData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<RedeliverWebhookEventResponse, unknown, ThrowOnError>;
506
506
  testWebhook: <ThrowOnError extends boolean = false>(options: _hey_api_client_fetch.OptionsLegacyParser<TestWebhookData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<TestWebhookResponse, unknown, ThrowOnError>;
@@ -15108,18 +15108,28 @@ type ListPostsData = {
15108
15108
  */
15109
15109
  createdBy?: string;
15110
15110
  /**
15111
- * Zero-padded YYYY-MM-DD, or a full ISO 8601 datetime. An empty value means no date filter; any other malformed value returns 400.
15111
+ * Alias of fromDate, kept for existing callers
15112
+ * @deprecated
15112
15113
  */
15113
15114
  dateFrom?: string;
15114
15115
  /**
15115
- * Zero-padded YYYY-MM-DD, or a full ISO 8601 datetime. An empty value means no date filter; any other malformed value returns 400.
15116
+ * Alias of toDate, kept for existing callers
15117
+ * @deprecated
15116
15118
  */
15117
15119
  dateTo?: string;
15120
+ /**
15121
+ * Zero-padded YYYY-MM-DD, or a full ISO 8601 datetime. An empty value means no date filter; any other malformed value returns 400. The same name the other date-window filters use (ads, analytics).
15122
+ */
15123
+ fromDate?: string;
15118
15124
  includeHidden?: boolean;
15119
15125
  /**
15120
15126
  * Page size. Values above the maximum return 400 rather than being clamped.
15121
15127
  */
15122
15128
  limit?: number;
15129
+ /**
15130
+ * Row offset. Takes precedence over page when both are sent; the response pagination.page is derived from it.
15131
+ */
15132
+ offset?: number;
15123
15133
  /**
15124
15134
  * Page number (1-based)
15125
15135
  */
@@ -15142,6 +15152,10 @@ type ListPostsData = {
15142
15152
  */
15143
15153
  source?: 'zernio' | 'external';
15144
15154
  status?: 'draft' | 'scheduled' | 'publishing' | 'published' | 'partial' | 'failed' | 'cancelled';
15155
+ /**
15156
+ * Zero-padded YYYY-MM-DD, or a full ISO 8601 datetime. An empty value means no date filter; any other malformed value returns 400. The same name the other date-window filters use (ads, analytics).
15157
+ */
15158
+ toDate?: string;
15145
15159
  };
15146
15160
  };
15147
15161
  type ListPostsResponse = (PostsListResponse);
@@ -22108,9 +22122,14 @@ type CreateWebhookSettingsError = (unknown | {
22108
22122
  type UpdateWebhookSettingsData = {
22109
22123
  body: {
22110
22124
  /**
22111
- * Webhook ID to update (required)
22125
+ * Webhook ID to update. Required unless the deprecated `_id` is sent instead.
22112
22126
  */
22113
- _id: string;
22127
+ webhookId?: string;
22128
+ /**
22129
+ * Alias of webhookId, kept for existing callers
22130
+ * @deprecated
22131
+ */
22132
+ _id?: string;
22114
22133
  /**
22115
22134
  * Webhook name (1-50 characters). Must be non-empty if provided.
22116
22135
  */
@@ -22158,11 +22177,16 @@ type UpdateWebhookSettingsError = (unknown | {
22158
22177
  required_group?: 'publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks';
22159
22178
  });
22160
22179
  type DeleteWebhookSettingsData = {
22161
- query: {
22180
+ query?: {
22162
22181
  /**
22163
- * Webhook ID to delete
22182
+ * Alias of webhookId, kept for existing callers
22183
+ * @deprecated
22164
22184
  */
22165
- id: string;
22185
+ id?: string;
22186
+ /**
22187
+ * Webhook ID to delete, the same name the other /v1/webhooks operations use (logs, redeliver, test). Required unless the deprecated `id` is sent instead.
22188
+ */
22189
+ webhookId?: string;
22166
22190
  };
22167
22191
  };
22168
22192
  type DeleteWebhookSettingsResponse = ({
package/dist/index.d.ts CHANGED
@@ -500,7 +500,7 @@ declare class Zernio {
500
500
  getWebhookSettings: <ThrowOnError extends boolean = false>(options?: _hey_api_client_fetch.OptionsLegacyParser<unknown, ThrowOnError>) => _hey_api_client_fetch.RequestResult<GetWebhookSettingsResponse, GetWebhookSettingsError, ThrowOnError>;
501
501
  createWebhookSettings: <ThrowOnError extends boolean = false>(options: _hey_api_client_fetch.OptionsLegacyParser<CreateWebhookSettingsData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<CreateWebhookSettingsResponse, unknown, ThrowOnError>;
502
502
  updateWebhookSettings: <ThrowOnError extends boolean = false>(options: _hey_api_client_fetch.OptionsLegacyParser<UpdateWebhookSettingsData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<UpdateWebhookSettingsResponse, unknown, ThrowOnError>;
503
- deleteWebhookSettings: <ThrowOnError extends boolean = false>(options: _hey_api_client_fetch.OptionsLegacyParser<DeleteWebhookSettingsData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<DeleteWebhookSettingsResponse, unknown, ThrowOnError>;
503
+ deleteWebhookSettings: <ThrowOnError extends boolean = false>(options?: _hey_api_client_fetch.OptionsLegacyParser<DeleteWebhookSettingsData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<DeleteWebhookSettingsResponse, unknown, ThrowOnError>;
504
504
  getWebhookLogs: <ThrowOnError extends boolean = false>(options?: _hey_api_client_fetch.OptionsLegacyParser<GetWebhookLogsData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<GetWebhookLogsResponse, unknown, ThrowOnError>;
505
505
  redeliverWebhookEvent: <ThrowOnError extends boolean = false>(options: _hey_api_client_fetch.OptionsLegacyParser<RedeliverWebhookEventData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<RedeliverWebhookEventResponse, unknown, ThrowOnError>;
506
506
  testWebhook: <ThrowOnError extends boolean = false>(options: _hey_api_client_fetch.OptionsLegacyParser<TestWebhookData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<TestWebhookResponse, unknown, ThrowOnError>;
@@ -15108,18 +15108,28 @@ type ListPostsData = {
15108
15108
  */
15109
15109
  createdBy?: string;
15110
15110
  /**
15111
- * Zero-padded YYYY-MM-DD, or a full ISO 8601 datetime. An empty value means no date filter; any other malformed value returns 400.
15111
+ * Alias of fromDate, kept for existing callers
15112
+ * @deprecated
15112
15113
  */
15113
15114
  dateFrom?: string;
15114
15115
  /**
15115
- * Zero-padded YYYY-MM-DD, or a full ISO 8601 datetime. An empty value means no date filter; any other malformed value returns 400.
15116
+ * Alias of toDate, kept for existing callers
15117
+ * @deprecated
15116
15118
  */
15117
15119
  dateTo?: string;
15120
+ /**
15121
+ * Zero-padded YYYY-MM-DD, or a full ISO 8601 datetime. An empty value means no date filter; any other malformed value returns 400. The same name the other date-window filters use (ads, analytics).
15122
+ */
15123
+ fromDate?: string;
15118
15124
  includeHidden?: boolean;
15119
15125
  /**
15120
15126
  * Page size. Values above the maximum return 400 rather than being clamped.
15121
15127
  */
15122
15128
  limit?: number;
15129
+ /**
15130
+ * Row offset. Takes precedence over page when both are sent; the response pagination.page is derived from it.
15131
+ */
15132
+ offset?: number;
15123
15133
  /**
15124
15134
  * Page number (1-based)
15125
15135
  */
@@ -15142,6 +15152,10 @@ type ListPostsData = {
15142
15152
  */
15143
15153
  source?: 'zernio' | 'external';
15144
15154
  status?: 'draft' | 'scheduled' | 'publishing' | 'published' | 'partial' | 'failed' | 'cancelled';
15155
+ /**
15156
+ * Zero-padded YYYY-MM-DD, or a full ISO 8601 datetime. An empty value means no date filter; any other malformed value returns 400. The same name the other date-window filters use (ads, analytics).
15157
+ */
15158
+ toDate?: string;
15145
15159
  };
15146
15160
  };
15147
15161
  type ListPostsResponse = (PostsListResponse);
@@ -22108,9 +22122,14 @@ type CreateWebhookSettingsError = (unknown | {
22108
22122
  type UpdateWebhookSettingsData = {
22109
22123
  body: {
22110
22124
  /**
22111
- * Webhook ID to update (required)
22125
+ * Webhook ID to update. Required unless the deprecated `_id` is sent instead.
22112
22126
  */
22113
- _id: string;
22127
+ webhookId?: string;
22128
+ /**
22129
+ * Alias of webhookId, kept for existing callers
22130
+ * @deprecated
22131
+ */
22132
+ _id?: string;
22114
22133
  /**
22115
22134
  * Webhook name (1-50 characters). Must be non-empty if provided.
22116
22135
  */
@@ -22158,11 +22177,16 @@ type UpdateWebhookSettingsError = (unknown | {
22158
22177
  required_group?: 'publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks';
22159
22178
  });
22160
22179
  type DeleteWebhookSettingsData = {
22161
- query: {
22180
+ query?: {
22162
22181
  /**
22163
- * Webhook ID to delete
22182
+ * Alias of webhookId, kept for existing callers
22183
+ * @deprecated
22164
22184
  */
22165
- id: string;
22185
+ id?: string;
22186
+ /**
22187
+ * Webhook ID to delete, the same name the other /v1/webhooks operations use (logs, redeliver, test). Required unless the deprecated `id` is sent instead.
22188
+ */
22189
+ webhookId?: string;
22166
22190
  };
22167
22191
  };
22168
22192
  type DeleteWebhookSettingsResponse = ({
package/dist/index.js CHANGED
@@ -36,7 +36,7 @@ module.exports = __toCommonJS(index_exports);
36
36
  // package.json
37
37
  var package_default = {
38
38
  name: "@zernio/node",
39
- version: "0.2.855",
39
+ version: "0.2.857",
40
40
  description: "The official Node.js library for the Zernio API",
41
41
  main: "dist/index.js",
42
42
  module: "dist/index.mjs",
package/dist/index.mjs CHANGED
@@ -5,7 +5,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
5
5
  // package.json
6
6
  var package_default = {
7
7
  name: "@zernio/node",
8
- version: "0.2.855",
8
+ version: "0.2.857",
9
9
  description: "The official Node.js library for the Zernio API",
10
10
  main: "dist/index.js",
11
11
  module: "dist/index.mjs",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zernio/node",
3
- "version": "0.2.855",
3
+ "version": "0.2.857",
4
4
  "description": "The official Node.js library for the Zernio API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -870,7 +870,7 @@ export const getSmsUsage = <ThrowOnError extends boolean = false>(options?: Opti
870
870
 
871
871
  /**
872
872
  * List posts
873
- * Returns a paginated list of posts. Published posts include platformPostUrl with the public URL on each platform.
873
+ * Returns a paginated list of posts. Published posts include platformPostUrl with the public URL on each platform. A query parameter that is not listed here returns 400 naming it and the accepted parameters, so a misspelled filter never silently returns the unfiltered list.
874
874
  */
875
875
  export const listPosts = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<ListPostsData, ThrowOnError>) => {
876
876
  return (options?.client ?? client).get<ListPostsResponse, ListPostsError, ThrowOnError>({
@@ -3557,7 +3557,7 @@ export const createWebhookSettings = <ThrowOnError extends boolean = false>(opti
3557
3557
 
3558
3558
  /**
3559
3559
  * Update webhook
3560
- * Update an existing webhook configuration. All fields except `_id` are optional; only provided fields will be updated.
3560
+ * Update an existing webhook configuration. All fields except `webhookId` are optional; only provided fields will be updated. `webhookId` is the same name the other /v1/webhooks operations use (logs, redeliver, test); the deprecated `_id` is still accepted in its place.
3561
3561
  *
3562
3562
  * 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.
3563
3563
  *
@@ -3593,7 +3593,7 @@ export const updateWebhookSettings = <ThrowOnError extends boolean = false>(opti
3593
3593
  * Delete webhook
3594
3594
  * Permanently delete a webhook configuration.
3595
3595
  */
3596
- export const deleteWebhookSettings = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<DeleteWebhookSettingsData, ThrowOnError>) => {
3596
+ export const deleteWebhookSettings = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<DeleteWebhookSettingsData, ThrowOnError>) => {
3597
3597
  return (options?.client ?? client).delete<DeleteWebhookSettingsResponse, DeleteWebhookSettingsError, ThrowOnError>({
3598
3598
  ...options,
3599
3599
  url: '/v1/webhooks/settings'
@@ -14038,18 +14038,28 @@ export type ListPostsData = {
14038
14038
  */
14039
14039
  createdBy?: string;
14040
14040
  /**
14041
- * Zero-padded YYYY-MM-DD, or a full ISO 8601 datetime. An empty value means no date filter; any other malformed value returns 400.
14041
+ * Alias of fromDate, kept for existing callers
14042
+ * @deprecated
14042
14043
  */
14043
14044
  dateFrom?: string;
14044
14045
  /**
14045
- * Zero-padded YYYY-MM-DD, or a full ISO 8601 datetime. An empty value means no date filter; any other malformed value returns 400.
14046
+ * Alias of toDate, kept for existing callers
14047
+ * @deprecated
14046
14048
  */
14047
14049
  dateTo?: string;
14050
+ /**
14051
+ * Zero-padded YYYY-MM-DD, or a full ISO 8601 datetime. An empty value means no date filter; any other malformed value returns 400. The same name the other date-window filters use (ads, analytics).
14052
+ */
14053
+ fromDate?: string;
14048
14054
  includeHidden?: boolean;
14049
14055
  /**
14050
14056
  * Page size. Values above the maximum return 400 rather than being clamped.
14051
14057
  */
14052
14058
  limit?: number;
14059
+ /**
14060
+ * Row offset. Takes precedence over page when both are sent; the response pagination.page is derived from it.
14061
+ */
14062
+ offset?: number;
14053
14063
  /**
14054
14064
  * Page number (1-based)
14055
14065
  */
@@ -14072,6 +14082,10 @@ export type ListPostsData = {
14072
14082
  */
14073
14083
  source?: 'zernio' | 'external';
14074
14084
  status?: 'draft' | 'scheduled' | 'publishing' | 'published' | 'partial' | 'failed' | 'cancelled';
14085
+ /**
14086
+ * Zero-padded YYYY-MM-DD, or a full ISO 8601 datetime. An empty value means no date filter; any other malformed value returns 400. The same name the other date-window filters use (ads, analytics).
14087
+ */
14088
+ toDate?: string;
14075
14089
  };
14076
14090
  };
14077
14091
 
@@ -21538,9 +21552,14 @@ export type CreateWebhookSettingsError = (unknown | {
21538
21552
  export type UpdateWebhookSettingsData = {
21539
21553
  body: {
21540
21554
  /**
21541
- * Webhook ID to update (required)
21555
+ * Webhook ID to update. Required unless the deprecated `_id` is sent instead.
21542
21556
  */
21543
- _id: string;
21557
+ webhookId?: string;
21558
+ /**
21559
+ * Alias of webhookId, kept for existing callers
21560
+ * @deprecated
21561
+ */
21562
+ _id?: string;
21544
21563
  /**
21545
21564
  * Webhook name (1-50 characters). Must be non-empty if provided.
21546
21565
  */
@@ -21591,11 +21610,16 @@ export type UpdateWebhookSettingsError = (unknown | {
21591
21610
  });
21592
21611
 
21593
21612
  export type DeleteWebhookSettingsData = {
21594
- query: {
21613
+ query?: {
21595
21614
  /**
21596
- * Webhook ID to delete
21615
+ * Alias of webhookId, kept for existing callers
21616
+ * @deprecated
21597
21617
  */
21598
- id: string;
21618
+ id?: string;
21619
+ /**
21620
+ * Webhook ID to delete, the same name the other /v1/webhooks operations use (logs, redeliver, test). Required unless the deprecated `id` is sent instead.
21621
+ */
21622
+ webhookId?: string;
21599
21623
  };
21600
21624
  };
21601
21625