@aws-amplify/core 6.10.2-unstable.b940a23.0 → 6.10.3-unstable.5dbfbf3.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.
@@ -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.13.2-unstable.b940a23.0+b940a23';
6
+ exports.version = '6.13.3-unstable.5dbfbf3.0+5dbfbf3';
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.13.2-unstable.b940a23.0+b940a23';\n"],"names":[],"mappings":";;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,OAAO,GAAG,KAAK,CAAC,CAAC;AACzB;AACA,OAAO,CAAC,OAAO,GAAG,mCAAmC;;"}
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.13.3-unstable.5dbfbf3.0+5dbfbf3';\n"],"names":[],"mappings":";;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,OAAO,GAAG,KAAK,CAAC,CAAC;AACzB;AACA,OAAO,CAAC,OAAO,GAAG,mCAAmC;;"}
@@ -1 +1 @@
1
- export declare const version = "6.13.2-unstable.b940a23.0+b940a23";
1
+ export declare const version = "6.13.3-unstable.5dbfbf3.0+5dbfbf3";
@@ -1,5 +1,5 @@
1
1
  // generated by genversion
2
- const version = '6.13.2-unstable.b940a23.0+b940a23';
2
+ const version = '6.13.3-unstable.5dbfbf3.0+5dbfbf3';
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.13.2-unstable.b940a23.0+b940a23';\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.13.3-unstable.5dbfbf3.0+5dbfbf3';\n"],"names":[],"mappings":"AAAA;AACY,MAAC,OAAO,GAAG;;;;"}
@@ -2,7 +2,7 @@ export { generateRandomString, isBrowser, isNonRetryableError, isTokenExpired, i
2
2
  export { parseAWSExports } from './parseAWSExports';
3
3
  export { isAmplifyOutputs, parseAmplifyOutputs } from './parseAmplifyOutputs';
4
4
  export { LegacyConfig } from './singleton/types';
5
- export { AmplifyOutputs } from './singleton/AmplifyOutputs/types';
5
+ export { AmplifyOutputs, AmplifyOutputsUnknown, } from './singleton/AmplifyOutputs/types';
6
6
  export { ADD_OAUTH_LISTENER } from './singleton/constants';
7
7
  export { amplifyUuid } from './utils/amplifyUuid';
8
8
  export { AmplifyUrl, AmplifyUrlSearchParams } from './utils/amplifyUrl';
@@ -1,5 +1,5 @@
1
- import { AmplifyOutputs, AmplifyOutputsAnalyticsProperties } from './singleton/AmplifyOutputs/types';
1
+ import { AmplifyOutputsAnalyticsProperties, AmplifyOutputsUnknown } from './singleton/AmplifyOutputs/types';
2
2
  import { AnalyticsConfig, LegacyConfig, ResourcesConfig } from './singleton/types';
3
- export declare function isAmplifyOutputs(config: ResourcesConfig | LegacyConfig | AmplifyOutputs): config is AmplifyOutputs;
3
+ export declare function isAmplifyOutputs(config: ResourcesConfig | LegacyConfig | AmplifyOutputsUnknown): config is AmplifyOutputsUnknown;
4
4
  export declare function parseAnalytics(amplifyOutputsAnalyticsProperties?: AmplifyOutputsAnalyticsProperties): AnalyticsConfig | undefined;
5
- export declare function parseAmplifyOutputs(amplifyOutputs: AmplifyOutputs): ResourcesConfig;
5
+ export declare function parseAmplifyOutputs(amplifyOutputs: AmplifyOutputsUnknown): ResourcesConfig;
@@ -1,4 +1,4 @@
1
- import { AmplifyOutputs, AuthConfig, LegacyConfig, LibraryOptions, ResourcesConfig } from './types';
1
+ import { AmplifyOutputsUnknown, AuthConfig, LegacyConfig, LibraryOptions, ResourcesConfig } from './types';
2
2
  import { AuthClass } from './Auth';
3
3
  import { ADD_OAUTH_LISTENER } from './constants';
4
4
  export declare class AmplifyClass {
@@ -25,7 +25,7 @@ export declare class AmplifyClass {
25
25
  * @param resourceConfig - Back-end resource configuration. Typically provided via the `aws-exports.js` file.
26
26
  * @param libraryOptions - Additional options for customizing the behavior of the library.
27
27
  */
28
- configure(resourcesConfig: ResourcesConfig | LegacyConfig | AmplifyOutputs, libraryOptions?: LibraryOptions): void;
28
+ configure(resourcesConfig: ResourcesConfig | LegacyConfig | AmplifyOutputsUnknown, libraryOptions?: LibraryOptions): void;
29
29
  /**
30
30
  * Provides access to the current back-end resource configuration for the Library.
31
31
  *
@@ -30,7 +30,7 @@ export interface AmplifyOutputsAuthProperties {
30
30
  unauthenticated_identities_enabled?: boolean;
31
31
  mfa_configuration?: string;
32
32
  mfa_methods?: string[];
33
- groups?: Partial<Record<UserGroupName, UserGroupPrecedence>>[];
33
+ groups?: Record<UserGroupName, UserGroupPrecedence>[];
34
34
  }
35
35
  export interface AmplifyOutputsStorageBucketProperties {
36
36
  /** Friendly bucket name provided in Amplify Outputs */
@@ -40,7 +40,7 @@ export interface AmplifyOutputsStorageBucketProperties {
40
40
  /** Region for the bucket */
41
41
  aws_region: string;
42
42
  /** Paths to object with access permissions */
43
- paths?: Partial<Record<string, Record<string, string[] | undefined>>>;
43
+ paths?: Record<string, Record<string, string[] | undefined>>;
44
44
  }
45
45
  export interface AmplifyOutputsStorageProperties {
46
46
  /** Default region for Storage */
@@ -95,6 +95,7 @@ export interface AmplifyOutputsNotificationsProperties {
95
95
  amazon_pinpoint_app_id: string;
96
96
  channels: string[];
97
97
  }
98
+ /** @deprecated This type is deprecated and will be removed in future versions. */
98
99
  export interface AmplifyOutputs {
99
100
  version?: string;
100
101
  storage?: AmplifyOutputsStorageProperties;
@@ -105,4 +106,14 @@ export interface AmplifyOutputs {
105
106
  custom?: AmplifyOutputsCustomProperties;
106
107
  notifications?: AmplifyOutputsNotificationsProperties;
107
108
  }
109
+ export interface AmplifyOutputsUnknown {
110
+ version?: string;
111
+ storage?: unknown;
112
+ auth?: unknown;
113
+ analytics?: unknown;
114
+ geo?: unknown;
115
+ data?: unknown;
116
+ custom?: unknown;
117
+ notifications?: unknown;
118
+ }
108
119
  export {};
@@ -6,7 +6,7 @@ import { PredictionsConfig } from './Predictions/types';
6
6
  import { BucketInfo, LibraryStorageOptions, StorageAccessLevel, StorageConfig } from './Storage/types';
7
7
  import { NotificationsConfig } from './Notifications/types';
8
8
  import { InteractionsConfig } from './Interactions/types';
9
- export { AmplifyOutputs } from './AmplifyOutputs/types';
9
+ export { AmplifyOutputsUnknown } from './AmplifyOutputs/types';
10
10
  /**
11
11
  * Compatibility type representing the Amplify Gen 1 configuration file schema. This type should not be used directly.
12
12
  */
@@ -1,5 +1,5 @@
1
1
  import { ResourcesConfig } from '../index';
2
- import { AmplifyOutputs } from '../singleton/AmplifyOutputs/types';
2
+ import { AmplifyOutputsUnknown } from '../singleton/AmplifyOutputs/types';
3
3
  import { LegacyConfig } from '../singleton/types';
4
4
  /**
5
5
  * Parses the variety of configuration shapes that Amplify can accept into a ResourcesConfig.
@@ -7,4 +7,4 @@ import { LegacyConfig } from '../singleton/types';
7
7
  * @param amplifyConfig An Amplify configuration object conforming to one of the supported schemas.
8
8
  * @return A ResourcesConfig for the provided configuration object.
9
9
  */
10
- export declare const parseAmplifyConfig: (amplifyConfig: ResourcesConfig | LegacyConfig | AmplifyOutputs) => ResourcesConfig;
10
+ export declare const parseAmplifyConfig: (amplifyConfig: ResourcesConfig | LegacyConfig | AmplifyOutputsUnknown) => ResourcesConfig;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-amplify/core",
3
- "version": "6.10.2-unstable.b940a23.0+b940a23",
3
+ "version": "6.10.3-unstable.5dbfbf3.0+5dbfbf3",
4
4
  "description": "Core category of aws-amplify",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "module": "./dist/esm/index.mjs",
@@ -60,7 +60,7 @@
60
60
  "uuid": "^9.0.0"
61
61
  },
62
62
  "devDependencies": {
63
- "@aws-amplify/react-native": "1.1.8-unstable.b940a23.0+b940a23",
63
+ "@aws-amplify/react-native": "1.1.8-unstable.5dbfbf3.0+5dbfbf3",
64
64
  "@types/js-cookie": "3.0.2",
65
65
  "genversion": "^2.2.0",
66
66
  "typescript": "5.0.2"
@@ -192,5 +192,5 @@
192
192
  ]
193
193
  }
194
194
  },
195
- "gitHead": "b940a23d111138cc19000c0fee5280b1c1fe0851"
195
+ "gitHead": "5dbfbf3f83799b7691fa4d51a61726326a22f1e5"
196
196
  }
@@ -1,2 +1,2 @@
1
1
  // generated by genversion
2
- export const version = '6.13.2-unstable.b940a23.0+b940a23';
2
+ export const version = '6.13.3-unstable.5dbfbf3.0+5dbfbf3';
@@ -24,7 +24,10 @@ export {
24
24
  export { parseAWSExports } from './parseAWSExports';
25
25
  export { isAmplifyOutputs, parseAmplifyOutputs } from './parseAmplifyOutputs';
26
26
  export { LegacyConfig } from './singleton/types';
27
- export { AmplifyOutputs } from './singleton/AmplifyOutputs/types';
27
+ export {
28
+ AmplifyOutputs,
29
+ AmplifyOutputsUnknown,
30
+ } from './singleton/AmplifyOutputs/types';
28
31
  export { ADD_OAUTH_LISTENER } from './singleton/constants';
29
32
  export { amplifyUuid } from './utils/amplifyUuid';
30
33
  export { AmplifyUrl, AmplifyUrlSearchParams } from './utils/amplifyUrl';
@@ -19,7 +19,6 @@ import {
19
19
  } from './singleton/Auth/types';
20
20
  import { NotificationsConfig } from './singleton/Notifications/types';
21
21
  import {
22
- AmplifyOutputs,
23
22
  AmplifyOutputsAnalyticsProperties,
24
23
  AmplifyOutputsAuthProperties,
25
24
  AmplifyOutputsCustomProperties,
@@ -28,6 +27,7 @@ import {
28
27
  AmplifyOutputsNotificationsProperties,
29
28
  AmplifyOutputsStorageBucketProperties,
30
29
  AmplifyOutputsStorageProperties,
30
+ AmplifyOutputsUnknown,
31
31
  } from './singleton/AmplifyOutputs/types';
32
32
  import {
33
33
  AnalyticsConfig,
@@ -40,10 +40,10 @@ import {
40
40
  } from './singleton/types';
41
41
 
42
42
  export function isAmplifyOutputs(
43
- config: ResourcesConfig | LegacyConfig | AmplifyOutputs,
44
- ): config is AmplifyOutputs {
43
+ config: ResourcesConfig | LegacyConfig | AmplifyOutputsUnknown,
44
+ ): config is AmplifyOutputsUnknown {
45
45
  // version format initially will be '1' but is expected to be something like x.y where x is major and y minor version
46
- const { version } = config as AmplifyOutputs;
46
+ const { version } = config as AmplifyOutputsUnknown;
47
47
 
48
48
  if (!version) {
49
49
  return false;
@@ -291,16 +291,20 @@ function parseNotifications(
291
291
  }
292
292
 
293
293
  export function parseAmplifyOutputs(
294
- amplifyOutputs: AmplifyOutputs,
294
+ amplifyOutputs: AmplifyOutputsUnknown,
295
295
  ): ResourcesConfig {
296
296
  const resourcesConfig: ResourcesConfig = {};
297
297
 
298
298
  if (amplifyOutputs.storage) {
299
- resourcesConfig.Storage = parseStorage(amplifyOutputs.storage);
299
+ resourcesConfig.Storage = parseStorage(
300
+ amplifyOutputs.storage as AmplifyOutputsStorageProperties,
301
+ );
300
302
  }
301
303
 
302
304
  if (amplifyOutputs.auth) {
303
- resourcesConfig.Auth = parseAuth(amplifyOutputs.auth);
305
+ resourcesConfig.Auth = parseAuth(
306
+ amplifyOutputs.auth as AmplifyOutputsAuthProperties,
307
+ );
304
308
  }
305
309
 
306
310
  if (amplifyOutputs.analytics) {
@@ -308,11 +312,15 @@ export function parseAmplifyOutputs(
308
312
  }
309
313
 
310
314
  if (amplifyOutputs.geo) {
311
- resourcesConfig.Geo = parseGeo(amplifyOutputs.geo);
315
+ resourcesConfig.Geo = parseGeo(
316
+ amplifyOutputs.geo as AmplifyOutputsGeoProperties,
317
+ );
312
318
  }
313
319
 
314
320
  if (amplifyOutputs.data) {
315
- resourcesConfig.API = parseData(amplifyOutputs.data);
321
+ resourcesConfig.API = parseData(
322
+ amplifyOutputs.data as AmplifyOutputsDataProperties,
323
+ );
316
324
  }
317
325
 
318
326
  if (amplifyOutputs.custom) {
@@ -325,7 +333,7 @@ export function parseAmplifyOutputs(
325
333
 
326
334
  if (amplifyOutputs.notifications) {
327
335
  resourcesConfig.Notifications = parseNotifications(
328
- amplifyOutputs.notifications,
336
+ amplifyOutputs.notifications as AmplifyOutputsNotificationsProperties,
329
337
  );
330
338
  }
331
339
 
@@ -5,7 +5,7 @@ import { deepFreeze } from '../utils';
5
5
  import { parseAmplifyConfig } from '../libraryUtils';
6
6
 
7
7
  import {
8
- AmplifyOutputs,
8
+ AmplifyOutputsUnknown,
9
9
  AuthConfig,
10
10
  LegacyConfig,
11
11
  LibraryOptions,
@@ -49,7 +49,7 @@ export class AmplifyClass {
49
49
  * @param libraryOptions - Additional options for customizing the behavior of the library.
50
50
  */
51
51
  configure(
52
- resourcesConfig: ResourcesConfig | LegacyConfig | AmplifyOutputs,
52
+ resourcesConfig: ResourcesConfig | LegacyConfig | AmplifyOutputsUnknown,
53
53
  libraryOptions?: LibraryOptions,
54
54
  ): void {
55
55
  const resolvedResourceConfig = parseAmplifyConfig(resourcesConfig);
@@ -42,7 +42,7 @@ export interface AmplifyOutputsAuthProperties {
42
42
  unauthenticated_identities_enabled?: boolean;
43
43
  mfa_configuration?: string;
44
44
  mfa_methods?: string[];
45
- groups?: Partial<Record<UserGroupName, UserGroupPrecedence>>[];
45
+ groups?: Record<UserGroupName, UserGroupPrecedence>[];
46
46
  }
47
47
 
48
48
  export interface AmplifyOutputsStorageBucketProperties {
@@ -53,7 +53,7 @@ export interface AmplifyOutputsStorageBucketProperties {
53
53
  /** Region for the bucket */
54
54
  aws_region: string;
55
55
  /** Paths to object with access permissions */
56
- paths?: Partial<Record<string, Record<string, string[] | undefined>>>;
56
+ paths?: Record<string, Record<string, string[] | undefined>>;
57
57
  }
58
58
  export interface AmplifyOutputsStorageProperties {
59
59
  /** Default region for Storage */
@@ -115,6 +115,7 @@ export interface AmplifyOutputsNotificationsProperties {
115
115
  channels: string[];
116
116
  }
117
117
 
118
+ /** @deprecated This type is deprecated and will be removed in future versions. */
118
119
  export interface AmplifyOutputs {
119
120
  version?: string;
120
121
  storage?: AmplifyOutputsStorageProperties;
@@ -125,3 +126,14 @@ export interface AmplifyOutputs {
125
126
  custom?: AmplifyOutputsCustomProperties;
126
127
  notifications?: AmplifyOutputsNotificationsProperties;
127
128
  }
129
+
130
+ export interface AmplifyOutputsUnknown {
131
+ version?: string;
132
+ storage?: unknown;
133
+ auth?: unknown;
134
+ analytics?: unknown;
135
+ geo?: unknown;
136
+ data?: unknown;
137
+ custom?: unknown;
138
+ notifications?: unknown;
139
+ }
@@ -27,7 +27,7 @@ import {
27
27
  import { NotificationsConfig } from './Notifications/types';
28
28
  import { InteractionsConfig } from './Interactions/types';
29
29
 
30
- export { AmplifyOutputs } from './AmplifyOutputs/types';
30
+ export { AmplifyOutputsUnknown } from './AmplifyOutputs/types';
31
31
 
32
32
  /**
33
33
  * Compatibility type representing the Amplify Gen 1 configuration file schema. This type should not be used directly.
@@ -2,7 +2,7 @@
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
 
4
4
  import { ResourcesConfig } from '../index';
5
- import { AmplifyOutputs } from '../singleton/AmplifyOutputs/types';
5
+ import { AmplifyOutputsUnknown } from '../singleton/AmplifyOutputs/types';
6
6
  import { LegacyConfig } from '../singleton/types';
7
7
  import { parseAWSExports } from '../parseAWSExports';
8
8
  import { isAmplifyOutputs, parseAmplifyOutputs } from '../parseAmplifyOutputs';
@@ -14,7 +14,7 @@ import { isAmplifyOutputs, parseAmplifyOutputs } from '../parseAmplifyOutputs';
14
14
  * @return A ResourcesConfig for the provided configuration object.
15
15
  */
16
16
  export const parseAmplifyConfig = (
17
- amplifyConfig: ResourcesConfig | LegacyConfig | AmplifyOutputs,
17
+ amplifyConfig: ResourcesConfig | LegacyConfig | AmplifyOutputsUnknown,
18
18
  ): ResourcesConfig => {
19
19
  if (Object.keys(amplifyConfig).some(key => key.startsWith('aws_'))) {
20
20
  return parseAWSExports(amplifyConfig);