@aws-amplify/core 5.4.1-unstable.c1fa9c7.8 → 5.5.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 (89) hide show
  1. package/lib/AwsClients/CognitoIdentity/base.js +5 -1
  2. package/lib/AwsClients/Pinpoint/base.js +1 -1
  3. package/lib/Platform/detectFramework.d.ts +7 -0
  4. package/lib/Platform/detectFramework.js +53 -0
  5. package/lib/Platform/detection/Angular.d.ts +2 -0
  6. package/lib/Platform/detection/Angular.js +23 -0
  7. package/lib/Platform/detection/Expo.d.ts +1 -0
  8. package/lib/Platform/detection/Expo.js +12 -0
  9. package/lib/Platform/detection/Next.d.ts +2 -0
  10. package/lib/Platform/detection/Next.js +17 -0
  11. package/lib/Platform/detection/Nuxt.d.ts +2 -0
  12. package/lib/Platform/detection/Nuxt.js +18 -0
  13. package/lib/Platform/detection/React.d.ts +2 -0
  14. package/lib/Platform/detection/React.js +24 -0
  15. package/lib/Platform/detection/ReactNative.d.ts +1 -0
  16. package/lib/Platform/detection/ReactNative.js +12 -0
  17. package/lib/Platform/detection/Svelte.d.ts +2 -0
  18. package/lib/Platform/detection/Svelte.js +17 -0
  19. package/lib/Platform/detection/Vue.d.ts +2 -0
  20. package/lib/Platform/detection/Vue.js +15 -0
  21. package/lib/Platform/detection/Web.d.ts +1 -0
  22. package/lib/Platform/detection/Web.js +10 -0
  23. package/lib/Platform/detection/helpers.d.ts +6 -0
  24. package/lib/Platform/detection/helpers.js +29 -0
  25. package/lib/Platform/detection/index.d.ts +2 -0
  26. package/lib/Platform/detection/index.js +41 -0
  27. package/lib/Platform/index.d.ts +11 -6
  28. package/lib/Platform/index.js +63 -24
  29. package/lib/Platform/types.d.ts +104 -0
  30. package/lib/Platform/types.js +133 -0
  31. package/lib/Platform/version.d.ts +1 -1
  32. package/lib/Platform/version.js +1 -1
  33. package/lib/index.d.ts +2 -1
  34. package/lib/index.js +17 -2
  35. package/lib/tsconfig.tsbuildinfo +1 -1
  36. package/lib-esm/AwsClients/CognitoIdentity/base.js +6 -2
  37. package/lib-esm/AwsClients/Pinpoint/base.js +2 -2
  38. package/lib-esm/Platform/detectFramework.d.ts +7 -0
  39. package/lib-esm/Platform/detectFramework.js +47 -0
  40. package/lib-esm/Platform/detection/Angular.d.ts +2 -0
  41. package/lib-esm/Platform/detection/Angular.js +18 -0
  42. package/lib-esm/Platform/detection/Expo.d.ts +1 -0
  43. package/lib-esm/Platform/detection/Expo.js +8 -0
  44. package/lib-esm/Platform/detection/Next.d.ts +2 -0
  45. package/lib-esm/Platform/detection/Next.js +12 -0
  46. package/lib-esm/Platform/detection/Nuxt.d.ts +2 -0
  47. package/lib-esm/Platform/detection/Nuxt.js +13 -0
  48. package/lib-esm/Platform/detection/React.d.ts +2 -0
  49. package/lib-esm/Platform/detection/React.js +19 -0
  50. package/lib-esm/Platform/detection/ReactNative.d.ts +1 -0
  51. package/lib-esm/Platform/detection/ReactNative.js +8 -0
  52. package/lib-esm/Platform/detection/Svelte.d.ts +2 -0
  53. package/lib-esm/Platform/detection/Svelte.js +12 -0
  54. package/lib-esm/Platform/detection/Vue.d.ts +2 -0
  55. package/lib-esm/Platform/detection/Vue.js +10 -0
  56. package/lib-esm/Platform/detection/Web.d.ts +1 -0
  57. package/lib-esm/Platform/detection/Web.js +6 -0
  58. package/lib-esm/Platform/detection/helpers.d.ts +6 -0
  59. package/lib-esm/Platform/detection/helpers.js +20 -0
  60. package/lib-esm/Platform/detection/index.d.ts +2 -0
  61. package/lib-esm/Platform/detection/index.js +37 -0
  62. package/lib-esm/Platform/index.d.ts +11 -6
  63. package/lib-esm/Platform/index.js +60 -22
  64. package/lib-esm/Platform/types.d.ts +104 -0
  65. package/lib-esm/Platform/types.js +130 -0
  66. package/lib-esm/Platform/version.d.ts +1 -1
  67. package/lib-esm/Platform/version.js +1 -1
  68. package/lib-esm/index.d.ts +2 -1
  69. package/lib-esm/index.js +2 -1
  70. package/lib-esm/tsconfig.tsbuildinfo +1 -1
  71. package/package.json +3 -3
  72. package/src/AwsClients/CognitoIdentity/base.ts +7 -2
  73. package/src/AwsClients/Pinpoint/base.ts +2 -2
  74. package/src/Platform/detectFramework.ts +57 -0
  75. package/src/Platform/detection/Angular.ts +26 -0
  76. package/src/Platform/detection/Expo.ts +11 -0
  77. package/src/Platform/detection/Next.ts +18 -0
  78. package/src/Platform/detection/Nuxt.ts +19 -0
  79. package/src/Platform/detection/React.ts +26 -0
  80. package/src/Platform/detection/ReactNative.ts +12 -0
  81. package/src/Platform/detection/Svelte.ts +18 -0
  82. package/src/Platform/detection/Vue.ts +13 -0
  83. package/src/Platform/detection/Web.ts +8 -0
  84. package/src/Platform/detection/helpers.ts +26 -0
  85. package/src/Platform/detection/index.ts +48 -0
  86. package/src/Platform/index.ts +42 -21
  87. package/src/Platform/types.ts +160 -0
  88. package/src/Platform/version.ts +1 -1
  89. package/src/index.ts +21 -1
