Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/api/md/-internal-/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@
- [AddProjectQuery](type-aliases/AddProjectQuery.md)
- [Attachment](type-aliases/Attachment.md)
- [BitField](type-aliases/BitField.md)
- [BlobFilter](type-aliases/BlobFilter.md)
- [BlobIdBase](type-aliases/BlobIdBase.md)
- [BlobStoreEntriesStream](type-aliases/BlobStoreEntriesStream.md)
- [BlobType](type-aliases/BlobType.md)
Expand All @@ -117,6 +116,7 @@
- [Keypair](type-aliases/Keypair.md)
- [KeyPair](type-aliases/KeyPair-1.md)
- [ListedProject](type-aliases/ListedProject.md)
- [ListedProjectSettings](type-aliases/ListedProjectSettings.md)
- [MapeoDocTableName](type-aliases/MapeoDocTableName.md)
- [MapeoDocTables](type-aliases/MapeoDocTables.md)
- [Namespace](type-aliases/Namespace.md)
Expand Down
4 changes: 2 additions & 2 deletions docs/api/md/-internal-/classes/CoreManager.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

Immediately start downloading cores - should only be set to false for tests

• **options.db**: `BetterSQLite3Database`\<`Record`\<`string`, `never`\>\>
• **options.db**: `BetterSQLite3Database`\<`Record`\<`string`, `never`\>, `any`\>

Drizzle better-sqlite3 database instance

Expand Down Expand Up @@ -249,7 +249,7 @@ Resolves when all cores have finished loading

#### Parameters

• **blobFilter**: `null` \| [`BlobFilter`](../type-aliases/BlobFilter.md)
• **blobFilter**: `null` \| `_RequireAtLeastOne`\<`object`, `"photo"` \| `"video"` \| `"audio"`\>

• **peer**: [`HypercorePeer`](../type-aliases/HypercorePeer.md)

Expand Down
6 changes: 3 additions & 3 deletions docs/api/md/-internal-/classes/DataType.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

• **opts.dataStore**: `TDataStore`

• **opts.db**: `BetterSQLite3Database`\<`Record`\<`string`, `never`\>\>
• **opts.db**: `BetterSQLite3Database`\<`Record`\<`string`, `never`\>, `any`\>

• **opts.getDeviceIdForVersionId**

Expand Down Expand Up @@ -116,11 +116,11 @@ only used internally to skip the checkExisting check when creating a document wi

### \[kSelect\]()

> **\[kSelect\]**(): `Promise`\<`Omit`\<`SQLiteSelectBase`\<`GetSelectTableName`\<`TTable`\>, `"sync"`, `RunResult`, `GetSelectTableSelection`\<`TTable`\>, `"single"`, `GetSelectTableName`\<`TTable`\> *extends* `string` ? `Record`\<`string` & `GetSelectTableName`\<`TTable`\>, `"not-null"`\> : `object`, `false`, `never`, `{ [K in string]: { [Key in string]: SelectResultField<GetSelectTableSelection<(...)>[Key], true> }[K] }`[], `BuildSubquerySelection`\<`GetSelectTableSelection`\<`TTable`\>, `GetSelectTableName`\<`TTable`\> *extends* `string` ? `Record`\<`string` & `GetSelectTableName`\<`TTable`\>, `"not-null"`\> : `object`\>\>, `"then"` \| `"catch"` \| `"finally"`\> & `object`\>
> **\[kSelect\]**(): `Promise`\<`Omit`\<`SQLiteSelectBase`\<`GetSelectTableName`\<`TTable`\>, `"sync"`, `RunResult`, `GetSelectTableSelection`\<`TTable`\>, `"single"`, `GetSelectTableName`\<`TTable`\> *extends* `string` ? `Record`\<`string` & `GetSelectTableName`\<`TTable`\>, `"not-null"`\> : `object`, `false`, `never`, \{ \[K in string \| number \| symbol\]: \{ \[Key in string \| number \| symbol\]: SelectResultField\<GetSelectTableSelection\<(...)\>\[Key\], true\> \}\[K\] \}[], `BuildSubquerySelection`\<`GetSelectTableSelection`\<`TTable`\>, `GetSelectTableName`\<`TTable`\> *extends* `string` ? `Record`\<`string` & `GetSelectTableName`\<`TTable`\>, `"not-null"`\> : `object`\>\>, `"then"` \| `"catch"` \| `"finally"`\> & `object`\>

#### Returns

