functions.d.ts 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. /**
  2. * @license
  3. * Copyright 2020 Google LLC
  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. /** Available in the browser. See static/anonymous.js */
  18. export declare enum AnonFunction {
  19. SIGN_IN_ANONYMOUSLY = "anonymous.anonymousSignIn"
  20. }
  21. /** Available redirect functions. See static/redirect.js */
  22. export declare enum RedirectFunction {
  23. IDP_REDIRECT = "redirect.idpRedirect",
  24. IDP_REAUTH_REDIRECT = "redirect.idpReauthRedirect",
  25. IDP_LINK_REDIRECT = "redirect.idpLinkRedirect",
  26. REDIRECT_RESULT = "redirect.redirectResult",
  27. GENERATE_CREDENTIAL_FROM_RESULT = "redirect.generateCredentialFromRedirectResultAndStore",
  28. SIGN_IN_WITH_REDIRECT_CREDENTIAL = "redirect.signInWithRedirectCredential",
  29. LINK_WITH_ERROR_CREDENTIAL = "redirect.linkWithErrorCredential",
  30. CREATE_FAKE_GOOGLE_USER = "redirect.createFakeGoogleUser",
  31. TRY_TO_SIGN_IN_UNVERIFIED = "redirect.tryToSignInUnverified"
  32. }
  33. /** Available popup functions. See static/popup.js */
  34. export declare enum PopupFunction {
  35. IDP_POPUP = "popup.idpPopup",
  36. IDP_REAUTH_POPUP = "popup.idpReauthPopup",
  37. IDP_LINK_POPUP = "popup.idpLinkPopup",
  38. POPUP_RESULT = "popup.popupResult",
  39. GENERATE_CREDENTIAL_FROM_RESULT = "popup.generateCredentialFromResult",
  40. SIGN_IN_WITH_POPUP_CREDENTIAL = "popup.signInWithPopupCredential",
  41. LINK_WITH_ERROR_CREDENTIAL = "popup.linkWithErrorCredential",
  42. CREATE_FAKE_GOOGLE_USER = "popup.createFakeGoogleUser",
  43. TRY_TO_SIGN_IN_UNVERIFIED = "popup.tryToSignInUnverified"
  44. }
  45. /** Available email functions. See static/email.js */
  46. export declare enum EmailFunction {
  47. CREATE_USER = "email.createUser"
  48. }
  49. /** Available core functions within the browser. See static/core.js */
  50. export declare enum CoreFunction {
  51. RESET = "core.reset",
  52. AWAIT_AUTH_INIT = "core.authInit",
  53. USER_SNAPSHOT = "core.userSnap",
  54. AUTH_SNAPSHOT = "core.authSnap",
  55. SIGN_OUT = "core.signOut",
  56. AWAIT_LEGACY_AUTH_INIT = "core.legacyAuthInit",
  57. LEGACY_USER_SNAPSHOT = "core.legacyUserSnap"
  58. }
  59. /** Available persistence functions within the browser. See static/persistence.js */
  60. export declare enum PersistenceFunction {
  61. CLEAR_PERSISTENCE = "persistence.clearPersistence",
  62. LOCAL_STORAGE_SNAP = "persistence.localStorageSnap",
  63. LOCAL_STORAGE_SET = "persistence.localStorageSet",
  64. SESSION_STORAGE_SNAP = "persistence.sessionStorageSnap",
  65. SESSION_STORAGE_SET = "persistence.sessionStorageSet",
  66. INDEXED_DB_SNAP = "persistence.indexedDBSnap",
  67. MAKE_INDEXED_DB_READONLY = "persistence.makeIndexedDBReadonly",
  68. SET_PERSISTENCE_MEMORY = "persistence.setPersistenceMemory",
  69. SET_PERSISTENCE_SESSION = "persistence.setPersistenceSession",
  70. SET_PERSISTENCE_INDEXED_DB = "persistence.setPersistenceIndexedDB",
  71. SET_PERSISTENCE_LOCAL_STORAGE = "persistence.setPersistenceLocalStorage"
  72. }
  73. export declare enum MiddlewareFunction {
  74. ATTACH_BLOCKING_MIDDLEWARE = "middleware.attachBlockingMiddleware",
  75. ATTACH_BLOCKING_MIDDLEWARE_ON_START = "middleware.attachBlockingMiddlewareOnStart"
  76. }
  77. /** Available firebase UI functions (only for compat tests) */
  78. export declare enum UiFunction {
  79. LOAD = "ui.loadUiCode",
  80. START = "ui.startUi"
  81. }