instance-id-namespace.d.ts 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /*! firebase-admin v12.1.1 */
  2. import { App } from '../app/index';
  3. import { InstanceId as TInstanceId } from './instance-id';
  4. /**
  5. * Gets the {@link firebase-admin.instance-id#InstanceId} service for the
  6. * default app or a given app.
  7. *
  8. * `admin.instanceId()` can be called with no arguments to access the default
  9. * app's `InstanceId` service or as `admin.instanceId(app)` to access the
  10. * `InstanceId` service associated with a specific app.
  11. *
  12. * @example
  13. * ```javascript
  14. * // Get the Instance ID service for the default app
  15. * var defaultInstanceId = admin.instanceId();
  16. * ```
  17. *
  18. * @example
  19. * ```javascript
  20. * // Get the Instance ID service for a given app
  21. * var otherInstanceId = admin.instanceId(otherApp);
  22. *```
  23. *
  24. * @param app - Optional app whose `InstanceId` service to
  25. * return. If not provided, the default `InstanceId` service will be
  26. * returned.
  27. *
  28. * @returns The default `InstanceId` service if
  29. * no app is provided or the `InstanceId` service associated with the
  30. * provided app.
  31. */
  32. export declare function instanceId(app?: App): instanceId.InstanceId;
  33. export declare namespace instanceId {
  34. /**
  35. * Type alias to {@link firebase-admin.instance-id#InstanceId}.
  36. */
  37. type InstanceId = TInstanceId;
  38. }