Skip to content

Commit 8b7ce46

Browse files
authored
FirebaseML - adding Long Running Operation support (#951)
* FirebaseML - adding Long Running Operation support
1 parent 82ced1e commit 8b7ce46

9 files changed

+636
-164
lines changed

package-lock.json

Lines changed: 35 additions & 26 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/index.d.ts

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1068,8 +1068,8 @@ declare namespace admin.remoteConfig {
10681068
* The `nextPageToken` value returned from a previous list versions request, if any.
10691069
*/
10701070
pageToken?: string;
1071-
1072-
/**
1071+
1072+
/**
10731073
* Specifies the newest version number to include in the results.
10741074
* If specified, must be greater than zero. Defaults to the newest version.
10751075
*/
@@ -1126,9 +1126,9 @@ declare namespace admin.remoteConfig {
11261126
/**
11271127
* Gets the requested version of the {@link admin.remoteConfig.RemoteConfigTemplate
11281128
* `RemoteConfigTemplate`} of the project.
1129-
*
1129+
*
11301130
* @param versionNumber Version number of the Remote Config template to look up.
1131-
*
1131+
*
11321132
* @return A promise that fulfills with a `RemoteConfigTemplate`.
11331133
*/
11341134
getTemplateAtVersion(versionNumber: number | string): Promise<RemoteConfigTemplate>;
@@ -1161,7 +1161,7 @@ declare namespace admin.remoteConfig {
11611161
* Rolls back a project's published Remote Config template to the specified version.
11621162
* A rollback is equivalent to getting a previously published Remote Config
11631163
* template and re-publishing it using a force update.
1164-
*
1164+
*
11651165
* @param versionNumber The version number of the Remote Config template to roll back to.
11661166
* The specified version number must be lower than the current version number, and not have
11671167
* been deleted due to staleness. Only the last 300 versions are stored.
@@ -1172,11 +1172,11 @@ declare namespace admin.remoteConfig {
11721172
rollback(versionNumber: string | number): Promise<RemoteConfigTemplate>;
11731173

11741174
/**
1175-
* Gets a list of Remote Config template versions that have been published, sorted in reverse
1175+
* Gets a list of Remote Config template versions that have been published, sorted in reverse
11761176
* chronological order. Only the last 300 versions are stored.
1177-
* All versions that correspond to non-active Remote Config templates (that is, all except the
1177+
* All versions that correspond to non-active Remote Config templates (that is, all except the
11781178
* template that is being fetched by clients) are also deleted if they are more than 90 days old.
1179-
*
1179+
*
11801180
* @param options Optional {@link admin.remoteConfig.ListVersionsOptions `ListVersionsOptions`}
11811181
* object for getting a list of template versions.
11821182
* @return A promise that fulfills with a `ListVersionsResult`.
@@ -1317,12 +1317,18 @@ declare namespace admin.machineLearning {
13171317
/**
13181318
* Wait for the model to be unlocked.
13191319
*
1320-
* @param {number} maxTimeSeconds The maximum time in seconds to wait.
1320+
* @param {number} maxTimeMillis The maximum time in milliseconds to wait.
1321+
* If not specified, a default maximum of 2 minutes is used.
13211322
*
13221323
* @return {Promise<void>} A promise that resolves when the model is unlocked
13231324
* or the maximum wait time has passed.
13241325
*/
1325-
waitForUnlocked(maxTimeSeconds?: number): Promise<void>;
1326+
waitForUnlocked(maxTimeMillis?: number): Promise<void>;
1327+
1328+
/**
1329+
* Return the model as a JSON object.
1330+
*/
1331+
toJSON(): {[key: string]: any};
13261332

13271333
/** Metadata about the model's TensorFlow Lite model file. */
13281334
readonly tfliteModel?: TFLiteModel;

0 commit comments

Comments
 (0)