1 | /*! firebase-admin v13.0.1 */
|
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 | */
|
17 | import { App } from '../app';
|
18 | import { ListModelsResult as TListModelsResult, MachineLearning as TMachineLearning, Model as TModel, TFLiteModel as TTFLiteModel } from './machine-learning';
|
19 | import { 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 | */
|
47 | export declare function machineLearning(app?: App): machineLearning.MachineLearning;
|
48 | export 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#GcsTfliteModelOptions}.
|
67 | */
|
68 | type GcsTfliteModelOptions = TGcsTfliteModelOptions;
|
69 | /**
|
70 | * Type alias to {@link firebase-admin.machine-learning#ListModelsOptions}.
|
71 | */
|
72 | type ListModelsOptions = TListModelsOptions;
|
73 | /**
|
74 | * Type alias to {@link firebase-admin.machine-learning#ModelOptions}.
|
75 | */
|
76 | type ModelOptions = TModelOptions;
|
77 | /**
|
78 | * Type alias to {@link firebase-admin.machine-learning#ModelOptionsBase}.
|
79 | */
|
80 | type ModelOptionsBase = TModelOptionsBase;
|
81 | }
|