Skip to content

Commit

Permalink
[OPTIC-RELEASE-AUTOMATION] release/v2.1.0 (#953)
Browse files Browse the repository at this point in the history
Release v2.1.0

Co-authored-by: Evan Hahn <[email protected]>
  • Loading branch information
optic-release-automation[bot] and EvanHahn authored Oct 31, 2024
1 parent 4f33bd0 commit a4dabd2
Show file tree
Hide file tree
Showing 24 changed files with 278 additions and 88 deletions.
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 @@

### Type Aliases

- [ArrayAtLeastOne](type-aliases/ArrayAtLeastOne.md)
- [BitField](type-aliases/BitField.md)
- [BlobDownloadStateError](type-aliases/BlobDownloadStateError.md)
- [BlobFilter](type-aliases/BlobFilter.md)
Expand All @@ -109,6 +108,7 @@
- [DeviceInfoParam](type-aliases/DeviceInfoParam.md)
- [EditableProjectSettings](type-aliases/EditableProjectSettings.md)
- [ElementOf](type-aliases/ElementOf.md)
- [GenericBlobFilter](type-aliases/GenericBlobFilter.md)
- [GetMapeoDocTables](type-aliases/GetMapeoDocTables.md)
- [HypercorePeer](type-aliases/HypercorePeer.md)
- [HypercoreRemoteBitfield](type-aliases/HypercoreRemoteBitfield.md)
Expand Down
4 changes: 2 additions & 2 deletions docs/api/md/-internal-/classes/BlobStore.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ Set to `true` to wait for a blob to download, otherwise will throw if blob is no

**options?**

**options.metadata?**: `undefined` \| `object`
**options.metadata?**: `undefined` \| `JsonObject`

Metadata to store with the blob

Expand Down Expand Up @@ -244,7 +244,7 @@ Hyperdrive entry

**options?**

**options.metadata?**: `undefined` \| `object`
**options.metadata?**: `undefined` \| `JsonObject`

Metadata to store with the blob

Expand Down
16 changes: 16 additions & 0 deletions docs/api/md/-internal-/classes/CoreManager.md
Original file line number Diff line number Diff line change
Expand Up @@ -240,3 +240,19 @@ Resolves when all cores have finished loading
#### Returns

`Promise`\<`void`\>

***

### sendDownloadIntents()

> **sendDownloadIntents**(`blobFilter`, `peer`): `void`
#### Parameters

**blobFilter**: [`BlobFilter`](../type-aliases/BlobFilter.md)

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

#### Returns

`void`
22 changes: 7 additions & 15 deletions docs/api/md/-internal-/classes/DataStore.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@

**opts.namespace**: `TNamespace`

**opts.reindex**: `boolean`

**opts.storage**: `StorageParam`

#### Returns
Expand Down Expand Up @@ -66,11 +68,11 @@

### schemas

> `get` **schemas**(): (`"observation"` \| `"track"`)[] \| (`"translation"` \| `"preset"` \| `"field"` \| `"projectSettings"` \| `"deviceInfo"` \| `"icon"`)[] \| (`"coreOwnership"` \| `"role"`)[]
> `get` **schemas**(): (`"observation"` \| `"track"` \| `"remoteDetectionAlert"`)[] \| (`"translation"` \| `"preset"` \| `"field"` \| `"projectSettings"` \| `"deviceInfo"` \| `"icon"`)[] \| (`"coreOwnership"` \| `"role"`)[]
#### Returns

(`"observation"` \| `"track"`)[] \| (`"translation"` \| `"preset"` \| `"field"` \| `"projectSettings"` \| `"deviceInfo"` \| `"icon"`)[] \| (`"coreOwnership"` \| `"role"`)[]
(`"observation"` \| `"track"` \| `"remoteDetectionAlert"`)[] \| (`"translation"` \| `"preset"` \| `"field"` \| `"projectSettings"` \| `"deviceInfo"` \| `"icon"`)[] \| (`"coreOwnership"` \| `"role"`)[]

***

Expand All @@ -94,16 +96,6 @@

***

### getIndexState()

> **getIndexState**(): `IndexState`
#### Returns

`IndexState`

***

### read()

> **read**(`versionId`): `Promise`\<`MapeoDoc`\>
Expand Down Expand Up @@ -146,7 +138,7 @@ Unlink all index files. This should only be called after `close()` has resolved.

### 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`\>\>
> **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`\> \| `Extract`\<`object`, `TDoc`\>\>
UNSAFE: Does not check links: [] refer to a valid doc - should only be used
internally.
Expand All @@ -156,15 +148,15 @@ 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"`\>
• **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`, `"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`, `"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`\>\>
`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`\> \| `Extract`\<`object`, `TDoc`\>\>

***

Expand Down
65 changes: 52 additions & 13 deletions docs/api/md/-internal-/classes/MapeoProject.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ Encryption keys for each namespace

**opts.getMediaBaseUrl**

**opts.isArchiveDevice**: `boolean`

Whether this device is an archive device

**opts.keyManager**: `KeyManager`

mapeo/crypto KeyManager instance
Expand Down Expand Up @@ -142,7 +146,7 @@ DataTypes object mappings, used for tests
##### observation

> **observation**: [`DataType`](DataType.md)\<[`DataStore`](DataStore.md)\<`"data"`, `"observation"` \| `"track"`\>, `SQLiteTableWithColumns`\<`object`\>, `"observation"`, `object`, `object`\>
> **observation**: [`DataType`](DataType.md)\<[`DataStore`](DataStore.md)\<`"data"`, `"observation"` \| `"track"` \| `"remoteDetectionAlert"`\>, `SQLiteTableWithColumns`\<`object`\>, `"observation"`, `object`, `object`\>
##### preset

Expand All @@ -152,20 +156,34 @@ DataTypes object mappings, used for tests

> **projectSettings**: [`DataType`](DataType.md)\<[`DataStore`](DataStore.md)\<`"config"`, `"translation"` \| `"preset"` \| `"field"` \| `"projectSettings"` \| `"deviceInfo"` \| `"icon"`\>, `SQLiteTableWithColumns`\<`object`\>, `"projectSettings"`, `object`, `object`\>
##### remoteDetectionAlert

> **remoteDetectionAlert**: [`DataType`](DataType.md)\<[`DataStore`](DataStore.md)\<`"data"`, `"observation"` \| `"track"` \| `"remoteDetectionAlert"`\>, `SQLiteTableWithColumns`\<`object`\>, `"remoteDetectionAlert"`, `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`\>
> **track**: [`DataType`](DataType.md)\<[`DataStore`](DataStore.md)\<`"data"`, `"observation"` \| `"track"` \| `"remoteDetectionAlert"`\>, `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`\>
***

### \[kIsArchiveDevice\]

> `get` **\[kIsArchiveDevice\]**(): `boolean`
#### Returns

`boolean`

***

### $icons

> `get` **$icons**(): [`IconApi`](IconApi.md)
Expand Down Expand Up @@ -228,11 +246,11 @@ DataTypes object mappings, used for tests

### observation

> `get` **observation**(): [`DataType`](DataType.md)\<[`DataStore`](DataStore.md)\<`"data"`, `"observation"` \| `"track"`\>, `SQLiteTableWithColumns`\<`object`\>, `"observation"`, `object`, `object`\>
> `get` **observation**(): [`DataType`](DataType.md)\<[`DataStore`](DataStore.md)\<`"data"`, `"observation"` \| `"track"` \| `"remoteDetectionAlert"`\>, `SQLiteTableWithColumns`\<`object`\>, `"observation"`, `object`, `object`\>
#### Returns

[`DataType`](DataType.md)\<[`DataStore`](DataStore.md)\<`"data"`, `"observation"` \| `"track"`\>, `SQLiteTableWithColumns`\<`object`\>, `"observation"`, `object`, `object`\>
[`DataType`](DataType.md)\<[`DataStore`](DataStore.md)\<`"data"`, `"observation"` \| `"track"` \| `"remoteDetectionAlert"`\>, `SQLiteTableWithColumns`\<`object`\>, `"observation"`, `object`, `object`\>

***

Expand All @@ -246,13 +264,23 @@ DataTypes object mappings, used for tests

***

### remoteDetectionAlert

> `get` **remoteDetectionAlert**(): [`DataType`](DataType.md)\<[`DataStore`](DataStore.md)\<`"data"`, `"observation"` \| `"track"` \| `"remoteDetectionAlert"`\>, `SQLiteTableWithColumns`\<`object`\>, `"remoteDetectionAlert"`, `object`, `object`\>
#### Returns

[`DataType`](DataType.md)\<[`DataStore`](DataStore.md)\<`"data"`, `"observation"` \| `"track"` \| `"remoteDetectionAlert"`\>, `SQLiteTableWithColumns`\<`object`\>, `"remoteDetectionAlert"`, `object`, `object`\>

***

### track

> `get` **track**(): [`DataType`](DataType.md)\<[`DataStore`](DataStore.md)\<`"data"`, `"observation"` \| `"track"`\>, `SQLiteTableWithColumns`\<`object`\>, `"track"`, `object`, `object`\>
> `get` **track**(): [`DataType`](DataType.md)\<[`DataStore`](DataStore.md)\<`"data"`, `"observation"` \| `"track"` \| `"remoteDetectionAlert"`\>, `SQLiteTableWithColumns`\<`object`\>, `"track"`, `object`, `object`\>
#### Returns

[`DataType`](DataType.md)\<[`DataStore`](DataStore.md)\<`"data"`, `"observation"` \| `"track"`\>, `SQLiteTableWithColumns`\<`object`\>, `"track"`, `object`, `object`\>
[`DataType`](DataType.md)\<[`DataStore`](DataStore.md)\<`"data"`, `"observation"` \| `"track"` \| `"remoteDetectionAlert"`\>, `SQLiteTableWithColumns`\<`object`\>, `"track"`, `object`, `object`\>

## Methods

Expand Down Expand Up @@ -280,22 +308,33 @@ Clear data if we've left the project. No-op if you're still in the project.

### \[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`\>\>\>
> **\[kProjectReplicate\]**(`isInitiatorOrStream`): [`ReplicationStream`](../type-aliases/ReplicationStream.md)
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])
and only this project will replicate.

