@aws-amplify/core 6.11.5-local-stack.00864ae.0 → 6.11.5-unstable.5c85092.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 (131) 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/cjs/singleton/Auth/index.js +0 -12
  16. package/dist/cjs/singleton/Auth/index.js.map +1 -1
  17. package/dist/esm/Platform/version.d.ts +1 -1
  18. package/dist/esm/Platform/version.mjs +1 -1
  19. package/dist/esm/Platform/version.mjs.map +1 -1
  20. package/dist/esm/awsClients/cognitoIdentity/base.d.ts +29 -0
  21. package/dist/esm/awsClients/cognitoIdentity/base.mjs +83 -0
  22. package/dist/esm/awsClients/cognitoIdentity/base.mjs.map +1 -0
  23. package/dist/esm/awsClients/cognitoIdentity/getCredentialsForIdentity.d.ts +18 -0
  24. package/dist/esm/awsClients/cognitoIdentity/getCredentialsForIdentity.mjs +56 -0
  25. package/dist/esm/awsClients/cognitoIdentity/getCredentialsForIdentity.mjs.map +1 -0
  26. package/dist/esm/awsClients/cognitoIdentity/getId.d.ts +18 -0
  27. package/dist/esm/awsClients/cognitoIdentity/getId.mjs +47 -0
  28. package/dist/esm/awsClients/cognitoIdentity/getId.mjs.map +1 -0
  29. package/dist/esm/awsClients/cognitoIdentity/index.d.ts +2 -0
  30. package/dist/esm/awsClients/cognitoIdentity/index.mjs +3 -0
  31. package/dist/esm/{foundation/factories/middleware → awsClients/cognitoIdentity}/index.mjs.map +1 -1
  32. package/dist/esm/awsClients/cognitoIdentity/types.mjs +2 -0
  33. package/dist/esm/awsClients/cognitoIdentity/types.mjs.map +1 -0
  34. package/dist/esm/index.d.ts +1 -1
  35. package/dist/esm/index.mjs +2 -3
  36. package/dist/esm/index.mjs.map +1 -1
  37. package/dist/esm/singleton/Auth/index.mjs +0 -13
  38. package/dist/esm/singleton/Auth/index.mjs.map +1 -1
  39. package/dist/esm/singleton/Auth/types.d.ts +0 -8
  40. package/internals/aws-clients/cognitoIdentity/package.json +4 -4
  41. package/package.json +8 -8
  42. package/src/Platform/version.ts +1 -1
  43. package/src/awsClients/cognitoIdentity/base.ts +101 -0
  44. package/src/awsClients/cognitoIdentity/getCredentialsForIdentity.ts +77 -0
  45. package/src/awsClients/cognitoIdentity/getId.ts +61 -0
  46. package/src/awsClients/cognitoIdentity/index.ts +9 -0
  47. package/src/{foundation/factories/serviceClients/cognitoIdentity/types/sdk.ts → awsClients/cognitoIdentity/types.ts} +2 -0
  48. package/src/index.ts +4 -5
  49. package/src/singleton/Auth/index.ts +0 -19
  50. package/src/singleton/Auth/types.ts +0 -8
  51. package/dist/cjs/foundation/factories/middleware/createDisableCacheMiddleware.js +0 -15
  52. package/dist/cjs/foundation/factories/middleware/createDisableCacheMiddleware.js.map +0 -1
  53. package/dist/cjs/foundation/factories/middleware/index.js +0 -9
  54. package/dist/cjs/foundation/factories/middleware/index.js.map +0 -1
  55. package/dist/cjs/foundation/factories/serviceClients/cognitoIdentity/cognitoIdentityPoolEndpointResolver.js +0 -14
  56. package/dist/cjs/foundation/factories/serviceClients/cognitoIdentity/cognitoIdentityPoolEndpointResolver.js.map +0 -1
  57. package/dist/cjs/foundation/factories/serviceClients/cognitoIdentity/constants.js +0 -18
  58. package/dist/cjs/foundation/factories/serviceClients/cognitoIdentity/constants.js.map +0 -1
  59. package/dist/cjs/foundation/factories/serviceClients/cognitoIdentity/createGetCredentialsForIdentityClient.js +0 -37
  60. package/dist/cjs/foundation/factories/serviceClients/cognitoIdentity/createGetCredentialsForIdentityClient.js.map +0 -1
  61. package/dist/cjs/foundation/factories/serviceClients/cognitoIdentity/createGetIdClient.js +0 -32
  62. package/dist/cjs/foundation/factories/serviceClients/cognitoIdentity/createGetIdClient.js.map +0 -1
  63. package/dist/cjs/foundation/factories/serviceClients/cognitoIdentity/handler/cognitoIdentityTransferHandler.js +0 -17
  64. package/dist/cjs/foundation/factories/serviceClients/cognitoIdentity/handler/cognitoIdentityTransferHandler.js.map +0 -1
  65. package/dist/cjs/foundation/factories/serviceClients/cognitoIdentity/handler/index.js +0 -9
  66. package/dist/cjs/foundation/factories/serviceClients/cognitoIdentity/handler/index.js.map +0 -1
  67. package/dist/cjs/foundation/factories/serviceClients/cognitoIdentity/index.js +0 -13
  68. package/dist/cjs/foundation/factories/serviceClients/cognitoIdentity/index.js.map +0 -1
  69. package/dist/cjs/foundation/factories/serviceClients/cognitoIdentity/serde/createClientSerializer.js +0 -24
  70. package/dist/cjs/foundation/factories/serviceClients/cognitoIdentity/serde/createClientSerializer.js.map +0 -1
  71. package/dist/cjs/foundation/factories/serviceClients/cognitoIdentity/serde/index.js +0 -9
  72. package/dist/cjs/foundation/factories/serviceClients/cognitoIdentity/serde/index.js.map +0 -1
  73. package/dist/cjs/foundation/factories/serviceClients/cognitoIdentity/types/index.js +0 -9
  74. package/dist/cjs/foundation/factories/serviceClients/cognitoIdentity/types/index.js.map +0 -1
  75. package/dist/cjs/foundation/factories/serviceClients/cognitoIdentity/types/sdk.js.map +0 -1
  76. package/dist/cjs/foundation/factories/serviceClients/cognitoIdentity/types/serviceClient.js +0 -6
  77. package/dist/cjs/foundation/factories/serviceClients/cognitoIdentity/types/serviceClient.js.map +0 -1
  78. package/dist/esm/foundation/factories/middleware/createDisableCacheMiddleware.d.ts +0 -5
  79. package/dist/esm/foundation/factories/middleware/createDisableCacheMiddleware.mjs +0 -12
  80. package/dist/esm/foundation/factories/middleware/createDisableCacheMiddleware.mjs.map +0 -1
  81. package/dist/esm/foundation/factories/middleware/index.d.ts +0 -1
  82. package/dist/esm/foundation/factories/middleware/index.mjs +0 -2
  83. package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/cognitoIdentityPoolEndpointResolver.d.ts +0 -4
  84. package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/cognitoIdentityPoolEndpointResolver.mjs +0 -27
  85. package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/cognitoIdentityPoolEndpointResolver.mjs.map +0 -1
  86. package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/constants.d.ts +0 -10
  87. package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/constants.mjs +0 -34
  88. package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/constants.mjs.map +0 -1
  89. package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/createGetCredentialsForIdentityClient.d.ts +0 -14
  90. package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/createGetCredentialsForIdentityClient.mjs +0 -50
  91. package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/createGetCredentialsForIdentityClient.mjs.map +0 -1
  92. package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/createGetIdClient.d.ts +0 -14
  93. package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/createGetIdClient.mjs +0 -45
  94. package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/createGetIdClient.mjs.map +0 -1
  95. package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/handler/cognitoIdentityTransferHandler.d.ts +0 -8
  96. package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/handler/cognitoIdentityTransferHandler.mjs +0 -31
  97. package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/handler/cognitoIdentityTransferHandler.mjs.map +0 -1
  98. package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/handler/index.d.ts +0 -1
  99. package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/handler/index.mjs +0 -2
  100. package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/handler/index.mjs.map +0 -1
  101. package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/index.d.ts +0 -4
  102. package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/index.mjs +0 -4
  103. package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/index.mjs.map +0 -1
  104. package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/serde/createClientSerializer.d.ts +0 -3
  105. package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/serde/createClientSerializer.mjs +0 -20
  106. package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/serde/createClientSerializer.mjs.map +0 -1
  107. package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/serde/index.d.ts +0 -1
  108. package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/serde/index.mjs +0 -2
  109. package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/serde/index.mjs.map +0 -1
  110. package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/types/index.d.ts +0 -3
  111. package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/types/index.mjs +0 -2
  112. package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/types/index.mjs.map +0 -1
  113. package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/types/sdk.mjs +0 -2
  114. package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/types/sdk.mjs.map +0 -1
  115. package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/types/serviceClient.d.ts +0 -6
  116. package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/types/serviceClient.mjs +0 -2
  117. package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/types/serviceClient.mjs.map +0 -1
  118. package/src/foundation/factories/middleware/createDisableCacheMiddleware.ts +0 -18
  119. package/src/foundation/factories/middleware/index.ts +0 -4
  120. package/src/foundation/factories/serviceClients/cognitoIdentity/cognitoIdentityPoolEndpointResolver.ts +0 -15
  121. package/src/foundation/factories/serviceClients/cognitoIdentity/constants.ts +0 -20
  122. package/src/foundation/factories/serviceClients/cognitoIdentity/createGetCredentialsForIdentityClient.ts +0 -62
  123. package/src/foundation/factories/serviceClients/cognitoIdentity/createGetIdClient.ts +0 -48
  124. package/src/foundation/factories/serviceClients/cognitoIdentity/handler/cognitoIdentityTransferHandler.ts +0 -23
  125. package/src/foundation/factories/serviceClients/cognitoIdentity/handler/index.ts +0 -4
  126. package/src/foundation/factories/serviceClients/cognitoIdentity/index.ts +0 -12
  127. package/src/foundation/factories/serviceClients/cognitoIdentity/serde/createClientSerializer.ts +0 -29
  128. package/src/foundation/factories/serviceClients/cognitoIdentity/serde/index.ts +0 -4
  129. package/src/foundation/factories/serviceClients/cognitoIdentity/types/index.ts +0 -9
  130. package/src/foundation/factories/serviceClients/cognitoIdentity/types/serviceClient.ts +0 -8
  131. /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.14.5-local-stack.00864ae.0+00864ae';
