tetherdb 0.1.0

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 (194) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +277 -0
  3. package/bin/tetherdb.js +7 -0
  4. package/dist/cli/args.d.cts +20 -0
  5. package/dist/cli/args.d.ts +20 -0
  6. package/dist/cli/args.d.ts.map +1 -0
  7. package/dist/cli/backend.d.cts +15 -0
  8. package/dist/cli/backend.d.ts +15 -0
  9. package/dist/cli/backend.d.ts.map +1 -0
  10. package/dist/cli/cli.d.cts +8 -0
  11. package/dist/cli/cli.d.ts +8 -0
  12. package/dist/cli/cli.d.ts.map +1 -0
  13. package/dist/cli/commands/apps.d.cts +9 -0
  14. package/dist/cli/commands/apps.d.ts +9 -0
  15. package/dist/cli/commands/apps.d.ts.map +1 -0
  16. package/dist/cli/commands/help.d.cts +5 -0
  17. package/dist/cli/commands/help.d.ts +5 -0
  18. package/dist/cli/commands/help.d.ts.map +1 -0
  19. package/dist/cli/commands/index.d.cts +8 -0
  20. package/dist/cli/commands/index.d.ts +8 -0
  21. package/dist/cli/commands/index.d.ts.map +1 -0
  22. package/dist/cli/commands/maintenance.d.cts +9 -0
  23. package/dist/cli/commands/maintenance.d.ts +9 -0
  24. package/dist/cli/commands/maintenance.d.ts.map +1 -0
  25. package/dist/cli/commands/serve.d.cts +14 -0
  26. package/dist/cli/commands/serve.d.ts +14 -0
  27. package/dist/cli/commands/serve.d.ts.map +1 -0
  28. package/dist/cli/commands/status.d.cts +9 -0
  29. package/dist/cli/commands/status.d.ts +9 -0
  30. package/dist/cli/commands/status.d.ts.map +1 -0
  31. package/dist/cli/commands/tables.d.cts +9 -0
  32. package/dist/cli/commands/tables.d.ts +9 -0
  33. package/dist/cli/commands/tables.d.ts.map +1 -0
  34. package/dist/cli/commands/users.d.cts +9 -0
  35. package/dist/cli/commands/users.d.ts +9 -0
  36. package/dist/cli/commands/users.d.ts.map +1 -0
  37. package/dist/cli/index.cjs +3999 -0
  38. package/dist/cli/index.cjs.map +1 -0
  39. package/dist/cli/index.d.cts +7 -0
  40. package/dist/cli/index.d.ts +7 -0
  41. package/dist/cli/index.d.ts.map +1 -0
  42. package/dist/cli/index.js +3958 -0
  43. package/dist/cli/index.js.map +1 -0
  44. package/dist/client/auth.d.cts +155 -0
  45. package/dist/client/auth.d.ts +155 -0
  46. package/dist/client/auth.d.ts.map +1 -0
  47. package/dist/client/client.d.cts +122 -0
  48. package/dist/client/client.d.ts +122 -0
  49. package/dist/client/client.d.ts.map +1 -0
  50. package/dist/client/errors.d.cts +39 -0
  51. package/dist/client/errors.d.ts +39 -0
  52. package/dist/client/errors.d.ts.map +1 -0
  53. package/dist/client/index.cjs +1742 -0
  54. package/dist/client/index.cjs.map +1 -0
  55. package/dist/client/index.d.cts +12 -0
  56. package/dist/client/index.d.ts +12 -0
  57. package/dist/client/index.d.ts.map +1 -0
  58. package/dist/client/index.js +1707 -0
  59. package/dist/client/index.js.map +1 -0
  60. package/dist/client/shared/event.d.cts +29 -0
  61. package/dist/client/shared/event.d.ts +29 -0
  62. package/dist/client/shared/event.d.ts.map +1 -0
  63. package/dist/client/shared/id.d.cts +5 -0
  64. package/dist/client/shared/id.d.ts +5 -0
  65. package/dist/client/shared/id.d.ts.map +1 -0
  66. package/dist/client/storage.d.cts +183 -0
  67. package/dist/client/storage.d.ts +183 -0
  68. package/dist/client/storage.d.ts.map +1 -0
  69. package/dist/client/sync.d.cts +126 -0
  70. package/dist/client/sync.d.ts +126 -0
  71. package/dist/client/sync.d.ts.map +1 -0
  72. package/dist/client/table.d.cts +146 -0
  73. package/dist/client/table.d.ts +146 -0
  74. package/dist/client/table.d.ts.map +1 -0
  75. package/dist/index.cjs +1742 -0
  76. package/dist/index.cjs.map +1 -0
  77. package/dist/index.d.cts +7 -0
  78. package/dist/index.d.ts +7 -0
  79. package/dist/index.d.ts.map +1 -0
  80. package/dist/index.js +1707 -0
  81. package/dist/index.js.map +1 -0
  82. package/dist/server/crypto.d.cts +55 -0
  83. package/dist/server/crypto.d.ts +55 -0
  84. package/dist/server/crypto.d.ts.map +1 -0
  85. package/dist/server/errors.d.cts +39 -0
  86. package/dist/server/errors.d.ts +39 -0
  87. package/dist/server/errors.d.ts.map +1 -0
  88. package/dist/server/index.cjs +3621 -0
  89. package/dist/server/index.cjs.map +1 -0
  90. package/dist/server/index.d.cts +10 -0
  91. package/dist/server/index.d.ts +10 -0
  92. package/dist/server/index.d.ts.map +1 -0
  93. package/dist/server/index.js +3569 -0
  94. package/dist/server/index.js.map +1 -0
  95. package/dist/server/lock.d.cts +56 -0
  96. package/dist/server/lock.d.ts +56 -0
  97. package/dist/server/lock.d.ts.map +1 -0
  98. package/dist/server/rate-limiter.d.cts +81 -0
  99. package/dist/server/rate-limiter.d.ts +81 -0
  100. package/dist/server/rate-limiter.d.ts.map +1 -0
  101. package/dist/server/server.d.cts +206 -0
  102. package/dist/server/server.d.ts +206 -0
  103. package/dist/server/server.d.ts.map +1 -0
  104. package/dist/server/storage/app.d.cts +70 -0
  105. package/dist/server/storage/app.d.ts +70 -0
  106. package/dist/server/storage/app.d.ts.map +1 -0
  107. package/dist/server/storage/base/app.d.cts +42 -0
  108. package/dist/server/storage/base/app.d.ts +42 -0
  109. package/dist/server/storage/base/app.d.ts.map +1 -0
  110. package/dist/server/storage/base/index.d.cts +5 -0
  111. package/dist/server/storage/base/index.d.ts +5 -0
  112. package/dist/server/storage/base/index.d.ts.map +1 -0
  113. package/dist/server/storage/base/storage.d.cts +40 -0
  114. package/dist/server/storage/base/storage.d.ts +40 -0
  115. package/dist/server/storage/base/storage.d.ts.map +1 -0
  116. package/dist/server/storage/base/table.d.cts +32 -0
  117. package/dist/server/storage/base/table.d.ts +32 -0
  118. package/dist/server/storage/base/table.d.ts.map +1 -0
  119. package/dist/server/storage/base/user.d.cts +31 -0
  120. package/dist/server/storage/base/user.d.ts +31 -0
  121. package/dist/server/storage/base/user.d.ts.map +1 -0
  122. package/dist/server/storage/file/app.d.cts +50 -0
  123. package/dist/server/storage/file/app.d.ts +50 -0
  124. package/dist/server/storage/file/app.d.ts.map +1 -0
  125. package/dist/server/storage/file/index.d.cts +5 -0
  126. package/dist/server/storage/file/index.d.ts +5 -0
  127. package/dist/server/storage/file/index.d.ts.map +1 -0
  128. package/dist/server/storage/file/storage.d.cts +67 -0
  129. package/dist/server/storage/file/storage.d.ts +67 -0
  130. package/dist/server/storage/file/storage.d.ts.map +1 -0
  131. package/dist/server/storage/file/table.d.cts +14 -0
  132. package/dist/server/storage/file/table.d.ts +14 -0
  133. package/dist/server/storage/file/table.d.ts.map +1 -0
  134. package/dist/server/storage/file/user.d.cts +14 -0
  135. package/dist/server/storage/file/user.d.ts +14 -0
  136. package/dist/server/storage/file/user.d.ts.map +1 -0
  137. package/dist/server/storage/index.d.cts +14 -0
  138. package/dist/server/storage/index.d.ts +14 -0
  139. package/dist/server/storage/index.d.ts.map +1 -0
  140. package/dist/server/storage/memory/app.d.cts +29 -0
  141. package/dist/server/storage/memory/app.d.ts +29 -0
  142. package/dist/server/storage/memory/app.d.ts.map +1 -0
  143. package/dist/server/storage/memory/index.d.cts +5 -0
  144. package/dist/server/storage/memory/index.d.ts +5 -0
  145. package/dist/server/storage/memory/index.d.ts.map +1 -0
  146. package/dist/server/storage/memory/storage.d.cts +47 -0
  147. package/dist/server/storage/memory/storage.d.ts +47 -0
  148. package/dist/server/storage/memory/storage.d.ts.map +1 -0
  149. package/dist/server/storage/memory/table.d.cts +17 -0
  150. package/dist/server/storage/memory/table.d.ts +17 -0
  151. package/dist/server/storage/memory/table.d.ts.map +1 -0
  152. package/dist/server/storage/memory/user.d.cts +21 -0
  153. package/dist/server/storage/memory/user.d.ts +21 -0
  154. package/dist/server/storage/memory/user.d.ts.map +1 -0
  155. package/dist/server/storage/sqlite/app.d.cts +31 -0
  156. package/dist/server/storage/sqlite/app.d.ts +31 -0
  157. package/dist/server/storage/sqlite/app.d.ts.map +1 -0
  158. package/dist/server/storage/sqlite/index.d.cts +5 -0
  159. package/dist/server/storage/sqlite/index.d.ts +5 -0
  160. package/dist/server/storage/sqlite/index.d.ts.map +1 -0
  161. package/dist/server/storage/sqlite/storage.d.cts +92 -0
  162. package/dist/server/storage/sqlite/storage.d.ts +92 -0
  163. package/dist/server/storage/sqlite/storage.d.ts.map +1 -0
  164. package/dist/server/storage/sqlite/table.d.cts +15 -0
  165. package/dist/server/storage/sqlite/table.d.ts +15 -0
  166. package/dist/server/storage/sqlite/table.d.ts.map +1 -0
  167. package/dist/server/storage/sqlite/user.d.cts +14 -0
  168. package/dist/server/storage/sqlite/user.d.ts +14 -0
  169. package/dist/server/storage/sqlite/user.d.ts.map +1 -0
  170. package/dist/server/storage/storage.d.cts +152 -0
  171. package/dist/server/storage/storage.d.ts +152 -0
  172. package/dist/server/storage/storage.d.ts.map +1 -0
  173. package/dist/server/storage/table.d.cts +45 -0
  174. package/dist/server/storage/table.d.ts +45 -0
  175. package/dist/server/storage/table.d.ts.map +1 -0
  176. package/dist/server/storage/user.d.cts +45 -0
  177. package/dist/server/storage/user.d.ts +45 -0
  178. package/dist/server/storage/user.d.ts.map +1 -0
  179. package/dist/server/sync.d.cts +67 -0
  180. package/dist/server/sync.d.ts +67 -0
  181. package/dist/server/sync.d.ts.map +1 -0
  182. package/dist/server/validate.d.cts +113 -0
  183. package/dist/server/validate.d.ts +113 -0
  184. package/dist/server/validate.d.ts.map +1 -0
  185. package/dist/shared/clock.d.cts +22 -0
  186. package/dist/shared/clock.d.ts +22 -0
  187. package/dist/shared/clock.d.ts.map +1 -0
  188. package/dist/shared/path.d.cts +12 -0
  189. package/dist/shared/path.d.ts +12 -0
  190. package/dist/shared/path.d.ts.map +1 -0
  191. package/dist/shared/types.d.cts +234 -0
  192. package/dist/shared/types.d.ts +234 -0
  193. package/dist/shared/types.d.ts.map +1 -0
  194. package/package.json +133 -0