#### Parameters

**stream**: [`Protomux`](Protomux.md)\<`Duplex`\<`any`, `any`, `any`, `any`, `true`, `true`, `DuplexEvents`\<`any`, `any`\>\>\>
**isInitiatorOrStream**: `boolean` \| `Duplex` \| `Duplex`\<`any`, `any`, `any`, `any`, `true`, `true`, `DuplexEvents`\<`any`, `any`\>\>

#### Returns

[`ReplicationStream`](../type-aliases/ReplicationStream.md)

A duplex stream, a @hyperswarm/secret-stream, or a Protomux instance
***

### \[kSetIsArchiveDevice\]()

> **\[kSetIsArchiveDevice\]**(`isArchiveDevice`): `Promise`\<`void`\>
#### Parameters

**isArchiveDevice**: `boolean`

#### 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`\>\>\>
`Promise`\<`void`\>

***

Expand All @@ -305,7 +344,7 @@ A duplex stream, a @hyperswarm/secret-stream, or a Protomux instance
#### Parameters

**value**: `Pick`\<`object`, `"name"` \| `"deviceType"`\>
**value**: `Pick`\<`object`, `"name"` \| `"deviceType"` \| `"selfHostedServerDetails"`\>

#### Returns

Expand Down
41 changes: 41 additions & 0 deletions docs/api/md/-internal-/classes/MemberApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,18 @@ public key of this device as hex string

