Skip to content

Update docstrings #1004

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Aug 21, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 25 additions & 11 deletions src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1224,14 +1224,20 @@ declare namespace admin.machineLearning {

/**
* A TensorFlow Lite Model output object
*
* One of either the `gcsTfliteUri` or `automlModel` properties will be
* defined.
*/
interface TFLiteModel {
/** The size of the model. */
readonly sizeBytes: number;

/** The URI from which the model was originally provided to Firebase. */
readonly gcsTfliteUri?: string;
/** The AutoML URI from which the model was originally provided to Firebase. */
/**
* The AutoML model reference from which the model was originally provided
* to Firebase.
*/
readonly automlModel?: string;
}

Expand All @@ -1242,10 +1248,16 @@ declare namespace admin.machineLearning {
/** The ID of the model. */
readonly modelId: string;

/** The model's name. This is the name you use from your app to load the model. */
/**
* The model's name. This is the name you use from your app to load the
* model.
*/
readonly displayName: string;

/** The model's tags. */
/**
* The model's tags, which can be used to group or filter models in list
* operations.
*/
readonly tags?: string[];

/** The timestamp of the model's creation. */
Expand Down Expand Up @@ -1314,7 +1326,7 @@ declare namespace admin.machineLearning {
* state.published = true
* ```
*
* See https://firebase.google.com/docs/ml-kit/manage-hosted-models#list_your_projects_models
* See https://firebase.google.com/docs/ml/manage-hosted-models#list_your_projects_models
*/
filter?: string;

Expand Down Expand Up @@ -1352,7 +1364,7 @@ declare namespace admin.machineLearning {
app: admin.app.App;

/**
* Creates a model in Firebase ML.
* Creates a model in the current Firebase project.
*
* @param {ModelOptions} model The model to create.
*
Expand All @@ -1361,7 +1373,7 @@ declare namespace admin.machineLearning {
createModel(model: ModelOptions): Promise<Model>;

/**
* Updates a model in Firebase ML.
* Updates a model's metadata or model file.
*
* @param {string} modelId The ID of the model to update.
* @param {ModelOptions} model The model fields to update.
Expand All @@ -1371,7 +1383,9 @@ declare namespace admin.machineLearning {
updateModel(modelId: string, model: ModelOptions): Promise<Model>;

/**
* Publishes a model in Firebase ML.
* Publishes a Firebase ML model.
*
* A published model can be downloaded to client apps.
*
* @param {string} modelId The ID of the model to publish.
*
Expand All @@ -1380,7 +1394,7 @@ declare namespace admin.machineLearning {
publishModel(modelId: string): Promise<Model>;

/**
* Unpublishes a model in Firebase ML.
* Unpublishes a Firebase ML model.
*
* @param {string} modelId The ID of the model to unpublish.
*
Expand All @@ -1389,7 +1403,7 @@ declare namespace admin.machineLearning {
unpublishModel(modelId: string): Promise<Model>;

/**
* Gets a model from Firebase ML.
* Gets the model specified by the given ID.
*
* @param {string} modelId The ID of the model to get.
*
Expand All @@ -1398,7 +1412,7 @@ declare namespace admin.machineLearning {
getModel(modelId: string): Promise<Model>;

/**
* Lists models from Firebase ML.
* Lists the current project's models.
*
* @param {ListModelsOptions} options The listing options.
*
Expand All @@ -1410,7 +1424,7 @@ declare namespace admin.machineLearning {
listModels(options?: ListModelsOptions): Promise<ListModelsResult>;

/**
* Deletes a model from Firebase ML.
* Deletes a model from the current project.
*
* @param {string} modelId The ID of the model to delete.
*/
Expand Down