UNPKG

3.43 kBTypeScriptView Raw
1/*! firebase-admin v10.0.0 */
2/*!
3 * Copyright 2021 Google Inc.
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17import { App } from '../app';
18import { ListModelsResult as TListModelsResult, MachineLearning as TMachineLearning, Model as TModel, TFLiteModel as TTFLiteModel } from './machine-learning';
19import { AutoMLTfliteModelOptions as TAutoMLTfliteModelOptions, GcsTfliteModelOptions as TGcsTfliteModelOptions, ListModelsOptions as TListModelsOptions, ModelOptions as TModelOptions, ModelOptionsBase as TModelOptionsBase } from './machine-learning-api-client';
20/**
21 * Gets the {@link firebase-admin.machine-learning#MachineLearning} service for the
22 * default app or a given app.
23 *
24 * `admin.machineLearning()` can be called with no arguments to access the
25 * default app's `MachineLearning` service or as `admin.machineLearning(app)` to access
26 * the `MachineLearning` service associated with a specific app.
27 *
28 * @example
29 * ```javascript
30 * // Get the MachineLearning service for the default app
31 * var defaultMachineLearning = admin.machineLearning();
32 * ```
33 *
34 * @example
35 * ```javascript
36 * // Get the MachineLearning service for a given app
37 * var otherMachineLearning = admin.machineLearning(otherApp);
38 * ```
39 *
40 * @param app - Optional app whose `MachineLearning` service to
41 * return. If not provided, the default `MachineLearning` service
42 * will be returned.
43 *
44 * @returns The default `MachineLearning` service if no app is provided or the
45 * `MachineLearning` service associated with the provided app.
46 */
47export declare function machineLearning(app?: App): machineLearning.MachineLearning;
48export declare namespace machineLearning {
49 /**
50 * Type alias to {@link firebase-admin.machine-learning#ListModelsResult}.
51 */
52 type ListModelsResult = TListModelsResult;
53 /**
54 * Type alias to {@link firebase-admin.machine-learning#MachineLearning}.
55 */
56 type MachineLearning = TMachineLearning;
57 /**
58 * Type alias to {@link firebase-admin.machine-learning#Model}.
59 */
60 type Model = TModel;
61 /**
62 * Type alias to {@link firebase-admin.machine-learning#TFLiteModel}.
63 */
64 type TFLiteModel = TTFLiteModel;
65 /**
66 * Type alias to {@link firebase-admin.machine-learning#AutoMLTfliteModelOptions}.
67 */
68 type AutoMLTfliteModelOptions = TAutoMLTfliteModelOptions;
69 /**
70 * Type alias to {@link firebase-admin.machine-learning#GcsTfliteModelOptions}.
71 */
72 type GcsTfliteModelOptions = TGcsTfliteModelOptions;
73 /**
74 * Type alias to {@link firebase-admin.machine-learning#ListModelsOptions}.
75 */
76 type ListModelsOptions = TListModelsOptions;
77 /**
78 * Type alias to {@link firebase-admin.machine-learning#ModelOptions}.
79 */
80 type ModelOptions = TModelOptions;
81 /**
82 * Type alias to {@link firebase-admin.machine-learning#ModelOptionsBase}.
83 */
84 type ModelOptionsBase = TModelOptionsBase;
85}