Nav apraksta
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

installations-public.d.ts 2.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. /**
  2. * Firebase Installations
  3. *
  4. * @packageDocumentation
  5. */
  6. import { FirebaseApp } from '@firebase/app';
  7. /**
  8. * Deletes the Firebase Installation and all associated data.
  9. * @param installations - The `Installations` instance.
  10. *
  11. * @public
  12. */
  13. export declare function deleteInstallations(installations: Installations): Promise<void>;
  14. /* Excluded from this release type: _FirebaseInstallationsInternal */
  15. /**
  16. * Creates a Firebase Installation if there isn't one for the app and
  17. * returns the Installation ID.
  18. * @param installations - The `Installations` instance.
  19. *
  20. * @public
  21. */
  22. export declare function getId(installations: Installations): Promise<string>;
  23. /**
  24. * Returns an instance of {@link Installations} associated with the given
  25. * {@link @firebase/app#FirebaseApp} instance.
  26. * @param app - The {@link @firebase/app#FirebaseApp} instance.
  27. *
  28. * @public
  29. */
  30. export declare function getInstallations(app?: FirebaseApp): Installations;
  31. /**
  32. * Returns a Firebase Installations auth token, identifying the current
  33. * Firebase Installation.
  34. * @param installations - The `Installations` instance.
  35. * @param forceRefresh - Force refresh regardless of token expiration.
  36. *
  37. * @public
  38. */
  39. export declare function getToken(installations: Installations, forceRefresh?: boolean): Promise<string>;
  40. /**
  41. * An user defined callback function that gets called when Installations ID changes.
  42. *
  43. * @public
  44. */
  45. export declare type IdChangeCallbackFn = (installationId: string) => void;
  46. /**
  47. * Unsubscribe a callback function previously added via {@link IdChangeCallbackFn}.
  48. *
  49. * @public
  50. */
  51. export declare type IdChangeUnsubscribeFn = () => void;
  52. /**
  53. * Public interface of the Firebase Installations SDK.
  54. *
  55. * @public
  56. */
  57. export declare interface Installations {
  58. /**
  59. * The {@link @firebase/app#FirebaseApp} this `Installations` instance is associated with.
  60. */
  61. app: FirebaseApp;
  62. }
  63. /**
  64. * Sets a new callback that will get called when Installation ID changes.
  65. * Returns an unsubscribe function that will remove the callback when called.
  66. * @param installations - The `Installations` instance.
  67. * @param callback - The callback function that is invoked when FID changes.
  68. * @returns A function that can be called to unsubscribe.
  69. *
  70. * @public
  71. */
  72. export declare function onIdChange(installations: Installations, callback: IdChangeCallbackFn): IdChangeUnsubscribeFn;
  73. export { }