index.d.ts 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /*! firebase-admin v12.1.1 */
  2. /*!
  3. * @license
  4. * Copyright 2021 Google Inc.
  5. *
  6. * Licensed under the Apache License, Version 2.0 (the "License");
  7. * you may not use this file except in compliance with the License.
  8. * You may obtain a copy of the License at
  9. *
  10. * http://www.apache.org/licenses/LICENSE-2.0
  11. *
  12. * Unless required by applicable law or agreed to in writing, software
  13. * distributed under the License is distributed on an "AS IS" BASIS,
  14. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15. * See the License for the specific language governing permissions and
  16. * limitations under the License.
  17. */
  18. /**
  19. * Firebase Extensions service.
  20. *
  21. * @packageDocumentation
  22. */
  23. import { App } from '../app';
  24. import { Extensions } from './extensions';
  25. export { Extensions, Runtime } from './extensions';
  26. export { SettableProcessingState } from './extensions-api';
  27. /**
  28. * Gets the {@link Extensions} service for the default app
  29. * or a given app.
  30. *
  31. * `getExtensions()` can be called with no arguments to access the default
  32. * app's `Extensions` service or as `getExtensions(app)` to access the
  33. * `Extensions` service associated with a specific app.
  34. *
  35. * @example
  36. * ```javascript
  37. * // Get the `Extensions` service for the default app
  38. * const defaultExtensions = getExtensions();
  39. * ```
  40. *
  41. * @example
  42. * ```javascript
  43. * // Get the `Extensions` service for a given app
  44. * const otherExtensions = getExtensions(otherApp);
  45. * ```
  46. *
  47. * @param app - Optional app for which to return the `Extensions` service.
  48. * If not provided, the default `Extensions` service is returned.
  49. *
  50. * @returns The default `Extensions` service if no app is provided, or the `Extensions`
  51. * service associated with the provided app.
  52. */
  53. export declare function getExtensions(app?: App): Extensions;