@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.
Files changed (125) hide show
  1. package/dist/cjs/Platform/version.js +1 -1
  2. package/dist/cjs/Platform/version.js.map +1 -1
  3. package/dist/cjs/awsClients/cognitoIdentity/base.js +69 -0
  4. package/dist/cjs/awsClients/cognitoIdentity/base.js.map +1 -0
  5. package/dist/cjs/awsClients/cognitoIdentity/getCredentialsForIdentity.js +41 -0
  6. package/dist/cjs/awsClients/cognitoIdentity/getCredentialsForIdentity.js.map +1 -0
  7. package/dist/cjs/awsClients/cognitoIdentity/getId.js +32 -0
  8. package/dist/cjs/awsClients/cognitoIdentity/getId.js.map +1 -0
  9. package/dist/cjs/awsClients/cognitoIdentity/index.js +11 -0
  10. package/dist/cjs/awsClients/cognitoIdentity/index.js.map +1 -0
  11. package/dist/cjs/{foundation/factories/serviceClients/cognitoIdentity/types/sdk.js → awsClients/cognitoIdentity/types.js} +1 -1
  12. package/dist/cjs/awsClients/cognitoIdentity/types.js.map +1 -0
  13. package/dist/cjs/index.js +5 -6
  14. package/dist/cjs/index.js.map +1 -1
  15. package/dist/esm/Platform/version.d.ts +1 -1
  16. package/dist/esm/Platform/version.mjs +1 -1
  17. package/dist/esm/Platform/version.mjs.map +1 -1
  18. package/dist/esm/awsClients/cognitoIdentity/base.d.ts +29 -0
  19. package/dist/esm/awsClients/cognitoIdentity/base.mjs +73 -0
  20. package/dist/esm/awsClients/cognitoIdentity/base.mjs.map +1 -0
  21. package/dist/esm/awsClients/cognitoIdentity/getCredentialsForIdentity.d.ts +18 -0
  22. package/dist/esm/awsClients/cognitoIdentity/getCredentialsForIdentity.mjs +47 -0
  23. package/dist/esm/awsClients/cognitoIdentity/getCredentialsForIdentity.mjs.map +1 -0
  24. package/dist/esm/awsClients/cognitoIdentity/getId.d.ts +18 -0
  25. package/dist/esm/awsClients/cognitoIdentity/getId.mjs +38 -0
  26. package/dist/esm/awsClients/cognitoIdentity/getId.mjs.map +1 -0
  27. package/dist/esm/awsClients/cognitoIdentity/index.d.ts +2 -0
  28. package/dist/esm/awsClients/cognitoIdentity/index.mjs +3 -0
  29. package/dist/esm/{foundation/factories/middleware → awsClients/cognitoIdentity}/index.mjs.map +1 -1
  30. package/dist/esm/awsClients/cognitoIdentity/types.mjs +2 -0
  31. package/dist/esm/awsClients/cognitoIdentity/types.mjs.map +1 -0
  32. package/dist/esm/index.d.ts +1 -1
  33. package/dist/esm/index.mjs +2 -3
  34. package/dist/esm/index.mjs.map +1 -1
  35. package/dist/esm/singleton/Auth/types.d.ts +0 -2
  36. package/package.json +3 -3
  37. package/src/Platform/version.ts +1 -1
  38. package/src/awsClients/cognitoIdentity/base.ts +101 -0
  39. package/src/awsClients/cognitoIdentity/getCredentialsForIdentity.ts +77 -0
  40. package/src/awsClients/cognitoIdentity/getId.ts +61 -0
  41. package/src/awsClients/cognitoIdentity/index.ts +9 -0
  42. package/src/{foundation/factories/serviceClients/cognitoIdentity/types/sdk.ts → awsClients/cognitoIdentity/types.ts} +2 -0
  43. package/src/index.ts +6 -5
  44. package/src/singleton/Auth/types.ts +0 -2
  45. package/dist/cjs/foundation/factories/middleware/createDisableCacheMiddleware.js +0 -15
  46. package/dist/cjs/foundation/factories/middleware/createDisableCacheMiddleware.js.map +0 -1
  47. package/dist/cjs/foundation/factories/middleware/index.js +0 -9
  48. package/dist/cjs/foundation/factories/middleware/index.js.map +0 -1
  49. package/dist/cjs/foundation/factories/serviceClients/cognitoIdentity/cognitoIdentityPoolEndpointResolver.js +0 -14
  50. package/dist/cjs/foundation/factories/serviceClients/cognitoIdentity/cognitoIdentityPoolEndpointResolver.js.map +0 -1
  51. package/dist/cjs/foundation/factories/serviceClients/cognitoIdentity/constants.js +0 -18
  52. package/dist/cjs/foundation/factories/serviceClients/cognitoIdentity/constants.js.map +0 -1
  53. package/dist/cjs/foundation/factories/serviceClients/cognitoIdentity/createGetCredentialsForIdentityClient.js +0 -37
  54. package/dist/cjs/foundation/factories/serviceClients/cognitoIdentity/createGetCredentialsForIdentityClient.js.map +0 -1
  55. package/dist/cjs/foundation/factories/serviceClients/cognitoIdentity/createGetIdClient.js +0 -32
  56. package/dist/cjs/foundation/factories/serviceClients/cognitoIdentity/createGetIdClient.js.map +0 -1
  57. package/dist/cjs/foundation/factories/serviceClients/cognitoIdentity/handler/cognitoIdentityTransferHandler.js +0 -17
  58. package/dist/cjs/foundation/factories/serviceClients/cognitoIdentity/handler/cognitoIdentityTransferHandler.js.map +0 -1
  59. package/dist/cjs/foundation/factories/serviceClients/cognitoIdentity/handler/index.js +0 -9
  60. package/dist/cjs/foundation/factories/serviceClients/cognitoIdentity/handler/index.js.map +0 -1
  61. package/dist/cjs/foundation/factories/serviceClients/cognitoIdentity/index.js +0 -13
  62. package/dist/cjs/foundation/factories/serviceClients/cognitoIdentity/index.js.map +0 -1
  63. package/dist/cjs/foundation/factories/serviceClients/cognitoIdentity/serde/createClientSerializer.js +0 -24
  64. package/dist/cjs/foundation/factories/serviceClients/cognitoIdentity/serde/createClientSerializer.js.map +0 -1
  65. package/dist/cjs/foundation/factories/serviceClients/cognitoIdentity/serde/index.js +0 -9
  66. package/dist/cjs/foundation/factories/serviceClients/cognitoIdentity/serde/index.js.map +0 -1
  67. package/dist/cjs/foundation/factories/serviceClients/cognitoIdentity/types/index.js +0 -9
  68. package/dist/cjs/foundation/factories/serviceClients/cognitoIdentity/types/index.js.map +0 -1
  69. package/dist/cjs/foundation/factories/serviceClients/cognitoIdentity/types/sdk.js.map +0 -1
  70. package/dist/cjs/foundation/factories/serviceClients/cognitoIdentity/types/serviceClient.js +0 -6
  71. package/dist/cjs/foundation/factories/serviceClients/cognitoIdentity/types/serviceClient.js.map +0 -1
  72. package/dist/esm/foundation/factories/middleware/createDisableCacheMiddleware.d.ts +0 -5
  73. package/dist/esm/foundation/factories/middleware/createDisableCacheMiddleware.mjs +0 -12
  74. package/dist/esm/foundation/factories/middleware/createDisableCacheMiddleware.mjs.map +0 -1
  75. package/dist/esm/foundation/factories/middleware/index.d.ts +0 -1
  76. package/dist/esm/foundation/factories/middleware/index.mjs +0 -2
  77. package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/cognitoIdentityPoolEndpointResolver.d.ts +0 -4
  78. package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/cognitoIdentityPoolEndpointResolver.mjs +0 -27
  79. package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/cognitoIdentityPoolEndpointResolver.mjs.map +0 -1
  80. package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/constants.d.ts +0 -10
  81. package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/constants.mjs +0 -23
  82. package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/constants.mjs.map +0 -1
  83. package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/createGetCredentialsForIdentityClient.d.ts +0 -14
  84. package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/createGetCredentialsForIdentityClient.mjs +0 -42
  85. package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/createGetCredentialsForIdentityClient.mjs.map +0 -1
  86. package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/createGetIdClient.d.ts +0 -14
  87. package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/createGetIdClient.mjs +0 -37
  88. package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/createGetIdClient.mjs.map +0 -1
  89. package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/handler/cognitoIdentityTransferHandler.d.ts +0 -8
  90. package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/handler/cognitoIdentityTransferHandler.mjs +0 -22
  91. package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/handler/cognitoIdentityTransferHandler.mjs.map +0 -1
  92. package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/handler/index.d.ts +0 -1
  93. package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/handler/index.mjs +0 -2
  94. package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/handler/index.mjs.map +0 -1
  95. package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/index.d.ts +0 -3
  96. package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/index.mjs +0 -4
  97. package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/index.mjs.map +0 -1
  98. package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/serde/createClientSerializer.d.ts +0 -3
  99. package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/serde/createClientSerializer.mjs +0 -20
  100. package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/serde/createClientSerializer.mjs.map +0 -1
  101. package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/serde/index.d.ts +0 -1
  102. package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/serde/index.mjs +0 -2
  103. package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/serde/index.mjs.map +0 -1
  104. package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/types/index.d.ts +0 -3
  105. package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/types/index.mjs +0 -2
  106. package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/types/index.mjs.map +0 -1
  107. package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/types/sdk.mjs +0 -2
  108. package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/types/sdk.mjs.map +0 -1
  109. package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/types/serviceClient.d.ts +0 -6
  110. package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/types/serviceClient.mjs +0 -2
  111. package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/types/serviceClient.mjs.map +0 -1
  112. package/src/foundation/factories/middleware/createDisableCacheMiddleware.ts +0 -18
  113. package/src/foundation/factories/middleware/index.ts +0 -4
  114. package/src/foundation/factories/serviceClients/cognitoIdentity/cognitoIdentityPoolEndpointResolver.ts +0 -15
  115. package/src/foundation/factories/serviceClients/cognitoIdentity/constants.ts +0 -20
  116. package/src/foundation/factories/serviceClients/cognitoIdentity/createGetCredentialsForIdentityClient.ts +0 -62
  117. package/src/foundation/factories/serviceClients/cognitoIdentity/createGetIdClient.ts +0 -48
  118. package/src/foundation/factories/serviceClients/cognitoIdentity/handler/cognitoIdentityTransferHandler.ts +0 -23
  119. package/src/foundation/factories/serviceClients/cognitoIdentity/handler/index.ts +0 -4
  120. package/src/foundation/factories/serviceClients/cognitoIdentity/index.ts +0 -6
  121. package/src/foundation/factories/serviceClients/cognitoIdentity/serde/createClientSerializer.ts +0 -29
  122. package/src/foundation/factories/serviceClients/cognitoIdentity/serde/index.ts +0 -4
  123. package/src/foundation/factories/serviceClients/cognitoIdentity/types/index.ts +0 -9
  124. package/src/foundation/factories/serviceClients/cognitoIdentity/types/serviceClient.ts +0 -8
  125. /package/dist/esm/{foundation/factories/serviceClients/cognitoIdentity/types/sdk.d.ts → awsClients/cognitoIdentity/types.d.ts} +0 -0
