/// /// /// import type { TemplateResult } from "lit"; interface PWAIcons { src: string; sizes: string; type: string; purpose: string; } interface PWA { dir: string; icons: PWAIcons[]; start_url: string; display: string; orientation: string; background_color: string; theme_color: string; } interface I18n { lang: string; force: boolean; } interface ComponentParameters { replacement?: string; bindResources?: string; bindUser?: string; dataSrc?: string; nestedField?: string; authority?: string; authorityName?: string; noRender?: string; } interface OrbitComponent { type?: string; parameters: ComponentParameters; route: string | false; integration?: string[]; uniq?: string; experimental?: string[]; routeAttributes?: { "rdf-type": string; "use-id": string; }; defaultRoute?: boolean; extensions?: OrbitComponent[]; attributes?: Record; instance?: Element; } interface OrbitClient { name: string; logo: string; server?: string; css?: string[] | string | false; description?: string; favicon?: string; defaultAvatar?: string; i18n?: I18n; pwa?: PWA; } interface NpmPackage { package: string; version: string; path: string; } export interface Orbit { client: OrbitClient; components: OrbitComponent[]; npm?: NpmPackage[]; } export interface LiveOrbit extends Orbit { componentSet: Set; federations: Record; getDefaultRoute: () => string; getComponent: (type: string) => OrbitComponent | undefined; getComponentFromRoute: (route: string) => OrbitComponent | undefined; getRoute: ( type: string, returnFirst?: boolean, ignoreError?: boolean ) => string | false; Swal: any; defaultRoute: string; } export type Context = Record; export type Permission = "add" | "delete" | "change" | "control" | "view" | string; export type DateTime = string; export interface LimitedResource { "@id": string; "@type"?: string | string[] | Promise; _originalResource?: Resource; properties?: string[] | Promise; permissions?: Permission[]; clientContext?: Context | Promise; serverContext?: Context | Promise; } export interface Resource extends LimitedResource { [key: string]: any; } export interface UnknownResource { [key: string]: any; } interface Container extends Resource { "ldp:contains": T[]; } type ProxyValue = T extends Array ? U[] : Resource & T; export interface User extends Resource { account?: Account; first_name?: string; last_name?: string; name?: string; username?: string; email?: string; } export interface Account extends Resource { picture?: string | null; } export interface PropertiesPicker { key: string; value: string; cast?: function; expand?: boolean; } export type TemplateResultOrSymbol = TemplateResult | symbol; export declare global { interface Window { orbit: LiveOrbit; sibStore: { getData: ProxyValue; [key: string]: any }; sibRouter: { [key: string]: any }; } interface Element { currentRouteName: string; } interface Event { [key: string]: any; } interface EventTarget { [key: string]: any; } }