@@ -0,0 +1,133 @@
1
+ "use strict";
2
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+ // SPDX-License-Identifier: Apache-2.0
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.StorageAction = exports.PushNotificationAction = exports.PubSubAction = exports.PredictionsAction = exports.InteractionsAction = exports.InAppMessagingAction = exports.GeoAction = exports.DataStoreAction = exports.AuthAction = exports.ApiAction = exports.AnalyticsAction = exports.Category = exports.Framework = void 0;
6
+ var Framework;
7
+ (function (Framework) {
8
+ // < 100 - Web frameworks
9
+ Framework["WebUnknown"] = "0";
10
+ Framework["React"] = "1";
11
+ Framework["NextJs"] = "2";
12
+ Framework["Angular"] = "3";
13
+ Framework["VueJs"] = "4";
14
+ Framework["Nuxt"] = "5";
15
+ Framework["Svelte"] = "6";
16
+ // 100s - Server side frameworks
17
+ Framework["ServerSideUnknown"] = "100";
18
+ Framework["ReactSSR"] = "101";
19
+ Framework["NextJsSSR"] = "102";
20
+ Framework["AngularSSR"] = "103";
21
+ Framework["VueJsSSR"] = "104";
22
+ Framework["NuxtSSR"] = "105";
23
+ Framework["SvelteSSR"] = "106";
24
+ // 200s - Mobile framework
25
+ Framework["ReactNative"] = "201";
26
+ Framework["Expo"] = "202";
27
+ })(Framework = exports.Framework || (exports.Framework = {}));
28
+ var Category;
29
+ (function (Category) {
30
+ Category["API"] = "api";
31
+ Category["Auth"] = "auth";
32
+ Category["Analytics"] = "analytics";
33
+ Category["DataStore"] = "datastore";
34
+ Category["Geo"] = "geo";
35
+ Category["InAppMessaging"] = "inappmessaging";
36
+ Category["Interactions"] = "interactions";
37
+ Category["Predictions"] = "predictions";
38
+ Category["PubSub"] = "pubsub";
39
+ Category["PushNotification"] = "pushnotification";
40
+ Category["Storage"] = "storage";
41
+ })(Category = exports.Category || (exports.Category = {}));
42
+ var AnalyticsAction;
43
+ (function (AnalyticsAction) {
44
+ AnalyticsAction["Record"] = "1";
45
+ AnalyticsAction["UpdateEndpoint"] = "2";
46
+ })(AnalyticsAction = exports.AnalyticsAction || (exports.AnalyticsAction = {}));
47
+ var ApiAction;
48
+ (function (ApiAction) {
49
+ ApiAction["GraphQl"] = "1";
50
+ ApiAction["Get"] = "2";
51
+ ApiAction["Post"] = "3";
52
+ ApiAction["Put"] = "4";
53
+ ApiAction["Patch"] = "5";
54
+ ApiAction["Del"] = "6";
55
+ ApiAction["Head"] = "7";
56
+ })(ApiAction = exports.ApiAction || (exports.ApiAction = {}));
57
+ var AuthAction;
58
+ (function (AuthAction) {
59
+ // SignUp = '1',
60
+ // ConfirmSignUp = '2',
61
+ // ResendSignUp = '3',
62
+ // SignIn = '4',
63
+ // GetMFAOptions = '5',
64
+ // GetPreferredMFA = '6',
65
+ // SetPreferredMFA = '7',
66
+ // DisableSMS = '8',
67
+ // EnableSMS = '9',
68
+ // SetupTOTP = '10',
69
+ // VerifyTotpToken = '11',
70
+ // ConfirmSignIn = '12',
71
+ // CompleteNewPassword = '13',
72
+ // SendCustomChallengeAnswer = '14',
73
+ // DeleteUserAttributes = '15',
74
+ // DeleteUser = '16',
75
+ // UpdateUserAttributes = '17',
76
+ // UserAttributes = '18',
77
+ // CurrentUserPoolUser = '19',
78
+ // CurrentAuthenticatedUser = '20',
79
+ // CurrentSession = '21',
80
+ // VerifyUserAttribute = '22',
81
+ // VerifyUserAttributeSubmit = '23',
82
+ // VerifyCurrentUserAttribute = '24',
83
+ // VerifyCurrentUserAttributeSubmit = '25',
84
+ // SignOut = '26',
85
+ // ChangePassword = '27',
86
+ // ForgotPassword = '28',
87
+ // ForgotPasswordSubmit = '29',
88
+ AuthAction["FederatedSignIn"] = "30";
89
+ // CurrentUserInfo = '31',
90
+ // RememberDevice = '32',
91
+ // ForgetDevice = '33',
92
+ // FetchDevices = '34',
93
+ })(AuthAction = exports.AuthAction || (exports.AuthAction = {}));
94
+ var DataStoreAction;
95
+ (function (DataStoreAction) {
96
+ DataStoreAction["Subscribe"] = "1";
97
+ DataStoreAction["GraphQl"] = "2";
98
+ })(DataStoreAction = exports.DataStoreAction || (exports.DataStoreAction = {}));
99
+ var GeoAction;
100
+ (function (GeoAction) {
101
+ GeoAction["None"] = "0";
102
+ })(GeoAction = exports.GeoAction || (exports.GeoAction = {}));
103
+ var InAppMessagingAction;
104
+ (function (InAppMessagingAction) {
105
+ InAppMessagingAction["None"] = "0";
106
+ })(InAppMessagingAction = exports.InAppMessagingAction || (exports.InAppMessagingAction = {}));
107
+ var InteractionsAction;
108
+ (function (InteractionsAction) {
109
+ InteractionsAction["None"] = "0";
110
+ })(InteractionsAction = exports.InteractionsAction || (exports.InteractionsAction = {}));
111
+ var PredictionsAction;
112
+ (function (PredictionsAction) {
113
+ PredictionsAction["Convert"] = "1";
114
+ PredictionsAction["Identify"] = "2";
115
+ PredictionsAction["Interpret"] = "3";
116
+ })(PredictionsAction = exports.PredictionsAction || (exports.PredictionsAction = {}));
117
+ var PubSubAction;
118
+ (function (PubSubAction) {
119
+ PubSubAction["Subscribe"] = "1";
120
+ })(PubSubAction = exports.PubSubAction || (exports.PubSubAction = {}));
121
+ var PushNotificationAction;
122
+ (function (PushNotificationAction) {
123
+ PushNotificationAction["None"] = "0";
124
+ })(PushNotificationAction = exports.PushNotificationAction || (exports.PushNotificationAction = {}));
125
+ var StorageAction;
126
+ (function (StorageAction) {
127
+ StorageAction["Put"] = "1";
128
+ StorageAction["Get"] = "2";
129
+ StorageAction["List"] = "3";
130
+ StorageAction["Copy"] = "4";
131
+ StorageAction["Remove"] = "5";
132
+ StorageAction["GetProperties"] = "6";
133
+ })(StorageAction = exports.StorageAction || (exports.StorageAction = {}));
@@ -1 +1 @@
1
- export declare const version = "5.2.8-unstable.c1fa9c7.2+c1fa9c736";
1
+ export declare const version = "5.3.0";
@@ -2,4 +2,4 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.version = void 0;
4
4
  // generated by genversion
