@aws-amplify/core 4.6.2-next.13 → 4.6.2-next.32

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 (209) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/lib/.tsbuildinfo +3 -0
  3. package/lib/Amplify.js +3 -21
  4. package/lib/Amplify.js.map +1 -1
  5. package/lib/ClientDevice/index.js +0 -4
  6. package/lib/ClientDevice/index.js.map +1 -1
  7. package/lib/ClientDevice/reactnative.js +0 -4
  8. package/lib/ClientDevice/reactnative.js.map +1 -1
  9. package/lib/Credentials.js +31 -81
  10. package/lib/Credentials.js.map +1 -1
  11. package/lib/Hub.js +39 -45
  12. package/lib/Hub.js.map +1 -1
  13. package/lib/I18n/index.js +0 -4
  14. package/lib/I18n/index.js.map +1 -1
  15. package/lib/JS.js +2 -27
  16. package/lib/JS.js.map +1 -1
  17. package/lib/Logger/ConsoleLogger.js +8 -38
  18. package/lib/Logger/ConsoleLogger.js.map +1 -1
  19. package/lib/Logger/index.js +2 -4
  20. package/lib/Logger/index.js.map +1 -1
  21. package/lib/OAuthHelper/FacebookOAuth.js +3 -42
  22. package/lib/OAuthHelper/FacebookOAuth.js.map +1 -1
  23. package/lib/OAuthHelper/GoogleOAuth.js +3 -42
  24. package/lib/OAuthHelper/GoogleOAuth.js.map +1 -1
  25. package/lib/Platform/index.js +0 -4
  26. package/lib/Platform/index.js.map +1 -1
  27. package/lib/Platform/version.js +1 -1
  28. package/lib/Platform/version.js.map +1 -1
  29. package/lib/Providers/AWSCloudWatchProvider.js +30 -85
  30. package/lib/Providers/AWSCloudWatchProvider.js.map +1 -1
  31. package/lib/Providers/index.js +2 -4
  32. package/lib/Providers/index.js.map +1 -1
  33. package/lib/RNComponents/reactnative.js +2 -4
  34. package/lib/RNComponents/reactnative.js.map +1 -1
  35. package/lib/ServiceWorker/ServiceWorker.js +0 -4
  36. package/lib/ServiceWorker/ServiceWorker.js.map +1 -1
  37. package/lib/Signer.js +6 -31
  38. package/lib/Signer.js.map +1 -1
  39. package/lib/StorageHelper/index.js +0 -4
  40. package/lib/StorageHelper/index.js.map +1 -1
  41. package/lib/StorageHelper/reactnative.js +2 -8
  42. package/lib/StorageHelper/reactnative.js.map +1 -1
  43. package/lib/UniversalStorage/index.js +2 -4
  44. package/lib/UniversalStorage/index.js.map +1 -1
  45. package/lib/Util/BackgroundProcessManager.js +385 -0
  46. package/lib/Util/BackgroundProcessManager.js.map +1 -0
  47. package/lib/Util/DateUtils.js +2 -17
  48. package/lib/Util/DateUtils.js.map +1 -1
  49. package/lib/Util/Reachability.js +3 -16
  50. package/lib/Util/Reachability.js.map +1 -1
  51. package/lib/Util/Reachability.native.js +2 -4
  52. package/lib/Util/Reachability.native.js.map +1 -1
  53. package/lib/Util/Retry.js +80 -106
  54. package/lib/Util/Retry.js.map +1 -1
  55. package/lib/Util/index.js +6 -7
  56. package/lib/Util/index.js.map +1 -1
  57. package/lib/index.js +12 -13
  58. package/lib/index.js.map +1 -1
  59. package/lib/{Parser.js → parseAWSExports.js} +4 -28
  60. package/lib/parseAWSExports.js.map +1 -0
  61. package/lib-esm/.tsbuildinfo +3 -0
  62. package/lib-esm/Amplify.d.ts +1 -4
  63. package/lib-esm/Amplify.js +2 -20
  64. package/lib-esm/Amplify.js.map +1 -1
  65. package/lib-esm/ClientDevice/index.d.ts +0 -4
  66. package/lib-esm/ClientDevice/index.js +0 -4
  67. package/lib-esm/ClientDevice/index.js.map +1 -1
  68. package/lib-esm/ClientDevice/reactnative.d.ts +0 -7
  69. package/lib-esm/ClientDevice/reactnative.js +0 -4
  70. package/lib-esm/ClientDevice/reactnative.js.map +1 -1
  71. package/lib-esm/Credentials.d.ts +1 -5
  72. package/lib-esm/Credentials.js +2 -52
  73. package/lib-esm/Credentials.js.map +1 -1
  74. package/lib-esm/Hub.d.ts +28 -4
  75. package/lib-esm/Hub.js +34 -40
  76. package/lib-esm/Hub.js.map +1 -1
  77. package/lib-esm/I18n/index.d.ts +0 -4
  78. package/lib-esm/I18n/index.js +0 -4
  79. package/lib-esm/I18n/index.js.map +1 -1
  80. package/lib-esm/JS.d.ts +0 -24
  81. package/lib-esm/JS.js +2 -27
  82. package/lib-esm/JS.js.map +1 -1
  83. package/lib-esm/Logger/ConsoleLogger.js +1 -31
  84. package/lib-esm/Logger/ConsoleLogger.js.map +1 -1
  85. package/lib-esm/Logger/logger-interface.d.ts +0 -4
  86. package/lib-esm/OAuthHelper/FacebookOAuth.d.ts +0 -4
  87. package/lib-esm/OAuthHelper/FacebookOAuth.js +1 -40
  88. package/lib-esm/OAuthHelper/FacebookOAuth.js.map +1 -1
  89. package/lib-esm/OAuthHelper/GoogleOAuth.d.ts +0 -4
  90. package/lib-esm/OAuthHelper/GoogleOAuth.js +1 -40
  91. package/lib-esm/OAuthHelper/GoogleOAuth.js.map +1 -1
  92. package/lib-esm/Platform/index.d.ts +0 -4
  93. package/lib-esm/Platform/index.js +0 -4
  94. package/lib-esm/Platform/index.js.map +1 -1
  95. package/lib-esm/Platform/version.d.ts +1 -1
  96. package/lib-esm/Platform/version.js +1 -1
  97. package/lib-esm/Platform/version.js.map +1 -1
  98. package/lib-esm/Providers/AWSCloudWatchProvider.js +3 -58
  99. package/lib-esm/Providers/AWSCloudWatchProvider.js.map +1 -1
  100. package/lib-esm/ServiceWorker/ServiceWorker.d.ts +0 -4
  101. package/lib-esm/ServiceWorker/ServiceWorker.js +0 -4
  102. package/lib-esm/ServiceWorker/ServiceWorker.js.map +1 -1
  103. package/lib-esm/Signer.d.ts +0 -4
  104. package/lib-esm/Signer.js +1 -26
  105. package/lib-esm/Signer.js.map +1 -1
  106. package/lib-esm/StorageHelper/index.d.ts +0 -4
  107. package/lib-esm/StorageHelper/index.js +0 -4
  108. package/lib-esm/StorageHelper/index.js.map +1 -1
  109. package/lib-esm/StorageHelper/reactnative.d.ts +0 -4
  110. package/lib-esm/StorageHelper/reactnative.js +0 -4
  111. package/lib-esm/StorageHelper/reactnative.js.map +1 -1
  112. package/lib-esm/Util/BackgroundProcessManager.d.ts +204 -0
  113. package/lib-esm/Util/BackgroundProcessManager.js +383 -0
  114. package/lib-esm/Util/BackgroundProcessManager.js.map +1 -0
  115. package/lib-esm/Util/DateUtils.js +1 -16
  116. package/lib-esm/Util/DateUtils.js.map +1 -1
  117. package/lib-esm/Util/Reachability.js +1 -11
  118. package/lib-esm/Util/Reachability.js.map +1 -1
  119. package/lib-esm/Util/Retry.d.ts +2 -2
  120. package/lib-esm/Util/Retry.js +77 -103
  121. package/lib-esm/Util/Retry.js.map +1 -1
  122. package/lib-esm/Util/index.d.ts +1 -0
  123. package/lib-esm/Util/index.js +1 -0
  124. package/lib-esm/Util/index.js.map +1 -1
  125. package/lib-esm/index.d.ts +2 -2
  126. package/lib-esm/index.js +2 -2
  127. package/lib-esm/index.js.map +1 -1
  128. package/lib-esm/parseAWSExports.d.ts +2 -0
  129. package/lib-esm/{Parser.js → parseAWSExports.js} +3 -27
  130. package/lib-esm/parseAWSExports.js.map +1 -0
  131. package/lib-esm/types/types.d.ts +3 -0
  132. package/package.json +10 -3
  133. package/src/Amplify.ts +1 -5
  134. package/src/ClientDevice/index.ts +0 -5
  135. package/src/ClientDevice/reactnative.ts +0 -5
  136. package/src/Credentials.ts +13 -19
  137. package/src/Hub.ts +38 -11
  138. package/src/I18n/index.ts +0 -5
  139. package/src/JS.ts +4 -25
  140. package/src/Logger/logger-interface.ts +0 -5
  141. package/src/OAuthHelper/FacebookOAuth.ts +0 -5
  142. package/src/OAuthHelper/GoogleOAuth.ts +0 -5
  143. package/src/Platform/index.ts +0 -5
  144. package/src/Platform/version.ts +1 -1
  145. package/src/Providers/AWSCloudWatchProvider.ts +2 -2
  146. package/src/ServiceWorker/ServiceWorker.ts +1 -6
  147. package/src/Signer.ts +0 -5
  148. package/src/StorageHelper/index.ts +0 -5
  149. package/src/StorageHelper/reactnative.ts +0 -5
  150. package/src/Util/BackgroundProcessManager.ts +449 -0
  151. package/src/Util/Retry.ts +66 -31
  152. package/src/Util/index.ts +1 -0
  153. package/src/index.ts +2 -2
  154. package/src/{Parser.ts → parseAWSExports.ts} +1 -13
  155. package/src/types/types.ts +3 -0
  156. package/build.js +0 -5
  157. package/dist/aws-amplify-core.js +0 -43156
  158. package/dist/aws-amplify-core.js.map +0 -1
  159. package/dist/aws-amplify-core.min.js +0 -32
  160. package/dist/aws-amplify-core.min.js.map +0 -1
  161. package/index.js +0 -7
  162. package/lib/Amplify.d.ts +0 -31
  163. package/lib/ClientDevice/android.d.ts +0 -5
  164. package/lib/ClientDevice/browser.d.ts +0 -25
  165. package/lib/ClientDevice/index.d.ts +0 -27
  166. package/lib/ClientDevice/ios.d.ts +0 -7
  167. package/lib/ClientDevice/reactnative.d.ts +0 -14
  168. package/lib/Credentials.d.ts +0 -51
  169. package/lib/Errors.d.ts +0 -2
  170. package/lib/Hub.d.ts +0 -31
  171. package/lib/I18n/I18n.d.ts +0 -59
  172. package/lib/I18n/index.d.ts +0 -53
  173. package/lib/I18n/types.d.ts +0 -3
  174. package/lib/JS.d.ts +0 -56
  175. package/lib/Logger/ConsoleLogger.d.ts +0 -80
  176. package/lib/Logger/index.d.ts +0 -1
  177. package/lib/Logger/logger-interface.d.ts +0 -12
  178. package/lib/OAuthHelper/FacebookOAuth.d.ts +0 -10
  179. package/lib/OAuthHelper/GoogleOAuth.d.ts +0 -10
  180. package/lib/OAuthHelper/index.d.ts +0 -4
  181. package/lib/Parser.d.ts +0 -12
  182. package/lib/Parser.js.map +0 -1
  183. package/lib/Platform/index.d.ts +0 -11
  184. package/lib/Platform/version.d.ts +0 -1
  185. package/lib/Providers/AWSCloudWatchProvider.d.ts +0 -34
  186. package/lib/Providers/index.d.ts +0 -1
  187. package/lib/RNComponents/index.d.ts +0 -5
  188. package/lib/RNComponents/reactnative.d.ts +0 -3
  189. package/lib/ServiceWorker/ServiceWorker.d.ts +0 -72
  190. package/lib/ServiceWorker/index.d.ts +0 -13
  191. package/lib/Signer.d.ts +0 -45
  192. package/lib/StorageHelper/index.d.ts +0 -45
  193. package/lib/StorageHelper/reactnative.d.ts +0 -17
  194. package/lib/UniversalStorage/index.d.ts +0 -23
  195. package/lib/Util/Constants.d.ts +0 -8
  196. package/lib/Util/DateUtils.d.ts +0 -7
  197. package/lib/Util/Mutex.d.ts +0 -45
  198. package/lib/Util/Reachability.d.ts +0 -13
  199. package/lib/Util/Reachability.native.d.ts +0 -11
  200. package/lib/Util/Retry.d.ts +0 -21
  201. package/lib/Util/StringUtils.d.ts +0 -2
  202. package/lib/Util/index.d.ts +0 -6
  203. package/lib/constants.d.ts +0 -6
  204. package/lib/index.d.ts +0 -30
  205. package/lib/types/index.d.ts +0 -1
  206. package/lib/types/types.d.ts +0 -43
  207. package/lib-esm/Parser.d.ts +0 -12
  208. package/lib-esm/Parser.js.map +0 -1
  209. package/webpack.config.dev.js +0 -6
