document-drive 6.0.0-dev.57 → 6.0.0-dev.59

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,44 +1,2 @@
1
- import type { IDocumentOperationStorage, IDocumentStorage } from "document-drive";
2
- import { type DocumentDriveAction, type DocumentDriveDocument, type SynchronizationUnitQuery } from "document-drive";
3
- import { type Operation, type PHDocument, type PHDocumentHeader } from "document-model";
4
- import type { Helia } from "helia";
5
- export declare class IPFSStorage implements IDriveStorage, IDocumentOperationStorage, IDocumentStorage {
6
- private fs;
7
- constructor(helia: Helia);
8
- resolveIds(slugs: string[], signal?: AbortSignal): Promise<string[]>;
9
- resolveSlugs(ids: string[], signal?: AbortSignal): Promise<string[]>;
10
- exists(documentId: string): Promise<boolean>;
11
- create(document: PHDocument): Promise<void>;
12
- get<TDocument extends PHDocument>(documentId: string): Promise<TDocument>;
13
- getBySlug<TDocument extends PHDocument>(slug: string): Promise<TDocument>;
14
- findByType(documentModelType: string, limit?: number, cursor?: string): Promise<{
15
- documents: string[];
16
- nextCursor: string | undefined;
17
- }>;
18
- delete(documentId: string): Promise<boolean>;
19
- addChild(parentId: string, childId: string): Promise<void>;
20
- removeChild(parentId: string, childId: string): Promise<boolean>;
21
- getChildren(parentId: string): Promise<string[]>;
22
- getParents(childId: string): Promise<string[]>;
23
- addDocumentOperations<TDocument extends PHDocument>(drive: string, id: string, operations: Operation[], header: PHDocumentHeader): Promise<void>;
24
- getDrives(): Promise<string[]>;
25
- getDrive(id: string): Promise<DocumentDriveDocument>;
26
- addDriveOperations(id: string, operations: Operation<DocumentDriveAction>[], header: PHDocumentHeader): Promise<void>;
27
- clearStorage(): Promise<void>;
28
- getSynchronizationUnitsRevision(units: SynchronizationUnitQuery[]): Promise<{
29
- documentId: string;
30
- scope: string;
31
- branch: string;
32
- lastUpdated: string;
33
- revision: number;
34
- }[]>;
35
- private _buildDocumentPath;
36
- private _buildDrivePath;
37
- private _buildDriveManifestPath;
38
- private _buildSlugManifestPath;
39
- private getDriveManifest;
40
- private updateDriveManifest;
41
- private getSlugManifest;
42
- private updateSlugManifest;
43
- }
1
+ export {};
44
2
  //# sourceMappingURL=ipfs.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ipfs.d.ts","sourceRoot":"","sources":["../../../src/storage/ipfs.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,yBAAyB,EACzB,gBAAgB,EACjB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAKL,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,wBAAwB,EAC9B,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,KAAK,SAAS,EACd,KAAK,UAAU,EACf,KAAK,gBAAgB,EACtB,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AAanC,qBAAa,WACX,YAAW,aAAa,EAAE,yBAAyB,EAAE,gBAAgB;IAErE,OAAO,CAAC,EAAE,CAAM;gBAEJ,KAAK,EAAE,KAAK;IAOlB,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAkBpE,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAsBpE,MAAM,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAmB5C,MAAM,CAAC,QAAQ,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;IAkC3C,GAAG,CAAC,SAAS,SAAS,UAAU,EACpC,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,SAAS,CAAC;IAkBf,SAAS,CAAC,SAAS,SAAS,UAAU,EAC1C,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,SAAS,CAAC;IAWf,UAAU,CACd,iBAAi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