@@ -3,5 +3,5 @@
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.version = void 0;
5
5
  // generated by genversion
6
- exports.version = '6.6.7-local-stack.0aa9031.0+0aa9031';
6
+ exports.version = '6.6.7-next-15.7992a88.0+7992a88';
7
7
  //# sourceMappingURL=version.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.js","sources":["../../../src/Platform/version.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.version = void 0;\n// generated by genversion\nexports.version = '6.6.7-local-stack.0aa9031.0+0aa9031';\n"],"names":[],"mappings":";;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,OAAO,GAAG,KAAK,CAAC,CAAC;AACzB;AACA,OAAO,CAAC,OAAO,GAAG,qCAAqC;;"}
1
+ {"version":3,"file":"version.js","sources":["../../../src/Platform/version.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.version = void 0;\n// generated by genversion\nexports.version = '6.6.7-next-15.7992a88.0+7992a88';\n"],"names":[],"mappings":";;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,OAAO,GAAG,KAAK,CAAC,CAAC;AACzB;AACA,OAAO,CAAC,OAAO,GAAG,iCAAiC;;"}
@@ -0,0 +1,69 @@
1
+ 'use strict';
2
+
3
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
4
+ // SPDX-License-Identifier: Apache-2.0
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.buildHttpRpcRequest = exports.getSharedHeaders = exports.defaultConfig = exports.cognitoIdentityTransferHandler = void 0;
7
+ const clients_1 = require("../../clients");
8
+ const composeTransferHandler_1 = require("../../clients/internal/composeTransferHandler");
9
+ const retry_1 = require("../../clients/middleware/retry");
10
+ const Platform_1 = require("../../Platform");
11
+ const detectFramework_1 = require("../../Platform/detectFramework");
12
+ const amplifyUrl_1 = require("../../utils/amplifyUrl");
13
+ /**
14
+ * The service name used to sign requests if the API requires authentication.
15
+ */
16
+ const SERVICE_NAME = 'cognito-identity';
17
+ /**
18
+ * The endpoint resolver function that returns the endpoint URL for a given region.
19
+ */
20
+ const endpointResolver = ({ region }) => ({
21
+ url: new amplifyUrl_1.AmplifyUrl(`https://cognito-identity.${region}.${(0, clients_1.getDnsSuffix)(region)}`),
22
+ });
23
+ /**
24
+ * A Cognito Identity-specific middleware that disables caching for all requests.
25
+ */
26
+ const disableCacheMiddlewareFactory = () => next => async function disableCacheMiddleware(request) {
27
+ request.headers['cache-control'] = 'no-store';
28
+ return next(request);
29
+ };
30
+ /**
31
+ * A Cognito Identity-specific transfer handler that does NOT sign requests, and
32
+ * disables caching.
33
+ *
34
+ * @internal
35
+ */
36
+ exports.cognitoIdentityTransferHandler = (0, composeTransferHandler_1.composeTransferHandler)(clients_1.unauthenticatedHandler, [disableCacheMiddlewareFactory]);
37
+ /**
38
+ * @internal
39
+ */
40
+ exports.defaultConfig = {
41
+ service: SERVICE_NAME,
42
+ endpointResolver,
43
+ retryDecider: (0, retry_1.getRetryDecider)(clients_1.parseJsonError),
44
+ computeDelay: retry_1.jitteredBackoff,
45
+ userAgentValue: (0, Platform_1.getAmplifyUserAgent)(),
46
+ cache: 'no-store',
47
+ };
48
+ (0, detectFramework_1.observeFrameworkChanges)(() => {
49
+ exports.defaultConfig.userAgentValue = (0, Platform_1.getAmplifyUserAgent)();
50
+ });
51
+ /**
52
+ * @internal
53
+ */
54
+ const getSharedHeaders = (operation) => ({
55
+ 'content-type': 'application/x-amz-json-1.1',
56
+ 'x-amz-target': `AWSCognitoIdentityService.${operation}`,
57
+ });
58
+ exports.getSharedHeaders = getSharedHeaders;
59
+ /**
60
+ * @internal
61
+ */
62
+ const buildHttpRpcRequest = ({ url }, headers, body) => ({
63
+ headers,
64
+ url,
65
+ body,
66
+ method: 'POST',
67
+ });
68
+ exports.buildHttpRpcRequest = buildHttpRpcRequest;
69
+ //# sourceMappingURL=base.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base.js","sources":["../../../../src/awsClients/cognitoIdentity/base.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 });\nexports.buildHttpRpcRequest = exports.getSharedHeaders = exports.defaultConfig = exports.cognitoIdentityTransferHandler = void 0;\nconst clients_1 = require(\"../../clients\");\nconst composeTransferHandler_1 = require(\"../../clients/internal/composeTransferHandler\");\nconst retry_1 = require(\"../../clients/middleware/retry\");\nconst Platform_1 = require(\"../../Platform\");\nconst detectFramework_1 = require(\"../../Platform/detectFramework\");\nconst amplifyUrl_1 = require(\"../../utils/amplifyUrl\");\n/**\n * The service name used to sign requests if the API requires authentication.\n */\nconst SERVICE_NAME = 'cognito-identity';\n/**\n * The endpoint resolver function that returns the endpoint URL for a given region.\n */\nconst endpointResolver = ({ region }) => ({\n url: new amplifyUrl_1.AmplifyUrl(`https://cognito-identity.${region}.${(0, clients_1.getDnsSuffix)(region)}`),\n});\n/**\n * A Cognito Identity-specific middleware that disables caching for all requests.\n */\nconst disableCacheMiddlewareFactory = () => next => async function disableCacheMiddleware(request) {\n request.headers['cache-control'] = 'no-store';\n return next(request);\n};\n/**\n * A Cognito Identity-specific transfer handler that does NOT sign requests, and\n * disables caching.\n *\n * @internal\n */\nexports.cognitoIdentityTransferHandler = (0, composeTransferHandler_1.composeTransferHandler)(clients_1.unauthenticatedHandler, [disableCacheMiddlewareFactory]);\n/**\n * @internal\n */\nexports.defaultConfig = {\n service: SERVICE_NAME,\n endpointResolver,\n retryDecider: (0, retry_1.getRetryDecider)(clients_1.parseJsonError),\n computeDelay: retry_1.jitteredBackoff,\n userAgentValue: (0, Platform_1.getAmplifyUserAgent)(),\n cache: 'no-store',\n};\n(0, detectFramework_1.observeFrameworkChanges)(() => {\n exports.defaultConfig.userAgentValue = (0, Platform_1.getAmplifyUserAgent)();\n});\n/**\n * @internal\n */\nconst getSharedHeaders = (operation) => ({\n 'content-type': 'application/x-amz-json-1.1',\n 'x-amz-target': `AWSCognitoIdentityService.${operation}`,\n});\nexports.getSharedHeaders = getSharedHeaders;\n/**\n * @internal\n */\nconst buildHttpRpcRequest = ({ url }, headers, body) => ({\n headers,\n url,\n body,\n method: 'POST',\n});\nexports.buildHttpRpcRequest = buildHttpRpcRequest;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,mBAAmB,GAAG,OAAO,CAAC,gBAAgB,GAAG,OAAO,CAAC,aAAa,GAAG,OAA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,cAAc,CAAC;AACxE,IAAI,YAAY,EAAE,OAAO,CAAC,eAAe;AACzC,IAAI,cAAc,EAAE,IAAI,UAAU,CAAC,mBAAmB,GAAG;AACzD,IAAI,KAAK,EAAE,UAAU;AACrB,CAAC,CAAC;AACF,IAAI,iBAAiB,CAAC,uBAAuB,EAAE,MAAM;AACrD,IAAI,OAAO,CAAC,aAAa,CAAC,cAAc,GAAG,IAAI,UAAU,CAAC,mBAAmB,GAAG,CAAC;AACjF,CAAC,CAAC,CAAC;AACH;AACA;AACA;AACA,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;AACH,OAAO,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;AAC5C;AACA;AACA;AACA,MAAM,mBAAmB,GAAG,CAAC,EAAE,GAAG,EAAE,EAAE,OAAO,EAAE,IAAI,MAAM;AACzD,IAAI,OAAO;AACX,IAAI,GAAG;AACP,IAAI,IAAI;AACR,IAAI,MAAM,EAAE,MAAM;AAClB,CAAC,CAAC,CAAC;AACH,OAAO,CAAC,mBAAmB,GAAG,mBAAmB;;"}
@@ -0,0 +1,41 @@
1
+ 'use strict';
2
+
3
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
4
+ // SPDX-License-Identifier: Apache-2.0
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.getCredentialsForIdentity = void 0;
7
+ const clients_1 = require("../../clients");
8
+ const internal_1 = require("../../clients/internal");
9
+ const base_1 = require("./base");
10
+ const getCredentialsForIdentitySerializer = (input, endpoint) => {
11
+ const headers = (0, base_1.getSharedHeaders)('GetCredentialsForIdentity');
12
+ const body = JSON.stringify(input);
13
+ return (0, base_1.buildHttpRpcRequest)(endpoint, headers, body);
14
+ };
15
+ const getCredentialsForIdentityDeserializer = async (response) => {
16
+ if (response.statusCode >= 300) {
17
+ const error = await (0, clients_1.parseJsonError)(response);
18
+ throw error;
19
+ }
20
+ else {
21
+ const body = await (0, clients_1.parseJsonBody)(response);
22
+ return {
23
+ IdentityId: body.IdentityId,
24
+ Credentials: deserializeCredentials(body.Credentials),
25
+ $metadata: (0, clients_1.parseMetadata)(response),
26
+ };
27
+ }
28
+ };
29
+ const deserializeCredentials = ({ AccessKeyId, SecretKey, SessionToken, Expiration, } = {}) => {
30
+ return {
31
+ AccessKeyId,
32
+ SecretKey,
33
+ SessionToken,
34
+ Expiration: Expiration && new Date(Expiration * 1000),
35
+ };
36
+ };
37
+ /**
38
+ * @internal
39
+ */
40
+ exports.getCredentialsForIdentity = (0, internal_1.composeServiceApi)(base_1.cognitoIdentityTransferHandler, getCredentialsForIdentitySerializer, getCredentialsForIdentityDeserializer, base_1.defaultConfig);
41
+ //# sourceMappingURL=getCredentialsForIdentity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getCredentialsForIdentity.js","sources":["../../../../src/awsClients/cognitoIdentity/getCredentialsForIdentity.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 });\nexports.getCredentialsForIdentity = void 0;\nconst clients_1 = require(\"../../clients\");\nconst internal_1 = require(\"../../clients/internal\");\nconst base_1 = require(\"./base\");\nconst getCredentialsForIdentitySerializer = (input, endpoint) => {\n const headers = (0, base_1.getSharedHeaders)('GetCredentialsForIdentity');\n const body = JSON.stringify(input);\n return (0, base_1.buildHttpRpcRequest)(endpoint, headers, body);\n};\nconst getCredentialsForIdentityDeserializer = async (response) => {\n if (response.statusCode >= 300) {\n const error = await (0, clients_1.parseJsonError)(response);\n throw error;\n }\n else {\n const body = await (0, clients_1.parseJsonBody)(response);\n return {\n IdentityId: body.IdentityId,\n Credentials: deserializeCredentials(body.Credentials),\n $metadata: (0, clients_1.parseMetadata)(response),\n };\n }\n};\nconst deserializeCredentials = ({ AccessKeyId, SecretKey, SessionToken, Expiration, } = {}) => {\n return {\n AccessKeyId,\n SecretKey,\n SessionToken,\n Expiration: Expiration && new Date(Expiration * 1000),\n };\n};\n/**\n * @internal\n */\nexports.getCredentialsForIdentity = (0, internal_1.composeServiceApi)(base_1.cognitoIdentityTransferHandler, getCredentialsForIdentitySerializer, getCredentialsForIdentityDeserializer, base_1.defaultConfig);\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,yBAAyB,GAAG,KAAK,CAAC,CAAC;AAC3C,MAAM,SAAS,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;AAC3C,MAAM,UAAU,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAAC;AACrD,MAAM,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;AACjC,MAAM,mCAAmC,GAAG,CAAC,KAAK,EAAE,QAAQ,KAAK;AACjE,IAAI,MAAM,OAAO,GAAG,IAAI,MAAM,CAAC,gBAAgB,EAAE,2BAA2B,CAAC,CAAC;AAC9E,IAAI,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;AACvC,IAAI,OAAO,IAAI,MAAM,CAAC,mBAAmB,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;AACpE,CAAC,CAAC;AACF,MAAM,qCAAqC,GAAG,OAAO,QAAQ,KAAK;AAClE,IAAI,IAAI,QAAQ,CAAC,UAAU,IAAI,GAAG,EAAE;AACpC,QAAQ,MAAM,KAAK,GAAG,MAAM,IAAI,SAAS,CAAC,cAAc,EAAE,QAAQ,CAAC,CAAC;AACpE,QAAQ,MAAM,KAAK,CAAC;AACpB,KAAK;AACL,SAAS;AACT,QAAQ,MAAM,IAAI,GAAG,MAAM,IAAI,SAAS,CAAC,aAAa,EAAE,QAAQ,CAAC,CAAC;AAClE,QAAQ,OAAO;AACf,YAAY,UAAU,EAAE,IAAI,CAAC,UAAU;AACvC,YAAY,WAAW,EAAE,sBAAsB,CAAC,IAAI,CAAC,WAAW,CAAC;AACjE,YAAY,SAAS,EAAE,IAAI,SAAS,CAAC,aAAa,EAAE,QAAQ,CAAC;AAC7D,SAAS,CAAC;AACV,KAAK;AACL,CAAC,CAAC;AACF,MAAM,sBAAsB,GAAG,CAAC,EAAE,WAAW,EAAE,SAAS,EAAE,YAAY,EAAE,UAAU,GAAG,GAAG,EAAE,KAAK;AAC/F,IAAI,OAAO;AACX,QAAQ,WAAW;AACnB,QAAQ,SAAS;AACjB,QAAQ,YAAY;AACpB,QAAQ,UAAU,EAAE,UAAU,IAAI,IAAI,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;AAC7D,KAAK,CAAC;AACN,CAAC,CAAC;AACF;AACA;AACA;AACA,OAAO,CAAC,yBAAyB,GAAG,IAAI,UAAU,CAAC,iBAAiB,EAAE,MAAM,CAAC,8BAA8B,EAAE,mCAAmC,EAAE,qCAAqC,EAAE,MAAM,CAAC,aAAa,CAAC;;"}
@@ -0,0 +1,32 @@
1
+ 'use strict';
2
+
3
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
4
+ // SPDX-License-Identifier: Apache-2.0
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.getId = void 0;
7
+ const clients_1 = require("../../clients");
8
+ const internal_1 = require("../../clients/internal");
9
+ const base_1 = require("./base");
10
+ const getIdSerializer = (input, endpoint) => {
11
+ const headers = (0, base_1.getSharedHeaders)('GetId');
12
+ const body = JSON.stringify(input);
13
+ return (0, base_1.buildHttpRpcRequest)(endpoint, headers, body);
14
+ };
15
+ const getIdDeserializer = async (response) => {
16
+ if (response.statusCode >= 300) {
17
+ const error = await (0, clients_1.parseJsonError)(response);
18
+ throw error;
19
+ }
20
+ else {
21
+ const body = await (0, clients_1.parseJsonBody)(response);
22
+ return {
23
+ IdentityId: body.IdentityId,
24
+ $metadata: (0, clients_1.parseMetadata)(response),
25
+ };
26
+ }
27
+ };
28
+ /**
29
+ * @internal
30
+ */
31
+ exports.getId = (0, internal_1.composeServiceApi)(base_1.cognitoIdentityTransferHandler, getIdSerializer, getIdDeserializer, base_1.defaultConfig);
32
+ //# sourceMappingURL=getId.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getId.js","sources":["../../../../src/awsClients/cognitoIdentity/getId.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 });\nexports.getId = void 0;\nconst clients_1 = require(\"../../clients\");\nconst internal_1 = require(\"../../clients/internal\");\nconst base_1 = require(\"./base\");\nconst getIdSerializer = (input, endpoint) => {\n const headers = (0, base_1.getSharedHeaders)('GetId');\n const body = JSON.stringify(input);\n return (0, base_1.buildHttpRpcRequest)(endpoint, headers, body);\n};\nconst getIdDeserializer = async (response) => {\n if (response.statusCode >= 300) {\n const error = await (0, clients_1.parseJsonError)(response);\n throw error;\n }\n else {\n const body = await (0, clients_1.parseJsonBody)(response);\n return {\n IdentityId: body.IdentityId,\n $metadata: (0, clients_1.parseMetadata)(response),\n };\n }\n};\n/**\n * @internal\n */\nexports.getId = (0, internal_1.composeServiceApi)(base_1.cognitoIdentityTransferHandler, getIdSerializer, getIdDeserializer, base_1.defaultConfig);\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,KAAK,GAAG,KAAK,CAAC,CAAC;AACvB,MAAM,SAAS,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;AAC3C,MAAM,UAAU,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAAC;AACrD,MAAM,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;AACjC,MAAM,eAAe,GAAG,CAAC,KAAK,EAAE,QAAQ,KAAK;AAC7C,IAAI,MAAM,OAAO,GAAG,IAAI,MAAM,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAAC;AAC1D,IAAI,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;AACvC,IAAI,OAAO,IAAI,MAAM,CAAC,mBAAmB,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;AACpE,CAAC,CAAC;AACF,MAAM,iBAAiB,GAAG,OAAO,QAAQ,KAAK;AAC9C,IAAI,IAAI,QAAQ,CAAC,UAAU,IAAI,GAAG,EAAE;AACpC,QAAQ,MAAM,KAAK,GAAG,MAAM,IAAI,SAAS,CAAC,cAAc,EAAE,QAAQ,CAAC,CAAC;AACpE,QAAQ,MAAM,KAAK,CAAC;AACpB,KAAK;AACL,SAAS;AACT,QAAQ,MAAM,IAAI,GAAG,MAAM,IAAI,SAAS,CAAC,aAAa,EAAE,QAAQ,CAAC,CAAC;AAClE,QAAQ,OAAO;AACf,YAAY,UAAU,EAAE,IAAI,CAAC,UAAU;AACvC,YAAY,SAAS,EAAE,IAAI,SAAS,CAAC,aAAa,EAAE,QAAQ,CAAC;AAC7D,SAAS,CAAC;AACV,KAAK;AACL,CAAC,CAAC;AACF;AACA;AACA;AACA,OAAO,CAAC,KAAK,GAAG,IAAI,UAAU,CAAC,iBAAiB,EAAE,MAAM,CAAC,8BAA8B,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,CAAC,aAAa,CAAC;;"}
@@ -0,0 +1,11 @@
1
+ 'use strict';
2
+
3
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
4
+ // SPDX-License-Identifier: Apache-2.0
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.getCredentialsForIdentity = exports.getId = void 0;
7
+ var getId_1 = require("./getId");
8
+ Object.defineProperty(exports, "getId", { enumerable: true, get: function () { return getId_1.getId; } });
9
+ var getCredentialsForIdentity_1 = require("./getCredentialsForIdentity");
10
+ Object.defineProperty(exports, "getCredentialsForIdentity", { enumerable: true, get: function () { return getCredentialsForIdentity_1.getCredentialsForIdentity; } });
11
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../../src/awsClients/cognitoIdentity/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 });\nexports.getCredentialsForIdentity = exports.getId = void 0;\nvar getId_1 = require(\"./getId\");\nObject.defineProperty(exports, \"getId\", { enumerable: true, get: function () { return getId_1.getId; } });\nvar getCredentialsForIdentity_1 = require(\"./getCredentialsForIdentity\");\nObject.defineProperty(exports, \"getCredentialsForIdentity\", { enumerable: true, get: function () { return getCredentialsForIdentity_1.getCredentialsForIdentity; } });\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,yBAAyB,GAAG,OAAO,CAAC,KAAK,GAAG,KAAK,CAAC,CAAC;AAC3D,IAAI,OAAO,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;AACjC,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,OAAO,CAAC,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC;AAC1G,IAAI,2BAA2B,GAAG,OAAO,CAAC,6BAA6B,CAAC,CAAC;AACzE,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,2BAA2B,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,2BAA2B,CAAC,yBAAyB,CAAC,EAAE,EAAE,CAAC;;"}
@@ -3,4 +3,4 @@
3
3
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
4
4
  // SPDX-License-Identifier: Apache-2.0
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- //# sourceMappingURL=sdk.js.map
6
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sources":["../../../../src/awsClients/cognitoIdentity/types.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/index.js CHANGED
@@ -3,7 +3,7 @@
3
3
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
4
4
  // SPDX-License-Identifier: Apache-2.0
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.ServiceWorker = exports.ConsoleLogger = exports.I18n = exports.Cache = exports.sharedInMemoryStorage = exports.sessionStorage = exports.defaultStorage = exports.CookieStorage = exports.cognitoIdentityPoolEndpointResolver = exports.createGetIdClient = exports.createGetCredentialsForIdentityClient = exports.clearCredentials = exports.AmplifyClassV6 = exports.fetchAuthSession = exports.Amplify = exports.decodeJWT = exports.Hub = void 0;
6
+ exports.ServiceWorker = exports.ConsoleLogger = exports.I18n = exports.Cache = exports.sharedInMemoryStorage = exports.sessionStorage = exports.defaultStorage = exports.CookieStorage = exports.getId = exports.getCredentialsForIdentity = exports.clearCredentials = exports.AmplifyClassV6 = exports.fetchAuthSession = exports.Amplify = exports.decodeJWT = exports.Hub = void 0;
7
7
  /*
8
8
  This file maps top-level exports from `@aws-amplify/core`. These are intended to be potentially customer-facing exports.
9
9
  */