package/index.js DELETED
@@ -1,7 +0,0 @@
1
- 'use strict';
2
-
3
- if (process.env.NODE_ENV === 'production') {
4
- module.exports = require('./dist/aws-amplify-core.min.js');
5
- } else {
6
- module.exports = require('./dist/aws-amplify-core.js');
7
- }
package/lib/Amplify.d.ts DELETED
@@ -1,31 +0,0 @@
1
- import { ConsoleLogger as LoggerClass } from './Logger';
2
- export declare class AmplifyClass {
3
- private _components;
4
- private _config;
5
- private _modules;
6
- Auth: any;
7
- Analytics: any;
8
- API: any;
9
- Credentials: any;
10
- Storage: any;
11
- I18n: any;
12
- Cache: any;
13
- PubSub: any;
14
- Interactions: any;
15
- Pushnotification: any;
16
- UI: any;
17
- XR: any;
18
- Predictions: any;
19
- DataStore: any;
20
- Geo: any;
21
- Logger: typeof LoggerClass;
22
- ServiceWorker: any;
23
- register(comp: any): void;
24
- configure(config?: any): {};
25
- addPluggable(pluggable: any): void;
26
- }
27
- export declare const Amplify: AmplifyClass;
28
- /**
29
- * @deprecated use named import
30
- */
31
- export default Amplify;
@@ -1,5 +0,0 @@
1
- export declare const clientInfo: () => {
2
- platform: string;
3
- version: string;
4
- appVersion: string;
5
- };
@@ -1,25 +0,0 @@
1
- export declare function clientInfo(): {
2
- platform?: undefined;
3
- make?: undefined;
4
- model?: undefined;
5
- version?: undefined;
6
- appVersion?: undefined;
7
- language?: undefined;
8
- timezone?: undefined;
9
- } | {
10
- platform: string;
11
- make: string;
12
- model: string;
13
- version: string;
14
- appVersion: string;
15
- language: string;
16
- timezone: string;
17
- };
18
- export declare function dimension(): {
19
- width: number;
20
- height: number;
21
- };
22
- export declare function browserType(userAgent: string): {
23
- type: string;
24
- version: string;
25
- };
@@ -1,27 +0,0 @@
1
- export declare class ClientDevice {
2
- static clientInfo(): {
3
- platform?: undefined;
4
- make?: undefined;
5
- model?: undefined;
6
- version?: undefined;
7
- appVersion?: undefined;
8
- language?: undefined;
9
- timezone?: undefined;
10
- } | {
11
- platform: string;
12
- make: string;
13
- model: string;
14
- version: string;
15
- appVersion: string;
16
- language: string;
17
- timezone: string;
18
- };
19
- static dimension(): {
20
- width: number;
21
- height: number;
22
- };
23
- }
24
- /**
25
- * @deprecated use named import
26
- */
27
- export default ClientDevice;
@@ -1,7 +0,0 @@
1
- export declare const clientInfo: () => {
2
- platform: string;
3
- version: string;
4
- appVersion: string;
5
- make: string;
6
- model: string;
7
- };
@@ -1,14 +0,0 @@
1
- export declare class ClientDevice {
2
- static clientInfo(): {
3
- platform: string;
4
- /**
5
- * @deprecated use named import
6
- */
7
- version: string;
8
- appVersion: string;
9
- };
10
- }
11
- /**
12
- * @deprecated use named import
13
- */
14
- export default ClientDevice;
@@ -1,51 +0,0 @@
1
- import { ICredentials } from './types';
2
- export declare class CredentialsClass {
3
- private _config;
4
- private _credentials;
5
- private _credentials_source;
6
- private _gettingCredPromise;
7
- private _refreshHandlers;
8
- private _storage;
9
- private _storageSync;
10
- private _identityId;
11
- private _nextCredentialsRefresh;
12
- Auth: any;
13
- constructor(config: any);
14
- getModuleName(): string;
15
- getCredSource(): any;
16
- configure(config: any): any;
17
- get(): any;
18
- private _getCognitoIdentityIdStorageKey;
19
- private _pickupCredentials;
20
- private _keepAlive;
21
- refreshFederatedToken(federatedInfo: any): any;
22
- private _providerRefreshWithRetry;
23
- private _isExpired;
24
- private _isPastTTL;
25
- private _setCredentialsForGuest;
26
- private _setCredentialsFromFederation;
27
- private _setCredentialsFromSession;
28
- private _loadCredentials;
29
- set(params: any, source: any): Promise<ICredentials>;
30
- clear(): Promise<void>;
31
- private _getGuestIdentityId;
32
- private _setGuestIdentityId;
33
- private _removeGuestIdentityId;
34
- /**
35
- * Compact version of credentials
36
- * @param {Object} credentials
37
- * @return {Object} - Credentials
38
- */
39
- shear(credentials: any): {
40
- accessKeyId: any;
41
- sessionToken: any;
42
- secretAccessKey: any;
43
- identityId: any;
44
- authenticated: any;
45
- };
46
- }
47
- export declare const Credentials: CredentialsClass;
48
- /**
49
- * @deprecated use named import
50
- */
51
- export default Credentials;
package/lib/Errors.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export declare function missingConfig(name: string): Error;
2
- export declare function invalidParameter(name: string): Error;
package/lib/Hub.d.ts DELETED
@@ -1,31 +0,0 @@
1
- export declare type HubCapsule = {
2
- channel: string;
3
- payload: HubPayload;
4
- source: string;
5
- patternInfo?: string[];
6
- };
7
- export declare type HubPayload = {
8
- event: string;
9
- data?: any;
10
- message?: string;
11
- };
12
- export declare type HubCallback = (capsule: HubCapsule) => void;
13
- export declare type LegacyCallback = {
14
- onHubCapsule: HubCallback;
15
- };
16
- export declare class HubClass {
17
- name: string;
18
- private listeners;
19
- private patterns;
20
- protectedChannels: string[];
21
- constructor(name: string);
22
- remove(channel: string | RegExp, listener: HubCallback): void;
23
- dispatch(channel: string, payload: HubPayload, source?: string, ampSymbol?: Symbol): void;
24
- listen(channel: string | RegExp, callback?: HubCallback | LegacyCallback, listenerName?: string): () => void;
25
- private _toListeners;
26
- }
27
- export declare const Hub: HubClass;
28
- /**
29
- * @deprecated use named import
30
- */
31
- export default Hub;
@@ -1,59 +0,0 @@
1
- import { I18nOptions } from './types';
2
- /**
3
- * Language transition class
4
- */
5
- export declare class I18n {
6
- /**
7
- * @private
8
- */
9
- _options: I18nOptions;
10
- /**
11
- * @private
12
- */
13
- _lang: any;
14
- /**
15
- * @private
16
- */
17
- _dict: {};
18
- /**
19
- * @constructor
20
- * Initialize with configurations
21
- * @param {Object} options
22
- */
23
- constructor(options: I18nOptions);
24
- /**
25
- * @method
26
- * Explicitly setting language
27
- * @param {String} lang
28
- */
29
- setLanguage(lang: string): void;
30
- /**
31
- * @method
32
- * Get value
33
- * @param {String} key
34
- * @param {String} defVal - Default value
35
- */
36
- get(key: any, defVal?: any): any;
37
- /**
38
- * @method
39
- * Get value according to specified language
40
- * @param {String} key
41
- * @param {String} language - Specified langurage to be used
42
- * @param {String} defVal - Default value
43
- */
44
- getByLanguage(key: any, language: any, defVal?: any): any;
45
- /**
46
- * @method
47
- * Add vocabularies for one language
48
- * @param {String} language - Language of the dictionary
49
- * @param {Object} vocabularies - Object that has key-value as dictionary entry
50
- */
51
- putVocabulariesForLanguage(language: any, vocabularies: any): void;
52
- /**
53
- * @method
54
- * Add vocabularies for one language
55
- * @param {Object} vocabularies - Object that has language as key,
56
- * vocabularies of each language as value
57
- */
58
- putVocabularies(vocabularies: any): void;
59
- }
@@ -1,53 +0,0 @@
1
- /**
2
- * Export I18n APIs
3
- */
4
- export declare class I18n {
5
- /**
6
- * @static
7
- * @method
8
- * Configure I18n part
9
- * @param {Object} config - Configuration of the I18n
10
- */
11
- static configure(config: any): any;
12
- static getModuleName(): string;
13
- /**
14
- * @static
15
- * @method
16
- * Create an instance of I18n for the library
17
- */
18
- static createInstance(): void;
19
- /**
20
- * @static @method
21
- * Explicitly setting language
22
- * @param {String} lang
23
- */
24
- static setLanguage(lang: any): any;
25
- /**
26
- * @static @method
27
- * Get value
28
- * @param {String} key
29
- * @param {String} defVal - Default value
30
- */
31
- static get(key: any, defVal?: any): any;
32
- /**
33
- * @static
34
- * @method
35
- * Add vocabularies for one language
36
- * @param {String} langurage - Language of the dictionary
37
- * @param {Object} vocabularies - Object that has key-value as dictionary entry
38
- */
39
- static putVocabulariesForLanguage(language: any, vocabularies: any): any;
40
- /**
41
- * @static
42
- * @method
43
- * Add vocabularies for one language
44
- * @param {Object} vocabularies - Object that has language as key,
45
- * vocabularies of each language as value
46
- */
47
- static putVocabularies(vocabularies: any): any;
48
- static checkConfig(): boolean;
49
- }
50
- /**
51
- * @deprecated use named import
52
- */
53
- export default I18n;
@@ -1,3 +0,0 @@
1
- export declare class I18nOptions {
2
- language: any;
3
- }
package/lib/JS.d.ts DELETED
@@ -1,56 +0,0 @@
1
- export declare const isEmpty: (obj?: {}) => boolean;
2
- export declare const sortByField: (list: any, field: any, dir: any) => boolean;
3
- export declare const objectLessAttributes: (obj: any, less: any) => any;
4
- export declare const filenameToContentType: (filename: any, defVal?: string) => string;
5
- export declare const isTextFile: (contentType: any) => boolean;
6
- export declare const generateRandomString: () => string;
7
- export declare const makeQuerablePromise: (promise: any) => any;
8
- export declare const isWebWorker: () => boolean;
9
- export declare const browserOrNode: () => {
10
- isBrowser: boolean;
11
- isNode: boolean;
12
- };
13
- /**
14
- * transfer the first letter of the keys to lowercase
15
- * @param {Object} obj - the object need to be transferred
16
- * @param {Array} whiteListForItself - whitelist itself from being transferred
17
- * @param {Array} whiteListForChildren - whitelist its children keys from being transferred
18
- */
19
- export declare const transferKeyToLowerCase: (obj: any, whiteListForItself?: any[], whiteListForChildren?: any[]) => any;
20
- /**
21
- * transfer the first letter of the keys to lowercase
22
- * @param {Object} obj - the object need to be transferred
23
- * @param {Array} whiteListForItself - whitelist itself from being transferred
24
- * @param {Array} whiteListForChildren - whitelist its children keys from being transferred
25
- */
26
- export declare const transferKeyToUpperCase: (obj: any, whiteListForItself?: any[], whiteListForChildren?: any[]) => any;
27
- /**
28
- * Return true if the object is a strict object
29
- * which means it's not Array, Function, Number, String, Boolean or Null
30
- * @param obj the Object
31
- */
32
- export declare const isStrictObject: (obj: any) => boolean;
33
- /**
34
- * @deprecated use per-function imports
35
- */
36
- export declare class JS {
37
- static isEmpty: (obj?: {}) => boolean;
38
- static sortByField: (list: any, field: any, dir: any) => boolean;
39
- static objectLessAttributes: (obj: any, less: any) => any;
40
- static filenameToContentType: (filename: any, defVal?: string) => string;
41
- static isTextFile: (contentType: any) => boolean;
42
- static generateRandomString: () => string;
43
- static makeQuerablePromise: (promise: any) => any;
44
- static isWebWorker: () => boolean;
45
- static browserOrNode: () => {
46
- isBrowser: boolean;
47
- isNode: boolean;
48
- };
49
- static transferKeyToLowerCase: (obj: any, whiteListForItself?: any[], whiteListForChildren?: any[]) => any;
50
- static transferKeyToUpperCase: (obj: any, whiteListForItself?: any[], whiteListForChildren?: any[]) => any;
51
- static isStrictObject: (obj: any) => boolean;
52
- }
53
- /**
54
- * @deprecated use per-function imports
55
- */
56
- export default JS;
@@ -1,80 +0,0 @@
1
- import { LoggingProvider } from '../types';
2
- import { Logger } from './logger-interface';
3
- export declare enum LOG_TYPE {
4
- DEBUG = "DEBUG",
5
- ERROR = "ERROR",
6
- INFO = "INFO",
7
- WARN = "WARN",
8
- VERBOSE = "VERBOSE"
9
- }
10
- /**
11
- * Write logs
12
- * @class Logger
13
- */
14
- export declare class ConsoleLogger implements Logger {
15
- name: string;
16
- level: LOG_TYPE | string;
17
- private _pluggables;
18
- private _config;
19
- /**
20
- * @constructor
21
- * @param {string} name - Name of the logger
22
- */
23
- constructor(name: string, level?: LOG_TYPE | string);
24
- static LOG_LEVEL: any;
25
- _padding(n: any): string;
26
- _ts(): string;
27
- configure(config?: object): object;
28
- /**
29
- * Write log
30
- * @method
31
- * @memeberof Logger
32
- * @param {LOG_TYPE|string} type - log type, default INFO
33
- * @param {string|object} msg - Logging message or object
34
- */
35
- _log(type: LOG_TYPE | string, ...msg: any[]): void;
36
- /**
37
- * Write General log. Default to INFO
38
- * @method
39
- * @memeberof Logger
40
- * @param {string|object} msg - Logging message or object
41
- */
42
- log(...msg: any[]): void;
43
- /**
44
- * Write INFO log
45
- * @method
46
- * @memeberof Logger
47
- * @param {string|object} msg - Logging message or object
48
- */
49
- info(...msg: any[]): void;
50
- /**
51
- * Write WARN log
52
- * @method
53
- * @memeberof Logger
54
- * @param {string|object} msg - Logging message or object
55
- */
56
- warn(...msg: any[]): void;
57
- /**
58
- * Write ERROR log
59
- * @method
60
- * @memeberof Logger
61
- * @param {string|object} msg - Logging message or object
62
- */
63
- error(...msg: any[]): void;
64
- /**
65
- * Write DEBUG log
66
- * @method
67
- * @memeberof Logger
68
- * @param {string|object} msg - Logging message or object
69
- */
70
- debug(...msg: any[]): void;
71
- /**
72
- * Write VERBOSE log
73
- * @method
74
- * @memeberof Logger
75
- * @param {string|object} msg - Logging message or object
76
- */
77
- verbose(...msg: any[]): void;
78
- addPluggable(pluggable: LoggingProvider): void;
79
- listPluggables(): LoggingProvider[];
80
- }
@@ -1 +0,0 @@
1
- export * from './ConsoleLogger';
@@ -1,12 +0,0 @@
1
- import { LoggingProvider } from '../types';
2
- export interface Logger {
3
- debug(msg: string): void;
4
- info(msg: string): void;
5
- warn(msg: string): void;
6
- error(msg: string): void;
7
- addPluggable(pluggable: LoggingProvider): void;
8
- }
9
- /**
10
- * @deprecated use named import
11
- */
12
- export default Logger;
@@ -1,10 +0,0 @@
1
- export declare class FacebookOAuth {
2
- initialized: boolean;
3
- constructor();
4
- refreshFacebookToken(): Promise<unknown>;
5
- private _refreshFacebookTokenImpl;
6
- }
7
- /**
8
- * @deprecated use named import
9
- */
10
- export default FacebookOAuth;
@@ -1,10 +0,0 @@
1
- export declare class GoogleOAuth {
2
- initialized: boolean;
3
- constructor();
4
- refreshGoogleToken(): Promise<unknown>;
5
- private _refreshGoogleTokenImpl;
6
- }
7
- /**
8
- * @deprecated use named import
9
- */
10
- export default GoogleOAuth;
@@ -1,4 +0,0 @@
1
- import { GoogleOAuth as GoogleOAuthClass } from './GoogleOAuth';
2
- import { FacebookOAuth as FacebookOAuthClass } from './FacebookOAuth';
3
- export declare const GoogleOAuth: GoogleOAuthClass;
4
- export declare const FacebookOAuth: FacebookOAuthClass;
package/lib/Parser.d.ts DELETED
@@ -1,12 +0,0 @@
1
- import { AmplifyConfig } from './types';
2
- export declare const parseMobileHubConfig: (config: any) => AmplifyConfig;
3
- /**
4
- * @deprecated use per-function export
5
- */
6
- export declare class Parser {
7
- static parseMobilehubConfig: (config: any) => AmplifyConfig;
8
- }
9
- /**
10
- * @deprecated use per-function export
11
- */
12
- export default Parser;
package/lib/Parser.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"Parser.js","sourceRoot":"","sources":["../src/Parser.ts"],"names":[],"mappings":"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"}
@@ -1,11 +0,0 @@
1
- export declare const Platform: {
2
- userAgent: string;
3
- product: string;
4
- navigator: any;
5
- isReactNative: boolean;
6
- };
7
- export declare const getAmplifyUserAgent: (content?: string) => string;
8
- /**
9
- * @deprecated use named import
10
- */
11
- export default Platform;
@@ -1 +0,0 @@
1
- export declare const version = "4.7.6";
@@ -1,34 +0,0 @@
1
- import { CreateLogGroupCommandInput, CreateLogGroupCommandOutput, CreateLogStreamCommandInput, CreateLogStreamCommandOutput, DescribeLogGroupsCommandInput, DescribeLogGroupsCommandOutput, DescribeLogStreamsCommandInput, DescribeLogStreamsCommandOutput, GetLogEventsCommandInput, GetLogEventsCommandOutput, InputLogEvent } from '@aws-sdk/client-cloudwatch-logs';
2
- import { AWSCloudWatchProviderOptions, LoggingProvider } from '../types/types';
3
- declare class AWSCloudWatchProvider implements LoggingProvider {
4
- static readonly PROVIDER_NAME = "AWSCloudWatch";
5
- static readonly CATEGORY = "Logging";
6
- private _config;
7
- private _dataTracker;
8
- private _currentLogBatch;
9
- private _timer;
10
- private _nextSequenceToken;
11
- constructor(config?: AWSCloudWatchProviderOptions);
12
- getProviderName(): string;
13
- getCategoryName(): string;
14
- getLogQueue(): InputLogEvent[];
15
- configure(config?: AWSCloudWatchProviderOptions): AWSCloudWatchProviderOptions;
16
- createLogGroup(params: CreateLogGroupCommandInput): Promise<CreateLogGroupCommandOutput>;
17
- getLogGroups(params: DescribeLogGroupsCommandInput): Promise<DescribeLogGroupsCommandOutput>;
18
- createLogStream(params: CreateLogStreamCommandInput): Promise<CreateLogStreamCommandOutput>;
19
- getLogStreams(params: DescribeLogStreamsCommandInput): Promise<DescribeLogStreamsCommandOutput>;
20
- getLogEvents(params: GetLogEventsCommandInput): Promise<GetLogEventsCommandOutput>;
21
- pushLogs(logs: InputLogEvent[]): void;
22
- private _validateLogGroupExistsAndCreate;
23
- private _validateLogStreamExists;
24
- private _sendLogEvents;
25
- private _initCloudWatchLogs;
26
- private _ensureCredentials;
27
- private _getNextSequenceToken;
28
- private _safeUploadLogEvents;
29
- private _getBufferedBatchOfLogs;
30
- private _getNewSequenceTokenAndSubmit;
31
- private _initiateLogPushInterval;
32
- private _getDocUploadPermissibility;
33
- }
34
- export { AWSCloudWatchProvider };
@@ -1 +0,0 @@
1
- export * from './AWSCloudWatchProvider';
@@ -1,5 +0,0 @@
1
- export declare const Linking: {};
2
- export declare const AppState: {
3
- addEventListener: (action: any, handler: any) => any;
4
- };
5
- export declare const AsyncStorage: any;
@@ -1,3 +0,0 @@
1
- import { Linking, AppState } from 'react-native';
2
- import AsyncStorage from '@react-native-async-storage/async-storage';
3
- export { Linking, AppState, AsyncStorage };
@@ -1,72 +0,0 @@
1
- /**
2
- * Provides a means to registering a service worker in the browser
3
- * and communicating with it via postMessage events.
4
- * https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API/
5
- *
6
- * postMessage events are currently not supported in all browsers. See:
7
- * https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API
8
- *
9
- * At the minmum this class will register the service worker and listen
10
- * and attempt to dispatch messages on state change and record analytics
11
- * events based on the service worker lifecycle.
12
- */
13
- export declare class ServiceWorkerClass {
14
- private _serviceWorker;
15
- private _registration;
16
- private _publicKey;
17
- private _subscription;
18
- private _logger;
19
- constructor();
20
- /**
21
- * Get the currently active service worker
22
- */
23
- get serviceWorker(): ServiceWorker;
24
- /**
25
- * Register the service-worker.js file in the browser
26
- * Make sure the service-worker.js is part of the build
27
- * for example with Angular, modify the angular-cli.json file
28
- * and add to "assets" array "service-worker.js"
29
- * @param {string} - (optional) Service worker file. Defaults to "/service-worker.js"
30
- * @param {string} - (optional) The service worker scope. Defaults to "/"
31
- * - API Doc: https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/register
32
- * @returns {Promise}
33
- * - resolve(ServiceWorkerRegistration)
34
- * - reject(Error)
35
- **/
36
- register(filePath?: string, scope?: string): Promise<unknown>;
37
- /**
38
- * Enable web push notifications. If not subscribed, a new subscription will
39
- * be created and registered.
40
- * Test Push Server: https://web-push-codelab.glitch.me/
41
- * Push Server Libraries: https://github.com/web-push-libs/
42
- * API Doc: https://developers.google.com/web/fundamentals/codelabs/push-notifications/
43
- * @param publicKey
44
- * @returns {Promise}
45
- * - resolve(PushSubscription)
46
- * - reject(Error)
47
- */
48
- enablePush(publicKey: string): Promise<unknown>;
49
- /**
50
- * Convert a base64 encoded string to a Uint8 array for the push server key
51
- * @param base64String
52
- */
53
- private _urlB64ToUint8Array;
54
- /**
55
- * Send a message to the service worker. The service worker needs
56
- * to implement `self.addEventListener('message') to handle the
57
- * message. This ***currently*** does not work in Safari or IE.
58
- * @param {object | string} - An arbitrary JSON object or string message to send to the service worker
59
- * - see: https://developer.mozilla.org/en-US/docs/Web/API/Transferable
60
- * @returns {Promise}
61
- **/
62
- send(message: object | string): void;
63
- /**
64
- * Listen for service worker state change and message events
65
- * https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/state
66
- **/
67
- _setupListeners(): void;
68
- }
69
- /**
70
- * @deprecated use named import
71
- */
72
- export default ServiceWorkerClass;