import * as _nuxt_schema from '@nuxt/schema'; import { FirebaseOptions, FirebaseApp } from 'firebase/app'; import { App } from 'firebase-admin/app'; import * as firebase_auth from 'firebase/auth'; import { AppOptions } from 'firebase-admin'; import { NuxtVueFireAppCheckOptions } from '../dist/runtime/app-check/index.js'; export { NuxtVueFireAppCheckOptions, NuxtVueFireAppCheckOptionsReCaptchaEnterprise, NuxtVueFireAppCheckOptionsReCaptchaV3 } from '../dist/runtime/app-check/index.js'; interface VueFireNuxtAuthDependencies { /** * Map of errors. Defaults to debug during dev and to prod during production. Should not be changed unless you know * what you are doing. */ errorMap?: 'debug' | 'prod' | false; /** * The popup redirect resolver. Defaults to `browser`. Can be set to `false` to disable it. */ popupRedirectResolver?: 'browser' | false; /** * The persistence to use. Defaults to `['indexedDBLocal', 'browserLocal']`. */ persistence?: Array<'indexedDBLocal' | 'browserLocal' | 'browserSession' | 'inMemory'>; } interface VueFireNuxtModuleOptions { /** * Should we add the `VueFireFirestoreOptionsAPI` and `VueFireRealtimeDatabaseOptionsAPI` modules?. Pass `true` to add * both, or `'firestore'` or `'realtime-database'` to add only one. Pass false to disable. * @defaultValue `false` */ optionsApiPlugin?: boolean | 'firestore' | 'database'; /** * Firebase Options passed to `firebase/app`'s `initializeApp()`. */ config?: FirebaseOptions; /** * Firebase Admin Options. */ admin?: { /** * Firebase Admin Options passed to `firebase-admin`'s `initializeApp()`. */ options?: Omit; }; /** * Enables AppCheck on the client and server. Note you only need to pass the options for the client, on the server, * the configuration will be handled automatically. */ appCheck?: NuxtVueFireAppCheckOptions; /** * Enables the Authentication module without the session cookie. Pass an object to enable other features. * @defaultValue `false` */ auth?: boolean | ({ /** * Adds the Authentication module to VueFire. * @defaultValue `false` */ enabled?: boolean; /** * Enables the `/api/__session` endpoint to mint cookies and verifying the user during SSR. This requires you to * configure a [valid Service * Account](https://vuefire.vuejs.org/nuxt/getting-started.html#Configuring-the-Admin-SDK) and the valid * permissions on your Google Cloud project. You can find more information about what happens behind the scenes * in Firebase docs: [Manage Session Cookies](https://firebase.google.com/docs/auth/admin/manage-cookies). */ sessionCookie?: boolean | { /** * maxAge property of the cookie. Defaults to 5 days. */ maxAge?: number; /** * Whether to use a secure cookie. Defaults to `true`. */ secure?: boolean; /** * Whether to use a httpOnly cookie. Defaults to `true`. */ httpOnly?: boolean; /** * The path of the cookie. Defaults to `/`. */ path: string; /** * The sameSite property of the cookie. Defaults to `lax`. */ sameSite: 'lax' | 'strict' | 'none'; }; } & VueFireNuxtAuthDependencies); /** * Controls whether to use emulators or not. Pass `false` to disable emulators. When set to `true`, emulators are * enabled when they are detected in the `firebase.json` file. You still need to run the emulators in parallel to your * app. * * @defaultValue `true` * @experimental */ emulators?: boolean | { /** * Enables the emulators. */ enabled?: boolean; /** * The host for the Firestore emulator. Defaults to `localhost`. */ host?: string; auth?: { /** * Pass options to `firebase/auth`'s `connectAuthEmulator()`. */ options?: Parameters[2]; }; }; } interface VueFireNuxtModuleOptionsResolved extends Omit { config: Exclude; emulators: Exclude; auth: Exclude; } type FirebaseEmulatorService = 'auth' | 'database' | 'firestore' | 'functions' | 'storage'; type FirebaseEmulatorsToEnableBase = { [key in FirebaseEmulatorService]: { host: string; port: number; }; }; interface FirebaseEmulatorsToEnable extends FirebaseEmulatorsToEnableBase { auth: { host: string; port: number; options?: Parameters[2]; }; } declare const _default: _nuxt_schema.NuxtModule; /** * Type Extensions */ /** * Augments the Nuxt Runtime Config with the VueFire module options. */ interface VueFireRuntimeConfig { /** * Runtime config for the VueFire module. */ vuefire?: { /** * Firebase Admin SDK Options passed to the Nuxt VueFire module * @internal */ admin?: VueFireNuxtModuleOptionsResolved['admin']; /** * Authentication options. * @internal */ auth?: VueFireNuxtModuleOptionsResolved['auth']; }; } interface VueFirePublicRuntimeConfig { /** * Public Runtime config for the VueFire module. */ vuefire?: { /** * Emulators to enable. * * @internal */ emulators?: FirebaseEmulatorsToEnable; /** * Firebase config to initialize the app. * @internal */ config?: FirebaseOptions; /** * AppCheck options. * @internal */ appCheck?: VueFireNuxtModuleOptionsResolved['appCheck']; }; } declare module '@nuxt/schema' { interface RuntimeConfig extends VueFireRuntimeConfig { } interface PublicRuntimeConfig extends VueFirePublicRuntimeConfig { } } declare module '#app' { interface NuxtApp { /** * Firebase App instance. */ $firebaseApp: FirebaseApp; /** * Firebase Admin app. Only available on the server. */ $firebaseAdminApp: App; } } declare module 'vue' { interface ComponentCustomProperties { /** * Firebase App instance. */ $firebaseApp: FirebaseApp; /** * Firebase Admin app. Only available on the server. */ $firebaseAdminApp: App; } } export { type VueFireNuxtModuleOptions, _default as default };