@aws-amplify/api-rest 3.5.5 → 4.0.1-console-preview.047a1dd.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.
- package/README.md +3 -0
- package/lib/API.d.ts +4 -0
- package/lib/API.js +19 -0
- package/lib/RestClient.d.ts +8 -31
- package/lib/RestClient.js +81 -131
- package/lib/index.d.ts +2 -2
- package/lib/index.js +5 -6
- package/lib/tsconfig.tsbuildinfo +1 -0
- package/lib/types/index.d.ts +10 -1
- package/lib/types/index.js +1 -1
- package/lib-esm/API.d.ts +4 -0
- package/lib-esm/API.js +13 -0
- package/lib-esm/RestClient.d.ts +8 -31
- package/lib-esm/RestClient.js +79 -130
- package/lib-esm/index.d.ts +2 -2
- package/lib-esm/index.js +1 -3
- package/lib-esm/tsconfig.tsbuildinfo +1 -0
- package/lib-esm/types/index.d.ts +10 -1
- package/lib-esm/types/index.js +0 -1
- package/package.json +30 -23
- package/src/API.ts +17 -0
- package/src/RestClient.ts +147 -202
- package/src/index.ts +2 -2
- package/src/types/index.ts +14 -0
- package/lib/.tsbuildinfo +0 -3
- package/lib/RestAPI.d.ts +0 -108
- package/lib/RestAPI.js +0 -282
- package/lib/RestAPI.js.map +0 -1
- package/lib/RestClient.js.map +0 -1
- package/lib/index.js.map +0 -1
- package/lib/types/index.js.map +0 -1
- package/lib-esm/.tsbuildinfo +0 -3
- package/lib-esm/RestAPI.d.ts +0 -108
- package/lib-esm/RestAPI.js +0 -280
- package/lib-esm/RestAPI.js.map +0 -1
- package/lib-esm/RestClient.js.map +0 -1
- package/lib-esm/index.js.map +0 -1
- package/lib-esm/types/index.js.map +0 -1
- package/src/RestAPI.ts +0 -338
package/README.md
ADDED
package/lib/API.d.ts
ADDED
package/lib/API.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isCancel = exports.cancel = exports.post = void 0;
|
|
4
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
5
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
6
|
+
var RestClient_1 = require("./RestClient");
|
|
7
|
+
var restClient = new RestClient_1.RestClient({ headers: {}, endpoints: [] });
|
|
8
|
+
function post(url, options) {
|
|
9
|
+
return restClient.post(url, options);
|
|
10
|
+
}
|
|
11
|
+
exports.post = post;
|
|
12
|
+
function cancel(request, message) {
|
|
13
|
+
return restClient.cancel(request, message);
|
|
14
|
+
}
|
|
15
|
+
exports.cancel = cancel;
|
|
16
|
+
function isCancel(error) {
|
|
17
|
+
return restClient.isCancel(error);
|
|
18
|
+
}
|
|
19
|
+
exports.isCancel = isCancel;
|
package/lib/RestClient.d.ts
CHANGED
|
@@ -1,18 +1,5 @@
|
|
|
1
|
-
import { apiOptions
|
|
1
|
+
import { apiOptions } from './types';
|
|
2
2
|
import { CancelTokenSource } from 'axios';
|
|
3
|
-
/**
|
|
4
|
-
* HTTP Client for REST requests. Send and receive JSON data.
|
|
5
|
-
* Sign request with AWS credentials if available
|
|
6
|
-
* Usage:
|
|
7
|
-
<pre>
|
|
8
|
-
const restClient = new RestClient();
|
|
9
|
-
restClient.get('...')
|
|
10
|
-
.then(function(data) {
|
|
11
|
-
console.log(data);
|
|
12
|
-
})
|
|
13
|
-
.catch(err => console.log(err));
|
|
14
|
-
</pre>
|
|
15
|
-
*/
|
|
16
3
|
export declare class RestClient {
|
|
17
4
|
private _options;
|
|
18
5
|
private _region;
|
|
@@ -33,19 +20,10 @@ export declare class RestClient {
|
|
|
33
20
|
* For more details, see https://github.com/aws-amplify/amplify-js/pull/3769#issuecomment-552660025
|
|
34
21
|
*/
|
|
35
22
|
private _cancelTokenMap;
|
|
36
|
-
Credentials: import("@aws-amplify/core").CredentialsClass;
|
|
37
23
|
/**
|
|
38
24
|
* @param {RestClientOptions} [options] - Instance options
|
|
39
25
|
*/
|
|
40
26
|
constructor(options: apiOptions);
|
|
41
|
-
/**
|
|
42
|
-
* Update AWS credentials
|
|
43
|
-
* @param {AWSCredentials} credentials - AWS credentials
|
|
44
|
-
*
|
|
45
|
-
updateCredentials(credentials: AWSCredentials) {
|
|
46
|
-
this.options.credentials = credentials;
|
|
47
|
-
}
|
|
48
|
-
*/
|
|
49
27
|
/**
|
|
50
28
|
* Basic HTTP request. Customizable
|
|
51
29
|
* @param {string | ApiInfo } urlOrApiInfo - Full request URL or Api information
|
|
@@ -53,49 +31,49 @@ export declare class RestClient {
|
|
|
53
31
|
* @param {json} [init] - Request extra params
|
|
54
32
|
* @return {Promise} - A promise that resolves to an object with response status and JSON data, if successful.
|
|
55
33
|
*/
|
|
56
|
-
ajax(
|
|
34
|
+
ajax(url: string, method: string, init: any): Promise<unknown>;
|
|
57
35
|
/**
|
|
58
36
|
* GET HTTP request
|
|
59
37
|
* @param {string | ApiInfo } urlOrApiInfo - Full request URL or Api information
|
|
60
38
|
* @param {JSON} init - Request extra params
|
|
61
39
|
* @return {Promise} - A promise that resolves to an object with response status and JSON data, if successful.
|
|
62
40
|
*/
|
|
63
|
-
get(urlOrApiInfo: string
|
|
41
|
+
get(urlOrApiInfo: string, init: any): Promise<unknown>;
|
|
64
42
|
/**
|
|
65
43
|
* PUT HTTP request
|
|
66
44
|
* @param {string | ApiInfo } urlOrApiInfo - Full request URL or Api information
|
|
67
45
|
* @param {json} init - Request extra params
|
|
68
46
|
* @return {Promise} - A promise that resolves to an object with response status and JSON data, if successful.
|
|
69
47
|
*/
|
|
70
|
-
put(urlOrApiInfo: string
|
|
48
|
+
put(urlOrApiInfo: string, init: any): Promise<unknown>;
|
|
71
49
|
/**
|
|
72
50
|
* PATCH HTTP request
|
|
73
51
|
* @param {string | ApiInfo } urlOrApiInfo - Full request URL or Api information
|
|
74
52
|
* @param {json} init - Request extra params
|
|
75
53
|
* @return {Promise} - A promise that resolves to an object with response status and JSON data, if successful.
|
|
76
54
|
*/
|
|
77
|
-
patch(urlOrApiInfo: string
|
|
55
|
+
patch(urlOrApiInfo: string, init: any): Promise<unknown>;
|
|
78
56
|
/**
|
|
79
57
|
* POST HTTP request
|
|
80
58
|
* @param {string | ApiInfo } urlOrApiInfo - Full request URL or Api information
|
|
81
59
|
* @param {json} init - Request extra params
|
|
82
60
|
* @return {Promise} - A promise that resolves to an object with response status and JSON data, if successful.
|
|
83
61
|
*/
|
|
84
|
-
post(urlOrApiInfo: string
|
|
62
|
+
post(urlOrApiInfo: string, init: any): Promise<unknown>;
|
|
85
63
|
/**
|
|
86
64
|
* DELETE HTTP request
|
|
87
65
|
* @param {string | ApiInfo } urlOrApiInfo - Full request URL or Api information
|
|
88
66
|
* @param {json} init - Request extra params
|
|
89
67
|
* @return {Promise} - A promise that resolves to an object with response status and JSON data, if successful.
|
|
90
68
|
*/
|
|
91
|
-
del(urlOrApiInfo: string
|
|
69
|
+
del(urlOrApiInfo: string, init: any): Promise<unknown>;
|
|
92
70
|
/**
|
|
93
71
|
* HEAD HTTP request
|
|
94
72
|
* @param {string | ApiInfo } urlOrApiInfo - Full request URL or Api information
|
|
95
73
|
* @param {json} init - Request extra params
|
|
96
74
|
* @return {Promise} - A promise that resolves to an object with response status and JSON data, if successful.
|
|
97
75
|
*/
|
|
98
|
-
head(urlOrApiInfo: string
|
|
76
|
+
head(urlOrApiInfo: string, init: any): Promise<unknown>;
|
|
99
77
|
/**
|
|
100
78
|
* Cancel an inflight API request
|
|
101
79
|
* @param {Promise<any>} request - The request promise to cancel
|
|
@@ -134,5 +112,4 @@ export declare class RestClient {
|
|
|
134
112
|
/** private methods **/
|
|
135
113
|
private _sign;
|
|
136
114
|
private _request;
|
|
137
|
-
private _parseUrl;
|
|
138
115
|
}
|
package/lib/RestClient.js
CHANGED
|
@@ -1,25 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
4
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RestClient = void 0;
|
|
5
4
|
var tslib_1 = require("tslib");
|
|
5
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
6
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
6
7
|
var core_1 = require("@aws-amplify/core");
|
|
7
8
|
var axios_1 = tslib_1.__importDefault(require("axios"));
|
|
8
9
|
var url_1 = require("url");
|
|
9
|
-
var
|
|
10
|
-
/**
|
|
11
|
-
* HTTP Client for REST requests. Send and receive JSON data.
|
|
12
|
-
* Sign request with AWS credentials if available
|
|
13
|
-
* Usage:
|
|
14
|
-
<pre>
|
|
15
|
-
const restClient = new RestClient();
|
|
16
|
-
restClient.get('...')
|
|
17
|
-
.then(function(data) {
|
|
18
|
-
console.log(data);
|
|
19
|
-
})
|
|
20
|
-
.catch(err => console.log(err));
|
|
21
|
-
</pre>
|
|
22
|
-
*/
|
|
10
|
+
var aws_client_utils_1 = require("@aws-amplify/core/internals/aws-client-utils");
|
|
23
11
|
var RestClient = /** @class */ (function () {
|
|
24
12
|
/**
|
|
25
13
|
* @param {RestClientOptions} [options] - Instance options
|
|
@@ -43,21 +31,11 @@ var RestClient = /** @class */ (function () {
|
|
|
43
31
|
* For more details, see https://github.com/aws-amplify/amplify-js/pull/3769#issuecomment-552660025
|
|
44
32
|
*/
|
|
45
33
|
this._cancelTokenMap = null;
|
|
46
|
-
this.Credentials = core_1.Credentials;
|
|
47
34
|
this._options = options;
|
|
48
|
-
logger.debug('API Options', this._options);
|
|
49
35
|
if (this._cancelTokenMap == null) {
|
|
50
36
|
this._cancelTokenMap = new WeakMap();
|
|
51
37
|
}
|
|
52
38
|
}
|
|
53
|
-
/**
|
|
54
|
-
* Update AWS credentials
|
|
55
|
-
* @param {AWSCredentials} credentials - AWS credentials
|
|
56
|
-
*
|
|
57
|
-
updateCredentials(credentials: AWSCredentials) {
|
|
58
|
-
this.options.credentials = credentials;
|
|
59
|
-
}
|
|
60
|
-
*/
|
|
61
39
|
/**
|
|
62
40
|
* Basic HTTP request. Customizable
|
|
63
41
|
* @param {string | ApiInfo } urlOrApiInfo - Full request URL or Api information
|
|
@@ -65,34 +43,26 @@ var RestClient = /** @class */ (function () {
|
|
|
65
43
|
* @param {json} [init] - Request extra params
|
|
66
44
|
* @return {Promise} - A promise that resolves to an object with response status and JSON data, if successful.
|
|
67
45
|
*/
|
|
68
|
-
RestClient.prototype.ajax = function (
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
46
|
+
RestClient.prototype.ajax = function (url, method, init) {
|
|
47
|
+
var _this = this;
|
|
48
|
+
var source = axios_1.default.CancelToken.source();
|
|
49
|
+
var promise = new Promise(function (res, rej) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
50
|
+
var parsed_url, region, service, params, libraryHeaders, initParams, isAllResponse, _a, search, parsedUrl, _b, credentials, session, error_1, _c, signedParams, _d, error_2;
|
|
51
|
+
return tslib_1.__generator(this, function (_e) {
|
|
52
|
+
switch (_e.label) {
|
|
73
53
|
case 0:
|
|
74
|
-
|
|
75
|
-
region = 'us-east-1';
|
|
76
|
-
service = 'execute-api';
|
|
77
|
-
custom_header = undefined;
|
|
78
|
-
if (typeof urlOrApiInfo === 'string') {
|
|
79
|
-
parsed_url = this._parseUrl(urlOrApiInfo);
|
|
80
|
-
url = urlOrApiInfo;
|
|
81
|
-
}
|
|
82
|
-
else {
|
|
83
|
-
(url = urlOrApiInfo.endpoint, custom_header = urlOrApiInfo.custom_header, region = urlOrApiInfo.region, service = urlOrApiInfo.service);
|
|
84
|
-
parsed_url = this._parseUrl(urlOrApiInfo.endpoint);
|
|
85
|
-
}
|
|
54
|
+
parsed_url = new URL(url);
|
|
55
|
+
region = init.region || 'us-east-1';
|
|
56
|
+
service = init.serviceName || 'execute-api';
|
|
86
57
|
params = {
|
|
87
58
|
method: method,
|
|
88
59
|
url: url,
|
|
89
60
|
host: parsed_url.host,
|
|
90
|
-
path: parsed_url.
|
|
61
|
+
path: parsed_url.pathname,
|
|
91
62
|
headers: {},
|
|
92
|
-
data:
|
|
63
|
+
data: JSON.stringify(''),
|
|
93
64
|
responseType: 'json',
|
|
94
65
|
timeout: 0,
|
|
95
|
-
cancelToken: null,
|
|
96
66
|
};
|
|
97
67
|
libraryHeaders = {};
|
|
98
68
|
initParams = Object.assign({}, init);
|
|
@@ -117,75 +87,69 @@ var RestClient = /** @class */ (function () {
|
|
|
117
87
|
if (initParams.timeout) {
|
|
118
88
|
params.timeout = initParams.timeout;
|
|
119
89
|
}
|
|
120
|
-
if (initParams.cancellableToken) {
|
|
121
|
-
params.cancelToken = initParams.cancellableToken.token;
|
|
122
|
-
}
|
|
123
90
|
params['signerServiceInfo'] = initParams.signerServiceInfo;
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
91
|
+
params.headers = tslib_1.__assign(tslib_1.__assign({}, libraryHeaders), initParams.headers);
|
|
92
|
+
_a = (0, url_1.parse)(url, true, true), search = _a.search, parsedUrl = tslib_1.__rest(_a, ["search"]);
|
|
93
|
+
params.url = (0, url_1.format)(tslib_1.__assign(tslib_1.__assign({}, parsedUrl), { query: tslib_1.__assign(tslib_1.__assign({}, parsedUrl.query), (initParams.queryStringParameters || {})) }));
|
|
94
|
+
if (!((params.headers['Authorization'] &&
|
|
95
|
+
typeof params.headers['Authorization'] !== 'undefined') ||
|
|
96
|
+
(params.headers['X-Api-Key'] &&
|
|
97
|
+
typeof params.headers['X-Api-Key'] !== 'undefined'))) return [3 /*break*/, 2];
|
|
98
|
+
params.headers = Object.keys(params.headers).reduce(function (acc, k) {
|
|
99
|
+
if (params.headers[k]) {
|
|
100
|
+
acc[k] = params.headers[k];
|
|
101
|
+
}
|
|
102
|
+
return acc;
|
|
103
|
+
// tslint:disable-next-line:align
|
|
104
|
+
}, {});
|
|
105
|
+
_b = res;
|
|
106
|
+
return [4 /*yield*/, this._request(params, isAllResponse)];
|
|
107
|
+
case 1: return [2 /*return*/, _b.apply(void 0, [_e.sent()])];
|
|
129
108
|
case 2:
|
|
130
|
-
|
|
131
|
-
|
|
109
|
+
_e.trys.push([2, 4, , 6]);
|
|
110
|
+
return [4 /*yield*/, (0, core_1.fetchAuthSession)()];
|
|
132
111
|
case 3:
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
// Do not sign the request if client has added 'Authorization' header,
|
|
138
|
-
// which means custom authorizer.
|
|
139
|
-
if (typeof params.headers['Authorization'] !== 'undefined') {
|
|
140
|
-
params.headers = Object.keys(params.headers).reduce(function (acc, k) {
|
|
141
|
-
if (params.headers[k]) {
|
|
142
|
-
acc[k] = params.headers[k];
|
|
143
|
-
}
|
|
144
|
-
return acc;
|
|
145
|
-
// tslint:disable-next-line:align
|
|
146
|
-
}, {});
|
|
147
|
-
return [2 /*return*/, this._request(params, isAllResponse)];
|
|
112
|
+
session = _e.sent();
|
|
113
|
+
if (session.credentials === undefined &&
|
|
114
|
+
session.identityId === undefined) {
|
|
115
|
+
throw new Error('No credentials available');
|
|
148
116
|
}
|
|
149
|
-
|
|
117
|
+
credentials = {
|
|
118
|
+
credentials: session.credentials,
|
|
119
|
+
identityId: session.identityId,
|
|
120
|
+
};
|
|
121
|
+
return [3 /*break*/, 6];
|
|
150
122
|
case 4:
|
|
151
|
-
|
|
152
|
-
|
|
123
|
+
error_1 = _e.sent();
|
|
124
|
+
_c = res;
|
|
125
|
+
return [4 /*yield*/, this._request(params, isAllResponse)];
|
|
153
126
|
case 5:
|
|
154
|
-
|
|
155
|
-
return [3 /*break*/,
|
|
127
|
+
_c.apply(void 0, [_e.sent()]);
|
|
128
|
+
return [3 /*break*/, 6];
|
|
156
129
|
case 6:
|
|
157
|
-
|
|
158
|
-
logger.debug('No credentials available, the request will be unsigned');
|
|
159
|
-
return [2 /*return*/, this._request(params, isAllResponse)];
|
|
160
|
-
case 7:
|
|
161
|
-
_c.trys.push([7, 9, , 10]);
|
|
130
|
+
// before signed PARAMS
|
|
162
131
|
signedParams = this._sign(tslib_1.__assign({}, params), credentials, {
|
|
163
132
|
region: region,
|
|
164
133
|
service: service,
|
|
165
134
|
});
|
|
166
|
-
|
|
135
|
+
_e.label = 7;
|
|
136
|
+
case 7:
|
|
137
|
+
_e.trys.push([7, 9, , 10]);
|
|
138
|
+
_d = res;
|
|
139
|
+
return [4 /*yield*/, this._request(tslib_1.__assign(tslib_1.__assign({}, signedParams), { data: signedParams.body, cancelToken: source.token }))];
|
|
167
140
|
case 8:
|
|
168
|
-
|
|
169
|
-
return [
|
|
141
|
+
_d.apply(void 0, [_e.sent()]);
|
|
142
|
+
return [3 /*break*/, 10];
|
|
170
143
|
case 9:
|
|
171
|
-
error_2 =
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
headers = error_2.response.headers;
|
|
175
|
-
dateHeader = headers && (headers.date || headers.Date);
|
|
176
|
-
responseDate = new Date(dateHeader);
|
|
177
|
-
requestDate = core_1.DateUtils.getDateFromHeaderString(signedParams.headers['x-amz-date']);
|
|
178
|
-
// Compare local clock to the server clock
|
|
179
|
-
if (core_1.DateUtils.isClockSkewed(responseDate)) {
|
|
180
|
-
core_1.DateUtils.setClockOffset(responseDate.getTime() - requestDate.getTime());
|
|
181
|
-
return [2 /*return*/, this.ajax(urlOrApiInfo, method, init)];
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
throw error_2;
|
|
144
|
+
error_2 = _e.sent();
|
|
145
|
+
rej(error_2);
|
|
146
|
+
return [3 /*break*/, 10];
|
|
185
147
|
case 10: return [2 /*return*/];
|
|
186
148
|
}
|
|
187
149
|
});
|
|
188
|
-
});
|
|
150
|
+
}); });
|
|
151
|
+
this._cancelTokenMap.set(promise, source);
|
|
152
|
+
return promise;
|
|
189
153
|
};
|
|
190
154
|
/**
|
|
191
155
|
* GET HTTP request
|
|
@@ -247,7 +211,8 @@ var RestClient = /** @class */ (function () {
|
|
|
247
211
|
* @param {string} [message] - A message to include in the cancelation exception
|
|
248
212
|
*/
|
|
249
213
|
RestClient.prototype.cancel = function (request, message) {
|
|
250
|
-
var
|
|
214
|
+
var _a;
|
|
215
|
+
var source = (_a = this._cancelTokenMap) === null || _a === void 0 ? void 0 : _a.get(request);
|
|
251
216
|
if (source) {
|
|
252
217
|
source.cancel(message);
|
|
253
218
|
return true;
|
|
@@ -260,7 +225,8 @@ var RestClient = /** @class */ (function () {
|
|
|
260
225
|
* @return if the request has a corresponding cancel token.
|
|
261
226
|
*/
|
|
262
227
|
RestClient.prototype.hasCancelToken = function (request) {
|
|
263
|
-
|
|
228
|
+
var _a;
|
|
229
|
+
return (_a = this._cancelTokenMap) === null || _a === void 0 ? void 0 : _a.has(request);
|
|
264
230
|
};
|
|
265
231
|
/**
|
|
266
232
|
* Checks to see if an error thrown is from an api request cancellation
|
|
@@ -283,7 +249,8 @@ var RestClient = /** @class */ (function () {
|
|
|
283
249
|
* retrieved (and used for cancelling the request)
|
|
284
250
|
*/
|
|
285
251
|
RestClient.prototype.updateRequestToBeCancellable = function (promise, cancelTokenSource) {
|
|
286
|
-
|
|
252
|
+
var _a;
|
|
253
|
+
(_a = this._cancelTokenMap) === null || _a === void 0 ? void 0 : _a.set(promise, cancelTokenSource);
|
|
287
254
|
};
|
|
288
255
|
/**
|
|
289
256
|
* Getting endpoint for API
|
|
@@ -323,46 +290,29 @@ var RestClient = /** @class */ (function () {
|
|
|
323
290
|
return response;
|
|
324
291
|
};
|
|
325
292
|
/** private methods **/
|
|
326
|
-
RestClient.prototype._sign = function (params,
|
|
293
|
+
RestClient.prototype._sign = function (params, credentialsAndIdentityId, _a) {
|
|
327
294
|
var service = _a.service, region = _a.region;
|
|
328
|
-
var
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
service: endpoint_service,
|
|
339
|
-
};
|
|
340
|
-
var signerServiceInfo = Object.assign(endpointInfo, signerServiceInfoParams);
|
|
341
|
-
var signed_params = core_1.Signer.sign(otherParams, creds, signerServiceInfo);
|
|
342
|
-
if (signed_params.data) {
|
|
343
|
-
signed_params.body = signed_params.data;
|
|
344
|
-
}
|
|
345
|
-
logger.debug('Signed Request: ', signed_params);
|
|
295
|
+
var signed_params = (0, aws_client_utils_1.signRequest)({
|
|
296
|
+
method: params.method,
|
|
297
|
+
headers: params.headers,
|
|
298
|
+
url: new URL(params.url),
|
|
299
|
+
body: params.data,
|
|
300
|
+
}, {
|
|
301
|
+
credentials: credentialsAndIdentityId.credentials,
|
|
302
|
+
signingRegion: region,
|
|
303
|
+
signingService: service,
|
|
304
|
+
});
|
|
346
305
|
delete signed_params.headers['host'];
|
|
347
306
|
return signed_params;
|
|
348
307
|
};
|
|
349
308
|
RestClient.prototype._request = function (params, isAllResponse) {
|
|
350
309
|
if (isAllResponse === void 0) { isAllResponse = false; }
|
|
351
|
-
return axios_1.default(params)
|
|
310
|
+
return (0, axios_1.default)(params)
|
|
352
311
|
.then(function (response) { return (isAllResponse ? response : response.data); })
|
|
353
312
|
.catch(function (error) {
|
|
354
|
-
logger.debug(error);
|
|
355
313
|
throw error;
|
|
356
314
|
});
|
|
357
315
|
};
|
|
358
|
-
RestClient.prototype._parseUrl = function (url) {
|
|
359
|
-
var parts = url.split('/');
|
|
360
|
-
return {
|
|
361
|
-
host: parts[2],
|
|
362
|
-
path: '/' + parts.slice(3).join('/'),
|
|
363
|
-
};
|
|
364
|
-
};
|
|
365
316
|
return RestClient;
|
|
366
317
|
}());
|
|
367
318
|
exports.RestClient = RestClient;
|
|
368
|
-
//# sourceMappingURL=RestClient.js.map
|
package/lib/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
1
|
+
export { post, cancel, isCancel } from './API';
|
|
2
|
+
export { DocumentType } from './types';
|
package/lib/index.js
CHANGED
|
@@ -2,9 +2,8 @@
|
|
|
2
2
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
3
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
exports
|
|
8
|
-
|
|
9
|
-
exports
|
|
10
|
-
//# sourceMappingURL=index.js.map
|
|
5
|
+
exports.isCancel = exports.cancel = exports.post = void 0;
|
|
6
|
+
var API_1 = require("./API");
|
|
7
|
+
Object.defineProperty(exports, "post", { enumerable: true, get: function () { return API_1.post; } });
|
|
8
|
+
Object.defineProperty(exports, "cancel", { enumerable: true, get: function () { return API_1.cancel; } });
|
|
9
|
+
Object.defineProperty(exports, "isCancel", { enumerable: true, get: function () { return API_1.isCancel; } });
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"program":{"fileNames":["../node_modules/typescript/lib/lib.es5.d.ts","../node_modules/typescript/lib/lib.es2015.d.ts","../node_modules/typescript/lib/lib.es2016.d.ts","../node_modules/typescript/lib/lib.es2017.d.ts","../node_modules/typescript/lib/lib.es2018.d.ts","../node_modules/typescript/lib/lib.es2019.d.ts","../node_modules/typescript/lib/lib.dom.d.ts","../node_modules/typescript/lib/lib.dom.iterable.d.ts","../node_modules/typescript/lib/lib.es2015.core.d.ts","../node_modules/typescript/lib/lib.es2015.collection.d.ts","../node_modules/typescript/lib/lib.es2015.generator.d.ts","../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../node_modules/typescript/lib/lib.es2015.promise.d.ts","../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../node_modules/typescript/lib/lib.es2017.object.d.ts","../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2017.string.d.ts","../node_modules/typescript/lib/lib.es2017.intl.d.ts","../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../node_modules/typescript/lib/lib.es2018.intl.d.ts","../node_modules/typescript/lib/lib.es2018.promise.d.ts","../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../node_modules/typescript/lib/lib.es2019.array.d.ts","../node_modules/typescript/lib/lib.es2019.object.d.ts","../node_modules/typescript/lib/lib.es2019.string.d.ts","../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../node_modules/typescript/lib/lib.es2019.intl.d.ts","../node_modules/typescript/lib/lib.es2020.promise.d.ts","../node_modules/typescript/lib/lib.decorators.d.ts","../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../../node_modules/tslib/tslib.d.ts","../../core/lib-esm/Hub/types/AuthTypes.d.ts","../../core/lib-esm/Hub/types/HubTypes.d.ts","../../core/lib-esm/Hub/types/index.d.ts","../../core/lib-esm/Hub/index.d.ts","../../core/lib-esm/singleton/Auth/types.d.ts","../../core/lib-esm/singleton/API/types.d.ts","../../core/lib-esm/types/core.d.ts","../../core/lib-esm/types/errors.d.ts","../../core/lib-esm/types/logging.d.ts","../../core/lib-esm/types/storage.d.ts","../../core/lib-esm/types/index.d.ts","../../core/lib-esm/providers/pinpoint/types/pinpoint.d.ts","../../core/lib-esm/providers/pinpoint/types/index.d.ts","../../core/lib-esm/singleton/Analytics/types.d.ts","../../core/lib-esm/singleton/Storage/types.d.ts","../../core/lib-esm/singleton/types.d.ts","../../core/lib-esm/singleton/Auth/index.d.ts","../../core/lib-esm/singleton/Amplify.d.ts","../../core/lib-esm/singleton/apis/fetchAuthSession.d.ts","../../core/lib-esm/singleton/apis/clearCredentials.d.ts","../../core/lib-esm/singleton/index.d.ts","../../core/lib-esm/clients/endpoints/getDnsSuffix.d.ts","../../core/lib-esm/clients/endpoints/index.d.ts","../../core/lib-esm/clients/types/core.d.ts","../../core/lib-esm/clients/types/http.d.ts","../../core/lib-esm/clients/handlers/fetch.d.ts","../../core/lib-esm/clients/middleware/retry/middleware.d.ts","../../core/lib-esm/clients/middleware/retry/jitteredBackoff.d.ts","../../../node_modules/@smithy/types/dist-types/abort.d.ts","../../../node_modules/@smithy/types/dist-types/auth.d.ts","../../../node_modules/@types/events/index.d.ts","../../../node_modules/@types/node/inspector.d.ts","../../../node_modules/@types/node/base.d.ts","../../../node_modules/@types/node/index.d.ts","../../../node_modules/@smithy/types/dist-types/blob/blob-payload-input-types.d.ts","../../../node_modules/@smithy/types/dist-types/crypto.d.ts","../../../node_modules/@smithy/types/dist-types/checksum.d.ts","../../../node_modules/@smithy/types/dist-types/endpoint.d.ts","../../../node_modules/@smithy/types/dist-types/logger.d.ts","../../../node_modules/@smithy/types/dist-types/uri.d.ts","../../../node_modules/@smithy/types/dist-types/http.d.ts","../../../node_modules/@smithy/types/dist-types/response.d.ts","../../../node_modules/@smithy/types/dist-types/util.d.ts","../../../node_modules/@smithy/types/dist-types/middleware.d.ts","../../../node_modules/@smithy/types/dist-types/command.d.ts","../../../node_modules/@smithy/types/dist-types/client.d.ts","../../../node_modules/@smithy/types/dist-types/connection/config.d.ts","../../../node_modules/@smithy/types/dist-types/transfer.d.ts","../../../node_modules/@smithy/types/dist-types/connection/manager.d.ts","../../../node_modules/@smithy/types/dist-types/connection/pool.d.ts","../../../node_modules/@smithy/types/dist-types/connection/index.d.ts","../../../node_modules/@smithy/types/dist-types/eventStream.d.ts","../../../node_modules/@smithy/types/dist-types/encode.d.ts","../../../node_modules/@smithy/types/dist-types/endpoints/shared.d.ts","../../../node_modules/@smithy/types/dist-types/endpoints/EndpointRuleObject.d.ts","../../../node_modules/@smithy/types/dist-types/endpoints/ErrorRuleObject.d.ts","../../../node_modules/@smithy/types/dist-types/endpoints/TreeRuleObject.d.ts","../../../node_modules/@smithy/types/dist-types/endpoints/RuleSetObject.d.ts","../../../node_modules/@smithy/types/dist-types/endpoints/index.d.ts","../../../node_modules/@smithy/types/dist-types/identity/identity.d.ts","../../../node_modules/@smithy/types/dist-types/identity/awsCredentialIdentity.d.ts","../../../node_modules/@smithy/types/dist-types/identity/index.d.ts","../../../node_modules/@smithy/types/dist-types/pagination.d.ts","../../../node_modules/@smithy/types/dist-types/profile.d.ts","../../../node_modules/@smithy/types/dist-types/retry.d.ts","../../../node_modules/@smithy/types/dist-types/serde.d.ts","../../../node_modules/@smithy/types/dist-types/shapes.d.ts","../../../node_modules/@smithy/types/dist-types/signature.d.ts","../../../node_modules/@smithy/types/dist-types/stream.d.ts","../../../node_modules/@smithy/types/dist-types/streaming-payload/streaming-blob-common-types.d.ts","../../../node_modules/@smithy/types/dist-types/streaming-payload/streaming-blob-payload-input-types.d.ts","../../../node_modules/@smithy/types/dist-types/streaming-payload/streaming-blob-payload-output-types.d.ts","../../../node_modules/@smithy/types/dist-types/transform/type-transform.d.ts","../../../node_modules/@smithy/types/dist-types/transform/client-method-transforms.d.ts","../../../node_modules/@smithy/types/dist-types/transform/client-payload-blob-type-narrow.d.ts","../../../node_modules/@smithy/types/dist-types/waiter.d.ts","../../../node_modules/@smithy/types/dist-types/index.d.ts","../../../node_modules/@aws-sdk/types/dist-types/abort.d.ts","../../../node_modules/@aws-sdk/types/dist-types/auth.d.ts","../../../node_modules/@aws-sdk/types/dist-types/blob/blob-types.d.ts","../../../node_modules/@aws-sdk/types/dist-types/checksum.d.ts","../../../node_modules/@aws-sdk/types/dist-types/client.d.ts","../../../node_modules/@aws-sdk/types/dist-types/command.d.ts","../../../node_modules/@aws-sdk/types/dist-types/connection.d.ts","../../../node_modules/@aws-sdk/types/dist-types/identity/Identity.d.ts","../../../node_modules/@aws-sdk/types/dist-types/identity/AnonymousIdentity.d.ts","../../../node_modules/@aws-sdk/types/dist-types/identity/AwsCredentialIdentity.d.ts","../../../node_modules/@aws-sdk/types/dist-types/identity/LoginIdentity.d.ts","../../../node_modules/@aws-sdk/types/dist-types/identity/TokenIdentity.d.ts","../../../node_modules/@aws-sdk/types/dist-types/identity/index.d.ts","../../../node_modules/@aws-sdk/types/dist-types/util.d.ts","../../../node_modules/@aws-sdk/types/dist-types/credentials.d.ts","../../../node_modules/@aws-sdk/types/dist-types/crypto.d.ts","../../../node_modules/@aws-sdk/types/dist-types/dns.d.ts","../../../node_modules/@aws-sdk/types/dist-types/encode.d.ts","../../../node_modules/@aws-sdk/types/dist-types/endpoint.d.ts","../../../node_modules/@aws-sdk/types/dist-types/eventStream.d.ts","../../../node_modules/@aws-sdk/types/dist-types/http.d.ts","../../../node_modules/@aws-sdk/types/dist-types/logger.d.ts","../../../node_modules/@aws-sdk/types/dist-types/middleware.d.ts","../../../node_modules/@aws-sdk/types/dist-types/pagination.d.ts","../../../node_modules/@aws-sdk/types/dist-types/profile.d.ts","../../../node_modules/@aws-sdk/types/dist-types/request.d.ts","../../../node_modules/@aws-sdk/types/dist-types/response.d.ts","../../../node_modules/@aws-sdk/types/dist-types/retry.d.ts","../../../node_modules/@aws-sdk/types/dist-types/serde.d.ts","../../../node_modules/@aws-sdk/types/dist-types/shapes.d.ts","../../../node_modules/@aws-sdk/types/dist-types/signature.d.ts","../../../node_modules/@aws-sdk/types/dist-types/stream.d.ts","../../../node_modules/@aws-sdk/types/dist-types/token.d.ts","../../../node_modules/@aws-sdk/types/dist-types/transfer.d.ts","../../../node_modules/@aws-sdk/types/dist-types/uri.d.ts","../../../node_modules/@aws-sdk/types/dist-types/waiter.d.ts","../../../node_modules/@aws-sdk/types/dist-types/index.d.ts","../../core/lib-esm/clients/types/aws.d.ts","../../core/lib-esm/clients/types/index.d.ts","../../core/lib-esm/clients/middleware/retry/defaultRetryDecider.d.ts","../../core/lib-esm/clients/middleware/retry/index.d.ts","../../core/lib-esm/clients/middleware/userAgent/middleware.d.ts","../../core/lib-esm/clients/middleware/userAgent/index.d.ts","../../core/lib-esm/clients/handlers/unauthenticated.d.ts","../../core/lib-esm/clients/middleware/signing/middleware.d.ts","../../core/lib-esm/clients/middleware/signing/index.d.ts","../../core/lib-esm/clients/handlers/authenticated.d.ts","../../core/lib-esm/clients/middleware/signing/signer/signatureV4/types/signer.d.ts","../../core/lib-esm/clients/middleware/signing/signer/signatureV4/signRequest.d.ts","../../core/lib-esm/clients/middleware/signing/signer/signatureV4/types/index.d.ts","../../core/lib-esm/clients/middleware/signing/signer/signatureV4/presignUrl.d.ts","../../core/lib-esm/clients/middleware/signing/signer/signatureV4/constants.d.ts","../../core/lib-esm/clients/middleware/signing/signer/signatureV4/utils/getHashedPayload.d.ts","../../core/lib-esm/clients/middleware/signing/signer/signatureV4/index.d.ts","../../core/lib-esm/clients/middleware/signing/utils/extendedEncodeURIComponent.d.ts","../../core/lib-esm/clients/serde/responseInfo.d.ts","../../core/lib-esm/clients/serde/json.d.ts","../../core/lib-esm/clients/serde/index.d.ts","../../core/lib-esm/clients/utils/memoization.d.ts","../../core/lib-esm/clients/index.d.ts","../../core/lib-esm/AwsClients/CognitoIdentity/types.d.ts","../../core/lib-esm/AwsClients/CognitoIdentity/getId.d.ts","../../core/lib-esm/AwsClients/CognitoIdentity/getCredentialsForIdentity.d.ts","../../core/lib-esm/AwsClients/CognitoIdentity/index.d.ts","../../core/lib-esm/storage/KeyValueStorage.d.ts","../../core/lib-esm/storage/DefaultStorage.d.ts","../../core/lib-esm/storage/SessionStorage.d.ts","../../core/lib-esm/storage/CookieStorage.d.ts","../../core/lib-esm/storage/index.d.ts","../../core/lib-esm/Cache/types/Cache.d.ts","../../core/lib-esm/Cache/types/index.d.ts","../../core/lib-esm/Cache/StorageCache.d.ts","../../core/lib-esm/Cache/BrowserStorageCache.d.ts","../../core/lib-esm/Cache/InMemoryCache.d.ts","../../core/lib-esm/I18n/types.d.ts","../../core/lib-esm/I18n/index.d.ts","../../core/lib-esm/index.d.ts","../src/types/index.ts","../../../node_modules/axios/index.d.ts","../src/RestClient.ts","../src/API.ts","../src/index.ts"],"fileInfos":[{"version":"6a6b471e7e43e15ef6f8fe617a22ce4ecb0e34efa6c3dfcfe7cebd392bcca9d2","affectsGlobalScope":true},"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","dc48272d7c333ccf58034c0026162576b7d50ea0e69c3b9292f803fc20720fd5","27147504487dc1159369da4f4da8a26406364624fa9bc3db632f7d94a5bae2c3","5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7",{"version":"fcd3ecc9f764f06f4d5c467677f4f117f6abf49dee6716283aa204ff1162498b","affectsGlobalScope":true},{"version":"9a60b92bca4c1257db03b349d58e63e4868cfc0d1c8d0ba60c2dbc63f4e6c9f6","affectsGlobalScope":true},{"version":"f296963760430fb65b4e5d91f0ed770a91c6e77455bacf8fa23a1501654ede0e","affectsGlobalScope":true},{"version":"5114a95689b63f96b957e00216bc04baf9e1a1782aa4d8ee7e5e9acbf768e301","affectsGlobalScope":true},{"version":"4443e68b35f3332f753eacc66a04ac1d2053b8b035a0e0ac1d455392b5e243b3","affectsGlobalScope":true},{"version":"ab22100fdd0d24cfc2cc59d0a00fc8cf449830d9c4030dc54390a46bd562e929","affectsGlobalScope":true},{"version":"f7bd636ae3a4623c503359ada74510c4005df5b36de7f23e1db8a5c543fd176b","affectsGlobalScope":true},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true},{"version":"0c20f4d2358eb679e4ae8a4432bdd96c857a2960fd6800b21ec4008ec59d60ea","affectsGlobalScope":true},{"version":"36ae84ccc0633f7c0787bc6108386c8b773e95d3b052d9464a99cd9b8795fbec","affectsGlobalScope":true},{"version":"82d0d8e269b9eeac02c3bd1c9e884e85d483fcb2cd168bccd6bc54df663da031","affectsGlobalScope":true},{"version":"b8deab98702588840be73d67f02412a2d45a417a3c097b2e96f7f3a42ac483d1","affectsGlobalScope":true},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true},{"version":"376d554d042fb409cb55b5cbaf0b2b4b7e669619493c5d18d5fa8bd67273f82a","affectsGlobalScope":true},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true},{"version":"61c37c1de663cf4171e1192466e52c7a382afa58da01b1dc75058f032ddf0839","affectsGlobalScope":true},{"version":"c4138a3dd7cd6cf1f363ca0f905554e8d81b45844feea17786cdf1626cb8ea06","affectsGlobalScope":true},{"version":"6ff3e2452b055d8f0ec026511c6582b55d935675af67cdb67dd1dc671e8065df","affectsGlobalScope":true},{"version":"03de17b810f426a2f47396b0b99b53a82c1b60e9cba7a7edda47f9bb077882f4","affectsGlobalScope":true},{"version":"8184c6ddf48f0c98429326b428478ecc6143c27f79b79e85740f17e6feb090f1","affectsGlobalScope":true},{"version":"261c4d2cf86ac5a89ad3fb3fafed74cbb6f2f7c1d139b0540933df567d64a6ca","affectsGlobalScope":true},{"version":"6af1425e9973f4924fca986636ac19a0cf9909a7e0d9d3009c349e6244e957b6","affectsGlobalScope":true},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true},{"version":"15a630d6817718a2ddd7088c4f83e4673fde19fa992d2eae2cf51132a302a5d3","affectsGlobalScope":true},{"version":"ac17a97f816d53d9dd79b0d235e1c0ed54a8cc6a0677e9a3d61efb480b2a3e4e","affectsGlobalScope":true},{"version":"189c0703923150aa30673fa3de411346d727cc44a11c75d05d7cf9ef095daa22","affectsGlobalScope":true},{"version":"95f22ce5f9dbcfc757ff850e7326a1ba1bc69806f1e70f48caefa824819d6f4f","affectsGlobalScope":true},"7a1971efcba559ea9002ada4c4e3c925004fb67a755300d53b5edf9399354900","6f6df1f586b5edf4d529d07b3535edea07e5cacfd895c81dda133f8359d22e6b","9a23afdd036a23560984aeeec5dbdfc3ddd3e50bd8ca87929fca3d0a13292148","2b57988ad287ad13fd9abceb983fe2e8d16906d0abb910696de8da426e8002a2","2077e93daeb39cd72b5f35797d8f71ecae21760d54f5d3753847f8e8ec0e6441","84c5807dc645f3585203fe1e62682fc7ffa7ba5a4fef10922d967d1e0555f780","ce372e42ef5430cccae0248ecb29a03f973ec6dc39894270fd94947ab7358b5d","d168c2128bb332790986a36ea42c110b235043910d27723c74d9b55920860fe0","cdf6c6e9bcd76ee15dffe37b0457d563e1f6809204b839563556cc5d1003bbc1","93435d0cb12c02ea8de08c8d58e1bba2badb01f9c94bcfab450308a3dba84a97","62fb62d6e03c94e6269a4f1a64077f97ac65265af075f3554708616f86968b9c","e4e57c7707a3fcd8f9e05b019f657731c14ee6eac1e1c4b8658e64874b4389ca","ca78a077f1eca40fefd5486dda297b19a1de1c01b8b36f243da8ba98e3976840","4719d02184cf8209c2bb62e01d319f4452260159efdcdb04ceccb80468db87b8","918cf1ba151c31cb372e2366b88a84bbad57953a8e8becbdf5629257a280b665","9b1f66012e58888f1bd2f5b8b749784d7d592ad7d5ac48972511e2e942161e96","7329a213f0ce82933ad95f8fb487aec4d93c6323213b1cdb3d1d9fbe3bdc2da8","702d32653e4f248e6abac940c03a9f1ab1cf87bbde61493e1a491648cc7f73bf","2ff57bdf0a0ce1bdffb532e5ef5d55411a1cd11254cd66dfd753041eb68d353b","df1a1f23d18a3dac758a03f4f8f6a3d14e83fb78a45431d15e6833fb53ed8055","21fa3aaad5d8cbfa85395e4eae75972ab8333020b001b4585f4b8ec81994e2f5","87e852324ee3c69c24b13c17a0b9f320d8e3d8eb1d49669ad1d7774b45058265","68947051891fb1dde45efbcc0f562b501658b16f5140d2899c6ffd5746c6a2cc","75b8b33bb1945e875e0d09fea6a6de04f0bd6bb1239d3841683a42118c00e7ed","622028afad3e12a65acced3c75ae7726bf56d49c199ec3607be2564fca27aac3","7784419956b37af55a9b17e20ef076c61a1e245b577e7b4ec0ff3ea347f3064c","9e6390c460ca50e0b768107f2be5a14f3da4adb6e775ada0f239d2b3be5732c5","0a219ea8ec306caaf53a291af13ce0241f36c98dbfe4657728107efeae95ce51","7de5baa4b52a643d2740398148968188c6a254a17aaa46c706c94452fc8c4f86","c55ae709f94155174ff63647edd2a7e3acbd02a2909aa2541569e8b8bac9fc40","dccbb9e0b7e4c3585234775219e1c2d9dc43e717a84c56941bfc7523d4bceca0","400db42c3a46984118bff14260d60cec580057dc1ab4c2d7310beb643e4f5935","7e49dbf1543b3ee54853ade4c5e9fa460b6a4eca967efe6bf943e0c505d087ed",{"version":"4450cc7b485b116b876cfe3e57d82b76464d6aee1ecefe0bf5ffc03ad9f13cf7","affectsGlobalScope":true},"9f0963be7caec23db8944f66bacb623a7bc7391520125845087241a270e9b3ce","81d8b494be2d4665e017c19095362ca9d8422646c4124d4e40edc48a049e6031","017de6fdabea79015d493bf71e56cbbff092525253c1d76003b3d58280cd82a0","ab9ea2596cb7800bd79d1526930c785606ec4f439c275adbca5adc1ddf87747d","5d514a639cfd3ffd8af8094fc05ea4e8d276946d0069ebff273d6a07ec4f8abd","4d2b263907b8c03c5b2df90e6c1f166e9da85bd87bf439683f150afc91fce7e7","c70e38e0f30b7c0542af9aa7e0324a23dd2b0c1a64e078296653d1d3b36fa248","d12680e217215b37094868d491d00196e80f270ce47e5a4bc50269945ae5554d","396c2c14fa408707235d761a965bd84ce3d4fc3117c3b9f1404d6987d98a30d6","5866f85b79bae844211df93770e10e68298d934f2aed751e7a5cdf9ab59f76dc","6300ebd0fcb387c55e37c1b8ab2ab8d47605bb4d9ea8651c63ee76bb832ee024","aee8faa433dde04beedb779b3329456a286a966462d666c138c19113ce78c79e","b7e9c39f7edd1ecd2c3d73b753213a0834144d82ac2a67230c1d291d25430a2e","4e693235d606287d6b5a4e7d572f190862b93ea4a28df8a63fc328aa8becdc9d","e58d1ea2fc84c9c03742b4f56449b7d4602c8c4deb4f0e57c619bab35bbbbf81","d82bc1f8fe8eef55aa741373da68b80a8503228c9aa0ec46bdd38fd7e0c02a18","d7c7f8a461326507d90d0888efff0c4011a5e69eb08ccb990232aa22334e4dd6","5af5ebe8c9b84f667cd047cfcf1942d53e3b369dbd63fbea2a189bbf381146c6","27deb39ac0921db739b503407dc9aa93a546b015c06738bc8b66bdf0ae593c7c","eff5b8bdfe94c0a174484a6de01e802fb66f99f8737a20e4fba4df05c2f24cea","52fa3a4f47e30ef266dbda3b69821fe5811be4faad2b266586090d8b4806342e","5cb6f9ea4a097094fe624c3513111292690e39e83167a412f8912807be71ca65","fa461c83b2adc6b33997a95335d19723bddd4d7aaff41cac6f9f817e3c3ae730","d9eed4a308aeb32babee0600d21c3a3ba8452c89e8a4916e5460b45da147c33c","96812f4fe12e18d14ca12f9af2be3a0ecc4f07859a298dd822aba0bd7cca423d","e647d13de80e1b6b4e1d94363ea6f5f8f77dfb95d562748b488a7248af25aabf","07863eea4f350458f803714350e43947f7f73d1d67a9ddf747017065d36b073a","9252778562c2587c88775bf9e8a474a2ac51d562fff90b0ab240b51d0248f16d","a57e2e11a5c279edfa86c59c822e2cbaad9776b9ad90b3936815fec0dcb5d18e","230ead17dc76009af0147a17e3ca1885e3bfa861dfb307b2e353b0ad20bf48f3","d1abdb6b55d9657539f59a08e115f81e3606404cae89bceb8c8db732dfc92a0a","16a6f76f6507cc76012cfd3954136a41a58db595231c2f9bfaf35eca6b25346c","c5f2cdab01270375da7f5c3ae12157d529938533f0145fa0df91735a96cc1a65","53522a2c33f9196ef05e72118a009c6ae717265e5b0eac3ee6bdc8305e8dde2e","9da2c58a27fdce871c2eac09d5172b04248bb86ada9b0d10e8b3dfa8470b8dd3","5c317403752871838140f70879b09509e37422e92e7364b4363c7b179310ee44","78bc52637a67f2815407bdf87c857b4af9e43214ef711a091bc9a4a749b73487","5df51db7d128af1aab9e78500f2278a841a61120598a8e3f53ced8a8b06b0174","0b1e4cee9abaf79ef53d736bb4b50a2b0c19733cbaf8bbc6e480d81fb1b91b3f","057cac07c7bc5abdcfba44325fcea4906dff7919a3d7d82d4ec40f8b4c90cf2f","38aa389acf91d77db5a4f8e26e713ed53dc832ed5573def9cd20acd9ba97c1fe","65f20bda7afd3738c59db566dc94ff98a9e22b87d39bc259351d9e4201ab2595","b9115605f72b65a662723020b2a1eb696c375a5803d6b401dc01fcbfe49ece90","bc72d80dbeca9f95dbb8f851438233824778a90f458f75666706d26634822cd9","a54f60678f44415d01a810ca27244e04b4dde3d9b6d9492874262f1a95e56c7d","84058607d19ac1fdef225a04832d7480478808c094cbaedbceda150fa87c7e25","415d60633cf542e700dc0d6d5d320b31052efbdc519fcd8b6b30a1f992ef6d5c","901c640dced9243875645e850705362cb0a9a7f2eea1a82bb95ed53d162f38dd","ebb0d92294fe20f62a07925ce590a93012d6323a6c77ddce92b7743fa1e9dd20","b499f398b4405b9f073b99ad853e47a6394ae6e1b7397c5d2f19c23a4081f213","ef2cbb05dee40c0167de4e459b9da523844707ab4b3b32e40090c649ad5616e9","068a22b89ecc0bed7182e79724a3d4d3d05daacfe3b6e6d3fd2fa3d063d94f44","3f2009badf85a479d3659a735e40607d9f00f23606a0626ae28db3da90b8bf52","fd80c03dca7c1c9b56d6845c3b94c67bf082b72e7e0108a2dfd2c0dec03fb53f","d32b5a3d39b581f0330bd05a5ef577173bd1d51166a7fff43b633f0cc8020071","d97766e9af30de9f96c7a5e8d7d6b3e39a269b8bd011083bd3745be7bd532b13","363dd28f6a218239fbd45bbcc37202ad6a9a40b533b3e208e030137fa8037b03","c6986e90cf95cf639f7f55d8ca49c7aaf0d561d47e6d70ab6879e40f73518c8d","fa2a8e2cc0bde051290d89f15a7b8f4db16d71cf67892be2bf4fca8cc2c3b338","1518707348d7bd6154e30d49487ba92d47b6bd9a32d320cd8e602b59700b5317","ede55f9bac348427d5b32a45ad7a24cc6297354289076d50c68f1692add61bce","d53a7e00791305f0bd04ea6e4d7ea9850ccc3538877f070f55308b3222f0a793","4ea5b45c6693288bb66b2007041a950a9d2fe765e376738377ba445950e927f6","7f25e826bfabe77a159a5fec52af069c13378d0a09d2712c6373ff904ba55d4b","c30b346ad7f4df2f7659f5b3aff4c5c490a1f4654e31c44c839292c930199649","48f1a1b9f15770d9a64b51c596f9569f262fc7e67d7767595068a69539d32939","a83a104129a183f71c203f3a680486abe808895917c4c8380b312161e17b84db","64269ed536e2647e12239481e8287509f9ee029cbb11169793796519cc37ecd4","c06fd8688dd064796b41170733bba3dcacfaf7e711045859364f4f778263fc7b","b0a8bf71fea54a788588c181c0bffbdd2c49904075a7c9cb8c98a3106ad6aa6d","434c5a40f2d5defeede46ae03fb07ed8b8c1d65e10412abd700291b24953c578","c5a6184688526f9cf53e3c9f216beb2123165bfa1ffcbfc7b1c3a925d031abf7",{"version":"cd548f9fcd3cebe99b5ba91ae0ec61c3eae50bed9bc3cfd29d42dcfc201b68b5","affectsGlobalScope":true},"14a8ec10f9faf6e0baff58391578250a51e19d2e14abcc6fc239edb0fb4df7c5","81b0cf8cd66ae6736fd5496c5bbb9e19759713e29c9ed414b00350bd13d89d70","4992afbc8b2cb81e0053d989514a87d1e6c68cc7dedfe71f4b6e1ba35e29b77a","f15480150f26caaccf7680a61c410a07bd4c765eedc6cbdca71f7bca1c241c32","1c390420d6e444195fd814cb9dc2d9ca65e86eb2df9c1e14ff328098e1dc48ae","ec8b45e83323be47c740f3b573760a6f444964d19bbe20d34e3bca4b0304b3ad","ab8b86168ceb965a16e6fc39989b601c0857e1fd3fd63ff8289230163b114171","25a6f013a17350c81854e5a62c01aa24841e2219d5d95da5946890d3d8cbdcdf","0da837840ba21f91b1f9c3c8450cc4f81510b38005ac42c2cd0da4a37e414740","552f15c117a4c13bdd11903a0de928e29dcda845a6aaf9fc5388a26304b96233","1d44cf66f6aaadd2f192a95b1af1270142a6d966b5b4641136060d79b40cdfa6","db515f15908f421edac14e77743e2583d1adc5ff005d051d9013b24e575f0aa3","ddf752b71b7c4c1b09c20cabdd2712305c7c7e815d02a720a7c45f465f9f5578","5ded46b22f516dc8f0f8eeb8bd89130f1a0ad9eef8dfdb8f1cd6849be7ebef90","74bb817a79884249a393466dda60df28f2d2c7a583facba4012ef1d27fb9d4d4","e5392016ff99b5f6a53fb57816e13fea7482f71f7bf9d7ca493a15013db46e2f","8f15d54abeeef93a0d41ce96f659078b9f3ba3eb7cf193fc00682f2ff780931c","c36b9847b1c3f8b837c3a2501b1d2f2605d5dcc3730d59bb22eaecd3b894b0cf","404bb2400a069a39f90d792aeb656b86b33365053fa90d45992b1eb12740f316","38492c28c947539347d0c4677eeddc9ec13e9eb4fb2eb7d29cbf6b8cf38aaacb","4a09f82cf471f95f2d392dd33a598ada3a0987e9f8efff160883d004ea4f08bc","aada70df37b186d7f870362533ff395098fdae80a5ab19ed9c41dfe1285aa364","a19e34d8a2f1470c3e353e8d366e7d9e835d19dd78a3122114c5fe52e5a79a60","7949d810d38b5358244cd86e80f0d840cad62caac4a4b3a6a75c6dab78ae29a8","e6dfc1705e93a5d648527d304e4cf0463902d442a64566e3262e7ffba4e38af4","ea22dd065a3ee61e8f5fc53b4f2275e809a09a3f58b98bb66f8fc07050100892","ff1eab0e4b697c10256786b2d62f47a88ae33c3cea17864f13e6f7bf4137c810","bc8e1ef35172e1b9c46cb39e262c0c4c5839732e75c3bf8b4c3a10fe8a6dec97","190ce538265abf5fb250db8d335bce7665eab997ce16a218a189c2978a7a8b8a","2e62ed413051bfbf3978d1f3cde446dbc6fbee5e7a425820d4692dd6cc74563d","8b4034aca6f85bd65594e19eaa642b37fa9f4741f9026ca3ab739c84eb61a1be","4e44566ddea6053606d02c098cfa08ab23167a3baf7fce6a752a94b970096245","a905e2a4d34f5b9689f081aeae3ac6f66f6b9b74d26e3fea0d680abddb9440b5","c129eb7ae39d46b088611e72e42f2eca6aa881bd22a930030364840cf6b7dd34","3d818456cf9b63583e99c67aebccca8b5ec05675316048507fa5eefb2abd3123","35587060a6244e9b10629024cd12ab34ab7e874379a9761e61aca06847981fec","56cd67ee37e8b99f38be9096472df3defcef640fca4ae8cb68c495d105b68aeb","54adf87084900e062a22a02e0e2b3bb9c862ce3b0af04af452cc2cac1539f58c","15a3d1c6f23a3c7015c3d718bd8ddaffe9de21e5f4baf57998a188ce36698eb3","09f8c424b8d8394a44bf731306d0022eef5f9b18845cb796da2cc4d4d49b5795","022c2921df6a3b481e721e5bc4dc4df70656b3e6445bf573e1ad77ee79274fc0","42e2414802c2b01007ec019171a588249931675e29d61e6eb8cfbcb18a9a1e85","456328f2ba6290e9d85d213de29b9ff1495734bca75cc6b214b05751051addff","45fe7896fd6e269bd3a8c1c6713e07701c127076cdb74f183516b9ba5ea3318f","a21e6b4bebe10b7e0ad199954dff9c5b9813e6552585fd5a944a691d5d0250ed","c7525ce0da03c467948253477743c85a19d4d80af168491ac93f171892b05361","5750131d1fc5684bf3d6dd7e22f64526d3ca52d362676e26e85bf0a573b11c56","4bd05ede5659522906a8d555b6d7e9bdbf53c33865531172ee383aef1ff76bd8",{"version":"9f932605a83387790aaf30c0c74e5846639612cfd211dfc9545acb99cdaed964","signature":"126621b897ef010808a128961f4ccbdc43882c44d9e2dc4e3d9e755d87cbc6ba"},"df23705fd32cee6822fc57b5eb5ca88dba0552aae08c4eeff02acde07ea2bf28",{"version":"d0f77e18340109063e479ee9280f8fb0c9a17673daacc9b43c44187f055a039d","signature":"0c12c22d1c5852357045b3599a214d1ad4eea858dddf4bc5c69717e84d9653bc"},{"version":"d1bb90bd16330a0bc5b18b768271e0b1050bee874c5930abf47bb78133a6a952","signature":"96f377f3cdc1c132b0ec0cc1f035b4e10296b6a1c97ff6cc3b7e4223ca1a8f6f"},{"version":"a009ef44725fe885ab11ff9eea81b2e545298828bf5deec99b19e4fa96ebe760","signature":"6c055193e48ed61296c08f0807a83696db18cc2b500a204bd15a9333137ebfea"}],"root":[192,[194,196]],"options":{"declaration":true,"downlevelIteration":true,"esModuleInterop":true,"importHelpers":true,"module":1,"noEmitOnError":true,"noImplicitAny":false,"outDir":"./","skipLibCheck":true,"strict":false,"target":1},"fileIdsList":[[70,71,114],[70,71,127,128],[70,71],[70,71,122],[70,71,122,123,124,125,126],[70,71,115,116,117,118,119,120,121,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150],[70,71,73],[70,71,79,80,81,82],[70,71,79,81],[70,71,84,86,87],[70,71,84,85],[70,71,89],[67,70,71],[70,71,75,91],[70,71,91],[70,71,94],[70,71,91,92,93],[70,71,91,92,93,94,95],[70,71,76],[70,71,78,79,81],[66,70,71,77],[70,71,97],[70,71,97,98],[66,67,70,71,72,73,74,75,76,77,78,79,80,81,82,83,85,88,89,90,96,99,100,101,102,103,104,105,106,107,108,109,110,112,113],[67,70,71,75,76,80],[70,71,83],[70,71,78,80,85],[70,71,78,79],[70,71,78,89],[70,71,73,74,80],[70,71,103],[70,71,79,82,109,110],[70,71,78,83,103,111],[70,71,78],[66,70,71],[69,70,71],[70],[37,70,71,192,194],[37,70,71,174,191,192,193],[37,70,71,192,195],[37,70,71],[70,71,174,175],[70,71,176,177],[70,71,151],[70,71,185,186],[70,71,185],[70,71,184],[40,70,71],[38,70,71],[38,39,70,71],[70,71,189],[59,70,71],[70,71,153,155,157,160],[61,62,70,71],[70,71,153,155,157],[60,63,70,71,153,155,157,158,160,161,166,168,169,172,173],[70,71,153],[64,65,70,71,154],[64,70,71],[61,70,71],[70,71,159],[70,71,163,164,165,166,167],[70,71,164],[70,71,153,162],[70,71,162],[70,71,156],[70,71,170,171],[62,70,71,151],[61,62,70,71,151],[61,62,70,71,152],[40,41,42,48,53,58,70,71,178,183,187,188,190],[49,70,71],[42,48,70,71],[53,54,70,71],[50,70,71],[42,70,71],[55,56,57,70,71],[42,43,51,52,70,71],[48,70,71],[70,71,179],[70,71,179,180,181,182],[44,45,46,47,70,71],[192],[192,193],[192,195]],"referencedMap":[[115,1],[116,1],[117,1],[118,1],[119,1],[120,1],[121,1],[129,2],[130,1],[131,3],[132,1],[133,1],[134,1],[135,1],[123,4],[124,1],[122,1],[125,4],[126,4],[127,5],[151,6],[136,1],[137,1],[138,1],[139,1],[140,3],[141,1],[142,1],[143,1],[144,1],[145,1],[146,1],[147,2],[148,1],[149,1],[128,1],[150,1],[66,3],[67,3],[72,3],[74,7],[83,8],[82,9],[84,3],[88,10],[86,11],[87,3],[73,3],[90,12],[75,13],[92,14],[93,15],[95,16],[94,17],[96,18],[91,19],[89,20],[78,21],[98,22],[97,3],[99,23],[114,24],[76,3],[81,25],[100,26],[101,3],[79,3],[102,3],[103,27],[104,28],[105,29],[106,30],[107,3],[108,3],[109,31],[85,3],[111,32],[112,33],[110,3],[77,34],[80,20],[113,35],[68,3],[70,36],[71,37],[69,3],[193,3],[37,3],[35,3],[36,3],[7,3],[8,3],[10,3],[9,3],[2,3],[11,3],[12,3],[13,3],[14,3],[15,3],[16,3],[17,3],[18,3],[3,3],[4,3],[22,3],[19,3],[20,3],[21,3],[23,3],[24,3],[25,3],[5,3],[26,3],[27,3],[28,3],[29,3],[6,3],[33,3],[30,3],[31,3],[32,3],[34,3],[1,3],[195,38],[194,39],[196,40],[192,41],[177,42],[176,42],[178,43],[175,44],[187,45],[188,45],[186,46],[184,3],[185,47],[41,48],[38,3],[39,49],[40,50],[190,51],[189,3],[59,3],[60,52],[161,53],[63,54],[158,55],[174,56],[154,57],[155,58],[65,59],[64,60],[160,61],[159,57],[166,3],[168,62],[165,63],[163,64],[164,65],[162,57],[167,57],[169,3],[157,66],[156,54],[172,67],[171,57],[170,68],[152,69],[61,3],[62,60],[153,70],[173,3],[191,71],[50,72],[49,73],[43,3],[55,74],[51,75],[54,76],[42,3],[52,3],[57,3],[56,76],[58,77],[53,78],[182,79],[180,80],[179,79],[181,80],[183,81],[44,3],[45,3],[48,82],[46,3],[47,3]],"exportedModulesMap":[[115,1],[116,1],[117,1],[118,1],[119,1],[120,1],[121,1],[129,2],[130,1],[131,3],[132,1],[133,1],[134,1],[135,1],[123,4],[124,1],[122,1],[125,4],[126,4],[127,5],[151,6],[136,1],[137,1],[138,1],[139,1],[140,3],[141,1],[142,1],[143,1],[144,1],[145,1],[146,1],[147,2],[148,1],[149,1],[128,1],[150,1],[66,3],[67,3],[72,3],[74,7],[83,8],[82,9],[84,3],[88,10],[86,11],[87,3],[73,3],[90,12],[75,13],[92,14],[93,15],[95,16],[94,17],[96,18],[91,19],[89,20],[78,21],[98,22],[97,3],[99,23],[114,24],[76,3],[81,25],[100,26],[101,3],[79,3],[102,3],[103,27],[104,28],[105,29],[106,30],[107,3],[108,3],[109,31],[85,3],[111,32],[112,33],[110,3],[77,34],[80,20],[113,35],[68,3],[70,36],[71,37],[69,3],[193,3],[37,3],[35,3],[36,3],[7,3],[8,3],[10,3],[9,3],[2,3],[11,3],[12,3],[13,3],[14,3],[15,3],[16,3],[17,3],[18,3],[3,3],[4,3],[22,3],[19,3],[20,3],[21,3],[23,3],[24,3],[25,3],[5,3],[26,3],[27,3],[28,3],[29,3],[6,3],[33,3],[30,3],[31,3],[32,3],[34,3],[1,3],[195,83],[194,84],[196,85],[177,42],[176,42],[178,43],[175,44],[187,45],[188,45],[186,46],[184,3],[185,47],[41,48],[38,3],[39,49],[40,50],[190,51],[189,3],[59,3],[60,52],[161,53],[63,54],[158,55],[174,56],[154,57],[155,58],[65,59],[64,60],[160,61],[159,57],[166,3],[168,62],[165,63],[163,64],[164,65],[162,57],[167,57],[169,3],[157,66],[156,54],[172,67],[171,57],[170,68],[152,69],[61,3],[62,60],[153,70],[173,3],[191,71],[50,72],[49,73],[43,3],[55,74],[51,75],[54,76],[42,3],[52,3],[57,3],[56,76],[58,77],[53,78],[182,79],[180,80],[179,79],[181,80],[183,81],[44,3],[45,3],[48,82],[46,3],[47,3]],"semanticDiagnosticsPerFile":[115,116,117,118,119,120,121,129,130,131,132,133,134,135,123,124,122,125,126,127,151,136,137,138,139,140,141,142,143,144,145,146,147,148,149,128,150,66,67,72,74,83,82,84,88,86,87,73,90,75,92,93,95,94,96,91,89,78,98,97,99,114,76,81,100,101,79,102,103,104,105,106,107,108,109,85,111,112,110,77,80,113,68,70,71,69,193,37,35,36,7,8,10,9,2,11,12,13,14,15,16,17,18,3,4,22,19,20,21,23,24,25,5,26,27,28,29,6,33,30,31,32,34,1,195,194,196,192,177,176,178,175,187,188,186,184,185,41,38,39,40,190,189,59,60,161,63,158,174,154,155,65,64,160,159,166,168,165,163,164,162,167,169,157,156,172,171,170,152,61,62,153,173,191,50,49,43,55,51,54,42,52,57,56,58,53,182,180,179,181,183,44,45,48,46,47]},"version":"5.0.2"}
|
package/lib/types/index.d.ts
CHANGED
|
@@ -14,6 +14,15 @@ export declare class RestClientOptions {
|
|
|
14
14
|
headers: object;
|
|
15
15
|
constructor();
|
|
16
16
|
}
|
|
17
|
+
export type DocumentType = null | boolean | number | string | DocumentType[] | {
|
|
18
|
+
[prop: string]: DocumentType;
|
|
19
|
+
};
|
|
20
|
+
export type PostOptions = {
|
|
21
|
+
headers?: Record<string, string>;
|
|
22
|
+
body: DocumentType;
|
|
23
|
+
region?: string;
|
|
24
|
+
serviceName?: string;
|
|
25
|
+
};
|
|
17
26
|
/**
|
|
18
27
|
* AWS credentials needed for RestClient
|
|
19
28
|
*/
|
|
@@ -40,7 +49,7 @@ export interface apiOptions {
|
|
|
40
49
|
endpoints: object;
|
|
41
50
|
credentials?: object;
|
|
42
51
|
}
|
|
43
|
-
export
|
|
52
|
+
export type ApiInfo = {
|
|
44
53
|
endpoint: string;
|
|
45
54
|
region?: string;
|
|
46
55
|
service?: string;
|
package/lib/types/index.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
3
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.AWSCredentials = exports.RestClientOptions = void 0;
|
|
5
6
|
/**
|
|
6
7
|
* RestClient instance options
|
|
7
8
|
*/
|
|
@@ -22,4 +23,3 @@ var AWSCredentials = /** @class */ (function () {
|
|
|
22
23
|
return AWSCredentials;
|
|
23
24
|
}());
|
|
24
25
|
exports.AWSCredentials = AWSCredentials;
|
|
25
|
-
//# sourceMappingURL=index.js.map
|
package/lib-esm/API.d.ts
ADDED
package/lib-esm/API.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
import { RestClient } from './RestClient';
|
|
4
|
+
var restClient = new RestClient({ headers: {}, endpoints: [] });
|
|
5
|
+
export function post(url, options) {
|
|
6
|
+
return restClient.post(url, options);
|
|
7
|
+
}
|
|
8
|
+
export function cancel(request, message) {
|
|
9
|
+
return restClient.cancel(request, message);
|
|
10
|
+
}
|
|
11
|
+
export function isCancel(error) {
|
|
12
|
+
return restClient.isCancel(error);
|
|
13
|
+
}
|