5
- exports.version = '5.2.8-unstable.c1fa9c7.2+c1fa9c736';
5
+ exports.version = '5.3.0';
package/lib/index.d.ts CHANGED
@@ -17,7 +17,8 @@ export { ServiceWorker } from './ServiceWorker';
17
17
  export { ICredentials } from './types';
18
18
  export { StorageHelper, MemoryStorage } from './StorageHelper';
19
19
  export { UniversalStorage } from './UniversalStorage';
20
- export { Platform, getAmplifyUserAgent } from './Platform';
20
+ export { Platform, getAmplifyUserAgent, getAmplifyUserAgentString, } from './Platform';
21
+ export { ApiAction, AuthAction, AnalyticsAction, Category, CustomUserAgentDetails, DataStoreAction, Framework, GeoAction, InteractionsAction, InAppMessagingAction, PredictionsAction, PubSubAction, PushNotificationAction, StorageAction, } from './Platform/types';
21
22
  export { INTERNAL_AWS_APPSYNC_REALTIME_PUBSUB_PROVIDER, USER_AGENT_HEADER, } from './constants';
22
23
  export declare const Constants: {
23
24
  userAgent: string;
package/lib/index.js CHANGED
@@ -2,8 +2,8 @@
2
2
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
3
  // SPDX-License-Identifier: Apache-2.0
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.Mutex = exports.DateUtils = exports.BackgroundProcessManagerState = exports.BackgroundProcessManager = exports.BackgroundManagerNotOpenError = exports.AWS_CLOUDWATCH_PROVIDER_NAME = exports.AWS_CLOUDWATCH_MAX_EVENT_SIZE = exports.AWS_CLOUDWATCH_MAX_BATCH_EVENT_SIZE = exports.AWS_CLOUDWATCH_CATEGORY = exports.AWS_CLOUDWATCH_BASE_BUFFER_SIZE = exports.Constants = exports.USER_AGENT_HEADER = exports.INTERNAL_AWS_APPSYNC_REALTIME_PUBSUB_PROVIDER = exports.getAmplifyUserAgent = exports.Platform = exports.UniversalStorage = exports.MemoryStorage = exports.StorageHelper = exports.ServiceWorker = exports.CredentialsClass = exports.Credentials = exports.Linking = exports.AsyncStorage = exports.AppState = exports.GoogleOAuth = exports.FacebookOAuth = exports.AWSCloudWatchProvider = exports.parseAWSExports = exports.Signer = exports.transferKeyToUpperCase = exports.transferKeyToLowerCase = exports.sortByField = exports.objectLessAttributes = exports.makeQuerablePromise = exports.isWebWorker = exports.isTextFile = exports.isStrictObject = exports.isEmpty = exports.generateRandomString = exports.filenameToContentType = exports.browserOrNode = exports.I18n = exports.Hub = exports.missingConfig = exports.invalidParameter = exports.Logger = exports.ConsoleLogger = exports.ClientDevice = exports.AmplifyClass = exports.Amplify = void 0;
6
- exports.urlSafeEncode = exports.urlSafeDecode = exports.retry = exports.jitteredExponentialRetry = exports.jitteredBackoff = exports.isNonRetryableError = exports.Reachability = exports.RETRY_ERROR_CODES = exports.NonRetryableError = exports.NO_CREDS_ERROR_STRING = void 0;
5
+ exports.PushNotificationAction = exports.PubSubAction = exports.PredictionsAction = exports.InAppMessagingAction = exports.InteractionsAction = exports.GeoAction = exports.Framework = exports.DataStoreAction = exports.Category = exports.AnalyticsAction = exports.AuthAction = exports.ApiAction = exports.getAmplifyUserAgentString = exports.getAmplifyUserAgent = exports.Platform = exports.UniversalStorage = exports.MemoryStorage = exports.StorageHelper = exports.ServiceWorker = exports.CredentialsClass = exports.Credentials = exports.Linking = exports.AsyncStorage = exports.AppState = exports.GoogleOAuth = exports.FacebookOAuth = exports.AWSCloudWatchProvider = exports.parseAWSExports = exports.Signer = exports.transferKeyToUpperCase = exports.transferKeyToLowerCase = exports.sortByField = exports.objectLessAttributes = exports.makeQuerablePromise = exports.isWebWorker = exports.isTextFile = exports.isStrictObject = exports.isEmpty = exports.generateRandomString = exports.filenameToContentType = exports.browserOrNode = exports.I18n = exports.Hub = exports.missingConfig = exports.invalidParameter = exports.Logger = exports.ConsoleLogger = exports.ClientDevice = exports.AmplifyClass = exports.Amplify = void 0;
6
+ exports.urlSafeEncode = exports.urlSafeDecode = exports.retry = exports.jitteredExponentialRetry = exports.jitteredBackoff = exports.isNonRetryableError = exports.Reachability = exports.RETRY_ERROR_CODES = exports.NonRetryableError = exports.NO_CREDS_ERROR_STRING = exports.Mutex = exports.DateUtils = exports.BackgroundProcessManagerState = exports.BackgroundProcessManager = exports.BackgroundManagerNotOpenError = exports.AWS_CLOUDWATCH_PROVIDER_NAME = exports.AWS_CLOUDWATCH_MAX_EVENT_SIZE = exports.AWS_CLOUDWATCH_MAX_BATCH_EVENT_SIZE = exports.AWS_CLOUDWATCH_CATEGORY = exports.AWS_CLOUDWATCH_BASE_BUFFER_SIZE = exports.Constants = exports.USER_AGENT_HEADER = exports.INTERNAL_AWS_APPSYNC_REALTIME_PUBSUB_PROVIDER = exports.StorageAction = void 0;
7
7
  var Amplify_1 = require("./Amplify");
8
8
  var Platform_1 = require("./Platform");
9
9
  var Amplify_2 = require("./Amplify");
@@ -61,6 +61,21 @@ Object.defineProperty(exports, "UniversalStorage", { enumerable: true, get: func
61
61
  var Platform_2 = require("./Platform");
62
62
  Object.defineProperty(exports, "Platform", { enumerable: true, get: function () { return Platform_2.Platform; } });
63
63
  Object.defineProperty(exports, "getAmplifyUserAgent", { enumerable: true, get: function () { return Platform_2.getAmplifyUserAgent; } });
64
+ Object.defineProperty(exports, "getAmplifyUserAgentString", { enumerable: true, get: function () { return Platform_2.getAmplifyUserAgentString; } });
65
+ var types_1 = require("./Platform/types");
66
+ Object.defineProperty(exports, "ApiAction", { enumerable: true, get: function () { return types_1.ApiAction; } });
67
+ Object.defineProperty(exports, "AuthAction", { enumerable: true, get: function () { return types_1.AuthAction; } });
68
+ Object.defineProperty(exports, "AnalyticsAction", { enumerable: true, get: function () { return types_1.AnalyticsAction; } });
69
+ Object.defineProperty(exports, "Category", { enumerable: true, get: function () { return types_1.Category; } });
70
+ Object.defineProperty(exports, "DataStoreAction", { enumerable: true, get: function () { return types_1.DataStoreAction; } });
71
+ Object.defineProperty(exports, "Framework", { enumerable: true, get: function () { return types_1.Framework; } });
72
+ Object.defineProperty(exports, "GeoAction", { enumerable: true, get: function () { return types_1.GeoAction; } });
73
+ Object.defineProperty(exports, "InteractionsAction", { enumerable: true, get: function () { return types_1.InteractionsAction; } });
74
+ Object.defineProperty(exports, "InAppMessagingAction", { enumerable: true, get: function () { return types_1.InAppMessagingAction; } });
75
+ Object.defineProperty(exports, "PredictionsAction", { enumerable: true, get: function () { return types_1.PredictionsAction; } });
76
+ Object.defineProperty(exports, "PubSubAction", { enumerable: true, get: function () { return types_1.PubSubAction; } });
77
+ Object.defineProperty(exports, "PushNotificationAction", { enumerable: true, get: function () { return types_1.PushNotificationAction; } });
78
+ Object.defineProperty(exports, "StorageAction", { enumerable: true, get: function () { return types_1.StorageAction; } });
64
79
  var constants_1 = require("./constants");
65
80
  Object.defineProperty(exports, "INTERNAL_AWS_APPSYNC_REALTIME_PUBSUB_PROVIDER", { enumerable: true, get: function () { return constants_1.INTERNAL_AWS_APPSYNC_REALTIME_PUBSUB_PROVIDER; } });
66
81
  Object.defineProperty(exports, "USER_AGENT_HEADER", { enumerable: true, get: function () { return constants_1.USER_AGENT_HEADER; } });