@chainstream-io/sdk 0.1.8 → 0.1.9
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/README.md +2 -2
- package/dist/esm/index.js +73 -74
- package/dist/esm/openapi/apis/BlockchainApi.js +61 -44
- package/dist/esm/openapi/apis/DefiSolanaMoonshotApi.js +67 -50
- package/dist/esm/openapi/apis/DefiSolanaPumpfunApi.js +38 -25
- package/dist/esm/openapi/apis/DexApi.js +205 -176
- package/dist/esm/openapi/apis/DexPoolApi.js +41 -28
- package/dist/esm/openapi/apis/EndpointApi.js +212 -175
- package/dist/esm/openapi/apis/IpfsApi.js +38 -25
- package/dist/esm/openapi/apis/JobsApi.js +65 -48
- package/dist/esm/openapi/apis/RankingApi.js +278 -249
- package/dist/esm/openapi/apis/RedPacketApi.js +294 -253
- package/dist/esm/openapi/apis/TokenApi.js +1145 -1056
- package/dist/esm/openapi/apis/TradeApi.js +233 -208
- package/dist/esm/openapi/apis/TransactionApi.js +42 -29
- package/dist/esm/openapi/apis/WalletApi.js +148 -123
- package/dist/esm/openapi/apis/WatchlistApi.js +41 -28
- package/dist/esm/openapi/runtime.js +119 -118
- package/dist/esm/stream/stream.js +36 -34
- package/dist/index.js +99 -96
- package/dist/openapi/apis/BlockchainApi.js +69 -48
- package/dist/openapi/apis/DefiSolanaMoonshotApi.js +74 -53
- package/dist/openapi/apis/DefiSolanaPumpfunApi.js +45 -28
- package/dist/openapi/apis/DexApi.js +217 -184
- package/dist/openapi/apis/DexPoolApi.js +49 -32
- package/dist/openapi/apis/EndpointApi.js +220 -179
- package/dist/openapi/apis/IpfsApi.js +44 -27
- package/dist/openapi/apis/JobsApi.js +72 -51
- package/dist/openapi/apis/RankingApi.js +306 -273
- package/dist/openapi/apis/RedPacketApi.js +305 -260
- package/dist/openapi/apis/TokenApi.js +1182 -1089
- package/dist/openapi/apis/TradeApi.js +256 -227
- package/dist/openapi/apis/TransactionApi.js +49 -32
- package/dist/openapi/apis/WalletApi.js +159 -130
- package/dist/openapi/apis/WatchlistApi.js +49 -32
- package/dist/openapi/apis/index.js +31 -15
- package/dist/openapi/index.js +19 -3
- package/dist/openapi/models/BlockchainDTO.js +12 -5
- package/dist/openapi/models/BlockchainLatestBlockDTO.js +12 -5
- package/dist/openapi/models/BooleanResultDTO.js +12 -5
- package/dist/openapi/models/CalculatePnlInput.js +12 -5
- package/dist/openapi/models/Candle.js +15 -8
- package/dist/openapi/models/ClaimRedPacketInput.js +12 -5
- package/dist/openapi/models/CreateEndpointInput.js +12 -5
- package/dist/openapi/models/CreateRedPacketInput.js +12 -5
- package/dist/openapi/models/CreateRedPacketReply.js +12 -5
- package/dist/openapi/models/CreateTokenInput.js +14 -6
- package/dist/openapi/models/CreateTokenReply.js +12 -5
- package/dist/openapi/models/DexDTO.js +12 -5
- package/dist/openapi/models/DexPage.js +15 -8
- package/dist/openapi/models/DexPoolDTO.js +12 -5
- package/dist/openapi/models/EndpointListResponse.js +15 -8
- package/dist/openapi/models/EndpointOperationResponse.js +12 -5
- package/dist/openapi/models/EndpointResponse.js +12 -5
- package/dist/openapi/models/EndpointSecretResponse.js +12 -5
- package/dist/openapi/models/FilterCondition.js +14 -6
- package/dist/openapi/models/GainersAndLosersDTO.js +12 -5
- package/dist/openapi/models/GainersAndLosersPage.js +15 -8
- package/dist/openapi/models/JobDTO.js +12 -5
- package/dist/openapi/models/JobStreamingDTO.js +12 -5
- package/dist/openapi/models/Link.js +14 -6
- package/dist/openapi/models/MoonshotCreateTokenInput.js +18 -10
- package/dist/openapi/models/MoonshotCreateTokenReply.js +12 -5
- package/dist/openapi/models/MoonshotSubmitCreateToken200Response.js +12 -5
- package/dist/openapi/models/MoonshotSubmitCreateTokenInput.js +12 -5
- package/dist/openapi/models/PumpCreateTokenInput.js +15 -7
- package/dist/openapi/models/PumpCreateTokenReply.js +12 -5
- package/dist/openapi/models/QuoteResponse.js +12 -5
- package/dist/openapi/models/RedPacketClaimDTO.js +14 -6
- package/dist/openapi/models/RedPacketClaimsPage.js +15 -8
- package/dist/openapi/models/RedPacketDTO.js +14 -6
- package/dist/openapi/models/RedPacketReply.js +12 -5
- package/dist/openapi/models/RedPacketSendTxInput.js +12 -5
- package/dist/openapi/models/RedPacketSendTxResponse.js +12 -5
- package/dist/openapi/models/RedPacketsPage.js +15 -8
- package/dist/openapi/models/Resolution.js +17 -9
- package/dist/openapi/models/SendTxInput.js +14 -6
- package/dist/openapi/models/SendTxResponse.js +12 -5
- package/dist/openapi/models/SwapInput.js +15 -7
- package/dist/openapi/models/SwapReply.js +12 -5
- package/dist/openapi/models/SwapRouteInput.js +15 -7
- package/dist/openapi/models/SwapRouteResponse.js +15 -8
- package/dist/openapi/models/Token.js +30 -23
- package/dist/openapi/models/TokenCreationDTO.js +14 -6
- package/dist/openapi/models/TokenCreationPage.js +15 -8
- package/dist/openapi/models/TokenCreatorsDTO.js +12 -5
- package/dist/openapi/models/TokenExtraDTO.js +12 -5
- package/dist/openapi/models/TokenHolder.js +12 -5
- package/dist/openapi/models/TokenHolderPage.js +15 -8
- package/dist/openapi/models/TokenListPage.js +15 -8
- package/dist/openapi/models/TokenMarketData.js +12 -5
- package/dist/openapi/models/TokenMetadata.js +21 -14
- package/dist/openapi/models/TokenPage.js +15 -8
- package/dist/openapi/models/TokenPriceDTO.js +12 -5
- package/dist/openapi/models/TokenPricePage.js +15 -8
- package/dist/openapi/models/TokenSocialMediasDTO.js +12 -5
- package/dist/openapi/models/TokenStat.js +12 -5
- package/dist/openapi/models/TopTradersDTO.js +12 -5
- package/dist/openapi/models/TopTradersPage.js +15 -8
- package/dist/openapi/models/TradeDetailDTO.js +12 -5
- package/dist/openapi/models/TradeEvent.js +15 -8
- package/dist/openapi/models/TradePage.js +15 -8
- package/dist/openapi/models/TradeType.js +17 -9
- package/dist/openapi/models/UpdateEndpointInput.js +12 -5
- package/dist/openapi/models/WalletBalanceDetailDTO.js +12 -5
- package/dist/openapi/models/WalletBalancesDTO.js +15 -8
- package/dist/openapi/models/WalletPnlDTO.js +12 -5
- package/dist/openapi/models/index.js +86 -70
- package/dist/openapi/runtime.js +153 -136
- package/dist/stream/index.js +19 -3
- package/dist/stream/stream.fields.js +11 -5
- package/dist/stream/stream.js +45 -39
- package/dist/stream/stream.model.js +13 -10
- package/package.json +3 -3
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
/* tslint:disable */
|
|
2
3
|
/* eslint-disable */
|
|
3
4
|
/**
|
|
@@ -11,56 +12,72 @@
|
|
|
11
12
|
* https://openapi-generator.tech
|
|
12
13
|
* Do not edit the class manually.
|
|
13
14
|
*/
|
|
14
|
-
|
|
15
|
-
|
|
15
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
16
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
17
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
18
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
19
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
20
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
21
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
exports.GetDexpoolChainEnum = exports.DexPoolApi = void 0;
|
|
26
|
+
const runtime = require("../runtime");
|
|
27
|
+
const index_1 = require("../models/index");
|
|
16
28
|
/**
|
|
17
29
|
*
|
|
18
30
|
*/
|
|
19
|
-
|
|
31
|
+
class DexPoolApi extends runtime.BaseAPI {
|
|
20
32
|
/**
|
|
21
33
|
* CONTROLLER.DEXPOOL.GET.DESCRIPTION
|
|
22
34
|
* CONTROLLER.DEXPOOL.GET.SUMMARY
|
|
23
35
|
*/
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
getDexpoolRaw(requestParameters, initOverrides) {
|
|
37
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
38
|
+
if (requestParameters['chain'] == null) {
|
|
39
|
+
throw new runtime.RequiredError('chain', 'Required parameter "chain" was null or undefined when calling getDexpool().');
|
|
40
|
+
}
|
|
41
|
+
if (requestParameters['poolAddress'] == null) {
|
|
42
|
+
throw new runtime.RequiredError('poolAddress', 'Required parameter "poolAddress" was null or undefined when calling getDexpool().');
|
|
43
|
+
}
|
|
44
|
+
const queryParameters = {};
|
|
45
|
+
const headerParameters = {};
|
|
46
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
47
|
+
const token = this.configuration.accessToken;
|
|
48
|
+
const tokenString = yield token("bearer", []);
|
|
49
|
+
if (tokenString) {
|
|
50
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
51
|
+
}
|
|
38
52
|
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
53
|
+
let urlPath = `/v1/dexpools/{chain}/{poolAddress}`;
|
|
54
|
+
urlPath = urlPath.replace(`{${"chain"}}`, encodeURIComponent(String(requestParameters['chain'])));
|
|
55
|
+
urlPath = urlPath.replace(`{${"poolAddress"}}`, encodeURIComponent(String(requestParameters['poolAddress'])));
|
|
56
|
+
const response = yield this.request({
|
|
57
|
+
path: urlPath,
|
|
58
|
+
method: 'GET',
|
|
59
|
+
headers: headerParameters,
|
|
60
|
+
query: queryParameters,
|
|
61
|
+
}, initOverrides);
|
|
62
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.DexPoolDTOFromJSON)(jsonValue));
|
|
63
|
+
});
|
|
50
64
|
}
|
|
51
65
|
/**
|
|
52
66
|
* CONTROLLER.DEXPOOL.GET.DESCRIPTION
|
|
53
67
|
* CONTROLLER.DEXPOOL.GET.SUMMARY
|
|
54
68
|
*/
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
69
|
+
getDexpool(requestParameters, initOverrides) {
|
|
70
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
71
|
+
const response = yield this.getDexpoolRaw(requestParameters, initOverrides);
|
|
72
|
+
return yield response.value();
|
|
73
|
+
});
|
|
58
74
|
}
|
|
59
75
|
}
|
|
76
|
+
exports.DexPoolApi = DexPoolApi;
|
|
60
77
|
/**
|
|
61
78
|
* @export
|
|
62
79
|
*/
|
|
63
|
-
|
|
80
|
+
exports.GetDexpoolChainEnum = {
|
|
64
81
|
Sol: 'sol',
|
|
65
82
|
Base: 'base',
|
|
66
83
|
Bsc: 'bsc',
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
/* tslint:disable */
|
|
2
3
|
/* eslint-disable */
|
|
3
4
|
/**
|
|
@@ -11,269 +12,309 @@
|
|
|
11
12
|
* https://openapi-generator.tech
|
|
12
13
|
* Do not edit the class manually.
|
|
13
14
|
*/
|
|
14
|
-
|
|
15
|
-
|
|
15
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
16
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
17
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
18
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
19
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
20
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
21
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
exports.ListEndpointsOrderEnum = exports.EndpointApi = void 0;
|
|
26
|
+
const runtime = require("../runtime");
|
|
27
|
+
const index_1 = require("../models/index");
|
|
16
28
|
/**
|
|
17
29
|
*
|
|
18
30
|
*/
|
|
19
|
-
|
|
31
|
+
class EndpointApi extends runtime.BaseAPI {
|
|
20
32
|
/**
|
|
21
33
|
* CONTROLLER.ENDPOINT.CREATE.DESCRIPTION
|
|
22
34
|
* CONTROLLER.ENDPOINT.CREATE.SUMMARY
|
|
23
35
|
*/
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
+
createEndpointRaw(requestParameters, initOverrides) {
|
|
37
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
38
|
+
if (requestParameters['createEndpointInput'] == null) {
|
|
39
|
+
throw new runtime.RequiredError('createEndpointInput', 'Required parameter "createEndpointInput" was null or undefined when calling createEndpoint().');
|
|
40
|
+
}
|
|
41
|
+
const queryParameters = {};
|
|
42
|
+
const headerParameters = {};
|
|
43
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
44
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
45
|
+
const token = this.configuration.accessToken;
|
|
46
|
+
const tokenString = yield token("bearer", []);
|
|
47
|
+
if (tokenString) {
|
|
48
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
49
|
+
}
|
|
36
50
|
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
51
|
+
let urlPath = `/v1/webhook/endpoint`;
|
|
52
|
+
const response = yield this.request({
|
|
53
|
+
path: urlPath,
|
|
54
|
+
method: 'POST',
|
|
55
|
+
headers: headerParameters,
|
|
56
|
+
query: queryParameters,
|
|
57
|
+
body: (0, index_1.CreateEndpointInputToJSON)(requestParameters['createEndpointInput']),
|
|
58
|
+
}, initOverrides);
|
|
59
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.EndpointResponseFromJSON)(jsonValue));
|
|
60
|
+
});
|
|
47
61
|
}
|
|
48
62
|
/**
|
|
49
63
|
* CONTROLLER.ENDPOINT.CREATE.DESCRIPTION
|
|
50
64
|
* CONTROLLER.ENDPOINT.CREATE.SUMMARY
|
|
51
65
|
*/
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
66
|
+
createEndpoint(requestParameters, initOverrides) {
|
|
67
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
68
|
+
const response = yield this.createEndpointRaw(requestParameters, initOverrides);
|
|
69
|
+
return yield response.value();
|
|
70
|
+
});
|
|
55
71
|
}
|
|
56
72
|
/**
|
|
57
73
|
* CONTROLLER.ENDPOINT.DELETE.DESCRIPTION
|
|
58
74
|
* CONTROLLER.ENDPOINT.DELETE.SUMMARY
|
|
59
75
|
*/
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
76
|
+
deleteEndpointRaw(requestParameters, initOverrides) {
|
|
77
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
78
|
+
if (requestParameters['id'] == null) {
|
|
79
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling deleteEndpoint().');
|
|
80
|
+
}
|
|
81
|
+
const queryParameters = {};
|
|
82
|
+
const headerParameters = {};
|
|
83
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
84
|
+
const token = this.configuration.accessToken;
|
|
85
|
+
const tokenString = yield token("bearer", []);
|
|
86
|
+
if (tokenString) {
|
|
87
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
88
|
+
}
|
|
71
89
|
}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
90
|
+
let urlPath = `/v1/webhook/endpoint/{id}`;
|
|
91
|
+
urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
|
|
92
|
+
const response = yield this.request({
|
|
93
|
+
path: urlPath,
|
|
94
|
+
method: 'DELETE',
|
|
95
|
+
headers: headerParameters,
|
|
96
|
+
query: queryParameters,
|
|
97
|
+
}, initOverrides);
|
|
98
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.EndpointOperationResponseFromJSON)(jsonValue));
|
|
99
|
+
});
|
|
82
100
|
}
|
|
83
101
|
/**
|
|
84
102
|
* CONTROLLER.ENDPOINT.DELETE.DESCRIPTION
|
|
85
103
|
* CONTROLLER.ENDPOINT.DELETE.SUMMARY
|
|
86
104
|
*/
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
105
|
+
deleteEndpoint(requestParameters, initOverrides) {
|
|
106
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
107
|
+
const response = yield this.deleteEndpointRaw(requestParameters, initOverrides);
|
|
108
|
+
return yield response.value();
|
|
109
|
+
});
|
|
90
110
|
}
|
|
91
111
|
/**
|
|
92
112
|
* CONTROLLER.ENDPOINT.GET.DESCRIPTION
|
|
93
113
|
* CONTROLLER.ENDPOINT.GET.SUMMARY
|
|
94
114
|
*/
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
const queryParameters = {};
|
|
100
|
-
const headerParameters = {};
|
|
101
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
102
|
-
const token = this.configuration.accessToken;
|
|
103
|
-
const tokenString = await token("bearer", []);
|
|
104
|
-
if (tokenString) {
|
|
105
|
-
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
115
|
+
getEndpointRaw(requestParameters, initOverrides) {
|
|
116
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
117
|
+
if (requestParameters['id'] == null) {
|
|
118
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getEndpoint().');
|
|
106
119
|
}
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
120
|
+
const queryParameters = {};
|
|
121
|
+
const headerParameters = {};
|
|
122
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
123
|
+
const token = this.configuration.accessToken;
|
|
124
|
+
const tokenString = yield token("bearer", []);
|
|
125
|
+
if (tokenString) {
|
|
126
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
let urlPath = `/v1/webhook/endpoint/{id}`;
|
|
130
|
+
urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
|
|
131
|
+
const response = yield this.request({
|
|
132
|
+
path: urlPath,
|
|
133
|
+
method: 'GET',
|
|
134
|
+
headers: headerParameters,
|
|
135
|
+
query: queryParameters,
|
|
136
|
+
}, initOverrides);
|
|
137
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.EndpointResponseFromJSON)(jsonValue));
|
|
138
|
+
});
|
|
117
139
|
}
|
|
118
140
|
/**
|
|
119
141
|
* CONTROLLER.ENDPOINT.GET.DESCRIPTION
|
|
120
142
|
* CONTROLLER.ENDPOINT.GET.SUMMARY
|
|
121
143
|
*/
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
144
|
+
getEndpoint(requestParameters, initOverrides) {
|
|
145
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
146
|
+
const response = yield this.getEndpointRaw(requestParameters, initOverrides);
|
|
147
|
+
return yield response.value();
|
|
148
|
+
});
|
|
125
149
|
}
|
|
126
150
|
/**
|
|
127
151
|
* CONTROLLER.ENDPOINT.GET.SECRET.DESCRIPTION
|
|
128
152
|
* CONTROLLER.ENDPOINT.GET.SECRET.SUMMARY
|
|
129
153
|
*/
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
154
|
+
getEndpointSecretRaw(requestParameters, initOverrides) {
|
|
155
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
156
|
+
if (requestParameters['id'] == null) {
|
|
157
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getEndpointSecret().');
|
|
158
|
+
}
|
|
159
|
+
const queryParameters = {};
|
|
160
|
+
const headerParameters = {};
|
|
161
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
162
|
+
const token = this.configuration.accessToken;
|
|
163
|
+
const tokenString = yield token("bearer", []);
|
|
164
|
+
if (tokenString) {
|
|
165
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
166
|
+
}
|
|
141
167
|
}
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
168
|
+
let urlPath = `/v1/webhook/endpoint/{id}/secret`;
|
|
169
|
+
urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
|
|
170
|
+
const response = yield this.request({
|
|
171
|
+
path: urlPath,
|
|
172
|
+
method: 'GET',
|
|
173
|
+
headers: headerParameters,
|
|
174
|
+
query: queryParameters,
|
|
175
|
+
}, initOverrides);
|
|
176
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.EndpointSecretResponseFromJSON)(jsonValue));
|
|
177
|
+
});
|
|
152
178
|
}
|
|
153
179
|
/**
|
|
154
180
|
* CONTROLLER.ENDPOINT.GET.SECRET.DESCRIPTION
|
|
155
181
|
* CONTROLLER.ENDPOINT.GET.SECRET.SUMMARY
|
|
156
182
|
*/
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
183
|
+
getEndpointSecret(requestParameters, initOverrides) {
|
|
184
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
185
|
+
const response = yield this.getEndpointSecretRaw(requestParameters, initOverrides);
|
|
186
|
+
return yield response.value();
|
|
187
|
+
});
|
|
160
188
|
}
|
|
161
189
|
/**
|
|
162
190
|
* CONTROLLER.ENDPOINT.LIST.DESCRIPTION
|
|
163
191
|
* CONTROLLER.ENDPOINT.LIST.SUMMARY
|
|
164
192
|
*/
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
if (requestParameters['iterator'] != null) {
|
|
171
|
-
queryParameters['iterator'] = requestParameters['iterator'];
|
|
172
|
-
}
|
|
173
|
-
if (requestParameters['order'] != null) {
|
|
174
|
-
queryParameters['order'] = requestParameters['order'];
|
|
175
|
-
}
|
|
176
|
-
const headerParameters = {};
|
|
177
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
178
|
-
const token = this.configuration.accessToken;
|
|
179
|
-
const tokenString = await token("bearer", []);
|
|
180
|
-
if (tokenString) {
|
|
181
|
-
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
193
|
+
listEndpointsRaw(requestParameters, initOverrides) {
|
|
194
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
195
|
+
const queryParameters = {};
|
|
196
|
+
if (requestParameters['limit'] != null) {
|
|
197
|
+
queryParameters['limit'] = requestParameters['limit'];
|
|
182
198
|
}
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
199
|
+
if (requestParameters['iterator'] != null) {
|
|
200
|
+
queryParameters['iterator'] = requestParameters['iterator'];
|
|
201
|
+
}
|
|
202
|
+
if (requestParameters['order'] != null) {
|
|
203
|
+
queryParameters['order'] = requestParameters['order'];
|
|
204
|
+
}
|
|
205
|
+
const headerParameters = {};
|
|
206
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
207
|
+
const token = this.configuration.accessToken;
|
|
208
|
+
const tokenString = yield token("bearer", []);
|
|
209
|
+
if (tokenString) {
|
|
210
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
let urlPath = `/v1/webhook/endpoint`;
|
|
214
|
+
const response = yield this.request({
|
|
215
|
+
path: urlPath,
|
|
216
|
+
method: 'GET',
|
|
217
|
+
headers: headerParameters,
|
|
218
|
+
query: queryParameters,
|
|
219
|
+
}, initOverrides);
|
|
220
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.EndpointListResponseFromJSON)(jsonValue));
|
|
221
|
+
});
|
|
192
222
|
}
|
|
193
223
|
/**
|
|
194
224
|
* CONTROLLER.ENDPOINT.LIST.DESCRIPTION
|
|
195
225
|
* CONTROLLER.ENDPOINT.LIST.SUMMARY
|
|
196
226
|
*/
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
227
|
+
listEndpoints() {
|
|
228
|
+
return __awaiter(this, arguments, void 0, function* (requestParameters = {}, initOverrides) {
|
|
229
|
+
const response = yield this.listEndpointsRaw(requestParameters, initOverrides);
|
|
230
|
+
return yield response.value();
|
|
231
|
+
});
|
|
200
232
|
}
|
|
201
233
|
/**
|
|
202
234
|
* CONTROLLER.ENDPOINT.ROTATE.DESCRIPTION
|
|
203
235
|
* CONTROLLER.ENDPOINT.ROTATE.SUMMARY
|
|
204
236
|
*/
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
const queryParameters = {};
|
|
210
|
-
const headerParameters = {};
|
|
211
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
212
|
-
const token = this.configuration.accessToken;
|
|
213
|
-
const tokenString = await token("bearer", []);
|
|
214
|
-
if (tokenString) {
|
|
215
|
-
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
237
|
+
rotateEndpointSecretRaw(requestParameters, initOverrides) {
|
|
238
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
239
|
+
if (requestParameters['id'] == null) {
|
|
240
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling rotateEndpointSecret().');
|
|
216
241
|
}
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
242
|
+
const queryParameters = {};
|
|
243
|
+
const headerParameters = {};
|
|
244
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
245
|
+
const token = this.configuration.accessToken;
|
|
246
|
+
const tokenString = yield token("bearer", []);
|
|
247
|
+
if (tokenString) {
|
|
248
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
let urlPath = `/v1/webhook/endpoint/{id}/secret/rotate`;
|
|
252
|
+
urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
|
|
253
|
+
const response = yield this.request({
|
|
254
|
+
path: urlPath,
|
|
255
|
+
method: 'POST',
|
|
256
|
+
headers: headerParameters,
|
|
257
|
+
query: queryParameters,
|
|
258
|
+
}, initOverrides);
|
|
259
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.EndpointOperationResponseFromJSON)(jsonValue));
|
|
260
|
+
});
|
|
227
261
|
}
|
|
228
262
|
/**
|
|
229
263
|
* CONTROLLER.ENDPOINT.ROTATE.DESCRIPTION
|
|
230
264
|
* CONTROLLER.ENDPOINT.ROTATE.SUMMARY
|
|
231
265
|
*/
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
266
|
+
rotateEndpointSecret(requestParameters, initOverrides) {
|
|
267
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
268
|
+
const response = yield this.rotateEndpointSecretRaw(requestParameters, initOverrides);
|
|
269
|
+
return yield response.value();
|
|
270
|
+
});
|
|
235
271
|
}
|
|
236
272
|
/**
|
|
237
273
|
* CONTROLLER.ENDPOINT.UPDATE.DESCRIPTION
|
|
238
274
|
* CONTROLLER.ENDPOINT.UPDATE.SUMMARY
|
|
239
275
|
*/
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
276
|
+
updateEndpointRaw(requestParameters, initOverrides) {
|
|
277
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
278
|
+
if (requestParameters['updateEndpointInput'] == null) {
|
|
279
|
+
throw new runtime.RequiredError('updateEndpointInput', 'Required parameter "updateEndpointInput" was null or undefined when calling updateEndpoint().');
|
|
280
|
+
}
|
|
281
|
+
const queryParameters = {};
|
|
282
|
+
const headerParameters = {};
|
|
283
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
284
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
285
|
+
const token = this.configuration.accessToken;
|
|
286
|
+
const tokenString = yield token("bearer", []);
|
|
287
|
+
if (tokenString) {
|
|
288
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
289
|
+
}
|
|
252
290
|
}
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
291
|
+
let urlPath = `/v1/webhook/endpoint/{id}`;
|
|
292
|
+
const response = yield this.request({
|
|
293
|
+
path: urlPath,
|
|
294
|
+
method: 'PATCH',
|
|
295
|
+
headers: headerParameters,
|
|
296
|
+
query: queryParameters,
|
|
297
|
+
body: (0, index_1.UpdateEndpointInputToJSON)(requestParameters['updateEndpointInput']),
|
|
298
|
+
}, initOverrides);
|
|
299
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.EndpointResponseFromJSON)(jsonValue));
|
|
300
|
+
});
|
|
263
301
|
}
|
|
264
302
|
/**
|
|
265
303
|
* CONTROLLER.ENDPOINT.UPDATE.DESCRIPTION
|
|
266
304
|
* CONTROLLER.ENDPOINT.UPDATE.SUMMARY
|
|
267
305
|
*/
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
306
|
+
updateEndpoint(requestParameters, initOverrides) {
|
|
307
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
308
|
+
const response = yield this.updateEndpointRaw(requestParameters, initOverrides);
|
|
309
|
+
return yield response.value();
|
|
310
|
+
});
|
|
271
311
|
}
|
|
272
312
|
}
|
|
313
|
+
exports.EndpointApi = EndpointApi;
|
|
273
314
|
/**
|
|
274
315
|
* @export
|
|
275
316
|
*/
|
|
276
|
-
|
|
317
|
+
exports.ListEndpointsOrderEnum = {
|
|
277
318
|
Ascending: 'ascending',
|
|
278
319
|
Descending: 'descending'
|
|
279
320
|
};
|