6
+ exports.version = '6.14.5-unstable.5c85092.0+5c85092';
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.14.5-local-stack.00864ae.0+00864ae';\n"],"names":[],"mappings":";;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,OAAO,GAAG,MAAM;AACxB;AACA,OAAO,CAAC,OAAO,GAAG,sCAAsC;;"}
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.14.5-unstable.5c85092.0+5c85092';\n"],"names":[],"mappings":";;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,OAAO,GAAG,MAAM;AACxB;AACA,OAAO,CAAC,OAAO,GAAG,mCAAmC;;"}
@@ -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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,IAAI,gBAAgB;AACpB,IAAI,YAAY,EAAE,IAAI,OAAO,CAAC,eAAe,EAAE,SAAS,CAAC,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;AACD,IAAI,iBAAiB,CAAC,uBAAuB,EAAE,MAAM;AACrD,IAAI,OAAO,CAAC,aAAa,CAAC,cAAc,GAAG,IAAI,UAAU,CAAC,mBAAmB,GAAG;AAChF,CAAC,CAAC;AACF;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;AACF,OAAO,CAAC,gBAAgB,GAAG,gBAAgB;AAC3C;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;AACF,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;AAC7D,OAAO,CAAC,yBAAyB,GAAG,MAAM;AAC1C,MAAM,SAAS,GAAG,OAAO,CAAC,eAAe,CAAC;AAC1C,MAAM,UAAU,GAAG,OAAO,CAAC,wBAAwB,CAAC;AACpD,MAAM,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC;AAChC,MAAM,mCAAmC,GAAG,CAAC,KAAK,EAAE,QAAQ,KAAK;AACjE,IAAI,MAAM,OAAO,GAAG,IAAI,MAAM,CAAC,gBAAgB,EAAE,2BAA2B,CAAC;AAC7E,IAAI,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC;AACtC,IAAI,OAAO,IAAI,MAAM,CAAC,mBAAmB,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,CAAC;AACnE,CAAC;AACD,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;AACnE,QAAQ,MAAM,KAAK;AACnB;AACA,SAAS;AACT,QAAQ,MAAM,IAAI,GAAG,MAAM,IAAI,SAAS,CAAC,aAAa,EAAE,QAAQ,CAAC;AACjE,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;AACT;AACA,CAAC;AACD,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;AACL,CAAC;AACD;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;AAC7D,OAAO,CAAC,KAAK,GAAG,MAAM;AACtB,MAAM,SAAS,GAAG,OAAO,CAAC,eAAe,CAAC;AAC1C,MAAM,UAAU,GAAG,OAAO,CAAC,wBAAwB,CAAC;AACpD,MAAM,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC;AAChC,MAAM,eAAe,GAAG,CAAC,KAAK,EAAE,QAAQ,KAAK;AAC7C,IAAI,MAAM,OAAO,GAAG,IAAI,MAAM,CAAC,gBAAgB,EAAE,OAAO,CAAC;AACzD,IAAI,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC;AACtC,IAAI,OAAO,IAAI,MAAM,CAAC,mBAAmB,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,CAAC;AACnE,CAAC;AACD,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;AACnE,QAAQ,MAAM,KAAK;AACnB;AACA,SAAS;AACT,QAAQ,MAAM,IAAI,GAAG,MAAM,IAAI,SAAS,CAAC,aAAa,EAAE,QAAQ,CAAC;AACjE,QAAQ,OAAO;AACf,YAAY,UAAU,EAAE,IAAI,CAAC,UAAU;AACvC,YAAY,SAAS,EAAE,IAAI,SAAS,CAAC,aAAa,EAAE,QAAQ,CAAC;AAC7D,SAAS;AACT;AACA,CAAC;AACD;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;AAC7D,OAAO,CAAC,yBAAyB,GAAG,OAAO,CAAC,KAAK,GAAG,MAAM;AAC1D,IAAI,OAAO,GAAG,OAAO,CAAC,SAAS,CAAC;AAChC,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;AACzG,IAAI,2BAA2B,GAAG,OAAO,CAAC,6BAA6B,CAAC;AACxE,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.syncSessionStorage = 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.syncSessionStorage = 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.syncSessionStorage = 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, \"syncSessionStorage\", { enumerable: true, get: function () { return storage_1.syncSessionStorage; } });\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;AAC7D,OAAO,CAAC,aAAa,GAAG,OAAO,CAAC,aAAa,GAAG,OAAO,CAAC,IAAI,GAAG,OAAO,CAAC,KAAK,GAAG,OAAO,CAAC,qBAAqB,GAAG,OAAO,CAAC,kBAAkB,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,MAAM;AACzd;AACA;AACA;AACA;AACA,IAAI,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC;AAC5B,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;AACnG,IAAI,OAAO,GAAG,OAAO,CAAC,wBAAwB,CAAC;AAC/C,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,WAAW,EAAE,EAAE,UAAU,EAA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Ac,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,MAAM,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC;AACtG;AACA,IAAI,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC;AAClC,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;AAC1H;AACA,IAAI,eAAe,GAAG,OAAO,CAAC,iBAAiB,CAAC;AAChD,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.syncSessionStorage = 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, \"syncSessionStorage\", { enumerable: true, get: function () { return storage_1.syncSessionStorage; } });\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;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CAAC,aAAa,CAAC,EAAE,EAAE,CAAC;;"}
@@ -2,10 +2,6 @@
2
2
 
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.AuthClass = void 0;
5
- // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
6
- // SPDX-License-Identifier: Apache-2.0
7
- const Logger_1 = require("../../Logger");
8
- const logger = new Logger_1.ConsoleLogger('Auth');
9
5
  class AuthClass {
10
6
  /**
11
7
  * Configure Auth category
@@ -20,13 +16,6 @@ class AuthClass {
20
16
  configure(authResourcesConfig, authOptions) {
21
17
  this.authConfig = authResourcesConfig;
22
18
  this.authOptions = authOptions;
23
- if (authResourcesConfig && authResourcesConfig.Cognito?.userPoolEndpoint) {
24
- logger.warn(getCustomEndpointWarningMessage('Amazon Cognito User Pool'));
25
- }
26
- if (authResourcesConfig &&
27
- authResourcesConfig.Cognito?.identityPoolEndpoint) {
28
- logger.warn(getCustomEndpointWarningMessage('Amazon Cognito Identity Pool'));
29
- }
30
19
  }
31
20
  /**
32
21
  * Fetch the auth tokens, and the temporary AWS credentials and identity if they are configured. By default it
@@ -77,5 +66,4 @@ class AuthClass {
77
66
  }
78
67
  }
79
68
  exports.AuthClass = AuthClass;
80
- const getCustomEndpointWarningMessage = (target) => `You are using a custom Amazon ${target} endpoint, ensure the endpoint is correct.`;
81
69
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../src/singleton/Auth/index.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AuthClass = void 0;\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst Logger_1 = require(\"../../Logger\");\nconst logger = new Logger_1.ConsoleLogger('Auth');\nclass AuthClass {\n /**\n * Configure Auth category\n *\n * @internal\n *\n * @param authResourcesConfig - Resources configurations required by Auth providers.\n * @param authOptions - Client options used by library\n *\n * @returns void\n */\n configure(authResourcesConfig, authOptions) {\n this.authConfig = authResourcesConfig;\n this.authOptions = authOptions;\n if (authResourcesConfig && authResourcesConfig.Cognito?.userPoolEndpoint) {\n logger.warn(getCustomEndpointWarningMessage('Amazon Cognito User Pool'));\n }\n if (authResourcesConfig &&\n authResourcesConfig.Cognito?.identityPoolEndpoint) {\n logger.warn(getCustomEndpointWarningMessage('Amazon Cognito Identity Pool'));\n }\n }\n /**\n * Fetch the auth tokens, and the temporary AWS credentials and identity if they are configured. By default it\n * does not refresh the auth tokens or credentials if they are loaded in storage already. You can force a refresh\n * with `{ forceRefresh: true }` input.\n *\n * @param options - Options configuring the fetch behavior.\n *\n * @returns Promise of current auth session {@link AuthSession}.\n */\n async fetchAuthSession(options = {}) {\n let credentialsAndIdentityId;\n let userSub;\n // Get tokens will throw if session cannot be refreshed (network or service error) or return null if not available\n const tokens = await this.getTokens(options);\n if (tokens) {\n userSub = tokens.accessToken?.payload?.sub;\n // getCredentialsAndIdentityId will throw if cannot get credentials (network or service error)\n credentialsAndIdentityId =\n await this.authOptions?.credentialsProvider?.getCredentialsAndIdentityId({\n authConfig: this.authConfig,\n tokens,\n authenticated: true,\n forceRefresh: options.forceRefresh,\n });\n }\n else {\n // getCredentialsAndIdentityId will throw if cannot get credentials (network or service error)\n credentialsAndIdentityId =\n await this.authOptions?.credentialsProvider?.getCredentialsAndIdentityId({\n authConfig: this.authConfig,\n authenticated: false,\n forceRefresh: options.forceRefresh,\n });\n }\n return {\n tokens,\n credentials: credentialsAndIdentityId?.credentials,\n identityId: credentialsAndIdentityId?.identityId,\n userSub,\n };\n }\n async clearCredentials() {\n await this.authOptions?.credentialsProvider?.clearCredentialsAndIdentityId();\n }\n async getTokens(options) {\n return ((await this.authOptions?.tokenProvider?.getTokens(options)) ?? undefined);\n }\n}\nexports.AuthClass = AuthClass;\nconst getCustomEndpointWarningMessage = (target) => `You are using a custom Amazon ${target} endpoint, ensure the endpoint is correct.`;\n"],"names":[],"mappings":";;AACA,MAAM,CAAC,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AU;AAC/C,oBAAoB,MAAM;AAC1B,oBAAoB,aAAa,EAAE,IAAI;AACvC,oBAAoB,YAAY,EAAE,OAAO,CAAC,YAAY;AACtD,iBAAiB,CAAC;AAClB;AACA,aAAa;AACb;AACA,YAAY,wBAAwB;AACpC,gBAAgB,MAAM,IAAI,CAAC,WAAW,EAAE,mBAAmB,EAAE,2BAA2B,CAAC;AACzF,oBAAoB,UAAU,EAAE,IAAI,CAAC,UAAU;AAC/C,oBAAoB,aAAa,EAAE,KAAK;AACxC,oBAAoB,YAAY,EAAE,OAAO,CAAC,YAAY;AACtD,iBAAiB,CAAC;AAClB;AACA,QAAQ,OAAO;AACf,YAAY,MAAM;AAClB,YAAY,WAAW,EAAE,wBAAwB,EAAE,WAAW;AAC9D,YAAY,UAAU,EAAE,wBAAwB,EAAE,UAAU;AAC5D,YAAY,OAAO;AACnB,SAAS;AACT;AACA,IAAI,MAAM,gBAAgB,GAAG;AAC7B,QAAQ,MAAM,IAAI,CAAC,WAAW,EAAE,mBAAmB,EAAE,6BAA6B,EAAE;AACpF;AACA,IAAI,MAAM,SAAS,CAAC,OAAO,EAAE;AAC7B,QAAQ,QAAQ,CAAC,MAAM,IAAI,CAAC,WAAW,EAAE,aAAa,EAAE,SAAS,CAAC,OAAO,CAAC,KAAK,SAAS;AACxF;AACA;AACA,OAAO,CAAC,SAAS,GAAG,SAAS;AAC7B,MAAM,+BAA+B,GAAG,CAAC,MAAM,KAAK,CAAC,8BAA8B,EAAE,MAAM,CAAC,0CAA0C,CAAC;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../../src/singleton/Auth/index.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AuthClass = void 0;\nclass AuthClass {\n /**\n * Configure Auth category\n *\n * @internal\n *\n * @param authResourcesConfig - Resources configurations required by Auth providers.\n * @param authOptions - Client options used by library\n *\n * @returns void\n */\n configure(authResourcesConfig, authOptions) {\n this.authConfig = authResourcesConfig;\n this.authOptions = authOptions;\n }\n /**\n * Fetch the auth tokens, and the temporary AWS credentials and identity if they are configured. By default it\n * does not refresh the auth tokens or credentials if they are loaded in storage already. You can force a refresh\n * with `{ forceRefresh: true }` input.\n *\n * @param options - Options configuring the fetch behavior.\n *\n * @returns Promise of current auth session {@link AuthSession}.\n */\n async fetchAuthSession(options = {}) {\n let credentialsAndIdentityId;\n let userSub;\n // Get tokens will throw if session cannot be refreshed (network or service error) or return null if not available\n const tokens = await this.getTokens(options);\n if (tokens) {\n userSub = tokens.accessToken?.payload?.sub;\n // getCredentialsAndIdentityId will throw if cannot get credentials (network or service error)\n credentialsAndIdentityId =\n await this.authOptions?.credentialsProvider?.getCredentialsAndIdentityId({\n authConfig: this.authConfig,\n tokens,\n authenticated: true,\n forceRefresh: options.forceRefresh,\n });\n }\n else {\n // getCredentialsAndIdentityId will throw if cannot get credentials (network or service error)\n credentialsAndIdentityId =\n await this.authOptions?.credentialsProvider?.getCredentialsAndIdentityId({\n authConfig: this.authConfig,\n authenticated: false,\n forceRefresh: options.forceRefresh,\n });\n }\n return {\n tokens,\n credentials: credentialsAndIdentityId?.credentials,\n identityId: credentialsAndIdentityId?.identityId,\n userSub,\n };\n }\n async clearCredentials() {\n await this.authOptions?.credentialsProvider?.clearCredentialsAndIdentityId();\n }\n async getTokens(options) {\n return ((await this.authOptions?.tokenProvider?.getTokens(options)) ?? undefined);\n }\n}\nexports.AuthClass = AuthClass;\n"],"names":[],"mappings":";;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,SAAS,GAAG,MAAM;AAC1B,MAAM,SAAS,CAAC;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,SAAS,CAAC,mBAAmB,EAAE,WAAW,EAAE;AAChD,QAAQ,IAAI,CAAC,UAAU,GAAG,mBAAmB;AAC7C,QAAQ,IAAI,CAAC,WA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C,WAAW,EAAE,aAAa,EAAE,SAAS,CAAC,OAAO,CAAC,KAAK,SAAS;AACxF;AACA;AACA,OAAO,CAAC,SAAS,GAAG,SAAS;;"}
@@ -1 +1 @@
1
- export declare const version = "6.14.5-local-stack.00864ae.0+00864ae";
1
+ export declare const version = "6.14.5-unstable.5c85092.0+5c85092";
@@ -1,5 +1,5 @@
1
1
  // generated by genversion
2
- const version = '6.14.5-local-stack.00864ae.0+00864ae';
2
+ const version = '6.14.5-unstable.5c85092.0+5c85092';
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.14.5-local-stack.00864ae.0+00864ae';\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.14.5-unstable.5c85092.0+5c85092';\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 & object & import("../../clients").RetryOptions<HttpResponse> & import("../../clients").AmzSdkRequestHeaderMiddlewareOptions & 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, error?: unknown) => Promise<import("../../clients").RetryDeciderOutput>;
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,83 @@
1
+ import { getDnsSuffix } from '../../clients/endpoints/getDnsSuffix.mjs';
2
+ import '../../types/errors.mjs';
3
+ import '../../errors/errorHelpers.mjs';
4
+ import { unauthenticatedHandler } from '../../clients/handlers/aws/unauthenticated.mjs';
5
+ import { jitteredBackoff } from '../../clients/middleware/retry/jitteredBackoff.mjs';
6
+ import { getRetryDecider } from '../../clients/middleware/retry/defaultRetryDecider.mjs';
7
+ import '../../utils/getClientInfo/getClientInfo.mjs';
8
+ import '../../utils/retry/retry.mjs';
9
+ import '../../parseAWSExports.mjs';
10
+ import 'uuid';
11
+ import { AmplifyUrl } from '../../utils/amplifyUrl/index.mjs';
12
+ import '../../singleton/Auth/utils/errorHelpers.mjs';
13
+ import '@aws-crypto/sha256-js';
14
+ import '@smithy/util-hex-encoding';
15
+ import { getAmplifyUserAgent } from '../../Platform/index.mjs';
16
+ import '../../Platform/types.mjs';
17
+ import '../../BackgroundProcessManager/types.mjs';
18
+ import '../../Reachability/Reachability.mjs';
19
+ import '../../Hub/index.mjs';
20
+ import '../../utils/sessionListener/index.mjs';
21
+ import { composeTransferHandler } from '../../clients/internal/composeTransferHandler.mjs';
22
+ import { parseJsonError } from '../../clients/serde/json.mjs';
23
+ import { observeFrameworkChanges } from '../../Platform/detectFramework.mjs';
24
+
25
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
26
+ // SPDX-License-Identifier: Apache-2.0
27
+ /**
28
+ * The service name used to sign requests if the API requires authentication.
29
+ */
30
+ const SERVICE_NAME = 'cognito-identity';
31
+ /**
32
+ * The endpoint resolver function that returns the endpoint URL for a given region.
33
+ */
34
+ const endpointResolver = ({ region }) => ({
35
+ url: new AmplifyUrl(`https://cognito-identity.${region}.${getDnsSuffix(region)}`),
36
+ });
37
+ /**
38
+ * A Cognito Identity-specific middleware that disables caching for all requests.
39
+ */
40
+ const disableCacheMiddlewareFactory = () => next => async function disableCacheMiddleware(request) {
41
+ request.headers['cache-control'] = 'no-store';
42
+ return next(request);
43
+ };
44
+ /**
45
+ * A Cognito Identity-specific transfer handler that does NOT sign requests, and
46
+ * disables caching.
47
+ *
48
+ * @internal
49
+ */
50
+ const cognitoIdentityTransferHandler = composeTransferHandler(unauthenticatedHandler, [disableCacheMiddlewareFactory]);
51
+ /**
52
+ * @internal
53
+ */
54
+ const defaultConfig = {
55
+ service: SERVICE_NAME,
56
+ endpointResolver,
57
+ retryDecider: getRetryDecider(parseJsonError),
58
+ computeDelay: jitteredBackoff,
59
+ userAgentValue: getAmplifyUserAgent(),
60
+ cache: 'no-store',
61
+ };
62
+ observeFrameworkChanges(() => {
63
+ defaultConfig.userAgentValue = getAmplifyUserAgent();
64
+ });
65
+ /**
66
+ * @internal
67
+ */
68
+ const getSharedHeaders = (operation) => ({
69
+ 'content-type': 'application/x-amz-json-1.1',
70
+ 'x-amz-target': `AWSCognitoIdentityService.${operation}`,
71
+ });
72
+ /**
73
+ * @internal
74
+ */
75
+ const buildHttpRpcRequest = ({ url }, headers, body) => ({
76
+ headers,
77
+ url,
78
+ body,
79
+ method: 'POST',
80
+ });
81
+
82
+ export { buildHttpRpcRequest, cognitoIdentityTransferHandler, defaultConfig, getSharedHeaders };
83
+ //# 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;AACvC;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;AACF;AACA;AACA;AACA,MAAM,6BAA6B,GAAG,MAAM,IAAI,IAAI,eAAe,sBAAsB,CAAC,OAAO,EAAE;AACnG,IAAI,OAAO,CAAC,OAAO,CAAC,eAAe,CAAC,GAAG,UAAU;AACjD,IAAI,OAAO,IAAI,CAAC,OAAO,CAAC;AACxB,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,8BAA8B,GAAG,sBAAsB,CAAC,sBAAsB,EAAE,CAAC,6BAA6B,CAAC;AAC5H;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;AACA,uBAAuB,CAAC,MAAM;AAC9B,IAAI,aAAa,CAAC,cAAc,GAAG,mBAAmB,EAAE;AACxD,CAAC,CAAC;AACF;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;AACD;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, middlewareContext?: import("../../clients").MiddlewareContext) => Promise<import("../../clients").RetryDeciderOutput>) & ((response?: HttpResponse, error?: unknown) => Promise<import("../../clients").RetryDeciderOutput>)) | 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,56 @@
1
+ import '../../types/errors.mjs';
2
+ import '../../errors/errorHelpers.mjs';
3
+ import '../../utils/getClientInfo/getClientInfo.mjs';
4
+ import '../../utils/retry/retry.mjs';
5
+ import '../../parseAWSExports.mjs';
6
+ import 'uuid';
7
+ import '../../singleton/Auth/utils/errorHelpers.mjs';
8
+ import '@aws-crypto/sha256-js';
9
+ import '@smithy/util-hex-encoding';
10
+ import '../../Platform/index.mjs';
11
+ import '../../Platform/types.mjs';
12
+ import '../../BackgroundProcessManager/types.mjs';
13
+ import '../../Reachability/Reachability.mjs';
14
+ import '../../Hub/index.mjs';
15
+ import '../../utils/sessionListener/index.mjs';
16
+ import { parseMetadata } from '../../clients/serde/responseInfo.mjs';
17
+ import { parseJsonError, parseJsonBody } from '../../clients/serde/json.mjs';
18
+ import { composeServiceApi } from '../../clients/internal/composeServiceApi.mjs';
19
+ import { defaultConfig, cognitoIdentityTransferHandler, buildHttpRpcRequest, getSharedHeaders } from './base.mjs';
20
+
21
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
22
+ // SPDX-License-Identifier: Apache-2.0
23
+ const getCredentialsForIdentitySerializer = (input, endpoint) => {
24
+ const headers = getSharedHeaders('GetCredentialsForIdentity');
25
+ const body = JSON.stringify(input);
26
+ return buildHttpRpcRequest(endpoint, headers, body);
27
+ };
28
+ const getCredentialsForIdentityDeserializer = async (response) => {
29
+ if (response.statusCode >= 300) {
30
+ const error = await parseJsonError(response);
31
+ throw error;
32
+ }
33
+ else {
34
+ const body = await parseJsonBody(response);
35
+ return {
36
+ IdentityId: body.IdentityId,
37
+ Credentials: deserializeCredentials(body.Credentials),
38
+ $metadata: parseMetadata(response),
39
+ };
40
+ }
41
+ };
42
+ const deserializeCredentials = ({ AccessKeyId, SecretKey, SessionToken, Expiration, } = {}) => {
43
+ return {
44
+ AccessKeyId,
45
+ SecretKey,
46
+ SessionToken,
47
+ Expiration: Expiration && new Date(Expiration * 1000),
48
+ };
49
+ };
50
+ /**
51
+ * @internal
52
+ */
53
+ const getCredentialsForIdentity = composeServiceApi(cognitoIdentityTransferHandler, getCredentialsForIdentitySerializer, getCredentialsForIdentityDeserializer, defaultConfig);
54
+
55
+ export { getCredentialsForIdentity };
56
+ //# 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;AACjE,IAAI,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC;AACtC,IAAI,OAAO,mBAAmB,CAAC,QAAQ,EAAE,OAAO,EAAE,IAAI,CAAC;AACvD,CAAC;AACD,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;AACpD,QAAQ,MAAM,KAAK;AACnB;AACA,SAAS;AACT,QAAQ,MAAM,IAAI,GAAG,MAAM,aAAa,CAAC,QAAQ,CAAC;AAClD,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;AACT;AACA,CAAC;AACD,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;AACL,CAAC;AACD;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, middlewareContext?: import("../../clients").MiddlewareContext) => Promise<import("../../clients").RetryDeciderOutput>) & ((response?: HttpResponse, error?: unknown) => Promise<import("../../clients").RetryDeciderOutput>)) | 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>;