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.
- package/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/auth/HeaderAuthProvider.d.ts +1 -1
- package/dist/cjs/auth/HeaderAuthProvider.js +4 -6
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/auth/HeaderAuthProvider.d.mts +1 -1
- package/dist/esm/auth/HeaderAuthProvider.mjs +4 -6
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
package/dist/cjs/BaseClient.js
CHANGED
|
@@ -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.
|
|
47
|
-
"User-Agent": "pulse-ts-sdk/0.0.
|
|
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);
|
|
@@ -51,21 +51,19 @@ class HeaderAuthProvider {
|
|
|
51
51
|
this.headerValue = options.apiKey;
|
|
52
52
|
}
|
|
53
53
|
static canCreate(options) {
|
|
54
|
-
|
|
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
|
-
|
|
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
|
|
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: {
|
|
66
|
+
headers: { X_API_KEY: headerValue },
|
|
69
67
|
};
|
|
70
68
|
});
|
|
71
69
|
}
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.0.
|
|
1
|
+
export declare const SDK_VERSION = "0.0.60";
|
package/dist/cjs/version.js
CHANGED
package/dist/esm/BaseClient.mjs
CHANGED
|
@@ -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.
|
|
10
|
-
"User-Agent": "pulse-ts-sdk/0.0.
|
|
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);
|
|
@@ -15,21 +15,19 @@ export class HeaderAuthProvider {
|
|
|
15
15
|
this.headerValue = options.apiKey;
|
|
16
16
|
}
|
|
17
17
|
static canCreate(options) {
|
|
18
|
-
|
|
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
|
-
|
|
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
|
|
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: {
|
|
30
|
+
headers: { X_API_KEY: headerValue },
|
|
33
31
|
};
|
|
34
32
|
});
|
|
35
33
|
}
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.0.
|
|
1
|
+
export declare const SDK_VERSION = "0.0.60";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "0.0.
|
|
1
|
+
export const SDK_VERSION = "0.0.60";
|