@spooky-sync/core 0.0.1-canary.26 → 0.0.1-canary.29

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/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { C as Logger$1, S as UpdateOptions, T as EventSystem, _ as RunOptions, a as MutationEvent, b as SpookyQueryResultPromise, c as PinoTransmit, d as QueryHash, f as QueryState, g as RecordVersionDiff, h as RecordVersionArray, i as MutationCallback, l as QueryConfig, m as QueryUpdateCallback, n as EventSubscriptionOptions, o as MutationEventType, p as QueryTimeToLive, r as Level, s as PersistenceClient, t as DebounceOptions, u as QueryConfigRecord, v as SpookyConfig, w as EventDefinition, x as StoreType, y as SpookyQueryResult } from "./types.js";
1
+ import { C as Logger$1, S as UpdateOptions, T as EventSystem, _ as RunOptions, a as MutationEvent, b as Sp00kyQueryResultPromise, c as PinoTransmit, d as QueryHash, f as QueryState, g as RecordVersionDiff, h as RecordVersionArray, i as MutationCallback, l as QueryConfig, m as QueryUpdateCallback, n as EventSubscriptionOptions, o as MutationEventType, p as QueryTimeToLive, r as Level, s as PersistenceClient, t as DebounceOptions, u as QueryConfigRecord, v as Sp00kyConfig, w as EventDefinition, x as StoreType, y as Sp00kyQueryResult } from "./types.js";
2
2
  import * as surrealdb0 from "surrealdb";
3
3
  import { Duration, RecordId, Surreal, SurrealTransaction } from "surrealdb";
4
4
  import { AccessDefinition, BackendNames, BackendRoutes, BucketNames, ColumnSchema, GetTable, QueryBuilder, QueryOptions, RoutePayload, SchemaStructure, TableModel, TableNames, TypeNameToTypeMap } from "@spooky-sync/query-builder";
@@ -53,8 +53,8 @@ declare abstract class AbstractDatabaseService {
53
53
  declare class LocalDatabaseService extends AbstractDatabaseService {
54
54
  private config;
55
55
  protected eventType: "DATABASE_LOCAL_QUERY";
56
- constructor(config: SpookyConfig<any>['database'], logger: Logger$1);
57
- getConfig(): SpookyConfig<any>['database'];
56
+ constructor(config: Sp00kyConfig<any>['database'], logger: Logger$1);
57
+ getConfig(): Sp00kyConfig<any>['database'];
58
58
  connect(): Promise<void>;
59
59
  }
60
60
  //#endregion
@@ -62,8 +62,8 @@ declare class LocalDatabaseService extends AbstractDatabaseService {
62
62
  declare class RemoteDatabaseService extends AbstractDatabaseService {
63
63
  private config;
64
64
  protected eventType: "DATABASE_REMOTE_QUERY";
65
- constructor(config: SpookyConfig<any>['database'], logger: Logger$1);
66
- getConfig(): SpookyConfig<any>['database'];
65
+ constructor(config: Sp00kyConfig<any>['database'], logger: Logger$1);
66
+ getConfig(): Sp00kyConfig<any>['database'];
67
67
  connect(): Promise<void>;
68
68
  signin(params: any): Promise<any>;
69
69
  signup(params: any): Promise<any>;
@@ -194,7 +194,7 @@ declare class AuthService<S extends SchemaStructure> {
194
194
  signIn<Name extends keyof S['access'] & string>(accessName: Name, params: ExtractAccessParams<S, Name, 'signIn'>): Promise<void>;
195
195
  }
196
196
  //#endregion
197
- //#region src/spooky.d.ts
197
+ //#region src/sp00ky.d.ts
198
198
  declare class BucketHandle {
199
199
  private bucketName;
200
200
  private remote;
@@ -208,7 +208,7 @@ declare class BucketHandle {
208
208
  rename(sourcePath: string, targetPath: string): Promise<void>;
209
209
  list(prefix?: string): Promise<string[]>;
210
210
  }
211
- declare class SpookyClient<S extends SchemaStructure> {
211
+ declare class Sp00kyClient<S extends SchemaStructure> {
212
212
  private config;
213
213
  private local;
214
214
  private remote;
@@ -225,7 +225,7 @@ declare class SpookyClient<S extends SchemaStructure> {
225
225
  get localClient(): Surreal;
226
226
  get pendingMutationCount(): number;
227
227
  subscribeToPendingMutations(cb: (count: number) => void): () => void;
228
- constructor(config: SpookyConfig<S>);
228
+ constructor(config: Sp00kyConfig<S>);
229
229
  /**
230
230
  * Setup direct callbacks instead of event subscriptions
231
231
  */
@@ -234,7 +234,7 @@ declare class SpookyClient<S extends SchemaStructure> {
234
234
  close(): Promise<void>;
235
235
  authenticate(token: string): Promise<surrealdb0.Tokens>;
236
236
  deauthenticate(): Promise<void>;
237
- query<Table extends TableNames<S>>(table: Table, options: QueryOptions<TableModel<GetTable<S, Table>>, false>, ttl?: QueryTimeToLive): QueryBuilder<S, Table, SpookyQueryResultPromise>;
237
+ query<Table extends TableNames<S>>(table: Table, options: QueryOptions<TableModel<GetTable<S, Table>>, false>, ttl?: QueryTimeToLive): QueryBuilder<S, Table, Sp00kyQueryResultPromise>;
238
238
  private initQuery;
239
239
  queryRaw(sql: string, params: Record<string, any>, ttl: QueryTimeToLive): Promise<string>;
240
240
  subscribe(queryHash: string, callback: (records: Record<string, any>[]) => void, options?: {
@@ -259,4 +259,4 @@ declare function fileToUint8Array(file: File | Blob): Promise<Uint8Array>;
259
259
  */
260
260
 
261
261
  //#endregion
262
- export { AuthEventSystem, AuthEventTypeMap, AuthEventTypes, AuthService, BucketHandle, DebounceOptions, EventSubscriptionOptions, Level, MutationCallback, MutationEvent, MutationEventType, PersistenceClient, PinoTransmit, QueryConfig, QueryConfigRecord, QueryHash, QueryState, QueryTimeToLive, QueryUpdateCallback, RecordVersionArray, RecordVersionDiff, RunOptions, SpookyClient, SpookyConfig, SpookyQueryResult, SpookyQueryResultPromise, StoreType, UpdateOptions, createAuthEventSystem, fileToUint8Array };
262
+ export { AuthEventSystem, AuthEventTypeMap, AuthEventTypes, AuthService, BucketHandle, DebounceOptions, EventSubscriptionOptions, Level, MutationCallback, MutationEvent, MutationEventType, PersistenceClient, PinoTransmit, QueryConfig, QueryConfigRecord, QueryHash, QueryState, QueryTimeToLive, QueryUpdateCallback, RecordVersionArray, RecordVersionDiff, RunOptions, Sp00kyClient, Sp00kyConfig, Sp00kyQueryResult, Sp00kyQueryResultPromise, StoreType, UpdateOptions, createAuthEventSystem, fileToUint8Array };