pulse-ts-sdk 0.0.59 → 0.0.60

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.
@@ -43,8 +43,8 @@ function normalizeClientOptions(options) {
43
43
  const headers = (0, headers_js_1.mergeHeaders)({
44
44
  "X-Fern-Language": "JavaScript",
45
45
  "X-Fern-SDK-Name": "pulse-ts-sdk",
46
- "X-Fern-SDK-Version": "0.0.59",
47
- "User-Agent": "pulse-ts-sdk/0.0.59",
46
+ "X-Fern-SDK-Version": "0.0.60",
47
+ "User-Agent": "pulse-ts-sdk/0.0.60",
48
48
  "X-Fern-Runtime": core.RUNTIME.type,
49
49
  "X-Fern-Runtime-Version": core.RUNTIME.version,
50
50
  }, options === null || options === void 0 ? void 0 : options.headers);
@@ -1,7 +1,7 @@
1
1
  import * as core from "../core/index.js";
2
2
  export declare namespace HeaderAuthProvider {
3
3
  interface AuthOptions {
4
- apiKey?: core.Supplier<string> | undefined;
4
+ apiKey?: core.Supplier<string>;
5
5
  }
6
6
  interface Options extends AuthOptions {
7
7
  }
@@ -51,21 +51,19 @@ class HeaderAuthProvider {
51
51
  this.headerValue = options.apiKey;
52
52
  }
53
53
  static canCreate(options) {
54
- var _a;
55
- return options.apiKey != null || ((_a = process.env) === null || _a === void 0 ? void 0 : _a.PULSE_API_KEY) != null;
54
+ return options.apiKey != null;
56
55
  }
57
56
  getAuthRequest(_arg) {
58
57
  return __awaiter(this, void 0, void 0, function* () {
59
- var _a, _b;
60
- const apiKey = (_a = (yield core.Supplier.get(this.headerValue))) !== null && _a !== void 0 ? _a : (_b = process.env) === null || _b === void 0 ? void 0 : _b.PULSE_API_KEY;
58
+ const apiKey = yield core.Supplier.get(this.headerValue);
61
59
  if (apiKey == null) {
62
60
  throw new errors.PulseError({
63
- message: "Please specify a apiKey by either passing it in to the constructor or initializing a PULSE_API_KEY environment variable",
61
+ message: "Please specify a apiKey by passing it in to the constructor",
64
62
  });
65
63
  }
66
64
  const headerValue = apiKey;
67
65
  return {
68
- headers: { "x-api-key": headerValue },
66
+ headers: { X_API_KEY: headerValue },
69
67
  };
70
68
  });
71
69
  }
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.0.59";
1
+ export declare const SDK_VERSION = "0.0.60";
@@ -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 = "0.0.59";
4
+ exports.SDK_VERSION = "0.0.60";
@@ -6,8 +6,8 @@ export function normalizeClientOptions(options) {
6
6
  const headers = mergeHeaders({
7
7
  "X-Fern-Language": "JavaScript",
8
8
  "X-Fern-SDK-Name": "pulse-ts-sdk",
9
- "X-Fern-SDK-Version": "0.0.59",
10
- "User-Agent": "pulse-ts-sdk/0.0.59",
9
+ "X-Fern-SDK-Version": "0.0.60",
10
+ "User-Agent": "pulse-ts-sdk/0.0.60",
11
11
  "X-Fern-Runtime": core.RUNTIME.type,
12
12
  "X-Fern-Runtime-Version": core.RUNTIME.version,
13
13
  }, options === null || options === void 0 ? void 0 : options.headers);
@@ -1,7 +1,7 @@
1
1
  import * as core from "../core/index.mjs";
2
2
  export declare namespace HeaderAuthProvider {
3
3
  interface AuthOptions {
4
- apiKey?: core.Supplier<string> | undefined;
4
+ apiKey?: core.Supplier<string>;
5
5
  }
6
6
  interface Options extends AuthOptions {
7
7
  }
@@ -15,21 +15,19 @@ export class HeaderAuthProvider {
15
15
  this.headerValue = options.apiKey;
16
16
  }
17
17
  static canCreate(options) {
18
- var _a;
19
- return options.apiKey != null || ((_a = process.env) === null || _a === void 0 ? void 0 : _a.PULSE_API_KEY) != null;
18
+ return options.apiKey != null;
20
19
  }
21
20
  getAuthRequest(_arg) {
22
21
  return __awaiter(this, void 0, void 0, function* () {
23
- var _a, _b;
24
- const apiKey = (_a = (yield core.Supplier.get(this.headerValue))) !== null && _a !== void 0 ? _a : (_b = process.env) === null || _b === void 0 ? void 0 : _b.PULSE_API_KEY;
22
+ const apiKey = yield core.Supplier.get(this.headerValue);
25
23
  if (apiKey == null) {
26
24
  throw new errors.PulseError({
27
- message: "Please specify a apiKey by either passing it in to the constructor or initializing a PULSE_API_KEY environment variable",
25
+ message: "Please specify a apiKey by passing it in to the constructor",
28
26
  });
29
27
  }
30
28
  const headerValue = apiKey;
31
29
  return {
32
- headers: { "x-api-key": headerValue },
30
+ headers: { X_API_KEY: headerValue },
33
31
  };
34
32
  });
35
33
  }
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.0.59";
1
+ export declare const SDK_VERSION = "0.0.60";
@@ -1 +1 @@
1
- export const SDK_VERSION = "0.0.59";
1
+ export const SDK_VERSION = "0.0.60";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pulse-ts-sdk",
3
- "version": "0.0.59",
3
+ "version": "0.0.60",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",