`Promise`\<`Omit`\<`SQLiteSelectBase`\<`GetSelectTableName`\<`TTable`\>, `"sync"`, `RunResult`, `GetSelectTableSelection`\<`TTable`\>, `"single"`, `GetSelectTableName`\<`TTable`\> *extends* `string` ? `Record`\<`string` & `GetSelectTableName`\<`TTable`\>, `"not-null"`\> : `object`, `false`, `never`, `{ [K in string]: { [Key in string]: SelectResultField<GetSelectTableSelection<(...)>[Key], true> }[K] }`[], `BuildSubquerySelection`\<`GetSelectTableSelection`\<`TTable`\>, `GetSelectTableName`\<`TTable`\> *extends* `string` ? `Record`\<`string` & `GetSelectTableName`\<`TTable`\>, `"not-null"`\> : `object`\>\>, `"then"` \| `"catch"` \| `"finally"`\> & `object`\>
`Promise`\<`Omit`\<`SQLiteSelectBase`\<`GetSelectTableName`\<`TTable`\>, `"sync"`, `RunResult`, `GetSelectTableSelection`\<`TTable`\>, `"single"`, `GetSelectTableName`\<`TTable`\> *extends* `string` ? `Record`\<`string` & `GetSelectTableName`\<`TTable`\>, `"not-null"`\> : `object`, `false`, `never`, \{ \[K in string \| number \| symbol\]: \{ \[Key in string \| number \| symbol\]: SelectResultField\<GetSelectTableSelection\<(...)\>\[Key\], true\> \}\[K\] \}[], `BuildSubquerySelection`\<`GetSelectTableSelection`\<`TTable`\>, `GetSelectTableName`\<`TTable`\> *extends* `string` ? `Record`\<`string` & `GetSelectTableName`\<`TTable`\>, `"not-null"`\> : `object`\>\>, `"then"` \| `"catch"` \| `"finally"`\> & `object`\>

***

Expand Down
2 changes: 1 addition & 1 deletion docs/api/md/-internal-/classes/Downloader.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ downloading deleted and previous versions may be desirable behavior anyway

• **options?** = `{}`

• **options.filter?**: `undefined` \| `null` \| [`BlobFilter`](../type-aliases/BlobFilter.md)
• **options.filter?**: `undefined` \| `null` \| `_RequireAtLeastOne`\<`object`, `"photo"` \| `"video"` \| `"audio"`\>

Filter blobs of specific types and/or sizes to download

Expand Down
36 changes: 31 additions & 5 deletions docs/api/md/-internal-/classes/MapeoProject.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ Path to store project sqlite db. Use `:memory:` for memory storage

Encryption keys for each namespace

• **opts.getFallbackProjectInfo**

• **opts.getMediaBaseUrl**

• **opts.isArchiveDevice**: `boolean`
Expand Down Expand Up @@ -60,7 +62,7 @@ path for drizzle migration folder for project

32-byte secret key of the project creator core

• **opts.sharedDb**: `BetterSQLite3Database`\<`Record`\<`string`, `never`\>\>
• **opts.sharedDb**: `BetterSQLite3Database`\<`Record`\<`string`, `never`\>, `any`\>

• **opts.sharedIndexWriter**: [`IndexWriter`](IndexWriter.md)\<[`MapeoDocTables`](../type-aliases/MapeoDocTables.md)\>

Expand All @@ -84,6 +86,12 @@ path for drizzle migration folder for project

> `static` **EMPTY\_PROJECT\_SETTINGS**: `Readonly`\<`object`\>

#### Type declaration

##### sendStats

> **sendStats**: `false` = `false`

## Accessors

### \[kBlobStore\]
Expand Down Expand Up @@ -286,11 +294,11 @@ DataTypes object mappings, used for tests

## Methods

### \[kClearDataIfLeft\]()
### \[kClearData\]()

> **\[kClearDataIfLeft\]**(): `Promise`\<`void`\>
> **\[kClearData\]**(): `Promise`\<`void`\>

Clear data if we've left the project. No-op if you're still in the project.
Clear synced data, but keep auth data and own data

#### Returns

Expand Down Expand Up @@ -410,6 +418,22 @@ and only this project will replicate.

***

### $importCategories()

> **$importCategories**(`opts`): `Promise`\<`void`\>

#### Parameters

• **opts**

• **opts.filePath**: `string`

#### Returns

`Promise`\<`void`\>

***

### ~~$originalVersionIdToDeviceId()~~

