@aws-amplify/geo 2.3.4-user-agent-backup.c6dfb36.0 → 2.3.4

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 (40) hide show
  1. package/lib/Geo.d.ts +41 -3
  2. package/lib/Geo.js +230 -20
  3. package/lib/Geo.js.map +1 -1
  4. package/lib/Providers/AmazonLocationServiceProvider.d.ts +8 -15
  5. package/lib/Providers/AmazonLocationServiceProvider.js +20 -26
  6. package/lib/Providers/AmazonLocationServiceProvider.js.map +1 -1
  7. package/lib/types/Provider.d.ts +8 -9
  8. package/lib-esm/Geo.d.ts +41 -3
  9. package/lib-esm/Geo.js +232 -22
  10. package/lib-esm/Geo.js.map +1 -1
  11. package/lib-esm/Providers/AmazonLocationServiceProvider.d.ts +8 -15
  12. package/lib-esm/Providers/AmazonLocationServiceProvider.js +20 -26
  13. package/lib-esm/Providers/AmazonLocationServiceProvider.js.map +1 -1
  14. package/lib-esm/types/Provider.d.ts +8 -9
  15. package/package.json +5 -6
  16. package/src/Geo.ts +203 -11
  17. package/src/Providers/AmazonLocationServiceProvider.ts +20 -39
  18. package/src/types/Provider.ts +8 -22
  19. package/internals/package.json +0 -8
  20. package/lib/internals/InternalGeo.d.ts +0 -119
  21. package/lib/internals/InternalGeo.js +0 -354
  22. package/lib/internals/InternalGeo.js.map +0 -1
  23. package/lib/internals/index.d.ts +0 -1
  24. package/lib/internals/index.js +0 -7
  25. package/lib/internals/index.js.map +0 -1
  26. package/lib/internals/utils.d.ts +0 -2
  27. package/lib/internals/utils.js +0 -10
  28. package/lib/internals/utils.js.map +0 -1
  29. package/lib-esm/internals/InternalGeo.d.ts +0 -119
  30. package/lib-esm/internals/InternalGeo.js +0 -352
  31. package/lib-esm/internals/InternalGeo.js.map +0 -1
  32. package/lib-esm/internals/index.d.ts +0 -1
  33. package/lib-esm/internals/index.js +0 -4
  34. package/lib-esm/internals/index.js.map +0 -1
  35. package/lib-esm/internals/utils.d.ts +0 -2
  36. package/lib-esm/internals/utils.js +0 -8
  37. package/lib-esm/internals/utils.js.map +0 -1
  38. package/src/internals/InternalGeo.ts +0 -393
  39. package/src/internals/index.ts +0 -3
  40. package/src/internals/utils.ts +0 -15
