@aws-amplify/core 6.4.7-local-stack.0aa9031.0 → 6.4.7-next-15.7992a88.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/dist/cjs/Platform/version.js +1 -1
- package/dist/cjs/Platform/version.js.map +1 -1
- package/dist/cjs/awsClients/cognitoIdentity/base.js +69 -0
- package/dist/cjs/awsClients/cognitoIdentity/base.js.map +1 -0
- package/dist/cjs/awsClients/cognitoIdentity/getCredentialsForIdentity.js +41 -0
- package/dist/cjs/awsClients/cognitoIdentity/getCredentialsForIdentity.js.map +1 -0
- package/dist/cjs/awsClients/cognitoIdentity/getId.js +32 -0
- package/dist/cjs/awsClients/cognitoIdentity/getId.js.map +1 -0
- package/dist/cjs/awsClients/cognitoIdentity/index.js +11 -0
- package/dist/cjs/awsClients/cognitoIdentity/index.js.map +1 -0
- package/dist/cjs/{foundation/factories/serviceClients/cognitoIdentity/types/sdk.js → awsClients/cognitoIdentity/types.js} +1 -1
- package/dist/cjs/awsClients/cognitoIdentity/types.js.map +1 -0
- package/dist/cjs/index.js +5 -6
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/Platform/version.d.ts +1 -1
- package/dist/esm/Platform/version.mjs +1 -1
- package/dist/esm/Platform/version.mjs.map +1 -1
- package/dist/esm/awsClients/cognitoIdentity/base.d.ts +29 -0
- package/dist/esm/awsClients/cognitoIdentity/base.mjs +73 -0
- package/dist/esm/awsClients/cognitoIdentity/base.mjs.map +1 -0
- package/dist/esm/awsClients/cognitoIdentity/getCredentialsForIdentity.d.ts +18 -0
- package/dist/esm/awsClients/cognitoIdentity/getCredentialsForIdentity.mjs +47 -0
- package/dist/esm/awsClients/cognitoIdentity/getCredentialsForIdentity.mjs.map +1 -0
- package/dist/esm/awsClients/cognitoIdentity/getId.d.ts +18 -0
- package/dist/esm/awsClients/cognitoIdentity/getId.mjs +38 -0
- package/dist/esm/awsClients/cognitoIdentity/getId.mjs.map +1 -0
- package/dist/esm/awsClients/cognitoIdentity/index.d.ts +2 -0
- package/dist/esm/awsClients/cognitoIdentity/index.mjs +3 -0
- package/dist/esm/{foundation/factories/middleware → awsClients/cognitoIdentity}/index.mjs.map +1 -1
- package/dist/esm/awsClients/cognitoIdentity/types.mjs +2 -0
- package/dist/esm/awsClients/cognitoIdentity/types.mjs.map +1 -0
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.mjs +2 -3
- package/dist/esm/index.mjs.map +1 -1
- package/dist/esm/singleton/Auth/types.d.ts +0 -2
- package/package.json +3 -3
- package/src/Platform/version.ts +1 -1
- package/src/awsClients/cognitoIdentity/base.ts +101 -0
- package/src/awsClients/cognitoIdentity/getCredentialsForIdentity.ts +77 -0
- package/src/awsClients/cognitoIdentity/getId.ts +61 -0
- package/src/awsClients/cognitoIdentity/index.ts +9 -0
- package/src/{foundation/factories/serviceClients/cognitoIdentity/types/sdk.ts → awsClients/cognitoIdentity/types.ts} +2 -0
- package/src/index.ts +6 -5
- package/src/singleton/Auth/types.ts +0 -2
- package/dist/cjs/foundation/factories/middleware/createDisableCacheMiddleware.js +0 -15
- package/dist/cjs/foundation/factories/middleware/createDisableCacheMiddleware.js.map +0 -1
- package/dist/cjs/foundation/factories/middleware/index.js +0 -9
- package/dist/cjs/foundation/factories/middleware/index.js.map +0 -1
- package/dist/cjs/foundation/factories/serviceClients/cognitoIdentity/cognitoIdentityPoolEndpointResolver.js +0 -14
- package/dist/cjs/foundation/factories/serviceClients/cognitoIdentity/cognitoIdentityPoolEndpointResolver.js.map +0 -1
- package/dist/cjs/foundation/factories/serviceClients/cognitoIdentity/constants.js +0 -18
- package/dist/cjs/foundation/factories/serviceClients/cognitoIdentity/constants.js.map +0 -1
- package/dist/cjs/foundation/factories/serviceClients/cognitoIdentity/createGetCredentialsForIdentityClient.js +0 -37
- package/dist/cjs/foundation/factories/serviceClients/cognitoIdentity/createGetCredentialsForIdentityClient.js.map +0 -1
- package/dist/cjs/foundation/factories/serviceClients/cognitoIdentity/createGetIdClient.js +0 -32
- package/dist/cjs/foundation/factories/serviceClients/cognitoIdentity/createGetIdClient.js.map +0 -1
- package/dist/cjs/foundation/factories/serviceClients/cognitoIdentity/handler/cognitoIdentityTransferHandler.js +0 -17
- package/dist/cjs/foundation/factories/serviceClients/cognitoIdentity/handler/cognitoIdentityTransferHandler.js.map +0 -1
- package/dist/cjs/foundation/factories/serviceClients/cognitoIdentity/handler/index.js +0 -9
- package/dist/cjs/foundation/factories/serviceClients/cognitoIdentity/handler/index.js.map +0 -1
- package/dist/cjs/foundation/factories/serviceClients/cognitoIdentity/index.js +0 -13
- package/dist/cjs/foundation/factories/serviceClients/cognitoIdentity/index.js.map +0 -1
- package/dist/cjs/foundation/factories/serviceClients/cognitoIdentity/serde/createClientSerializer.js +0 -24
- package/dist/cjs/foundation/factories/serviceClients/cognitoIdentity/serde/createClientSerializer.js.map +0 -1
- package/dist/cjs/foundation/factories/serviceClients/cognitoIdentity/serde/index.js +0 -9
- package/dist/cjs/foundation/factories/serviceClients/cognitoIdentity/serde/index.js.map +0 -1
- package/dist/cjs/foundation/factories/serviceClients/cognitoIdentity/types/index.js +0 -9
- package/dist/cjs/foundation/factories/serviceClients/cognitoIdentity/types/index.js.map +0 -1
- package/dist/cjs/foundation/factories/serviceClients/cognitoIdentity/types/sdk.js.map +0 -1
- package/dist/cjs/foundation/factories/serviceClients/cognitoIdentity/types/serviceClient.js +0 -6
- package/dist/cjs/foundation/factories/serviceClients/cognitoIdentity/types/serviceClient.js.map +0 -1
- package/dist/esm/foundation/factories/middleware/createDisableCacheMiddleware.d.ts +0 -5
- package/dist/esm/foundation/factories/middleware/createDisableCacheMiddleware.mjs +0 -12
- package/dist/esm/foundation/factories/middleware/createDisableCacheMiddleware.mjs.map +0 -1
- package/dist/esm/foundation/factories/middleware/index.d.ts +0 -1
- package/dist/esm/foundation/factories/middleware/index.mjs +0 -2
- package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/cognitoIdentityPoolEndpointResolver.d.ts +0 -4
- package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/cognitoIdentityPoolEndpointResolver.mjs +0 -27
- package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/cognitoIdentityPoolEndpointResolver.mjs.map +0 -1
- package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/constants.d.ts +0 -10
- package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/constants.mjs +0 -23
- package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/constants.mjs.map +0 -1
- package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/createGetCredentialsForIdentityClient.d.ts +0 -14
- package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/createGetCredentialsForIdentityClient.mjs +0 -42
- package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/createGetCredentialsForIdentityClient.mjs.map +0 -1
- package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/createGetIdClient.d.ts +0 -14
- package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/createGetIdClient.mjs +0 -37
- package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/createGetIdClient.mjs.map +0 -1
- package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/handler/cognitoIdentityTransferHandler.d.ts +0 -8
- package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/handler/cognitoIdentityTransferHandler.mjs +0 -22
- package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/handler/cognitoIdentityTransferHandler.mjs.map +0 -1
- package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/handler/index.d.ts +0 -1
- package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/handler/index.mjs +0 -2
- package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/handler/index.mjs.map +0 -1
- package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/index.d.ts +0 -3
- package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/index.mjs +0 -4
- package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/index.mjs.map +0 -1
- package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/serde/createClientSerializer.d.ts +0 -3
- package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/serde/createClientSerializer.mjs +0 -20
- package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/serde/createClientSerializer.mjs.map +0 -1
- package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/serde/index.d.ts +0 -1
- package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/serde/index.mjs +0 -2
- package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/serde/index.mjs.map +0 -1
- package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/types/index.d.ts +0 -3
- package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/types/index.mjs +0 -2
- package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/types/index.mjs.map +0 -1
- package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/types/sdk.mjs +0 -2
- package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/types/sdk.mjs.map +0 -1
- package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/types/serviceClient.d.ts +0 -6
- package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/types/serviceClient.mjs +0 -2
- package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/types/serviceClient.mjs.map +0 -1
- package/src/foundation/factories/middleware/createDisableCacheMiddleware.ts +0 -18
- package/src/foundation/factories/middleware/index.ts +0 -4
- package/src/foundation/factories/serviceClients/cognitoIdentity/cognitoIdentityPoolEndpointResolver.ts +0 -15
- package/src/foundation/factories/serviceClients/cognitoIdentity/constants.ts +0 -20
- package/src/foundation/factories/serviceClients/cognitoIdentity/createGetCredentialsForIdentityClient.ts +0 -62
- package/src/foundation/factories/serviceClients/cognitoIdentity/createGetIdClient.ts +0 -48
- package/src/foundation/factories/serviceClients/cognitoIdentity/handler/cognitoIdentityTransferHandler.ts +0 -23
- package/src/foundation/factories/serviceClients/cognitoIdentity/handler/index.ts +0 -4
- package/src/foundation/factories/serviceClients/cognitoIdentity/index.ts +0 -6
- package/src/foundation/factories/serviceClients/cognitoIdentity/serde/createClientSerializer.ts +0 -29
- package/src/foundation/factories/serviceClients/cognitoIdentity/serde/index.ts +0 -4
- package/src/foundation/factories/serviceClients/cognitoIdentity/types/index.ts +0 -9
- package/src/foundation/factories/serviceClients/cognitoIdentity/types/serviceClient.ts +0 -8
- /package/dist/esm/{foundation/factories/serviceClients/cognitoIdentity/types/sdk.d.ts → awsClients/cognitoIdentity/types.d.ts} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../../../src/foundation/factories/serviceClients/cognitoIdentity/types/index.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst tslib_1 = require(\"tslib\");\ntslib_1.__exportStar(require(\"./sdk\"), exports);\ntslib_1.__exportStar(require(\"./serviceClient\"), exports);\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;AACjC,OAAO,CAAC,YAAY,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,CAAC;AAChD,OAAO,CAAC,YAAY,CAAC,OAAO,CAAC,iBAAiB,CAAC,EAAE,OAAO,CAAC;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sdk.js","sources":["../../../../../../../src/foundation/factories/serviceClients/cognitoIdentity/types/sdk.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;;"}
|
package/dist/cjs/foundation/factories/serviceClients/cognitoIdentity/types/serviceClient.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"serviceClient.js","sources":["../../../../../../../src/foundation/factories/serviceClients/cognitoIdentity/types/serviceClient.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;;"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { HttpRequest, HttpResponse, Middleware } from '../../../clients';
|
|
2
|
-
/**
|
|
3
|
-
* A Cognito Identity-specific middleware that disables caching for all requests.
|
|
4
|
-
*/
|
|
5
|
-
export declare const createDisableCacheMiddleware: Middleware<HttpRequest, HttpResponse, Record<string, unknown>>;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
/**
|
|
4
|
-
* A Cognito Identity-specific middleware that disables caching for all requests.
|
|
5
|
-
*/
|
|
6
|
-
const createDisableCacheMiddleware = () => next => async function disableCacheMiddleware(request) {
|
|
7
|
-
request.headers['cache-control'] = 'no-store';
|
|
8
|
-
return next(request);
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
export { createDisableCacheMiddleware };
|
|
12
|
-
//# sourceMappingURL=createDisableCacheMiddleware.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"createDisableCacheMiddleware.mjs","sources":["../../../../../src/foundation/factories/middleware/createDisableCacheMiddleware.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * A Cognito Identity-specific middleware that disables caching for all requests.\n */\nexport const createDisableCacheMiddleware = () => next => async function disableCacheMiddleware(request) {\n request.headers['cache-control'] = 'no-store';\n return next(request);\n};\n"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACY,MAAC,4BAA4B,GAAG,MAAM,IAAI,IAAI,eAAe,sBAAsB,CAAC,OAAO,EAAE;AACzG,IAAI,OAAO,CAAC,OAAO,CAAC,eAAe,CAAC,GAAG,UAAU,CAAC;AAClD,IAAI,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC;AACzB;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { createDisableCacheMiddleware } from './createDisableCacheMiddleware';
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { getDnsSuffix } from '../../../../clients/endpoints/getDnsSuffix.mjs';
|
|
2
|
-
import '../../../../types/errors.mjs';
|
|
3
|
-
import '../../../../errors/errorHelpers.mjs';
|
|
4
|
-
import '../../../../utils/getClientInfo/getClientInfo.mjs';
|
|
5
|
-
import '../../../../utils/retry/retry.mjs';
|
|
6
|
-
import '@aws-crypto/sha256-js';
|
|
7
|
-
import '@smithy/util-hex-encoding';
|
|
8
|
-
import { AmplifyUrl } from '../../../../utils/amplifyUrl/index.mjs';
|
|
9
|
-
import '../../../../parseAWSExports.mjs';
|
|
10
|
-
import 'uuid';
|
|
11
|
-
import '../../../../singleton/Auth/utils/errorHelpers.mjs';
|
|
12
|
-
import '../../../../Platform/index.mjs';
|
|
13
|
-
import '../../../../Platform/types.mjs';
|
|
14
|
-
import '../../../../BackgroundProcessManager/types.mjs';
|
|
15
|
-
import '../../../../Reachability/Reachability.mjs';
|
|
16
|
-
import '../../../../Hub/index.mjs';
|
|
17
|
-
import '../../../../utils/sessionListener/index.mjs';
|
|
18
|
-
import { COGNITO_IDENTITY_SERVICE_NAME } from './constants.mjs';
|
|
19
|
-
|
|
20
|
-
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
21
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
22
|
-
const cognitoIdentityPoolEndpointResolver = ({ region, }) => ({
|
|
23
|
-
url: new AmplifyUrl(`https://${COGNITO_IDENTITY_SERVICE_NAME}.${region}.${getDnsSuffix(region)}`),
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
export { cognitoIdentityPoolEndpointResolver };
|
|
27
|
-
//# sourceMappingURL=cognitoIdentityPoolEndpointResolver.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cognitoIdentityPoolEndpointResolver.mjs","sources":["../../../../../../src/foundation/factories/serviceClients/cognitoIdentity/cognitoIdentityPoolEndpointResolver.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { getDnsSuffix } from '../../../../clients';\nimport { AmplifyUrl } from '../../../../libraryUtils';\nimport { COGNITO_IDENTITY_SERVICE_NAME } from './constants';\nexport const cognitoIdentityPoolEndpointResolver = ({ region, }) => ({\n url: new AmplifyUrl(`https://${COGNITO_IDENTITY_SERVICE_NAME}.${region}.${getDnsSuffix(region)}`),\n});\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AACA;AAIY,MAAC,mCAAmC,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM;AACrE,IAAI,GAAG,EAAE,IAAI,UAAU,CAAC,CAAC,QAAQ,EAAE,6BAA6B,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;AACrG,CAAC;;;;"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The service name used to sign requests if the API requires authentication.
|
|
3
|
-
*/
|
|
4
|
-
export declare const COGNITO_IDENTITY_SERVICE_NAME = "cognito-identity";
|
|
5
|
-
export declare const DEFAULT_SERVICE_CLIENT_API_CONFIG: {
|
|
6
|
-
service: string;
|
|
7
|
-
retryDecider: (response?: import("../../../../clients").HttpResponse | undefined, error?: unknown) => Promise<boolean>;
|
|
8
|
-
computeDelay: (attempt: number) => number;
|
|
9
|
-
cache: string;
|
|
10
|
-
};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import '../../../../types/errors.mjs';
|
|
2
|
-
import '../../../../errors/errorHelpers.mjs';
|
|
3
|
-
import { jitteredBackoff } from '../../../../clients/middleware/retry/jitteredBackoff.mjs';
|
|
4
|
-
import { getRetryDecider } from '../../../../clients/middleware/retry/defaultRetryDecider.mjs';
|
|
5
|
-
import '@aws-crypto/sha256-js';
|
|
6
|
-
import '@smithy/util-hex-encoding';
|
|
7
|
-
import { parseJsonError } from '../../../../clients/serde/json.mjs';
|
|
8
|
-
|
|
9
|
-
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
10
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
11
|
-
/**
|
|
12
|
-
* The service name used to sign requests if the API requires authentication.
|
|
13
|
-
*/
|
|
14
|
-
const COGNITO_IDENTITY_SERVICE_NAME = 'cognito-identity';
|
|
15
|
-
const DEFAULT_SERVICE_CLIENT_API_CONFIG = {
|
|
16
|
-
service: COGNITO_IDENTITY_SERVICE_NAME,
|
|
17
|
-
retryDecider: getRetryDecider(parseJsonError),
|
|
18
|
-
computeDelay: jitteredBackoff,
|
|
19
|
-
cache: 'no-store',
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
export { COGNITO_IDENTITY_SERVICE_NAME, DEFAULT_SERVICE_CLIENT_API_CONFIG };
|
|
23
|
-
//# sourceMappingURL=constants.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constants.mjs","sources":["../../../../../../src/foundation/factories/serviceClients/cognitoIdentity/constants.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { getRetryDecider, jitteredBackoff, parseJsonError, } from '../../../../clients';\n/**\n * The service name used to sign requests if the API requires authentication.\n */\nexport const COGNITO_IDENTITY_SERVICE_NAME = 'cognito-identity';\nexport const DEFAULT_SERVICE_CLIENT_API_CONFIG = {\n service: COGNITO_IDENTITY_SERVICE_NAME,\n retryDecider: getRetryDecider(parseJsonError),\n computeDelay: jitteredBackoff,\n cache: 'no-store',\n};\n"],"names":[],"mappings":";;;;;;;;AAAA;AACA;AAEA;AACA;AACA;AACY,MAAC,6BAA6B,GAAG,mBAAmB;AACpD,MAAC,iCAAiC,GAAG;AACjD,IAAI,OAAO,EAAE,6BAA6B;AAC1C,IAAI,YAAY,EAAE,eAAe,CAAC,cAAc,CAAC;AACjD,IAAI,YAAY,EAAE,eAAe;AACjC,IAAI,KAAK,EAAE,UAAU;AACrB;;;;"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { HttpResponse } from '../../../../clients';
|
|
2
|
-
import { GetCredentialsForIdentityCommandOutput, GetCredentialsForIdentityInput, ServiceClientFactoryInput } from './types';
|
|
3
|
-
export declare const createGetCredentialsForIdentityClient: (config: ServiceClientFactoryInput) => (config: {
|
|
4
|
-
userAgentValue?: string | undefined;
|
|
5
|
-
endpointResolver?: (((options: import("../../../../clients").EndpointResolverOptions, input?: any) => import("../../../../clients").Endpoint) & ((options: import("../../../../clients").EndpointResolverOptions) => {
|
|
6
|
-
url: URL;
|
|
7
|
-
})) | undefined;
|
|
8
|
-
service?: string | undefined;
|
|
9
|
-
retryDecider?: (((response?: HttpResponse | undefined, error?: unknown) => Promise<boolean>) & ((response?: HttpResponse | undefined, error?: unknown) => Promise<boolean>)) | undefined;
|
|
10
|
-
computeDelay?: ((attempt: number) => number) | undefined;
|
|
11
|
-
cache?: "default" | "force-cache" | "no-cache" | "no-store" | "only-if-cached" | "reload" | undefined;
|
|
12
|
-
} & {
|
|
13
|
-
[x: string]: unknown;
|
|
14
|
-
}, input: GetCredentialsForIdentityInput) => Promise<GetCredentialsForIdentityCommandOutput>;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import '../../../../types/errors.mjs';
|
|
2
|
-
import '../../../../errors/errorHelpers.mjs';
|
|
3
|
-
import '../../../../utils/getClientInfo/getClientInfo.mjs';
|
|
4
|
-
import '../../../../utils/retry/retry.mjs';
|
|
5
|
-
import '@aws-crypto/sha256-js';
|
|
6
|
-
import '@smithy/util-hex-encoding';
|
|
7
|
-
import { parseMetadata } from '../../../../clients/serde/responseInfo.mjs';
|
|
8
|
-
import { parseJsonError, parseJsonBody } from '../../../../clients/serde/json.mjs';
|
|
9
|
-
import { composeServiceApi } from '../../../../clients/internal/composeServiceApi.mjs';
|
|
10
|
-
import { getAmplifyUserAgent } from '../../../../Platform/index.mjs';
|
|
11
|
-
import { DEFAULT_SERVICE_CLIENT_API_CONFIG } from './constants.mjs';
|
|
12
|
-
import { cognitoIdentityTransferHandler } from './handler/cognitoIdentityTransferHandler.mjs';
|
|
13
|
-
import { createClientSerializer } from './serde/createClientSerializer.mjs';
|
|
14
|
-
|
|
15
|
-
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
16
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
17
|
-
const createGetCredentialsForIdentityClient = (config) => composeServiceApi(cognitoIdentityTransferHandler, createClientSerializer('GetCredentialsForIdentity'), getCredentialsForIdentityDeserializer, {
|
|
18
|
-
...DEFAULT_SERVICE_CLIENT_API_CONFIG,
|
|
19
|
-
...config,
|
|
20
|
-
userAgentValue: getAmplifyUserAgent(),
|
|
21
|
-
});
|
|
22
|
-
const getCredentialsForIdentityDeserializer = async (response) => {
|
|
23
|
-
if (response.statusCode >= 300) {
|
|
24
|
-
const error = await parseJsonError(response);
|
|
25
|
-
throw error;
|
|
26
|
-
}
|
|
27
|
-
else {
|
|
28
|
-
const body = await parseJsonBody(response);
|
|
29
|
-
return {
|
|
30
|
-
IdentityId: body.IdentityId,
|
|
31
|
-
Credentials: deserializeCredentials(body.Credentials),
|
|
32
|
-
$metadata: parseMetadata(response),
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
const deserializeCredentials = ({ Expiration, ...rest } = {}) => ({
|
|
37
|
-
...rest,
|
|
38
|
-
Expiration: Expiration && new Date(Expiration * 1000),
|
|
39
|
-
});
|
|
40
|
-
|
|
41
|
-
export { createGetCredentialsForIdentityClient };
|
|
42
|
-
//# sourceMappingURL=createGetCredentialsForIdentityClient.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"createGetCredentialsForIdentityClient.mjs","sources":["../../../../../../src/foundation/factories/serviceClients/cognitoIdentity/createGetCredentialsForIdentityClient.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { parseJsonBody, parseJsonError, parseMetadata, } from '../../../../clients';\nimport { composeServiceApi } from '../../../../clients/internal';\nimport { getAmplifyUserAgent } from '../../../../Platform';\nimport { DEFAULT_SERVICE_CLIENT_API_CONFIG } from './constants';\nimport { cognitoIdentityTransferHandler } from './handler';\nimport { createClientSerializer } from './serde';\nexport const createGetCredentialsForIdentityClient = (config) => composeServiceApi(cognitoIdentityTransferHandler, createClientSerializer('GetCredentialsForIdentity'), getCredentialsForIdentityDeserializer, {\n ...DEFAULT_SERVICE_CLIENT_API_CONFIG,\n ...config,\n userAgentValue: getAmplifyUserAgent(),\n});\nconst getCredentialsForIdentityDeserializer = async (response) => {\n if (response.statusCode >= 300) {\n const error = await parseJsonError(response);\n throw error;\n }\n else {\n const body = await parseJsonBody(response);\n return {\n IdentityId: body.IdentityId,\n Credentials: deserializeCredentials(body.Credentials),\n $metadata: parseMetadata(response),\n };\n }\n};\nconst deserializeCredentials = ({ Expiration, ...rest } = {}) => ({\n ...rest,\n Expiration: Expiration && new Date(Expiration * 1000),\n});\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA;AACA;AAOY,MAAC,qCAAqC,GAAG,CAAC,MAAM,KAAK,iBAAiB,CAAC,8BAA8B,EAAE,sBAAsB,CAAC,2BAA2B,CAAC,EAAE,qCAAqC,EAAE;AAC/M,IAAI,GAAG,iCAAiC;AACxC,IAAI,GAAG,MAAM;AACb,IAAI,cAAc,EAAE,mBAAmB,EAAE;AACzC,CAAC,EAAE;AACH,MAAM,qCAAqC,GAAG,OAAO,QAAQ,KAAK;AAClE,IAAI,IAAI,QAAQ,CAAC,UAAU,IAAI,GAAG,EAAE;AACpC,QAAQ,MAAM,KAAK,GAAG,MAAM,cAAc,CAAC,QAAQ,CAAC,CAAC;AACrD,QAAQ,MAAM,KAAK,CAAC;AACpB,KAAK;AACL,SAAS;AACT,QAAQ,MAAM,IAAI,GAAG,MAAM,aAAa,CAAC,QAAQ,CAAC,CAAC;AACnD,QAAQ,OAAO;AACf,YAAY,UAAU,EAAE,IAAI,CAAC,UAAU;AACvC,YAAY,WAAW,EAAE,sBAAsB,CAAC,IAAI,CAAC,WAAW,CAAC;AACjE,YAAY,SAAS,EAAE,aAAa,CAAC,QAAQ,CAAC;AAC9C,SAAS,CAAC;AACV,KAAK;AACL,CAAC,CAAC;AACF,MAAM,sBAAsB,GAAG,CAAC,EAAE,UAAU,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,MAAM;AAClE,IAAI,GAAG,IAAI;AACX,IAAI,UAAU,EAAE,UAAU,IAAI,IAAI,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;AACzD,CAAC,CAAC;;;;"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { HttpResponse } from '../../../../clients';
|
|
2
|
-
import { GetIdCommandOutput, ServiceClientFactoryInput } from './types';
|
|
3
|
-
export declare const createGetIdClient: (config: ServiceClientFactoryInput) => (config: {
|
|
4
|
-
userAgentValue?: string | undefined;
|
|
5
|
-
endpointResolver?: (((options: import("../../../../clients").EndpointResolverOptions, input?: any) => import("../../../../clients").Endpoint) & ((options: import("../../../../clients").EndpointResolverOptions) => {
|
|
6
|
-
url: URL;
|
|
7
|
-
})) | undefined;
|
|
8
|
-
service?: string | undefined;
|
|
9
|
-
retryDecider?: (((response?: HttpResponse | undefined, error?: unknown) => Promise<boolean>) & ((response?: HttpResponse | undefined, error?: unknown) => Promise<boolean>)) | undefined;
|
|
10
|
-
computeDelay?: ((attempt: number) => number) | undefined;
|
|
11
|
-
cache?: "default" | "force-cache" | "no-cache" | "no-store" | "only-if-cached" | "reload" | undefined;
|
|
12
|
-
} & {
|
|
13
|
-
[x: string]: unknown;
|
|
14
|
-
}, input: import("./types").GetIdInput) => Promise<GetIdCommandOutput>;
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import '../../../../types/errors.mjs';
|
|
2
|
-
import '../../../../errors/errorHelpers.mjs';
|
|
3
|
-
import '../../../../utils/getClientInfo/getClientInfo.mjs';
|
|
4
|
-
import '../../../../utils/retry/retry.mjs';
|
|
5
|
-
import '@aws-crypto/sha256-js';
|
|
6
|
-
import '@smithy/util-hex-encoding';
|
|
7
|
-
import { parseMetadata } from '../../../../clients/serde/responseInfo.mjs';
|
|
8
|
-
import { parseJsonError, parseJsonBody } from '../../../../clients/serde/json.mjs';
|
|
9
|
-
import { composeServiceApi } from '../../../../clients/internal/composeServiceApi.mjs';
|
|
10
|
-
import { getAmplifyUserAgent } from '../../../../Platform/index.mjs';
|
|
11
|
-
import { DEFAULT_SERVICE_CLIENT_API_CONFIG } from './constants.mjs';
|
|
12
|
-
import { cognitoIdentityTransferHandler } from './handler/cognitoIdentityTransferHandler.mjs';
|
|
13
|
-
import { createClientSerializer } from './serde/createClientSerializer.mjs';
|
|
14
|
-
|
|
15
|
-
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
16
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
17
|
-
const createGetIdClient = (config) => composeServiceApi(cognitoIdentityTransferHandler, createClientSerializer('GetId'), getIdDeserializer, {
|
|
18
|
-
...DEFAULT_SERVICE_CLIENT_API_CONFIG,
|
|
19
|
-
...config,
|
|
20
|
-
userAgentValue: getAmplifyUserAgent(),
|
|
21
|
-
});
|
|
22
|
-
const getIdDeserializer = async (response) => {
|
|
23
|
-
if (response.statusCode >= 300) {
|
|
24
|
-
const error = await parseJsonError(response);
|
|
25
|
-
throw error;
|
|
26
|
-
}
|
|
27
|
-
else {
|
|
28
|
-
const body = await parseJsonBody(response);
|
|
29
|
-
return {
|
|
30
|
-
IdentityId: body.IdentityId,
|
|
31
|
-
$metadata: parseMetadata(response),
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
export { createGetIdClient };
|
|
37
|
-
//# sourceMappingURL=createGetIdClient.mjs.map
|
package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/createGetIdClient.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"createGetIdClient.mjs","sources":["../../../../../../src/foundation/factories/serviceClients/cognitoIdentity/createGetIdClient.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { parseJsonBody, parseJsonError, parseMetadata, } from '../../../../clients';\nimport { composeServiceApi } from '../../../../clients/internal';\nimport { getAmplifyUserAgent } from '../../../../Platform';\nimport { DEFAULT_SERVICE_CLIENT_API_CONFIG } from './constants';\nimport { cognitoIdentityTransferHandler } from './handler';\nimport { createClientSerializer } from './serde';\nexport const createGetIdClient = (config) => composeServiceApi(cognitoIdentityTransferHandler, createClientSerializer('GetId'), getIdDeserializer, {\n ...DEFAULT_SERVICE_CLIENT_API_CONFIG,\n ...config,\n userAgentValue: getAmplifyUserAgent(),\n});\nconst getIdDeserializer = async (response) => {\n if (response.statusCode >= 300) {\n const error = await parseJsonError(response);\n throw error;\n }\n else {\n const body = await parseJsonBody(response);\n return {\n IdentityId: body.IdentityId,\n $metadata: parseMetadata(response),\n };\n }\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA;AACA;AAOY,MAAC,iBAAiB,GAAG,CAAC,MAAM,KAAK,iBAAiB,CAAC,8BAA8B,EAAE,sBAAsB,CAAC,OAAO,CAAC,EAAE,iBAAiB,EAAE;AACnJ,IAAI,GAAG,iCAAiC;AACxC,IAAI,GAAG,MAAM;AACb,IAAI,cAAc,EAAE,mBAAmB,EAAE;AACzC,CAAC,EAAE;AACH,MAAM,iBAAiB,GAAG,OAAO,QAAQ,KAAK;AAC9C,IAAI,IAAI,QAAQ,CAAC,UAAU,IAAI,GAAG,EAAE;AACpC,QAAQ,MAAM,KAAK,GAAG,MAAM,cAAc,CAAC,QAAQ,CAAC,CAAC;AACrD,QAAQ,MAAM,KAAK,CAAC;AACpB,KAAK;AACL,SAAS;AACT,QAAQ,MAAM,IAAI,GAAG,MAAM,aAAa,CAAC,QAAQ,CAAC,CAAC;AACnD,QAAQ,OAAO;AACf,YAAY,UAAU,EAAE,IAAI,CAAC,UAAU;AACvC,YAAY,SAAS,EAAE,aAAa,CAAC,QAAQ,CAAC;AAC9C,SAAS,CAAC;AACV,KAAK;AACL,CAAC;;;;"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { HttpRequest, HttpResponse } from '../../../../../clients';
|
|
2
|
-
/**
|
|
3
|
-
* A Cognito Identity-specific transfer handler that does NOT sign requests, and
|
|
4
|
-
* disables caching.
|
|
5
|
-
*
|
|
6
|
-
* @internal
|
|
7
|
-
*/
|
|
8
|
-
export declare const cognitoIdentityTransferHandler: (request: HttpRequest, options: Record<string, unknown> & import("../../../../../clients").UserAgentOptions & import("../../../../../clients").RetryOptions<HttpResponse> & import("../../../../../clients").HttpTransferOptions) => Promise<HttpResponse>;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import '../../../../../types/errors.mjs';
|
|
2
|
-
import '../../../../../errors/errorHelpers.mjs';
|
|
3
|
-
import { unauthenticatedHandler } from '../../../../../clients/handlers/unauthenticated.mjs';
|
|
4
|
-
import '../../../../../utils/getClientInfo/getClientInfo.mjs';
|
|
5
|
-
import '../../../../../utils/retry/retry.mjs';
|
|
6
|
-
import '@aws-crypto/sha256-js';
|
|
7
|
-
import '@smithy/util-hex-encoding';
|
|
8
|
-
import { composeTransferHandler } from '../../../../../clients/internal/composeTransferHandler.mjs';
|
|
9
|
-
import { createDisableCacheMiddleware } from '../../../middleware/createDisableCacheMiddleware.mjs';
|
|
10
|
-
|
|
11
|
-
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
12
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
13
|
-
/**
|
|
14
|
-
* A Cognito Identity-specific transfer handler that does NOT sign requests, and
|
|
15
|
-
* disables caching.
|
|
16
|
-
*
|
|
17
|
-
* @internal
|
|
18
|
-
*/
|
|
19
|
-
const cognitoIdentityTransferHandler = composeTransferHandler(unauthenticatedHandler, [createDisableCacheMiddleware]);
|
|
20
|
-
|
|
21
|
-
export { cognitoIdentityTransferHandler };
|
|
22
|
-
//# sourceMappingURL=cognitoIdentityTransferHandler.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cognitoIdentityTransferHandler.mjs","sources":["../../../../../../../src/foundation/factories/serviceClients/cognitoIdentity/handler/cognitoIdentityTransferHandler.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { unauthenticatedHandler, } from '../../../../../clients';\nimport { composeTransferHandler } from '../../../../../clients/internal';\nimport { createDisableCacheMiddleware } from '../../../middleware';\n/**\n * A Cognito Identity-specific transfer handler that does NOT sign requests, and\n * disables caching.\n *\n * @internal\n */\nexport const cognitoIdentityTransferHandler = composeTransferHandler(unauthenticatedHandler, [createDisableCacheMiddleware]);\n"],"names":[],"mappings":";;;;;;;;;;AAAA;AACA;AAIA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,8BAA8B,GAAG,sBAAsB,CAAC,sBAAsB,EAAE,CAAC,4BAA4B,CAAC;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { cognitoIdentityTransferHandler } from './cognitoIdentityTransferHandler';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export { createGetCredentialsForIdentityClient } from './createGetCredentialsForIdentityClient.mjs';
|
|
2
|
-
export { createGetIdClient } from './createGetIdClient.mjs';
|
|
3
|
-
export { cognitoIdentityPoolEndpointResolver } from './cognitoIdentityPoolEndpointResolver.mjs';
|
|
4
|
-
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { Endpoint, Headers, HttpRequest } from '../../../../../clients';
|
|
2
|
-
export declare const createClientSerializer: <Input>(operation: string) => (input: Input, endpoint: Endpoint) => HttpRequest;
|
|
3
|
-
export declare const buildHttpRpcRequest: ({ url }: Endpoint, headers: Headers, body: any) => HttpRequest;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
const createClientSerializer = (operation) => (input, endpoint) => {
|
|
4
|
-
const headers = getSharedHeaders(operation);
|
|
5
|
-
const body = JSON.stringify(input);
|
|
6
|
-
return buildHttpRpcRequest(endpoint, headers, body);
|
|
7
|
-
};
|
|
8
|
-
const getSharedHeaders = (operation) => ({
|
|
9
|
-
'content-type': 'application/x-amz-json-1.1',
|
|
10
|
-
'x-amz-target': `AWSCognitoIdentityService.${operation}`,
|
|
11
|
-
});
|
|
12
|
-
const buildHttpRpcRequest = ({ url }, headers, body) => ({
|
|
13
|
-
headers,
|
|
14
|
-
url,
|
|
15
|
-
body,
|
|
16
|
-
method: 'POST',
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
export { buildHttpRpcRequest, createClientSerializer };
|
|
20
|
-
//# sourceMappingURL=createClientSerializer.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"createClientSerializer.mjs","sources":["../../../../../../../src/foundation/factories/serviceClients/cognitoIdentity/serde/createClientSerializer.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nexport const createClientSerializer = (operation) => (input, endpoint) => {\n const headers = getSharedHeaders(operation);\n const body = JSON.stringify(input);\n return buildHttpRpcRequest(endpoint, headers, body);\n};\nconst getSharedHeaders = (operation) => ({\n 'content-type': 'application/x-amz-json-1.1',\n 'x-amz-target': `AWSCognitoIdentityService.${operation}`,\n});\nexport const buildHttpRpcRequest = ({ url }, headers, body) => ({\n headers,\n url,\n body,\n method: 'POST',\n});\n"],"names":[],"mappings":"AAAA;AACA;AACY,MAAC,sBAAsB,GAAG,CAAC,SAAS,KAAK,CAAC,KAAK,EAAE,QAAQ,KAAK;AAC1E,IAAI,MAAM,OAAO,GAAG,gBAAgB,CAAC,SAAS,CAAC,CAAC;AAChD,IAAI,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;AACvC,IAAI,OAAO,mBAAmB,CAAC,QAAQ,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;AACxD,EAAE;AACF,MAAM,gBAAgB,GAAG,CAAC,SAAS,MAAM;AACzC,IAAI,cAAc,EAAE,4BAA4B;AAChD,IAAI,cAAc,EAAE,CAAC,0BAA0B,EAAE,SAAS,CAAC,CAAC;AAC5D,CAAC,CAAC,CAAC;AACS,MAAC,mBAAmB,GAAG,CAAC,EAAE,GAAG,EAAE,EAAE,OAAO,EAAE,IAAI,MAAM;AAChE,IAAI,OAAO;AACX,IAAI,GAAG;AACP,IAAI,IAAI;AACR,IAAI,MAAM,EAAE,MAAM;AAClB,CAAC;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { createClientSerializer } from './createClientSerializer';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sdk.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/types/serviceClient.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"serviceClient.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
|
|
4
|
-
import { HttpRequest, HttpResponse, Middleware } from '../../../clients';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* A Cognito Identity-specific middleware that disables caching for all requests.
|
|
8
|
-
*/
|
|
9
|
-
export const createDisableCacheMiddleware: Middleware<
|
|
10
|
-
HttpRequest,
|
|
11
|
-
HttpResponse,
|
|
12
|
-
Record<string, unknown>
|
|
13
|
-
> = () => next =>
|
|
14
|
-
async function disableCacheMiddleware(request) {
|
|
15
|
-
request.headers['cache-control'] = 'no-store';
|
|
16
|
-
|
|
17
|
-
return next(request);
|
|
18
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
|
|
4
|
-
import { EndpointResolverOptions, getDnsSuffix } from '../../../../clients';
|
|
5
|
-
import { AmplifyUrl } from '../../../../libraryUtils';
|
|
6
|
-
|
|
7
|
-
import { COGNITO_IDENTITY_SERVICE_NAME } from './constants';
|
|
8
|
-
|
|
9
|
-
export const cognitoIdentityPoolEndpointResolver = ({
|
|
10
|
-
region,
|
|
11
|
-
}: EndpointResolverOptions) => ({
|
|
12
|
-
url: new AmplifyUrl(
|
|
13
|
-
`https://${COGNITO_IDENTITY_SERVICE_NAME}.${region}.${getDnsSuffix(region)}`,
|
|
14
|
-
),
|
|
15
|
-
});
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
getRetryDecider,
|
|
6
|
-
jitteredBackoff,
|
|
7
|
-
parseJsonError,
|
|
8
|
-
} from '../../../../clients';
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* The service name used to sign requests if the API requires authentication.
|
|
12
|
-
*/
|
|
13
|
-
export const COGNITO_IDENTITY_SERVICE_NAME = 'cognito-identity';
|
|
14
|
-
|
|
15
|
-
export const DEFAULT_SERVICE_CLIENT_API_CONFIG = {
|
|
16
|
-
service: COGNITO_IDENTITY_SERVICE_NAME,
|
|
17
|
-
retryDecider: getRetryDecider(parseJsonError),
|
|
18
|
-
computeDelay: jitteredBackoff,
|
|
19
|
-
cache: 'no-store',
|
|
20
|
-
};
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
HttpResponse,
|
|
6
|
-
parseJsonBody,
|
|
7
|
-
parseJsonError,
|
|
8
|
-
parseMetadata,
|
|
9
|
-
} from '../../../../clients';
|
|
10
|
-
import { composeServiceApi } from '../../../../clients/internal';
|
|
11
|
-
import { getAmplifyUserAgent } from '../../../../Platform';
|
|
12
|
-
|
|
13
|
-
import { DEFAULT_SERVICE_CLIENT_API_CONFIG } from './constants';
|
|
14
|
-
import { cognitoIdentityTransferHandler } from './handler';
|
|
15
|
-
import { createClientSerializer } from './serde';
|
|
16
|
-
import {
|
|
17
|
-
Credentials,
|
|
18
|
-
GetCredentialsForIdentityCommandOutput,
|
|
19
|
-
GetCredentialsForIdentityInput,
|
|
20
|
-
ServiceClientFactoryInput,
|
|
21
|
-
} from './types';
|
|
22
|
-
|
|
23
|
-
export const createGetCredentialsForIdentityClient = (
|
|
24
|
-
config: ServiceClientFactoryInput,
|
|
25
|
-
) =>
|
|
26
|
-
composeServiceApi(
|
|
27
|
-
cognitoIdentityTransferHandler,
|
|
28
|
-
createClientSerializer<GetCredentialsForIdentityInput>(
|
|
29
|
-
'GetCredentialsForIdentity',
|
|
30
|
-
),
|
|
31
|
-
getCredentialsForIdentityDeserializer,
|
|
32
|
-
{
|
|
33
|
-
...DEFAULT_SERVICE_CLIENT_API_CONFIG,
|
|
34
|
-
...config,
|
|
35
|
-
userAgentValue: getAmplifyUserAgent(),
|
|
36
|
-
},
|
|
37
|
-
);
|
|
38
|
-
|
|
39
|
-
const getCredentialsForIdentityDeserializer = async (
|
|
40
|
-
response: HttpResponse,
|
|
41
|
-
): Promise<GetCredentialsForIdentityCommandOutput> => {
|
|
42
|
-
if (response.statusCode >= 300) {
|
|
43
|
-
const error = await parseJsonError(response);
|
|
44
|
-
throw error;
|
|
45
|
-
} else {
|
|
46
|
-
const body = await parseJsonBody(response);
|
|
47
|
-
|
|
48
|
-
return {
|
|
49
|
-
IdentityId: body.IdentityId,
|
|
50
|
-
Credentials: deserializeCredentials(body.Credentials),
|
|
51
|
-
$metadata: parseMetadata(response),
|
|
52
|
-
};
|
|
53
|
-
}
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
const deserializeCredentials = ({
|
|
57
|
-
Expiration,
|
|
58
|
-
...rest
|
|
59
|
-
}: Credentials = {}): Credentials => ({
|
|
60
|
-
...rest,
|
|
61
|
-
Expiration: Expiration && new Date((Expiration as any) * 1000),
|
|
62
|
-
});
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
HttpResponse,
|
|
6
|
-
parseJsonBody,
|
|
7
|
-
parseJsonError,
|
|
8
|
-
parseMetadata,
|
|
9
|
-
} from '../../../../clients';
|
|
10
|
-
import { composeServiceApi } from '../../../../clients/internal';
|
|
11
|
-
import { getAmplifyUserAgent } from '../../../../Platform';
|
|
12
|
-
|
|
13
|
-
import { DEFAULT_SERVICE_CLIENT_API_CONFIG } from './constants';
|
|
14
|
-
import { cognitoIdentityTransferHandler } from './handler';
|
|
15
|
-
import { createClientSerializer } from './serde';
|
|
16
|
-
import {
|
|
17
|
-
GetIdCommandInput,
|
|
18
|
-
GetIdCommandOutput,
|
|
19
|
-
ServiceClientFactoryInput,
|
|
20
|
-
} from './types';
|
|
21
|
-
|
|
22
|
-
export const createGetIdClient = (config: ServiceClientFactoryInput) =>
|
|
23
|
-
composeServiceApi(
|
|
24
|
-
cognitoIdentityTransferHandler,
|
|
25
|
-
createClientSerializer<GetIdCommandInput>('GetId'),
|
|
26
|
-
getIdDeserializer,
|
|
27
|
-
{
|
|
28
|
-
...DEFAULT_SERVICE_CLIENT_API_CONFIG,
|
|
29
|
-
...config,
|
|
30
|
-
userAgentValue: getAmplifyUserAgent(),
|
|
31
|
-
},
|
|
32
|
-
);
|
|
33
|
-
|
|
34
|
-
const getIdDeserializer = async (
|
|
35
|
-
response: HttpResponse,
|
|
36
|
-
): Promise<GetIdCommandOutput> => {
|
|
37
|
-
if (response.statusCode >= 300) {
|
|
38
|
-
const error = await parseJsonError(response);
|
|
39
|
-
throw error;
|
|
40
|
-
} else {
|
|
41
|
-
const body = await parseJsonBody(response);
|
|
42
|
-
|
|
43
|
-
return {
|
|
44
|
-
IdentityId: body.IdentityId,
|
|
45
|
-
$metadata: parseMetadata(response),
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
|
-
};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
HttpRequest,
|
|
6
|
-
HttpResponse,
|
|
7
|
-
unauthenticatedHandler,
|
|
8
|
-
} from '../../../../../clients';
|
|
9
|
-
import { composeTransferHandler } from '../../../../../clients/internal';
|
|
10
|
-
import { createDisableCacheMiddleware } from '../../../middleware';
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* A Cognito Identity-specific transfer handler that does NOT sign requests, and
|
|
14
|
-
* disables caching.
|
|
15
|
-
*
|
|
16
|
-
* @internal
|
|
17
|
-
*/
|
|
18
|
-
export const cognitoIdentityTransferHandler = composeTransferHandler<
|
|
19
|
-
[Parameters<typeof createDisableCacheMiddleware>[0]],
|
|
20
|
-
HttpRequest,
|
|
21
|
-
HttpResponse,
|
|
22
|
-
typeof unauthenticatedHandler
|
|
23
|
-
>(unauthenticatedHandler, [createDisableCacheMiddleware]);
|