@dittolive/ditto 4.2.3 → 4.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -3,10 +3,10 @@
3
3
  *Ditto is a cross platform SDK that allows mobile, web, and IoT apps to sync
4
4
  with and even without connectivity.*
5
5
 
6
- Version: **4.2.3**
6
+ Version: **4.3.1**
7
7
 
8
8
  Please visit [ditto.live](https://ditto.live) for more info as well as the
9
- [API Reference](https://software.ditto.live/js/Ditto/4.2.3/api-reference/) for this particular version.
9
+ [API Reference](https://software.ditto.live/js/Ditto/4.3.1/api-reference/) for this particular version.
10
10
 
11
11
  --------------------------------------------------------------------------------
12
12
 
package/node/ditto.cjs.js CHANGED
@@ -325,7 +325,7 @@ function ditto_documents_hash(...args) { return ditto.ditto_documents_hash(...ar
325
325
  function ditto_documents_hash_mnemonic(...args) { return ditto.ditto_documents_hash_mnemonic(...args) }
326
326
  function ditto_error_message(...args) { return ditto.ditto_error_message(...args) }
327
327
  function ditto_experimental_add_dql_subscription(...args) { return ditto.ditto_experimental_add_dql_subscription(...args) }
328
- function ditto_experimental_exec_query_str(...args) { return ditto.ditto_experimental_exec_query_str(...args) }
328
+ function ditto_experimental_exec_statement_str(...args) { return ditto.ditto_experimental_exec_statement_str(...args) }
329
329
  function ditto_experimental_remove_dql_subscription(...args) { return ditto.ditto_experimental_remove_dql_subscription(...args) }
330
330
  function ditto_free(...args) { return ditto.ditto_free(...args) }
331
331
  function ditto_free_attachment_handle(...args) { return ditto.ditto_free_attachment_handle(...args) }
@@ -629,7 +629,7 @@ async function experimentalExecQueryStr(ditto, writeTransaction, query, queryArg
629
629
  const queryBytesPointer = bytesFromString(query);
630
630
  // This doesn't need to convert error return codes into thrown js errors
631
631
  // because the ffi implementation already does that.
632
- return await ditto_experimental_exec_query_str(ditto, writeTransaction, queryBytesPointer, queryArgsCBOR);
632
+ return await ditto_experimental_exec_statement_str(ditto, writeTransaction, queryBytesPointer, queryArgsCBOR);
633
633
  }
634
634
  /** @internal */
635
635
  function addSubscription(ditto, collectionName, query, queryArgsCBOR, orderBy, limit, offset) {
@@ -1470,7 +1470,7 @@ function awdlDestroy(awdl) {
1470
1470
 
1471
1471
  // NOTE: this is patched up with the actual build version by Jake task
1472
1472
  // build:package and has to be a valid semantic version as defined here: https://semver.org.
1473
- const fullBuildVersionString = '4.2.3';
1473
+ const fullBuildVersionString = '4.3.1';
1474
1474
 
1475
1475
  //
1476
1476
  /**
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dittolive/ditto",
3
- "version": "4.2.3",
3
+ "version": "4.3.1",
4
4
  "description": "Ditto is a cross-platform embeddable NoSQL database that can sync with or without an internet connection.",
5
5
  "homepage": "https://ditto.live",
6
6
  "license": "SEE LICENSE IN LICENSE.md",
package/types/ditto.d.ts CHANGED
@@ -1195,7 +1195,7 @@ type ConnectionType = 'P2PWiFi' | 'WebSocket' | 'AccessPoint' | 'Bluetooth';
1195
1195
  * with each other.
1196
1196
  */
1197
1197
  type Address = {
1198
- siteId: string;
1198
+ siteId: number | BigInt;
1199
1199
  pubkey: Uint8Array;
1200
1200
  };
1201
1201
  /**
@@ -1206,13 +1206,28 @@ type Address = {
1206
1206
  declare function addressToString(address: Address): string;
1207
1207
  /** Represents a connection between two peers on the Ditto mesh network. */
1208
1208
  type Connection = {
1209
- /** Unique identifier for the connection. */
1209
+ /** Unique identifier for the connection.
1210
+ *
1211
+ * These IDs are stable for any two peer keys and a given connection type.
1212
+ *
1213
+ * **Example ID**
1214
+ *
1215
+ * "1<->2:Bluetooth"
1216
+ */
1210
1217
  id: string;
1211
1218
  /** Type of transport enabling this connection. */
1212
- type: ConnectionType;
1213
- /** The peer key of the peer at one end of the connection. */
1219
+ connectionType: ConnectionType;
1220
+ /**
1221
+ * Peer key of the peer at one end of the connection.
1222
+ *
1223
+ * This peer key is lexicographically smaller than `peer2`.
1224
+ */
1214
1225
  peer1: Uint8Array;
1215
- /** The peer key of the peer at one end of the connection. */
1226
+ /**
1227
+ * Peer key of the peer at the other end of the connection.
1228
+ *
1229
+ * This peer key is lexicographically larger than `peer1`.
1230
+ */
1216
1231
  peer2: Uint8Array;
1217
1232
  approximateDistanceInMeters?: number;
1218
1233
  };