@aws-amplify/core 5.8.4-unstable.bdaee91.0 → 5.8.4-user-agent-backup.c6dfb36.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.
- package/lib/Platform/index.d.ts +2 -2
- package/lib/Platform/index.js +5 -2
- package/lib/Platform/types.d.ts +55 -4
- package/lib/Platform/types.js +48 -36
- package/lib/Platform/version.d.ts +1 -1
- package/lib/Platform/version.js +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib-esm/Platform/index.d.ts +2 -2
- package/lib-esm/Platform/index.js +5 -2
- package/lib-esm/Platform/types.d.ts +55 -4
- package/lib-esm/Platform/types.js +48 -36
- package/lib-esm/Platform/version.d.ts +1 -1
- package/lib-esm/Platform/version.js +1 -1
- package/lib-esm/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
- package/src/Platform/index.ts +8 -3
- package/src/Platform/types.ts +56 -34
- package/src/Platform/version.ts +1 -1
package/lib/Platform/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CustomUserAgentDetails, Framework } from './types';
|
|
2
|
-
import { UserAgent as AWSUserAgent } from '@aws-sdk/types';
|
|
2
|
+
import type { UserAgent as AWSUserAgent } from '@aws-sdk/types';
|
|
3
3
|
declare class PlatformBuilder {
|
|
4
4
|
userAgent: string;
|
|
5
5
|
get framework(): Framework;
|
|
@@ -7,6 +7,6 @@ declare class PlatformBuilder {
|
|
|
7
7
|
observeFrameworkChanges(fcn: () => void): void;
|
|
8
8
|
}
|
|
9
9
|
export declare const Platform: PlatformBuilder;
|
|
10
|
-
export declare const getAmplifyUserAgentObject: ({ category, action, framework, }?: CustomUserAgentDetails) => AWSUserAgent;
|
|
10
|
+
export declare const getAmplifyUserAgentObject: ({ category, action, framework, additionalInfo, }?: CustomUserAgentDetails) => AWSUserAgent;
|
|
11
11
|
export declare const getAmplifyUserAgent: (customUserAgentDetails?: CustomUserAgentDetails) => string;
|
|
12
12
|
export {};
|
package/lib/Platform/index.js
CHANGED
|
@@ -49,12 +49,15 @@ var PlatformBuilder = /** @class */ (function () {
|
|
|
49
49
|
}());
|
|
50
50
|
exports.Platform = new PlatformBuilder();
|
|
51
51
|
var getAmplifyUserAgentObject = function (_a) {
|
|
52
|
-
var _b = _a === void 0 ? {} : _a, category = _b.category, action = _b.action, framework = _b.framework;
|
|
52
|
+
var _b = _a === void 0 ? {} : _a, category = _b.category, action = _b.action, framework = _b.framework, additionalInfo = _b.additionalInfo;
|
|
53
53
|
var userAgent = [[BASE_USER_AGENT, version_1.version]];
|
|
54
54
|
if (category) {
|
|
55
55
|
userAgent.push([category, action]);
|
|
56
56
|
}
|
|
57
|
-
userAgent.push(['framework', (0, detectFramework_1.detectFramework)()]);
|
|
57
|
+
userAgent.push(['framework', framework || (0, detectFramework_1.detectFramework)()]);
|
|
58
|
+
if (additionalInfo) {
|
|
59
|
+
userAgent = userAgent.concat(additionalInfo);
|
|
60
|
+
}
|
|
58
61
|
return userAgent;
|
|
59
62
|
};
|
|
60
63
|
exports.getAmplifyUserAgentObject = getAmplifyUserAgentObject;
|
package/lib/Platform/types.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { UserAgent as AWSUserAgent } from '@aws-sdk/types';
|
|
1
2
|
export declare enum Framework {
|
|
2
3
|
WebUnknown = "0",
|
|
3
4
|
React = "1",
|
|
@@ -43,17 +44,63 @@ export declare enum ApiAction {
|
|
|
43
44
|
Head = "7"
|
|
44
45
|
}
|
|
45
46
|
export declare enum AuthAction {
|
|
46
|
-
|
|
47
|
+
SignUp = "1",
|
|
48
|
+
ConfirmSignUp = "2",
|
|
49
|
+
ResendSignUp = "3",
|
|
50
|
+
SignIn = "4",
|
|
51
|
+
GetMFAOptions = "5",
|
|
52
|
+
GetPreferredMFA = "6",
|
|
53
|
+
SetPreferredMFA = "7",
|
|
54
|
+
DisableSMS = "8",
|
|
55
|
+
EnableSMS = "9",
|
|
56
|
+
SetupTOTP = "10",
|
|
57
|
+
VerifyTotpToken = "11",
|
|
58
|
+
ConfirmSignIn = "12",
|
|
59
|
+
CompleteNewPassword = "13",
|
|
60
|
+
SendCustomChallengeAnswer = "14",
|
|
61
|
+
DeleteUserAttributes = "15",
|
|
62
|
+
DeleteUser = "16",
|
|
63
|
+
UpdateUserAttributes = "17",
|
|
64
|
+
UserAttributes = "18",
|
|
65
|
+
CurrentUserPoolUser = "19",
|
|
66
|
+
CurrentAuthenticatedUser = "20",
|
|
67
|
+
CurrentSession = "21",
|
|
68
|
+
VerifyUserAttribute = "22",
|
|
69
|
+
VerifyUserAttributeSubmit = "23",
|
|
70
|
+
VerifyCurrentUserAttribute = "24",
|
|
71
|
+
VerifyCurrentUserAttributeSubmit = "25",
|
|
72
|
+
SignOut = "26",
|
|
73
|
+
ChangePassword = "27",
|
|
74
|
+
ForgotPassword = "28",
|
|
75
|
+
ForgotPasswordSubmit = "29",
|
|
76
|
+
FederatedSignIn = "30",
|
|
77
|
+
VerifiedContact = "31",
|
|
78
|
+
UserSession = "32",
|
|
79
|
+
CurrentUserCredentials = "33",
|
|
80
|
+
CurrentCredentials = "34",
|
|
81
|
+
CurrentUserInfo = "35",
|
|
82
|
+
RememberDevice = "36",
|
|
83
|
+
ForgetDevice = "37",
|
|
84
|
+
FetchDevices = "38"
|
|
47
85
|
}
|
|
48
86
|
export declare enum DataStoreAction {
|
|
49
87
|
Subscribe = "1",
|
|
50
88
|
GraphQl = "2"
|
|
51
89
|
}
|
|
52
90
|
export declare enum GeoAction {
|
|
53
|
-
|
|
91
|
+
SearchByText = "1",
|
|
92
|
+
SearchForSuggestions = "2",
|
|
93
|
+
SearchByPlaceId = "3",
|
|
94
|
+
SearchByCoordinates = "4",
|
|
95
|
+
SaveGeofences = "5",
|
|
96
|
+
GetGeofence = "6",
|
|
97
|
+
ListGeofences = "7",
|
|
98
|
+
DeleteGeofences = "8"
|
|
54
99
|
}
|
|
55
100
|
export declare enum InAppMessagingAction {
|
|
56
|
-
None = "0"
|
|
101
|
+
None = "0",
|
|
102
|
+
SyncMessages = "1",
|
|
103
|
+
IdentifyUser = "2"
|
|
57
104
|
}
|
|
58
105
|
export declare enum InteractionsAction {
|
|
59
106
|
None = "0"
|
|
@@ -75,7 +122,8 @@ export declare enum StorageAction {
|
|
|
75
122
|
List = "3",
|
|
76
123
|
Copy = "4",
|
|
77
124
|
Remove = "5",
|
|
78
|
-
GetProperties = "6"
|
|
125
|
+
GetProperties = "6",
|
|
126
|
+
Cancel = "7"
|
|
79
127
|
}
|
|
80
128
|
type ActionMap = {
|
|
81
129
|
[Category.Auth]: AuthAction;
|
|
@@ -96,6 +144,9 @@ type UserAgentDetailsWithCategory<T extends Category> = CustomUserAgentDetailsBa
|
|
|
96
144
|
};
|
|
97
145
|
type CustomUserAgentDetailsBase = {
|
|
98
146
|
framework?: Framework;
|
|
147
|
+
/** Accepts an array of arrays with exactly 1 or 2 values and translates
|
|
148
|
+
those arrays to "item" or "item1/item2" strings on the custom user agent */
|
|
149
|
+
additionalInfo?: AWSUserAgent;
|
|
99
150
|
};
|
|
100
151
|
export type CustomUserAgentDetails = (CustomUserAgentDetailsBase & {
|
|
101
152
|
category?: never;
|
package/lib/Platform/types.js
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
4
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
3
|
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
4
|
var Framework;
|
|
@@ -56,40 +54,44 @@ var ApiAction;
|
|
|
56
54
|
})(ApiAction = exports.ApiAction || (exports.ApiAction = {}));
|
|
57
55
|
var AuthAction;
|
|
58
56
|
(function (AuthAction) {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
57
|
+
AuthAction["SignUp"] = "1";
|
|
58
|
+
AuthAction["ConfirmSignUp"] = "2";
|
|
59
|
+
AuthAction["ResendSignUp"] = "3";
|
|
60
|
+
AuthAction["SignIn"] = "4";
|
|
61
|
+
AuthAction["GetMFAOptions"] = "5";
|
|
62
|
+
AuthAction["GetPreferredMFA"] = "6";
|
|
63
|
+
AuthAction["SetPreferredMFA"] = "7";
|
|
64
|
+
AuthAction["DisableSMS"] = "8";
|
|
65
|
+
AuthAction["EnableSMS"] = "9";
|
|
66
|
+
AuthAction["SetupTOTP"] = "10";
|
|
67
|
+
AuthAction["VerifyTotpToken"] = "11";
|
|
68
|
+
AuthAction["ConfirmSignIn"] = "12";
|
|
69
|
+
AuthAction["CompleteNewPassword"] = "13";
|
|
70
|
+
AuthAction["SendCustomChallengeAnswer"] = "14";
|
|
71
|
+
AuthAction["DeleteUserAttributes"] = "15";
|
|
72
|
+
AuthAction["DeleteUser"] = "16";
|
|
73
|
+
AuthAction["UpdateUserAttributes"] = "17";
|
|
74
|
+
AuthAction["UserAttributes"] = "18";
|
|
75
|
+
AuthAction["CurrentUserPoolUser"] = "19";
|
|
76
|
+
AuthAction["CurrentAuthenticatedUser"] = "20";
|
|
77
|
+
AuthAction["CurrentSession"] = "21";
|
|
78
|
+
AuthAction["VerifyUserAttribute"] = "22";
|
|
79
|
+
AuthAction["VerifyUserAttributeSubmit"] = "23";
|
|
80
|
+
AuthAction["VerifyCurrentUserAttribute"] = "24";
|
|
81
|
+
AuthAction["VerifyCurrentUserAttributeSubmit"] = "25";
|
|
82
|
+
AuthAction["SignOut"] = "26";
|
|
83
|
+
AuthAction["ChangePassword"] = "27";
|
|
84
|
+
AuthAction["ForgotPassword"] = "28";
|
|
85
|
+
AuthAction["ForgotPasswordSubmit"] = "29";
|
|
88
86
|
AuthAction["FederatedSignIn"] = "30";
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
87
|
+
AuthAction["VerifiedContact"] = "31";
|
|
88
|
+
AuthAction["UserSession"] = "32";
|
|
89
|
+
AuthAction["CurrentUserCredentials"] = "33";
|
|
90
|
+
AuthAction["CurrentCredentials"] = "34";
|
|
91
|
+
AuthAction["CurrentUserInfo"] = "35";
|
|
92
|
+
AuthAction["RememberDevice"] = "36";
|
|
93
|
+
AuthAction["ForgetDevice"] = "37";
|
|
94
|
+
AuthAction["FetchDevices"] = "38";
|
|
93
95
|
})(AuthAction = exports.AuthAction || (exports.AuthAction = {}));
|
|
94
96
|
var DataStoreAction;
|
|
95
97
|
(function (DataStoreAction) {
|
|
@@ -98,11 +100,20 @@ var DataStoreAction;
|
|
|
98
100
|
})(DataStoreAction = exports.DataStoreAction || (exports.DataStoreAction = {}));
|
|
99
101
|
var GeoAction;
|
|
100
102
|
(function (GeoAction) {
|
|
101
|
-
GeoAction["
|
|
103
|
+
GeoAction["SearchByText"] = "1";
|
|
104
|
+
GeoAction["SearchForSuggestions"] = "2";
|
|
105
|
+
GeoAction["SearchByPlaceId"] = "3";
|
|
106
|
+
GeoAction["SearchByCoordinates"] = "4";
|
|
107
|
+
GeoAction["SaveGeofences"] = "5";
|
|
108
|
+
GeoAction["GetGeofence"] = "6";
|
|
109
|
+
GeoAction["ListGeofences"] = "7";
|
|
110
|
+
GeoAction["DeleteGeofences"] = "8";
|
|
102
111
|
})(GeoAction = exports.GeoAction || (exports.GeoAction = {}));
|
|
103
112
|
var InAppMessagingAction;
|
|
104
113
|
(function (InAppMessagingAction) {
|
|
105
114
|
InAppMessagingAction["None"] = "0";
|
|
115
|
+
InAppMessagingAction["SyncMessages"] = "1";
|
|
116
|
+
InAppMessagingAction["IdentifyUser"] = "2";
|
|
106
117
|
})(InAppMessagingAction = exports.InAppMessagingAction || (exports.InAppMessagingAction = {}));
|
|
107
118
|
var InteractionsAction;
|
|
108
119
|
(function (InteractionsAction) {
|
|
@@ -130,4 +141,5 @@ var StorageAction;
|
|
|
130
141
|
StorageAction["Copy"] = "4";
|
|
131
142
|
StorageAction["Remove"] = "5";
|
|
132
143
|
StorageAction["GetProperties"] = "6";
|
|
144
|
+
StorageAction["Cancel"] = "7";
|
|
133
145
|
})(StorageAction = exports.StorageAction || (exports.StorageAction = {}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "5.3.10-
|
|
1
|
+
export declare const version = "5.3.10-user-agent-backup.c6dfb36.0+c6dfb36";
|
package/lib/Platform/version.js
CHANGED