index.d.ts 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /*! firebase-admin v12.1.1 */
  2. /*!
  3. * Copyright 2020 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. /**
  18. * Firebase Machine Learning.
  19. *
  20. * @packageDocumentation
  21. */
  22. import { App } from '../app';
  23. import { MachineLearning } from './machine-learning';
  24. export { MachineLearning, ListModelsResult, Model, TFLiteModel, } from './machine-learning';
  25. export { GcsTfliteModelOptions, ListModelsOptions, ModelOptions, ModelOptionsBase, } from './machine-learning-api-client';
  26. /**
  27. * Gets the {@link MachineLearning} service for the default app or a given app.
  28. *
  29. * `getMachineLearning()` can be called with no arguments to access the
  30. * default app's `MachineLearning` service or as `getMachineLearning(app)` to access
  31. * the `MachineLearning` service associated with a specific app.
  32. *
  33. * @example
  34. * ```javascript
  35. * // Get the MachineLearning service for the default app
  36. * const defaultMachineLearning = getMachineLearning();
  37. * ```
  38. *
  39. * @example
  40. * ```javascript
  41. * // Get the MachineLearning service for a given app
  42. * const otherMachineLearning = getMachineLearning(otherApp);
  43. * ```
  44. *
  45. * @param app - Optional app whose `MachineLearning` service to
  46. * return. If not provided, the default `MachineLearning` service
  47. * will be returned.
  48. *
  49. * @returns The default `MachineLearning` service if no app is provided or the
  50. * `MachineLearning` service associated with the provided app.
  51. */
  52. export declare function getMachineLearning(app?: App): MachineLearning;