@aws-amplify/core 6.0.1-console-preview.7049e04.0 → 6.0.1-console-preview.5f040a2.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 (110) hide show
  1. package/internals/aws-clients/pinpoint/package.json +4 -4
  2. package/lib/Platform/types.d.ts +28 -4
  3. package/lib/Platform/types.js +26 -35
  4. package/lib/Platform/version.d.ts +1 -1
  5. package/lib/Platform/version.js +1 -1
  6. package/lib/clients/middleware/signing/signer/signatureV4/index.d.ts +1 -0
  7. package/lib/clients/middleware/signing/signer/signatureV4/index.js +1 -0
  8. package/lib/clients/middleware/signing/signer/signatureV4/polyfills/index.d.ts +0 -0
  9. package/lib/clients/middleware/signing/signer/signatureV4/polyfills/index.js +4 -0
  10. package/lib/clients/middleware/signing/signer/signatureV4/polyfills/index.native.d.ts +1 -0
  11. package/lib/clients/middleware/signing/signer/signatureV4/polyfills/index.native.js +6 -0
  12. package/lib/index.d.ts +1 -1
  13. package/lib/index.js +3 -3
  14. package/lib/providers/pinpoint/apis/updateEndpoint.js +2 -2
  15. package/lib/providers/pinpoint/utils/PinpointEventBuffer.js +2 -2
  16. package/lib/tsconfig.tsbuildinfo +1 -1
  17. package/lib/utils/globalHelpers/index.native.d.ts +2 -3
  18. package/lib/utils/globalHelpers/index.native.js +3 -3
  19. package/lib-esm/Platform/types.d.ts +28 -4
  20. package/lib-esm/Platform/types.js +26 -35
  21. package/lib-esm/Platform/version.d.ts +1 -1
  22. package/lib-esm/Platform/version.js +1 -1
  23. package/lib-esm/clients/middleware/signing/signer/signatureV4/index.d.ts +1 -0
  24. package/lib-esm/clients/middleware/signing/signer/signatureV4/index.js +1 -0
  25. package/lib-esm/clients/middleware/signing/signer/signatureV4/polyfills/index.d.ts +0 -0
  26. package/lib-esm/clients/middleware/signing/signer/signatureV4/polyfills/index.js +4 -0
  27. package/lib-esm/clients/middleware/signing/signer/signatureV4/polyfills/index.native.d.ts +1 -0
  28. package/lib-esm/clients/middleware/signing/signer/signatureV4/polyfills/index.native.js +4 -0
  29. package/lib-esm/index.d.ts +1 -1
  30. package/lib-esm/index.js +1 -1
  31. package/lib-esm/providers/pinpoint/apis/updateEndpoint.js +1 -1
  32. package/lib-esm/providers/pinpoint/utils/PinpointEventBuffer.js +1 -1
  33. package/lib-esm/tsconfig.tsbuildinfo +1 -1
  34. package/lib-esm/utils/globalHelpers/index.native.d.ts +2 -3
  35. package/lib-esm/utils/globalHelpers/index.native.js +2 -2
  36. package/package.json +3 -3
  37. package/src/Platform/types.ts +26 -35
  38. package/src/Platform/version.ts +1 -1
  39. package/src/clients/middleware/signing/signer/signatureV4/index.ts +2 -0
  40. package/src/clients/middleware/signing/signer/signatureV4/polyfills/index.native.ts +5 -0
  41. package/src/clients/middleware/signing/signer/signatureV4/polyfills/index.ts +4 -0
  42. package/src/index.ts +1 -1
  43. package/src/providers/pinpoint/apis/updateEndpoint.ts +1 -1
  44. package/src/providers/pinpoint/utils/PinpointEventBuffer.ts +1 -1
  45. package/src/utils/globalHelpers/index.native.ts +2 -2
  46. package/lib/clients/middleware/signing/signer/signatureV4/index.native.d.ts +0 -4
  47. package/lib/clients/middleware/signing/signer/signatureV4/index.native.js +0 -16
  48. package/lib-esm/clients/middleware/signing/signer/signatureV4/index.native.d.ts +0 -4
  49. package/lib-esm/clients/middleware/signing/signer/signatureV4/index.native.js +0 -9
  50. package/src/clients/middleware/signing/signer/signatureV4/index.native.ts +0 -12
  51. /package/lib/{AwsClients/CognitoIdentity → awsClients/cognitoIdentity}/base.d.ts +0 -0
  52. /package/lib/{AwsClients/CognitoIdentity → awsClients/cognitoIdentity}/base.js +0 -0
  53. /package/lib/{AwsClients/CognitoIdentity → awsClients/cognitoIdentity}/getCredentialsForIdentity.d.ts +0 -0
  54. /package/lib/{AwsClients/CognitoIdentity → awsClients/cognitoIdentity}/getCredentialsForIdentity.js +0 -0
  55. /package/lib/{AwsClients/CognitoIdentity → awsClients/cognitoIdentity}/getId.d.ts +0 -0
  56. /package/lib/{AwsClients/CognitoIdentity → awsClients/cognitoIdentity}/getId.js +0 -0
  57. /package/lib/{AwsClients/CognitoIdentity → awsClients/cognitoIdentity}/index.d.ts +0 -0
  58. /package/lib/{AwsClients/CognitoIdentity → awsClients/cognitoIdentity}/index.js +0 -0
  59. /package/lib/{AwsClients/CognitoIdentity → awsClients/cognitoIdentity}/types.d.ts +0 -0
  60. /package/lib/{AwsClients/CognitoIdentity → awsClients/cognitoIdentity}/types.js +0 -0
  61. /package/lib/{AwsClients/Pinpoint → awsClients/pinpoint}/base.d.ts +0 -0
  62. /package/lib/{AwsClients/Pinpoint → awsClients/pinpoint}/base.js +0 -0
  63. /package/lib/{AwsClients/Pinpoint → awsClients/pinpoint}/errorHelpers.d.ts +0 -0
  64. /package/lib/{AwsClients/Pinpoint → awsClients/pinpoint}/errorHelpers.js +0 -0
  65. /package/lib/{AwsClients/Pinpoint → awsClients/pinpoint}/getInAppMessages.d.ts +0 -0
  66. /package/lib/{AwsClients/Pinpoint → awsClients/pinpoint}/getInAppMessages.js +0 -0
  67. /package/lib/{AwsClients/Pinpoint → awsClients/pinpoint}/index.d.ts +0 -0
  68. /package/lib/{AwsClients/Pinpoint → awsClients/pinpoint}/index.js +0 -0
  69. /package/lib/{AwsClients/Pinpoint → awsClients/pinpoint}/putEvents.d.ts +0 -0
  70. /package/lib/{AwsClients/Pinpoint → awsClients/pinpoint}/putEvents.js +0 -0
  71. /package/lib/{AwsClients/Pinpoint → awsClients/pinpoint}/types.d.ts +0 -0
  72. /package/lib/{AwsClients/Pinpoint → awsClients/pinpoint}/types.js +0 -0
  73. /package/lib/{AwsClients/Pinpoint → awsClients/pinpoint}/updateEndpoint.d.ts +0 -0
  74. /package/lib/{AwsClients/Pinpoint → awsClients/pinpoint}/updateEndpoint.js +0 -0
  75. /package/lib-esm/{AwsClients/CognitoIdentity → awsClients/cognitoIdentity}/base.d.ts +0 -0
  76. /package/lib-esm/{AwsClients/CognitoIdentity → awsClients/cognitoIdentity}/base.js +0 -0
  77. /package/lib-esm/{AwsClients/CognitoIdentity → awsClients/cognitoIdentity}/getCredentialsForIdentity.d.ts +0 -0
  78. /package/lib-esm/{AwsClients/CognitoIdentity → awsClients/cognitoIdentity}/getCredentialsForIdentity.js +0 -0
  79. /package/lib-esm/{AwsClients/CognitoIdentity → awsClients/cognitoIdentity}/getId.d.ts +0 -0
  80. /package/lib-esm/{AwsClients/CognitoIdentity → awsClients/cognitoIdentity}/getId.js +0 -0
  81. /package/lib-esm/{AwsClients/CognitoIdentity → awsClients/cognitoIdentity}/index.d.ts +0 -0
  82. /package/lib-esm/{AwsClients/CognitoIdentity → awsClients/cognitoIdentity}/index.js +0 -0
  83. /package/lib-esm/{AwsClients/CognitoIdentity → awsClients/cognitoIdentity}/types.d.ts +0 -0
  84. /package/lib-esm/{AwsClients/CognitoIdentity → awsClients/cognitoIdentity}/types.js +0 -0
  85. /package/lib-esm/{AwsClients/Pinpoint → awsClients/pinpoint}/base.d.ts +0 -0
  86. /package/lib-esm/{AwsClients/Pinpoint → awsClients/pinpoint}/base.js +0 -0
  87. /package/lib-esm/{AwsClients/Pinpoint → awsClients/pinpoint}/errorHelpers.d.ts +0 -0
  88. /package/lib-esm/{AwsClients/Pinpoint → awsClients/pinpoint}/errorHelpers.js +0 -0
  89. /package/lib-esm/{AwsClients/Pinpoint → awsClients/pinpoint}/getInAppMessages.d.ts +0 -0
  90. /package/lib-esm/{AwsClients/Pinpoint → awsClients/pinpoint}/getInAppMessages.js +0 -0
  91. /package/lib-esm/{AwsClients/Pinpoint → awsClients/pinpoint}/index.d.ts +0 -0
  92. /package/lib-esm/{AwsClients/Pinpoint → awsClients/pinpoint}/index.js +0 -0
  93. /package/lib-esm/{AwsClients/Pinpoint → awsClients/pinpoint}/putEvents.d.ts +0 -0
  94. /package/lib-esm/{AwsClients/Pinpoint → awsClients/pinpoint}/putEvents.js +0 -0
  95. /package/lib-esm/{AwsClients/Pinpoint → awsClients/pinpoint}/types.d.ts +0 -0
  96. /package/lib-esm/{AwsClients/Pinpoint → awsClients/pinpoint}/types.js +0 -0
  97. /package/lib-esm/{AwsClients/Pinpoint → awsClients/pinpoint}/updateEndpoint.d.ts +0 -0
  98. /package/lib-esm/{AwsClients/Pinpoint → awsClients/pinpoint}/updateEndpoint.js +0 -0
  99. /package/src/{AwsClients/CognitoIdentity → awsClients/cognitoIdentity}/base.ts +0 -0
  100. /package/src/{AwsClients/CognitoIdentity → awsClients/cognitoIdentity}/getCredentialsForIdentity.ts +0 -0
  101. /package/src/{AwsClients/CognitoIdentity → awsClients/cognitoIdentity}/getId.ts +0 -0
  102. /package/src/{AwsClients/CognitoIdentity → awsClients/cognitoIdentity}/index.ts +0 -0
  103. /package/src/{AwsClients/CognitoIdentity → awsClients/cognitoIdentity}/types.ts +0 -0
  104. /package/src/{AwsClients/Pinpoint → awsClients/pinpoint}/base.ts +0 -0
  105. /package/src/{AwsClients/Pinpoint → awsClients/pinpoint}/errorHelpers.ts +0 -0
  106. /package/src/{AwsClients/Pinpoint → awsClients/pinpoint}/getInAppMessages.ts +0 -0
  107. /package/src/{AwsClients/Pinpoint → awsClients/pinpoint}/index.ts +0 -0
  108. /package/src/{AwsClients/Pinpoint → awsClients/pinpoint}/putEvents.ts +0 -0
  109. /package/src/{AwsClients/Pinpoint → awsClients/pinpoint}/types.ts +0 -0
  110. /package/src/{AwsClients/Pinpoint → awsClients/pinpoint}/updateEndpoint.ts +0 -0
