diff --git a/docs/api/md/-internal-/README.md b/docs/api/md/-internal-/README.md new file mode 100644 index 000000000..393cb87ce --- /dev/null +++ b/docs/api/md/-internal-/README.md @@ -0,0 +1,174 @@ +[**API**](../README.md) • **Docs** + +*** + +[API](../README.md) / \ + +# \ + +## Index + +### Namespaces + +- ["/home/runner/work/comapeo-core/comapeo-core/src/datastore/index"](namespaces/home_runner_work_comapeo-core_comapeo-core_src_datastore_index/README.md) +- ["/home/runner/work/comapeo-core/comapeo-core/src/local-peers"](namespaces/home_runner_work_comapeo-core_comapeo-core_src_local-peers/README.md) +- ["/home/runner/work/comapeo-core/comapeo-core/src/schema/client"](namespaces/home_runner_work_comapeo-core_comapeo-core_src_schema_client/README.md) +- ["/home/runner/work/comapeo-core/comapeo-core/src/schema/project"](namespaces/home_runner_work_comapeo-core_comapeo-core_src_schema_project/README.md) +- ["/home/runner/work/comapeo-core/comapeo-core/src/sync/core-sync-state"](namespaces/home_runner_work_comapeo-core_comapeo-core_src_sync_core-sync-state/README.md) +- ["/home/runner/work/comapeo-core/comapeo-core/src/sync/namespace-sync-state"](namespaces/home_runner_work_comapeo-core_comapeo-core_src_sync_namespace-sync-state/README.md) +- ["hyperdrive"](namespaces/hyperdrive/README.md) +- [Hyperblobs](namespaces/Hyperblobs/README.md) +- [Hyperdrive](namespaces/Hyperdrive/README-1.md) + +### Classes + +- [BigSparseArray](classes/BigSparseArray.md) +- [BlobApi](classes/BlobApi.md) +- [BlobReadStream](classes/BlobReadStream.md) +- [BlobStore](classes/BlobStore.md) +- [BlobWriteStream](classes/BlobWriteStream.md) +- [CoreIndex](classes/CoreIndex.md) +- [CoreManager](classes/CoreManager.md) +- [CoreOwnership](classes/CoreOwnership.md) +- [Corestore](classes/Corestore.md) +- [CoreSyncState](classes/CoreSyncState.md) +- [DataStore](classes/DataStore.md) +- [DataType](classes/DataType.md) +- [default](classes/default.md) +- [default](classes/default.md) +- [default](classes/default.md) +- [DenseIndex](classes/DenseIndex.md) +- [DriveLiveDownload](classes/DriveLiveDownload.md) +- [Hyperblobs](classes/Hyperblobs.md) +- [Hyperdrive](classes/Hyperdrive.md) +- [IconApi](classes/IconApi.md) +- [Index](classes/Index.md) +- [IndexWriter](classes/IndexWriter.md) +- [InviteApi](classes/InviteApi.md) +- [LiveDownload](classes/LiveDownload.md) +- [LocalDiscovery](classes/LocalDiscovery.md) +- [LocalPeers](classes/LocalPeers.md) +- [Logger](classes/Logger.md) +- [MapeoProject](classes/MapeoProject.md) +- [MemberApi](classes/MemberApi.md) +- [Peer](classes/Peer.md) +- [PeerSyncController](classes/PeerSyncController.md) +- [PendingInvites](classes/PendingInvites.md) +- [Protomux](classes/Protomux.md) +- [RemoteBitfieldPage](classes/RemoteBitfieldPage.md) +- [RemoteBitfieldSegment](classes/RemoteBitfieldSegment.md) +- [Roles](classes/Roles.md) +- [SparseIndex](classes/SparseIndex.md) +- [SyncApi](classes/SyncApi.md) +- [SyncState](classes/SyncState.md) + +### Interfaces + +- [BitmapOpts](interfaces/BitmapOpts.md) +- [BlobDownloadState](interfaces/BlobDownloadState.md) +- [Channel](interfaces/Channel.md) +- [CorestoreEvents](interfaces/CorestoreEvents.md) +- [DataTypeEvents](interfaces/DataTypeEvents.md) +- [DocCapability](interfaces/DocCapability.md) +- [HaveMsg](interfaces/HaveMsg.md) +- [HyperdriveEvents](interfaces/HyperdriveEvents.md) +- [HyperdriveGetOpts](interfaces/HyperdriveGetOpts.md) +- [HyperdriveOptions](interfaces/HyperdriveOptions.md) +- [LocalCoreState](interfaces/LocalCoreState.md) +- [LocationObject](interfaces/LocationObject.md) +- [LocationObjectCoords](interfaces/LocationObjectCoords.md) +- [MapsPluginOpts](interfaces/MapsPluginOpts.md) +- [MemberInfo](interfaces/MemberInfo.md) +- [Message](interfaces/Message.md) +- [Metadata](interfaces/Metadata.md) +- [PeerInfoBase](interfaces/PeerInfoBase.md) +- [PendingInvite](interfaces/PendingInvite.md) +- [RemoteDeviceNamespaceGroupSyncState](interfaces/RemoteDeviceNamespaceGroupSyncState.md) +- [RemoteDeviceSyncState](interfaces/RemoteDeviceSyncState.md) +- [Role](interfaces/Role.md) +- [StartOpts](interfaces/StartOpts.md) +- [State](interfaces/State.md) +- [SvgOpts](interfaces/SvgOpts.md) + +### Type Aliases + +- [ArrayAtLeastOne](type-aliases/ArrayAtLeastOne.md) +- [BitField](type-aliases/BitField.md) +- [BlobDownloadStateError](type-aliases/BlobDownloadStateError.md) +- [BlobFilter](type-aliases/BlobFilter.md) +- [BlobId](type-aliases/BlobId.md) +- [BlobIdBase](type-aliases/BlobIdBase.md) +- [BlobType](type-aliases/BlobType.md) +- [BlobVariant](type-aliases/BlobVariant.md) +- [Chunk](type-aliases/Chunk.md) +- [Core](type-aliases/Core.md) +- [CoreOwnershipWithSignatures](type-aliases/CoreOwnershipWithSignatures.md) +- [CoreOwnershipWithSignaturesValue](type-aliases/CoreOwnershipWithSignaturesValue.md) +- [CoreRecord](type-aliases/CoreRecord.md) +- [CoreStorage](type-aliases/CoreStorage.md) +- [DeviceInfoDataType](type-aliases/DeviceInfoDataType.md) +- [DeviceInfoParam](type-aliases/DeviceInfoParam.md) +- [EditableProjectSettings](type-aliases/EditableProjectSettings.md) +- [ElementOf](type-aliases/ElementOf.md) +- [GetMapeoDocTables](type-aliases/GetMapeoDocTables.md) +- [HypercorePeer](type-aliases/HypercorePeer.md) +- [HypercoreRemoteBitfield](type-aliases/HypercoreRemoteBitfield.md) +- [HypercoreRemoteBitfieldPage](type-aliases/HypercoreRemoteBitfieldPage.md) +- [IconVariant](type-aliases/IconVariant.md) +- [IndexedDocIds](type-aliases/IndexedDocIds.md) +- [InternalDriveEmitter](type-aliases/InternalDriveEmitter.md) +- [InviteInternal](type-aliases/InviteInternal.md) +- [Keypair](type-aliases/Keypair.md) +- [KeyPair](type-aliases/KeyPair-1.md) +- [MapBuffers](type-aliases/MapBuffers.md) +- [MapeoDocMap](type-aliases/MapeoDocMap.md) +- [MapeoDocTableName](type-aliases/MapeoDocTableName.md) +- [MapeoDocTables](type-aliases/MapeoDocTables.md) +- [MapeoValueMap](type-aliases/MapeoValueMap.md) +- [Namespace](type-aliases/Namespace.md) +- [NamespaceSchemas](type-aliases/NamespaceSchemas.md) +- [OpenedNetNoiseStream](type-aliases/OpenedNetNoiseStream.md) +- [OpenedNoiseStream](type-aliases/OpenedNoiseStream.md) +- [PeerInfoConnected](type-aliases/PeerInfoConnected.md) +- [PeerInfoDisconnected](type-aliases/PeerInfoDisconnected.md) +- [ProjectDataType](type-aliases/ProjectDataType.md) +- [ProtocolStream](type-aliases/ProtocolStream.md) +- [PublicKey](type-aliases/PublicKey.md) +- [PublicPeerInfo](type-aliases/PublicPeerInfo.md) +- [Range](type-aliases/Range.md) +- [RawStream](type-aliases/RawStream.md) +- [ReplicationStream](type-aliases/ReplicationStream.md) +- [RoleId](type-aliases/RoleId.md) +- [SchemaName](type-aliases/SchemaName.md) +- [SecretKey](type-aliases/SecretKey.md) +- [State](type-aliases/State.md) +- [SupportedBlobVariants](type-aliases/SupportedBlobVariants.md) +- [SyncCapability](type-aliases/SyncCapability.md) +- [SyncEnabledState](type-aliases/SyncEnabledState.md) +- [SyncType](type-aliases/SyncType.md) +- [ValidSizes](type-aliases/ValidSizes.md) + +### Variables + +- [NAMESPACE\_SCHEMAS](variables/NAMESPACE_SCHEMAS.md) +- [NAMESPACES](variables/NAMESPACES.md) +- [ROLE\_IDS](variables/ROLE_IDS.md) +- [SUPPORTED\_BLOB\_VARIANTS](variables/SUPPORTED_BLOB_VARIANTS.md) + +## References + +### BlobId + +Re-exports [BlobId](namespaces/Hyperblobs/interfaces/BlobId.md) + +*** + +### HyperdriveEntry + +Re-exports [HyperdriveEntry](namespaces/Hyperdrive/interfaces/HyperdriveEntry.md) + +*** + +### NamespaceSyncState + +Re-exports [NamespaceSyncState](namespaces/home_runner_work_comapeo-core_comapeo-core_src_sync_namespace-sync-state/classes/NamespaceSyncState.md) diff --git a/docs/api/md/-internal-/classes/BigSparseArray.md b/docs/api/md/-internal-/classes/BigSparseArray.md new file mode 100644 index 000000000..79e0dfcaa --- /dev/null +++ b/docs/api/md/-internal-/classes/BigSparseArray.md @@ -0,0 +1,57 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / BigSparseArray + +# Class: BigSparseArray\ + +## Type Parameters + +• **T** + +## Constructors + +### new BigSparseArray() + +> **new BigSparseArray**\<`T`\>(): [`BigSparseArray`](BigSparseArray.md)\<`T`\> + +#### Returns + +[`BigSparseArray`](BigSparseArray.md)\<`T`\> + +## Properties + +### maxLength + +> `readonly` **maxLength**: `number` + +## Methods + +### get() + +> **get**(`index`): `undefined` \| `T` + +#### Parameters + +• **index**: `number` + +#### Returns + +`undefined` \| `T` + +*** + +### set() + +> **set**(`index`, `value`): `T` + +#### Parameters + +• **index**: `number` + +• **value**: `T` + +#### Returns + +`T` diff --git a/docs/api/md/-internal-/classes/BlobApi.md b/docs/api/md/-internal-/classes/BlobApi.md new file mode 100644 index 000000000..a43d121a5 --- /dev/null +++ b/docs/api/md/-internal-/classes/BlobApi.md @@ -0,0 +1,81 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / BlobApi + +# Class: BlobApi + +## Constructors + +### new BlobApi() + +> **new BlobApi**(`options`): [`BlobApi`](BlobApi.md) + +#### Parameters + +• **options** + +• **options.blobStore**: [`BlobStore`](BlobStore.md) + +• **options.getMediaBaseUrl** + +#### Returns + +[`BlobApi`](BlobApi.md) + +## Methods + +### create() + +> **create**(`filepaths`, `metadata`): `Promise`\<`object`\> + +Write blobs for provided variants of a file + +#### Parameters + +• **filepaths** + +• **filepaths.original**: `string` + +• **filepaths.preview?**: `string` + +• **filepaths.thumbnail?**: `string` + +• **metadata**: [`Metadata`](../interfaces/Metadata.md) + +#### Returns + +`Promise`\<`object`\> + +##### driveId + +> **driveId**: `string` + +##### hash + +> **hash**: `string` + +##### name + +> **name**: `string` + +##### type + +> **type**: `"photo"` \| `"audio"` \| `"video"` + +*** + +### getUrl() + +> **getUrl**(`blobId`): `Promise`\<`string`\> + +Get a url for a blob based on its BlobId + +#### Parameters + +• **blobId**: [`BlobId`](../type-aliases/BlobId.md) + +#### Returns + +`Promise`\<`string`\> diff --git a/docs/api/md/-internal-/classes/BlobReadStream.md b/docs/api/md/-internal-/classes/BlobReadStream.md new file mode 100644 index 000000000..e4e225524 --- /dev/null +++ b/docs/api/md/-internal-/classes/BlobReadStream.md @@ -0,0 +1,29 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / BlobReadStream + +# Class: BlobReadStream + +## Extends + +- `Readable` + +## Constructors + +### new BlobReadStream() + +> **new BlobReadStream**(`opts`): [`BlobReadStream`](BlobReadStream.md) + +#### Parameters + +• **opts**: `any` + +#### Returns + +[`BlobReadStream`](BlobReadStream.md) + +#### Overrides + +`Readable.constructor` diff --git a/docs/api/md/-internal-/classes/BlobStore.md b/docs/api/md/-internal-/classes/BlobStore.md new file mode 100644 index 000000000..0b3e92579 --- /dev/null +++ b/docs/api/md/-internal-/classes/BlobStore.md @@ -0,0 +1,257 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / BlobStore + +# Class: BlobStore + +## Constructors + +### new BlobStore() + +> **new BlobStore**(`options`): [`BlobStore`](BlobStore.md) + +#### Parameters + +• **options** + +• **options.coreManager**: [`CoreManager`](CoreManager.md) + +#### Returns + +[`BlobStore`](BlobStore.md) + +## Accessors + +### writerDriveId + +> `get` **writerDriveId**(): `string` + +#### Returns + +`string` + +## Methods + +### clear() + +> **clear**(`blobId`, `options`?): `Promise`\<`null` \| `object`\> + +#### Parameters + +• **blobId**: [`BlobId`](../type-aliases/BlobId.md) + +• **options?** = `{}` + +• **options.diff?**: `undefined` \| `boolean` + +Enable to return an object with a `block` property with number of bytes removed + +#### Returns + +`Promise`\<`null` \| `object`\> + +*** + +### createEntryReadStream() + +> **createEntryReadStream**(`driveId`, `entry`, `options`?): `Promise`\<[`BlobReadStream`](BlobReadStream.md)\> + +Optimization for creating the blobs read stream when you have +previously read the entry from Hyperdrive using `drive.entry` + +#### Parameters + +• **driveId**: `string` + +Hyperdrive drive discovery id + +• **entry**: [`HyperdriveEntry`](../namespaces/Hyperdrive/interfaces/HyperdriveEntry.md) + +Hyperdrive entry + +• **options?** = `...` + +• **options.wait?**: `undefined` \| `boolean` + +Set to `true` to wait for a blob to download, otherwise will throw if blob is not available locally + +#### Returns + +`Promise`\<[`BlobReadStream`](BlobReadStream.md)\> + +*** + +### createReadStream() + +> **createReadStream**(`blobId`, `options`?): `Readable`\<`any`, `any`, `any`, `true`, `false`, `ReadableEvents`\<`any`\>\> + +#### Parameters + +• **blobId**: [`BlobId`](../type-aliases/BlobId.md) + +• **options?** = `...` + +• **options.timeout?**: `undefined` \| `number` + +Optional timeout to wait for a blob to download + +• **options.wait?**: `undefined` \| `boolean` + +Set to `true` to wait for a blob to download, otherwise will throw if blob is not available locally + +#### Returns + +`Readable`\<`any`, `any`, `any`, `true`, `false`, `ReadableEvents`\<`any`\>\> + +*** + +### createWriteStream() + +> **createWriteStream**(`blobId`, `options`?): `Writable`\<`any`, `any`, `any`, `false`, `true`, `WritableEvents`\<`any`\>\> & `object` + +#### Parameters + +• **blobId**: `Omit`\<[`BlobId`](../type-aliases/BlobId.md), `"driveId"`\> + +• **options?** + +• **options.metadata?**: `undefined` \| `object` + +Metadata to store with the blob + +#### Returns + +`Writable`\<`any`, `any`, `any`, `false`, `true`, `WritableEvents`\<`any`\>\> & `object` + +*** + +### download() + +> **download**(`filter`?, `options`?): [`LiveDownload`](LiveDownload.md) + +Download blobs from all drives, optionally filtering particular blob types +or blob variants. Download will be 'live' and will continue downloading new +data as it becomes available from any replicating drive. + +If no filter is specified, all blobs will be downloaded. If a filter is +specified, then _only_ blobs that match the filter will be downloaded. + +#### Parameters + +• **filter?**: [`BlobFilter`](../type-aliases/BlobFilter.md) + +Filter blob types and/or variants to download. Filter is { [BlobType]: BlobVariants[] }. At least one blob variant must be specified for each blob type. + +• **options?** = `{}` + +• **options.signal?**: `undefined` \| `AbortSignal` + +Optional AbortSignal to cancel in-progress download + +#### Returns + +[`LiveDownload`](LiveDownload.md) + +EventEmitter with `.state` propery, emits `state` with new state when it updates + +*** + +### entry() + +> **entry**(`blobId`, `options`?): `Promise`\<`null` \| [`HyperdriveEntry`](../namespaces/Hyperdrive/interfaces/HyperdriveEntry.md)\> + +#### Parameters + +• **blobId**: [`BlobId`](../type-aliases/BlobId.md) + +• **options?** = `...` + +• **options.follow?**: `undefined` \| `boolean` + +Set to `true` to follow symlinks (16 max or throws an error) + +• **options.timeout?**: `undefined` + +Optional timeout to wait for a blob to download + +• **options.wait?**: `undefined` \| `false` + +Set to `true` to wait for a blob to download, otherwise will throw if blob is not available locally + +#### Returns + +`Promise`\<`null` \| [`HyperdriveEntry`](../namespaces/Hyperdrive/interfaces/HyperdriveEntry.md)\> + +*** + +### get() + +> **get**(`blobId`, `opts`): `Promise`\<`Buffer`\> + +#### Parameters + +• **blobId**: [`BlobId`](../type-aliases/BlobId.md) + +• **opts** = `{}` + +• **opts.timeout**: `undefined` + +Optional timeout to wait for a blob to download + +• **opts.wait**: `undefined` \| `false` = `false` + +Set to `true` to wait for a blob to download, otherwise will throw if blob is not available locally + +#### Returns + +`Promise`\<`Buffer`\> + +*** + +### getEntryBlob() + +> **getEntryBlob**(`driveId`, `entry`, `opts`?): `Promise`\<`null` \| `Buffer`\> + +#### Parameters + +• **driveId**: `string` + +Hyperdrive drive id + +• **entry**: [`HyperdriveEntry`](../namespaces/Hyperdrive/interfaces/HyperdriveEntry.md) + +Hyperdrive entry + +• **opts?** = `{}` + +• **opts.length?**: `undefined` \| `number` + +#### Returns + +`Promise`\<`null` \| `Buffer`\> + +*** + +### put() + +> **put**(`blobId`, `blob`, `options`?): `Promise`\<`string`\> + +#### Parameters + +• **blobId**: `Omit`\<[`BlobId`](../type-aliases/BlobId.md), `"driveId"`\> + +• **blob**: `Buffer` + +• **options?** + +• **options.metadata?**: `undefined` \| `object` + +Metadata to store with the blob + +#### Returns + +`Promise`\<`string`\> + +discovery key as hex string of hyperdrive where blob is stored diff --git a/docs/api/md/-internal-/classes/BlobWriteStream.md b/docs/api/md/-internal-/classes/BlobWriteStream.md new file mode 100644 index 000000000..3947fe559 --- /dev/null +++ b/docs/api/md/-internal-/classes/BlobWriteStream.md @@ -0,0 +1,29 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / BlobWriteStream + +# Class: BlobWriteStream + +## Extends + +- `Writable` + +## Constructors + +### new BlobWriteStream() + +> **new BlobWriteStream**(`opts`): [`BlobWriteStream`](BlobWriteStream.md) + +#### Parameters + +• **opts**: `any` + +#### Returns + +[`BlobWriteStream`](BlobWriteStream.md) + +#### Overrides + +`Writable.constructor` diff --git a/docs/api/md/-internal-/classes/CoreIndex.md b/docs/api/md/-internal-/classes/CoreIndex.md new file mode 100644 index 000000000..e74af53c0 --- /dev/null +++ b/docs/api/md/-internal-/classes/CoreIndex.md @@ -0,0 +1,124 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / CoreIndex + +# Class: CoreIndex + +An in-memory index of open cores. + +## Constructors + +### new CoreIndex() + +> **new CoreIndex**(): [`CoreIndex`](CoreIndex.md) + +#### Returns + +[`CoreIndex`](CoreIndex.md) + +## Methods + +### \[iterator\]() + +> **\[iterator\]**(): `MapIterator`\<[`CoreRecord`](../type-aliases/CoreRecord.md)\> + +#### Returns + +`MapIterator`\<[`CoreRecord`](../type-aliases/CoreRecord.md)\> + +*** + +### add() + +> **add**(`options`): `void` + +NB. Need to pass key here because `core.key` is not populated until the +core is ready, but we know it beforehand. + +#### Parameters + +• **options** + +• **options.core**: `Hypercore`\<`"binary"`, `Buffer`\> + +Hypercore instance + +• **options.key**: `Buffer` + +Buffer containing public key of this core + +• **options.namespace**: `"blob"` \| `"auth"` \| `"config"` \| `"data"` \| `"blobIndex"` + +• **options.writer**: `undefined` \| `boolean` = `false` + +Is this a writer core? + +#### Returns + +`void` + +*** + +### getByCoreKey() + +> **getByCoreKey**(`coreKey`): `undefined` \| [`CoreRecord`](../type-aliases/CoreRecord.md) + +Get a core by its public key + +#### Parameters + +• **coreKey**: `Buffer` + +#### Returns + +`undefined` \| [`CoreRecord`](../type-aliases/CoreRecord.md) + +*** + +### getByDiscoveryId() + +> **getByDiscoveryId**(`discoveryId`): `undefined` \| [`CoreRecord`](../type-aliases/CoreRecord.md) + +Get a core by its discoveryId (discover key as hex string) + +#### Parameters + +• **discoveryId**: `string` + +#### Returns + +`undefined` \| [`CoreRecord`](../type-aliases/CoreRecord.md) + +*** + +### getByNamespace() + +> **getByNamespace**(`namespace`): [`CoreRecord`](../type-aliases/CoreRecord.md)[] + +Get all known cores in a namespace + +#### Parameters + +• **namespace**: `"blob"` \| `"auth"` \| `"config"` \| `"data"` \| `"blobIndex"` + +#### Returns + +[`CoreRecord`](../type-aliases/CoreRecord.md)[] + +*** + +### getWriter() + +> **getWriter**(`namespace`): [`CoreRecord`](../type-aliases/CoreRecord.md) + +Get the write core for the given namespace + +#### Parameters + +• **namespace**: `"blob"` \| `"auth"` \| `"config"` \| `"data"` \| `"blobIndex"` + +#### Returns + +[`CoreRecord`](../type-aliases/CoreRecord.md) diff --git a/docs/api/md/-internal-/classes/CoreManager.md b/docs/api/md/-internal-/classes/CoreManager.md new file mode 100644 index 000000000..999f18a34 --- /dev/null +++ b/docs/api/md/-internal-/classes/CoreManager.md @@ -0,0 +1,242 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / CoreManager + +# Class: CoreManager + +## Extends + +- `TypedEmitter` + +## Constructors + +### new CoreManager() + +> **new CoreManager**(`options`): [`CoreManager`](CoreManager.md) + +#### Parameters + +• **options** + +• **options.autoDownload**: `undefined` \| `boolean` = `true` + +Immediately start downloading cores - should only be set to false for tests + +• **options.db**: `BetterSQLite3Database`\<`Record`\<`string`, `never`\>\> + +Drizzle better-sqlite3 database instance + +• **options.encryptionKeys**: `undefined` \| `Partial`\<`Record`\<`"blob"` \| `"auth"` \| `"config"` \| `"data"` \| `"blobIndex"`, `Buffer`\>\> = `{}` + +Encryption keys for each namespace + +• **options.keyManager**: `KeyManager` + +mapeo/crypto KeyManager instance + +• **options.logger**: `undefined` \| [`Logger`](Logger.md) + +• **options.projectKey**: `Buffer` + +32-byte public key of the project creator core + +• **options.projectSecretKey**: `undefined` \| `Buffer` + +32-byte secret key of the project creator core + +• **options.storage**: `HypercoreStorage` + +Folder to store all hypercore data + +#### Returns + +[`CoreManager`](CoreManager.md) + +#### Overrides + +`TypedEmitter.constructor` + +## Accessors + +### creatorCore + +> `get` **creatorCore**(): [`Core`](../type-aliases/Core.md) + +#### Returns + +[`Core`](../type-aliases/Core.md) + +*** + +### creatorCoreRecord + +> `get` **creatorCoreRecord**(): [`CoreRecord`](../type-aliases/CoreRecord.md) + +#### Returns + +[`CoreRecord`](../type-aliases/CoreRecord.md) + +*** + +### deviceId + +> `get` **deviceId**(): `string` + +#### Returns + +`string` + +*** + +### namespaces + +> `get` `static` **namespaces**(): readonly [`"auth"`, `"config"`, `"data"`, `"blobIndex"`, `"blob"`] + +#### Returns + +readonly [`"auth"`, `"config"`, `"data"`, `"blobIndex"`, `"blob"`] + +## Methods + +### \[kCoreManagerReplicate\]() + +> **\[kCoreManagerReplicate\]**(`stream`): `ReplicationStream` + +ONLY FOR TESTING +Replicate all cores in core manager + +NB: Remote peers need to be manually added when unit testing core manager +without the Sync API + +#### Parameters + +• **stream**: `any` + +#### Returns + +`ReplicationStream` + +*** + +### addCore() + +> **addCore**(`key`, `namespace`): [`CoreRecord`](../type-aliases/CoreRecord.md) + +Add a core to the manager (will be persisted across restarts) + +#### Parameters + +• **key**: `Buffer` + +32-byte public key of core to add + +• **namespace**: `"blob"` \| `"auth"` \| `"config"` \| `"data"` \| `"blobIndex"` + +#### Returns + +[`CoreRecord`](../type-aliases/CoreRecord.md) + +*** + +### close() + +> **close**(): `Promise`\<`void`\> + +Close all open cores and end any replication streams +TODO: gracefully close replication streams + +#### Returns + +`Promise`\<`void`\> + +*** + +### deleteOthersData() + +> **deleteOthersData**(`namespace`): `Promise`\<`void`\> + +#### Parameters + +• **namespace**: `"blob"` \| `"config"` \| `"data"` \| `"blobIndex"` + +#### Returns + +`Promise`\<`void`\> + +*** + +### getCoreByDiscoveryKey() + +> **getCoreByDiscoveryKey**(`discoveryKey`): `undefined` \| [`CoreRecord`](../type-aliases/CoreRecord.md) + +Get a core by its discovery key + +#### Parameters + +• **discoveryKey**: `Buffer` + +#### Returns + +`undefined` \| [`CoreRecord`](../type-aliases/CoreRecord.md) + +*** + +### getCoreByKey() + +> **getCoreByKey**(`key`): `undefined` \| [`Core`](../type-aliases/Core.md) + +Get a core by its public key + +#### Parameters + +• **key**: `Buffer` + +#### Returns + +`undefined` \| [`Core`](../type-aliases/Core.md) + +*** + +### getCores() + +> **getCores**(`namespace`): [`CoreRecord`](../type-aliases/CoreRecord.md)[] + +Get an array of all cores in the given namespace + +#### Parameters + +• **namespace**: `"blob"` \| `"auth"` \| `"config"` \| `"data"` \| `"blobIndex"` + +#### Returns + +[`CoreRecord`](../type-aliases/CoreRecord.md)[] + +*** + +### getWriterCore() + +> **getWriterCore**(`namespace`): [`CoreRecord`](../type-aliases/CoreRecord.md) + +Get the writer core for the given namespace + +#### Parameters + +• **namespace**: `"blob"` \| `"auth"` \| `"config"` \| `"data"` \| `"blobIndex"` + +#### Returns + +[`CoreRecord`](../type-aliases/CoreRecord.md) + +*** + +### ready() + +> **ready**(): `Promise`\<`void`\> + +Resolves when all cores have finished loading + +#### Returns + +`Promise`\<`void`\> diff --git a/docs/api/md/-internal-/classes/CoreOwnership.md b/docs/api/md/-internal-/classes/CoreOwnership.md new file mode 100644 index 000000000..1422d54da --- /dev/null +++ b/docs/api/md/-internal-/classes/CoreOwnership.md @@ -0,0 +1,95 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / CoreOwnership + +# Class: CoreOwnership + +## Extends + +- `TypedEmitter` + +## Constructors + +### new CoreOwnership() + +> **new CoreOwnership**(`opts`): [`CoreOwnership`](CoreOwnership.md) + +#### Parameters + +• **opts** + +• **opts.coreKeypairs**: `Record`\<`"blob"` \| `"auth"` \| `"config"` \| `"data"` \| `"blobIndex"`, [`KeyPair`](../type-aliases/KeyPair-1.md)\> + +• **opts.dataType**: [`DataType`](DataType.md)\<[`DataStore`](DataStore.md)\<`"auth"`, `"coreOwnership"` \| `"role"`\>, `SQLiteTableWithColumns`\<`object`\>, `"coreOwnership"`, `object`, `object`\> + +• **opts.identityKeypair**: [`KeyPair`](../type-aliases/KeyPair-1.md) + +#### Returns + +[`CoreOwnership`](CoreOwnership.md) + +#### Overrides + +`TypedEmitter.constructor` + +## Methods + +### get() + +> **get**(`deviceId`): `Promise`\<`object` & `object`\> + +Get capabilities for a given deviceId + +#### Parameters + +• **deviceId**: `string` + +#### Returns + +`Promise`\<`object` & `object`\> + +*** + +### getAll() + +> **getAll**(): `Promise`\<`object` & `object`[]\> + +#### Returns + +`Promise`\<`object` & `object`[]\> + +*** + +### getCoreId() + +> **getCoreId**(`deviceId`, `namespace`): `Promise`\<`string`\> + +#### Parameters + +• **deviceId**: `string` + +• **namespace**: `"blob"` \| `"auth"` \| `"config"` \| `"data"` \| `"blobIndex"` + +#### Returns + +`Promise`\<`string`\> + +coreId of core belonging to `deviceId` for `namespace` + +*** + +### getOwner() + +> **getOwner**(`coreId`): `Promise`\<`string`\> + +#### Parameters + +• **coreId**: `string` + +#### Returns + +`Promise`\<`string`\> + +deviceId of device that owns the core diff --git a/docs/api/md/-internal-/classes/CoreSyncState.md b/docs/api/md/-internal-/classes/CoreSyncState.md new file mode 100644 index 000000000..6d637ee71 --- /dev/null +++ b/docs/api/md/-internal-/classes/CoreSyncState.md @@ -0,0 +1,150 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / CoreSyncState + +# Class: CoreSyncState + +Track sync state for a core identified by `discoveryId`. Can start tracking +state before the core instance exists locally, via the "preHave" messages +received over the project creator core. + +Because deriving the state is expensive (it iterates through the bitfields of +all peers), this is designed to be pull-based: the onUpdate event signals +that the state is updated, but does not pass the state. The consumer can +"pull" the state when it wants it via `coreSyncState.getState()`. + +Each peer (including the local peer) has a state of: + +1. `have` - number of blocks the peer has locally + +2. `want` - number of blocks this peer wants. For local state, this is the + number of unique blocks we want from anyone else. For remote peers, it is + the number of blocks this peer wants from us. + +3. `wanted` - number of blocks this peer has that's wanted by others. For + local state, this is the number of unique blocks any of our peers want. + For remote peers, it is the number of blocks we want from them. + +## Constructors + +### new CoreSyncState() + +> **new CoreSyncState**(`opts`): [`CoreSyncState`](CoreSyncState.md) + +#### Parameters + +• **opts** + +• **opts.logger**: `undefined` \| [`Logger`](Logger.md) + +• **opts.namespace**: `"blob"` \| `"auth"` \| `"config"` \| `"data"` \| `"blobIndex"` + +• **opts.onUpdate** + +Called when a state update is available (via getState()) + +• **opts.peerSyncControllers**: `Map`\<`string`, [`PeerSyncController`](PeerSyncController.md)\> + +#### Returns + +[`CoreSyncState`](CoreSyncState.md) + +## Methods + +### addPeer() + +> **addPeer**(`peerId`): `void` + +#### Parameters + +• **peerId**: `string` + +#### Returns + +`void` + +*** + +### attachCore() + +> **attachCore**(`core`): `void` + +Attach a core. The sync state can be initialized without a core instance, +because we could receive peer want and have states via extension messages +before we have the core key that allows us to create a core instance. + +#### Parameters + +• **core**: `Hypercore`\<`"binary"`, `Buffer`\> + +#### Returns + +`void` + +*** + +### disconnectPeer() + +> **disconnectPeer**(`peerId`): `void` + +#### Parameters + +• **peerId**: `string` + +#### Returns + +`void` + +*** + +### getState() + +> **getState**(): [`DerivedState`](../namespaces/home_runner_work_comapeo-core_comapeo-core_src_sync_core-sync-state/interfaces/DerivedState.md) + +#### Returns + +[`DerivedState`](../namespaces/home_runner_work_comapeo-core_comapeo-core_src_sync_core-sync-state/interfaces/DerivedState.md) + +*** + +### insertPreHaves() + +> **insertPreHaves**(`peerId`, `start`, `bitfield`): `void` + +Add a pre-emptive "have" bitfield for a peer. This is used when we receive +a peer "have" via extension message - it allows us to have a state for the +peer before the peer actually starts syncing this core + +#### Parameters + +• **peerId**: `string` + +• **start**: `number` + +• **bitfield**: `Uint32Array` + +#### Returns + +`void` + +*** + +### setPeerWants() + +> **setPeerWants**(`peerId`, `ranges`): `void` + +Add a ranges of wanted blocks for a peer. By default a peer wants all +blocks in a core - calling this will change the peer to only want the +blocks/ranges that are added here + +#### Parameters + +• **peerId**: `string` + +• **ranges**: `object`[] + +#### Returns + +`void` diff --git a/docs/api/md/-internal-/classes/Corestore.md b/docs/api/md/-internal-/classes/Corestore.md new file mode 100644 index 000000000..fcd02c35a --- /dev/null +++ b/docs/api/md/-internal-/classes/Corestore.md @@ -0,0 +1,143 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / Corestore + +# Class: Corestore + +## Extends + +- `TypedEmitter`\<[`CorestoreEvents`](../interfaces/CorestoreEvents.md)\> + +## Constructors + +### new Corestore() + +> **new Corestore**(`storage`, `options`?): [`Corestore`](Corestore.md) + +#### Parameters + +• **storage**: `HypercoreStorage` + +• **options?** + +• **options.poolSize?**: `number` + +• **options.primaryKey?**: `Buffer` \| `Uint8Array` + +#### Returns + +[`Corestore`](Corestore.md) + +#### Overrides + +`TypedEmitter.constructor` + +## Properties + +### cores + +> **cores**: `Map`\<`string`, `Hypercore`\<`ValueEncoding`, `Buffer`\>\> + +## Methods + +### close() + +> **close**(): `Promise`\<`void`\> + +#### Returns + +`Promise`\<`void`\> + +*** + +### get() + +#### get(key) + +> **get**(`key`): `Hypercore`\<`ValueEncoding`, `Buffer`\> + +##### Parameters + +• **key**: `Buffer` \| `Uint8Array` + +##### Returns + +`Hypercore`\<`ValueEncoding`, `Buffer`\> + +#### get(options) + +> **get**(`options`): `Hypercore`\<`ValueEncoding`, `Buffer`\> + +##### Parameters + +• **options**: `Omit`\<`HypercoreOptions`\<`"binary"`, `undefined`\>, `"keyPair"`\> & `object` + +##### Returns + +`Hypercore`\<`ValueEncoding`, `Buffer`\> + +#### get(options) + +> **get**(`options`): `Hypercore`\<`ValueEncoding`, `Buffer`\> + +##### Parameters + +• **options**: `never` + +##### Returns + +`Hypercore`\<`ValueEncoding`, `Buffer`\> + +#### get(options) + +> **get**(`options`): `Hypercore`\<`ValueEncoding`, `Buffer`\> + +##### Parameters + +• **options**: `Omit`\<`HypercoreOptions`\<`"binary"`, `undefined`\>, `"key"` \| `"keyPair"`\> & `object` + +##### Returns + +`Hypercore`\<`ValueEncoding`, `Buffer`\> + +*** + +### namespace() + +> **namespace**(`name`): [`Corestore`](Corestore.md) + +#### Parameters + +• **name**: `string` + +#### Returns + +[`Corestore`](Corestore.md) + +*** + +### ready() + +> **ready**(): `Promise`\<`void`\> + +#### Returns + +`Promise`\<`void`\> + +*** + +### replicate() + +> **replicate**(`stream`, `opts`?): `ReplicationStream` + +#### Parameters + +• **stream**: `any` + +• **opts?**: `any` + +#### Returns + +`ReplicationStream` diff --git a/docs/api/md/-internal-/classes/DataStore.md b/docs/api/md/-internal-/classes/DataStore.md new file mode 100644 index 000000000..bb64ca4a6 --- /dev/null +++ b/docs/api/md/-internal-/classes/DataStore.md @@ -0,0 +1,181 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / DataStore + +# Class: DataStore\ + +## Extends + +- `TypedEmitter` + +## Type Parameters + +• **TNamespace** = keyof [`NamespaceSchemas`](../type-aliases/NamespaceSchemas.md) + +• **TSchemaName** = [`NamespaceSchemas`](../type-aliases/NamespaceSchemas.md)\[`TNamespace`\]\[`number`\] + +## Constructors + +### new DataStore() + +> **new DataStore**\<`TNamespace`, `TSchemaName`\>(`opts`): [`DataStore`](DataStore.md)\<`TNamespace`, `TSchemaName`\> + +#### Parameters + +• **opts** + +• **opts.batch** + +• **opts.coreManager**: [`CoreManager`](CoreManager.md) + +• **opts.namespace**: `TNamespace` + +• **opts.storage**: `StorageParam` + +#### Returns + +[`DataStore`](DataStore.md)\<`TNamespace`, `TSchemaName`\> + +#### Overrides + +`TypedEmitter.constructor` + +## Accessors + +### indexer + +> `get` **indexer**(): `MultiCoreIndexer`\<`"binary"`\> + +#### Returns + +`MultiCoreIndexer`\<`"binary"`\> + +*** + +### namespace + +> `get` **namespace**(): `TNamespace` + +#### Returns + +`TNamespace` + +*** + +### schemas + +> `get` **schemas**(): (`"observation"` \| `"track"`)[] \| (`"translation"` \| `"preset"` \| `"field"` \| `"projectSettings"` \| `"deviceInfo"` \| `"icon"`)[] \| (`"coreOwnership"` \| `"role"`)[] + +#### Returns + +(`"observation"` \| `"track"`)[] \| (`"translation"` \| `"preset"` \| `"field"` \| `"projectSettings"` \| `"deviceInfo"` \| `"icon"`)[] \| (`"coreOwnership"` \| `"role"`)[] + +*** + +### writerCore + +> `get` **writerCore**(): [`Core`](../type-aliases/Core.md) + +#### Returns + +[`Core`](../type-aliases/Core.md) + +## Methods + +### close() + +> **close**(): `Promise`\<`void`\> + +#### Returns + +`Promise`\<`void`\> + +*** + +### getIndexState() + +> **getIndexState**(): `IndexState` + +#### Returns + +`IndexState` + +*** + +### read() + +> **read**(`versionId`): `Promise`\<`MapeoDoc`\> + +#### Parameters + +• **versionId**: `string` + +#### Returns + +`Promise`\<`MapeoDoc`\> + +*** + +### readRaw() + +> **readRaw**(`versionId`): `Promise`\<`Buffer`\> + +#### Parameters + +• **versionId**: `string` + +#### Returns + +`Promise`\<`Buffer`\> + +*** + +### unlink() + +> **unlink**(): `Promise`\<`void`\> + +Unlink all index files. This should only be called after `close()` has resolved. + +#### Returns + +`Promise`\<`void`\> + +*** + +### write() + +> **write**\<`TDoc`\>(`doc`): `Promise`\<`Extract`\<`object`, `TDoc`\> \| `Extract`\<`object`, `TDoc`\> \| `Extract`\<`object`, `TDoc`\> \| `Extract`\<`object`, `TDoc`\> \| `Extract`\<`object`, `TDoc`\> \| `Extract`\<`object`, `TDoc`\> \| `Extract`\<`object`, `TDoc`\> \| `Extract`\<`object`, `TDoc`\> \| `Extract`\<`object`, `TDoc`\> \| `Extract`\<`object`, `TDoc`\>\> + +UNSAFE: Does not check links: [] refer to a valid doc - should only be used +internally. + +Write a doc, must be one of the schema types supported by the namespace of +this DataStore. + +#### Type Parameters + +• **TDoc** *extends* `object` & `Omit`\<`object`, `"versionId"` \| `"originalVersionId"` \| `"links"`\> & `object` \| `object` & `Omit`\<`object`, `"versionId"` \| `"originalVersionId"` \| `"links"`\> & `object` \| `object` & `Omit`\<`object`, `"versionId"` \| `"originalVersionId"` \| `"links"`\> & `object` \| `object` & `Omit`\<`object`, `"versionId"` \| `"originalVersionId"` \| `"links"`\> & `object` \| `object` & `Omit`\<`object`, `"versionId"` \| `"originalVersionId"` \| `"links"`\> & `object` \| `object` & `Omit`\<`object`, `"versionId"` \| `"originalVersionId"` \| `"links"`\> & `object` \| `object` & `Omit`\<`object`, `"versionId"` \| `"originalVersionId"` \| `"links"`\> & `object` \| `object` & `Omit`\<`object`, `"versionId"` \| `"originalVersionId"` \| `"links"`\> & `object` \| `object` & `Omit`\<`object`, `"versionId"` \| `"originalVersionId"` \| `"links"`\> & `object` \| `object` & `Omit`\<`object` & `CoreOwnershipSignatures`, `"versionId"` \| `"originalVersionId"` \| `"links"`\> & `object` \| `object` & `Omit`\<`object`, `"versionId"`\> \| `object` & `Omit`\<`object`, `"versionId"`\> \| `object` & `Omit`\<`object`, `"versionId"`\> \| `object` & `Omit`\<`object`, `"versionId"`\> \| `object` & `Omit`\<`object`, `"versionId"`\> \| `object` & `Omit`\<`object`, `"versionId"`\> \| `object` & `Omit`\<`object`, `"versionId"`\> \| `object` & `Omit`\<`object`, `"versionId"`\> \| `object` & `Omit`\<`object`, `"versionId"`\> \| `object` & `Omit`\<`object` & `CoreOwnershipSignatures`, `"versionId"`\> + +#### Parameters + +• **doc**: `TDoc` + +#### Returns + +`Promise`\<`Extract`\<`object`, `TDoc`\> \| `Extract`\<`object`, `TDoc`\> \| `Extract`\<`object`, `TDoc`\> \| `Extract`\<`object`, `TDoc`\> \| `Extract`\<`object`, `TDoc`\> \| `Extract`\<`object`, `TDoc`\> \| `Extract`\<`object`, `TDoc`\> \| `Extract`\<`object`, `TDoc`\> \| `Extract`\<`object`, `TDoc`\> \| `Extract`\<`object`, `TDoc`\>\> + +*** + +### writeRaw() + +> **writeRaw**(`buf`): `Promise`\<`string`\> + +#### Parameters + +• **buf**: `Buffer` + +#### Returns + +`Promise`\<`string`\> diff --git a/docs/api/md/-internal-/classes/DataType.md b/docs/api/md/-internal-/classes/DataType.md new file mode 100644 index 000000000..64380df12 --- /dev/null +++ b/docs/api/md/-internal-/classes/DataType.md @@ -0,0 +1,221 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / DataType + +# Class: DataType\ + +## Extends + +- `TypedEmitter`\<[`DataTypeEvents`](../interfaces/DataTypeEvents.md)\<`TDoc`\>\> + +## Type Parameters + +• **TDataStore** *extends* [`"/home/runner/work/comapeo-core/comapeo-core/src/datastore/index"`](../namespaces/home_runner_work_comapeo-core_comapeo-core_src_datastore_index/README.md) + +• **TTable** *extends* [`MapeoDocTables`](../type-aliases/MapeoDocTables.md) + +• **TSchemaName** *extends* `TTable`\[`"_"`\]\[`"name"`\] + +• **TDoc** *extends* [`MapeoDocMap`](../type-aliases/MapeoDocMap.md)\[`TSchemaName`\] + +• **TValue** *extends* [`MapeoValueMap`](../type-aliases/MapeoValueMap.md)\[`TSchemaName`\] + +## Constructors + +### new DataType() + +> **new DataType**\<`TDataStore`, `TTable`, `TSchemaName`, `TDoc`, `TValue`\>(`__namedParameters`): [`DataType`](DataType.md)\<`TDataStore`, `TTable`, `TSchemaName`, `TDoc`, `TValue`\> + +#### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.dataStore**: `TDataStore` + +• **\_\_namedParameters.db**: `BetterSQLite3Database`\<`Record`\<`string`, `never`\>\> + +• **\_\_namedParameters.getTranslations** + +• **\_\_namedParameters.table**: `TTable` + +#### Returns + +[`DataType`](DataType.md)\<`TDataStore`, `TTable`, `TSchemaName`, `TDoc`, `TValue`\> + +#### Overrides + +`TypedEmitter>.constructor` + +## Accessors + +### \[kDataStore\] + +> `get` **\[kDataStore\]**(): `TDataStore` + +#### Returns + +`TDataStore` + +*** + +### \[kTable\] + +> `get` **\[kTable\]**(): `TTable` + +#### Returns + +`TTable` + +*** + +### namespace + +> `get` **namespace**(): `namespace` + +#### Returns + +`namespace` + +*** + +### schemaName + +> `get` **schemaName**(): `TSchemaName` + +#### Returns + +`TSchemaName` + +## Methods + +### \[kCreateWithDocId\]() + +> **\[kCreateWithDocId\]**(`docId`, `value`): `Promise`\<`TDoc` & `object`\> + +#### Parameters + +• **docId**: `string` + +• **value**: `Exclude`\<`TValue`, `object`\> \| [`CoreOwnershipWithSignaturesValue`](../type-aliases/CoreOwnershipWithSignaturesValue.md) + +#### Returns + +`Promise`\<`TDoc` & `object`\> + +*** + +### \[kSelect\]() + +> **\[kSelect\]**(): `Promise`\<`any`\> + +#### Returns + +`Promise`\<`any`\> + +*** + +### create() + +> **create**\<`T`\>(`value`): `Promise`\<`TDoc` & `object`\> + +#### Type Parameters + +• **T** *extends* `unknown` + +#### Parameters + +• **value**: `T` + +#### Returns + +`Promise`\<`TDoc` & `object`\> + +*** + +### delete() + +> **delete**(`docId`): `Promise`\<`TDoc` & `object`\> + +#### Parameters + +• **docId**: `string` + +#### Returns + +`Promise`\<`TDoc` & `object`\> + +*** + +### getByDocId() + +> **getByDocId**(`docId`, `opts`?): `Promise`\<`TDoc` & `object`\> + +#### Parameters + +• **docId**: `string` + +• **opts?** + +• **opts.lang?**: `string` + +#### Returns + +`Promise`\<`TDoc` & `object`\> + +*** + +### getByVersionId() + +> **getByVersionId**(`versionId`, `opts`?): `Promise`\<`TDoc`\> + +#### Parameters + +• **versionId**: `string` + +• **opts?** + +• **opts.lang?**: `string` + +#### Returns + +`Promise`\<`TDoc`\> + +*** + +### getMany() + +> **getMany**(`opts`?): `Promise`\<`TDoc` & `object`[]\> + +#### Parameters + +• **opts?** + +• **opts.includeDeleted?**: `boolean` + +• **opts.lang?**: `string` + +#### Returns + +`Promise`\<`TDoc` & `object`[]\> + +*** + +### update() + +> **update**\<`T`\>(`versionId`, `value`): `Promise`\<`TDoc` & `object`\> + +#### Type Parameters + +• **T** *extends* `unknown` + +#### Parameters + +• **versionId**: `string` \| `string`[] + +• **value**: `T` + +#### Returns + +`Promise`\<`TDoc` & `object`\> diff --git a/docs/api/md/-internal-/classes/DenseIndex.md b/docs/api/md/-internal-/classes/DenseIndex.md new file mode 100644 index 000000000..56557fe30 --- /dev/null +++ b/docs/api/md/-internal-/classes/DenseIndex.md @@ -0,0 +1,139 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / DenseIndex + +# Class: DenseIndex + +## Extends + +- [`Index`](Index.md) + +## Constructors + +### new DenseIndex() + +> **new DenseIndex**(`field`, `byteLength`): [`DenseIndex`](DenseIndex.md) + +#### Parameters + +• **field**: `TypedArray` + +• **byteLength**: `number` + +#### Returns + +[`DenseIndex`](DenseIndex.md) + +#### Overrides + +[`Index`](Index.md).[`constructor`](Index.md#constructors) + +## Properties + +### byteLength + +> `readonly` **byteLength**: `number` + +#### Inherited from + +[`Index`](Index.md).[`byteLength`](Index.md#bytelength) + +## Methods + +### skipFirst() + +> **skipFirst**(`value`, `position`?): `number` + +#### Parameters + +• **value**: `boolean` + +• **position?**: `number` + +#### Returns + +`number` + +#### Inherited from + +[`Index`](Index.md).[`skipFirst`](Index.md#skipfirst) + +*** + +### skipLast() + +> **skipLast**(`value`, `position`?): `number` + +#### Parameters + +• **value**: `boolean` + +• **position?**: `number` + +#### Returns + +`number` + +#### Inherited from + +[`Index`](Index.md).[`skipLast`](Index.md#skiplast) + +*** + +### update() + +> **update**(`bit`): `boolean` + +#### Parameters + +• **bit**: `number` + +#### Returns + +`boolean` + +#### Overrides + +[`Index`](Index.md).[`update`](Index.md#update) + +*** + +### from() + +#### from(field, byteLength) + +> `static` **from**(`field`, `byteLength`): [`DenseIndex`](DenseIndex.md) + +##### Parameters + +• **field**: `TypedArray` + +• **byteLength**: `number` + +##### Returns + +[`DenseIndex`](DenseIndex.md) + +##### Inherited from + +[`Index`](Index.md).[`from`](Index.md#from) + +#### from(chunks, byteLength) + +> `static` **from**(`chunks`, `byteLength`): [`SparseIndex`](SparseIndex.md) + +##### Parameters + +• **chunks**: [`Chunk`](../type-aliases/Chunk.md)[] + +• **byteLength**: `number` + +##### Returns + +[`SparseIndex`](SparseIndex.md) + +##### Inherited from + +[`Index`](Index.md).[`from`](Index.md#from) diff --git a/docs/api/md/-internal-/classes/DriveLiveDownload.md b/docs/api/md/-internal-/classes/DriveLiveDownload.md new file mode 100644 index 000000000..f48ec4397 --- /dev/null +++ b/docs/api/md/-internal-/classes/DriveLiveDownload.md @@ -0,0 +1,51 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / DriveLiveDownload + +# Class: DriveLiveDownload + +LiveDownload class + +## Extends + +- `TypedEmitter` + +## Constructors + +### new DriveLiveDownload() + +> **new DriveLiveDownload**(`drive`, `options`): [`DriveLiveDownload`](DriveLiveDownload.md) + +Like drive.download() but 'live', + +#### Parameters + +• **drive**: [`Hyperdrive`](Hyperdrive.md) + +• **options** = `{}` + +• **options.filter**: `undefined` \| [`BlobFilter`](../type-aliases/BlobFilter.md) + +Filter blobs of specific types and/or sizes to download + +• **options.signal**: `undefined` \| `AbortSignal` + +#### Returns + +[`DriveLiveDownload`](DriveLiveDownload.md) + +#### Overrides + +`TypedEmitter.constructor` + +## Accessors + +### state + +> `get` **state**(): [`BlobDownloadState`](../interfaces/BlobDownloadState.md) \| [`BlobDownloadStateError`](../type-aliases/BlobDownloadStateError.md) + +#### Returns + +[`BlobDownloadState`](../interfaces/BlobDownloadState.md) \| [`BlobDownloadStateError`](../type-aliases/BlobDownloadStateError.md) diff --git a/docs/api/md/-internal-/classes/Hyperblobs.md b/docs/api/md/-internal-/classes/Hyperblobs.md new file mode 100644 index 000000000..7cf1309ba --- /dev/null +++ b/docs/api/md/-internal-/classes/Hyperblobs.md @@ -0,0 +1,147 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / Hyperblobs + +# Class: Hyperblobs + +## Constructors + +### new Hyperblobs() + +> **new Hyperblobs**(`core`, `opts`?): [`Hyperblobs`](Hyperblobs.md) + +#### Parameters + +• **core**: `Hypercore`\<`"binary"`, `undefined`\> + +• **opts?** + +• **opts.blocksize?**: `number` + +#### Returns + +[`Hyperblobs`](Hyperblobs.md) + +## Properties + +### blockSize + +> `readonly` **blockSize**: `number` + +*** + +### core + +> `readonly` **core**: `Hypercore`\<`"binary"`, `undefined`\> + +## Accessors + +### feed + +> `get` **feed**(): `Hypercore`\<`"binary"`, `undefined`\> + +#### Returns + +`Hypercore`\<`"binary"`, `undefined`\> + +*** + +### locked + +> `get` **locked**(): `boolean` + +#### Returns + +`boolean` + +## Methods + +### clear() + +> **clear**(`id`, `opts`?): `Promise`\<`null` \| `object`\> + +#### Parameters + +• **id**: [`BlobId`](../namespaces/Hyperblobs/interfaces/BlobId.md) + +• **opts?** + +• **opts.diff?**: `boolean` + +#### Returns + +`Promise`\<`null` \| `object`\> + +*** + +### createReadStream() + +> **createReadStream**(`id`, `opts`?): [`BlobReadStream`](BlobReadStream.md) + +#### Parameters + +• **id**: [`BlobId`](../namespaces/Hyperblobs/interfaces/BlobId.md) + +• **opts?**: `any` + +#### Returns + +[`BlobReadStream`](BlobReadStream.md) + +*** + +### createWriteStream() + +> **createWriteStream**(`opts`?): [`BlobWriteStream`](BlobWriteStream.md) + +#### Parameters + +• **opts?**: `any` + +#### Returns + +[`BlobWriteStream`](BlobWriteStream.md) + +*** + +### get() + +> **get**(`id`, `opts`?): `Promise`\<`null` \| `Buffer`\> + +#### Parameters + +• **id**: [`BlobId`](../namespaces/Hyperblobs/interfaces/BlobId.md) + +• **opts?**: `any` + +#### Returns + +`Promise`\<`null` \| `Buffer`\> + +*** + +### put() + +> **put**(`blob`, `opts`?): `Promise`\<[`BlobId`](../namespaces/Hyperblobs/interfaces/BlobId.md)\> + +#### Parameters + +• **blob**: `Buffer` + +• **opts?** + +• **opts.blockSize?**: `number` + +• **opts.core?**: `Hypercore`\<`"binary"`, `undefined`\> + +• **opts.end?**: `number` + +• **opts.length?**: `number` + +• **opts.start?**: `number` + +#### Returns + +`Promise`\<[`BlobId`](../namespaces/Hyperblobs/interfaces/BlobId.md)\> diff --git a/docs/api/md/-internal-/classes/Hyperdrive.md b/docs/api/md/-internal-/classes/Hyperdrive.md new file mode 100644 index 000000000..9a3057ba2 --- /dev/null +++ b/docs/api/md/-internal-/classes/Hyperdrive.md @@ -0,0 +1,427 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / Hyperdrive + +# Class: Hyperdrive + +## Extends + +- `TypedEmitter`\<[`HyperdriveEvents`](../interfaces/HyperdriveEvents.md)\> + +## Constructors + +### new Hyperdrive() + +> **new Hyperdrive**(`corestore`, `key`?, `opts`?): [`Hyperdrive`](Hyperdrive.md) + +#### Parameters + +• **corestore**: [`Corestore`](Corestore.md) + +• **key?**: `null` \| `Buffer` + +• **opts?**: [`HyperdriveOptions`](../interfaces/HyperdriveOptions.md) + +#### Returns + +[`Hyperdrive`](Hyperdrive.md) + +#### Overrides + +`TypedEmitter.constructor` + +### new Hyperdrive() + +> **new Hyperdrive**(`corestore`, `opts`?): [`Hyperdrive`](Hyperdrive.md) + +#### Parameters + +• **corestore**: [`Corestore`](Corestore.md) + +• **opts?**: [`HyperdriveOptions`](../interfaces/HyperdriveOptions.md) + +#### Returns + +[`Hyperdrive`](Hyperdrive.md) + +#### Overrides + +`TypedEmitter.constructor` + +## Properties + +### blobs + +> `readonly` **blobs**: `null` \| [`Hyperblobs`](Hyperblobs.md) + +*** + +### contentKey + +> `readonly` **contentKey**: `null` \| `Buffer` + +*** + +### core + +> `readonly` **core**: `Hypercore`\<`"binary"`, `undefined`\> + +*** + +### db + +> `readonly` **db**: `any` + +*** + +### discoveryKey + +> `readonly` **discoveryKey**: `null` \| `Buffer` + +*** + +### id + +> `readonly` **id**: `null` \| `string` + +*** + +### key + +> `readonly` **key**: `null` \| `Buffer` + +*** + +### version + +> `readonly` **version**: `number` + +## Methods + +### batch() + +> **batch**(): `any` + +#### Returns + +`any` + +*** + +### checkout() + +> **checkout**(`version`): [`Hyperdrive`](Hyperdrive.md) + +#### Parameters + +• **version**: `number` + +#### Returns + +[`Hyperdrive`](Hyperdrive.md) + +*** + +### clear() + +> **clear**(`path`, `opts`?): `Promise`\<`null` \| `object`\> + +#### Parameters + +• **path**: `string` + +• **opts?** + +• **opts.diff?**: `boolean` + +#### Returns + +`Promise`\<`null` \| `object`\> + +*** + +### createReadStream() + +> **createReadStream**(`path`, `opts`?): `Readable`\<`any`, `any`, `any`, `true`, `false`, `ReadableEvents`\<`any`\>\> + +#### Parameters + +• **path**: `string` + +• **opts?** + +• **opts.core?**: `Hypercore`\<`"binary"`, `undefined`\> + +• **opts.end?**: `number` + +• **opts.length?**: `number` + +• **opts.start?**: `number` + +#### Returns + +`Readable`\<`any`, `any`, `any`, `true`, `false`, `ReadableEvents`\<`any`\>\> + +*** + +### createWriteStream() + +> **createWriteStream**(`path`, `opts`?): `Writable`\<`any`, `any`, `any`, `false`, `true`, `WritableEvents`\<`any`\>\> + +#### Parameters + +• **path**: `string` + +• **opts?** + +• **opts.executable?**: `boolean` + +• **opts.metadata?**: `any` + +#### Returns + +`Writable`\<`any`, `any`, `any`, `false`, `true`, `WritableEvents`\<`any`\>\> + +*** + +### del() + +> **del**(`path`): `Promise`\<`void`\> + +#### Parameters + +• **path**: `string` + +#### Returns + +`Promise`\<`void`\> + +*** + +### diff() + +> **diff**(`version`, `folder`, `opts`?): `Readable`\<`any`, `any`, `any`, `true`, `false`, `ReadableEvents`\<`any`\>\> + +#### Parameters + +• **version**: `number` + +• **folder**: `string` + +• **opts?**: `any` + +#### Returns + +`Readable`\<`any`, `any`, `any`, `true`, `false`, `ReadableEvents`\<`any`\>\> + +*** + +### download() + +> **download**(`folder`?, `opts`?): `Readable`\<`any`, `any`, `any`, `true`, `false`, `ReadableEvents`\<`any`\>\> + +#### Parameters + +• **folder?**: `string` + +• **opts?** + +• **opts.recursive?**: `boolean` + +#### Returns + +`Readable`\<`any`, `any`, `any`, `true`, `false`, `ReadableEvents`\<`any`\>\> + +*** + +### downloadDiff() + +> **downloadDiff**(`version`, `folder`, `opts`?): `Readable`\<`any`, `any`, `any`, `true`, `false`, `ReadableEvents`\<`any`\>\> + +#### Parameters + +• **version**: `number` + +• **folder**: `string` + +• **opts?**: `any` + +#### Returns + +`Readable`\<`any`, `any`, `any`, `true`, `false`, `ReadableEvents`\<`any`\>\> + +*** + +### downloadRange() + +> **downloadRange**(`dbRanges`, `blobRanges`): `object` + +#### Parameters + +• **dbRanges**: [`Range`](../type-aliases/Range.md) + +• **blobRanges**: [`Range`](../type-aliases/Range.md) + +#### Returns + +`object` + +##### destroy() + +> **destroy**: () => `void` + +###### Returns + +`void` + +##### done + +> **done**: `Promise`\<`void`\> + +*** + +### entries() + +> **entries**(`opts`): `Readable`\<`any`, `any`, `any`, `true`, `false`, `ReadableEvents`\<`any`\>\> + +#### Parameters + +• **opts**: `any` + +#### Returns + +`Readable`\<`any`, `any`, `any`, `true`, `false`, `ReadableEvents`\<`any`\>\> + +*** + +### entry() + +> **entry**(`path`, `opts`?): `Promise`\<`null` \| [`HyperdriveEntry`](../namespaces/Hyperdrive/interfaces/HyperdriveEntry.md)\> + +#### Parameters + +• **path**: `string` + +• **opts?**: [`HyperdriveGetOpts`](../interfaces/HyperdriveGetOpts.md) + +#### Returns + +`Promise`\<`null` \| [`HyperdriveEntry`](../namespaces/Hyperdrive/interfaces/HyperdriveEntry.md)\> + +*** + +### get() + +> **get**(`path`, `opts`?): `Promise`\<`null` \| `Buffer`\> + +#### Parameters + +• **path**: `string` + +• **opts?**: `object` & [`HyperdriveGetOpts`](../interfaces/HyperdriveGetOpts.md) + +#### Returns + +`Promise`\<`null` \| `Buffer`\> + +*** + +### getBlobs() + +> **getBlobs**(): `Promise`\<`null` \| [`Hyperblobs`](Hyperblobs.md)\> + +#### Returns + +`Promise`\<`null` \| [`Hyperblobs`](Hyperblobs.md)\> + +*** + +### list() + +> **list**(`folder`, `opts`?): `Readable`\<`any`, `any`, `any`, `true`, `false`, `ReadableEvents`\<`any`\>\> + +#### Parameters + +• **folder**: `string` + +• **opts?** + +• **opts.recursive?**: `boolean` + +#### Returns + +`Readable`\<`any`, `any`, `any`, `true`, `false`, `ReadableEvents`\<`any`\>\> + +*** + +### mirror() + +> **mirror**(): `any` + +#### Returns + +`any` + +*** + +### put() + +> **put**(`path`, `blob`, `opts`?): `Promise`\<`void`\> + +#### Parameters + +• **path**: `string` + +• **blob**: `Buffer` + +• **opts?** + +• **opts.executable?**: `boolean` + +• **opts.metadata?**: `any` + +#### Returns + +`Promise`\<`void`\> + +*** + +### readdir() + +> **readdir**(`folder`): `Readable`\<`any`, `any`, `any`, `true`, `false`, `ReadableEvents`\<`any`\>\> + +#### Parameters + +• **folder**: `string` + +#### Returns + +`Readable`\<`any`, `any`, `any`, `true`, `false`, `ReadableEvents`\<`any`\>\> + +*** + +### ready() + +> **ready**(): `Promise`\<`void`\> + +#### Returns + +`Promise`\<`void`\> + +*** + +### update() + +> **update**(`options`?): `Promise`\<`Boolean`\> + +#### Parameters + +• **options?** + +• **options.wait?**: `boolean` + +#### Returns + +`Promise`\<`Boolean`\> diff --git a/docs/api/md/-internal-/classes/IconApi.md b/docs/api/md/-internal-/classes/IconApi.md new file mode 100644 index 000000000..7d96b9e1c --- /dev/null +++ b/docs/api/md/-internal-/classes/IconApi.md @@ -0,0 +1,77 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / IconApi + +# Class: IconApi + +## Constructors + +### new IconApi() + +> **new IconApi**(`opts`): [`IconApi`](IconApi.md) + +#### Parameters + +• **opts** + +• **opts.getMediaBaseUrl** + +• **opts.iconDataStore**: [`DataStore`](DataStore.md)\<`"config"`, `"translation"` \| `"preset"` \| `"field"` \| `"projectSettings"` \| `"deviceInfo"` \| `"icon"`\> + +• **opts.iconDataType**: [`DataType`](DataType.md)\<[`DataStore`](DataStore.md)\<`"config"`, `"translation"` \| `"preset"` \| `"field"` \| `"projectSettings"` \| `"deviceInfo"` \| `"icon"`\>, `SQLiteTableWithColumns`\<`object`\>, `"icon"`, `object`, `object`\> + +#### Returns + +[`IconApi`](IconApi.md) + +## Methods + +### \[kGetIconBlob\]() + +> **\[kGetIconBlob\]**(`iconId`, `opts`): `Promise`\<`Buffer`\> + +#### Parameters + +• **iconId**: `string` + +• **opts**: [`BitmapOpts`](../interfaces/BitmapOpts.md) \| [`SvgOpts`](../interfaces/SvgOpts.md) + +#### Returns + +`Promise`\<`Buffer`\> + +*** + +### create() + +> **create**(`icon`): `Promise`\<`object`\> + +#### Parameters + +• **icon** + +• **icon.name**: `string` + +• **icon.variants**: [`BitmapOpts`](../interfaces/BitmapOpts.md) \| [`SvgOpts`](../interfaces/SvgOpts.md) & `object`[] + +#### Returns + +`Promise`\<`object`\> + +*** + +### getIconUrl() + +> **getIconUrl**(`iconId`, `opts`): `Promise`\<`string`\> + +#### Parameters + +• **iconId**: `string` + +• **opts**: [`BitmapOpts`](../interfaces/BitmapOpts.md) \| [`SvgOpts`](../interfaces/SvgOpts.md) + +#### Returns + +`Promise`\<`string`\> diff --git a/docs/api/md/-internal-/classes/Index.md b/docs/api/md/-internal-/classes/Index.md new file mode 100644 index 000000000..e2bf81e2d --- /dev/null +++ b/docs/api/md/-internal-/classes/Index.md @@ -0,0 +1,110 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / Index + +# Class: Index + +## Extended by + +- [`SparseIndex`](SparseIndex.md) +- [`DenseIndex`](DenseIndex.md) + +## Constructors + +### new Index() + +> **new Index**(`byteLength`): [`Index`](Index.md) + +#### Parameters + +• **byteLength**: `number` + +#### Returns + +[`Index`](Index.md) + +## Properties + +### byteLength + +> `readonly` **byteLength**: `number` + +## Methods + +### skipFirst() + +> **skipFirst**(`value`, `position`?): `number` + +#### Parameters + +• **value**: `boolean` + +• **position?**: `number` + +#### Returns + +`number` + +*** + +### skipLast() + +> **skipLast**(`value`, `position`?): `number` + +#### Parameters + +• **value**: `boolean` + +• **position?**: `number` + +#### Returns + +`number` + +*** + +### update() + +> **update**(`bit`): `boolean` + +#### Parameters + +• **bit**: `number` + +#### Returns + +`boolean` + +*** + +### from() + +#### from(field, byteLength) + +> `static` **from**(`field`, `byteLength`): [`DenseIndex`](DenseIndex.md) + +##### Parameters + +• **field**: `TypedArray` + +• **byteLength**: `number` + +##### Returns + +[`DenseIndex`](DenseIndex.md) + +#### from(chunks, byteLength) + +> `static` **from**(`chunks`, `byteLength`): [`SparseIndex`](SparseIndex.md) + +##### Parameters + +• **chunks**: [`Chunk`](../type-aliases/Chunk.md)[] + +• **byteLength**: `number` + +##### Returns + +[`SparseIndex`](SparseIndex.md) diff --git a/docs/api/md/-internal-/classes/IndexWriter.md b/docs/api/md/-internal-/classes/IndexWriter.md new file mode 100644 index 000000000..5ce110521 --- /dev/null +++ b/docs/api/md/-internal-/classes/IndexWriter.md @@ -0,0 +1,79 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / IndexWriter + +# Class: IndexWriter\ + +## Type Parameters + +• **TTables** = [`MapeoDocTables`](../type-aliases/MapeoDocTables.md) + +## Constructors + +### new IndexWriter() + +> **new IndexWriter**\<`TTables`\>(`opts`): [`IndexWriter`](IndexWriter.md)\<`TTables`\> + +#### Parameters + +• **opts** + +• **opts.getWinner**: `undefined` \| \<`T`, `U`\>(`docA`, `docB`) => `T` \| `U` + +custom function to determine the "winner" of two forked documents. Defaults to choosing the document with the most recent `updatedAt` + +• **opts.logger**: `undefined` \| [`Logger`](Logger.md) + +• **opts.mapDoc**: `undefined` \| (`doc`, `version`) => `MapeoDoc` = `...` + +optionally transform a document prior to indexing. Can also validate, if an error is thrown then the document will not be indexed + +• **opts.sqlite**: `Database` + +• **opts.tables**: `TTables`[] + +#### Returns + +[`IndexWriter`](IndexWriter.md)\<`TTables`\> + +## Accessors + +### schemas + +> `get` **schemas**(): `Iterable`\<[`SchemaName`](../type-aliases/SchemaName.md), `any`, `any`\> + +#### Returns + +`Iterable`\<[`SchemaName`](../type-aliases/SchemaName.md), `any`, `any`\> + +## Methods + +### batch() + +> **batch**(`entries`): `Promise`\<[`IndexedDocIds`](../type-aliases/IndexedDocIds.md)\> + +#### Parameters + +• **entries**: `Entry`\<`"binary"`\>[] + +#### Returns + +`Promise`\<[`IndexedDocIds`](../type-aliases/IndexedDocIds.md)\> + +map of indexed docIds by schemaName + +*** + +### deleteSchema() + +> **deleteSchema**(`schemaName`): `void` + +#### Parameters + +• **schemaName**: [`SchemaName`](../type-aliases/SchemaName.md) + +#### Returns + +`void` diff --git a/docs/api/md/-internal-/classes/InviteApi.md b/docs/api/md/-internal-/classes/InviteApi.md new file mode 100644 index 000000000..ec782be70 --- /dev/null +++ b/docs/api/md/-internal-/classes/InviteApi.md @@ -0,0 +1,92 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / InviteApi + +# Class: InviteApi + +## Extends + +- `TypedEmitter` + +## Constructors + +### new InviteApi() + +> **new InviteApi**(`options`): [`InviteApi`](InviteApi.md) + +#### Parameters + +• **options** + +• **options.logger**: `undefined` \| [`Logger`](Logger.md) + +• **options.queries** + +• **options.queries.addProject** + +• **options.queries.getProjectByInviteId** + +• **options.rpc**: [`LocalPeers`](LocalPeers.md) + +#### Returns + +[`InviteApi`](InviteApi.md) + +#### Overrides + +`TypedEmitter.constructor` + +## Properties + +### rpc + +> **rpc**: [`LocalPeers`](LocalPeers.md) + +## Methods + +### accept() + +> **accept**(`invite`): `Promise`\<`string`\> + +Attempt to accept the invite. + +This can fail if the invitor has canceled the invite or if you cannot +connect to the invitor's device. + +If the invite is accepted and you had other invites to the same project, +those invites are removed, and the invitors are told that you're already +part of this project. + +#### Parameters + +• **invite**: `Pick`\<[`MapBuffers`](../type-aliases/MapBuffers.md)\<[`InviteInternal`](../type-aliases/InviteInternal.md)\>, `"inviteId"`\> + +#### Returns + +`Promise`\<`string`\> + +*** + +### getPending() + +> **getPending**(): [`MapBuffers`](../type-aliases/MapBuffers.md)\<[`InviteInternal`](../type-aliases/InviteInternal.md)\>[] + +#### Returns + +[`MapBuffers`](../type-aliases/MapBuffers.md)\<[`InviteInternal`](../type-aliases/InviteInternal.md)\>[] + +*** + +### reject() + +> **reject**(`invite`): `void` + +#### Parameters + +• **invite**: `Pick`\<[`MapBuffers`](../type-aliases/MapBuffers.md)\<[`InviteInternal`](../type-aliases/InviteInternal.md)\>, `"inviteId"`\> + +#### Returns + +`void` diff --git a/docs/api/md/-internal-/classes/LiveDownload.md b/docs/api/md/-internal-/classes/LiveDownload.md new file mode 100644 index 000000000..b558e80d7 --- /dev/null +++ b/docs/api/md/-internal-/classes/LiveDownload.md @@ -0,0 +1,53 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / LiveDownload + +# Class: LiveDownload + +LiveDownload class + +## Extends + +- `TypedEmitter` + +## Constructors + +### new LiveDownload() + +> **new LiveDownload**(`drives`, `emitter`, `options`): [`LiveDownload`](LiveDownload.md) + +Like drive.download() but 'live', and for multiple drives + +#### Parameters + +• **drives**: `Iterable`\<[`Hyperdrive`](Hyperdrive.md), `any`, `any`\> + +• **emitter**: [`InternalDriveEmitter`](../type-aliases/InternalDriveEmitter.md) + +• **options** + +• **options.filter**: `undefined` \| [`BlobFilter`](../type-aliases/BlobFilter.md) + +Filter blobs of specific types and/or sizes to download + +• **options.signal**: `undefined` \| `AbortSignal` + +#### Returns + +[`LiveDownload`](LiveDownload.md) + +#### Overrides + +`TypedEmitter.constructor` + +## Accessors + +### state + +> `get` **state**(): [`BlobDownloadState`](../interfaces/BlobDownloadState.md) \| [`BlobDownloadStateError`](../type-aliases/BlobDownloadStateError.md) + +#### Returns + +[`BlobDownloadState`](../interfaces/BlobDownloadState.md) \| [`BlobDownloadStateError`](../type-aliases/BlobDownloadStateError.md) diff --git a/docs/api/md/-internal-/classes/LocalDiscovery.md b/docs/api/md/-internal-/classes/LocalDiscovery.md new file mode 100644 index 000000000..2e5bf4d45 --- /dev/null +++ b/docs/api/md/-internal-/classes/LocalDiscovery.md @@ -0,0 +1,97 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / LocalDiscovery + +# Class: LocalDiscovery + +## Extends + +- `TypedEmitter` + +## Constructors + +### new LocalDiscovery() + +> **new LocalDiscovery**(`opts`): [`LocalDiscovery`](LocalDiscovery.md) + +#### Parameters + +• **opts** + +• **opts.identityKeypair**: [`Keypair`](../type-aliases/Keypair.md) + +• **opts.logger**: `undefined` \| [`Logger`](Logger.md) + +#### Returns + +[`LocalDiscovery`](LocalDiscovery.md) + +#### Overrides + +`TypedEmitter.constructor` + +## Methods + +### connectPeer() + +> **connectPeer**(`peer`): `void` + +#### Parameters + +• **peer** + +• **peer.address**: `string` + +• **peer.name**: `string` + +• **peer.port**: `number` + +#### Returns + +`void` + +*** + +### start() + +> **start**(): `Promise`\<`object`\> + +#### Returns + +`Promise`\<`object`\> + +##### name + +> **name**: `string` + +##### port + +> **port**: `number` + +*** + +### stop() + +> **stop**(`opts`?): `Promise`\<`void`\> + +Close all servers and stop multicast advertising and browsing. Will wait +for open sockets to close unless opts.force=true in which case open sockets +are force-closed after opts.timeout milliseconds + +#### Parameters + +• **opts?** + +• **opts.force?**: `undefined` \| `boolean` + +Force-close open sockets after timeout milliseconds + +• **opts.timeout?**: `undefined` \| `number` + +Optional timeout when calling stop() with force=true + +#### Returns + +`Promise`\<`void`\> diff --git a/docs/api/md/-internal-/classes/LocalPeers.md b/docs/api/md/-internal-/classes/LocalPeers.md new file mode 100644 index 000000000..96f29de34 --- /dev/null +++ b/docs/api/md/-internal-/classes/LocalPeers.md @@ -0,0 +1,161 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / LocalPeers + +# Class: LocalPeers + +## Extends + +- `TypedEmitter` + +## Constructors + +### new LocalPeers() + +> **new LocalPeers**(`opts`?): [`LocalPeers`](LocalPeers.md) + +#### Parameters + +• **opts?** = `{}` + +• **opts.logger?**: `undefined` \| [`Logger`](Logger.md) + +#### Returns + +[`LocalPeers`](LocalPeers.md) + +#### Overrides + +`TypedEmitter.constructor` + +## Accessors + +### peers + +> `get` **peers**(): ([`PeerInfoBase`](../interfaces/PeerInfoBase.md) & `object` \| [`PeerInfoBase`](../interfaces/PeerInfoBase.md) & `object`)[] + +#### Returns + +([`PeerInfoBase`](../interfaces/PeerInfoBase.md) & `object` \| [`PeerInfoBase`](../interfaces/PeerInfoBase.md) & `object`)[] + +## Methods + +### \[kTestOnlySendRawInvite\]() + +> **\[kTestOnlySendRawInvite\]**(`deviceId`, `buf`): `Promise`\<`void`\> + +#### Parameters + +• **deviceId**: `string` + +• **buf**: `Buffer` + +#### Returns + +`Promise`\<`void`\> + +*** + +### connect() + +> **connect**(`stream`): [`ReplicationStream`](../type-aliases/ReplicationStream.md) + +Connect to a peer over an existing NoiseSecretStream + +#### Parameters + +• **stream**: `NoiseSecretStream`\<`any`\> + +#### Returns + +[`ReplicationStream`](../type-aliases/ReplicationStream.md) + +*** + +### sendDeviceInfo() + +> **sendDeviceInfo**(`deviceId`, `deviceInfo`): `Promise`\<`void`\> + +#### Parameters + +• **deviceId**: `string` + +id of the peer you want to send to (publicKey of peer as hex string) + +• **deviceInfo**: `DeviceInfo` + +device info to send + +#### Returns + +`Promise`\<`void`\> + +*** + +### sendInvite() + +> **sendInvite**(`deviceId`, `invite`): `Promise`\<`void`\> + +#### Parameters + +• **deviceId**: `string` + +• **invite**: `Invite` + +#### Returns + +`Promise`\<`void`\> + +*** + +### sendInviteCancel() + +> **sendInviteCancel**(`deviceId`, `inviteCancel`): `Promise`\<`void`\> + +#### Parameters + +• **deviceId**: `string` + +• **inviteCancel**: `InviteCancel` + +#### Returns + +`Promise`\<`void`\> + +*** + +### sendInviteResponse() + +> **sendInviteResponse**(`deviceId`, `inviteResponse`): `Promise`\<`void`\> + +Respond to an invite from a peer + +#### Parameters + +• **deviceId**: `string` + +id of the peer you want to respond to (publicKey of peer as hex string) + +• **inviteResponse**: `InviteResponse` + +#### Returns + +`Promise`\<`void`\> + +*** + +### sendProjectJoinDetails() + +> **sendProjectJoinDetails**(`deviceId`, `details`): `Promise`\<`void`\> + +#### Parameters + +• **deviceId**: `string` + +• **details**: `ProjectJoinDetails` + +#### Returns + +`Promise`\<`void`\> diff --git a/docs/api/md/-internal-/classes/Logger.md b/docs/api/md/-internal-/classes/Logger.md new file mode 100644 index 000000000..725c4fa99 --- /dev/null +++ b/docs/api/md/-internal-/classes/Logger.md @@ -0,0 +1,85 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / Logger + +# Class: Logger + +## Constructors + +### new Logger() + +> **new Logger**(`opts`): [`Logger`](Logger.md) + +#### Parameters + +• **opts** + +• **opts.baseLogger**: `undefined` \| `Debugger` + +• **opts.deviceId**: `string` + +• **opts.ns**: `undefined` \| `string` + +• **opts.prefix**: `undefined` \| `string` + +optional prefix to add to the start of each log message. Used to add context e.g. the core ID that is syncing. Use this as an alternative to the debug namespace. + +#### Returns + +[`Logger`](Logger.md) + +## Properties + +### deviceId + +> **deviceId**: `string` + +## Accessors + +### log + +> `get` **log**(): `Debugger` + +#### Returns + +`Debugger` + +## Methods + +### extend() + +> **extend**(`ns`, `opts`?): [`Logger`](Logger.md) + +#### Parameters + +• **ns**: `string` + +• **opts?** = `{}` + +• **opts.prefix?**: `string` + +#### Returns + +[`Logger`](Logger.md) + +*** + +### create() + +> `static` **create**(`ns`, `logger`?, `opts`?): [`Logger`](Logger.md) + +#### Parameters + +• **ns**: `string` + +• **logger?**: [`Logger`](Logger.md) + +• **opts?** + +• **opts.prefix?**: `string` + +#### Returns + +[`Logger`](Logger.md) diff --git a/docs/api/md/-internal-/classes/MapeoProject.md b/docs/api/md/-internal-/classes/MapeoProject.md new file mode 100644 index 000000000..e9768a583 --- /dev/null +++ b/docs/api/md/-internal-/classes/MapeoProject.md @@ -0,0 +1,406 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / MapeoProject + +# Class: MapeoProject + +## Extends + +- `TypedEmitter` + +## Constructors + +### new MapeoProject() + +> **new MapeoProject**(`opts`): [`MapeoProject`](MapeoProject.md) + +#### Parameters + +• **opts** + +• **opts.coreStorage**: [`CoreStorage`](../type-aliases/CoreStorage.md) + +Folder to store all hypercore data + +• **opts.dbPath**: `string` + +Path to store project sqlite db. Use `:memory:` for memory storage + +• **opts.encryptionKeys**: `EncryptionKeys` + +Encryption keys for each namespace + +• **opts.getMediaBaseUrl** + +• **opts.keyManager**: `KeyManager` + +mapeo/crypto KeyManager instance + +• **opts.localPeers**: [`LocalPeers`](LocalPeers.md) + +• **opts.logger**: `undefined` \| [`Logger`](Logger.md) + +• **opts.projectKey**: `Buffer` + +32-byte public key of the project creator core + +• **opts.projectMigrationsFolder**: `string` + +path for drizzle migration folder for project + +• **opts.projectSecretKey**: `undefined` \| `Buffer` + +32-byte secret key of the project creator core + +• **opts.sharedDb**: `BetterSQLite3Database`\<`Record`\<`string`, `never`\>\> + +• **opts.sharedIndexWriter**: [`IndexWriter`](IndexWriter.md)\<[`MapeoDocTables`](../type-aliases/MapeoDocTables.md)\> + +#### Returns + +[`MapeoProject`](MapeoProject.md) + +#### Overrides + +`TypedEmitter.constructor` + +## Properties + +### $blobs + +> **$blobs**: [`BlobApi`](BlobApi.md) + +*** + +### EMPTY\_PROJECT\_SETTINGS + +> `static` **EMPTY\_PROJECT\_SETTINGS**: `Readonly`\<`object`\> + +## Accessors + +### \[kBlobStore\] + +> `get` **\[kBlobStore\]**(): [`BlobStore`](BlobStore.md) + +#### Returns + +[`BlobStore`](BlobStore.md) + +*** + +### \[kCoreManager\] + +> `get` **\[kCoreManager\]**(): [`CoreManager`](CoreManager.md) + +CoreManager instance, used for tests + +#### Returns + +[`CoreManager`](CoreManager.md) + +*** + +### \[kCoreOwnership\] + +> `get` **\[kCoreOwnership\]**(): [`CoreOwnership`](CoreOwnership.md) + +CoreOwnership instance, used for tests + +#### Returns + +[`CoreOwnership`](CoreOwnership.md) + +*** + +### \[kDataTypes\] + +> `get` **\[kDataTypes\]**(): `object` + +DataTypes object mappings, used for tests + +#### Returns + +`object` + +##### coreOwnership + +> **coreOwnership**: [`DataType`](DataType.md)\<[`DataStore`](DataStore.md)\<`"auth"`, `"coreOwnership"` \| `"role"`\>, `SQLiteTableWithColumns`\<`object`\>, `"coreOwnership"`, `object`, `object`\> + +##### deviceInfo + +> **deviceInfo**: [`DataType`](DataType.md)\<[`DataStore`](DataStore.md)\<`"config"`, `"translation"` \| `"preset"` \| `"field"` \| `"projectSettings"` \| `"deviceInfo"` \| `"icon"`\>, `SQLiteTableWithColumns`\<`object`\>, `"deviceInfo"`, `object`, `object`\> + +##### field + +> **field**: [`DataType`](DataType.md)\<[`DataStore`](DataStore.md)\<`"config"`, `"translation"` \| `"preset"` \| `"field"` \| `"projectSettings"` \| `"deviceInfo"` \| `"icon"`\>, `SQLiteTableWithColumns`\<`object`\>, `"field"`, `object`, `object`\> + +##### icon + +> **icon**: [`DataType`](DataType.md)\<[`DataStore`](DataStore.md)\<`"config"`, `"translation"` \| `"preset"` \| `"field"` \| `"projectSettings"` \| `"deviceInfo"` \| `"icon"`\>, `SQLiteTableWithColumns`\<`object`\>, `"icon"`, `object`, `object`\> + +##### observation + +> **observation**: [`DataType`](DataType.md)\<[`DataStore`](DataStore.md)\<`"data"`, `"observation"` \| `"track"`\>, `SQLiteTableWithColumns`\<`object`\>, `"observation"`, `object`, `object`\> + +##### preset + +> **preset**: [`DataType`](DataType.md)\<[`DataStore`](DataStore.md)\<`"config"`, `"translation"` \| `"preset"` \| `"field"` \| `"projectSettings"` \| `"deviceInfo"` \| `"icon"`\>, `SQLiteTableWithColumns`\<`object`\>, `"preset"`, `object`, `object`\> + +##### projectSettings + +> **projectSettings**: [`DataType`](DataType.md)\<[`DataStore`](DataStore.md)\<`"config"`, `"translation"` \| `"preset"` \| `"field"` \| `"projectSettings"` \| `"deviceInfo"` \| `"icon"`\>, `SQLiteTableWithColumns`\<`object`\>, `"projectSettings"`, `object`, `object`\> + +##### role + +> **role**: [`DataType`](DataType.md)\<[`DataStore`](DataStore.md)\<`"auth"`, `"coreOwnership"` \| `"role"`\>, `SQLiteTableWithColumns`\<`object`\>, `"role"`, `object`, `object`\> + +##### track + +> **track**: [`DataType`](DataType.md)\<[`DataStore`](DataStore.md)\<`"data"`, `"observation"` \| `"track"`\>, `SQLiteTableWithColumns`\<`object`\>, `"track"`, `object`, `object`\> + +##### translation + +> **translation**: [`DataType`](DataType.md)\<[`DataStore`](DataStore.md)\<`"config"`, `"translation"` \| `"preset"` \| `"field"` \| `"projectSettings"` \| `"deviceInfo"` \| `"icon"`\>, `SQLiteTableWithColumns`\<`object`\>, `"translation"`, `object`, `object`\> + +*** + +### $icons + +> `get` **$icons**(): [`IconApi`](IconApi.md) + +#### Returns + +[`IconApi`](IconApi.md) + +*** + +### $member + +> `get` **$member**(): [`MemberApi`](MemberApi.md) + +#### Returns + +[`MemberApi`](MemberApi.md) + +*** + +### $sync + +> `get` **$sync**(): [`SyncApi`](SyncApi.md) + +#### Returns + +[`SyncApi`](SyncApi.md) + +*** + +### $translation + +> `get` **$translation**(): [`default`](default.md) + +#### Returns + +[`default`](default.md) + +*** + +### deviceId + +> `get` **deviceId**(): `string` + +#### Returns + +`string` + +*** + +### field + +> `get` **field**(): [`DataType`](DataType.md)\<[`DataStore`](DataStore.md)\<`"config"`, `"translation"` \| `"preset"` \| `"field"` \| `"projectSettings"` \| `"deviceInfo"` \| `"icon"`\>, `SQLiteTableWithColumns`\<`object`\>, `"field"`, `object`, `object`\> + +#### Returns + +[`DataType`](DataType.md)\<[`DataStore`](DataStore.md)\<`"config"`, `"translation"` \| `"preset"` \| `"field"` \| `"projectSettings"` \| `"deviceInfo"` \| `"icon"`\>, `SQLiteTableWithColumns`\<`object`\>, `"field"`, `object`, `object`\> + +*** + +### observation + +> `get` **observation**(): [`DataType`](DataType.md)\<[`DataStore`](DataStore.md)\<`"data"`, `"observation"` \| `"track"`\>, `SQLiteTableWithColumns`\<`object`\>, `"observation"`, `object`, `object`\> + +#### Returns + +[`DataType`](DataType.md)\<[`DataStore`](DataStore.md)\<`"data"`, `"observation"` \| `"track"`\>, `SQLiteTableWithColumns`\<`object`\>, `"observation"`, `object`, `object`\> + +*** + +### preset + +> `get` **preset**(): [`DataType`](DataType.md)\<[`DataStore`](DataStore.md)\<`"config"`, `"translation"` \| `"preset"` \| `"field"` \| `"projectSettings"` \| `"deviceInfo"` \| `"icon"`\>, `SQLiteTableWithColumns`\<`object`\>, `"preset"`, `object`, `object`\> + +#### Returns + +[`DataType`](DataType.md)\<[`DataStore`](DataStore.md)\<`"config"`, `"translation"` \| `"preset"` \| `"field"` \| `"projectSettings"` \| `"deviceInfo"` \| `"icon"`\>, `SQLiteTableWithColumns`\<`object`\>, `"preset"`, `object`, `object`\> + +*** + +### track + +> `get` **track**(): [`DataType`](DataType.md)\<[`DataStore`](DataStore.md)\<`"data"`, `"observation"` \| `"track"`\>, `SQLiteTableWithColumns`\<`object`\>, `"track"`, `object`, `object`\> + +#### Returns + +[`DataType`](DataType.md)\<[`DataStore`](DataStore.md)\<`"data"`, `"observation"` \| `"track"`\>, `SQLiteTableWithColumns`\<`object`\>, `"track"`, `object`, `object`\> + +## Methods + +### \[kClearDataIfLeft\]() + +> **\[kClearDataIfLeft\]**(): `Promise`\<`void`\> + +Clear data if we've left the project. No-op if you're still in the project. + +#### Returns + +`Promise`\<`void`\> + +*** + +### \[kProjectLeave\]() + +> **\[kProjectLeave\]**(): `Promise`\<`void`\> + +#### Returns + +`Promise`\<`void`\> + +*** + +### \[kProjectReplicate\]() + +> **\[kProjectReplicate\]**(`stream`): `Duplex`\<`any`, `any`, `any`, `any`, `true`, `true`, `DuplexEvents`\<`any`, `any`\>\> & `object` & [`Protomux`](Protomux.md)\<`Duplex`\<`any`, `any`, `any`, `any`, `true`, `true`, `DuplexEvents`\<`any`, `any`\>\>\> + +Replicate a project to a @hyperswarm/secret-stream. Invites will not +function because the RPC channel is not connected for project replication, +and only this project will replicate (to replicate multiple projects you +need to replicate the manager instance via manager[kManagerReplicate]) + +#### Parameters + +• **stream**: [`Protomux`](Protomux.md)\<`Duplex`\<`any`, `any`, `any`, `any`, `true`, `true`, `DuplexEvents`\<`any`, `any`\>\>\> + +A duplex stream, a @hyperswarm/secret-stream, or a Protomux instance + +#### Returns + +`Duplex`\<`any`, `any`, `any`, `any`, `true`, `true`, `DuplexEvents`\<`any`, `any`\>\> & `object` & [`Protomux`](Protomux.md)\<`Duplex`\<`any`, `any`, `any`, `any`, `true`, `true`, `DuplexEvents`\<`any`, `any`\>\>\> + +*** + +### \[kSetOwnDeviceInfo\]() + +> **\[kSetOwnDeviceInfo\]**(`value`): `Promise`\<`object`\> + +#### Parameters + +• **value**: `Pick`\<`object`, `"name"` \| `"deviceType"`\> + +#### Returns + +`Promise`\<`object`\> + +*** + +### $getOwnRole() + +> **$getOwnRole**(): `Promise`\<[`Role`](../interfaces/Role.md)\<`"a12a6702b93bd7ff"` \| `"f7c150f5a3a9a855"` \| `"012fd2d431c0bf60"` \| `"9e6d29263cba36c9"` \| `"8ced989b1904606b"` \| `"08e4251e36f6e7ed"`\>\> + +#### Returns + +`Promise`\<[`Role`](../interfaces/Role.md)\<`"a12a6702b93bd7ff"` \| `"f7c150f5a3a9a855"` \| `"012fd2d431c0bf60"` \| `"9e6d29263cba36c9"` \| `"8ced989b1904606b"` \| `"08e4251e36f6e7ed"`\>\> + +*** + +### $getProjectSettings() + +> **$getProjectSettings**(): `Promise`\<[`EditableProjectSettings`](../type-aliases/EditableProjectSettings.md)\> + +#### Returns + +`Promise`\<[`EditableProjectSettings`](../type-aliases/EditableProjectSettings.md)\> + +*** + +### $originalVersionIdToDeviceId() + +> **$originalVersionIdToDeviceId**(`originalVersionId`): `Promise`\<`string`\> + +#### Parameters + +• **originalVersionId**: `string` + +The `originalVersionId` from a document. + +#### Returns + +`Promise`\<`string`\> + +The device ID for this creator. + +#### Throws + +When device ID cannot be found. + +*** + +### $setProjectSettings() + +> **$setProjectSettings**(`settings`): `Promise`\<[`EditableProjectSettings`](../type-aliases/EditableProjectSettings.md)\> + +#### Parameters + +• **settings**: `Partial`\<[`EditableProjectSettings`](../type-aliases/EditableProjectSettings.md)\> + +#### Returns + +`Promise`\<[`EditableProjectSettings`](../type-aliases/EditableProjectSettings.md)\> + +*** + +### close() + +> **close**(): `Promise`\<`void`\> + +#### Returns + +`Promise`\<`void`\> + +*** + +### importConfig() + +> **importConfig**(`opts`): `Promise`\<`Error`[]\> + +#### Parameters + +• **opts** + +• **opts.configPath**: `string` + +#### Returns + +`Promise`\<`Error`[]\> + +*** + +### ready() + +> **ready**(): `Promise`\<`void`\> + +Resolves when hypercores have all loaded + +#### Returns + +`Promise`\<`void`\> diff --git a/docs/api/md/-internal-/classes/MemberApi.md b/docs/api/md/-internal-/classes/MemberApi.md new file mode 100644 index 000000000..841614c83 --- /dev/null +++ b/docs/api/md/-internal-/classes/MemberApi.md @@ -0,0 +1,136 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / MemberApi + +# Class: MemberApi + +## Extends + +- `TypedEmitter` + +## Constructors + +### new MemberApi() + +> **new MemberApi**(`opts`): [`MemberApi`](MemberApi.md) + +#### Parameters + +• **opts** + +• **opts.coreOwnership**: [`CoreOwnership`](CoreOwnership.md) + +• **opts.dataTypes** + +• **opts.dataTypes.deviceInfo**: `Pick`\<[`DeviceInfoDataType`](../type-aliases/DeviceInfoDataType.md), `"getByDocId"` \| `"getMany"`\> + +• **opts.dataTypes.project**: `Pick`\<[`ProjectDataType`](../type-aliases/ProjectDataType.md), `"getByDocId"`\> + +• **opts.deviceId**: `string` + +public key of this device as hex string + +• **opts.encryptionKeys**: `EncryptionKeys` + +• **opts.projectKey**: `Buffer` + +• **opts.roles**: [`Roles`](Roles.md) + +• **opts.rpc**: [`LocalPeers`](LocalPeers.md) + +#### Returns + +[`MemberApi`](MemberApi.md) + +#### Overrides + +`TypedEmitter.constructor` + +## Methods + +### assignRole() + +> **assignRole**(`deviceId`, `roleId`): `Promise`\<`void`\> + +#### Parameters + +• **deviceId**: `string` + +• **roleId**: `"f7c150f5a3a9a855"` \| `"012fd2d431c0bf60"` \| `"9e6d29263cba36c9"` + +#### Returns + +`Promise`\<`void`\> + +*** + +### getById() + +> **getById**(`deviceId`): `Promise`\<[`MemberInfo`](../interfaces/MemberInfo.md)\> + +#### Parameters + +• **deviceId**: `string` + +#### Returns + +`Promise`\<[`MemberInfo`](../interfaces/MemberInfo.md)\> + +*** + +### getMany() + +> **getMany**(): `Promise`\<[`MemberInfo`](../interfaces/MemberInfo.md)[]\> + +#### Returns + +`Promise`\<[`MemberInfo`](../interfaces/MemberInfo.md)[]\> + +*** + +### invite() + +> **invite**(`deviceId`, `opts`): `Promise`\<`"REJECT"` \| `"ACCEPT"` \| `"ALREADY"`\> + +Send an invite. Resolves when receiving a response. Rejects if the invite +is canceled, or if something else goes wrong. + +#### Parameters + +• **deviceId**: `string` + +• **opts** + +• **opts.\_\_testOnlyInviteId**: `undefined` \| `Buffer` + +Hard-code the invite ID. Only for tests. + +• **opts.roleDescription**: `undefined` \| `string` + +• **opts.roleId**: `"f7c150f5a3a9a855"` \| `"012fd2d431c0bf60"` \| `"9e6d29263cba36c9"` + +• **opts.roleName**: `undefined` \| `string` = `...` + +#### Returns + +`Promise`\<`"REJECT"` \| `"ACCEPT"` \| `"ALREADY"`\> + +*** + +### requestCancelInvite() + +> **requestCancelInvite**(`deviceId`): `void` + +Attempt to cancel an outbound invite, if it exists. + +No-op if we weren't inviting this device. + +#### Parameters + +• **deviceId**: `string` + +#### Returns + +`void` diff --git a/docs/api/md/-internal-/classes/Peer.md b/docs/api/md/-internal-/classes/Peer.md new file mode 100644 index 000000000..db67aef10 --- /dev/null +++ b/docs/api/md/-internal-/classes/Peer.md @@ -0,0 +1,180 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / Peer + +# Class: Peer + +## Constructors + +### new Peer() + +> **new Peer**(`options`): [`Peer`](Peer.md) + +#### Parameters + +• **options** + +• **options.channel**: [`Channel`](../interfaces/Channel.md) + +• **options.logger**: `undefined` \| [`Logger`](Logger.md) + +• **options.peerId**: `string` + +• **options.protomux**: [`Protomux`](Protomux.md)\<`any`\> + +#### Returns + +[`Peer`](Peer.md) + +## Accessors + +### connected + +> `get` **connected**(): `Promise`\<`any`\> + +A promise that resolves when the peer connects, or rejects if it +fails to connect + +#### Returns + +`Promise`\<`any`\> + +*** + +### info + +> `get` **info**(): [`PeerInfoInternal`](../namespaces/home_runner_work_comapeo-core_comapeo-core_src_local-peers/type-aliases/PeerInfoInternal.md) + +#### Returns + +[`PeerInfoInternal`](../namespaces/home_runner_work_comapeo-core_comapeo-core_src_local-peers/type-aliases/PeerInfoInternal.md) + +*** + +### protomux + +> `get` **protomux**(): [`Protomux`](Protomux.md)\<`any`\> + +#### Returns + +[`Protomux`](Protomux.md)\<`any`\> + +## Methods + +### \[kTestOnlySendRawInvite\]() + +> **\[kTestOnlySendRawInvite\]**(`buf`): `void` + +#### Parameters + +• **buf**: `Buffer` + +#### Returns + +`void` + +*** + +### connect() + +> **connect**(): `void` + +#### Returns + +`void` + +*** + +### disconnect() + +> **disconnect**(): `void` + +#### Returns + +`void` + +*** + +### receiveDeviceInfo() + +> **receiveDeviceInfo**(`deviceInfo`): `void` + +#### Parameters + +• **deviceInfo**: `DeviceInfo` + +#### Returns + +`void` + +*** + +### sendDeviceInfo() + +> **sendDeviceInfo**(`deviceInfo`): `void` + +#### Parameters + +• **deviceInfo**: `DeviceInfo` + +#### Returns + +`void` + +*** + +### sendInvite() + +> **sendInvite**(`invite`): `void` + +#### Parameters + +• **invite**: `Invite` + +#### Returns + +`void` + +*** + +### sendInviteCancel() + +> **sendInviteCancel**(`inviteCancel`): `void` + +#### Parameters + +• **inviteCancel**: `InviteCancel` + +#### Returns + +`void` + +*** + +### sendInviteResponse() + +> **sendInviteResponse**(`response`): `void` + +#### Parameters + +• **response**: `InviteResponse` + +#### Returns + +`void` + +*** + +### sendProjectJoinDetails() + +> **sendProjectJoinDetails**(`details`): `void` + +#### Parameters + +• **details**: `ProjectJoinDetails` + +#### Returns + +`void` diff --git a/docs/api/md/-internal-/classes/PeerSyncController.md b/docs/api/md/-internal-/classes/PeerSyncController.md new file mode 100644 index 000000000..88a50e04d --- /dev/null +++ b/docs/api/md/-internal-/classes/PeerSyncController.md @@ -0,0 +1,89 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / PeerSyncController + +# Class: PeerSyncController + +## Constructors + +### new PeerSyncController() + +> **new PeerSyncController**(`opts`): [`PeerSyncController`](PeerSyncController.md) + +#### Parameters + +• **opts** + +• **opts.coreManager**: [`CoreManager`](CoreManager.md) + +• **opts.logger**: `undefined` \| [`Logger`](Logger.md) + +• **opts.protomux**: [`Protomux`](Protomux.md)\<[`OpenedNoiseStream`](../type-aliases/OpenedNoiseStream.md)\> + +• **opts.roles**: [`Roles`](Roles.md) + +• **opts.syncState**: [`SyncState`](SyncState.md) + +#### Returns + +[`PeerSyncController`](PeerSyncController.md) + +## Accessors + +### peerId + +> `get` **peerId**(): `string` + +#### Returns + +`string` + +*** + +### peerKey + +> `get` **peerKey**(): `Buffer` + +#### Returns + +`Buffer` + +*** + +### syncCapability + +> `get` **syncCapability**(): `Record`\<`"blob"` \| `"auth"` \| `"config"` \| `"data"` \| `"blobIndex"`, [`SyncCapability`](../type-aliases/SyncCapability.md)\> + +#### Returns + +`Record`\<`"blob"` \| `"auth"` \| `"config"` \| `"data"` \| `"blobIndex"`, [`SyncCapability`](../type-aliases/SyncCapability.md)\> + +## Methods + +### handleDiscoveryKey() + +> **handleDiscoveryKey**(`discoveryKey`): `void` + +#### Parameters + +• **discoveryKey**: `Buffer` + +#### Returns + +`void` + +*** + +### setSyncEnabledState() + +> **setSyncEnabledState**(`syncEnabledState`): `void` + +#### Parameters + +• **syncEnabledState**: [`SyncEnabledState`](../type-aliases/SyncEnabledState.md) + +#### Returns + +`void` diff --git a/docs/api/md/-internal-/classes/PendingInvites.md b/docs/api/md/-internal-/classes/PendingInvites.md new file mode 100644 index 000000000..127c47483 --- /dev/null +++ b/docs/api/md/-internal-/classes/PendingInvites.md @@ -0,0 +1,137 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / PendingInvites + +# Class: PendingInvites + +Manage pending invite state. + +## Constructors + +### new PendingInvites() + +> **new PendingInvites**(): [`PendingInvites`](PendingInvites.md) + +#### Returns + +[`PendingInvites`](PendingInvites.md) + +## Methods + +### add() + +> **add**(`pendingInvite`): `void` + +#### Parameters + +• **pendingInvite**: [`PendingInvite`](../interfaces/PendingInvite.md) + +#### Returns + +`void` + +#### Throws + +if adding a duplicate invite ID + +*** + +### deleteByInviteId() + +> **deleteByInviteId**(`inviteId`): `boolean` + +#### Parameters + +• **inviteId**: `Buffer` + +#### Returns + +`boolean` + +`true` if an invite existed and was deleted, `false` otherwise + +*** + +### deleteByProjectInviteId() + +> **deleteByProjectInviteId**(`projectInviteId`): [`PendingInvite`](../interfaces/PendingInvite.md)[] + +#### Parameters + +• **projectInviteId**: `Readonly`\<`Buffer`\> + +#### Returns + +[`PendingInvite`](../interfaces/PendingInvite.md)[] + +the pending invites that were deleted + +*** + +### getByInviteId() + +> **getByInviteId**(`inviteId`): `undefined` \| [`PendingInvite`](../interfaces/PendingInvite.md) + +#### Parameters + +• **inviteId**: `Buffer` + +#### Returns + +`undefined` \| [`PendingInvite`](../interfaces/PendingInvite.md) + +*** + +### hasInviteId() + +> **hasInviteId**(`inviteId`): `boolean` + +#### Parameters + +• **inviteId**: `Buffer` + +#### Returns + +`boolean` + +*** + +### invites() + +> **invites**(): `Iterable`\<[`PendingInvite`](../interfaces/PendingInvite.md), `any`, `any`\> + +#### Returns + +`Iterable`\<[`PendingInvite`](../interfaces/PendingInvite.md), `any`, `any`\> + +the pending invites, in insertion order + +*** + +### isAcceptingForProject() + +> **isAcceptingForProject**(`projectInviteId`): `boolean` + +#### Parameters + +• **projectInviteId**: `Readonly`\<`Buffer`\> + +#### Returns + +`boolean` + +*** + +### markAccepting() + +> **markAccepting**(`inviteId`): `void` + +#### Parameters + +• **inviteId**: `Buffer` + +#### Returns + +`void` diff --git a/docs/api/md/-internal-/classes/Protomux.md b/docs/api/md/-internal-/classes/Protomux.md new file mode 100644 index 000000000..00be604de --- /dev/null +++ b/docs/api/md/-internal-/classes/Protomux.md @@ -0,0 +1,199 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / Protomux + +# Class: Protomux\ + +## Type Parameters + +• **TStream** *extends* `Duplex` \| `NodeDuplex` = `Duplex` + +## Constructors + +### new Protomux() + +> **new Protomux**\<`TStream`\>(`stream`): [`Protomux`](Protomux.md)\<`TStream`\> + +#### Parameters + +• **stream**: `TStream` + +#### Returns + +[`Protomux`](Protomux.md)\<`TStream`\> + +## Properties + +### isProtomux + +> **isProtomux**: `true` + +*** + +### stream + +> **stream**: `TStream` + +## Methods + +### \[iterator\]() + +> **\[iterator\]**(): `IterableIterator`\<[`Channel`](../interfaces/Channel.md), `any`, `any`\> + +#### Returns + +`IterableIterator`\<[`Channel`](../interfaces/Channel.md), `any`, `any`\> + +*** + +### cork() + +> **cork**(): `void` + +#### Returns + +`void` + +*** + +### createChannel() + +> **createChannel**(`opts`): [`Channel`](../interfaces/Channel.md) + +#### Parameters + +• **opts** + +• **opts.aliases?**: `string`[] + +• **opts.handshake?**: `any` + +• **opts.id?**: `null` \| `Buffer` + +• **opts.messages**: `Partial`\<`Pick`\<[`Message`](../interfaces/Message.md), `"onmessage"` \| `"encoding"`\>\>[] + +• **opts.protocol**: `string` + +• **opts.unique?**: `boolean` + +• **opts.userData?**: `any` + +• **opts.onclose?** + +• **opts.ondestroy?** + +• **opts.onopen?** + +#### Returns + +[`Channel`](../interfaces/Channel.md) + +*** + +### destroy() + +> **destroy**(`err`): `void` + +#### Parameters + +• **err**: `Error` + +#### Returns + +`void` + +*** + +### opened() + +> **opened**(`opts`): `boolean` + +#### Parameters + +• **opts** + +• **opts.id?**: `null` \| `Buffer` + +• **opts.protocol**: `string` + +#### Returns + +`boolean` + +*** + +### pair() + +> **pair**(`opts`, `notify`): `void` + +#### Parameters + +• **opts** + +• **opts.id?**: `null` \| `Buffer` + +• **opts.protocol**: `string` + +• **notify** + +#### Returns + +`void` + +*** + +### uncork() + +> **uncork**(): `void` + +#### Returns + +`void` + +*** + +### unpair() + +> **unpair**(`opts`): `void` + +#### Parameters + +• **opts** + +• **opts.id?**: `null` \| `Buffer` + +• **opts.protocol**: `string` + +#### Returns + +`void` + +*** + +### from() + +> `static` **from**(`stream`): [`Protomux`](Protomux.md)\<`TStream`\> + +#### Parameters + +• **stream**: `TStream` + +#### Returns + +[`Protomux`](Protomux.md)\<`TStream`\> + +*** + +### isProtomux() + +> `static` **isProtomux**(`mux`): `mux is Protomux>>` + +#### Parameters + +• **mux**: `unknown` + +#### Returns + +`mux is Protomux>>` diff --git a/docs/api/md/-internal-/classes/RemoteBitfieldPage.md b/docs/api/md/-internal-/classes/RemoteBitfieldPage.md new file mode 100644 index 000000000..26a9a7153 --- /dev/null +++ b/docs/api/md/-internal-/classes/RemoteBitfieldPage.md @@ -0,0 +1,155 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / RemoteBitfieldPage + +# Class: RemoteBitfieldPage + +## Constructors + +### new RemoteBitfieldPage() + +> **new RemoteBitfieldPage**(`index`, `bitfield`, `segment`): [`RemoteBitfieldPage`](RemoteBitfieldPage.md) + +#### Parameters + +• **index**: `number` + +• **bitfield**: `Uint32Array` + +• **segment**: [`RemoteBitfieldSegment`](RemoteBitfieldSegment.md) + +#### Returns + +[`RemoteBitfieldPage`](RemoteBitfieldPage.md) + +## Properties + +### bitfield + +> **bitfield**: `Uint32Array` + +*** + +### index + +> **index**: `number` + +*** + +### offset + +> **offset**: `number` + +*** + +### segment + +> **segment**: [`RemoteBitfieldSegment`](RemoteBitfieldSegment.md) + +## Accessors + +### tree + +> `get` **tree**(): [`SparseIndex`](SparseIndex.md) + +#### Returns + +[`SparseIndex`](SparseIndex.md) + +## Methods + +### findFirst() + +> **findFirst**(`val`, `position`): `number` + +#### Parameters + +• **val**: `boolean` + +• **position**: `number` + +#### Returns + +`number` + +*** + +### findLast() + +> **findLast**(`val`, `position`): `number` + +#### Parameters + +• **val**: `boolean` + +• **position**: `number` + +#### Returns + +`number` + +*** + +### get() + +> **get**(`index`): `boolean` + +#### Parameters + +• **index**: `number` + +#### Returns + +`boolean` + +*** + +### insert() + +> **insert**(`start`, `bitfield`): `void` + +#### Parameters + +• **start**: `number` + +• **bitfield**: `Uint32Array` + +#### Returns + +`void` + +*** + +### set() + +> **set**(`index`, `val`): `void` + +#### Parameters + +• **index**: `number` + +• **val**: `boolean` + +#### Returns + +`void` + +*** + +### setRange() + +> **setRange**(`start`, `length`, `val`): `void` + +#### Parameters + +• **start**: `number` + +• **length**: `number` + +• **val**: `boolean` + +#### Returns + +`void` diff --git a/docs/api/md/-internal-/classes/RemoteBitfieldSegment.md b/docs/api/md/-internal-/classes/RemoteBitfieldSegment.md new file mode 100644 index 000000000..34750ee68 --- /dev/null +++ b/docs/api/md/-internal-/classes/RemoteBitfieldSegment.md @@ -0,0 +1,117 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / RemoteBitfieldSegment + +# Class: RemoteBitfieldSegment + +## Constructors + +### new RemoteBitfieldSegment() + +> **new RemoteBitfieldSegment**(`index`): [`RemoteBitfieldSegment`](RemoteBitfieldSegment.md) + +#### Parameters + +• **index**: `number` + +#### Returns + +[`RemoteBitfieldSegment`](RemoteBitfieldSegment.md) + +## Properties + +### index + +> **index**: `number` + +*** + +### offset + +> **offset**: `number` + +*** + +### pages + +> **pages**: `any`[] + +*** + +### pagesLength + +> **pagesLength**: `number` + +*** + +### tree + +> **tree**: [`SparseIndex`](SparseIndex.md) + +## Accessors + +### chunks + +> `get` **chunks**(): [`Chunk`](../type-aliases/Chunk.md)[] + +#### Returns + +[`Chunk`](../type-aliases/Chunk.md)[] + +## Methods + +### add() + +> **add**(`page`): `void` + +#### Parameters + +• **page**: [`RemoteBitfieldPage`](RemoteBitfieldPage.md) + +#### Returns + +`void` + +*** + +### findFirst() + +> **findFirst**(`val`, `position`): `number` + +#### Parameters + +• **val**: `boolean` + +• **position**: `number` + +#### Returns + +`number` + +*** + +### findLast() + +> **findLast**(`val`, `position`): `number` + +#### Parameters + +• **val**: `boolean` + +• **position**: `number` + +#### Returns + +`number` + +*** + +### refresh() + +> **refresh**(): `void` + +#### Returns + +`void` diff --git a/docs/api/md/-internal-/classes/Roles.md b/docs/api/md/-internal-/classes/Roles.md new file mode 100644 index 000000000..602198455 --- /dev/null +++ b/docs/api/md/-internal-/classes/Roles.md @@ -0,0 +1,101 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / Roles + +# Class: Roles + +## Extends + +- `TypedEmitter` + +## Constructors + +### new Roles() + +> **new Roles**(`opts`): [`Roles`](Roles.md) + +#### Parameters + +• **opts** + +• **opts.coreManager**: [`CoreManager`](CoreManager.md) + +• **opts.coreOwnership**: [`CoreOwnership`](CoreOwnership.md) + +• **opts.dataType**: [`DataType`](DataType.md)\<[`DataStore`](DataStore.md)\<`"auth"`, `"coreOwnership"` \| `"role"`\>, `SQLiteTableWithColumns`\<`object`\>, `"role"`, `object`, `object`\> + +• **opts.deviceKey**: `Buffer` + +public key of this device + +• **opts.projectKey**: `Buffer` + +#### Returns + +[`Roles`](Roles.md) + +#### Overrides + +`TypedEmitter.constructor` + +## Properties + +### NO\_ROLE + +> `static` **NO\_ROLE**: [`Role`](../interfaces/Role.md)\<`"08e4251e36f6e7ed"`\> + +## Methods + +### assignRole() + +> **assignRole**(`deviceId`, `roleId`): `Promise`\<`void`\> + +Assign a role to the specified `deviceId`. Devices without an assigned role +are unable to sync, except the project creator who can do anything. Only +the project creator can assign their own role. Will throw if the device's +role cannot assign the role by consulting `roleAssignment`. + +#### Parameters + +• **deviceId**: `string` + +• **roleId**: `"f7c150f5a3a9a855"` \| `"012fd2d431c0bf60"` \| `"9e6d29263cba36c9"` \| `"8ced989b1904606b"` + +#### Returns + +`Promise`\<`void`\> + +*** + +### getAll() + +> **getAll**(): `Promise`\<`Map`\<`string`, [`Role`](../interfaces/Role.md)\<`"a12a6702b93bd7ff"` \| `"f7c150f5a3a9a855"` \| `"012fd2d431c0bf60"` \| `"9e6d29263cba36c9"` \| `"8ced989b1904606b"` \| `"08e4251e36f6e7ed"`\>\>\> + +Get roles of all devices in the project. For your own device, if you have +not yet synced your own role record, the "no role" capabilties is +returned. The project creator will have the creator role unless a +different one has been assigned. + +#### Returns + +`Promise`\<`Map`\<`string`, [`Role`](../interfaces/Role.md)\<`"a12a6702b93bd7ff"` \| `"f7c150f5a3a9a855"` \| `"012fd2d431c0bf60"` \| `"9e6d29263cba36c9"` \| `"8ced989b1904606b"` \| `"08e4251e36f6e7ed"`\>\>\> + +Map of deviceId to Role + +*** + +### getRole() + +> **getRole**(`deviceId`): `Promise`\<[`Role`](../interfaces/Role.md)\<`"a12a6702b93bd7ff"` \| `"f7c150f5a3a9a855"` \| `"012fd2d431c0bf60"` \| `"9e6d29263cba36c9"` \| `"8ced989b1904606b"` \| `"08e4251e36f6e7ed"`\>\> + +Get the role for device `deviceId`. + +#### Parameters + +• **deviceId**: `string` + +#### Returns + +`Promise`\<[`Role`](../interfaces/Role.md)\<`"a12a6702b93bd7ff"` \| `"f7c150f5a3a9a855"` \| `"012fd2d431c0bf60"` \| `"9e6d29263cba36c9"` \| `"8ced989b1904606b"` \| `"08e4251e36f6e7ed"`\>\> diff --git a/docs/api/md/-internal-/classes/SparseIndex.md b/docs/api/md/-internal-/classes/SparseIndex.md new file mode 100644 index 000000000..b81dc655f --- /dev/null +++ b/docs/api/md/-internal-/classes/SparseIndex.md @@ -0,0 +1,145 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / SparseIndex + +# Class: SparseIndex + +## Extends + +- [`Index`](Index.md) + +## Constructors + +### new SparseIndex() + +> **new SparseIndex**(`chunks`, `byteLength`): [`SparseIndex`](SparseIndex.md) + +#### Parameters + +• **chunks**: [`Chunk`](../type-aliases/Chunk.md)[] + +• **byteLength**: `number` + +#### Returns + +[`SparseIndex`](SparseIndex.md) + +#### Overrides + +[`Index`](Index.md).[`constructor`](Index.md#constructors) + +## Properties + +### byteLength + +> `readonly` **byteLength**: `number` + +#### Inherited from + +[`Index`](Index.md).[`byteLength`](Index.md#bytelength) + +*** + +### chunks + +> `readonly` **chunks**: [`Chunk`](../type-aliases/Chunk.md)[] + +## Methods + +### skipFirst() + +> **skipFirst**(`value`, `position`?): `number` + +#### Parameters + +• **value**: `boolean` + +• **position?**: `number` + +#### Returns + +`number` + +#### Inherited from + +[`Index`](Index.md).[`skipFirst`](Index.md#skipfirst) + +*** + +### skipLast() + +> **skipLast**(`value`, `position`?): `number` + +#### Parameters + +• **value**: `boolean` + +• **position?**: `number` + +#### Returns + +`number` + +#### Inherited from + +[`Index`](Index.md).[`skipLast`](Index.md#skiplast) + +*** + +### update() + +> **update**(`bit`): `boolean` + +#### Parameters + +• **bit**: `number` + +#### Returns + +`boolean` + +#### Overrides + +[`Index`](Index.md).[`update`](Index.md#update) + +*** + +### from() + +#### from(field, byteLength) + +> `static` **from**(`field`, `byteLength`): [`DenseIndex`](DenseIndex.md) + +##### Parameters + +• **field**: `TypedArray` + +• **byteLength**: `number` + +##### Returns + +[`DenseIndex`](DenseIndex.md) + +##### Inherited from + +[`Index`](Index.md).[`from`](Index.md#from) + +#### from(chunks, byteLength) + +> `static` **from**(`chunks`, `byteLength`): [`SparseIndex`](SparseIndex.md) + +##### Parameters + +• **chunks**: [`Chunk`](../type-aliases/Chunk.md)[] + +• **byteLength**: `number` + +##### Returns + +[`SparseIndex`](SparseIndex.md) + +##### Inherited from + +[`Index`](Index.md).[`from`](Index.md#from) diff --git a/docs/api/md/-internal-/classes/SyncApi.md b/docs/api/md/-internal-/classes/SyncApi.md new file mode 100644 index 000000000..016ff9dfd --- /dev/null +++ b/docs/api/md/-internal-/classes/SyncApi.md @@ -0,0 +1,164 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / SyncApi + +# Class: SyncApi + +## Extends + +- `TypedEmitter` + +## Constructors + +### new SyncApi() + +> **new SyncApi**(`opts`): [`SyncApi`](SyncApi.md) + +#### Parameters + +• **opts** + +• **opts.coreManager**: [`CoreManager`](CoreManager.md) + +• **opts.coreOwnership**: [`CoreOwnership`](CoreOwnership.md) + +• **opts.logger**: `undefined` \| [`Logger`](Logger.md) + +• **opts.roles**: [`Roles`](Roles.md) + +• **opts.throttleMs**: `undefined` \| `number` = `200` + +#### Returns + +[`SyncApi`](SyncApi.md) + +#### Overrides + +`TypedEmitter.constructor` + +## Properties + +### \[kSyncState\] + +> **\[kSyncState\]**: [`SyncState`](SyncState.md) + +## Methods + +### \[kHandleDiscoveryKey\]() + +> **\[kHandleDiscoveryKey\]**(`discoveryKey`, `protomux`): `void` + +#### Parameters + +• **discoveryKey**: `Buffer` + +• **protomux**: [`Protomux`](Protomux.md)\<`NoiseSecretStream`\<`Duplex`\<`any`, `any`, `any`, `any`, `true`, `true`, `DuplexEvents`\<`any`, `any`\>\>\>\> + +#### Returns + +`void` + +*** + +### \[kRequestFullStop\]() + +> **\[kRequestFullStop\]**(): `void` + +Request a graceful stop to all sync. + +#### Returns + +`void` + +*** + +### \[kRescindFullStopRequest\]() + +> **\[kRescindFullStopRequest\]**(): `void` + +Rescind any requests for a full stop. + +#### Returns + +`void` + +*** + +### getState() + +> **getState**(): [`State`](../interfaces/State.md) + +Get the current sync state (initial and full). Also emitted via the 'sync-state' event + +#### Returns + +[`State`](../interfaces/State.md) + +*** + +### setAutostopDataSyncTimeout() + +> **setAutostopDataSyncTimeout**(`autostopDataSyncAfter`): `void` + +#### Parameters + +• **autostopDataSyncAfter**: `null` \| `number` + +#### Returns + +`void` + +*** + +### start() + +> **start**(`options`?): `void` + +Start syncing data cores. + +If the app is backgrounded and sync has already completed, this will do +nothing until the app is foregrounded. + +#### Parameters + +• **options?** = `{}` + +• **options.autostopDataSyncAfter?**: `undefined` \| `null` \| `number` + +If no data sync +happens after this duration in milliseconds, sync will be automatically +stopped as if [stop](SyncApi.md#stop) was called. + +#### Returns + +`void` + +*** + +### stop() + +> **stop**(): `void` + +Stop syncing data cores. + +Pre-sync cores will continue syncing unless the app is backgrounded. + +#### Returns + +`void` + +*** + +### waitForSync() + +> **waitForSync**(`type`): `Promise`\<`void`\> + +#### Parameters + +• **type**: [`SyncType`](../type-aliases/SyncType.md) + +#### Returns + +`Promise`\<`void`\> diff --git a/docs/api/md/-internal-/classes/SyncState.md b/docs/api/md/-internal-/classes/SyncState.md new file mode 100644 index 000000000..fb06afe95 --- /dev/null +++ b/docs/api/md/-internal-/classes/SyncState.md @@ -0,0 +1,77 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / SyncState + +# Class: SyncState + +Emit sync state when it changes + +## Extends + +- `TypedEmitter` + +## Constructors + +### new SyncState() + +> **new SyncState**(`opts`): [`SyncState`](SyncState.md) + +#### Parameters + +• **opts** + +• **opts.coreManager**: [`CoreManager`](CoreManager.md) + +• **opts.logger**: `undefined` \| [`Logger`](Logger.md) + +• **opts.peerSyncControllers**: `Map`\<`string`, [`PeerSyncController`](PeerSyncController.md)\> + +• **opts.throttleMs**: `undefined` \| `number` = `200` + +#### Returns + +[`SyncState`](SyncState.md) + +#### Overrides + +`TypedEmitter.constructor` + +## Methods + +### addPeer() + +> **addPeer**(`peerId`): `void` + +#### Parameters + +• **peerId**: `string` + +#### Returns + +`void` + +*** + +### disconnectPeer() + +> **disconnectPeer**(`peerId`): `void` + +#### Parameters + +• **peerId**: `string` + +#### Returns + +`void` + +*** + +### getState() + +> **getState**(): [`State`](../type-aliases/State.md) + +#### Returns + +[`State`](../type-aliases/State.md) diff --git a/docs/api/md/-internal-/classes/default.md b/docs/api/md/-internal-/classes/default.md new file mode 100644 index 000000000..37fb5e0f4 --- /dev/null +++ b/docs/api/md/-internal-/classes/default.md @@ -0,0 +1,201 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / default + +# Class: default + +## Constructors + +### new default() + +> **new default**(): [`default`](default.md) + +#### Returns + +[`default`](default.md) + +## Properties + +### \_maxSegments + +> **\_maxSegments**: `number` + +*** + +### \_pages + +> **\_pages**: [`BigSparseArray`](BigSparseArray.md)\<[`RemoteBitfieldPage`](RemoteBitfieldPage.md)\> + +*** + +### \_segments + +> **\_segments**: [`BigSparseArray`](BigSparseArray.md)\<[`RemoteBitfieldSegment`](RemoteBitfieldSegment.md)\> + +## Methods + +### findFirst() + +> **findFirst**(`val`, `position`): `number` + +#### Parameters + +• **val**: `boolean` + +• **position**: `number` + +#### Returns + +`number` + +*** + +### findLast() + +> **findLast**(`val`, `position`): `number` + +#### Parameters + +• **val**: `boolean` + +• **position**: `number` + +#### Returns + +`number` + +*** + +### firstSet() + +> **firstSet**(`position`): `number` + +#### Parameters + +• **position**: `number` + +#### Returns + +`number` + +*** + +### firstUnset() + +> **firstUnset**(`position`): `number` + +#### Parameters + +• **position**: `number` + +#### Returns + +`number` + +*** + +### get() + +> **get**(`index`): `boolean` + +#### Parameters + +• **index**: `number` + +#### Returns + +`boolean` + +*** + +### getBitfield() + +> **getBitfield**(`index`): `null` \| [`RemoteBitfieldPage`](RemoteBitfieldPage.md) + +#### Parameters + +• **index**: `number` + +#### Returns + +`null` \| [`RemoteBitfieldPage`](RemoteBitfieldPage.md) + +*** + +### insert() + +> **insert**(`start`, `bitfield`): `boolean` + +#### Parameters + +• **start**: `number` + +• **bitfield**: `Uint32Array` + +#### Returns + +`boolean` + +*** + +### lastSet() + +> **lastSet**(`position`): `number` + +#### Parameters + +• **position**: `number` + +#### Returns + +`number` + +*** + +### lastUnset() + +> **lastUnset**(`position`): `number` + +#### Parameters + +• **position**: `number` + +#### Returns + +`number` + +*** + +### set() + +> **set**(`index`, `val`): `void` + +#### Parameters + +• **index**: `number` + +• **val**: `boolean` + +#### Returns + +`void` + +*** + +### setRange() + +> **setRange**(`start`, `length`, `val`): `void` + +#### Parameters + +• **start**: `number` + +• **length**: `number` + +• **val**: `boolean` + +#### Returns + +`void` diff --git a/docs/api/md/-internal-/interfaces/BitmapOpts.md b/docs/api/md/-internal-/interfaces/BitmapOpts.md new file mode 100644 index 000000000..b4ed93357 --- /dev/null +++ b/docs/api/md/-internal-/interfaces/BitmapOpts.md @@ -0,0 +1,25 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / BitmapOpts + +# Interface: BitmapOpts + +## Properties + +### mimeType + +> **mimeType**: `"image/png"` + +*** + +### pixelDensity + +> **pixelDensity**: `1` \| `2` \| `3` + +*** + +### size + +> **size**: [`ValidSizes`](../type-aliases/ValidSizes.md) diff --git a/docs/api/md/-internal-/interfaces/BlobDownloadState.md b/docs/api/md/-internal-/interfaces/BlobDownloadState.md new file mode 100644 index 000000000..88db35b13 --- /dev/null +++ b/docs/api/md/-internal-/interfaces/BlobDownloadState.md @@ -0,0 +1,53 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / BlobDownloadState + +# Interface: BlobDownloadState + +## Properties + +### error + +> **error**: `null` + +If status = 'error' then this will be an Error object + +*** + +### haveBytes + +> **haveBytes**: `number` + +The bytes already downloaded + +*** + +### haveCount + +> **haveCount**: `number` + +The number of files already downloaded + +*** + +### status + +> **status**: `"checking"` \| `"downloading"` \| `"downloaded"` \| `"aborted"` + +*** + +### wantBytes + +> **wantBytes**: `number` + +The bytes pending download + +*** + +### wantCount + +> **wantCount**: `number` + +The number of files pending download diff --git a/docs/api/md/-internal-/interfaces/Channel.md b/docs/api/md/-internal-/interfaces/Channel.md new file mode 100644 index 000000000..d1cadf986 --- /dev/null +++ b/docs/api/md/-internal-/interfaces/Channel.md @@ -0,0 +1,107 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / Channel + +# Interface: Channel + +## Properties + +### closed + +> **closed**: `boolean` + +*** + +### destroyed + +> **destroyed**: `boolean` + +*** + +### id + +> **id**: `Buffer` + +*** + +### messages + +> **messages**: [`Message`](Message.md)[] + +*** + +### opened + +> **opened**: `boolean` + +*** + +### protocol + +> **protocol**: `string` + +*** + +### userData + +> **userData**: `any` + +## Methods + +### addMessage() + +> **addMessage**(`opts`?): [`Message`](Message.md) + +#### Parameters + +• **opts?**: `Partial`\<`Pick`\<[`Message`](Message.md), `"onmessage"` \| `"encoding"`\>\> + +#### Returns + +[`Message`](Message.md) + +*** + +### close() + +> **close**(): `void` + +#### Returns + +`void` + +*** + +### cork() + +> **cork**(): `void` + +#### Returns + +`void` + +*** + +### open() + +> **open**(`handshake`?): `void` + +#### Parameters + +• **handshake?**: `any` + +#### Returns + +`void` + +*** + +### uncork() + +> **uncork**(): `void` + +#### Returns + +`void` diff --git a/docs/api/md/-internal-/interfaces/CorestoreEvents.md b/docs/api/md/-internal-/interfaces/CorestoreEvents.md new file mode 100644 index 000000000..57ad54d73 --- /dev/null +++ b/docs/api/md/-internal-/interfaces/CorestoreEvents.md @@ -0,0 +1,35 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / CorestoreEvents + +# Interface: CorestoreEvents + +## Methods + +### core-close() + +> **core-close**(`core`): `void` + +#### Parameters + +• **core**: [`Corestore`](../classes/Corestore.md) + +#### Returns + +`void` + +*** + +### core-open() + +> **core-open**(`core`): `void` + +#### Parameters + +• **core**: [`Corestore`](../classes/Corestore.md) + +#### Returns + +`void` diff --git a/docs/api/md/-internal-/interfaces/DataTypeEvents.md b/docs/api/md/-internal-/interfaces/DataTypeEvents.md new file mode 100644 index 000000000..9f817e5f0 --- /dev/null +++ b/docs/api/md/-internal-/interfaces/DataTypeEvents.md @@ -0,0 +1,25 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / DataTypeEvents + +# Interface: DataTypeEvents\ + +## Type Parameters + +• **TDoc** *extends* `MapeoDoc` + +## Properties + +### updated-docs() + +> **updated-docs**: (`docs`) => `void` + +#### Parameters + +• **docs**: `TDoc`[] + +#### Returns + +`void` diff --git a/docs/api/md/-internal-/interfaces/DocCapability.md b/docs/api/md/-internal-/interfaces/DocCapability.md new file mode 100644 index 000000000..30bfffa0f --- /dev/null +++ b/docs/api/md/-internal-/interfaces/DocCapability.md @@ -0,0 +1,39 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / DocCapability + +# Interface: DocCapability + +## Properties + +### readOthers + +> **readOthers**: `boolean` + +can read other's data + +*** + +### readOwn + +> **readOwn**: `boolean` + +can read own data + +*** + +### writeOthers + +> **writeOthers**: `boolean` + +can edit or delete other's data + +*** + +### writeOwn + +> **writeOwn**: `boolean` + +can write own data diff --git a/docs/api/md/-internal-/interfaces/HaveMsg.md b/docs/api/md/-internal-/interfaces/HaveMsg.md new file mode 100644 index 000000000..719e145f1 --- /dev/null +++ b/docs/api/md/-internal-/interfaces/HaveMsg.md @@ -0,0 +1,31 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / HaveMsg + +# Interface: HaveMsg + +## Properties + +### bitfield + +> **bitfield**: `Uint32Array` + +*** + +### discoveryKey + +> **discoveryKey**: `Buffer` + +*** + +### namespace + +> **namespace**: `"blob"` \| `"auth"` \| `"config"` \| `"data"` \| `"blobIndex"` + +*** + +### start + +> **start**: `number` diff --git a/docs/api/md/-internal-/interfaces/HyperdriveEvents.md b/docs/api/md/-internal-/interfaces/HyperdriveEvents.md new file mode 100644 index 000000000..273eb9797 --- /dev/null +++ b/docs/api/md/-internal-/interfaces/HyperdriveEvents.md @@ -0,0 +1,55 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / HyperdriveEvents + +# Interface: HyperdriveEvents + +## Properties + +### blobs() + +> **blobs**: (`blobs`) => `void` + +#### Parameters + +• **blobs**: [`Hyperblobs`](../classes/Hyperblobs.md) + +#### Returns + +`void` + +*** + +### close() + +> **close**: () => `void` + +#### Returns + +`void` + +*** + +### content-key() + +> **content-key**: (`contentKey`) => `void` + +#### Parameters + +• **contentKey**: `Buffer` + +#### Returns + +`void` + +*** + +### ready() + +> **ready**: () => `void` + +#### Returns + +`void` diff --git a/docs/api/md/-internal-/interfaces/HyperdriveGetOpts.md b/docs/api/md/-internal-/interfaces/HyperdriveGetOpts.md new file mode 100644 index 000000000..0e588cb42 --- /dev/null +++ b/docs/api/md/-internal-/interfaces/HyperdriveGetOpts.md @@ -0,0 +1,19 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / HyperdriveGetOpts + +# Interface: HyperdriveGetOpts + +## Properties + +### timeout? + +> `optional` **timeout**: `number` + +*** + +### wait? + +> `optional` **wait**: `boolean` diff --git a/docs/api/md/-internal-/interfaces/HyperdriveOptions.md b/docs/api/md/-internal-/interfaces/HyperdriveOptions.md new file mode 100644 index 000000000..6be8b25c8 --- /dev/null +++ b/docs/api/md/-internal-/interfaces/HyperdriveOptions.md @@ -0,0 +1,17 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / HyperdriveOptions + +# Interface: HyperdriveOptions + +## Properties + +### onwait() + +> **onwait**: () => `void` + +#### Returns + +`void` diff --git a/docs/api/md/-internal-/interfaces/LocalCoreState.md b/docs/api/md/-internal-/interfaces/LocalCoreState.md new file mode 100644 index 000000000..ee6ca6787 --- /dev/null +++ b/docs/api/md/-internal-/interfaces/LocalCoreState.md @@ -0,0 +1,31 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / LocalCoreState + +# Interface: LocalCoreState + +## Properties + +### have + +> **have**: `number` + +blocks we have + +*** + +### want + +> **want**: `number` + +unique blocks we want from any other peer + +*** + +### wanted + +> **wanted**: `number` + +unique blocks any other peer wants from us diff --git a/docs/api/md/-internal-/interfaces/LocationObject.md b/docs/api/md/-internal-/interfaces/LocationObject.md new file mode 100644 index 000000000..782510c68 --- /dev/null +++ b/docs/api/md/-internal-/interfaces/LocationObject.md @@ -0,0 +1,25 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / LocationObject + +# Interface: LocationObject + +## Properties + +### coords + +> **coords**: [`LocationObjectCoords`](LocationObjectCoords.md) + +*** + +### mocked + +> **mocked**: `undefined` \| `boolean` + +*** + +### timestamp + +> **timestamp**: `number` diff --git a/docs/api/md/-internal-/interfaces/LocationObjectCoords.md b/docs/api/md/-internal-/interfaces/LocationObjectCoords.md new file mode 100644 index 000000000..198fb8820 --- /dev/null +++ b/docs/api/md/-internal-/interfaces/LocationObjectCoords.md @@ -0,0 +1,49 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / LocationObjectCoords + +# Interface: LocationObjectCoords + +## Properties + +### accuracy + +> **accuracy**: `null` \| `number` + +*** + +### altitude + +> **altitude**: `null` \| `number` + +*** + +### altitudeAccuracy + +> **altitudeAccuracy**: `null` \| `number` + +*** + +### heading + +> **heading**: `null` \| `number` + +*** + +### latitude + +> **latitude**: `number` + +*** + +### longitude + +> **longitude**: `number` + +*** + +### speed + +> **speed**: `null` \| `number` diff --git a/docs/api/md/-internal-/interfaces/MapsPluginOpts.md b/docs/api/md/-internal-/interfaces/MapsPluginOpts.md new file mode 100644 index 000000000..fc6179f6d --- /dev/null +++ b/docs/api/md/-internal-/interfaces/MapsPluginOpts.md @@ -0,0 +1,25 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / MapsPluginOpts + +# Interface: MapsPluginOpts + +## Properties + +### customMapPath + +> **customMapPath**: `undefined` \| `string` + +*** + +### defaultOnlineStyleUrl + +> **defaultOnlineStyleUrl**: `string` \| `URL` + +*** + +### fallbackMapPath + +> **fallbackMapPath**: `string` diff --git a/docs/api/md/-internal-/interfaces/MemberInfo.md b/docs/api/md/-internal-/interfaces/MemberInfo.md new file mode 100644 index 000000000..2f19c3213 --- /dev/null +++ b/docs/api/md/-internal-/interfaces/MemberInfo.md @@ -0,0 +1,37 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / MemberInfo + +# Interface: MemberInfo + +## Properties + +### deviceId + +> **deviceId**: `string` + +*** + +### deviceType + +> **deviceType**: `undefined` \| `"UNRECOGNIZED"` \| `"device_type_unspecified"` \| `"mobile"` \| `"tablet"` \| `"desktop"` \| `"selfHostedServer"` + +*** + +### joinedAt + +> **joinedAt**: `undefined` \| `string` + +*** + +### name + +> **name**: `undefined` \| `string` + +*** + +### role + +> **role**: [`Role`](Role.md)\<`"a12a6702b93bd7ff"` \| `"f7c150f5a3a9a855"` \| `"012fd2d431c0bf60"` \| `"9e6d29263cba36c9"` \| `"8ced989b1904606b"` \| `"08e4251e36f6e7ed"`\> diff --git a/docs/api/md/-internal-/interfaces/Message.md b/docs/api/md/-internal-/interfaces/Message.md new file mode 100644 index 000000000..fac26a5f3 --- /dev/null +++ b/docs/api/md/-internal-/interfaces/Message.md @@ -0,0 +1,47 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / Message + +# Interface: Message + +## Properties + +### encoding + +> **encoding**: `any` + +*** + +### onmessage() + +> **onmessage**: (`message`) => `void` + +#### Parameters + +• **message**: `any` + +#### Returns + +`void` + +*** + +### type + +> **type**: `number` + +## Methods + +### send() + +> **send**(`msg`): `void` + +#### Parameters + +• **msg**: `any` + +#### Returns + +`void` diff --git a/docs/api/md/-internal-/interfaces/Metadata.md b/docs/api/md/-internal-/interfaces/Metadata.md new file mode 100644 index 000000000..46ca12045 --- /dev/null +++ b/docs/api/md/-internal-/interfaces/Metadata.md @@ -0,0 +1,25 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / Metadata + +# Interface: Metadata + +## Properties + +### location + +> **location**: `undefined` \| [`LocationObject`](LocationObject.md) + +*** + +### mimeType + +> **mimeType**: `string` + +*** + +### timestamp + +> **timestamp**: `number` diff --git a/docs/api/md/-internal-/interfaces/PeerInfoBase.md b/docs/api/md/-internal-/interfaces/PeerInfoBase.md new file mode 100644 index 000000000..f4cffbc58 --- /dev/null +++ b/docs/api/md/-internal-/interfaces/PeerInfoBase.md @@ -0,0 +1,25 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / PeerInfoBase + +# Interface: PeerInfoBase + +## Properties + +### deviceId + +> **deviceId**: `string` + +*** + +### deviceType + +> **deviceType**: `undefined` \| `DeviceInfo_DeviceType` + +*** + +### name + +> **name**: `undefined` \| `string` diff --git a/docs/api/md/-internal-/interfaces/PendingInvite.md b/docs/api/md/-internal-/interfaces/PendingInvite.md new file mode 100644 index 000000000..dc701ea45 --- /dev/null +++ b/docs/api/md/-internal-/interfaces/PendingInvite.md @@ -0,0 +1,25 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / PendingInvite + +# Interface: PendingInvite + +## Properties + +### invite + +> **invite**: [`InviteInternal`](../type-aliases/InviteInternal.md) + +*** + +### isAccepting + +> **isAccepting**: `boolean` + +*** + +### peerId + +> **peerId**: `string` diff --git a/docs/api/md/-internal-/interfaces/RemoteDeviceNamespaceGroupSyncState.md b/docs/api/md/-internal-/interfaces/RemoteDeviceNamespaceGroupSyncState.md new file mode 100644 index 000000000..23d4c1c5a --- /dev/null +++ b/docs/api/md/-internal-/interfaces/RemoteDeviceNamespaceGroupSyncState.md @@ -0,0 +1,31 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / RemoteDeviceNamespaceGroupSyncState + +# Interface: RemoteDeviceNamespaceGroupSyncState + +## Properties + +### isSyncEnabled + +> **isSyncEnabled**: `boolean` + +do we want to sync this namespace group? + +*** + +### want + +> **want**: `number` + +number of blocks this device wants from us + +*** + +### wanted + +> **wanted**: `number` + +number of blocks we want from this device diff --git a/docs/api/md/-internal-/interfaces/RemoteDeviceSyncState.md b/docs/api/md/-internal-/interfaces/RemoteDeviceSyncState.md new file mode 100644 index 000000000..54de2aaea --- /dev/null +++ b/docs/api/md/-internal-/interfaces/RemoteDeviceSyncState.md @@ -0,0 +1,25 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / RemoteDeviceSyncState + +# Interface: RemoteDeviceSyncState + +state of sync for a remote peer + +## Properties + +### data + +> **data**: [`RemoteDeviceNamespaceGroupSyncState`](RemoteDeviceNamespaceGroupSyncState.md) + +state of data namespaces (data and blob) + +*** + +### initial + +> **initial**: [`RemoteDeviceNamespaceGroupSyncState`](RemoteDeviceNamespaceGroupSyncState.md) + +state of initial namespaces (auth, config, and blob index) diff --git a/docs/api/md/-internal-/interfaces/Role.md b/docs/api/md/-internal-/interfaces/Role.md new file mode 100644 index 000000000..c56a2f617 --- /dev/null +++ b/docs/api/md/-internal-/interfaces/Role.md @@ -0,0 +1,41 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / Role + +# Interface: Role\ + +## Type Parameters + +• **T** *extends* [`RoleId`](../type-aliases/RoleId.md) = [`RoleId`](../type-aliases/RoleId.md) + +## Properties + +### docs + +> **docs**: `Record`\<`"observation"` \| `"track"` \| `"translation"` \| `"preset"` \| `"field"` \| `"projectSettings"` \| `"deviceInfo"` \| `"icon"` \| `"coreOwnership"` \| `"role"`, [`DocCapability`](DocCapability.md)\> + +*** + +### name + +> **name**: `string` + +*** + +### roleAssignment + +> **roleAssignment**: (`"f7c150f5a3a9a855"` \| `"012fd2d431c0bf60"` \| `"9e6d29263cba36c9"`)[] + +*** + +### roleId + +> **roleId**: `T` + +*** + +### sync + +> **sync**: `Record`\<`"blob"` \| `"auth"` \| `"config"` \| `"data"` \| `"blobIndex"`, `"allowed"` \| `"blocked"`\> diff --git a/docs/api/md/-internal-/interfaces/StartOpts.md b/docs/api/md/-internal-/interfaces/StartOpts.md new file mode 100644 index 000000000..03fd8f527 --- /dev/null +++ b/docs/api/md/-internal-/interfaces/StartOpts.md @@ -0,0 +1,19 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / StartOpts + +# Interface: StartOpts + +## Properties + +### host + +> **host**: `undefined` \| `string` + +*** + +### port + +> **port**: `undefined` \| `number` diff --git a/docs/api/md/-internal-/interfaces/State.md b/docs/api/md/-internal-/interfaces/State.md new file mode 100644 index 000000000..796c5fa67 --- /dev/null +++ b/docs/api/md/-internal-/interfaces/State.md @@ -0,0 +1,39 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / State + +# Interface: State + +## Properties + +### data + +> **data**: `object` + +state of data namespace syncing (data and blob) for local device + +#### isSyncEnabled + +> **isSyncEnabled**: `boolean` + +*** + +### initial + +> **initial**: `object` + +state of initial namespace syncing (auth, config, and blob index) for local device + +#### isSyncEnabled + +> **isSyncEnabled**: `boolean` + +*** + +### remoteDeviceSyncState + +> **remoteDeviceSyncState**: `Record`\<`string`, [`RemoteDeviceSyncState`](RemoteDeviceSyncState.md)\> + +sync states for remote peers diff --git a/docs/api/md/-internal-/interfaces/SvgOpts.md b/docs/api/md/-internal-/interfaces/SvgOpts.md new file mode 100644 index 000000000..2702bdfad --- /dev/null +++ b/docs/api/md/-internal-/interfaces/SvgOpts.md @@ -0,0 +1,19 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / SvgOpts + +# Interface: SvgOpts + +## Properties + +### mimeType + +> **mimeType**: `"image/svg+xml"` + +*** + +### size + +> **size**: [`ValidSizes`](../type-aliases/ValidSizes.md) diff --git a/docs/api/md/-internal-/namespaces/Hyperblobs/README.md b/docs/api/md/-internal-/namespaces/Hyperblobs/README.md new file mode 100644 index 000000000..337931f5e --- /dev/null +++ b/docs/api/md/-internal-/namespaces/Hyperblobs/README.md @@ -0,0 +1,13 @@ +[**API**](../../../README.md) • **Docs** + +*** + +[API](../../../README.md) / [\](../../README.md) / Hyperblobs + +# Hyperblobs + +## Index + +### Interfaces + +- [BlobId](interfaces/BlobId.md) diff --git a/docs/api/md/-internal-/namespaces/Hyperblobs/interfaces/BlobId.md b/docs/api/md/-internal-/namespaces/Hyperblobs/interfaces/BlobId.md new file mode 100644 index 000000000..40dab697b --- /dev/null +++ b/docs/api/md/-internal-/namespaces/Hyperblobs/interfaces/BlobId.md @@ -0,0 +1,31 @@ +[**API**](../../../../README.md) • **Docs** + +*** + +[API](../../../../README.md) / [\](../../../README.md) / [Hyperblobs](../README.md) / BlobId + +# Interface: BlobId + +## Properties + +### blockLength + +> **blockLength**: `number` + +*** + +### blockOffset + +> **blockOffset**: `number` + +*** + +### byteLength + +> **byteLength**: `number` + +*** + +### byteOffset + +> **byteOffset**: `number` diff --git a/docs/api/md/-internal-/namespaces/Hyperdrive/README-1.md b/docs/api/md/-internal-/namespaces/Hyperdrive/README-1.md new file mode 100644 index 000000000..035b48c93 --- /dev/null +++ b/docs/api/md/-internal-/namespaces/Hyperdrive/README-1.md @@ -0,0 +1,13 @@ +[**API**](../../../README.md) • **Docs** + +*** + +[API](../../../README.md) / [\](../../README.md) / Hyperdrive + +# Hyperdrive + +## Index + +### Interfaces + +- [HyperdriveEntry](interfaces/HyperdriveEntry.md) diff --git a/docs/api/md/-internal-/namespaces/Hyperdrive/interfaces/HyperdriveEntry.md b/docs/api/md/-internal-/namespaces/Hyperdrive/interfaces/HyperdriveEntry.md new file mode 100644 index 000000000..a9eacc431 --- /dev/null +++ b/docs/api/md/-internal-/namespaces/Hyperdrive/interfaces/HyperdriveEntry.md @@ -0,0 +1,41 @@ +[**API**](../../../../README.md) • **Docs** + +*** + +[API](../../../../README.md) / [\](../../../README.md) / [Hyperdrive](../README-1.md) / HyperdriveEntry + +# Interface: HyperdriveEntry + +## Properties + +### key + +> **key**: `string` + +*** + +### seq + +> **seq**: `number` + +*** + +### value + +> **value**: `object` + +#### blob + +> **blob**: [`BlobId`](../../Hyperblobs/interfaces/BlobId.md) + +#### executable + +> **executable**: `boolean` + +#### linkname + +> **linkname**: `null` \| `string` + +#### metadata + +> **metadata**: `null` \| `object` diff --git a/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_datastore_index/README.md b/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_datastore_index/README.md new file mode 100644 index 000000000..5702332e4 --- /dev/null +++ b/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_datastore_index/README.md @@ -0,0 +1,26 @@ +[**API**](../../../README.md) • **Docs** + +*** + +[API](../../../README.md) / [\](../../README.md) / "/home/runner/work/comapeo-core/comapeo-core/src/datastore/index" + +# "/home/runner/work/comapeo-core/comapeo-core/src/datastore/index" + +## Index + +### Type Aliases + +- [DataStoreEvents](type-aliases/DataStoreEvents.md) +- [OmitUnion](type-aliases/OmitUnion.md) + +## References + +### DataStore + +Re-exports [DataStore](../../classes/DataStore.md) + +*** + +### NamespaceSchemas + +Re-exports [NamespaceSchemas](../../type-aliases/NamespaceSchemas.md) diff --git a/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_datastore_index/type-aliases/DataStoreEvents.md b/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_datastore_index/type-aliases/DataStoreEvents.md new file mode 100644 index 000000000..49594b19d --- /dev/null +++ b/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_datastore_index/type-aliases/DataStoreEvents.md @@ -0,0 +1,13 @@ +[**API**](../../../../README.md) • **Docs** + +*** + +[API](../../../../README.md) / [\](../../../README.md) / ["/home/runner/work/comapeo-core/comapeo-core/src/datastore/index"](../README.md) / DataStoreEvents + +# Type Alias: DataStoreEvents\ + +> **DataStoreEvents**\<`TSchemaName`\>: `{ [S in Exclude]: Function }` + +## Type Parameters + +• **TSchemaName** *extends* `MapeoDoc`\[`"schemaName"`\] diff --git a/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_datastore_index/type-aliases/OmitUnion.md b/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_datastore_index/type-aliases/OmitUnion.md new file mode 100644 index 000000000..b02d6214d --- /dev/null +++ b/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_datastore_index/type-aliases/OmitUnion.md @@ -0,0 +1,15 @@ +[**API**](../../../../README.md) • **Docs** + +*** + +[API](../../../../README.md) / [\](../../../README.md) / ["/home/runner/work/comapeo-core/comapeo-core/src/datastore/index"](../README.md) / OmitUnion + +# Type Alias: OmitUnion\ + +> **OmitUnion**\<`T`, `K`\>: `T` *extends* `any` ? `Omit`\<`T`, `K`\> : `never` + +## Type Parameters + +• **T** + +• **K** *extends* keyof `any` diff --git a/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_local-peers/README.md b/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_local-peers/README.md new file mode 100644 index 000000000..0fa1ea24d --- /dev/null +++ b/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_local-peers/README.md @@ -0,0 +1,54 @@ +[**API**](../../../README.md) • **Docs** + +*** + +[API](../../../README.md) / [\](../../README.md) / "/home/runner/work/comapeo-core/comapeo-core/src/local-peers" + +# "/home/runner/work/comapeo-core/comapeo-core/src/local-peers" + +## Index + +### Classes + +- [PeerDisconnectedError](classes/PeerDisconnectedError.md) +- [PeerFailedConnectionError](classes/PeerFailedConnectionError.md) +- [UnknownPeerError](classes/UnknownPeerError.md) + +### Interfaces + +- [LocalPeersEvents](interfaces/LocalPeersEvents.md) + +### Type Aliases + +- [PeerInfo](type-aliases/PeerInfo.md) +- [PeerInfoConnecting](type-aliases/PeerInfoConnecting.md) +- [PeerInfoInternal](type-aliases/PeerInfoInternal.md) +- [PeerState](type-aliases/PeerState.md) + +### Variables + +- [kTestOnlySendRawInvite](variables/kTestOnlySendRawInvite.md) + +## References + +### LocalPeers + +Re-exports [LocalPeers](../../classes/LocalPeers.md) + +*** + +### PeerInfoBase + +Re-exports [PeerInfoBase](../../interfaces/PeerInfoBase.md) + +*** + +### PeerInfoConnected + +Re-exports [PeerInfoConnected](../../type-aliases/PeerInfoConnected.md) + +*** + +### PeerInfoDisconnected + +Re-exports [PeerInfoDisconnected](../../type-aliases/PeerInfoDisconnected.md) diff --git a/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_local-peers/classes/PeerDisconnectedError.md b/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_local-peers/classes/PeerDisconnectedError.md new file mode 100644 index 000000000..a91b0fd55 --- /dev/null +++ b/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_local-peers/classes/PeerDisconnectedError.md @@ -0,0 +1,39 @@ +[**API**](../../../../README.md) • **Docs** + +*** + +[API](../../../../README.md) / [\](../../../README.md) / ["/home/runner/work/comapeo-core/comapeo-core/src/local-peers"](../README.md) / PeerDisconnectedError + +# Class: PeerDisconnectedError + +## Extends + +- `Error` + +## Constructors + +### new PeerDisconnectedError() + +> **new PeerDisconnectedError**(`message`?): [`PeerDisconnectedError`](PeerDisconnectedError.md) + +#### Parameters + +• **message?**: `string` + +#### Returns + +[`PeerDisconnectedError`](PeerDisconnectedError.md) + +#### Overrides + +`Error.constructor` + +## Properties + +### name + +> **name**: `string` + +#### Inherited from + +`Error.name` diff --git a/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_local-peers/classes/PeerFailedConnectionError.md b/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_local-peers/classes/PeerFailedConnectionError.md new file mode 100644 index 000000000..1a3a4b27d --- /dev/null +++ b/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_local-peers/classes/PeerFailedConnectionError.md @@ -0,0 +1,39 @@ +[**API**](../../../../README.md) • **Docs** + +*** + +[API](../../../../README.md) / [\](../../../README.md) / ["/home/runner/work/comapeo-core/comapeo-core/src/local-peers"](../README.md) / PeerFailedConnectionError + +# Class: PeerFailedConnectionError + +## Extends + +- `Error` + +## Constructors + +### new PeerFailedConnectionError() + +> **new PeerFailedConnectionError**(`message`?): [`PeerFailedConnectionError`](PeerFailedConnectionError.md) + +#### Parameters + +• **message?**: `string` + +#### Returns + +[`PeerFailedConnectionError`](PeerFailedConnectionError.md) + +#### Overrides + +`Error.constructor` + +## Properties + +### name + +> **name**: `string` + +#### Inherited from + +`Error.name` diff --git a/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_local-peers/classes/UnknownPeerError.md b/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_local-peers/classes/UnknownPeerError.md new file mode 100644 index 000000000..ba4d531d4 --- /dev/null +++ b/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_local-peers/classes/UnknownPeerError.md @@ -0,0 +1,39 @@ +[**API**](../../../../README.md) • **Docs** + +*** + +[API](../../../../README.md) / [\](../../../README.md) / ["/home/runner/work/comapeo-core/comapeo-core/src/local-peers"](../README.md) / UnknownPeerError + +# Class: UnknownPeerError + +## Extends + +- `Error` + +## Constructors + +### new UnknownPeerError() + +> **new UnknownPeerError**(`message`?): [`UnknownPeerError`](UnknownPeerError.md) + +#### Parameters + +• **message?**: `string` + +#### Returns + +[`UnknownPeerError`](UnknownPeerError.md) + +#### Overrides + +`Error.constructor` + +## Properties + +### name + +> **name**: `string` + +#### Inherited from + +`Error.name` diff --git a/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_local-peers/interfaces/LocalPeersEvents.md b/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_local-peers/interfaces/LocalPeersEvents.md new file mode 100644 index 000000000..ba5621148 --- /dev/null +++ b/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_local-peers/interfaces/LocalPeersEvents.md @@ -0,0 +1,147 @@ +[**API**](../../../../README.md) • **Docs** + +*** + +[API](../../../../README.md) / [\](../../../README.md) / ["/home/runner/work/comapeo-core/comapeo-core/src/local-peers"](../README.md) / LocalPeersEvents + +# Interface: LocalPeersEvents + +## Properties + +### discovery-key() + +> **discovery-key**: (`discoveryKey`, `protomux`) => `void` + +Emitted when a new hypercore is replicated (by a peer) to a peer protomux instance (passed as the second parameter) + +#### Parameters + +• **discoveryKey**: `Buffer` + +• **protomux**: [`Protomux`](../../../classes/Protomux.md)\<`NoiseSecretStream`\<`Duplex`\<`any`, `any`, `any`, `any`, `true`, `true`, `DuplexEvents`\<`any`, `any`\>\>\>\> + +#### Returns + +`void` + +*** + +### failed-to-handle-message() + +> **failed-to-handle-message**: (`messageType`, `errorMessage`?) => `void` + +Emitted when we received a message we couldn't handle for some reason. Primarily useful for testing + +#### Parameters + +• **messageType**: `string` + +• **errorMessage?**: `string` + +#### Returns + +`void` + +*** + +### got-project-details() + +> **got-project-details**: (`peerId`, `details`) => `void` + +Emitted when project details are received + +#### Parameters + +• **peerId**: `string` + +• **details**: `ProjectJoinDetails` + +#### Returns + +`void` + +*** + +### invite() + +> **invite**: (`peerId`, `invite`) => `void` + +Emitted when an invite is received + +#### Parameters + +• **peerId**: `string` + +• **invite**: `Invite` + +#### Returns + +`void` + +*** + +### invite-cancel() + +> **invite-cancel**: (`peerId`, `invite`) => `void` + +Emitted when we receive a cancelation for an invite + +#### Parameters + +• **peerId**: `string` + +• **invite**: `InviteCancel` + +#### Returns + +`void` + +*** + +### invite-response() + +> **invite-response**: (`peerId`, `inviteResponse`) => `void` + +Emitted when an invite response is received + +#### Parameters + +• **peerId**: `string` + +• **inviteResponse**: `InviteResponse` + +#### Returns + +`void` + +*** + +### peer-add() + +> **peer-add**: (`peer`) => `void` + +Emitted when a new peer is connected + +#### Parameters + +• **peer**: [`PeerInfoConnected`](../../../type-aliases/PeerInfoConnected.md) + +#### Returns + +`void` + +*** + +### peers() + +> **peers**: (`peers`) => `void` + +Emitted whenever the connection status of peers changes. An array of peerInfo objects with a peer id and the peer connection status + +#### Parameters + +• **peers**: [`PeerInfo`](../type-aliases/PeerInfo.md)[] + +#### Returns + +`void` diff --git a/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_local-peers/type-aliases/PeerInfo.md b/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_local-peers/type-aliases/PeerInfo.md new file mode 100644 index 000000000..52b2139e1 --- /dev/null +++ b/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_local-peers/type-aliases/PeerInfo.md @@ -0,0 +1,11 @@ +[**API**](../../../../README.md) • **Docs** + +*** + +[API](../../../../README.md) / [\](../../../README.md) / ["/home/runner/work/comapeo-core/comapeo-core/src/local-peers"](../README.md) / PeerInfo + +# Type Alias: PeerInfo + +> **PeerInfo**\<\>: [`PeerInfoConnected`](../../../type-aliases/PeerInfoConnected.md) \| [`PeerInfoDisconnected`](../../../type-aliases/PeerInfoDisconnected.md) + +## Type Parameters diff --git a/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_local-peers/type-aliases/PeerInfoConnecting.md b/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_local-peers/type-aliases/PeerInfoConnecting.md new file mode 100644 index 000000000..b2d9f93d8 --- /dev/null +++ b/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_local-peers/type-aliases/PeerInfoConnecting.md @@ -0,0 +1,17 @@ +[**API**](../../../../README.md) • **Docs** + +*** + +[API](../../../../README.md) / [\](../../../README.md) / ["/home/runner/work/comapeo-core/comapeo-core/src/local-peers"](../README.md) / PeerInfoConnecting + +# Type Alias: PeerInfoConnecting + +> **PeerInfoConnecting**\<\>: [`PeerInfoBase`](../../../interfaces/PeerInfoBase.md) & `object` + +## Type declaration + +### status + +> **status**: `"connecting"` + +## Type Parameters diff --git a/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_local-peers/type-aliases/PeerInfoInternal.md b/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_local-peers/type-aliases/PeerInfoInternal.md new file mode 100644 index 000000000..ea936df6c --- /dev/null +++ b/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_local-peers/type-aliases/PeerInfoInternal.md @@ -0,0 +1,11 @@ +[**API**](../../../../README.md) • **Docs** + +*** + +[API](../../../../README.md) / [\](../../../README.md) / ["/home/runner/work/comapeo-core/comapeo-core/src/local-peers"](../README.md) / PeerInfoInternal + +# Type Alias: PeerInfoInternal + +> **PeerInfoInternal**\<\>: [`PeerInfoConnecting`](PeerInfoConnecting.md) \| [`PeerInfoConnected`](../../../type-aliases/PeerInfoConnected.md) \| [`PeerInfoDisconnected`](../../../type-aliases/PeerInfoDisconnected.md) + +## Type Parameters diff --git a/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_local-peers/type-aliases/PeerState.md b/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_local-peers/type-aliases/PeerState.md new file mode 100644 index 000000000..2bc6881b1 --- /dev/null +++ b/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_local-peers/type-aliases/PeerState.md @@ -0,0 +1,11 @@ +[**API**](../../../../README.md) • **Docs** + +*** + +[API](../../../../README.md) / [\](../../../README.md) / ["/home/runner/work/comapeo-core/comapeo-core/src/local-peers"](../README.md) / PeerState + +# Type Alias: PeerState + +> **PeerState**\<\>: [`PeerInfoInternal`](PeerInfoInternal.md)\[`"status"`\] + +## Type Parameters diff --git a/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_local-peers/variables/kTestOnlySendRawInvite.md b/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_local-peers/variables/kTestOnlySendRawInvite.md new file mode 100644 index 000000000..14e8799b4 --- /dev/null +++ b/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_local-peers/variables/kTestOnlySendRawInvite.md @@ -0,0 +1,9 @@ +[**API**](../../../../README.md) • **Docs** + +*** + +[API](../../../../README.md) / [\](../../../README.md) / ["/home/runner/work/comapeo-core/comapeo-core/src/local-peers"](../README.md) / kTestOnlySendRawInvite + +# Variable: kTestOnlySendRawInvite + +> `const` **kTestOnlySendRawInvite**: *typeof* [`kTestOnlySendRawInvite`](kTestOnlySendRawInvite.md) diff --git a/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_schema_client/README.md b/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_schema_client/README.md new file mode 100644 index 000000000..9d4a5f05d --- /dev/null +++ b/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_schema_client/README.md @@ -0,0 +1,26 @@ +[**API**](../../../README.md) • **Docs** + +*** + +[API](../../../README.md) / [\](../../README.md) / "/home/runner/work/comapeo-core/comapeo-core/src/schema/client" + +# "/home/runner/work/comapeo-core/comapeo-core/src/schema/client" + +## Index + +### Interfaces + +- [ProjectInfo](interfaces/ProjectInfo.md) + +### Variables + +- [localDeviceInfoTable](variables/localDeviceInfoTable.md) +- [projectBacklinkTable](variables/projectBacklinkTable.md) +- [projectKeysTable](variables/projectKeysTable.md) +- [projectSettingsTable](variables/projectSettingsTable.md) + +## References + +### DeviceInfoParam + +Re-exports [DeviceInfoParam](../../type-aliases/DeviceInfoParam.md) diff --git a/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_schema_client/interfaces/ProjectInfo.md b/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_schema_client/interfaces/ProjectInfo.md new file mode 100644 index 000000000..d2d8069ba --- /dev/null +++ b/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_schema_client/interfaces/ProjectInfo.md @@ -0,0 +1,13 @@ +[**API**](../../../../README.md) • **Docs** + +*** + +[API](../../../../README.md) / [\](../../../README.md) / ["/home/runner/work/comapeo-core/comapeo-core/src/schema/client"](../README.md) / ProjectInfo + +# Interface: ProjectInfo + +## Properties + +### name + +> **name**: `undefined` \| `string` diff --git a/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_schema_client/variables/localDeviceInfoTable.md b/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_schema_client/variables/localDeviceInfoTable.md new file mode 100644 index 000000000..eeaa1bb35 --- /dev/null +++ b/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_schema_client/variables/localDeviceInfoTable.md @@ -0,0 +1,9 @@ +[**API**](../../../../README.md) • **Docs** + +*** + +[API](../../../../README.md) / [\](../../../README.md) / ["/home/runner/work/comapeo-core/comapeo-core/src/schema/client"](../README.md) / localDeviceInfoTable + +# Variable: localDeviceInfoTable + +> `const` **localDeviceInfoTable**: `SQLiteTableWithColumns`\<`object`\> diff --git a/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_schema_client/variables/projectBacklinkTable.md b/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_schema_client/variables/projectBacklinkTable.md new file mode 100644 index 000000000..07947df14 --- /dev/null +++ b/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_schema_client/variables/projectBacklinkTable.md @@ -0,0 +1,9 @@ +[**API**](../../../../README.md) • **Docs** + +*** + +[API](../../../../README.md) / [\](../../../README.md) / ["/home/runner/work/comapeo-core/comapeo-core/src/schema/client"](../README.md) / projectBacklinkTable + +# Variable: projectBacklinkTable + +> `const` **projectBacklinkTable**: `SQLiteTableWithColumns`\<`object`\> diff --git a/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_schema_client/variables/projectKeysTable.md b/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_schema_client/variables/projectKeysTable.md new file mode 100644 index 000000000..1dc8f92ae --- /dev/null +++ b/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_schema_client/variables/projectKeysTable.md @@ -0,0 +1,9 @@ +[**API**](../../../../README.md) • **Docs** + +*** + +[API](../../../../README.md) / [\](../../../README.md) / ["/home/runner/work/comapeo-core/comapeo-core/src/schema/client"](../README.md) / projectKeysTable + +# Variable: projectKeysTable + +> `const` **projectKeysTable**: `SQLiteTableWithColumns`\<`object`\> diff --git a/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_schema_client/variables/projectSettingsTable.md b/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_schema_client/variables/projectSettingsTable.md new file mode 100644 index 000000000..af1a3692c --- /dev/null +++ b/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_schema_client/variables/projectSettingsTable.md @@ -0,0 +1,9 @@ +[**API**](../../../../README.md) • **Docs** + +*** + +[API](../../../../README.md) / [\](../../../README.md) / ["/home/runner/work/comapeo-core/comapeo-core/src/schema/client"](../README.md) / projectSettingsTable + +# Variable: projectSettingsTable + +> `const` **projectSettingsTable**: `SQLiteTableWithColumns`\<`object`\> diff --git a/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_schema_project/README.md b/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_schema_project/README.md new file mode 100644 index 000000000..9997edccc --- /dev/null +++ b/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_schema_project/README.md @@ -0,0 +1,31 @@ +[**API**](../../../README.md) • **Docs** + +*** + +[API](../../../README.md) / [\](../../README.md) / "/home/runner/work/comapeo-core/comapeo-core/src/schema/project" + +# "/home/runner/work/comapeo-core/comapeo-core/src/schema/project" + +## Index + +### Variables + +- [coreOwnershipBacklinkTable](variables/coreOwnershipBacklinkTable.md) +- [coreOwnershipTable](variables/coreOwnershipTable.md) +- [coresTable](variables/coresTable.md) +- [deviceInfoBacklinkTable](variables/deviceInfoBacklinkTable.md) +- [deviceInfoTable](variables/deviceInfoTable.md) +- [fieldBacklinkTable](variables/fieldBacklinkTable.md) +- [fieldTable](variables/fieldTable.md) +- [iconBacklinkTable](variables/iconBacklinkTable.md) +- [iconTable](variables/iconTable.md) +- [observationBacklinkTable](variables/observationBacklinkTable.md) +- [observationTable](variables/observationTable.md) +- [presetBacklinkTable](variables/presetBacklinkTable.md) +- [presetTable](variables/presetTable.md) +- [roleBacklinkTable](variables/roleBacklinkTable.md) +- [roleTable](variables/roleTable.md) +- [trackBacklinkTable](variables/trackBacklinkTable.md) +- [trackTable](variables/trackTable.md) +- [translationBacklinkTable](variables/translationBacklinkTable.md) +- [translationTable](variables/translationTable.md) diff --git a/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_schema_project/variables/coreOwnershipBacklinkTable.md b/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_schema_project/variables/coreOwnershipBacklinkTable.md new file mode 100644 index 000000000..2187af68f --- /dev/null +++ b/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_schema_project/variables/coreOwnershipBacklinkTable.md @@ -0,0 +1,9 @@ +[**API**](../../../../README.md) • **Docs** + +*** + +[API](../../../../README.md) / [\](../../../README.md) / ["/home/runner/work/comapeo-core/comapeo-core/src/schema/project"](../README.md) / coreOwnershipBacklinkTable + +# Variable: coreOwnershipBacklinkTable + +> `const` **coreOwnershipBacklinkTable**: `SQLiteTableWithColumns`\<`object`\> diff --git a/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_schema_project/variables/coreOwnershipTable.md b/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_schema_project/variables/coreOwnershipTable.md new file mode 100644 index 000000000..816357797 --- /dev/null +++ b/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_schema_project/variables/coreOwnershipTable.md @@ -0,0 +1,9 @@ +[**API**](../../../../README.md) • **Docs** + +*** + +[API](../../../../README.md) / [\](../../../README.md) / ["/home/runner/work/comapeo-core/comapeo-core/src/schema/project"](../README.md) / coreOwnershipTable + +# Variable: coreOwnershipTable + +> `const` **coreOwnershipTable**: `SQLiteTableWithColumns`\<`object`\> diff --git a/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_schema_project/variables/coresTable.md b/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_schema_project/variables/coresTable.md new file mode 100644 index 000000000..6daf0f769 --- /dev/null +++ b/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_schema_project/variables/coresTable.md @@ -0,0 +1,9 @@ +[**API**](../../../../README.md) • **Docs** + +*** + +[API](../../../../README.md) / [\](../../../README.md) / ["/home/runner/work/comapeo-core/comapeo-core/src/schema/project"](../README.md) / coresTable + +# Variable: coresTable + +> `const` **coresTable**: `SQLiteTableWithColumns`\<`object`\> diff --git a/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_schema_project/variables/deviceInfoBacklinkTable.md b/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_schema_project/variables/deviceInfoBacklinkTable.md new file mode 100644 index 000000000..0cb75683f --- /dev/null +++ b/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_schema_project/variables/deviceInfoBacklinkTable.md @@ -0,0 +1,9 @@ +[**API**](../../../../README.md) • **Docs** + +*** + +[API](../../../../README.md) / [\](../../../README.md) / ["/home/runner/work/comapeo-core/comapeo-core/src/schema/project"](../README.md) / deviceInfoBacklinkTable + +# Variable: deviceInfoBacklinkTable + +> `const` **deviceInfoBacklinkTable**: `SQLiteTableWithColumns`\<`object`\> diff --git a/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_schema_project/variables/deviceInfoTable.md b/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_schema_project/variables/deviceInfoTable.md new file mode 100644 index 000000000..ea763795f --- /dev/null +++ b/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_schema_project/variables/deviceInfoTable.md @@ -0,0 +1,9 @@ +[**API**](../../../../README.md) • **Docs** + +*** + +[API](../../../../README.md) / [\](../../../README.md) / ["/home/runner/work/comapeo-core/comapeo-core/src/schema/project"](../README.md) / deviceInfoTable + +# Variable: deviceInfoTable + +> `const` **deviceInfoTable**: `SQLiteTableWithColumns`\<`object`\> diff --git a/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_schema_project/variables/fieldBacklinkTable.md b/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_schema_project/variables/fieldBacklinkTable.md new file mode 100644 index 000000000..a15f11ad1 --- /dev/null +++ b/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_schema_project/variables/fieldBacklinkTable.md @@ -0,0 +1,9 @@ +[**API**](../../../../README.md) • **Docs** + +*** + +[API](../../../../README.md) / [\](../../../README.md) / ["/home/runner/work/comapeo-core/comapeo-core/src/schema/project"](../README.md) / fieldBacklinkTable + +# Variable: fieldBacklinkTable + +> `const` **fieldBacklinkTable**: `SQLiteTableWithColumns`\<`object`\> diff --git a/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_schema_project/variables/fieldTable.md b/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_schema_project/variables/fieldTable.md new file mode 100644 index 000000000..a4e3ec10d --- /dev/null +++ b/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_schema_project/variables/fieldTable.md @@ -0,0 +1,9 @@ +[**API**](../../../../README.md) • **Docs** + +*** + +[API](../../../../README.md) / [\](../../../README.md) / ["/home/runner/work/comapeo-core/comapeo-core/src/schema/project"](../README.md) / fieldTable + +# Variable: fieldTable + +> `const` **fieldTable**: `SQLiteTableWithColumns`\<`object`\> diff --git a/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_schema_project/variables/iconBacklinkTable.md b/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_schema_project/variables/iconBacklinkTable.md new file mode 100644 index 000000000..e9375a6e9 --- /dev/null +++ b/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_schema_project/variables/iconBacklinkTable.md @@ -0,0 +1,9 @@ +[**API**](../../../../README.md) • **Docs** + +*** + +[API](../../../../README.md) / [\](../../../README.md) / ["/home/runner/work/comapeo-core/comapeo-core/src/schema/project"](../README.md) / iconBacklinkTable + +# Variable: iconBacklinkTable + +> `const` **iconBacklinkTable**: `SQLiteTableWithColumns`\<`object`\> diff --git a/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_schema_project/variables/iconTable.md b/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_schema_project/variables/iconTable.md new file mode 100644 index 000000000..ae8e9a971 --- /dev/null +++ b/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_schema_project/variables/iconTable.md @@ -0,0 +1,9 @@ +[**API**](../../../../README.md) • **Docs** + +*** + +[API](../../../../README.md) / [\](../../../README.md) / ["/home/runner/work/comapeo-core/comapeo-core/src/schema/project"](../README.md) / iconTable + +# Variable: iconTable + +> `const` **iconTable**: `SQLiteTableWithColumns`\<`object`\> diff --git a/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_schema_project/variables/observationBacklinkTable.md b/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_schema_project/variables/observationBacklinkTable.md new file mode 100644 index 000000000..77387551a --- /dev/null +++ b/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_schema_project/variables/observationBacklinkTable.md @@ -0,0 +1,9 @@ +[**API**](../../../../README.md) • **Docs** + +*** + +[API](../../../../README.md) / [\](../../../README.md) / ["/home/runner/work/comapeo-core/comapeo-core/src/schema/project"](../README.md) / observationBacklinkTable + +# Variable: observationBacklinkTable + +> `const` **observationBacklinkTable**: `SQLiteTableWithColumns`\<`object`\> diff --git a/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_schema_project/variables/observationTable.md b/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_schema_project/variables/observationTable.md new file mode 100644 index 000000000..662b6a8a3 --- /dev/null +++ b/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_schema_project/variables/observationTable.md @@ -0,0 +1,9 @@ +[**API**](../../../../README.md) • **Docs** + +*** + +[API](../../../../README.md) / [\](../../../README.md) / ["/home/runner/work/comapeo-core/comapeo-core/src/schema/project"](../README.md) / observationTable + +# Variable: observationTable + +> `const` **observationTable**: `SQLiteTableWithColumns`\<`object`\> diff --git a/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_schema_project/variables/presetBacklinkTable.md b/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_schema_project/variables/presetBacklinkTable.md new file mode 100644 index 000000000..53a8ba81a --- /dev/null +++ b/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_schema_project/variables/presetBacklinkTable.md @@ -0,0 +1,9 @@ +[**API**](../../../../README.md) • **Docs** + +*** + +[API](../../../../README.md) / [\](../../../README.md) / ["/home/runner/work/comapeo-core/comapeo-core/src/schema/project"](../README.md) / presetBacklinkTable + +# Variable: presetBacklinkTable + +> `const` **presetBacklinkTable**: `SQLiteTableWithColumns`\<`object`\> diff --git a/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_schema_project/variables/presetTable.md b/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_schema_project/variables/presetTable.md new file mode 100644 index 000000000..1b65b428e --- /dev/null +++ b/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_schema_project/variables/presetTable.md @@ -0,0 +1,9 @@ +[**API**](../../../../README.md) • **Docs** + +*** + +[API](../../../../README.md) / [\](../../../README.md) / ["/home/runner/work/comapeo-core/comapeo-core/src/schema/project"](../README.md) / presetTable + +# Variable: presetTable + +> `const` **presetTable**: `SQLiteTableWithColumns`\<`object`\> diff --git a/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_schema_project/variables/roleBacklinkTable.md b/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_schema_project/variables/roleBacklinkTable.md new file mode 100644 index 000000000..592ce9bc4 --- /dev/null +++ b/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_schema_project/variables/roleBacklinkTable.md @@ -0,0 +1,9 @@ +[**API**](../../../../README.md) • **Docs** + +*** + +[API](../../../../README.md) / [\](../../../README.md) / ["/home/runner/work/comapeo-core/comapeo-core/src/schema/project"](../README.md) / roleBacklinkTable + +# Variable: roleBacklinkTable + +> `const` **roleBacklinkTable**: `SQLiteTableWithColumns`\<`object`\> diff --git a/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_schema_project/variables/roleTable.md b/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_schema_project/variables/roleTable.md new file mode 100644 index 000000000..8e1b058b6 --- /dev/null +++ b/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_schema_project/variables/roleTable.md @@ -0,0 +1,9 @@ +[**API**](../../../../README.md) • **Docs** + +*** + +[API](../../../../README.md) / [\](../../../README.md) / ["/home/runner/work/comapeo-core/comapeo-core/src/schema/project"](../README.md) / roleTable + +# Variable: roleTable + +> `const` **roleTable**: `SQLiteTableWithColumns`\<`object`\> diff --git a/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_schema_project/variables/trackBacklinkTable.md b/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_schema_project/variables/trackBacklinkTable.md new file mode 100644 index 000000000..dff6bc9c7 --- /dev/null +++ b/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_schema_project/variables/trackBacklinkTable.md @@ -0,0 +1,9 @@ +[**API**](../../../../README.md) • **Docs** + +*** + +[API](../../../../README.md) / [\](../../../README.md) / ["/home/runner/work/comapeo-core/comapeo-core/src/schema/project"](../README.md) / trackBacklinkTable + +# Variable: trackBacklinkTable + +> `const` **trackBacklinkTable**: `SQLiteTableWithColumns`\<`object`\> diff --git a/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_schema_project/variables/trackTable.md b/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_schema_project/variables/trackTable.md new file mode 100644 index 000000000..02bedcc03 --- /dev/null +++ b/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_schema_project/variables/trackTable.md @@ -0,0 +1,9 @@ +[**API**](../../../../README.md) • **Docs** + +*** + +[API](../../../../README.md) / [\](../../../README.md) / ["/home/runner/work/comapeo-core/comapeo-core/src/schema/project"](../README.md) / trackTable + +# Variable: trackTable + +> `const` **trackTable**: `SQLiteTableWithColumns`\<`object`\> diff --git a/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_schema_project/variables/translationBacklinkTable.md b/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_schema_project/variables/translationBacklinkTable.md new file mode 100644 index 000000000..778885710 --- /dev/null +++ b/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_schema_project/variables/translationBacklinkTable.md @@ -0,0 +1,9 @@ +[**API**](../../../../README.md) • **Docs** + +*** + +[API](../../../../README.md) / [\](../../../README.md) / ["/home/runner/work/comapeo-core/comapeo-core/src/schema/project"](../README.md) / translationBacklinkTable + +# Variable: translationBacklinkTable + +> `const` **translationBacklinkTable**: `SQLiteTableWithColumns`\<`object`\> diff --git a/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_schema_project/variables/translationTable.md b/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_schema_project/variables/translationTable.md new file mode 100644 index 000000000..e9b265b19 --- /dev/null +++ b/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_schema_project/variables/translationTable.md @@ -0,0 +1,9 @@ +[**API**](../../../../README.md) • **Docs** + +*** + +[API](../../../../README.md) / [\](../../../README.md) / ["/home/runner/work/comapeo-core/comapeo-core/src/schema/project"](../README.md) / translationTable + +# Variable: translationTable + +> `const` **translationTable**: `SQLiteTableWithColumns`\<`object`\> diff --git a/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_sync_core-sync-state/README.md b/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_sync_core-sync-state/README.md new file mode 100644 index 000000000..31dab4253 --- /dev/null +++ b/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_sync_core-sync-state/README.md @@ -0,0 +1,36 @@ +[**API**](../../../README.md) • **Docs** + +*** + +[API](../../../README.md) / [\](../../README.md) / "/home/runner/work/comapeo-core/comapeo-core/src/sync/core-sync-state" + +# "/home/runner/work/comapeo-core/comapeo-core/src/sync/core-sync-state" + +## Index + +### Interfaces + +- [DerivedState](interfaces/DerivedState.md) +- [InternalState](interfaces/InternalState.md) +- [PeerNamespaceState](interfaces/PeerNamespaceState.md) + +### Type Aliases + +- [Bitfield](type-aliases/Bitfield.md) +- [PeerId](type-aliases/PeerId.md) + +### Functions + +- [bitCount32](functions/bitCount32.md) + +## References + +### CoreSyncState + +Re-exports [CoreSyncState](../../classes/CoreSyncState.md) + +*** + +### LocalCoreState + +Re-exports [LocalCoreState](../../interfaces/LocalCoreState.md) diff --git a/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_sync_core-sync-state/functions/bitCount32.md b/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_sync_core-sync-state/functions/bitCount32.md new file mode 100644 index 000000000..931ec99bf --- /dev/null +++ b/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_sync_core-sync-state/functions/bitCount32.md @@ -0,0 +1,20 @@ +[**API**](../../../../README.md) • **Docs** + +*** + +[API](../../../../README.md) / [\](../../../README.md) / ["/home/runner/work/comapeo-core/comapeo-core/src/sync/core-sync-state"](../README.md) / bitCount32 + +# Function: bitCount32() + +> **bitCount32**(`n`): `number` + +Apologies for the obscure code. From +https://stackoverflow.com/a/109025/903300 + +## Parameters + +• **n**: `number` + +## Returns + +`number` diff --git a/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_sync_core-sync-state/interfaces/DerivedState.md b/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_sync_core-sync-state/interfaces/DerivedState.md new file mode 100644 index 000000000..cdc3f1848 --- /dev/null +++ b/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_sync_core-sync-state/interfaces/DerivedState.md @@ -0,0 +1,31 @@ +[**API**](../../../../README.md) • **Docs** + +*** + +[API](../../../../README.md) / [\](../../../README.md) / ["/home/runner/work/comapeo-core/comapeo-core/src/sync/core-sync-state"](../README.md) / DerivedState + +# Interface: DerivedState + +## Properties + +### coreLength + +> **coreLength**: `number` + +known (sparse) length of the core + +*** + +### localState + +> **localState**: [`LocalCoreState`](../../../interfaces/LocalCoreState.md) + +local state + +*** + +### remoteStates + +> **remoteStates**: `object` + +map of state of all known peers diff --git a/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_sync_core-sync-state/interfaces/InternalState.md b/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_sync_core-sync-state/interfaces/InternalState.md new file mode 100644 index 000000000..9ac7d12cf --- /dev/null +++ b/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_sync_core-sync-state/interfaces/InternalState.md @@ -0,0 +1,39 @@ +[**API**](../../../../README.md) • **Docs** + +*** + +[API](../../../../README.md) / [\](../../../README.md) / ["/home/runner/work/comapeo-core/comapeo-core/src/sync/core-sync-state"](../README.md) / InternalState + +# Interface: InternalState + +## Properties + +### length + +> **length**: `undefined` \| `number` + +Core length, e.g. how many blocks in the core (including blocks that are not downloaded) + +*** + +### localState + +> **localState**: `PeerState` + +*** + +### namespace + +> **namespace**: `"blob"` \| `"auth"` \| `"config"` \| `"data"` \| `"blobIndex"` + +*** + +### peerSyncControllers + +> **peerSyncControllers**: `Map`\<`string`, [`PeerSyncController`](../../../classes/PeerSyncController.md)\> + +*** + +### remoteStates + +> **remoteStates**: `Map`\<`string`, `PeerState`\> diff --git a/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_sync_core-sync-state/interfaces/PeerNamespaceState.md b/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_sync_core-sync-state/interfaces/PeerNamespaceState.md new file mode 100644 index 000000000..eee117ea6 --- /dev/null +++ b/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_sync_core-sync-state/interfaces/PeerNamespaceState.md @@ -0,0 +1,37 @@ +[**API**](../../../../README.md) • **Docs** + +*** + +[API](../../../../README.md) / [\](../../../README.md) / ["/home/runner/work/comapeo-core/comapeo-core/src/sync/core-sync-state"](../README.md) / PeerNamespaceState + +# Interface: PeerNamespaceState + +## Properties + +### have + +> **have**: `number` + +blocks the peer has locally + +*** + +### status + +> **status**: `"stopped"` \| `"starting"` \| `"started"` + +*** + +### want + +> **want**: `number` + +blocks this peer wants from us + +*** + +### wanted + +> **wanted**: `number` + +blocks we want from this peer diff --git a/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_sync_core-sync-state/type-aliases/Bitfield.md b/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_sync_core-sync-state/type-aliases/Bitfield.md new file mode 100644 index 000000000..f89193edd --- /dev/null +++ b/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_sync_core-sync-state/type-aliases/Bitfield.md @@ -0,0 +1,11 @@ +[**API**](../../../../README.md) • **Docs** + +*** + +[API](../../../../README.md) / [\](../../../README.md) / ["/home/runner/work/comapeo-core/comapeo-core/src/sync/core-sync-state"](../README.md) / Bitfield + +# Type Alias: Bitfield + +> **Bitfield**\<\>: [`default`](../../../classes/default.md) + +## Type Parameters diff --git a/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_sync_core-sync-state/type-aliases/PeerId.md b/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_sync_core-sync-state/type-aliases/PeerId.md new file mode 100644 index 000000000..3005bc7d7 --- /dev/null +++ b/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_sync_core-sync-state/type-aliases/PeerId.md @@ -0,0 +1,11 @@ +[**API**](../../../../README.md) • **Docs** + +*** + +[API](../../../../README.md) / [\](../../../README.md) / ["/home/runner/work/comapeo-core/comapeo-core/src/sync/core-sync-state"](../README.md) / PeerId + +# Type Alias: PeerId + +> **PeerId**\<\>: `string` + +## Type Parameters diff --git a/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_sync_namespace-sync-state/README.md b/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_sync_namespace-sync-state/README.md new file mode 100644 index 000000000..398fd2f06 --- /dev/null +++ b/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_sync_namespace-sync-state/README.md @@ -0,0 +1,17 @@ +[**API**](../../../README.md) • **Docs** + +*** + +[API](../../../README.md) / [\](../../README.md) / "/home/runner/work/comapeo-core/comapeo-core/src/sync/namespace-sync-state" + +# "/home/runner/work/comapeo-core/comapeo-core/src/sync/namespace-sync-state" + +## Index + +### Classes + +- [NamespaceSyncState](classes/NamespaceSyncState.md) + +### Type Aliases + +- [SyncState](type-aliases/SyncState.md) diff --git a/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_sync_namespace-sync-state/classes/NamespaceSyncState.md b/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_sync_namespace-sync-state/classes/NamespaceSyncState.md new file mode 100644 index 000000000..efc4fb368 --- /dev/null +++ b/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_sync_namespace-sync-state/classes/NamespaceSyncState.md @@ -0,0 +1,85 @@ +[**API**](../../../../README.md) • **Docs** + +*** + +[API](../../../../README.md) / [\](../../../README.md) / ["/home/runner/work/comapeo-core/comapeo-core/src/sync/namespace-sync-state"](../README.md) / NamespaceSyncState + +# Class: NamespaceSyncState\ + +## Type Parameters + +• **TNamespace** = [`Namespace`](../../../type-aliases/Namespace.md) + +## Constructors + +### new NamespaceSyncState() + +> **new NamespaceSyncState**\<`TNamespace`\>(`opts`): [`NamespaceSyncState`](NamespaceSyncState.md)\<`TNamespace`\> + +#### Parameters + +• **opts** + +• **opts.coreManager**: [`CoreManager`](../../../classes/CoreManager.md) + +• **opts.logger**: `undefined` \| [`Logger`](../../../classes/Logger.md) + +• **opts.namespace**: `TNamespace` + +• **opts.onUpdate** + +Called when a state update is available (via getState()) + +• **opts.peerSyncControllers**: `Map`\<`string`, [`PeerSyncController`](../../../classes/PeerSyncController.md)\> + +#### Returns + +[`NamespaceSyncState`](NamespaceSyncState.md)\<`TNamespace`\> + +## Accessors + +### namespace + +> `get` **namespace**(): `TNamespace` + +#### Returns + +`TNamespace` + +## Methods + +### addPeer() + +> **addPeer**(`peerId`): `void` + +#### Parameters + +• **peerId**: `string` + +#### Returns + +`void` + +*** + +### disconnectPeer() + +> **disconnectPeer**(`peerId`): `void` + +#### Parameters + +• **peerId**: `string` + +#### Returns + +`void` + +*** + +### getState() + +> **getState**(): [`SyncState`](../type-aliases/SyncState.md) + +#### Returns + +[`SyncState`](../type-aliases/SyncState.md) diff --git a/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_sync_namespace-sync-state/type-aliases/SyncState.md b/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_sync_namespace-sync-state/type-aliases/SyncState.md new file mode 100644 index 000000000..8cf01bf7a --- /dev/null +++ b/docs/api/md/-internal-/namespaces/home_runner_work_comapeo-core_comapeo-core_src_sync_namespace-sync-state/type-aliases/SyncState.md @@ -0,0 +1,21 @@ +[**API**](../../../../README.md) • **Docs** + +*** + +[API](../../../../README.md) / [\](../../../README.md) / ["/home/runner/work/comapeo-core/comapeo-core/src/sync/namespace-sync-state"](../README.md) / SyncState + +# Type Alias: SyncState + +> **SyncState**\<\>: `Omit`\<[`"/home/runner/work/comapeo-core/comapeo-core/src/sync/core-sync-state"`](../../home_runner_work_comapeo-core_comapeo-core_src_sync_core-sync-state/README.md), `"coreLength"`\> & `object` + +## Type declaration + +### coreCount + +> **coreCount**: `number` + +### dataToSync + +> **dataToSync**: `boolean` + +## Type Parameters diff --git a/docs/api/md/-internal-/namespaces/hyperdrive/README.md b/docs/api/md/-internal-/namespaces/hyperdrive/README.md new file mode 100644 index 000000000..0e5af5752 --- /dev/null +++ b/docs/api/md/-internal-/namespaces/hyperdrive/README.md @@ -0,0 +1,13 @@ +[**API**](../../../README.md) • **Docs** + +*** + +[API](../../../README.md) / [\](../../README.md) / "hyperdrive" + +# "hyperdrive" + +## References + +### HyperdriveEntry + +Re-exports [HyperdriveEntry](../Hyperdrive/interfaces/HyperdriveEntry.md) diff --git a/docs/api/md/-internal-/type-aliases/ArrayAtLeastOne.md b/docs/api/md/-internal-/type-aliases/ArrayAtLeastOne.md new file mode 100644 index 000000000..22c34b59f --- /dev/null +++ b/docs/api/md/-internal-/type-aliases/ArrayAtLeastOne.md @@ -0,0 +1,13 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / ArrayAtLeastOne + +# Type Alias: ArrayAtLeastOne\ + +> **ArrayAtLeastOne**\<`T`\>: [`T`, `...T[]`] + +## Type Parameters + +• **T** diff --git a/docs/api/md/-internal-/type-aliases/BitField.md b/docs/api/md/-internal-/type-aliases/BitField.md new file mode 100644 index 000000000..0a90f0945 --- /dev/null +++ b/docs/api/md/-internal-/type-aliases/BitField.md @@ -0,0 +1,9 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / BitField + +# Type Alias: BitField + +> **BitField**: `TypedArray` diff --git a/docs/api/md/-internal-/type-aliases/BlobDownloadStateError.md b/docs/api/md/-internal-/type-aliases/BlobDownloadStateError.md new file mode 100644 index 000000000..0fdcb4675 --- /dev/null +++ b/docs/api/md/-internal-/type-aliases/BlobDownloadStateError.md @@ -0,0 +1,21 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / BlobDownloadStateError + +# Type Alias: BlobDownloadStateError + +> **BlobDownloadStateError**\<\>: `Omit`\<[`BlobDownloadState`](../interfaces/BlobDownloadState.md), `"error"` \| `"status"`\> & `object` + +## Type declaration + +### error + +> **error**: `Error` + +### status + +> **status**: `"error"` + +## Type Parameters diff --git a/docs/api/md/-internal-/type-aliases/BlobFilter.md b/docs/api/md/-internal-/type-aliases/BlobFilter.md new file mode 100644 index 000000000..41260e255 --- /dev/null +++ b/docs/api/md/-internal-/type-aliases/BlobFilter.md @@ -0,0 +1,9 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / BlobFilter + +# Type Alias: BlobFilter + +> **BlobFilter**: `RequireAtLeastOne`\<`{ [KeyType in BlobType]: ArrayAtLeastOne> }`\> diff --git a/docs/api/md/-internal-/type-aliases/BlobId.md b/docs/api/md/-internal-/type-aliases/BlobId.md new file mode 100644 index 000000000..5f502912f --- /dev/null +++ b/docs/api/md/-internal-/type-aliases/BlobId.md @@ -0,0 +1,9 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / BlobId + +# Type Alias: BlobId + +> **BlobId**: `Simplify`\<`ValueOf`\<`{ [KeyType in BlobType]: BlobIdBase }`\>\> diff --git a/docs/api/md/-internal-/type-aliases/BlobIdBase.md b/docs/api/md/-internal-/type-aliases/BlobIdBase.md new file mode 100644 index 000000000..b9e418551 --- /dev/null +++ b/docs/api/md/-internal-/type-aliases/BlobIdBase.md @@ -0,0 +1,39 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / BlobIdBase + +# Type Alias: BlobIdBase\ + +> **BlobIdBase**\<`T`\>: `object` + +## Type Parameters + +• **T** *extends* [`BlobType`](BlobType.md) + +## Type declaration + +### driveId + +> **driveId**: `string` + +discovery key as hex string of hyperdrive where blob is stored + +### name + +> **name**: `string` + +unique identifier for blob (e.g. hash of content) + +### type + +> **type**: `T` + +Type of blob + +### variant + +> **variant**: [`BlobVariant`](BlobVariant.md)\<`T`\> + +Blob variant (some blob types have smaller previews and thumbnails available) diff --git a/docs/api/md/-internal-/type-aliases/BlobType.md b/docs/api/md/-internal-/type-aliases/BlobType.md new file mode 100644 index 000000000..c51e51841 --- /dev/null +++ b/docs/api/md/-internal-/type-aliases/BlobType.md @@ -0,0 +1,9 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / BlobType + +# Type Alias: BlobType + +> **BlobType**: keyof [`SupportedBlobVariants`](SupportedBlobVariants.md) diff --git a/docs/api/md/-internal-/type-aliases/BlobVariant.md b/docs/api/md/-internal-/type-aliases/BlobVariant.md new file mode 100644 index 000000000..b20f1dd03 --- /dev/null +++ b/docs/api/md/-internal-/type-aliases/BlobVariant.md @@ -0,0 +1,13 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / BlobVariant + +# Type Alias: BlobVariant\ + +> **BlobVariant**\<`TBlobType`\>: `TupleToUnion`\<[`SupportedBlobVariants`](SupportedBlobVariants.md)\[`TBlobType`\]\> + +## Type Parameters + +• **TBlobType** *extends* [`BlobType`](BlobType.md) diff --git a/docs/api/md/-internal-/type-aliases/Chunk.md b/docs/api/md/-internal-/type-aliases/Chunk.md new file mode 100644 index 000000000..091108efe --- /dev/null +++ b/docs/api/md/-internal-/type-aliases/Chunk.md @@ -0,0 +1,19 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / Chunk + +# Type Alias: Chunk + +> **Chunk**: `object` + +## Type declaration + +### field + +> **field**: [`BitField`](BitField.md) + +### offset + +> **offset**: `number` diff --git a/docs/api/md/-internal-/type-aliases/Core.md b/docs/api/md/-internal-/type-aliases/Core.md new file mode 100644 index 000000000..da465ab80 --- /dev/null +++ b/docs/api/md/-internal-/type-aliases/Core.md @@ -0,0 +1,11 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / Core + +# Type Alias: Core + +> **Core**\<\>: `Hypercore`\<`"binary"`, `Buffer`\> + +## Type Parameters diff --git a/docs/api/md/-internal-/type-aliases/CoreOwnershipWithSignatures.md b/docs/api/md/-internal-/type-aliases/CoreOwnershipWithSignatures.md new file mode 100644 index 000000000..7116fd9d6 --- /dev/null +++ b/docs/api/md/-internal-/type-aliases/CoreOwnershipWithSignatures.md @@ -0,0 +1,9 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / CoreOwnershipWithSignatures + +# Type Alias: CoreOwnershipWithSignatures + +> **CoreOwnershipWithSignatures**: `Extract`\<`ReturnType`\<*typeof* `decode`\>, `object`\> diff --git a/docs/api/md/-internal-/type-aliases/CoreOwnershipWithSignaturesValue.md b/docs/api/md/-internal-/type-aliases/CoreOwnershipWithSignaturesValue.md new file mode 100644 index 000000000..a96aa8e55 --- /dev/null +++ b/docs/api/md/-internal-/type-aliases/CoreOwnershipWithSignaturesValue.md @@ -0,0 +1,9 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / CoreOwnershipWithSignaturesValue + +# Type Alias: CoreOwnershipWithSignaturesValue + +> **CoreOwnershipWithSignaturesValue**: `Omit`\<[`CoreOwnershipWithSignatures`](CoreOwnershipWithSignatures.md), `Exclude`\\> diff --git a/docs/api/md/-internal-/type-aliases/CoreRecord.md b/docs/api/md/-internal-/type-aliases/CoreRecord.md new file mode 100644 index 000000000..d47ac29fc --- /dev/null +++ b/docs/api/md/-internal-/type-aliases/CoreRecord.md @@ -0,0 +1,25 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / CoreRecord + +# Type Alias: CoreRecord + +> **CoreRecord**\<\>: `object` + +## Type Parameters + +## Type declaration + +### core + +> **core**: [`Core`](Core.md) + +### key + +> **key**: `Buffer` + +### namespace + +> **namespace**: [`Namespace`](Namespace.md) diff --git a/docs/api/md/-internal-/type-aliases/CoreStorage.md b/docs/api/md/-internal-/type-aliases/CoreStorage.md new file mode 100644 index 000000000..d2cb1160b --- /dev/null +++ b/docs/api/md/-internal-/type-aliases/CoreStorage.md @@ -0,0 +1,17 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / CoreStorage + +# Type Alias: CoreStorage() + +> **CoreStorage**: (`name`) => `RandomAccessStorage` + +## Parameters + +• **name**: `string` + +## Returns + +`RandomAccessStorage` diff --git a/docs/api/md/-internal-/type-aliases/DeviceInfoDataType.md b/docs/api/md/-internal-/type-aliases/DeviceInfoDataType.md new file mode 100644 index 000000000..7f670aaaa --- /dev/null +++ b/docs/api/md/-internal-/type-aliases/DeviceInfoDataType.md @@ -0,0 +1,11 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / DeviceInfoDataType + +# Type Alias: DeviceInfoDataType + +> **DeviceInfoDataType**\<\>: [`DataType`](../classes/DataType.md)\<[`DataStore`](../classes/DataStore.md)\<`"config"`\>, *typeof* [`deviceInfoTable`](../namespaces/home_runner_work_comapeo-core_comapeo-core_src_schema_project/variables/deviceInfoTable.md), `"deviceInfo"`, `DeviceInfo`, `DeviceInfoValue`\> + +## Type Parameters diff --git a/docs/api/md/-internal-/type-aliases/DeviceInfoParam.md b/docs/api/md/-internal-/type-aliases/DeviceInfoParam.md new file mode 100644 index 000000000..a426201f4 --- /dev/null +++ b/docs/api/md/-internal-/type-aliases/DeviceInfoParam.md @@ -0,0 +1,11 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / DeviceInfoParam + +# Type Alias: DeviceInfoParam + +> **DeviceInfoParam**\<\>: `Omit`\<`DeviceInfoValue`, `"schemaName"`\> + +## Type Parameters diff --git a/docs/api/md/-internal-/type-aliases/EditableProjectSettings.md b/docs/api/md/-internal-/type-aliases/EditableProjectSettings.md new file mode 100644 index 000000000..e5a5a6178 --- /dev/null +++ b/docs/api/md/-internal-/type-aliases/EditableProjectSettings.md @@ -0,0 +1,11 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / EditableProjectSettings + +# Type Alias: EditableProjectSettings + +> **EditableProjectSettings**\<\>: `Omit`\<`ProjectSettingsValue`, `"schemaName"`\> + +## Type Parameters diff --git a/docs/api/md/-internal-/type-aliases/ElementOf.md b/docs/api/md/-internal-/type-aliases/ElementOf.md new file mode 100644 index 000000000..dfcf03dde --- /dev/null +++ b/docs/api/md/-internal-/type-aliases/ElementOf.md @@ -0,0 +1,13 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / ElementOf + +# Type Alias: ElementOf\ + +> **ElementOf**\<`T`\>: `T` *extends* `Iterable`\ ? `U` : `never` + +## Type Parameters + +• **T** diff --git a/docs/api/md/-internal-/type-aliases/GetMapeoDocTables.md b/docs/api/md/-internal-/type-aliases/GetMapeoDocTables.md new file mode 100644 index 000000000..10570a462 --- /dev/null +++ b/docs/api/md/-internal-/type-aliases/GetMapeoDocTables.md @@ -0,0 +1,13 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / GetMapeoDocTables + +# Type Alias: GetMapeoDocTables\ + +> **GetMapeoDocTables**\<`T`\>: `T`\[keyof `T` & [`MapeoDocTableName`](MapeoDocTableName.md)\] + +## Type Parameters + +• **T** diff --git a/docs/api/md/-internal-/type-aliases/HypercorePeer.md b/docs/api/md/-internal-/type-aliases/HypercorePeer.md new file mode 100644 index 000000000..9d3c3d85d --- /dev/null +++ b/docs/api/md/-internal-/type-aliases/HypercorePeer.md @@ -0,0 +1,60 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / HypercorePeer + +# Type Alias: HypercorePeer + +> **HypercorePeer**: `object` + +A subset of Hypercore's `Peer` class that we use. +TODO: Contribute these types upstream. + +## Type declaration + +### onbitfield() + +> **onbitfield**: (`options`) => `void` + +#### Parameters + +• **options** + +• **options.bitfield**: `Buffer` + +• **options.start**: `number` + +#### Returns + +`void` + +### onrange() + +> **onrange**: (`options`) => `void` + +#### Parameters + +• **options** + +• **options.drop**: `boolean` + +• **options.length**: `number` + +• **options.start**: `number` + +#### Returns + +`void` + +### protomux + +> **protomux**: [`Protomux`](../classes/Protomux.md) + +### remoteBitfield + +> **remoteBitfield**: [`HypercoreRemoteBitfield`](HypercoreRemoteBitfield.md) + +### remotePublicKey + +> **remotePublicKey**: `Buffer` diff --git a/docs/api/md/-internal-/type-aliases/HypercoreRemoteBitfield.md b/docs/api/md/-internal-/type-aliases/HypercoreRemoteBitfield.md new file mode 100644 index 000000000..e4893268c --- /dev/null +++ b/docs/api/md/-internal-/type-aliases/HypercoreRemoteBitfield.md @@ -0,0 +1,27 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / HypercoreRemoteBitfield + +# Type Alias: HypercoreRemoteBitfield + +> **HypercoreRemoteBitfield**: `object` + +A subset of Hypercore's `RemoteBitfield` class that we use. + +## Type declaration + +### \_pages + +> **\_pages**: [`BigSparseArray`](../classes/BigSparseArray.md)\<[`HypercoreRemoteBitfieldPage`](HypercoreRemoteBitfieldPage.md)\> + +### get() + +#### Parameters + +• **index**: `number` + +#### Returns + +`boolean` diff --git a/docs/api/md/-internal-/type-aliases/HypercoreRemoteBitfieldPage.md b/docs/api/md/-internal-/type-aliases/HypercoreRemoteBitfieldPage.md new file mode 100644 index 000000000..9e6c17fe9 --- /dev/null +++ b/docs/api/md/-internal-/type-aliases/HypercoreRemoteBitfieldPage.md @@ -0,0 +1,15 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / HypercoreRemoteBitfieldPage + +# Type Alias: HypercoreRemoteBitfieldPage + +> **HypercoreRemoteBitfieldPage**: `object` + +## Type declaration + +### bitfield + +> **bitfield**: `Uint32Array` diff --git a/docs/api/md/-internal-/type-aliases/IconVariant.md b/docs/api/md/-internal-/type-aliases/IconVariant.md new file mode 100644 index 000000000..7526e5066 --- /dev/null +++ b/docs/api/md/-internal-/type-aliases/IconVariant.md @@ -0,0 +1,11 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / IconVariant + +# Type Alias: IconVariant + +> **IconVariant**\<\>: `any`[]\[`number`\] + +## Type Parameters diff --git a/docs/api/md/-internal-/type-aliases/IndexedDocIds.md b/docs/api/md/-internal-/type-aliases/IndexedDocIds.md new file mode 100644 index 000000000..f02465c7e --- /dev/null +++ b/docs/api/md/-internal-/type-aliases/IndexedDocIds.md @@ -0,0 +1,11 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / IndexedDocIds + +# Type Alias: IndexedDocIds + +> **IndexedDocIds**\<\>: `{ [K in MapeoDoc["schemaName"]]?: string[] }` + +## Type Parameters diff --git a/docs/api/md/-internal-/type-aliases/InternalDriveEmitter.md b/docs/api/md/-internal-/type-aliases/InternalDriveEmitter.md new file mode 100644 index 000000000..88f800e12 --- /dev/null +++ b/docs/api/md/-internal-/type-aliases/InternalDriveEmitter.md @@ -0,0 +1,25 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / InternalDriveEmitter + +# Type Alias: InternalDriveEmitter + +> **InternalDriveEmitter**\<\>: `TypedEmitter`\<`object`\> + +## Type declaration + +### add-drive() + +> **add-drive**: (`drive`) => `void` + +#### Parameters + +• **drive**: [`"hyperdrive"`](../namespaces/hyperdrive/README.md) + +#### Returns + +`void` + +## Type Parameters diff --git a/docs/api/md/-internal-/type-aliases/InviteInternal.md b/docs/api/md/-internal-/type-aliases/InviteInternal.md new file mode 100644 index 000000000..0674951dd --- /dev/null +++ b/docs/api/md/-internal-/type-aliases/InviteInternal.md @@ -0,0 +1,17 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / InviteInternal + +# Type Alias: InviteInternal + +> **InviteInternal**\<\>: `InviteRpcMessage` & `object` + +## Type declaration + +### receivedAt + +> **receivedAt**: `number` + +## Type Parameters diff --git a/docs/api/md/-internal-/type-aliases/KeyPair-1.md b/docs/api/md/-internal-/type-aliases/KeyPair-1.md new file mode 100644 index 000000000..734fd375b --- /dev/null +++ b/docs/api/md/-internal-/type-aliases/KeyPair-1.md @@ -0,0 +1,19 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / KeyPair + +# Type Alias: KeyPair + +> **KeyPair**: `object` + +## Type declaration + +### publicKey + +> **publicKey**: [`PublicKey`](PublicKey.md) + +### secretKey + +> **secretKey**: [`SecretKey`](SecretKey.md) diff --git a/docs/api/md/-internal-/type-aliases/Keypair.md b/docs/api/md/-internal-/type-aliases/Keypair.md new file mode 100644 index 000000000..5d7f46fee --- /dev/null +++ b/docs/api/md/-internal-/type-aliases/Keypair.md @@ -0,0 +1,21 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / Keypair + +# Type Alias: Keypair + +> **Keypair**\<\>: `object` + +## Type Parameters + +## Type declaration + +### publicKey + +> **publicKey**: `Buffer` + +### secretKey + +> **secretKey**: `Buffer` diff --git a/docs/api/md/-internal-/type-aliases/MapBuffers.md b/docs/api/md/-internal-/type-aliases/MapBuffers.md new file mode 100644 index 000000000..ee89e0457 --- /dev/null +++ b/docs/api/md/-internal-/type-aliases/MapBuffers.md @@ -0,0 +1,15 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / MapBuffers + +# Type Alias: MapBuffers\ + +> **MapBuffers**\<`T`\>: `{ [K in keyof T]: T[K] extends Buffer ? string : T[K] }` + +Replace an object's `Buffer` values with `string`s. Useful for serialization. + +## Type Parameters + +• **T** diff --git a/docs/api/md/-internal-/type-aliases/MapeoDocMap.md b/docs/api/md/-internal-/type-aliases/MapeoDocMap.md new file mode 100644 index 000000000..3b363eaf3 --- /dev/null +++ b/docs/api/md/-internal-/type-aliases/MapeoDocMap.md @@ -0,0 +1,9 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / MapeoDocMap + +# Type Alias: MapeoDocMap + +> **MapeoDocMap**: `{ [K in MapeoDoc["schemaName"]]: Extract }` diff --git a/docs/api/md/-internal-/type-aliases/MapeoDocTableName.md b/docs/api/md/-internal-/type-aliases/MapeoDocTableName.md new file mode 100644 index 000000000..fd5efe057 --- /dev/null +++ b/docs/api/md/-internal-/type-aliases/MapeoDocTableName.md @@ -0,0 +1,9 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / MapeoDocTableName + +# Type Alias: MapeoDocTableName + +> **MapeoDocTableName**: \`$\{MapeoDoc\["schemaName"\]\}Table\` diff --git a/docs/api/md/-internal-/type-aliases/MapeoDocTables.md b/docs/api/md/-internal-/type-aliases/MapeoDocTables.md new file mode 100644 index 000000000..7024c1ec8 --- /dev/null +++ b/docs/api/md/-internal-/type-aliases/MapeoDocTables.md @@ -0,0 +1,11 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / MapeoDocTables + +# Type Alias: MapeoDocTables + +> **MapeoDocTables**: [`GetMapeoDocTables`](GetMapeoDocTables.md)\<[`"/home/runner/work/comapeo-core/comapeo-core/src/schema/project"`](../namespaces/home_runner_work_comapeo-core_comapeo-core_src_schema_project/README.md)\> \| [`GetMapeoDocTables`](GetMapeoDocTables.md)\<[`"/home/runner/work/comapeo-core/comapeo-core/src/schema/client"`](../namespaces/home_runner_work_comapeo-core_comapeo-core_src_schema_client/README.md)\> + +Union of Drizzle schema tables that correspond to MapeoDoc types (e.g. excluding backlink tables and other utility tables) diff --git a/docs/api/md/-internal-/type-aliases/MapeoValueMap.md b/docs/api/md/-internal-/type-aliases/MapeoValueMap.md new file mode 100644 index 000000000..8881677af --- /dev/null +++ b/docs/api/md/-internal-/type-aliases/MapeoValueMap.md @@ -0,0 +1,9 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / MapeoValueMap + +# Type Alias: MapeoValueMap + +> **MapeoValueMap**: `{ [K in MapeoValue["schemaName"]]: Extract }` diff --git a/docs/api/md/-internal-/type-aliases/Namespace.md b/docs/api/md/-internal-/type-aliases/Namespace.md new file mode 100644 index 000000000..71dc51462 --- /dev/null +++ b/docs/api/md/-internal-/type-aliases/Namespace.md @@ -0,0 +1,9 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / Namespace + +# Type Alias: Namespace + +> **Namespace**: *typeof* [`NAMESPACES`](../variables/NAMESPACES.md)\[`number`\] diff --git a/docs/api/md/-internal-/type-aliases/NamespaceSchemas.md b/docs/api/md/-internal-/type-aliases/NamespaceSchemas.md new file mode 100644 index 000000000..4db4cd001 --- /dev/null +++ b/docs/api/md/-internal-/type-aliases/NamespaceSchemas.md @@ -0,0 +1,11 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / NamespaceSchemas + +# Type Alias: NamespaceSchemas + +> **NamespaceSchemas**\<\>: *typeof* [`NAMESPACE_SCHEMAS`](../variables/NAMESPACE_SCHEMAS.md) + +## Type Parameters diff --git a/docs/api/md/-internal-/type-aliases/OpenedNetNoiseStream.md b/docs/api/md/-internal-/type-aliases/OpenedNetNoiseStream.md new file mode 100644 index 000000000..ce924052f --- /dev/null +++ b/docs/api/md/-internal-/type-aliases/OpenedNetNoiseStream.md @@ -0,0 +1,11 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / OpenedNetNoiseStream + +# Type Alias: OpenedNetNoiseStream + +> **OpenedNetNoiseStream**\<\>: [`OpenedNoiseStream`](OpenedNoiseStream.md)\<`net.Socket`\> + +## Type Parameters diff --git a/docs/api/md/-internal-/type-aliases/OpenedNoiseStream.md b/docs/api/md/-internal-/type-aliases/OpenedNoiseStream.md new file mode 100644 index 000000000..b99ee814b --- /dev/null +++ b/docs/api/md/-internal-/type-aliases/OpenedNoiseStream.md @@ -0,0 +1,31 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / OpenedNoiseStream + +# Type Alias: OpenedNoiseStream\ + +> **OpenedNoiseStream**\<`T`\>: `NoiseSecretStream`\<`T`\> & `object` + +## Type declaration + +### destroyed + +> **destroyed**: `false` + +### handshake + +> **handshake**: `Buffer` + +### publicKey + +> **publicKey**: `Buffer` + +### remotePublicKey + +> **remotePublicKey**: `Buffer` + +## Type Parameters + +• **T** *extends* [`RawStream`](RawStream.md) = [`RawStream`](RawStream.md) diff --git a/docs/api/md/-internal-/type-aliases/PeerInfoConnected.md b/docs/api/md/-internal-/type-aliases/PeerInfoConnected.md new file mode 100644 index 000000000..664aeef21 --- /dev/null +++ b/docs/api/md/-internal-/type-aliases/PeerInfoConnected.md @@ -0,0 +1,25 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / PeerInfoConnected + +# Type Alias: PeerInfoConnected + +> **PeerInfoConnected**\<\>: [`PeerInfoBase`](../interfaces/PeerInfoBase.md) & `object` + +## Type declaration + +### connectedAt + +> **connectedAt**: `number` + +### protomux + +> **protomux**: [`Protomux`](../classes/Protomux.md)\<`__module`\> + +### status + +> **status**: `"connected"` + +## Type Parameters diff --git a/docs/api/md/-internal-/type-aliases/PeerInfoDisconnected.md b/docs/api/md/-internal-/type-aliases/PeerInfoDisconnected.md new file mode 100644 index 000000000..be0fd7251 --- /dev/null +++ b/docs/api/md/-internal-/type-aliases/PeerInfoDisconnected.md @@ -0,0 +1,21 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / PeerInfoDisconnected + +# Type Alias: PeerInfoDisconnected + +> **PeerInfoDisconnected**\<\>: [`PeerInfoBase`](../interfaces/PeerInfoBase.md) & `object` + +## Type declaration + +### disconnectedAt + +> **disconnectedAt**: `number` + +### status + +> **status**: `"disconnected"` + +## Type Parameters diff --git a/docs/api/md/-internal-/type-aliases/ProjectDataType.md b/docs/api/md/-internal-/type-aliases/ProjectDataType.md new file mode 100644 index 000000000..e41c41936 --- /dev/null +++ b/docs/api/md/-internal-/type-aliases/ProjectDataType.md @@ -0,0 +1,11 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / ProjectDataType + +# Type Alias: ProjectDataType + +> **ProjectDataType**\<\>: [`DataType`](../classes/DataType.md)\<[`DataStore`](../classes/DataStore.md)\<`"config"`\>, *typeof* [`projectSettingsTable`](../namespaces/home_runner_work_comapeo-core_comapeo-core_src_schema_client/variables/projectSettingsTable.md), `"projectSettings"`, `ProjectSettings`, `ProjectSettingsValue`\> + +## Type Parameters diff --git a/docs/api/md/-internal-/type-aliases/ProtocolStream.md b/docs/api/md/-internal-/type-aliases/ProtocolStream.md new file mode 100644 index 000000000..f414afae3 --- /dev/null +++ b/docs/api/md/-internal-/type-aliases/ProtocolStream.md @@ -0,0 +1,15 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / ProtocolStream + +# Type Alias: ProtocolStream + +> **ProtocolStream**: `Omit`\<`NoiseStream`, `"userData"`\> & `object` + +## Type declaration + +### userData + +> **userData**: [`Protomux`](../classes/Protomux.md) diff --git a/docs/api/md/-internal-/type-aliases/PublicKey.md b/docs/api/md/-internal-/type-aliases/PublicKey.md new file mode 100644 index 000000000..081c1f389 --- /dev/null +++ b/docs/api/md/-internal-/type-aliases/PublicKey.md @@ -0,0 +1,11 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / PublicKey + +# Type Alias: PublicKey + +> **PublicKey**: `Buffer` + +32 byte buffer diff --git a/docs/api/md/-internal-/type-aliases/PublicPeerInfo.md b/docs/api/md/-internal-/type-aliases/PublicPeerInfo.md new file mode 100644 index 000000000..afd135e3d --- /dev/null +++ b/docs/api/md/-internal-/type-aliases/PublicPeerInfo.md @@ -0,0 +1,11 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / PublicPeerInfo + +# Type Alias: PublicPeerInfo + +> **PublicPeerInfo**\<\>: `Omit`\<[`"/home/runner/work/comapeo-core/comapeo-core/src/local-peers"`](../namespaces/home_runner_work_comapeo-core_comapeo-core_src_local-peers/README.md), `"protomux"`\> + +## Type Parameters diff --git a/docs/api/md/-internal-/type-aliases/Range.md b/docs/api/md/-internal-/type-aliases/Range.md new file mode 100644 index 000000000..fb90debaa --- /dev/null +++ b/docs/api/md/-internal-/type-aliases/Range.md @@ -0,0 +1,9 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / Range + +# Type Alias: Range + +> **Range**: `object` \| `object` diff --git a/docs/api/md/-internal-/type-aliases/RawStream.md b/docs/api/md/-internal-/type-aliases/RawStream.md new file mode 100644 index 000000000..aab75e510 --- /dev/null +++ b/docs/api/md/-internal-/type-aliases/RawStream.md @@ -0,0 +1,11 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / RawStream + +# Type Alias: RawStream + +> **RawStream**\<\>: `NodeDuplex` \| `StreamxDuplex` + +## Type Parameters diff --git a/docs/api/md/-internal-/type-aliases/ReplicationStream.md b/docs/api/md/-internal-/type-aliases/ReplicationStream.md new file mode 100644 index 000000000..cc3c3fa80 --- /dev/null +++ b/docs/api/md/-internal-/type-aliases/ReplicationStream.md @@ -0,0 +1,15 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / ReplicationStream + +# Type Alias: ReplicationStream + +> **ReplicationStream**: `Duplex` & `object` + +## Type declaration + +### noiseStream + +> **noiseStream**: [`ProtocolStream`](ProtocolStream.md) diff --git a/docs/api/md/-internal-/type-aliases/RoleId.md b/docs/api/md/-internal-/type-aliases/RoleId.md new file mode 100644 index 000000000..985f50f07 --- /dev/null +++ b/docs/api/md/-internal-/type-aliases/RoleId.md @@ -0,0 +1,11 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / RoleId + +# Type Alias: RoleId + +> **RoleId**\<\>: [`ElementOf`](ElementOf.md)\<*typeof* [`ROLE_IDS`](../variables/ROLE_IDS.md)\> + +## Type Parameters diff --git a/docs/api/md/-internal-/type-aliases/SchemaName.md b/docs/api/md/-internal-/type-aliases/SchemaName.md new file mode 100644 index 000000000..ccd9c53ac --- /dev/null +++ b/docs/api/md/-internal-/type-aliases/SchemaName.md @@ -0,0 +1,11 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / SchemaName + +# Type Alias: SchemaName + +> **SchemaName**\<\>: `TTables`\[`"_"`\]\[`"name"`\] + +## Type Parameters diff --git a/docs/api/md/-internal-/type-aliases/SecretKey.md b/docs/api/md/-internal-/type-aliases/SecretKey.md new file mode 100644 index 000000000..ffb9e5952 --- /dev/null +++ b/docs/api/md/-internal-/type-aliases/SecretKey.md @@ -0,0 +1,11 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / SecretKey + +# Type Alias: SecretKey + +> **SecretKey**: `Buffer` + +32 byte buffer diff --git a/docs/api/md/-internal-/type-aliases/State.md b/docs/api/md/-internal-/type-aliases/State.md new file mode 100644 index 000000000..3d1b93a9f --- /dev/null +++ b/docs/api/md/-internal-/type-aliases/State.md @@ -0,0 +1,11 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / State + +# Type Alias: State + +> **State**\<\>: `Record`\<[`Namespace`](Namespace.md), [`"/home/runner/work/comapeo-core/comapeo-core/src/sync/namespace-sync-state"`](../namespaces/home_runner_work_comapeo-core_comapeo-core_src_sync_namespace-sync-state/README.md)\> + +## Type Parameters diff --git a/docs/api/md/-internal-/type-aliases/SupportedBlobVariants.md b/docs/api/md/-internal-/type-aliases/SupportedBlobVariants.md new file mode 100644 index 000000000..664a2a766 --- /dev/null +++ b/docs/api/md/-internal-/type-aliases/SupportedBlobVariants.md @@ -0,0 +1,9 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / SupportedBlobVariants + +# Type Alias: SupportedBlobVariants + +> **SupportedBlobVariants**: *typeof* [`SUPPORTED_BLOB_VARIANTS`](../variables/SUPPORTED_BLOB_VARIANTS.md) diff --git a/docs/api/md/-internal-/type-aliases/SyncCapability.md b/docs/api/md/-internal-/type-aliases/SyncCapability.md new file mode 100644 index 000000000..3fbe811fd --- /dev/null +++ b/docs/api/md/-internal-/type-aliases/SyncCapability.md @@ -0,0 +1,11 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / SyncCapability + +# Type Alias: SyncCapability + +> **SyncCapability**\<\>: [`Role`](../interfaces/Role.md)\[`"sync"`\]\[[`Namespace`](Namespace.md)\] \| `"unknown"` + +## Type Parameters diff --git a/docs/api/md/-internal-/type-aliases/SyncEnabledState.md b/docs/api/md/-internal-/type-aliases/SyncEnabledState.md new file mode 100644 index 000000000..fe608b4ee --- /dev/null +++ b/docs/api/md/-internal-/type-aliases/SyncEnabledState.md @@ -0,0 +1,11 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / SyncEnabledState + +# Type Alias: SyncEnabledState + +> **SyncEnabledState**\<\>: `"none"` \| `"presync"` \| `"all"` + +## Type Parameters diff --git a/docs/api/md/-internal-/type-aliases/SyncType.md b/docs/api/md/-internal-/type-aliases/SyncType.md new file mode 100644 index 000000000..49966d128 --- /dev/null +++ b/docs/api/md/-internal-/type-aliases/SyncType.md @@ -0,0 +1,11 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / SyncType + +# Type Alias: SyncType + +> **SyncType**\<\>: `"initial"` \| `"full"` + +## Type Parameters diff --git a/docs/api/md/-internal-/type-aliases/ValidSizes.md b/docs/api/md/-internal-/type-aliases/ValidSizes.md new file mode 100644 index 000000000..68274a5cd --- /dev/null +++ b/docs/api/md/-internal-/type-aliases/ValidSizes.md @@ -0,0 +1,11 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / ValidSizes + +# Type Alias: ValidSizes + +> **ValidSizes**\<\>: `Exclude`\<[`IconVariant`](IconVariant.md)\[`"size"`\], `"size_unspecified"`\> + +## Type Parameters diff --git a/docs/api/md/-internal-/variables/NAMESPACES.md b/docs/api/md/-internal-/variables/NAMESPACES.md new file mode 100644 index 000000000..e0510af39 --- /dev/null +++ b/docs/api/md/-internal-/variables/NAMESPACES.md @@ -0,0 +1,9 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / NAMESPACES + +# Variable: NAMESPACES + +> `const` **NAMESPACES**: readonly [`"auth"`, `"config"`, `"data"`, `"blobIndex"`, `"blob"`] diff --git a/docs/api/md/-internal-/variables/NAMESPACE_SCHEMAS.md b/docs/api/md/-internal-/variables/NAMESPACE_SCHEMAS.md new file mode 100644 index 000000000..056e3d985 --- /dev/null +++ b/docs/api/md/-internal-/variables/NAMESPACE_SCHEMAS.md @@ -0,0 +1,23 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / NAMESPACE\_SCHEMAS + +# Variable: NAMESPACE\_SCHEMAS + +> `const` **NAMESPACE\_SCHEMAS**: `object` + +## Type declaration + +### auth + +> `readonly` **auth**: readonly [`"coreOwnership"`, `"role"`] + +### config + +> `readonly` **config**: readonly [`"translation"`, `"preset"`, `"field"`, `"projectSettings"`, `"deviceInfo"`, `"icon"`] + +### data + +> `readonly` **data**: readonly [`"observation"`, `"track"`] diff --git a/docs/api/md/-internal-/variables/ROLE_IDS.md b/docs/api/md/-internal-/variables/ROLE_IDS.md new file mode 100644 index 000000000..f3d629f24 --- /dev/null +++ b/docs/api/md/-internal-/variables/ROLE_IDS.md @@ -0,0 +1,9 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / ROLE\_IDS + +# Variable: ROLE\_IDS + +> `const` **ROLE\_IDS**: `Set`\<`"a12a6702b93bd7ff"` \| `"f7c150f5a3a9a855"` \| `"012fd2d431c0bf60"` \| `"9e6d29263cba36c9"` \| `"8ced989b1904606b"` \| `"08e4251e36f6e7ed"`\> diff --git a/docs/api/md/-internal-/variables/SUPPORTED_BLOB_VARIANTS.md b/docs/api/md/-internal-/variables/SUPPORTED_BLOB_VARIANTS.md new file mode 100644 index 000000000..c56a1343f --- /dev/null +++ b/docs/api/md/-internal-/variables/SUPPORTED_BLOB_VARIANTS.md @@ -0,0 +1,23 @@ +[**API**](../../README.md) • **Docs** + +*** + +[API](../../README.md) / [\](../README.md) / SUPPORTED\_BLOB\_VARIANTS + +# Variable: SUPPORTED\_BLOB\_VARIANTS + +> `const` **SUPPORTED\_BLOB\_VARIANTS**: `object` + +## Type declaration + +### audio + +> `readonly` **audio**: readonly [`"original"`] + +### photo + +> `readonly` **photo**: readonly [`"original"`, `"preview"`, `"thumbnail"`] + +### video + +> `readonly` **video**: readonly [`"original"`] diff --git a/docs/api/md/.nojekyll b/docs/api/md/.nojekyll deleted file mode 100644 index e2ac6616a..000000000 --- a/docs/api/md/.nojekyll +++ /dev/null @@ -1 +0,0 @@ -TypeDoc added this file to prevent GitHub Pages from using Jekyll. You can turn off this behavior by setting the `githubPages` option to false. \ No newline at end of file diff --git a/docs/api/md/README.md b/docs/api/md/README.md index 0a40085a5..5591a5b56 100644 --- a/docs/api/md/README.md +++ b/docs/api/md/README.md @@ -1,71 +1,22 @@ -API +**API** • **Docs** -# API +*** -## Table of contents +# API -### Modules +## Modules -- [\](modules/internal_.md) +- [\](-internal-/README.md) -### Classes +## Classes - [FastifyController](classes/FastifyController.md) - [MapeoManager](classes/MapeoManager.md) -### Functions +## Variables -- [MapeoMapsFastifyPlugin](README.md#mapeomapsfastifyplugin) -- [MapeoOfflineFallbackMapFastifyPlugin](README.md#mapeoofflinefallbackmapfastifyplugin) -- [MapeoStaticMapsFastifyPlugin](README.md#mapeostaticmapsfastifyplugin) +- [roles](variables/roles.md) ## Functions -### MapeoMapsFastifyPlugin - -▸ **MapeoMapsFastifyPlugin**(`instance`, `opts`): `Promise`\<`void`\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `instance` | `FastifyInstance`\<`RawServerDefault`, `IncomingMessage`, `ServerResponse`\<`IncomingMessage`\>, `FastifyBaseLogger`, `FastifyTypeProviderDefault`\> | -| `opts` | [`MapsPluginOpts`](interfaces/internal_.MapsPluginOpts.md) | - -#### Returns - -`Promise`\<`void`\> - -___ - -### MapeoOfflineFallbackMapFastifyPlugin - -▸ **MapeoOfflineFallbackMapFastifyPlugin**(`instance`, `opts`): `Promise`\<`void`\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `instance` | `FastifyInstance`\<`RawServerDefault`, `IncomingMessage`, `ServerResponse`\<`IncomingMessage`\>, `FastifyBaseLogger`, `FastifyTypeProviderDefault`\> | -| `opts` | [`OfflineFallbackMapPluginOpts`](interfaces/internal_.OfflineFallbackMapPluginOpts.md) | - -#### Returns - -`Promise`\<`void`\> - -___ - -### MapeoStaticMapsFastifyPlugin - -▸ **MapeoStaticMapsFastifyPlugin**(`instance`, `opts`): `Promise`\<`void`\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `instance` | `FastifyInstance`\<`RawServerDefault`, `IncomingMessage`, `ServerResponse`\<`IncomingMessage`\>, `FastifyBaseLogger`, `FastifyTypeProviderDefault`\> | -| `opts` | [`StaticMapsPluginOpts`](interfaces/internal_.StaticMapsPluginOpts.md) | - -#### Returns - -`Promise`\<`void`\> +- [CoMapeoMapsFastifyPlugin](functions/CoMapeoMapsFastifyPlugin.md) diff --git a/docs/api/md/classes/FastifyController.md b/docs/api/md/classes/FastifyController.md index 08b12c9e4..c9b2abf3b 100644 --- a/docs/api/md/classes/FastifyController.md +++ b/docs/api/md/classes/FastifyController.md @@ -1,31 +1,22 @@ -[API](../README.md) / FastifyController - -# Class: FastifyController - -## Table of contents +[**API**](../README.md) • **Docs** -### Constructors +*** -- [constructor](FastifyController.md#constructor) - -### Methods +[API](../README.md) / FastifyController -- [start](FastifyController.md#start) -- [started](FastifyController.md#started) -- [stop](FastifyController.md#stop) +# Class: FastifyController ## Constructors -### constructor +### new FastifyController() -• **new FastifyController**(`opts`): [`FastifyController`](FastifyController.md) +> **new FastifyController**(`opts`): [`FastifyController`](FastifyController.md) #### Parameters -| Name | Type | -| :------ | :------ | -| `opts` | `Object` | -| `opts.fastify` | `FastifyInstance`\<`RawServerDefault`, `IncomingMessage`, `ServerResponse`\<`IncomingMessage`\>, `FastifyBaseLogger`, `FastifyTypeProviderDefault`\> | +• **opts** + +• **opts.fastify**: `FastifyInstance`\<`RawServerDefault`, `IncomingMessage`, `ServerResponse`\<`IncomingMessage`\>, `FastifyBaseLogger`, `FastifyTypeProviderDefault`\> #### Returns @@ -33,35 +24,33 @@ ## Methods -### start +### start() -▸ **start**(`opts?`): `Promise`\<`void`\> +> **start**(`opts`?): `Promise`\<`void`\> #### Parameters -| Name | Type | -| :------ | :------ | -| `opts?` | [`StartOpts`](../interfaces/internal_.StartOpts.md) | +• **opts?**: [`StartOpts`](../-internal-/interfaces/StartOpts.md) #### Returns `Promise`\<`void`\> -___ +*** -### started +### started() -▸ **started**(): `Promise`\<`void`\> +> **started**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> -___ +*** -### stop +### stop() -▸ **stop**(): `Promise`\<`void`\> +> **stop**(): `Promise`\<`void`\> #### Returns diff --git a/docs/api/md/classes/MapeoManager.md b/docs/api/md/classes/MapeoManager.md index 58c47bd59..cdf2033b3 100644 --- a/docs/api/md/classes/MapeoManager.md +++ b/docs/api/md/classes/MapeoManager.md @@ -1,60 +1,62 @@ +[**API**](../README.md) • **Docs** + +*** + [API](../README.md) / MapeoManager # Class: MapeoManager -## Hierarchy +## Extends - `TypedEmitter` - ↳ **`MapeoManager`** +## Constructors -## Table of contents +### new MapeoManager() -### Constructors +> **new MapeoManager**(`opts`): [`MapeoManager`](MapeoManager.md) -- [constructor](MapeoManager.md#constructor) +#### Parameters -### Accessors +• **opts** -- [[kRPC]](MapeoManager.md#[krpc]) -- [deviceId](MapeoManager.md#deviceid) -- [invite](MapeoManager.md#invite) +• **opts.clientMigrationsFolder**: `string` -### Methods +path for drizzle migrations folder for client database -- [[kManagerReplicate]](MapeoManager.md#[kmanagerreplicate]) -- [addProject](MapeoManager.md#addproject) -- [connectPeer](MapeoManager.md#connectpeer) -- [createProject](MapeoManager.md#createproject) -- [getDeviceInfo](MapeoManager.md#getdeviceinfo) -- [getMapStyleJsonUrl](MapeoManager.md#getmapstylejsonurl) -- [getProject](MapeoManager.md#getproject) -- [leaveProject](MapeoManager.md#leaveproject) -- [listLocalPeers](MapeoManager.md#listlocalpeers) -- [listProjects](MapeoManager.md#listprojects) -- [setDeviceInfo](MapeoManager.md#setdeviceinfo) -- [startLocalPeerDiscoveryServer](MapeoManager.md#startlocalpeerdiscoveryserver) -- [stopLocalPeerDiscoveryServer](MapeoManager.md#stoplocalpeerdiscoveryserver) +• **opts.coreStorage**: `string` \| [`CoreStorage`](../-internal-/type-aliases/CoreStorage.md) -## Constructors +Folder for hypercore storage or a function that returns a RandomAccessStorage instance -### constructor +• **opts.customMapPath**: `undefined` \| `string` -• **new MapeoManager**(`opts`): [`MapeoManager`](MapeoManager.md) +File path to a locally stored Styled Map Package (SMP). -#### Parameters +• **opts.dbFolder**: `string` + +Folder for sqlite Dbs. Folder must exist. Use ':memory:' to store everything in-memory + +• **opts.defaultConfigPath**: `undefined` \| `string` + +• **opts.defaultOnlineStyleUrl**: `undefined` \| `string` = `DEFAULT_ONLINE_STYLE_URL` + +URL for an online-hosted StyleJSON asset. + +• **opts.fallbackMapPath**: `undefined` \| `string` = `DEFAULT_FALLBACK_MAP_FILE_PATH` + +File path to a locally stored Styled Map Package (SMP) + +• **opts.fastify**: `FastifyInstance`\<`RawServerDefault`, `IncomingMessage`, `ServerResponse`\<`IncomingMessage`\>, `FastifyBaseLogger`, `FastifyTypeProviderDefault`\> + +Fastify server instance -| Name | Type | Description | -| :------ | :------ | :------ | -| `opts` | `Object` | | -| `opts.clientMigrationsFolder` | `string` | path for drizzle migrations folder for client database | -| `opts.coreStorage` | `string` \| [`CoreStorage`](../modules/internal_.md#corestorage) | Folder for hypercore storage or a function that returns a RandomAccessStorage instance | -| `opts.dbFolder` | `string` | Folder for sqlite Dbs. Folder must exist. Use ':memory:' to store everything in-memory | -| `opts.defaultConfigPath` | `undefined` \| `string` | | -| `opts.deviceType` | `undefined` \| `DeviceInfo_DeviceType` | Device type, shared with local peers and project members | -| `opts.fastify` | `FastifyInstance`\<`RawServerDefault`, `IncomingMessage`, `ServerResponse`\<`IncomingMessage`\>, `FastifyBaseLogger`, `FastifyTypeProviderDefault`\> | Fastify server instance | -| `opts.projectMigrationsFolder` | `string` | path for drizzle migrations folder for project database | -| `opts.rootKey` | `Buffer` | 16-bytes of random data that uniquely identify the device, used to derive a 32-byte master key, which is used to derive all the keypairs used for Mapeo | +• **opts.projectMigrationsFolder**: `string` + +path for drizzle migrations folder for project database + +• **opts.rootKey**: `Buffer` + +16-bytes of random data that uniquely identify the device, used to derive a 32-byte master key, which is used to derive all the keypairs used for Mapeo #### Returns @@ -62,45 +64,45 @@ #### Overrides -TypedEmitter.constructor +`TypedEmitter.constructor` ## Accessors -### [kRPC] +### \[kRPC\] -• `get` **[kRPC]**(): [`LocalPeers`](internal_.LocalPeers.md) +> `get` **\[kRPC\]**(): [`LocalPeers`](../-internal-/classes/LocalPeers.md) MapeoRPC instance, used for tests #### Returns -[`LocalPeers`](internal_.LocalPeers.md) +[`LocalPeers`](../-internal-/classes/LocalPeers.md) -___ +*** ### deviceId -• `get` **deviceId**(): `string` +> `get` **deviceId**(): `string` #### Returns `string` -___ +*** ### invite -• `get` **invite**(): [`InviteApi`](internal_.InviteApi.md) +> `get` **invite**(): [`InviteApi`](../-internal-/classes/InviteApi.md) #### Returns -[`InviteApi`](internal_.InviteApi.md) +[`InviteApi`](../-internal-/classes/InviteApi.md) ## Methods -### [kManagerReplicate] +### \[kManagerReplicate\]() -▸ **[kManagerReplicate]**(`isInitiator`): [`ReplicationStream`](../modules/internal_.md#replicationstream) +> **\[kManagerReplicate\]**(`isInitiator`): [`ReplicationStream`](../-internal-/type-aliases/ReplicationStream.md) Create a Mapeo replication stream. This replication connects the Mapeo RPC channel and allows invites. All active projects will sync automatically to @@ -110,19 +112,17 @@ connecting RPC, use project[kProjectReplication]. #### Parameters -| Name | Type | -| :------ | :------ | -| `isInitiator` | `boolean` | +• **isInitiator**: `boolean` #### Returns -[`ReplicationStream`](../modules/internal_.md#replicationstream) +[`ReplicationStream`](../-internal-/type-aliases/ReplicationStream.md) -___ +*** -### addProject +### addProject() -▸ **addProject**(`projectJoinDetails`, `opts?`): `Promise`\<`string`\> +> **addProject**(`projectJoinDetails`, `opts`?): `Promise`\<`string`\> Add a project to this device. After adding a project the client should await `project.$waitForInitialSync()` to ensure that the device has @@ -130,49 +130,51 @@ downloaded their proof of project membership and the project config. #### Parameters -| Name | Type | Default value | Description | -| :------ | :------ | :------ | :------ | -| `projectJoinDetails` | `Pick`\<`ProjectJoinDetails`, ``"projectKey"`` \| ``"encryptionKeys"``\> & \{ `projectName`: `string` } | `undefined` | | -| `opts?` | `Object` | `{}` | For internal use in tests, set opts.waitForSync = false to not wait for sync during addProject() | -| `opts.waitForSync?` | `boolean` | `true` | - | +• **projectJoinDetails**: `Pick`\<`ProjectJoinDetails`, `"projectKey"` \| `"encryptionKeys"`\> & `object` + +• **opts?** = `{}` + +For internal use in tests, set opts.waitForSync = false to not wait for sync during addProject() + +• **opts.waitForSync?**: `boolean` = `true` #### Returns `Promise`\<`string`\> -___ +*** -### connectPeer +### connectLocalPeer() -▸ **connectPeer**(`peer`): `void` +> **connectLocalPeer**(`peer`): `void` #### Parameters -| Name | Type | -| :------ | :------ | -| `peer` | `Object` | -| `peer.address` | `string` | -| `peer.name` | `string` | -| `peer.port` | `number` | +• **peer** + +• **peer.address**: `string` + +• **peer.name**: `string` + +• **peer.port**: `number` #### Returns `void` -___ +*** -### createProject +### createProject() -▸ **createProject**(`options?`): `Promise`\<`string`\> +> **createProject**(`options`?): `Promise`\<`string`\> Create a new project. #### Parameters -| Name | Type | -| :------ | :------ | -| `options?` | `Object` | -| `options.configPath?` | `string` | +• **options?** = `{}` + +• **options.configPath?**: `string` = `...` #### Returns @@ -180,115 +182,151 @@ Create a new project. Project public id -___ +*** -### getDeviceInfo +### getDeviceInfo() -▸ **getDeviceInfo**(): \{ `deviceId`: `string` } & `Partial`\<[`DeviceInfoParam`](../modules/internal_.md#deviceinfoparam)\> +> **getDeviceInfo**(): `object` & `Partial`\<[`DeviceInfoParam`](../-internal-/type-aliases/DeviceInfoParam.md)\> #### Returns -\{ `deviceId`: `string` } & `Partial`\<[`DeviceInfoParam`](../modules/internal_.md#deviceinfoparam)\> +`object` & `Partial`\<[`DeviceInfoParam`](../-internal-/type-aliases/DeviceInfoParam.md)\> -___ +*** -### getMapStyleJsonUrl +### getMapStyleJsonUrl() -▸ **getMapStyleJsonUrl**(): `Promise`\<`string`\> +> **getMapStyleJsonUrl**(): `Promise`\<`string`\> #### Returns `Promise`\<`string`\> -___ +*** -### getProject +### getProject() -▸ **getProject**(`projectPublicId`): `Promise`\<[`MapeoProject`](internal_.MapeoProject.md)\> +> **getProject**(`projectPublicId`): `Promise`\<[`MapeoProject`](../-internal-/classes/MapeoProject.md)\> #### Parameters -| Name | Type | -| :------ | :------ | -| `projectPublicId` | `string` | +• **projectPublicId**: `string` #### Returns -`Promise`\<[`MapeoProject`](internal_.MapeoProject.md)\> +`Promise`\<[`MapeoProject`](../-internal-/classes/MapeoProject.md)\> -___ +*** -### leaveProject +### leaveProject() -▸ **leaveProject**(`projectPublicId`): `Promise`\<`void`\> +> **leaveProject**(`projectPublicId`): `Promise`\<`void`\> #### Parameters -| Name | Type | -| :------ | :------ | -| `projectPublicId` | `string` | +• **projectPublicId**: `string` #### Returns `Promise`\<`void`\> -___ +*** + +### listLocalPeers() + +> **listLocalPeers**(): `Promise`\<[`PublicPeerInfo`](../-internal-/type-aliases/PublicPeerInfo.md)[]\> + +#### Returns + +`Promise`\<[`PublicPeerInfo`](../-internal-/type-aliases/PublicPeerInfo.md)[]\> -### listLocalPeers +*** -▸ **listLocalPeers**(): `Promise`\<[`PublicPeerInfo`](../modules/internal_.md#publicpeerinfo)[]\> +### listProjects() + +> **listProjects**(): `Promise`\<`Pick`\<`object`, `"name"`\> & `object`[]\> #### Returns -`Promise`\<[`PublicPeerInfo`](../modules/internal_.md#publicpeerinfo)[]\> +`Promise`\<`Pick`\<`object`, `"name"`\> & `object`[]\> + +*** -___ +### onBackgrounded() -### listProjects +> **onBackgrounded**(): `void` -▸ **listProjects**(): `Promise`\<`Pick`\<{}, ``"name"``\> & \{ `createdAt?`: `string` ; `projectId`: `string` ; `updatedAt?`: `string` }[]\> +Call this when the app goes into the background. + +Will gracefully shut down sync. #### Returns -`Promise`\<`Pick`\<{}, ``"name"``\> & \{ `createdAt?`: `string` ; `projectId`: `string` ; `updatedAt?`: `string` }[]\> +`void` + +#### See -___ +[onForegrounded](MapeoManager.md#onforegrounded) -### setDeviceInfo +*** -▸ **setDeviceInfo**\<`T`\>(`deviceInfo`): `Promise`\<`void`\> +### onForegrounded() + +> **onForegrounded**(): `void` + +Call this when the app goes into the foreground. + +Will undo the effects of `onBackgrounded`. + +#### Returns + +`void` -#### Type parameters +#### See -| Name | Type | -| :------ | :------ | -| `T` | extends [`DeviceInfoParam`](../modules/internal_.md#deviceinfoparam) \| `ExactObject`\<[`DeviceInfoParam`](../modules/internal_.md#deviceinfoparam), `T`\> | +[onBackgrounded](MapeoManager.md#onbackgrounded) + +*** + +### setDeviceInfo() + +> **setDeviceInfo**\<`T`\>(`deviceInfo`): `Promise`\<`void`\> + +#### Type Parameters + +• **T** *extends* [`DeviceInfoParam`](../-internal-/type-aliases/DeviceInfoParam.md) & `object` \| `ExactObject`\<[`DeviceInfoParam`](../-internal-/type-aliases/DeviceInfoParam.md) & `object`, `T`\> #### Parameters -| Name | Type | -| :------ | :------ | -| `deviceInfo` | `T` | +• **deviceInfo**: `T` #### Returns `Promise`\<`void`\> -___ +*** -### startLocalPeerDiscoveryServer +### startLocalPeerDiscoveryServer() -▸ **startLocalPeerDiscoveryServer**(): `Promise`\<\{ `name`: `string` ; `port`: `number` }\> +> **startLocalPeerDiscoveryServer**(): `Promise`\<`object`\> #### Returns -`Promise`\<\{ `name`: `string` ; `port`: `number` }\> +`Promise`\<`object`\> + +##### name + +> **name**: `string` -___ +##### port -### stopLocalPeerDiscoveryServer +> **port**: `number` -▸ **stopLocalPeerDiscoveryServer**(`opts?`): `Promise`\<`void`\> +*** + +### stopLocalPeerDiscoveryServer() + +> **stopLocalPeerDiscoveryServer**(`opts`?): `Promise`\<`void`\> Close all servers and stop multicast advertising and browsing. Will wait for open sockets to close unless opts.force=true in which case open sockets @@ -296,11 +334,15 @@ are force-closed after opts.timeout milliseconds #### Parameters -| Name | Type | Description | -| :------ | :------ | :------ | -| `opts?` | `Object` | | -| `opts.force` | `undefined` \| `boolean` | Force-close open sockets after timeout milliseconds | -| `opts.timeout` | `undefined` \| `number` | Optional timeout when calling stop() with force=true | +• **opts?** + +• **opts.force?**: `undefined` \| `boolean` + +Force-close open sockets after timeout milliseconds + +• **opts.timeout?**: `undefined` \| `number` + +Optional timeout when calling stop() with force=true #### Returns diff --git a/docs/api/md/classes/internal_.BigSparseArray.md b/docs/api/md/classes/internal_.BigSparseArray.md deleted file mode 100644 index f05acfb14..000000000 --- a/docs/api/md/classes/internal_.BigSparseArray.md +++ /dev/null @@ -1,81 +0,0 @@ -[API](../README.md) / [\](../modules/internal_.md) / BigSparseArray - -# Class: BigSparseArray\ - -[\](../modules/internal_.md).BigSparseArray - -## Type parameters - -| Name | -| :------ | -| `T` | - -## Table of contents - -### Constructors - -- [constructor](internal_.BigSparseArray.md#constructor) - -### Properties - -- [maxLength](internal_.BigSparseArray.md#maxlength) - -### Methods - -- [get](internal_.BigSparseArray.md#get) -- [set](internal_.BigSparseArray.md#set) - -## Constructors - -### constructor - -• **new BigSparseArray**\<`T`\>(): [`BigSparseArray`](internal_.BigSparseArray.md)\<`T`\> - -#### Type parameters - -| Name | -| :------ | -| `T` | - -#### Returns - -[`BigSparseArray`](internal_.BigSparseArray.md)\<`T`\> - -## Properties - -### maxLength - -• `Readonly` **maxLength**: `number` - -## Methods - -### get - -▸ **get**(`index`): `undefined` \| `T` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `index` | `number` | - -#### Returns - -`undefined` \| `T` - -___ - -### set - -▸ **set**(`index`, `value`): `T` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `index` | `number` | -| `value` | `T` | - -#### Returns - -`T` diff --git a/docs/api/md/classes/internal_.BlobApi.md b/docs/api/md/classes/internal_.BlobApi.md deleted file mode 100644 index d1b55a0cb..000000000 --- a/docs/api/md/classes/internal_.BlobApi.md +++ /dev/null @@ -1,75 +0,0 @@ -[API](../README.md) / [\](../modules/internal_.md) / BlobApi - -# Class: BlobApi - -[\](../modules/internal_.md).BlobApi - -## Table of contents - -### Constructors - -- [constructor](internal_.BlobApi.md#constructor) - -### Methods - -- [create](internal_.BlobApi.md#create) -- [getUrl](internal_.BlobApi.md#geturl) - -## Constructors - -### constructor - -• **new BlobApi**(`options`): [`BlobApi`](internal_.BlobApi.md) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `options` | `Object` | -| `options.blobStore` | [`BlobStore`](internal_.BlobStore.md) | -| `options.getMediaBaseUrl` | () => `Promise`\<`string`\> | - -#### Returns - -[`BlobApi`](internal_.BlobApi.md) - -## Methods - -### create - -▸ **create**(`filepaths`, `metadata`): `Promise`\<\{ `driveId`: `string` ; `hash`: `string` ; `name`: `string` ; `type`: ``"photo"`` \| ``"audio"`` \| ``"video"`` }\> - -Write blobs for provided variants of a file - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `filepaths` | `Object` | -| `filepaths.original` | `string` | -| `filepaths.preview?` | `string` | -| `filepaths.thumbnail?` | `string` | -| `metadata` | `Object` | -| `metadata.mimeType` | `string` | - -#### Returns - -`Promise`\<\{ `driveId`: `string` ; `hash`: `string` ; `name`: `string` ; `type`: ``"photo"`` \| ``"audio"`` \| ``"video"`` }\> - -___ - -### getUrl - -▸ **getUrl**(`blobId`): `Promise`\<`string`\> - -Get a url for a blob based on its BlobId - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `blobId` | [`BlobId`](../modules/internal_.md#blobid-1) | - -#### Returns - -`Promise`\<`string`\> diff --git a/docs/api/md/classes/internal_.BlobReadStream.md b/docs/api/md/classes/internal_.BlobReadStream.md deleted file mode 100644 index 3b89bf57e..000000000 --- a/docs/api/md/classes/internal_.BlobReadStream.md +++ /dev/null @@ -1,37 +0,0 @@ -[API](../README.md) / [\](../modules/internal_.md) / BlobReadStream - -# Class: BlobReadStream - -[\](../modules/internal_.md).BlobReadStream - -## Hierarchy - -- `Readable` - - ↳ **`BlobReadStream`** - -## Table of contents - -### Constructors - -- [constructor](internal_.BlobReadStream.md#constructor) - -## Constructors - -### constructor - -• **new BlobReadStream**(`opts`): [`BlobReadStream`](internal_.BlobReadStream.md) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `opts` | `any` | - -#### Returns - -[`BlobReadStream`](internal_.BlobReadStream.md) - -#### Overrides - -Readable.constructor diff --git a/docs/api/md/classes/internal_.BlobStore.md b/docs/api/md/classes/internal_.BlobStore.md deleted file mode 100644 index ec6d54419..000000000 --- a/docs/api/md/classes/internal_.BlobStore.md +++ /dev/null @@ -1,237 +0,0 @@ -[API](../README.md) / [\](../modules/internal_.md) / BlobStore - -# Class: BlobStore - -[\](../modules/internal_.md).BlobStore - -## Table of contents - -### Constructors - -- [constructor](internal_.BlobStore.md#constructor) - -### Accessors - -- [writerDriveId](internal_.BlobStore.md#writerdriveid) - -### Methods - -- [clear](internal_.BlobStore.md#clear) -- [createEntryReadStream](internal_.BlobStore.md#createentryreadstream) -- [createReadStream](internal_.BlobStore.md#createreadstream) -- [createWriteStream](internal_.BlobStore.md#createwritestream) -- [download](internal_.BlobStore.md#download) -- [entry](internal_.BlobStore.md#entry) -- [get](internal_.BlobStore.md#get) -- [getEntryBlob](internal_.BlobStore.md#getentryblob) -- [put](internal_.BlobStore.md#put) - -## Constructors - -### constructor - -• **new BlobStore**(`options`): [`BlobStore`](internal_.BlobStore.md) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `options` | `Object` | -| `options.coreManager` | [`CoreManager`](internal_.CoreManager.md) | - -#### Returns - -[`BlobStore`](internal_.BlobStore.md) - -## Accessors - -### writerDriveId - -• `get` **writerDriveId**(): `string` - -#### Returns - -`string` - -## Methods - -### clear - -▸ **clear**(`blobId`, `options?`): `Promise`\<``null`` \| \{ `blocks`: `number` }\> - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `blobId` | [`BlobId`](../modules/internal_.md#blobid-1) | | -| `options?` | `Object` | | -| `options.diff` | `undefined` \| `boolean` | Enable to return an object with a `block` property with number of bytes removed | - -#### Returns - -`Promise`\<``null`` \| \{ `blocks`: `number` }\> - -___ - -### createEntryReadStream - -▸ **createEntryReadStream**(`driveId`, `entry`, `options?`): `Promise`\<[`BlobReadStream`](internal_.BlobReadStream.md)\> - -Optimization for creating the blobs read stream when you have -previously read the entry from Hyperdrive using `drive.entry` - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `driveId` | `string` | Hyperdrive drive discovery id | -| `entry` | [`HyperdriveEntry`](../interfaces/internal_.Hyperdrive.HyperdriveEntry.md) | Hyperdrive entry | -| `options?` | `Object` | | -| `options.wait` | `undefined` \| `boolean` | Set to `true` to wait for a blob to download, otherwise will throw if blob is not available locally | - -#### Returns - -`Promise`\<[`BlobReadStream`](internal_.BlobReadStream.md)\> - -___ - -### createReadStream - -▸ **createReadStream**(`blobId`, `options?`): `Readable`\<`any`, `any`, `any`, ``true``, ``false``, `ReadableEvents`\<`any`\>\> - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `blobId` | [`BlobId`](../modules/internal_.md#blobid-1) | | -| `options?` | `Object` | | -| `options.timeout` | `undefined` \| `number` | Optional timeout to wait for a blob to download | -| `options.wait` | `undefined` \| `boolean` | Set to `true` to wait for a blob to download, otherwise will throw if blob is not available locally | - -#### Returns - -`Readable`\<`any`, `any`, `any`, ``true``, ``false``, `ReadableEvents`\<`any`\>\> - -___ - -### createWriteStream - -▸ **createWriteStream**(`blobId`, `options?`): `Writable`\<`any`, `any`, `any`, ``false``, ``true``, `WritableEvents`\<`any`\>\> & \{ `driveId`: `string` } - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `blobId` | `Omit`\<[`BlobId`](../modules/internal_.md#blobid-1), ``"driveId"``\> | | -| `options?` | `Object` | | -| `options.metadata` | `undefined` \| \{ `mimeType`: `string` } | Metadata to store with the blob | - -#### Returns - -`Writable`\<`any`, `any`, `any`, ``false``, ``true``, `WritableEvents`\<`any`\>\> & \{ `driveId`: `string` } - -___ - -### download - -▸ **download**(`filter?`, `options?`): [`LiveDownload`](internal_.LiveDownload.md) - -Download blobs from all drives, optionally filtering particular blob types -or blob variants. Download will be 'live' and will continue downloading new -data as it becomes available from any replicating drive. - -If no filter is specified, all blobs will be downloaded. If a filter is -specified, then _only_ blobs that match the filter will be downloaded. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `filter?` | [`BlobFilter`](../modules/internal_.md#blobfilter) | Filter blob types and/or variants to download. Filter is { [BlobType]: BlobVariants[] }. At least one blob variant must be specified for each blob type. | -| `options` | `Object` | | -| `options.signal` | `undefined` \| `AbortSignal` | Optional AbortSignal to cancel in-progress download | - -#### Returns - -[`LiveDownload`](internal_.LiveDownload.md) - -EventEmitter with `.state` propery, emits `state` with new state when it updates - -___ - -### entry - -▸ **entry**(`blobId`, `options?`): `Promise`\<``null`` \| [`HyperdriveEntry`](../interfaces/internal_.Hyperdrive.HyperdriveEntry.md)\> - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `blobId` | [`BlobId`](../modules/internal_.md#blobid-1) | | -| `options?` | `Object` | | -| `options.follow` | `undefined` \| `boolean` | Set to `true` to follow symlinks (16 max or throws an error) | -| `options.timeout` | `undefined` | Optional timeout to wait for a blob to download | -| `options.wait` | `undefined` \| ``false`` | Set to `true` to wait for a blob to download, otherwise will throw if blob is not available locally | - -#### Returns - -`Promise`\<``null`` \| [`HyperdriveEntry`](../interfaces/internal_.Hyperdrive.HyperdriveEntry.md)\> - -___ - -### get - -▸ **get**(`blobId`, `opts?`): `Promise`\<`Buffer`\> - -#### Parameters - -| Name | Type | Default value | Description | -| :------ | :------ | :------ | :------ | -| `blobId` | [`BlobId`](../modules/internal_.md#blobid-1) | `undefined` | | -| `opts` | `Object` | `{}` | | -| `opts.timeout` | `undefined` | `undefined` | Optional timeout to wait for a blob to download | -| `opts.wait` | `undefined` \| ``false`` | `false` | Set to `true` to wait for a blob to download, otherwise will throw if blob is not available locally | - -#### Returns - -`Promise`\<`Buffer`\> - -___ - -### getEntryBlob - -▸ **getEntryBlob**(`driveId`, `entry`, `opts?`): `Promise`\<``null`` \| `Buffer`\> - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `driveId` | `string` | Hyperdrive drive id | -| `entry` | [`HyperdriveEntry`](../interfaces/internal_.Hyperdrive.HyperdriveEntry.md) | Hyperdrive entry | -| `opts?` | `Object` | | -| `opts.length` | `undefined` \| `number` | | - -#### Returns - -`Promise`\<``null`` \| `Buffer`\> - -___ - -### put - -▸ **put**(`blobId`, `blob`, `options?`): `Promise`\<`string`\> - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `blobId` | `Omit`\<[`BlobId`](../modules/internal_.md#blobid-1), ``"driveId"``\> | | -| `blob` | `Buffer` | | -| `options?` | `Object` | | -| `options.metadata` | `undefined` \| \{ `mimeType`: `string` } | Metadata to store with the blob | - -#### Returns - -`Promise`\<`string`\> - -discovery key as hex string of hyperdrive where blob is stored diff --git a/docs/api/md/classes/internal_.BlobWriteStream.md b/docs/api/md/classes/internal_.BlobWriteStream.md deleted file mode 100644 index 879c76328..000000000 --- a/docs/api/md/classes/internal_.BlobWriteStream.md +++ /dev/null @@ -1,37 +0,0 @@ -[API](../README.md) / [\](../modules/internal_.md) / BlobWriteStream - -# Class: BlobWriteStream - -[\](../modules/internal_.md).BlobWriteStream - -## Hierarchy - -- `Writable` - - ↳ **`BlobWriteStream`** - -## Table of contents - -### Constructors - -- [constructor](internal_.BlobWriteStream.md#constructor) - -## Constructors - -### constructor - -• **new BlobWriteStream**(`opts`): [`BlobWriteStream`](internal_.BlobWriteStream.md) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `opts` | `any` | - -#### Returns - -[`BlobWriteStream`](internal_.BlobWriteStream.md) - -#### Overrides - -Writable.constructor diff --git a/docs/api/md/classes/internal_.CoreIndex.md b/docs/api/md/classes/internal_.CoreIndex.md deleted file mode 100644 index 8d18f096a..000000000 --- a/docs/api/md/classes/internal_.CoreIndex.md +++ /dev/null @@ -1,137 +0,0 @@ -[API](../README.md) / [\](../modules/internal_.md) / CoreIndex - -# Class: CoreIndex - -[\](../modules/internal_.md).CoreIndex - -An in-memory index of open cores. - -## Table of contents - -### Constructors - -- [constructor](internal_.CoreIndex.md#constructor) - -### Methods - -- [[iterator]](internal_.CoreIndex.md#[iterator]) -- [add](internal_.CoreIndex.md#add) -- [getByCoreKey](internal_.CoreIndex.md#getbycorekey) -- [getByDiscoveryId](internal_.CoreIndex.md#getbydiscoveryid) -- [getByNamespace](internal_.CoreIndex.md#getbynamespace) -- [getWriter](internal_.CoreIndex.md#getwriter) - -## Constructors - -### constructor - -• **new CoreIndex**(): [`CoreIndex`](internal_.CoreIndex.md) - -#### Returns - -[`CoreIndex`](internal_.CoreIndex.md) - -## Methods - -### [iterator] - -▸ **[iterator]**(): `IterableIterator`\<[`CoreRecord`](../modules/internal_.md#corerecord)\> - -#### Returns - -`IterableIterator`\<[`CoreRecord`](../modules/internal_.md#corerecord)\> - -___ - -### add - -▸ **add**(`options`): `void` - -NB. Need to pass key here because `core.key` is not populated until the -core is ready, but we know it beforehand. - -#### Parameters - -| Name | Type | Default value | Description | -| :------ | :------ | :------ | :------ | -| `options` | `Object` | `undefined` | | -| `options.core` | `Hypercore`\<``"binary"``, `Buffer`\> | `undefined` | Hypercore instance | -| `options.key` | `Buffer` | `undefined` | Buffer containing public key of this core | -| `options.namespace` | ``"blob"`` \| ``"auth"`` \| ``"config"`` \| ``"data"`` \| ``"blobIndex"`` | `undefined` | | -| `options.writer` | `undefined` \| `boolean` | `false` | Is this a writer core? | - -#### Returns - -`void` - -___ - -### getByCoreKey - -▸ **getByCoreKey**(`coreKey`): `undefined` \| [`CoreRecord`](../modules/internal_.md#corerecord) - -Get a core by its public key - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `coreKey` | `Buffer` | - -#### Returns - -`undefined` \| [`CoreRecord`](../modules/internal_.md#corerecord) - -___ - -### getByDiscoveryId - -▸ **getByDiscoveryId**(`discoveryId`): `undefined` \| [`CoreRecord`](../modules/internal_.md#corerecord) - -Get a core by its discoveryId (discover key as hex string) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `discoveryId` | `string` | - -#### Returns - -`undefined` \| [`CoreRecord`](../modules/internal_.md#corerecord) - -___ - -### getByNamespace - -▸ **getByNamespace**(`namespace`): [`CoreRecord`](../modules/internal_.md#corerecord)[] - -Get all known cores in a namespace - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `namespace` | ``"blob"`` \| ``"auth"`` \| ``"config"`` \| ``"data"`` \| ``"blobIndex"`` | - -#### Returns - -[`CoreRecord`](../modules/internal_.md#corerecord)[] - -___ - -### getWriter - -▸ **getWriter**(`namespace`): [`CoreRecord`](../modules/internal_.md#corerecord) - -Get the write core for the given namespace - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `namespace` | ``"blob"`` \| ``"auth"`` \| ``"config"`` \| ``"data"`` \| ``"blobIndex"`` | - -#### Returns - -[`CoreRecord`](../modules/internal_.md#corerecord) diff --git a/docs/api/md/classes/internal_.CoreManager.md b/docs/api/md/classes/internal_.CoreManager.md deleted file mode 100644 index acc31587c..000000000 --- a/docs/api/md/classes/internal_.CoreManager.md +++ /dev/null @@ -1,265 +0,0 @@ -[API](../README.md) / [\](../modules/internal_.md) / CoreManager - -# Class: CoreManager - -[\](../modules/internal_.md).CoreManager - -## Hierarchy - -- `TypedEmitter` - - ↳ **`CoreManager`** - -## Table of contents - -### Constructors - -- [constructor](internal_.CoreManager.md#constructor) - -### Accessors - -- [creatorCore](internal_.CoreManager.md#creatorcore) -- [deviceId](internal_.CoreManager.md#deviceid) -- [namespaces](internal_.CoreManager.md#namespaces) - -### Methods - -- [[kCoreManagerReplicate]](internal_.CoreManager.md#[kcoremanagerreplicate]) -- [addCore](internal_.CoreManager.md#addcore) -- [close](internal_.CoreManager.md#close) -- [deleteOthersData](internal_.CoreManager.md#deleteothersdata) -- [getCoreByDiscoveryKey](internal_.CoreManager.md#getcorebydiscoverykey) -- [getCoreByKey](internal_.CoreManager.md#getcorebykey) -- [getCores](internal_.CoreManager.md#getcores) -- [getWriterCore](internal_.CoreManager.md#getwritercore) -- [ready](internal_.CoreManager.md#ready) -- [requestCoreKey](internal_.CoreManager.md#requestcorekey) - -## Constructors - -### constructor - -• **new CoreManager**(`options`): [`CoreManager`](internal_.CoreManager.md) - -#### Parameters - -| Name | Type | Default value | Description | -| :------ | :------ | :------ | :------ | -| `options` | `Object` | `undefined` | | -| `options.autoDownload` | `undefined` \| `boolean` | `true` | Immediately start downloading cores - should only be set to false for tests | -| `options.db` | `BetterSQLite3Database`\<`Record`\<`string`, `never`\>\> | `undefined` | Drizzle better-sqlite3 database instance | -| `options.encryptionKeys` | `undefined` \| `Partial`\<`Record`\<``"blob"`` \| ``"auth"`` \| ``"config"`` \| ``"data"`` \| ``"blobIndex"``, `Buffer`\>\> | `{}` | Encryption keys for each namespace | -| `options.keyManager` | `KeyManager` | `undefined` | mapeo/crypto KeyManager instance | -| `options.logger` | `undefined` \| [`Logger`](internal_.Logger.md) | `undefined` | | -| `options.projectKey` | `Buffer` | `undefined` | 32-byte public key of the project creator core | -| `options.projectSecretKey` | `undefined` \| `Buffer` | `undefined` | 32-byte secret key of the project creator core | -| `options.storage` | `HypercoreStorage` | `undefined` | Folder to store all hypercore data | - -#### Returns - -[`CoreManager`](internal_.CoreManager.md) - -#### Overrides - -TypedEmitter.constructor - -## Accessors - -### creatorCore - -• `get` **creatorCore**(): `Hypercore`\<``"binary"``, `Buffer`\> - -#### Returns - -`Hypercore`\<``"binary"``, `Buffer`\> - -___ - -### deviceId - -• `get` **deviceId**(): `string` - -#### Returns - -`string` - -___ - -### namespaces - -• `get` **namespaces**(): readonly [``"auth"``, ``"config"``, ``"data"``, ``"blobIndex"``, ``"blob"``] - -#### Returns - -readonly [``"auth"``, ``"config"``, ``"data"``, ``"blobIndex"``, ``"blob"``] - -## Methods - -### [kCoreManagerReplicate] - -▸ **[kCoreManagerReplicate]**(`stream`): [`Protomux`](internal_.Protomux.md)\<`Duplex`\<`any`, `any`, `any`, `any`, ``true``, ``true``, `DuplexEvents`\<`any`, `any`\>\>\> - -ONLY FOR TESTING -Replicate all cores in core manager - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `stream` | [`Protomux`](internal_.Protomux.md)\<`Duplex`\<`any`, `any`, `any`, `any`, ``true``, ``true``, `DuplexEvents`\<`any`, `any`\>\>\> | - -#### Returns - -[`Protomux`](internal_.Protomux.md)\<`Duplex`\<`any`, `any`, `any`, `any`, ``true``, ``true``, `DuplexEvents`\<`any`, `any`\>\>\> - -___ - -### addCore - -▸ **addCore**(`key`, `namespace`): [`CoreRecord`](../modules/internal_.md#corerecord) - -Add a core to the manager (will be persisted across restarts) - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `key` | `Buffer` | 32-byte public key of core to add | -| `namespace` | ``"blob"`` \| ``"auth"`` \| ``"config"`` \| ``"data"`` \| ``"blobIndex"`` | | - -#### Returns - -[`CoreRecord`](../modules/internal_.md#corerecord) - -___ - -### close - -▸ **close**(): `Promise`\<`void`\> - -Close all open cores and end any replication streams -TODO: gracefully close replication streams - -#### Returns - -`Promise`\<`void`\> - -___ - -### deleteOthersData - -▸ **deleteOthersData**(`namespace`): `Promise`\<`void`\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `namespace` | ``"blob"`` \| ``"config"`` \| ``"data"`` \| ``"blobIndex"`` | - -#### Returns - -`Promise`\<`void`\> - -___ - -### getCoreByDiscoveryKey - -▸ **getCoreByDiscoveryKey**(`discoveryKey`): `undefined` \| [`CoreRecord`](../modules/internal_.md#corerecord) - -Get a core by its discovery key - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `discoveryKey` | `Buffer` | - -#### Returns - -`undefined` \| [`CoreRecord`](../modules/internal_.md#corerecord) - -___ - -### getCoreByKey - -▸ **getCoreByKey**(`key`): `undefined` \| `Hypercore`\<``"binary"``, `Buffer`\> - -Get a core by its public key - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `key` | `Buffer` | - -#### Returns - -`undefined` \| `Hypercore`\<``"binary"``, `Buffer`\> - -___ - -### getCores - -▸ **getCores**(`namespace`): [`CoreRecord`](../modules/internal_.md#corerecord)[] - -Get an array of all cores in the given namespace - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `namespace` | ``"blob"`` \| ``"auth"`` \| ``"config"`` \| ``"data"`` \| ``"blobIndex"`` | - -#### Returns - -[`CoreRecord`](../modules/internal_.md#corerecord)[] - -___ - -### getWriterCore - -▸ **getWriterCore**(`namespace`): [`CoreRecord`](../modules/internal_.md#corerecord) - -Get the writer core for the given namespace - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `namespace` | ``"blob"`` \| ``"auth"`` \| ``"config"`` \| ``"data"`` \| ``"blobIndex"`` | - -#### Returns - -[`CoreRecord`](../modules/internal_.md#corerecord) - -___ - -### ready - -▸ **ready**(): `Promise`\<`void`\> - -Resolves when all cores have finished loading - -#### Returns - -`Promise`\<`void`\> - -___ - -### requestCoreKey - -▸ **requestCoreKey**(`peerKey`, `discoveryKey`): `void` - -Send an extension message over the project creator core replication stream -requesting a core key for the given discovery key. - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `peerKey` | `Buffer` | -| `discoveryKey` | `Buffer` | - -#### Returns - -`void` diff --git a/docs/api/md/classes/internal_.CoreOwnership.md b/docs/api/md/classes/internal_.CoreOwnership.md deleted file mode 100644 index 72c06781d..000000000 --- a/docs/api/md/classes/internal_.CoreOwnership.md +++ /dev/null @@ -1,72 +0,0 @@ -[API](../README.md) / [\](../modules/internal_.md) / CoreOwnership - -# Class: CoreOwnership - -[\](../modules/internal_.md).CoreOwnership - -## Table of contents - -### Constructors - -- [constructor](internal_.CoreOwnership.md#constructor) - -### Methods - -- [getCoreId](internal_.CoreOwnership.md#getcoreid) -- [getOwner](internal_.CoreOwnership.md#getowner) - -## Constructors - -### constructor - -• **new CoreOwnership**(`opts`): [`CoreOwnership`](internal_.CoreOwnership.md) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `opts` | `Object` | -| `opts.coreKeypairs` | `Record`\<``"blob"`` \| ``"auth"`` \| ``"config"`` \| ``"data"`` \| ``"blobIndex"``, [`KeyPair`](../modules/internal_.md#keypair)\> | -| `opts.dataType` | [`DataType`](internal_.DataType.md)\<[`DataStore`](internal_.DataStore.md)\<``"auth"``, ``"role"`` \| ``"coreOwnership"``\>, `SQLiteTableWithColumns`\<{}\>, ``"coreOwnership"``, {}, {}\> | -| `opts.identityKeypair` | [`KeyPair`](../modules/internal_.md#keypair) | - -#### Returns - -[`CoreOwnership`](internal_.CoreOwnership.md) - -## Methods - -### getCoreId - -▸ **getCoreId**(`deviceId`, `namespace`): `Promise`\<`string`\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `deviceId` | `string` | -| `namespace` | ``"blob"`` \| ``"auth"`` \| ``"config"`` \| ``"data"`` \| ``"blobIndex"`` | - -#### Returns - -`Promise`\<`string`\> - -coreId of core belonging to `deviceId` for `namespace` - -___ - -### getOwner - -▸ **getOwner**(`coreId`): `Promise`\<`string`\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `coreId` | `string` | - -#### Returns - -`Promise`\<`string`\> - -deviceId of device that owns the core diff --git a/docs/api/md/classes/internal_.CoreSyncState.md b/docs/api/md/classes/internal_.CoreSyncState.md deleted file mode 100644 index 8ccfed990..000000000 --- a/docs/api/md/classes/internal_.CoreSyncState.md +++ /dev/null @@ -1,142 +0,0 @@ -[API](../README.md) / [\](../modules/internal_.md) / CoreSyncState - -# Class: CoreSyncState - -[\](../modules/internal_.md).CoreSyncState - -Track sync state for a core identified by `discoveryId`. Can start tracking -state before the core instance exists locally, via the "preHave" messages -received over the project creator core. - -Because deriving the state is expensive (it iterates through the bitfields of -all peers), this is designed to be pull-based: the onUpdate event signals -that the state is updated, but does not pass the state. The consumer can -"pull" the state when it wants it via `coreSyncState.getState()`. - -Each peer (including the local peer) has a state of: - 1. `have` - number of blocks the peer has locally - 2. `want` - number of blocks the peer wants, and at least one peer has - 3. `wanted` - number of blocks the peer has that at least one peer wants - 4. `missing` - number of blocks the peer wants but no peer has - -## Table of contents - -### Constructors - -- [constructor](internal_.CoreSyncState.md#constructor) - -### Methods - -- [addPeer](internal_.CoreSyncState.md#addpeer) -- [attachCore](internal_.CoreSyncState.md#attachcore) -- [getState](internal_.CoreSyncState.md#getstate) -- [insertPreHaves](internal_.CoreSyncState.md#insertprehaves) -- [setPeerWants](internal_.CoreSyncState.md#setpeerwants) - -## Constructors - -### constructor - -• **new CoreSyncState**(`opts`): [`CoreSyncState`](internal_.CoreSyncState.md) - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `opts` | `Object` | | -| `opts.namespace` | ``"blob"`` \| ``"auth"`` \| ``"config"`` \| ``"data"`` \| ``"blobIndex"`` | | -| `opts.onUpdate` | () => `void` | Called when a state update is available (via getState()) | -| `opts.peerSyncControllers` | `Map`\<`string`, [`PeerSyncController`](internal_.PeerSyncController.md)\> | | - -#### Returns - -[`CoreSyncState`](internal_.CoreSyncState.md) - -## Methods - -### addPeer - -▸ **addPeer**(`peerId`): `void` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `peerId` | `string` | - -#### Returns - -`void` - -___ - -### attachCore - -▸ **attachCore**(`core`): `void` - -Attach a core. The sync state can be initialized without a core instance, -because we could receive peer want and have states via extension messages -before we have the core key that allows us to create a core instance. - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `core` | `Hypercore`\<``"binary"``, `Buffer`\> | - -#### Returns - -`void` - -___ - -### getState - -▸ **getState**(): [`DerivedState`](../interfaces/internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_sync_core_sync_state_.DerivedState.md) - -#### Returns - -[`DerivedState`](../interfaces/internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_sync_core_sync_state_.DerivedState.md) - -___ - -### insertPreHaves - -▸ **insertPreHaves**(`peerId`, `start`, `bitfield`): `void` - -Add a pre-emptive "have" bitfield for a peer. This is used when we receive -a peer "have" via extension message - it allows us to have a state for the -peer before the peer actually starts syncing this core - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `peerId` | `string` | -| `start` | `number` | -| `bitfield` | `Uint32Array` | - -#### Returns - -`void` - -___ - -### setPeerWants - -▸ **setPeerWants**(`peerId`, `ranges`): `void` - -Add a ranges of wanted blocks for a peer. By default a peer wants all -blocks in a core - calling this will change the peer to only want the -blocks/ranges that are added here - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `peerId` | `string` | -| `ranges` | \{ `length`: `number` ; `start`: `number` }[] | - -#### Returns - -`void` diff --git a/docs/api/md/classes/internal_.Corestore.md b/docs/api/md/classes/internal_.Corestore.md deleted file mode 100644 index 5d5f382fe..000000000 --- a/docs/api/md/classes/internal_.Corestore.md +++ /dev/null @@ -1,180 +0,0 @@ -[API](../README.md) / [\](../modules/internal_.md) / Corestore - -# Class: Corestore - -[\](../modules/internal_.md).Corestore - -## Hierarchy - -- `TypedEmitter`\<[`CorestoreEvents`](../interfaces/internal_.CorestoreEvents.md)\> - - ↳ **`Corestore`** - -## Table of contents - -### Constructors - -- [constructor](internal_.Corestore.md#constructor) - -### Properties - -- [cores](internal_.Corestore.md#cores) -- [replicate](internal_.Corestore.md#replicate) - -### Methods - -- [close](internal_.Corestore.md#close) -- [get](internal_.Corestore.md#get) -- [namespace](internal_.Corestore.md#namespace) -- [ready](internal_.Corestore.md#ready) - -## Constructors - -### constructor - -• **new Corestore**(`storage`, `options?`): [`Corestore`](internal_.Corestore.md) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `storage` | `HypercoreStorage` | -| `options?` | `Object` | -| `options.poolSize?` | `number` | -| `options.primaryKey?` | `Buffer` \| `Uint8Array` | - -#### Returns - -[`Corestore`](internal_.Corestore.md) - -#### Overrides - -TypedEmitter\<CorestoreEvents\>.constructor - -## Properties - -### cores - -• **cores**: `Map`\<`string`, `Hypercore`\<`ValueEncoding`, `Buffer`\>\> - -___ - -### replicate - -• **replicate**: (`isInitiatorOrReplicationStream`: `boolean` \| `Duplex` \| `Duplex`\<`any`, `any`, `any`, `any`, ``true``, ``true``, `DuplexEvents`\<`any`, `any`\>\>, `opts?`: {}) => `ReplicationStream`(`protomux`: [`Protomux`](internal_.Protomux.md)\<`Duplex`\<`any`, `any`, `any`, `any`, ``true``, ``true``, `DuplexEvents`\<`any`, `any`\>\>\>, `opts?`: {}) => [`Protomux`](internal_.Protomux.md)\<`Duplex`\<`any`, `any`, `any`, `any`, ``true``, ``true``, `DuplexEvents`\<`any`, `any`\>\>\> - -#### Type declaration - -▸ (`isInitiatorOrReplicationStream`, `opts?`): `ReplicationStream` - -##### Parameters - -| Name | Type | -| :------ | :------ | -| `isInitiatorOrReplicationStream` | `boolean` \| `Duplex` \| `Duplex`\<`any`, `any`, `any`, `any`, ``true``, ``true``, `DuplexEvents`\<`any`, `any`\>\> | -| `opts?` | `Object` | - -##### Returns - -`ReplicationStream` - -▸ (`protomux`, `opts?`): [`Protomux`](internal_.Protomux.md)\<`Duplex`\<`any`, `any`, `any`, `any`, ``true``, ``true``, `DuplexEvents`\<`any`, `any`\>\>\> - -##### Parameters - -| Name | Type | -| :------ | :------ | -| `protomux` | [`Protomux`](internal_.Protomux.md)\<`Duplex`\<`any`, `any`, `any`, `any`, ``true``, ``true``, `DuplexEvents`\<`any`, `any`\>\>\> | -| `opts?` | `Object` | - -##### Returns - -[`Protomux`](internal_.Protomux.md)\<`Duplex`\<`any`, `any`, `any`, `any`, ``true``, ``true``, `DuplexEvents`\<`any`, `any`\>\>\> - -## Methods - -### close - -▸ **close**(): `Promise`\<`void`\> - -#### Returns - -`Promise`\<`void`\> - -___ - -### get - -▸ **get**(`key`): `Hypercore`\<`ValueEncoding`, `Buffer`\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `key` | `Buffer` \| `Uint8Array` | - -#### Returns - -`Hypercore`\<`ValueEncoding`, `Buffer`\> - -▸ **get**(`options`): `Hypercore`\<`ValueEncoding`, `Buffer`\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `options` | `Omit`\<`HypercoreOptions`\<``"binary"``, `undefined`\>, ``"keyPair"``\> & \{ `name`: `string` } | - -#### Returns - -`Hypercore`\<`ValueEncoding`, `Buffer`\> - -▸ **get**(`options`): `Hypercore`\<`ValueEncoding`, `Buffer`\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `options` | `never` | - -#### Returns - -`Hypercore`\<`ValueEncoding`, `Buffer`\> - -▸ **get**(`options`): `Hypercore`\<`ValueEncoding`, `Buffer`\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `options` | `Omit`\<`HypercoreOptions`\<``"binary"``, `undefined`\>, ``"key"`` \| ``"keyPair"``\> & \{ `key?`: `string` \| `Buffer` ; `keyPair`: \{ `publicKey`: `Buffer` ; `secretKey?`: ``null`` \| `Buffer` } ; `sparse?`: `boolean` } | - -#### Returns - -`Hypercore`\<`ValueEncoding`, `Buffer`\> - -___ - -### namespace - -▸ **namespace**(`name`): [`Corestore`](internal_.Corestore.md) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `name` | `string` | - -#### Returns - -[`Corestore`](internal_.Corestore.md) - -___ - -### ready - -▸ **ready**(): `Promise`\<`void`\> - -#### Returns - -`Promise`\<`void`\> diff --git a/docs/api/md/classes/internal_.DataStore.md b/docs/api/md/classes/internal_.DataStore.md deleted file mode 100644 index 33247b663..000000000 --- a/docs/api/md/classes/internal_.DataStore.md +++ /dev/null @@ -1,207 +0,0 @@ -[API](../README.md) / [\](../modules/internal_.md) / DataStore - -# Class: DataStore\ - -[\](../modules/internal_.md).DataStore - -## Type parameters - -| Name | Type | -| :------ | :------ | -| `TNamespace` | keyof [`NamespaceSchemas`](../modules/internal_.md#namespaceschemas) | -| `TSchemaName` | [`NamespaceSchemas`](../modules/internal_.md#namespaceschemas)[`TNamespace`][`number`] | - -## Hierarchy - -- `TypedEmitter` - - ↳ **`DataStore`** - -## Table of contents - -### Constructors - -- [constructor](internal_.DataStore.md#constructor) - -### Accessors - -- [indexer](internal_.DataStore.md#indexer) -- [namespace](internal_.DataStore.md#namespace) -- [schemas](internal_.DataStore.md#schemas) -- [writerCore](internal_.DataStore.md#writercore) - -### Methods - -- [close](internal_.DataStore.md#close) -- [getIndexState](internal_.DataStore.md#getindexstate) -- [read](internal_.DataStore.md#read) -- [readRaw](internal_.DataStore.md#readraw) -- [write](internal_.DataStore.md#write) -- [writeRaw](internal_.DataStore.md#writeraw) - -## Constructors - -### constructor - -• **new DataStore**\<`TNamespace`, `TSchemaName`\>(`opts`): [`DataStore`](internal_.DataStore.md)\<`TNamespace`, `TSchemaName`\> - -#### Type parameters - -| Name | Type | -| :------ | :------ | -| `TNamespace` | extends ``"auth"`` \| ``"config"`` \| ``"data"`` = ``"auth"`` \| ``"config"`` \| ``"data"`` | -| `TSchemaName` | extends ``"translation"`` \| ``"track"`` \| ``"role"`` \| ``"projectSettings"`` \| ``"preset"`` \| ``"observation"`` \| ``"icon"`` \| ``"field"`` \| ``"deviceInfo"`` \| ``"coreOwnership"`` = \{ `auth`: readonly [``"coreOwnership"``, ``"role"``] ; `config`: readonly [``"translation"``, ``"preset"``, ``"field"``, ``"projectSettings"``, ``"deviceInfo"``, ``"icon"``] ; `data`: readonly [``"observation"``, ``"track"``] }[`TNamespace`][`number`] | - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `opts` | `Object` | -| `opts.batch` | (`entries`: `Entry`\<``"binary"``\>[]) => `Promise`\<[`IndexedDocIds`](../modules/internal_.md#indexeddocids)\> | -| `opts.coreManager` | [`CoreManager`](internal_.CoreManager.md) | -| `opts.namespace` | `TNamespace` | -| `opts.storage` | `StorageParam` | - -#### Returns - -[`DataStore`](internal_.DataStore.md)\<`TNamespace`, `TSchemaName`\> - -#### Overrides - -TypedEmitter.constructor - -## Accessors - -### indexer - -• `get` **indexer**(): `MultiCoreIndexer`\<``"binary"``\> - -#### Returns - -`MultiCoreIndexer`\<``"binary"``\> - -___ - -### namespace - -• `get` **namespace**(): `TNamespace` - -#### Returns - -`TNamespace` - -___ - -### schemas - -• `get` **schemas**(): (``"track"`` \| ``"observation"``)[] \| (``"translation"`` \| ``"projectSettings"`` \| ``"preset"`` \| ``"icon"`` \| ``"field"`` \| ``"deviceInfo"``)[] \| (``"role"`` \| ``"coreOwnership"``)[] - -#### Returns - -(``"track"`` \| ``"observation"``)[] \| (``"translation"`` \| ``"projectSettings"`` \| ``"preset"`` \| ``"icon"`` \| ``"field"`` \| ``"deviceInfo"``)[] \| (``"role"`` \| ``"coreOwnership"``)[] - -___ - -### writerCore - -• `get` **writerCore**(): `Hypercore`\<``"binary"``, `Buffer`\> - -#### Returns - -`Hypercore`\<``"binary"``, `Buffer`\> - -## Methods - -### close - -▸ **close**(): `Promise`\<`void`\> - -#### Returns - -`Promise`\<`void`\> - -___ - -### getIndexState - -▸ **getIndexState**(): `IndexState` - -#### Returns - -`IndexState` - -___ - -### read - -▸ **read**(`versionId`): `Promise`\<`MapeoDoc`\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `versionId` | `string` | - -#### Returns - -`Promise`\<`MapeoDoc`\> - -___ - -### readRaw - -▸ **readRaw**(`versionId`): `Promise`\<`Buffer`\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `versionId` | `string` | - -#### Returns - -`Promise`\<`Buffer`\> - -___ - -### write - -▸ **write**\<`TDoc`\>(`doc`): `Promise`\<`Extract`\<{}, `TDoc`\> \| `Extract`\<{}, `TDoc`\> \| `Extract`\<{}, `TDoc`\> \| `Extract`\<{}, `TDoc`\> \| `Extract`\<{}, `TDoc`\> \| `Extract`\<{}, `TDoc`\> \| `Extract`\<{}, `TDoc`\> \| `Extract`\<{}, `TDoc`\> \| `Extract`\<{}, `TDoc`\> \| `Extract`\<{}, `TDoc`\>\> - -UNSAFE: Does not check links: [] refer to a valid doc - should only be used -internally. - -Write a doc, must be one of the schema types supported by the namespace of -this DataStore. - -#### Type parameters - -| Name | Type | -| :------ | :------ | -| `TDoc` | extends \{ `schemaName`: `TSchemaName` } & `Omit`\<{}, ``"versionId"``\> \| \{ `schemaName`: `TSchemaName` } & `Omit`\<{}, ``"versionId"``\> \| \{ `schemaName`: `TSchemaName` } & `Omit`\<{}, ``"versionId"``\> \| \{ `schemaName`: `TSchemaName` } & `Omit`\<{}, ``"versionId"``\> \| \{ `schemaName`: `TSchemaName` } & `Omit`\<{}, ``"versionId"``\> \| \{ `schemaName`: `TSchemaName` } & `Omit`\<{}, ``"versionId"``\> \| \{ `schemaName`: `TSchemaName` } & `Omit`\<{}, ``"versionId"``\> \| \{ `schemaName`: `TSchemaName` } & `Omit`\<{}, ``"versionId"``\> \| \{ `schemaName`: `TSchemaName` } & `Omit`\<{}, ``"versionId"``\> \| \{ `schemaName`: `TSchemaName` } & `Omit`\<{} & `CoreOwnershipSignatures`, ``"versionId"``\> | - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `doc` | `TDoc` | - -#### Returns - -`Promise`\<`Extract`\<{}, `TDoc`\> \| `Extract`\<{}, `TDoc`\> \| `Extract`\<{}, `TDoc`\> \| `Extract`\<{}, `TDoc`\> \| `Extract`\<{}, `TDoc`\> \| `Extract`\<{}, `TDoc`\> \| `Extract`\<{}, `TDoc`\> \| `Extract`\<{}, `TDoc`\> \| `Extract`\<{}, `TDoc`\> \| `Extract`\<{}, `TDoc`\>\> - -___ - -### writeRaw - -▸ **writeRaw**(`buf`): `Promise`\<`string`\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `buf` | `Buffer` | - -#### Returns - -`Promise`\<`string`\> diff --git a/docs/api/md/classes/internal_.DataType.md b/docs/api/md/classes/internal_.DataType.md deleted file mode 100644 index 0d8081a5b..000000000 --- a/docs/api/md/classes/internal_.DataType.md +++ /dev/null @@ -1,240 +0,0 @@ -[API](../README.md) / [\](../modules/internal_.md) / DataType - -# Class: DataType\ - -[\](../modules/internal_.md).DataType - -## Type parameters - -| Name | Type | -| :------ | :------ | -| `TDataStore` | extends [`"/home/runner/work/mapeo-core-next/mapeo-core-next/src/datastore/index"`](../modules/internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_datastore_index_.md) | -| `TTable` | extends [`MapeoDocTables`](../modules/internal_.md#mapeodoctables-1) | -| `TSchemaName` | extends `TTable`[``"_"``][``"name"``] | -| `TDoc` | extends [`MapeoDocMap`](../modules/internal_.md#mapeodocmap)[`TSchemaName`] | -| `TValue` | extends [`MapeoValueMap`](../modules/internal_.md#mapeovaluemap)[`TSchemaName`] | - -## Hierarchy - -- `TypedEmitter`\<[`DataTypeEvents`](../interfaces/internal_.DataTypeEvents.md)\<`TDoc`\>\> - - ↳ **`DataType`** - -## Table of contents - -### Constructors - -- [constructor](internal_.DataType.md#constructor) - -### Accessors - -- [[kTable]](internal_.DataType.md#[ktable]) -- [writerCore](internal_.DataType.md#writercore) - -### Methods - -- [[kCreateWithDocId]](internal_.DataType.md#[kcreatewithdocid]) -- [[kSelect]](internal_.DataType.md#[kselect]) -- [create](internal_.DataType.md#create) -- [delete](internal_.DataType.md#delete) -- [getByDocId](internal_.DataType.md#getbydocid) -- [getByVersionId](internal_.DataType.md#getbyversionid) -- [getMany](internal_.DataType.md#getmany) -- [update](internal_.DataType.md#update) - -## Constructors - -### constructor - -• **new DataType**\<`TDataStore`, `TTable`, `TSchemaName`, `TDoc`, `TValue`\>(`«destructured»`): [`DataType`](internal_.DataType.md)\<`TDataStore`, `TTable`, `TSchemaName`, `TDoc`, `TValue`\> - -#### Type parameters - -| Name | Type | -| :------ | :------ | -| `TDataStore` | extends [`DataStore`](internal_.DataStore.md)\<``"auth"`` \| ``"config"`` \| ``"data"``, ``"translation"`` \| ``"track"`` \| ``"role"`` \| ``"projectSettings"`` \| ``"preset"`` \| ``"observation"`` \| ``"icon"`` \| ``"field"`` \| ``"deviceInfo"`` \| ``"coreOwnership"``\> | -| `TTable` | extends [`MapeoDocTables`](../modules/internal_.md#mapeodoctables-1) | -| `TSchemaName` | extends ``"translation"`` \| ``"track"`` \| ``"role"`` \| ``"projectSettings"`` \| ``"preset"`` \| ``"observation"`` \| ``"icon"`` \| ``"field"`` \| ``"deviceInfo"`` \| ``"coreOwnership"`` | -| `TDoc` | extends \{ `schemaName`: `TSchemaName` } & {} \| \{ `schemaName`: `TSchemaName` } & {} \| \{ `schemaName`: `TSchemaName` } & {} \| \{ `schemaName`: `TSchemaName` } & {} \| \{ `schemaName`: `TSchemaName` } & {} \| \{ `schemaName`: `TSchemaName` } & {} \| \{ `schemaName`: `TSchemaName` } & {} \| \{ `schemaName`: `TSchemaName` } & {} \| \{ `schemaName`: `TSchemaName` } & {} \| \{ `schemaName`: `TSchemaName` } & {} | -| `TValue` | extends \{ `schemaName`: `TSchemaName` } & {} \| \{ `schemaName`: `TSchemaName` } & {} \| \{ `schemaName`: `TSchemaName` } & {} \| \{ `schemaName`: `TSchemaName` } & {} \| \{ `schemaName`: `TSchemaName` } & {} \| \{ `schemaName`: `TSchemaName` } & {} \| \{ `schemaName`: `TSchemaName` } & {} \| \{ `schemaName`: `TSchemaName` } & {} \| \{ `schemaName`: `TSchemaName` } & {} \| \{ `schemaName`: `TSchemaName` } & {} | - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `«destructured»` | `Object` | -| › `dataStore` | `TDataStore` | -| › `db` | `BetterSQLite3Database`\<`Record`\<`string`, `never`\>\> | -| › `getPermissions?` | () => `any` | -| › `getTranslations` | (`value`: {}) => `Promise`\<{}[]\> | -| › `table` | `TTable` | - -#### Returns - -[`DataType`](internal_.DataType.md)\<`TDataStore`, `TTable`, `TSchemaName`, `TDoc`, `TValue`\> - -#### Overrides - -TypedEmitter\<DataTypeEvents\<TDoc\>\>.constructor - -## Accessors - -### [kTable] - -• `get` **[kTable]**(): `TTable` - -#### Returns - -`TTable` - -___ - -### writerCore - -• `get` **writerCore**(): `Hypercore`\<``"binary"``, `Buffer`\> - -#### Returns - -`Hypercore`\<``"binary"``, `Buffer`\> - -## Methods - -### [kCreateWithDocId] - -▸ **[kCreateWithDocId]**(`docId`, `value`): `Promise`\<`TDoc` & \{ `forks`: `string`[] }\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `docId` | `string` | -| `value` | `Exclude`\<`TValue`, \{ `schemaName`: ``"coreOwnership"`` }\> \| [`CoreOwnershipWithSignaturesValue`](../modules/internal_.md#coreownershipwithsignaturesvalue) | - -#### Returns - -`Promise`\<`TDoc` & \{ `forks`: `string`[] }\> - -___ - -### [kSelect] - -▸ **[kSelect]**(): `Promise`\<`any`\> - -#### Returns - -`Promise`\<`any`\> - -___ - -### create - -▸ **create**\<`T`\>(`value`): `Promise`\<`TDoc` & \{ `forks`: `string`[] }\> - -#### Type parameters - -| Name | Type | -| :------ | :------ | -| `T` | extends \{ `schemaName`: `TSchemaName` } & {} \| \{ `schemaName`: `TSchemaName` } & {} \| \{ `schemaName`: `TSchemaName` } & {} \| \{ `schemaName`: `TSchemaName` } & {} \| \{ `schemaName`: `TSchemaName` } & {} \| \{ `schemaName`: `TSchemaName` } & {} \| \{ `schemaName`: `TSchemaName` } & {} \| \{ `schemaName`: `TSchemaName` } & {} \| \{ `schemaName`: `TSchemaName` } & {} \| `ExactObject`\<\{ `schemaName`: `TSchemaName` } & {}, `T`\> \| `ExactObject`\<\{ `schemaName`: `TSchemaName` } & {}, `T`\> \| `ExactObject`\<\{ `schemaName`: `TSchemaName` } & {}, `T`\> \| `ExactObject`\<\{ `schemaName`: `TSchemaName` } & {}, `T`\> \| `ExactObject`\<\{ `schemaName`: `TSchemaName` } & {}, `T`\> \| `ExactObject`\<\{ `schemaName`: `TSchemaName` } & {}, `T`\> \| `ExactObject`\<\{ `schemaName`: `TSchemaName` } & {}, `T`\> \| `ExactObject`\<\{ `schemaName`: `TSchemaName` } & {}, `T`\> \| `ExactObject`\<\{ `schemaName`: `TSchemaName` } & {}, `T`\> \| `Exact`\<`ArrayElement`\<`Exclude`\<`Extract`\<{}, \{ `schemaName`: `TSchemaName` }\>, \{ `schemaName`: ``"coreOwnership"`` }\>\>, `ArrayElement`\<`T`\>\>[] \| readonly `Exact`\<`ArrayElement`\<`Exclude`\<`Extract`\<{}, \{ `schemaName`: `TSchemaName` }\>, \{ `schemaName`: ``"coreOwnership"`` }\>\>, `ArrayElement`\<`T`\>\>[] \| `ExactObject`\<`Exclude`\<`Extract`\<{}, \{ `schemaName`: `TSchemaName` }\>, \{ `schemaName`: ``"coreOwnership"`` }\>, `T`\> | - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `value` | `T` | - -#### Returns - -`Promise`\<`TDoc` & \{ `forks`: `string`[] }\> - -___ - -### delete - -▸ **delete**(`docId`): `Promise`\<`TDoc` & \{ `forks`: `string`[] }\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `docId` | `string` | - -#### Returns - -`Promise`\<`TDoc` & \{ `forks`: `string`[] }\> - -___ - -### getByDocId - -▸ **getByDocId**(`docId`, `opts?`): `Promise`\<`TDoc` & \{ `forks`: `string`[] }\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `docId` | `string` | -| `opts?` | `Object` | -| `opts.lang?` | `string` | - -#### Returns - -`Promise`\<`TDoc` & \{ `forks`: `string`[] }\> - -___ - -### getByVersionId - -▸ **getByVersionId**(`versionId`, `opts?`): `Promise`\<`TDoc`\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `versionId` | `string` | -| `opts?` | `Object` | -| `opts.lang?` | `string` | - -#### Returns - -`Promise`\<`TDoc`\> - -___ - -### getMany - -▸ **getMany**(`opts?`): `Promise`\<`TDoc` & \{ `forks`: `string`[] }[]\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `opts?` | `Object` | -| `opts.includeDeleted?` | `boolean` | -| `opts.lang?` | `string` | - -#### Returns - -`Promise`\<`TDoc` & \{ `forks`: `string`[] }[]\> - -___ - -### update - -▸ **update**\<`T`\>(`versionId`, `value`): `Promise`\<`TDoc` & \{ `forks`: `string`[] }\> - -#### Type parameters - -| Name | Type | -| :------ | :------ | -| `T` | extends \{ `schemaName`: `TSchemaName` } & {} \| \{ `schemaName`: `TSchemaName` } & {} \| \{ `schemaName`: `TSchemaName` } & {} \| \{ `schemaName`: `TSchemaName` } & {} \| \{ `schemaName`: `TSchemaName` } & {} \| \{ `schemaName`: `TSchemaName` } & {} \| \{ `schemaName`: `TSchemaName` } & {} \| \{ `schemaName`: `TSchemaName` } & {} \| \{ `schemaName`: `TSchemaName` } & {} \| `ExactObject`\<\{ `schemaName`: `TSchemaName` } & {}, `T`\> \| `ExactObject`\<\{ `schemaName`: `TSchemaName` } & {}, `T`\> \| `ExactObject`\<\{ `schemaName`: `TSchemaName` } & {}, `T`\> \| `ExactObject`\<\{ `schemaName`: `TSchemaName` } & {}, `T`\> \| `ExactObject`\<\{ `schemaName`: `TSchemaName` } & {}, `T`\> \| `ExactObject`\<\{ `schemaName`: `TSchemaName` } & {}, `T`\> \| `ExactObject`\<\{ `schemaName`: `TSchemaName` } & {}, `T`\> \| `ExactObject`\<\{ `schemaName`: `TSchemaName` } & {}, `T`\> \| `ExactObject`\<\{ `schemaName`: `TSchemaName` } & {}, `T`\> \| `Exact`\<`ArrayElement`\<`Exclude`\<`Extract`\<{}, \{ `schemaName`: `TSchemaName` }\>, \{ `schemaName`: ``"coreOwnership"`` }\>\>, `ArrayElement`\<`T`\>\>[] \| readonly `Exact`\<`ArrayElement`\<`Exclude`\<`Extract`\<{}, \{ `schemaName`: `TSchemaName` }\>, \{ `schemaName`: ``"coreOwnership"`` }\>\>, `ArrayElement`\<`T`\>\>[] \| `ExactObject`\<`Exclude`\<`Extract`\<{}, \{ `schemaName`: `TSchemaName` }\>, \{ `schemaName`: ``"coreOwnership"`` }\>, `T`\> | - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `versionId` | `string` \| `string`[] | -| `value` | `T` | - -#### Returns - -`Promise`\<`TDoc` & \{ `forks`: `string`[] }\> diff --git a/docs/api/md/classes/internal_.DenseIndex.md b/docs/api/md/classes/internal_.DenseIndex.md deleted file mode 100644 index dc1ed8c08..000000000 --- a/docs/api/md/classes/internal_.DenseIndex.md +++ /dev/null @@ -1,159 +0,0 @@ -[API](../README.md) / [\](../modules/internal_.md) / DenseIndex - -# Class: DenseIndex - -[\](../modules/internal_.md).DenseIndex - -## Hierarchy - -- [`Index`](internal_.Index.md) - - ↳ **`DenseIndex`** - -## Table of contents - -### Constructors - -- [constructor](internal_.DenseIndex.md#constructor) - -### Properties - -- [byteLength](internal_.DenseIndex.md#bytelength) - -### Methods - -- [skipFirst](internal_.DenseIndex.md#skipfirst) -- [skipLast](internal_.DenseIndex.md#skiplast) -- [update](internal_.DenseIndex.md#update) -- [from](internal_.DenseIndex.md#from) - -## Constructors - -### constructor - -• **new DenseIndex**(`field`, `byteLength`): [`DenseIndex`](internal_.DenseIndex.md) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `field` | `TypedArray` | -| `byteLength` | `number` | - -#### Returns - -[`DenseIndex`](internal_.DenseIndex.md) - -#### Overrides - -[Index](internal_.Index.md).[constructor](internal_.Index.md#constructor) - -## Properties - -### byteLength - -• `Readonly` **byteLength**: `number` - -#### Inherited from - -[Index](internal_.Index.md).[byteLength](internal_.Index.md#bytelength) - -## Methods - -### skipFirst - -▸ **skipFirst**(`value`, `position?`): `number` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `value` | `boolean` | -| `position?` | `number` | - -#### Returns - -`number` - -#### Inherited from - -[Index](internal_.Index.md).[skipFirst](internal_.Index.md#skipfirst) - -___ - -### skipLast - -▸ **skipLast**(`value`, `position?`): `number` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `value` | `boolean` | -| `position?` | `number` | - -#### Returns - -`number` - -#### Inherited from - -[Index](internal_.Index.md).[skipLast](internal_.Index.md#skiplast) - -___ - -### update - -▸ **update**(`bit`): `boolean` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `bit` | `number` | - -#### Returns - -`boolean` - -#### Overrides - -[Index](internal_.Index.md).[update](internal_.Index.md#update) - -___ - -### from - -▸ **from**(`field`, `byteLength`): [`DenseIndex`](internal_.DenseIndex.md) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `field` | `TypedArray` | -| `byteLength` | `number` | - -#### Returns - -[`DenseIndex`](internal_.DenseIndex.md) - -#### Inherited from - -[Index](internal_.Index.md).[from](internal_.Index.md#from) - -▸ **from**(`chunks`, `byteLength`): [`SparseIndex`](internal_.SparseIndex.md) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `chunks` | [`Chunk`](../modules/internal_.md#chunk)[] | -| `byteLength` | `number` | - -#### Returns - -[`SparseIndex`](internal_.SparseIndex.md) - -#### Inherited from - -[Index](internal_.Index.md).[from](internal_.Index.md#from) diff --git a/docs/api/md/classes/internal_.DriveLiveDownload.md b/docs/api/md/classes/internal_.DriveLiveDownload.md deleted file mode 100644 index 803f19dc8..000000000 --- a/docs/api/md/classes/internal_.DriveLiveDownload.md +++ /dev/null @@ -1,58 +0,0 @@ -[API](../README.md) / [\](../modules/internal_.md) / DriveLiveDownload - -# Class: DriveLiveDownload - -[\](../modules/internal_.md).DriveLiveDownload - -LiveDownload class - -## Hierarchy - -- `TypedEmitter` - - ↳ **`DriveLiveDownload`** - -## Table of contents - -### Constructors - -- [constructor](internal_.DriveLiveDownload.md#constructor) - -### Accessors - -- [state](internal_.DriveLiveDownload.md#state) - -## Constructors - -### constructor - -• **new DriveLiveDownload**(`drive`, `options?`): [`DriveLiveDownload`](internal_.DriveLiveDownload.md) - -Like drive.download() but 'live', - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `drive` | [`Hyperdrive`](internal_.Hyperdrive-1.md) | | -| `options` | `Object` | | -| `options.filter` | `undefined` \| [`BlobFilter`](../modules/internal_.md#blobfilter) | Filter blobs of specific types and/or sizes to download | -| `options.signal` | `undefined` \| `AbortSignal` | | - -#### Returns - -[`DriveLiveDownload`](internal_.DriveLiveDownload.md) - -#### Overrides - -TypedEmitter.constructor - -## Accessors - -### state - -• `get` **state**(): [`BlobDownloadState`](../interfaces/internal_.BlobDownloadState.md) \| [`BlobDownloadStateError`](../modules/internal_.md#blobdownloadstateerror) - -#### Returns - -[`BlobDownloadState`](../interfaces/internal_.BlobDownloadState.md) \| [`BlobDownloadStateError`](../modules/internal_.md#blobdownloadstateerror) diff --git a/docs/api/md/classes/internal_.Hyperblobs-1.md b/docs/api/md/classes/internal_.Hyperblobs-1.md deleted file mode 100644 index 95455f919..000000000 --- a/docs/api/md/classes/internal_.Hyperblobs-1.md +++ /dev/null @@ -1,169 +0,0 @@ -[API](../README.md) / [\](../modules/internal_.md) / Hyperblobs - -# Class: Hyperblobs - -[\](../modules/internal_.md).Hyperblobs - -## Table of contents - -### Constructors - -- [constructor](internal_.Hyperblobs-1.md#constructor) - -### Properties - -- [blockSize](internal_.Hyperblobs-1.md#blocksize) -- [core](internal_.Hyperblobs-1.md#core) - -### Accessors - -- [feed](internal_.Hyperblobs-1.md#feed) -- [locked](internal_.Hyperblobs-1.md#locked) - -### Methods - -- [clear](internal_.Hyperblobs-1.md#clear) -- [createReadStream](internal_.Hyperblobs-1.md#createreadstream) -- [createWriteStream](internal_.Hyperblobs-1.md#createwritestream) -- [get](internal_.Hyperblobs-1.md#get) -- [put](internal_.Hyperblobs-1.md#put) - -## Constructors - -### constructor - -• **new Hyperblobs**(`core`, `opts?`): [`Hyperblobs`](internal_.Hyperblobs-1.md) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `core` | `Hypercore`\<``"binary"``, `undefined`\> | -| `opts?` | `Object` | -| `opts.blocksize?` | `number` | - -#### Returns - -[`Hyperblobs`](internal_.Hyperblobs-1.md) - -## Properties - -### blockSize - -• `Readonly` **blockSize**: `number` - -___ - -### core - -• `Readonly` **core**: `Hypercore`\<``"binary"``, `undefined`\> - -## Accessors - -### feed - -• `get` **feed**(): `Hypercore`\<``"binary"``, `undefined`\> - -#### Returns - -`Hypercore`\<``"binary"``, `undefined`\> - -___ - -### locked - -• `get` **locked**(): `boolean` - -#### Returns - -`boolean` - -## Methods - -### clear - -▸ **clear**(`id`, `opts?`): `Promise`\<``null`` \| \{ `blocks`: `number` }\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `id` | [`BlobId`](../interfaces/internal_.Hyperblobs.BlobId.md) | -| `opts?` | `Object` | -| `opts.diff?` | `boolean` | - -#### Returns - -`Promise`\<``null`` \| \{ `blocks`: `number` }\> - -___ - -### createReadStream - -▸ **createReadStream**(`id`, `opts?`): [`BlobReadStream`](internal_.BlobReadStream.md) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `id` | [`BlobId`](../interfaces/internal_.Hyperblobs.BlobId.md) | -| `opts?` | `any` | - -#### Returns - -[`BlobReadStream`](internal_.BlobReadStream.md) - -___ - -### createWriteStream - -▸ **createWriteStream**(`opts?`): [`BlobWriteStream`](internal_.BlobWriteStream.md) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `opts?` | `any` | - -#### Returns - -[`BlobWriteStream`](internal_.BlobWriteStream.md) - -___ - -### get - -▸ **get**(`id`, `opts?`): `Promise`\<``null`` \| `Buffer`\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `id` | [`BlobId`](../interfaces/internal_.Hyperblobs.BlobId.md) | -| `opts?` | `any` | - -#### Returns - -`Promise`\<``null`` \| `Buffer`\> - -___ - -### put - -▸ **put**(`blob`, `opts?`): `Promise`\<[`BlobId`](../interfaces/internal_.Hyperblobs.BlobId.md)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `blob` | `Buffer` | -| `opts?` | `Object` | -| `opts.blockSize?` | `number` | -| `opts.core?` | `Hypercore`\<``"binary"``, `undefined`\> | -| `opts.end?` | `number` | -| `opts.length?` | `number` | -| `opts.start?` | `number` | - -#### Returns - -`Promise`\<[`BlobId`](../interfaces/internal_.Hyperblobs.BlobId.md)\> diff --git a/docs/api/md/classes/internal_.Hyperdrive-1.md b/docs/api/md/classes/internal_.Hyperdrive-1.md deleted file mode 100644 index ebdc41f9f..000000000 --- a/docs/api/md/classes/internal_.Hyperdrive-1.md +++ /dev/null @@ -1,465 +0,0 @@ -[API](../README.md) / [\](../modules/internal_.md) / Hyperdrive - -# Class: Hyperdrive - -[\](../modules/internal_.md).Hyperdrive - -## Hierarchy - -- `TypedEmitter`\<[`HyperdriveEvents`](../interfaces/internal_.HyperdriveEvents.md)\> - - ↳ **`Hyperdrive`** - -## Table of contents - -### Constructors - -- [constructor](internal_.Hyperdrive-1.md#constructor) - -### Properties - -- [blobs](internal_.Hyperdrive-1.md#blobs) -- [contentKey](internal_.Hyperdrive-1.md#contentkey) -- [core](internal_.Hyperdrive-1.md#core) -- [db](internal_.Hyperdrive-1.md#db) -- [discoveryKey](internal_.Hyperdrive-1.md#discoverykey) -- [id](internal_.Hyperdrive-1.md#id) -- [key](internal_.Hyperdrive-1.md#key) -- [version](internal_.Hyperdrive-1.md#version) - -### Methods - -- [batch](internal_.Hyperdrive-1.md#batch) -- [checkout](internal_.Hyperdrive-1.md#checkout) -- [clear](internal_.Hyperdrive-1.md#clear) -- [createReadStream](internal_.Hyperdrive-1.md#createreadstream) -- [createWriteStream](internal_.Hyperdrive-1.md#createwritestream) -- [del](internal_.Hyperdrive-1.md#del) -- [diff](internal_.Hyperdrive-1.md#diff) -- [download](internal_.Hyperdrive-1.md#download) -- [downloadDiff](internal_.Hyperdrive-1.md#downloaddiff) -- [downloadRange](internal_.Hyperdrive-1.md#downloadrange) -- [entries](internal_.Hyperdrive-1.md#entries) -- [entry](internal_.Hyperdrive-1.md#entry) -- [get](internal_.Hyperdrive-1.md#get) -- [getBlobs](internal_.Hyperdrive-1.md#getblobs) -- [list](internal_.Hyperdrive-1.md#list) -- [mirror](internal_.Hyperdrive-1.md#mirror) -- [put](internal_.Hyperdrive-1.md#put) -- [readdir](internal_.Hyperdrive-1.md#readdir) -- [ready](internal_.Hyperdrive-1.md#ready) -- [update](internal_.Hyperdrive-1.md#update) - -## Constructors - -### constructor - -• **new Hyperdrive**(`corestore`, `key?`, `opts?`): [`Hyperdrive`](internal_.Hyperdrive-1.md) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `corestore` | [`Corestore`](internal_.Corestore.md) | -| `key?` | ``null`` \| `Buffer` | -| `opts?` | [`HyperdriveOptions`](../interfaces/internal_.HyperdriveOptions.md) | - -#### Returns - -[`Hyperdrive`](internal_.Hyperdrive-1.md) - -#### Overrides - -TypedEmitter\<HyperdriveEvents\>.constructor - -• **new Hyperdrive**(`corestore`, `opts?`): [`Hyperdrive`](internal_.Hyperdrive-1.md) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `corestore` | [`Corestore`](internal_.Corestore.md) | -| `opts?` | [`HyperdriveOptions`](../interfaces/internal_.HyperdriveOptions.md) | - -#### Returns - -[`Hyperdrive`](internal_.Hyperdrive-1.md) - -#### Overrides - -TypedEmitter\<HyperdriveEvents\>.constructor - -## Properties - -### blobs - -• `Readonly` **blobs**: ``null`` \| [`Hyperblobs`](internal_.Hyperblobs-1.md) - -___ - -### contentKey - -• `Readonly` **contentKey**: ``null`` \| `Buffer` - -___ - -### core - -• `Readonly` **core**: `Hypercore`\<``"binary"``, `undefined`\> - -___ - -### db - -• `Readonly` **db**: `any` - -___ - -### discoveryKey - -• `Readonly` **discoveryKey**: ``null`` \| `Buffer` - -___ - -### id - -• `Readonly` **id**: ``null`` \| `string` - -___ - -### key - -• `Readonly` **key**: ``null`` \| `Buffer` - -___ - -### version - -• `Readonly` **version**: `number` - -## Methods - -### batch - -▸ **batch**(): `any` - -#### Returns - -`any` - -___ - -### checkout - -▸ **checkout**(`version`): [`Hyperdrive`](internal_.Hyperdrive-1.md) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `version` | `number` | - -#### Returns - -[`Hyperdrive`](internal_.Hyperdrive-1.md) - -___ - -### clear - -▸ **clear**(`path`, `opts?`): `Promise`\<``null`` \| \{ `blocks`: `number` }\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `path` | `string` | -| `opts?` | `Object` | -| `opts.diff?` | `boolean` | - -#### Returns - -`Promise`\<``null`` \| \{ `blocks`: `number` }\> - -___ - -### createReadStream - -▸ **createReadStream**(`path`, `opts?`): `Readable`\<`any`, `any`, `any`, ``true``, ``false``, `ReadableEvents`\<`any`\>\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `path` | `string` | -| `opts?` | `Object` | -| `opts.core?` | `Hypercore`\<``"binary"``, `undefined`\> | -| `opts.end?` | `number` | -| `opts.length?` | `number` | -| `opts.start?` | `number` | - -#### Returns - -`Readable`\<`any`, `any`, `any`, ``true``, ``false``, `ReadableEvents`\<`any`\>\> - -___ - -### createWriteStream - -▸ **createWriteStream**(`path`, `opts?`): `Writable`\<`any`, `any`, `any`, ``false``, ``true``, `WritableEvents`\<`any`\>\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `path` | `string` | -| `opts?` | `Object` | -| `opts.executable?` | `boolean` | -| `opts.metadata?` | `any` | - -#### Returns - -`Writable`\<`any`, `any`, `any`, ``false``, ``true``, `WritableEvents`\<`any`\>\> - -___ - -### del - -▸ **del**(`path`): `Promise`\<`void`\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `path` | `string` | - -#### Returns - -`Promise`\<`void`\> - -___ - -### diff - -▸ **diff**(`version`, `folder`, `opts?`): `Readable`\<`any`, `any`, `any`, ``true``, ``false``, `ReadableEvents`\<`any`\>\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `version` | `number` | -| `folder` | `string` | -| `opts?` | `any` | - -#### Returns - -`Readable`\<`any`, `any`, `any`, ``true``, ``false``, `ReadableEvents`\<`any`\>\> - -___ - -### download - -▸ **download**(`folder?`, `opts?`): `Readable`\<`any`, `any`, `any`, ``true``, ``false``, `ReadableEvents`\<`any`\>\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `folder?` | `string` | -| `opts?` | `Object` | -| `opts.recursive?` | `boolean` | - -#### Returns - -`Readable`\<`any`, `any`, `any`, ``true``, ``false``, `ReadableEvents`\<`any`\>\> - -___ - -### downloadDiff - -▸ **downloadDiff**(`version`, `folder`, `opts?`): `Readable`\<`any`, `any`, `any`, ``true``, ``false``, `ReadableEvents`\<`any`\>\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `version` | `number` | -| `folder` | `string` | -| `opts?` | `any` | - -#### Returns - -`Readable`\<`any`, `any`, `any`, ``true``, ``false``, `ReadableEvents`\<`any`\>\> - -___ - -### downloadRange - -▸ **downloadRange**(`dbRanges`, `blobRanges`): `Object` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `dbRanges` | [`Range`](../modules/internal_.md#range) | -| `blobRanges` | [`Range`](../modules/internal_.md#range) | - -#### Returns - -`Object` - -| Name | Type | -| :------ | :------ | -| `destroy` | () => `void` | -| `done` | `Promise`\<`void`\> | - -___ - -### entries - -▸ **entries**(`opts`): `Readable`\<`any`, `any`, `any`, ``true``, ``false``, `ReadableEvents`\<`any`\>\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `opts` | `any` | - -#### Returns - -`Readable`\<`any`, `any`, `any`, ``true``, ``false``, `ReadableEvents`\<`any`\>\> - -___ - -### entry - -▸ **entry**(`path`, `opts?`): `Promise`\<``null`` \| [`HyperdriveEntry`](../interfaces/internal_.Hyperdrive.HyperdriveEntry.md)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `path` | `string` | -| `opts?` | [`HyperdriveGetOpts`](../interfaces/internal_.HyperdriveGetOpts.md) | - -#### Returns - -`Promise`\<``null`` \| [`HyperdriveEntry`](../interfaces/internal_.Hyperdrive.HyperdriveEntry.md)\> - -___ - -### get - -▸ **get**(`path`, `opts?`): `Promise`\<``null`` \| `Buffer`\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `path` | `string` | -| `opts?` | \{ `follow?`: `boolean` } & [`HyperdriveGetOpts`](../interfaces/internal_.HyperdriveGetOpts.md) | - -#### Returns - -`Promise`\<``null`` \| `Buffer`\> - -___ - -### getBlobs - -▸ **getBlobs**(): `Promise`\<``null`` \| [`Hyperblobs`](internal_.Hyperblobs-1.md)\> - -#### Returns - -`Promise`\<``null`` \| [`Hyperblobs`](internal_.Hyperblobs-1.md)\> - -___ - -### list - -▸ **list**(`folder`, `opts?`): `Readable`\<`any`, `any`, `any`, ``true``, ``false``, `ReadableEvents`\<`any`\>\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `folder` | `string` | -| `opts?` | `Object` | -| `opts.recursive?` | `boolean` | - -#### Returns - -`Readable`\<`any`, `any`, `any`, ``true``, ``false``, `ReadableEvents`\<`any`\>\> - -___ - -### mirror - -▸ **mirror**(): `any` - -#### Returns - -`any` - -___ - -### put - -▸ **put**(`path`, `blob`, `opts?`): `Promise`\<`void`\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `path` | `string` | -| `blob` | `Buffer` | -| `opts?` | `Object` | -| `opts.executable?` | `boolean` | -| `opts.metadata?` | `any` | - -#### Returns - -`Promise`\<`void`\> - -___ - -### readdir - -▸ **readdir**(`folder`): `Readable`\<`any`, `any`, `any`, ``true``, ``false``, `ReadableEvents`\<`any`\>\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `folder` | `string` | - -#### Returns - -`Readable`\<`any`, `any`, `any`, ``true``, ``false``, `ReadableEvents`\<`any`\>\> - -___ - -### ready - -▸ **ready**(): `Promise`\<`void`\> - -#### Returns - -`Promise`\<`void`\> - -___ - -### update - -▸ **update**(`options?`): `Promise`\<`Boolean`\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `options?` | `Object` | -| `options.wait?` | `boolean` | - -#### Returns - -`Promise`\<`Boolean`\> diff --git a/docs/api/md/classes/internal_.IconApi.md b/docs/api/md/classes/internal_.IconApi.md deleted file mode 100644 index 6475e25eb..000000000 --- a/docs/api/md/classes/internal_.IconApi.md +++ /dev/null @@ -1,88 +0,0 @@ -[API](../README.md) / [\](../modules/internal_.md) / IconApi - -# Class: IconApi - -[\](../modules/internal_.md).IconApi - -## Table of contents - -### Constructors - -- [constructor](internal_.IconApi.md#constructor) - -### Methods - -- [[kGetIconBlob]](internal_.IconApi.md#[kgeticonblob]) -- [create](internal_.IconApi.md#create) -- [getIconUrl](internal_.IconApi.md#geticonurl) - -## Constructors - -### constructor - -• **new IconApi**(`opts`): [`IconApi`](internal_.IconApi.md) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `opts` | `Object` | -| `opts.getMediaBaseUrl` | () => `Promise`\<`string`\> | -| `opts.iconDataStore` | [`DataStore`](internal_.DataStore.md)\<``"config"``, ``"translation"`` \| ``"projectSettings"`` \| ``"preset"`` \| ``"icon"`` \| ``"field"`` \| ``"deviceInfo"``\> | -| `opts.iconDataType` | [`DataType`](internal_.DataType.md)\<[`DataStore`](internal_.DataStore.md)\<``"config"``, ``"translation"`` \| ``"projectSettings"`` \| ``"preset"`` \| ``"icon"`` \| ``"field"`` \| ``"deviceInfo"``\>, `SQLiteTableWithColumns`\<{}\>, ``"icon"``, {}, {}\> | - -#### Returns - -[`IconApi`](internal_.IconApi.md) - -## Methods - -### [kGetIconBlob] - -▸ **[kGetIconBlob]**(`iconId`, `opts`): `Promise`\<`Buffer`\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `iconId` | `string` | -| `opts` | [`BitmapOpts`](../interfaces/internal_.BitmapOpts.md) \| [`SvgOpts`](../interfaces/internal_.SvgOpts.md) | - -#### Returns - -`Promise`\<`Buffer`\> - -___ - -### create - -▸ **create**(`icon`): `Promise`\<`string`\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `icon` | `Object` | -| `icon.name` | `string` | -| `icon.variants` | [`BitmapOpts`](../interfaces/internal_.BitmapOpts.md) \| [`SvgOpts`](../interfaces/internal_.SvgOpts.md) & \{ `blob`: `Buffer` }[] | - -#### Returns - -`Promise`\<`string`\> - -___ - -### getIconUrl - -▸ **getIconUrl**(`iconId`, `opts`): `Promise`\<`string`\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `iconId` | `string` | -| `opts` | [`BitmapOpts`](../interfaces/internal_.BitmapOpts.md) \| [`SvgOpts`](../interfaces/internal_.SvgOpts.md) | - -#### Returns - -`Promise`\<`string`\> diff --git a/docs/api/md/classes/internal_.Index.md b/docs/api/md/classes/internal_.Index.md deleted file mode 100644 index 941d144f7..000000000 --- a/docs/api/md/classes/internal_.Index.md +++ /dev/null @@ -1,132 +0,0 @@ -[API](../README.md) / [\](../modules/internal_.md) / Index - -# Class: Index - -[\](../modules/internal_.md).Index - -## Hierarchy - -- **`Index`** - - ↳ [`SparseIndex`](internal_.SparseIndex.md) - - ↳ [`DenseIndex`](internal_.DenseIndex.md) - -## Table of contents - -### Constructors - -- [constructor](internal_.Index.md#constructor) - -### Properties - -- [byteLength](internal_.Index.md#bytelength) - -### Methods - -- [skipFirst](internal_.Index.md#skipfirst) -- [skipLast](internal_.Index.md#skiplast) -- [update](internal_.Index.md#update) -- [from](internal_.Index.md#from) - -## Constructors - -### constructor - -• **new Index**(`byteLength`): [`Index`](internal_.Index.md) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `byteLength` | `number` | - -#### Returns - -[`Index`](internal_.Index.md) - -## Properties - -### byteLength - -• `Readonly` **byteLength**: `number` - -## Methods - -### skipFirst - -▸ **skipFirst**(`value`, `position?`): `number` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `value` | `boolean` | -| `position?` | `number` | - -#### Returns - -`number` - -___ - -### skipLast - -▸ **skipLast**(`value`, `position?`): `number` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `value` | `boolean` | -| `position?` | `number` | - -#### Returns - -`number` - -___ - -### update - -▸ **update**(`bit`): `boolean` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `bit` | `number` | - -#### Returns - -`boolean` - -___ - -### from - -▸ **from**(`field`, `byteLength`): [`DenseIndex`](internal_.DenseIndex.md) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `field` | `TypedArray` | -| `byteLength` | `number` | - -#### Returns - -[`DenseIndex`](internal_.DenseIndex.md) - -▸ **from**(`chunks`, `byteLength`): [`SparseIndex`](internal_.SparseIndex.md) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `chunks` | [`Chunk`](../modules/internal_.md#chunk)[] | -| `byteLength` | `number` | - -#### Returns - -[`SparseIndex`](internal_.SparseIndex.md) diff --git a/docs/api/md/classes/internal_.IndexWriter.md b/docs/api/md/classes/internal_.IndexWriter.md deleted file mode 100644 index 045b32be8..000000000 --- a/docs/api/md/classes/internal_.IndexWriter.md +++ /dev/null @@ -1,80 +0,0 @@ -[API](../README.md) / [\](../modules/internal_.md) / IndexWriter - -# Class: IndexWriter\ - -[\](../modules/internal_.md).IndexWriter - -## Type parameters - -| Name | Type | -| :------ | :------ | -| `TTables` | [`MapeoDocTables`](../modules/internal_.md#mapeodoctables) | - -## Table of contents - -### Constructors - -- [constructor](internal_.IndexWriter.md#constructor) - -### Accessors - -- [schemas](internal_.IndexWriter.md#schemas) - -### Methods - -- [batch](internal_.IndexWriter.md#batch) - -## Constructors - -### constructor - -• **new IndexWriter**\<`TTables`\>(`opts`): [`IndexWriter`](internal_.IndexWriter.md)\<`TTables`\> - -#### Type parameters - -| Name | Type | -| :------ | :------ | -| `TTables` | extends [`MapeoDocTables`](../modules/internal_.md#mapeodoctables-1) = [`MapeoDocTables`](../modules/internal_.md#mapeodoctables-1) | - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `opts` | `Object` | | -| `opts.getWinner` | `undefined` \| \(`docA`: `T`, `docB`: `U`) => `T` \| `U` | custom function to determine the "winner" of two forked documents. Defaults to choosing the document with the most recent `updatedAt` | -| `opts.logger` | `undefined` \| [`Logger`](internal_.Logger.md) | | -| `opts.mapDoc` | `undefined` \| (`doc`: `MapeoDocInternal`, `version`: `VersionIdObject`) => `MapeoDoc` | optionally transform a document prior to indexing. Can also validate, if an error is thrown then the document will not be indexed | -| `opts.sqlite` | `Database` | | -| `opts.tables` | `TTables`[] | | - -#### Returns - -[`IndexWriter`](internal_.IndexWriter.md)\<`TTables`\> - -## Accessors - -### schemas - -• `get` **schemas**(): `TTables`[``"_"``][``"name"``][] - -#### Returns - -`TTables`[``"_"``][``"name"``][] - -## Methods - -### batch - -▸ **batch**(`entries`): `Promise`\<[`IndexedDocIds`](../modules/internal_.md#indexeddocids)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `entries` | `Entry`\<``"binary"``\>[] | - -#### Returns - -`Promise`\<[`IndexedDocIds`](../modules/internal_.md#indexeddocids)\> - -map of indexed docIds by schemaName diff --git a/docs/api/md/classes/internal_.InviteApi.md b/docs/api/md/classes/internal_.InviteApi.md deleted file mode 100644 index a8b940fc8..000000000 --- a/docs/api/md/classes/internal_.InviteApi.md +++ /dev/null @@ -1,109 +0,0 @@ -[API](../README.md) / [\](../modules/internal_.md) / InviteApi - -# Class: InviteApi - -[\](../modules/internal_.md).InviteApi - -## Hierarchy - -- `TypedEmitter` - - ↳ **`InviteApi`** - -## Table of contents - -### Constructors - -- [constructor](internal_.InviteApi.md#constructor) - -### Properties - -- [rpc](internal_.InviteApi.md#rpc) - -### Methods - -- [accept](internal_.InviteApi.md#accept) -- [getPending](internal_.InviteApi.md#getpending) -- [reject](internal_.InviteApi.md#reject) - -## Constructors - -### constructor - -• **new InviteApi**(`options`): [`InviteApi`](internal_.InviteApi.md) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `options` | `Object` | -| `options.logger` | `undefined` \| [`Logger`](internal_.Logger.md) | -| `options.queries` | `Object` | -| `options.queries.addProject` | (`projectDetails`: `Pick`\<`ProjectJoinDetails`, ``"projectKey"`` \| ``"encryptionKeys"``\> & \{ `projectName`: `string` }) => `Promise`\<`unknown`\> | -| `options.queries.isMember` | (`projectId`: `string`) => `boolean` | -| `options.rpc` | [`LocalPeers`](internal_.LocalPeers.md) | - -#### Returns - -[`InviteApi`](internal_.InviteApi.md) - -#### Overrides - -TypedEmitter.constructor - -## Properties - -### rpc - -• **rpc**: [`LocalPeers`](internal_.LocalPeers.md) - -## Methods - -### accept - -▸ **accept**(`invite`): `Promise`\<`string`\> - -Attempt to accept the invite. - -This can fail if the invitor has canceled the invite or if you cannot -connect to the invitor's device. - -If the invite is accepted and you had other invites to the same project, -those invites are removed, and the invitors are told that you're already -part of this project. - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `invite` | `Pick`\<[`MapBuffers`](../modules/internal_.md#mapbuffers)\<[`InviteInternal`](../modules/internal_.md#inviteinternal)\>, ``"inviteId"``\> | - -#### Returns - -`Promise`\<`string`\> - -___ - -### getPending - -▸ **getPending**(): [`MapBuffers`](../modules/internal_.md#mapbuffers)\<[`InviteInternal`](../modules/internal_.md#inviteinternal)\>[] - -#### Returns - -[`MapBuffers`](../modules/internal_.md#mapbuffers)\<[`InviteInternal`](../modules/internal_.md#inviteinternal)\>[] - -___ - -### reject - -▸ **reject**(`invite`): `void` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `invite` | `Pick`\<[`MapBuffers`](../modules/internal_.md#mapbuffers)\<[`InviteInternal`](../modules/internal_.md#inviteinternal)\>, ``"inviteId"``\> | - -#### Returns - -`void` diff --git a/docs/api/md/classes/internal_.LiveDownload.md b/docs/api/md/classes/internal_.LiveDownload.md deleted file mode 100644 index dce2f2bbb..000000000 --- a/docs/api/md/classes/internal_.LiveDownload.md +++ /dev/null @@ -1,59 +0,0 @@ -[API](../README.md) / [\](../modules/internal_.md) / LiveDownload - -# Class: LiveDownload - -[\](../modules/internal_.md).LiveDownload - -LiveDownload class - -## Hierarchy - -- `TypedEmitter` - - ↳ **`LiveDownload`** - -## Table of contents - -### Constructors - -- [constructor](internal_.LiveDownload.md#constructor) - -### Accessors - -- [state](internal_.LiveDownload.md#state) - -## Constructors - -### constructor - -• **new LiveDownload**(`drives`, `emitter`, `options`): [`LiveDownload`](internal_.LiveDownload.md) - -Like drive.download() but 'live', and for multiple drives - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `drives` | `Iterable`\<[`Hyperdrive`](internal_.Hyperdrive-1.md)\> | | -| `emitter` | [`InternalDriveEmitter`](../modules/internal_.md#internaldriveemitter) | | -| `options` | `Object` | | -| `options.filter` | `undefined` \| [`BlobFilter`](../modules/internal_.md#blobfilter) | Filter blobs of specific types and/or sizes to download | -| `options.signal` | `undefined` \| `AbortSignal` | | - -#### Returns - -[`LiveDownload`](internal_.LiveDownload.md) - -#### Overrides - -TypedEmitter.constructor - -## Accessors - -### state - -• `get` **state**(): [`BlobDownloadState`](../interfaces/internal_.BlobDownloadState.md) \| [`BlobDownloadStateError`](../modules/internal_.md#blobdownloadstateerror) - -#### Returns - -[`BlobDownloadState`](../interfaces/internal_.BlobDownloadState.md) \| [`BlobDownloadStateError`](../modules/internal_.md#blobdownloadstateerror) diff --git a/docs/api/md/classes/internal_.LocalDiscovery.md b/docs/api/md/classes/internal_.LocalDiscovery.md deleted file mode 100644 index 0e9970470..000000000 --- a/docs/api/md/classes/internal_.LocalDiscovery.md +++ /dev/null @@ -1,121 +0,0 @@ -[API](../README.md) / [\](../modules/internal_.md) / LocalDiscovery - -# Class: LocalDiscovery - -[\](../modules/internal_.md).LocalDiscovery - -## Hierarchy - -- `TypedEmitter` - - ↳ **`LocalDiscovery`** - -## Table of contents - -### Constructors - -- [constructor](internal_.LocalDiscovery.md#constructor) - -### Accessors - -- [connections](internal_.LocalDiscovery.md#connections) -- [publicKey](internal_.LocalDiscovery.md#publickey) - -### Methods - -- [connectPeer](internal_.LocalDiscovery.md#connectpeer) -- [start](internal_.LocalDiscovery.md#start) -- [stop](internal_.LocalDiscovery.md#stop) - -## Constructors - -### constructor - -• **new LocalDiscovery**(`opts`): [`LocalDiscovery`](internal_.LocalDiscovery.md) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `opts` | `Object` | -| `opts.identityKeypair` | [`Keypair`](../modules/internal_.md#keypair-1) | -| `opts.logger` | `undefined` \| [`Logger`](internal_.Logger.md) | - -#### Returns - -[`LocalDiscovery`](internal_.LocalDiscovery.md) - -#### Overrides - -TypedEmitter.constructor - -## Accessors - -### connections - -• `get` **connections**(): `IterableIterator`\<[`OpenedNoiseStream`](../modules/internal_.md#openednoisestream-1)\> - -#### Returns - -`IterableIterator`\<[`OpenedNoiseStream`](../modules/internal_.md#openednoisestream-1)\> - -___ - -### publicKey - -• `get` **publicKey**(): `Buffer` - -#### Returns - -`Buffer` - -## Methods - -### connectPeer - -▸ **connectPeer**(`peer`): `void` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `peer` | `Object` | -| `peer.address` | `string` | -| `peer.name` | `string` | -| `peer.port` | `number` | - -#### Returns - -`void` - -___ - -### start - -▸ **start**(): `Promise`\<\{ `name`: `string` ; `port`: `number` }\> - -#### Returns - -`Promise`\<\{ `name`: `string` ; `port`: `number` }\> - -___ - -### stop - -▸ **stop**(`opts?`): `Promise`\<`void`\> - -Close all servers and stop multicast advertising and browsing. Will wait -for open sockets to close unless opts.force=true in which case open sockets -are force-closed after opts.timeout milliseconds - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `opts?` | `Object` | | -| `opts.force` | `undefined` \| `boolean` | Force-close open sockets after timeout milliseconds | -| `opts.timeout` | `undefined` \| `number` | Optional timeout when calling stop() with force=true | - -#### Returns - -`Promise`\<`void`\> diff --git a/docs/api/md/classes/internal_.LocalPeers.md b/docs/api/md/classes/internal_.LocalPeers.md deleted file mode 100644 index bd2200cb1..000000000 --- a/docs/api/md/classes/internal_.LocalPeers.md +++ /dev/null @@ -1,184 +0,0 @@ -[API](../README.md) / [\](../modules/internal_.md) / LocalPeers - -# Class: LocalPeers - -[\](../modules/internal_.md).LocalPeers - -## Hierarchy - -- `TypedEmitter` - - ↳ **`LocalPeers`** - -## Table of contents - -### Constructors - -- [constructor](internal_.LocalPeers.md#constructor) - -### Accessors - -- [peers](internal_.LocalPeers.md#peers) - -### Methods - -- [[kTestOnlySendRawInvite]](internal_.LocalPeers.md#[ktestonlysendrawinvite]) -- [connect](internal_.LocalPeers.md#connect) -- [sendDeviceInfo](internal_.LocalPeers.md#senddeviceinfo) -- [sendInvite](internal_.LocalPeers.md#sendinvite) -- [sendInviteCancel](internal_.LocalPeers.md#sendinvitecancel) -- [sendInviteResponse](internal_.LocalPeers.md#sendinviteresponse) -- [sendProjectJoinDetails](internal_.LocalPeers.md#sendprojectjoindetails) - -## Constructors - -### constructor - -• **new LocalPeers**(`opts?`): [`LocalPeers`](internal_.LocalPeers.md) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `opts?` | `Object` | -| `opts.logger` | `undefined` \| [`Logger`](internal_.Logger.md) | - -#### Returns - -[`LocalPeers`](internal_.LocalPeers.md) - -#### Overrides - -TypedEmitter.constructor - -## Accessors - -### peers - -• `get` **peers**(): ([`PeerInfoBase`](../interfaces/internal_.PeerInfoBase.md) & \{ `connectedAt`: `number` ; `protomux`: [`Protomux`](internal_.Protomux.md)\<`NoiseSecretStream`\<`Duplex`\<`any`, `any`, `any`, `any`, ``true``, ``true``, `DuplexEvents`\<`any`, `any`\>\>\>\> ; `status`: ``"connected"`` } \| [`PeerInfoBase`](../interfaces/internal_.PeerInfoBase.md) & \{ `disconnectedAt`: `number` ; `status`: ``"disconnected"`` })[] - -#### Returns - -([`PeerInfoBase`](../interfaces/internal_.PeerInfoBase.md) & \{ `connectedAt`: `number` ; `protomux`: [`Protomux`](internal_.Protomux.md)\<`NoiseSecretStream`\<`Duplex`\<`any`, `any`, `any`, `any`, ``true``, ``true``, `DuplexEvents`\<`any`, `any`\>\>\>\> ; `status`: ``"connected"`` } \| [`PeerInfoBase`](../interfaces/internal_.PeerInfoBase.md) & \{ `disconnectedAt`: `number` ; `status`: ``"disconnected"`` })[] - -## Methods - -### [kTestOnlySendRawInvite] - -▸ **[kTestOnlySendRawInvite]**(`deviceId`, `buf`): `Promise`\<`void`\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `deviceId` | `string` | -| `buf` | `Buffer` | - -#### Returns - -`Promise`\<`void`\> - -___ - -### connect - -▸ **connect**(`stream`): [`ReplicationStream`](../modules/internal_.md#replicationstream) - -Connect to a peer over an existing NoiseSecretStream - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `stream` | `NoiseSecretStream`\<`any`\> | a NoiseSecretStream from @hyperswarm/secret-stream | - -#### Returns - -[`ReplicationStream`](../modules/internal_.md#replicationstream) - -___ - -### sendDeviceInfo - -▸ **sendDeviceInfo**(`deviceId`, `deviceInfo`): `Promise`\<`void`\> - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `deviceId` | `string` | id of the peer you want to send to (publicKey of peer as hex string) | -| `deviceInfo` | `DeviceInfo` | device info to send | - -#### Returns - -`Promise`\<`void`\> - -___ - -### sendInvite - -▸ **sendInvite**(`deviceId`, `invite`): `Promise`\<`void`\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `deviceId` | `string` | -| `invite` | `Invite` | - -#### Returns - -`Promise`\<`void`\> - -___ - -### sendInviteCancel - -▸ **sendInviteCancel**(`deviceId`, `inviteCancel`): `Promise`\<`void`\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `deviceId` | `string` | -| `inviteCancel` | `InviteCancel` | - -#### Returns - -`Promise`\<`void`\> - -___ - -### sendInviteResponse - -▸ **sendInviteResponse**(`deviceId`, `inviteResponse`): `Promise`\<`void`\> - -Respond to an invite from a peer - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `deviceId` | `string` | id of the peer you want to respond to (publicKey of peer as hex string) | -| `inviteResponse` | `InviteResponse` | | - -#### Returns - -`Promise`\<`void`\> - -___ - -### sendProjectJoinDetails - -▸ **sendProjectJoinDetails**(`deviceId`, `details`): `Promise`\<`void`\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `deviceId` | `string` | -| `details` | `ProjectJoinDetails` | - -#### Returns - -`Promise`\<`void`\> diff --git a/docs/api/md/classes/internal_.Logger.md b/docs/api/md/classes/internal_.Logger.md deleted file mode 100644 index 0042a8039..000000000 --- a/docs/api/md/classes/internal_.Logger.md +++ /dev/null @@ -1,109 +0,0 @@ -[API](../README.md) / [\](../modules/internal_.md) / Logger - -# Class: Logger - -[\](../modules/internal_.md).Logger - -## Table of contents - -### Constructors - -- [constructor](internal_.Logger.md#constructor) - -### Properties - -- [deviceId](internal_.Logger.md#deviceid) - -### Accessors - -- [enabled](internal_.Logger.md#enabled) - -### Methods - -- [extend](internal_.Logger.md#extend) -- [log](internal_.Logger.md#log) -- [create](internal_.Logger.md#create) - -## Constructors - -### constructor - -• **new Logger**(`opts`): [`Logger`](internal_.Logger.md) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `opts` | `Object` | -| `opts.baseLogger` | `undefined` \| `Debugger` | -| `opts.deviceId` | `string` | -| `opts.ns` | `undefined` \| `string` | - -#### Returns - -[`Logger`](internal_.Logger.md) - -## Properties - -### deviceId - -• **deviceId**: `string` - -## Accessors - -### enabled - -• `get` **enabled**(): `boolean` - -#### Returns - -`boolean` - -## Methods - -### extend - -▸ **extend**(`ns`): [`Logger`](internal_.Logger.md) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `ns` | `string` | - -#### Returns - -[`Logger`](internal_.Logger.md) - -___ - -### log - -▸ **log**(`...args`): `void` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `...args` | [formatter: any, ...args: any[]] | - -#### Returns - -`void` - -___ - -### create - -▸ **create**(`ns`, `logger?`): [`Logger`](internal_.Logger.md) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `ns` | `string` | -| `logger?` | [`Logger`](internal_.Logger.md) | - -#### Returns - -[`Logger`](internal_.Logger.md) diff --git a/docs/api/md/classes/internal_.MapeoProject.md b/docs/api/md/classes/internal_.MapeoProject.md deleted file mode 100644 index 2fa8dc7ab..000000000 --- a/docs/api/md/classes/internal_.MapeoProject.md +++ /dev/null @@ -1,365 +0,0 @@ -[API](../README.md) / [\](../modules/internal_.md) / MapeoProject - -# Class: MapeoProject - -[\](../modules/internal_.md).MapeoProject - -## Hierarchy - -- `TypedEmitter` - - ↳ **`MapeoProject`** - -## Table of contents - -### Constructors - -- [constructor](internal_.MapeoProject.md#constructor) - -### Properties - -- [$blobs](internal_.MapeoProject.md#$blobs) -- [EMPTY\_PROJECT\_SETTINGS](internal_.MapeoProject.md#empty_project_settings) - -### Accessors - -- [$icons](internal_.MapeoProject.md#$icons) -- [$member](internal_.MapeoProject.md#$member) -- [$sync](internal_.MapeoProject.md#$sync) -- [$translation](internal_.MapeoProject.md#$translation) -- [[kBlobStore]](internal_.MapeoProject.md#[kblobstore]) -- [[kCoreManager]](internal_.MapeoProject.md#[kcoremanager]) -- [[kCoreOwnership]](internal_.MapeoProject.md#[kcoreownership]) -- [[kDataTypes]](internal_.MapeoProject.md#[kdatatypes]) -- [deviceId](internal_.MapeoProject.md#deviceid) -- [field](internal_.MapeoProject.md#field) -- [observation](internal_.MapeoProject.md#observation) -- [preset](internal_.MapeoProject.md#preset) -- [track](internal_.MapeoProject.md#track) - -### Methods - -- [$getOwnRole](internal_.MapeoProject.md#$getownrole) -- [$getProjectSettings](internal_.MapeoProject.md#$getprojectsettings) -- [$setProjectSettings](internal_.MapeoProject.md#$setprojectsettings) -- [[kProjectLeave]](internal_.MapeoProject.md#[kprojectleave]) -- [[kProjectReplicate]](internal_.MapeoProject.md#[kprojectreplicate]) -- [[kSetOwnDeviceInfo]](internal_.MapeoProject.md#[ksetowndeviceinfo]) -- [close](internal_.MapeoProject.md#close) -- [importConfig](internal_.MapeoProject.md#importconfig) -- [ready](internal_.MapeoProject.md#ready) - -## Constructors - -### constructor - -• **new MapeoProject**(`opts`): [`MapeoProject`](internal_.MapeoProject.md) - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `opts` | `Object` | | -| `opts.coreStorage` | [`CoreStorage`](../modules/internal_.md#corestorage) | Folder to store all hypercore data | -| `opts.dbPath` | `string` | Path to store project sqlite db. Use `:memory:` for memory storage | -| `opts.encryptionKeys` | `EncryptionKeys` | Encryption keys for each namespace | -| `opts.getMediaBaseUrl` | (`mediaType`: ``"blobs"`` \| ``"icons"``) => `Promise`\<`string`\> | | -| `opts.keyManager` | `KeyManager` | mapeo/crypto KeyManager instance | -| `opts.localPeers` | [`LocalPeers`](internal_.LocalPeers.md) | | -| `opts.logger` | `undefined` \| [`Logger`](internal_.Logger.md) | | -| `opts.projectKey` | `Buffer` | 32-byte public key of the project creator core | -| `opts.projectMigrationsFolder` | `string` | path for drizzle migration folder for project | -| `opts.projectSecretKey` | `undefined` \| `Buffer` | 32-byte secret key of the project creator core | -| `opts.sharedDb` | `BetterSQLite3Database`\<`Record`\<`string`, `never`\>\> | | -| `opts.sharedIndexWriter` | [`IndexWriter`](internal_.IndexWriter.md)\<[`MapeoDocTables`](../modules/internal_.md#mapeodoctables-1)\> | | - -#### Returns - -[`MapeoProject`](internal_.MapeoProject.md) - -#### Overrides - -TypedEmitter.constructor - -## Properties - -### $blobs - -• **$blobs**: [`BlobApi`](internal_.BlobApi.md) - -___ - -### EMPTY\_PROJECT\_SETTINGS - -▪ `Static` **EMPTY\_PROJECT\_SETTINGS**: `Readonly`\<{}\> = `EMPTY_PROJECT_SETTINGS` - -## Accessors - -### $icons - -• `get` **$icons**(): [`IconApi`](internal_.IconApi.md) - -#### Returns - -[`IconApi`](internal_.IconApi.md) - -___ - -### $member - -• `get` **$member**(): [`MemberApi`](internal_.MemberApi.md) - -#### Returns - -[`MemberApi`](internal_.MemberApi.md) - -___ - -### $sync - -• `get` **$sync**(): [`SyncApi`](internal_.SyncApi.md) - -#### Returns - -[`SyncApi`](internal_.SyncApi.md) - -___ - -### $translation - -• `get` **$translation**(): [`default`](internal_.default.md) - -#### Returns - -[`default`](internal_.default.md) - -___ - -### [kBlobStore] - -• `get` **[kBlobStore]**(): [`BlobStore`](internal_.BlobStore.md) - -#### Returns - -[`BlobStore`](internal_.BlobStore.md) - -___ - -### [kCoreManager] - -• `get` **[kCoreManager]**(): [`CoreManager`](internal_.CoreManager.md) - -CoreManager instance, used for tests - -#### Returns - -[`CoreManager`](internal_.CoreManager.md) - -___ - -### [kCoreOwnership] - -• `get` **[kCoreOwnership]**(): [`CoreOwnership`](internal_.CoreOwnership.md) - -CoreOwnership instance, used for tests - -#### Returns - -[`CoreOwnership`](internal_.CoreOwnership.md) - -___ - -### [kDataTypes] - -• `get` **[kDataTypes]**(): `Object` - -DataTypes object mappings, used for tests - -#### Returns - -`Object` - -| Name | Type | -| :------ | :------ | -| `coreOwnership` | [`DataType`](internal_.DataType.md)\<[`DataStore`](internal_.DataStore.md)\<``"auth"``, ``"role"`` \| ``"coreOwnership"``\>, `SQLiteTableWithColumns`\<{}\>, ``"coreOwnership"``, {}, {}\> | -| `deviceInfo` | [`DataType`](internal_.DataType.md)\<[`DataStore`](internal_.DataStore.md)\<``"config"``, ``"translation"`` \| ``"projectSettings"`` \| ``"preset"`` \| ``"icon"`` \| ``"field"`` \| ``"deviceInfo"``\>, `SQLiteTableWithColumns`\<{}\>, ``"deviceInfo"``, {}, {}\> | -| `field` | [`DataType`](internal_.DataType.md)\<[`DataStore`](internal_.DataStore.md)\<``"config"``, ``"translation"`` \| ``"projectSettings"`` \| ``"preset"`` \| ``"icon"`` \| ``"field"`` \| ``"deviceInfo"``\>, `SQLiteTableWithColumns`\<{}\>, ``"field"``, {}, {}\> | -| `icon` | [`DataType`](internal_.DataType.md)\<[`DataStore`](internal_.DataStore.md)\<``"config"``, ``"translation"`` \| ``"projectSettings"`` \| ``"preset"`` \| ``"icon"`` \| ``"field"`` \| ``"deviceInfo"``\>, `SQLiteTableWithColumns`\<{}\>, ``"icon"``, {}, {}\> | -| `observation` | [`DataType`](internal_.DataType.md)\<[`DataStore`](internal_.DataStore.md)\<``"data"``, ``"track"`` \| ``"observation"``\>, `SQLiteTableWithColumns`\<{}\>, ``"observation"``, {}, {}\> | -| `preset` | [`DataType`](internal_.DataType.md)\<[`DataStore`](internal_.DataStore.md)\<``"config"``, ``"translation"`` \| ``"projectSettings"`` \| ``"preset"`` \| ``"icon"`` \| ``"field"`` \| ``"deviceInfo"``\>, `SQLiteTableWithColumns`\<{}\>, ``"preset"``, {}, {}\> | -| `projectSettings` | [`DataType`](internal_.DataType.md)\<[`DataStore`](internal_.DataStore.md)\<``"config"``, ``"translation"`` \| ``"projectSettings"`` \| ``"preset"`` \| ``"icon"`` \| ``"field"`` \| ``"deviceInfo"``\>, `SQLiteTableWithColumns`\<{}\>, ``"projectSettings"``, {}, {}\> | -| `role` | [`DataType`](internal_.DataType.md)\<[`DataStore`](internal_.DataStore.md)\<``"auth"``, ``"role"`` \| ``"coreOwnership"``\>, `SQLiteTableWithColumns`\<{}\>, ``"role"``, {}, {}\> | -| `track` | [`DataType`](internal_.DataType.md)\<[`DataStore`](internal_.DataStore.md)\<``"data"``, ``"track"`` \| ``"observation"``\>, `SQLiteTableWithColumns`\<{}\>, ``"track"``, {}, {}\> | -| `translation` | [`DataType`](internal_.DataType.md)\<[`DataStore`](internal_.DataStore.md)\<``"config"``, ``"translation"`` \| ``"projectSettings"`` \| ``"preset"`` \| ``"icon"`` \| ``"field"`` \| ``"deviceInfo"``\>, `SQLiteTableWithColumns`\<{}\>, ``"translation"``, {}, {}\> | - -___ - -### deviceId - -• `get` **deviceId**(): `string` - -#### Returns - -`string` - -___ - -### field - -• `get` **field**(): [`DataType`](internal_.DataType.md)\<[`DataStore`](internal_.DataStore.md)\<``"config"``, ``"translation"`` \| ``"projectSettings"`` \| ``"preset"`` \| ``"icon"`` \| ``"field"`` \| ``"deviceInfo"``\>, `SQLiteTableWithColumns`\<{}\>, ``"field"``, {}, {}\> - -#### Returns - -[`DataType`](internal_.DataType.md)\<[`DataStore`](internal_.DataStore.md)\<``"config"``, ``"translation"`` \| ``"projectSettings"`` \| ``"preset"`` \| ``"icon"`` \| ``"field"`` \| ``"deviceInfo"``\>, `SQLiteTableWithColumns`\<{}\>, ``"field"``, {}, {}\> - -___ - -### observation - -• `get` **observation**(): [`DataType`](internal_.DataType.md)\<[`DataStore`](internal_.DataStore.md)\<``"data"``, ``"track"`` \| ``"observation"``\>, `SQLiteTableWithColumns`\<{}\>, ``"observation"``, {}, {}\> - -#### Returns - -[`DataType`](internal_.DataType.md)\<[`DataStore`](internal_.DataStore.md)\<``"data"``, ``"track"`` \| ``"observation"``\>, `SQLiteTableWithColumns`\<{}\>, ``"observation"``, {}, {}\> - -___ - -### preset - -• `get` **preset**(): [`DataType`](internal_.DataType.md)\<[`DataStore`](internal_.DataStore.md)\<``"config"``, ``"translation"`` \| ``"projectSettings"`` \| ``"preset"`` \| ``"icon"`` \| ``"field"`` \| ``"deviceInfo"``\>, `SQLiteTableWithColumns`\<{}\>, ``"preset"``, {}, {}\> - -#### Returns - -[`DataType`](internal_.DataType.md)\<[`DataStore`](internal_.DataStore.md)\<``"config"``, ``"translation"`` \| ``"projectSettings"`` \| ``"preset"`` \| ``"icon"`` \| ``"field"`` \| ``"deviceInfo"``\>, `SQLiteTableWithColumns`\<{}\>, ``"preset"``, {}, {}\> - -___ - -### track - -• `get` **track**(): [`DataType`](internal_.DataType.md)\<[`DataStore`](internal_.DataStore.md)\<``"data"``, ``"track"`` \| ``"observation"``\>, `SQLiteTableWithColumns`\<{}\>, ``"track"``, {}, {}\> - -#### Returns - -[`DataType`](internal_.DataType.md)\<[`DataStore`](internal_.DataStore.md)\<``"data"``, ``"track"`` \| ``"observation"``\>, `SQLiteTableWithColumns`\<{}\>, ``"track"``, {}, {}\> - -## Methods - -### $getOwnRole - -▸ **$getOwnRole**(): `Promise`\<[`Role`](../interfaces/internal_.Role.md)\<``"a12a6702b93bd7ff"`` \| ``"f7c150f5a3a9a855"`` \| ``"012fd2d431c0bf60"`` \| ``"9e6d29263cba36c9"`` \| ``"8ced989b1904606b"`` \| ``"08e4251e36f6e7ed"``\>\> - -#### Returns - -`Promise`\<[`Role`](../interfaces/internal_.Role.md)\<``"a12a6702b93bd7ff"`` \| ``"f7c150f5a3a9a855"`` \| ``"012fd2d431c0bf60"`` \| ``"9e6d29263cba36c9"`` \| ``"8ced989b1904606b"`` \| ``"08e4251e36f6e7ed"``\>\> - -___ - -### $getProjectSettings - -▸ **$getProjectSettings**(): `Promise`\<[`EditableProjectSettings`](../modules/internal_.md#editableprojectsettings)\> - -#### Returns - -`Promise`\<[`EditableProjectSettings`](../modules/internal_.md#editableprojectsettings)\> - -___ - -### $setProjectSettings - -▸ **$setProjectSettings**(`settings`): `Promise`\<[`EditableProjectSettings`](../modules/internal_.md#editableprojectsettings)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `settings` | `Partial`\<[`EditableProjectSettings`](../modules/internal_.md#editableprojectsettings)\> | - -#### Returns - -`Promise`\<[`EditableProjectSettings`](../modules/internal_.md#editableprojectsettings)\> - -___ - -### [kProjectLeave] - -▸ **[kProjectLeave]**(): `Promise`\<`void`\> - -#### Returns - -`Promise`\<`void`\> - -___ - -### [kProjectReplicate] - -▸ **[kProjectReplicate]**(`stream`): `Duplex`\<`any`, `any`, `any`, `any`, ``true``, ``true``, `DuplexEvents`\<`any`, `any`\>\> & {} & [`Protomux`](internal_.Protomux.md)\<`Duplex`\<`any`, `any`, `any`, `any`, ``true``, ``true``, `DuplexEvents`\<`any`, `any`\>\>\> - -Replicate a project to a @hyperswarm/secret-stream. Invites will not -function because the RPC channel is not connected for project replication, -and only this project will replicate (to replicate multiple projects you -need to replicate the manager instance via manager[kManagerReplicate]) - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `stream` | [`Protomux`](internal_.Protomux.md)\<`Duplex`\<`any`, `any`, `any`, `any`, ``true``, ``true``, `DuplexEvents`\<`any`, `any`\>\>\> | A duplex stream, a @hyperswarm/secret-stream, or a Protomux instance | - -#### Returns - -`Duplex`\<`any`, `any`, `any`, `any`, ``true``, ``true``, `DuplexEvents`\<`any`, `any`\>\> & {} & [`Protomux`](internal_.Protomux.md)\<`Duplex`\<`any`, `any`, `any`, `any`, ``true``, ``true``, `DuplexEvents`\<`any`, `any`\>\>\> - -___ - -### [kSetOwnDeviceInfo] - -▸ **[kSetOwnDeviceInfo]**(`value`): `Promise`\<{}\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `value` | `Pick`\<{}, ``"name"`` \| ``"deviceType"``\> | - -#### Returns - -`Promise`\<{}\> - -___ - -### close - -▸ **close**(): `Promise`\<`void`\> - -#### Returns - -`Promise`\<`void`\> - -___ - -### importConfig - -▸ **importConfig**(`opts`): `Promise`\<`Error`[]\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `opts` | `Object` | -| `opts.configPath` | `string` | - -#### Returns - -`Promise`\<`Error`[]\> - -___ - -### ready - -▸ **ready**(): `Promise`\<`void`\> - -Resolves when hypercores have all loaded - -#### Returns - -`Promise`\<`void`\> diff --git a/docs/api/md/classes/internal_.MemberApi.md b/docs/api/md/classes/internal_.MemberApi.md deleted file mode 100644 index e6ef6ee7e..000000000 --- a/docs/api/md/classes/internal_.MemberApi.md +++ /dev/null @@ -1,140 +0,0 @@ -[API](../README.md) / [\](../modules/internal_.md) / MemberApi - -# Class: MemberApi - -[\](../modules/internal_.md).MemberApi - -## Hierarchy - -- `TypedEmitter` - - ↳ **`MemberApi`** - -## Table of contents - -### Constructors - -- [constructor](internal_.MemberApi.md#constructor) - -### Methods - -- [assignRole](internal_.MemberApi.md#assignrole) -- [getById](internal_.MemberApi.md#getbyid) -- [getMany](internal_.MemberApi.md#getmany) -- [invite](internal_.MemberApi.md#invite) -- [requestCancelInvite](internal_.MemberApi.md#requestcancelinvite) - -## Constructors - -### constructor - -• **new MemberApi**(`opts`): [`MemberApi`](internal_.MemberApi.md) - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `opts` | `Object` | | -| `opts.coreOwnership` | [`CoreOwnership`](internal_.CoreOwnership.md) | | -| `opts.dataTypes` | `Object` | | -| `opts.dataTypes.deviceInfo` | `Pick`\<[`DataType`](internal_.DataType.md)\<[`DataStore`](internal_.DataStore.md)\<``"config"``, ``"translation"`` \| ``"projectSettings"`` \| ``"preset"`` \| ``"icon"`` \| ``"field"`` \| ``"deviceInfo"``\>, `SQLiteTableWithColumns`\<{}\>, ``"deviceInfo"``, {}, {}\>, ``"getByDocId"`` \| ``"getMany"``\> | - | -| `opts.dataTypes.project` | `Pick`\<[`DataType`](internal_.DataType.md)\<[`DataStore`](internal_.DataStore.md)\<``"config"``, ``"translation"`` \| ``"projectSettings"`` \| ``"preset"`` \| ``"icon"`` \| ``"field"`` \| ``"deviceInfo"``\>, `SQLiteTableWithColumns`\<{}\>, ``"projectSettings"``, {}, {}\>, ``"getByDocId"``\> | - | -| `opts.deviceId` | `string` | public key of this device as hex string | -| `opts.encryptionKeys` | `EncryptionKeys` | | -| `opts.projectKey` | `Buffer` | | -| `opts.roles` | [`Roles`](internal_.Roles.md) | | -| `opts.rpc` | [`LocalPeers`](internal_.LocalPeers.md) | | - -#### Returns - -[`MemberApi`](internal_.MemberApi.md) - -#### Overrides - -TypedEmitter.constructor - -## Methods - -### assignRole - -▸ **assignRole**(`deviceId`, `roleId`): `Promise`\<`void`\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `deviceId` | `string` | -| `roleId` | ``"f7c150f5a3a9a855"`` \| ``"012fd2d431c0bf60"`` \| ``"9e6d29263cba36c9"`` | - -#### Returns - -`Promise`\<`void`\> - -___ - -### getById - -▸ **getById**(`deviceId`): `Promise`\<[`MemberInfo`](../interfaces/internal_.MemberInfo.md)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `deviceId` | `string` | - -#### Returns - -`Promise`\<[`MemberInfo`](../interfaces/internal_.MemberInfo.md)\> - -___ - -### getMany - -▸ **getMany**(): `Promise`\<[`MemberInfo`](../interfaces/internal_.MemberInfo.md)[]\> - -#### Returns - -`Promise`\<[`MemberInfo`](../interfaces/internal_.MemberInfo.md)[]\> - -___ - -### invite - -▸ **invite**(`deviceId`, `opts`): `Promise`\<``"REJECT"`` \| ``"ACCEPT"`` \| ``"ALREADY"``\> - -Send an invite. Resolves when receiving a response. Rejects if the invite -is canceled, or if something else goes wrong. - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `deviceId` | `string` | -| `opts` | `Object` | -| `opts.roleDescription` | `undefined` \| `string` | -| `opts.roleId` | ``"f7c150f5a3a9a855"`` \| ``"012fd2d431c0bf60"`` \| ``"9e6d29263cba36c9"`` | -| `opts.roleName` | `undefined` \| `string` | - -#### Returns - -`Promise`\<``"REJECT"`` \| ``"ACCEPT"`` \| ``"ALREADY"``\> - -___ - -### requestCancelInvite - -▸ **requestCancelInvite**(`deviceId`): `void` - -Attempt to cancel an outbound invite, if it exists. - -No-op if we weren't inviting this device. - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `deviceId` | `string` | - -#### Returns - -`void` diff --git a/docs/api/md/classes/internal_.Peer.md b/docs/api/md/classes/internal_.Peer.md deleted file mode 100644 index 4b09fbadb..000000000 --- a/docs/api/md/classes/internal_.Peer.md +++ /dev/null @@ -1,214 +0,0 @@ -[API](../README.md) / [\](../modules/internal_.md) / Peer - -# Class: Peer - -[\](../modules/internal_.md).Peer - -## Table of contents - -### Constructors - -- [constructor](internal_.Peer.md#constructor) - -### Accessors - -- [connected](internal_.Peer.md#connected) -- [info](internal_.Peer.md#info) -- [protomux](internal_.Peer.md#protomux) - -### Methods - -- [[kTestOnlySendRawInvite]](internal_.Peer.md#[ktestonlysendrawinvite]) -- [connect](internal_.Peer.md#connect) -- [disconnect](internal_.Peer.md#disconnect) -- [receiveDeviceInfo](internal_.Peer.md#receivedeviceinfo) -- [sendDeviceInfo](internal_.Peer.md#senddeviceinfo) -- [sendInvite](internal_.Peer.md#sendinvite) -- [sendInviteCancel](internal_.Peer.md#sendinvitecancel) -- [sendInviteResponse](internal_.Peer.md#sendinviteresponse) -- [sendProjectJoinDetails](internal_.Peer.md#sendprojectjoindetails) - -## Constructors - -### constructor - -• **new Peer**(`options`): [`Peer`](internal_.Peer.md) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `options` | `Object` | -| `options.channel` | [`Channel`](../interfaces/internal_.Channel.md) | -| `options.logger` | `undefined` \| [`Logger`](internal_.Logger.md) | -| `options.peerId` | `string` | -| `options.protomux` | [`Protomux`](internal_.Protomux.md)\<`any`\> | - -#### Returns - -[`Peer`](internal_.Peer.md) - -## Accessors - -### connected - -• `get` **connected**(): `Promise`\<`any`\> - -A promise that resolves when the peer connects, or rejects if it -fails to connect - -#### Returns - -`Promise`\<`any`\> - -___ - -### info - -• `get` **info**(): [`PeerInfoInternal`](../modules/internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_local_peers_.md#peerinfointernal) - -#### Returns - -[`PeerInfoInternal`](../modules/internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_local_peers_.md#peerinfointernal) - -___ - -### protomux - -• `get` **protomux**(): [`Protomux`](internal_.Protomux.md)\<`any`\> - -#### Returns - -[`Protomux`](internal_.Protomux.md)\<`any`\> - -## Methods - -### [kTestOnlySendRawInvite] - -▸ **[kTestOnlySendRawInvite]**(`buf`): `void` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `buf` | `Buffer` | - -#### Returns - -`void` - -___ - -### connect - -▸ **connect**(): `void` - -#### Returns - -`void` - -___ - -### disconnect - -▸ **disconnect**(): `void` - -#### Returns - -`void` - -___ - -### receiveDeviceInfo - -▸ **receiveDeviceInfo**(`deviceInfo`): `void` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `deviceInfo` | `DeviceInfo` | - -#### Returns - -`void` - -___ - -### sendDeviceInfo - -▸ **sendDeviceInfo**(`deviceInfo`): `void` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `deviceInfo` | `DeviceInfo` | - -#### Returns - -`void` - -___ - -### sendInvite - -▸ **sendInvite**(`invite`): `void` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `invite` | `Invite` | - -#### Returns - -`void` - -___ - -### sendInviteCancel - -▸ **sendInviteCancel**(`inviteCancel`): `void` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `inviteCancel` | `InviteCancel` | - -#### Returns - -`void` - -___ - -### sendInviteResponse - -▸ **sendInviteResponse**(`response`): `void` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `response` | `InviteResponse` | - -#### Returns - -`void` - -___ - -### sendProjectJoinDetails - -▸ **sendProjectJoinDetails**(`details`): `void` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `details` | `ProjectJoinDetails` | - -#### Returns - -`void` diff --git a/docs/api/md/classes/internal_.PeerSyncController.md b/docs/api/md/classes/internal_.PeerSyncController.md deleted file mode 100644 index 2cc73f24d..000000000 --- a/docs/api/md/classes/internal_.PeerSyncController.md +++ /dev/null @@ -1,117 +0,0 @@ -[API](../README.md) / [\](../modules/internal_.md) / PeerSyncController - -# Class: PeerSyncController - -[\](../modules/internal_.md).PeerSyncController - -## Table of contents - -### Constructors - -- [constructor](internal_.PeerSyncController.md#constructor) - -### Accessors - -- [peerId](internal_.PeerSyncController.md#peerid) -- [peerKey](internal_.PeerSyncController.md#peerkey) -- [syncCapability](internal_.PeerSyncController.md#synccapability) - -### Methods - -- [disableDataSync](internal_.PeerSyncController.md#disabledatasync) -- [enableDataSync](internal_.PeerSyncController.md#enabledatasync) -- [handleDiscoveryKey](internal_.PeerSyncController.md#handlediscoverykey) - -## Constructors - -### constructor - -• **new PeerSyncController**(`opts`): [`PeerSyncController`](internal_.PeerSyncController.md) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `opts` | `Object` | -| `opts.coreManager` | [`CoreManager`](internal_.CoreManager.md) | -| `opts.logger` | `undefined` \| [`Logger`](internal_.Logger.md) | -| `opts.protomux` | [`Protomux`](internal_.Protomux.md)\<[`OpenedNoiseStream`](../modules/internal_.md#openednoisestream)\<`Duplex` \| `Duplex`\<`any`, `any`, `any`, `any`, ``true``, ``true``, `DuplexEvents`\<`any`, `any`\>\>\>\> | -| `opts.roles` | [`Roles`](internal_.Roles.md) | -| `opts.syncState` | [`SyncState`](internal_.SyncState.md) | - -#### Returns - -[`PeerSyncController`](internal_.PeerSyncController.md) - -## Accessors - -### peerId - -• `get` **peerId**(): `string` - -#### Returns - -`string` - -___ - -### peerKey - -• `get` **peerKey**(): `Buffer` - -#### Returns - -`Buffer` - -___ - -### syncCapability - -• `get` **syncCapability**(): `Record`\<``"blob"`` \| ``"auth"`` \| ``"config"`` \| ``"data"`` \| ``"blobIndex"``, [`SyncCapability`](../modules/internal_.md#synccapability)\> - -#### Returns - -`Record`\<``"blob"`` \| ``"auth"`` \| ``"config"`` \| ``"data"`` \| ``"blobIndex"``, [`SyncCapability`](../modules/internal_.md#synccapability)\> - -## Methods - -### disableDataSync - -▸ **disableDataSync**(): `void` - -Disable syncing of data (in the data and blob namespaces). - -Syncing of metadata (auth, config and blobIndex namespaces) will continue -in the background without user interaction. - -#### Returns - -`void` - -___ - -### enableDataSync - -▸ **enableDataSync**(): `void` - -Enable syncing of data (in the data and blob namespaces) - -#### Returns - -`void` - -___ - -### handleDiscoveryKey - -▸ **handleDiscoveryKey**(`discoveryKey`): `void` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `discoveryKey` | `Buffer` | - -#### Returns - -`void` diff --git a/docs/api/md/classes/internal_.PendingInvites.md b/docs/api/md/classes/internal_.PendingInvites.md deleted file mode 100644 index 71efff774..000000000 --- a/docs/api/md/classes/internal_.PendingInvites.md +++ /dev/null @@ -1,166 +0,0 @@ -[API](../README.md) / [\](../modules/internal_.md) / PendingInvites - -# Class: PendingInvites - -[\](../modules/internal_.md).PendingInvites - -Manage pending invite state. - -## Table of contents - -### Constructors - -- [constructor](internal_.PendingInvites.md#constructor) - -### Methods - -- [add](internal_.PendingInvites.md#add) -- [deleteByInviteId](internal_.PendingInvites.md#deletebyinviteid) -- [deleteByProjectPublicId](internal_.PendingInvites.md#deletebyprojectpublicid) -- [getByInviteId](internal_.PendingInvites.md#getbyinviteid) -- [hasInviteId](internal_.PendingInvites.md#hasinviteid) -- [invites](internal_.PendingInvites.md#invites) -- [isAcceptingForProject](internal_.PendingInvites.md#isacceptingforproject) -- [markAccepting](internal_.PendingInvites.md#markaccepting) - -## Constructors - -### constructor - -• **new PendingInvites**(): [`PendingInvites`](internal_.PendingInvites.md) - -#### Returns - -[`PendingInvites`](internal_.PendingInvites.md) - -## Methods - -### add - -▸ **add**(`pendingInvite`): `void` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `pendingInvite` | [`PendingInvite`](../interfaces/internal_.PendingInvite.md) | - -#### Returns - -`void` - -**`Throws`** - -if adding a duplicate invite ID - -___ - -### deleteByInviteId - -▸ **deleteByInviteId**(`inviteId`): `boolean` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `inviteId` | `Buffer` | - -#### Returns - -`boolean` - -`true` if an invite existed and was deleted, `false` otherwise - -___ - -### deleteByProjectPublicId - -▸ **deleteByProjectPublicId**(`projectPublicId`): [`PendingInvite`](../interfaces/internal_.PendingInvite.md)[] - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `projectPublicId` | `string` | - -#### Returns - -[`PendingInvite`](../interfaces/internal_.PendingInvite.md)[] - -the pending invites that were deleted - -___ - -### getByInviteId - -▸ **getByInviteId**(`inviteId`): `undefined` \| [`PendingInvite`](../interfaces/internal_.PendingInvite.md) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `inviteId` | `Buffer` | - -#### Returns - -`undefined` \| [`PendingInvite`](../interfaces/internal_.PendingInvite.md) - -___ - -### hasInviteId - -▸ **hasInviteId**(`inviteId`): `boolean` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `inviteId` | `Buffer` | - -#### Returns - -`boolean` - -___ - -### invites - -▸ **invites**(): `Iterable`\<[`PendingInvite`](../interfaces/internal_.PendingInvite.md)\> - -#### Returns - -`Iterable`\<[`PendingInvite`](../interfaces/internal_.PendingInvite.md)\> - -the pending invites, in insertion order - -___ - -### isAcceptingForProject - -▸ **isAcceptingForProject**(`projectPublicId`): `boolean` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `projectPublicId` | `string` | - -#### Returns - -`boolean` - -___ - -### markAccepting - -▸ **markAccepting**(`inviteId`): `void` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `inviteId` | `Buffer` | - -#### Returns - -`void` diff --git a/docs/api/md/classes/internal_.Protomux.md b/docs/api/md/classes/internal_.Protomux.md deleted file mode 100644 index 8964b9ba6..000000000 --- a/docs/api/md/classes/internal_.Protomux.md +++ /dev/null @@ -1,217 +0,0 @@ -[API](../README.md) / [\](../modules/internal_.md) / Protomux - -# Class: Protomux\ - -[\](../modules/internal_.md).Protomux - -## Type parameters - -| Name | Type | -| :------ | :------ | -| `TStream` | extends `Duplex` \| `NodeDuplex` = `Duplex` | - -## Table of contents - -### Constructors - -- [constructor](internal_.Protomux.md#constructor) - -### Properties - -- [isProtomux](internal_.Protomux.md#isprotomux) -- [stream](internal_.Protomux.md#stream) - -### Methods - -- [cork](internal_.Protomux.md#cork) -- [createChannel](internal_.Protomux.md#createchannel) -- [destroy](internal_.Protomux.md#destroy) -- [opened](internal_.Protomux.md#opened) -- [pair](internal_.Protomux.md#pair) -- [uncork](internal_.Protomux.md#uncork) -- [unpair](internal_.Protomux.md#unpair) -- [from](internal_.Protomux.md#from) -- [isProtomux](internal_.Protomux.md#isprotomux-1) - -## Constructors - -### constructor - -• **new Protomux**\<`TStream`\>(`stream`): [`Protomux`](internal_.Protomux.md)\<`TStream`\> - -#### Type parameters - -| Name | Type | -| :------ | :------ | -| `TStream` | extends `Duplex` \| `Duplex`\<`any`, `any`, `any`, `any`, ``true``, ``true``, `DuplexEvents`\<`any`, `any`\>\> = `Duplex`\<`any`, `any`, `any`, `any`, ``true``, ``true``, `DuplexEvents`\<`any`, `any`\>\> | - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `stream` | `TStream` | - -#### Returns - -[`Protomux`](internal_.Protomux.md)\<`TStream`\> - -## Properties - -### isProtomux - -• **isProtomux**: ``true`` - -___ - -### stream - -• **stream**: `TStream` - -## Methods - -### cork - -▸ **cork**(): `void` - -#### Returns - -`void` - -___ - -### createChannel - -▸ **createChannel**(`opts`): [`Channel`](../interfaces/internal_.Channel.md) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `opts` | `Object` | -| `opts.aliases?` | `string`[] | -| `opts.handshake?` | [`Encoding`](../interfaces/internal_.Encoding.md) | -| `opts.id?` | `Buffer` | -| `opts.messages` | `Partial`\<`Pick`\<[`Message`](../interfaces/internal_.Message.md), ``"onmessage"`` \| ``"encoding"``\>\>[] | -| `opts.protocol` | `string` | -| `opts.unique?` | `boolean` | -| `opts.userData?` | `any` | -| `opts.onclose?` | () => `void` \| `Promise`\<`void`\> | -| `opts.ondestroy?` | () => `void` \| `Promise`\<`void`\> | -| `opts.onopen?` | (`handshake?`: `any`) => `void` \| `Promise`\<`void`\> | - -#### Returns - -[`Channel`](../interfaces/internal_.Channel.md) - -___ - -### destroy - -▸ **destroy**(`err`): `void` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `err` | `Error` | - -#### Returns - -`void` - -___ - -### opened - -▸ **opened**(`opts`): `boolean` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `opts` | `Object` | -| `opts.id?` | `Buffer` | -| `opts.protocol` | `string` | - -#### Returns - -`boolean` - -___ - -### pair - -▸ **pair**(`opts`, `notify`): `void` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `opts` | `Object` | -| `opts.id?` | `Buffer` | -| `opts.protocol` | `string` | -| `notify` | (`id`: `Buffer`) => `Promise`\<`void`\> | - -#### Returns - -`void` - -___ - -### uncork - -▸ **uncork**(): `void` - -#### Returns - -`void` - -___ - -### unpair - -▸ **unpair**(`opts`): `void` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `opts` | `Object` | -| `opts.id?` | `Buffer` | -| `opts.protocol` | `string` | - -#### Returns - -`void` - -___ - -### from - -▸ **from**(`stream`): [`Protomux`](internal_.Protomux.md)\<`TStream`\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `stream` | `TStream` | - -#### Returns - -[`Protomux`](internal_.Protomux.md)\<`TStream`\> - -___ - -### isProtomux - -▸ **isProtomux**(`mux`): mux is Protomux\\>\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `mux` | `unknown` | - -#### Returns - -mux is Protomux\\>\> diff --git a/docs/api/md/classes/internal_.RemoteBitfieldPage.md b/docs/api/md/classes/internal_.RemoteBitfieldPage.md deleted file mode 100644 index 200e42e8b..000000000 --- a/docs/api/md/classes/internal_.RemoteBitfieldPage.md +++ /dev/null @@ -1,185 +0,0 @@ -[API](../README.md) / [\](../modules/internal_.md) / RemoteBitfieldPage - -# Class: RemoteBitfieldPage - -[\](../modules/internal_.md).RemoteBitfieldPage - -## Table of contents - -### Constructors - -- [constructor](internal_.RemoteBitfieldPage.md#constructor) - -### Properties - -- [bitfield](internal_.RemoteBitfieldPage.md#bitfield) -- [index](internal_.RemoteBitfieldPage.md#index) -- [offset](internal_.RemoteBitfieldPage.md#offset) -- [segment](internal_.RemoteBitfieldPage.md#segment) - -### Accessors - -- [tree](internal_.RemoteBitfieldPage.md#tree) - -### Methods - -- [findFirst](internal_.RemoteBitfieldPage.md#findfirst) -- [findLast](internal_.RemoteBitfieldPage.md#findlast) -- [get](internal_.RemoteBitfieldPage.md#get) -- [insert](internal_.RemoteBitfieldPage.md#insert) -- [set](internal_.RemoteBitfieldPage.md#set) -- [setRange](internal_.RemoteBitfieldPage.md#setrange) - -## Constructors - -### constructor - -• **new RemoteBitfieldPage**(`index`, `bitfield`, `segment`): [`RemoteBitfieldPage`](internal_.RemoteBitfieldPage.md) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `index` | `number` | -| `bitfield` | `Uint32Array` | -| `segment` | [`RemoteBitfieldSegment`](internal_.RemoteBitfieldSegment.md) | - -#### Returns - -[`RemoteBitfieldPage`](internal_.RemoteBitfieldPage.md) - -## Properties - -### bitfield - -• **bitfield**: `Uint32Array` - -___ - -### index - -• **index**: `number` - -___ - -### offset - -• **offset**: `number` - -___ - -### segment - -• **segment**: [`RemoteBitfieldSegment`](internal_.RemoteBitfieldSegment.md) - -## Accessors - -### tree - -• `get` **tree**(): [`SparseIndex`](internal_.SparseIndex.md) - -#### Returns - -[`SparseIndex`](internal_.SparseIndex.md) - -## Methods - -### findFirst - -▸ **findFirst**(`val`, `position`): `number` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `val` | `boolean` | -| `position` | `number` | - -#### Returns - -`number` - -___ - -### findLast - -▸ **findLast**(`val`, `position`): `number` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `val` | `boolean` | -| `position` | `number` | - -#### Returns - -`number` - -___ - -### get - -▸ **get**(`index`): `boolean` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `index` | `number` | - -#### Returns - -`boolean` - -___ - -### insert - -▸ **insert**(`start`, `bitfield`): `void` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `start` | `number` | -| `bitfield` | `Uint32Array` | - -#### Returns - -`void` - -___ - -### set - -▸ **set**(`index`, `val`): `void` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `index` | `number` | -| `val` | `boolean` | - -#### Returns - -`void` - -___ - -### setRange - -▸ **setRange**(`start`, `length`, `val`): `void` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `start` | `number` | -| `length` | `number` | -| `val` | `boolean` | - -#### Returns - -`void` diff --git a/docs/api/md/classes/internal_.RemoteBitfieldSegment.md b/docs/api/md/classes/internal_.RemoteBitfieldSegment.md deleted file mode 100644 index 1e0bf85db..000000000 --- a/docs/api/md/classes/internal_.RemoteBitfieldSegment.md +++ /dev/null @@ -1,146 +0,0 @@ -[API](../README.md) / [\](../modules/internal_.md) / RemoteBitfieldSegment - -# Class: RemoteBitfieldSegment - -[\](../modules/internal_.md).RemoteBitfieldSegment - -## Table of contents - -### Constructors - -- [constructor](internal_.RemoteBitfieldSegment.md#constructor) - -### Properties - -- [index](internal_.RemoteBitfieldSegment.md#index) -- [offset](internal_.RemoteBitfieldSegment.md#offset) -- [pages](internal_.RemoteBitfieldSegment.md#pages) -- [pagesLength](internal_.RemoteBitfieldSegment.md#pageslength) -- [tree](internal_.RemoteBitfieldSegment.md#tree) - -### Accessors - -- [chunks](internal_.RemoteBitfieldSegment.md#chunks) - -### Methods - -- [add](internal_.RemoteBitfieldSegment.md#add) -- [findFirst](internal_.RemoteBitfieldSegment.md#findfirst) -- [findLast](internal_.RemoteBitfieldSegment.md#findlast) -- [refresh](internal_.RemoteBitfieldSegment.md#refresh) - -## Constructors - -### constructor - -• **new RemoteBitfieldSegment**(`index`): [`RemoteBitfieldSegment`](internal_.RemoteBitfieldSegment.md) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `index` | `number` | - -#### Returns - -[`RemoteBitfieldSegment`](internal_.RemoteBitfieldSegment.md) - -## Properties - -### index - -• **index**: `number` - -___ - -### offset - -• **offset**: `number` - -___ - -### pages - -• **pages**: `any`[] - -___ - -### pagesLength - -• **pagesLength**: `number` - -___ - -### tree - -• **tree**: [`SparseIndex`](internal_.SparseIndex.md) - -## Accessors - -### chunks - -• `get` **chunks**(): [`Chunk`](../modules/internal_.md#chunk)[] - -#### Returns - -[`Chunk`](../modules/internal_.md#chunk)[] - -## Methods - -### add - -▸ **add**(`page`): `void` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `page` | [`RemoteBitfieldPage`](internal_.RemoteBitfieldPage.md) | - -#### Returns - -`void` - -___ - -### findFirst - -▸ **findFirst**(`val`, `position`): `number` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `val` | `boolean` | -| `position` | `number` | - -#### Returns - -`number` - -___ - -### findLast - -▸ **findLast**(`val`, `position`): `number` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `val` | `boolean` | -| `position` | `number` | - -#### Returns - -`number` - -___ - -### refresh - -▸ **refresh**(): `void` - -#### Returns - -`void` diff --git a/docs/api/md/classes/internal_.Roles.md b/docs/api/md/classes/internal_.Roles.md deleted file mode 100644 index b0d7275a7..000000000 --- a/docs/api/md/classes/internal_.Roles.md +++ /dev/null @@ -1,105 +0,0 @@ -[API](../README.md) / [\](../modules/internal_.md) / Roles - -# Class: Roles - -[\](../modules/internal_.md).Roles - -## Table of contents - -### Constructors - -- [constructor](internal_.Roles.md#constructor) - -### Properties - -- [NO\_ROLE](internal_.Roles.md#no_role) - -### Methods - -- [assignRole](internal_.Roles.md#assignrole) -- [getAll](internal_.Roles.md#getall) -- [getRole](internal_.Roles.md#getrole) - -## Constructors - -### constructor - -• **new Roles**(`opts`): [`Roles`](internal_.Roles.md) - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `opts` | `Object` | | -| `opts.coreManager` | [`CoreManager`](internal_.CoreManager.md) | | -| `opts.coreOwnership` | [`CoreOwnership`](internal_.CoreOwnership.md) | | -| `opts.dataType` | [`DataType`](internal_.DataType.md)\<[`DataStore`](internal_.DataStore.md)\<``"auth"``, ``"role"`` \| ``"coreOwnership"``\>, `SQLiteTableWithColumns`\<{}\>, ``"role"``, {}, {}\> | | -| `opts.deviceKey` | `Buffer` | public key of this device | -| `opts.projectKey` | `Buffer` | | - -#### Returns - -[`Roles`](internal_.Roles.md) - -## Properties - -### NO\_ROLE - -▪ `Static` **NO\_ROLE**: [`Role`](../interfaces/internal_.Role.md)\<``"08e4251e36f6e7ed"``\> = `NO_ROLE` - -## Methods - -### assignRole - -▸ **assignRole**(`deviceId`, `roleId`): `Promise`\<`void`\> - -Assign a role to the specified `deviceId`. Devices without an assigned role -are unable to sync, except the project creator who can do anything. Only -the project creator can assign their own role. Will throw if the device's -role cannot assign the role by consulting `roleAssignment`. - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `deviceId` | `string` | -| `roleId` | ``"f7c150f5a3a9a855"`` \| ``"012fd2d431c0bf60"`` \| ``"9e6d29263cba36c9"`` \| ``"8ced989b1904606b"`` | - -#### Returns - -`Promise`\<`void`\> - -___ - -### getAll - -▸ **getAll**(): `Promise`\<`Map`\<`string`, [`Role`](../interfaces/internal_.Role.md)\<``"a12a6702b93bd7ff"`` \| ``"f7c150f5a3a9a855"`` \| ``"012fd2d431c0bf60"`` \| ``"9e6d29263cba36c9"`` \| ``"8ced989b1904606b"`` \| ``"08e4251e36f6e7ed"``\>\>\> - -Get roles of all devices in the project. For your own device, if you have -not yet synced your own role record, the "no role" capabilties is -returned. The project creator will have the creator role unless a -different one has been assigned. - -#### Returns - -`Promise`\<`Map`\<`string`, [`Role`](../interfaces/internal_.Role.md)\<``"a12a6702b93bd7ff"`` \| ``"f7c150f5a3a9a855"`` \| ``"012fd2d431c0bf60"`` \| ``"9e6d29263cba36c9"`` \| ``"8ced989b1904606b"`` \| ``"08e4251e36f6e7ed"``\>\>\> - -Map of deviceId to Role - -___ - -### getRole - -▸ **getRole**(`deviceId`): `Promise`\<[`Role`](../interfaces/internal_.Role.md)\<``"a12a6702b93bd7ff"`` \| ``"f7c150f5a3a9a855"`` \| ``"012fd2d431c0bf60"`` \| ``"9e6d29263cba36c9"`` \| ``"8ced989b1904606b"`` \| ``"08e4251e36f6e7ed"``\>\> - -Get the role for device `deviceId`. - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `deviceId` | `string` | - -#### Returns - -`Promise`\<[`Role`](../interfaces/internal_.Role.md)\<``"a12a6702b93bd7ff"`` \| ``"f7c150f5a3a9a855"`` \| ``"012fd2d431c0bf60"`` \| ``"9e6d29263cba36c9"`` \| ``"8ced989b1904606b"`` \| ``"08e4251e36f6e7ed"``\>\> diff --git a/docs/api/md/classes/internal_.SparseIndex.md b/docs/api/md/classes/internal_.SparseIndex.md deleted file mode 100644 index 690516686..000000000 --- a/docs/api/md/classes/internal_.SparseIndex.md +++ /dev/null @@ -1,166 +0,0 @@ -[API](../README.md) / [\](../modules/internal_.md) / SparseIndex - -# Class: SparseIndex - -[\](../modules/internal_.md).SparseIndex - -## Hierarchy - -- [`Index`](internal_.Index.md) - - ↳ **`SparseIndex`** - -## Table of contents - -### Constructors - -- [constructor](internal_.SparseIndex.md#constructor) - -### Properties - -- [byteLength](internal_.SparseIndex.md#bytelength) -- [chunks](internal_.SparseIndex.md#chunks) - -### Methods - -- [skipFirst](internal_.SparseIndex.md#skipfirst) -- [skipLast](internal_.SparseIndex.md#skiplast) -- [update](internal_.SparseIndex.md#update) -- [from](internal_.SparseIndex.md#from) - -## Constructors - -### constructor - -• **new SparseIndex**(`chunks`, `byteLength`): [`SparseIndex`](internal_.SparseIndex.md) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `chunks` | [`Chunk`](../modules/internal_.md#chunk)[] | -| `byteLength` | `number` | - -#### Returns - -[`SparseIndex`](internal_.SparseIndex.md) - -#### Overrides - -[Index](internal_.Index.md).[constructor](internal_.Index.md#constructor) - -## Properties - -### byteLength - -• `Readonly` **byteLength**: `number` - -#### Inherited from - -[Index](internal_.Index.md).[byteLength](internal_.Index.md#bytelength) - -___ - -### chunks - -• `Readonly` **chunks**: [`Chunk`](../modules/internal_.md#chunk)[] - -## Methods - -### skipFirst - -▸ **skipFirst**(`value`, `position?`): `number` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `value` | `boolean` | -| `position?` | `number` | - -#### Returns - -`number` - -#### Inherited from - -[Index](internal_.Index.md).[skipFirst](internal_.Index.md#skipfirst) - -___ - -### skipLast - -▸ **skipLast**(`value`, `position?`): `number` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `value` | `boolean` | -| `position?` | `number` | - -#### Returns - -`number` - -#### Inherited from - -[Index](internal_.Index.md).[skipLast](internal_.Index.md#skiplast) - -___ - -### update - -▸ **update**(`bit`): `boolean` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `bit` | `number` | - -#### Returns - -`boolean` - -#### Overrides - -[Index](internal_.Index.md).[update](internal_.Index.md#update) - -___ - -### from - -▸ **from**(`field`, `byteLength`): [`DenseIndex`](internal_.DenseIndex.md) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `field` | `TypedArray` | -| `byteLength` | `number` | - -#### Returns - -[`DenseIndex`](internal_.DenseIndex.md) - -#### Inherited from - -[Index](internal_.Index.md).[from](internal_.Index.md#from) - -▸ **from**(`chunks`, `byteLength`): [`SparseIndex`](internal_.SparseIndex.md) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `chunks` | [`Chunk`](../modules/internal_.md#chunk)[] | -| `byteLength` | `number` | - -#### Returns - -[`SparseIndex`](internal_.SparseIndex.md) - -#### Inherited from - -[Index](internal_.Index.md).[from](internal_.Index.md#from) diff --git a/docs/api/md/classes/internal_.SyncApi.md b/docs/api/md/classes/internal_.SyncApi.md deleted file mode 100644 index ab4bd9836..000000000 --- a/docs/api/md/classes/internal_.SyncApi.md +++ /dev/null @@ -1,128 +0,0 @@ -[API](../README.md) / [\](../modules/internal_.md) / SyncApi - -# Class: SyncApi - -[\](../modules/internal_.md).SyncApi - -## Hierarchy - -- `TypedEmitter` - - ↳ **`SyncApi`** - -## Table of contents - -### Constructors - -- [constructor](internal_.SyncApi.md#constructor) - -### Properties - -- [[kSyncState]](internal_.SyncApi.md#[ksyncstate]) - -### Methods - -- [[kHandleDiscoveryKey]](internal_.SyncApi.md#[khandlediscoverykey]) -- [getState](internal_.SyncApi.md#getstate) -- [start](internal_.SyncApi.md#start) -- [stop](internal_.SyncApi.md#stop) -- [waitForSync](internal_.SyncApi.md#waitforsync) - -## Constructors - -### constructor - -• **new SyncApi**(`opts`): [`SyncApi`](internal_.SyncApi.md) - -#### Parameters - -| Name | Type | Default value | -| :------ | :------ | :------ | -| `opts` | `Object` | `undefined` | -| `opts.coreManager` | [`CoreManager`](internal_.CoreManager.md) | `undefined` | -| `opts.logger` | `undefined` \| [`Logger`](internal_.Logger.md) | `undefined` | -| `opts.roles` | [`Roles`](internal_.Roles.md) | `undefined` | -| `opts.throttleMs` | `undefined` \| `number` | `200` | - -#### Returns - -[`SyncApi`](internal_.SyncApi.md) - -#### Overrides - -TypedEmitter.constructor - -## Properties - -### [kSyncState] - -• **[kSyncState]**: [`SyncState`](internal_.SyncState.md) - -## Methods - -### [kHandleDiscoveryKey] - -▸ **[kHandleDiscoveryKey]**(`discoveryKey`, `protomux`): `void` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `discoveryKey` | `Buffer` | -| `protomux` | [`Protomux`](internal_.Protomux.md)\<`NoiseSecretStream`\<`Duplex`\<`any`, `any`, `any`, `any`, ``true``, ``true``, `DuplexEvents`\<`any`, `any`\>\>\>\> | - -#### Returns - -`void` - -___ - -### getState - -▸ **getState**(): [`State`](../interfaces/internal_.State.md) - -Get the current sync state (initial and full). Also emitted via the 'sync-state' event - -#### Returns - -[`State`](../interfaces/internal_.State.md) - -___ - -### start - -▸ **start**(): `void` - -Start syncing data cores - -#### Returns - -`void` - -___ - -### stop - -▸ **stop**(): `void` - -Stop syncing data cores (metadata cores will continue syncing in the background) - -#### Returns - -`void` - -___ - -### waitForSync - -▸ **waitForSync**(`type`): `Promise`\<`void`\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `type` | [`SyncType`](../modules/internal_.md#synctype) | - -#### Returns - -`Promise`\<`void`\> diff --git a/docs/api/md/classes/internal_.SyncState.md b/docs/api/md/classes/internal_.SyncState.md deleted file mode 100644 index bfc47794e..000000000 --- a/docs/api/md/classes/internal_.SyncState.md +++ /dev/null @@ -1,73 +0,0 @@ -[API](../README.md) / [\](../modules/internal_.md) / SyncState - -# Class: SyncState - -[\](../modules/internal_.md).SyncState - -Emit sync state when it changes - -## Hierarchy - -- `TypedEmitter` - - ↳ **`SyncState`** - -## Table of contents - -### Constructors - -- [constructor](internal_.SyncState.md#constructor) - -### Methods - -- [addPeer](internal_.SyncState.md#addpeer) -- [getState](internal_.SyncState.md#getstate) - -## Constructors - -### constructor - -• **new SyncState**(`opts`): [`SyncState`](internal_.SyncState.md) - -#### Parameters - -| Name | Type | Default value | -| :------ | :------ | :------ | -| `opts` | `Object` | `undefined` | -| `opts.coreManager` | [`CoreManager`](internal_.CoreManager.md) | `undefined` | -| `opts.peerSyncControllers` | `Map`\<`string`, [`PeerSyncController`](internal_.PeerSyncController.md)\> | `undefined` | -| `opts.throttleMs` | `undefined` \| `number` | `200` | - -#### Returns - -[`SyncState`](internal_.SyncState.md) - -#### Overrides - -TypedEmitter.constructor - -## Methods - -### addPeer - -▸ **addPeer**(`peerId`): `void` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `peerId` | `string` | - -#### Returns - -`void` - -___ - -### getState - -▸ **getState**(): [`State`](../modules/internal_.md#state) - -#### Returns - -[`State`](../modules/internal_.md#state) diff --git a/docs/api/md/classes/internal_.TrackedKeyRequests.md b/docs/api/md/classes/internal_.TrackedKeyRequests.md deleted file mode 100644 index 23419704f..000000000 --- a/docs/api/md/classes/internal_.TrackedKeyRequests.md +++ /dev/null @@ -1,104 +0,0 @@ -[API](../README.md) / [\](../modules/internal_.md) / TrackedKeyRequests - -# Class: TrackedKeyRequests - -[\](../modules/internal_.md).TrackedKeyRequests - -## Table of contents - -### Constructors - -- [constructor](internal_.TrackedKeyRequests.md#constructor) - -### Methods - -- [clear](internal_.TrackedKeyRequests.md#clear) -- [deleteByDiscoveryKey](internal_.TrackedKeyRequests.md#deletebydiscoverykey) -- [deleteByPeerKey](internal_.TrackedKeyRequests.md#deletebypeerkey) -- [has](internal_.TrackedKeyRequests.md#has) -- [set](internal_.TrackedKeyRequests.md#set) - -## Constructors - -### constructor - -• **new TrackedKeyRequests**(): [`TrackedKeyRequests`](internal_.TrackedKeyRequests.md) - -#### Returns - -[`TrackedKeyRequests`](internal_.TrackedKeyRequests.md) - -## Methods - -### clear - -▸ **clear**(): `void` - -#### Returns - -`void` - -___ - -### deleteByDiscoveryKey - -▸ **deleteByDiscoveryKey**(`discoveryKey`): `boolean` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `discoveryKey` | `Buffer` | - -#### Returns - -`boolean` - -___ - -### deleteByPeerKey - -▸ **deleteByPeerKey**(`peerKey`): `void` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `peerKey` | `Buffer` | - -#### Returns - -`void` - -___ - -### has - -▸ **has**(`discoveryKey`): `boolean` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `discoveryKey` | `Buffer` | - -#### Returns - -`boolean` - -___ - -### set - -▸ **set**(`discoveryKey`, `peerKey`): [`TrackedKeyRequests`](internal_.TrackedKeyRequests.md) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `discoveryKey` | `Buffer` | -| `peerKey` | `Buffer` | - -#### Returns - -[`TrackedKeyRequests`](internal_.TrackedKeyRequests.md) diff --git a/docs/api/md/classes/internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_local_peers_.PeerDisconnectedError.md b/docs/api/md/classes/internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_local_peers_.PeerDisconnectedError.md deleted file mode 100644 index ba72e6922..000000000 --- a/docs/api/md/classes/internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_local_peers_.PeerDisconnectedError.md +++ /dev/null @@ -1,51 +0,0 @@ -[API](../README.md) / [\](../modules/internal_.md) / ["/home/runner/work/mapeo-core-next/mapeo-core-next/src/local-peers"](../modules/internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_local_peers_.md) / PeerDisconnectedError - -# Class: PeerDisconnectedError - -[\](../modules/internal_.md).["/home/runner/work/mapeo-core-next/mapeo-core-next/src/local-peers"](../modules/internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_local_peers_.md).PeerDisconnectedError - -## Hierarchy - -- `Error` - - ↳ **`PeerDisconnectedError`** - -## Table of contents - -### Constructors - -- [constructor](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_local_peers_.PeerDisconnectedError.md#constructor) - -### Properties - -- [name](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_local_peers_.PeerDisconnectedError.md#name) - -## Constructors - -### constructor - -• **new PeerDisconnectedError**(`message?`): [`PeerDisconnectedError`](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_local_peers_.PeerDisconnectedError.md) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `message?` | `string` | - -#### Returns - -[`PeerDisconnectedError`](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_local_peers_.PeerDisconnectedError.md) - -#### Overrides - -Error.constructor - -## Properties - -### name - -• **name**: `string` - -#### Inherited from - -Error.name diff --git a/docs/api/md/classes/internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_local_peers_.PeerFailedConnectionError.md b/docs/api/md/classes/internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_local_peers_.PeerFailedConnectionError.md deleted file mode 100644 index cfaa80c6b..000000000 --- a/docs/api/md/classes/internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_local_peers_.PeerFailedConnectionError.md +++ /dev/null @@ -1,51 +0,0 @@ -[API](../README.md) / [\](../modules/internal_.md) / ["/home/runner/work/mapeo-core-next/mapeo-core-next/src/local-peers"](../modules/internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_local_peers_.md) / PeerFailedConnectionError - -# Class: PeerFailedConnectionError - -[\](../modules/internal_.md).["/home/runner/work/mapeo-core-next/mapeo-core-next/src/local-peers"](../modules/internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_local_peers_.md).PeerFailedConnectionError - -## Hierarchy - -- `Error` - - ↳ **`PeerFailedConnectionError`** - -## Table of contents - -### Constructors - -- [constructor](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_local_peers_.PeerFailedConnectionError.md#constructor) - -### Properties - -- [name](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_local_peers_.PeerFailedConnectionError.md#name) - -## Constructors - -### constructor - -• **new PeerFailedConnectionError**(`message?`): [`PeerFailedConnectionError`](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_local_peers_.PeerFailedConnectionError.md) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `message?` | `string` | - -#### Returns - -[`PeerFailedConnectionError`](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_local_peers_.PeerFailedConnectionError.md) - -#### Overrides - -Error.constructor - -## Properties - -### name - -• **name**: `string` - -#### Inherited from - -Error.name diff --git a/docs/api/md/classes/internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_local_peers_.UnknownPeerError.md b/docs/api/md/classes/internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_local_peers_.UnknownPeerError.md deleted file mode 100644 index 29448a137..000000000 --- a/docs/api/md/classes/internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_local_peers_.UnknownPeerError.md +++ /dev/null @@ -1,51 +0,0 @@ -[API](../README.md) / [\](../modules/internal_.md) / ["/home/runner/work/mapeo-core-next/mapeo-core-next/src/local-peers"](../modules/internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_local_peers_.md) / UnknownPeerError - -# Class: UnknownPeerError - -[\](../modules/internal_.md).["/home/runner/work/mapeo-core-next/mapeo-core-next/src/local-peers"](../modules/internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_local_peers_.md).UnknownPeerError - -## Hierarchy - -- `Error` - - ↳ **`UnknownPeerError`** - -## Table of contents - -### Constructors - -- [constructor](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_local_peers_.UnknownPeerError.md#constructor) - -### Properties - -- [name](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_local_peers_.UnknownPeerError.md#name) - -## Constructors - -### constructor - -• **new UnknownPeerError**(`message?`): [`UnknownPeerError`](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_local_peers_.UnknownPeerError.md) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `message?` | `string` | - -#### Returns - -[`UnknownPeerError`](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_local_peers_.UnknownPeerError.md) - -#### Overrides - -Error.constructor - -## Properties - -### name - -• **name**: `string` - -#### Inherited from - -Error.name diff --git a/docs/api/md/classes/internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_sync_namespace_sync_state_.NamespaceSyncState.md b/docs/api/md/classes/internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_sync_namespace_sync_state_.NamespaceSyncState.md deleted file mode 100644 index 72cefa4bf..000000000 --- a/docs/api/md/classes/internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_sync_namespace_sync_state_.NamespaceSyncState.md +++ /dev/null @@ -1,88 +0,0 @@ -[API](../README.md) / [\](../modules/internal_.md) / ["/home/runner/work/mapeo-core-next/mapeo-core-next/src/sync/namespace-sync-state"](../modules/internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_sync_namespace_sync_state_.md) / NamespaceSyncState - -# Class: NamespaceSyncState\ - -[\](../modules/internal_.md).["/home/runner/work/mapeo-core-next/mapeo-core-next/src/sync/namespace-sync-state"](../modules/internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_sync_namespace_sync_state_.md).NamespaceSyncState - -## Type parameters - -| Name | Type | -| :------ | :------ | -| `TNamespace` | [`"/home/runner/work/mapeo-core-next/mapeo-core-next/src/core-manager/index"`](../modules/internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_core_manager_index_.md) | - -## Table of contents - -### Constructors - -- [constructor](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_sync_namespace_sync_state_.NamespaceSyncState.md#constructor) - -### Accessors - -- [namespace](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_sync_namespace_sync_state_.NamespaceSyncState.md#namespace) - -### Methods - -- [addPeer](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_sync_namespace_sync_state_.NamespaceSyncState.md#addpeer) -- [getState](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_sync_namespace_sync_state_.NamespaceSyncState.md#getstate) - -## Constructors - -### constructor - -• **new NamespaceSyncState**\<`TNamespace`\>(`opts`): [`NamespaceSyncState`](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_sync_namespace_sync_state_.NamespaceSyncState.md)\<`TNamespace`\> - -#### Type parameters - -| Name | Type | -| :------ | :------ | -| `TNamespace` | extends ``"blob"`` \| ``"auth"`` \| ``"config"`` \| ``"data"`` \| ``"blobIndex"`` = ``"blob"`` \| ``"auth"`` \| ``"config"`` \| ``"data"`` \| ``"blobIndex"`` | - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `opts` | `Object` | | -| `opts.coreManager` | [`CoreManager`](internal_.CoreManager.md) | | -| `opts.namespace` | `TNamespace` | | -| `opts.onUpdate` | () => `void` | Called when a state update is available (via getState()) | -| `opts.peerSyncControllers` | `Map`\<`string`, [`PeerSyncController`](internal_.PeerSyncController.md)\> | | - -#### Returns - -[`NamespaceSyncState`](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_sync_namespace_sync_state_.NamespaceSyncState.md)\<`TNamespace`\> - -## Accessors - -### namespace - -• `get` **namespace**(): `TNamespace` - -#### Returns - -`TNamespace` - -## Methods - -### addPeer - -▸ **addPeer**(`peerId`): `void` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `peerId` | `string` | - -#### Returns - -`void` - -___ - -### getState - -▸ **getState**(): [`SyncState`](../modules/internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_sync_namespace_sync_state_.md#syncstate) - -#### Returns - -[`SyncState`](../modules/internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_sync_namespace_sync_state_.md#syncstate) diff --git a/docs/api/md/classes/internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_utils_.ExhaustivenessError.md b/docs/api/md/classes/internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_utils_.ExhaustivenessError.md deleted file mode 100644 index d10990306..000000000 --- a/docs/api/md/classes/internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_utils_.ExhaustivenessError.md +++ /dev/null @@ -1,51 +0,0 @@ -[API](../README.md) / [\](../modules/internal_.md) / ["/home/runner/work/mapeo-core-next/mapeo-core-next/src/utils"](../modules/internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_utils_.md) / ExhaustivenessError - -# Class: ExhaustivenessError - -[\](../modules/internal_.md).["/home/runner/work/mapeo-core-next/mapeo-core-next/src/utils"](../modules/internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_utils_.md).ExhaustivenessError - -## Hierarchy - -- `Error` - - ↳ **`ExhaustivenessError`** - -## Table of contents - -### Constructors - -- [constructor](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_utils_.ExhaustivenessError.md#constructor) - -### Properties - -- [name](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_utils_.ExhaustivenessError.md#name) - -## Constructors - -### constructor - -• **new ExhaustivenessError**(`value`): [`ExhaustivenessError`](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_utils_.ExhaustivenessError.md) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `value` | `never` | - -#### Returns - -[`ExhaustivenessError`](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_utils_.ExhaustivenessError.md) - -#### Overrides - -Error.constructor - -## Properties - -### name - -• **name**: `string` - -#### Inherited from - -Error.name diff --git a/docs/api/md/classes/internal_.default-1.md b/docs/api/md/classes/internal_.default-1.md deleted file mode 100644 index 63fa78bab..000000000 --- a/docs/api/md/classes/internal_.default-1.md +++ /dev/null @@ -1,169 +0,0 @@ -[API](../README.md) / [\](../modules/internal_.md) / default - -# Class: default\ - -[\](../modules/internal_.md).default - -`Map` uses same-value-zero equality for keys, which makes it more difficult -to use reference types like buffers. - -`HashMap` is very similar to `Map`, but accepts a hash function for keys. -This function should return a primitive, such as a number or string, which -will be used as the key. - -It doesn't contain all the functionality of `Map` because we don't need it, -but it should be fairly easy to update as needed. - -**`Example`** - -```ts -const join = (arr) => arr.join(' ') - -const map = new HashMap(join) - -map.set([1, 2], 3) -map.get([1, 2]) -// => 3 -``` - -## Type parameters - -| Name | -| :------ | -| `K` | -| `V` | - -## Table of contents - -### Constructors - -- [constructor](internal_.default-1.md#constructor) - -### Accessors - -- [size](internal_.default-1.md#size) - -### Methods - -- [delete](internal_.default-1.md#delete) -- [get](internal_.default-1.md#get) -- [has](internal_.default-1.md#has) -- [set](internal_.default-1.md#set) -- [values](internal_.default-1.md#values) - -## Constructors - -### constructor - -• **new default**\<`K`, `V`\>(`hash`, `iterable?`): [`default`](internal_.default-1.md)\<`K`, `V`\> - -#### Type parameters - -| Name | Type | -| :------ | :------ | -| `K` | `K` | -| `V` | extends `unknown` | - -#### Parameters - -| Name | Type | Default value | -| :------ | :------ | :------ | -| `hash` | (`key`: `K`) => [`Primitive`](../modules/internal_.md#primitive) | `undefined` | -| `iterable?` | `Iterable`\<[`K`, `V`]\> | `[]` | - -#### Returns - -[`default`](internal_.default-1.md)\<`K`, `V`\> - -## Accessors - -### size - -• `get` **size**(): `number` - -#### Returns - -`number` - -## Methods - -### delete - -▸ **delete**(`key`): `boolean` - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `key` | `K` | The key to remove. | - -#### Returns - -`boolean` - -`true` if the key was present and removed, `false` otherwise. - -___ - -### get - -▸ **get**(`key`): `undefined` \| `V` - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `key` | `K` | The key to look up. | - -#### Returns - -`undefined` \| `V` - -The element associated with `key`, or `undefined` if it's not present. - -___ - -### has - -▸ **has**(`key`): `boolean` - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `key` | `K` | The key to look up. | - -#### Returns - -`boolean` - -`true` if `key` is present in the map, `false` otherwise. - -___ - -### set - -▸ **set**(`key`, `value`): [`default`](internal_.default-1.md)\<`K`, `V`\> - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `key` | `K` | The key to update. | -| `value` | `V` | The value to add at `key`. | - -#### Returns - -[`default`](internal_.default-1.md)\<`K`, `V`\> - -The map. - -___ - -### values - -▸ **values**(): `IterableIterator`\<`V`\> - -#### Returns - -`IterableIterator`\<`V`\> diff --git a/docs/api/md/classes/internal_.default-2.md b/docs/api/md/classes/internal_.default-2.md deleted file mode 100644 index 91683db7a..000000000 --- a/docs/api/md/classes/internal_.default-2.md +++ /dev/null @@ -1,241 +0,0 @@ -[API](../README.md) / [\](../modules/internal_.md) / default - -# Class: default - -[\](../modules/internal_.md).default - -## Table of contents - -### Constructors - -- [constructor](internal_.default-2.md#constructor) - -### Properties - -- [\_maxSegments](internal_.default-2.md#_maxsegments) -- [\_pages](internal_.default-2.md#_pages) -- [\_segments](internal_.default-2.md#_segments) - -### Methods - -- [findFirst](internal_.default-2.md#findfirst) -- [findLast](internal_.default-2.md#findlast) -- [firstSet](internal_.default-2.md#firstset) -- [firstUnset](internal_.default-2.md#firstunset) -- [get](internal_.default-2.md#get) -- [getBitfield](internal_.default-2.md#getbitfield) -- [insert](internal_.default-2.md#insert) -- [lastSet](internal_.default-2.md#lastset) -- [lastUnset](internal_.default-2.md#lastunset) -- [set](internal_.default-2.md#set) -- [setRange](internal_.default-2.md#setrange) - -## Constructors - -### constructor - -• **new default**(): [`default`](internal_.default-2.md) - -#### Returns - -[`default`](internal_.default-2.md) - -## Properties - -### \_maxSegments - -• **\_maxSegments**: `number` - -___ - -### \_pages - -• **\_pages**: [`BigSparseArray`](internal_.BigSparseArray.md)\<[`RemoteBitfieldPage`](internal_.RemoteBitfieldPage.md)\> - -___ - -### \_segments - -• **\_segments**: [`BigSparseArray`](internal_.BigSparseArray.md)\<[`RemoteBitfieldSegment`](internal_.RemoteBitfieldSegment.md)\> - -## Methods - -### findFirst - -▸ **findFirst**(`val`, `position`): `number` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `val` | `boolean` | -| `position` | `number` | - -#### Returns - -`number` - -___ - -### findLast - -▸ **findLast**(`val`, `position`): `number` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `val` | `boolean` | -| `position` | `number` | - -#### Returns - -`number` - -___ - -### firstSet - -▸ **firstSet**(`position`): `number` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `position` | `number` | - -#### Returns - -`number` - -___ - -### firstUnset - -▸ **firstUnset**(`position`): `number` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `position` | `number` | - -#### Returns - -`number` - -___ - -### get - -▸ **get**(`index`): `boolean` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `index` | `number` | - -#### Returns - -`boolean` - -___ - -### getBitfield - -▸ **getBitfield**(`index`): ``null`` \| [`RemoteBitfieldPage`](internal_.RemoteBitfieldPage.md) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `index` | `number` | - -#### Returns - -``null`` \| [`RemoteBitfieldPage`](internal_.RemoteBitfieldPage.md) - -___ - -### insert - -▸ **insert**(`start`, `bitfield`): `boolean` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `start` | `number` | -| `bitfield` | `Uint32Array` | - -#### Returns - -`boolean` - -___ - -### lastSet - -▸ **lastSet**(`position`): `number` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `position` | `number` | - -#### Returns - -`number` - -___ - -### lastUnset - -▸ **lastUnset**(`position`): `number` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `position` | `number` | - -#### Returns - -`number` - -___ - -### set - -▸ **set**(`index`, `val`): `void` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `index` | `number` | -| `val` | `boolean` | - -#### Returns - -`void` - -___ - -### setRange - -▸ **setRange**(`start`, `length`, `val`): `void` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `start` | `number` | -| `length` | `number` | -| `val` | `boolean` | - -#### Returns - -`void` diff --git a/docs/api/md/classes/internal_.default.md b/docs/api/md/classes/internal_.default.md deleted file mode 100644 index efc184ede..000000000 --- a/docs/api/md/classes/internal_.default.md +++ /dev/null @@ -1,108 +0,0 @@ -[API](../README.md) / [\](../modules/internal_.md) / default - -# Class: default - -[\](../modules/internal_.md).default - -## Table of contents - -### Constructors - -- [constructor](internal_.default.md#constructor) - -### Accessors - -- [[ktranslatedLanguageCodeToSchemaNames]](internal_.default.md#[ktranslatedlanguagecodetoschemanames]) - -### Methods - -- [get](internal_.default.md#get) -- [index](internal_.default.md#index) -- [put](internal_.default.md#put) -- [ready](internal_.default.md#ready) - -## Constructors - -### constructor - -• **new default**(`opts`): [`default`](internal_.default.md) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `opts` | `Object` | -| `opts.dataType` | [`DataType`](internal_.DataType.md)\<[`DataStore`](internal_.DataStore.md)\<``"config"``, ``"translation"`` \| ``"projectSettings"`` \| ``"preset"`` \| ``"icon"`` \| ``"field"`` \| ``"deviceInfo"``\>, `SQLiteTableWithColumns`\<{}\>, ``"translation"``, {}, {}\> | -| `opts.table` | `SQLiteTableWithColumns`\<{}\> | - -#### Returns - -[`default`](internal_.default.md) - -## Accessors - -### [ktranslatedLanguageCodeToSchemaNames] - -• `get` **[ktranslatedLanguageCodeToSchemaNames]**(): `Map`\<`string`, `Set`\<`SchemaName`\>\> - -#### Returns - -`Map`\<`string`, `Set`\<`SchemaName`\>\> - -## Methods - -### get - -▸ **get**(`value`): `Promise`\<{}[]\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `value` | `Object` | - -#### Returns - -`Promise`\<{}[]\> - -___ - -### index - -▸ **index**(`doc`): `void` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `doc` | `Object` | - -#### Returns - -`void` - -___ - -### put - -▸ **put**(`value`): `Promise`\<{} & \{ `forks`: `string`[] }\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `value` | `Object` | - -#### Returns - -`Promise`\<{} & \{ `forks`: `string`[] }\> - -___ - -### ready - -▸ **ready**(): `Promise`\<`void`\> - -#### Returns - -`Promise`\<`void`\> diff --git a/docs/api/md/functions/CoMapeoMapsFastifyPlugin.md b/docs/api/md/functions/CoMapeoMapsFastifyPlugin.md new file mode 100644 index 000000000..25f0fe703 --- /dev/null +++ b/docs/api/md/functions/CoMapeoMapsFastifyPlugin.md @@ -0,0 +1,19 @@ +[**API**](../README.md) • **Docs** + +*** + +[API](../README.md) / CoMapeoMapsFastifyPlugin + +# Function: CoMapeoMapsFastifyPlugin() + +> **CoMapeoMapsFastifyPlugin**(`instance`, `opts`): `Promise`\<`void`\> + +## Parameters + +• **instance**: `FastifyInstance`\<`RawServerDefault`, `IncomingMessage`, `ServerResponse`\<`IncomingMessage`\>, `FastifyBaseLogger`, `FastifyTypeProviderDefault`\> + +• **opts**: [`MapsPluginOpts`](../-internal-/interfaces/MapsPluginOpts.md) + +## Returns + +`Promise`\<`void`\> diff --git a/docs/api/md/interfaces/internal_.BitmapOpts.md b/docs/api/md/interfaces/internal_.BitmapOpts.md deleted file mode 100644 index f96709622..000000000 --- a/docs/api/md/interfaces/internal_.BitmapOpts.md +++ /dev/null @@ -1,31 +0,0 @@ -[API](../README.md) / [\](../modules/internal_.md) / BitmapOpts - -# Interface: BitmapOpts\<\> - -[\](../modules/internal_.md).BitmapOpts - -## Table of contents - -### Properties - -- [mimeType](internal_.BitmapOpts.md#mimetype) -- [pixelDensity](internal_.BitmapOpts.md#pixeldensity) -- [size](internal_.BitmapOpts.md#size) - -## Properties - -### mimeType - -• **mimeType**: ``"image/png"`` - -___ - -### pixelDensity - -• **pixelDensity**: ``1`` \| ``2`` \| ``3`` - -___ - -### size - -• **size**: `Size` diff --git a/docs/api/md/interfaces/internal_.BlobDownloadState.md b/docs/api/md/interfaces/internal_.BlobDownloadState.md deleted file mode 100644 index a97089cf0..000000000 --- a/docs/api/md/interfaces/internal_.BlobDownloadState.md +++ /dev/null @@ -1,62 +0,0 @@ -[API](../README.md) / [\](../modules/internal_.md) / BlobDownloadState - -# Interface: BlobDownloadState\<\> - -[\](../modules/internal_.md).BlobDownloadState - -## Table of contents - -### Properties - -- [error](internal_.BlobDownloadState.md#error) -- [haveBytes](internal_.BlobDownloadState.md#havebytes) -- [haveCount](internal_.BlobDownloadState.md#havecount) -- [status](internal_.BlobDownloadState.md#status) -- [wantBytes](internal_.BlobDownloadState.md#wantbytes) -- [wantCount](internal_.BlobDownloadState.md#wantcount) - -## Properties - -### error - -• **error**: ``null`` - -If status = 'error' then this will be an Error object - -___ - -### haveBytes - -• **haveBytes**: `number` - -The bytes already downloaded - -___ - -### haveCount - -• **haveCount**: `number` - -The number of files already downloaded - -___ - -### status - -• **status**: ``"checking"`` \| ``"downloading"`` \| ``"downloaded"`` \| ``"aborted"`` - -___ - -### wantBytes - -• **wantBytes**: `number` - -The bytes pending download - -___ - -### wantCount - -• **wantCount**: `number` - -The number of files pending download diff --git a/docs/api/md/interfaces/internal_.Channel.md b/docs/api/md/interfaces/internal_.Channel.md deleted file mode 100644 index ecaac6337..000000000 --- a/docs/api/md/interfaces/internal_.Channel.md +++ /dev/null @@ -1,129 +0,0 @@ -[API](../README.md) / [\](../modules/internal_.md) / Channel - -# Interface: Channel - -[\](../modules/internal_.md).Channel - -## Table of contents - -### Properties - -- [closed](internal_.Channel.md#closed) -- [destroyed](internal_.Channel.md#destroyed) -- [id](internal_.Channel.md#id) -- [messages](internal_.Channel.md#messages) -- [opened](internal_.Channel.md#opened) -- [protocol](internal_.Channel.md#protocol) -- [userData](internal_.Channel.md#userdata) - -### Methods - -- [addMessage](internal_.Channel.md#addmessage) -- [close](internal_.Channel.md#close) -- [cork](internal_.Channel.md#cork) -- [open](internal_.Channel.md#open) -- [uncork](internal_.Channel.md#uncork) - -## Properties - -### closed - -• **closed**: `boolean` - -___ - -### destroyed - -• **destroyed**: `boolean` - -___ - -### id - -• **id**: `Buffer` - -___ - -### messages - -• **messages**: [`Message`](internal_.Message.md)[] - -___ - -### opened - -• **opened**: `boolean` - -___ - -### protocol - -• **protocol**: `string` - -___ - -### userData - -• **userData**: `any` - -## Methods - -### addMessage - -▸ **addMessage**(`opts?`): [`Message`](internal_.Message.md) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `opts?` | `Partial`\<`Pick`\<[`Message`](internal_.Message.md), ``"onmessage"`` \| ``"encoding"``\>\> | - -#### Returns - -[`Message`](internal_.Message.md) - -___ - -### close - -▸ **close**(): `void` - -#### Returns - -`void` - -___ - -### cork - -▸ **cork**(): `void` - -#### Returns - -`void` - -___ - -### open - -▸ **open**(`handshake?`): `void` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `handshake?` | `any` | - -#### Returns - -`void` - -___ - -### uncork - -▸ **uncork**(): `void` - -#### Returns - -`void` diff --git a/docs/api/md/interfaces/internal_.CoreState.md b/docs/api/md/interfaces/internal_.CoreState.md deleted file mode 100644 index b48db2d82..000000000 --- a/docs/api/md/interfaces/internal_.CoreState.md +++ /dev/null @@ -1,46 +0,0 @@ -[API](../README.md) / [\](../modules/internal_.md) / CoreState - -# Interface: CoreState\<\> - -[\](../modules/internal_.md).CoreState - -## Table of contents - -### Properties - -- [have](internal_.CoreState.md#have) -- [missing](internal_.CoreState.md#missing) -- [want](internal_.CoreState.md#want) -- [wanted](internal_.CoreState.md#wanted) - -## Properties - -### have - -• **have**: `number` - -blocks the peer has locally - -___ - -### missing - -• **missing**: `number` - -blocks the peer wants but no peer has - -___ - -### want - -• **want**: `number` - -blocks the peer wants, and at least one peer has - -___ - -### wanted - -• **wanted**: `number` - -blocks the peer has that at least one peer wants diff --git a/docs/api/md/interfaces/internal_.CorestoreEvents.md b/docs/api/md/interfaces/internal_.CorestoreEvents.md deleted file mode 100644 index 27ff4761f..000000000 --- a/docs/api/md/interfaces/internal_.CorestoreEvents.md +++ /dev/null @@ -1,44 +0,0 @@ -[API](../README.md) / [\](../modules/internal_.md) / CorestoreEvents - -# Interface: CorestoreEvents - -[\](../modules/internal_.md).CorestoreEvents - -## Table of contents - -### Methods - -- [core-close](internal_.CorestoreEvents.md#core-close) -- [core-open](internal_.CorestoreEvents.md#core-open) - -## Methods - -### core-close - -▸ **core-close**(`core`): `void` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `core` | [`Corestore`](../classes/internal_.Corestore.md) | - -#### Returns - -`void` - -___ - -### core-open - -▸ **core-open**(`core`): `void` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `core` | [`Corestore`](../classes/internal_.Corestore.md) | - -#### Returns - -`void` diff --git a/docs/api/md/interfaces/internal_.DataTypeEvents.md b/docs/api/md/interfaces/internal_.DataTypeEvents.md deleted file mode 100644 index dca372b68..000000000 --- a/docs/api/md/interfaces/internal_.DataTypeEvents.md +++ /dev/null @@ -1,37 +0,0 @@ -[API](../README.md) / [\](../modules/internal_.md) / DataTypeEvents - -# Interface: DataTypeEvents\ - -[\](../modules/internal_.md).DataTypeEvents - -## Type parameters - -| Name | Type | -| :------ | :------ | -| `TDoc` | extends `MapeoDoc` | - -## Table of contents - -### Properties - -- [updated-docs](internal_.DataTypeEvents.md#updated-docs) - -## Properties - -### updated-docs - -• **updated-docs**: (`docs`: `TDoc`[]) => `void` - -#### Type declaration - -▸ (`docs`): `void` - -##### Parameters - -| Name | Type | -| :------ | :------ | -| `docs` | `TDoc`[] | - -##### Returns - -`void` diff --git a/docs/api/md/interfaces/internal_.DocCapability.md b/docs/api/md/interfaces/internal_.DocCapability.md deleted file mode 100644 index 002abd19f..000000000 --- a/docs/api/md/interfaces/internal_.DocCapability.md +++ /dev/null @@ -1,46 +0,0 @@ -[API](../README.md) / [\](../modules/internal_.md) / DocCapability - -# Interface: DocCapability\<\> - -[\](../modules/internal_.md).DocCapability - -## Table of contents - -### Properties - -- [readOthers](internal_.DocCapability.md#readothers) -- [readOwn](internal_.DocCapability.md#readown) -- [writeOthers](internal_.DocCapability.md#writeothers) -- [writeOwn](internal_.DocCapability.md#writeown) - -## Properties - -### readOthers - -• **readOthers**: `boolean` - -can read other's data - -___ - -### readOwn - -• **readOwn**: `boolean` - -can read own data - -___ - -### writeOthers - -• **writeOthers**: `boolean` - -can edit or delete other's data - -___ - -### writeOwn - -• **writeOwn**: `boolean` - -can write own data diff --git a/docs/api/md/interfaces/internal_.Encoding.md b/docs/api/md/interfaces/internal_.Encoding.md deleted file mode 100644 index 9876200c6..000000000 --- a/docs/api/md/interfaces/internal_.Encoding.md +++ /dev/null @@ -1,63 +0,0 @@ -[API](../README.md) / [\](../modules/internal_.md) / Encoding - -# Interface: Encoding - -[\](../modules/internal_.md).Encoding - -## Table of contents - -### Methods - -- [decode](internal_.Encoding.md#decode) -- [encode](internal_.Encoding.md#encode) -- [preencode](internal_.Encoding.md#preencode) - -## Methods - -### decode - -▸ **decode**(`state`): `any` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `state` | [`EncodingState`](internal_.EncodingState.md) | - -#### Returns - -`any` - -___ - -### encode - -▸ **encode**(`state`, `value`): `void` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `state` | [`EncodingState`](internal_.EncodingState.md) | -| `value` | `any` | - -#### Returns - -`void` - -___ - -### preencode - -▸ **preencode**(`state`, `value`): `void` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `state` | [`PreEncodingState`](internal_.PreEncodingState.md) | -| `value` | `any` | - -#### Returns - -`void` diff --git a/docs/api/md/interfaces/internal_.EncodingState.md b/docs/api/md/interfaces/internal_.EncodingState.md deleted file mode 100644 index aae87e383..000000000 --- a/docs/api/md/interfaces/internal_.EncodingState.md +++ /dev/null @@ -1,31 +0,0 @@ -[API](../README.md) / [\](../modules/internal_.md) / EncodingState - -# Interface: EncodingState - -[\](../modules/internal_.md).EncodingState - -## Table of contents - -### Properties - -- [buffer](internal_.EncodingState.md#buffer) -- [end](internal_.EncodingState.md#end) -- [start](internal_.EncodingState.md#start) - -## Properties - -### buffer - -• **buffer**: ``null`` \| `Buffer` - -___ - -### end - -• **end**: `number` - -___ - -### start - -• **start**: `number` diff --git a/docs/api/md/interfaces/internal_.HaveMsg.md b/docs/api/md/interfaces/internal_.HaveMsg.md deleted file mode 100644 index 3908ad233..000000000 --- a/docs/api/md/interfaces/internal_.HaveMsg.md +++ /dev/null @@ -1,38 +0,0 @@ -[API](../README.md) / [\](../modules/internal_.md) / HaveMsg - -# Interface: HaveMsg\<\> - -[\](../modules/internal_.md).HaveMsg - -## Table of contents - -### Properties - -- [bitfield](internal_.HaveMsg.md#bitfield) -- [discoveryKey](internal_.HaveMsg.md#discoverykey) -- [namespace](internal_.HaveMsg.md#namespace) -- [start](internal_.HaveMsg.md#start) - -## Properties - -### bitfield - -• **bitfield**: `Uint32Array` - -___ - -### discoveryKey - -• **discoveryKey**: `Buffer` - -___ - -### namespace - -• **namespace**: ``"blob"`` \| ``"auth"`` \| ``"config"`` \| ``"data"`` \| ``"blobIndex"`` - -___ - -### start - -• **start**: `number` diff --git a/docs/api/md/interfaces/internal_.Hyperblobs.BlobId.md b/docs/api/md/interfaces/internal_.Hyperblobs.BlobId.md deleted file mode 100644 index a6a0bd1c4..000000000 --- a/docs/api/md/interfaces/internal_.Hyperblobs.BlobId.md +++ /dev/null @@ -1,38 +0,0 @@ -[API](../README.md) / [\](../modules/internal_.md) / [Hyperblobs](../modules/internal_.Hyperblobs.md) / BlobId - -# Interface: BlobId - -[\](../modules/internal_.md).[Hyperblobs](../modules/internal_.Hyperblobs.md).BlobId - -## Table of contents - -### Properties - -- [blockLength](internal_.Hyperblobs.BlobId.md#blocklength) -- [blockOffset](internal_.Hyperblobs.BlobId.md#blockoffset) -- [byteLength](internal_.Hyperblobs.BlobId.md#bytelength) -- [byteOffset](internal_.Hyperblobs.BlobId.md#byteoffset) - -## Properties - -### blockLength - -• **blockLength**: `number` - -___ - -### blockOffset - -• **blockOffset**: `number` - -___ - -### byteLength - -• **byteLength**: `number` - -___ - -### byteOffset - -• **byteOffset**: `number` diff --git a/docs/api/md/interfaces/internal_.Hyperdrive.HyperdriveEntry.md b/docs/api/md/interfaces/internal_.Hyperdrive.HyperdriveEntry.md deleted file mode 100644 index d52c290d5..000000000 --- a/docs/api/md/interfaces/internal_.Hyperdrive.HyperdriveEntry.md +++ /dev/null @@ -1,40 +0,0 @@ -[API](../README.md) / [\](../modules/internal_.md) / [Hyperdrive](../modules/internal_.Hyperdrive.md) / HyperdriveEntry - -# Interface: HyperdriveEntry - -[\](../modules/internal_.md).[Hyperdrive](../modules/internal_.Hyperdrive.md).HyperdriveEntry - -## Table of contents - -### Properties - -- [key](internal_.Hyperdrive.HyperdriveEntry.md#key) -- [seq](internal_.Hyperdrive.HyperdriveEntry.md#seq) -- [value](internal_.Hyperdrive.HyperdriveEntry.md#value) - -## Properties - -### key - -• **key**: `string` - -___ - -### seq - -• **seq**: `number` - -___ - -### value - -• **value**: `Object` - -#### Type declaration - -| Name | Type | -| :------ | :------ | -| `blob` | [`BlobId`](internal_.Hyperblobs.BlobId.md) | -| `executable` | `boolean` | -| `linkname` | ``null`` \| `string` | -| `metadata` | ``null`` \| `object` | diff --git a/docs/api/md/interfaces/internal_.HyperdriveEvents.md b/docs/api/md/interfaces/internal_.HyperdriveEvents.md deleted file mode 100644 index 4678efcc0..000000000 --- a/docs/api/md/interfaces/internal_.HyperdriveEvents.md +++ /dev/null @@ -1,82 +0,0 @@ -[API](../README.md) / [\](../modules/internal_.md) / HyperdriveEvents - -# Interface: HyperdriveEvents - -[\](../modules/internal_.md).HyperdriveEvents - -## Table of contents - -### Properties - -- [blobs](internal_.HyperdriveEvents.md#blobs) -- [close](internal_.HyperdriveEvents.md#close) -- [content-key](internal_.HyperdriveEvents.md#content-key) -- [ready](internal_.HyperdriveEvents.md#ready) - -## Properties - -### blobs - -• **blobs**: (`blobs`: [`Hyperblobs`](../classes/internal_.Hyperblobs-1.md)) => `void` - -#### Type declaration - -▸ (`blobs`): `void` - -##### Parameters - -| Name | Type | -| :------ | :------ | -| `blobs` | [`Hyperblobs`](../classes/internal_.Hyperblobs-1.md) | - -##### Returns - -`void` - -___ - -### close - -• **close**: () => `void` - -#### Type declaration - -▸ (): `void` - -##### Returns - -`void` - -___ - -### content-key - -• **content-key**: (`contentKey`: `Buffer`) => `void` - -#### Type declaration - -▸ (`contentKey`): `void` - -##### Parameters - -| Name | Type | -| :------ | :------ | -| `contentKey` | `Buffer` | - -##### Returns - -`void` - -___ - -### ready - -• **ready**: () => `void` - -#### Type declaration - -▸ (): `void` - -##### Returns - -`void` diff --git a/docs/api/md/interfaces/internal_.HyperdriveGetOpts.md b/docs/api/md/interfaces/internal_.HyperdriveGetOpts.md deleted file mode 100644 index b1c1d0bbb..000000000 --- a/docs/api/md/interfaces/internal_.HyperdriveGetOpts.md +++ /dev/null @@ -1,24 +0,0 @@ -[API](../README.md) / [\](../modules/internal_.md) / HyperdriveGetOpts - -# Interface: HyperdriveGetOpts - -[\](../modules/internal_.md).HyperdriveGetOpts - -## Table of contents - -### Properties - -- [timeout](internal_.HyperdriveGetOpts.md#timeout) -- [wait](internal_.HyperdriveGetOpts.md#wait) - -## Properties - -### timeout - -• `Optional` **timeout**: `number` - -___ - -### wait - -• `Optional` **wait**: `boolean` diff --git a/docs/api/md/interfaces/internal_.HyperdriveOptions.md b/docs/api/md/interfaces/internal_.HyperdriveOptions.md deleted file mode 100644 index ab94abcc2..000000000 --- a/docs/api/md/interfaces/internal_.HyperdriveOptions.md +++ /dev/null @@ -1,25 +0,0 @@ -[API](../README.md) / [\](../modules/internal_.md) / HyperdriveOptions - -# Interface: HyperdriveOptions - -[\](../modules/internal_.md).HyperdriveOptions - -## Table of contents - -### Properties - -- [onwait](internal_.HyperdriveOptions.md#onwait) - -## Properties - -### onwait - -• **onwait**: () => `void` - -#### Type declaration - -▸ (): `void` - -##### Returns - -`void` diff --git a/docs/api/md/interfaces/internal_.MapsPluginOpts.md b/docs/api/md/interfaces/internal_.MapsPluginOpts.md deleted file mode 100644 index 7b97ff7eb..000000000 --- a/docs/api/md/interfaces/internal_.MapsPluginOpts.md +++ /dev/null @@ -1,24 +0,0 @@ -[API](../README.md) / [\](../modules/internal_.md) / MapsPluginOpts - -# Interface: MapsPluginOpts\<\> - -[\](../modules/internal_.md).MapsPluginOpts - -## Table of contents - -### Properties - -- [defaultOnlineStyleUrl](internal_.MapsPluginOpts.md#defaultonlinestyleurl) -- [prefix](internal_.MapsPluginOpts.md#prefix) - -## Properties - -### defaultOnlineStyleUrl - -• **defaultOnlineStyleUrl**: `undefined` \| `string` - -___ - -### prefix - -• **prefix**: `undefined` \| `string` diff --git a/docs/api/md/interfaces/internal_.MemberInfo.md b/docs/api/md/interfaces/internal_.MemberInfo.md deleted file mode 100644 index 892b44b31..000000000 --- a/docs/api/md/interfaces/internal_.MemberInfo.md +++ /dev/null @@ -1,38 +0,0 @@ -[API](../README.md) / [\](../modules/internal_.md) / MemberInfo - -# Interface: MemberInfo\<\> - -[\](../modules/internal_.md).MemberInfo - -## Table of contents - -### Properties - -- [deviceId](internal_.MemberInfo.md#deviceid) -- [deviceType](internal_.MemberInfo.md#devicetype) -- [name](internal_.MemberInfo.md#name) -- [role](internal_.MemberInfo.md#role) - -## Properties - -### deviceId - -• **deviceId**: `string` - -___ - -### deviceType - -• **deviceType**: `undefined` \| ``"UNRECOGNIZED"`` \| ``"mobile"`` \| ``"tablet"`` \| ``"desktop"`` - -___ - -### name - -• **name**: `undefined` \| `string` - -___ - -### role - -• **role**: [`Role`](internal_.Role.md)\<``"a12a6702b93bd7ff"`` \| ``"f7c150f5a3a9a855"`` \| ``"012fd2d431c0bf60"`` \| ``"9e6d29263cba36c9"`` \| ``"8ced989b1904606b"`` \| ``"08e4251e36f6e7ed"``\> diff --git a/docs/api/md/interfaces/internal_.Message.md b/docs/api/md/interfaces/internal_.Message.md deleted file mode 100644 index 297d91202..000000000 --- a/docs/api/md/interfaces/internal_.Message.md +++ /dev/null @@ -1,65 +0,0 @@ -[API](../README.md) / [\](../modules/internal_.md) / Message - -# Interface: Message - -[\](../modules/internal_.md).Message - -## Table of contents - -### Properties - -- [encoding](internal_.Message.md#encoding) -- [onmessage](internal_.Message.md#onmessage) -- [type](internal_.Message.md#type) - -### Methods - -- [send](internal_.Message.md#send) - -## Properties - -### encoding - -• **encoding**: [`Encoding`](internal_.Encoding.md) - -___ - -### onmessage - -• **onmessage**: (`message`: `any`) => `void` - -#### Type declaration - -▸ (`message`): `void` - -##### Parameters - -| Name | Type | -| :------ | :------ | -| `message` | `any` | - -##### Returns - -`void` - -___ - -### type - -• **type**: `number` - -## Methods - -### send - -▸ **send**(`msg`): `void` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `msg` | `any` | - -#### Returns - -`void` diff --git a/docs/api/md/interfaces/internal_.OfflineFallbackMapPluginOpts.md b/docs/api/md/interfaces/internal_.OfflineFallbackMapPluginOpts.md deleted file mode 100644 index ccf63e9a7..000000000 --- a/docs/api/md/interfaces/internal_.OfflineFallbackMapPluginOpts.md +++ /dev/null @@ -1,31 +0,0 @@ -[API](../README.md) / [\](../modules/internal_.md) / OfflineFallbackMapPluginOpts - -# Interface: OfflineFallbackMapPluginOpts\<\> - -[\](../modules/internal_.md).OfflineFallbackMapPluginOpts - -## Table of contents - -### Properties - -- [prefix](internal_.OfflineFallbackMapPluginOpts.md#prefix) -- [sourcesDir](internal_.OfflineFallbackMapPluginOpts.md#sourcesdir) -- [styleJsonPath](internal_.OfflineFallbackMapPluginOpts.md#stylejsonpath) - -## Properties - -### prefix - -• **prefix**: `undefined` \| `string` - -___ - -### sourcesDir - -• **sourcesDir**: `string` - -___ - -### styleJsonPath - -• **styleJsonPath**: `string` diff --git a/docs/api/md/interfaces/internal_.PeerInfoBase.md b/docs/api/md/interfaces/internal_.PeerInfoBase.md deleted file mode 100644 index 76b0f49ec..000000000 --- a/docs/api/md/interfaces/internal_.PeerInfoBase.md +++ /dev/null @@ -1,31 +0,0 @@ -[API](../README.md) / [\](../modules/internal_.md) / PeerInfoBase - -# Interface: PeerInfoBase\<\> - -[\](../modules/internal_.md).PeerInfoBase - -## Table of contents - -### Properties - -- [deviceId](internal_.PeerInfoBase.md#deviceid) -- [deviceType](internal_.PeerInfoBase.md#devicetype) -- [name](internal_.PeerInfoBase.md#name) - -## Properties - -### deviceId - -• **deviceId**: `string` - -___ - -### deviceType - -• **deviceType**: `undefined` \| `DeviceInfo_DeviceType` - -___ - -### name - -• **name**: `undefined` \| `string` diff --git a/docs/api/md/interfaces/internal_.PendingInvite.md b/docs/api/md/interfaces/internal_.PendingInvite.md deleted file mode 100644 index 0ccd3c587..000000000 --- a/docs/api/md/interfaces/internal_.PendingInvite.md +++ /dev/null @@ -1,31 +0,0 @@ -[API](../README.md) / [\](../modules/internal_.md) / PendingInvite - -# Interface: PendingInvite\<\> - -[\](../modules/internal_.md).PendingInvite - -## Table of contents - -### Properties - -- [invite](internal_.PendingInvite.md#invite) -- [isAccepting](internal_.PendingInvite.md#isaccepting) -- [peerId](internal_.PendingInvite.md#peerid) - -## Properties - -### invite - -• **invite**: [`InviteInternal`](../modules/internal_.md#inviteinternal) - -___ - -### isAccepting - -• **isAccepting**: `boolean` - -___ - -### peerId - -• **peerId**: `string` diff --git a/docs/api/md/interfaces/internal_.PreEncodingState.md b/docs/api/md/interfaces/internal_.PreEncodingState.md deleted file mode 100644 index 74eee6265..000000000 --- a/docs/api/md/interfaces/internal_.PreEncodingState.md +++ /dev/null @@ -1,31 +0,0 @@ -[API](../README.md) / [\](../modules/internal_.md) / PreEncodingState - -# Interface: PreEncodingState - -[\](../modules/internal_.md).PreEncodingState - -## Table of contents - -### Properties - -- [buffer](internal_.PreEncodingState.md#buffer) -- [end](internal_.PreEncodingState.md#end) -- [start](internal_.PreEncodingState.md#start) - -## Properties - -### buffer - -• **buffer**: ``null`` - -___ - -### end - -• **end**: `number` - -___ - -### start - -• **start**: `number` diff --git a/docs/api/md/interfaces/internal_.Role.md b/docs/api/md/interfaces/internal_.Role.md deleted file mode 100644 index 824403079..000000000 --- a/docs/api/md/interfaces/internal_.Role.md +++ /dev/null @@ -1,51 +0,0 @@ -[API](../README.md) / [\](../modules/internal_.md) / Role - -# Interface: Role\ - -[\](../modules/internal_.md).Role - -## Type parameters - -| Name | Type | -| :------ | :------ | -| `T` | extends [`RoleId`](../modules/internal_.md#roleid) = [`RoleId`](../modules/internal_.md#roleid) | - -## Table of contents - -### Properties - -- [docs](internal_.Role.md#docs) -- [name](internal_.Role.md#name) -- [roleAssignment](internal_.Role.md#roleassignment) -- [roleId](internal_.Role.md#roleid) -- [sync](internal_.Role.md#sync) - -## Properties - -### docs - -• **docs**: `Record`\<``"translation"`` \| ``"track"`` \| ``"role"`` \| ``"projectSettings"`` \| ``"preset"`` \| ``"observation"`` \| ``"icon"`` \| ``"field"`` \| ``"deviceInfo"`` \| ``"coreOwnership"``, [`DocCapability`](internal_.DocCapability.md)\> - -___ - -### name - -• **name**: `string` - -___ - -### roleAssignment - -• **roleAssignment**: (``"f7c150f5a3a9a855"`` \| ``"012fd2d431c0bf60"`` \| ``"9e6d29263cba36c9"``)[] - -___ - -### roleId - -• **roleId**: `T` - -___ - -### sync - -• **sync**: `Record`\<``"blob"`` \| ``"auth"`` \| ``"config"`` \| ``"data"`` \| ``"blobIndex"``, ``"allowed"`` \| ``"blocked"``\> diff --git a/docs/api/md/interfaces/internal_.StartOpts.md b/docs/api/md/interfaces/internal_.StartOpts.md deleted file mode 100644 index 6de2fb071..000000000 --- a/docs/api/md/interfaces/internal_.StartOpts.md +++ /dev/null @@ -1,24 +0,0 @@ -[API](../README.md) / [\](../modules/internal_.md) / StartOpts - -# Interface: StartOpts\<\> - -[\](../modules/internal_.md).StartOpts - -## Table of contents - -### Properties - -- [host](internal_.StartOpts.md#host) -- [port](internal_.StartOpts.md#port) - -## Properties - -### host - -• **host**: `undefined` \| `string` - -___ - -### port - -• **port**: `undefined` \| `number` diff --git a/docs/api/md/interfaces/internal_.State.md b/docs/api/md/interfaces/internal_.State.md deleted file mode 100644 index be7668482..000000000 --- a/docs/api/md/interfaces/internal_.State.md +++ /dev/null @@ -1,37 +0,0 @@ -[API](../README.md) / [\](../modules/internal_.md) / State - -# Interface: State\<\> - -[\](../modules/internal_.md).State - -## Table of contents - -### Properties - -- [connectedPeers](internal_.State.md#connectedpeers) -- [data](internal_.State.md#data) -- [initial](internal_.State.md#initial) - -## Properties - -### connectedPeers - -• **connectedPeers**: `number` - -Number of connected peers - -___ - -### data - -• **data**: [`SyncTypeState`](internal_.SyncTypeState.md) - -State of data sync (observations, map data, photos, audio, video etc.) - -___ - -### initial - -• **initial**: [`SyncTypeState`](internal_.SyncTypeState.md) - -State of initial sync (sync of auth, metadata and project config) diff --git a/docs/api/md/interfaces/internal_.StaticMapsPluginOpts.md b/docs/api/md/interfaces/internal_.StaticMapsPluginOpts.md deleted file mode 100644 index ad8eefebd..000000000 --- a/docs/api/md/interfaces/internal_.StaticMapsPluginOpts.md +++ /dev/null @@ -1,24 +0,0 @@ -[API](../README.md) / [\](../modules/internal_.md) / StaticMapsPluginOpts - -# Interface: StaticMapsPluginOpts\<\> - -[\](../modules/internal_.md).StaticMapsPluginOpts - -## Table of contents - -### Properties - -- [prefix](internal_.StaticMapsPluginOpts.md#prefix) -- [staticRootDir](internal_.StaticMapsPluginOpts.md#staticrootdir) - -## Properties - -### prefix - -• **prefix**: `undefined` \| `string` - -___ - -### staticRootDir - -• **staticRootDir**: `string` diff --git a/docs/api/md/interfaces/internal_.SvgOpts.md b/docs/api/md/interfaces/internal_.SvgOpts.md deleted file mode 100644 index cec1f009d..000000000 --- a/docs/api/md/interfaces/internal_.SvgOpts.md +++ /dev/null @@ -1,24 +0,0 @@ -[API](../README.md) / [\](../modules/internal_.md) / SvgOpts - -# Interface: SvgOpts\<\> - -[\](../modules/internal_.md).SvgOpts - -## Table of contents - -### Properties - -- [mimeType](internal_.SvgOpts.md#mimetype) -- [size](internal_.SvgOpts.md#size) - -## Properties - -### mimeType - -• **mimeType**: ``"image/svg+xml"`` - -___ - -### size - -• **size**: `Size` diff --git a/docs/api/md/interfaces/internal_.SyncTypeState.md b/docs/api/md/interfaces/internal_.SyncTypeState.md deleted file mode 100644 index 64cc0306e..000000000 --- a/docs/api/md/interfaces/internal_.SyncTypeState.md +++ /dev/null @@ -1,64 +0,0 @@ -[API](../README.md) / [\](../modules/internal_.md) / SyncTypeState - -# Interface: SyncTypeState\<\> - -[\](../modules/internal_.md).SyncTypeState - -## Table of contents - -### Properties - -- [dataToSync](internal_.SyncTypeState.md#datatosync) -- [have](internal_.SyncTypeState.md#have) -- [missing](internal_.SyncTypeState.md#missing) -- [syncing](internal_.SyncTypeState.md#syncing) -- [want](internal_.SyncTypeState.md#want) -- [wanted](internal_.SyncTypeState.md#wanted) - -## Properties - -### dataToSync - -• **dataToSync**: `boolean` - -Is there data available to sync? (want > 0 || wanted > 0) - -___ - -### have - -• **have**: `number` - -Number of blocks we have locally - -___ - -### missing - -• **missing**: `number` - -Number of blocks missing (we don't have them, but connected peers don't have them either) - -___ - -### syncing - -• **syncing**: `boolean` - -Are we currently syncing? - -___ - -### want - -• **want**: `number` - -Number of blocks we want from connected peers - -___ - -### wanted - -• **wanted**: `number` - -Number of blocks that connected peers want from us diff --git a/docs/api/md/interfaces/internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_core_manager_index_.Events.md b/docs/api/md/interfaces/internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_core_manager_index_.Events.md deleted file mode 100644 index e904f5521..000000000 --- a/docs/api/md/interfaces/internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_core_manager_index_.Events.md +++ /dev/null @@ -1,57 +0,0 @@ -[API](../README.md) / [\](../modules/internal_.md) / ["/home/runner/work/mapeo-core-next/mapeo-core-next/src/core-manager/index"](../modules/internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_core_manager_index_.md) / Events - -# Interface: Events\<\> - -[\](../modules/internal_.md).["/home/runner/work/mapeo-core-next/mapeo-core-next/src/core-manager/index"](../modules/internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_core_manager_index_.md).Events - -## Table of contents - -### Properties - -- [add-core](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_core_manager_index_.Events.md#add-core) -- [peer-have](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_core_manager_index_.Events.md#peer-have) - -## Properties - -### add-core - -• **add-core**: (`coreRecord`: [`CoreRecord`](../modules/internal_.md#corerecord)) => `void` - -#### Type declaration - -▸ (`coreRecord`): `void` - -##### Parameters - -| Name | Type | -| :------ | :------ | -| `coreRecord` | [`CoreRecord`](../modules/internal_.md#corerecord) | - -##### Returns - -`void` - -___ - -### peer-have - -• **peer-have**: (`namespace`: ``"blob"`` \| ``"auth"`` \| ``"config"`` \| ``"data"`` \| ``"blobIndex"``, `msg`: \{ `bitfield`: `Uint32Array` ; `coreDiscoveryId`: `string` ; `peerId`: `string` ; `start`: `number` }) => `void` - -#### Type declaration - -▸ (`namespace`, `msg`): `void` - -##### Parameters - -| Name | Type | -| :------ | :------ | -| `namespace` | ``"blob"`` \| ``"auth"`` \| ``"config"`` \| ``"data"`` \| ``"blobIndex"`` | -| `msg` | `Object` | -| `msg.bitfield` | `Uint32Array` | -| `msg.coreDiscoveryId` | `string` | -| `msg.peerId` | `string` | -| `msg.start` | `number` | - -##### Returns - -`void` diff --git a/docs/api/md/interfaces/internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_local_peers_.LocalPeersEvents.md b/docs/api/md/interfaces/internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_local_peers_.LocalPeersEvents.md deleted file mode 100644 index 4795454b1..000000000 --- a/docs/api/md/interfaces/internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_local_peers_.LocalPeersEvents.md +++ /dev/null @@ -1,200 +0,0 @@ -[API](../README.md) / [\](../modules/internal_.md) / ["/home/runner/work/mapeo-core-next/mapeo-core-next/src/local-peers"](../modules/internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_local_peers_.md) / LocalPeersEvents - -# Interface: LocalPeersEvents\<\> - -[\](../modules/internal_.md).["/home/runner/work/mapeo-core-next/mapeo-core-next/src/local-peers"](../modules/internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_local_peers_.md).LocalPeersEvents - -## Table of contents - -### Properties - -- [discovery-key](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_local_peers_.LocalPeersEvents.md#discovery-key) -- [failed-to-handle-message](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_local_peers_.LocalPeersEvents.md#failed-to-handle-message) -- [got-project-details](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_local_peers_.LocalPeersEvents.md#got-project-details) -- [invite](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_local_peers_.LocalPeersEvents.md#invite) -- [invite-cancel](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_local_peers_.LocalPeersEvents.md#invite-cancel) -- [invite-response](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_local_peers_.LocalPeersEvents.md#invite-response) -- [peer-add](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_local_peers_.LocalPeersEvents.md#peer-add) -- [peers](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_local_peers_.LocalPeersEvents.md#peers) - -## Properties - -### discovery-key - -• **discovery-key**: (`discoveryKey`: `Buffer`, `protomux`: [`Protomux`](../classes/internal_.Protomux.md)\<`NoiseSecretStream`\<`Duplex`\<`any`, `any`, `any`, `any`, ``true``, ``true``, `DuplexEvents`\<`any`, `any`\>\>\>\>) => `void` - -Emitted when a new hypercore is replicated (by a peer) to a peer protomux instance (passed as the second parameter) - -#### Type declaration - -▸ (`discoveryKey`, `protomux`): `void` - -##### Parameters - -| Name | Type | -| :------ | :------ | -| `discoveryKey` | `Buffer` | -| `protomux` | [`Protomux`](../classes/internal_.Protomux.md)\<`NoiseSecretStream`\<`Duplex`\<`any`, `any`, `any`, `any`, ``true``, ``true``, `DuplexEvents`\<`any`, `any`\>\>\>\> | - -##### Returns - -`void` - -___ - -### failed-to-handle-message - -• **failed-to-handle-message**: (`messageType`: `string`, `errorMessage?`: `string`) => `void` - -Emitted when we received a message we couldn't handle for some reason. Primarily useful for testing - -#### Type declaration - -▸ (`messageType`, `errorMessage?`): `void` - -##### Parameters - -| Name | Type | -| :------ | :------ | -| `messageType` | `string` | -| `errorMessage?` | `string` | - -##### Returns - -`void` - -___ - -### got-project-details - -• **got-project-details**: (`peerId`: `string`, `details`: `ProjectJoinDetails`) => `void` - -Emitted when project details are received - -#### Type declaration - -▸ (`peerId`, `details`): `void` - -##### Parameters - -| Name | Type | -| :------ | :------ | -| `peerId` | `string` | -| `details` | `ProjectJoinDetails` | - -##### Returns - -`void` - -___ - -### invite - -• **invite**: (`peerId`: `string`, `invite`: `Invite`) => `void` - -Emitted when an invite is received - -#### Type declaration - -▸ (`peerId`, `invite`): `void` - -##### Parameters - -| Name | Type | -| :------ | :------ | -| `peerId` | `string` | -| `invite` | `Invite` | - -##### Returns - -`void` - -___ - -### invite-cancel - -• **invite-cancel**: (`peerId`: `string`, `invite`: `InviteCancel`) => `void` - -Emitted when we receive a cancelation for an invite - -#### Type declaration - -▸ (`peerId`, `invite`): `void` - -##### Parameters - -| Name | Type | -| :------ | :------ | -| `peerId` | `string` | -| `invite` | `InviteCancel` | - -##### Returns - -`void` - -___ - -### invite-response - -• **invite-response**: (`peerId`: `string`, `inviteResponse`: `InviteResponse`) => `void` - -Emitted when an invite response is received - -#### Type declaration - -▸ (`peerId`, `inviteResponse`): `void` - -##### Parameters - -| Name | Type | -| :------ | :------ | -| `peerId` | `string` | -| `inviteResponse` | `InviteResponse` | - -##### Returns - -`void` - -___ - -### peer-add - -• **peer-add**: (`peer`: [`PeerInfoConnected`](../modules/internal_.md#peerinfoconnected)) => `void` - -Emitted when a new peer is connected - -#### Type declaration - -▸ (`peer`): `void` - -##### Parameters - -| Name | Type | -| :------ | :------ | -| `peer` | [`PeerInfoConnected`](../modules/internal_.md#peerinfoconnected) | - -##### Returns - -`void` - -___ - -### peers - -• **peers**: (`peers`: [`PeerInfo`](../modules/internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_local_peers_.md#peerinfo)[]) => `void` - -Emitted whenever the connection status of peers changes. An array of peerInfo objects with a peer id and the peer connection status - -#### Type declaration - -▸ (`peers`): `void` - -##### Parameters - -| Name | Type | -| :------ | :------ | -| `peers` | [`PeerInfo`](../modules/internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_local_peers_.md#peerinfo)[] | - -##### Returns - -`void` diff --git a/docs/api/md/interfaces/internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_schema_client_.ProjectInfo.md b/docs/api/md/interfaces/internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_schema_client_.ProjectInfo.md deleted file mode 100644 index 69773e4f3..000000000 --- a/docs/api/md/interfaces/internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_schema_client_.ProjectInfo.md +++ /dev/null @@ -1,17 +0,0 @@ -[API](../README.md) / [\](../modules/internal_.md) / ["/home/runner/work/mapeo-core-next/mapeo-core-next/src/schema/client"](../modules/internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_schema_client_.md) / ProjectInfo - -# Interface: ProjectInfo\<\> - -[\](../modules/internal_.md).["/home/runner/work/mapeo-core-next/mapeo-core-next/src/schema/client"](../modules/internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_schema_client_.md).ProjectInfo - -## Table of contents - -### Properties - -- [name](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_schema_client_.ProjectInfo.md#name) - -## Properties - -### name - -• **name**: `undefined` \| `string` diff --git a/docs/api/md/interfaces/internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_sync_core_sync_state_.DerivedState.md b/docs/api/md/interfaces/internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_sync_core_sync_state_.DerivedState.md deleted file mode 100644 index 0611020a8..000000000 --- a/docs/api/md/interfaces/internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_sync_core_sync_state_.DerivedState.md +++ /dev/null @@ -1,37 +0,0 @@ -[API](../README.md) / [\](../modules/internal_.md) / ["/home/runner/work/mapeo-core-next/mapeo-core-next/src/sync/core-sync-state"](../modules/internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_sync_core_sync_state_.md) / DerivedState - -# Interface: DerivedState\<\> - -[\](../modules/internal_.md).["/home/runner/work/mapeo-core-next/mapeo-core-next/src/sync/core-sync-state"](../modules/internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_sync_core_sync_state_.md).DerivedState - -## Table of contents - -### Properties - -- [coreLength](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_sync_core_sync_state_.DerivedState.md#corelength) -- [localState](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_sync_core_sync_state_.DerivedState.md#localstate) -- [remoteStates](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_sync_core_sync_state_.DerivedState.md#remotestates) - -## Properties - -### coreLength - -• **coreLength**: `number` - -known (sparse) length of the core - -___ - -### localState - -• **localState**: [`CoreState`](internal_.CoreState.md) - -local state - -___ - -### remoteStates - -• **remoteStates**: `Object` - -map of state of all known peers diff --git a/docs/api/md/interfaces/internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_sync_core_sync_state_.InternalState.md b/docs/api/md/interfaces/internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_sync_core_sync_state_.InternalState.md deleted file mode 100644 index c55842f81..000000000 --- a/docs/api/md/interfaces/internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_sync_core_sync_state_.InternalState.md +++ /dev/null @@ -1,47 +0,0 @@ -[API](../README.md) / [\](../modules/internal_.md) / ["/home/runner/work/mapeo-core-next/mapeo-core-next/src/sync/core-sync-state"](../modules/internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_sync_core_sync_state_.md) / InternalState - -# Interface: InternalState\<\> - -[\](../modules/internal_.md).["/home/runner/work/mapeo-core-next/mapeo-core-next/src/sync/core-sync-state"](../modules/internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_sync_core_sync_state_.md).InternalState - -## Table of contents - -### Properties - -- [length](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_sync_core_sync_state_.InternalState.md#length) -- [localState](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_sync_core_sync_state_.InternalState.md#localstate) -- [namespace](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_sync_core_sync_state_.InternalState.md#namespace) -- [peerSyncControllers](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_sync_core_sync_state_.InternalState.md#peersynccontrollers) -- [remoteStates](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_sync_core_sync_state_.InternalState.md#remotestates) - -## Properties - -### length - -• **length**: `undefined` \| `number` - -Core length, e.g. how many blocks in the core (including blocks that are not downloaded) - -___ - -### localState - -• **localState**: `PeerState` - -___ - -### namespace - -• **namespace**: ``"blob"`` \| ``"auth"`` \| ``"config"`` \| ``"data"`` \| ``"blobIndex"`` - -___ - -### peerSyncControllers - -• **peerSyncControllers**: `Map`\<`string`, [`PeerSyncController`](../classes/internal_.PeerSyncController.md)\> - -___ - -### remoteStates - -• **remoteStates**: `Map`\<`string`, `PeerState`\> diff --git a/docs/api/md/modules/internal_.Hyperblobs.md b/docs/api/md/modules/internal_.Hyperblobs.md deleted file mode 100644 index e3c16cb81..000000000 --- a/docs/api/md/modules/internal_.Hyperblobs.md +++ /dev/null @@ -1,11 +0,0 @@ -[API](../README.md) / [\](internal_.md) / Hyperblobs - -# Namespace: Hyperblobs - -[\](internal_.md).Hyperblobs - -## Table of contents - -### Interfaces - -- [BlobId](../interfaces/internal_.Hyperblobs.BlobId.md) diff --git a/docs/api/md/modules/internal_.Hyperdrive.md b/docs/api/md/modules/internal_.Hyperdrive.md deleted file mode 100644 index 052082649..000000000 --- a/docs/api/md/modules/internal_.Hyperdrive.md +++ /dev/null @@ -1,11 +0,0 @@ -[API](../README.md) / [\](internal_.md) / Hyperdrive - -# Namespace: Hyperdrive - -[\](internal_.md).Hyperdrive - -## Table of contents - -### Interfaces - -- [HyperdriveEntry](../interfaces/internal_.Hyperdrive.HyperdriveEntry.md) diff --git a/docs/api/md/modules/internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_core_manager_index_.md b/docs/api/md/modules/internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_core_manager_index_.md deleted file mode 100644 index 64d7eb417..000000000 --- a/docs/api/md/modules/internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_core_manager_index_.md +++ /dev/null @@ -1,69 +0,0 @@ -[API](../README.md) / [\](internal_.md) / "/home/runner/work/mapeo-core-next/mapeo-core-next/src/core-manager/index" - -# Namespace: "/home/runner/work/mapeo-core-next/mapeo-core-next/src/core-manager/index" - -[\](internal_.md)."/home/runner/work/mapeo-core-next/mapeo-core-next/src/core-manager/index" - -## Table of contents - -### References - -- [Core](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_core_manager_index_.md#core) -- [CoreManager](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_core_manager_index_.md#coremanager) -- [CoreRecord](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_core_manager_index_.md#corerecord) -- [HaveMsg](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_core_manager_index_.md#havemsg) -- [Namespace](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_core_manager_index_.md#namespace) - -### Interfaces - -- [Events](../interfaces/internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_core_manager_index_.Events.md) - -### Type Aliases - -- [DuplexStream](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_core_manager_index_.md#duplexstream) - -### Variables - -- [kCoreManagerReplicate](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_core_manager_index_.md#kcoremanagerreplicate) - -## References - -### Core - -Re-exports [Core](internal_.md#core) - -___ - -### CoreManager - -Re-exports [CoreManager](../classes/internal_.CoreManager.md) - -___ - -### CoreRecord - -Re-exports [CoreRecord](internal_.md#corerecord) - -___ - -### HaveMsg - -Re-exports [HaveMsg](../interfaces/internal_.HaveMsg.md) - -___ - -### Namespace - -Re-exports [Namespace](internal_.md#namespace-1) - -## Type Aliases - -### DuplexStream - -Ƭ **DuplexStream**\<\>: `Duplex` - -## Variables - -### kCoreManagerReplicate - -• `Const` **kCoreManagerReplicate**: typeof [`kCoreManagerReplicate`](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_core_manager_index_.md#kcoremanagerreplicate) diff --git a/docs/api/md/modules/internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_datastore_index_.md b/docs/api/md/modules/internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_datastore_index_.md deleted file mode 100644 index b87216321..000000000 --- a/docs/api/md/modules/internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_datastore_index_.md +++ /dev/null @@ -1,61 +0,0 @@ -[API](../README.md) / [\](internal_.md) / "/home/runner/work/mapeo-core-next/mapeo-core-next/src/datastore/index" - -# Namespace: "/home/runner/work/mapeo-core-next/mapeo-core-next/src/datastore/index" - -[\](internal_.md)."/home/runner/work/mapeo-core-next/mapeo-core-next/src/datastore/index" - -## Table of contents - -### References - -- [DataStore](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_datastore_index_.md#datastore) -- [NamespaceSchemas](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_datastore_index_.md#namespaceschemas) - -### Type Aliases - -- [DataStoreEvents](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_datastore_index_.md#datastoreevents) -- [MapeoDocTablesMap](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_datastore_index_.md#mapeodoctablesmap) -- [OmitUnion](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_datastore_index_.md#omitunion) - -## References - -### DataStore - -Re-exports [DataStore](../classes/internal_.DataStore.md) - -___ - -### NamespaceSchemas - -Re-exports [NamespaceSchemas](internal_.md#namespaceschemas) - -## Type Aliases - -### DataStoreEvents - -Ƭ **DataStoreEvents**\<`TSchemaName`\>: \{ [S in Exclude\]: Function } - -#### Type parameters - -| Name | Type | -| :------ | :------ | -| `TSchemaName` | extends `MapeoDoc`[``"schemaName"``] | - -___ - -### MapeoDocTablesMap - -Ƭ **MapeoDocTablesMap**: \{ [K in MapeoDocTables["\_"]["name"]]: Extract\ } - -___ - -### OmitUnion - -Ƭ **OmitUnion**\<`T`, `K`\>: `T` extends `any` ? `Omit`\<`T`, `K`\> : `never` - -#### Type parameters - -| Name | Type | -| :------ | :------ | -| `T` | `T` | -| `K` | extends keyof `any` | diff --git a/docs/api/md/modules/internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_local_peers_.md b/docs/api/md/modules/internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_local_peers_.md deleted file mode 100644 index 97eaacac1..000000000 --- a/docs/api/md/modules/internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_local_peers_.md +++ /dev/null @@ -1,89 +0,0 @@ -[API](../README.md) / [\](internal_.md) / "/home/runner/work/mapeo-core-next/mapeo-core-next/src/local-peers" - -# Namespace: "/home/runner/work/mapeo-core-next/mapeo-core-next/src/local-peers" - -[\](internal_.md)."/home/runner/work/mapeo-core-next/mapeo-core-next/src/local-peers" - -## Table of contents - -### References - -- [LocalPeers](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_local_peers_.md#localpeers) -- [PeerInfoBase](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_local_peers_.md#peerinfobase) -- [PeerInfoConnected](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_local_peers_.md#peerinfoconnected) -- [PeerInfoDisconnected](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_local_peers_.md#peerinfodisconnected) - -### Classes - -- [PeerDisconnectedError](../classes/internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_local_peers_.PeerDisconnectedError.md) -- [PeerFailedConnectionError](../classes/internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_local_peers_.PeerFailedConnectionError.md) -- [UnknownPeerError](../classes/internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_local_peers_.UnknownPeerError.md) - -### Interfaces - -- [LocalPeersEvents](../interfaces/internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_local_peers_.LocalPeersEvents.md) - -### Type Aliases - -- [PeerInfo](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_local_peers_.md#peerinfo) -- [PeerInfoConnecting](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_local_peers_.md#peerinfoconnecting) -- [PeerInfoInternal](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_local_peers_.md#peerinfointernal) -- [PeerState](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_local_peers_.md#peerstate) - -### Variables - -- [kTestOnlySendRawInvite](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_local_peers_.md#ktestonlysendrawinvite) - -## References - -### LocalPeers - -Re-exports [LocalPeers](../classes/internal_.LocalPeers.md) - -___ - -### PeerInfoBase - -Re-exports [PeerInfoBase](../interfaces/internal_.PeerInfoBase.md) - -___ - -### PeerInfoConnected - -Re-exports [PeerInfoConnected](internal_.md#peerinfoconnected) - -___ - -### PeerInfoDisconnected - -Re-exports [PeerInfoDisconnected](internal_.md#peerinfodisconnected) - -## Type Aliases - -### PeerInfo - -Ƭ **PeerInfo**\<\>: [`PeerInfoConnected`](internal_.md#peerinfoconnected) \| [`PeerInfoDisconnected`](internal_.md#peerinfodisconnected) - -___ - -### PeerInfoConnecting - -Ƭ **PeerInfoConnecting**\<\>: [`PeerInfoBase`](../interfaces/internal_.PeerInfoBase.md) & \{ `status`: ``"connecting"`` } - -___ - -### PeerInfoInternal - -Ƭ **PeerInfoInternal**\<\>: [`PeerInfoConnecting`](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_local_peers_.md#peerinfoconnecting) \| [`PeerInfoConnected`](internal_.md#peerinfoconnected) \| [`PeerInfoDisconnected`](internal_.md#peerinfodisconnected) - -___ - -### PeerState - -Ƭ **PeerState**\<\>: [`PeerInfoInternal`](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_local_peers_.md#peerinfointernal)[``"status"``] - -## Variables - -### kTestOnlySendRawInvite - -• `Const` **kTestOnlySendRawInvite**: typeof [`kTestOnlySendRawInvite`](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_local_peers_.md#ktestonlysendrawinvite) diff --git a/docs/api/md/modules/internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_roles_.md b/docs/api/md/modules/internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_roles_.md deleted file mode 100644 index c0f2f8f25..000000000 --- a/docs/api/md/modules/internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_roles_.md +++ /dev/null @@ -1,194 +0,0 @@ -[API](../README.md) / [\](internal_.md) / "/home/runner/work/mapeo-core-next/mapeo-core-next/src/roles" - -# Namespace: "/home/runner/work/mapeo-core-next/mapeo-core-next/src/roles" - -[\](internal_.md)."/home/runner/work/mapeo-core-next/mapeo-core-next/src/roles" - -## Table of contents - -### References - -- [DocCapability](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_roles_.md#doccapability) -- [ElementOf](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_roles_.md#elementof) -- [Role](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_roles_.md#role) -- [RoleId](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_roles_.md#roleid) -- [Roles](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_roles_.md#roles) - -### Type Aliases - -- [RoleIdAssignableToAnyone](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_roles_.md#roleidassignabletoanyone) -- [RoleIdAssignableToOthers](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_roles_.md#roleidassignabletoothers) -- [RoleIdForNewInvite](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_roles_.md#roleidfornewinvite) - -### Variables - -- [BLOCKED\_ROLE\_ID](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_roles_.md#blocked_role_id) -- [COORDINATOR\_ROLE\_ID](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_roles_.md#coordinator_role_id) -- [CREATOR\_ROLE](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_roles_.md#creator_role) -- [CREATOR\_ROLE\_ID](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_roles_.md#creator_role_id) -- [LEFT\_ROLE\_ID](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_roles_.md#left_role_id) -- [MEMBER\_ROLE\_ID](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_roles_.md#member_role_id) -- [NO\_ROLE](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_roles_.md#no_role) -- [NO\_ROLE\_ID](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_roles_.md#no_role_id) -- [ROLES](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_roles_.md#roles-1) - -### Functions - -- [isRoleIdAssignableToOthers](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_roles_.md#isroleidassignabletoothers) -- [isRoleIdForNewInvite](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_roles_.md#isroleidfornewinvite) - -## References - -### DocCapability - -Re-exports [DocCapability](../interfaces/internal_.DocCapability.md) - -___ - -### ElementOf - -Re-exports [ElementOf](internal_.md#elementof) - -___ - -### Role - -Re-exports [Role](../interfaces/internal_.Role.md) - -___ - -### RoleId - -Re-exports [RoleId](internal_.md#roleid) - -___ - -### Roles - -Re-exports [Roles](../classes/internal_.Roles.md) - -## Type Aliases - -### RoleIdAssignableToAnyone - -Ƭ **RoleIdAssignableToAnyone**\<\>: [`ElementOf`](internal_.md#elementof)\ - -___ - -### RoleIdAssignableToOthers - -Ƭ **RoleIdAssignableToOthers**\<\>: [`ElementOf`](internal_.md#elementof)\ - -___ - -### RoleIdForNewInvite - -Ƭ **RoleIdForNewInvite**\<\>: [`ElementOf`](internal_.md#elementof)\ - -## Variables - -### BLOCKED\_ROLE\_ID - -• `Const` **BLOCKED\_ROLE\_ID**: ``"9e6d29263cba36c9"`` - -___ - -### COORDINATOR\_ROLE\_ID - -• `Const` **COORDINATOR\_ROLE\_ID**: ``"f7c150f5a3a9a855"`` - -___ - -### CREATOR\_ROLE - -• `Const` **CREATOR\_ROLE**: [`Role`](../interfaces/internal_.Role.md)\<``"a12a6702b93bd7ff"``\> - -This is currently the same as 'Coordinator' role, but defined separately -because the creator should always have ALL powers, but we could edit the -'Coordinator' powers in the future. - -___ - -### CREATOR\_ROLE\_ID - -• `Const` **CREATOR\_ROLE\_ID**: ``"a12a6702b93bd7ff"`` - -___ - -### LEFT\_ROLE\_ID - -• `Const` **LEFT\_ROLE\_ID**: ``"8ced989b1904606b"`` - -___ - -### MEMBER\_ROLE\_ID - -• `Const` **MEMBER\_ROLE\_ID**: ``"012fd2d431c0bf60"`` - -___ - -### NO\_ROLE - -• `Const` **NO\_ROLE**: [`Role`](../interfaces/internal_.Role.md)\<``"08e4251e36f6e7ed"``\> - -This is the role assumed for a device when no role record can be found. This -can happen when an invited device did not manage to sync with the device that -invited them, and they then try to sync with someone else. We want them to be -able to sync the auth and config store, because that way they may be able to -receive their role record, and they can get the project config so that they -can start collecting data. - -___ - -### NO\_ROLE\_ID - -• `Const` **NO\_ROLE\_ID**: ``"08e4251e36f6e7ed"`` - -___ - -### ROLES - -• `Const` **ROLES**: `Object` - -#### Type declaration - -| Name | Type | -| :------ | :------ | -| `012fd2d431c0bf60` | [`Role`](../interfaces/internal_.Role.md)\<``"012fd2d431c0bf60"``\> | -| `08e4251e36f6e7ed` | [`Role`](../interfaces/internal_.Role.md)\<``"08e4251e36f6e7ed"``\> | -| `8ced989b1904606b` | [`Role`](../interfaces/internal_.Role.md)\<``"8ced989b1904606b"``\> | -| `9e6d29263cba36c9` | [`Role`](../interfaces/internal_.Role.md)\<``"9e6d29263cba36c9"``\> | -| `a12a6702b93bd7ff` | [`Role`](../interfaces/internal_.Role.md)\<``"a12a6702b93bd7ff"``\> | -| `f7c150f5a3a9a855` | [`Role`](../interfaces/internal_.Role.md)\<``"f7c150f5a3a9a855"``\> | - -## Functions - -### isRoleIdAssignableToOthers - -▸ **isRoleIdAssignableToOthers**(`value`): value is "f7c150f5a3a9a855" \| "012fd2d431c0bf60" \| "9e6d29263cba36c9" - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `value` | `unknown` | - -#### Returns - -value is "f7c150f5a3a9a855" \| "012fd2d431c0bf60" \| "9e6d29263cba36c9" - -___ - -### isRoleIdForNewInvite - -▸ **isRoleIdForNewInvite**(`value`): value is "f7c150f5a3a9a855" \| "012fd2d431c0bf60" \| "9e6d29263cba36c9" - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `value` | `unknown` | - -#### Returns - -value is "f7c150f5a3a9a855" \| "012fd2d431c0bf60" \| "9e6d29263cba36c9" diff --git a/docs/api/md/modules/internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_schema_client_.md b/docs/api/md/modules/internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_schema_client_.md deleted file mode 100644 index 4822c6d83..000000000 --- a/docs/api/md/modules/internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_schema_client_.md +++ /dev/null @@ -1,52 +0,0 @@ -[API](../README.md) / [\](internal_.md) / "/home/runner/work/mapeo-core-next/mapeo-core-next/src/schema/client" - -# Namespace: "/home/runner/work/mapeo-core-next/mapeo-core-next/src/schema/client" - -[\](internal_.md)."/home/runner/work/mapeo-core-next/mapeo-core-next/src/schema/client" - -## Table of contents - -### References - -- [DeviceInfoParam](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_schema_client_.md#deviceinfoparam) - -### Interfaces - -- [ProjectInfo](../interfaces/internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_schema_client_.ProjectInfo.md) - -### Variables - -- [localDeviceInfoTable](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_schema_client_.md#localdeviceinfotable) -- [projectBacklinkTable](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_schema_client_.md#projectbacklinktable) -- [projectKeysTable](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_schema_client_.md#projectkeystable) -- [projectSettingsTable](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_schema_client_.md#projectsettingstable) - -## References - -### DeviceInfoParam - -Re-exports [DeviceInfoParam](internal_.md#deviceinfoparam) - -## Variables - -### localDeviceInfoTable - -• `Const` **localDeviceInfoTable**: `SQLiteTableWithColumns`\<{}\> - -___ - -### projectBacklinkTable - -• `Const` **projectBacklinkTable**: `SQLiteTableWithColumns`\<{}\> - -___ - -### projectKeysTable - -• `Const` **projectKeysTable**: `SQLiteTableWithColumns`\<{}\> - -___ - -### projectSettingsTable - -• `Const` **projectSettingsTable**: `SQLiteTableWithColumns`\<{}\> diff --git a/docs/api/md/modules/internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_schema_project_.md b/docs/api/md/modules/internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_schema_project_.md deleted file mode 100644 index b4ef8a693..000000000 --- a/docs/api/md/modules/internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_schema_project_.md +++ /dev/null @@ -1,143 +0,0 @@ -[API](../README.md) / [\](internal_.md) / "/home/runner/work/mapeo-core-next/mapeo-core-next/src/schema/project" - -# Namespace: "/home/runner/work/mapeo-core-next/mapeo-core-next/src/schema/project" - -[\](internal_.md)."/home/runner/work/mapeo-core-next/mapeo-core-next/src/schema/project" - -## Table of contents - -### Variables - -- [coreOwnershipBacklinkTable](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_schema_project_.md#coreownershipbacklinktable) -- [coreOwnershipTable](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_schema_project_.md#coreownershiptable) -- [coresTable](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_schema_project_.md#corestable) -- [deviceInfoBacklinkTable](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_schema_project_.md#deviceinfobacklinktable) -- [deviceInfoTable](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_schema_project_.md#deviceinfotable) -- [fieldBacklinkTable](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_schema_project_.md#fieldbacklinktable) -- [fieldTable](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_schema_project_.md#fieldtable) -- [iconBacklinkTable](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_schema_project_.md#iconbacklinktable) -- [iconTable](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_schema_project_.md#icontable) -- [observationBacklinkTable](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_schema_project_.md#observationbacklinktable) -- [observationTable](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_schema_project_.md#observationtable) -- [presetBacklinkTable](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_schema_project_.md#presetbacklinktable) -- [presetTable](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_schema_project_.md#presettable) -- [roleBacklinkTable](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_schema_project_.md#rolebacklinktable) -- [roleTable](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_schema_project_.md#roletable) -- [trackBacklinkTable](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_schema_project_.md#trackbacklinktable) -- [trackTable](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_schema_project_.md#tracktable) -- [translationBacklinkTable](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_schema_project_.md#translationbacklinktable) -- [translationTable](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_schema_project_.md#translationtable) - -## Variables - -### coreOwnershipBacklinkTable - -• `Const` **coreOwnershipBacklinkTable**: `SQLiteTableWithColumns`\<{}\> - -___ - -### coreOwnershipTable - -• `Const` **coreOwnershipTable**: `SQLiteTableWithColumns`\<{}\> - -___ - -### coresTable - -• `Const` **coresTable**: `SQLiteTableWithColumns`\<{}\> - -___ - -### deviceInfoBacklinkTable - -• `Const` **deviceInfoBacklinkTable**: `SQLiteTableWithColumns`\<{}\> - -___ - -### deviceInfoTable - -• `Const` **deviceInfoTable**: `SQLiteTableWithColumns`\<{}\> - -___ - -### fieldBacklinkTable - -• `Const` **fieldBacklinkTable**: `SQLiteTableWithColumns`\<{}\> - -___ - -### fieldTable - -• `Const` **fieldTable**: `SQLiteTableWithColumns`\<{}\> - -___ - -### iconBacklinkTable - -• `Const` **iconBacklinkTable**: `SQLiteTableWithColumns`\<{}\> - -___ - -### iconTable - -• `Const` **iconTable**: `SQLiteTableWithColumns`\<{}\> - -___ - -### observationBacklinkTable - -• `Const` **observationBacklinkTable**: `SQLiteTableWithColumns`\<{}\> - -___ - -### observationTable - -• `Const` **observationTable**: `SQLiteTableWithColumns`\<{}\> - -___ - -### presetBacklinkTable - -• `Const` **presetBacklinkTable**: `SQLiteTableWithColumns`\<{}\> - -___ - -### presetTable - -• `Const` **presetTable**: `SQLiteTableWithColumns`\<{}\> - -___ - -### roleBacklinkTable - -• `Const` **roleBacklinkTable**: `SQLiteTableWithColumns`\<{}\> - -___ - -### roleTable - -• `Const` **roleTable**: `SQLiteTableWithColumns`\<{}\> - -___ - -### trackBacklinkTable - -• `Const` **trackBacklinkTable**: `SQLiteTableWithColumns`\<{}\> - -___ - -### trackTable - -• `Const` **trackTable**: `SQLiteTableWithColumns`\<{}\> - -___ - -### translationBacklinkTable - -• `Const` **translationBacklinkTable**: `SQLiteTableWithColumns`\<{}\> - -___ - -### translationTable - -• `Const` **translationTable**: `SQLiteTableWithColumns`\<{}\> diff --git a/docs/api/md/modules/internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_sync_core_sync_state_.md b/docs/api/md/modules/internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_sync_core_sync_state_.md deleted file mode 100644 index 3dc6bb316..000000000 --- a/docs/api/md/modules/internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_sync_core_sync_state_.md +++ /dev/null @@ -1,76 +0,0 @@ -[API](../README.md) / [\](internal_.md) / "/home/runner/work/mapeo-core-next/mapeo-core-next/src/sync/core-sync-state" - -# Namespace: "/home/runner/work/mapeo-core-next/mapeo-core-next/src/sync/core-sync-state" - -[\](internal_.md)."/home/runner/work/mapeo-core-next/mapeo-core-next/src/sync/core-sync-state" - -## Table of contents - -### References - -- [CoreState](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_sync_core_sync_state_.md#corestate) -- [CoreSyncState](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_sync_core_sync_state_.md#coresyncstate) -- [PeerCoreState](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_sync_core_sync_state_.md#peercorestate) - -### Interfaces - -- [DerivedState](../interfaces/internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_sync_core_sync_state_.DerivedState.md) -- [InternalState](../interfaces/internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_sync_core_sync_state_.InternalState.md) - -### Type Aliases - -- [Bitfield](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_sync_core_sync_state_.md#bitfield) -- [PeerId](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_sync_core_sync_state_.md#peerid) - -### Functions - -- [bitCount32](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_sync_core_sync_state_.md#bitcount32) - -## References - -### CoreState - -Re-exports [CoreState](../interfaces/internal_.CoreState.md) - -___ - -### CoreSyncState - -Re-exports [CoreSyncState](../classes/internal_.CoreSyncState.md) - -___ - -### PeerCoreState - -Re-exports [PeerCoreState](internal_.md#peercorestate) - -## Type Aliases - -### Bitfield - -Ƭ **Bitfield**\<\>: [`default`](../classes/internal_.default-2.md) - -___ - -### PeerId - -Ƭ **PeerId**\<\>: `string` - -## Functions - -### bitCount32 - -▸ **bitCount32**(`n`): `number` - -Apologies for the obscure code. From -https://stackoverflow.com/a/109025/903300 - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `n` | `number` | - -#### Returns - -`number` diff --git a/docs/api/md/modules/internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_sync_namespace_sync_state_.md b/docs/api/md/modules/internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_sync_namespace_sync_state_.md deleted file mode 100644 index 13f36c025..000000000 --- a/docs/api/md/modules/internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_sync_namespace_sync_state_.md +++ /dev/null @@ -1,47 +0,0 @@ -[API](../README.md) / [\](internal_.md) / "/home/runner/work/mapeo-core-next/mapeo-core-next/src/sync/namespace-sync-state" - -# Namespace: "/home/runner/work/mapeo-core-next/mapeo-core-next/src/sync/namespace-sync-state" - -[\](internal_.md)."/home/runner/work/mapeo-core-next/mapeo-core-next/src/sync/namespace-sync-state" - -## Table of contents - -### Classes - -- [NamespaceSyncState](../classes/internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_sync_namespace_sync_state_.NamespaceSyncState.md) - -### Type Aliases - -- [SyncState](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_sync_namespace_sync_state_.md#syncstate) - -### Functions - -- [createState](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_sync_namespace_sync_state_.md#createstate) - -## Type Aliases - -### SyncState - -Ƭ **SyncState**\<\>: `Omit`\<[`"/home/runner/work/mapeo-core-next/mapeo-core-next/src/sync/core-sync-state"`](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_sync_core_sync_state_.md), ``"coreLength"``\> & \{ `coreCount`: `number` ; `dataToSync`: `boolean` } - -## Functions - -### createState - -▸ **createState**(): [`CoreState`](../interfaces/internal_.CoreState.md) - -#### Returns - -[`CoreState`](../interfaces/internal_.CoreState.md) - -▸ **createState**(`status`): [`PeerCoreState`](internal_.md#peercorestate) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `status` | ``"disconnected"`` \| ``"connecting"`` \| ``"connected"`` | - -#### Returns - -[`PeerCoreState`](internal_.md#peercorestate) diff --git a/docs/api/md/modules/internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_utils_.md b/docs/api/md/modules/internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_utils_.md deleted file mode 100644 index 1307dfbfc..000000000 --- a/docs/api/md/modules/internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_utils_.md +++ /dev/null @@ -1,368 +0,0 @@ -[API](../README.md) / [\](internal_.md) / "/home/runner/work/mapeo-core-next/mapeo-core-next/src/utils" - -# Namespace: "/home/runner/work/mapeo-core-next/mapeo-core-next/src/utils" - -[\](internal_.md)."/home/runner/work/mapeo-core-next/mapeo-core-next/src/utils" - -## Table of contents - -### References - -- [OpenedNoiseStream](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_utils_.md#openednoisestream) - -### Classes - -- [ExhaustivenessError](../classes/internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_utils_.ExhaustivenessError.md) - -### Type Aliases - -- [DestroyedNoiseStream](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_utils_.md#destroyednoisestream) -- [NoiseStream](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_utils_.md#noisestream) - -### Functions - -- [assert](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_utils_.md#assert) -- [createMap](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_utils_.md#createmap) -- [deNullify](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_utils_.md#denullify) -- [getDeviceId](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_utils_.md#getdeviceid) -- [hashObject](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_utils_.md#hashobject) -- [idToKey](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_utils_.md#idtokey) -- [keyToId](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_utils_.md#keytoid) -- [noop](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_utils_.md#noop) -- [openedNoiseSecretStream](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_utils_.md#openednoisesecretstream) -- [parseVersion](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_utils_.md#parseversion) -- [projectIdToNonce](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_utils_.md#projectidtononce) -- [projectKeyToId](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_utils_.md#projectkeytoid) -- [projectKeyToPublicId](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_utils_.md#projectkeytopublicid) -- [setHas](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_utils_.md#sethas) -- [valueOf](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_utils_.md#valueof) - -## References - -### OpenedNoiseStream - -Re-exports [OpenedNoiseStream](internal_.md#openednoisestream) - -## Type Aliases - -### DestroyedNoiseStream - -Ƭ **DestroyedNoiseStream**\<\>: [`NoiseStream`](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_utils_.md#noisestream) & \{ `destroyed`: ``true`` } - -___ - -### NoiseStream - -Ƭ **NoiseStream**\<\>: `__module` - -## Functions - -### assert - -▸ **assert**(`condition`, `message`): asserts condition - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `condition` | `unknown` | -| `message` | `string` | - -#### Returns - -asserts condition - -___ - -### createMap - -▸ **createMap**\<`K`, `V`\>(`keys`, `value`): `Record`\<`K`, `V` extends () => `T` ? `T` : `V`\> - -Small helper to create a typed map - -#### Type parameters - -| Name | Type | -| :------ | :------ | -| `K` | extends `string` | -| `V` | extends `unknown` | - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `keys` | readonly `K`[] | -| `value` | `V` | - -#### Returns - -`Record`\<`K`, `V` extends () => `T` ? `T` : `V`\> - -___ - -### deNullify - -▸ **deNullify**\<`T`\>(`obj`): \{ [KeyType in string \| number \| symbol]: RemoveNull\<\{ [KeyType in string \| number \| symbol]: (\{ [KeyType in string \| number \| symbol as Filter\]: T[KeyType] } & Partial\\>)[KeyType] }\>[KeyType] } - -When reading from SQLite, any optional properties are set to `null`. This -converts `null` back to `undefined` to match the input types (e.g. the types -defined in @mapeo/schema) - -#### Type parameters - -| Name | Type | -| :------ | :------ | -| `T` | extends `Object` | - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `obj` | `T` | - -#### Returns - -\{ [KeyType in string \| number \| symbol]: RemoveNull\<\{ [KeyType in string \| number \| symbol]: (\{ [KeyType in string \| number \| symbol as Filter\]: T[KeyType] } & Partial\\>)[KeyType] }\>[KeyType] } - -___ - -### getDeviceId - -▸ **getDeviceId**(`keyManager`): `string` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `keyManager` | `KeyManager` | - -#### Returns - -`string` - -___ - -### hashObject - -▸ **hashObject**(`obj`): `string` - -create a sha256 hash of an object using json-stable-stringify for deterministic results - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `obj` | `Object` | - -#### Returns - -`string` - -hash of the object - -___ - -### idToKey - -▸ **idToKey**(`id`): `Buffer` \| `Uint8Array` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `id` | `string` \| `Buffer` | - -#### Returns - -`Buffer` \| `Uint8Array` - -___ - -### keyToId - -▸ **keyToId**(`key`): `string` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `key` | `string` \| `Buffer` | - -#### Returns - -`string` - -___ - -### noop - -▸ **noop**(): `void` - -#### Returns - -`void` - -___ - -### openedNoiseSecretStream - -▸ **openedNoiseSecretStream**(`stream`): `Promise`\<[`DestroyedNoiseStream`](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_utils_.md#destroyednoisestream) \| [`OpenedNoiseStream`](internal_.md#openednoisestream)\<`Duplex` \| `Duplex`\<`any`, `any`, `any`, `any`, ``true``, ``true``, `DuplexEvents`\<`any`, `any`\>\>\>\> - -Utility to await a NoiseSecretStream to open, that returns a stream with the -correct types for publicKey and remotePublicKey (which can be null before -stream is opened) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `stream` | `NoiseSecretStream`\<`any`\> | - -#### Returns - -`Promise`\<[`DestroyedNoiseStream`](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_utils_.md#destroyednoisestream) \| [`OpenedNoiseStream`](internal_.md#openednoisestream)\<`Duplex` \| `Duplex`\<`any`, `any`, `any`, `any`, ``true``, ``true``, `DuplexEvents`\<`any`, `any`\>\>\>\> - -___ - -### parseVersion - -▸ **parseVersion**(`version`): `Object` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `version` | `string` | - -#### Returns - -`Object` - -| Name | Type | -| :------ | :------ | -| `blockIndex` | `number` | -| `coreId` | `string` | - -___ - -### projectIdToNonce - -▸ **projectIdToNonce**(`projectId`): `Buffer` - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `projectId` | `string` | Project internal ID | - -#### Returns - -`Buffer` - -24-byte nonce (same length as sodium.crypto_aead_xchacha20poly1305_ietf_NPUBBYTES) - -___ - -### projectKeyToId - -▸ **projectKeyToId**(`projectKey`): `string` - -Create an internal ID from a project key - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `projectKey` | `Buffer` | - -#### Returns - -`string` - -___ - -### projectKeyToPublicId - -▸ **projectKeyToPublicId**(`projectKey`): `string` - -Create a public ID from a project key - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `projectKey` | `Buffer` | - -#### Returns - -`string` - -___ - -### setHas - -▸ **setHas**\<`T`\>(`set`): (`value`: `unknown`) => value is T - -Return a function that itself returns whether a value is part of the set. - -Similar to binding `Set.prototype.has`, but (1) is shorter (2) refines the type. - -#### Type parameters - -| Name | -| :------ | -| `T` | - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `set` | `Readonly`\<`Set`\<`T`\>\> | - -#### Returns - -`fn` - -▸ (`value`): value is T - -##### Parameters - -| Name | Type | -| :------ | :------ | -| `value` | `unknown` | - -##### Returns - -value is T - -**`Example`** - -```ts -const mySet = new Set([1, 2, 3]) -const isInMySet = setHas(mySet) - -console.log(isInMySet(2)) -// => true -``` - -___ - -### valueOf - -▸ **valueOf**\<`T`\>(`doc`): `Omit`\<`T`, ``"docId"`` \| ``"versionId"`` \| ``"links"`` \| ``"forks"`` \| ``"createdAt"`` \| ``"updatedAt"`` \| ``"createdBy"`` \| ``"deleted"``\> - -#### Type parameters - -| Name | Type | -| :------ | :------ | -| `T` | extends `MapeoDoc` & \{ `forks?`: `string`[] } | - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `doc` | `T` | - -#### Returns - -`Omit`\<`T`, ``"docId"`` \| ``"versionId"`` \| ``"links"`` \| ``"forks"`` \| ``"createdAt"`` \| ``"updatedAt"`` \| ``"createdBy"`` \| ``"deleted"``\> diff --git a/docs/api/md/modules/internal_._hyperdrive_.md b/docs/api/md/modules/internal_._hyperdrive_.md deleted file mode 100644 index cb207e621..000000000 --- a/docs/api/md/modules/internal_._hyperdrive_.md +++ /dev/null @@ -1,17 +0,0 @@ -[API](../README.md) / [\](internal_.md) / "hyperdrive" - -# Namespace: "hyperdrive" - -[\](internal_.md)."hyperdrive" - -## Table of contents - -### References - -- [HyperdriveEntry](internal_._hyperdrive_.md#hyperdriveentry) - -## References - -### HyperdriveEntry - -Re-exports [HyperdriveEntry](../interfaces/internal_.Hyperdrive.HyperdriveEntry.md) diff --git a/docs/api/md/modules/internal_.md b/docs/api/md/modules/internal_.md deleted file mode 100644 index 8d4dad566..000000000 --- a/docs/api/md/modules/internal_.md +++ /dev/null @@ -1,656 +0,0 @@ -[API](../README.md) / \ - -# Module: \ - -## Table of contents - -### References - -- [BlobId](internal_.md#blobid) -- [HyperdriveEntry](internal_.md#hyperdriveentry) -- [MapeoDocTables](internal_.md#mapeodoctables) -- [Namespace](internal_.md#namespace) -- [NamespaceSyncState](internal_.md#namespacesyncstate) -- [SyncState](internal_.md#syncstate) - -### Namespaces - -- ["/home/runner/work/mapeo-core-next/mapeo-core-next/src/core-manager/index"](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_core_manager_index_.md) -- ["/home/runner/work/mapeo-core-next/mapeo-core-next/src/datastore/index"](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_datastore_index_.md) -- ["/home/runner/work/mapeo-core-next/mapeo-core-next/src/local-peers"](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_local_peers_.md) -- ["/home/runner/work/mapeo-core-next/mapeo-core-next/src/roles"](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_roles_.md) -- ["/home/runner/work/mapeo-core-next/mapeo-core-next/src/schema/client"](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_schema_client_.md) -- ["/home/runner/work/mapeo-core-next/mapeo-core-next/src/schema/project"](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_schema_project_.md) -- ["/home/runner/work/mapeo-core-next/mapeo-core-next/src/sync/core-sync-state"](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_sync_core_sync_state_.md) -- ["/home/runner/work/mapeo-core-next/mapeo-core-next/src/sync/namespace-sync-state"](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_sync_namespace_sync_state_.md) -- ["/home/runner/work/mapeo-core-next/mapeo-core-next/src/utils"](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_utils_.md) -- ["hyperdrive"](internal_._hyperdrive_.md) -- [Hyperblobs](internal_.Hyperblobs.md) -- [Hyperdrive](internal_.Hyperdrive.md) - -### Classes - -- [BigSparseArray](../classes/internal_.BigSparseArray.md) -- [BlobApi](../classes/internal_.BlobApi.md) -- [BlobReadStream](../classes/internal_.BlobReadStream.md) -- [BlobStore](../classes/internal_.BlobStore.md) -- [BlobWriteStream](../classes/internal_.BlobWriteStream.md) -- [CoreIndex](../classes/internal_.CoreIndex.md) -- [CoreManager](../classes/internal_.CoreManager.md) -- [CoreOwnership](../classes/internal_.CoreOwnership.md) -- [CoreSyncState](../classes/internal_.CoreSyncState.md) -- [Corestore](../classes/internal_.Corestore.md) -- [DataStore](../classes/internal_.DataStore.md) -- [DataType](../classes/internal_.DataType.md) -- [DenseIndex](../classes/internal_.DenseIndex.md) -- [DriveLiveDownload](../classes/internal_.DriveLiveDownload.md) -- [Hyperblobs](../classes/internal_.Hyperblobs-1.md) -- [Hyperdrive](../classes/internal_.Hyperdrive-1.md) -- [IconApi](../classes/internal_.IconApi.md) -- [Index](../classes/internal_.Index.md) -- [IndexWriter](../classes/internal_.IndexWriter.md) -- [InviteApi](../classes/internal_.InviteApi.md) -- [LiveDownload](../classes/internal_.LiveDownload.md) -- [LocalDiscovery](../classes/internal_.LocalDiscovery.md) -- [LocalPeers](../classes/internal_.LocalPeers.md) -- [Logger](../classes/internal_.Logger.md) -- [MapeoProject](../classes/internal_.MapeoProject.md) -- [MemberApi](../classes/internal_.MemberApi.md) -- [Peer](../classes/internal_.Peer.md) -- [PeerSyncController](../classes/internal_.PeerSyncController.md) -- [PendingInvites](../classes/internal_.PendingInvites.md) -- [Protomux](../classes/internal_.Protomux.md) -- [RemoteBitfieldPage](../classes/internal_.RemoteBitfieldPage.md) -- [RemoteBitfieldSegment](../classes/internal_.RemoteBitfieldSegment.md) -- [Roles](../classes/internal_.Roles.md) -- [SparseIndex](../classes/internal_.SparseIndex.md) -- [SyncApi](../classes/internal_.SyncApi.md) -- [SyncState](../classes/internal_.SyncState.md) -- [TrackedKeyRequests](../classes/internal_.TrackedKeyRequests.md) -- [default](../classes/internal_.default.md) -- [default](../classes/internal_.default-1.md) -- [default](../classes/internal_.default-2.md) - -### Interfaces - -- [BitmapOpts](../interfaces/internal_.BitmapOpts.md) -- [BlobDownloadState](../interfaces/internal_.BlobDownloadState.md) -- [Channel](../interfaces/internal_.Channel.md) -- [CoreState](../interfaces/internal_.CoreState.md) -- [CorestoreEvents](../interfaces/internal_.CorestoreEvents.md) -- [DataTypeEvents](../interfaces/internal_.DataTypeEvents.md) -- [DocCapability](../interfaces/internal_.DocCapability.md) -- [Encoding](../interfaces/internal_.Encoding.md) -- [EncodingState](../interfaces/internal_.EncodingState.md) -- [HaveMsg](../interfaces/internal_.HaveMsg.md) -- [HyperdriveEvents](../interfaces/internal_.HyperdriveEvents.md) -- [HyperdriveGetOpts](../interfaces/internal_.HyperdriveGetOpts.md) -- [HyperdriveOptions](../interfaces/internal_.HyperdriveOptions.md) -- [MapsPluginOpts](../interfaces/internal_.MapsPluginOpts.md) -- [MemberInfo](../interfaces/internal_.MemberInfo.md) -- [Message](../interfaces/internal_.Message.md) -- [OfflineFallbackMapPluginOpts](../interfaces/internal_.OfflineFallbackMapPluginOpts.md) -- [PeerInfoBase](../interfaces/internal_.PeerInfoBase.md) -- [PendingInvite](../interfaces/internal_.PendingInvite.md) -- [PreEncodingState](../interfaces/internal_.PreEncodingState.md) -- [Role](../interfaces/internal_.Role.md) -- [StartOpts](../interfaces/internal_.StartOpts.md) -- [State](../interfaces/internal_.State.md) -- [StaticMapsPluginOpts](../interfaces/internal_.StaticMapsPluginOpts.md) -- [SvgOpts](../interfaces/internal_.SvgOpts.md) -- [SyncTypeState](../interfaces/internal_.SyncTypeState.md) - -### Type Aliases - -- [ArrayAtLeastOne](internal_.md#arrayatleastone) -- [BitField](internal_.md#bitfield) -- [BlobDownloadStateError](internal_.md#blobdownloadstateerror) -- [BlobFilter](internal_.md#blobfilter) -- [BlobId](internal_.md#blobid-1) -- [BlobIdBase](internal_.md#blobidbase) -- [BlobType](internal_.md#blobtype) -- [BlobVariant](internal_.md#blobvariant) -- [Chunk](internal_.md#chunk) -- [Core](internal_.md#core) -- [CoreOwnershipWithSignatures](internal_.md#coreownershipwithsignatures) -- [CoreOwnershipWithSignaturesValue](internal_.md#coreownershipwithsignaturesvalue) -- [CoreRecord](internal_.md#corerecord) -- [CoreStorage](internal_.md#corestorage) -- [DeviceInfoParam](internal_.md#deviceinfoparam) -- [EditableProjectSettings](internal_.md#editableprojectsettings) -- [ElementOf](internal_.md#elementof) -- [GetMapeoDocTables](internal_.md#getmapeodoctables) -- [IndexedDocIds](internal_.md#indexeddocids) -- [InternalDriveEmitter](internal_.md#internaldriveemitter) -- [InviteInternal](internal_.md#inviteinternal) -- [KeyPair](internal_.md#keypair) -- [Keypair](internal_.md#keypair-1) -- [MapBuffers](internal_.md#mapbuffers) -- [MapeoDocMap](internal_.md#mapeodocmap) -- [MapeoDocTableName](internal_.md#mapeodoctablename) -- [MapeoDocTables](internal_.md#mapeodoctables-1) -- [MapeoValueMap](internal_.md#mapeovaluemap) -- [Namespace](internal_.md#namespace-1) -- [NamespaceSchemas](internal_.md#namespaceschemas) -- [OpenedNoiseStream](internal_.md#openednoisestream) -- [OpenedNoiseStream](internal_.md#openednoisestream-1) -- [PeerCoreState](internal_.md#peercorestate) -- [PeerInfoConnected](internal_.md#peerinfoconnected) -- [PeerInfoDisconnected](internal_.md#peerinfodisconnected) -- [Primitive](internal_.md#primitive) -- [ProtocolStream](internal_.md#protocolstream) -- [PublicKey](internal_.md#publickey) -- [PublicPeerInfo](internal_.md#publicpeerinfo) -- [Range](internal_.md#range) -- [RemoveNull](internal_.md#removenull) -- [ReplicationStream](internal_.md#replicationstream) -- [RoleId](internal_.md#roleid) -- [SecretKey](internal_.md#secretkey) -- [State](internal_.md#state) -- [SupportedBlobVariants](internal_.md#supportedblobvariants) -- [SyncCapability](internal_.md#synccapability) -- [SyncType](internal_.md#synctype) - -### Variables - -- [NAMESPACES](internal_.md#namespaces) -- [NAMESPACE\_SCHEMAS](internal_.md#namespace_schemas) -- [ROLE\_IDS](internal_.md#role_ids) -- [ROLE\_IDS\_ASSIGNABLE\_TO\_ANYONE](internal_.md#role_ids_assignable_to_anyone) -- [ROLE\_IDS\_ASSIGNABLE\_TO\_OTHERS](internal_.md#role_ids_assignable_to_others) -- [ROLE\_IDS\_FOR\_NEW\_INVITE](internal_.md#role_ids_for_new_invite) -- [SUPPORTED\_BLOB\_VARIANTS](internal_.md#supported_blob_variants) - -## References - -### BlobId - -Re-exports [BlobId](../interfaces/internal_.Hyperblobs.BlobId.md) - -___ - -### HyperdriveEntry - -Re-exports [HyperdriveEntry](../interfaces/internal_.Hyperdrive.HyperdriveEntry.md) - -___ - -### MapeoDocTables - -Re-exports [MapeoDocTables](internal_.md#mapeodoctables-1) - -___ - -### Namespace - -Re-exports [Namespace](internal_.md#namespace-1) - -___ - -### NamespaceSyncState - -Re-exports [NamespaceSyncState](../classes/internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_sync_namespace_sync_state_.NamespaceSyncState.md) - -___ - -### SyncState - -Re-exports [SyncState](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_sync_namespace_sync_state_.md#syncstate) - -## Type Aliases - -### ArrayAtLeastOne - -Ƭ **ArrayAtLeastOne**\<`T`\>: [`T`, ...T[]] - -#### Type parameters - -| Name | -| :------ | -| `T` | - -___ - -### BitField - -Ƭ **BitField**: `TypedArray` - -___ - -### BlobDownloadStateError - -Ƭ **BlobDownloadStateError**\<\>: `Omit`\<[`BlobDownloadState`](../interfaces/internal_.BlobDownloadState.md), ``"error"`` \| ``"status"``\> & \{ `error`: `Error` ; `status`: ``"error"`` } - -___ - -### BlobFilter - -Ƭ **BlobFilter**: `RequireAtLeastOne`\<\{ [KeyType in BlobType]: ArrayAtLeastOne\\> }\> - -___ - -### BlobId - -Ƭ **BlobId**: `Simplify`\<`ValueOf`\<\{ [KeyType in BlobType]: BlobIdBase\ }\>\> - -___ - -### BlobIdBase - -Ƭ **BlobIdBase**\<`T`\>: `Object` - -#### Type parameters - -| Name | Type | -| :------ | :------ | -| `T` | extends [`BlobType`](internal_.md#blobtype) | - -#### Type declaration - -| Name | Type | Description | -| :------ | :------ | :------ | -| `driveId` | `string` | discovery key as hex string of hyperdrive where blob is stored | -| `name` | `string` | unique identifier for blob (e.g. hash of content) | -| `type` | `T` | Type of blob | -| `variant` | [`BlobVariant`](internal_.md#blobvariant)\<`T`\> | Blob variant (some blob types have smaller previews and thumbnails available) | - -___ - -### BlobType - -Ƭ **BlobType**: keyof [`SupportedBlobVariants`](internal_.md#supportedblobvariants) - -___ - -### BlobVariant - -Ƭ **BlobVariant**\<`TBlobType`\>: `TupleToUnion`\<[`SupportedBlobVariants`](internal_.md#supportedblobvariants)[`TBlobType`]\> - -#### Type parameters - -| Name | Type | -| :------ | :------ | -| `TBlobType` | extends [`BlobType`](internal_.md#blobtype) | - -___ - -### Chunk - -Ƭ **Chunk**: `Object` - -#### Type declaration - -| Name | Type | -| :------ | :------ | -| `field` | [`BitField`](internal_.md#bitfield) | -| `offset` | `number` | - -___ - -### Core - -Ƭ **Core**\<\>: `__module` - -___ - -### CoreOwnershipWithSignatures - -Ƭ **CoreOwnershipWithSignatures**: `Extract`\<`ReturnType`\, \{ `schemaName`: ``"coreOwnership"`` }\> - -___ - -### CoreOwnershipWithSignaturesValue - -Ƭ **CoreOwnershipWithSignaturesValue**: `Omit`\<[`CoreOwnershipWithSignatures`](internal_.md#coreownershipwithsignatures), `Exclude`\\> - -___ - -### CoreRecord - -Ƭ **CoreRecord**\<\>: `Object` - -#### Type declaration - -| Name | Type | -| :------ | :------ | -| `core` | [`Core`](internal_.md#core) | -| `key` | `Buffer` | -| `namespace` | [`Namespace`](internal_.md#namespace-1) | - -___ - -### CoreStorage - -Ƭ **CoreStorage**: (`name`: `string`) => `RandomAccessStorage` - -#### Type declaration - -▸ (`name`): `RandomAccessStorage` - -##### Parameters - -| Name | Type | -| :------ | :------ | -| `name` | `string` | - -##### Returns - -`RandomAccessStorage` - -___ - -### DeviceInfoParam - -Ƭ **DeviceInfoParam**\<\>: `Omit`\<`DeviceInfoValue`, ``"schemaName"``\> - -___ - -### EditableProjectSettings - -Ƭ **EditableProjectSettings**\<\>: `Omit`\<`ProjectSettingsValue`, ``"schemaName"``\> - -___ - -### ElementOf - -Ƭ **ElementOf**\<`T`\>: `T` extends `Iterable`\ ? `U` : `never` - -#### Type parameters - -| Name | -| :------ | -| `T` | - -___ - -### GetMapeoDocTables - -Ƭ **GetMapeoDocTables**\<`T`\>: `T`[keyof `T` & [`MapeoDocTableName`](internal_.md#mapeodoctablename)] - -#### Type parameters - -| Name | -| :------ | -| `T` | - -___ - -### IndexedDocIds - -Ƭ **IndexedDocIds**\<\>: \{ [K in MapeoDoc["schemaName"]]?: string[] } - -___ - -### InternalDriveEmitter - -Ƭ **InternalDriveEmitter**\<\>: `TypedEmitter`\<\{ `add-drive`: (`drive`: [`"hyperdrive"`](internal_._hyperdrive_.md)) => `void` }\> - -___ - -### InviteInternal - -Ƭ **InviteInternal**\<\>: `InviteRpcMessage` & \{ `receivedAt`: `number` } - -___ - -### KeyPair - -Ƭ **KeyPair**: `Object` - -#### Type declaration - -| Name | Type | -| :------ | :------ | -| `publicKey` | [`PublicKey`](internal_.md#publickey) | -| `secretKey` | [`SecretKey`](internal_.md#secretkey) | - -___ - -### Keypair - -Ƭ **Keypair**\<\>: `Object` - -#### Type declaration - -| Name | Type | -| :------ | :------ | -| `publicKey` | `Buffer` | -| `secretKey` | `Buffer` | - -___ - -### MapBuffers - -Ƭ **MapBuffers**\<`T`\>: \{ [K in keyof T]: T[K] extends Buffer ? string : T[K] } - -Replace an object's `Buffer` values with `string`s. Useful for serialization. - -#### Type parameters - -| Name | -| :------ | -| `T` | - -___ - -### MapeoDocMap - -Ƭ **MapeoDocMap**: \{ [K in MapeoDoc["schemaName"]]: Extract\ } - -___ - -### MapeoDocTableName - -Ƭ **MapeoDocTableName**: \`$\{MapeoDoc["schemaName"]}Table\` - -___ - -### MapeoDocTables - -Ƭ **MapeoDocTables**: [`GetMapeoDocTables`](internal_.md#getmapeodoctables)\<[`"/home/runner/work/mapeo-core-next/mapeo-core-next/src/schema/project"`](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_schema_project_.md)\> \| [`GetMapeoDocTables`](internal_.md#getmapeodoctables)\<[`"/home/runner/work/mapeo-core-next/mapeo-core-next/src/schema/client"`](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_schema_client_.md)\> - -Union of Drizzle schema tables that correspond to MapeoDoc types (e.g. excluding backlink tables and other utility tables) - -___ - -### MapeoValueMap - -Ƭ **MapeoValueMap**: \{ [K in MapeoValue["schemaName"]]: Extract\ } - -___ - -### Namespace - -Ƭ **Namespace**\<\>: typeof [`NAMESPACES`](internal_.md#namespaces)[`number`] - -___ - -### NamespaceSchemas - -Ƭ **NamespaceSchemas**\<\>: typeof [`NAMESPACE_SCHEMAS`](internal_.md#namespace_schemas) - -___ - -### OpenedNoiseStream - -Ƭ **OpenedNoiseStream**\<`T`\>: `__module` & \{ `handshake`: `Buffer` ; `publicKey`: `Buffer` ; `remotePublicKey`: `Buffer` } - -#### Type parameters - -| Name | Type | -| :------ | :------ | -| `T` | extends `Duplex` \| `Duplex` = `Duplex` \| `Duplex` | - -___ - -### OpenedNoiseStream - -Ƭ **OpenedNoiseStream**\<\>: [`"/home/runner/work/mapeo-core-next/mapeo-core-next/src/utils"`](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_utils_.md) - -___ - -### PeerCoreState - -Ƭ **PeerCoreState**\<\>: [`CoreState`](../interfaces/internal_.CoreState.md) & \{ `status`: ``"disconnected"`` \| ``"connecting"`` \| ``"connected"`` } - -___ - -### PeerInfoConnected - -Ƭ **PeerInfoConnected**\<\>: [`PeerInfoBase`](../interfaces/internal_.PeerInfoBase.md) & \{ `connectedAt`: `number` ; `protomux`: [`Protomux`](../classes/internal_.Protomux.md)\<`__module`\> ; `status`: ``"connected"`` } - -___ - -### PeerInfoDisconnected - -Ƭ **PeerInfoDisconnected**\<\>: [`PeerInfoBase`](../interfaces/internal_.PeerInfoBase.md) & \{ `disconnectedAt`: `number` ; `status`: ``"disconnected"`` } - -___ - -### Primitive - -Ƭ **Primitive**\<\>: `string` \| `number` \| `bigint` \| `boolean` \| `undefined` \| `symbol` \| ``null`` - -___ - -### ProtocolStream - -Ƭ **ProtocolStream**: `Omit`\<`NoiseStream`, ``"userData"``\> & \{ `userData`: [`Protomux`](../classes/internal_.Protomux.md) } - -___ - -### PublicKey - -Ƭ **PublicKey**: `Buffer` - -32 byte buffer - -___ - -### PublicPeerInfo - -Ƭ **PublicPeerInfo**\<\>: `Omit`\<[`"/home/runner/work/mapeo-core-next/mapeo-core-next/src/local-peers"`](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_local_peers_.md), ``"protomux"``\> - -___ - -### Range - -Ƭ **Range**: \{ `end`: `number` ; `linear`: `boolean` ; `start`: `number` } \| \{ `blocks`: `number`[] } - -___ - -### RemoveNull - -Ƭ **RemoveNull**\<`T`\>: \{ [K in keyof T]: Exclude\ } - -#### Type parameters - -| Name | -| :------ | -| `T` | - -___ - -### ReplicationStream - -Ƭ **ReplicationStream**: `Duplex` & \{ `noiseStream`: [`ProtocolStream`](internal_.md#protocolstream) } - -___ - -### RoleId - -Ƭ **RoleId**\<\>: [`ElementOf`](internal_.md#elementof)\ - -___ - -### SecretKey - -Ƭ **SecretKey**: `Buffer` - -32 byte buffer - -___ - -### State - -Ƭ **State**\<\>: `Record`\<[`"/home/runner/work/mapeo-core-next/mapeo-core-next/src/core-manager/index"`](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_core_manager_index_.md), [`"/home/runner/work/mapeo-core-next/mapeo-core-next/src/sync/namespace-sync-state"`](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_sync_namespace_sync_state_.md)\> - -___ - -### SupportedBlobVariants - -Ƭ **SupportedBlobVariants**: typeof [`SUPPORTED_BLOB_VARIANTS`](internal_.md#supported_blob_variants) - -___ - -### SyncCapability - -Ƭ **SyncCapability**\<\>: [`"/home/runner/work/mapeo-core-next/mapeo-core-next/src/roles"`](internal_.__home_runner_work_mapeo_core_next_mapeo_core_next_src_roles_.md)[``"sync"``][[`Namespace`](internal_.md#namespace)] \| ``"unknown"`` - -___ - -### SyncType - -Ƭ **SyncType**\<\>: ``"initial"`` \| ``"full"`` - -## Variables - -### NAMESPACES - -• `Const` **NAMESPACES**: readonly [``"auth"``, ``"config"``, ``"data"``, ``"blobIndex"``, ``"blob"``] - -___ - -### NAMESPACE\_SCHEMAS - -• `Const` **NAMESPACE\_SCHEMAS**: `Object` - -**`Template`** - -**`Template`** - -#### Type declaration - -| Name | Type | -| :------ | :------ | -| `auth` | readonly [``"coreOwnership"``, ``"role"``] | -| `config` | readonly [``"translation"``, ``"preset"``, ``"field"``, ``"projectSettings"``, ``"deviceInfo"``, ``"icon"``] | -| `data` | readonly [``"observation"``, ``"track"``] | - -___ - -### ROLE\_IDS - -• `Const` **ROLE\_IDS**: `Set`\<``"a12a6702b93bd7ff"`` \| ``"f7c150f5a3a9a855"`` \| ``"012fd2d431c0bf60"`` \| ``"9e6d29263cba36c9"`` \| ``"8ced989b1904606b"`` \| ``"08e4251e36f6e7ed"``\> - -___ - -### ROLE\_IDS\_ASSIGNABLE\_TO\_ANYONE - -• `Const` **ROLE\_IDS\_ASSIGNABLE\_TO\_ANYONE**: `Set`\<``"f7c150f5a3a9a855"`` \| ``"012fd2d431c0bf60"`` \| ``"9e6d29263cba36c9"`` \| ``"8ced989b1904606b"``\> - -___ - -### ROLE\_IDS\_ASSIGNABLE\_TO\_OTHERS - -• `Const` **ROLE\_IDS\_ASSIGNABLE\_TO\_OTHERS**: `Set`\<``"f7c150f5a3a9a855"`` \| ``"012fd2d431c0bf60"`` \| ``"9e6d29263cba36c9"``\> - -___ - -### ROLE\_IDS\_FOR\_NEW\_INVITE - -• `Const` **ROLE\_IDS\_FOR\_NEW\_INVITE**: `Set`\<``"f7c150f5a3a9a855"`` \| ``"012fd2d431c0bf60"`` \| ``"9e6d29263cba36c9"``\> - -___ - -### SUPPORTED\_BLOB\_VARIANTS - -• `Const` **SUPPORTED\_BLOB\_VARIANTS**: `Object` - -#### Type declaration - -| Name | Type | -| :------ | :------ | -| `audio` | readonly [``"original"``] | -| `photo` | readonly [``"original"``, ``"preview"``, ``"thumbnail"``] | -| `video` | readonly [``"original"``] | diff --git a/docs/api/md/variables/roles.md b/docs/api/md/variables/roles.md new file mode 100644 index 000000000..d79733d9b --- /dev/null +++ b/docs/api/md/variables/roles.md @@ -0,0 +1,23 @@ +[**API**](../README.md) • **Docs** + +*** + +[API](../README.md) / roles + +# Variable: roles + +> `const` **roles**: `object` + +## Type declaration + +### COORDINATOR\_ROLE\_ID + +> **COORDINATOR\_ROLE\_ID**: `"f7c150f5a3a9a855"` + +### CREATOR\_ROLE\_ID + +> **CREATOR\_ROLE\_ID**: `"a12a6702b93bd7ff"` + +### MEMBER\_ROLE\_ID + +> **MEMBER\_ROLE\_ID**: `"012fd2d431c0bf60"` diff --git a/package-lock.json b/package-lock.json index 882a9c86a..aa51b33c2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@comapeo/core", - "version": "1.0.1", + "version": "2.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@comapeo/core", - "version": "1.0.1", + "version": "2.0.0", "license": "MIT", "dependencies": { "@comapeo/fallback-smp": "^1.0.0", diff --git a/package.json b/package.json index 02b4126f2..ab68b68ab 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@comapeo/core", - "version": "1.0.1", + "version": "2.0.0", "description": "Offline p2p mapping library", "main": "src/index.js", "types": "dist/index.d.ts",