@google/earthengine 1.6.1 → 1.6.2
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/build/browser.js +52 -34
- package/build/ee_api_js.js +280 -280
- package/build/ee_api_js_debug.js +29 -11
- package/build/ee_api_js_npm.js +52 -34
- package/build/main.js +52 -34
- package/package.json +1 -1
- package/src/apiclient.js +1 -1
- package/src/eeapiclient/api_request_hook.ts +32 -3
- package/src/eeapiclient/promise_api_client.ts +14 -10
package/build/main.js
CHANGED
|
@@ -1192,6 +1192,19 @@ $jscomp.polyfill("String.prototype.includes", function(orig) {
|
|
|
1192
1192
|
return $jscomp.checkStringArgs(this, searchString, "includes").indexOf(searchString, opt_position || 0) !== -1;
|
|
1193
1193
|
};
|
|
1194
1194
|
}, "es6", "es3");
|
|
1195
|
+
$jscomp.polyfill("Promise.prototype.finally", function(orig) {
|
|
1196
|
+
return orig ? orig : function(onFinally) {
|
|
1197
|
+
return this.then(function(value) {
|
|
1198
|
+
return Promise.resolve(onFinally()).then(function() {
|
|
1199
|
+
return value;
|
|
1200
|
+
});
|
|
1201
|
+
}, function(reason) {
|
|
1202
|
+
return Promise.resolve(onFinally()).then(function() {
|
|
1203
|
+
throw reason;
|
|
1204
|
+
});
|
|
1205
|
+
});
|
|
1206
|
+
};
|
|
1207
|
+
}, "es9", "es3");
|
|
1195
1208
|
$jscomp.findInternal = function(array, callback, thisArg) {
|
|
1196
1209
|
array instanceof String && (array = String(array));
|
|
1197
1210
|
for (var len = array.length, i = 0; i < len; i++) {
|
|
@@ -1315,7 +1328,7 @@ $jscomp.polyfill("String.prototype.padStart", function(orig) {
|
|
|
1315
1328
|
return $jscomp.stringPadding(opt_padString, targetLength - string.length) + string;
|
|
1316
1329
|
};
|
|
1317
1330
|
}, "es8", "es3");
|
|
1318
|
-
var CLOSURE_TOGGLE_ORDINALS = {GoogFlags__async_throw_on_unicode_to_byte__enable:!1, GoogFlags__client_only_wiz_context_per_component__enable:!1, GoogFlags__client_only_wiz_lazy_tsx__enable:!1, GoogFlags__client_only_wiz_queue_effect_and_on_init_initial_runs__enable:!1, GoogFlags__fixed_noopener_behavior__enable:!1, GoogFlags__jspb_disallow_message_tojson__enable:!1, GoogFlags__jspb_serialize_with_dynamic_pivot_selector__enable:!1,
|
|
1331
|
+
var CLOSURE_TOGGLE_ORDINALS = {GoogFlags__async_throw_on_unicode_to_byte__enable:!1, GoogFlags__client_only_wiz_context_per_component__enable:!1, GoogFlags__client_only_wiz_lazy_tsx__enable:!1, GoogFlags__client_only_wiz_queue_effect_and_on_init_initial_runs__enable:!1, GoogFlags__fixed_noopener_behavior__enable:!1, GoogFlags__jspb_disallow_message_tojson__enable:!1, GoogFlags__jspb_serialize_with_dynamic_pivot_selector__enable:!1, GoogFlags__jspb_throw_in_array_constructor_if_array_is_already_constructed__disable:!1,
|
|
1319
1332
|
GoogFlags__jspb_use_constant_default_pivot__enable:!1, GoogFlags__optimize_get_ei_from_ved__enable:!1, GoogFlags__override_disable_toggles:!1, GoogFlags__testonly_debug_flag__enable:!1, GoogFlags__testonly_disabled_flag__enable:!1, GoogFlags__testonly_stable_flag__disable:!1, GoogFlags__testonly_staging_flag__disable:!1, GoogFlags__use_toggles:!1, GoogFlags__use_user_agent_client_hints__enable:!1, GoogFlags__wiz_enable_native_promise__enable:!1};
|
|
1320
1333
|
/*
|
|
1321
1334
|
|
|
@@ -6325,10 +6338,14 @@ module$exports$eeapiclient$promise_api_client.PromiseApiClient = function(reques
|
|
|
6325
6338
|
};
|
|
6326
6339
|
$jscomp.inherits(module$exports$eeapiclient$promise_api_client.PromiseApiClient, module$exports$eeapiclient$api_client.ApiClient);
|
|
6327
6340
|
module$exports$eeapiclient$promise_api_client.PromiseApiClient.prototype.$addHooksToRequest = function(requestParams, promise) {
|
|
6328
|
-
|
|
6341
|
+
var hook = module$contents$eeapiclient$api_request_hook_getRequestHook(this.hookFactory, requestParams);
|
|
6342
|
+
return hook == null ? promise : promise.then(function(response) {
|
|
6329
6343
|
return response;
|
|
6330
6344
|
}, function(error) {
|
|
6331
6345
|
throw error;
|
|
6346
|
+
}).finally(function() {
|
|
6347
|
+
var $jscomp$optchain$tmp1237977804$1;
|
|
6348
|
+
($jscomp$optchain$tmp1237977804$1 = hook.onFinalize) == null || $jscomp$optchain$tmp1237977804$1.call(hook);
|
|
6332
6349
|
});
|
|
6333
6350
|
};
|
|
6334
6351
|
module$exports$eeapiclient$promise_api_client.PromiseApiClient.prototype.$request = function(requestParams) {
|
|
@@ -6336,9 +6353,9 @@ module$exports$eeapiclient$promise_api_client.PromiseApiClient.prototype.$reques
|
|
|
6336
6353
|
return this.$addHooksToRequest(requestParams, this.requestService.send(module$contents$eeapiclient$api_client_toMakeRequestParams(requestParams), responseCtor));
|
|
6337
6354
|
};
|
|
6338
6355
|
module$exports$eeapiclient$promise_api_client.PromiseApiClient.prototype.$uploadRequest = function(requestParams) {
|
|
6339
|
-
var $jscomp$this$1237977804$
|
|
6356
|
+
var $jscomp$this$1237977804$6 = this, responseCtor = requestParams.responseCtor || void 0;
|
|
6340
6357
|
return this.$addHooksToRequest(requestParams, module$contents$eeapiclient$api_client_toMultipartMakeRequestParams(requestParams).then(function(params) {
|
|
6341
|
-
return $jscomp$this$1237977804$
|
|
6358
|
+
return $jscomp$this$1237977804$6.requestService.send(params, responseCtor);
|
|
6342
6359
|
}));
|
|
6343
6360
|
};
|
|
6344
6361
|
var module$exports$eeapiclient$promise_request_service = {}, module$contents$eeapiclient$promise_request_service_module = module$contents$eeapiclient$promise_request_service_module || {id:"javascript/typescript/contrib/apiclient/request_service/promise_request_service.closure.js"};
|
|
@@ -6519,7 +6536,7 @@ module$exports$closure$flags$flags$2etoggles.TOGGLE_GoogFlags__wiz_enable_native
|
|
|
6519
6536
|
module$exports$closure$flags$flags$2etoggles.TOGGLE_GoogFlags__jspb_disallow_message_tojson__enable = !1;
|
|
6520
6537
|
module$exports$closure$flags$flags$2etoggles.TOGGLE_GoogFlags__jspb_use_constant_default_pivot__enable = !1;
|
|
6521
6538
|
module$exports$closure$flags$flags$2etoggles.TOGGLE_GoogFlags__jspb_serialize_with_dynamic_pivot_selector__enable = !1;
|
|
6522
|
-
module$exports$closure$flags$flags$2etoggles.
|
|
6539
|
+
module$exports$closure$flags$flags$2etoggles.TOGGLE_GoogFlags__jspb_throw_in_array_constructor_if_array_is_already_constructed__disable = !1;
|
|
6523
6540
|
module$exports$closure$flags$flags$2etoggles.TOGGLE_GoogFlags__optimize_get_ei_from_ved__enable = !1;
|
|
6524
6541
|
module$exports$closure$flags$flags$2etoggles.TOGGLE_GoogFlags__testonly_disabled_flag__enable = !1;
|
|
6525
6542
|
module$exports$closure$flags$flags$2etoggles.TOGGLE_GoogFlags__testonly_debug_flag__enable = !1;
|
|
@@ -6537,7 +6554,8 @@ goog.flags.WIZ_ENABLE_NATIVE_PROMISE = module$exports$closure$flags$flags$2etogg
|
|
|
6537
6554
|
goog.flags.JSPB_DISALLOW_MESSAGE_TOJSON = module$exports$closure$flags$flags$2etoggles.TOGGLE_GoogFlags__use_toggles ? goog.DEBUG || module$exports$closure$flags$flags$2etoggles.TOGGLE_GoogFlags__jspb_disallow_message_tojson__enable : goog.readFlagInternalDoNotUseOrElse(722764542, goog.DEBUG);
|
|
6538
6555
|
goog.flags.JSPB_USE_CONSTANT_DEFAULT_PIVOT = module$exports$closure$flags$flags$2etoggles.TOGGLE_GoogFlags__use_toggles ? goog.DEBUG || module$exports$closure$flags$flags$2etoggles.TOGGLE_GoogFlags__jspb_use_constant_default_pivot__enable : goog.readFlagInternalDoNotUseOrElse(748402145, goog.DEBUG);
|
|
6539
6556
|
goog.flags.JSPB_SERIALIZE_WITH_DYNAMIC_PIVOT_SELECTOR = module$exports$closure$flags$flags$2etoggles.TOGGLE_GoogFlags__use_toggles ? goog.DEBUG || module$exports$closure$flags$flags$2etoggles.TOGGLE_GoogFlags__jspb_serialize_with_dynamic_pivot_selector__enable : goog.readFlagInternalDoNotUseOrElse(748402146, goog.DEBUG);
|
|
6540
|
-
goog.flags.JSPB_THROW_IN_ARRAY_CONSTRUCTOR_IF_ARRAY_IS_ALREADY_CONSTRUCTED = module$exports$closure$flags$flags$2etoggles.TOGGLE_GoogFlags__use_toggles ? goog.
|
|
6557
|
+
goog.flags.JSPB_THROW_IN_ARRAY_CONSTRUCTOR_IF_ARRAY_IS_ALREADY_CONSTRUCTED = module$exports$closure$flags$flags$2etoggles.TOGGLE_GoogFlags__use_toggles ? goog.FLAGS_STAGING_DEFAULT && (module$exports$closure$flags$flags$2etoggles.TOGGLE_GoogFlags__override_disable_toggles || !module$exports$closure$flags$flags$2etoggles.TOGGLE_GoogFlags__jspb_throw_in_array_constructor_if_array_is_already_constructed__disable) :
|
|
6558
|
+
goog.readFlagInternalDoNotUseOrElse(748402147, module$contents$goog$flags_STAGING);
|
|
6541
6559
|
goog.flags.OPTIMIZE_GET_EI_FROM_VED = module$exports$closure$flags$flags$2etoggles.TOGGLE_GoogFlags__use_toggles ? module$exports$closure$flags$flags$2etoggles.TOGGLE_GoogFlags__optimize_get_ei_from_ved__enable : goog.readFlagInternalDoNotUseOrElse(333098724, !1);
|
|
6542
6560
|
goog.flags.TESTONLY_DISABLED_FLAG = module$exports$closure$flags$flags$2etoggles.TOGGLE_GoogFlags__use_toggles ? module$exports$closure$flags$flags$2etoggles.TOGGLE_GoogFlags__testonly_disabled_flag__enable : goog.readFlagInternalDoNotUseOrElse(2147483644, !1);
|
|
6543
6561
|
goog.flags.TESTONLY_DEBUG_FLAG = module$exports$closure$flags$flags$2etoggles.TOGGLE_GoogFlags__use_toggles ? goog.DEBUG || module$exports$closure$flags$flags$2etoggles.TOGGLE_GoogFlags__testonly_debug_flag__enable : goog.readFlagInternalDoNotUseOrElse(2147483645, goog.DEBUG);
|
|
@@ -18636,7 +18654,7 @@ goog.async.Deferred.prototype.addFinally = function(f, opt_scope) {
|
|
|
18636
18654
|
};
|
|
18637
18655
|
goog.async.Deferred.prototype.finally = function(f) {
|
|
18638
18656
|
var $jscomp$this$m1728524513$17 = this;
|
|
18639
|
-
return new Promise(function(resolve, reject) {
|
|
18657
|
+
return goog.async.Deferred.fromPromise(new Promise(function(resolve, reject) {
|
|
18640
18658
|
$jscomp$this$m1728524513$17.addCallbacks(function(v) {
|
|
18641
18659
|
f();
|
|
18642
18660
|
resolve(v);
|
|
@@ -18644,7 +18662,7 @@ goog.async.Deferred.prototype.finally = function(f) {
|
|
|
18644
18662
|
f();
|
|
18645
18663
|
reject(err);
|
|
18646
18664
|
});
|
|
18647
|
-
});
|
|
18665
|
+
}));
|
|
18648
18666
|
};
|
|
18649
18667
|
goog.async.Deferred.prototype.addCallbacks = function(cb, eb, opt_scope) {
|
|
18650
18668
|
goog.asserts.assert(!this.blocking_, "Blocking Deferreds can not be re-used");
|
|
@@ -19450,7 +19468,7 @@ var $jscomp$templatelit$m1153655765$99 = $jscomp.createTemplateTagFirstArg(["htt
|
|
|
19450
19468
|
ee.apiclient = {};
|
|
19451
19469
|
var module$contents$ee$apiclient_apiclient = {};
|
|
19452
19470
|
ee.apiclient.VERSION = module$exports$ee$apiVersion.V1;
|
|
19453
|
-
ee.apiclient.API_CLIENT_VERSION = "1.6.
|
|
19471
|
+
ee.apiclient.API_CLIENT_VERSION = "1.6.2";
|
|
19454
19472
|
ee.apiclient.NULL_VALUE = module$exports$eeapiclient$domain_object.NULL_VALUE;
|
|
19455
19473
|
ee.apiclient.PromiseRequestService = module$exports$eeapiclient$promise_request_service.PromiseRequestService;
|
|
19456
19474
|
ee.apiclient.MakeRequestParams = module$contents$eeapiclient$request_params_MakeRequestParams;
|
|
@@ -19748,8 +19766,8 @@ module$contents$ee$apiclient_apiclient.send = function(path, params, callback, m
|
|
|
19748
19766
|
var profileHookAtCallTime = module$contents$ee$apiclient_apiclient.profileHook_, contentType = "application/x-www-form-urlencoded";
|
|
19749
19767
|
body && (contentType = "application/json", method && method.startsWith("multipart") && (contentType = method, method = "POST"));
|
|
19750
19768
|
method = method || "POST";
|
|
19751
|
-
var headers = {"Content-Type":contentType}, version = "1.6.
|
|
19752
|
-
version === "1.6.
|
|
19769
|
+
var headers = {"Content-Type":contentType}, version = "1.6.2";
|
|
19770
|
+
version === "1.6.2" && (version = "latest");
|
|
19753
19771
|
headers[module$contents$ee$apiclient_apiclient.API_CLIENT_VERSION_HEADER] = "ee-js/" + version;
|
|
19754
19772
|
var authToken = module$contents$ee$apiclient_apiclient.getAuthToken();
|
|
19755
19773
|
if (authToken != null) {
|
|
@@ -27272,29 +27290,29 @@ ee.data.Profiler.Format.prototype.toString = function() {
|
|
|
27272
27290
|
ee.data.Profiler.Format.TEXT = new ee.data.Profiler.Format("text");
|
|
27273
27291
|
ee.data.Profiler.Format.JSON = new ee.data.Profiler.Format("json");
|
|
27274
27292
|
(function() {
|
|
27275
|
-
var exportedFnInfo = {}, orderedFnNames = "ee.ApiFunction.
|
|
27276
|
-
orderedParamLists = [["name"], ["name", "namedArgs"], ["name"
|
|
27277
|
-
["collection", "opt_description", "opt_assetId", "opt_maxVertices", "opt_priority"], "collection opt_description opt_bucket opt_fileNamePrefix opt_framesPerSecond opt_writePublicTiles opt_minZoom opt_maxZoom opt_scale opt_region opt_skipEmptyTiles opt_minTimeMachineZoomSubset opt_maxTimeMachineZoomSubset opt_tileWidth opt_tileHeight opt_tileStride opt_videoFormat opt_version opt_mapsApiKey opt_bucketCorsUris opt_priority".split(" "),
|
|
27278
|
-
|
|
27279
|
-
"collection opt_description
|
|
27280
|
-
"
|
|
27281
|
-
"
|
|
27282
|
-
["
|
|
27283
|
-
["
|
|
27284
|
-
|
|
27285
|
-
"opt_filename", "opt_callback"], ["opt_visParams", "opt_callback"], ["
|
|
27286
|
-
"
|
|
27287
|
-
"
|
|
27288
|
-
["
|
|
27289
|
-
[ee.ApiFunction.
|
|
27290
|
-
module$contents$ee$batch_Export.
|
|
27291
|
-
ee.ComputedObject.prototype.
|
|
27292
|
-
ee.data.
|
|
27293
|
-
ee.data.
|
|
27294
|
-
ee.
|
|
27295
|
-
ee.Filter.gte, ee.Filter.eq, ee.Filter.
|
|
27296
|
-
ee.Image.prototype.getMap, ee.Image
|
|
27297
|
-
ee.ImageCollection.prototype.
|
|
27293
|
+
var exportedFnInfo = {}, orderedFnNames = "ee.ApiFunction._call ee.ApiFunction._apply ee.ApiFunction.lookup ee.batch.Export.video.toCloudStorage ee.batch.Export.table.toCloudStorage ee.batch.Export.table.toBigQuery ee.batch.Export.map.toCloudStorage ee.batch.Export.table.toAsset ee.batch.Export.videoMap.toCloudStorage ee.batch.Export.image.toDrive ee.batch.Export.classifier.toAsset ee.batch.Export.image.toCloudStorage ee.batch.Export.video.toDrive ee.batch.Export.image.toAsset ee.batch.Export.table.toFeatureView ee.batch.Export.table.toDrive ee.Collection.prototype.filter ee.Collection.prototype.filterMetadata ee.Collection.prototype.filterBounds ee.Collection.prototype.sort ee.Collection.prototype.map ee.Collection.prototype.filterDate ee.Collection.prototype.iterate ee.Collection.prototype.limit ee.ComputedObject.prototype.serialize ee.ComputedObject.prototype.evaluate ee.ComputedObject.prototype.getInfo ee.ComputedObject.prototype.aside ee.data.makeTableDownloadUrl ee.data.updateAsset ee.data.newTaskId ee.data.listImages ee.data.setAssetAcl ee.data.getMapId ee.data.listBuckets ee.data.setWorkloadTag ee.data.setAssetProperties ee.data.getTaskStatus ee.data.getAssetRoots ee.data.getTileUrl ee.data.getAssetRootQuota ee.data.createAssetHome ee.data.getWorkloadTag ee.data.startIngestion ee.data.getTaskList ee.data.getFeatureViewTilesKey ee.data.createAsset ee.data.getTaskListWithLimit ee.data.listOperations ee.data.setDefaultWorkloadTag ee.data.listFeatures ee.data.createFolder ee.data.resetWorkloadTag ee.data.computeValue ee.data.startTableIngestion ee.data.cancelOperation ee.data.getVideoThumbId ee.data.renameAsset ee.data.getThumbId ee.data.authenticateViaOauth ee.data.copyAsset ee.data.getOperation ee.data.getAsset ee.data.getFilmstripThumbId ee.data.deleteAsset ee.data.authenticate ee.data.cancelTask ee.data.makeThumbUrl ee.data.getInfo ee.data.getAssetAcl ee.data.authenticateViaPopup ee.data.updateTask ee.data.getDownloadId ee.data.getTableDownloadId ee.data.getList ee.data.makeDownloadUrl ee.data.startProcessing ee.data.listAssets ee.data.authenticateViaPrivateKey ee.Date ee.Deserializer.fromJSON ee.Deserializer.decode ee.Deserializer.decodeCloudApi ee.Deserializer.fromCloudApiJSON ee.Dictionary ee.Algorithms ee.reset ee.TILE_SIZE ee.InitState ee.call ee.initialize ee.apply ee.Element.prototype.set ee.Encodable.SourceFrame ee.Feature ee.Feature.prototype.getMapId ee.Feature.prototype.getInfo ee.Feature.prototype.getMap ee.FeatureCollection.prototype.getDownloadURL ee.FeatureCollection.prototype.getMapId ee.FeatureCollection ee.FeatureCollection.prototype.getMap ee.FeatureCollection.prototype.getInfo ee.FeatureCollection.prototype.select ee.Filter.inList ee.Filter.prototype.not ee.Filter.and ee.Filter.metadata ee.Filter.bounds ee.Filter.gte ee.Filter ee.Filter.eq ee.Filter.or ee.Filter.date ee.Filter.gt ee.Filter.neq ee.Filter.lt ee.Filter.lte ee.Function.prototype.call ee.Function.prototype.apply ee.Geometry.MultiPolygon ee.Geometry.prototype.toGeoJSON ee.Geometry.Rectangle ee.Geometry.LineString ee.Geometry.Point ee.Geometry.prototype.toGeoJSONString ee.Geometry ee.Geometry.Polygon ee.Geometry.LinearRing ee.Geometry.MultiPoint ee.Geometry.BBox ee.Geometry.MultiLineString ee.Geometry.prototype.serialize ee.Image.prototype.getMap ee.Image.prototype.clip ee.Image.prototype.select ee.Image.prototype.getThumbId ee.Image.rgb ee.Image.prototype.getInfo ee.Image.prototype.getMapId ee.Image.prototype.expression ee.Image.prototype.rename ee.Image ee.Image.prototype.getDownloadURL ee.Image.prototype.getThumbURL ee.Image.cat ee.ImageCollection.prototype.getFilmstripThumbURL ee.ImageCollection.prototype.getVideoThumbURL ee.ImageCollection.prototype.linkCollection ee.ImageCollection.prototype.getMapId ee.ImageCollection.prototype.getMap ee.ImageCollection.prototype.select ee.ImageCollection.prototype.first ee.ImageCollection.prototype.getInfo ee.ImageCollection ee.List ee.Number ee.Serializer.toReadableJSON ee.Serializer.toReadableCloudApiJSON ee.Serializer.toCloudApiJSON ee.Serializer.encode ee.Serializer.encodeCloudApi ee.Serializer.toJSON ee.Serializer.encodeCloudApiPretty ee.String ee.Terrain".split(" "),
|
|
27294
|
+
orderedParamLists = [["name", "var_args"], ["name", "namedArgs"], ["name"], "collection opt_description opt_bucket opt_fileNamePrefix opt_framesPerSecond opt_dimensions opt_region opt_scale opt_crs opt_crsTransform opt_maxPixels opt_maxFrames opt_priority".split(" "), "collection opt_description opt_bucket opt_fileNamePrefix opt_fileFormat opt_selectors opt_maxVertices opt_priority".split(" "), "collection opt_description opt_table opt_overwrite opt_append opt_selectors opt_maxVertices opt_priority".split(" "),
|
|
27295
|
+
"image opt_description opt_bucket opt_fileFormat opt_path opt_writePublicTiles opt_scale opt_maxZoom opt_minZoom opt_region opt_skipEmptyTiles opt_mapsApiKey opt_bucketCorsUris opt_priority".split(" "), ["collection", "opt_description", "opt_assetId", "opt_maxVertices", "opt_priority"], "collection opt_description opt_bucket opt_fileNamePrefix opt_framesPerSecond opt_writePublicTiles opt_minZoom opt_maxZoom opt_scale opt_region opt_skipEmptyTiles opt_minTimeMachineZoomSubset opt_maxTimeMachineZoomSubset opt_tileWidth opt_tileHeight opt_tileStride opt_videoFormat opt_version opt_mapsApiKey opt_bucketCorsUris opt_priority".split(" "),
|
|
27296
|
+
"image opt_description opt_folder opt_fileNamePrefix opt_dimensions opt_region opt_scale opt_crs opt_crsTransform opt_maxPixels opt_shardSize opt_fileDimensions opt_skipEmptyTiles opt_fileFormat opt_formatOptions opt_priority".split(" "), ["classifier", "opt_description", "opt_assetId", "opt_priority"], "image opt_description opt_bucket opt_fileNamePrefix opt_dimensions opt_region opt_scale opt_crs opt_crsTransform opt_maxPixels opt_shardSize opt_fileDimensions opt_skipEmptyTiles opt_fileFormat opt_formatOptions opt_priority".split(" "),
|
|
27297
|
+
"collection opt_description opt_folder opt_fileNamePrefix opt_framesPerSecond opt_dimensions opt_region opt_scale opt_crs opt_crsTransform opt_maxPixels opt_maxFrames opt_priority".split(" "), "image opt_description opt_assetId opt_pyramidingPolicy opt_dimensions opt_region opt_scale opt_crs opt_crsTransform opt_maxPixels opt_shardSize opt_priority".split(" "), "collection opt_description opt_assetId opt_maxFeaturesPerTile opt_thinningStrategy opt_thinningRanking opt_zOrderRanking opt_priority".split(" "),
|
|
27298
|
+
"collection opt_description opt_folder opt_fileNamePrefix opt_fileFormat opt_selectors opt_maxVertices opt_priority".split(" "), ["filter"], ["name", "operator", "value"], ["geometry"], ["property", "opt_ascending"], ["algorithm", "opt_dropNulls"], ["start", "opt_end"], ["algorithm", "opt_first"], ["max", "opt_property", "opt_ascending"], ["legacy"], ["callback"], ["opt_callback"], ["func", "var_args"], ["id"], ["assetId", "asset", "updateFields", "opt_callback"], ["opt_count", "opt_callback"],
|
|
27299
|
+
["parent", "opt_params", "opt_callback"], ["assetId", "aclUpdate", "opt_callback"], ["params", "opt_callback"], ["project", "opt_callback"], ["tag"], ["assetId", "properties", "opt_callback"], ["taskId", "opt_callback"], ["opt_callback"], ["id", "x", "y", "z"], ["rootId", "opt_callback"], ["requestedId", "opt_callback"], [], ["taskId", "request", "opt_callback"], ["opt_callback"], ["params", "opt_callback"], ["value", "opt_path", "opt_force", "opt_properties", "opt_callback"], ["opt_limit", "opt_callback"],
|
|
27300
|
+
["opt_limit", "opt_callback"], ["tag"], ["asset", "params", "opt_callback"], ["path", "opt_force", "opt_callback"], ["opt_resetDefault"], ["obj", "opt_callback"], ["taskId", "request", "opt_callback"], ["operationName", "opt_callback"], ["params", "opt_callback"], ["sourceId", "destinationId", "opt_callback"], ["params", "opt_callback"], "clientId success opt_error opt_extraScopes opt_onImmediateFailed opt_suppressDefaultScopes".split(" "), ["sourceId", "destinationId", "opt_overwrite", "opt_callback"],
|
|
27301
|
+
["operationName", "opt_callback"], ["id", "opt_callback"], ["params", "opt_callback"], ["assetId", "opt_callback"], ["clientId", "success", "opt_error", "opt_extraScopes", "opt_onImmediateFailed"], ["taskId", "opt_callback"], ["id"], ["id", "opt_callback"], ["assetId", "opt_callback"], ["opt_success", "opt_error"], ["taskId", "action", "opt_callback"], ["params", "opt_callback"], ["params", "opt_callback"], ["params", "opt_callback"], ["id"], ["taskId", "params", "opt_callback"], ["parent", "opt_params",
|
|
27302
|
+
"opt_callback"], ["privateKey", "opt_success", "opt_error", "opt_extraScopes", "opt_suppressDefaultScopes"], ["date", "opt_tz"], ["json"], ["json"], ["json"], ["json"], ["opt_dict"], [], [], [], [], ["func", "var_args"], "opt_baseurl opt_tileurl opt_successCallback opt_errorCallback opt_xsrfToken opt_project".split(" "), ["func", "namedArgs"], ["var_args"], [], ["geometry", "opt_properties"], ["opt_visParams", "opt_callback"], ["opt_callback"], ["opt_visParams", "opt_callback"], ["opt_format",
|
|
27303
|
+
"opt_selectors", "opt_filename", "opt_callback"], ["opt_visParams", "opt_callback"], ["args", "opt_column"], ["opt_visParams", "opt_callback"], ["opt_callback"], ["propertySelectors", "opt_newProperties", "opt_retainGeometry"], ["opt_leftField", "opt_rightValue", "opt_rightField", "opt_leftValue"], [], ["var_args"], ["name", "operator", "value"], ["geometry", "opt_errorMargin"], ["name", "value"], ["opt_filter"], ["name", "value"], ["var_args"], ["start", "opt_end"], ["name", "value"], ["name",
|
|
27304
|
+
"value"], ["name", "value"], ["name", "value"], ["var_args"], ["namedArgs"], ["coords", "opt_proj", "opt_geodesic", "opt_maxError", "opt_evenOdd"], [], ["coords", "opt_proj", "opt_geodesic", "opt_evenOdd"], ["coords", "opt_proj", "opt_geodesic", "opt_maxError"], ["coords", "opt_proj"], [], ["geoJson", "opt_proj", "opt_geodesic", "opt_evenOdd"], ["coords", "opt_proj", "opt_geodesic", "opt_maxError", "opt_evenOdd"], ["coords", "opt_proj", "opt_geodesic", "opt_maxError"], ["coords", "opt_proj"], ["west",
|
|
27305
|
+
"south", "east", "north"], ["coords", "opt_proj", "opt_geodesic", "opt_maxError"], ["legacy"], ["opt_visParams", "opt_callback"], ["geometry"], ["var_args"], ["params", "opt_callback"], ["r", "g", "b"], ["opt_callback"], ["opt_visParams", "opt_callback"], ["expression", "opt_map"], ["var_args"], ["opt_args"], ["params", "opt_callback"], ["params", "opt_callback"], ["var_args"], ["params", "opt_callback"], ["params", "opt_callback"], ["imageCollection", "opt_linkedBands", "opt_linkedProperties",
|
|
27306
|
+
"opt_matchPropertyName"], ["opt_visParams", "opt_callback"], ["opt_visParams", "opt_callback"], ["selectors", "opt_names"], [], ["opt_callback"], ["args"], ["list"], ["number"], ["obj"], ["obj"], ["obj"], ["obj", "opt_isCompound"], ["obj"], ["obj"], ["obj"], ["string"], []];
|
|
27307
|
+
[ee.ApiFunction._call, ee.ApiFunction._apply, ee.ApiFunction.lookup, module$contents$ee$batch_Export.video.toCloudStorage, module$contents$ee$batch_Export.table.toCloudStorage, module$contents$ee$batch_Export.table.toBigQuery, module$contents$ee$batch_Export.map.toCloudStorage, module$contents$ee$batch_Export.table.toAsset, module$contents$ee$batch_Export.videoMap.toCloudStorage, module$contents$ee$batch_Export.image.toDrive, module$contents$ee$batch_Export.classifier.toAsset, module$contents$ee$batch_Export.image.toCloudStorage,
|
|
27308
|
+
module$contents$ee$batch_Export.video.toDrive, module$contents$ee$batch_Export.image.toAsset, module$contents$ee$batch_Export.table.toFeatureView, module$contents$ee$batch_Export.table.toDrive, ee.Collection.prototype.filter, ee.Collection.prototype.filterMetadata, ee.Collection.prototype.filterBounds, ee.Collection.prototype.sort, ee.Collection.prototype.map, ee.Collection.prototype.filterDate, ee.Collection.prototype.iterate, ee.Collection.prototype.limit, ee.ComputedObject.prototype.serialize,
|
|
27309
|
+
ee.ComputedObject.prototype.evaluate, ee.ComputedObject.prototype.getInfo, ee.ComputedObject.prototype.aside, ee.data.makeTableDownloadUrl, ee.data.updateAsset, ee.data.newTaskId, ee.data.listImages, ee.data.setAssetAcl, ee.data.getMapId, ee.data.listBuckets, ee.data.setWorkloadTag, ee.data.setAssetProperties, ee.data.getTaskStatus, ee.data.getAssetRoots, ee.data.getTileUrl, ee.data.getAssetRootQuota, ee.data.createAssetHome, ee.data.getWorkloadTag, ee.data.startIngestion, ee.data.getTaskList,
|
|
27310
|
+
ee.data.getFeatureViewTilesKey, ee.data.createAsset, ee.data.getTaskListWithLimit, ee.data.listOperations, ee.data.setDefaultWorkloadTag, ee.data.listFeatures, ee.data.createFolder, ee.data.resetWorkloadTag, ee.data.computeValue, ee.data.startTableIngestion, ee.data.cancelOperation, ee.data.getVideoThumbId, ee.data.renameAsset, ee.data.getThumbId, ee.data.authenticateViaOauth, ee.data.copyAsset, ee.data.getOperation, ee.data.getAsset, ee.data.getFilmstripThumbId, ee.data.deleteAsset, ee.data.authenticate,
|
|
27311
|
+
ee.data.cancelTask, ee.data.makeThumbUrl, ee.data.getInfo, ee.data.getAssetAcl, ee.data.authenticateViaPopup, ee.data.updateTask, ee.data.getDownloadId, ee.data.getTableDownloadId, ee.data.getList, ee.data.makeDownloadUrl, ee.data.startProcessing, ee.data.listAssets, ee.data.authenticateViaPrivateKey, ee.Date, ee.Deserializer.fromJSON, ee.Deserializer.decode, ee.Deserializer.decodeCloudApi, ee.Deserializer.fromCloudApiJSON, ee.Dictionary, ee.Algorithms, ee.reset, ee.TILE_SIZE, ee.InitState, ee.call,
|
|
27312
|
+
ee.initialize, ee.apply, ee.Element.prototype.set, ee.Encodable.SourceFrame, ee.Feature, ee.Feature.prototype.getMapId, ee.Feature.prototype.getInfo, ee.Feature.prototype.getMap, ee.FeatureCollection.prototype.getDownloadURL, ee.FeatureCollection.prototype.getMapId, ee.FeatureCollection, ee.FeatureCollection.prototype.getMap, ee.FeatureCollection.prototype.getInfo, ee.FeatureCollection.prototype.select, ee.Filter.inList, ee.Filter.prototype.not, ee.Filter.and, ee.Filter.metadata, ee.Filter.bounds,
|
|
27313
|
+
ee.Filter.gte, ee.Filter, ee.Filter.eq, ee.Filter.or, ee.Filter.date, ee.Filter.gt, ee.Filter.neq, ee.Filter.lt, ee.Filter.lte, ee.Function.prototype.call, ee.Function.prototype.apply, ee.Geometry.MultiPolygon, ee.Geometry.prototype.toGeoJSON, ee.Geometry.Rectangle, ee.Geometry.LineString, ee.Geometry.Point, ee.Geometry.prototype.toGeoJSONString, ee.Geometry, ee.Geometry.Polygon, ee.Geometry.LinearRing, ee.Geometry.MultiPoint, ee.Geometry.BBox, ee.Geometry.MultiLineString, ee.Geometry.prototype.serialize,
|
|
27314
|
+
ee.Image.prototype.getMap, ee.Image.prototype.clip, ee.Image.prototype.select, ee.Image.prototype.getThumbId, ee.Image.rgb, ee.Image.prototype.getInfo, ee.Image.prototype.getMapId, ee.Image.prototype.expression, ee.Image.prototype.rename, ee.Image, ee.Image.prototype.getDownloadURL, ee.Image.prototype.getThumbURL, ee.Image.cat, ee.ImageCollection.prototype.getFilmstripThumbURL, ee.ImageCollection.prototype.getVideoThumbURL, ee.ImageCollection.prototype.linkCollection, ee.ImageCollection.prototype.getMapId,
|
|
27315
|
+
ee.ImageCollection.prototype.getMap, ee.ImageCollection.prototype.select, ee.ImageCollection.prototype.first, ee.ImageCollection.prototype.getInfo, ee.ImageCollection, ee.List, ee.Number, ee.Serializer.toReadableJSON, ee.Serializer.toReadableCloudApiJSON, ee.Serializer.toCloudApiJSON, ee.Serializer.encode, ee.Serializer.encodeCloudApi, ee.Serializer.toJSON, ee.Serializer.encodeCloudApiPretty, ee.String, ee.Terrain].forEach(function(fn, i) {
|
|
27298
27316
|
fn && (exportedFnInfo[fn.toString()] = {name:orderedFnNames[i], paramNames:orderedParamLists[i]});
|
|
27299
27317
|
});
|
|
27300
27318
|
goog.global.EXPORTED_FN_INFO = exportedFnInfo;
|
package/package.json
CHANGED
package/src/apiclient.js
CHANGED
|
@@ -24,7 +24,7 @@ const {trustedResourceUrl} = goog.require('safevalues.index');
|
|
|
24
24
|
/** @namespace */
|
|
25
25
|
const apiclient = {};
|
|
26
26
|
|
|
27
|
-
const API_CLIENT_VERSION = '1.6.
|
|
27
|
+
const API_CLIENT_VERSION = '1.6.2';
|
|
28
28
|
|
|
29
29
|
exports.VERSION = apiVersion.VERSION;
|
|
30
30
|
exports.API_CLIENT_VERSION = API_CLIENT_VERSION;
|
|
@@ -1,25 +1,54 @@
|
|
|
1
1
|
import {GeneratedRequestParams} from './generated_types';
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* Interface for a hook that can be used to intercept and modify API requests
|
|
5
|
+
* and responses.
|
|
6
|
+
*/
|
|
3
7
|
export interface ApiClientRequestHook {
|
|
4
|
-
/**
|
|
8
|
+
/**
|
|
9
|
+
* Called once before each API send.
|
|
10
|
+
*/
|
|
5
11
|
onBeforeSend(): void;
|
|
6
|
-
/**
|
|
12
|
+
/**
|
|
13
|
+
* Called after each successful API response.
|
|
14
|
+
*/
|
|
7
15
|
onSuccess<T>(response: T): void;
|
|
8
|
-
/**
|
|
16
|
+
/**
|
|
17
|
+
* Called after each unsuccessful API response.
|
|
18
|
+
*/
|
|
9
19
|
onError(error: {}): void;
|
|
20
|
+
/**
|
|
21
|
+
* Called after each API request is finalized.
|
|
22
|
+
* In some cases, the caller may cancel the API call which will not trigger
|
|
23
|
+
* any of the success or error callbacks. To handle such cases, the onFinalize
|
|
24
|
+
* callback can be used.
|
|
25
|
+
* OnFinalize will have equal number of calls as onBeforeSend.
|
|
26
|
+
*/
|
|
27
|
+
onFinalize?: () => void;
|
|
10
28
|
}
|
|
11
29
|
|
|
30
|
+
/**
|
|
31
|
+
* Interface for a factory that can be used to create {@link
|
|
32
|
+
* ApiClientRequestHook} instances.
|
|
33
|
+
*/
|
|
12
34
|
export abstract class ApiClientHookFactory {
|
|
13
35
|
abstract getRequestHook(
|
|
14
36
|
requestParams: GeneratedRequestParams,
|
|
15
37
|
): ApiClientRequestHook;
|
|
16
38
|
}
|
|
17
39
|
|
|
40
|
+
/**
|
|
41
|
+
* Interface for a constructor that can be used to create {@link
|
|
42
|
+
* ApiClientHookFactory} instances.
|
|
43
|
+
*/
|
|
18
44
|
export interface ApiClientHookFactoryCtor {
|
|
19
45
|
// tslint:disable-next-line:no-any ctor args are of any type
|
|
20
46
|
new (...args: any[]): ApiClientHookFactory;
|
|
21
47
|
}
|
|
22
48
|
|
|
49
|
+
/**
|
|
50
|
+
* Default implementation of {@link ApiClientHookFactory} that does nothing.
|
|
51
|
+
*/
|
|
23
52
|
export class DefaultApiClientHookFactory implements ApiClientHookFactory {
|
|
24
53
|
getRequestHook(requestParams: GeneratedRequestParams): ApiClientRequestHook {
|
|
25
54
|
return {
|
|
@@ -33,16 +33,20 @@ export class PromiseApiClient extends ApiClient {
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
hook.onBeforeSend();
|
|
36
|
-
return promise
|
|
37
|
-
(
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
36
|
+
return promise
|
|
37
|
+
.then(
|
|
38
|
+
(response) => {
|
|
39
|
+
hook.onSuccess(response);
|
|
40
|
+
return response;
|
|
41
|
+
},
|
|
42
|
+
(error) => {
|
|
43
|
+
hook.onError(error);
|
|
44
|
+
throw error;
|
|
45
|
+
},
|
|
46
|
+
)
|
|
47
|
+
.finally(() => {
|
|
48
|
+
hook.onFinalize?.();
|
|
49
|
+
});
|
|
46
50
|
}
|
|
47
51
|
|
|
48
52
|
/** Converts a gapi.client.Request to an Promise<T>. */
|