@aws-amplify/core 6.11.4 → 6.11.5-unstable.3c4d29e.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/dist/cjs/BackgroundProcessManager/types.js +5 -1
- package/dist/cjs/BackgroundProcessManager/types.js.map +1 -1
- package/dist/cjs/Cache/constants.js +3 -3
- package/dist/cjs/Cache/constants.js.map +1 -1
- package/dist/cjs/Cache/utils/cacheHelpers.js +4 -4
- package/dist/cjs/Cache/utils/cacheHelpers.js.map +1 -1
- package/dist/cjs/Cache/utils/errorHelpers.js +1 -1
- package/dist/cjs/Cache/utils/errorHelpers.js.map +1 -1
- package/dist/cjs/I18n/errorHelpers.js +1 -1
- package/dist/cjs/I18n/errorHelpers.js.map +1 -1
- package/dist/cjs/Logger/types.js +2 -1
- package/dist/cjs/Logger/types.js.map +1 -1
- package/dist/cjs/Platform/detectFramework.js +2 -2
- package/dist/cjs/Platform/detectFramework.js.map +1 -1
- package/dist/cjs/Platform/detection/Angular.js +2 -3
- package/dist/cjs/Platform/detection/Angular.js.map +1 -1
- package/dist/cjs/Platform/detection/Expo.js +1 -2
- package/dist/cjs/Platform/detection/Expo.js.map +1 -1
- package/dist/cjs/Platform/detection/Next.js +2 -3
- package/dist/cjs/Platform/detection/Next.js.map +1 -1
- package/dist/cjs/Platform/detection/Nuxt.js +2 -3
- package/dist/cjs/Platform/detection/Nuxt.js.map +1 -1
- package/dist/cjs/Platform/detection/React.js +2 -3
- package/dist/cjs/Platform/detection/React.js.map +1 -1
- package/dist/cjs/Platform/detection/ReactNative.js +1 -2
- package/dist/cjs/Platform/detection/ReactNative.js.map +1 -1
- package/dist/cjs/Platform/detection/Svelte.js +2 -3
- package/dist/cjs/Platform/detection/Svelte.js.map +1 -1
- package/dist/cjs/Platform/detection/Vue.js +2 -3
- package/dist/cjs/Platform/detection/Vue.js.map +1 -1
- package/dist/cjs/Platform/detection/Web.js +1 -2
- package/dist/cjs/Platform/detection/Web.js.map +1 -1
- package/dist/cjs/Platform/detection/index.js +1 -2
- package/dist/cjs/Platform/detection/index.js.map +1 -1
- package/dist/cjs/Platform/types.js +28 -14
- package/dist/cjs/Platform/types.js.map +1 -1
- package/dist/cjs/Platform/version.js +1 -1
- package/dist/cjs/Platform/version.js.map +1 -1
- package/dist/cjs/ServiceWorker/errorHelpers.js +1 -1
- package/dist/cjs/ServiceWorker/errorHelpers.js.map +1 -1
- package/dist/cjs/awsClients/pinpoint/errorHelpers.js +1 -1
- package/dist/cjs/awsClients/pinpoint/errorHelpers.js.map +1 -1
- package/dist/cjs/parseAmplifyOutputs.js +3 -4
- package/dist/cjs/parseAmplifyOutputs.js.map +1 -1
- package/dist/cjs/providers/pinpoint/types/errors.js +2 -1
- package/dist/cjs/providers/pinpoint/types/errors.js.map +1 -1
- package/dist/cjs/singleton/API/types.js +5 -1
- package/dist/cjs/singleton/API/types.js.map +1 -1
- package/dist/cjs/singleton/Auth/utils/errorHelpers.js +1 -1
- package/dist/cjs/singleton/Auth/utils/errorHelpers.js.map +1 -1
- package/dist/cjs/singleton/Auth/utils/index.js +4 -5
- package/dist/cjs/singleton/Auth/utils/index.js.map +1 -1
- package/dist/cjs/singleton/apis/clearCredentials.js +1 -2
- package/dist/cjs/singleton/apis/clearCredentials.js.map +1 -1
- package/dist/cjs/types/errors.js +2 -1
- package/dist/cjs/types/errors.js.map +1 -1
- package/dist/cjs/utils/convert/base64/bytesToString.js +1 -2
- package/dist/cjs/utils/convert/base64/bytesToString.js.map +1 -1
- package/dist/cjs/utils/cryptoSecureRandomInt.js +1 -2
- package/dist/cjs/utils/cryptoSecureRandomInt.js.map +1 -1
- package/dist/cjs/utils/getClientInfo/getClientInfo.js +1 -2
- package/dist/cjs/utils/getClientInfo/getClientInfo.js.map +1 -1
- package/dist/cjs/utils/isTokenExpired.js +1 -2
- package/dist/cjs/utils/isTokenExpired.js.map +1 -1
- package/dist/cjs/utils/retry/jitteredBackoff.js +1 -2
- package/dist/cjs/utils/retry/jitteredBackoff.js.map +1 -1
- package/dist/cjs/utils/retry/retry.js +1 -2
- package/dist/cjs/utils/retry/retry.js.map +1 -1
- package/dist/cjs/utils/urlSafeDecode.js +1 -2
- package/dist/cjs/utils/urlSafeDecode.js.map +1 -1
- package/dist/cjs/utils/urlSafeEncode.js +1 -2
- package/dist/cjs/utils/urlSafeEncode.js.map +1 -1
- package/dist/esm/Cache/constants.mjs +3 -3
- package/dist/esm/Cache/constants.mjs.map +1 -1
- package/dist/esm/Platform/version.d.ts +1 -1
- package/dist/esm/Platform/version.mjs +1 -1
- package/dist/esm/Platform/version.mjs.map +1 -1
- package/dist/esm/awsClients/cognitoIdentity/base.d.ts +1 -1
- package/dist/esm/awsClients/cognitoIdentity/getCredentialsForIdentity.d.ts +1 -1
- package/dist/esm/awsClients/cognitoIdentity/getId.d.ts +1 -1
- package/dist/esm/awsClients/pinpoint/base.d.ts +1 -1
- package/dist/esm/awsClients/pinpoint/getInAppMessages.d.ts +2 -2
- package/dist/esm/awsClients/pinpoint/putEvents.d.ts +2 -2
- package/dist/esm/awsClients/pinpoint/updateEndpoint.d.ts +2 -2
- package/dist/esm/clients/internal/composeServiceApi.d.ts +4 -1
- package/dist/esm/clients/internal/composeTransferHandler.d.ts +1 -1
- package/dist/esm/clients/middleware/signing/signer/signatureV4/utils/getCanonicalHeaders.d.ts +1 -1
- package/dist/esm/clients/middleware/signing/signer/signatureV4/utils/getHashedPayload.d.ts +1 -1
- package/dist/esm/clients/middleware/signing/signer/signatureV4/utils/getSignedHeaders.d.ts +1 -1
- package/dist/esm/utils/amplifyUrl/index.d.ts +4 -3
- package/dist/esm/utils/amplifyUrl/index.native.d.ts +4 -3
- package/dist/esm/utils/queuedStorage/createQueuedStorage.native.d.ts +1 -1
- package/package.json +4 -5
- package/src/Platform/version.ts +1 -1
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
// SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.StorageAction = exports.PushNotificationAction = exports.PubSubAction = exports.PredictionsAction = exports.InteractionsAction = exports.InAppMessagingAction = exports.GeoAction = exports.DataStoreAction = exports.AuthAction = exports.ApiAction = exports.AnalyticsAction = exports.AiAction = exports.Category = exports.Framework = void 0;
|
|
7
|
+
var Framework;
|
|
7
8
|
(function (Framework) {
|
|
8
9
|
// < 100 - Web frameworks
|
|
9
10
|
Framework["WebUnknown"] = "0";
|
|
@@ -24,7 +25,8 @@ exports.StorageAction = exports.PushNotificationAction = exports.PubSubAction =
|
|
|
24
25
|
// 200s - Mobile framework
|
|
25
26
|
Framework["ReactNative"] = "201";
|
|
26
27
|
Framework["Expo"] = "202";
|
|
27
|
-
})(
|
|
28
|
+
})(Framework || (exports.Framework = Framework = {}));
|
|
29
|
+
var Category;
|
|
28
30
|
(function (Category) {
|
|
29
31
|
Category["AI"] = "ai";
|
|
30
32
|
Category["API"] = "api";
|
|
@@ -38,7 +40,8 @@ exports.StorageAction = exports.PushNotificationAction = exports.PubSubAction =
|
|
|
38
40
|
Category["PubSub"] = "pubsub";
|
|
39
41
|
Category["PushNotification"] = "pushnotification";
|
|
40
42
|
Category["Storage"] = "storage";
|
|
41
|
-
})(
|
|
43
|
+
})(Category || (exports.Category = Category = {}));
|
|
44
|
+
var AiAction;
|
|
42
45
|
(function (AiAction) {
|
|
43
46
|
AiAction["CreateConversation"] = "1";
|
|
44
47
|
AiAction["GetConversation"] = "2";
|
|
@@ -49,11 +52,13 @@ exports.StorageAction = exports.PushNotificationAction = exports.PubSubAction =
|
|
|
49
52
|
AiAction["OnMessage"] = "7";
|
|
50
53
|
AiAction["Generation"] = "8";
|
|
51
54
|
AiAction["UpdateConversation"] = "9";
|
|
52
|
-
})(
|
|
55
|
+
})(AiAction || (exports.AiAction = AiAction = {}));
|
|
56
|
+
var AnalyticsAction;
|
|
53
57
|
(function (AnalyticsAction) {
|
|
54
58
|
AnalyticsAction["Record"] = "1";
|
|
55
59
|
AnalyticsAction["IdentifyUser"] = "2";
|
|
56
|
-
})(
|
|
60
|
+
})(AnalyticsAction || (exports.AnalyticsAction = AnalyticsAction = {}));
|
|
61
|
+
var ApiAction;
|
|
57
62
|
(function (ApiAction) {
|
|
58
63
|
ApiAction["GraphQl"] = "1";
|
|
59
64
|
ApiAction["Get"] = "2";
|
|
@@ -62,7 +67,8 @@ exports.StorageAction = exports.PushNotificationAction = exports.PubSubAction =
|
|
|
62
67
|
ApiAction["Patch"] = "5";
|
|
63
68
|
ApiAction["Del"] = "6";
|
|
64
69
|
ApiAction["Head"] = "7";
|
|
65
|
-
})(
|
|
70
|
+
})(ApiAction || (exports.ApiAction = ApiAction = {}));
|
|
71
|
+
var AuthAction;
|
|
66
72
|
(function (AuthAction) {
|
|
67
73
|
AuthAction["SignUp"] = "1";
|
|
68
74
|
AuthAction["ConfirmSignUp"] = "2";
|
|
@@ -92,11 +98,13 @@ exports.StorageAction = exports.PushNotificationAction = exports.PubSubAction =
|
|
|
92
98
|
AuthAction["CompleteWebAuthnRegistration"] = "38";
|
|
93
99
|
AuthAction["ListWebAuthnCredentials"] = "39";
|
|
94
100
|
AuthAction["DeleteWebAuthnCredential"] = "40";
|
|
95
|
-
})(
|
|
101
|
+
})(AuthAction || (exports.AuthAction = AuthAction = {}));
|
|
102
|
+
var DataStoreAction;
|
|
96
103
|
(function (DataStoreAction) {
|
|
97
104
|
DataStoreAction["Subscribe"] = "1";
|
|
98
105
|
DataStoreAction["GraphQl"] = "2";
|
|
99
|
-
})(
|
|
106
|
+
})(DataStoreAction || (exports.DataStoreAction = DataStoreAction = {}));
|
|
107
|
+
var GeoAction;
|
|
100
108
|
(function (GeoAction) {
|
|
101
109
|
GeoAction["SearchByText"] = "0";
|
|
102
110
|
GeoAction["SearchByCoordinates"] = "1";
|
|
@@ -106,27 +114,33 @@ exports.StorageAction = exports.PushNotificationAction = exports.PubSubAction =
|
|
|
106
114
|
GeoAction["GetGeofence"] = "5";
|
|
107
115
|
GeoAction["ListGeofences"] = "6";
|
|
108
116
|
GeoAction["DeleteGeofences"] = "7";
|
|
109
|
-
})(
|
|
117
|
+
})(GeoAction || (exports.GeoAction = GeoAction = {}));
|
|
118
|
+
var InAppMessagingAction;
|
|
110
119
|
(function (InAppMessagingAction) {
|
|
111
120
|
InAppMessagingAction["SyncMessages"] = "1";
|
|
112
121
|
InAppMessagingAction["IdentifyUser"] = "2";
|
|
113
122
|
InAppMessagingAction["NotifyMessageInteraction"] = "3";
|
|
114
|
-
})(
|
|
123
|
+
})(InAppMessagingAction || (exports.InAppMessagingAction = InAppMessagingAction = {}));
|
|
124
|
+
var InteractionsAction;
|
|
115
125
|
(function (InteractionsAction) {
|
|
116
126
|
InteractionsAction["None"] = "0";
|
|
117
|
-
})(
|
|
127
|
+
})(InteractionsAction || (exports.InteractionsAction = InteractionsAction = {}));
|
|
128
|
+
var PredictionsAction;
|
|
118
129
|
(function (PredictionsAction) {
|
|
119
130
|
PredictionsAction["Convert"] = "1";
|
|
120
131
|
PredictionsAction["Identify"] = "2";
|
|
121
132
|
PredictionsAction["Interpret"] = "3";
|
|
122
|
-
})(
|
|
133
|
+
})(PredictionsAction || (exports.PredictionsAction = PredictionsAction = {}));
|
|
134
|
+
var PubSubAction;
|
|
123
135
|
(function (PubSubAction) {
|
|
124
136
|
PubSubAction["Subscribe"] = "1";
|
|
125
|
-
})(
|
|
137
|
+
})(PubSubAction || (exports.PubSubAction = PubSubAction = {}));
|
|
138
|
+
var PushNotificationAction;
|
|
126
139
|
(function (PushNotificationAction) {
|
|
127
140
|
PushNotificationAction["InitializePushNotifications"] = "1";
|
|
128
141
|
PushNotificationAction["IdentifyUser"] = "2";
|
|
129
|
-
})(
|
|
142
|
+
})(PushNotificationAction || (exports.PushNotificationAction = PushNotificationAction = {}));
|
|
143
|
+
var StorageAction;
|
|
130
144
|
(function (StorageAction) {
|
|
131
145
|
StorageAction["UploadData"] = "1";
|
|
132
146
|
StorageAction["DownloadData"] = "2";
|
|
@@ -137,5 +151,5 @@ exports.StorageAction = exports.PushNotificationAction = exports.PubSubAction =
|
|
|
137
151
|
StorageAction["GetUrl"] = "7";
|
|
138
152
|
StorageAction["GetDataAccess"] = "8";
|
|
139
153
|
StorageAction["ListCallerAccessGrants"] = "9";
|
|
140
|
-
})(
|
|
154
|
+
})(StorageAction || (exports.StorageAction = StorageAction = {}));
|
|
141
155
|
//# sourceMappingURL=types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sources":["../../../src/Platform/types.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.StorageAction = exports.PushNotificationAction = exports.PubSubAction = exports.PredictionsAction = exports.InteractionsAction = exports.InAppMessagingAction = exports.GeoAction = exports.DataStoreAction = exports.AuthAction = exports.ApiAction = exports.AnalyticsAction = exports.AiAction = exports.Category = exports.Framework = void 0;\nvar Framework;\n(function (Framework) {\n // < 100 - Web frameworks\n Framework[\"WebUnknown\"] = \"0\";\n Framework[\"React\"] = \"1\";\n Framework[\"NextJs\"] = \"2\";\n Framework[\"Angular\"] = \"3\";\n Framework[\"VueJs\"] = \"4\";\n Framework[\"Nuxt\"] = \"5\";\n Framework[\"Svelte\"] = \"6\";\n // 100s - Server side frameworks\n Framework[\"ServerSideUnknown\"] = \"100\";\n Framework[\"ReactSSR\"] = \"101\";\n Framework[\"NextJsSSR\"] = \"102\";\n Framework[\"AngularSSR\"] = \"103\";\n Framework[\"VueJsSSR\"] = \"104\";\n Framework[\"NuxtSSR\"] = \"105\";\n Framework[\"SvelteSSR\"] = \"106\";\n // 200s - Mobile framework\n Framework[\"ReactNative\"] = \"201\";\n Framework[\"Expo\"] = \"202\";\n})(Framework = exports.Framework || (exports.Framework = {}));\nvar Category;\n(function (Category) {\n Category[\"AI\"] = \"ai\";\n Category[\"API\"] = \"api\";\n Category[\"Auth\"] = \"auth\";\n Category[\"Analytics\"] = \"analytics\";\n Category[\"DataStore\"] = \"datastore\";\n Category[\"Geo\"] = \"geo\";\n Category[\"InAppMessaging\"] = \"inappmessaging\";\n Category[\"Interactions\"] = \"interactions\";\n Category[\"Predictions\"] = \"predictions\";\n Category[\"PubSub\"] = \"pubsub\";\n Category[\"PushNotification\"] = \"pushnotification\";\n Category[\"Storage\"] = \"storage\";\n})(Category = exports.Category || (exports.Category = {}));\nvar AiAction;\n(function (AiAction) {\n AiAction[\"CreateConversation\"] = \"1\";\n AiAction[\"GetConversation\"] = \"2\";\n AiAction[\"ListConversations\"] = \"3\";\n AiAction[\"DeleteConversation\"] = \"4\";\n AiAction[\"SendMessage\"] = \"5\";\n AiAction[\"ListMessages\"] = \"6\";\n AiAction[\"OnMessage\"] = \"7\";\n AiAction[\"Generation\"] = \"8\";\n AiAction[\"UpdateConversation\"] = \"9\";\n})(AiAction = exports.AiAction || (exports.AiAction = {}));\nvar AnalyticsAction;\n(function (AnalyticsAction) {\n AnalyticsAction[\"Record\"] = \"1\";\n AnalyticsAction[\"IdentifyUser\"] = \"2\";\n})(AnalyticsAction = exports.AnalyticsAction || (exports.AnalyticsAction = {}));\nvar ApiAction;\n(function (ApiAction) {\n ApiAction[\"GraphQl\"] = \"1\";\n ApiAction[\"Get\"] = \"2\";\n ApiAction[\"Post\"] = \"3\";\n ApiAction[\"Put\"] = \"4\";\n ApiAction[\"Patch\"] = \"5\";\n ApiAction[\"Del\"] = \"6\";\n ApiAction[\"Head\"] = \"7\";\n})(ApiAction = exports.ApiAction || (exports.ApiAction = {}));\nvar AuthAction;\n(function (AuthAction) {\n AuthAction[\"SignUp\"] = \"1\";\n AuthAction[\"ConfirmSignUp\"] = \"2\";\n AuthAction[\"ResendSignUpCode\"] = \"3\";\n AuthAction[\"SignIn\"] = \"4\";\n AuthAction[\"FetchMFAPreference\"] = \"6\";\n AuthAction[\"UpdateMFAPreference\"] = \"7\";\n AuthAction[\"SetUpTOTP\"] = \"10\";\n AuthAction[\"VerifyTOTPSetup\"] = \"11\";\n AuthAction[\"ConfirmSignIn\"] = \"12\";\n AuthAction[\"DeleteUserAttributes\"] = \"15\";\n AuthAction[\"DeleteUser\"] = \"16\";\n AuthAction[\"UpdateUserAttributes\"] = \"17\";\n AuthAction[\"FetchUserAttributes\"] = \"18\";\n AuthAction[\"ConfirmUserAttribute\"] = \"22\";\n AuthAction[\"SignOut\"] = \"26\";\n AuthAction[\"UpdatePassword\"] = \"27\";\n AuthAction[\"ResetPassword\"] = \"28\";\n AuthAction[\"ConfirmResetPassword\"] = \"29\";\n AuthAction[\"FederatedSignIn\"] = \"30\";\n AuthAction[\"RememberDevice\"] = \"32\";\n AuthAction[\"ForgetDevice\"] = \"33\";\n AuthAction[\"FetchDevices\"] = \"34\";\n AuthAction[\"SendUserAttributeVerificationCode\"] = \"35\";\n AuthAction[\"SignInWithRedirect\"] = \"36\";\n AuthAction[\"StartWebAuthnRegistration\"] = \"37\";\n AuthAction[\"CompleteWebAuthnRegistration\"] = \"38\";\n AuthAction[\"ListWebAuthnCredentials\"] = \"39\";\n AuthAction[\"DeleteWebAuthnCredential\"] = \"40\";\n})(AuthAction = exports.AuthAction || (exports.AuthAction = {}));\nvar DataStoreAction;\n(function (DataStoreAction) {\n DataStoreAction[\"Subscribe\"] = \"1\";\n DataStoreAction[\"GraphQl\"] = \"2\";\n})(DataStoreAction = exports.DataStoreAction || (exports.DataStoreAction = {}));\nvar GeoAction;\n(function (GeoAction) {\n GeoAction[\"SearchByText\"] = \"0\";\n GeoAction[\"SearchByCoordinates\"] = \"1\";\n GeoAction[\"SearchForSuggestions\"] = \"2\";\n GeoAction[\"SearchByPlaceId\"] = \"3\";\n GeoAction[\"SaveGeofences\"] = \"4\";\n GeoAction[\"GetGeofence\"] = \"5\";\n GeoAction[\"ListGeofences\"] = \"6\";\n GeoAction[\"DeleteGeofences\"] = \"7\";\n})(GeoAction = exports.GeoAction || (exports.GeoAction = {}));\nvar InAppMessagingAction;\n(function (InAppMessagingAction) {\n InAppMessagingAction[\"SyncMessages\"] = \"1\";\n InAppMessagingAction[\"IdentifyUser\"] = \"2\";\n InAppMessagingAction[\"NotifyMessageInteraction\"] = \"3\";\n})(InAppMessagingAction = exports.InAppMessagingAction || (exports.InAppMessagingAction = {}));\nvar InteractionsAction;\n(function (InteractionsAction) {\n InteractionsAction[\"None\"] = \"0\";\n})(InteractionsAction = exports.InteractionsAction || (exports.InteractionsAction = {}));\nvar PredictionsAction;\n(function (PredictionsAction) {\n PredictionsAction[\"Convert\"] = \"1\";\n PredictionsAction[\"Identify\"] = \"2\";\n PredictionsAction[\"Interpret\"] = \"3\";\n})(PredictionsAction = exports.PredictionsAction || (exports.PredictionsAction = {}));\nvar PubSubAction;\n(function (PubSubAction) {\n PubSubAction[\"Subscribe\"] = \"1\";\n})(PubSubAction = exports.PubSubAction || (exports.PubSubAction = {}));\nvar PushNotificationAction;\n(function (PushNotificationAction) {\n PushNotificationAction[\"InitializePushNotifications\"] = \"1\";\n PushNotificationAction[\"IdentifyUser\"] = \"2\";\n})(PushNotificationAction = exports.PushNotificationAction || (exports.PushNotificationAction = {}));\nvar StorageAction;\n(function (StorageAction) {\n StorageAction[\"UploadData\"] = \"1\";\n StorageAction[\"DownloadData\"] = \"2\";\n StorageAction[\"List\"] = \"3\";\n StorageAction[\"Copy\"] = \"4\";\n StorageAction[\"Remove\"] = \"5\";\n StorageAction[\"GetProperties\"] = \"6\";\n StorageAction[\"GetUrl\"] = \"7\";\n StorageAction[\"GetDataAccess\"] = \"8\";\n StorageAction[\"ListCallerAccessGrants\"] = \"9\";\n})(StorageAction = exports.StorageAction || (exports.StorageAction = {}));\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,aAAa,GAAG,OAAO,CAAC,sBAAsB,GAAG,OAAO,CAAC,YAAY,GAAG,OAAO,CAAC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AAU,YAAY,EAAE;AACzB,IAAI,YAAY,CAAC,WAAW,CAAC,GAAG,GAAG;AACnC,CAAC,EAAiB,OAAO,CAAC,YAAY,KAAK,OAAO,CAAC,YAAY,GAAG,EAAE,CAAC,CAAC;AAEtE,CAAC,UAAU,sBAAsB,EAAE;AACnC,IAAI,sBAAsB,CAAC,6BAA6B,CAAC,GAAG,GAAG;AAC/D,IAAI,sBAAsB,CAAC,cAAc,CAAC,GAAG,GAAG;AAChD,CAAC,EAA2B,OAAO,CAAC,sBAAsB,KAAK,OAAO,CAAC,sBAAsB,GAAG,EAAE,CAAC,CAAC;AAEpG,CAAC,UAAU,aAAa,EAAE;AAC1B,IAAI,aAAa,CAAC,YAAY,CAAC,GAAG,GAAG;AACrC,IAAI,aAAa,CAAC,cAAc,CAAC,GAAG,GAAG;AACvC,IAAI,aAAa,CAAC,MAAM,CAAC,GAAG,GAAG;AAC/B,IAAI,aAAa,CAAC,MAAM,CAAC,GAAG,GAAG;AAC/B,IAAI,aAAa,CAAC,QAAQ,CAAC,GAAG,GAAG;AACjC,IAAI,aAAa,CAAC,eAAe,CAAC,GAAG,GAAG;AACxC,IAAI,aAAa,CAAC,QAAQ,CAAC,GAAG,GAAG;AACjC,IAAI,aAAa,CAAC,eAAe,CAAC,GAAG,GAAG;AACxC,IAAI,aAAa,CAAC,wBAAwB,CAAC,GAAG,GAAG;AACjD,CAAC,EAAkB,OAAO,CAAC,aAAa,KAAK,OAAO,CAAC,aAAa,GAAG,EAAE,CAAC,CAAC;;"}
|
|
1
|
+
{"version":3,"file":"types.js","sources":["../../../src/Platform/types.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.StorageAction = exports.PushNotificationAction = exports.PubSubAction = exports.PredictionsAction = exports.InteractionsAction = exports.InAppMessagingAction = exports.GeoAction = exports.DataStoreAction = exports.AuthAction = exports.ApiAction = exports.AnalyticsAction = exports.AiAction = exports.Category = exports.Framework = void 0;\nvar Framework;\n(function (Framework) {\n // < 100 - Web frameworks\n Framework[\"WebUnknown\"] = \"0\";\n Framework[\"React\"] = \"1\";\n Framework[\"NextJs\"] = \"2\";\n Framework[\"Angular\"] = \"3\";\n Framework[\"VueJs\"] = \"4\";\n Framework[\"Nuxt\"] = \"5\";\n Framework[\"Svelte\"] = \"6\";\n // 100s - Server side frameworks\n Framework[\"ServerSideUnknown\"] = \"100\";\n Framework[\"ReactSSR\"] = \"101\";\n Framework[\"NextJsSSR\"] = \"102\";\n Framework[\"AngularSSR\"] = \"103\";\n Framework[\"VueJsSSR\"] = \"104\";\n Framework[\"NuxtSSR\"] = \"105\";\n Framework[\"SvelteSSR\"] = \"106\";\n // 200s - Mobile framework\n Framework[\"ReactNative\"] = \"201\";\n Framework[\"Expo\"] = \"202\";\n})(Framework || (exports.Framework = Framework = {}));\nvar Category;\n(function (Category) {\n Category[\"AI\"] = \"ai\";\n Category[\"API\"] = \"api\";\n Category[\"Auth\"] = \"auth\";\n Category[\"Analytics\"] = \"analytics\";\n Category[\"DataStore\"] = \"datastore\";\n Category[\"Geo\"] = \"geo\";\n Category[\"InAppMessaging\"] = \"inappmessaging\";\n Category[\"Interactions\"] = \"interactions\";\n Category[\"Predictions\"] = \"predictions\";\n Category[\"PubSub\"] = \"pubsub\";\n Category[\"PushNotification\"] = \"pushnotification\";\n Category[\"Storage\"] = \"storage\";\n})(Category || (exports.Category = Category = {}));\nvar AiAction;\n(function (AiAction) {\n AiAction[\"CreateConversation\"] = \"1\";\n AiAction[\"GetConversation\"] = \"2\";\n AiAction[\"ListConversations\"] = \"3\";\n AiAction[\"DeleteConversation\"] = \"4\";\n AiAction[\"SendMessage\"] = \"5\";\n AiAction[\"ListMessages\"] = \"6\";\n AiAction[\"OnMessage\"] = \"7\";\n AiAction[\"Generation\"] = \"8\";\n AiAction[\"UpdateConversation\"] = \"9\";\n})(AiAction || (exports.AiAction = AiAction = {}));\nvar AnalyticsAction;\n(function (AnalyticsAction) {\n AnalyticsAction[\"Record\"] = \"1\";\n AnalyticsAction[\"IdentifyUser\"] = \"2\";\n})(AnalyticsAction || (exports.AnalyticsAction = AnalyticsAction = {}));\nvar ApiAction;\n(function (ApiAction) {\n ApiAction[\"GraphQl\"] = \"1\";\n ApiAction[\"Get\"] = \"2\";\n ApiAction[\"Post\"] = \"3\";\n ApiAction[\"Put\"] = \"4\";\n ApiAction[\"Patch\"] = \"5\";\n ApiAction[\"Del\"] = \"6\";\n ApiAction[\"Head\"] = \"7\";\n})(ApiAction || (exports.ApiAction = ApiAction = {}));\nvar AuthAction;\n(function (AuthAction) {\n AuthAction[\"SignUp\"] = \"1\";\n AuthAction[\"ConfirmSignUp\"] = \"2\";\n AuthAction[\"ResendSignUpCode\"] = \"3\";\n AuthAction[\"SignIn\"] = \"4\";\n AuthAction[\"FetchMFAPreference\"] = \"6\";\n AuthAction[\"UpdateMFAPreference\"] = \"7\";\n AuthAction[\"SetUpTOTP\"] = \"10\";\n AuthAction[\"VerifyTOTPSetup\"] = \"11\";\n AuthAction[\"ConfirmSignIn\"] = \"12\";\n AuthAction[\"DeleteUserAttributes\"] = \"15\";\n AuthAction[\"DeleteUser\"] = \"16\";\n AuthAction[\"UpdateUserAttributes\"] = \"17\";\n AuthAction[\"FetchUserAttributes\"] = \"18\";\n AuthAction[\"ConfirmUserAttribute\"] = \"22\";\n AuthAction[\"SignOut\"] = \"26\";\n AuthAction[\"UpdatePassword\"] = \"27\";\n AuthAction[\"ResetPassword\"] = \"28\";\n AuthAction[\"ConfirmResetPassword\"] = \"29\";\n AuthAction[\"FederatedSignIn\"] = \"30\";\n AuthAction[\"RememberDevice\"] = \"32\";\n AuthAction[\"ForgetDevice\"] = \"33\";\n AuthAction[\"FetchDevices\"] = \"34\";\n AuthAction[\"SendUserAttributeVerificationCode\"] = \"35\";\n AuthAction[\"SignInWithRedirect\"] = \"36\";\n AuthAction[\"StartWebAuthnRegistration\"] = \"37\";\n AuthAction[\"CompleteWebAuthnRegistration\"] = \"38\";\n AuthAction[\"ListWebAuthnCredentials\"] = \"39\";\n AuthAction[\"DeleteWebAuthnCredential\"] = \"40\";\n})(AuthAction || (exports.AuthAction = AuthAction = {}));\nvar DataStoreAction;\n(function (DataStoreAction) {\n DataStoreAction[\"Subscribe\"] = \"1\";\n DataStoreAction[\"GraphQl\"] = \"2\";\n})(DataStoreAction || (exports.DataStoreAction = DataStoreAction = {}));\nvar GeoAction;\n(function (GeoAction) {\n GeoAction[\"SearchByText\"] = \"0\";\n GeoAction[\"SearchByCoordinates\"] = \"1\";\n GeoAction[\"SearchForSuggestions\"] = \"2\";\n GeoAction[\"SearchByPlaceId\"] = \"3\";\n GeoAction[\"SaveGeofences\"] = \"4\";\n GeoAction[\"GetGeofence\"] = \"5\";\n GeoAction[\"ListGeofences\"] = \"6\";\n GeoAction[\"DeleteGeofences\"] = \"7\";\n})(GeoAction || (exports.GeoAction = GeoAction = {}));\nvar InAppMessagingAction;\n(function (InAppMessagingAction) {\n InAppMessagingAction[\"SyncMessages\"] = \"1\";\n InAppMessagingAction[\"IdentifyUser\"] = \"2\";\n InAppMessagingAction[\"NotifyMessageInteraction\"] = \"3\";\n})(InAppMessagingAction || (exports.InAppMessagingAction = InAppMessagingAction = {}));\nvar InteractionsAction;\n(function (InteractionsAction) {\n InteractionsAction[\"None\"] = \"0\";\n})(InteractionsAction || (exports.InteractionsAction = InteractionsAction = {}));\nvar PredictionsAction;\n(function (PredictionsAction) {\n PredictionsAction[\"Convert\"] = \"1\";\n PredictionsAction[\"Identify\"] = \"2\";\n PredictionsAction[\"Interpret\"] = \"3\";\n})(PredictionsAction || (exports.PredictionsAction = PredictionsAction = {}));\nvar PubSubAction;\n(function (PubSubAction) {\n PubSubAction[\"Subscribe\"] = \"1\";\n})(PubSubAction || (exports.PubSubAction = PubSubAction = {}));\nvar PushNotificationAction;\n(function (PushNotificationAction) {\n PushNotificationAction[\"InitializePushNotifications\"] = \"1\";\n PushNotificationAction[\"IdentifyUser\"] = \"2\";\n})(PushNotificationAction || (exports.PushNotificationAction = PushNotificationAction = {}));\nvar StorageAction;\n(function (StorageAction) {\n StorageAction[\"UploadData\"] = \"1\";\n StorageAction[\"DownloadData\"] = \"2\";\n StorageAction[\"List\"] = \"3\";\n StorageAction[\"Copy\"] = \"4\";\n StorageAction[\"Remove\"] = \"5\";\n StorageAction[\"GetProperties\"] = \"6\";\n StorageAction[\"GetUrl\"] = \"7\";\n StorageAction[\"GetDataAccess\"] = \"8\";\n StorageAction[\"ListCallerAccessGrants\"] = \"9\";\n})(StorageAction || (exports.StorageAction = StorageAction = {}));\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,aAAa,GAAG,OAAO,CAAC,sBAAsB,GAAG,OAAO,CAAC,YAAY,GAAG,OAAO,CAAC,iBAAiB,GAAG,OAAO,CAAC,kBAAkB,GAAG,OAAO,CAAC,oBAAoB,GAAG,OAAO,CAAC,SAAS,GAAG,OAAO,CAAC,eAAe,GAAG,OAAO,CAAC,UAAU,GAAG,OAAO,CAAC,SAAS,GAAG,OAAO,CAAC,eAAe,GAAG,OAAO,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,GAAG,OAAO,CAAC,SAAS,GAAG,MAAM;AACzV,IAAI,SAAS;AACb,CAAC,UAAU,SAAS,EAAE;AACtB;AACA,IAAI,SAAS,CAAC,YAAY,CAAC,GAAG,GAAG;AACjC,IAAI,SAAS,CAAC,OAAO,CAAC,GAAG,GAAG;AAC5B,IAAI,SAAS,CAAC,QAAQ,CAAC,GAAG,GAAG;AAC7B,IAAI,SAAS,CAAC,SAAS,CAAC,GAAG,GAAG;AAC9B,IAAI,SAAS,CAAC,OAAO,CAAC,GAAG,GAAG;AAC5B,IAAI,SAAS,CAAC,MAAM,CAAC,GAAG,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AAC;AAC5F,IAAI,aAAa;AACjB,CAAC,UAAU,aAAa,EAAE;AAC1B,IAAI,aAAa,CAAC,YAAY,CAAC,GAAG,GAAG;AACrC,IAAI,aAAa,CAAC,cAAc,CAAC,GAAG,GAAG;AACvC,IAAI,aAAa,CAAC,MAAM,CAAC,GAAG,GAAG;AAC/B,IAAI,aAAa,CAAC,MAAM,CAAC,GAAG,GAAG;AAC/B,IAAI,aAAa,CAAC,QAAQ,CAAC,GAAG,GAAG;AACjC,IAAI,aAAa,CAAC,eAAe,CAAC,GAAG,GAAG;AACxC,IAAI,aAAa,CAAC,QAAQ,CAAC,GAAG,GAAG;AACjC,IAAI,aAAa,CAAC,eAAe,CAAC,GAAG,GAAG;AACxC,IAAI,aAAa,CAAC,wBAAwB,CAAC,GAAG,GAAG;AACjD,CAAC,EAAE,aAAa,KAAK,OAAO,CAAC,aAAa,GAAG,aAAa,GAAG,EAAE,CAAC,CAAC;;"}
|
|
@@ -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.14.
|
|
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.5-unstable.3c4d29e.0+3c4d29e';\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;;"}
|
|
@@ -10,7 +10,7 @@ var ServiceWorkerErrorCode;
|
|
|
10
10
|
ServiceWorkerErrorCode["UndefinedInstance"] = "UndefinedInstance";
|
|
11
11
|
ServiceWorkerErrorCode["UndefinedRegistration"] = "UndefinedRegistration";
|
|
12
12
|
ServiceWorkerErrorCode["Unavailable"] = "Unavailable";
|
|
13
|
-
})(ServiceWorkerErrorCode
|
|
13
|
+
})(ServiceWorkerErrorCode || (exports.ServiceWorkerErrorCode = ServiceWorkerErrorCode = {}));
|
|
14
14
|
const serviceWorkerErrorMap = {
|
|
15
15
|
[ServiceWorkerErrorCode.UndefinedInstance]: {
|
|
16
16
|
message: 'Service Worker instance is undefined.',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errorHelpers.js","sources":["../../../src/ServiceWorker/errorHelpers.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.assert = exports.ServiceWorkerErrorCode = void 0;\nconst errors_1 = require(\"../errors\");\nvar ServiceWorkerErrorCode;\n(function (ServiceWorkerErrorCode) {\n ServiceWorkerErrorCode[\"UndefinedInstance\"] = \"UndefinedInstance\";\n ServiceWorkerErrorCode[\"UndefinedRegistration\"] = \"UndefinedRegistration\";\n ServiceWorkerErrorCode[\"Unavailable\"] = \"Unavailable\";\n})(ServiceWorkerErrorCode
|
|
1
|
+
{"version":3,"file":"errorHelpers.js","sources":["../../../src/ServiceWorker/errorHelpers.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.assert = exports.ServiceWorkerErrorCode = void 0;\nconst errors_1 = require(\"../errors\");\nvar ServiceWorkerErrorCode;\n(function (ServiceWorkerErrorCode) {\n ServiceWorkerErrorCode[\"UndefinedInstance\"] = \"UndefinedInstance\";\n ServiceWorkerErrorCode[\"UndefinedRegistration\"] = \"UndefinedRegistration\";\n ServiceWorkerErrorCode[\"Unavailable\"] = \"Unavailable\";\n})(ServiceWorkerErrorCode || (exports.ServiceWorkerErrorCode = ServiceWorkerErrorCode = {}));\nconst serviceWorkerErrorMap = {\n [ServiceWorkerErrorCode.UndefinedInstance]: {\n message: 'Service Worker instance is undefined.',\n },\n [ServiceWorkerErrorCode.UndefinedRegistration]: {\n message: 'Service Worker registration is undefined.',\n },\n [ServiceWorkerErrorCode.Unavailable]: {\n message: 'Service Worker not available.',\n },\n};\nexports.assert = (0, errors_1.createAssertionFunction)(serviceWorkerErrorMap);\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,MAAM,GAAG,OAAO,CAAC,sBAAsB,GAAG,MAAM;AACxD,MAAM,QAAQ,GAAG,OAAO,CAAC,WAAW,CAAC;AACrC,IAAI,sBAAsB;AAC1B,CAAC,UAAU,sBAAsB,EAAE;AACnC,IAAI,sBAAsB,CAAC,mBAAmB,CAAC,GAAG,mBAAmB;AACrE,IAAI,sBAAsB,CAAC,uBAAuB,CAAC,GAAG,uBAAuB;AAC7E,IAAI,sBAAsB,CAAC,aAAa,CAAC,GAAG,aAAa;AACzD,CAAC,EAAE,sBAAsB,KAAK,OAAO,CAAC,sBAAsB,GAAG,sBAAsB,GAAG,EAAE,CAAC,CAAC;AAC5F,MAAM,qBAAqB,GAAG;AAC9B,IAAI,CAAC,sBAAsB,CAAC,iBAAiB,GAAG;AAChD,QAAQ,OAAO,EAAE,uCAAuC;AACxD,KAAK;AACL,IAAI,CAAC,sBAAsB,CAAC,qBAAqB,GAAG;AACpD,QAAQ,OAAO,EAAE,2CAA2C;AAC5D,KAAK;AACL,IAAI,CAAC,sBAAsB,CAAC,WAAW,GAAG;AAC1C,QAAQ,OAAO,EAAE,+BAA+B;AAChD,KAAK;AACL,CAAC;AACD,OAAO,CAAC,MAAM,GAAG,IAAI,QAAQ,CAAC,uBAAuB,EAAE,qBAAqB,CAAC;;"}
|
|
@@ -8,7 +8,7 @@ const errors_1 = require("../../errors");
|
|
|
8
8
|
var PinpointValidationErrorCode;
|
|
9
9
|
(function (PinpointValidationErrorCode) {
|
|
10
10
|
PinpointValidationErrorCode["NoAppId"] = "NoAppId";
|
|
11
|
-
})(PinpointValidationErrorCode
|
|
11
|
+
})(PinpointValidationErrorCode || (exports.PinpointValidationErrorCode = PinpointValidationErrorCode = {}));
|
|
12
12
|
const pinpointValidationErrorMap = {
|
|
13
13
|
[PinpointValidationErrorCode.NoAppId]: {
|
|
14
14
|
message: 'Missing application id.',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errorHelpers.js","sources":["../../../../src/awsClients/pinpoint/errorHelpers.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.assert = exports.PinpointValidationErrorCode = void 0;\nconst errors_1 = require(\"../../errors\");\nvar PinpointValidationErrorCode;\n(function (PinpointValidationErrorCode) {\n PinpointValidationErrorCode[\"NoAppId\"] = \"NoAppId\";\n})(PinpointValidationErrorCode
|
|
1
|
+
{"version":3,"file":"errorHelpers.js","sources":["../../../../src/awsClients/pinpoint/errorHelpers.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.assert = exports.PinpointValidationErrorCode = void 0;\nconst errors_1 = require(\"../../errors\");\nvar PinpointValidationErrorCode;\n(function (PinpointValidationErrorCode) {\n PinpointValidationErrorCode[\"NoAppId\"] = \"NoAppId\";\n})(PinpointValidationErrorCode || (exports.PinpointValidationErrorCode = PinpointValidationErrorCode = {}));\nconst pinpointValidationErrorMap = {\n [PinpointValidationErrorCode.NoAppId]: {\n message: 'Missing application id.',\n },\n};\nexports.assert = (0, errors_1.createAssertionFunction)(pinpointValidationErrorMap);\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,MAAM,GAAG,OAAO,CAAC,2BAA2B,GAAG,MAAM;AAC7D,MAAM,QAAQ,GAAG,OAAO,CAAC,cAAc,CAAC;AACxC,IAAI,2BAA2B;AAC/B,CAAC,UAAU,2BAA2B,EAAE;AACxC,IAAI,2BAA2B,CAAC,SAAS,CAAC,GAAG,SAAS;AACtD,CAAC,EAAE,2BAA2B,KAAK,OAAO,CAAC,2BAA2B,GAAG,2BAA2B,GAAG,EAAE,CAAC,CAAC;AAC3G,MAAM,0BAA0B,GAAG;AACnC,IAAI,CAAC,2BAA2B,CAAC,OAAO,GAAG;AAC3C,QAAQ,OAAO,EAAE,yBAAyB;AAC1C,KAAK;AACL,CAAC;AACD,OAAO,CAAC,MAAM,GAAG,IAAI,QAAQ,CAAC,uBAAuB,EAAE,0BAA0B,CAAC;;"}
|
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
4
4
|
// SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
6
|
+
exports.isAmplifyOutputs = isAmplifyOutputs;
|
|
7
|
+
exports.parseAnalytics = parseAnalytics;
|
|
8
|
+
exports.parseAmplifyOutputs = parseAmplifyOutputs;
|
|
7
9
|
function isAmplifyOutputs(config) {
|
|
8
10
|
// version format initially will be '1' but is expected to be something like x.y where x is major and y minor version
|
|
9
11
|
const { version } = config;
|
|
@@ -12,7 +14,6 @@ function isAmplifyOutputs(config) {
|
|
|
12
14
|
}
|
|
13
15
|
return version.startsWith('1');
|
|
14
16
|
}
|
|
15
|
-
exports.isAmplifyOutputs = isAmplifyOutputs;
|
|
16
17
|
function parseStorage(amplifyOutputsStorageProperties) {
|
|
17
18
|
if (!amplifyOutputsStorageProperties) {
|
|
18
19
|
return undefined;
|
|
@@ -101,7 +102,6 @@ function parseAnalytics(amplifyOutputsAnalyticsProperties) {
|
|
|
101
102
|
},
|
|
102
103
|
};
|
|
103
104
|
}
|
|
104
|
-
exports.parseAnalytics = parseAnalytics;
|
|
105
105
|
function parseGeo(amplifyOutputsAnalyticsProperties) {
|
|
106
106
|
if (!amplifyOutputsAnalyticsProperties) {
|
|
107
107
|
return undefined;
|
|
@@ -205,7 +205,6 @@ function parseAmplifyOutputs(amplifyOutputs) {
|
|
|
205
205
|
}
|
|
206
206
|
return resourcesConfig;
|
|
207
207
|
}
|
|
208
|
-
exports.parseAmplifyOutputs = parseAmplifyOutputs;
|
|
209
208
|
const authModeNames = {
|
|
210
209
|
AMAZON_COGNITO_USER_POOLS: 'userPool',
|
|
211
210
|
API_KEY: 'apiKey',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parseAmplifyOutputs.js","sources":["../../src/parseAmplifyOutputs.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.parseAmplifyOutputs = exports.parseAnalytics = exports.isAmplifyOutputs = void 0;\nfunction isAmplifyOutputs(config) {\n // version format initially will be '1' but is expected to be something like x.y where x is major and y minor version\n const { version } = config;\n if (!version) {\n return false;\n }\n return version.startsWith('1');\n}\nexports.isAmplifyOutputs = isAmplifyOutputs;\nfunction parseStorage(amplifyOutputsStorageProperties) {\n if (!amplifyOutputsStorageProperties) {\n return undefined;\n }\n const { bucket_name, aws_region, buckets } = amplifyOutputsStorageProperties;\n return {\n S3: {\n bucket: bucket_name,\n region: aws_region,\n buckets: buckets && createBucketInfoMap(buckets),\n },\n };\n}\nfunction parseAuth(amplifyOutputsAuthProperties) {\n if (!amplifyOutputsAuthProperties) {\n return undefined;\n }\n const { user_pool_id, user_pool_client_id, identity_pool_id, password_policy, mfa_configuration, mfa_methods, unauthenticated_identities_enabled, oauth, username_attributes, standard_required_attributes, groups, } = amplifyOutputsAuthProperties;\n const authConfig = {\n Cognito: {\n userPoolId: user_pool_id,\n userPoolClientId: user_pool_client_id,\n groups,\n },\n };\n if (identity_pool_id) {\n authConfig.Cognito = {\n ...authConfig.Cognito,\n identityPoolId: identity_pool_id,\n };\n }\n if (password_policy) {\n authConfig.Cognito.passwordFormat = {\n requireLowercase: password_policy.require_lowercase,\n requireNumbers: password_policy.require_numbers,\n requireUppercase: password_policy.require_uppercase,\n requireSpecialCharacters: password_policy.require_symbols,\n minLength: password_policy.min_length ?? 6,\n };\n }\n if (mfa_configuration) {\n authConfig.Cognito.mfa = {\n status: getMfaStatus(mfa_configuration),\n smsEnabled: mfa_methods?.includes('SMS'),\n totpEnabled: mfa_methods?.includes('TOTP'),\n };\n }\n if (unauthenticated_identities_enabled) {\n authConfig.Cognito.allowGuestAccess = unauthenticated_identities_enabled;\n }\n if (oauth) {\n authConfig.Cognito.loginWith = {\n oauth: {\n domain: oauth.domain,\n redirectSignIn: oauth.redirect_sign_in_uri,\n redirectSignOut: oauth.redirect_sign_out_uri,\n responseType: oauth.response_type === 'token' ? 'token' : 'code',\n scopes: oauth.scopes,\n providers: getOAuthProviders(oauth.identity_providers),\n },\n };\n }\n if (username_attributes) {\n authConfig.Cognito.loginWith = {\n ...authConfig.Cognito.loginWith,\n email: username_attributes.includes('email'),\n phone: username_attributes.includes('phone_number'),\n // Signing in with a username is not currently supported in Gen2, this should always evaluate to false\n username: username_attributes.includes('username'),\n };\n }\n if (standard_required_attributes) {\n authConfig.Cognito.userAttributes = standard_required_attributes.reduce((acc, curr) => ({ ...acc, [curr]: { required: true } }), {});\n }\n return authConfig;\n}\nfunction parseAnalytics(amplifyOutputsAnalyticsProperties) {\n if (!amplifyOutputsAnalyticsProperties?.amazon_pinpoint) {\n return undefined;\n }\n const { amazon_pinpoint } = amplifyOutputsAnalyticsProperties;\n return {\n Pinpoint: {\n appId: amazon_pinpoint.app_id,\n region: amazon_pinpoint.aws_region,\n },\n };\n}\nexports.parseAnalytics = parseAnalytics;\nfunction parseGeo(amplifyOutputsAnalyticsProperties) {\n if (!amplifyOutputsAnalyticsProperties) {\n return undefined;\n }\n const { aws_region, geofence_collections, maps, search_indices } = amplifyOutputsAnalyticsProperties;\n return {\n LocationService: {\n region: aws_region,\n searchIndices: search_indices,\n geofenceCollections: geofence_collections,\n maps,\n },\n };\n}\nfunction parseData(amplifyOutputsDataProperties) {\n if (!amplifyOutputsDataProperties) {\n return undefined;\n }\n const { aws_region, default_authorization_type, url, api_key, model_introspection, } = amplifyOutputsDataProperties;\n const GraphQL = {\n endpoint: url,\n defaultAuthMode: getGraphQLAuthMode(default_authorization_type),\n region: aws_region,\n apiKey: api_key,\n modelIntrospection: model_introspection,\n };\n return {\n GraphQL,\n };\n}\nfunction parseCustom(amplifyOutputsCustomProperties) {\n if (!amplifyOutputsCustomProperties?.events) {\n return undefined;\n }\n const { url, aws_region, api_key, default_authorization_type } = amplifyOutputsCustomProperties.events;\n const Events = {\n endpoint: url,\n defaultAuthMode: getGraphQLAuthMode(default_authorization_type),\n region: aws_region,\n apiKey: api_key,\n };\n return {\n Events,\n };\n}\nfunction parseNotifications(amplifyOutputsNotificationsProperties) {\n if (!amplifyOutputsNotificationsProperties) {\n return undefined;\n }\n const { aws_region, channels, amazon_pinpoint_app_id } = amplifyOutputsNotificationsProperties;\n const hasInAppMessaging = channels.includes('IN_APP_MESSAGING');\n const hasPushNotification = channels.includes('APNS') || channels.includes('FCM');\n if (!(hasInAppMessaging || hasPushNotification)) {\n return undefined;\n }\n // At this point, we know the Amplify outputs contains at least one supported channel\n const notificationsConfig = {};\n if (hasInAppMessaging) {\n notificationsConfig.InAppMessaging = {\n Pinpoint: {\n appId: amazon_pinpoint_app_id,\n region: aws_region,\n },\n };\n }\n if (hasPushNotification) {\n notificationsConfig.PushNotification = {\n Pinpoint: {\n appId: amazon_pinpoint_app_id,\n region: aws_region,\n },\n };\n }\n return notificationsConfig;\n}\nfunction parseAmplifyOutputs(amplifyOutputs) {\n const resourcesConfig = {};\n if (amplifyOutputs.storage) {\n resourcesConfig.Storage = parseStorage(amplifyOutputs.storage);\n }\n if (amplifyOutputs.auth) {\n resourcesConfig.Auth = parseAuth(amplifyOutputs.auth);\n }\n if (amplifyOutputs.analytics) {\n resourcesConfig.Analytics = parseAnalytics(amplifyOutputs.analytics);\n }\n if (amplifyOutputs.geo) {\n resourcesConfig.Geo = parseGeo(amplifyOutputs.geo);\n }\n if (amplifyOutputs.data) {\n resourcesConfig.API = parseData(amplifyOutputs.data);\n }\n if (amplifyOutputs.custom) {\n const customConfig = parseCustom(amplifyOutputs.custom);\n if (customConfig && 'Events' in customConfig) {\n resourcesConfig.API = { ...resourcesConfig.API, ...customConfig };\n }\n }\n if (amplifyOutputs.notifications) {\n resourcesConfig.Notifications = parseNotifications(amplifyOutputs.notifications);\n }\n return resourcesConfig;\n}\nexports.parseAmplifyOutputs = parseAmplifyOutputs;\nconst authModeNames = {\n AMAZON_COGNITO_USER_POOLS: 'userPool',\n API_KEY: 'apiKey',\n AWS_IAM: 'iam',\n AWS_LAMBDA: 'lambda',\n OPENID_CONNECT: 'oidc',\n};\nfunction getGraphQLAuthMode(authType) {\n return authModeNames[authType];\n}\nconst providerNames = {\n GOOGLE: 'Google',\n LOGIN_WITH_AMAZON: 'Amazon',\n FACEBOOK: 'Facebook',\n SIGN_IN_WITH_APPLE: 'Apple',\n};\nfunction getOAuthProviders(providers = []) {\n return providers.reduce((oAuthProviders, provider) => {\n if (providerNames[provider] !== undefined) {\n oAuthProviders.push(providerNames[provider]);\n }\n return oAuthProviders;\n }, []);\n}\nfunction getMfaStatus(mfaConfiguration) {\n if (mfaConfiguration === 'OPTIONAL')\n return 'optional';\n if (mfaConfiguration === 'REQUIRED')\n return 'on';\n return 'off';\n}\nfunction createBucketInfoMap(buckets) {\n const mappedBuckets = {};\n buckets.forEach(({ name, bucket_name: bucketName, aws_region: region, paths }) => {\n if (name in mappedBuckets) {\n throw new Error(`Duplicate friendly name found: ${name}. Name must be unique.`);\n }\n const sanitizedPaths = paths\n ? Object.entries(paths).reduce((acc, [key, value]) => {\n if (value !== undefined) {\n acc[key] = value;\n }\n return acc;\n }, {})\n : undefined;\n mappedBuckets[name] = {\n bucketName,\n region,\n paths: sanitizedPaths,\n };\n });\n return mappedBuckets;\n}\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,mBAAmB,GAAG,OAAO,CAAC,cAAc,GAAG,OAAO,CAAC,gBAAgB,GAAG,MAAM;AACxF,SAAS,gBAAgB,CAAC,MAAM,EAAE;AAClC;AACA,IAAI,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM;AAC9B,IAAI,IAAI,CAAC,OAAO,EAAE;AAClB,QAAQ,OAAO,KAAK;AACpB;AACA,IAAI,OAAO,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC;AAClC;AACA,OAAO,CAAC,gBAAgB,GAAG,gBAAgB;AAC3C,SAAS,YAAY,CAAC,+BAA+B,EAAE;AACvD,IAAI,IAAI,CAAC,+BAA+B,EAAE;AAC1C,QAAQ,OAAO,SAAS;AACxB;AACA,IAAI,MAAM,EAAE,WAAW,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,+BAA+B;AAChF,IAAI,OAAO;AACX,QAAQ,EAAE,EAAE;AACZ,YAAY,MAAM,EAAE,WAAW;AAC/B,YAAY,MAAM,EAAE,UAAU;AAC9B,YAAY,OAAO,EAAE,OAAO,IAAI,mBAAmB,CAAC,OAAO,CAAC;AAC5D,SAAS;AACT,KAAK;AACL;AACA,SAAS,SAAS,CAAC,4BAA4B,EAAE;AACjD,IAAI,IAAI,CAAC,4BAA4B,EAAE;AACvC,QAAQ,OAAO,SAA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QAAQ,MAAM,cAAc,GAAG;AAC/B,cAAc,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,CAAC,GAAG,EAAE,KAAK,CAAC,KAAK;AAClE,gBAAgB,IAAI,KAAK,KAAK,SAAS,EAAE;AACzC,oBAAoB,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK;AACpC;AACA,gBAAgB,OAAO,GAAG;AAC1B,aAAa,EAAE,EAAE;AACjB,cAAc,SAAS;AACvB,QAAQ,aAAa,CAAC,IAAI,CAAC,GAAG;AAC9B,YAAY,UAAU;AACtB,YAAY,MAAM;AAClB,YAAY,KAAK,EAAE,cAAc;AACjC,SAAS;AACT,KAAK,CAAC;AACN,IAAI,OAAO,aAAa;AACxB;;"}
|
|
1
|
+
{"version":3,"file":"parseAmplifyOutputs.js","sources":["../../src/parseAmplifyOutputs.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isAmplifyOutputs = isAmplifyOutputs;\nexports.parseAnalytics = parseAnalytics;\nexports.parseAmplifyOutputs = parseAmplifyOutputs;\nfunction isAmplifyOutputs(config) {\n // version format initially will be '1' but is expected to be something like x.y where x is major and y minor version\n const { version } = config;\n if (!version) {\n return false;\n }\n return version.startsWith('1');\n}\nfunction parseStorage(amplifyOutputsStorageProperties) {\n if (!amplifyOutputsStorageProperties) {\n return undefined;\n }\n const { bucket_name, aws_region, buckets } = amplifyOutputsStorageProperties;\n return {\n S3: {\n bucket: bucket_name,\n region: aws_region,\n buckets: buckets && createBucketInfoMap(buckets),\n },\n };\n}\nfunction parseAuth(amplifyOutputsAuthProperties) {\n if (!amplifyOutputsAuthProperties) {\n return undefined;\n }\n const { user_pool_id, user_pool_client_id, identity_pool_id, password_policy, mfa_configuration, mfa_methods, unauthenticated_identities_enabled, oauth, username_attributes, standard_required_attributes, groups, } = amplifyOutputsAuthProperties;\n const authConfig = {\n Cognito: {\n userPoolId: user_pool_id,\n userPoolClientId: user_pool_client_id,\n groups,\n },\n };\n if (identity_pool_id) {\n authConfig.Cognito = {\n ...authConfig.Cognito,\n identityPoolId: identity_pool_id,\n };\n }\n if (password_policy) {\n authConfig.Cognito.passwordFormat = {\n requireLowercase: password_policy.require_lowercase,\n requireNumbers: password_policy.require_numbers,\n requireUppercase: password_policy.require_uppercase,\n requireSpecialCharacters: password_policy.require_symbols,\n minLength: password_policy.min_length ?? 6,\n };\n }\n if (mfa_configuration) {\n authConfig.Cognito.mfa = {\n status: getMfaStatus(mfa_configuration),\n smsEnabled: mfa_methods?.includes('SMS'),\n totpEnabled: mfa_methods?.includes('TOTP'),\n };\n }\n if (unauthenticated_identities_enabled) {\n authConfig.Cognito.allowGuestAccess = unauthenticated_identities_enabled;\n }\n if (oauth) {\n authConfig.Cognito.loginWith = {\n oauth: {\n domain: oauth.domain,\n redirectSignIn: oauth.redirect_sign_in_uri,\n redirectSignOut: oauth.redirect_sign_out_uri,\n responseType: oauth.response_type === 'token' ? 'token' : 'code',\n scopes: oauth.scopes,\n providers: getOAuthProviders(oauth.identity_providers),\n },\n };\n }\n if (username_attributes) {\n authConfig.Cognito.loginWith = {\n ...authConfig.Cognito.loginWith,\n email: username_attributes.includes('email'),\n phone: username_attributes.includes('phone_number'),\n // Signing in with a username is not currently supported in Gen2, this should always evaluate to false\n username: username_attributes.includes('username'),\n };\n }\n if (standard_required_attributes) {\n authConfig.Cognito.userAttributes = standard_required_attributes.reduce((acc, curr) => ({ ...acc, [curr]: { required: true } }), {});\n }\n return authConfig;\n}\nfunction parseAnalytics(amplifyOutputsAnalyticsProperties) {\n if (!amplifyOutputsAnalyticsProperties?.amazon_pinpoint) {\n return undefined;\n }\n const { amazon_pinpoint } = amplifyOutputsAnalyticsProperties;\n return {\n Pinpoint: {\n appId: amazon_pinpoint.app_id,\n region: amazon_pinpoint.aws_region,\n },\n };\n}\nfunction parseGeo(amplifyOutputsAnalyticsProperties) {\n if (!amplifyOutputsAnalyticsProperties) {\n return undefined;\n }\n const { aws_region, geofence_collections, maps, search_indices } = amplifyOutputsAnalyticsProperties;\n return {\n LocationService: {\n region: aws_region,\n searchIndices: search_indices,\n geofenceCollections: geofence_collections,\n maps,\n },\n };\n}\nfunction parseData(amplifyOutputsDataProperties) {\n if (!amplifyOutputsDataProperties) {\n return undefined;\n }\n const { aws_region, default_authorization_type, url, api_key, model_introspection, } = amplifyOutputsDataProperties;\n const GraphQL = {\n endpoint: url,\n defaultAuthMode: getGraphQLAuthMode(default_authorization_type),\n region: aws_region,\n apiKey: api_key,\n modelIntrospection: model_introspection,\n };\n return {\n GraphQL,\n };\n}\nfunction parseCustom(amplifyOutputsCustomProperties) {\n if (!amplifyOutputsCustomProperties?.events) {\n return undefined;\n }\n const { url, aws_region, api_key, default_authorization_type } = amplifyOutputsCustomProperties.events;\n const Events = {\n endpoint: url,\n defaultAuthMode: getGraphQLAuthMode(default_authorization_type),\n region: aws_region,\n apiKey: api_key,\n };\n return {\n Events,\n };\n}\nfunction parseNotifications(amplifyOutputsNotificationsProperties) {\n if (!amplifyOutputsNotificationsProperties) {\n return undefined;\n }\n const { aws_region, channels, amazon_pinpoint_app_id } = amplifyOutputsNotificationsProperties;\n const hasInAppMessaging = channels.includes('IN_APP_MESSAGING');\n const hasPushNotification = channels.includes('APNS') || channels.includes('FCM');\n if (!(hasInAppMessaging || hasPushNotification)) {\n return undefined;\n }\n // At this point, we know the Amplify outputs contains at least one supported channel\n const notificationsConfig = {};\n if (hasInAppMessaging) {\n notificationsConfig.InAppMessaging = {\n Pinpoint: {\n appId: amazon_pinpoint_app_id,\n region: aws_region,\n },\n };\n }\n if (hasPushNotification) {\n notificationsConfig.PushNotification = {\n Pinpoint: {\n appId: amazon_pinpoint_app_id,\n region: aws_region,\n },\n };\n }\n return notificationsConfig;\n}\nfunction parseAmplifyOutputs(amplifyOutputs) {\n const resourcesConfig = {};\n if (amplifyOutputs.storage) {\n resourcesConfig.Storage = parseStorage(amplifyOutputs.storage);\n }\n if (amplifyOutputs.auth) {\n resourcesConfig.Auth = parseAuth(amplifyOutputs.auth);\n }\n if (amplifyOutputs.analytics) {\n resourcesConfig.Analytics = parseAnalytics(amplifyOutputs.analytics);\n }\n if (amplifyOutputs.geo) {\n resourcesConfig.Geo = parseGeo(amplifyOutputs.geo);\n }\n if (amplifyOutputs.data) {\n resourcesConfig.API = parseData(amplifyOutputs.data);\n }\n if (amplifyOutputs.custom) {\n const customConfig = parseCustom(amplifyOutputs.custom);\n if (customConfig && 'Events' in customConfig) {\n resourcesConfig.API = { ...resourcesConfig.API, ...customConfig };\n }\n }\n if (amplifyOutputs.notifications) {\n resourcesConfig.Notifications = parseNotifications(amplifyOutputs.notifications);\n }\n return resourcesConfig;\n}\nconst authModeNames = {\n AMAZON_COGNITO_USER_POOLS: 'userPool',\n API_KEY: 'apiKey',\n AWS_IAM: 'iam',\n AWS_LAMBDA: 'lambda',\n OPENID_CONNECT: 'oidc',\n};\nfunction getGraphQLAuthMode(authType) {\n return authModeNames[authType];\n}\nconst providerNames = {\n GOOGLE: 'Google',\n LOGIN_WITH_AMAZON: 'Amazon',\n FACEBOOK: 'Facebook',\n SIGN_IN_WITH_APPLE: 'Apple',\n};\nfunction getOAuthProviders(providers = []) {\n return providers.reduce((oAuthProviders, provider) => {\n if (providerNames[provider] !== undefined) {\n oAuthProviders.push(providerNames[provider]);\n }\n return oAuthProviders;\n }, []);\n}\nfunction getMfaStatus(mfaConfiguration) {\n if (mfaConfiguration === 'OPTIONAL')\n return 'optional';\n if (mfaConfiguration === 'REQUIRED')\n return 'on';\n return 'off';\n}\nfunction createBucketInfoMap(buckets) {\n const mappedBuckets = {};\n buckets.forEach(({ name, bucket_name: bucketName, aws_region: region, paths }) => {\n if (name in mappedBuckets) {\n throw new Error(`Duplicate friendly name found: ${name}. Name must be unique.`);\n }\n const sanitizedPaths = paths\n ? Object.entries(paths).reduce((acc, [key, value]) => {\n if (value !== undefined) {\n acc[key] = value;\n }\n return acc;\n }, {})\n : undefined;\n mappedBuckets[name] = {\n bucketName,\n region,\n paths: sanitizedPaths,\n };\n });\n return mappedBuckets;\n}\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,gBAAgB,GAAG,gBAAgB;AAC3C,OAAO,CAAC,cAAc,GAAG,cAAc;AACvC,OAAO,CAAC,mBAAmB,GAAG,mBAAmB;AACjD,SAAS,gBAAgB,CAAC,MAAM,EAAE;AAClC;AACA,IAAI,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM;AAC9B,IAAI,IAAI,CAAC,OAAO,EAAE;AAClB,QAAQ,OAAO,KAAK;AACpB;AACA,IAAI,OAAO,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC;AAClC;AACA,SAAS,YAAY,CAAC,+BAA+B,EAAE;AACvD,IAAI,IAAI,CAAC,+BAA+B,EAAE;AAC1C,QAAQ,OAAO,SAAS;AACxB;AACA,IAAI,MAAM,EAAE,WAAW,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,+BAA+B;AAChF,IAAI,OAAO;AACX,QAAQ,EAAE,EAAE;AACZ,YAAY,MAAM,EAAE,WAAW;AAC/B,YAAY,MAAM,EAAE,UAAU;AAC9B,YAAY,OAAO,EAAE,OAAO,IAAI,mBAAmB,CAAC,OAAO,CAAC;AAC5D,SAAS;AACT,KAAK;AACL;AACA,SAAS,SAAS,CAAC,4BAA4B,EAAE;AACjD,IAAI,IAAI,CAAC,4BAA4B,EAAE;AACvC,QAAQ,OAAO,SAAS;AACxB;AACA,IAAI,MAAM,EAAE,YAAY,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,eAAe,EAAE,iBAAiB,EAAE,WAAW,EAAE,kCAAkC,EAAE,KAAK,EAAE,mBAAmB,EAAE,4BAA4B,E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AK;AACpC;AACA,gBAAgB,OAAO,GAAG;AAC1B,aAAa,EAAE,EAAE;AACjB,cAAc,SAAS;AACvB,QAAQ,aAAa,CAAC,IAAI,CAAC,GAAG;AAC9B,YAAY,UAAU;AACtB,YAAY,MAAM;AAClB,YAAY,KAAK,EAAE,cAAc;AACjC,SAAS;AACT,KAAK,CAAC;AACN,IAAI,OAAO,aAAa;AACxB;;"}
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
// SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.UpdateEndpointException = void 0;
|
|
7
|
+
var UpdateEndpointException;
|
|
7
8
|
(function (UpdateEndpointException) {
|
|
8
9
|
UpdateEndpointException["BadRequestException"] = "BadRequestException";
|
|
9
10
|
UpdateEndpointException["ForbiddenException"] = "ForbiddenException";
|
|
@@ -12,5 +13,5 @@ exports.UpdateEndpointException = void 0;
|
|
|
12
13
|
UpdateEndpointException["NotFoundException"] = "NotFoundException";
|
|
13
14
|
UpdateEndpointException["PayloadTooLargeException"] = "PayloadTooLargeException";
|
|
14
15
|
UpdateEndpointException["TooManyRequestsException"] = "TooManyRequestsException";
|
|
15
|
-
})(
|
|
16
|
+
})(UpdateEndpointException || (exports.UpdateEndpointException = UpdateEndpointException = {}));
|
|
16
17
|
//# sourceMappingURL=errors.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sources":["../../../../../src/providers/pinpoint/types/errors.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.UpdateEndpointException = void 0;\nvar UpdateEndpointException;\n(function (UpdateEndpointException) {\n UpdateEndpointException[\"BadRequestException\"] = \"BadRequestException\";\n UpdateEndpointException[\"ForbiddenException\"] = \"ForbiddenException\";\n UpdateEndpointException[\"InternalServerErrorException\"] = \"InternalServerErrorException\";\n UpdateEndpointException[\"MethodNotAllowedException\"] = \"MethodNotAllowedException\";\n UpdateEndpointException[\"NotFoundException\"] = \"NotFoundException\";\n UpdateEndpointException[\"PayloadTooLargeException\"] = \"PayloadTooLargeException\";\n UpdateEndpointException[\"TooManyRequestsException\"] = \"TooManyRequestsException\";\n})(UpdateEndpointException
|
|
1
|
+
{"version":3,"file":"errors.js","sources":["../../../../../src/providers/pinpoint/types/errors.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.UpdateEndpointException = void 0;\nvar UpdateEndpointException;\n(function (UpdateEndpointException) {\n UpdateEndpointException[\"BadRequestException\"] = \"BadRequestException\";\n UpdateEndpointException[\"ForbiddenException\"] = \"ForbiddenException\";\n UpdateEndpointException[\"InternalServerErrorException\"] = \"InternalServerErrorException\";\n UpdateEndpointException[\"MethodNotAllowedException\"] = \"MethodNotAllowedException\";\n UpdateEndpointException[\"NotFoundException\"] = \"NotFoundException\";\n UpdateEndpointException[\"PayloadTooLargeException\"] = \"PayloadTooLargeException\";\n UpdateEndpointException[\"TooManyRequestsException\"] = \"TooManyRequestsException\";\n})(UpdateEndpointException || (exports.UpdateEndpointException = UpdateEndpointException = {}));\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,uBAAuB,GAAG,MAAM;AACxC,IAAI,uBAAuB;AAC3B,CAAC,UAAU,uBAAuB,EAAE;AACpC,IAAI,uBAAuB,CAAC,qBAAqB,CAAC,GAAG,qBAAqB;AAC1E,IAAI,uBAAuB,CAAC,oBAAoB,CAAC,GAAG,oBAAoB;AACxE,IAAI,uBAAuB,CAAC,8BAA8B,CAAC,GAAG,8BAA8B;AAC5F,IAAI,uBAAuB,CAAC,2BAA2B,CAAC,GAAG,2BAA2B;AACtF,IAAI,uBAAuB,CAAC,mBAAmB,CAAC,GAAG,mBAAmB;AACtE,IAAI,uBAAuB,CAAC,0BAA0B,CAAC,GAAG,0BAA0B;AACpF,IAAI,uBAAuB,CAAC,0BAA0B,CAAC,GAAG,0BAA0B;AACpF,CAAC,EAAE,uBAAuB,KAAK,OAAO,CAAC,uBAAuB,GAAG,uBAAuB,GAAG,EAAE,CAAC,CAAC;;"}
|
|
@@ -2,9 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.CodeGenConnectionType = void 0;
|
|
5
|
+
/**
|
|
6
|
+
* Field-level Relationship Definitions
|
|
7
|
+
*/
|
|
8
|
+
var CodeGenConnectionType;
|
|
5
9
|
(function (CodeGenConnectionType) {
|
|
6
10
|
CodeGenConnectionType["HAS_ONE"] = "HAS_ONE";
|
|
7
11
|
CodeGenConnectionType["BELONGS_TO"] = "BELONGS_TO";
|
|
8
12
|
CodeGenConnectionType["HAS_MANY"] = "HAS_MANY";
|
|
9
|
-
})(
|
|
13
|
+
})(CodeGenConnectionType || (exports.CodeGenConnectionType = CodeGenConnectionType = {}));
|
|
10
14
|
//# sourceMappingURL=types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sources":["../../../../src/singleton/API/types.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CodeGenConnectionType = void 0;\n/**\n * Field-level Relationship Definitions\n */\nvar CodeGenConnectionType;\n(function (CodeGenConnectionType) {\n CodeGenConnectionType[\"HAS_ONE\"] = \"HAS_ONE\";\n CodeGenConnectionType[\"BELONGS_TO\"] = \"BELONGS_TO\";\n CodeGenConnectionType[\"HAS_MANY\"] = \"HAS_MANY\";\n})(CodeGenConnectionType
|
|
1
|
+
{"version":3,"file":"types.js","sources":["../../../../src/singleton/API/types.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CodeGenConnectionType = void 0;\n/**\n * Field-level Relationship Definitions\n */\nvar CodeGenConnectionType;\n(function (CodeGenConnectionType) {\n CodeGenConnectionType[\"HAS_ONE\"] = \"HAS_ONE\";\n CodeGenConnectionType[\"BELONGS_TO\"] = \"BELONGS_TO\";\n CodeGenConnectionType[\"HAS_MANY\"] = \"HAS_MANY\";\n})(CodeGenConnectionType || (exports.CodeGenConnectionType = CodeGenConnectionType = {}));\n"],"names":[],"mappings":";;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,qBAAqB,GAAG,MAAM;AACtC;AACA;AACA;AACA,IAAI,qBAAqB;AACzB,CAAC,UAAU,qBAAqB,EAAE;AAClC,IAAI,qBAAqB,CAAC,SAAS,CAAC,GAAG,SAAS;AAChD,IAAI,qBAAqB,CAAC,YAAY,CAAC,GAAG,YAAY;AACtD,IAAI,qBAAqB,CAAC,UAAU,CAAC,GAAG,UAAU;AAClD,CAAC,EAAE,qBAAqB,KAAK,OAAO,CAAC,qBAAqB,GAAG,qBAAqB,GAAG,EAAE,CAAC,CAAC;;"}
|
|
@@ -12,7 +12,7 @@ var AuthConfigurationErrorCode;
|
|
|
12
12
|
AuthConfigurationErrorCode["AuthUserPoolException"] = "AuthUserPoolException";
|
|
13
13
|
AuthConfigurationErrorCode["InvalidIdentityPoolIdException"] = "InvalidIdentityPoolIdException";
|
|
14
14
|
AuthConfigurationErrorCode["OAuthNotConfigureException"] = "OAuthNotConfigureException";
|
|
15
|
-
})(AuthConfigurationErrorCode
|
|
15
|
+
})(AuthConfigurationErrorCode || (exports.AuthConfigurationErrorCode = AuthConfigurationErrorCode = {}));
|
|
16
16
|
const authConfigurationErrorMap = {
|
|
17
17
|
[AuthConfigurationErrorCode.AuthTokenConfigException]: {
|
|
18
18
|
message: 'Auth Token Provider not configured.',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errorHelpers.js","sources":["../../../../../src/singleton/Auth/utils/errorHelpers.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.assert = exports.AuthConfigurationErrorCode = void 0;\nconst errors_1 = require(\"../../../errors\");\nvar AuthConfigurationErrorCode;\n(function (AuthConfigurationErrorCode) {\n AuthConfigurationErrorCode[\"AuthTokenConfigException\"] = \"AuthTokenConfigException\";\n AuthConfigurationErrorCode[\"AuthUserPoolAndIdentityPoolException\"] = \"AuthUserPoolAndIdentityPoolException\";\n AuthConfigurationErrorCode[\"AuthUserPoolException\"] = \"AuthUserPoolException\";\n AuthConfigurationErrorCode[\"InvalidIdentityPoolIdException\"] = \"InvalidIdentityPoolIdException\";\n AuthConfigurationErrorCode[\"OAuthNotConfigureException\"] = \"OAuthNotConfigureException\";\n})(AuthConfigurationErrorCode
|
|
1
|
+
{"version":3,"file":"errorHelpers.js","sources":["../../../../../src/singleton/Auth/utils/errorHelpers.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.assert = exports.AuthConfigurationErrorCode = void 0;\nconst errors_1 = require(\"../../../errors\");\nvar AuthConfigurationErrorCode;\n(function (AuthConfigurationErrorCode) {\n AuthConfigurationErrorCode[\"AuthTokenConfigException\"] = \"AuthTokenConfigException\";\n AuthConfigurationErrorCode[\"AuthUserPoolAndIdentityPoolException\"] = \"AuthUserPoolAndIdentityPoolException\";\n AuthConfigurationErrorCode[\"AuthUserPoolException\"] = \"AuthUserPoolException\";\n AuthConfigurationErrorCode[\"InvalidIdentityPoolIdException\"] = \"InvalidIdentityPoolIdException\";\n AuthConfigurationErrorCode[\"OAuthNotConfigureException\"] = \"OAuthNotConfigureException\";\n})(AuthConfigurationErrorCode || (exports.AuthConfigurationErrorCode = AuthConfigurationErrorCode = {}));\nconst authConfigurationErrorMap = {\n [AuthConfigurationErrorCode.AuthTokenConfigException]: {\n message: 'Auth Token Provider not configured.',\n recoverySuggestion: 'Make sure to call Amplify.configure in your app.',\n },\n [AuthConfigurationErrorCode.AuthUserPoolAndIdentityPoolException]: {\n message: 'Auth UserPool or IdentityPool not configured.',\n recoverySuggestion: 'Make sure to call Amplify.configure in your app with UserPoolId and IdentityPoolId.',\n },\n [AuthConfigurationErrorCode.AuthUserPoolException]: {\n message: 'Auth UserPool not configured.',\n recoverySuggestion: 'Make sure to call Amplify.configure in your app with userPoolId and userPoolClientId.',\n },\n [AuthConfigurationErrorCode.InvalidIdentityPoolIdException]: {\n message: 'Invalid identity pool id provided.',\n recoverySuggestion: 'Make sure a valid identityPoolId is given in the config.',\n },\n [AuthConfigurationErrorCode.OAuthNotConfigureException]: {\n message: 'oauth param not configured.',\n recoverySuggestion: 'Make sure to call Amplify.configure with oauth parameter in your app.',\n },\n};\nexports.assert = (0, errors_1.createAssertionFunction)(authConfigurationErrorMap);\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,MAAM,GAAG,OAAO,CAAC,0BAA0B,GAAG,MAAM;AAC5D,MAAM,QAAQ,GAAG,OAAO,CAAC,iBAAiB,CAAC;AAC3C,IAAI,0BAA0B;AAC9B,CAAC,UAAU,0BAA0B,EAAE;AACvC,IAAI,0BAA0B,CAAC,0BAA0B,CAAC,GAAG,0BAA0B;AACvF,IAAI,0BAA0B,CAAC,sCAAsC,CAAC,GAAG,sCAAsC;AAC/G,IAAI,0BAA0B,CAAC,uBAAuB,CAAC,GAAG,uBAAuB;AACjF,IAAI,0BAA0B,CAAC,gCAAgC,CAAC,GAAG,gCAAgC;AACnG,IAAI,0BAA0B,CAAC,4BAA4B,CAAC,GAAG,4BAA4B;AAC3F,CAAC,EAAE,0BAA0B,KAAK,OAAO,CAAC,0BAA0B,GAAG,0BAA0B,GAAG,EAAE,CAAC,CAAC;AACxG,MAAM,yBAAyB,GAAG;AAClC,IAAI,CAAC,0BAA0B,CAAC,wBAAwB,GAAG;AAC3D,QAAQ,OAAO,EAAE,qCAAqC;AACtD,QAAQ,kBAAkB,EAAE,kDAAkD;AAC9E,KAAK;AACL,IAAI,CAAC,0BAA0B,CAAC,oCAAoC,GAAG;AACvE,QAAQ,OAAO,EAAE,+CAA+C;AAChE,QAAQ,kBAAkB,EAAE,qFAAqF;AACjH,KAAK;AACL,IAAI,CAAC,0BAA0B,CAAC,qBAAqB,GAAG;AACxD,QAAQ,OAAO,EAAE,+BAA+B;AAChD,QAAQ,kBAAkB,EAAE,uFAAuF;AACnH,KAAK;AACL,IAAI,CAAC,0BAA0B,CAAC,8BAA8B,GAAG;AACjE,QAAQ,OAAO,EAAE,oCAAoC;AACrD,QAAQ,kBAAkB,EAAE,0DAA0D;AACtF,KAAK;AACL,IAAI,CAAC,0BAA0B,CAAC,0BAA0B,GAAG;AAC7D,QAAQ,OAAO,EAAE,6BAA6B;AAC9C,QAAQ,kBAAkB,EAAE,uEAAuE;AACnG,KAAK;AACL,CAAC;AACD,OAAO,CAAC,MAAM,GAAG,IAAI,QAAQ,CAAC,uBAAuB,EAAE,yBAAyB,CAAC;;"}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.
|
|
4
|
+
exports.assertTokenProviderConfig = assertTokenProviderConfig;
|
|
5
|
+
exports.assertOAuthConfig = assertOAuthConfig;
|
|
6
|
+
exports.assertIdentityPoolIdConfig = assertIdentityPoolIdConfig;
|
|
7
|
+
exports.decodeJWT = decodeJWT;
|
|
5
8
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
6
9
|
// SPDX-License-Identifier: Apache-2.0
|
|
7
10
|
const convert_1 = require("../../../utils/convert");
|
|
@@ -17,7 +20,6 @@ function assertTokenProviderConfig(cognitoConfig) {
|
|
|
17
20
|
}
|
|
18
21
|
(0, errorHelpers_1.assert)(assertionValid, errorHelpers_1.AuthConfigurationErrorCode.AuthUserPoolException);
|
|
19
22
|
}
|
|
20
|
-
exports.assertTokenProviderConfig = assertTokenProviderConfig;
|
|
21
23
|
function assertOAuthConfig(cognitoConfig) {
|
|
22
24
|
const validOAuthConfig = !!cognitoConfig?.loginWith?.oauth?.domain &&
|
|
23
25
|
!!cognitoConfig?.loginWith?.oauth?.redirectSignOut &&
|
|
@@ -25,12 +27,10 @@ function assertOAuthConfig(cognitoConfig) {
|
|
|
25
27
|
!!cognitoConfig?.loginWith?.oauth?.responseType;
|
|
26
28
|
(0, errorHelpers_1.assert)(validOAuthConfig, errorHelpers_1.AuthConfigurationErrorCode.OAuthNotConfigureException);
|
|
27
29
|
}
|
|
28
|
-
exports.assertOAuthConfig = assertOAuthConfig;
|
|
29
30
|
function assertIdentityPoolIdConfig(cognitoConfig) {
|
|
30
31
|
const validConfig = !!cognitoConfig?.identityPoolId;
|
|
31
32
|
(0, errorHelpers_1.assert)(validConfig, errorHelpers_1.AuthConfigurationErrorCode.InvalidIdentityPoolIdException);
|
|
32
33
|
}
|
|
33
|
-
exports.assertIdentityPoolIdConfig = assertIdentityPoolIdConfig;
|
|
34
34
|
/**
|
|
35
35
|
* Decodes payload of JWT token
|
|
36
36
|
*
|
|
@@ -60,5 +60,4 @@ function decodeJWT(token) {
|
|
|
60
60
|
throw new Error('Invalid token payload');
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
|
-
exports.decodeJWT = decodeJWT;
|
|
64
63
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../src/singleton/Auth/utils/index.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../src/singleton/Auth/utils/index.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.assertTokenProviderConfig = assertTokenProviderConfig;\nexports.assertOAuthConfig = assertOAuthConfig;\nexports.assertIdentityPoolIdConfig = assertIdentityPoolIdConfig;\nexports.decodeJWT = decodeJWT;\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst convert_1 = require(\"../../../utils/convert\");\nconst errorHelpers_1 = require(\"./errorHelpers\");\nfunction assertTokenProviderConfig(cognitoConfig) {\n let assertionValid = true; // assume valid until otherwise proveed\n if (!cognitoConfig) {\n assertionValid = false;\n }\n else {\n assertionValid =\n !!cognitoConfig.userPoolId && !!cognitoConfig.userPoolClientId;\n }\n (0, errorHelpers_1.assert)(assertionValid, errorHelpers_1.AuthConfigurationErrorCode.AuthUserPoolException);\n}\nfunction assertOAuthConfig(cognitoConfig) {\n const validOAuthConfig = !!cognitoConfig?.loginWith?.oauth?.domain &&\n !!cognitoConfig?.loginWith?.oauth?.redirectSignOut &&\n !!cognitoConfig?.loginWith?.oauth?.redirectSignIn &&\n !!cognitoConfig?.loginWith?.oauth?.responseType;\n (0, errorHelpers_1.assert)(validOAuthConfig, errorHelpers_1.AuthConfigurationErrorCode.OAuthNotConfigureException);\n}\nfunction assertIdentityPoolIdConfig(cognitoConfig) {\n const validConfig = !!cognitoConfig?.identityPoolId;\n (0, errorHelpers_1.assert)(validConfig, errorHelpers_1.AuthConfigurationErrorCode.InvalidIdentityPoolIdException);\n}\n/**\n * Decodes payload of JWT token\n *\n * @param {String} token A string representing a token to be decoded\n * @throws {@link Error} - Throws error when token is invalid or payload malformed.\n */\nfunction decodeJWT(token) {\n const tokenParts = token.split('.');\n if (tokenParts.length !== 3) {\n throw new Error('Invalid token');\n }\n try {\n const base64WithUrlSafe = tokenParts[1];\n const base64 = base64WithUrlSafe.replace(/-/g, '+').replace(/_/g, '/');\n const jsonStr = decodeURIComponent(convert_1.base64Decoder\n .convert(base64)\n .split('')\n .map(char => `%${`00${char.charCodeAt(0).toString(16)}`.slice(-2)}`)\n .join(''));\n const payload = JSON.parse(jsonStr);\n return {\n toString: () => token,\n payload,\n };\n }\n catch (err) {\n throw new Error('Invalid token payload');\n }\n}\n"],"names":[],"mappings":";;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,yBAAyB,GAAG,yBAAyB;AAC7D,OAAO,CAAC,iBAAiB,GAAG,iBAAiB;AAC7C,OAAO,CAAC,0BAA0B,GAAG,0BAA0B;AAC/D,OAAO,CAAC,SAAS,GAAG,SAAS;AAC7B;AACA;AACA,MAAM,SAAS,GAAG,OAAO,CAAC,wBAAwB,CAAC;AACnD,MAAM,cAAc,GAAG,OAAO,CAAC,gBAAgB,CAAC;AAChD,SAAS,yBAAyB,CAAC,aAAa,EAAE;AAClD,IAAI,IAAI,cAAc,GAAG,IAAI,CAAC;AAC9B,IAAI,IAAI,CAAC,aAAa,EAAE;AACxB,QAAQ,cAAc,GAAG,KAAK;AAC9B;AACA,SAAS;AACT,QAAQ,cAAc;AACtB,YAAY,CAAC,CAAC,aAAa,CAAC,UAAU,IAAI,CAAC,CAAC,aAAa,CAAC,gBAAgB;AAC1E;AACA,IAAI,IAAI,cAAc,CAAC,MAAM,EAAE,cAAc,EAAE,cAAc,CAAC,0BAA0B,CAAC,qBAAqB,CAAC;AAC/G;AACA,SAAS,iBAAiB,CAAC,aAAa,EAAE;AAC1C,IAAI,MAAM,gBAAgB,GAAG,CAAC,CAAC,aAAa,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM;AACtE,QAAQ,CAAC,CAAC,aAAa,EAAE,SAAS,EAAE,KAAK,EAAE,eAAe;AA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CAAC;AACtB,QAAQ,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC;AAC3C,QAAQ,OAAO;AACf,YAAY,QAAQ,EAAE,MAAM,KAAK;AACjC,YAAY,OAAO;AACnB,SAAS;AACT;AACA,IAAI,OAAO,GAAG,EAAE;AAChB,QAAQ,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC;AAChD;AACA;;"}
|
|
@@ -3,10 +3,9 @@
|
|
|
3
3
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
4
4
|
// SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.clearCredentials =
|
|
6
|
+
exports.clearCredentials = clearCredentials;
|
|
7
7
|
const Amplify_1 = require("../Amplify");
|
|
8
8
|
function clearCredentials() {
|
|
9
9
|
return Amplify_1.Amplify.Auth.clearCredentials();
|
|
10
10
|
}
|
|
11
|
-
exports.clearCredentials = clearCredentials;
|
|
12
11
|
//# sourceMappingURL=clearCredentials.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clearCredentials.js","sources":["../../../../src/singleton/apis/clearCredentials.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.clearCredentials =
|
|
1
|
+
{"version":3,"file":"clearCredentials.js","sources":["../../../../src/singleton/apis/clearCredentials.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.clearCredentials = clearCredentials;\nconst Amplify_1 = require(\"../Amplify\");\nfunction clearCredentials() {\n return Amplify_1.Amplify.Auth.clearCredentials();\n}\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,gBAAgB,GAAG,gBAAgB;AAC3C,MAAM,SAAS,GAAG,OAAO,CAAC,YAAY,CAAC;AACvC,SAAS,gBAAgB,GAAG;AAC5B,IAAI,OAAO,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,gBAAgB,EAAE;AACpD;;"}
|
package/dist/cjs/types/errors.js
CHANGED
|
@@ -2,10 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.AmplifyErrorCode = void 0;
|
|
5
|
+
var AmplifyErrorCode;
|
|
5
6
|
(function (AmplifyErrorCode) {
|
|
6
7
|
AmplifyErrorCode["NoEndpointId"] = "NoEndpointId";
|
|
7
8
|
AmplifyErrorCode["PlatformNotSupported"] = "PlatformNotSupported";
|
|
8
9
|
AmplifyErrorCode["Unknown"] = "Unknown";
|
|
9
10
|
AmplifyErrorCode["NetworkError"] = "NetworkError";
|
|
10
|
-
})(
|
|
11
|
+
})(AmplifyErrorCode || (exports.AmplifyErrorCode = AmplifyErrorCode = {}));
|
|
11
12
|
//# sourceMappingURL=errors.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sources":["../../../src/types/errors.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AmplifyErrorCode = void 0;\nvar AmplifyErrorCode;\n(function (AmplifyErrorCode) {\n AmplifyErrorCode[\"NoEndpointId\"] = \"NoEndpointId\";\n AmplifyErrorCode[\"PlatformNotSupported\"] = \"PlatformNotSupported\";\n AmplifyErrorCode[\"Unknown\"] = \"Unknown\";\n AmplifyErrorCode[\"NetworkError\"] = \"NetworkError\";\n})(AmplifyErrorCode
|
|
1
|
+
{"version":3,"file":"errors.js","sources":["../../../src/types/errors.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AmplifyErrorCode = void 0;\nvar AmplifyErrorCode;\n(function (AmplifyErrorCode) {\n AmplifyErrorCode[\"NoEndpointId\"] = \"NoEndpointId\";\n AmplifyErrorCode[\"PlatformNotSupported\"] = \"PlatformNotSupported\";\n AmplifyErrorCode[\"Unknown\"] = \"Unknown\";\n AmplifyErrorCode[\"NetworkError\"] = \"NetworkError\";\n})(AmplifyErrorCode || (exports.AmplifyErrorCode = AmplifyErrorCode = {}));\n"],"names":[],"mappings":";;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,gBAAgB,GAAG,MAAM;AACjC,IAAI,gBAAgB;AACpB,CAAC,UAAU,gBAAgB,EAAE;AAC7B,IAAI,gBAAgB,CAAC,cAAc,CAAC,GAAG,cAAc;AACrD,IAAI,gBAAgB,CAAC,sBAAsB,CAAC,GAAG,sBAAsB;AACrE,IAAI,gBAAgB,CAAC,SAAS,CAAC,GAAG,SAAS;AAC3C,IAAI,gBAAgB,CAAC,cAAc,CAAC,GAAG,cAAc;AACrD,CAAC,EAAE,gBAAgB,KAAK,OAAO,CAAC,gBAAgB,GAAG,gBAAgB,GAAG,EAAE,CAAC,CAAC;;"}
|
|
@@ -3,9 +3,8 @@
|
|
|
3
3
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
4
4
|
// SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.bytesToString =
|
|
6
|
+
exports.bytesToString = bytesToString;
|
|
7
7
|
function bytesToString(input) {
|
|
8
8
|
return Array.from(input, byte => String.fromCodePoint(byte)).join('');
|
|
9
9
|
}
|
|
10
|
-
exports.bytesToString = bytesToString;
|
|
11
10
|
//# sourceMappingURL=bytesToString.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bytesToString.js","sources":["../../../../../src/utils/convert/base64/bytesToString.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.bytesToString =
|
|
1
|
+
{"version":3,"file":"bytesToString.js","sources":["../../../../../src/utils/convert/base64/bytesToString.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.bytesToString = bytesToString;\nfunction bytesToString(input) {\n return Array.from(input, byte => String.fromCodePoint(byte)).join('');\n}\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,aAAa,GAAG,aAAa;AACrC,SAAS,aAAa,CAAC,KAAK,EAAE;AAC9B,IAAI,OAAO,KAAK,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,IAAI,MAAM,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC;AACzE;;"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
4
4
|
// SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.cryptoSecureRandomInt =
|
|
6
|
+
exports.cryptoSecureRandomInt = cryptoSecureRandomInt;
|
|
7
7
|
const globalHelpers_1 = require("./globalHelpers");
|
|
8
8
|
/*
|
|
9
9
|
* Cryptographically secure pseudorandom number generator
|
|
@@ -14,5 +14,4 @@ function cryptoSecureRandomInt() {
|
|
|
14
14
|
const randomResult = crypto.getRandomValues(new Uint32Array(1))[0];
|
|
15
15
|
return randomResult;
|
|
16
16
|
}
|
|
17
|
-
exports.cryptoSecureRandomInt = cryptoSecureRandomInt;
|
|
18
17
|
//# sourceMappingURL=cryptoSecureRandomInt.js.map
|