@@ -0,0 +1,155 @@
1
+ import { EventRegistry } from './shared/event.cjs';
2
+ import type { Storage } from './storage.cjs';
3
+ /**
4
+ * Data reconciliation and persistence strategy for auth and session operations.
5
+ */
6
+ export declare enum DataMode {
7
+ /** Overwrite local data with remote server snapshot. */
8
+ Remote = 0,
9
+ /** Preserve local data and upload/reconcile with remote. */
10
+ Local = 1,
11
+ /** Merge local and remote changes using Last-Write-Wins. */
12
+ Merge = 2,
13
+ /** Wipe local data tables and reset sync sequence. */
14
+ Clear = 3
15
+ }
16
+ /**
17
+ * Authentication lifecycle states of the client.
18
+ */
19
+ export declare enum AuthStatus {
20
+ /** No active session. */
21
+ SignedOut = 0,
22
+ /** Authenticating or restoring remembered session. */
23
+ SigningIn = 1,
24
+ /** Authenticated and ready for synchronized operations. */
25
+ SignedIn = 2,
26
+ /** Authentication failed (e.g. invalid credentials or expired session). */
27
+ Error = 3
28
+ }
29
+ /**
30
+ * Options for registering a new user account.
31
+ */
32
+ export interface RegisterOptions {
33
+ /** Unique username (required). */
34
+ username: string;
35
+ /** Account password (required). */
36
+ password: string;
37
+ /** Persist session in IndexedDB for automatic login across sessions (default: false). */
38
+ remember?: boolean;
39
+ /** Local data handling mode (defaults to DataMode.Local when signed out, or DataMode.Clear when already signed in). */
40
+ dataMode?: DataMode;
41
+ }
42
+ /**
43
+ * Options for logging into an existing user account.
44
+ */
45
+ export interface LoginOptions {
46
+ /** Unique username (optional if already remembered). */
47
+ username?: string;
48
+ /** Account password (optional if already remembered). */
49
+ password?: string;
50
+ /** Persist session for automatic login across sessions (default: false). */
51
+ remember?: boolean;
52
+ /** Data reconciliation mode (default: DataMode.Remote). */
53
+ dataMode?: DataMode;
54
+ }
55
+ /**
56
+ * Options for logging out of the current user session.
57
+ */
58
+ export interface LogoutOptions {
59
+ /** Data preservation mode (default: DataMode.Clear to wipe local data). */
60
+ dataMode?: DataMode;
61
+ }
62
+ /**
63
+ * Result returned upon successful user registration or login.
64
+ */
65
+ export interface AuthResult {
66
+ /** Unique user identifier (UUID). */
67
+ userId: string;
68
+ /** User's unique username. */
69
+ username: string;
70
+ /** Signed session authentication token for sync and API calls. */
71
+ token: string;
72
+ }
73
+ /**
74
+ * Internal persisted session representation in IndexedDB metadata.
75
+ */
76
+ export interface StoredAuthSession {
77
+ token: string;
78
+ userId: string;
79
+ username: string;
80
+ }
81
+ /**
82
+ * Internal dependencies provided to Auth by TetherClient.
83
+ */
84
+ export interface AuthDependencies {
85
+ baseUrl: string;
86
+ storage: Storage;
87
+ fetchFn?: typeof fetch;
88
+ }
89
+ /**
90
+ * Authentication coordinator managing user sessions, HTTP requests,
91
+ * metadata persistence, and reconciliation state transitions.
92
+ */
93
+ export declare class Auth {
94
+ /** Base URL for remote authentication REST API endpoints. */
95
+ readonly baseUrl: string;
96
+ /** Reactive event registry triggered whenever the authentication status changes. */
97
+ readonly onStatusChange: EventRegistry<AuthStatus>;
98
+ private storage;
99
+ private fetchFn;
100
+ private currentAuthStatus;
101
+ private currentUsername?;
102
+ private currentUserId?;
103
+ private currentToken?;
104
+ private autoRestorePromise;
105
+ constructor(dependencies: AuthDependencies);
106
+ /**
107
+ * Current authentication lifecycle status.
108
+ */
109
+ get status(): AuthStatus;
110
+ /**
111
+ * The authenticated user's username, or `undefined` if signed out.
112
+ */
113
+ get username(): string | undefined;
114
+ /**
115
+ * The authenticated user's ID, or `undefined` if signed out.
116
+ */
117
+ get userId(): string | undefined;
118
+ /**
119
+ * The active authentication session token, or `undefined` if signed out.
120
+ */
121
+ get token(): string | undefined;
122
+ /**
123
+ * Restores any remembered session from IndexedDB metadata on startup.
124
+ */
125
+ restoreSession(): Promise<void>;
126
+ /**
127
+ * Registers a new user account, applies local data mode, and notifies listeners.
128
+ */
129
+ register(options: RegisterOptions): Promise<boolean>;
130
+ /**
131
+ * Logs into an account (or reconnects with remembered credentials), applies data mode, and notifies listeners.
132
+ */
133
+ login(options?: LoginOptions): Promise<boolean>;
134
+ /**
135
+ * Logs out of the current session, removes stored credentials, and applies data mode.
136
+ */
137
+ logout(options?: LogoutOptions): Promise<boolean>;
138
+ /**
139
+ * Updates the in-memory and persisted session token when refreshed by the server.
140
+ *
141
+ * @param token - The new refreshed session token.
142
+ */
143
+ handleTokenRefresh(token: string): Promise<void>;
144
+ /**
145
+ * Cleans up local session and transitions to SignedOut when authentication fails or expires.
146
+ *
147
+ * @param _message - Optional error message from the server.
148
+ */
149
+ handleAuthError(_message?: string): Promise<void>;
150
+ private sendAuthRequest;
151
+ private applyDataMode;
152
+ private updateStoredAuth;
153
+ private setStatus;
154
+ }
155
+ //# sourceMappingURL=auth.d.ts.map
@@ -0,0 +1,155 @@
1
+ import { EventRegistry } from './shared/event.js';
2
+ import type { Storage } from './storage.js';
3
+ /**
4
+ * Data reconciliation and persistence strategy for auth and session operations.
5
+ */
6
+ export declare enum DataMode {
7
+ /** Overwrite local data with remote server snapshot. */
8
+ Remote = 0,
9
+ /** Preserve local data and upload/reconcile with remote. */
10
+ Local = 1,
11
+ /** Merge local and remote changes using Last-Write-Wins. */
12
+ Merge = 2,
13
+ /** Wipe local data tables and reset sync sequence. */
14
+ Clear = 3
15
+ }
16
+ /**
17
+ * Authentication lifecycle states of the client.
18
+ */
19
+ export declare enum AuthStatus {
20
+ /** No active session. */
21
+ SignedOut = 0,
22
+ /** Authenticating or restoring remembered session. */
23
+ SigningIn = 1,
24
+ /** Authenticated and ready for synchronized operations. */
25
+ SignedIn = 2,
26
+ /** Authentication failed (e.g. invalid credentials or expired session). */
27
+ Error = 3
28
+ }
29
+ /**
30
+ * Options for registering a new user account.
31
+ */
32
+ export interface RegisterOptions {
33
+ /** Unique username (required). */
34
+ username: string;
35
+ /** Account password (required). */
36
+ password: string;
37
+ /** Persist session in IndexedDB for automatic login across sessions (default: false). */
38
+ remember?: boolean;
39
+ /** Local data handling mode (defaults to DataMode.Local when signed out, or DataMode.Clear when already signed in). */
40
+ dataMode?: DataMode;
41
+ }
42
+ /**
43
+ * Options for logging into an existing user account.
44
+ */
45
+ export interface LoginOptions {
46
+ /** Unique username (optional if already remembered). */
47
+ username?: string;
48
+ /** Account password (optional if already remembered). */
49
+ password?: string;
50
+ /** Persist session for automatic login across sessions (default: false). */
51
+ remember?: boolean;
52
+ /** Data reconciliation mode (default: DataMode.Remote). */
53
+ dataMode?: DataMode;
54
+ }
55
+ /**
56
+ * Options for logging out of the current user session.
57
+ */
58
+ export interface LogoutOptions {
59
+ /** Data preservation mode (default: DataMode.Clear to wipe local data). */
60
+ dataMode?: DataMode;
61
+ }
62
+ /**
63
+ * Result returned upon successful user registration or login.
64
+ */
65
+ export interface AuthResult {
66
+ /** Unique user identifier (UUID). */
67
+ userId: string;
68
+ /** User's unique username. */
69
+ username: string;
70
+ /** Signed session authentication token for sync and API calls. */
71
+ token: string;
72
+ }
73
+ /**
74
+ * Internal persisted session representation in IndexedDB metadata.
75
+ */
76
+ export interface StoredAuthSession {
77
+ token: string;
78
+ userId: string;
79
+ username: string;
80
+ }
81
+ /**
82
+ * Internal dependencies provided to Auth by TetherClient.
83
+ */
84
+ export interface AuthDependencies {
85
+ baseUrl: string;
86
+ storage: Storage;
87
+ fetchFn?: typeof fetch;
88
+ }
89
+ /**
90
+ * Authentication coordinator managing user sessions, HTTP requests,
91
+ * metadata persistence, and reconciliation state transitions.
92
+ */
93
+ export declare class Auth {
94
+ /** Base URL for remote authentication REST API endpoints. */
95
+ readonly baseUrl: string;
96
+ /** Reactive event registry triggered whenever the authentication status changes. */
97
+ readonly onStatusChange: EventRegistry<AuthStatus>;
98
+ private storage;
99
+ private fetchFn;
100
+ private currentAuthStatus;
101
+ private currentUsername?;
102
+ private currentUserId?;
103
+ private currentToken?;
104
+ private autoRestorePromise;
105
+ constructor(dependencies: AuthDependencies);
106
+ /**
107
+ * Current authentication lifecycle status.
108
+ */
109
+ get status(): AuthStatus;
110
+ /**
111
+ * The authenticated user's username, or `undefined` if signed out.
112
+ */
113
+ get username(): string | undefined;
114
+ /**
115
+ * The authenticated user's ID, or `undefined` if signed out.
116
+ */
117
+ get userId(): string | undefined;
118
+ /**
119
+ * The active authentication session token, or `undefined` if signed out.
120
+ */
121
+ get token(): string | undefined;
122
+ /**
123
+ * Restores any remembered session from IndexedDB metadata on startup.
124
+ */
125
+ restoreSession(): Promise<void>;
126
+ /**
127
+ * Registers a new user account, applies local data mode, and notifies listeners.
128
+ */
129
+ register(options: RegisterOptions): Promise<boolean>;
130
+ /**
131
+ * Logs into an account (or reconnects with remembered credentials), applies data mode, and notifies listeners.
132
+ */
133
+ login(options?: LoginOptions): Promise<boolean>;
134
+ /**
135
+ * Logs out of the current session, removes stored credentials, and applies data mode.
136
+ */
137
+ logout(options?: LogoutOptions): Promise<boolean>;
138
+ /**
139
+ * Updates the in-memory and persisted session token when refreshed by the server.
140
+ *
141
+ * @param token - The new refreshed session token.
142
+ */
143
+ handleTokenRefresh(token: string): Promise<void>;
144
+ /**
145
+ * Cleans up local session and transitions to SignedOut when authentication fails or expires.
146
+ *
147
+ * @param _message - Optional error message from the server.
148
+ */
149
+ handleAuthError(_message?: string): Promise<void>;
150
+ private sendAuthRequest;
151
+ private applyDataMode;
152
+ private updateStoredAuth;
153
+ private setStatus;
154
+ }
155
+ //# sourceMappingURL=auth.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/client/auth.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,122 @@
1
+ import { AuthStatus, type LoginOptions, type LogoutOptions, type RegisterOptions } from './auth.cjs';
2
+ import type { TetherClientError } from './errors.cjs';
3
+ import { EventRegistry } from './shared/event.cjs';
4
+ import { type SyncStatus, type WebSocketConstructor } from './sync.cjs';
5
+ import type { Table } from './table.cjs';
6
+ export { AuthStatus, DataMode, type LoginOptions, type LogoutOptions, type RegisterOptions, } from './auth.cjs';
7
+ export { TetherClientError, TetherClientErrorCode } from './errors.cjs';
8
+ /**
9
+ * Options for configuring a TetherClient database instance.
10
+ */
11
+ export interface TetherClientOptions {
12
+ /** Application namespace identifier (defaults to database name). */
13
+ appId?: string;
14
+ /**
15
+ * Unified connection URL for the remote server (e.g. `'http://localhost:8080'`, `'https://api.example.com/db'`,
16
+ * `'ws://localhost:8080/sync'`, or `'wss://api.example.com/db/sync'`). When provided, host, port, secure protocol,
17
+ * and base path are extracted automatically and can be overridden by explicit options below.
18
+ */
19
+ url?: string;
20
+ /** Remote server host or hostname (e.g. 'localhost' or 'api.example.com'). Defaults to current browser hostname. */
21
+ host?: string;
22
+ /** Remote server port number (e.g. 8080). Defaults to current browser port. */
23
+ port?: number;
24
+ /** Whether to use secure HTTPS and WSS protocols (defaults to `true` in secure browser contexts, `false` otherwise). */
25
+ secure?: boolean;
26
+ /** Base path for HTTP REST endpoints (defaults to ''). */
27
+ basePath?: string;
28
+ /** Path for WebSocket upgrade requests (defaults to `${basePath}/sync`). */
29
+ webSocketPath?: string;
30
+ /** Optional custom fetch implementation for authentication requests. */
31
+ fetch?: typeof fetch;
32
+ /** Custom WebSocket constructor for streaming requests. */
33
+ webSocketClass?: WebSocketConstructor;
34
+ /** Debounce delay in milliseconds before pushing queued local outbox changes (defaults to 10). */
35
+ pushDebounceMs?: number;
36
+ /** Initial reconnection backoff delay in milliseconds (defaults to 1000). */
37
+ reconnectIntervalMs?: number;
38
+ /** Maximum reconnection backoff delay in milliseconds (defaults to 30000). */
39
+ maxReconnectIntervalMs?: number;
40
+ /** Periodic keepalive ping interval in milliseconds (defaults to 30000). Set to 0 to disable. */
41
+ pingIntervalMs?: number;
42
+ }
43
+ /**
44
+ * Main client-side database entry point providing reactive IndexedDB tables,
45
+ * local-first storage, automatic auth lifecycle, and background synchronization.
46
+ */
47
+ export declare class TetherClient {
48
+ /** Reactive event registry triggered whenever the authentication status changes. */
49
+ readonly onAuthStatusChange: EventRegistry<AuthStatus>;
50
+ /** Reactive event registry triggered whenever the synchronization status changes. */
51
+ readonly onSyncStatusChange: EventRegistry<SyncStatus>;
52
+ /** Reactive event registry triggered whenever background sync or network errors occur. */
53
+ readonly onError: EventRegistry<TetherClientError>;
54
+ private readonly storage;
55
+ private readonly auth;
56
+ private readonly sync;
57
+ /**
58
+ * Initializes a new TetherClient instance and wires reactive auth & sync coordination.
59
+ *
60
+ * @param name - Name of the local IndexedDB database.
61
+ * @param options - Configuration options for the server connection and sync behavior.
62
+ */
63
+ constructor(name: string, options?: TetherClientOptions);
64
+ /**
65
+ * Obtains a typed table reference for reading, mutating, and subscribing to records.
66
+ * Tables are created dynamically on-demand if not already declared.
67
+ *
68
+ * @typeParam T - Data payload model type for records in this table.
69
+ * @param name - The table name.
70
+ * @returns A typed `Table<T>` instance.
71
+ */
72
+ table<T = unknown>(name: string): Table<T>;
73
+ /**
74
+ * Clears all local application tables, outbox entries, and sync metadata.
75
+ */
76
+ clear(): Promise<void>;
77
+ /**
78
+ * Closes active synchronization connections and closes the IndexedDB database handle.
79
+ */
80
+ close(): Promise<void>;
81
+ /**
82
+ * Current authentication lifecycle status.
83
+ */
84
+ get authStatus(): AuthStatus;
85
+ /**
86
+ * The authenticated user's username, or `undefined` if signed out.
87
+ */
88
+ get username(): string | undefined;
89
+ /**
90
+ * Registers a new user account, applies local data mode, and connects synchronization.
91
+ *
92
+ * @param options - Registration credentials and data reconciliation settings.
93
+ * @returns `true` if registration succeeded; `false` otherwise.
94
+ */
95
+ register(options: RegisterOptions): Promise<boolean>;
96
+ /**
97
+ * Logs into an account (or reconnects using remembered credentials), applies data mode, and connects synchronization.
98
+ *
99
+ * @param options - Optional login credentials and data reconciliation mode.
100
+ * @returns `true` if authentication succeeded; `false` otherwise.
101
+ */
102
+ login(options?: LoginOptions): Promise<boolean>;
103
+ /**
104
+ * Logs out of the current session, disconnects sync, and optionally clears local tables.
105
+ *
106
+ * @param options - Options controlling whether local data should be wiped.
107
+ * @returns `true` on successful logout.
108
+ */
109
+ logout(options?: LogoutOptions): Promise<boolean>;
110
+ /**
111
+ * Retrieves the current synchronization status (e.g. Connected, Connecting, Disconnected, Error).
112
+ */
113
+ get syncStatus(): SyncStatus;
114
+ private createStorage;
115
+ private createAuth;
116
+ private createSync;
117
+ private parseUrl;
118
+ private resolveHostHeader;
119
+ private resolveBaseUrl;
120
+ private resolveWebSocketUrl;
121
+ }
122
+ //# sourceMappingURL=client.d.ts.map
@@ -0,0 +1,122 @@
1
+ import { AuthStatus, type LoginOptions, type LogoutOptions, type RegisterOptions } from './auth.js';
2
+ import type { TetherClientError } from './errors.js';
3
+ import { EventRegistry } from './shared/event.js';
4
+ import { type SyncStatus, type WebSocketConstructor } from './sync.js';
5
+ import type { Table } from './table.js';
6
+ export { AuthStatus, DataMode, type LoginOptions, type LogoutOptions, type RegisterOptions, } from './auth.js';
7
+ export { TetherClientError, TetherClientErrorCode } from './errors.js';
8
+ /**
9
+ * Options for configuring a TetherClient database instance.
10
+ */
11
+ export interface TetherClientOptions {
12
+ /** Application namespace identifier (defaults to database name). */
13
+ appId?: string;
14
+ /**
15
+ * Unified connection URL for the remote server (e.g. `'http://localhost:8080'`, `'https://api.example.com/db'`,
16
+ * `'ws://localhost:8080/sync'`, or `'wss://api.example.com/db/sync'`). When provided, host, port, secure protocol,
17
+ * and base path are extracted automatically and can be overridden by explicit options below.
18
+ */
19
+ url?: string;
20
+ /** Remote server host or hostname (e.g. 'localhost' or 'api.example.com'). Defaults to current browser hostname. */
21
+ host?: string;
22
+ /** Remote server port number (e.g. 8080). Defaults to current browser port. */
23
+ port?: number;
24
+ /** Whether to use secure HTTPS and WSS protocols (defaults to `true` in secure browser contexts, `false` otherwise). */
25
+ secure?: boolean;
26
+ /** Base path for HTTP REST endpoints (defaults to ''). */
27
+ basePath?: string;
28
+ /** Path for WebSocket upgrade requests (defaults to `${basePath}/sync`). */
29
+ webSocketPath?: string;
30
+ /** Optional custom fetch implementation for authentication requests. */
31
+ fetch?: typeof fetch;
32
+ /** Custom WebSocket constructor for streaming requests. */
33
+ webSocketClass?: WebSocketConstructor;
34
+ /** Debounce delay in milliseconds before pushing queued local outbox changes (defaults to 10). */
35
+ pushDebounceMs?: number;
36
+ /** Initial reconnection backoff delay in milliseconds (defaults to 1000). */
37
+ reconnectIntervalMs?: number;
38
+ /** Maximum reconnection backoff delay in milliseconds (defaults to 30000). */
39
+ maxReconnectIntervalMs?: number;
40
+ /** Periodic keepalive ping interval in milliseconds (defaults to 30000). Set to 0 to disable. */
41
+ pingIntervalMs?: number;
42
+ }
43
+ /**
44
+ * Main client-side database entry point providing reactive IndexedDB tables,
45
+ * local-first storage, automatic auth lifecycle, and background synchronization.
46
+ */
47
+ export declare class TetherClient {
48
+ /** Reactive event registry triggered whenever the authentication status changes. */
49
+ readonly onAuthStatusChange: EventRegistry<AuthStatus>;
50
+ /** Reactive event registry triggered whenever the synchronization status changes. */
51
+ readonly onSyncStatusChange: EventRegistry<SyncStatus>;
52
+ /** Reactive event registry triggered whenever background sync or network errors occur. */
53
+ readonly onError: EventRegistry<TetherClientError>;
54
+ private readonly storage;
55
+ private readonly auth;
56
+ private readonly sync;
57
+ /**
58
+ * Initializes a new TetherClient instance and wires reactive auth & sync coordination.
59
+ *
60
+ * @param name - Name of the local IndexedDB database.
61
+ * @param options - Configuration options for the server connection and sync behavior.
62
+ */
63
+ constructor(name: string, options?: TetherClientOptions);
64
+ /**
65
+ * Obtains a typed table reference for reading, mutating, and subscribing to records.
66
+ * Tables are created dynamically on-demand if not already declared.
67
+ *
68
+ * @typeParam T - Data payload model type for records in this table.
69
+ * @param name - The table name.
70
+ * @returns A typed `Table<T>` instance.
71
+ */
72
+ table<T = unknown>(name: string): Table<T>;
73
+ /**
74
+ * Clears all local application tables, outbox entries, and sync metadata.
75
+ */
76
+ clear(): Promise<void>;
77
+ /**
78
+ * Closes active synchronization connections and closes the IndexedDB database handle.
79
+ */
80
+ close(): Promise<void>;
81
+ /**
82
+ * Current authentication lifecycle status.
83
+ */
84
+ get authStatus(): AuthStatus;
85
+ /**
86
+ * The authenticated user's username, or `undefined` if signed out.
87
+ */
88
+ get username(): string | undefined;
89
+ /**
90
+ * Registers a new user account, applies local data mode, and connects synchronization.
91
+ *
92
+ * @param options - Registration credentials and data reconciliation settings.
93
+ * @returns `true` if registration succeeded; `false` otherwise.
94
+ */
95
+ register(options: RegisterOptions): Promise<boolean>;
96
+ /**
97
+ * Logs into an account (or reconnects using remembered credentials), applies data mode, and connects synchronization.
98
+ *
99
+ * @param options - Optional login credentials and data reconciliation mode.
100
+ * @returns `true` if authentication succeeded; `false` otherwise.
101
+ */
102
+ login(options?: LoginOptions): Promise<boolean>;
103
+ /**
104
+ * Logs out of the current session, disconnects sync, and optionally clears local tables.
105
+ *
106
+ * @param options - Options controlling whether local data should be wiped.
107
+ * @returns `true` on successful logout.
108
+ */
109
+ logout(options?: LogoutOptions): Promise<boolean>;
110
+ /**
111
+ * Retrieves the current synchronization status (e.g. Connected, Connecting, Disconnected, Error).
112
+ */
113
+ get syncStatus(): SyncStatus;
114
+ private createStorage;
115
+ private createAuth;
116
+ private createSync;
117
+ private parseUrl;
118
+ private resolveHostHeader;
119
+ private resolveBaseUrl;
120
+ private resolveWebSocketUrl;
121
+ }
122
+ //# sourceMappingURL=client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/client/client.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,UAAU,EACV,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,eAAe,EACrB,MAAM,WAAW,CAAC;AACnB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,OAAO,EAAQ,KAAK,UAAU,EAAE,KAAK,oBAAoB,EAAE,MAAM,WAAW,CAAC;AAC7E,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAExC,OAAO,EACL,UAAU,EACV,QAAQ,EACR,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,eAAe,GACrB,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAEvE;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,oEAAoE;IACpE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,oHAAoH;IACpH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,+EAA+E;IAC/E,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,wHAAwH;IACxH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,0DAA0D;IAC1D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,4EAA4E;IAC5E,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,wEAAwE;IACxE,KAAK,CAAC,EAAE,OAAO,KAAK,CAAC;IACrB,2DAA2D;IAC3D,cAAc,CAAC,EAAE,oBAAoB,CAAC;IACtC,kGAAkG;IAClG,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,6EAA6E;IAC7E,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,8EAA8E;IAC9E,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,iGAAiG;IACjG,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;;GAGG;AACH,qBAAa,YAAY;IACvB,oFAAoF;IACpF,QAAQ,CAAC,kBAAkB,4BAAmC;IAC9D,qFAAqF;IACrF,QAAQ,CAAC,kBAAkB,4BAAmC;IAC9D,0FAA0F;IAC1F,QAAQ,CAAC,OAAO,mCAA0C;IAC1D,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAU;IAClC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAO;IAC5B,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAO;IAE5B;;;;;OAKG;IACH,YAAY,IAAI,EAAE,MAAM,EAAE,OAAO,GAAE,mBAAwB,EA2B1D;IAID;;;;;;;OAOG;IACH,KAAK,CAAC,CAAC,GAAG,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,KAAK,CAAC,CAAC,CAAC,CAEzC;IAED;;OAEG;IACG,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAE3B;IAED;;OAEG;IACG,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAG3B;IAID;;OAEG;IACH,IAAI,UAAU,IAAI,UAAU,CAE3B;IAED;;OAEG;IACH,IAAI,QAAQ,IAAI,MAAM,GAAG,SAAS,CAEjC;IAED;;;;;OAKG;IACG,QAAQ,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,OAAO,CAAC,CAEzD;IAED;;;;;OAKG;IACG,KAAK,CAAC,OAAO,GAAE,YAAiB,GAAG,OAAO,CAAC,OAAO,CAAC,CAExD;IAED;;;;;OAKG;IACG,MAAM,CAAC,OAAO,GAAE,aAAkB,GAAG,OAAO,CAAC,OAAO,CAAC,CAE1D;IAID;;OAEG;IACH,IAAI,UAAU,IAAI,UAAU,CAE3B;IAID,OAAO,CAAC,aAAa;IAIrB,OAAO,CAAC,UAAU;IAQlB,OAAO,CAAC,UAAU;IAuBlB,OAAO,CAAC,QAAQ;IAoDhB,OAAO,CAAC,iBAAiB;IAgCzB,OAAO,CAAC,cAAc;IAWtB,OAAO,CAAC,mBAAmB;CAc5B"}
@@ -0,0 +1,39 @@
1
+ /**
2
+ * Error codes identifying broader client-side error categories.
3
+ */
4
+ export declare enum TetherClientErrorCode {
5
+ /** A required configuration option or parameter is missing. */
6
+ MissingConfiguration = 0,
7
+ /** An invalid parameter or argument was provided to a client method. */
8
+ InvalidInput = 1,
9
+ /** No suitable fetch implementation is available in the runtime environment. */
10
+ FetchUnavailable = 2,
11
+ /** Network or connection failure when communicating with the server. */
12
+ NetworkError = 3,
13
+ /** No valid credentials or session available for authentication. */
14
+ MissingCredentials = 4,
15
+ /** User registration failed. */
16
+ RegistrationFailed = 5,
17
+ /** User authentication / login failed. */
18
+ AuthenticationFailed = 6,
19
+ /** Local storage operation failed. */
20
+ StorageError = 7,
21
+ /** Real-time synchronization encountered an error. */
22
+ SyncError = 8
23
+ }
24
+ /**
25
+ * Dedicated error class for TetherDB client errors.
26
+ * Error messages are user-safe and contain no internal technical details.
27
+ */
28
+ export declare class TetherClientError extends Error {
29
+ /** Error category code identifying the broad error type. */
30
+ readonly code: TetherClientErrorCode;
31
+ /**
32
+ * Initializes a new `TetherClientError`.
33
+ *
34
+ * @param code - The error category code.
35
+ * @param message - User-safe error description message.
36
+ */
37
+ constructor(code: TetherClientErrorCode, message?: string);
38
+ }
39
+ //# sourceMappingURL=errors.d.ts.map
@@ -0,0 +1,39 @@
1
+ /**
2
+ * Error codes identifying broader client-side error categories.
3
+ */
4
+ export declare enum TetherClientErrorCode {
5
+ /** A required configuration option or parameter is missing. */
6
+ MissingConfiguration = 0,
7
+ /** An invalid parameter or argument was provided to a client method. */
8
+ InvalidInput = 1,
9
+ /** No suitable fetch implementation is available in the runtime environment. */
10
+ FetchUnavailable = 2,
11
+ /** Network or connection failure when communicating with the server. */
12
+ NetworkError = 3,
13
+ /** No valid credentials or session available for authentication. */
14
+ MissingCredentials = 4,
15
+ /** User registration failed. */
16
+ RegistrationFailed = 5,
17
+ /** User authentication / login failed. */
18
+ AuthenticationFailed = 6,
19
+ /** Local storage operation failed. */
20
+ StorageError = 7,
21
+ /** Real-time synchronization encountered an error. */
22
+ SyncError = 8
23
+ }
24
+ /**
25
+ * Dedicated error class for TetherDB client errors.
26
+ * Error messages are user-safe and contain no internal technical details.
27
+ */
28
+ export declare class TetherClientError extends Error {
29
+ /** Error category code identifying the broad error type. */
30
+ readonly code: TetherClientErrorCode;
31
+ /**
32
+ * Initializes a new `TetherClientError`.
33
+ *
34
+ * @param code - The error category code.
35
+ * @param message - User-safe error description message.
36
+ */
37
+ constructor(code: TetherClientErrorCode, message?: string);
38
+ }
39
+ //# sourceMappingURL=errors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/client/errors.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,oBAAY,qBAAqB;IAC/B,+DAA+D;IAC/D,oBAAoB,IAAA;IACpB,wEAAwE;IACxE,YAAY,IAAA;IACZ,gFAAgF;IAChF,gBAAgB,IAAA;IAChB,wEAAwE;IACxE,YAAY,IAAA;IACZ,oEAAoE;IACpE,kBAAkB,IAAA;IAClB,gCAAgC;IAChC,kBAAkB,IAAA;IAClB,0CAA0C;IAC1C,oBAAoB,IAAA;IACpB,sCAAsC;IACtC,YAAY,IAAA;IACZ,sDAAsD;IACtD,SAAS,IAAA;CACV;AAED;;;GAGG;AACH,qBAAa,iBAAkB,SAAQ,KAAK;IAC1C,4DAA4D;IAC5D,QAAQ,CAAC,IAAI,EAAE,qBAAqB,CAAC;IAErC;;;;;OAKG;IACH,YAAY,IAAI,EAAE,qBAAqB,EAAE,OAAO,CAAC,EAAE,MAAM,EAKxD;CACF"}