@0xsequence/api 1.2.7 → 1.2.8
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.
|
@@ -608,13 +608,13 @@ class SequenceAPIClient extends API {
|
|
|
608
608
|
const headers = {};
|
|
609
609
|
const {
|
|
610
610
|
jwtAuth,
|
|
611
|
-
|
|
611
|
+
accessKey
|
|
612
612
|
} = this.authorization || {};
|
|
613
613
|
if (jwtAuth && jwtAuth.length > 0) {
|
|
614
614
|
headers['Authorization'] = `BEARER ${jwtAuth}`;
|
|
615
615
|
}
|
|
616
|
-
if (
|
|
617
|
-
headers['X-
|
|
616
|
+
if (accessKey && accessKey.length > 0) {
|
|
617
|
+
headers['X-Access-Key'] = `${accessKey}`;
|
|
618
618
|
}
|
|
619
619
|
|
|
620
620
|
// before the request is made
|
|
@@ -608,13 +608,13 @@ class SequenceAPIClient extends API {
|
|
|
608
608
|
const headers = {};
|
|
609
609
|
const {
|
|
610
610
|
jwtAuth,
|
|
611
|
-
|
|
611
|
+
accessKey
|
|
612
612
|
} = this.authorization || {};
|
|
613
613
|
if (jwtAuth && jwtAuth.length > 0) {
|
|
614
614
|
headers['Authorization'] = `BEARER ${jwtAuth}`;
|
|
615
615
|
}
|
|
616
|
-
if (
|
|
617
|
-
headers['X-
|
|
616
|
+
if (accessKey && accessKey.length > 0) {
|
|
617
|
+
headers['X-Access-Key'] = `${accessKey}`;
|
|
618
618
|
}
|
|
619
619
|
|
|
620
620
|
// before the request is made
|
|
@@ -604,13 +604,13 @@ class SequenceAPIClient extends API {
|
|
|
604
604
|
const headers = {};
|
|
605
605
|
const {
|
|
606
606
|
jwtAuth,
|
|
607
|
-
|
|
607
|
+
accessKey
|
|
608
608
|
} = this.authorization || {};
|
|
609
609
|
if (jwtAuth && jwtAuth.length > 0) {
|
|
610
610
|
headers['Authorization'] = `BEARER ${jwtAuth}`;
|
|
611
611
|
}
|
|
612
|
-
if (
|
|
613
|
-
headers['X-
|
|
612
|
+
if (accessKey && accessKey.length > 0) {
|
|
613
|
+
headers['X-Access-Key'] = `${accessKey}`;
|
|
614
614
|
}
|
|
615
615
|
|
|
616
616
|
// before the request is made
|
|
@@ -3,11 +3,11 @@ import { API as ApiRpc } from "./api.gen.js";
|
|
|
3
3
|
export declare class SequenceAPIClient extends ApiRpc {
|
|
4
4
|
authorization?: {
|
|
5
5
|
jwtAuth?: string | undefined;
|
|
6
|
-
|
|
6
|
+
accessKey?: string | undefined;
|
|
7
7
|
} | undefined;
|
|
8
8
|
constructor(hostname: string, authorization?: {
|
|
9
9
|
jwtAuth?: string | undefined;
|
|
10
|
-
|
|
10
|
+
accessKey?: string | undefined;
|
|
11
11
|
} | undefined);
|
|
12
12
|
_fetch: (input: RequestInfo, init?: RequestInit) => Promise<Response>;
|
|
13
13
|
}
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -9,7 +9,7 @@ export class SequenceAPIClient extends ApiRpc {
|
|
|
9
9
|
hostname: string,
|
|
10
10
|
public authorization?: {
|
|
11
11
|
jwtAuth?: string
|
|
12
|
-
|
|
12
|
+
accessKey?: string
|
|
13
13
|
}
|
|
14
14
|
) {
|
|
15
15
|
super(hostname.endsWith('/') ? hostname.slice(0, -1) : hostname, fetch)
|
|
@@ -21,14 +21,14 @@ export class SequenceAPIClient extends ApiRpc {
|
|
|
21
21
|
// if its been set on the api client
|
|
22
22
|
const headers: { [key: string]: any } = {}
|
|
23
23
|
|
|
24
|
-
const {jwtAuth,
|
|
24
|
+
const { jwtAuth, accessKey } = this.authorization || {}
|
|
25
25
|
|
|
26
26
|
if (jwtAuth && jwtAuth.length > 0) {
|
|
27
27
|
headers['Authorization'] = `BEARER ${jwtAuth}`
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
if (
|
|
31
|
-
headers['X-
|
|
30
|
+
if (accessKey && accessKey.length > 0) {
|
|
31
|
+
headers['X-Access-Key'] = `${accessKey}`
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
// before the request is made
|