@aws-amplify/core 6.0.1-console-preview.3b09ef9.0 → 6.0.1-ui-preview.1aa6ecb.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.
@@ -1,6 +1,5 @@
1
1
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
2
  // SPDX-License-Identifier: Apache-2.0
3
- import type { UserAgent as AWSUserAgent } from '@aws-sdk/types';
4
3
 
5
4
  export enum Framework {
6
5
  // < 100 - Web frameworks
@@ -54,63 +53,50 @@ export enum ApiAction {
54
53
  Head = '7',
55
54
  }
56
55
  export enum AuthAction {
57
- SignUp = '1',
58
- ConfirmSignUp = '2',
59
- ResendSignUp = '3',
60
- SignIn = '4',
61
- GetMFAOptions = '5',
62
- GetPreferredMFA = '6',
63
- SetPreferredMFA = '7',
64
- DisableSMS = '8',
65
- EnableSMS = '9',
66
- SetupTOTP = '10',
67
- VerifyTotpToken = '11',
68
- ConfirmSignIn = '12',
69
- CompleteNewPassword = '13',
70
- SendCustomChallengeAnswer = '14',
71
- DeleteUserAttributes = '15',
72
- DeleteUser = '16',
73
- UpdateUserAttributes = '17',
74
- UserAttributes = '18',
75
- CurrentUserPoolUser = '19',
76
- CurrentAuthenticatedUser = '20',
77
- CurrentSession = '21',
78
- VerifyUserAttribute = '22',
79
- VerifyUserAttributeSubmit = '23',
80
- VerifyCurrentUserAttribute = '24',
81
- VerifyCurrentUserAttributeSubmit = '25',
82
- SignOut = '26',
83
- ChangePassword = '27',
84
- ForgotPassword = '28',
85
- ForgotPasswordSubmit = '29',
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',
86
85
  FederatedSignIn = '30',
87
- VerifiedContact = '31',
88
- UserSession = '32',
89
- CurrentUserCredentials = '33',
90
- CurrentCredentials = '34',
91
- CurrentUserInfo = '35',
92
- RememberDevice = '36',
93
- ForgetDevice = '37',
94
- FetchDevices = '38',
86
+ // CurrentUserInfo = '31',
87
+ // RememberDevice = '32',
88
+ // ForgetDevice = '33',
89
+ // FetchDevices = '34',
95
90
  }
96
91
  export enum DataStoreAction {
97
92
  Subscribe = '1',
98
93
  GraphQl = '2',
99
94
  }
100
95
  export enum GeoAction {
101
- SearchByText = '1',
102
- SearchForSuggestions = '2',
103
- SearchByPlaceId = '3',
104
- SearchByCoordinates = '4',
105
- SaveGeofences = '5',
106
- GetGeofence = '6',
107
- ListGeofences = '7',
108
- DeleteGeofences = '8',
96
+ None = '0',
109
97
  }
110
98
  export enum InAppMessagingAction {
111
99
  None = '0',
112
- SyncMessages = '1',
113
- IdentifyUser = '2',
114
100
  }
115
101
  export enum InteractionsAction {
116
102
  None = '0',
@@ -133,7 +119,6 @@ export enum StorageAction {
133
119
  Copy = '4',
134
120
  Remove = '5',
135
121
  GetProperties = '6',
136
- Cancel = '7',
137
122
  }
138
123
 
139
124
  type ActionMap = {
@@ -158,15 +143,8 @@ type UserAgentDetailsWithCategory<T extends Category> =
158
143
 
159
144
  type CustomUserAgentDetailsBase = {
160
145
  framework?: Framework;
161
- // DO NOT REMOVE:
162
- // Used by other Amplify teams to pass information to the custom user agent
163
- /** Accepts an array of arrays with exactly 1 or 2 values and translates
164
- those arrays to "item" or "item1/item2" strings on the custom user agent */
165
- additionalInfo?: AWSUserAgent;
166
146
  };
167
147
 
168
- // DO NOT MAKE ANY PROP REQUIRED on CustomUserAgentDetails
169
- // This object is used by other Amplify teams to pass information to the user agent
170
148
  export type CustomUserAgentDetails =
171
149
  | (CustomUserAgentDetailsBase & { category?: never; action?: never })
172
150
  | UserAgentDetailsWithCategory<Category.API>
@@ -1,2 +1,2 @@
1
1
  // generated by genversion
2
- export const version = '6.0.1-console-preview.3b09ef9.0+3b09ef9';
2
+ export const version = '6.0.1-ui-preview.1aa6ecb.0+1aa6ecb';
package/src/index.ts CHANGED
@@ -27,8 +27,8 @@ export {
27
27
  } from './singleton/Auth/types';
28
28
  export {
29
29
  AuthConfig,
30
- UserPoolConfig,
31
- UserPoolConfigAndIdentityPoolConfig,
30
+ AuthUserPoolConfig,
31
+ AuthUserPoolAndIdentityPoolConfig,
32
32
  StorageAccessLevel,
33
33
  StorageConfig,
34
34
  GetCredentialsOptions,
@@ -21,7 +21,11 @@ export {
21
21
  transferKeyToUpperCase,
22
22
  } from './Util/JS';
23
23
 
24
- export { JWT, StrictUnion } from './singleton/Auth/types';
24
+ export {
25
+ JWT,
26
+ StrictUnion,
27
+ CognitoIdentityPoolConfig,
28
+ } from './singleton/Auth/types';
25
29
  // Auth utilities
26
30
  export {
27
31
  decodeJWT,
@@ -99,7 +99,7 @@ export class AuthClass {
99
99
 
100
100
  async clearCredentials(): Promise<void> {
101
101
  if (this.authOptions?.credentialsProvider) {
102
- return await this.authOptions.credentialsProvider.clearCredentials();
102
+ return await this.authOptions.credentialsProvider.clearCredentialsAndIdentityId();
103
103
  }
104
104
  }
105
105
  }
@@ -49,8 +49,8 @@ export type Identity = {
49
49
  export interface AWSCredentialsAndIdentityIdProvider {
50
50
  getCredentialsAndIdentityId: (
51
51
  getCredentialsOptions: GetCredentialsOptions
52
- ) => Promise<AWSCredentialsAndIdentityId>;
53
- clearCredentials: () => void;
52
+ ) => Promise<AWSCredentialsAndIdentityId | undefined>;
53
+ clearCredentialsAndIdentityId: () => void;
54
54
  }
55
55
 
56
56
  export type TokenProvider = {
@@ -9,13 +9,13 @@ import {
9
9
  AuthIdentityPoolConfig,
10
10
  AuthUserPoolAndIdentityPoolConfig,
11
11
  GetCredentialsOptions,
12
+ CognitoIdentityPoolConfig,
12
13
  } from './Auth/types';
13
14
  import {
14
15
  LibraryStorageOptions,
15
16
  StorageAccessLevel,
16
17
  StorageConfig,
17
18
  } from './Storage/types';
18
- import { I18nOptions } from '../I18n/types';
19
19
 
20
20
  export type ResourcesConfig = {
21
21
  // API?: {};
@@ -38,11 +38,12 @@ export type LibraryOptions = {
38
38
 
39
39
  export {
40
40
  AuthConfig,
41
- AuthUserPoolConfig as UserPoolConfig,
42
- AuthIdentityPoolConfig as IdentityPoolConfig,
43
- AuthUserPoolAndIdentityPoolConfig as UserPoolConfigAndIdentityPoolConfig,
41
+ AuthUserPoolConfig,
42
+ AuthIdentityPoolConfig,
43
+ AuthUserPoolAndIdentityPoolConfig,
44
44
  GetCredentialsOptions,
45
45
  StorageAccessLevel,
46
46
  StorageConfig,
47
47
  AnalyticsConfig,
48
+ CognitoIdentityPoolConfig,
48
49
  };