@aws-amplify/core 6.0.1-console-preview.5a31ca1.0 → 6.0.1-console-preview.8d88eef.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 (98) hide show
  1. package/lib/Platform/types.d.ts +18 -8
  2. package/lib/Platform/types.js +10 -2
  3. package/lib/Platform/version.d.ts +1 -1
  4. package/lib/Platform/version.js +1 -1
  5. package/lib/ServiceWorker/ServiceWorker.js +69 -17
  6. package/lib/ServiceWorker/index.d.ts +0 -12
  7. package/lib/ServiceWorker/index.js +0 -12
  8. package/lib/errors/errorHelpers.d.ts +2 -0
  9. package/lib/errors/errorHelpers.js +20 -0
  10. package/lib/errors/index.d.ts +1 -0
  11. package/lib/errors/index.js +3 -1
  12. package/lib/index.d.ts +2 -0
  13. package/lib/index.js +7 -1
  14. package/lib/libraryUtils.d.ts +4 -6
  15. package/lib/libraryUtils.js +9 -15
  16. package/lib/parseAWSExports.js +27 -18
  17. package/lib/providers/pinpoint/apis/record.d.ts +1 -1
  18. package/lib/providers/pinpoint/apis/record.js +5 -21
  19. package/lib/providers/pinpoint/index.d.ts +2 -2
  20. package/lib/providers/pinpoint/index.js +4 -2
  21. package/lib/providers/pinpoint/types/errors.d.ts +9 -0
  22. package/lib/providers/pinpoint/types/errors.js +15 -0
  23. package/lib/providers/pinpoint/types/index.d.ts +1 -0
  24. package/lib/providers/pinpoint/types/index.js +3 -0
  25. package/lib/providers/pinpoint/types/pinpoint.d.ts +3 -3
  26. package/lib/providers/pinpoint/utils/index.d.ts +1 -0
  27. package/lib/providers/pinpoint/utils/index.js +3 -1
  28. package/lib/providers/pinpoint/utils/resolveEndpointId.d.ts +8 -0
  29. package/lib/providers/pinpoint/utils/resolveEndpointId.js +85 -0
  30. package/lib/singleton/Auth/types.d.ts +2 -2
  31. package/lib/singleton/Notifications/PushNotification/types.d.ts +2 -0
  32. package/lib/singleton/Notifications/PushNotification/types.js +4 -0
  33. package/lib/singleton/Notifications/types.d.ts +3 -1
  34. package/lib/tsconfig.tsbuildinfo +1 -1
  35. package/lib/types/errors.d.ts +1 -0
  36. package/lib/types/errors.js +1 -0
  37. package/lib-esm/Platform/types.d.ts +18 -8
  38. package/lib-esm/Platform/types.js +10 -2
  39. package/lib-esm/Platform/version.d.ts +1 -1
  40. package/lib-esm/Platform/version.js +1 -1
  41. package/lib-esm/ServiceWorker/ServiceWorker.js +69 -17
  42. package/lib-esm/ServiceWorker/index.d.ts +0 -12
  43. package/lib-esm/ServiceWorker/index.js +0 -12
  44. package/lib-esm/errors/errorHelpers.d.ts +2 -0
  45. package/lib-esm/errors/errorHelpers.js +17 -0
  46. package/lib-esm/errors/index.d.ts +1 -0
  47. package/lib-esm/errors/index.js +1 -0
  48. package/lib-esm/index.d.ts +2 -0
  49. package/lib-esm/index.js +4 -0
  50. package/lib-esm/libraryUtils.d.ts +4 -6
  51. package/lib-esm/libraryUtils.js +3 -6
  52. package/lib-esm/parseAWSExports.js +27 -18
  53. package/lib-esm/providers/pinpoint/apis/record.d.ts +1 -1
  54. package/lib-esm/providers/pinpoint/apis/record.js +6 -22
  55. package/lib-esm/providers/pinpoint/index.d.ts +2 -2
  56. package/lib-esm/providers/pinpoint/index.js +2 -1
  57. package/lib-esm/providers/pinpoint/types/errors.d.ts +9 -0
  58. package/lib-esm/providers/pinpoint/types/errors.js +12 -0
  59. package/lib-esm/providers/pinpoint/types/index.d.ts +1 -0
  60. package/lib-esm/providers/pinpoint/types/index.js +1 -0
  61. package/lib-esm/providers/pinpoint/types/pinpoint.d.ts +3 -3
  62. package/lib-esm/providers/pinpoint/utils/index.d.ts +1 -0
  63. package/lib-esm/providers/pinpoint/utils/index.js +1 -0
  64. package/lib-esm/providers/pinpoint/utils/resolveEndpointId.d.ts +8 -0
  65. package/lib-esm/providers/pinpoint/utils/resolveEndpointId.js +81 -0
  66. package/lib-esm/singleton/Auth/types.d.ts +2 -2
  67. package/lib-esm/singleton/Notifications/PushNotification/types.d.ts +2 -0
  68. package/lib-esm/singleton/Notifications/PushNotification/types.js +3 -0
  69. package/lib-esm/singleton/Notifications/types.d.ts +3 -1
  70. package/lib-esm/tsconfig.tsbuildinfo +1 -1
  71. package/lib-esm/types/errors.d.ts +1 -0
  72. package/lib-esm/types/errors.js +1 -0
  73. package/package.json +3 -3
  74. package/src/Platform/types.ts +20 -11
  75. package/src/Platform/version.ts +1 -1
  76. package/src/ServiceWorker/ServiceWorker.ts +20 -17
  77. package/src/ServiceWorker/index.ts +0 -12
  78. package/src/errors/errorHelpers.ts +20 -0
  79. package/src/errors/index.ts +1 -0
  80. package/src/index.ts +6 -0
  81. package/src/libraryUtils.ts +11 -11
  82. package/src/parseAWSExports.ts +19 -14
  83. package/src/providers/pinpoint/apis/record.ts +11 -25
  84. package/src/providers/pinpoint/index.ts +6 -2
  85. package/src/providers/pinpoint/types/errors.ts +12 -0
  86. package/src/providers/pinpoint/types/index.ts +1 -0
  87. package/src/providers/pinpoint/types/pinpoint.ts +3 -2
  88. package/src/providers/pinpoint/utils/index.ts +1 -0
  89. package/src/providers/pinpoint/utils/resolveEndpointId.ts +46 -0
  90. package/src/singleton/Auth/types.ts +2 -2
  91. package/src/singleton/Notifications/PushNotification/types.ts +6 -0
  92. package/src/singleton/Notifications/types.ts +3 -1
  93. package/src/types/errors.ts +1 -0
  94. package/lib/Amplify.d.ts +0 -29
  95. package/lib/Amplify.js +0 -118
  96. package/lib-esm/Amplify.d.ts +0 -29
  97. package/lib-esm/Amplify.js +0 -115
  98. package/src/Amplify.ts +0 -106