@@ -1,4 +1,3 @@
1
- import { encode, decode } from 'base-64';
2
1
  export declare const getCrypto: () => Crypto;
3
- export declare const getBtoa: () => typeof encode;
4
- export declare const getAtob: () => typeof decode;
2
+ export declare const getBtoa: () => typeof import("base-64").encode;
3
+ export declare const getAtob: () => typeof import("base-64").decode;
@@ -4,9 +4,9 @@
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
5
  exports.getAtob = exports.getBtoa = exports.getCrypto = void 0;
6
6
  var react_native_1 = require("@aws-amplify/react-native");
7
- var base_64_1 = require("base-64");
8
7
  var errors_1 = require("../../errors");
9
8
  (0, react_native_1.loadGetRandomValues)();
9
+ var _a = (0, react_native_1.loadBase64)(), encode = _a.encode, decode = _a.decode;
10
10
  var getCrypto = function () {
11
11
  if (typeof crypto !== 'undefined' &&
12
12
  typeof crypto.getRandomValues === 'function') {
@@ -19,10 +19,10 @@ var getCrypto = function () {
19
19
  };
20
20
  exports.getCrypto = getCrypto;
21
21
  var getBtoa = function () {
22
- return base_64_1.encode;
22
+ return encode;
23
23
  };
24
24
  exports.getBtoa = getBtoa;
25
25
  var getAtob = function () {
26
- return base_64_1.decode;
26
+ return decode;
27
27
  };
28
28
  exports.getAtob = getAtob;
@@ -43,7 +43,30 @@ export declare enum ApiAction {
43
43
  Head = "7"
44
44
  }
45
45
  export declare enum AuthAction {
46
- FederatedSignIn = "30"
46
+ SignUp = "1",
47
+ ConfirmSignUp = "2",
48
+ ResendSignUpCode = "3",
49
+ SignIn = "4",
50
+ FetchMFAPreference = "6",
51
+ UpdateMFAPreference = "7",
52
+ SetUpTOTP = "10",
53
+ VerifyTOTPSetup = "11",
54
+ ConfirmSignIn = "12",
55
+ DeleteUserAttributes = "15",
56
+ DeleteUser = "16",
57
+ UpdateUserAttributes = "17",
58
+ FetchUserAttributes = "18",
59
+ ConfirmUserAttribute = "22",
60
+ SignOut = "26",
61
+ UpdatePassword = "27",
62
+ ResetPassword = "28",
63
+ ConfirmResetPassword = "29",
64
+ FederatedSignIn = "30",
65
+ RememberDevice = "32",
66
+ ForgetDevice = "33",
67
+ FetchDevices = "34",
68
+ SendUserAttributeVerificationCode = "35",
69
+ SignInWithRedirect = "36"
47
70
  }
48
71
  export declare enum DataStoreAction {
49
72
  Subscribe = "1",
@@ -71,12 +94,13 @@ export declare enum PushNotificationAction {
71
94
  None = "0"
72
95
  }
73
96
  export declare enum StorageAction {
74
- Put = "1",
75
- Get = "2",
97
+ UploadData = "1",
98
+ DownloadData = "2",
76
99
  List = "3",
77
100
  Copy = "4",
78
101
  Remove = "5",
79
- GetProperties = "6"
102
+ GetProperties = "6",
103
+ GetUrl = "7"
80
104
  }
81
105
  type ActionMap = {
82
106
  [Category.Auth]: AuthAction;
@@ -53,40 +53,30 @@ export var ApiAction;
53
53
  })(ApiAction || (ApiAction = {}));
54
54
  export var AuthAction;
55
55
  (function (AuthAction) {
56
- // SignUp = '1',
57
- // ConfirmSignUp = '2',
58
- // ResendSignUp = '3',
59
- // SignIn = '4',
60
- // GetMFAOptions = '5',
61
- // GetPreferredMFA = '6',
62
- // SetPreferredMFA = '7',
63
- // DisableSMS = '8',
64
- // EnableSMS = '9',
65
- // SetupTOTP = '10',
66
- // VerifyTotpToken = '11',
67
- // ConfirmSignIn = '12',
68
- // CompleteNewPassword = '13',
69
- // SendCustomChallengeAnswer = '14',
70
- // DeleteUserAttributes = '15',
71
- // DeleteUser = '16',
72
- // UpdateUserAttributes = '17',
73
- // UserAttributes = '18',
74
- // CurrentUserPoolUser = '19',
75
- // CurrentAuthenticatedUser = '20',
76
- // CurrentSession = '21',
77
- // VerifyUserAttribute = '22',
78
- // VerifyUserAttributeSubmit = '23',
79
- // VerifyCurrentUserAttribute = '24',
80
- // VerifyCurrentUserAttributeSubmit = '25',
81
- // SignOut = '26',
82
- // ChangePassword = '27',
83
- // ForgotPassword = '28',
84
- // ForgotPasswordSubmit = '29',
56
+ AuthAction["SignUp"] = "1";
57
+ AuthAction["ConfirmSignUp"] = "2";
58
+ AuthAction["ResendSignUpCode"] = "3";
59
+ AuthAction["SignIn"] = "4";
60
+ AuthAction["FetchMFAPreference"] = "6";
61
+ AuthAction["UpdateMFAPreference"] = "7";
62
+ AuthAction["SetUpTOTP"] = "10";
63
+ AuthAction["VerifyTOTPSetup"] = "11";
64
+ AuthAction["ConfirmSignIn"] = "12";
65
+ AuthAction["DeleteUserAttributes"] = "15";
66
+ AuthAction["DeleteUser"] = "16";
67
+ AuthAction["UpdateUserAttributes"] = "17";
68
+ AuthAction["FetchUserAttributes"] = "18";
69
+ AuthAction["ConfirmUserAttribute"] = "22";
70
+ AuthAction["SignOut"] = "26";
71
+ AuthAction["UpdatePassword"] = "27";
72
+ AuthAction["ResetPassword"] = "28";
73
+ AuthAction["ConfirmResetPassword"] = "29";
85
74
  AuthAction["FederatedSignIn"] = "30";
86
- // CurrentUserInfo = '31',
87
- // RememberDevice = '32',
88
- // ForgetDevice = '33',
89
- // FetchDevices = '34',
75
+ AuthAction["RememberDevice"] = "32";
76
+ AuthAction["ForgetDevice"] = "33";
77
+ AuthAction["FetchDevices"] = "34";
78
+ AuthAction["SendUserAttributeVerificationCode"] = "35";
79
+ AuthAction["SignInWithRedirect"] = "36";
90
80
  })(AuthAction || (AuthAction = {}));
91
81
  export var DataStoreAction;
92
82
  (function (DataStoreAction) {
@@ -122,10 +112,11 @@ export var PushNotificationAction;
122
112
  })(PushNotificationAction || (PushNotificationAction = {}));
123
113
  export var StorageAction;
124
114
  (function (StorageAction) {
125
- StorageAction["Put"] = "1";
126
- StorageAction["Get"] = "2";
115
+ StorageAction["UploadData"] = "1";
116
+ StorageAction["DownloadData"] = "2";
127
117
  StorageAction["List"] = "3";
128
118
  StorageAction["Copy"] = "4";
129
119
  StorageAction["Remove"] = "5";
130
120
  StorageAction["GetProperties"] = "6";
121
+ StorageAction["GetUrl"] = "7";
131
122
  })(StorageAction || (StorageAction = {}));
@@ -1 +1 @@
1
- export declare const version = "6.0.1-console-preview.7049e04.0+7049e04";
1
+ export declare const version = "6.0.1-console-preview.5f040a2.0+5f040a2";
@@ -1,2 +1,2 @@
1
1
  // generated by genversion
2
- export var version = '6.0.1-console-preview.7049e04.0+7049e04';
2
+ export var version = '6.0.1-console-preview.5f040a2.0+5f040a2';
@@ -1,3 +1,4 @@
1
+ import './polyfills';
1
2
  export { signRequest } from './signRequest';
2
3
  export { presignUrl } from './presignUrl';
3
4
  export { TOKEN_QUERY_PARAM } from './constants';
@@ -1,5 +1,6 @@
1
1
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
2
  // SPDX-License-Identifier: Apache-2.0
3
+ import './polyfills';
3
4
  // TODO: V6 replace Signer
4
5
  export { signRequest } from './signRequest';
5
6
  export { presignUrl } from './presignUrl';
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+ // SPDX-License-Identifier: Apache-2.0
4
+ // noop - polyfills not required on platform
@@ -0,0 +1,4 @@
1
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
+ // SPDX-License-Identifier: Apache-2.0
3
+ import { loadUrlPolyfill } from '@aws-amplify/react-native';
4
+ loadUrlPolyfill();
@@ -3,7 +3,7 @@ export { HubCapsule, HubCallback, HubPayload } from './Hub/types';
3
3
  export { TokenProvider, AuthTokens, FetchAuthSessionOptions, AWSCredentialsAndIdentityIdProvider, AWSCredentialsAndIdentityId, Identity, OAuthConfig, CognitoUserPoolConfig, } from './singleton/Auth/types';
4
4
  export { AuthConfig, AuthUserPoolConfig, AuthUserPoolAndIdentityPoolConfig, StorageAccessLevel, StorageConfig, GetCredentialsOptions, ResourcesConfig, LibraryOptions, AnalyticsConfig, GeoConfig, } from './singleton/types';
5
5
  export { Amplify, fetchAuthSession, AmplifyClass as AmplifyClassV6, clearCredentials, } from './singleton';
6
- export { getCredentialsForIdentity, getId, GetCredentialsForIdentityInput, GetCredentialsForIdentityOutput, } from './AwsClients/CognitoIdentity';
6
+ export { getCredentialsForIdentity, getId, GetCredentialsForIdentityInput, GetCredentialsForIdentityOutput, } from './awsClients/cognitoIdentity';
7
7
  export { UserProfile } from './types';
8
8
  export { CookieStorage, defaultStorage, sessionStorage, sharedInMemoryStorage, } from './storage';
9
9
  export { KeyValueStorageInterface } from './types';
package/lib-esm/index.js CHANGED
@@ -7,7 +7,7 @@ This file maps top-level exports from `@aws-amplify/core`. These are intended to
7
7
  export { Hub } from './Hub';
8
8
  export { Amplify, fetchAuthSession, AmplifyClass as AmplifyClassV6, clearCredentials, } from './singleton';
9
9
  // AWSClients exports
10
- export { getCredentialsForIdentity, getId, } from './AwsClients/CognitoIdentity';
10
+ export { getCredentialsForIdentity, getId, } from './awsClients/cognitoIdentity';
11
11
  // Storage helpers
12
12
  export { CookieStorage, defaultStorage, sessionStorage, sharedInMemoryStorage, } from './storage';
13
13
  // Cache exports
@@ -49,7 +49,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
49
49
  };
50
50
  import { v4 as uuidv4 } from 'uuid';
51
51
  import { ClientDevice } from '../../../ClientDevice';
52
- import { updateEndpoint as clientUpdateEndpoint, } from '../../../AwsClients/Pinpoint';
52
+ import { updateEndpoint as clientUpdateEndpoint, } from '../../../awsClients/pinpoint';
53
53
  import { cacheEndpointId, getEndpointId } from '../utils';
54
54
  /**
55
55
  * @internal
@@ -73,7 +73,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
73
73
  return to.concat(ar || Array.prototype.slice.call(from));
74
74
  };
75
75
  import { ConsoleLogger as Logger } from '../../../Logger';
76
- import { putEvents, } from '../../../AwsClients/Pinpoint';
76
+ import { putEvents, } from '../../../awsClients/pinpoint';
77
77
  import { isAppInForeground } from './isAppInForeground';
78
78
  var logger = new Logger('PinpointEventBuffer');
79
79
  var RETRYABLE_CODES = [429, 500];