tinybase 5.4.0-beta.3 → 5.4.0-beta.4

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.
Files changed (236) hide show
  1. package/@types/mergeable-store/index.d.cts +5 -4
  2. package/@types/mergeable-store/index.d.ts +5 -4
  3. package/@types/mergeable-store/with-schemas/index.d.cts +5 -4
  4. package/@types/mergeable-store/with-schemas/index.d.ts +5 -4
  5. package/@types/persisters/index.d.cts +1 -0
  6. package/@types/persisters/index.d.ts +1 -0
  7. package/@types/persisters/persister-durable-object-storage/index.d.cts +25 -17
  8. package/@types/persisters/persister-durable-object-storage/index.d.ts +25 -17
  9. package/@types/persisters/persister-durable-object-storage/with-schemas/index.d.cts +26 -18
  10. package/@types/persisters/persister-durable-object-storage/with-schemas/index.d.ts +26 -18
  11. package/@types/persisters/persister-partykit-server/index.d.cts +12 -0
  12. package/@types/persisters/persister-partykit-server/index.d.ts +12 -0
  13. package/@types/persisters/persister-partykit-server/with-schemas/index.d.cts +15 -0
  14. package/@types/persisters/persister-partykit-server/with-schemas/index.d.ts +15 -0
  15. package/@types/persisters/with-schemas/index.d.cts +1 -0
  16. package/@types/persisters/with-schemas/index.d.ts +1 -0
  17. package/@types/store/index.d.cts +10 -8
  18. package/@types/store/index.d.ts +10 -8
  19. package/@types/store/with-schemas/index.d.cts +10 -8
  20. package/@types/store/with-schemas/index.d.ts +10 -8
  21. package/@types/synchronizers/synchronizer-ws-server-durable-object/index.d.cts +206 -28
  22. package/@types/synchronizers/synchronizer-ws-server-durable-object/index.d.ts +206 -28
  23. package/@types/synchronizers/synchronizer-ws-server-durable-object/with-schemas/index.d.cts +219 -28
  24. package/@types/synchronizers/synchronizer-ws-server-durable-object/with-schemas/index.d.ts +219 -28
  25. package/cjs/es6/index.cjs +0 -1
  26. package/cjs/es6/indexes/index.cjs +1 -1
  27. package/cjs/es6/indexes/with-schemas/index.cjs +1 -1
  28. package/cjs/es6/metrics/index.cjs +1 -1
  29. package/cjs/es6/metrics/with-schemas/index.cjs +1 -1
  30. package/cjs/es6/min/index.cjs +1 -1
  31. package/cjs/es6/min/index.cjs.gz +0 -0
  32. package/cjs/es6/min/indexes/index.cjs +1 -1
  33. package/cjs/es6/min/indexes/index.cjs.gz +0 -0
  34. package/cjs/es6/min/indexes/with-schemas/index.cjs +1 -1
  35. package/cjs/es6/min/indexes/with-schemas/index.cjs.gz +0 -0
  36. package/cjs/es6/min/metrics/index.cjs +1 -1
  37. package/cjs/es6/min/metrics/index.cjs.gz +0 -0
  38. package/cjs/es6/min/metrics/with-schemas/index.cjs +1 -1
  39. package/cjs/es6/min/metrics/with-schemas/index.cjs.gz +0 -0
  40. package/cjs/es6/min/persisters/persister-durable-object-storage/index.cjs +1 -1
  41. package/cjs/es6/min/persisters/persister-durable-object-storage/index.cjs.gz +0 -0
  42. package/cjs/es6/min/persisters/persister-durable-object-storage/with-schemas/index.cjs +1 -1
  43. package/cjs/es6/min/persisters/persister-durable-object-storage/with-schemas/index.cjs.gz +0 -0
  44. package/cjs/es6/min/queries/index.cjs +1 -1
  45. package/cjs/es6/min/queries/index.cjs.gz +0 -0
  46. package/cjs/es6/min/queries/with-schemas/index.cjs +1 -1
  47. package/cjs/es6/min/queries/with-schemas/index.cjs.gz +0 -0
  48. package/cjs/es6/min/relationships/index.cjs +1 -1
  49. package/cjs/es6/min/relationships/index.cjs.gz +0 -0
  50. package/cjs/es6/min/relationships/with-schemas/index.cjs +1 -1
  51. package/cjs/es6/min/relationships/with-schemas/index.cjs.gz +0 -0
  52. package/cjs/es6/min/synchronizers/synchronizer-ws-server-durable-object/index.cjs +1 -1
  53. package/cjs/es6/min/synchronizers/synchronizer-ws-server-durable-object/index.cjs.gz +0 -0
  54. package/cjs/es6/min/synchronizers/synchronizer-ws-server-durable-object/with-schemas/index.cjs +1 -1
  55. package/cjs/es6/min/synchronizers/synchronizer-ws-server-durable-object/with-schemas/index.cjs.gz +0 -0
  56. package/cjs/es6/min/with-schemas/index.cjs +1 -1
  57. package/cjs/es6/min/with-schemas/index.cjs.gz +0 -0
  58. package/cjs/es6/persisters/persister-durable-object-storage/index.cjs +1 -1
  59. package/cjs/es6/persisters/persister-durable-object-storage/with-schemas/index.cjs +1 -1
  60. package/cjs/es6/persisters/persister-partykit-client/index.cjs +2 -5
  61. package/cjs/es6/persisters/persister-partykit-client/with-schemas/index.cjs +2 -5
  62. package/cjs/es6/queries/index.cjs +0 -1
  63. package/cjs/es6/queries/with-schemas/index.cjs +0 -1
  64. package/cjs/es6/relationships/index.cjs +1 -1
  65. package/cjs/es6/relationships/with-schemas/index.cjs +1 -1
  66. package/cjs/es6/synchronizers/synchronizer-ws-server-durable-object/index.cjs +1 -1
  67. package/cjs/es6/synchronizers/synchronizer-ws-server-durable-object/with-schemas/index.cjs +1 -1
  68. package/cjs/es6/with-schemas/index.cjs +0 -1
  69. package/cjs/min/persisters/persister-durable-object-storage/index.cjs +1 -1
  70. package/cjs/min/persisters/persister-durable-object-storage/index.cjs.gz +0 -0
  71. package/cjs/min/persisters/persister-durable-object-storage/with-schemas/index.cjs +1 -1
  72. package/cjs/min/persisters/persister-durable-object-storage/with-schemas/index.cjs.gz +0 -0
  73. package/cjs/min/synchronizers/synchronizer-ws-server-durable-object/index.cjs +1 -1
  74. package/cjs/min/synchronizers/synchronizer-ws-server-durable-object/index.cjs.gz +0 -0
  75. package/cjs/min/synchronizers/synchronizer-ws-server-durable-object/with-schemas/index.cjs +1 -1
  76. package/cjs/min/synchronizers/synchronizer-ws-server-durable-object/with-schemas/index.cjs.gz +0 -0
  77. package/cjs/persisters/persister-durable-object-storage/index.cjs +1 -1
  78. package/cjs/persisters/persister-durable-object-storage/with-schemas/index.cjs +1 -1
  79. package/cjs/persisters/persister-partykit-client/index.cjs +2 -5
  80. package/cjs/persisters/persister-partykit-client/with-schemas/index.cjs +2 -5
  81. package/cjs/synchronizers/synchronizer-ws-server-durable-object/index.cjs +1 -1
  82. package/cjs/synchronizers/synchronizer-ws-server-durable-object/with-schemas/index.cjs +1 -1
  83. package/es6/index.js +0 -1
  84. package/es6/indexes/index.js +1 -1
  85. package/es6/indexes/with-schemas/index.js +1 -1
  86. package/es6/metrics/index.js +1 -1
  87. package/es6/metrics/with-schemas/index.js +1 -1
  88. package/es6/min/index.js +1 -1
  89. package/es6/min/index.js.gz +0 -0
  90. package/es6/min/indexes/index.js +1 -1
  91. package/es6/min/indexes/index.js.gz +0 -0
  92. package/es6/min/indexes/with-schemas/index.js +1 -1
  93. package/es6/min/indexes/with-schemas/index.js.gz +0 -0
  94. package/es6/min/metrics/index.js +1 -1
  95. package/es6/min/metrics/index.js.gz +0 -0
  96. package/es6/min/metrics/with-schemas/index.js +1 -1
  97. package/es6/min/metrics/with-schemas/index.js.gz +0 -0
  98. package/es6/min/persisters/persister-durable-object-storage/index.js +1 -1
  99. package/es6/min/persisters/persister-durable-object-storage/index.js.gz +0 -0
  100. package/es6/min/persisters/persister-durable-object-storage/with-schemas/index.js +1 -1
  101. package/es6/min/persisters/persister-durable-object-storage/with-schemas/index.js.gz +0 -0
  102. package/es6/min/persisters/persister-file/index.js +1 -1
  103. package/es6/min/persisters/persister-file/index.js.gz +0 -0
  104. package/es6/min/persisters/persister-file/with-schemas/index.js +1 -1
  105. package/es6/min/persisters/persister-file/with-schemas/index.js.gz +0 -0
  106. package/es6/min/queries/index.js +1 -1
  107. package/es6/min/queries/index.js.gz +0 -0
  108. package/es6/min/queries/with-schemas/index.js +1 -1
  109. package/es6/min/queries/with-schemas/index.js.gz +0 -0
  110. package/es6/min/relationships/index.js +1 -1
  111. package/es6/min/relationships/index.js.gz +0 -0
  112. package/es6/min/relationships/with-schemas/index.js +1 -1
  113. package/es6/min/relationships/with-schemas/index.js.gz +0 -0
  114. package/es6/min/synchronizers/synchronizer-ws-server-durable-object/index.js +1 -1
  115. package/es6/min/synchronizers/synchronizer-ws-server-durable-object/index.js.gz +0 -0
  116. package/es6/min/synchronizers/synchronizer-ws-server-durable-object/with-schemas/index.js +1 -1
  117. package/es6/min/synchronizers/synchronizer-ws-server-durable-object/with-schemas/index.js.gz +0 -0
  118. package/es6/min/ui-react-dom/index.js +1 -1
  119. package/es6/min/ui-react-dom/index.js.gz +0 -0
  120. package/es6/min/ui-react-dom/with-schemas/index.js +1 -1
  121. package/es6/min/ui-react-dom/with-schemas/index.js.gz +0 -0
  122. package/es6/min/ui-react-inspector/index.js +1 -1
  123. package/es6/min/ui-react-inspector/index.js.gz +0 -0
  124. package/es6/min/ui-react-inspector/with-schemas/index.js +1 -1
  125. package/es6/min/ui-react-inspector/with-schemas/index.js.gz +0 -0
  126. package/es6/min/with-schemas/index.js +1 -1
  127. package/es6/min/with-schemas/index.js.gz +0 -0
  128. package/es6/persisters/persister-durable-object-storage/index.js +1 -1
  129. package/es6/persisters/persister-durable-object-storage/with-schemas/index.js +1 -1
  130. package/es6/persisters/persister-file/index.js +1 -1
  131. package/es6/persisters/persister-file/with-schemas/index.js +1 -1
  132. package/es6/persisters/persister-partykit-client/index.js +2 -5
  133. package/es6/persisters/persister-partykit-client/with-schemas/index.js +2 -5
  134. package/es6/queries/index.js +0 -1
  135. package/es6/queries/with-schemas/index.js +0 -1
  136. package/es6/relationships/index.js +1 -1
  137. package/es6/relationships/with-schemas/index.js +1 -1
  138. package/es6/synchronizers/synchronizer-ws-server-durable-object/index.js +1 -1
  139. package/es6/synchronizers/synchronizer-ws-server-durable-object/with-schemas/index.js +1 -1
  140. package/es6/ui-react-dom/index.js +8 -8
  141. package/es6/ui-react-dom/with-schemas/index.js +8 -8
  142. package/es6/ui-react-inspector/index.js +4 -4
  143. package/es6/ui-react-inspector/with-schemas/index.js +4 -4
  144. package/es6/with-schemas/index.js +0 -1
  145. package/min/persisters/persister-durable-object-storage/index.js +1 -1
  146. package/min/persisters/persister-durable-object-storage/index.js.gz +0 -0
  147. package/min/persisters/persister-durable-object-storage/with-schemas/index.js +1 -1
  148. package/min/persisters/persister-durable-object-storage/with-schemas/index.js.gz +0 -0
  149. package/min/persisters/persister-file/index.js +1 -1
  150. package/min/persisters/persister-file/index.js.gz +0 -0
  151. package/min/persisters/persister-file/with-schemas/index.js +1 -1
  152. package/min/persisters/persister-file/with-schemas/index.js.gz +0 -0
  153. package/min/synchronizers/synchronizer-ws-server-durable-object/index.js +1 -1
  154. package/min/synchronizers/synchronizer-ws-server-durable-object/index.js.gz +0 -0
  155. package/min/synchronizers/synchronizer-ws-server-durable-object/with-schemas/index.js +1 -1
  156. package/min/synchronizers/synchronizer-ws-server-durable-object/with-schemas/index.js.gz +0 -0
  157. package/min/ui-react-dom/index.js +1 -1
  158. package/min/ui-react-dom/index.js.gz +0 -0
  159. package/min/ui-react-dom/with-schemas/index.js +1 -1
  160. package/min/ui-react-dom/with-schemas/index.js.gz +0 -0
  161. package/min/ui-react-inspector/index.js +1 -1
  162. package/min/ui-react-inspector/index.js.gz +0 -0
  163. package/min/ui-react-inspector/with-schemas/index.js +1 -1
  164. package/min/ui-react-inspector/with-schemas/index.js.gz +0 -0
  165. package/package.json +1 -1
  166. package/persisters/persister-durable-object-storage/index.js +1 -1
  167. package/persisters/persister-durable-object-storage/with-schemas/index.js +1 -1
  168. package/persisters/persister-file/index.js +1 -1
  169. package/persisters/persister-file/with-schemas/index.js +1 -1
  170. package/persisters/persister-partykit-client/index.js +2 -5
  171. package/persisters/persister-partykit-client/with-schemas/index.js +2 -5
  172. package/readme.md +2 -2
  173. package/synchronizers/synchronizer-ws-server-durable-object/index.js +1 -1
  174. package/synchronizers/synchronizer-ws-server-durable-object/with-schemas/index.js +1 -1
  175. package/ui-react-dom/index.js +8 -8
  176. package/ui-react-dom/with-schemas/index.js +8 -8
  177. package/ui-react-inspector/index.js +4 -4
  178. package/ui-react-inspector/with-schemas/index.js +4 -4
  179. package/umd/es6/index.js +0 -1
  180. package/umd/es6/indexes/index.js +1 -5
  181. package/umd/es6/indexes/with-schemas/index.js +1 -5
  182. package/umd/es6/metrics/index.js +1 -5
  183. package/umd/es6/metrics/with-schemas/index.js +1 -5
  184. package/umd/es6/min/index.js +1 -1
  185. package/umd/es6/min/index.js.gz +0 -0
  186. package/umd/es6/min/indexes/index.js +1 -1
  187. package/umd/es6/min/indexes/index.js.gz +0 -0
  188. package/umd/es6/min/indexes/with-schemas/index.js +1 -1
  189. package/umd/es6/min/indexes/with-schemas/index.js.gz +0 -0
  190. package/umd/es6/min/metrics/index.js +1 -1
  191. package/umd/es6/min/metrics/index.js.gz +0 -0
  192. package/umd/es6/min/metrics/with-schemas/index.js +1 -1
  193. package/umd/es6/min/metrics/with-schemas/index.js.gz +0 -0
  194. package/umd/es6/min/persisters/persister-durable-object-storage/index.js +1 -1
  195. package/umd/es6/min/persisters/persister-durable-object-storage/index.js.gz +0 -0
  196. package/umd/es6/min/persisters/persister-durable-object-storage/with-schemas/index.js +1 -1
  197. package/umd/es6/min/persisters/persister-durable-object-storage/with-schemas/index.js.gz +0 -0
  198. package/umd/es6/min/queries/index.js +1 -1
  199. package/umd/es6/min/queries/index.js.gz +0 -0
  200. package/umd/es6/min/queries/with-schemas/index.js +1 -1
  201. package/umd/es6/min/queries/with-schemas/index.js.gz +0 -0
  202. package/umd/es6/min/relationships/index.js +1 -1
  203. package/umd/es6/min/relationships/index.js.gz +0 -0
  204. package/umd/es6/min/relationships/with-schemas/index.js +1 -1
  205. package/umd/es6/min/relationships/with-schemas/index.js.gz +0 -0
  206. package/umd/es6/min/synchronizers/synchronizer-ws-server-durable-object/index.js +1 -1
  207. package/umd/es6/min/synchronizers/synchronizer-ws-server-durable-object/index.js.gz +0 -0
  208. package/umd/es6/min/synchronizers/synchronizer-ws-server-durable-object/with-schemas/index.js +1 -1
  209. package/umd/es6/min/synchronizers/synchronizer-ws-server-durable-object/with-schemas/index.js.gz +0 -0
  210. package/umd/es6/min/with-schemas/index.js +1 -1
  211. package/umd/es6/min/with-schemas/index.js.gz +0 -0
  212. package/umd/es6/persisters/persister-durable-object-storage/index.js +1 -1
  213. package/umd/es6/persisters/persister-durable-object-storage/with-schemas/index.js +1 -1
  214. package/umd/es6/persisters/persister-partykit-client/index.js +2 -5
  215. package/umd/es6/persisters/persister-partykit-client/with-schemas/index.js +2 -5
  216. package/umd/es6/queries/index.js +0 -1
  217. package/umd/es6/queries/with-schemas/index.js +0 -1
  218. package/umd/es6/relationships/index.js +1 -5
  219. package/umd/es6/relationships/with-schemas/index.js +1 -5
  220. package/umd/es6/synchronizers/synchronizer-ws-server-durable-object/index.js +1 -1
  221. package/umd/es6/synchronizers/synchronizer-ws-server-durable-object/with-schemas/index.js +1 -1
  222. package/umd/es6/with-schemas/index.js +0 -1
  223. package/umd/min/persisters/persister-durable-object-storage/index.js +1 -1
  224. package/umd/min/persisters/persister-durable-object-storage/index.js.gz +0 -0
  225. package/umd/min/persisters/persister-durable-object-storage/with-schemas/index.js +1 -1
  226. package/umd/min/persisters/persister-durable-object-storage/with-schemas/index.js.gz +0 -0
  227. package/umd/min/synchronizers/synchronizer-ws-server-durable-object/index.js +1 -1
  228. package/umd/min/synchronizers/synchronizer-ws-server-durable-object/index.js.gz +0 -0
  229. package/umd/min/synchronizers/synchronizer-ws-server-durable-object/with-schemas/index.js +1 -1
  230. package/umd/min/synchronizers/synchronizer-ws-server-durable-object/with-schemas/index.js.gz +0 -0
  231. package/umd/persisters/persister-durable-object-storage/index.js +1 -1
  232. package/umd/persisters/persister-durable-object-storage/with-schemas/index.js +1 -1
  233. package/umd/persisters/persister-partykit-client/index.js +2 -5
  234. package/umd/persisters/persister-partykit-client/with-schemas/index.js +2 -5
  235. package/umd/synchronizers/synchronizer-ws-server-durable-object/index.js +1 -1
  236. package/umd/synchronizers/synchronizer-ws-server-durable-object/with-schemas/index.js +1 -1
