@aws-amplify/api-rest 2.0.62-unstable.2 → 2.0.62
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/CHANGELOG.md +16 -0
- package/build.js +5 -0
- package/dist/aws-amplify-api-rest.js +5064 -0
- package/dist/aws-amplify-api-rest.js.map +1 -0
- package/dist/aws-amplify-api-rest.min.js +2 -0
- package/dist/aws-amplify-api-rest.min.js.map +1 -0
- package/index-rn.js +3 -0
- package/index.js +7 -0
- package/lib/RestAPI.js +74 -7
- package/lib/RestAPI.js.map +1 -1
- package/lib/RestClient.js +81 -11
- package/lib/RestClient.js.map +1 -1
- package/lib/index.js +16 -4
- package/lib/index.js.map +1 -1
- package/lib/types/index.js +12 -2
- package/lib/types/index.js.map +1 -1
- package/lib-esm/RestAPI.js +70 -3
- package/lib-esm/RestAPI.js.map +1 -1
- package/lib-esm/RestClient.js +70 -3
- package/lib-esm/RestClient.js.map +1 -1
- package/lib-esm/index.d.ts +2 -0
- package/lib-esm/index.js +14 -2
- package/lib-esm/index.js.map +1 -1
- package/lib-esm/types/index.js +12 -2
- package/lib-esm/types/index.js.map +1 -1
- package/package.json +9 -13
- package/src/RestAPI.ts +12 -2
- package/src/RestClient.ts +12 -2
- package/src/index.ts +15 -2
- package/src/types/index.ts +12 -2
- package/webpack.config.dev.js +6 -0
- package/lib/RestAPI.d.ts +0 -108
- package/lib/RestClient.d.ts +0 -138
- package/lib/index.d.ts +0 -2
- package/lib/types/index.d.ts +0 -50
package/lib/RestClient.js
CHANGED
|
@@ -1,10 +1,80 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
/*
|
|
3
|
+
* Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
|
|
6
|
+
* the License. A copy of the License is located at
|
|
7
|
+
*
|
|
8
|
+
* http://aws.amazon.com/apache2.0/
|
|
9
|
+
*
|
|
10
|
+
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
|
11
|
+
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
|
|
12
|
+
* and limitations under the License.
|
|
13
|
+
*/
|
|
14
|
+
var __assign = (this && this.__assign) || function () {
|
|
15
|
+
__assign = Object.assign || function(t) {
|
|
16
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
17
|
+
s = arguments[i];
|
|
18
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
19
|
+
t[p] = s[p];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
23
|
+
return __assign.apply(this, arguments);
|
|
24
|
+
};
|
|
25
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
26
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
27
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
28
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
29
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
30
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
31
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
35
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
36
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
37
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
38
|
+
function step(op) {
|
|
39
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
40
|
+
while (_) try {
|
|
41
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
42
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
43
|
+
switch (op[0]) {
|
|
44
|
+
case 0: case 1: t = op; break;
|
|
45
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
46
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
47
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
48
|
+
default:
|
|
49
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
50
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
51
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
52
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
53
|
+
if (t[2]) _.ops.pop();
|
|
54
|
+
_.trys.pop(); continue;
|
|
55
|
+
}
|
|
56
|
+
op = body.call(thisArg, _);
|
|
57
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
58
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
62
|
+
var t = {};
|
|
63
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
64
|
+
t[p] = s[p];
|
|
65
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
66
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
67
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
68
|
+
t[p[i]] = s[p[i]];
|
|
69
|
+
}
|
|
70
|
+
return t;
|
|
71
|
+
};
|
|
72
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
73
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
74
|
+
};
|
|
4
75
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
var tslib_1 = require("tslib");
|
|
6
76
|
var core_1 = require("@aws-amplify/core");
|
|
7
|
-
var axios_1 =
|
|
77
|
+
var axios_1 = __importDefault(require("axios"));
|
|
8
78
|
var url_1 = require("url");
|
|
9
79
|
var logger = new core_1.ConsoleLogger('RestClient');
|
|
10
80
|
/**
|
|
@@ -66,10 +136,10 @@ var RestClient = /** @class */ (function () {
|
|
|
66
136
|
* @return {Promise} - A promise that resolves to an object with response status and JSON data, if successful.
|
|
67
137
|
*/
|
|
68
138
|
RestClient.prototype.ajax = function (urlOrApiInfo, method, init) {
|
|
69
|
-
return
|
|
139
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
70
140
|
var parsed_url, url, region, service, custom_header, params, libraryHeaders, userAgent, initParams, isAllResponse, custom_header_obj, _a, _b, search, parsedUrl;
|
|
71
141
|
var _this = this;
|
|
72
|
-
return
|
|
142
|
+
return __generator(this, function (_c) {
|
|
73
143
|
switch (_c.label) {
|
|
74
144
|
case 0:
|
|
75
145
|
logger.debug(method, urlOrApiInfo);
|
|
@@ -138,9 +208,9 @@ var RestClient = /** @class */ (function () {
|
|
|
138
208
|
_c.label = 3;
|
|
139
209
|
case 3:
|
|
140
210
|
custom_header_obj = _a;
|
|
141
|
-
params.headers =
|
|
142
|
-
_b = url_1.parse(url, true, true), search = _b.search, parsedUrl =
|
|
143
|
-
params.url = url_1.format(
|
|
211
|
+
params.headers = __assign(__assign(__assign({}, libraryHeaders), custom_header_obj), initParams.headers);
|
|
212
|
+
_b = url_1.parse(url, true, true), search = _b.search, parsedUrl = __rest(_b, ["search"]);
|
|
213
|
+
params.url = url_1.format(__assign(__assign({}, parsedUrl), { query: __assign(__assign({}, parsedUrl.query), (initParams.queryStringParameters || {})) }));
|
|
144
214
|
// Do not sign the request if client has added 'Authorization' header,
|
|
145
215
|
// which means custom authorizer.
|
|
146
216
|
if (typeof params.headers['Authorization'] !== 'undefined') {
|
|
@@ -155,7 +225,7 @@ var RestClient = /** @class */ (function () {
|
|
|
155
225
|
}
|
|
156
226
|
// Signing the request in case there credentials are available
|
|
157
227
|
return [2 /*return*/, this.Credentials.get().then(function (credentials) {
|
|
158
|
-
return _this._signed(
|
|
228
|
+
return _this._signed(__assign({}, params), credentials, isAllResponse, {
|
|
159
229
|
region: region,
|
|
160
230
|
service: service,
|
|
161
231
|
}).catch(function (error) {
|
|
@@ -318,7 +388,7 @@ var RestClient = /** @class */ (function () {
|
|
|
318
388
|
/** private methods **/
|
|
319
389
|
RestClient.prototype._signed = function (params, credentials, isAllResponse, _a) {
|
|
320
390
|
var service = _a.service, region = _a.region;
|
|
321
|
-
var signerServiceInfoParams = params.signerServiceInfo, otherParams =
|
|
391
|
+
var signerServiceInfoParams = params.signerServiceInfo, otherParams = __rest(params, ["signerServiceInfo"]);
|
|
322
392
|
var endpoint_region = region || this._region || this._options.region;
|
|
323
393
|
var endpoint_service = service || this._service || this._options.service;
|
|
324
394
|
var creds = {
|
package/lib/RestClient.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RestClient.js","sourceRoot":"","sources":["../src/RestClient.ts"],"names":[],"mappings":";AAAA,
|
|
1
|
+
{"version":3,"file":"RestClient.js","sourceRoot":"","sources":["../src/RestClient.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;GAWG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,0CAM2B;AAG3B,gDAAiD;AACjD,2BAAoC;AAEpC,IAAM,MAAM,GAAG,IAAI,oBAAM,CAAC,YAAY,CAAC,CAAC;AAExC;;;;;;;;;;;;E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YACX,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;YACpB,MAAM,KAAK,CAAC;QACb,CAAC,CAAC,CAAC;IACL,CAAC;IAEO,6BAAQ,GAAhB,UAAiB,MAAM,EAAE,aAAqB;QAArB,8BAAA,EAAA,qBAAqB;QAC7C,OAAO,eAAK,CAAC,MAAM,CAAC;aAClB,IAAI,CAAC,UAAA,QAAQ,IAAI,OAAA,CAAC,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,EAA1C,CAA0C,CAAC;aAC5D,KAAK,CAAC,UAAA,KAAK;YACX,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;YACpB,MAAM,KAAK,CAAC;QACb,CAAC,CAAC,CAAC;IACL,CAAC;IAEO,8BAAS,GAAjB,UAAkB,GAAG;QACpB,IAAM,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAE7B,OAAO;YACN,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC;YACd,IAAI,EAAE,GAAG,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;SACpC,CAAC;IACH,CAAC;IACF,iBAAC;AAAD,CAAC,AA7YD,IA6YC;AA7YY,gCAAU"}
|
package/lib/index.js
CHANGED
|
@@ -1,10 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
/*
|
|
3
|
+
* Copyright 2017-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
|
|
6
|
+
* the License. A copy of the License is located at
|
|
7
|
+
*
|
|
8
|
+
* http://aws.amazon.com/apache2.0/
|
|
9
|
+
*
|
|
10
|
+
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
|
11
|
+
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
|
|
12
|
+
* and limitations under the License.
|
|
13
|
+
*/
|
|
4
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
15
|
var RestAPI_1 = require("./RestAPI");
|
|
6
|
-
|
|
7
|
-
exports.
|
|
16
|
+
var RestAPI_2 = require("./RestAPI");
|
|
17
|
+
exports.RestAPI = RestAPI_2.RestAPI;
|
|
18
|
+
exports.RestAPIClass = RestAPI_2.RestAPIClass;
|
|
8
19
|
var RestClient_1 = require("./RestClient");
|
|
9
20
|
exports.RestClient = RestClient_1.RestClient;
|
|
21
|
+
exports.default = RestAPI_1.RestAPI;
|
|
10
22
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;GAWG;;AAEH,qCAAoC;AAEpC,qCAAkD;AAAzC,4BAAA,OAAO,CAAA;AAAE,iCAAA,YAAY,CAAA;AAC9B,2CAA0C;AAAjC,kCAAA,UAAU,CAAA;AACnB,kBAAe,iBAAO,CAAC"}
|
package/lib/types/index.js
CHANGED
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
/*
|
|
3
|
+
* Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
|
|
6
|
+
* the License. A copy of the License is located at
|
|
7
|
+
*
|
|
8
|
+
* http://aws.amazon.com/apache2.0/
|
|
9
|
+
*
|
|
10
|
+
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
|
11
|
+
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
|
|
12
|
+
* and limitations under the License.
|
|
13
|
+
*/
|
|
4
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
15
|
/**
|
|
6
16
|
* RestClient instance options
|
package/lib/types/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":";AAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;GAWG;;AAEH;;GAEG;AACH;IAcC;QACC,IAAI,CAAC,eAAe,GAAG,gBAAgB,CAAC;QACxC,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC;IACnB,CAAC;IACF,wBAAC;AAAD,CAAC,AAlBD,IAkBC;AAlBY,8CAAiB;AAoB9B;;GAEG;AACH;IAAA;IAmBA,CAAC;IAAD,qBAAC;AAAD,CAAC,AAnBD,IAmBC;AAnBY,wCAAc"}
|
package/lib-esm/RestAPI.js
CHANGED
|
@@ -1,6 +1,73 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
13
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
14
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
15
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
16
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
17
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
18
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
22
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
23
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
24
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
25
|
+
function step(op) {
|
|
26
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
27
|
+
while (_) try {
|
|
28
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
29
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
30
|
+
switch (op[0]) {
|
|
31
|
+
case 0: case 1: t = op; break;
|
|
32
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
33
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
34
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
35
|
+
default:
|
|
36
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
37
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
38
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
39
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
40
|
+
if (t[2]) _.ops.pop();
|
|
41
|
+
_.trys.pop(); continue;
|
|
42
|
+
}
|
|
43
|
+
op = body.call(thisArg, _);
|
|
44
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
45
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
49
|
+
var t = {};
|
|
50
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
51
|
+
t[p] = s[p];
|
|
52
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
53
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
54
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
55
|
+
t[p[i]] = s[p[i]];
|
|
56
|
+
}
|
|
57
|
+
return t;
|
|
58
|
+
};
|
|
59
|
+
/*
|
|
60
|
+
* Copyright 2017-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
61
|
+
*
|
|
62
|
+
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
|
|
63
|
+
* the License. A copy of the License is located at
|
|
64
|
+
*
|
|
65
|
+
* http://aws.amazon.com/apache2.0/
|
|
66
|
+
*
|
|
67
|
+
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
|
68
|
+
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
|
|
69
|
+
* and limitations under the License.
|
|
70
|
+
*/
|
|
4
71
|
import { RestClient } from './RestClient';
|
|
5
72
|
import { Amplify, ConsoleLogger as Logger, Credentials, } from '@aws-amplify/core';
|
|
6
73
|
var logger = new Logger('RestAPI');
|
package/lib-esm/RestAPI.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RestAPI.js","sourceRoot":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0 (the "License"). You may not use this file except in compliance with
|
|
5
|
+
* the License. A copy of the License is located at
|
|
6
|
+
*
|
|
7
|
+
* http://aws.amazon.com/apache2.0/
|
|
8
|
+
*
|
|
9
|
+
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
|
10
|
+
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
|
|
11
|
+
* and limitations under the License.
|
|
12
|
+
*/
|
|
13
|
+
var __assign = (this && this.__assign) || function () {
|
|
14
|
+
__assign = Object.assign || function(t) {
|
|
15
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
16
|
+
s = arguments[i];
|
|
17
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
18
|
+
t[p] = s[p];
|
|
19
|
+
}
|
|
20
|
+
return t;
|
|
21
|
+
};
|
|
22
|
+
return __assign.apply(this, arguments);
|
|
23
|
+
};
|
|
24
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
25
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
26
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
27
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
28
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
29
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
30
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
31
|
+
});
|
|
32
|
+
};
|
|
33
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
34
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
35
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
36
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
37
|
+
function step(op) {
|
|
38
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
39
|
+
while (_) try {
|
|
40
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
41
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
42
|
+
switch (op[0]) {
|
|
43
|
+
case 0: case 1: t = op; break;
|
|
44
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
45
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
46
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
47
|
+
default:
|
|
48
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
49
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
50
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
51
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
52
|
+
if (t[2]) _.ops.pop();
|
|
53
|
+
_.trys.pop(); continue;
|
|
54
|
+
}
|
|
55
|
+
op = body.call(thisArg, _);
|
|
56
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
57
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
61
|
+
var t = {};
|
|
62
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
63
|
+
t[p] = s[p];
|
|
64
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
65
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
66
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
67
|
+
t[p[i]] = s[p[i]];
|
|
68
|
+
}
|
|
69
|
+
return t;
|
|
70
|
+
};
|
|
4
71
|
import { ConsoleLogger as Logger, Credentials, DateUtils, Signer, Platform, } from '@aws-amplify/core';
|
|
5
72
|
import axios from 'axios';
|
|
6
73
|
import { parse, format } from 'url';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RestClient.js","sourceRoot":"","sources":["../src/RestClient.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"RestClient.js","sourceRoot":"","sources":["../src/RestClient.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,OAAO,EACN,aAAa,IAAI,MAAM,EACvB,WAAW,EACX,SAAS,EACT,MAAM,EACN,QAAQ,GACR,MAAM,mBAAmB,CAAC;AAG3B,OAAO,KAA4B,MAAM,OAAO,CAAC;AACjD,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,KAAK,CAAC;AAEpC,IAAM,MAAM,GAAG,IAAI,MAAM,CAAC,YAAY,CAAC,CAAC;AAExC;;;;;;;;;;;;EAYE;AACF;IAwBC;;OAEG;IACH,oBAAY,OAAmB;QAzBvB,YAAO,GAAW,WAAW,CAAC,CAAC,4CAA4C;QAC3E,aAAQ,GAAW,aAAa,CAAC,CAAC,2CAA2C;QAC7E,mBAAc,GAAG,SAAS,CAAC,CAAC,2CAA2C;QAE/E;;;;;;;;;;;;;WAaG;QACK,oBAAe,GAAoC,IAAI,CAAC;QAEhE,gBAAW,GAAG,WAAW,CAAC;QAMzB,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;QACxB,MAAM,CAAC,KAAK,CAAC,aAAa,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC3C,IAA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KAAK,CAAC,KAAK,CAAC,CAAC;YACpB,MAAM,KAAK,CAAC;QACb,CAAC,CAAC,CAAC;IACL,CAAC;IAEO,8BAAS,GAAjB,UAAkB,GAAG;QACpB,IAAM,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAE7B,OAAO;YACN,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC;YACd,IAAI,EAAE,GAAG,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;SACpC,CAAC;IACH,CAAC;IACF,iBAAC;AAAD,CAAC,AA7YD,IA6YC"}
|
package/lib-esm/index.d.ts
CHANGED
package/lib-esm/index.js
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2017-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
|
|
5
|
+
* the License. A copy of the License is located at
|
|
6
|
+
*
|
|
7
|
+
* http://aws.amazon.com/apache2.0/
|
|
8
|
+
*
|
|
9
|
+
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
|
10
|
+
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
|
|
11
|
+
* and limitations under the License.
|
|
12
|
+
*/
|
|
13
|
+
import { RestAPI } from './RestAPI';
|
|
3
14
|
export { RestAPI, RestAPIClass } from './RestAPI';
|
|
4
15
|
export { RestClient } from './RestClient';
|
|
16
|
+
export default RestAPI;
|
|
5
17
|
//# sourceMappingURL=index.js.map
|
package/lib-esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,eAAe,OAAO,CAAC"}
|
package/lib-esm/types/index.js
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
|
|
5
|
+
* the License. A copy of the License is located at
|
|
6
|
+
*
|
|
7
|
+
* http://aws.amazon.com/apache2.0/
|
|
8
|
+
*
|
|
9
|
+
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
|
10
|
+
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
|
|
11
|
+
* and limitations under the License.
|
|
12
|
+
*/
|
|
3
13
|
/**
|
|
4
14
|
* RestClient instance options
|
|
5
15
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH;;GAEG;AACH;IAcC;QACC,IAAI,CAAC,eAAe,GAAG,gBAAgB,CAAC;QACxC,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC;IACnB,CAAC;IACF,wBAAC;AAAD,CAAC,AAlBD,IAkBC;;AAED;;GAEG;AACH;IAAA;IAmBA,CAAC;IAAD,qBAAC;AAAD,CAAC,AAnBD,IAmBC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-amplify/api-rest",
|
|
3
|
-
"version": "2.0.62
|
|
3
|
+
"version": "2.0.62",
|
|
4
4
|
"description": "Api-rest category of aws-amplify",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"module": "./lib-esm/index.js",
|
|
@@ -9,8 +9,11 @@
|
|
|
9
9
|
"./lib/index": "./lib-esm/index.js"
|
|
10
10
|
},
|
|
11
11
|
"sideEffects": [
|
|
12
|
+
"./src/RestAPI.ts",
|
|
12
13
|
"./lib/RestAPI.js",
|
|
13
|
-
"./lib-esm/RestAPI.js"
|
|
14
|
+
"./lib-esm/RestAPI.js",
|
|
15
|
+
"./dist/aws-amplify-api-rest.js",
|
|
16
|
+
"./dist/aws-amplify-api-rest.min.js"
|
|
14
17
|
],
|
|
15
18
|
"publishConfig": {
|
|
16
19
|
"access": "public"
|
|
@@ -25,8 +28,7 @@
|
|
|
25
28
|
"build": "npm run clean && npm run build:esm && npm run build:cjs",
|
|
26
29
|
"clean": "rimraf lib-esm lib dist",
|
|
27
30
|
"format": "echo \"Not implemented\"",
|
|
28
|
-
"lint": "tslint 'src/**/*.ts'
|
|
29
|
-
"ts-coverage": "typescript-coverage-report -p ./tsconfig.build.json -t 65.41"
|
|
31
|
+
"lint": "tslint 'src/**/*.ts'"
|
|
30
32
|
},
|
|
31
33
|
"repository": {
|
|
32
34
|
"type": "git",
|
|
@@ -38,15 +40,9 @@
|
|
|
38
40
|
"url": "https://github.com/aws/aws-amplify/issues"
|
|
39
41
|
},
|
|
40
42
|
"homepage": "https://aws-amplify.github.io/",
|
|
41
|
-
"files": [
|
|
42
|
-
"lib",
|
|
43
|
-
"lib-esm",
|
|
44
|
-
"src"
|
|
45
|
-
],
|
|
46
43
|
"dependencies": {
|
|
47
|
-
"@aws-amplify/core": "4.7.13
|
|
48
|
-
"axios": "0.26.0"
|
|
49
|
-
"tslib": "^1.8.0"
|
|
44
|
+
"@aws-amplify/core": "4.7.13",
|
|
45
|
+
"axios": "0.26.0"
|
|
50
46
|
},
|
|
51
47
|
"jest": {
|
|
52
48
|
"globals": {
|
|
@@ -92,5 +88,5 @@
|
|
|
92
88
|
"lib-esm"
|
|
93
89
|
]
|
|
94
90
|
},
|
|
95
|
-
"gitHead": "
|
|
91
|
+
"gitHead": "eaa4317115aaa23a632af7249b3d995e83af6ef3"
|
|
96
92
|
}
|
package/src/RestAPI.ts
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2017-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
|
|
5
|
+
* the License. A copy of the License is located at
|
|
6
|
+
*
|
|
7
|
+
* http://aws.amazon.com/apache2.0/
|
|
8
|
+
*
|
|
9
|
+
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
|
10
|
+
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
|
|
11
|
+
* and limitations under the License.
|
|
12
|
+
*/
|
|
3
13
|
import { RestClient } from './RestClient';
|
|
4
14
|
import {
|
|
5
15
|
Amplify,
|
package/src/RestClient.ts
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
|
|
5
|
+
* the License. A copy of the License is located at
|
|
6
|
+
*
|
|
7
|
+
* http://aws.amazon.com/apache2.0/
|
|
8
|
+
*
|
|
9
|
+
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
|
10
|
+
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
|
|
11
|
+
* and limitations under the License.
|
|
12
|
+
*/
|
|
3
13
|
|
|
4
14
|
import {
|
|
5
15
|
ConsoleLogger as Logger,
|