> **$originalVersionIdToDeviceId**(`originalVersionId`): `Promise`\<`string`\>
Expand Down Expand Up @@ -526,7 +550,7 @@ The full path that the file was exported at

***

### importConfig()
### ~~importConfig()~~

> **importConfig**(`opts`): `Promise`\<`Error`[]\>

Expand All @@ -540,6 +564,8 @@ The full path that the file was exported at

`Promise`\<`Error`[]\>

#### Deprecated

***

### ready()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
### Variables

- [kBlobStore](variables/kBlobStore.md)
- [kClearDataIfLeft](variables/kClearDataIfLeft.md)
- [kClearData](variables/kClearData.md)
- [kCoreManager](variables/kCoreManager.md)
- [kCoreOwnership](variables/kCoreOwnership.md)
- [kDataTypes](variables/kDataTypes.md)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

***

[API](../../../../README.md) / [\<internal\>](../../../README.md) / ["/home/runner/work/comapeo-core/comapeo-core/src/mapeo-project"](../README.md) / kClearDataIfLeft
[API](../../../../README.md) / [\<internal\>](../../../README.md) / ["/home/runner/work/comapeo-core/comapeo-core/src/mapeo-project"](../README.md) / kClearData

# Variable: kClearDataIfLeft
# Variable: kClearData

> `const` **kClearDataIfLeft**: *typeof* [`kClearDataIfLeft`](kClearDataIfLeft.md)
> `const` **kClearData**: *typeof* [`kClearData`](kClearData.md)
9 changes: 0 additions & 9 deletions docs/api/md/-internal-/type-aliases/BlobFilter.md

This file was deleted.

28 changes: 1 addition & 27 deletions docs/api/md/-internal-/type-aliases/ListedProject.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,32 +6,6 @@

# Type Alias: ListedProject

> **ListedProject**\<\>: `object`
> **ListedProject**\<\>: [`ListedProjectSettings`](ListedProjectSettings.md) & `object` \| [`ProjectInfo`](ProjectInfo.md) & `object`

## Type Parameters

## Type declaration

### createdAt?

> `optional` **createdAt**: `string`

### name?

> `optional` **name**: `string`

### projectColor?

> `optional` **projectColor**: `string`

### projectDescription?

> `optional` **projectDescription**: `string`

### projectId

> **projectId**: `string`

### updatedAt?

> `optional` **updatedAt**: `string`
11 changes: 11 additions & 0 deletions docs/api/md/-internal-/type-aliases/ListedProjectSettings.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[**API**](../../README.md) • **Docs**

***

[API](../../README.md) / [\<internal\>](../README.md) / ListedProjectSettings

# Type Alias: ListedProjectSettings

> **ListedProjectSettings**\<\>: `Pick`\<`ProjectSettings`, `"createdAt"` \| `"updatedAt"` \| `"name"` \| `"projectColor"` \| `"projectDescription"` \| `"sendStats"`\>

## Type Parameters
2 changes: 1 addition & 1 deletion docs/api/md/-internal-/type-aliases/ProjectInfo.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@

# Type Alias: ProjectInfo

> **ProjectInfo**\<\>: `Pick`\<`ProjectSettings`, `"name"` \| `"projectColor"` \| `"projectDescription"`\>
> **ProjectInfo**\<\>: `Pick`\<`ProjectSettings`, `"name"` \| `"projectColor"` \| `"projectDescription"` \| `"sendStats"`\>

## Type Parameters
4 changes: 4 additions & 0 deletions docs/api/md/-internal-/type-aliases/ProjectToAddDetails.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,8 @@

> **projectName**: `string`

### sendStats?

> `optional` **sendStats**: `boolean`

## Type Parameters
8 changes: 7 additions & 1 deletion docs/api/md/classes/MapeoManager.md
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,13 @@ isArchiveDevice

### listProjects()

> **listProjects**(): `Promise`\<[`ListedProject`](../-internal-/type-aliases/ListedProject.md)[]\>
> **listProjects**(`opts`?): `Promise`\<[`ListedProject`](../-internal-/type-aliases/ListedProject.md)[]\>

#### Parameters

• **opts?** = `{}`

• **opts.includeLeft?**: `boolean` = `false`

#### Returns

Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@comapeo/core",
"version": "4.4.0",
"version": "4.4.1-0",
"description": "Offline p2p mapping library",
"main": "src/index.js",
"types": "dist/index.d.ts",
Expand Down