@aws-amplify/core 5.5.3-graphql-api-functional-options.2 → 5.5.3-unstable.ec57e85.2
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/internals/aws-client-utils/composers/package.json +8 -0
- package/internals/aws-client-utils/package.json +4 -4
- package/lib/AwsClients/CognitoIdentity/base.d.ts +1 -1
- package/lib/AwsClients/CognitoIdentity/getCredentialsForIdentity.d.ts +14 -3
- package/lib/AwsClients/CognitoIdentity/getCredentialsForIdentity.js +2 -1
- package/lib/AwsClients/CognitoIdentity/getId.d.ts +14 -3
- package/lib/AwsClients/CognitoIdentity/getId.js +2 -1
- package/lib/AwsClients/Pinpoint/getInAppMessages.d.ts +13 -3
- package/lib/AwsClients/Pinpoint/putEvents.d.ts +13 -3
- package/lib/AwsClients/Pinpoint/updateEndpoint.d.ts +13 -3
- package/lib/Platform/version.d.ts +1 -1
- package/lib/Platform/version.js +1 -1
- package/lib/clients/handlers/fetch.js +4 -21
- package/lib/clients/index.d.ts +7 -2
- package/lib/clients/index.js +17 -4
- package/lib/clients/internal/composeServiceApi.d.ts +1 -1
- package/lib/clients/internal/composeServiceApi.js +1 -3
- package/lib/clients/internal/index.d.ts +7 -0
- package/lib/clients/internal/index.js +14 -0
- package/lib/clients/middleware/retry/middleware.d.ts +0 -7
- package/lib/clients/middleware/retry/middleware.js +37 -26
- package/lib/clients/middleware/signing/middleware.d.ts +9 -2
- package/lib/clients/middleware/signing/middleware.js +25 -14
- package/lib/clients/middleware/signing/signer/signatureV4/index.d.ts +2 -0
- package/lib/clients/middleware/signing/signer/signatureV4/index.js +3 -1
- package/lib/clients/middleware/signing/signer/signatureV4/index.native.d.ts +1 -0
- package/lib/clients/middleware/signing/signer/signatureV4/index.native.js +3 -1
- package/lib/clients/middleware/signing/signer/signatureV4/types/signer.d.ts +10 -1
- package/lib/clients/middleware/signing/signer/signatureV4/utils/getCanonicalRequest.d.ts +3 -1
- package/lib/clients/middleware/signing/signer/signatureV4/utils/getCanonicalRequest.js +5 -2
- package/lib/clients/middleware/signing/signer/signatureV4/utils/getCanonicalUri.d.ts +3 -1
- package/lib/clients/middleware/signing/signer/signatureV4/utils/getCanonicalUri.js +9 -2
- package/lib/clients/middleware/signing/signer/signatureV4/utils/getSignature.d.ts +1 -1
- package/lib/clients/middleware/signing/signer/signatureV4/utils/getSignature.js +2 -2
- package/lib/clients/middleware/signing/signer/signatureV4/utils/getSigningValues.d.ts +1 -1
- package/lib/clients/middleware/signing/signer/signatureV4/utils/getSigningValues.js +3 -2
- package/lib/clients/serde/responseInfo.js +4 -2
- package/lib/clients/types/aws.d.ts +4 -3
- package/lib/clients/utils/memoization.d.ts +9 -0
- package/lib/clients/utils/memoization.js +26 -0
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib-esm/AwsClients/CognitoIdentity/base.d.ts +1 -1
- package/lib-esm/AwsClients/CognitoIdentity/getCredentialsForIdentity.d.ts +14 -3
- package/lib-esm/AwsClients/CognitoIdentity/getCredentialsForIdentity.js +2 -1
- package/lib-esm/AwsClients/CognitoIdentity/getId.d.ts +14 -3
- package/lib-esm/AwsClients/CognitoIdentity/getId.js +2 -1
- package/lib-esm/AwsClients/Pinpoint/getInAppMessages.d.ts +13 -3
- package/lib-esm/AwsClients/Pinpoint/putEvents.d.ts +13 -3
- package/lib-esm/AwsClients/Pinpoint/updateEndpoint.d.ts +13 -3
- package/lib-esm/Platform/version.d.ts +1 -1
- package/lib-esm/Platform/version.js +1 -1
- package/lib-esm/clients/handlers/fetch.js +1 -18
- package/lib-esm/clients/index.d.ts +7 -2
- package/lib-esm/clients/index.js +7 -2
- package/lib-esm/clients/internal/composeServiceApi.d.ts +1 -1
- package/lib-esm/clients/internal/composeServiceApi.js +1 -3
- package/lib-esm/clients/internal/index.d.ts +7 -0
- package/lib-esm/clients/internal/index.js +9 -0
- package/lib-esm/clients/middleware/retry/middleware.d.ts +0 -7
- package/lib-esm/clients/middleware/retry/middleware.js +36 -24
- package/lib-esm/clients/middleware/signing/middleware.d.ts +9 -2
- package/lib-esm/clients/middleware/signing/middleware.js +25 -14
- package/lib-esm/clients/middleware/signing/signer/signatureV4/index.d.ts +2 -0
- package/lib-esm/clients/middleware/signing/signer/signatureV4/index.js +1 -0
- package/lib-esm/clients/middleware/signing/signer/signatureV4/index.native.d.ts +1 -0
- package/lib-esm/clients/middleware/signing/signer/signatureV4/index.native.js +1 -0
- package/lib-esm/clients/middleware/signing/signer/signatureV4/types/signer.d.ts +10 -1
- package/lib-esm/clients/middleware/signing/signer/signatureV4/utils/getCanonicalRequest.d.ts +3 -1
- package/lib-esm/clients/middleware/signing/signer/signatureV4/utils/getCanonicalRequest.js +5 -2
- package/lib-esm/clients/middleware/signing/signer/signatureV4/utils/getCanonicalUri.d.ts +3 -1
- package/lib-esm/clients/middleware/signing/signer/signatureV4/utils/getCanonicalUri.js +9 -2
- package/lib-esm/clients/middleware/signing/signer/signatureV4/utils/getSignature.d.ts +1 -1
- package/lib-esm/clients/middleware/signing/signer/signatureV4/utils/getSignature.js +2 -2
- package/lib-esm/clients/middleware/signing/signer/signatureV4/utils/getSigningValues.d.ts +1 -1
- package/lib-esm/clients/middleware/signing/signer/signatureV4/utils/getSigningValues.js +3 -2
- package/lib-esm/clients/serde/responseInfo.js +3 -1
- package/lib-esm/clients/types/aws.d.ts +4 -3
- package/lib-esm/clients/utils/memoization.d.ts +9 -0
- package/lib-esm/clients/utils/memoization.js +22 -0
- package/lib-esm/tsconfig.tsbuildinfo +1 -1
- package/package.json +8 -7
- package/src/AwsClients/CognitoIdentity/getCredentialsForIdentity.ts +1 -1
- package/src/AwsClients/CognitoIdentity/getId.ts +1 -1
- package/src/Platform/version.ts +1 -1
- package/src/clients/handlers/fetch.ts +1 -19
- package/src/clients/index.ts +15 -2
- package/src/clients/internal/composeServiceApi.ts +7 -4
- package/src/clients/internal/index.ts +10 -0
- package/src/clients/middleware/retry/middleware.ts +28 -24
- package/src/clients/middleware/signing/middleware.ts +13 -2
- package/src/clients/middleware/signing/signer/signatureV4/index.native.ts +1 -0
- package/src/clients/middleware/signing/signer/signatureV4/index.ts +2 -0
- package/src/clients/middleware/signing/signer/signatureV4/types/signer.ts +14 -1
- package/src/clients/middleware/signing/signer/signatureV4/utils/getCanonicalRequest.ts +7 -7
- package/src/clients/middleware/signing/signer/signatureV4/utils/getCanonicalUri.ts +11 -2
- package/src/clients/middleware/signing/signer/signatureV4/utils/getSignature.ts +2 -1
- package/src/clients/middleware/signing/signer/signatureV4/utils/getSigningValues.ts +2 -0
- package/src/clients/serde/responseInfo.ts +4 -2
- package/src/clients/types/aws.ts +4 -3
- package/src/clients/utils/memoization.ts +23 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@aws-amplify/core/internals/aws-client-utils/composers",
|
|
3
|
+
"types": "../../../lib-esm/clients/internal/index.d.ts",
|
|
4
|
+
"main": "../../../lib/clients/internal/index.js",
|
|
5
|
+
"module": "../../../lib-esm/clients/internal/index.js",
|
|
6
|
+
"react-native": "../../../lib-esm/clients/internal/index.js",
|
|
7
|
+
"sideEffects": false
|
|
8
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-amplify/core/internals/aws-client-utils",
|
|
3
|
-
"types": "
|
|
4
|
-
"main": "
|
|
5
|
-
"module": "
|
|
6
|
-
"react-native": "
|
|
3
|
+
"types": "../../lib-esm/clients/index.d.ts",
|
|
4
|
+
"main": "../../lib/clients/index.js",
|
|
5
|
+
"module": "../../lib-esm/clients/index.js",
|
|
6
|
+
"react-native": "../../lib-esm/clients/index.js",
|
|
7
7
|
"sideEffects": false
|
|
8
8
|
}
|
|
@@ -5,7 +5,7 @@ import { Endpoint, EndpointResolverOptions, Headers, HttpRequest, HttpResponse }
|
|
|
5
5
|
*
|
|
6
6
|
* @internal
|
|
7
7
|
*/
|
|
8
|
-
export declare const cognitoIdentityTransferHandler: (request: HttpRequest, options: import("../../clients
|
|
8
|
+
export declare const cognitoIdentityTransferHandler: (request: HttpRequest, options: import("../../clients").UserAgentOptions & import("../../clients").RetryOptions<HttpResponse>) => Promise<HttpResponse>;
|
|
9
9
|
/**
|
|
10
10
|
* @internal
|
|
11
11
|
*/
|
|
@@ -4,9 +4,20 @@ export type { GetCredentialsForIdentityInput, GetCredentialsForIdentityOutput };
|
|
|
4
4
|
/**
|
|
5
5
|
* @internal
|
|
6
6
|
*/
|
|
7
|
-
export declare const getCredentialsForIdentity: (config: Omit<import("../../clients
|
|
8
|
-
|
|
7
|
+
export declare const getCredentialsForIdentity: (config: Omit<import("../../clients").UserAgentOptions & import("../../clients").RetryOptions<HttpResponse> & import("../../clients").ServiceClientOptions & {
|
|
8
|
+
service: string;
|
|
9
|
+
endpointResolver: ({ region }: import("../../clients").EndpointResolverOptions) => {
|
|
10
|
+
url: URL;
|
|
11
|
+
};
|
|
12
|
+
retryDecider: (response?: HttpResponse, error?: Error) => Promise<boolean>;
|
|
13
|
+
computeDelay: (attempt: number) => number;
|
|
14
|
+
userAgentValue: string;
|
|
15
|
+
}, "retryDecider" | "computeDelay" | "userAgentValue" | "service" | "endpointResolver"> & {
|
|
16
|
+
retryDecider?: ((response?: HttpResponse, error?: unknown) => Promise<boolean>) & ((response?: HttpResponse, error?: Error) => Promise<boolean>);
|
|
9
17
|
computeDelay?: (attempt: number) => number;
|
|
10
18
|
userAgentValue?: string;
|
|
11
|
-
|
|
19
|
+
service?: string;
|
|
20
|
+
endpointResolver?: ((options: import("../../clients").EndpointResolverOptions, input?: any) => Endpoint) & (({ region }: import("../../clients").EndpointResolverOptions) => {
|
|
21
|
+
url: URL;
|
|
22
|
+
});
|
|
12
23
|
}, input: GetCredentialsForIdentityInput) => Promise<GetCredentialsForIdentityOutput>;
|
|
@@ -41,6 +41,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
41
41
|
exports.getCredentialsForIdentity = void 0;
|
|
42
42
|
var base_1 = require("./base");
|
|
43
43
|
var clients_1 = require("../../clients");
|
|
44
|
+
var internal_1 = require("../../clients/internal");
|
|
44
45
|
var getCredentialsForIdentitySerializer = function (input, endpoint) {
|
|
45
46
|
var headers = (0, base_1.getSharedHeaders)('GetCredentialsForIdentity');
|
|
46
47
|
var body = JSON.stringify(input);
|
|
@@ -79,4 +80,4 @@ var deserializeCredentials = function (output) {
|
|
|
79
80
|
/**
|
|
80
81
|
* @internal
|
|
81
82
|
*/
|
|
82
|
-
exports.getCredentialsForIdentity = (0,
|
|
83
|
+
exports.getCredentialsForIdentity = (0, internal_1.composeServiceApi)(base_1.cognitoIdentityTransferHandler, getCredentialsForIdentitySerializer, getCredentialsForIdentityDeserializer, base_1.defaultConfig);
|
|
@@ -4,9 +4,20 @@ export type { GetIdInput, GetIdOutput };
|
|
|
4
4
|
/**
|
|
5
5
|
* @internal
|
|
6
6
|
*/
|
|
7
|
-
export declare const getId: (config: Omit<import("../../clients
|
|
8
|
-
|
|
7
|
+
export declare const getId: (config: Omit<import("../../clients").UserAgentOptions & import("../../clients").RetryOptions<HttpResponse> & import("../../clients").ServiceClientOptions & {
|
|
8
|
+
service: string;
|
|
9
|
+
endpointResolver: ({ region }: import("../../clients").EndpointResolverOptions) => {
|
|
10
|
+
url: URL;
|
|
11
|
+
};
|
|
12
|
+
retryDecider: (response?: HttpResponse, error?: Error) => Promise<boolean>;
|
|
13
|
+
computeDelay: (attempt: number) => number;
|
|
14
|
+
userAgentValue: string;
|
|
15
|
+
}, "retryDecider" | "computeDelay" | "userAgentValue" | "service" | "endpointResolver"> & {
|
|
16
|
+
retryDecider?: ((response?: HttpResponse, error?: unknown) => Promise<boolean>) & ((response?: HttpResponse, error?: Error) => Promise<boolean>);
|
|
9
17
|
computeDelay?: (attempt: number) => number;
|
|
10
18
|
userAgentValue?: string;
|
|
11
|
-
|
|
19
|
+
service?: string;
|
|
20
|
+
endpointResolver?: ((options: import("../../clients").EndpointResolverOptions, input?: any) => Endpoint) & (({ region }: import("../../clients").EndpointResolverOptions) => {
|
|
21
|
+
url: URL;
|
|
22
|
+
});
|
|
12
23
|
}, input: GetIdInput) => Promise<GetIdOutput>;
|
|
@@ -41,6 +41,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
41
41
|
exports.getId = void 0;
|
|
42
42
|
var base_1 = require("./base");
|
|
43
43
|
var clients_1 = require("../../clients");
|
|
44
|
+
var internal_1 = require("../../clients/internal");
|
|
44
45
|
var getIdSerializer = function (input, endpoint) {
|
|
45
46
|
var headers = (0, base_1.getSharedHeaders)('GetId');
|
|
46
47
|
var body = JSON.stringify(input);
|
|
@@ -69,4 +70,4 @@ var getIdDeserializer = function (response) { return __awaiter(void 0, void 0, v
|
|
|
69
70
|
/**
|
|
70
71
|
* @internal
|
|
71
72
|
*/
|
|
72
|
-
exports.getId = (0,
|
|
73
|
+
exports.getId = (0, internal_1.composeServiceApi)(base_1.cognitoIdentityTransferHandler, getIdSerializer, getIdDeserializer, base_1.defaultConfig);
|
|
@@ -4,10 +4,20 @@ export type { GetInAppMessagesInput, GetInAppMessagesOutput };
|
|
|
4
4
|
/**
|
|
5
5
|
* @internal
|
|
6
6
|
*/
|
|
7
|
-
export declare const getInAppMessages: (config: Omit<import("../../clients
|
|
8
|
-
|
|
7
|
+
export declare const getInAppMessages: (config: Omit<import("../../clients").UserAgentOptions & import("../../clients").RetryOptions<HttpResponse> & import("../../clients").SigningOptions & import("../../clients/types").ServiceClientOptions & {
|
|
8
|
+
service: string;
|
|
9
|
+
endpointResolver: ({ region }: import("../../clients/types").EndpointResolverOptions) => {
|
|
10
|
+
url: URL;
|
|
11
|
+
};
|
|
12
|
+
retryDecider: (response?: HttpResponse, error?: Error) => Promise<boolean>;
|
|
13
|
+
computeDelay: (attempt: number) => number;
|
|
14
|
+
userAgentValue: string;
|
|
15
|
+
}, "retryDecider" | "computeDelay" | "userAgentValue" | "service" | "endpointResolver"> & {
|
|
16
|
+
retryDecider?: ((response?: HttpResponse, error?: unknown) => Promise<boolean>) & ((response?: HttpResponse, error?: Error) => Promise<boolean>);
|
|
9
17
|
computeDelay?: (attempt: number) => number;
|
|
10
18
|
userAgentValue?: string;
|
|
11
19
|
service?: string;
|
|
12
|
-
endpointResolver?: (options: import("../../clients/types").EndpointResolverOptions) => Endpoint
|
|
20
|
+
endpointResolver?: ((options: import("../../clients/types").EndpointResolverOptions, input?: any) => Endpoint) & (({ region }: import("../../clients/types").EndpointResolverOptions) => {
|
|
21
|
+
url: URL;
|
|
22
|
+
});
|
|
13
23
|
}, input: GetInAppMessagesInput) => Promise<GetInAppMessagesOutput>;
|
|
@@ -4,10 +4,20 @@ export type { PutEventsInput, PutEventsOutput };
|
|
|
4
4
|
/**
|
|
5
5
|
* @internal
|
|
6
6
|
*/
|
|
7
|
-
export declare const putEvents: (config: Omit<import("../../clients
|
|
8
|
-
|
|
7
|
+
export declare const putEvents: (config: Omit<import("../../clients").UserAgentOptions & import("../../clients").RetryOptions<HttpResponse> & import("../../clients").SigningOptions & import("../../clients/types").ServiceClientOptions & {
|
|
8
|
+
service: string;
|
|
9
|
+
endpointResolver: ({ region }: import("../../clients/types").EndpointResolverOptions) => {
|
|
10
|
+
url: URL;
|
|
11
|
+
};
|
|
12
|
+
retryDecider: (response?: HttpResponse, error?: Error) => Promise<boolean>;
|
|
13
|
+
computeDelay: (attempt: number) => number;
|
|
14
|
+
userAgentValue: string;
|
|
15
|
+
}, "retryDecider" | "computeDelay" | "userAgentValue" | "service" | "endpointResolver"> & {
|
|
16
|
+
retryDecider?: ((response?: HttpResponse, error?: unknown) => Promise<boolean>) & ((response?: HttpResponse, error?: Error) => Promise<boolean>);
|
|
9
17
|
computeDelay?: (attempt: number) => number;
|
|
10
18
|
userAgentValue?: string;
|
|
11
19
|
service?: string;
|
|
12
|
-
endpointResolver?: (options: import("../../clients/types").EndpointResolverOptions) => Endpoint
|
|
20
|
+
endpointResolver?: ((options: import("../../clients/types").EndpointResolverOptions, input?: any) => Endpoint) & (({ region }: import("../../clients/types").EndpointResolverOptions) => {
|
|
21
|
+
url: URL;
|
|
22
|
+
});
|
|
13
23
|
}, input: PutEventsInput) => Promise<PutEventsOutput>;
|
|
@@ -4,10 +4,20 @@ export type { UpdateEndpointInput, UpdateEndpointOutput };
|
|
|
4
4
|
/**
|
|
5
5
|
* @internal
|
|
6
6
|
*/
|
|
7
|
-
export declare const updateEndpoint: (config: Omit<import("../../clients
|
|
8
|
-
|
|
7
|
+
export declare const updateEndpoint: (config: Omit<import("../../clients").UserAgentOptions & import("../../clients").RetryOptions<HttpResponse> & import("../../clients").SigningOptions & import("../../clients/types").ServiceClientOptions & {
|
|
8
|
+
service: string;
|
|
9
|
+
endpointResolver: ({ region }: import("../../clients/types").EndpointResolverOptions) => {
|
|
10
|
+
url: URL;
|
|
11
|
+
};
|
|
12
|
+
retryDecider: (response?: HttpResponse, error?: Error) => Promise<boolean>;
|
|
13
|
+
computeDelay: (attempt: number) => number;
|
|
14
|
+
userAgentValue: string;
|
|
15
|
+
}, "retryDecider" | "computeDelay" | "userAgentValue" | "service" | "endpointResolver"> & {
|
|
16
|
+
retryDecider?: ((response?: HttpResponse, error?: unknown) => Promise<boolean>) & ((response?: HttpResponse, error?: Error) => Promise<boolean>);
|
|
9
17
|
computeDelay?: (attempt: number) => number;
|
|
10
18
|
userAgentValue?: string;
|
|
11
19
|
service?: string;
|
|
12
|
-
endpointResolver?: (options: import("../../clients/types").EndpointResolverOptions) => Endpoint
|
|
20
|
+
endpointResolver?: ((options: import("../../clients/types").EndpointResolverOptions, input?: any) => Endpoint) & (({ region }: import("../../clients/types").EndpointResolverOptions) => {
|
|
21
|
+
url: URL;
|
|
22
|
+
});
|
|
13
23
|
}, input: UpdateEndpointInput) => Promise<UpdateEndpointOutput>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "5.3.4-
|
|
1
|
+
export declare const version = "5.3.4-unstable.ec57e85.2+ec57e855d";
|
package/lib/Platform/version.js
CHANGED
|
@@ -51,6 +51,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
51
51
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
52
52
|
exports.fetchTransferHandler = void 0;
|
|
53
53
|
require("isomorphic-unfetch"); // TODO: remove this dependency in v6
|
|
54
|
+
var memoization_1 = require("../utils/memoization");
|
|
54
55
|
var shouldSendBody = function (method) {
|
|
55
56
|
return !['HEAD', 'GET', 'DELETE'].includes(method.toUpperCase());
|
|
56
57
|
};
|
|
@@ -93,9 +94,9 @@ var fetchTransferHandler = function (_a, _b) {
|
|
|
93
94
|
body: null,
|
|
94
95
|
};
|
|
95
96
|
bodyWithMixin = Object.assign((_d = resp.body) !== null && _d !== void 0 ? _d : {}, {
|
|
96
|
-
text: withMemoization(function () { return resp.text(); }),
|
|
97
|
-
blob: withMemoization(function () { return resp.blob(); }),
|
|
98
|
-
json: withMemoization(function () { return resp.json(); }),
|
|
97
|
+
text: (0, memoization_1.withMemoization)(function () { return resp.text(); }),
|
|
98
|
+
blob: (0, memoization_1.withMemoization)(function () { return resp.blob(); }),
|
|
99
|
+
json: (0, memoization_1.withMemoization)(function () { return resp.json(); }),
|
|
99
100
|
});
|
|
100
101
|
return [2 /*return*/, __assign(__assign({}, httpResponse), { body: bodyWithMixin })];
|
|
101
102
|
}
|
|
@@ -103,21 +104,3 @@ var fetchTransferHandler = function (_a, _b) {
|
|
|
103
104
|
});
|
|
104
105
|
};
|
|
105
106
|
exports.fetchTransferHandler = fetchTransferHandler;
|
|
106
|
-
/**
|
|
107
|
-
* Cache the payload of a response body. It allows multiple calls to the body,
|
|
108
|
-
* for example, when reading the body in both retry decider and error deserializer.
|
|
109
|
-
* Caching body is allowed here because we call the body accessor(blob(), json(),
|
|
110
|
-
* etc.) when body is small or streaming implementation is not available(RN).
|
|
111
|
-
*/
|
|
112
|
-
var withMemoization = function (payloadAccessor) {
|
|
113
|
-
var cached;
|
|
114
|
-
return function () {
|
|
115
|
-
if (!cached) {
|
|
116
|
-
// Explicitly not awaiting. Intermediate await would add overhead and
|
|
117
|
-
// introduce a possible race in the event that this wrapper is called
|
|
118
|
-
// again before the first `payloadAccessor` call resolves.
|
|
119
|
-
cached = payloadAccessor();
|
|
120
|
-
}
|
|
121
|
-
return cached;
|
|
122
|
-
};
|
|
123
|
-
};
|
package/lib/clients/index.d.ts
CHANGED
|
@@ -2,7 +2,12 @@ export { getDnsSuffix } from './endpoints';
|
|
|
2
2
|
export { fetchTransferHandler } from './handlers/fetch';
|
|
3
3
|
export { unauthenticatedHandler } from './handlers/unauthenticated';
|
|
4
4
|
export { authenticatedHandler } from './handlers/authenticated';
|
|
5
|
-
export {
|
|
6
|
-
export {
|
|
5
|
+
export { getHashedPayload, presignUrl, PresignUrlOptions, signRequest, SignRequestOptions, } from './middleware/signing/signer/signatureV4';
|
|
6
|
+
export { EMPTY_HASH as EMPTY_SHA256_HASH } from './middleware/signing/signer/signatureV4/constants';
|
|
7
|
+
export { extendedEncodeURIComponent } from './middleware/signing/utils/extendedEncodeURIComponent';
|
|
8
|
+
export { signingMiddleware, SigningOptions } from './middleware/signing';
|
|
9
|
+
export { getRetryDecider, jitteredBackoff, retryMiddleware, RetryOptions, } from './middleware/retry';
|
|
10
|
+
export { userAgentMiddleware, UserAgentOptions } from './middleware/userAgent';
|
|
7
11
|
export { parseJsonBody, parseJsonError, parseMetadata } from './serde';
|
|
12
|
+
export { withMemoization } from './utils/memoization';
|
|
8
13
|
export * from './types';
|
package/lib/clients/index.js
CHANGED
|
@@ -16,7 +16,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
17
17
|
};
|
|
18
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
-
exports.parseMetadata = exports.parseJsonError = exports.parseJsonBody = exports.
|
|
19
|
+
exports.withMemoization = exports.parseMetadata = exports.parseJsonError = exports.parseJsonBody = exports.userAgentMiddleware = exports.retryMiddleware = exports.jitteredBackoff = exports.getRetryDecider = exports.signingMiddleware = exports.extendedEncodeURIComponent = exports.EMPTY_SHA256_HASH = exports.signRequest = exports.presignUrl = exports.getHashedPayload = exports.authenticatedHandler = exports.unauthenticatedHandler = exports.fetchTransferHandler = exports.getDnsSuffix = void 0;
|
|
20
20
|
var endpoints_1 = require("./endpoints");
|
|
21
21
|
Object.defineProperty(exports, "getDnsSuffix", { enumerable: true, get: function () { return endpoints_1.getDnsSuffix; } });
|
|
22
22
|
var fetch_1 = require("./handlers/fetch");
|
|
@@ -25,13 +25,26 @@ var unauthenticated_1 = require("./handlers/unauthenticated");
|
|
|
25
25
|
Object.defineProperty(exports, "unauthenticatedHandler", { enumerable: true, get: function () { return unauthenticated_1.unauthenticatedHandler; } });
|
|
26
26
|
var authenticated_1 = require("./handlers/authenticated");
|
|
27
27
|
Object.defineProperty(exports, "authenticatedHandler", { enumerable: true, get: function () { return authenticated_1.authenticatedHandler; } });
|
|
28
|
-
var composeServiceApi_1 = require("./internal/composeServiceApi");
|
|
29
|
-
Object.defineProperty(exports, "composeServiceApi", { enumerable: true, get: function () { return composeServiceApi_1.composeServiceApi; } });
|
|
30
28
|
var signatureV4_1 = require("./middleware/signing/signer/signatureV4");
|
|
31
|
-
Object.defineProperty(exports, "
|
|
29
|
+
Object.defineProperty(exports, "getHashedPayload", { enumerable: true, get: function () { return signatureV4_1.getHashedPayload; } });
|
|
32
30
|
Object.defineProperty(exports, "presignUrl", { enumerable: true, get: function () { return signatureV4_1.presignUrl; } });
|
|
31
|
+
Object.defineProperty(exports, "signRequest", { enumerable: true, get: function () { return signatureV4_1.signRequest; } });
|
|
32
|
+
var constants_1 = require("./middleware/signing/signer/signatureV4/constants");
|
|
33
|
+
Object.defineProperty(exports, "EMPTY_SHA256_HASH", { enumerable: true, get: function () { return constants_1.EMPTY_HASH; } });
|
|
34
|
+
var extendedEncodeURIComponent_1 = require("./middleware/signing/utils/extendedEncodeURIComponent");
|
|
35
|
+
Object.defineProperty(exports, "extendedEncodeURIComponent", { enumerable: true, get: function () { return extendedEncodeURIComponent_1.extendedEncodeURIComponent; } });
|
|
36
|
+
var signing_1 = require("./middleware/signing");
|
|
37
|
+
Object.defineProperty(exports, "signingMiddleware", { enumerable: true, get: function () { return signing_1.signingMiddleware; } });
|
|
38
|
+
var retry_1 = require("./middleware/retry");
|
|
39
|
+
Object.defineProperty(exports, "getRetryDecider", { enumerable: true, get: function () { return retry_1.getRetryDecider; } });
|
|
40
|
+
Object.defineProperty(exports, "jitteredBackoff", { enumerable: true, get: function () { return retry_1.jitteredBackoff; } });
|
|
41
|
+
Object.defineProperty(exports, "retryMiddleware", { enumerable: true, get: function () { return retry_1.retryMiddleware; } });
|
|
42
|
+
var userAgent_1 = require("./middleware/userAgent");
|
|
43
|
+
Object.defineProperty(exports, "userAgentMiddleware", { enumerable: true, get: function () { return userAgent_1.userAgentMiddleware; } });
|
|
33
44
|
var serde_1 = require("./serde");
|
|
34
45
|
Object.defineProperty(exports, "parseJsonBody", { enumerable: true, get: function () { return serde_1.parseJsonBody; } });
|
|
35
46
|
Object.defineProperty(exports, "parseJsonError", { enumerable: true, get: function () { return serde_1.parseJsonError; } });
|
|
36
47
|
Object.defineProperty(exports, "parseMetadata", { enumerable: true, get: function () { return serde_1.parseMetadata; } });
|
|
48
|
+
var memoization_1 = require("./utils/memoization");
|
|
49
|
+
Object.defineProperty(exports, "withMemoization", { enumerable: true, get: function () { return memoization_1.withMemoization; } });
|
|
37
50
|
__exportStar(require("./types"), exports);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ServiceClientOptions } from '../types/aws';
|
|
2
2
|
import { TransferHandler, Endpoint } from '../types/core';
|
|
3
3
|
import { HttpRequest, HttpResponse } from '../types/http';
|
|
4
|
-
export declare const composeServiceApi: <TransferHandlerOptions, Input, Output, DefaultConfig extends Partial<TransferHandlerOptions & ServiceClientOptions>>(transferHandler: TransferHandler<HttpRequest, HttpResponse, TransferHandlerOptions>, serializer: (input: Input, endpoint: Endpoint) => HttpRequest, deserializer: (output: HttpResponse) => Promise<Output>, defaultConfig: DefaultConfig) => (config: OptionalizeKey<TransferHandlerOptions & ServiceClientOptions, keyof DefaultConfig>, input: Input) => Promise<Output>;
|
|
4
|
+
export declare const composeServiceApi: <TransferHandlerOptions, Input, Output, DefaultConfig extends Partial<TransferHandlerOptions & ServiceClientOptions>>(transferHandler: TransferHandler<HttpRequest, HttpResponse, TransferHandlerOptions>, serializer: (input: Input, endpoint: Endpoint) => HttpRequest, deserializer: (output: HttpResponse) => Promise<Output>, defaultConfig: DefaultConfig) => (config: OptionalizeKey<TransferHandlerOptions & ServiceClientOptions & DefaultConfig, keyof DefaultConfig>, input: Input) => Promise<Output>;
|
|
5
5
|
type OptionalizeKey<T, K> = Omit<T, K & keyof T> & {
|
|
6
6
|
[P in K & keyof T]?: T[P];
|
|
7
7
|
};
|
|
@@ -57,9 +57,7 @@ var composeServiceApi = function (transferHandler, serializer, deserializer, def
|
|
|
57
57
|
switch (_a.label) {
|
|
58
58
|
case 0:
|
|
59
59
|
resolvedConfig = __assign(__assign({}, defaultConfig), config);
|
|
60
|
-
return [4 /*yield*/, resolvedConfig.endpointResolver(
|
|
61
|
-
region: resolvedConfig.region,
|
|
62
|
-
})];
|
|
60
|
+
return [4 /*yield*/, resolvedConfig.endpointResolver(resolvedConfig, input)];
|
|
63
61
|
case 1:
|
|
64
62
|
endpoint = _a.sent();
|
|
65
63
|
request = serializer(input, endpoint);
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This index should NOT be included in the ../index.ts because the composer functions
|
|
3
|
+
* here requires TypeScript >= 4. Given other scoped packages may use TypeScript < 4,
|
|
4
|
+
* they should not be exposed to upper level index.
|
|
5
|
+
*/
|
|
6
|
+
export { composeServiceApi } from './composeServiceApi';
|
|
7
|
+
export { composeTransferHandler } from './composeTransferHandler';
|
|
@@ -0,0 +1,14 @@
|
|
|
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.composeTransferHandler = exports.composeServiceApi = void 0;
|
|
6
|
+
/**
|
|
7
|
+
* This index should NOT be included in the ../index.ts because the composer functions
|
|
8
|
+
* here requires TypeScript >= 4. Given other scoped packages may use TypeScript < 4,
|
|
9
|
+
* they should not be exposed to upper level index.
|
|
10
|
+
*/
|
|
11
|
+
var composeServiceApi_1 = require("./composeServiceApi");
|
|
12
|
+
Object.defineProperty(exports, "composeServiceApi", { enumerable: true, get: function () { return composeServiceApi_1.composeServiceApi; } });
|
|
13
|
+
var composeTransferHandler_1 = require("./composeTransferHandler");
|
|
14
|
+
Object.defineProperty(exports, "composeTransferHandler", { enumerable: true, get: function () { return composeTransferHandler_1.composeTransferHandler; } });
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { MetadataBearer } from '@aws-sdk/types';
|
|
2
1
|
import { MiddlewareContext, MiddlewareHandler, Request, Response } from '../../types/core';
|
|
3
2
|
/**
|
|
4
3
|
* Configuration of the retry middleware
|
|
@@ -32,9 +31,3 @@ export interface RetryOptions<TResponse = Response> {
|
|
|
32
31
|
* Retry middleware
|
|
33
32
|
*/
|
|
34
33
|
export declare const retryMiddleware: <TInput = Request, TOutput = Response>({ maxAttempts, retryDecider, computeDelay, abortSignal, }: RetryOptions<TOutput>) => (next: MiddlewareHandler<TInput, TOutput>, context: MiddlewareContext) => (request: TInput) => Promise<TOutput>;
|
|
35
|
-
/**
|
|
36
|
-
* Check if the response is a contains `$metadata` property.
|
|
37
|
-
*
|
|
38
|
-
* @internal Amplify internal use only
|
|
39
|
-
*/
|
|
40
|
-
export declare const isMetadataBearer: (response: unknown) => response is MetadataBearer;
|
|
@@ -1,6 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
3
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
var __assign = (this && this.__assign) || function () {
|
|
5
|
+
__assign = Object.assign || function(t) {
|
|
6
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
7
|
+
s = arguments[i];
|
|
8
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
9
|
+
t[p] = s[p];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
return __assign.apply(this, arguments);
|
|
14
|
+
};
|
|
4
15
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
5
16
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
6
17
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -38,7 +49,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
38
49
|
}
|
|
39
50
|
};
|
|
40
51
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41
|
-
exports.
|
|
52
|
+
exports.retryMiddleware = void 0;
|
|
42
53
|
var DEFAULT_RETRY_ATTEMPTS = 3;
|
|
43
54
|
/**
|
|
44
55
|
* Retry middleware
|
|
@@ -52,26 +63,36 @@ var retryMiddleware = function (_a) {
|
|
|
52
63
|
return function retryMiddleware(request) {
|
|
53
64
|
var _a;
|
|
54
65
|
return __awaiter(this, void 0, void 0, function () {
|
|
55
|
-
var error, attemptsCount, response, e_1, delay;
|
|
66
|
+
var error, attemptsCount, response, handleTerminalErrorOrResponse, e_1, delay;
|
|
56
67
|
return __generator(this, function (_b) {
|
|
57
68
|
switch (_b.label) {
|
|
58
69
|
case 0:
|
|
59
70
|
attemptsCount = (_a = context.attemptsCount) !== null && _a !== void 0 ? _a : 0;
|
|
71
|
+
handleTerminalErrorOrResponse = function () {
|
|
72
|
+
if (response) {
|
|
73
|
+
addOrIncrementMetadataAttempts(response, attemptsCount);
|
|
74
|
+
return response;
|
|
75
|
+
}
|
|
76
|
+
else {
|
|
77
|
+
addOrIncrementMetadataAttempts(error, attemptsCount);
|
|
78
|
+
throw error;
|
|
79
|
+
}
|
|
80
|
+
};
|
|
60
81
|
_b.label = 1;
|
|
61
82
|
case 1:
|
|
62
83
|
if (!(!(abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.aborted) && attemptsCount < maxAttempts)) return [3 /*break*/, 11];
|
|
63
|
-
error = undefined;
|
|
64
|
-
response = undefined;
|
|
65
84
|
_b.label = 2;
|
|
66
85
|
case 2:
|
|
67
86
|
_b.trys.push([2, 4, , 5]);
|
|
68
87
|
return [4 /*yield*/, next(request)];
|
|
69
88
|
case 3:
|
|
70
89
|
response = _b.sent();
|
|
90
|
+
error = undefined;
|
|
71
91
|
return [3 /*break*/, 5];
|
|
72
92
|
case 4:
|
|
73
93
|
e_1 = _b.sent();
|
|
74
94
|
error = e_1;
|
|
95
|
+
response = undefined;
|
|
75
96
|
return [3 /*break*/, 5];
|
|
76
97
|
case 5:
|
|
77
98
|
// context.attemptsCount may be updated after calling next handler which may retry the request by itself.
|
|
@@ -90,20 +111,16 @@ var retryMiddleware = function (_a) {
|
|
|
90
111
|
_b.sent();
|
|
91
112
|
_b.label = 8;
|
|
92
113
|
case 8: return [3 /*break*/, 1];
|
|
93
|
-
case 9:
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
114
|
+
case 9: return [2 /*return*/, handleTerminalErrorOrResponse()];
|
|
115
|
+
case 10: return [3 /*break*/, 1];
|
|
116
|
+
case 11:
|
|
117
|
+
if (abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.aborted) {
|
|
118
|
+
throw new Error('Request aborted.');
|
|
97
119
|
}
|
|
98
120
|
else {
|
|
99
|
-
|
|
100
|
-
throw error;
|
|
121
|
+
return [2 /*return*/, handleTerminalErrorOrResponse()];
|
|
101
122
|
}
|
|
102
|
-
|
|
103
|
-
case 10: return [3 /*break*/, 1];
|
|
104
|
-
case 11: throw (abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.aborted)
|
|
105
|
-
? new Error('Request aborted')
|
|
106
|
-
: error !== null && error !== void 0 ? error : new Error('Retry attempts exhausted');
|
|
123
|
+
return [2 /*return*/];
|
|
107
124
|
}
|
|
108
125
|
});
|
|
109
126
|
});
|
|
@@ -128,16 +145,10 @@ var cancellableSleep = function (timeoutMs, abortSignal) {
|
|
|
128
145
|
});
|
|
129
146
|
return sleepPromise;
|
|
130
147
|
};
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
*/
|
|
136
|
-
var isMetadataBearer = function (response) { return typeof (response === null || response === void 0 ? void 0 : response['$metadata']) === 'object'; };
|
|
137
|
-
exports.isMetadataBearer = isMetadataBearer;
|
|
138
|
-
var updateMetadataAttempts = function (nextHandlerOutput, attempts) {
|
|
139
|
-
if ((0, exports.isMetadataBearer)(nextHandlerOutput)) {
|
|
140
|
-
nextHandlerOutput.$metadata.attempts = attempts;
|
|
148
|
+
var addOrIncrementMetadataAttempts = function (nextHandlerOutput, attempts) {
|
|
149
|
+
var _a;
|
|
150
|
+
if (Object.prototype.toString.call(nextHandlerOutput) !== '[object Object]') {
|
|
151
|
+
return;
|
|
141
152
|
}
|
|
142
|
-
nextHandlerOutput['$metadata'] = { attempts: attempts };
|
|
153
|
+
nextHandlerOutput['$metadata'] = __assign(__assign({}, ((_a = nextHandlerOutput['$metadata']) !== null && _a !== void 0 ? _a : {})), { attempts: attempts });
|
|
143
154
|
};
|
|
@@ -3,12 +3,19 @@ import { Credentials, HttpRequest, HttpResponse, MiddlewareHandler } from '../..
|
|
|
3
3
|
* Configuration of the signing middleware
|
|
4
4
|
*/
|
|
5
5
|
export interface SigningOptions {
|
|
6
|
-
credentials: Credentials;
|
|
6
|
+
credentials: Credentials | (() => Promise<Credentials>);
|
|
7
7
|
region: string;
|
|
8
8
|
service: string;
|
|
9
|
+
/**
|
|
10
|
+
* Whether to uri encode the path as part of canonical uri. It's used for S3 only where the pathname
|
|
11
|
+
* is already uri encoded, and the signing process is not expected to uri encode it again.
|
|
12
|
+
*
|
|
13
|
+
* @default true
|
|
14
|
+
*/
|
|
15
|
+
uriEscapePath?: boolean;
|
|
9
16
|
}
|
|
10
17
|
/**
|
|
11
18
|
* Middleware that SigV4 signs request with AWS credentials, and correct system clock offset.
|
|
12
19
|
* This middleware is expected to be placed after retry middleware.
|
|
13
20
|
*/
|
|
14
|
-
export declare const signingMiddleware: ({ credentials, region, service, }: SigningOptions) => (next: MiddlewareHandler<HttpRequest, HttpResponse>) => (request: HttpRequest) => Promise<HttpResponse>;
|
|
21
|
+
export declare const signingMiddleware: ({ credentials, region, service, uriEscapePath, }: SigningOptions) => (next: MiddlewareHandler<HttpRequest, HttpResponse>) => (request: HttpRequest) => Promise<HttpResponse>;
|
|
@@ -47,28 +47,39 @@ var getUpdatedSystemClockOffset_1 = require("./utils/getUpdatedSystemClockOffset
|
|
|
47
47
|
* This middleware is expected to be placed after retry middleware.
|
|
48
48
|
*/
|
|
49
49
|
var signingMiddleware = function (_a) {
|
|
50
|
-
var credentials = _a.credentials, region = _a.region, service = _a.service;
|
|
50
|
+
var credentials = _a.credentials, region = _a.region, service = _a.service, _b = _a.uriEscapePath, uriEscapePath = _b === void 0 ? true : _b;
|
|
51
51
|
var currentSystemClockOffset;
|
|
52
52
|
return function (next) {
|
|
53
53
|
return function signingMiddleware(request) {
|
|
54
54
|
return __awaiter(this, void 0, void 0, function () {
|
|
55
|
-
var signRequestOptions, signedRequest, response, dateString;
|
|
56
|
-
|
|
57
|
-
|
|
55
|
+
var signRequestOptions, _a, signedRequest, response, dateString;
|
|
56
|
+
var _b;
|
|
57
|
+
return __generator(this, function (_c) {
|
|
58
|
+
switch (_c.label) {
|
|
58
59
|
case 0:
|
|
59
60
|
currentSystemClockOffset = currentSystemClockOffset !== null && currentSystemClockOffset !== void 0 ? currentSystemClockOffset : 0;
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
signingRegion: region,
|
|
64
|
-
signingService: service,
|
|
65
|
-
};
|
|
66
|
-
return [4 /*yield*/, (0, signatureV4_1.signRequest)(request, signRequestOptions)];
|
|
61
|
+
_b = {};
|
|
62
|
+
if (!(typeof credentials === 'function')) return [3 /*break*/, 2];
|
|
63
|
+
return [4 /*yield*/, credentials()];
|
|
67
64
|
case 1:
|
|
68
|
-
|
|
69
|
-
return [
|
|
65
|
+
_a = _c.sent();
|
|
66
|
+
return [3 /*break*/, 3];
|
|
70
67
|
case 2:
|
|
71
|
-
|
|
68
|
+
_a = credentials;
|
|
69
|
+
_c.label = 3;
|
|
70
|
+
case 3:
|
|
71
|
+
signRequestOptions = (_b.credentials = _a,
|
|
72
|
+
_b.signingDate = (0, getSkewCorrectedDate_1.getSkewCorrectedDate)(currentSystemClockOffset),
|
|
73
|
+
_b.signingRegion = region,
|
|
74
|
+
_b.signingService = service,
|
|
75
|
+
_b.uriEscapePath = uriEscapePath,
|
|
76
|
+
_b);
|
|
77
|
+
return [4 /*yield*/, (0, signatureV4_1.signRequest)(request, signRequestOptions)];
|
|
78
|
+
case 4:
|
|
79
|
+
signedRequest = _c.sent();
|
|
80
|
+
return [4 /*yield*/, next(signedRequest)];
|
|
81
|
+
case 5:
|
|
82
|
+
response = _c.sent();
|
|
72
83
|
dateString = getDateHeader(response);
|
|
73
84
|
if (dateString) {
|
|
74
85
|
currentSystemClockOffset = (0, getUpdatedSystemClockOffset_1.getUpdatedSystemClockOffset)(Date.parse(dateString), currentSystemClockOffset);
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
export { signRequest } from './signRequest';
|
|
2
2
|
export { presignUrl } from './presignUrl';
|
|
3
3
|
export { TOKEN_QUERY_PARAM } from './constants';
|
|
4
|
+
export { getHashedPayload } from './utils/getHashedPayload';
|
|
5
|
+
export type { SignRequestOptions, PresignUrlOptions } from './types';
|
|
@@ -2,7 +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.TOKEN_QUERY_PARAM = exports.presignUrl = exports.signRequest = void 0;
|
|
5
|
+
exports.getHashedPayload = exports.TOKEN_QUERY_PARAM = exports.presignUrl = exports.signRequest = void 0;
|
|
6
6
|
// TODO: V6 replace Signer
|
|
7
7
|
var signRequest_1 = require("./signRequest");
|
|
8
8
|
Object.defineProperty(exports, "signRequest", { enumerable: true, get: function () { return signRequest_1.signRequest; } });
|
|
@@ -10,3 +10,5 @@ var presignUrl_1 = require("./presignUrl");
|
|
|
10
10
|
Object.defineProperty(exports, "presignUrl", { enumerable: true, get: function () { return presignUrl_1.presignUrl; } });
|
|
11
11
|
var constants_1 = require("./constants");
|
|
12
12
|
Object.defineProperty(exports, "TOKEN_QUERY_PARAM", { enumerable: true, get: function () { return constants_1.TOKEN_QUERY_PARAM; } });
|
|
13
|
+
var getHashedPayload_1 = require("./utils/getHashedPayload");
|
|
14
|
+
Object.defineProperty(exports, "getHashedPayload", { enumerable: true, get: function () { return getHashedPayload_1.getHashedPayload; } });
|
|
@@ -2,7 +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.TOKEN_QUERY_PARAM = exports.presignUrl = exports.signRequest = void 0;
|
|
5
|
+
exports.getHashedPayload = exports.TOKEN_QUERY_PARAM = exports.presignUrl = exports.signRequest = void 0;
|
|
6
6
|
require("@aws-amplify/core/polyfills/URL");
|
|
7
7
|
// TODO: V6 replace Signer
|
|
8
8
|
var signRequest_1 = require("./signRequest");
|
|
@@ -11,3 +11,5 @@ var presignUrl_1 = require("./presignUrl");
|
|
|
11
11
|
Object.defineProperty(exports, "presignUrl", { enumerable: true, get: function () { return presignUrl_1.presignUrl; } });
|
|
12
12
|
var constants_1 = require("./constants");
|
|
13
13
|
Object.defineProperty(exports, "TOKEN_QUERY_PARAM", { enumerable: true, get: function () { return constants_1.TOKEN_QUERY_PARAM; } });
|
|
14
|
+
var getHashedPayload_1 = require("./utils/getHashedPayload");
|
|
15
|
+
Object.defineProperty(exports, "getHashedPayload", { enumerable: true, get: function () { return getHashedPayload_1.getHashedPayload; } });
|