@@ -1,119 +0,0 @@
1
- import { CustomUserAgentDetails } from '@aws-amplify/core';
2
- import { Place, GeoConfig, Coordinates, SearchByTextOptions, SearchByCoordinatesOptions, GeoProvider, MapStyle, GeofenceId, GeofenceInput, GeofenceOptions, SaveGeofencesResults, Geofence, ListGeofenceOptions, ListGeofenceResults, DeleteGeofencesResults, searchByPlaceIdOptions } from '../types';
3
- export declare class InternalGeoClass {
4
- static MODULE: string;
5
- /**
6
- * @private
7
- */
8
- private _config;
9
- private _pluggables;
10
- constructor();
11
- /**
12
- * get the name of the module category
13
- * @returns {string} name of the module category
14
- */
15
- getModuleName(): string;
16
- /**
17
- * add plugin into Geo category
18
- * @param {Object} pluggable - an instance of the plugin
19
- */
20
- addPluggable(pluggable: GeoProvider): object;
21
- /**
22
- * Get the plugin object
23
- * @param providerName - the name of the plugin
24
- */
25
- getPluggable(providerName: string): GeoProvider;
26
- /**
27
- * Remove the plugin object
28
- * @param providerName - the name of the plugin
29
- */
30
- removePluggable(providerName: string): void;
31
- /**
32
- * Configure Geo
33
- * @param {Object} config - Configuration object for Geo
34
- * @return {Object} - Current configuration
35
- */
36
- configure(config?: any): GeoConfig;
37
- /**
38
- * Get the map resources that are currently available through the provider
39
- * @param {string} provider
40
- * @returns - Array of available map resources
41
- */
42
- getAvailableMaps(provider?: string): MapStyle[];
43
- /**
44
- * Get the map resource set as default in amplify config
45
- * @param {string} provider
46
- * @returns - Map resource set as the default in amplify config
47
- */
48
- getDefaultMap(provider?: string): MapStyle;
49
- /**
50
- * Search by text input with optional parameters
51
- * @param {string} text - The text string that is to be searched for
52
- * @param {SearchByTextOptions} options? - Optional parameters to the search
53
- * @param {CustomUserAgentDetails} customUserAgentDetails - Optional parameter to send user agent details
54
- * @returns {Promise<Place[]>} - Promise resolves to a list of Places that match search parameters
55
- */
56
- searchByText(text: string, options?: SearchByTextOptions, customUserAgentDetails?: CustomUserAgentDetails): Promise<Place[]>;
57
- /**
58
- * Search for search term suggestions based on input text
59
- * @param {string} text - The text string that is to be search for
60
- * @param {SearchByTextOptions} options? - Optional parameters to the search
61
- * @param {CustomUserAgentDetails} customUserAgentDetails - Optional parameter to send user agent details
62
- * @returns {Promise<SearchForSuggestionsResults>} - Resolves to an array of search suggestion strings
63
- */
64
- searchForSuggestions(text: string, options?: SearchByTextOptions, customUserAgentDetails?: CustomUserAgentDetails): Promise<import("../types").SearchForSuggestionsResults>;
65
- /**
66
- * Search for location by unique ID
67
- * @param {string} placeId - Unique ID of the location that is to be searched for
68
- * @param {searchByPlaceIdOptions} options? - Optional parameters to the search
69
- * @param {CustomUserAgentDetails} customUserAgentDetails - Optional parameter to send user agent details
70
- * @returns {Promise<Place>} - Resolves to a place with the given placeId
71
- */
72
- searchByPlaceId(placeId: string, options?: searchByPlaceIdOptions, customUserAgentDetails?: CustomUserAgentDetails): Promise<Place>;
73
- /**
74
- * Reverse geocoding search via a coordinate point on the map
75
- * @param coordinates - Coordinates array for the search input
76
- * @param options - Options parameters for the search
77
- * @param {CustomUserAgentDetails} customUserAgentDetails - Optional parameter to send user agent details
78
- * @returns {Promise<Place>} - Promise that resolves to a place matching search coordinates
79
- */
80
- searchByCoordinates(coordinates: Coordinates, options?: SearchByCoordinatesOptions, customUserAgentDetails?: CustomUserAgentDetails): Promise<Place>;
81
- /**
82
- * Create geofences
83
- * @param geofences - Single or array of geofence objects to create
84
- * @param options? - Optional parameters for creating geofences
85
- * @param {CustomUserAgentDetails} customUserAgentDetails - Optional parameter to send user agent details
86
- * @returns {Promise<SaveGeofencesResults>} - Promise that resolves to an object with:
87
- * successes: list of geofences successfully created
88
- * errors: list of geofences that failed to create
89
- */
90
- saveGeofences(geofences: GeofenceInput | GeofenceInput[], options?: GeofenceOptions, customUserAgentDetails?: CustomUserAgentDetails): Promise<SaveGeofencesResults>;
91
- /**
92
- * Get a single geofence by geofenceId
93
- * @param geofenceId: GeofenceId - The string id of the geofence to get
94
- * @param options?: GeofenceOptions - Optional parameters for getting a geofence
95
- * @param {CustomUserAgentDetails} customUserAgentDetails - Optional parameter to send user agent details
96
- * @returns Promise<Geofence> - Promise that resolves to a geofence object
97
- */
98
- getGeofence(geofenceId: GeofenceId, options?: GeofenceOptions, customUserAgentDetails?: CustomUserAgentDetails): Promise<Geofence>;
99
- /**
100
- * List geofences
101
- * @param options?: ListGeofenceOptions
102
- * @param {CustomUserAgentDetails} customUserAgentDetails - Optional parameter to send user agent details
103
- * @returns {Promise<ListGeofencesResults>} - Promise that resolves to an object with:
104
- * entries: list of geofences - 100 geofences are listed per page
105
- * nextToken: token for next page of geofences
106
- */
107
- listGeofences(options?: ListGeofenceOptions, customUserAgentDetails?: CustomUserAgentDetails): Promise<ListGeofenceResults>;
108
- /**
109
- * Delete geofences
110
- * @param geofenceIds: string|string[]
111
- * @param options?: GeofenceOptions
112
- * @param {CustomUserAgentDetails} customUserAgentDetails - Optional parameter to send user agent details
113
- * @returns {Promise<DeleteGeofencesResults>} - Promise that resolves to an object with:
114
- * successes: list of geofences successfully deleted
115
- * errors: list of geofences that failed to delete
116
- */
117
- deleteGeofences(geofenceIds: string | string[], options?: GeofenceOptions, customUserAgentDetails?: CustomUserAgentDetails): Promise<DeleteGeofencesResults>;
118
- }
119
- export declare const InternalGeo: InternalGeoClass;
@@ -1,352 +0,0 @@
1
- import { __awaiter, __generator, __read } from "tslib";
2
- // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
- // SPDX-License-Identifier: Apache-2.0
4
- import { Amplify, GeoAction, ConsoleLogger as Logger, parseAWSExports, } from '@aws-amplify/core';
5
- import { AmazonLocationServiceProvider } from '../Providers/AmazonLocationServiceProvider';
6
- import { validateCoordinates } from '../util';
7
- import { getGeoUserAgentDetails } from './utils';
8
- var logger = new Logger('Geo');
9
- var DEFAULT_PROVIDER = 'AmazonLocationService';
10
- var InternalGeoClass = /** @class */ (function () {
11
- function InternalGeoClass() {
12
- this._config = {};
13
- this._pluggables = [];
14
- logger.debug('Geo Options', this._config);
15
- }
16
- /**
17
- * get the name of the module category
18
- * @returns {string} name of the module category
19
- */
20
- InternalGeoClass.prototype.getModuleName = function () {
21
- return InternalGeoClass.MODULE;
22
- };
23
- /**
24
- * add plugin into Geo category
25
- * @param {Object} pluggable - an instance of the plugin
26
- */
27
- InternalGeoClass.prototype.addPluggable = function (pluggable) {
28
- if (pluggable && pluggable.getCategory() === 'Geo') {
29
- this._pluggables.push(pluggable);
30
- var config = pluggable.configure(this._config[pluggable.getProviderName()]);
31
- return config;
32
- }
33
- };
34
- /**
35
- * Get the plugin object
36
- * @param providerName - the name of the plugin
37
- */
38
- InternalGeoClass.prototype.getPluggable = function (providerName) {
39
- var pluggable = this._pluggables.find(function (pluggable) { return pluggable.getProviderName() === providerName; });
40
- if (pluggable === undefined) {
41
- logger.debug('No plugin found with providerName', providerName);
42
- throw new Error('No plugin found in Geo for the provider');
43
- }
44
- else
45
- return pluggable;
46
- };
47
- /**
48
- * Remove the plugin object
49
- * @param providerName - the name of the plugin
50
- */
51
- InternalGeoClass.prototype.removePluggable = function (providerName) {
52
- this._pluggables = this._pluggables.filter(function (pluggable) { return pluggable.getProviderName() !== providerName; });
53
- return;
54
- };
55
- /**
56
- * Configure Geo
57
- * @param {Object} config - Configuration object for Geo
58
- * @return {Object} - Current configuration
59
- */
60
- InternalGeoClass.prototype.configure = function (config) {
61
- var _this = this;
62
- logger.debug('configure Geo');
63
- if (!config)
64
- return this._config;
65
- var amplifyConfig = parseAWSExports(config);
66
- this._config = Object.assign({}, this._config, amplifyConfig.Geo, config);
67
- this._pluggables.forEach(function (pluggable) {
68
- pluggable.configure(_this._config[pluggable.getProviderName()]);
69
- });
70
- if (this._pluggables.length === 0) {
71
- this.addPluggable(new AmazonLocationServiceProvider());
72
- }
73
- return this._config;
74
- };
75
- /**
76
- * Get the map resources that are currently available through the provider
77
- * @param {string} provider
78
- * @returns - Array of available map resources
79
- */
80
- InternalGeoClass.prototype.getAvailableMaps = function (provider) {
81
- if (provider === void 0) { provider = DEFAULT_PROVIDER; }
82
- var prov = this.getPluggable(provider);
83
- return prov.getAvailableMaps();
84
- };
85
- /**
86
- * Get the map resource set as default in amplify config
87
- * @param {string} provider
88
- * @returns - Map resource set as the default in amplify config
89
- */
90
- InternalGeoClass.prototype.getDefaultMap = function (provider) {
91
- if (provider === void 0) { provider = DEFAULT_PROVIDER; }
92
- var prov = this.getPluggable(provider);
93
- return prov.getDefaultMap();
94
- };
95
- /**
96
- * Search by text input with optional parameters
97
- * @param {string} text - The text string that is to be searched for
98
- * @param {SearchByTextOptions} options? - Optional parameters to the search
99
- * @param {CustomUserAgentDetails} customUserAgentDetails - Optional parameter to send user agent details
100
- * @returns {Promise<Place[]>} - Promise resolves to a list of Places that match search parameters
101
- */
102
- InternalGeoClass.prototype.searchByText = function (text, options, customUserAgentDetails) {
103
- return __awaiter(this, void 0, void 0, function () {
104
- var _a, providerName, prov, error_1;
105
- return __generator(this, function (_b) {
106
- switch (_b.label) {
107
- case 0:
108
- _a = (options || {}).providerName, providerName = _a === void 0 ? DEFAULT_PROVIDER : _a;
109
- prov = this.getPluggable(providerName);
110
- _b.label = 1;
111
- case 1:
112
- _b.trys.push([1, 3, , 4]);
113
- return [4 /*yield*/, prov.searchByText(text, options, getGeoUserAgentDetails(GeoAction.SearchByText, customUserAgentDetails))];
114
- case 2: return [2 /*return*/, _b.sent()];
115
- case 3:
116
- error_1 = _b.sent();
117
- logger.debug(error_1);
118
- throw error_1;
119
- case 4: return [2 /*return*/];
120
- }
121
- });
122
- });
123
- };
124
- /**
125
- * Search for search term suggestions based on input text
126
- * @param {string} text - The text string that is to be search for
127
- * @param {SearchByTextOptions} options? - Optional parameters to the search
128
- * @param {CustomUserAgentDetails} customUserAgentDetails - Optional parameter to send user agent details
129
- * @returns {Promise<SearchForSuggestionsResults>} - Resolves to an array of search suggestion strings
130
- */
131
- InternalGeoClass.prototype.searchForSuggestions = function (text, options, customUserAgentDetails) {
132
- return __awaiter(this, void 0, void 0, function () {
133
- var _a, providerName, prov, error_2;
134
- return __generator(this, function (_b) {
135
- switch (_b.label) {
136
- case 0:
137
- _a = (options || {}).providerName, providerName = _a === void 0 ? DEFAULT_PROVIDER : _a;
138
- prov = this.getPluggable(providerName);
139
- _b.label = 1;
140
- case 1:
141
- _b.trys.push([1, 3, , 4]);
142
- return [4 /*yield*/, prov.searchForSuggestions(text, options, getGeoUserAgentDetails(GeoAction.SearchForSuggestions, customUserAgentDetails))];
143
- case 2: return [2 /*return*/, _b.sent()];
144
- case 3:
145
- error_2 = _b.sent();
146
- logger.debug(error_2);
147
- throw error_2;
148
- case 4: return [2 /*return*/];
149
- }
150
- });
151
- });
152
- };
153
- /**
154
- * Search for location by unique ID
155
- * @param {string} placeId - Unique ID of the location that is to be searched for
156
- * @param {searchByPlaceIdOptions} options? - Optional parameters to the search
157
- * @param {CustomUserAgentDetails} customUserAgentDetails - Optional parameter to send user agent details
158
- * @returns {Promise<Place>} - Resolves to a place with the given placeId
159
- */
160
- InternalGeoClass.prototype.searchByPlaceId = function (placeId, options, customUserAgentDetails) {
161
- return __awaiter(this, void 0, void 0, function () {
162
- var providerName, prov, error_3;
163
- return __generator(this, function (_a) {
164
- switch (_a.label) {
165
- case 0:
166
- providerName = DEFAULT_PROVIDER;
167
- prov = this.getPluggable(providerName);
168
- _a.label = 1;
169
- case 1:
170
- _a.trys.push([1, 3, , 4]);
171
- return [4 /*yield*/, prov.searchByPlaceId(placeId, options, getGeoUserAgentDetails(GeoAction.SearchByPlaceId, customUserAgentDetails))];
172
- case 2: return [2 /*return*/, _a.sent()];
173
- case 3:
174
- error_3 = _a.sent();
175
- logger.debug(error_3);
176
- throw error_3;
177
- case 4: return [2 /*return*/];
178
- }
179
- });
180
- });
181
- };
182
- /**
183
- * Reverse geocoding search via a coordinate point on the map
184
- * @param coordinates - Coordinates array for the search input
185
- * @param options - Options parameters for the search
186
- * @param {CustomUserAgentDetails} customUserAgentDetails - Optional parameter to send user agent details
187
- * @returns {Promise<Place>} - Promise that resolves to a place matching search coordinates
188
- */
189
- InternalGeoClass.prototype.searchByCoordinates = function (coordinates, options, customUserAgentDetails) {
190
- return __awaiter(this, void 0, void 0, function () {
191
- var _a, providerName, prov, _b, lng, lat, error_4;
192
- return __generator(this, function (_c) {
193
- switch (_c.label) {
194
- case 0:
195
- _a = (options || {}).providerName, providerName = _a === void 0 ? DEFAULT_PROVIDER : _a;
196
- prov = this.getPluggable(providerName);
197
- _b = __read(coordinates, 2), lng = _b[0], lat = _b[1];
198
- _c.label = 1;
199
- case 1:
200
- _c.trys.push([1, 3, , 4]);
201
- validateCoordinates(lng, lat);
202
- return [4 /*yield*/, prov.searchByCoordinates(coordinates, options, getGeoUserAgentDetails(GeoAction.SearchByCoordinates))];
203
- case 2: return [2 /*return*/, _c.sent()];
204
- case 3:
205
- error_4 = _c.sent();
206
- logger.debug(error_4);
207
- throw error_4;
208
- case 4: return [2 /*return*/];
209
- }
210
- });
211
- });
212
- };
213
- /**
214
- * Create geofences
215
- * @param geofences - Single or array of geofence objects to create
216
- * @param options? - Optional parameters for creating geofences
217
- * @param {CustomUserAgentDetails} customUserAgentDetails - Optional parameter to send user agent details
218
- * @returns {Promise<SaveGeofencesResults>} - Promise that resolves to an object with:
219
- * successes: list of geofences successfully created
220
- * errors: list of geofences that failed to create
221
- */
222
- InternalGeoClass.prototype.saveGeofences = function (geofences, options, customUserAgentDetails) {
223
- return __awaiter(this, void 0, void 0, function () {
224
- var _a, providerName, prov, geofenceInputArray, error_5;
225
- return __generator(this, function (_b) {
226
- switch (_b.label) {
227
- case 0:
228
- _a = (options || {}).providerName, providerName = _a === void 0 ? DEFAULT_PROVIDER : _a;
229
- prov = this.getPluggable(providerName);
230
- if (!Array.isArray(geofences)) {
231
- geofenceInputArray = [geofences];
232
- }
233
- else {
234
- geofenceInputArray = geofences;
235
- }
236
- _b.label = 1;
237
- case 1:
238
- _b.trys.push([1, 3, , 4]);
239
- return [4 /*yield*/, prov.saveGeofences(geofenceInputArray, options, getGeoUserAgentDetails(GeoAction.SaveGeofences, customUserAgentDetails))];
240
- case 2: return [2 /*return*/, _b.sent()];
241
- case 3:
242
- error_5 = _b.sent();
243
- logger.debug(error_5);
244
- throw error_5;
245
- case 4: return [2 /*return*/];
246
- }
247
- });
248
- });
249
- };
250
- /**
251
- * Get a single geofence by geofenceId
252
- * @param geofenceId: GeofenceId - The string id of the geofence to get
253
- * @param options?: GeofenceOptions - Optional parameters for getting a geofence
254
- * @param {CustomUserAgentDetails} customUserAgentDetails - Optional parameter to send user agent details
255
- * @returns Promise<Geofence> - Promise that resolves to a geofence object
256
- */
257
- InternalGeoClass.prototype.getGeofence = function (geofenceId, options, customUserAgentDetails) {
258
- return __awaiter(this, void 0, void 0, function () {
259
- var _a, providerName, prov, error_6;
260
- return __generator(this, function (_b) {
261
- switch (_b.label) {
262
- case 0:
263
- _a = (options || {}).providerName, providerName = _a === void 0 ? DEFAULT_PROVIDER : _a;
264
- prov = this.getPluggable(providerName);
265
- _b.label = 1;
266
- case 1:
267
- _b.trys.push([1, 3, , 4]);
268
- return [4 /*yield*/, prov.getGeofence(geofenceId, options, getGeoUserAgentDetails(GeoAction.GetGeofence, customUserAgentDetails))];
269
- case 2: return [2 /*return*/, _b.sent()];
270
- case 3:
271
- error_6 = _b.sent();
272
- logger.debug(error_6);
273
- throw error_6;
274
- case 4: return [2 /*return*/];
275
- }
276
- });
277
- });
278
- };
279
- /**
280
- * List geofences
281
- * @param options?: ListGeofenceOptions
282
- * @param {CustomUserAgentDetails} customUserAgentDetails - Optional parameter to send user agent details
283
- * @returns {Promise<ListGeofencesResults>} - Promise that resolves to an object with:
284
- * entries: list of geofences - 100 geofences are listed per page
285
- * nextToken: token for next page of geofences
286
- */
287
- InternalGeoClass.prototype.listGeofences = function (options, customUserAgentDetails) {
288
- return __awaiter(this, void 0, void 0, function () {
289
- var _a, providerName, prov, error_7;
290
- return __generator(this, function (_b) {
291
- switch (_b.label) {
292
- case 0:
293
- _a = (options || {}).providerName, providerName = _a === void 0 ? DEFAULT_PROVIDER : _a;
294
- prov = this.getPluggable(providerName);
295
- _b.label = 1;
296
- case 1:
297
- _b.trys.push([1, 3, , 4]);
298
- return [4 /*yield*/, prov.listGeofences(options, getGeoUserAgentDetails(GeoAction.ListGeofences, customUserAgentDetails))];
299
- case 2: return [2 /*return*/, _b.sent()];
300
- case 3:
301
- error_7 = _b.sent();
302
- logger.debug(error_7);
303
- throw error_7;
304
- case 4: return [2 /*return*/];
305
- }
306
- });
307
- });
308
- };
309
- /**
310
- * Delete geofences
311
- * @param geofenceIds: string|string[]
312
- * @param options?: GeofenceOptions
313
- * @param {CustomUserAgentDetails} customUserAgentDetails - Optional parameter to send user agent details
314
- * @returns {Promise<DeleteGeofencesResults>} - Promise that resolves to an object with:
315
- * successes: list of geofences successfully deleted
316
- * errors: list of geofences that failed to delete
317
- */
318
- InternalGeoClass.prototype.deleteGeofences = function (geofenceIds, options, customUserAgentDetails) {
319
- return __awaiter(this, void 0, void 0, function () {
320
- var _a, providerName, prov, geofenceIdsInputArray, error_8;
321
- return __generator(this, function (_b) {
322
- switch (_b.label) {
323
- case 0:
324
- _a = (options || {}).providerName, providerName = _a === void 0 ? DEFAULT_PROVIDER : _a;
325
- prov = this.getPluggable(providerName);
326
- if (!Array.isArray(geofenceIds)) {
327
- geofenceIdsInputArray = [geofenceIds];
328
- }
329
- else {
330
- geofenceIdsInputArray = geofenceIds;
331
- }
332
- _b.label = 1;
333
- case 1:
334
- _b.trys.push([1, 3, , 4]);
335
- return [4 /*yield*/, prov.deleteGeofences(geofenceIdsInputArray, options, getGeoUserAgentDetails(GeoAction.DeleteGeofences, customUserAgentDetails))];
336
- case 2: return [2 /*return*/, _b.sent()];
337
- case 3:
338
- error_8 = _b.sent();
339
- logger.debug(error_8);
340
- throw error_8;
341
- case 4: return [2 /*return*/];
342
- }
343
- });
344
- });
345
- };
346
- InternalGeoClass.MODULE = 'InternalGeo';
347
- return InternalGeoClass;
348
- }());
349
- export { InternalGeoClass };
350
- export var InternalGeo = new InternalGeoClass();
351
- Amplify.register(InternalGeo);
352
- //# sourceMappingURL=InternalGeo.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"InternalGeo.js","sourceRoot":"","sources":["../../src/internals/InternalGeo.ts"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,EACN,OAAO,EAEP,SAAS,EACT,aAAa,IAAI,MAAM,EACvB,eAAe,GACf,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,6BAA6B,EAAE,MAAM,4CAA4C,CAAC;AAE3F,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAoB9C,OAAO,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AAEjD,IAAM,MAAM,GAAG,IAAI,MAAM,CAAC,KAAK,CAAC,CAAC;AAEjC,IAAM,gBAAgB,GAAG,uBAAuB,CAAC;AACjD;IAQC;QACC,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC;QAClB,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC;QACtB,MAAM,CAAC,KAAK,CAAC,aAAa,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;IAC3C,CAAC;IAED;;;OAGG;IACI,wCAAa,GAApB;QACC,OAAO,gBAAgB,CAAC,MAAM,CAAC;IAChC,CAAC;IAED;;;OAGG;IACI,uCAAY,GAAnB,UAAoB,SAAsB;QACzC,IAAI,SAAS,IAAI,SAAS,CAAC,WAAW,EAAE,KAAK,KAAK,EAAE;YACnD,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;YACjC,IAAM,MAAM,GAAG,SAAS,CAAC,SAAS,CACjC,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,eAAe,EAAE,CAAC,CACzC,CAAC;YAEF,OAAO,MAAM,C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,CAAC,WAAW,CAAC,CAAC"}
@@ -1 +0,0 @@
1
- export { InternalGeo } from './InternalGeo';
@@ -1,4 +0,0 @@
1
- // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
- // SPDX-License-Identifier: Apache-2.0
3
- export { InternalGeo } from './InternalGeo';
4
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/internals/index.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC"}
@@ -1,2 +0,0 @@
1
- import { CustomUserAgentDetails, GeoAction } from '@aws-amplify/core';
2
- export declare const getGeoUserAgentDetails: (action: GeoAction, customUserAgentDetails?: CustomUserAgentDetails) => CustomUserAgentDetails;
@@ -1,8 +0,0 @@
1
- // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
- // SPDX-License-Identifier: Apache-2.0
3
- import { __assign } from "tslib";
4
- import { Category } from '@aws-amplify/core';
5
- export var getGeoUserAgentDetails = function (action, customUserAgentDetails) {
6
- return __assign({ category: Category.Geo, action: action }, customUserAgentDetails);
7
- };
8
- //# sourceMappingURL=utils.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/internals/utils.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;;AAEtC,OAAO,EAAE,QAAQ,EAAqC,MAAM,mBAAmB,CAAC;AAEhF,MAAM,CAAC,IAAM,sBAAsB,GAAG,UACrC,MAAiB,EACjB,sBAA+C;IAE/C,kBACC,QAAQ,EAAE,QAAQ,CAAC,GAAG,EACtB,MAAM,QAAA,IACH,sBAAsB,EACxB;AACH,CAAC,CAAC"}