import { Libp2p } from "@libp2p/interface"; import { எண்ணிக்கை } from "ennikkai"; import { TypedFeed, TypedKeyValue, TypedOrderedKeyValue, TypedSet } from "@constl/bohr-db"; import { JSONSchemaType } from "ajv"; import { HeliaLibp2p } from "helia"; import { TypedEmitter } from "tiny-typed-emitter"; import { Automatisations } from "./automatisation.js"; import { BDs } from "./bds.js"; import { Épingles } from "./epingles.js"; import { Favoris, ÉpingleCompte, ÉpingleFavorisAvecId } from "./favoris.js"; import { Licences } from "./licences.js"; import { MotsClefs } from "./motsClefs.js"; import { Nuées } from "./nu\u00E9es.js"; import { Profil } from "./profil.js"; import { Projets } from "./projets.js"; import { Recherche } from "./recherche/index.js"; import { Réseau } from "./reseau.js"; import { Tableaux } from "./tableaux.js"; import { Variables } from "./variables.js"; import { type OptionsContrôleurConstellation } from "./acc\u00E8s/cntrlConstellation.js"; import { Jsonifiable, RecursivePartial, schémaFonctionOublier, schémaFonctionSuivi, schémaRetourFonctionRechercheParProfondeur, élémentsBd } from "./types.js"; import { rôles } from "./acc\u00E8s/consts.js"; import { type GestionnaireOrbite, Store } from "./orbite.js"; import { Protocoles } from "./protocoles.js"; import type { ServicesLibp2p } from "./sfip/index.js"; import type { ContenuMessageRejoindreCompte } from "./reseau.js"; import type { objRôles } from "./acc\u00E8s/types.js"; import type { SetDatabaseType } from "@orbitdb/set-db"; import type { OrderedKeyValueDatabaseType } from "@orbitdb/ordered-keyvalue-db"; import type { FeedDatabaseType } from "@orbitdb/feed-db"; import type { createOrbitDB, OrbitDB, KeyValueDatabase, OpenDatabaseOptions } from "@orbitdb/core"; export declare const CLEF_N_CHANGEMENT_COMPTES = "n changements compte"; type schémaFonctionRéduction = (branches: T) => U; type ÉvénementsClient = { comptePrêt: (args: { idCompte: string; }) => void; erreurInitialisation: (args: Error) => void; sfipEtOrbitePrêts: (args: { sfip: HeliaLibp2p>; orbite: GestionnaireOrbite; }) => void; }; export type infoAccès = { idCompte: string; rôle: keyof objRôles; }; export interface Signature { signature: string; clefPublique: string; } export interface optsConstellation { dossier?: string; domaines?: string[]; pairsParDéfaut?: string[]; sujetRéseau?: string; protocoles?: string[]; orbite?: optsOrbite; messageVerrou?: string; } export type optsInitOrbite = Omit[0], "ipfs" | "directory"> & { directory?: string; ipfs?: HeliaLibp2p>; }; export type optsOrbite = OrbitDB | optsInitOrbite; export type structureBdCompte = { protocoles?: string; nomsDispositifs?: string; profil?: string; motsClefs?: string; variables?: string; bds?: string; projets?: string; nuées?: string; favoris?: string; réseau?: string; automatisations?: string; }; export declare const schémaStructureBdCompte: JSONSchemaType; export type structureNomsDispositifs = { [idDispositif: string]: { nom?: string; type?: string; }; }; export declare const schémaStructureNomsDispositifs: JSONSchemaType; export declare class Constellation { _opts: optsConstellation; événements: TypedEmitter<ÉvénementsClient>; orbite?: GestionnaireOrbite; sfip?: HeliaLibp2p>; épingles: Épingles; profil: Profil; bds: BDs; tableaux: Tableaux; variables: Variables; réseau: Réseau; favoris: Favoris; projets: Projets; recherche: Recherche; motsClefs: MotsClefs; automatisations: Automatisations; nuées: Nuées; licences: Licences; protocoles: Protocoles; erreurInitialisation?: Error; _orbiteExterne: boolean; _sfipExterne: boolean; idCompte?: string; sujet_réseau: string; motsDePasseRejoindreCompte: { [key: string]: number; }; ennikkai: எண்ணிக்கை; _intervaleVerrou?: NodeJS.Timeout; signaleurArrêt: AbortController; constructor(opts?: optsConstellation); dossier(): Promise; _initialiser(): Promise; _initialiserComposantes(): Promise; _fermerComposantes(): Promise; _créerBdCompte({ orbite }: { orbite: OrbitDB; }): Promise; épinglerCompte({ idCompte, options, }: { idCompte: string; options?: RecursivePartial<ÉpingleCompte>; }): Promise; suivreÉpingleCompte({ idCompte, f, idCompteQuiÉpingle, }: { idCompte: string; f: schémaFonctionSuivi<ÉpingleCompte | undefined>; idCompteQuiÉpingle?: string; }): Promise; détecterTypeDispositif(): string | undefined; attendreSfipEtOrbite(): Promise<{ orbite: GestionnaireOrbite; sfip: HeliaLibp2p>; }>; attendreInitialisée(): Promise<{ idCompte: string; }>; verrouillerDossier({ message }: { message?: string; }): Promise; spécifierMessageVerrou({ message, }: { message: Jsonifiable; }): Promise; effacerVerrou(): Promise; _générerSFIPetOrbite(): Promise<{ sfip: HeliaLibp2p>; orbite: OrbitDB; }>; obtOptionsAccès(): Promise; suivreRésolutionÉpingle({ épingle, f, ignorer, }: { épingle: ÉpingleFavorisAvecId<ÉpingleCompte>; f: schémaFonctionSuivi>; ignorer?: Set; }): Promise<() => Promise>; ouvrirBd({ id, type, signal, options, }: { id: string; type: "keyvalue"; signal?: AbortSignal; options?: Omit; }): Promise<{ bd: T; fOublier: schémaFonctionOublier; }>; ouvrirBd({ id, type, signal, options, }: { id: string; type: "feed"; signal?: AbortSignal; options?: Omit; }): Promise<{ bd: T; fOublier: schémaFonctionOublier; }>; ouvrirBd({ id, type, signal, options, }: { id: string; type: "set"; signal?: AbortSignal; options?: Omit; }): Promise<{ bd: T; fOublier: schémaFonctionOublier; }>; ouvrirBd({ id, type, signal, options, }: { id: string; type: "ordered-keyvalue"; signal?: AbortSignal; options?: Omit; }): Promise<{ bd: T; fOublier: schémaFonctionOublier; }>; ouvrirBd({ id, signal, }: { id: string; signal?: AbortSignal; options?: Omit; }): Promise<{ bd: T; fOublier: schémaFonctionOublier; }>; ouvrirBd({ id, type, signal, options, }: { id: string; type?: "keyvalue" | "feed" | "set" | "ordered-keyvalue"; signal?: AbortSignal; options?: Omit; }): Promise<{ bd: T; fOublier: schémaFonctionOublier; }>; ouvrirBdTypée>({ id, type, schéma, signal, options, }: { id: string; type: "keyvalue"; schéma: JSONSchemaType; signal?: AbortSignal; options?: Omit; }): Promise<{ bd: T; fOublier: schémaFonctionOublier; }>; ouvrirBdTypée>({ id, type, schéma, signal, options, }: { id: string; type: "feed"; schéma: JSONSchemaType; signal?: AbortSignal; options?: Omit; }): Promise<{ bd: T; fOublier: schémaFonctionOublier; }>; ouvrirBdTypée>({ id, type, schéma, signal, options, }: { id: string; type: "set"; schéma: JSONSchemaType; signal?: AbortSignal; options?: Omit; }): Promise<{ bd: T; fOublier: schémaFonctionOublier; }>; ouvrirBdTypée>({ id, type, schéma, signal, options, }: { id: string; type: "ordered-keyvalue"; schéma: JSONSchemaType; signal?: AbortSignal; options?: Omit; }): Promise<{ bd: T; fOublier: schémaFonctionOublier; }>; signer({ message }: { message: string; }): Promise; vérifierSignature({ signature, message, }: { signature: Signature; message: string; }): Promise; suivreDispositifs({ f, idCompte, }: { f: schémaFonctionSuivi; idCompte?: string; }): Promise; nommerDispositif({ idDispositif, nom, type, }: { idDispositif?: string; nom?: string; type?: string; }): Promise; suivreNomsDispositifs({ idCompte, f, }: { idCompte?: string; f: schémaFonctionSuivi; }): Promise; suivreNomDispositif({ idCompte, idDispositif, f, }: { idDispositif: string; idCompte?: string; f: schémaFonctionSuivi<{ type?: string; nom?: string; }>; }): Promise; générerInvitationRejoindreCompte(): Promise<{ idCompte: string; codeSecret: string; }>; révoquerInvitationRejoindreCompte({ codeSecret, }: { codeSecret?: string; }): Promise; considérerRequêteRejoindreCompte({ requête, }: { requête: ContenuMessageRejoindreCompte; }): Promise; empreinteInvitation({ idDispositif, codeSecret, }: { idDispositif: string; codeSecret: string; }): string; demanderEtPuisRejoindreCompte({ idCompte, codeSecret, }: { idCompte: string; codeSecret: string; }): Promise; ajouterDispositif({ idDispositif, }: { idDispositif: string; }): Promise; enleverDispositif({ idDispositif, }: { idDispositif: string; }): Promise; rejoindreCompte({ idCompte }: { idCompte: string; }): Promise; donnerAccès({ idBd, identité, rôle, }: { idBd: string; identité: string; rôle: keyof objRôles; }): Promise; suivreIdCompte({ f, }: { f: schémaFonctionSuivi; }): Promise; obtIdLibp2p(): Promise; obtIdDispositif(): Promise; obtIdentitéOrbite(): Promise; obtIdCompte(): Promise; copierContenuBdDic, C extends string, U extends { [clef: string]: élémentsBd; }>({ bdBase, nouvelleBd, clef, schéma, ordonnée, }: { bdBase: TypedKeyValue; nouvelleBd: TypedKeyValue; clef: C; schéma: JSONSchemaType; ordonnée?: boolean; }): Promise; suivreBd = TypedKeyValue>({ id, f, type, schéma, }: { id: string; f: schémaFonctionSuivi; type: "keyvalue"; schéma?: JSONSchemaType; }): schémaFonctionOublier; suivreBd>({ id, f, type, schéma, }: { id: string; f: schémaFonctionSuivi; type: "set"; schéma?: JSONSchemaType; }): schémaFonctionOublier; suivreBd>({ id, f, type, schéma, }: { id: string; f: schémaFonctionSuivi; type: "ordered-keyvalue"; schéma?: JSONSchemaType; }): schémaFonctionOublier; suivreBd({ id, f, }: { id: string; f: schémaFonctionSuivi; }): schémaFonctionOublier; suivreBdDeClef({ id, clef, f, fSuivre, }: { id: string; clef: string; f: schémaFonctionSuivi; fSuivre: (args: { id: string; fSuivreBd: schémaFonctionSuivi; }) => Promise; }): Promise; suivreBdDic({ id, schéma, f, }: { id: string; schéma?: JSONSchemaType; f: schémaFonctionSuivi; }): Promise; suivreBdDicOrdonnée({ id, schéma, f, }: { id: string; schéma?: JSONSchemaType; f: schémaFonctionSuivi<{ key: Extract; value: T[keyof T]; hash: string; }[]>; }): Promise; suivreBdDicDeClef({ id, clef, schéma, f, }: { id: string; clef: string; schéma: JSONSchemaType; f: schémaFonctionSuivi; }): Promise; suivreBdDicOrdonnéeDeClef({ id, clef, schéma, f, }: { id: string; clef: string; schéma: JSONSchemaType; f: schémaFonctionSuivi<{ key: string; value: T[keyof T]; }[]>; }): Promise; suivreBdListeDeClef({ id, clef, f, schéma, renvoyerValeur, }: { id: string; clef: string; f: schémaFonctionSuivi<{ value: T; hash: string; }[]>; schéma?: JSONSchemaType; renvoyerValeur: false; }): Promise; suivreBdListeDeClef({ id, clef, f, schéma, renvoyerValeur, }: { id: string; clef: string; f: schémaFonctionSuivi; schéma?: JSONSchemaType; renvoyerValeur?: true; }): Promise; suivreBdListeDeClef({ id, clef, f, schéma, renvoyerValeur, }: { id: string; clef: string; f: schémaFonctionSuivi; schéma?: JSONSchemaType; renvoyerValeur?: true; }): Promise; suivreBdListe({ id, f, schéma, renvoyerValeur, }: { id: string; f: schémaFonctionSuivi; schéma?: JSONSchemaType; renvoyerValeur?: true; }): Promise; suivreBdListe({ id, f, schéma, renvoyerValeur, }: { id: string; f: schémaFonctionSuivi<{ value: T; hash: string; }[]>; schéma?: JSONSchemaType; renvoyerValeur: false; }): Promise; suivreTypeObjet({ idObjet, f, }: { idObjet: string; f: schémaFonctionSuivi<"motClef" | "variable" | "bd" | "projet" | "nuée" | undefined>; }): Promise; suivreEmpreinteTêtesBdRécursive({ idBd, f, }: { idBd: string; f: schémaFonctionSuivi; }): Promise; suivreBdsDeBdListe({ id, f, fBranche, fIdDeBranche, fRéduction, }: { id: string; f: schémaFonctionSuivi; fBranche: (args: { id: string; fSuivreBranche: schémaFonctionSuivi; branche: T; }) => Promise; fIdDeBranche?: (b: T) => string; fRéduction?: schémaFonctionRéduction; }): Promise; suivreBdsDeBdDic({ id, f, fBranche, fIdDeBranche, fRéduction, }: { id: string; f: schémaFonctionSuivi; fBranche: (args: { id: string; fSuivreBranche: schémaFonctionSuivi; branche: T; }) => Promise; fIdDeBranche?: (b: T) => string; fRéduction?: schémaFonctionRéduction; }): Promise; suivreBdsDeFonctionRecherche({ fListe, f, fBranche, fIdDeBranche, fRéduction, }: { fListe: (fSuivreRacine: (éléments: T[]) => Promise) => Promise; f: schémaFonctionSuivi; fBranche: ({ id, fSuivreBranche, branche, }: { id: string; fSuivreBranche: schémaFonctionSuivi; branche: T; }) => Promise; fIdDeBranche?: (b: T) => string; fRéduction?: schémaFonctionRéduction; }): Promise; suivreBdSelonCondition({ fRacine, fCondition, f, }: { fRacine: (fSuivreRacine: (id: string) => Promise) => Promise; fCondition: (id: string, fSuivreCondition: schémaFonctionSuivi) => Promise; f: schémaFonctionSuivi; }): Promise; suivreBdsSelonCondition({ fListe, fCondition, f, }: { fListe: ({ fSuivreRacine, }: { fSuivreRacine: (ids: string[]) => Promise; }) => Promise; fCondition: (id: string, fSuivreCondition: schémaFonctionSuivi) => Promise; f: schémaFonctionSuivi; }): Promise; obtFichierSFIP({ id, max, }: { id: string; max?: number; }): Promise; obtItérableAsyncSFIP({ id, }: { id: string; }): Promise>; ajouterÀSFIP({ contenu, nomFichier, }: { contenu: Uint8Array; nomFichier: string; }): Promise; obtClefStockageClient({ clef, parCompte, }: { clef: string; parCompte?: boolean; }): Promise; obtDeStockageLocal({ clef, parCompte, }: { clef: string; parCompte?: boolean; }): Promise; sauvegarderAuStockageLocal({ clef, val, parCompte, }: { clef: string; val: string; parCompte?: boolean; }): Promise; effacerDeStockageLocal({ clef, parCompte, }: { clef: string; parCompte: boolean; }): Promise; obtIdBd({ nom, racine, type, }: { nom: K; racine: string; type?: "feed" | "keyvalue" | "ordered-keyvalue" | "set"; }): Promise; créerBdIndépendante({ type, optionsAccès, nom, }: { type: "feed" | "set" | "keyvalue" | "ordered-keyvalue"; optionsAccès?: OptionsContrôleurConstellation; nom?: string; }): Promise; effacerBd({ id }: { id: string; }): Promise; obtOpsAccès({ idBd, }: { idBd: string; }): Promise; suivrePermission({ idObjet, f, }: { idObjet: string; f: schémaFonctionSuivi<(typeof rôles)[number] | undefined>; }): Promise; suivrePermissionÉcrire({ id, f, }: { id: string; f: schémaFonctionSuivi; }): Promise; permission({ idObjet, }: { idObjet: string; }): Promise<(typeof rôles)[number] | undefined>; suivreAccèsBd({ id, f, }: { id: string; f: schémaFonctionSuivi; }): Promise; suivreBdsRécursives({ idBd, f, }: { idBd: string; f: schémaFonctionSuivi; }): Promise; fermer(): Promise; effacerDispositif(): Promise; exporterDispositif({ nomFichier, }: { nomFichier: string; }): Promise; rétablirDispositif(): Promise; static créer(opts?: optsConstellation): Promise>; } export {};