@@ -71,6 +71,7 @@ export type TinyBasePartyKitServerConfig = {
71
71
  * @since v4.3.0
72
72
  */
73
73
  storePath?: string;
74
+
74
75
  /**
75
76
  * The prefix at the beginning of the web socket messages between the client
76
77
  * and the server when synchronizing the Store. Use this to make sure they do
@@ -81,6 +82,7 @@ export type TinyBasePartyKitServerConfig = {
81
82
  * @since v4.3.0
82
83
  */
83
84
  messagePrefix?: string;
85
+
84
86
  /**
85
87
  * The prefix used before all the keys in the server's durable storage. Use
86
88
  * this in case you are worried about the Store data colliding with other data
@@ -89,6 +91,7 @@ export type TinyBasePartyKitServerConfig = {
89
91
  * @since v4.3.0
90
92
  */
91
93
  storagePrefix?: string;
94
+
92
95
  /**
93
96
  * An object containing the extra HTTP(S) headers returned to the client from
94
97
  * this server. This defaults to the following three headers to allow CORS.
@@ -160,10 +163,12 @@ export type TinyBasePartyKitServerConfig = {
160
163
  export class TinyBasePartyKitServer implements Server {
161
164
  /**
162
165
  * The constructor is used to create the server.
166
+ * @returns A new instance of the TinyBasePartyKitServer.
163
167
  * @category Creation
164
168
  * @since v4.3.9
165
169
  */
166
170
  constructor(party: Party);
171
+
167
172
  /**
168
173
  * The config property is used to optionally configure the server, using an
169
174
  * object of the TinyBasePartyKitServerConfig type.
@@ -173,6 +178,7 @@ export class TinyBasePartyKitServer implements Server {
173
178
  * @since v4.3.9
174
179
  */
175
180
  readonly config: TinyBasePartyKitServerConfig;
181
+
176
182
  /**
177
183
  * The onRequest method is called when a HTTP request is made to the party
178
184
  * URL.
@@ -199,6 +205,7 @@ export class TinyBasePartyKitServer implements Server {
199
205
  * @since v4.3.0
200
206
  */
201
207
  onRequest(request: Request): Promise<Response>;
208
+
202
209
  /**
203
210
  * The onMessage method is called when the server receives a message from a
204
211
  * client.
@@ -225,6 +232,7 @@ export class TinyBasePartyKitServer implements Server {
225
232
  * @since v4.3.0
226
233
  */
227
234
  onMessage(message: string, connection: Connection): Promise<void>;
235
+
228
236
  /**
229
237
  * The canSetTable method lets you allow or disallow any changes to a Table
230
238
  * stored on the server, as sent from a client.
@@ -273,6 +281,7 @@ export class TinyBasePartyKitServer implements Server {
273
281
  initialSave: boolean,
274
282
  requestOrConnection: Request | Connection,
275
283
  ): Promise<boolean>;
284
+
276
285
  /**
277
286
  * The canDelTable method lets you allow or disallow deletions of a Table
278
287
  * stored on the server, as sent from a client.
@@ -307,6 +316,7 @@ export class TinyBasePartyKitServer implements Server {
307
316
  * @since v4.3.12
308
317
  */
309
318
  canDelTable(tableId: Id, connection: Connection): Promise<boolean>;
319
+
310
320
  /**
311
321
  * The canSetRow method lets you allow or disallow any changes to a Row stored
312
322
  * on the server, as sent from a client.
@@ -352,6 +362,7 @@ export class TinyBasePartyKitServer implements Server {
352
362
  initialSave: boolean,
353
363
  requestOrConnection: Request | Connection,
354
364
  ): Promise<boolean>;
365
+
355
366
  /**
356
367
  * The canDelRow method lets you allow or disallow deletions of a Row stored
357
368
  * on the server, as sent from a client.
@@ -387,6 +398,7 @@ export class TinyBasePartyKitServer implements Server {
387
398
  * @since v4.3.12
388
399
  */
389
400
  canDelRow(tableId: Id, rowId: Id, connection: Connection): Promise<boolean>;
401
+
390
402
  /**
391
403
  * The canSetCell method lets you allow or disallow any changes to a Cell
392
404
  * stored on the server, as sent from a client.
@@ -452,6 +464,7 @@ export class TinyBasePartyKitServer implements Server {
452
464
  requestOrConnection: Request | Connection,
453
465
  oldCell: CellOrUndefined<NoTablesSchema, Id, Id>,
454
466
  ): Promise<boolean>;
467
+
455
468
  /**
456
469
  * The canDelCell method lets you allow or disallow deletions of a Cell stored
457
470
  * on the server, as sent from a client.
@@ -492,6 +505,7 @@ export class TinyBasePartyKitServer implements Server {
492
505
  cellId: Id,
493
506
  connection: Connection,
494
507
  ): Promise<boolean>;
508
+
495
509
  /**
496
510
  * The canSetValue method lets you allow or disallow any changes to a Value
497
511
  * stored on the server, as sent from a client.
@@ -553,6 +567,7 @@ export class TinyBasePartyKitServer implements Server {
553
567
  requestOrConnection: Request | Connection,
554
568
  oldValue: ValueOrUndefined<NoValuesSchema, Id>,
555
569
  ): Promise<boolean>;
570
+
556
571
  /**
557
572
  * The canDelValue method lets you allow or disallow deletions of a Value
558
573
  * stored on the server, as sent from a client.
@@ -71,6 +71,7 @@ export type TinyBasePartyKitServerConfig = {
71
71
  * @since v4.3.0
72
72
  */
73
73
  storePath?: string;
74
+
74
75
  /**
75
76
  * The prefix at the beginning of the web socket messages between the client
76
77
  * and the server when synchronizing the Store. Use this to make sure they do
@@ -81,6 +82,7 @@ export type TinyBasePartyKitServerConfig = {
81
82
  * @since v4.3.0
82
83
  */
83
84
  messagePrefix?: string;
85
+
84
86
  /**
85
87
  * The prefix used before all the keys in the server's durable storage. Use
86
88
  * this in case you are worried about the Store data colliding with other data
@@ -89,6 +91,7 @@ export type TinyBasePartyKitServerConfig = {
89
91
  * @since v4.3.0
90
92
  */
91
93
  storagePrefix?: string;
94
+
92
95
  /**
93
96
  * An object containing the extra HTTP(S) headers returned to the client from
94
97
  * this server. This defaults to the following three headers to allow CORS.
@@ -160,10 +163,12 @@ export type TinyBasePartyKitServerConfig = {
160
163
  export class TinyBasePartyKitServer implements Server {
161
164
  /**
162
165
  * The constructor is used to create the server.
166
+ * @returns A new instance of the TinyBasePartyKitServer.
163
167
  * @category Creation
164
168
  * @since v4.3.9
165
169
  */
166
170
  constructor(party: Party);
171
+
167
172
  /**
168
173
  * The config property is used to optionally configure the server, using an
169
174
  * object of the TinyBasePartyKitServerConfig type.
@@ -173,6 +178,7 @@ export class TinyBasePartyKitServer implements Server {
173
178
  * @since v4.3.9
174
179
  */
175
180
  readonly config: TinyBasePartyKitServerConfig;
181
+
176
182
  /**
177
183
  * The onRequest method is called when a HTTP request is made to the party
178
184
  * URL.
@@ -199,6 +205,7 @@ export class TinyBasePartyKitServer implements Server {
199
205
  * @since v4.3.0
200
206
  */
201
207
  onRequest(request: Request): Promise<Response>;
208
+
202
209
  /**
203
210
  * The onMessage method is called when the server receives a message from a
204
211
  * client.
@@ -225,6 +232,7 @@ export class TinyBasePartyKitServer implements Server {
225
232
  * @since v4.3.0
226
233
  */
227
234
  onMessage(message: string, connection: Connection): Promise<void>;
235
+
228
236
  /**
229
237
  * The canSetTable method lets you allow or disallow any changes to a Table
230
238
  * stored on the server, as sent from a client.
@@ -273,6 +281,7 @@ export class TinyBasePartyKitServer implements Server {
273
281
  initialSave: boolean,
274
282
  requestOrConnection: Request | Connection,
275
283
  ): Promise<boolean>;
284
+
276
285
  /**
277
286
  * The canDelTable method lets you allow or disallow deletions of a Table
278
287
  * stored on the server, as sent from a client.
@@ -307,6 +316,7 @@ export class TinyBasePartyKitServer implements Server {
307
316
  * @since v4.3.12
308
317
  */
309
318
  canDelTable(tableId: Id, connection: Connection): Promise<boolean>;
319
+
310
320
  /**
311
321
  * The canSetRow method lets you allow or disallow any changes to a Row stored
312
322
  * on the server, as sent from a client.
@@ -352,6 +362,7 @@ export class TinyBasePartyKitServer implements Server {
352
362
  initialSave: boolean,
353
363
  requestOrConnection: Request | Connection,
354
364
  ): Promise<boolean>;
365
+
355
366
  /**
356
367
  * The canDelRow method lets you allow or disallow deletions of a Row stored
357
368
  * on the server, as sent from a client.
@@ -387,6 +398,7 @@ export class TinyBasePartyKitServer implements Server {
387
398
  * @since v4.3.12
388
399
  */
389
400
  canDelRow(tableId: Id, rowId: Id, connection: Connection): Promise<boolean>;
401
+
390
402
  /**
391
403
  * The canSetCell method lets you allow or disallow any changes to a Cell
392
404
  * stored on the server, as sent from a client.
@@ -452,6 +464,7 @@ export class TinyBasePartyKitServer implements Server {
452
464
  requestOrConnection: Request | Connection,
453
465
  oldCell: CellOrUndefined<NoTablesSchema, Id, Id>,
454
466
  ): Promise<boolean>;
467
+
455
468
  /**
456
469
  * The canDelCell method lets you allow or disallow deletions of a Cell stored
457
470
  * on the server, as sent from a client.
@@ -492,6 +505,7 @@ export class TinyBasePartyKitServer implements Server {
492
505
  cellId: Id,
493
506
  connection: Connection,
494
507
  ): Promise<boolean>;
508
+
495
509
  /**
496
510
  * The canSetValue method lets you allow or disallow any changes to a Value
497
511
  * stored on the server, as sent from a client.
@@ -553,6 +567,7 @@ export class TinyBasePartyKitServer implements Server {
553
567
  requestOrConnection: Request | Connection,
554
568
  oldValue: ValueOrUndefined<NoValuesSchema, Id>,
555
569
  ): Promise<boolean>;
570
+
556
571
  /**
557
572
  * The canDelValue method lets you allow or disallow deletions of a Value
558
573
  * stored on the server, as sent from a client.
@@ -1561,6 +1561,7 @@ export interface Persister<
1561
1561
  * the underlying Store and storage are removed and it can be correctly
1562
1562
  * garbage collected. It is equivalent to running the stopAutoLoad method and
1563
1563
  * the stopAutoSave method in succession.
1564
+ * @returns A reference to the Persister object.
1564
1565
  * @example
1565
1566
  * This example creates a Store, associates a Persister object with it (that
1566
1567
  * registers a TablesListener with the underlying Store), and then destroys it
@@ -1561,6 +1561,7 @@ export interface Persister<
1561
1561
  * the underlying Store and storage are removed and it can be correctly
1562
1562
  * garbage collected. It is equivalent to running the stopAutoLoad method and
1563
1563
  * the stopAutoSave method in succession.
1564
+ * @returns A reference to the Persister object.
1564
1565
  * @example
1565
1566
  * This example creates a Store, associates a Persister object with it (that
1566
1567
  * registers a TablesListener with the underlying Store), and then destroys it
@@ -473,13 +473,14 @@ export type GetCell = (cellId: Id) => CellOrUndefined;
473
473
 
474
474
  /**
475
475
  * The IdAddedOrRemoved type describes a change made to an Id in either the
476
- * tabular of keyed-value part of the Store.
476
+ * tabular or keyed-value part of the Store (or in other TinyBase modules).
477
477
  *
478
478
  * This type is used in other types like ChangedTableIds, ChangedRowIds,
479
- * ChangedCellIds, and ChangedValueIds.
479
+ * ChangedCellIds, and ChangedValueIds, as well as in other events or listeners
480
+ * where a list of Ids has changed.
480
481
  *
481
- * It is a simple number: a 1 indicates that a given Id was added to the Store
482
- * during a transaction, and a -1 indicates that it was removed.
482
+ * It is a simple number: a 1 indicates that a given Id was added to a list of
483
+ * Ids, and a -1 indicates that it was removed.
483
484
  * @category Transaction
484
485
  * @since v4.0.0
485
486
  */
@@ -7518,13 +7519,14 @@ export interface Store {
7518
7519
  getListenerStats(): StoreListenerStats;
7519
7520
 
7520
7521
  /**
7521
- * The isMergeable methods lets you know if the Store is mergeable.
7522
+ * The isMergeable method lets you know if the Store is mergeable.
7522
7523
  *
7523
- * This will always be false for a Store, and true for a MergeableStore.
7524
- * @category Information
7524
+ * This will always return false for a Store, and true for a MergeableStore.
7525
+ * @returns Whether the Store is mergeable.
7526
+ * @category Getter
7525
7527
  * @since v5.0.0
7526
7528
  */
7527
- isMergeable: () => boolean;
7529
+ isMergeable(): boolean;
7528
7530
  //
7529
7531
  }
7530
7532
 
@@ -473,13 +473,14 @@ export type GetCell = (cellId: Id) => CellOrUndefined;
473
473
 
474
474
  /**
475
475
  * The IdAddedOrRemoved type describes a change made to an Id in either the
476
- * tabular of keyed-value part of the Store.
476
+ * tabular or keyed-value part of the Store (or in other TinyBase modules).
477
477
  *
478
478
  * This type is used in other types like ChangedTableIds, ChangedRowIds,
479
- * ChangedCellIds, and ChangedValueIds.
479
+ * ChangedCellIds, and ChangedValueIds, as well as in other events or listeners
480
+ * where a list of Ids has changed.
480
481
  *
481
- * It is a simple number: a 1 indicates that a given Id was added to the Store
482
- * during a transaction, and a -1 indicates that it was removed.
482
+ * It is a simple number: a 1 indicates that a given Id was added to a list of
483
+ * Ids, and a -1 indicates that it was removed.
483
484
  * @category Transaction
484
485
  * @since v4.0.0
485
486
  */
@@ -7518,13 +7519,14 @@ export interface Store {
7518
7519
  getListenerStats(): StoreListenerStats;
7519
7520
 
7520
7521
  /**
7521
- * The isMergeable methods lets you know if the Store is mergeable.
7522
+ * The isMergeable method lets you know if the Store is mergeable.
7522
7523
  *
7523
- * This will always be false for a Store, and true for a MergeableStore.
7524
- * @category Information
7524
+ * This will always return false for a Store, and true for a MergeableStore.
7525
+ * @returns Whether the Store is mergeable.
7526
+ * @category Getter
7525
7527
  * @since v5.0.0
7526
7528
  */
7527
- isMergeable: () => boolean;
7529
+ isMergeable(): boolean;
7528
7530
  //
7529
7531
  }
7530
7532
 
@@ -749,13 +749,14 @@ export type GetCell<
749
749
 
750
750
  /**
751
751
  * The IdAddedOrRemoved type describes a change made to an Id in either the
752
- * tabular of keyed-value part of the Store.
752
+ * tabular or keyed-value part of the Store (or in other TinyBase modules).
753
753
  *
754
754
  * This type is used in other types like ChangedTableIds, ChangedRowIds,
755
- * ChangedCellIds, and ChangedValueIds.
755
+ * ChangedCellIds, and ChangedValueIds, as well as in other events or listeners
756
+ * where a list of Ids has changed.
756
757
  *
757
- * It is a simple number: a 1 indicates that a given Id was added to the Store
758
- * during a transaction, and a -1 indicates that it was removed.
758
+ * It is a simple number: a 1 indicates that a given Id was added to a list of
759
+ * Ids, and a -1 indicates that it was removed.
759
760
  * @category Transaction
760
761
  * @since v4.0.0
761
762
  */
@@ -9191,13 +9192,14 @@ export interface Store<in out Schemas extends OptionalSchemas> {
9191
9192
  getListenerStats(): StoreListenerStats;
9192
9193
 
9193
9194
  /**
9194
- * The isMergeable methods lets you know if the Store is mergeable.
9195
+ * The isMergeable method lets you know if the Store is mergeable.
9195
9196
  *
9196
- * This will always be false for a Store, and true for a MergeableStore.
9197
- * @category Information
9197
+ * This will always return false for a Store, and true for a MergeableStore.
9198
+ * @returns Whether the Store is mergeable.
9199
+ * @category Getter
9198
9200
  * @since v5.0.0
9199
9201
  */
9200
- isMergeable: () => boolean;
9202
+ isMergeable(): boolean;
9201
9203
  }
9202
9204
 
9203
9205
  /**
@@ -749,13 +749,14 @@ export type GetCell<
749
749
 
750
750
  /**
751
751
  * The IdAddedOrRemoved type describes a change made to an Id in either the
752
- * tabular of keyed-value part of the Store.
752
+ * tabular or keyed-value part of the Store (or in other TinyBase modules).
753
753
  *
754
754
  * This type is used in other types like ChangedTableIds, ChangedRowIds,
755
- * ChangedCellIds, and ChangedValueIds.
755
+ * ChangedCellIds, and ChangedValueIds, as well as in other events or listeners
756
+ * where a list of Ids has changed.
756
757
  *
757
- * It is a simple number: a 1 indicates that a given Id was added to the Store
758
- * during a transaction, and a -1 indicates that it was removed.
758
+ * It is a simple number: a 1 indicates that a given Id was added to a list of
759
+ * Ids, and a -1 indicates that it was removed.
759
760
  * @category Transaction
760
761
  * @since v4.0.0
761
762
  */
@@ -9191,13 +9192,14 @@ export interface Store<in out Schemas extends OptionalSchemas> {
9191
9192
  getListenerStats(): StoreListenerStats;
9192
9193
 
9193
9194
  /**
9194
- * The isMergeable methods lets you know if the Store is mergeable.
9195
+ * The isMergeable method lets you know if the Store is mergeable.
9195
9196
  *
9196
- * This will always be false for a Store, and true for a MergeableStore.
9197
- * @category Information
9197
+ * This will always return false for a Store, and true for a MergeableStore.
9198
+ * @returns Whether the Store is mergeable.
9199
+ * @category Getter
9198
9200
  * @since v5.0.0
9199
9201
  */
9200
- isMergeable: () => boolean;
9202
+ isMergeable(): boolean;
9201
9203
  }
9202
9204
 
9203
9205
  /**