**opts.encryptionKeys**: `EncryptionKeys`

**opts.getProjectName**

**opts.getReplicationStream**

**opts.projectKey**: `Buffer`

**opts.roles**: [`Roles`](Roles.md)

**opts.rpc**: [`LocalPeers`](LocalPeers.md)

**opts.waitForInitialSyncWithPeer**

#### Returns

[`MemberApi`](MemberApi.md)
Expand All @@ -50,6 +56,41 @@ public key of this device as hex string

## Methods

### addServerPeer()

> **addServerPeer**(`baseUrl`, `options`?): `Promise`\<`void`\>
Add a server peer.

Can reject with any of the following error codes (accessed via `err.code`):

- `INVALID_URL`: the base URL is invalid, likely due to user error.
- `MISSING_DATA`: some required data is missing in order to add the server
peer. For example, the project must have a name.
- `NETWORK_ERROR`: there was an issue connecting to the server. Is the
device online? Is the server online?
- `INVALID_SERVER_RESPONSE`: we connected to the server but it returned
an unexpected response. Is the server running a compatible version of
CoMapeo Cloud?

If `err.code` is not specified, that indicates a bug in this module.

#### Parameters

**baseUrl**: `string`

**options?** = `{}`

**options.dangerouslyAllowInsecureConnections?**: `undefined` \| `boolean` = `false`

Allow insecure network connections. Should only be used in tests.

#### Returns

`Promise`\<`void`\>

***

### assignRole()

> **assignRole**(`deviceId`, `roleId`): `Promise`\<`void`\>
Expand Down
Loading

0 comments on commit a4dabd2

Please sign in to comment.