rcs-js 2.0.2 → 2.0.3

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.
@@ -54,8 +54,8 @@ class PinnacleClient {
54
54
  this._options = Object.assign(Object.assign({}, _options), { headers: (0, headers_js_1.mergeHeaders)({
55
55
  "X-Fern-Language": "JavaScript",
56
56
  "X-Fern-SDK-Name": "rcs-js",
57
- "X-Fern-SDK-Version": "2.0.2",
58
- "User-Agent": "rcs-js/2.0.2",
57
+ "X-Fern-SDK-Version": "2.0.3",
58
+ "User-Agent": "rcs-js/2.0.3",
59
59
  "X-Fern-Runtime": core.RUNTIME.type,
60
60
  "X-Fern-Runtime-Version": core.RUNTIME.version,
61
61
  }, _options === null || _options === void 0 ? void 0 : _options.headers) });
@@ -15,7 +15,8 @@ export interface MessageEventRcsMediaContent {
15
15
  * To get the message details, use the [GET /messages/{id}](/api-reference/messages/get) endpoint.
16
16
  */
17
17
  id: string;
18
- media: Pinnacle.RcsMediaDetailsContent;
18
+ /** URL of the media file. */
19
+ media: string;
19
20
  /** List of interactive quick reply buttons in the message. */
20
21
  quickReplies: Pinnacle.RichButton[];
21
22
  }
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "2.0.2";
1
+ export declare const SDK_VERSION = "2.0.3";
@@ -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.2";
4
+ exports.SDK_VERSION = "2.0.3";
@@ -15,18 +15,23 @@ const index_js_1 = require("../../api/errors/index.js");
15
15
  class EnhancedMessages extends Client_js_1.Messages {
16
16
  process(req, secret) {
17
17
  return __awaiter(this, void 0, void 0, function* () {
18
- var _a, _b;
18
+ var _a, _b, _c;
19
19
  const signingSecret = secret || process.env.PINNACLE_SIGNING_SECRET;
20
20
  let headerSecret;
21
21
  let body;
22
22
  if (req instanceof Request) {
23
23
  headerSecret =
24
- ((_a = req.headers) === null || _a === void 0 ? void 0 : _a.get("PINNACLE-SIGNING-SECRET")) || ((_b = req.headers) === null || _b === void 0 ? void 0 : _b.get("pinnacle-signing-secret")) || undefined;
24
+ ((_a = req.headers) === null || _a === void 0 ? void 0 : _a.get("PINNACLE-SIGNING-SECRET")) ||
25
+ ((_b = req.headers) === null || _b === void 0 ? void 0 : _b.get("pinnacle-signing-secret")) ||
26
+ ((_c = req.headers) === null || _c === void 0 ? void 0 : _c.get("Pinnacle-Signing-Secret")) ||
27
+ undefined;
25
28
  body = yield req.json();
26
29
  }
27
30
  else {
28
31
  const headers = req.headers;
29
- headerSecret = headers["pinnacle-signing-secret"];
32
+ headerSecret = (headers["PINNACLE-SIGNING-SECRET"] ||
33
+ headers["pinnacle-signing-secret"] ||
34
+ headers["Pinnacle-Signing-Secret"]);
30
35
  body = req.body;
31
36
  }
32
37
  if (!signingSecret) {
@@ -18,8 +18,8 @@ export class PinnacleClient {
18
18
  this._options = Object.assign(Object.assign({}, _options), { headers: mergeHeaders({
19
19
  "X-Fern-Language": "JavaScript",
20
20
  "X-Fern-SDK-Name": "rcs-js",
21
- "X-Fern-SDK-Version": "2.0.2",
22
- "User-Agent": "rcs-js/2.0.2",
21
+ "X-Fern-SDK-Version": "2.0.3",
22
+ "User-Agent": "rcs-js/2.0.3",
23
23
  "X-Fern-Runtime": core.RUNTIME.type,
24
24
  "X-Fern-Runtime-Version": core.RUNTIME.version,
25
25
  }, _options === null || _options === void 0 ? void 0 : _options.headers) });
@@ -15,7 +15,8 @@ export interface MessageEventRcsMediaContent {
15
15
  * To get the message details, use the [GET /messages/{id}](/api-reference/messages/get) endpoint.
16
16
  */
17
17
  id: string;
18
- media: Pinnacle.RcsMediaDetailsContent;
18
+ /** URL of the media file. */
19
+ media: string;
19
20
  /** List of interactive quick reply buttons in the message. */
20
21
  quickReplies: Pinnacle.RichButton[];
21
22
  }
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "2.0.2";
1
+ export declare const SDK_VERSION = "2.0.3";
@@ -1 +1 @@
1
- export const SDK_VERSION = "2.0.2";
1
+ export const SDK_VERSION = "2.0.3";
@@ -12,18 +12,23 @@ import { UnauthorizedError } from "../../api/errors/index.mjs";
12
12
  export class EnhancedMessages extends Messages {
13
13
  process(req, secret) {
14
14
  return __awaiter(this, void 0, void 0, function* () {
15
- var _a, _b;
15
+ var _a, _b, _c;
16
16
  const signingSecret = secret || process.env.PINNACLE_SIGNING_SECRET;
17
17
  let headerSecret;
18
18
  let body;
19
19
  if (req instanceof Request) {
20
20
  headerSecret =
21
- ((_a = req.headers) === null || _a === void 0 ? void 0 : _a.get("PINNACLE-SIGNING-SECRET")) || ((_b = req.headers) === null || _b === void 0 ? void 0 : _b.get("pinnacle-signing-secret")) || undefined;
21
+ ((_a = req.headers) === null || _a === void 0 ? void 0 : _a.get("PINNACLE-SIGNING-SECRET")) ||
22
+ ((_b = req.headers) === null || _b === void 0 ? void 0 : _b.get("pinnacle-signing-secret")) ||
23
+ ((_c = req.headers) === null || _c === void 0 ? void 0 : _c.get("Pinnacle-Signing-Secret")) ||
24
+ undefined;
22
25
  body = yield req.json();
23
26
  }
24
27
  else {
25
28
  const headers = req.headers;
26
- headerSecret = headers["pinnacle-signing-secret"];
29
+ headerSecret = (headers["PINNACLE-SIGNING-SECRET"] ||
30
+ headers["pinnacle-signing-secret"] ||
31
+ headers["Pinnacle-Signing-Secret"]);
27
32
  body = req.body;
28
33
  }
29
34
  if (!signingSecret) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rcs-js",
3
- "version": "2.0.2",
3
+ "version": "2.0.3",
4
4
  "private": false,
5
5
  "repository": "github:pinnacle-dev/rcs-js",
6
6
  "type": "commonjs",