@aws-amplify/core 6.10.7-unstable.b188564.0 → 6.11.1-unstable.c9a4386.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.7-unstable.b188564.0+b188564';
6
+ exports.version = '6.14.1-unstable.c9a4386.0+c9a4386';
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.7-unstable.b188564.0+b188564';\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;;"}
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.1-unstable.c9a4386.0+c9a4386';\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;;"}
@@ -1 +1 @@
1
- export declare const version = "6.13.7-unstable.b188564.0+b188564";
1
+ export declare const version = "6.14.1-unstable.c9a4386.0+c9a4386";
@@ -1,5 +1,5 @@
1
1
  // generated by genversion
2
- const version = '6.13.7-unstable.b188564.0+b188564';
2
+ const version = '6.14.1-unstable.c9a4386.0+c9a4386';
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.7-unstable.b188564.0+b188564';\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.1-unstable.c9a4386.0+c9a4386';\n"],"names":[],"mappings":"AAAA;AACY,MAAC,OAAO,GAAG;;;;"}
@@ -10,7 +10,7 @@ export { parseAmplifyConfig } from './utils/parseAmplifyConfig';
10
10
  export { getClientInfo } from './utils';
11
11
  export { getDeviceName } from './utils/deviceName';
12
12
  export { decodeJWT, assertTokenProviderConfig, assertIdentityPoolIdConfig, assertOAuthConfig, } from './singleton/Auth/utils';
13
- export { AssociationBelongsTo, AssociationHasMany, AssociationHasOne, DocumentType, GraphQLAuthMode, ModelFieldType, NonModelFieldType, ModelIntrospectionSchema, SchemaModel, SchemaModels, SchemaNonModel, SchemaNonModels, CustomOperations, CustomOperation, CustomOperationArguments, CustomOperationArgument, ModelAttribute, SecondaryIndexAttribute, GraphQLProviderConfig, } from './singleton/API/types';
13
+ export { AssociationBelongsTo, AssociationHasMany, AssociationHasOne, DocumentType, GraphQLAuthMode, ModelFieldType, NonModelFieldType, ModelIntrospectionSchema, SchemaModel, SchemaModels, SchemaNonModel, SchemaNonModels, CustomOperations, CustomOperation, CustomOperationArguments, CustomOperationArgument, ModelAttribute, SecondaryIndexAttribute, GraphQLProviderConfig, RetryStrategy, } from './singleton/API/types';
14
14
  export { Signer } from './Signer';
15
15
  export { JWT, CognitoIdentityPoolConfig, JwtPayload, AuthStandardAttributeKey, AuthVerifiableAttributeKey, AWSCredentials, } from './singleton/Auth/types';
16
16
  export { haveCredentialsChanged } from './utils/haveCredentialsChanged';
@@ -2,6 +2,9 @@ import { Headers } from '../../clients';
2
2
  import { AtLeastOne } from '../types';
3
3
  export interface LibraryAPIOptions {
4
4
  GraphQL?: {
5
+ /**
6
+ * custom headers for given GraphQL service. Will be applied to all operations.
7
+ */
5
8
  headers?(options?: {
6
9
  query?: string;
7
10
  variables?: Record<string, DocumentType>;
@@ -9,11 +12,23 @@ export interface LibraryAPIOptions {
9
12
  withCredentials?: boolean;
10
13
  };
11
14
  REST?: {
15
+ /**
16
+ * custom headers for given REST service. Will be applied to all operations.
17
+ */
12
18
  headers?(options: {
13
19
  apiName: string;
14
20
  }): Promise<Headers>;
21
+ /**
22
+ * Retry strategy for the REST API calls.
23
+ *
24
+ * @default ` { strategy: 'jittered-exponential-backoff' } `
25
+ */
26
+ retryStrategy?: RetryStrategy;
15
27
  };
16
28
  }
29
+ export interface RetryStrategy {
30
+ strategy: 'jittered-exponential-backoff' | 'no-retry';
31
+ }
17
32
  export interface APIGraphQLConfig {
18
33
  /**
19
34
  * Required GraphQL endpoint, must be a valid URL string.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-amplify/core",
3
- "version": "6.10.7-unstable.b188564.0+b188564",
3
+ "version": "6.11.1-unstable.c9a4386.0+c9a4386",
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.b188564.0+b188564",
63
+ "@aws-amplify/react-native": "1.1.8-unstable.c9a4386.0+c9a4386",
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": "b1885648589e0549c0e7c257e8be5fb4936d5bde"
195
+ "gitHead": "c9a4386bb8d2c9626ac34cc1daee26e76660b82b"
196
196
  }
@@ -1,2 +1,2 @@
1
1
  // generated by genversion
2
- export const version = '6.13.7-unstable.b188564.0+b188564';
2
+ export const version = '6.14.1-unstable.c9a4386.0+c9a4386';
@@ -62,6 +62,7 @@ export {
62
62
  ModelAttribute,
63
63
  SecondaryIndexAttribute,
64
64
  GraphQLProviderConfig,
65
+ RetryStrategy,
65
66
  } from './singleton/API/types';
66
67
  export { Signer } from './Signer';
67
68
  export {
@@ -5,7 +5,9 @@ import { AtLeastOne } from '../types';
5
5
 
6
6
  export interface LibraryAPIOptions {
7
7
  GraphQL?: {
8
- // custom headers for given GraphQL service. Will be applied to all operations.
8
+ /**
9
+ * custom headers for given GraphQL service. Will be applied to all operations.
10
+ */
9
11
  headers?(options?: {
10
12
  query?: string;
11
13
  variables?: Record<string, DocumentType>;
@@ -13,11 +15,23 @@ export interface LibraryAPIOptions {
13
15
  withCredentials?: boolean;
14
16
  };
15
17
  REST?: {
16
- // custom headers for given REST service. Will be applied to all operations.
18
+ /**
19
+ * custom headers for given REST service. Will be applied to all operations.
20
+ */
17
21
  headers?(options: { apiName: string }): Promise<Headers>;
22
+ /**
23
+ * Retry strategy for the REST API calls.
24
+ *
25
+ * @default ` { strategy: 'jittered-exponential-backoff' } `
26
+ */
27
+ retryStrategy?: RetryStrategy;
18
28
  };
19
29
  }
20
30
 
31
+ export interface RetryStrategy {
32
+ strategy: 'jittered-exponential-backoff' | 'no-retry';
33
+ }
34
+
21
35
  export interface APIGraphQLConfig {
22
36
  /**
23
37
  * Required GraphQL endpoint, must be a valid URL string.