@0xsequence/api 1.5.0 → 1.6.0
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.
|
@@ -61,6 +61,8 @@ let SortOrder = /*#__PURE__*/function (SortOrder) {
|
|
|
61
61
|
//
|
|
62
62
|
class API {
|
|
63
63
|
constructor(hostname, fetch) {
|
|
64
|
+
this.hostname = void 0;
|
|
65
|
+
this.fetch = void 0;
|
|
64
66
|
this.path = '/rpc/API/';
|
|
65
67
|
this.ping = headers => {
|
|
66
68
|
return this.fetch(this.url('Ping'), createHTTPRequest({}, headers)).then(res => {
|
|
@@ -593,15 +595,16 @@ const buildResponse = res => {
|
|
|
593
595
|
if (!res.ok) {
|
|
594
596
|
throw data; // webrpc error response
|
|
595
597
|
}
|
|
596
|
-
|
|
597
598
|
return data;
|
|
598
599
|
});
|
|
599
600
|
};
|
|
600
601
|
|
|
601
602
|
const fetch = typeof global === 'object' ? global.fetch : window.fetch;
|
|
602
603
|
class SequenceAPIClient extends API {
|
|
603
|
-
constructor(hostname,
|
|
604
|
+
constructor(hostname, projectAccessKey, jwtAuth) {
|
|
604
605
|
super(hostname.endsWith('/') ? hostname.slice(0, -1) : hostname, fetch);
|
|
606
|
+
this.projectAccessKey = projectAccessKey;
|
|
607
|
+
this.jwtAuth = jwtAuth;
|
|
605
608
|
this._fetch = (input, init) => {
|
|
606
609
|
// automatically include jwt and access key auth header to requests
|
|
607
610
|
// if its been set on the api client
|
|
@@ -619,8 +622,6 @@ class SequenceAPIClient extends API {
|
|
|
619
622
|
init.headers = _extends({}, init.headers, headers);
|
|
620
623
|
return fetch(input, init);
|
|
621
624
|
};
|
|
622
|
-
this.projectAccessKey = _projectAccessKey;
|
|
623
|
-
this.jwtAuth = _jwtAuth;
|
|
624
625
|
this.fetch = this._fetch;
|
|
625
626
|
}
|
|
626
627
|
}
|
|
@@ -61,6 +61,8 @@ let SortOrder = /*#__PURE__*/function (SortOrder) {
|
|
|
61
61
|
//
|
|
62
62
|
class API {
|
|
63
63
|
constructor(hostname, fetch) {
|
|
64
|
+
this.hostname = void 0;
|
|
65
|
+
this.fetch = void 0;
|
|
64
66
|
this.path = '/rpc/API/';
|
|
65
67
|
this.ping = headers => {
|
|
66
68
|
return this.fetch(this.url('Ping'), createHTTPRequest({}, headers)).then(res => {
|
|
@@ -593,15 +595,16 @@ const buildResponse = res => {
|
|
|
593
595
|
if (!res.ok) {
|
|
594
596
|
throw data; // webrpc error response
|
|
595
597
|
}
|
|
596
|
-
|
|
597
598
|
return data;
|
|
598
599
|
});
|
|
599
600
|
};
|
|
600
601
|
|
|
601
602
|
const fetch = typeof global === 'object' ? global.fetch : window.fetch;
|
|
602
603
|
class SequenceAPIClient extends API {
|
|
603
|
-
constructor(hostname,
|
|
604
|
+
constructor(hostname, projectAccessKey, jwtAuth) {
|
|
604
605
|
super(hostname.endsWith('/') ? hostname.slice(0, -1) : hostname, fetch);
|
|
606
|
+
this.projectAccessKey = projectAccessKey;
|
|
607
|
+
this.jwtAuth = jwtAuth;
|
|
605
608
|
this._fetch = (input, init) => {
|
|
606
609
|
// automatically include jwt and access key auth header to requests
|
|
607
610
|
// if its been set on the api client
|
|
@@ -619,8 +622,6 @@ class SequenceAPIClient extends API {
|
|
|
619
622
|
init.headers = _extends({}, init.headers, headers);
|
|
620
623
|
return fetch(input, init);
|
|
621
624
|
};
|
|
622
|
-
this.projectAccessKey = _projectAccessKey;
|
|
623
|
-
this.jwtAuth = _jwtAuth;
|
|
624
625
|
this.fetch = this._fetch;
|
|
625
626
|
}
|
|
626
627
|
}
|
|
@@ -57,6 +57,8 @@ let SortOrder = /*#__PURE__*/function (SortOrder) {
|
|
|
57
57
|
//
|
|
58
58
|
class API {
|
|
59
59
|
constructor(hostname, fetch) {
|
|
60
|
+
this.hostname = void 0;
|
|
61
|
+
this.fetch = void 0;
|
|
60
62
|
this.path = '/rpc/API/';
|
|
61
63
|
this.ping = headers => {
|
|
62
64
|
return this.fetch(this.url('Ping'), createHTTPRequest({}, headers)).then(res => {
|
|
@@ -589,15 +591,16 @@ const buildResponse = res => {
|
|
|
589
591
|
if (!res.ok) {
|
|
590
592
|
throw data; // webrpc error response
|
|
591
593
|
}
|
|
592
|
-
|
|
593
594
|
return data;
|
|
594
595
|
});
|
|
595
596
|
};
|
|
596
597
|
|
|
597
598
|
const fetch = typeof global === 'object' ? global.fetch : window.fetch;
|
|
598
599
|
class SequenceAPIClient extends API {
|
|
599
|
-
constructor(hostname,
|
|
600
|
+
constructor(hostname, projectAccessKey, jwtAuth) {
|
|
600
601
|
super(hostname.endsWith('/') ? hostname.slice(0, -1) : hostname, fetch);
|
|
602
|
+
this.projectAccessKey = projectAccessKey;
|
|
603
|
+
this.jwtAuth = jwtAuth;
|
|
601
604
|
this._fetch = (input, init) => {
|
|
602
605
|
// automatically include jwt and access key auth header to requests
|
|
603
606
|
// if its been set on the api client
|
|
@@ -615,8 +618,6 @@ class SequenceAPIClient extends API {
|
|
|
615
618
|
init.headers = _extends({}, init.headers, headers);
|
|
616
619
|
return fetch(input, init);
|
|
617
620
|
};
|
|
618
|
-
this.projectAccessKey = _projectAccessKey;
|
|
619
|
-
this.jwtAuth = _jwtAuth;
|
|
620
621
|
this.fetch = this._fetch;
|
|
621
622
|
}
|
|
622
623
|
}
|