@aws-amplify/api-rest 4.0.1-console-preview.a1c533e.0 → 4.0.1-console-preview.23dc225.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/lib/apis/common/handler.js +14 -3
- package/lib/apis/common/internalPost.js +1 -1
- package/lib/apis/index.d.ts +178 -0
- package/lib/apis/index.js +178 -0
- package/lib/apis/server.d.ts +125 -0
- package/lib/apis/server.js +125 -0
- package/lib/errors/CanceledError.d.ts +17 -0
- package/lib/errors/CanceledError.js +35 -0
- package/lib/errors/index.d.ts +1 -1
- package/lib/errors/index.js +4 -4
- package/lib/index.d.ts +1 -1
- package/lib/index.js +2 -2
- package/lib/server.d.ts +1 -1
- package/lib/server.js +2 -2
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/types/index.d.ts +1 -1
- package/lib/utils/createCancellableOperation.js +10 -15
- package/lib/utils/index.d.ts +0 -1
- package/lib/utils/index.js +0 -1
- package/lib/utils/resolveApiUrl.js +4 -3
- package/lib/utils/resolveCredentials.d.ts +1 -6
- package/lib-esm/apis/common/handler.js +14 -3
- package/lib-esm/apis/common/internalPost.js +1 -1
- package/lib-esm/apis/index.d.ts +178 -0
- package/lib-esm/apis/index.js +178 -0
- package/lib-esm/apis/server.d.ts +125 -0
- package/lib-esm/apis/server.js +125 -0
- package/lib-esm/errors/CanceledError.d.ts +17 -0
- package/lib-esm/errors/CanceledError.js +31 -0
- package/lib-esm/errors/index.d.ts +1 -1
- package/lib-esm/errors/index.js +1 -1
- package/lib-esm/index.d.ts +1 -1
- package/lib-esm/index.js +1 -1
- package/lib-esm/server.d.ts +1 -1
- package/lib-esm/server.js +1 -1
- package/lib-esm/tsconfig.tsbuildinfo +1 -1
- package/lib-esm/types/index.d.ts +1 -1
- package/lib-esm/utils/createCancellableOperation.js +12 -17
- package/lib-esm/utils/index.d.ts +0 -1
- package/lib-esm/utils/index.js +0 -1
- package/lib-esm/utils/resolveApiUrl.js +4 -3
- package/lib-esm/utils/resolveCredentials.d.ts +1 -6
- package/package.json +5 -5
- package/src/apis/common/handler.ts +9 -2
- package/src/apis/common/internalPost.ts +1 -1
- package/src/apis/index.ts +179 -0
- package/src/apis/server.ts +126 -0
- package/src/errors/CanceledError.ts +33 -0
- package/src/errors/index.ts +1 -1
- package/src/index.ts +1 -1
- package/src/server.ts +1 -1
- package/src/types/index.ts +1 -1
- package/src/utils/createCancellableOperation.ts +5 -6
- package/src/utils/index.ts +0 -2
- package/src/utils/resolveApiUrl.ts +7 -3
- package/lib/errors/CancelledError.d.ts +0 -14
- package/lib/errors/CancelledError.js +0 -31
- package/lib/utils/polyfills/index.d.ts +0 -0
- package/lib/utils/polyfills/index.js +0 -4
- package/lib/utils/polyfills/index.native.d.ts +0 -1
- package/lib/utils/polyfills/index.native.js +0 -6
- package/lib-esm/errors/CancelledError.d.ts +0 -14
- package/lib-esm/errors/CancelledError.js +0 -27
- package/lib-esm/utils/polyfills/index.d.ts +0 -0
- package/lib-esm/utils/polyfills/index.js +0 -4
- package/lib-esm/utils/polyfills/index.native.d.ts +0 -1
- package/lib-esm/utils/polyfills/index.native.js +0 -4
- package/src/errors/CancelledError.ts +0 -26
- package/src/utils/polyfills/index.native.ts +0 -5
- package/src/utils/polyfills/index.ts +0 -4
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
4
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
exports.isCancelError = exports.CancelledError = void 0;
|
|
6
|
-
var tslib_1 = require("tslib");
|
|
7
|
-
var RestApiError_1 = require("./RestApiError");
|
|
8
|
-
/**
|
|
9
|
-
* Internal-only class for CancelledError.
|
|
10
|
-
*
|
|
11
|
-
* @internal
|
|
12
|
-
*/
|
|
13
|
-
var CancelledError = /** @class */ (function (_super) {
|
|
14
|
-
tslib_1.__extends(CancelledError, _super);
|
|
15
|
-
function CancelledError(params) {
|
|
16
|
-
var _this = _super.call(this, params) || this;
|
|
17
|
-
// TODO: Delete the following 2 lines after we change the build target to >= es2015
|
|
18
|
-
_this.constructor = CancelledError;
|
|
19
|
-
Object.setPrototypeOf(_this, CancelledError.prototype);
|
|
20
|
-
return _this;
|
|
21
|
-
}
|
|
22
|
-
return CancelledError;
|
|
23
|
-
}(RestApiError_1.RestApiError));
|
|
24
|
-
exports.CancelledError = CancelledError;
|
|
25
|
-
/**
|
|
26
|
-
* Check if an error is caused by user calling `cancel()` REST API.
|
|
27
|
-
*/
|
|
28
|
-
var isCancelError = function (error) {
|
|
29
|
-
return !!error && error instanceof CancelledError;
|
|
30
|
-
};
|
|
31
|
-
exports.isCancelError = isCancelError;
|
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
4
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
5
|
-
var react_native_1 = require("@aws-amplify/react-native");
|
|
6
|
-
(0, react_native_1.loadUrlPolyfill)();
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { AmplifyErrorParams } from '@aws-amplify/core/internals/utils';
|
|
2
|
-
import { RestApiError } from './RestApiError';
|
|
3
|
-
/**
|
|
4
|
-
* Internal-only class for CancelledError.
|
|
5
|
-
*
|
|
6
|
-
* @internal
|
|
7
|
-
*/
|
|
8
|
-
export declare class CancelledError extends RestApiError {
|
|
9
|
-
constructor(params: AmplifyErrorParams);
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* Check if an error is caused by user calling `cancel()` REST API.
|
|
13
|
-
*/
|
|
14
|
-
export declare const isCancelError: (error: unknown) => boolean;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
import { __extends } from "tslib";
|
|
4
|
-
import { RestApiError } from './RestApiError';
|
|
5
|
-
/**
|
|
6
|
-
* Internal-only class for CancelledError.
|
|
7
|
-
*
|
|
8
|
-
* @internal
|
|
9
|
-
*/
|
|
10
|
-
var CancelledError = /** @class */ (function (_super) {
|
|
11
|
-
__extends(CancelledError, _super);
|
|
12
|
-
function CancelledError(params) {
|
|
13
|
-
var _this = _super.call(this, params) || this;
|
|
14
|
-
// TODO: Delete the following 2 lines after we change the build target to >= es2015
|
|
15
|
-
_this.constructor = CancelledError;
|
|
16
|
-
Object.setPrototypeOf(_this, CancelledError.prototype);
|
|
17
|
-
return _this;
|
|
18
|
-
}
|
|
19
|
-
return CancelledError;
|
|
20
|
-
}(RestApiError));
|
|
21
|
-
export { CancelledError };
|
|
22
|
-
/**
|
|
23
|
-
* Check if an error is caused by user calling `cancel()` REST API.
|
|
24
|
-
*/
|
|
25
|
-
export var isCancelError = function (error) {
|
|
26
|
-
return !!error && error instanceof CancelledError;
|
|
27
|
-
};
|
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
|
|
4
|
-
import { AmplifyErrorParams } from '@aws-amplify/core/internals/utils';
|
|
5
|
-
import { RestApiError } from './RestApiError';
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Internal-only class for CancelledError.
|
|
9
|
-
*
|
|
10
|
-
* @internal
|
|
11
|
-
*/
|
|
12
|
-
export class CancelledError extends RestApiError {
|
|
13
|
-
constructor(params: AmplifyErrorParams) {
|
|
14
|
-
super(params);
|
|
15
|
-
|
|
16
|
-
// TODO: Delete the following 2 lines after we change the build target to >= es2015
|
|
17
|
-
this.constructor = CancelledError;
|
|
18
|
-
Object.setPrototypeOf(this, CancelledError.prototype);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Check if an error is caused by user calling `cancel()` REST API.
|
|
24
|
-
*/
|
|
25
|
-
export const isCancelError = (error: unknown): boolean =>
|
|
26
|
-
!!error && error instanceof CancelledError;
|