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 Functions service.
  20. *
  21. * @packageDocumentation
  22. */
  23. import { App } from '../app';
  24. import { Functions } from './functions';
  25. export { DelayDelivery, AbsoluteDelivery, DeliverySchedule, TaskOptions, TaskOptionsExperimental, } from './functions-api';
  26. export { Functions, TaskQueue } from './functions';
  27. /**
  28. * Gets the {@link Functions} service for the default app
  29. * or a given app.
  30. *
  31. * `getFunctions()` can be called with no arguments to access the default
  32. * app's `Functions` service or as `getFunctions(app)` to access the
  33. * `Functions` service associated with a specific app.
  34. *
  35. * @example
  36. * ```javascript
  37. * // Get the `Functions` service for the default app
  38. * const defaultFunctions = getFunctions();
  39. * ```
  40. *
  41. * @example
  42. * ```javascript
  43. * // Get the `Functions` service for a given app
  44. * const otherFunctions = getFunctions(otherApp);
  45. * ```
  46. *
  47. * @param app - Optional app for which to return the `Functions` service.
  48. * If not provided, the default `Functions` service is returned.
  49. *
  50. * @returns The default `Functions` service if no app is provided, or the `Functions`
  51. * service associated with the provided app.
  52. */
  53. export declare function getFunctions(app?: App): Functions;