@google/earthengine 1.6.1 → 1.6.3
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 +53 -35
- package/build/ee_api_js.js +281 -281
- package/build/ee_api_js_debug.js +32 -14
- package/build/ee_api_js_npm.js +53 -35
- package/build/main.js +53 -35
- 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,
|
|
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__disable:!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"};
|
|
@@ -6513,13 +6530,13 @@ module$exports$closure$flags$flags$2etoggles.TOGGLE_GoogFlags__use_user_agent_cl
|
|
|
6513
6530
|
module$exports$closure$flags$flags$2etoggles.TOGGLE_GoogFlags__async_throw_on_unicode_to_byte__enable = !1;
|
|
6514
6531
|
module$exports$closure$flags$flags$2etoggles.TOGGLE_GoogFlags__client_only_wiz_queue_effect_and_on_init_initial_runs__enable = !1;
|
|
6515
6532
|
module$exports$closure$flags$flags$2etoggles.TOGGLE_GoogFlags__client_only_wiz_context_per_component__enable = !1;
|
|
6516
|
-
module$exports$closure$flags$flags$2etoggles.
|
|
6533
|
+
module$exports$closure$flags$flags$2etoggles.TOGGLE_GoogFlags__client_only_wiz_lazy_tsx__disable = !1;
|
|
6517
6534
|
module$exports$closure$flags$flags$2etoggles.TOGGLE_GoogFlags__fixed_noopener_behavior__enable = !1;
|
|
6518
6535
|
module$exports$closure$flags$flags$2etoggles.TOGGLE_GoogFlags__wiz_enable_native_promise__enable = !1;
|
|
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;
|
|
@@ -6531,13 +6548,14 @@ goog.flags.USE_USER_AGENT_CLIENT_HINTS = module$exports$closure$flags$flags$2eto
|
|
|
6531
6548
|
goog.flags.ASYNC_THROW_ON_UNICODE_TO_BYTE = module$exports$closure$flags$flags$2etoggles.TOGGLE_GoogFlags__use_toggles ? module$exports$closure$flags$flags$2etoggles.TOGGLE_GoogFlags__async_throw_on_unicode_to_byte__enable : goog.readFlagInternalDoNotUseOrElse(899588437, !1);
|
|
6532
6549
|
goog.flags.CLIENT_ONLY_WIZ_QUEUE_EFFECT_AND_ON_INIT_INITIAL_RUNS = module$exports$closure$flags$flags$2etoggles.TOGGLE_GoogFlags__use_toggles ? module$exports$closure$flags$flags$2etoggles.TOGGLE_GoogFlags__client_only_wiz_queue_effect_and_on_init_initial_runs__enable : goog.readFlagInternalDoNotUseOrElse(772657768, !1);
|
|
6533
6550
|
goog.flags.CLIENT_ONLY_WIZ_CONTEXT_PER_COMPONENT = module$exports$closure$flags$flags$2etoggles.TOGGLE_GoogFlags__use_toggles ? goog.DEBUG || module$exports$closure$flags$flags$2etoggles.TOGGLE_GoogFlags__client_only_wiz_context_per_component__enable : goog.readFlagInternalDoNotUseOrElse(513659523, goog.DEBUG);
|
|
6534
|
-
goog.flags.CLIENT_ONLY_WIZ_LAZY_TSX = module$exports$closure$flags$flags$2etoggles.TOGGLE_GoogFlags__use_toggles ? goog.
|
|
6551
|
+
goog.flags.CLIENT_ONLY_WIZ_LAZY_TSX = 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__client_only_wiz_lazy_tsx__disable) : goog.readFlagInternalDoNotUseOrElse(568333945, module$contents$goog$flags_STAGING);
|
|
6535
6552
|
goog.flags.FIXED_NOOPENER_BEHAVIOR = module$exports$closure$flags$flags$2etoggles.TOGGLE_GoogFlags__use_toggles ? module$exports$closure$flags$flags$2etoggles.TOGGLE_GoogFlags__fixed_noopener_behavior__enable : goog.readFlagInternalDoNotUseOrElse(1331761403, !1);
|
|
6536
6553
|
goog.flags.WIZ_ENABLE_NATIVE_PROMISE = module$exports$closure$flags$flags$2etoggles.TOGGLE_GoogFlags__use_toggles ? goog.DEBUG || module$exports$closure$flags$flags$2etoggles.TOGGLE_GoogFlags__wiz_enable_native_promise__enable : goog.readFlagInternalDoNotUseOrElse(651175828, goog.DEBUG);
|
|
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);
|
|
@@ -15180,7 +15198,7 @@ goog.Promise.prototype.finally = function(onSettled) {
|
|
|
15180
15198
|
var $jscomp$this$m1061044379$32 = this;
|
|
15181
15199
|
goog.Promise.LONG_STACK_TRACES && this.addStackTrace_(Error("finally"));
|
|
15182
15200
|
onSettled = module$exports$common$async$context$propagate.propagateAsyncContext(onSettled);
|
|
15183
|
-
return new Promise(function(resolve, reject) {
|
|
15201
|
+
return new goog.Promise(function(resolve, reject) {
|
|
15184
15202
|
$jscomp$this$m1061044379$32.thenVoid(function(value) {
|
|
15185
15203
|
onSettled();
|
|
15186
15204
|
resolve(value);
|
|
@@ -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.3";
|
|
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.3";
|
|
19770
|
+
version === "1.6.3" && (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.lookup ee.ApiFunction._apply ee.ApiFunction._call 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.
|
|
27293
|
+
var exportedFnInfo = {}, orderedFnNames = "ee.ApiFunction.lookup ee.ApiFunction._apply ee.ApiFunction._call 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.batch.Export.video.toCloudStorage ee.Collection.prototype.map ee.Collection.prototype.filterDate ee.Collection.prototype.filterBounds ee.Collection.prototype.iterate ee.Collection.prototype.limit ee.Collection.prototype.filter ee.Collection.prototype.filterMetadata ee.Collection.prototype.sort ee.ComputedObject.prototype.evaluate ee.ComputedObject.prototype.getInfo ee.ComputedObject.prototype.serialize ee.ComputedObject.prototype.aside ee.data.makeTableDownloadUrl ee.data.setAssetAcl ee.data.listBuckets ee.data.setAssetProperties ee.data.newTaskId ee.data.getAssetRoots ee.data.getAssetRootQuota ee.data.getMapId ee.data.createAssetHome ee.data.getTaskStatus ee.data.getTileUrl ee.data.startIngestion ee.data.getWorkloadTag ee.data.createAsset ee.data.setWorkloadTag ee.data.createFolder ee.data.getTaskList ee.data.setDefaultWorkloadTag ee.data.getFeatureViewTilesKey ee.data.resetWorkloadTag ee.data.renameAsset ee.data.getTaskListWithLimit ee.data.startTableIngestion ee.data.listOperations ee.data.listFeatures ee.data.copyAsset ee.data.computeValue ee.data.cancelOperation ee.data.getVideoThumbId ee.data.deleteAsset ee.data.getThumbId ee.data.getAsset ee.data.authenticateViaOauth ee.data.getOperation ee.data.getAssetAcl ee.data.getInfo ee.data.getFilmstripThumbId ee.data.authenticate ee.data.cancelTask ee.data.getList ee.data.makeThumbUrl ee.data.listAssets ee.data.authenticateViaPopup ee.data.updateTask ee.data.listImages ee.data.getDownloadId ee.data.getTableDownloadId ee.data.makeDownloadUrl ee.data.startProcessing ee.data.authenticateViaPrivateKey ee.data.updateAsset ee.Date ee.Deserializer.decodeCloudApi ee.Deserializer.fromJSON ee.Deserializer.fromCloudApiJSON ee.Deserializer.decode ee.Dictionary ee.reset ee.Algorithms ee.InitState ee.call ee.apply ee.initialize ee.TILE_SIZE ee.Element.prototype.set ee.Encodable.SourceFrame ee.Feature ee.Feature.prototype.getMap ee.Feature.prototype.getInfo ee.Feature.prototype.getMapId ee.FeatureCollection.prototype.getMap ee.FeatureCollection ee.FeatureCollection.prototype.getDownloadURL ee.FeatureCollection.prototype.getInfo ee.FeatureCollection.prototype.getMapId ee.FeatureCollection.prototype.select ee.Filter.gt ee.Filter.metadata ee.Filter.neq ee.Filter.lte ee.Filter.prototype.not ee.Filter ee.Filter.and ee.Filter.bounds ee.Filter.gte ee.Filter.or ee.Filter.eq ee.Filter.date ee.Filter.inList ee.Filter.lt ee.Function.prototype.call ee.Function.prototype.apply ee.Geometry.LineString ee.Geometry.Rectangle ee.Geometry.prototype.toGeoJSONString ee.Geometry.prototype.serialize ee.Geometry.Polygon ee.Geometry.Point ee.Geometry.MultiPolygon ee.Geometry.LinearRing ee.Geometry ee.Geometry.MultiPoint ee.Geometry.BBox ee.Geometry.prototype.toGeoJSON ee.Geometry.MultiLineString ee.Image.prototype.getDownloadURL ee.Image.prototype.rename ee.Image.prototype.getThumbId ee.Image ee.Image.prototype.getMap ee.Image.prototype.expression ee.Image.rgb ee.Image.cat ee.Image.prototype.clip ee.Image.prototype.getInfo ee.Image.prototype.getMapId ee.Image.prototype.getThumbURL ee.Image.prototype.select ee.ImageCollection.prototype.getInfo ee.ImageCollection.prototype.select ee.ImageCollection.prototype.first ee.ImageCollection ee.ImageCollection.prototype.getFilmstripThumbURL ee.ImageCollection.prototype.getMapId ee.ImageCollection.prototype.getVideoThumbURL ee.ImageCollection.prototype.getMap ee.ImageCollection.prototype.linkCollection ee.List ee.Number ee.Serializer.encodeCloudApi ee.Serializer.toReadableJSON ee.Serializer.toCloudApiJSON ee.Serializer.toReadableCloudApiJSON ee.Serializer.encode ee.Serializer.toJSON ee.Serializer.encodeCloudApiPretty ee.String ee.Terrain".split(" "),
|
|
27276
27294
|
orderedParamLists = [["name"], ["name", "namedArgs"], ["name", "var_args"], "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(" "), "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(" "),
|
|
27277
27295
|
["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(" "), "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(" "),
|
|
27278
|
-
["classifier", "opt_description", "opt_assetId", "opt_priority"], "
|
|
27279
|
-
"collection opt_description opt_assetId opt_maxFeaturesPerTile opt_thinningStrategy opt_thinningRanking opt_zOrderRanking opt_priority".split(" "), "collection opt_description opt_folder opt_fileNamePrefix opt_fileFormat opt_selectors opt_maxVertices opt_priority".split(" "), "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(" "), ["
|
|
27280
|
-
"
|
|
27281
|
-
"y", "z"], ["taskId", "request", "opt_callback"], [
|
|
27282
|
-
["
|
|
27283
|
-
["
|
|
27284
|
-
["json"], ["json"], ["opt_dict"], [], [], [], "opt_baseurl opt_tileurl opt_successCallback opt_errorCallback opt_xsrfToken opt_project".split(" "), [
|
|
27285
|
-
"
|
|
27286
|
-
"
|
|
27287
|
-
"
|
|
27288
|
-
["
|
|
27289
|
-
[ee.ApiFunction.lookup, ee.ApiFunction._apply, ee.ApiFunction._call, 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.
|
|
27290
|
-
module$contents$ee$batch_Export.image.toAsset, module$contents$ee$batch_Export.table.toFeatureView, module$contents$ee$batch_Export.table.toDrive, module$contents$ee$batch_Export.video.toCloudStorage, ee.Collection.prototype.
|
|
27291
|
-
ee.ComputedObject.prototype.
|
|
27292
|
-
ee.data.
|
|
27293
|
-
ee.data.
|
|
27294
|
-
ee.
|
|
27295
|
-
ee.Filter.
|
|
27296
|
-
ee.Image.prototype.
|
|
27297
|
-
ee.ImageCollection.prototype.
|
|
27296
|
+
["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(" "), "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(" "),
|
|
27297
|
+
"collection opt_description opt_assetId opt_maxFeaturesPerTile opt_thinningStrategy opt_thinningRanking opt_zOrderRanking opt_priority".split(" "), "collection opt_description opt_folder opt_fileNamePrefix opt_fileFormat opt_selectors opt_maxVertices opt_priority".split(" "), "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(" "), ["algorithm", "opt_dropNulls"],
|
|
27298
|
+
["start", "opt_end"], ["geometry"], ["algorithm", "opt_first"], ["max", "opt_property", "opt_ascending"], ["filter"], ["name", "operator", "value"], ["property", "opt_ascending"], ["callback"], ["opt_callback"], ["legacy"], ["func", "var_args"], ["id"], ["assetId", "aclUpdate", "opt_callback"], ["project", "opt_callback"], ["assetId", "properties", "opt_callback"], ["opt_count", "opt_callback"], ["opt_callback"], ["rootId", "opt_callback"], ["params", "opt_callback"], ["requestedId", "opt_callback"],
|
|
27299
|
+
["taskId", "opt_callback"], ["id", "x", "y", "z"], ["taskId", "request", "opt_callback"], [], ["value", "opt_path", "opt_force", "opt_properties", "opt_callback"], ["tag"], ["path", "opt_force", "opt_callback"], ["opt_callback"], ["tag"], ["params", "opt_callback"], ["opt_resetDefault"], ["sourceId", "destinationId", "opt_callback"], ["opt_limit", "opt_callback"], ["taskId", "request", "opt_callback"], ["opt_limit", "opt_callback"], ["asset", "params", "opt_callback"], ["sourceId", "destinationId",
|
|
27300
|
+
"opt_overwrite", "opt_callback"], ["obj", "opt_callback"], ["operationName", "opt_callback"], ["params", "opt_callback"], ["assetId", "opt_callback"], ["params", "opt_callback"], ["id", "opt_callback"], "clientId success opt_error opt_extraScopes opt_onImmediateFailed opt_suppressDefaultScopes".split(" "), ["operationName", "opt_callback"], ["assetId", "opt_callback"], ["id", "opt_callback"], ["params", "opt_callback"], ["clientId", "success", "opt_error", "opt_extraScopes", "opt_onImmediateFailed"],
|
|
27301
|
+
["taskId", "opt_callback"], ["params", "opt_callback"], ["id"], ["parent", "opt_params", "opt_callback"], ["opt_success", "opt_error"], ["taskId", "action", "opt_callback"], ["parent", "opt_params", "opt_callback"], ["params", "opt_callback"], ["params", "opt_callback"], ["id"], ["taskId", "params", "opt_callback"], ["privateKey", "opt_success", "opt_error", "opt_extraScopes", "opt_suppressDefaultScopes"], ["assetId", "asset", "updateFields", "opt_callback"], ["date", "opt_tz"], ["json"], ["json"],
|
|
27302
|
+
["json"], ["json"], ["opt_dict"], [], [], [], ["func", "var_args"], ["func", "namedArgs"], "opt_baseurl opt_tileurl opt_successCallback opt_errorCallback opt_xsrfToken opt_project".split(" "), [], ["var_args"], [], ["geometry", "opt_properties"], ["opt_visParams", "opt_callback"], ["opt_callback"], ["opt_visParams", "opt_callback"], ["opt_visParams", "opt_callback"], ["args", "opt_column"], ["opt_format", "opt_selectors", "opt_filename", "opt_callback"], ["opt_callback"], ["opt_visParams", "opt_callback"],
|
|
27303
|
+
["propertySelectors", "opt_newProperties", "opt_retainGeometry"], ["name", "value"], ["name", "operator", "value"], ["name", "value"], ["name", "value"], [], ["opt_filter"], ["var_args"], ["geometry", "opt_errorMargin"], ["name", "value"], ["var_args"], ["name", "value"], ["start", "opt_end"], ["opt_leftField", "opt_rightValue", "opt_rightField", "opt_leftValue"], ["name", "value"], ["var_args"], ["namedArgs"], ["coords", "opt_proj", "opt_geodesic", "opt_maxError"], ["coords", "opt_proj", "opt_geodesic",
|
|
27304
|
+
"opt_evenOdd"], [], ["legacy"], ["coords", "opt_proj", "opt_geodesic", "opt_maxError", "opt_evenOdd"], ["coords", "opt_proj"], ["coords", "opt_proj", "opt_geodesic", "opt_maxError", "opt_evenOdd"], ["coords", "opt_proj", "opt_geodesic", "opt_maxError"], ["geoJson", "opt_proj", "opt_geodesic", "opt_evenOdd"], ["coords", "opt_proj"], ["west", "south", "east", "north"], [], ["coords", "opt_proj", "opt_geodesic", "opt_maxError"], ["params", "opt_callback"], ["var_args"], ["params", "opt_callback"],
|
|
27305
|
+
["opt_args"], ["opt_visParams", "opt_callback"], ["expression", "opt_map"], ["r", "g", "b"], ["var_args"], ["geometry"], ["opt_callback"], ["opt_visParams", "opt_callback"], ["params", "opt_callback"], ["var_args"], ["opt_callback"], ["selectors", "opt_names"], [], ["args"], ["params", "opt_callback"], ["opt_visParams", "opt_callback"], ["params", "opt_callback"], ["opt_visParams", "opt_callback"], ["imageCollection", "opt_linkedBands", "opt_linkedProperties", "opt_matchPropertyName"], ["list"],
|
|
27306
|
+
["number"], ["obj"], ["obj"], ["obj"], ["obj"], ["obj", "opt_isCompound"], ["obj"], ["obj"], ["string"], []];
|
|
27307
|
+
[ee.ApiFunction.lookup, ee.ApiFunction._apply, ee.ApiFunction._call, 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, module$contents$ee$batch_Export.video.toDrive,
|
|
27308
|
+
module$contents$ee$batch_Export.image.toAsset, module$contents$ee$batch_Export.table.toFeatureView, module$contents$ee$batch_Export.table.toDrive, module$contents$ee$batch_Export.video.toCloudStorage, ee.Collection.prototype.map, ee.Collection.prototype.filterDate, ee.Collection.prototype.filterBounds, ee.Collection.prototype.iterate, ee.Collection.prototype.limit, ee.Collection.prototype.filter, ee.Collection.prototype.filterMetadata, ee.Collection.prototype.sort, ee.ComputedObject.prototype.evaluate,
|
|
27309
|
+
ee.ComputedObject.prototype.getInfo, ee.ComputedObject.prototype.serialize, ee.ComputedObject.prototype.aside, ee.data.makeTableDownloadUrl, ee.data.setAssetAcl, ee.data.listBuckets, ee.data.setAssetProperties, ee.data.newTaskId, ee.data.getAssetRoots, ee.data.getAssetRootQuota, ee.data.getMapId, ee.data.createAssetHome, ee.data.getTaskStatus, ee.data.getTileUrl, ee.data.startIngestion, ee.data.getWorkloadTag, ee.data.createAsset, ee.data.setWorkloadTag, ee.data.createFolder, ee.data.getTaskList,
|
|
27310
|
+
ee.data.setDefaultWorkloadTag, ee.data.getFeatureViewTilesKey, ee.data.resetWorkloadTag, ee.data.renameAsset, ee.data.getTaskListWithLimit, ee.data.startTableIngestion, ee.data.listOperations, ee.data.listFeatures, ee.data.copyAsset, ee.data.computeValue, ee.data.cancelOperation, ee.data.getVideoThumbId, ee.data.deleteAsset, ee.data.getThumbId, ee.data.getAsset, ee.data.authenticateViaOauth, ee.data.getOperation, ee.data.getAssetAcl, ee.data.getInfo, ee.data.getFilmstripThumbId, ee.data.authenticate,
|
|
27311
|
+
ee.data.cancelTask, ee.data.getList, ee.data.makeThumbUrl, ee.data.listAssets, ee.data.authenticateViaPopup, ee.data.updateTask, ee.data.listImages, ee.data.getDownloadId, ee.data.getTableDownloadId, ee.data.makeDownloadUrl, ee.data.startProcessing, ee.data.authenticateViaPrivateKey, ee.data.updateAsset, ee.Date, ee.Deserializer.decodeCloudApi, ee.Deserializer.fromJSON, ee.Deserializer.fromCloudApiJSON, ee.Deserializer.decode, ee.Dictionary, ee.reset, ee.Algorithms, ee.InitState, ee.call, ee.apply,
|
|
27312
|
+
ee.initialize, ee.TILE_SIZE, ee.Element.prototype.set, ee.Encodable.SourceFrame, ee.Feature, ee.Feature.prototype.getMap, ee.Feature.prototype.getInfo, ee.Feature.prototype.getMapId, ee.FeatureCollection.prototype.getMap, ee.FeatureCollection, ee.FeatureCollection.prototype.getDownloadURL, ee.FeatureCollection.prototype.getInfo, ee.FeatureCollection.prototype.getMapId, ee.FeatureCollection.prototype.select, ee.Filter.gt, ee.Filter.metadata, ee.Filter.neq, ee.Filter.lte, ee.Filter.prototype.not,
|
|
27313
|
+
ee.Filter, ee.Filter.and, ee.Filter.bounds, ee.Filter.gte, ee.Filter.or, ee.Filter.eq, ee.Filter.date, ee.Filter.inList, ee.Filter.lt, ee.Function.prototype.call, ee.Function.prototype.apply, ee.Geometry.LineString, ee.Geometry.Rectangle, ee.Geometry.prototype.toGeoJSONString, ee.Geometry.prototype.serialize, ee.Geometry.Polygon, ee.Geometry.Point, ee.Geometry.MultiPolygon, ee.Geometry.LinearRing, ee.Geometry, ee.Geometry.MultiPoint, ee.Geometry.BBox, ee.Geometry.prototype.toGeoJSON, ee.Geometry.MultiLineString,
|
|
27314
|
+
ee.Image.prototype.getDownloadURL, ee.Image.prototype.rename, ee.Image.prototype.getThumbId, ee.Image, ee.Image.prototype.getMap, ee.Image.prototype.expression, ee.Image.rgb, ee.Image.cat, ee.Image.prototype.clip, ee.Image.prototype.getInfo, ee.Image.prototype.getMapId, ee.Image.prototype.getThumbURL, ee.Image.prototype.select, ee.ImageCollection.prototype.getInfo, ee.ImageCollection.prototype.select, ee.ImageCollection.prototype.first, ee.ImageCollection, ee.ImageCollection.prototype.getFilmstripThumbURL,
|
|
27315
|
+
ee.ImageCollection.prototype.getMapId, ee.ImageCollection.prototype.getVideoThumbURL, ee.ImageCollection.prototype.getMap, ee.ImageCollection.prototype.linkCollection, ee.List, ee.Number, ee.Serializer.encodeCloudApi, ee.Serializer.toReadableJSON, ee.Serializer.toCloudApiJSON, ee.Serializer.toReadableCloudApiJSON, ee.Serializer.encode, 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.3';
|
|
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>. */
|