rcs-js 2.0.17 → 2.0.18

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.
@@ -53,8 +53,8 @@ class PinnacleClient {
53
53
  this._options = Object.assign(Object.assign({}, _options), { logging: core.logging.createLogger(_options === null || _options === void 0 ? void 0 : _options.logging), headers: (0, headers_js_1.mergeHeaders)({
54
54
  "X-Fern-Language": "JavaScript",
55
55
  "X-Fern-SDK-Name": "rcs-js",
56
- "X-Fern-SDK-Version": "2.0.17",
57
- "User-Agent": "rcs-js/2.0.17",
56
+ "X-Fern-SDK-Version": "2.0.18",
57
+ "User-Agent": "rcs-js/2.0.18",
58
58
  "X-Fern-Runtime": core.RUNTIME.type,
59
59
  "X-Fern-Runtime-Version": core.RUNTIME.version,
60
60
  }, _options === null || _options === void 0 ? void 0 : _options.headers) });
@@ -48,7 +48,9 @@ export declare class Webhooks {
48
48
  *
49
49
  * You can attach an existing webhook by providing its ID, or create a new webhook by specifying a name and URL. Supports bulk operations with up to 50 senders per request. <br>
50
50
  *
51
- * Subscriptions are additive — attaching new senders does not remove existing ones. Re-attaching the same sender updates the event type filter without creating duplicates.
51
+ * Subscriptions are additive — attaching new senders does not remove existing ones. Re-attaching the same sender updates the event type filter without creating duplicates. <br>
52
+ *
53
+ * **Custom headers** may be provided in either case via the optional `headers` field. When attaching a new webhook, the headers are stored on the webhook and sent on every delivery. When attaching an existing `webhookId`, supplying `headers` **overwrites** the stored headers on that webhook — omit the field to leave them unchanged, or pass an empty object `{}` to clear them. The reserved `PINNACLE-SIGNING-SECRET` header is always set by Pinnacle and cannot be overridden.
52
54
  *
53
55
  * @param {Pinnacle.AttachWebhookParams} request
54
56
  * @param {Webhooks.RequestOptions} requestOptions - Request-specific configuration.
@@ -203,7 +203,9 @@ class Webhooks {
203
203
  *
204
204
  * You can attach an existing webhook by providing its ID, or create a new webhook by specifying a name and URL. Supports bulk operations with up to 50 senders per request. <br>
205
205
  *
206
- * Subscriptions are additive — attaching new senders does not remove existing ones. Re-attaching the same sender updates the event type filter without creating duplicates.
206
+ * Subscriptions are additive — attaching new senders does not remove existing ones. Re-attaching the same sender updates the event type filter without creating duplicates. <br>
207
+ *
208
+ * **Custom headers** may be provided in either case via the optional `headers` field. When attaching a new webhook, the headers are stored on the webhook and sent on every delivery. When attaching an existing `webhookId`, supplying `headers` **overwrites** the stored headers on that webhook — omit the field to leave them unchanged, or pass an empty object `{}` to clear them. The reserved `PINNACLE-SIGNING-SECRET` header is always set by Pinnacle and cannot be overridden.
207
209
  *
208
210
  * @param {Pinnacle.AttachWebhookParams} request
209
211
  * @param {Webhooks.RequestOptions} requestOptions - Request-specific configuration.
@@ -8,7 +8,11 @@ import type * as Pinnacle from "../../../../index.js";
8
8
  export interface AttachWebhookParams {
9
9
  /** Array of senders to attach the webhook to. Can be phone numbers in E.164 format or RCS agent IDs. */
10
10
  senders: string[];
11
- /** Existing webhook ID (starts with `wh_`). Provide this OR `name` + `url` to create a new webhook. The webhook must be in ENABLED status. Disabled webhooks can be re-enabled from the [dashboard](https://app.pinnacle.sh/dashboard/development/webhooks). */
11
+ /**
12
+ * Existing webhook ID (starts with `wh_`). Provide this OR `name` + `url` to create a new webhook. The webhook must be in ENABLED status. Disabled webhooks can be re-enabled from the [dashboard](https://app.pinnacle.sh/dashboard/development/webhooks).
13
+ *
14
+ * Supplying `headers` alongside `webhookId` **overwrites** the stored headers on the webhook. Omit `headers` to leave them unchanged.
15
+ */
12
16
  webhookId?: string;
13
17
  /** Name for a new webhook (required if no `webhookId`). */
14
18
  name?: string;
@@ -20,4 +24,14 @@ export interface AttachWebhookParams {
20
24
  * `USER.TYPING` is only supported for RCS agent senders, not phone numbers.
21
25
  */
22
26
  event?: Pinnacle.WebhookEventEnum | null;
27
+ /**
28
+ * Optional custom HTTP headers (key-value map) to include when dispatching webhook events to the endpoint.
29
+ *
30
+ * Header names must start with a letter or digit and contain only letters, digits, `-`, or `_` (matching the pattern `^[A-Za-z0-9][A-Za-z0-9_-]*$`). Names are case-insensitive per [RFC 9110](https://datatracker.ietf.org/doc/html/rfc9110#name-field-names) and are normalized to uppercase before storage and sending.
31
+ *
32
+ * When provided with an existing `webhookId`, these headers **overwrite** any headers currently stored on that webhook. Omit to leave existing headers unchanged.
33
+ *
34
+ * The reserved `PINNACLE-SIGNING-SECRET` header is silently ignored and cannot be overridden.
35
+ */
36
+ headers?: Record<string, string | null> | null;
23
37
  }
@@ -18,5 +18,7 @@ export declare namespace AttachWebhookResult {
18
18
  url: string;
19
19
  /** Signing secret sent in the `PINNACLE-SIGNING-SECRET` header for request verification. */
20
20
  secret: string;
21
+ /** Optional custom HTTP headers sent on every webhook delivery. Header names must match the regex `^[A-Za-z0-9][A-Za-z0-9_-]*$` — start with a letter or digit and contain only letters, digits, `-`, or `_`. Keys are case-insensitive and stored in uppercase. Values must be strings. The reserved `PINNACLE-SIGNING-SECRET` header is never returned here and cannot be overridden. */
22
+ headers?: Record<string, string | null> | null;
21
23
  }
22
24
  }
@@ -11,6 +11,8 @@ export interface WebhookSummary {
11
11
  createdAt: string;
12
12
  /** ISO 8601 timestamp of when the webhook was last updated. */
13
13
  updatedAt: string;
14
+ /** Optional custom HTTP headers sent when dispatching webhook events. Header names must match the regex `^[A-Za-z0-9][A-Za-z0-9_-]*$` — start with a letter or digit and contain only letters, digits, `-`, or `_`. Keys are case-insensitive and stored in uppercase. Values must be strings. The reserved `PINNACLE-SIGNING-SECRET` header is never returned here and cannot be overridden. */
15
+ headers?: Record<string, string | null> | null;
14
16
  }
15
17
  export declare namespace WebhookSummary {
16
18
  /** Current status of the webhook. */
@@ -8,4 +8,6 @@ export interface Webhooks {
8
8
  id: string;
9
9
  /** Name of the webhook. */
10
10
  name: string;
11
+ /** Optional custom HTTP headers sent on every webhook delivery. Header names must match the regex `^[A-Za-z0-9][A-Za-z0-9_-]*$` — start with a letter or digit and contain only letters, digits, `-`, or `_`. Keys are case-insensitive and stored in uppercase. Values must be strings. The reserved `PINNACLE-SIGNING-SECRET` header is never returned here and cannot be overridden. */
12
+ headers?: Record<string, string | null> | null;
11
13
  }
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "2.0.17";
1
+ export declare const SDK_VERSION = "2.0.18";
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "2.0.17";
4
+ exports.SDK_VERSION = "2.0.18";
@@ -17,8 +17,8 @@ export class PinnacleClient {
17
17
  this._options = Object.assign(Object.assign({}, _options), { logging: core.logging.createLogger(_options === null || _options === void 0 ? void 0 : _options.logging), headers: mergeHeaders({
18
18
  "X-Fern-Language": "JavaScript",
19
19
  "X-Fern-SDK-Name": "rcs-js",
20
- "X-Fern-SDK-Version": "2.0.17",
21
- "User-Agent": "rcs-js/2.0.17",
20
+ "X-Fern-SDK-Version": "2.0.18",
21
+ "User-Agent": "rcs-js/2.0.18",
22
22
  "X-Fern-Runtime": core.RUNTIME.type,
23
23
  "X-Fern-Runtime-Version": core.RUNTIME.version,
24
24
  }, _options === null || _options === void 0 ? void 0 : _options.headers) });
@@ -48,7 +48,9 @@ export declare class Webhooks {
48
48
  *
49
49
  * You can attach an existing webhook by providing its ID, or create a new webhook by specifying a name and URL. Supports bulk operations with up to 50 senders per request. <br>
50
50
  *
51
- * Subscriptions are additive — attaching new senders does not remove existing ones. Re-attaching the same sender updates the event type filter without creating duplicates.
51
+ * Subscriptions are additive — attaching new senders does not remove existing ones. Re-attaching the same sender updates the event type filter without creating duplicates. <br>
52
+ *
53
+ * **Custom headers** may be provided in either case via the optional `headers` field. When attaching a new webhook, the headers are stored on the webhook and sent on every delivery. When attaching an existing `webhookId`, supplying `headers` **overwrites** the stored headers on that webhook — omit the field to leave them unchanged, or pass an empty object `{}` to clear them. The reserved `PINNACLE-SIGNING-SECRET` header is always set by Pinnacle and cannot be overridden.
52
54
  *
53
55
  * @param {Pinnacle.AttachWebhookParams} request
54
56
  * @param {Webhooks.RequestOptions} requestOptions - Request-specific configuration.
@@ -167,7 +167,9 @@ export class Webhooks {
167
167
  *
168
168
  * You can attach an existing webhook by providing its ID, or create a new webhook by specifying a name and URL. Supports bulk operations with up to 50 senders per request. <br>
169
169
  *
170
- * Subscriptions are additive — attaching new senders does not remove existing ones. Re-attaching the same sender updates the event type filter without creating duplicates.
170
+ * Subscriptions are additive — attaching new senders does not remove existing ones. Re-attaching the same sender updates the event type filter without creating duplicates. <br>
171
+ *
172
+ * **Custom headers** may be provided in either case via the optional `headers` field. When attaching a new webhook, the headers are stored on the webhook and sent on every delivery. When attaching an existing `webhookId`, supplying `headers` **overwrites** the stored headers on that webhook — omit the field to leave them unchanged, or pass an empty object `{}` to clear them. The reserved `PINNACLE-SIGNING-SECRET` header is always set by Pinnacle and cannot be overridden.
171
173
  *
172
174
  * @param {Pinnacle.AttachWebhookParams} request
173
175
  * @param {Webhooks.RequestOptions} requestOptions - Request-specific configuration.
@@ -8,7 +8,11 @@ import type * as Pinnacle from "../../../../index.mjs";
8
8
  export interface AttachWebhookParams {
9
9
  /** Array of senders to attach the webhook to. Can be phone numbers in E.164 format or RCS agent IDs. */
10
10
  senders: string[];
11
- /** Existing webhook ID (starts with `wh_`). Provide this OR `name` + `url` to create a new webhook. The webhook must be in ENABLED status. Disabled webhooks can be re-enabled from the [dashboard](https://app.pinnacle.sh/dashboard/development/webhooks). */
11
+ /**
12
+ * Existing webhook ID (starts with `wh_`). Provide this OR `name` + `url` to create a new webhook. The webhook must be in ENABLED status. Disabled webhooks can be re-enabled from the [dashboard](https://app.pinnacle.sh/dashboard/development/webhooks).
13
+ *
14
+ * Supplying `headers` alongside `webhookId` **overwrites** the stored headers on the webhook. Omit `headers` to leave them unchanged.
15
+ */
12
16
  webhookId?: string;
13
17
  /** Name for a new webhook (required if no `webhookId`). */
14
18
  name?: string;
@@ -20,4 +24,14 @@ export interface AttachWebhookParams {
20
24
  * `USER.TYPING` is only supported for RCS agent senders, not phone numbers.
21
25
  */
22
26
  event?: Pinnacle.WebhookEventEnum | null;
27
+ /**
28
+ * Optional custom HTTP headers (key-value map) to include when dispatching webhook events to the endpoint.
29
+ *
30
+ * Header names must start with a letter or digit and contain only letters, digits, `-`, or `_` (matching the pattern `^[A-Za-z0-9][A-Za-z0-9_-]*$`). Names are case-insensitive per [RFC 9110](https://datatracker.ietf.org/doc/html/rfc9110#name-field-names) and are normalized to uppercase before storage and sending.
31
+ *
32
+ * When provided with an existing `webhookId`, these headers **overwrite** any headers currently stored on that webhook. Omit to leave existing headers unchanged.
33
+ *
34
+ * The reserved `PINNACLE-SIGNING-SECRET` header is silently ignored and cannot be overridden.
35
+ */
36
+ headers?: Record<string, string | null> | null;
23
37
  }
@@ -18,5 +18,7 @@ export declare namespace AttachWebhookResult {
18
18
  url: string;
19
19
  /** Signing secret sent in the `PINNACLE-SIGNING-SECRET` header for request verification. */
20
20
  secret: string;
21
+ /** Optional custom HTTP headers sent on every webhook delivery. Header names must match the regex `^[A-Za-z0-9][A-Za-z0-9_-]*$` — start with a letter or digit and contain only letters, digits, `-`, or `_`. Keys are case-insensitive and stored in uppercase. Values must be strings. The reserved `PINNACLE-SIGNING-SECRET` header is never returned here and cannot be overridden. */
22
+ headers?: Record<string, string | null> | null;
21
23
  }
22
24
  }
@@ -11,6 +11,8 @@ export interface WebhookSummary {
11
11
  createdAt: string;
12
12
  /** ISO 8601 timestamp of when the webhook was last updated. */
13
13
  updatedAt: string;
14
+ /** Optional custom HTTP headers sent when dispatching webhook events. Header names must match the regex `^[A-Za-z0-9][A-Za-z0-9_-]*$` — start with a letter or digit and contain only letters, digits, `-`, or `_`. Keys are case-insensitive and stored in uppercase. Values must be strings. The reserved `PINNACLE-SIGNING-SECRET` header is never returned here and cannot be overridden. */
15
+ headers?: Record<string, string | null> | null;
14
16
  }
15
17
  export declare namespace WebhookSummary {
16
18
  /** Current status of the webhook. */
@@ -8,4 +8,6 @@ export interface Webhooks {
8
8
  id: string;
9
9
  /** Name of the webhook. */
10
10
  name: string;
11
+ /** Optional custom HTTP headers sent on every webhook delivery. Header names must match the regex `^[A-Za-z0-9][A-Za-z0-9_-]*$` — start with a letter or digit and contain only letters, digits, `-`, or `_`. Keys are case-insensitive and stored in uppercase. Values must be strings. The reserved `PINNACLE-SIGNING-SECRET` header is never returned here and cannot be overridden. */
12
+ headers?: Record<string, string | null> | null;
11
13
  }
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "2.0.17";
1
+ export declare const SDK_VERSION = "2.0.18";
@@ -1 +1 @@
1
- export const SDK_VERSION = "2.0.17";
1
+ export const SDK_VERSION = "2.0.18";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rcs-js",
3
- "version": "2.0.17",
3
+ "version": "2.0.18",
4
4
  "private": false,
5
5
  "repository": "github:pinnacle-dev/rcs-js",
6
6
  "type": "commonjs",
package/reference.md CHANGED
@@ -2192,7 +2192,9 @@ Attach a webhook to one or more senders (phone numbers or RCS agent IDs) to rece
2192
2192
 
2193
2193
  You can attach an existing webhook by providing its ID, or create a new webhook by specifying a name and URL. Supports bulk operations with up to 50 senders per request. <br>
2194
2194
 
2195
- Subscriptions are additive — attaching new senders does not remove existing ones. Re-attaching the same sender updates the event type filter without creating duplicates.
2195
+ Subscriptions are additive — attaching new senders does not remove existing ones. Re-attaching the same sender updates the event type filter without creating duplicates. <br>
2196
+
2197
+ **Custom headers** may be provided in either case via the optional `headers` field. When attaching a new webhook, the headers are stored on the webhook and sent on every delivery. When attaching an existing `webhookId`, supplying `headers` **overwrites** the stored headers on that webhook — omit the field to leave them unchanged, or pass an empty object `{}` to clear them. The reserved `PINNACLE-SIGNING-SECRET` header is always set by Pinnacle and cannot be overridden.
2196
2198
  </dd>
2197
2199
  </dl>
2198
2200
  </dd>