@@ -73,7 +73,14 @@ export declare enum DataStoreAction {
73
73
  GraphQl = "2"
74
74
  }
75
75
  export declare enum GeoAction {
76
- None = "0"
76
+ SearchByText = "0",
77
+ SearchByCoordinates = "1",
78
+ SearchForSuggestions = "2",
79
+ SearchByPlaceId = "3",
80
+ SaveGeofences = "4",
81
+ GetGeofence = "5",
82
+ ListGeofences = "6",
83
+ DeleteGeofences = "7"
77
84
  }
78
85
  export declare enum InAppMessagingAction {
79
86
  SyncMessages = "1",
@@ -92,7 +99,8 @@ export declare enum PubSubAction {
92
99
  Subscribe = "1"
93
100
  }
94
101
  export declare enum PushNotificationAction {
95
- None = "0"
102
+ InitializePushNotifications = "1",
103
+ IdentifyUser = "2"
96
104
  }
97
105
  export declare enum StorageAction {
98
106
  UploadData = "1",
@@ -139,23 +147,25 @@ export type CategoryUserAgentStateMap = Record<string, {
139
147
  }>;
140
148
  export type CustomUserAgentStateMap = Record<string, CategoryUserAgentStateMap>;
141
149
  export type AdditionalDetails = [string, string?][];
142
- type StorageUserAgentInput = {
150
+ export type StorageUserAgentInput = {
143
151
  category: Category.Storage;
144
152
  apis: StorageAction[];
153
+ additionalDetails: AdditionalDetails;
145
154
  };
146
- type AuthUserAgentInput = {
155
+ export type AuthUserAgentInput = {
147
156
  category: Category.Auth;
148
157
  apis: AuthAction[];
158
+ additionalDetails: AdditionalDetails;
149
159
  };
150
- type InAppMessagingUserAgentInput = {
160
+ export type InAppMessagingUserAgentInput = {
151
161
  category: Category.InAppMessaging;
152
162
  apis: InAppMessagingAction[];
163
+ additionalDetails: AdditionalDetails;
153
164
  };
154
- type GeoUserAgentInput = {
165
+ export type GeoUserAgentInput = {
155
166
  category: Category.Geo;
156
167
  apis: GeoAction[];
157
- };
158
- export type SetCustomUserAgentInput = (StorageUserAgentInput | AuthUserAgentInput | InAppMessagingUserAgentInput | GeoUserAgentInput) & {
159
168
  additionalDetails: AdditionalDetails;
160
169
  };
170
+ export type SetCustomUserAgentInput = StorageUserAgentInput | AuthUserAgentInput | InAppMessagingUserAgentInput | GeoUserAgentInput;
161
171
  export {};
@@ -88,7 +88,14 @@ var DataStoreAction;
88
88
  })(DataStoreAction = exports.DataStoreAction || (exports.DataStoreAction = {}));
89
89
  var GeoAction;
90
90
  (function (GeoAction) {
91
- GeoAction["None"] = "0";
91
+ GeoAction["SearchByText"] = "0";
92
+ GeoAction["SearchByCoordinates"] = "1";
93
+ GeoAction["SearchForSuggestions"] = "2";
94
+ GeoAction["SearchByPlaceId"] = "3";
95
+ GeoAction["SaveGeofences"] = "4";
96
+ GeoAction["GetGeofence"] = "5";
97
+ GeoAction["ListGeofences"] = "6";
98
+ GeoAction["DeleteGeofences"] = "7";
92
99
  })(GeoAction = exports.GeoAction || (exports.GeoAction = {}));
93
100
  var InAppMessagingAction;
94
101
  (function (InAppMessagingAction) {
@@ -112,7 +119,8 @@ var PubSubAction;
112
119
  })(PubSubAction = exports.PubSubAction || (exports.PubSubAction = {}));
113
120
  var PushNotificationAction;
114
121
  (function (PushNotificationAction) {
115
- PushNotificationAction["None"] = "0";
122
+ PushNotificationAction["InitializePushNotifications"] = "1";
123
+ PushNotificationAction["IdentifyUser"] = "2";
116
124
  })(PushNotificationAction = exports.PushNotificationAction || (exports.PushNotificationAction = {}));
117
125
  var StorageAction;
118
126
  (function (StorageAction) {
@@ -1 +1 @@
1
- export declare const version = "6.0.1-console-preview.5a31ca1.0+5a31ca1";
1
+ export declare const version = "6.0.1-console-preview.8d88eef.0+8d88eef";
@@ -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 = '6.0.1-console-preview.5a31ca1.0+5a31ca1';
5
+ exports.version = '6.0.1-console-preview.8d88eef.0+8d88eef';
@@ -1,13 +1,50 @@
1
1
  "use strict";
2
2
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
3
  // SPDX-License-Identifier: Apache-2.0
4
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
5
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
6
+ return new (P || (P = Promise))(function (resolve, reject) {
7
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
8
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
9
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
10
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
11
+ });
12
+ };
13
+ var __generator = (this && this.__generator) || function (thisArg, body) {
14
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
15
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
16
+ function verb(n) { return function (v) { return step([n, v]); }; }
17
+ function step(op) {
18
+ if (f) throw new TypeError("Generator is already executing.");
19
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
20
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
21
+ if (y = 0, t) op = [op[0] & 2, t.value];
22
+ switch (op[0]) {
23
+ case 0: case 1: t = op; break;
24
+ case 4: _.label++; return { value: op[1], done: false };
25
+ case 5: _.label++; y = op[1]; op = [0]; continue;
26
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
27
+ default:
28
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
29
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
30
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
31
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
32
+ if (t[2]) _.ops.pop();
33
+ _.trys.pop(); continue;
34
+ }
35
+ op = body.call(thisArg, _);
36
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
37
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
38
+ }
39
+ };
4
40
  Object.defineProperty(exports, "__esModule", { value: true });
5
41
  exports.ServiceWorkerClass = void 0;
6
42
  var Logger_1 = require("../Logger");
7
43
  var utils_1 = require("../utils");
8
- var Amplify_1 = require("../Amplify");
9
44
  var errors_1 = require("../errors");
10
45
  var errorHelpers_1 = require("./errorHelpers");
46
+ var pinpoint_1 = require("../providers/pinpoint");
47
+ var singleton_1 = require("../singleton");
11
48
  /**
12
49
  * Provides a means to registering a service worker in the browser
13
50
  * and communicating with it via postMessage events.
@@ -176,19 +213,37 @@ var ServiceWorkerClass = /** @class */ (function () {
176
213
  **/
177
214
  ServiceWorkerClass.prototype._setupListeners = function () {
178
215
  var _this = this;
179
- this.serviceWorker.addEventListener('statechange', function (event) {
180
- var currentState = _this.serviceWorker.state;
181
- _this._logger.debug("ServiceWorker statechange: ".concat(currentState));
182
- Amplify_1.Amplify.Analytics;
183
- if (isAmplifyWithAnalytics(Amplify_1.Amplify)) {
184
- Amplify_1.Amplify.Analytics.record({
185
- name: 'ServiceWorker',
186
- attributes: {
187
- state: currentState,
188
- },
189
- });
190
- }
191
- });
216
+ this.serviceWorker.addEventListener('statechange', function (event) { return __awaiter(_this, void 0, void 0, function () {
217
+ var currentState, _a, appId, region, credentials;
218
+ var _b, _c;
219
+ return __generator(this, function (_d) {
220
+ switch (_d.label) {
221
+ case 0:
222
+ currentState = this.serviceWorker.state;
223
+ this._logger.debug("ServiceWorker statechange: ".concat(currentState));
224
+ _a = (_c = (_b = singleton_1.Amplify.getConfig().Analytics) === null || _b === void 0 ? void 0 : _b.Pinpoint) !== null && _c !== void 0 ? _c : {}, appId = _a.appId, region = _a.region;
225
+ return [4 /*yield*/, (0, singleton_1.fetchAuthSession)()];
226
+ case 1:
227
+ credentials = (_d.sent()).credentials;
228
+ if (appId && region && credentials) {
229
+ // Pinpoint is configured, record an event
230
+ (0, pinpoint_1.record)({
231
+ appId: appId,
232
+ region: region,
233
+ category: 'Core',
234
+ credentials: credentials,
235
+ event: {
236
+ name: 'ServiceWorker',
237
+ attributes: {
238
+ state: currentState,
239
+ },
240
+ },
241
+ });
242
+ }
243
+ return [2 /*return*/];
244
+ }
245
+ });
246
+ }); });
192
247
  this.serviceWorker.addEventListener('message', function (event) {
193
248
  _this._logger.debug("ServiceWorker message event: ".concat(event));
194
249
  });
@@ -196,6 +251,3 @@ var ServiceWorkerClass = /** @class */ (function () {
196
251
  return ServiceWorkerClass;
197
252
  }());
198
253
  exports.ServiceWorkerClass = ServiceWorkerClass;
199
- function isAmplifyWithAnalytics(amplify) {
200
- return amplify.Analytics && typeof amplify.Analytics.record === 'function';
201
- }
@@ -1,13 +1 @@
1
- /**
2
- * Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
5
- * the License. A copy of the License is located at
6
- *
7
- * http://aws.amazon.com/apache2.0/
8
- *
9
- * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
10
- * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
11
- * and limitations under the License.
12
- */
13
1
  export { ServiceWorkerClass as ServiceWorker } from './ServiceWorker';
@@ -1,18 +1,6 @@
1
1
  "use strict";
2
2
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
3
  // SPDX-License-Identifier: Apache-2.0
4
- /**
5
- * Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
6
- *
7
- * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
8
- * the License. A copy of the License is located at
9
- *
10
- * http://aws.amazon.com/apache2.0/
11
- *
12
- * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
13
- * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
14
- * and limitations under the License.
15
- */
16
4
  Object.defineProperty(exports, "__esModule", { value: true });
17
5
  exports.ServiceWorker = void 0;
18
6
  var ServiceWorker_1 = require("./ServiceWorker");
@@ -0,0 +1,2 @@
1
+ import { AmplifyErrorCode, AssertionFunction } from '../types';
2
+ export declare const assert: AssertionFunction<AmplifyErrorCode>;
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+ // SPDX-License-Identifier: Apache-2.0
4
+ var _a;
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.assert = void 0;
7
+ var createAssertionFunction_1 = require("./createAssertionFunction");
8
+ var types_1 = require("../types");
9
+ var amplifyErrorMap = (_a = {},
10
+ _a[types_1.AmplifyErrorCode.NoEndpointId] = {
11
+ message: 'Endpoint ID was not found and was unable to be created.',
12
+ },
13
+ _a[types_1.AmplifyErrorCode.PlatformNotSupported] = {
14
+ message: 'Function not supported on current platform.',
15
+ },
16
+ _a[types_1.AmplifyErrorCode.Unknown] = {
17
+ message: 'An unknown error occurred.',
18
+ },
19
+ _a);
20
+ exports.assert = (0, createAssertionFunction_1.createAssertionFunction)(amplifyErrorMap);
@@ -1,3 +1,4 @@
1
1
  export { AmplifyError } from './AmplifyError';
2
2
  export { createAssertionFunction } from './createAssertionFunction';
3
3
  export { PlatformNotSupportedError } from './PlatformNotSupportedError';
4
+ export { assert } from './errorHelpers';
@@ -2,10 +2,12 @@
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.PlatformNotSupportedError = exports.createAssertionFunction = exports.AmplifyError = void 0;
5
+ exports.assert = exports.PlatformNotSupportedError = exports.createAssertionFunction = exports.AmplifyError = void 0;
6
6
  var AmplifyError_1 = require("./AmplifyError");
7
7
  Object.defineProperty(exports, "AmplifyError", { enumerable: true, get: function () { return AmplifyError_1.AmplifyError; } });
8
8
  var createAssertionFunction_1 = require("./createAssertionFunction");
9
9
  Object.defineProperty(exports, "createAssertionFunction", { enumerable: true, get: function () { return createAssertionFunction_1.createAssertionFunction; } });
10
10
  var PlatformNotSupportedError_1 = require("./PlatformNotSupportedError");
11
11
  Object.defineProperty(exports, "PlatformNotSupportedError", { enumerable: true, get: function () { return PlatformNotSupportedError_1.PlatformNotSupportedError; } });
12
+ var errorHelpers_1 = require("./errorHelpers");
13
+ Object.defineProperty(exports, "assert", { enumerable: true, get: function () { return errorHelpers_1.assert; } });
package/lib/index.d.ts CHANGED
@@ -9,3 +9,5 @@ export { CookieStorage, defaultStorage, sessionStorage, sharedInMemoryStorage, }
9
9
  export { KeyValueStorageInterface } from './types';
10
10
  export { Cache } from './Cache';
11
11
  export { I18n } from './I18n';
12
+ export { ConsoleLogger } from './Logger';
13
+ export { ServiceWorker } from './ServiceWorker';
package/lib/index.js CHANGED
@@ -2,7 +2,7 @@
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.I18n = exports.Cache = exports.sharedInMemoryStorage = exports.sessionStorage = exports.defaultStorage = exports.CookieStorage = exports.getId = exports.getCredentialsForIdentity = exports.clearCredentials = exports.AmplifyClassV6 = exports.fetchAuthSession = exports.Amplify = exports.Hub = void 0;
5
+ exports.ServiceWorker = exports.ConsoleLogger = exports.I18n = exports.Cache = exports.sharedInMemoryStorage = exports.sessionStorage = exports.defaultStorage = exports.CookieStorage = exports.getId = exports.getCredentialsForIdentity = exports.clearCredentials = exports.AmplifyClassV6 = exports.fetchAuthSession = exports.Amplify = exports.Hub = void 0;
6
6
  /*
7
7
  This file maps top-level exports from `@aws-amplify/core`. These are intended to be potentially customer-facing exports.
8
8
  */
@@ -30,3 +30,9 @@ Object.defineProperty(exports, "Cache", { enumerable: true, get: function () { r
30
30
  // Internationalization utilities
31
31
  var I18n_1 = require("./I18n");
32
32
  Object.defineProperty(exports, "I18n", { enumerable: true, get: function () { return I18n_1.I18n; } });
33
+ // Logging utilities
34
+ var Logger_1 = require("./Logger");
35
+ Object.defineProperty(exports, "ConsoleLogger", { enumerable: true, get: function () { return Logger_1.ConsoleLogger; } });
36
+ // Service worker
37
+ var ServiceWorker_1 = require("./ServiceWorker");
38
+ Object.defineProperty(exports, "ServiceWorker", { enumerable: true, get: function () { return ServiceWorker_1.ServiceWorker; } });
@@ -7,17 +7,15 @@ export { decodeJWT, assertTokenProviderConfig, assertIdentityPoolIdConfig, asser
7
7
  export { isTokenExpired } from './singleton/Auth';
8
8
  export { GraphQLAuthMode, DocumentType } from './singleton/API/types';
9
9
  export { Signer } from './Signer';
10
- export { JWT, StrictUnion, CognitoIdentityPoolConfig, JwtPayload, AuthStandardAttributeKey, AuthVerifiableAttributeKey, AWSCredentials } from './singleton/Auth/types';
11
- export { ConsoleLogger, ConsoleLogger as Logger } from './Logger';
10
+ export { JWT, StrictUnion, CognitoIdentityPoolConfig, JwtPayload, AuthStandardAttributeKey, AuthVerifiableAttributeKey, AWSCredentials, } from './singleton/Auth/types';
12
11
  export { Platform, getAmplifyUserAgentObject, getAmplifyUserAgent, } from './Platform';
13
- export { ApiAction, AuthAction, AnalyticsAction, Category, CustomUserAgentDetails, DataStoreAction, Framework, GeoAction, InteractionsAction, InAppMessagingAction, PredictionsAction, PubSubAction, PushNotificationAction, StorageAction, SetCustomUserAgentInput, } from './Platform/types';
12
+ export { ApiAction, AuthAction, AnalyticsAction, Category, CustomUserAgentDetails, DataStoreAction, Framework, GeoAction, InteractionsAction, InAppMessagingAction, PredictionsAction, PubSubAction, PushNotificationAction, StorageAction, SetCustomUserAgentInput, StorageUserAgentInput, AuthUserAgentInput, InAppMessagingUserAgentInput, GeoUserAgentInput, } from './Platform/types';
14
13
  export { setCustomUserAgent } from './Platform/customUserAgent';
15
- export { ServiceWorker } from './ServiceWorker';
14
+ export { AmplifyError, PlatformNotSupportedError, createAssertionFunction, } from './errors';
15
+ export { AmplifyErrorCode, AmplifyErrorMap, AmplifyErrorParams, AssertionFunction, ServiceError, } from './types';
16
16
  export { BackgroundProcessManager } from './BackgroundProcessManager';
17
17
  export { Mutex } from './Mutex';
18
18
  export { Reachability } from './Reachability';
19
- export { AmplifyError, PlatformNotSupportedError, createAssertionFunction, } from './errors';
20
- export { AmplifyErrorCode, AmplifyErrorMap, AmplifyErrorParams, AssertionFunction, ServiceError, } from './types';
21
19
  export { INTERNAL_AWS_APPSYNC_REALTIME_PUBSUB_PROVIDER, USER_AGENT_HEADER, } from './constants';
22
20
  export { fetchAuthSession } from './singleton/apis/internal/fetchAuthSession';
23
21
  export { AMPLIFY_SYMBOL } from './Hub';
@@ -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.fetchAuthSession = exports.USER_AGENT_HEADER = exports.INTERNAL_AWS_APPSYNC_REALTIME_PUBSUB_PROVIDER = exports.AmplifyErrorCode = exports.createAssertionFunction = exports.PlatformNotSupportedError = exports.AmplifyError = exports.Reachability = exports.Mutex = exports.BackgroundProcessManager = exports.ServiceWorker = exports.setCustomUserAgent = exports.StorageAction = 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.getAmplifyUserAgent = exports.getAmplifyUserAgentObject = exports.Platform = exports.Logger = exports.ConsoleLogger = exports.Signer = exports.isTokenExpired = exports.assertOAuthConfig = exports.assertIdentityPoolIdConfig = exports.assertTokenProviderConfig = exports.decodeJWT = exports.AmplifyUrlSearchParams = exports.AmplifyUrl = exports.amplifyUuid = exports.parseAWSExports = exports.urlSafeEncode = exports.urlSafeDecode = exports.retry = exports.NonRetryableError = exports.jitteredExponentialRetry = exports.jitteredBackoff = exports.isWebWorker = exports.isNonRetryableError = exports.isBrowser = exports.generateRandomString = void 0;
6
- exports.HubInternal = exports.getCrypto = exports.base64Encoder = exports.base64Decoder = exports.AMPLIFY_SYMBOL = void 0;
5
+ exports.base64Encoder = exports.base64Decoder = exports.AMPLIFY_SYMBOL = exports.fetchAuthSession = exports.USER_AGENT_HEADER = exports.INTERNAL_AWS_APPSYNC_REALTIME_PUBSUB_PROVIDER = exports.Reachability = exports.Mutex = exports.BackgroundProcessManager = exports.AmplifyErrorCode = exports.createAssertionFunction = exports.PlatformNotSupportedError = exports.AmplifyError = exports.setCustomUserAgent = exports.StorageAction = 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.getAmplifyUserAgent = exports.getAmplifyUserAgentObject = exports.Platform = exports.Signer = exports.isTokenExpired = exports.assertOAuthConfig = exports.assertIdentityPoolIdConfig = exports.assertTokenProviderConfig = exports.decodeJWT = exports.AmplifyUrlSearchParams = exports.AmplifyUrl = exports.amplifyUuid = exports.parseAWSExports = exports.urlSafeEncode = exports.urlSafeDecode = exports.retry = exports.NonRetryableError = exports.jitteredExponentialRetry = exports.jitteredBackoff = exports.isWebWorker = exports.isNonRetryableError = exports.isBrowser = exports.generateRandomString = void 0;
6
+ exports.HubInternal = exports.getCrypto = void 0;
7
7
  /*
8
8
  This file maps top-level exports from `@aws-amplify/core/internals/utils`. These are intended to be internal
9
9
  utils for use throughout the library.
@@ -37,10 +37,6 @@ var Auth_1 = require("./singleton/Auth");
37
37
  Object.defineProperty(exports, "isTokenExpired", { enumerable: true, get: function () { return Auth_1.isTokenExpired; } });
38
38
  var Signer_1 = require("./Signer");
39
39
  Object.defineProperty(exports, "Signer", { enumerable: true, get: function () { return Signer_1.Signer; } });
40
- // Logging utilities
41
- var Logger_1 = require("./Logger");
42
- Object.defineProperty(exports, "ConsoleLogger", { enumerable: true, get: function () { return Logger_1.ConsoleLogger; } });
43
- Object.defineProperty(exports, "Logger", { enumerable: true, get: function () { return Logger_1.ConsoleLogger; } });
44
40
  // Platform & user-agent utilities
45
41
  var Platform_1 = require("./Platform");
46
42
  Object.defineProperty(exports, "Platform", { enumerable: true, get: function () { return Platform_1.Platform; } });
@@ -62,9 +58,13 @@ Object.defineProperty(exports, "PushNotificationAction", { enumerable: true, get
62
58
  Object.defineProperty(exports, "StorageAction", { enumerable: true, get: function () { return types_1.StorageAction; } });
63
59
  var customUserAgent_1 = require("./Platform/customUserAgent");
64
60
  Object.defineProperty(exports, "setCustomUserAgent", { enumerable: true, get: function () { return customUserAgent_1.setCustomUserAgent; } });
65
- // Service worker
66
- var ServiceWorker_1 = require("./ServiceWorker");
67
- Object.defineProperty(exports, "ServiceWorker", { enumerable: true, get: function () { return ServiceWorker_1.ServiceWorker; } });
61
+ // Error handling
62
+ var errors_1 = require("./errors");
63
+ Object.defineProperty(exports, "AmplifyError", { enumerable: true, get: function () { return errors_1.AmplifyError; } });
64
+ Object.defineProperty(exports, "PlatformNotSupportedError", { enumerable: true, get: function () { return errors_1.PlatformNotSupportedError; } });
65
+ Object.defineProperty(exports, "createAssertionFunction", { enumerable: true, get: function () { return errors_1.createAssertionFunction; } });
66
+ var types_2 = require("./types");
67
+ Object.defineProperty(exports, "AmplifyErrorCode", { enumerable: true, get: function () { return types_2.AmplifyErrorCode; } });
68
68
  // Other utilities & constants
69
69
  var BackgroundProcessManager_1 = require("./BackgroundProcessManager");
70
70
  Object.defineProperty(exports, "BackgroundProcessManager", { enumerable: true, get: function () { return BackgroundProcessManager_1.BackgroundProcessManager; } });
@@ -72,12 +72,6 @@ var Mutex_1 = require("./Mutex");
72
72
  Object.defineProperty(exports, "Mutex", { enumerable: true, get: function () { return Mutex_1.Mutex; } });
73
73
  var Reachability_1 = require("./Reachability");
74
74
  Object.defineProperty(exports, "Reachability", { enumerable: true, get: function () { return Reachability_1.Reachability; } });
75
- var errors_1 = require("./errors");
76
- Object.defineProperty(exports, "AmplifyError", { enumerable: true, get: function () { return errors_1.AmplifyError; } });
77
- Object.defineProperty(exports, "PlatformNotSupportedError", { enumerable: true, get: function () { return errors_1.PlatformNotSupportedError; } });
78
- Object.defineProperty(exports, "createAssertionFunction", { enumerable: true, get: function () { return errors_1.createAssertionFunction; } });
79
- var types_2 = require("./types");
80
- Object.defineProperty(exports, "AmplifyErrorCode", { enumerable: true, get: function () { return types_2.AmplifyErrorCode; } });
81
75
  var constants_1 = require("./constants");
82
76
  Object.defineProperty(exports, "INTERNAL_AWS_APPSYNC_REALTIME_PUBSUB_PROVIDER", { enumerable: true, get: function () { return constants_1.INTERNAL_AWS_APPSYNC_REALTIME_PUBSUB_PROVIDER; } });
83
77
  Object.defineProperty(exports, "USER_AGENT_HEADER", { enumerable: true, get: function () { return constants_1.USER_AGENT_HEADER; } });
@@ -58,7 +58,7 @@ var authTypeMapping = {
58
58
  * @returns A {@link ResourcesConfig} object.
59
59
  */
60
60
  var parseAWSExports = function (config) {
61
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
61
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
62
62
  if (config === void 0) { config = {}; }
63
63
  var aws_appsync_apiKey = config.aws_appsync_apiKey, aws_appsync_authenticationType = config.aws_appsync_authenticationType, aws_appsync_graphqlEndpoint = config.aws_appsync_graphqlEndpoint, aws_appsync_region = config.aws_appsync_region, aws_cognito_identity_pool_id = config.aws_cognito_identity_pool_id, aws_cognito_sign_up_verification_method = config.aws_cognito_sign_up_verification_method, aws_cognito_mfa_configuration = config.aws_cognito_mfa_configuration, aws_cognito_mfa_types = config.aws_cognito_mfa_types, aws_cognito_password_protection_settings = config.aws_cognito_password_protection_settings, aws_cognito_verification_mechanisms = config.aws_cognito_verification_mechanisms, aws_cognito_signup_attributes = config.aws_cognito_signup_attributes, aws_cognito_username_attributes = config.aws_cognito_username_attributes, aws_mandatory_sign_in = config.aws_mandatory_sign_in, aws_mobile_analytics_app_id = config.aws_mobile_analytics_app_id, aws_mobile_analytics_app_region = config.aws_mobile_analytics_app_region, aws_user_files_s3_bucket = config.aws_user_files_s3_bucket, aws_user_files_s3_bucket_region = config.aws_user_files_s3_bucket_region, aws_user_files_s3_dangerously_connect_to_http_endpoint_for_testing = config.aws_user_files_s3_dangerously_connect_to_http_endpoint_for_testing, aws_user_pools_id = config.aws_user_pools_id, aws_user_pools_web_client_id = config.aws_user_pools_web_client_id, geo = config.geo, oauth = config.oauth, aws_cloud_logic_custom = config.aws_cloud_logic_custom, Notifications = config.Notifications;
64
64
  var amplifyConfig = {};
@@ -72,15 +72,24 @@ var parseAWSExports = function (config) {
72
72
  };
73
73
  }
74
74
  // Notifications
75
- if (Notifications) {
76
- if ((_a = Notifications.InAppMessaging) === null || _a === void 0 ? void 0 : _a.AWSPinpoint) {
77
- var _p = Notifications.InAppMessaging.AWSPinpoint, appId = _p.appId, region = _p.region;
78
- amplifyConfig.Notifications = {
79
- InAppMessaging: {
80
- Pinpoint: {
81
- appId: appId,
82
- region: region,
83
- },
75
+ var _o = Notifications !== null && Notifications !== void 0 ? Notifications : {}, InAppMessaging = _o.InAppMessaging, Push = _o.Push;
76
+ if ((InAppMessaging === null || InAppMessaging === void 0 ? void 0 : InAppMessaging.AWSPinpoint) || (Push === null || Push === void 0 ? void 0 : Push.AWSPinpoint)) {
77
+ amplifyConfig.Notifications = {};
78
+ if (InAppMessaging === null || InAppMessaging === void 0 ? void 0 : InAppMessaging.AWSPinpoint) {
79
+ var _p = InAppMessaging.AWSPinpoint, appId = _p.appId, region = _p.region;
80
+ amplifyConfig.Notifications.InAppMessaging = {
81
+ Pinpoint: {
82
+ appId: appId,
83
+ region: region,
84
+ },
85
+ };
86
+ }
87
+ if (Push === null || Push === void 0 ? void 0 : Push.AWSPinpoint) {
88
+ var _q = Push.AWSPinpoint, appId = _q.appId, region = _q.region;
89
+ amplifyConfig.Notifications.PushNotification = {
90
+ Pinpoint: {
91
+ appId: appId,
92
+ region: region,
84
93
  },
85
94
  };
86
95
  }
@@ -105,17 +114,17 @@ var parseAWSExports = function (config) {
105
114
  ? {
106
115
  status: aws_cognito_mfa_configuration &&
107
116
  aws_cognito_mfa_configuration.toLowerCase(),
108
- totpEnabled: (_b = aws_cognito_mfa_types === null || aws_cognito_mfa_types === void 0 ? void 0 : aws_cognito_mfa_types.includes('TOTP')) !== null && _b !== void 0 ? _b : false,
109
- smsEnabled: (_c = aws_cognito_mfa_types === null || aws_cognito_mfa_types === void 0 ? void 0 : aws_cognito_mfa_types.includes('SMS')) !== null && _c !== void 0 ? _c : false,
117
+ totpEnabled: (_a = aws_cognito_mfa_types === null || aws_cognito_mfa_types === void 0 ? void 0 : aws_cognito_mfa_types.includes('TOTP')) !== null && _a !== void 0 ? _a : false,
118
+ smsEnabled: (_b = aws_cognito_mfa_types === null || aws_cognito_mfa_types === void 0 ? void 0 : aws_cognito_mfa_types.includes('SMS')) !== null && _b !== void 0 ? _b : false,
110
119
  }
111
120
  : undefined;
112
121
  var passwordFormatConfig = aws_cognito_password_protection_settings
113
122
  ? {
114
123
  minLength: aws_cognito_password_protection_settings.passwordPolicyMinLength,
115
- requireLowercase: (_e = (_d = aws_cognito_password_protection_settings.passwordPolicyCharacters) === null || _d === void 0 ? void 0 : _d.includes('REQUIRES_LOWERCASE')) !== null && _e !== void 0 ? _e : false,
116
- requireUppercase: (_g = (_f = aws_cognito_password_protection_settings.passwordPolicyCharacters) === null || _f === void 0 ? void 0 : _f.includes('REQUIRES_UPPERCASE')) !== null && _g !== void 0 ? _g : false,
117
- requireNumbers: (_j = (_h = aws_cognito_password_protection_settings.passwordPolicyCharacters) === null || _h === void 0 ? void 0 : _h.includes('REQUIRES_NUMBERS')) !== null && _j !== void 0 ? _j : false,
118
- requireSpecialCharacters: (_l = (_k = aws_cognito_password_protection_settings.passwordPolicyCharacters) === null || _k === void 0 ? void 0 : _k.includes('REQUIRES_SYMBOLS')) !== null && _l !== void 0 ? _l : false,
124
+ requireLowercase: (_d = (_c = aws_cognito_password_protection_settings.passwordPolicyCharacters) === null || _c === void 0 ? void 0 : _c.includes('REQUIRES_LOWERCASE')) !== null && _d !== void 0 ? _d : false,
125
+ requireUppercase: (_f = (_e = aws_cognito_password_protection_settings.passwordPolicyCharacters) === null || _e === void 0 ? void 0 : _e.includes('REQUIRES_UPPERCASE')) !== null && _f !== void 0 ? _f : false,
126
+ requireNumbers: (_h = (_g = aws_cognito_password_protection_settings.passwordPolicyCharacters) === null || _g === void 0 ? void 0 : _g.includes('REQUIRES_NUMBERS')) !== null && _h !== void 0 ? _h : false,
127
+ requireSpecialCharacters: (_k = (_j = aws_cognito_password_protection_settings.passwordPolicyCharacters) === null || _j === void 0 ? void 0 : _j.includes('REQUIRES_SYMBOLS')) !== null && _k !== void 0 ? _k : false,
119
128
  }
120
129
  : undefined;
121
130
  var mergedUserAttributes = Array.from(new Set(__spreadArray(__spreadArray([], __read((aws_cognito_verification_mechanisms !== null && aws_cognito_verification_mechanisms !== void 0 ? aws_cognito_verification_mechanisms : [])), false), __read((aws_cognito_signup_attributes !== null && aws_cognito_signup_attributes !== void 0 ? aws_cognito_signup_attributes : [])), false)));
@@ -127,8 +136,8 @@ var parseAWSExports = function (config) {
127
136
  },
128
137
  _a);
129
138
  });
130
- var loginWithEmailEnabled = (_m = aws_cognito_username_attributes === null || aws_cognito_username_attributes === void 0 ? void 0 : aws_cognito_username_attributes.includes('EMAIL')) !== null && _m !== void 0 ? _m : false;
131
- var loginWithPhoneEnabled = (_o = aws_cognito_username_attributes === null || aws_cognito_username_attributes === void 0 ? void 0 : aws_cognito_username_attributes.includes('PHONE_NUMBER')) !== null && _o !== void 0 ? _o : false;
139
+ var loginWithEmailEnabled = (_l = aws_cognito_username_attributes === null || aws_cognito_username_attributes === void 0 ? void 0 : aws_cognito_username_attributes.includes('EMAIL')) !== null && _l !== void 0 ? _l : false;
140
+ var loginWithPhoneEnabled = (_m = aws_cognito_username_attributes === null || aws_cognito_username_attributes === void 0 ? void 0 : aws_cognito_username_attributes.includes('PHONE_NUMBER')) !== null && _m !== void 0 ? _m : false;
132
141
  if (aws_cognito_identity_pool_id || aws_user_pools_id) {
133
142
  amplifyConfig.Auth = {
134
143
  Cognito: {
@@ -2,4 +2,4 @@ import { PinpointRecordInput } from '../types';
2
2
  /**
3
3
  * @internal
4
4
  */
5
- export declare const record: ({ appId, category, credentials, event, identityId, region, userAgentValue, }: PinpointRecordInput) => Promise<void>;
5
+ export declare const record: ({ appId, category, channelType, credentials, event, identityId, region, userAgentValue, }: PinpointRecordInput) => Promise<void>;
@@ -42,26 +42,21 @@ exports.record = void 0;
42
42
  var amplifyUuid_1 = require("../../../utils/amplifyUuid");
43
43
  var utils_1 = require("../utils");
44
44
  var constants_1 = require("../utils/constants");
45
- var updateEndpoint_1 = require("./updateEndpoint");
46
45
  var getEventBuffer_1 = require("../utils/getEventBuffer");
47
- var errors_1 = require("../../../errors");
48
46
  // TODO(v6) Refactor when we add support for session tracking & `autoTrack`
49
47
  var session;
50
48
  /**
51
49
  * @internal
52
50
  */
53
51
  var record = function (_a) {
54
- var appId = _a.appId, category = _a.category, credentials = _a.credentials, event = _a.event, identityId = _a.identityId, region = _a.region, userAgentValue = _a.userAgentValue;
52
+ var appId = _a.appId, category = _a.category, channelType = _a.channelType, credentials = _a.credentials, event = _a.event, identityId = _a.identityId, region = _a.region, userAgentValue = _a.userAgentValue;
55
53
  return __awaiter(void 0, void 0, void 0, function () {
56
- var timestampISOString, eventId, endpointId, buffer, sessionId;
54
+ var timestampISOString, eventId, buffer, endpointId, sessionId;
57
55
  return __generator(this, function (_b) {
58
56
  switch (_b.label) {
59
57
  case 0:
60
58
  timestampISOString = new Date().toISOString();
61
59
  eventId = (0, amplifyUuid_1.amplifyUuid)();
62
- return [4 /*yield*/, (0, utils_1.getEndpointId)(appId, category)];
63
- case 1:
64
- endpointId = _b.sent();
65
60
  buffer = (0, getEventBuffer_1.getEventBuffer)({
66
61
  appId: appId,
67
62
  bufferSize: constants_1.BUFFER_SIZE,
@@ -73,28 +68,17 @@ var record = function (_a) {
73
68
  resendLimit: constants_1.RESEND_LIMIT,
74
69
  userAgentValue: userAgentValue,
75
70
  });
76
- if (!!endpointId) return [3 /*break*/, 4];
77
- return [4 /*yield*/, (0, updateEndpoint_1.updateEndpoint)({
71
+ return [4 /*yield*/, (0, utils_1.resolveEndpointId)({
78
72
  appId: appId,
79
73
  category: category,
74
+ channelType: channelType,
80
75
  credentials: credentials,
81
76
  identityId: identityId,
82
77
  region: region,
83
78
  userAgentValue: userAgentValue,
84
79
  })];
85
- case 2:
86
- _b.sent();
87
- return [4 /*yield*/, (0, utils_1.getEndpointId)(appId, category)];
88
- case 3:
80
+ case 1:
89
81
  endpointId = _b.sent();
90
- _b.label = 4;
91
- case 4:
92
- if (!endpointId) {
93
- throw new errors_1.AmplifyError({
94
- name: 'ENDPOINT_NOT_CREATED',
95
- message: 'Endpoint was not created.',
96
- });
97
- }
98
82
  // Generate session if required
99
83
  if (!session) {
100
84
  sessionId = (0, amplifyUuid_1.amplifyUuid)();
@@ -1,3 +1,3 @@
1
1
  export * from './apis';
2
- export { PinpointAnalyticsEvent, PinpointServiceOptions } from './types';
3
- export { getEndpointId } from './utils';
2
+ export { PinpointAnalyticsEvent, PinpointServiceOptions, UpdateEndpointException, } from './types';
3
+ export { resolveEndpointId } from './utils';
@@ -16,7 +16,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
17
17
  };
18
18
  Object.defineProperty(exports, "__esModule", { value: true });
19
- exports.getEndpointId = void 0;
19
+ exports.resolveEndpointId = exports.UpdateEndpointException = void 0;
20
20
  __exportStar(require("./apis"), exports);
21
+ var types_1 = require("./types");
22
+ Object.defineProperty(exports, "UpdateEndpointException", { enumerable: true, get: function () { return types_1.UpdateEndpointException; } });
21
23
  var utils_1 = require("./utils");
22
- Object.defineProperty(exports, "getEndpointId", { enumerable: true, get: function () { return utils_1.getEndpointId; } });
24
+ Object.defineProperty(exports, "resolveEndpointId", { enumerable: true, get: function () { return utils_1.resolveEndpointId; } });
@@ -0,0 +1,9 @@
1
+ export declare enum UpdateEndpointException {
2
+ BadRequestException = "BadRequestException",
3
+ ForbiddenException = "ForbiddenException",
4
+ InternalServerErrorException = "InternalServerErrorException",
5
+ MethodNotAllowedException = "MethodNotAllowedException",
6
+ NotFoundException = "NotFoundException",
7
+ PayloadTooLargeException = "PayloadTooLargeException",
8
+ TooManyRequestsException = "TooManyRequestsException"
9
+ }
@@ -0,0 +1,15 @@
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.UpdateEndpointException = void 0;
6
+ var UpdateEndpointException;
7
+ (function (UpdateEndpointException) {
8
+ UpdateEndpointException["BadRequestException"] = "BadRequestException";
9
+ UpdateEndpointException["ForbiddenException"] = "ForbiddenException";
10
+ UpdateEndpointException["InternalServerErrorException"] = "InternalServerErrorException";
11
+ UpdateEndpointException["MethodNotAllowedException"] = "MethodNotAllowedException";
12
+ UpdateEndpointException["NotFoundException"] = "NotFoundException";
13
+ UpdateEndpointException["PayloadTooLargeException"] = "PayloadTooLargeException";
14
+ UpdateEndpointException["TooManyRequestsException"] = "TooManyRequestsException";
15
+ })(UpdateEndpointException = exports.UpdateEndpointException || (exports.UpdateEndpointException = {}));
@@ -1 +1,2 @@
1
+ export { UpdateEndpointException } from './errors';
1
2
  export * from './pinpoint';
@@ -16,4 +16,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
17
17
  };
18
18
  Object.defineProperty(exports, "__esModule", { value: true });
19
+ exports.UpdateEndpointException = void 0;
20
+ var errors_1 = require("./errors");
21
+ Object.defineProperty(exports, "UpdateEndpointException", { enumerable: true, get: function () { return errors_1.UpdateEndpointException; } });
19
22
  __exportStar(require("./pinpoint"), exports);