@@ -17,11 +17,10 @@ Object.defineProperty(exports, "Amplify", { enumerable: true, get: function () {
17
17
  Object.defineProperty(exports, "fetchAuthSession", { enumerable: true, get: function () { return singleton_1.fetchAuthSession; } });
18
18
  Object.defineProperty(exports, "AmplifyClassV6", { enumerable: true, get: function () { return singleton_1.AmplifyClass; } });
19
19
  Object.defineProperty(exports, "clearCredentials", { enumerable: true, get: function () { return singleton_1.clearCredentials; } });
20
- // Cognito Identity service client factories
21
- var cognitoIdentity_1 = require("./foundation/factories/serviceClients/cognitoIdentity");
22
- Object.defineProperty(exports, "createGetCredentialsForIdentityClient", { enumerable: true, get: function () { return cognitoIdentity_1.createGetCredentialsForIdentityClient; } });
23
- Object.defineProperty(exports, "createGetIdClient", { enumerable: true, get: function () { return cognitoIdentity_1.createGetIdClient; } });
24
- Object.defineProperty(exports, "cognitoIdentityPoolEndpointResolver", { enumerable: true, get: function () { return cognitoIdentity_1.cognitoIdentityPoolEndpointResolver; } });
20
+ // AWSClients exports
21
+ var cognitoIdentity_1 = require("./awsClients/cognitoIdentity");
22
+ Object.defineProperty(exports, "getCredentialsForIdentity", { enumerable: true, get: function () { return cognitoIdentity_1.getCredentialsForIdentity; } });
23
+ Object.defineProperty(exports, "getId", { enumerable: true, get: function () { return cognitoIdentity_1.getId; } });
25
24
  // Storage helpers
26
25
  var storage_1 = require("./storage");
27
26
  Object.defineProperty(exports, "CookieStorage", { enumerable: true, get: function () { return storage_1.CookieStorage; } });
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../src/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 });\nexports.ServiceWorker = exports.ConsoleLogger = exports.I18n = exports.Cache = exports.sharedInMemoryStorage = exports.sessionStorage = exports.defaultStorage = exports.CookieStorage = exports.cognitoIdentityPoolEndpointResolver = exports.createGetIdClient = exports.createGetCredentialsForIdentityClient = exports.clearCredentials = exports.AmplifyClassV6 = exports.fetchAuthSession = exports.Amplify = exports.decodeJWT = exports.Hub = void 0;\n/*\nThis file maps top-level exports from `@aws-amplify/core`. These are intended to be potentially customer-facing exports.\n*/\n// Hub exports\nvar Hub_1 = require(\"./Hub\");\nObject.defineProperty(exports, \"Hub\", { enumerable: true, get: function () { return Hub_1.Hub; } });\nvar utils_1 = require(\"./singleton/Auth/utils\");\nObject.defineProperty(exports, \"decodeJWT\", { enumerable: true, get: function () { return utils_1.decodeJWT; } });\nvar singleton_1 = require(\"./singleton\");\nObject.defineProperty(exports, \"Amplify\", { enumerable: true, get: function () { return singleton_1.Amplify; } });\nObject.defineProperty(exports, \"fetchAuthSession\", { enumerable: true, get: function () { return singleton_1.fetchAuthSession; } });\nObject.defineProperty(exports, \"AmplifyClassV6\", { enumerable: true, get: function () { return singleton_1.AmplifyClass; } });\nObject.defineProperty(exports, \"clearCredentials\", { enumerable: true, get: function () { return singleton_1.clearCredentials; } });\n// Cognito Identity service client factories\nvar cognitoIdentity_1 = require(\"./foundation/factories/serviceClients/cognitoIdentity\");\nObject.defineProperty(exports, \"createGetCredentialsForIdentityClient\", { enumerable: true, get: function () { return cognitoIdentity_1.createGetCredentialsForIdentityClient; } });\nObject.defineProperty(exports, \"createGetIdClient\", { enumerable: true, get: function () { return cognitoIdentity_1.createGetIdClient; } });\nObject.defineProperty(exports, \"cognitoIdentityPoolEndpointResolver\", { enumerable: true, get: function () { return cognitoIdentity_1.cognitoIdentityPoolEndpointResolver; } });\n// Storage helpers\nvar storage_1 = require(\"./storage\");\nObject.defineProperty(exports, \"CookieStorage\", { enumerable: true, get: function () { return storage_1.CookieStorage; } });\nObject.defineProperty(exports, \"defaultStorage\", { enumerable: true, get: function () { return storage_1.defaultStorage; } });\nObject.defineProperty(exports, \"sessionStorage\", { enumerable: true, get: function () { return storage_1.sessionStorage; } });\nObject.defineProperty(exports, \"sharedInMemoryStorage\", { enumerable: true, get: function () { return storage_1.sharedInMemoryStorage; } });\n// Cache exports\nvar Cache_1 = require(\"./Cache\");\nObject.defineProperty(exports, \"Cache\", { enumerable: true, get: function () { return Cache_1.Cache; } });\n// Internationalization utilities\nvar I18n_1 = require(\"./I18n\");\nObject.defineProperty(exports, \"I18n\", { enumerable: true, get: function () { return I18n_1.I18n; } });\n// Logging utilities\nvar Logger_1 = require(\"./Logger\");\nObject.defineProperty(exports, \"ConsoleLogger\", { enumerable: true, get: function () { return Logger_1.ConsoleLogger; } });\n// Service worker\nvar ServiceWorker_1 = require(\"./ServiceWorker\");\nObject.defineProperty(exports, \"ServiceWorker\", { enumerable: true, get: function () { return ServiceWorker_1.ServiceWorker; } });\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,aAAa,GAAG,OAAO,CAAC,aAAa,GAAG,OAAO,CAAC,IAAI,GAAG,OAAO,CAAC,KAAK,GAAG,OAAO,CAAC,qBAAqB,GAAG,OAAO,CAAC,cAAc,GAAG,OAAO,CAAC,cAAc,GAAG,OAAO,CAAC,aAAa,GAAG,OAAO,CAAC,mCAAmC,GAAG,OAAO,CAAC,iBAAiB,GAAG,OAAO,CAAC,qCAAqC,GAAG,OAAO,CAAC,gBAAgB,GAAG,OAAO,CAAC,cAAc,GAAG,OAAO,CAAC,gBAAgB,GAAG,OAAO,CAAC,OAAO,GAAG,OAAO,CAAC,SAAS,GAAG,OAAO,CAAC,GAAG,GAAG,KAAK,CAAC,CAAC;AAC7b;AACA;AACA;AACA;AACA,IAAI,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;AAC7B,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,KAAK,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,KAAK,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC;AACpG,IAAI,OAAO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AG,OAAO,CAAC,QAAQ,CAAC,CAAC;AAC/B,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,MAAM,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC;AACvG;AACA,IAAI,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AACnC,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,eAAe,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,QAAQ,CAAC,aAAa,CAAC,EAAE,EAAE,CAAC,CAAC;AAC3H;AACA,IAAI,eAAe,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;AACjD,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,eAAe,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,eAAe,CAAC,aAAa,CAAC,EAAE,EAAE,CAAC;;"}
1
+ {"version":3,"file":"index.js","sources":["../../src/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 });\nexports.ServiceWorker = exports.ConsoleLogger = exports.I18n = exports.Cache = exports.sharedInMemoryStorage = exports.sessionStorage = exports.defaultStorage = exports.CookieStorage = exports.getId = exports.getCredentialsForIdentity = exports.clearCredentials = exports.AmplifyClassV6 = exports.fetchAuthSession = exports.Amplify = exports.decodeJWT = exports.Hub = void 0;\n/*\nThis file maps top-level exports from `@aws-amplify/core`. These are intended to be potentially customer-facing exports.\n*/\n// Hub exports\nvar Hub_1 = require(\"./Hub\");\nObject.defineProperty(exports, \"Hub\", { enumerable: true, get: function () { return Hub_1.Hub; } });\nvar utils_1 = require(\"./singleton/Auth/utils\");\nObject.defineProperty(exports, \"decodeJWT\", { enumerable: true, get: function () { return utils_1.decodeJWT; } });\nvar singleton_1 = require(\"./singleton\");\nObject.defineProperty(exports, \"Amplify\", { enumerable: true, get: function () { return singleton_1.Amplify; } });\nObject.defineProperty(exports, \"fetchAuthSession\", { enumerable: true, get: function () { return singleton_1.fetchAuthSession; } });\nObject.defineProperty(exports, \"AmplifyClassV6\", { enumerable: true, get: function () { return singleton_1.AmplifyClass; } });\nObject.defineProperty(exports, \"clearCredentials\", { enumerable: true, get: function () { return singleton_1.clearCredentials; } });\n// AWSClients exports\nvar cognitoIdentity_1 = require(\"./awsClients/cognitoIdentity\");\nObject.defineProperty(exports, \"getCredentialsForIdentity\", { enumerable: true, get: function () { return cognitoIdentity_1.getCredentialsForIdentity; } });\nObject.defineProperty(exports, \"getId\", { enumerable: true, get: function () { return cognitoIdentity_1.getId; } });\n// Storage helpers\nvar storage_1 = require(\"./storage\");\nObject.defineProperty(exports, \"CookieStorage\", { enumerable: true, get: function () { return storage_1.CookieStorage; } });\nObject.defineProperty(exports, \"defaultStorage\", { enumerable: true, get: function () { return storage_1.defaultStorage; } });\nObject.defineProperty(exports, \"sessionStorage\", { enumerable: true, get: function () { return storage_1.sessionStorage; } });\nObject.defineProperty(exports, \"sharedInMemoryStorage\", { enumerable: true, get: function () { return storage_1.sharedInMemoryStorage; } });\n// Cache exports\nvar Cache_1 = require(\"./Cache\");\nObject.defineProperty(exports, \"Cache\", { enumerable: true, get: function () { return Cache_1.Cache; } });\n// Internationalization utilities\nvar I18n_1 = require(\"./I18n\");\nObject.defineProperty(exports, \"I18n\", { enumerable: true, get: function () { return I18n_1.I18n; } });\n// Logging utilities\nvar Logger_1 = require(\"./Logger\");\nObject.defineProperty(exports, \"ConsoleLogger\", { enumerable: true, get: function () { return Logger_1.ConsoleLogger; } });\n// Service worker\nvar ServiceWorker_1 = require(\"./ServiceWorker\");\nObject.defineProperty(exports, \"ServiceWorker\", { enumerable: true, get: function () { return ServiceWorker_1.ServiceWorker; } });\n"],"names":[],"mappings":";;AACA;A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,CAAC;;"}
@@ -1 +1 @@
1
- export declare const version = "6.6.7-local-stack.0aa9031.0+0aa9031";
1
+ export declare const version = "6.6.7-next-15.7992a88.0+7992a88";
@@ -1,5 +1,5 @@
1
1
  // generated by genversion
2
- const version = '6.6.7-local-stack.0aa9031.0+0aa9031';
2
+ const version = '6.6.7-next-15.7992a88.0+7992a88';
3
3
 
4
4
  export { version };
5
5
  //# sourceMappingURL=version.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.mjs","sources":["../../../src/Platform/version.ts"],"sourcesContent":["// generated by genversion\nexport const version = '6.6.7-local-stack.0aa9031.0+0aa9031';\n"],"names":[],"mappings":"AAAA;AACY,MAAC,OAAO,GAAG;;;;"}
1
+ {"version":3,"file":"version.mjs","sources":["../../../src/Platform/version.ts"],"sourcesContent":["// generated by genversion\nexport const version = '6.6.7-next-15.7992a88.0+7992a88';\n"],"names":[],"mappings":"AAAA;AACY,MAAC,OAAO,GAAG;;;;"}
@@ -0,0 +1,29 @@
1
+ import { Endpoint, EndpointResolverOptions, Headers, 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>;
9
+ /**
10
+ * @internal
11
+ */
12
+ export declare const defaultConfig: {
13
+ service: string;
14
+ endpointResolver: ({ region }: EndpointResolverOptions) => {
15
+ url: URL;
16
+ };
17
+ retryDecider: (response?: HttpResponse | undefined, error?: unknown) => Promise<boolean>;
18
+ computeDelay: (attempt: number) => number;
19
+ userAgentValue: string;
20
+ cache: string;
21
+ };
22
+ /**
23
+ * @internal
24
+ */
25
+ export declare const getSharedHeaders: (operation: string) => Headers;
26
+ /**
27
+ * @internal
28
+ */
29
+ export declare const buildHttpRpcRequest: ({ url }: Endpoint, headers: Headers, body: any) => HttpRequest;
@@ -0,0 +1,73 @@
1
+ import { getDnsSuffix } from '../../clients/endpoints/getDnsSuffix.mjs';
2
+ import '../../types/errors.mjs';
3
+ import '../../errors/errorHelpers.mjs';
4
+ import { unauthenticatedHandler } from '../../clients/handlers/unauthenticated.mjs';
5
+ import { jitteredBackoff } from '../../clients/middleware/retry/jitteredBackoff.mjs';
6
+ import { getRetryDecider } from '../../clients/middleware/retry/defaultRetryDecider.mjs';
7
+ import '@aws-crypto/sha256-js';
8
+ import '@smithy/util-hex-encoding';
9
+ import { AmplifyUrl } from '../../utils/amplifyUrl/index.mjs';
10
+ import { composeTransferHandler } from '../../clients/internal/composeTransferHandler.mjs';
11
+ import { parseJsonError } from '../../clients/serde/json.mjs';
12
+ import { getAmplifyUserAgent } from '../../Platform/index.mjs';
13
+ import { observeFrameworkChanges } from '../../Platform/detectFramework.mjs';
14
+
15
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
16
+ // SPDX-License-Identifier: Apache-2.0
17
+ /**
18
+ * The service name used to sign requests if the API requires authentication.
19
+ */
20
+ const SERVICE_NAME = 'cognito-identity';
21
+ /**
22
+ * The endpoint resolver function that returns the endpoint URL for a given region.
23
+ */
24
+ const endpointResolver = ({ region }) => ({
25
+ url: new AmplifyUrl(`https://cognito-identity.${region}.${getDnsSuffix(region)}`),
26
+ });
27
+ /**
28
+ * A Cognito Identity-specific middleware that disables caching for all requests.
29
+ */
30
+ const disableCacheMiddlewareFactory = () => next => async function disableCacheMiddleware(request) {
31
+ request.headers['cache-control'] = 'no-store';
32
+ return next(request);
33
+ };
34
+ /**
35
+ * A Cognito Identity-specific transfer handler that does NOT sign requests, and
36
+ * disables caching.
37
+ *
38
+ * @internal
39
+ */
40
+ const cognitoIdentityTransferHandler = composeTransferHandler(unauthenticatedHandler, [disableCacheMiddlewareFactory]);
41
+ /**
42
+ * @internal
43
+ */
44
+ const defaultConfig = {
45
+ service: SERVICE_NAME,
46
+ endpointResolver,
47
+ retryDecider: getRetryDecider(parseJsonError),
48
+ computeDelay: jitteredBackoff,
49
+ userAgentValue: getAmplifyUserAgent(),
50
+ cache: 'no-store',
51
+ };
52
+ observeFrameworkChanges(() => {
53
+ defaultConfig.userAgentValue = getAmplifyUserAgent();
54
+ });
55
+ /**
56
+ * @internal
57
+ */
58
+ const getSharedHeaders = (operation) => ({
59
+ 'content-type': 'application/x-amz-json-1.1',
60
+ 'x-amz-target': `AWSCognitoIdentityService.${operation}`,
61
+ });
62
+ /**
63
+ * @internal
64
+ */
65
+ const buildHttpRpcRequest = ({ url }, headers, body) => ({
66
+ headers,
67
+ url,
68
+ body,
69
+ method: 'POST',
70
+ });
71
+
72
+ export { buildHttpRpcRequest, cognitoIdentityTransferHandler, defaultConfig, getSharedHeaders };
73
+ //# sourceMappingURL=base.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base.mjs","sources":["../../../../src/awsClients/cognitoIdentity/base.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { getDnsSuffix, parseJsonError, unauthenticatedHandler, } from '../../clients';\nimport { composeTransferHandler } from '../../clients/internal/composeTransferHandler';\nimport { getRetryDecider, jitteredBackoff, } from '../../clients/middleware/retry';\nimport { getAmplifyUserAgent } from '../../Platform';\nimport { observeFrameworkChanges } from '../../Platform/detectFramework';\nimport { AmplifyUrl } from '../../utils/amplifyUrl';\n/**\n * The service name used to sign requests if the API requires authentication.\n */\nconst SERVICE_NAME = 'cognito-identity';\n/**\n * The endpoint resolver function that returns the endpoint URL for a given region.\n */\nconst endpointResolver = ({ region }) => ({\n url: new AmplifyUrl(`https://cognito-identity.${region}.${getDnsSuffix(region)}`),\n});\n/**\n * A Cognito Identity-specific middleware that disables caching for all requests.\n */\nconst disableCacheMiddlewareFactory = () => next => async function disableCacheMiddleware(request) {\n request.headers['cache-control'] = 'no-store';\n return next(request);\n};\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, [disableCacheMiddlewareFactory]);\n/**\n * @internal\n */\nexport const defaultConfig = {\n service: SERVICE_NAME,\n endpointResolver,\n retryDecider: getRetryDecider(parseJsonError),\n computeDelay: jitteredBackoff,\n userAgentValue: getAmplifyUserAgent(),\n cache: 'no-store',\n};\nobserveFrameworkChanges(() => {\n defaultConfig.userAgentValue = getAmplifyUserAgent();\n});\n/**\n * @internal\n */\nexport const getSharedHeaders = (operation) => ({\n 'content-type': 'application/x-amz-json-1.1',\n 'x-amz-target': `AWSCognitoIdentityService.${operation}`,\n});\n/**\n * @internal\n */\nexport const buildHttpRpcRequest = ({ url }, headers, body) => ({\n headers,\n url,\n body,\n method: 'POST',\n});\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA;AACA;AAOA;AACA;AACA;AACA,MAAM,YAAY,GAAG,kBAAkB,CAAC;AACxC;AACA;AACA;AACA,MAAM,gBAAgB,GAAG,CAAC,EAAE,MAAM,EAAE,MAAM;AAC1C,IAAI,GAAG,EAAE,IAAI,UAAU,CAAC,CAAC,yBAAyB,EAAE,MAAM,CAAC,CAAC,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;AACrF,CAAC,CAAC,CAAC;AACH;AACA;AACA;AACA,MAAM,6BAA6B,GAAG,MAAM,IAAI,IAAI,eAAe,sBAAsB,CAAC,OAAO,EAAE;AACnG,IAAI,OAAO,CAAC,OAAO,CAAC,eAAe,CAAC,GAAG,UAAU,CAAC;AAClD,IAAI,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC;AACzB,CAAC,CAAC;AACF;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,8BAA8B,GAAG,sBAAsB,CAAC,sBAAsB,EAAE,CAAC,6BAA6B,CAAC,EAAE;AAC9H;AACA;AACA;AACY,MAAC,aAAa,GAAG;AAC7B,IAAI,OAAO,EAAE,YAAY;AACzB,IAAI,gBAAgB;AACpB,IAAI,YAAY,EAAE,eAAe,CAAC,cAAc,CAAC;AACjD,IAAI,YAAY,EAAE,eAAe;AACjC,IAAI,cAAc,EAAE,mBAAmB,EAAE;AACzC,IAAI,KAAK,EAAE,UAAU;AACrB,EAAE;AACF,uBAAuB,CAAC,MAAM;AAC9B,IAAI,aAAa,CAAC,cAAc,GAAG,mBAAmB,EAAE,CAAC;AACzD,CAAC,CAAC,CAAC;AACH;AACA;AACA;AACY,MAAC,gBAAgB,GAAG,CAAC,SAAS,MAAM;AAChD,IAAI,cAAc,EAAE,4BAA4B;AAChD,IAAI,cAAc,EAAE,CAAC,0BAA0B,EAAE,SAAS,CAAC,CAAC;AAC5D,CAAC,EAAE;AACH;AACA;AACA;AACY,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;;;;"}
@@ -0,0 +1,18 @@
1
+ import { Endpoint, HttpResponse } from '../../clients';
2
+ import type { GetCredentialsForIdentityCommandInput as GetCredentialsForIdentityInput, GetCredentialsForIdentityCommandOutput as GetCredentialsForIdentityOutput } from './types';
3
+ export type { GetCredentialsForIdentityInput, GetCredentialsForIdentityOutput };
4
+ /**
5
+ * @internal
6
+ */
7
+ export declare const getCredentialsForIdentity: (config: {
8
+ service?: string | undefined;
9
+ endpointResolver?: (((options: import("../../clients").EndpointResolverOptions, input?: any) => Endpoint) & (({ region }: import("../../clients").EndpointResolverOptions) => {
10
+ url: URL;
11
+ })) | undefined;
12
+ retryDecider?: (((response?: HttpResponse | undefined, error?: unknown) => Promise<boolean>) & ((response?: HttpResponse | undefined, error?: unknown) => Promise<boolean>)) | undefined;
13
+ computeDelay?: ((attempt: number) => number) | undefined;
14
+ userAgentValue?: string | undefined;
15
+ cache?: "default" | "force-cache" | "no-cache" | "no-store" | "only-if-cached" | "reload" | undefined;
16
+ } & {
17
+ [x: string]: unknown;
18
+ }, input: import("./types").GetCredentialsForIdentityInput) => Promise<GetCredentialsForIdentityOutput>;
@@ -0,0 +1,47 @@
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 { defaultConfig, cognitoIdentityTransferHandler, buildHttpRpcRequest, getSharedHeaders } from './base.mjs';
11
+
12
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
13
+ // SPDX-License-Identifier: Apache-2.0
14
+ const getCredentialsForIdentitySerializer = (input, endpoint) => {
15
+ const headers = getSharedHeaders('GetCredentialsForIdentity');
16
+ const body = JSON.stringify(input);
17
+ return buildHttpRpcRequest(endpoint, headers, body);
18
+ };
19
+ const getCredentialsForIdentityDeserializer = async (response) => {
20
+ if (response.statusCode >= 300) {
21
+ const error = await parseJsonError(response);
22
+ throw error;
23
+ }
24
+ else {
25
+ const body = await parseJsonBody(response);
26
+ return {
27
+ IdentityId: body.IdentityId,
28
+ Credentials: deserializeCredentials(body.Credentials),
29
+ $metadata: parseMetadata(response),
30
+ };
31
+ }
32
+ };
33
+ const deserializeCredentials = ({ AccessKeyId, SecretKey, SessionToken, Expiration, } = {}) => {
34
+ return {
35
+ AccessKeyId,
36
+ SecretKey,
37
+ SessionToken,
38
+ Expiration: Expiration && new Date(Expiration * 1000),
39
+ };
40
+ };
41
+ /**
42
+ * @internal
43
+ */
44
+ const getCredentialsForIdentity = composeServiceApi(cognitoIdentityTransferHandler, getCredentialsForIdentitySerializer, getCredentialsForIdentityDeserializer, defaultConfig);
45
+
46
+ export { getCredentialsForIdentity };
47
+ //# sourceMappingURL=getCredentialsForIdentity.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getCredentialsForIdentity.mjs","sources":["../../../../src/awsClients/cognitoIdentity/getCredentialsForIdentity.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 { buildHttpRpcRequest, cognitoIdentityTransferHandler, defaultConfig, getSharedHeaders, } from './base';\nconst getCredentialsForIdentitySerializer = (input, endpoint) => {\n const headers = getSharedHeaders('GetCredentialsForIdentity');\n const body = JSON.stringify(input);\n return buildHttpRpcRequest(endpoint, headers, body);\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 = ({ AccessKeyId, SecretKey, SessionToken, Expiration, } = {}) => {\n return {\n AccessKeyId,\n SecretKey,\n SessionToken,\n Expiration: Expiration && new Date(Expiration * 1000),\n };\n};\n/**\n * @internal\n */\nexport const getCredentialsForIdentity = composeServiceApi(cognitoIdentityTransferHandler, getCredentialsForIdentitySerializer, getCredentialsForIdentityDeserializer, defaultConfig);\n"],"names":[],"mappings":";;;;;;;;;;;AAAA;AACA;AAIA,MAAM,mCAAmC,GAAG,CAAC,KAAK,EAAE,QAAQ,KAAK;AACjE,IAAI,MAAM,OAAO,GAAG,gBAAgB,CAAC,2BAA2B,CAAC,CAAC;AAClE,IAAI,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;AACvC,IAAI,OAAO,mBAAmB,CAAC,QAAQ,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;AACxD,CAAC,CAAC;AACF,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,WAAW,EAAE,SAAS,EAAE,YAAY,EAAE,UAAU,GAAG,GAAG,EAAE,KAAK;AAC/F,IAAI,OAAO;AACX,QAAQ,WAAW;AACnB,QAAQ,SAAS;AACjB,QAAQ,YAAY;AACpB,QAAQ,UAAU,EAAE,UAAU,IAAI,IAAI,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;AAC7D,KAAK,CAAC;AACN,CAAC,CAAC;AACF;AACA;AACA;AACY,MAAC,yBAAyB,GAAG,iBAAiB,CAAC,8BAA8B,EAAE,mCAAmC,EAAE,qCAAqC,EAAE,aAAa;;;;"}
@@ -0,0 +1,18 @@
1
+ import { Endpoint, HttpResponse } from '../../clients';
2
+ import { GetIdCommandInput as GetIdInput, GetIdCommandOutput as GetIdOutput } from './types';
3
+ export type { GetIdInput, GetIdOutput };
4
+ /**
5
+ * @internal
6
+ */
7
+ export declare const getId: (config: {
8
+ service?: string | undefined;
9
+ endpointResolver?: (((options: import("../../clients").EndpointResolverOptions, input?: any) => Endpoint) & (({ region }: import("../../clients").EndpointResolverOptions) => {
10
+ url: URL;
11
+ })) | undefined;
12
+ retryDecider?: (((response?: HttpResponse | undefined, error?: unknown) => Promise<boolean>) & ((response?: HttpResponse | undefined, error?: unknown) => Promise<boolean>)) | undefined;
13
+ computeDelay?: ((attempt: number) => number) | undefined;
14
+ userAgentValue?: string | undefined;
15
+ cache?: "default" | "force-cache" | "no-cache" | "no-store" | "only-if-cached" | "reload" | undefined;
16
+ } & {
17
+ [x: string]: unknown;
18
+ }, input: import("./types").GetIdInput) => Promise<GetIdOutput>;
@@ -0,0 +1,38 @@
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 { defaultConfig, cognitoIdentityTransferHandler, buildHttpRpcRequest, getSharedHeaders } from './base.mjs';
11
+
12
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
13
+ // SPDX-License-Identifier: Apache-2.0
14
+ const getIdSerializer = (input, endpoint) => {
15
+ const headers = getSharedHeaders('GetId');
16
+ const body = JSON.stringify(input);
17
+ return buildHttpRpcRequest(endpoint, headers, body);
18
+ };
19
+ const getIdDeserializer = async (response) => {
20
+ if (response.statusCode >= 300) {
21
+ const error = await parseJsonError(response);
22
+ throw error;
23
+ }
24
+ else {
25
+ const body = await parseJsonBody(response);
26
+ return {
27
+ IdentityId: body.IdentityId,
28
+ $metadata: parseMetadata(response),
29
+ };
30
+ }
31
+ };
32
+ /**
33
+ * @internal
34
+ */
35
+ const getId = composeServiceApi(cognitoIdentityTransferHandler, getIdSerializer, getIdDeserializer, defaultConfig);
36
+
37
+ export { getId };
38
+ //# sourceMappingURL=getId.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getId.mjs","sources":["../../../../src/awsClients/cognitoIdentity/getId.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 { buildHttpRpcRequest, cognitoIdentityTransferHandler, defaultConfig, getSharedHeaders, } from './base';\nconst getIdSerializer = (input, endpoint) => {\n const headers = getSharedHeaders('GetId');\n const body = JSON.stringify(input);\n return buildHttpRpcRequest(endpoint, headers, body);\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/**\n * @internal\n */\nexport const getId = composeServiceApi(cognitoIdentityTransferHandler, getIdSerializer, getIdDeserializer, defaultConfig);\n"],"names":[],"mappings":";;;;;;;;;;;AAAA;AACA;AAIA,MAAM,eAAe,GAAG,CAAC,KAAK,EAAE,QAAQ,KAAK;AAC7C,IAAI,MAAM,OAAO,GAAG,gBAAgB,CAAC,OAAO,CAAC,CAAC;AAC9C,IAAI,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;AACvC,IAAI,OAAO,mBAAmB,CAAC,QAAQ,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;AACxD,CAAC,CAAC;AACF,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,CAAC;AACF;AACA;AACA;AACY,MAAC,KAAK,GAAG,iBAAiB,CAAC,8BAA8B,EAAE,eAAe,EAAE,iBAAiB,EAAE,aAAa;;;;"}
@@ -0,0 +1,2 @@
1
+ export { getId, GetIdInput, GetIdOutput } from './getId';
2
+ export { getCredentialsForIdentity, GetCredentialsForIdentityInput, GetCredentialsForIdentityOutput, } from './getCredentialsForIdentity';
@@ -0,0 +1,3 @@
1
+ export { getId } from './getId.mjs';
2
+ export { getCredentialsForIdentity } from './getCredentialsForIdentity.mjs';
3
+ //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
1
+ {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -0,0 +1,2 @@
1
+
2
+ //# sourceMappingURL=types.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -4,7 +4,7 @@ export { TokenProvider, AuthTokens, FetchAuthSessionOptions, AuthSession, Creden
4
4
  export { decodeJWT } from './singleton/Auth/utils';
5
5
  export { AuthConfig, AuthUserPoolConfig, AuthUserPoolAndIdentityPoolConfig, APIConfig, PredictionsConfig, StorageAccessLevel, StorageConfig, GetCredentialsOptions, ResourcesConfig, LibraryOptions, AnalyticsConfig, GeoConfig, } from './singleton/types';
6
6
  export { Amplify, fetchAuthSession, AmplifyClass as AmplifyClassV6, clearCredentials, } from './singleton';
7
- export { createGetCredentialsForIdentityClient, createGetIdClient, cognitoIdentityPoolEndpointResolver, } from './foundation/factories/serviceClients/cognitoIdentity';
7
+ export { getCredentialsForIdentity, getId, GetCredentialsForIdentityInput, GetCredentialsForIdentityOutput, } from './awsClients/cognitoIdentity';
8
8
  export { UserProfile } from './types';
9
9
  export { CookieStorage, defaultStorage, sessionStorage, sharedInMemoryStorage, } from './storage';
10
10
  export { KeyValueStorageInterface } from './types';
@@ -3,9 +3,8 @@ export { decodeJWT } from './singleton/Auth/utils/index.mjs';
3
3
  export { Amplify, AmplifyClass as AmplifyClassV6 } from './singleton/Amplify.mjs';
4
4
  export { fetchAuthSession } from './singleton/apis/fetchAuthSession.mjs';
5
5
  export { clearCredentials } from './singleton/apis/clearCredentials.mjs';
6
- export { createGetCredentialsForIdentityClient } from './foundation/factories/serviceClients/cognitoIdentity/createGetCredentialsForIdentityClient.mjs';
7
- export { createGetIdClient } from './foundation/factories/serviceClients/cognitoIdentity/createGetIdClient.mjs';
8
- export { cognitoIdentityPoolEndpointResolver } from './foundation/factories/serviceClients/cognitoIdentity/cognitoIdentityPoolEndpointResolver.mjs';
6
+ export { getId } from './awsClients/cognitoIdentity/getId.mjs';
7
+ export { getCredentialsForIdentity } from './awsClients/cognitoIdentity/getCredentialsForIdentity.mjs';
9
8
  export { defaultStorage, sessionStorage, sharedInMemoryStorage } from './storage/index.mjs';
10
9
  export { Cache } from './Cache/index.mjs';
11
10
  export { I18n } from './I18n/index.mjs';
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;"}