import type { App } from 'vue'; import type { Awaitable } from '@vueuse/core'; import type { Store, defineStore } from 'pinia'; type GProduct = { id?: string; title?: string; url?: string; uiAssetsUrl?: string; needImportLicense?: boolean; needUpdateExpiredLicense?: boolean; }; type TopNavResponse = { icon?: string; favicon?: string; navName?: string; tabName?: string; portalUrl?: string; }; type GProductLicense = { id?: string; name?: string; module?: string; level?: string; status?: string; expiredAt?: string; }; type GetGProductLicensesOverQuotaResponse = { expireSoonLicenses?: GProductLicense[]; expiredLicenses?: GProductLicense[]; }; type State = { idToken: string; username: string; email: string; uid: string; locale: string; productList: GProduct[]; noticeUnread: number; navConfig: TopNavResponse; license: GetGProductLicensesOverQuotaResponse; activeAppName: string; }; export type globalStore = Store (GProduct | undefined); hasProduct(state: State): (productId: string) => boolean; getProductLink(state: State): (productId: string, to: string) => string; }, { setIdToken(val: string): void; setUsername(val: string): void; setEmail(val: string): void; setUid(val: string): void; setLocale(val: string): Promise; setProductList(val: GProduct[]): void; setNoticeUnread(val: number): void; setNavConfig(val: TopNavResponse): void; setLicense(val: GetGProductLicensesOverQuotaResponse): void; setActiveAppName(val: string): void; setTitle(val: string): void; }>; export type LoadLanguageAsyncFn = (lang?: string) => Promise; export type RegisterGlobalStoreHandler = (app: App, defineStoreFn: typeof defineStore) => globalStore; export type RegisterLoadLanguageAsyncHandler = (loadLanguageAsyncFn: LoadLanguageAsyncFn) => Set; export interface FetchContext { request: RequestInfo; options: Partial; response?: Response; error?: Error; } export type RegisterErrorHandlers = (errorHandler: (ctx: FetchContext) => Awaitable) => void; declare module 'vue' { interface ComponentCustomProperties { $globalStore?: globalStore; } } export {};