@boltstore/client 0.5.1 → 0.6.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.
- package/README.md +76 -74
- package/dist/client.d.ts +62 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +290 -0
- package/dist/client.js.map +1 -0
- package/dist/errors.d.ts +7 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +10 -0
- package/dist/errors.js.map +1 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -0
- package/dist/jwt.d.ts +5 -0
- package/dist/jwt.d.ts.map +1 -0
- package/dist/jwt.js +13 -0
- package/dist/jwt.js.map +1 -0
- package/dist/typed-collection.d.ts +34 -0
- package/dist/typed-collection.d.ts.map +1 -0
- package/dist/typed-collection.js +103 -0
- package/dist/typed-collection.js.map +1 -0
- package/dist/types.d.ts +62 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/package.json +14 -33
- package/src/adapters/node.ts +0 -61
- package/src/adapters/react-native.ts +0 -74
- package/src/adapters/web.ts +0 -103
- package/src/auth.ts +0 -225
- package/src/client.ts +0 -247
- package/src/collections.ts +0 -88
- package/src/index.ts +0 -102
- package/src/realtime.ts +0 -194
- package/src/records.ts +0 -285
- package/src/storage.ts +0 -243
- package/src/sync.ts +0 -546
- package/src/typegen/cli.ts +0 -162
package/README.md
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
# @boltstore/client
|
|
2
2
|
|
|
3
|
-
TypeScript SDK for Boltstore. Works in
|
|
4
|
-
|
|
5
|
-
**Zero external dependencies** (only `@boltstore/utils` for types).
|
|
3
|
+
JavaScript/TypeScript SDK for Boltstore. Works in the browser, Node.js, and React Native.
|
|
6
4
|
|
|
7
5
|
## Installation
|
|
8
6
|
|
|
@@ -10,106 +8,110 @@ TypeScript SDK for Boltstore. Works in Bun, Node 18+, browsers, and React Native
|
|
|
10
8
|
npm install @boltstore/client
|
|
11
9
|
```
|
|
12
10
|
|
|
13
|
-
## Quick
|
|
11
|
+
## Quick start
|
|
14
12
|
|
|
15
|
-
```
|
|
16
|
-
import {
|
|
13
|
+
```typescript
|
|
14
|
+
import { BoltStoreClient } from "@boltstore/client";
|
|
17
15
|
|
|
18
|
-
const client = new
|
|
19
|
-
url: "http://localhost:
|
|
16
|
+
const client = new BoltStoreClient({
|
|
17
|
+
url: "http://localhost:8080",
|
|
20
18
|
});
|
|
21
19
|
|
|
22
|
-
//
|
|
23
|
-
await
|
|
24
|
-
|
|
25
|
-
|
|
20
|
+
// Collections
|
|
21
|
+
const collections = await client.collections.list();
|
|
22
|
+
|
|
23
|
+
// Records
|
|
24
|
+
const records = await client.records.list("posts", {
|
|
25
|
+
filter: "status:eq:published",
|
|
26
|
+
sort: ["created_at:desc"],
|
|
27
|
+
pagination: { page: 1, perPage: 20 },
|
|
26
28
|
});
|
|
27
29
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
sort: "-created",
|
|
32
|
-
perPage: 50,
|
|
30
|
+
const record = await client.records.create("posts", {
|
|
31
|
+
title: "Hello World",
|
|
32
|
+
content: "My first post",
|
|
33
33
|
});
|
|
34
34
|
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
const updated = await client.records.update("posts", record.id, {
|
|
36
|
+
title: "Updated title",
|
|
37
|
+
});
|
|
37
38
|
|
|
38
|
-
|
|
39
|
+
await client.records.delete("posts", record.id);
|
|
39
40
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
| `collections.ts` | Read/write collection schemas |
|
|
46
|
-
| `realtime.ts` | WebSocket subscriptions, auto-reconnect |
|
|
47
|
-
| `sync.ts` | Offline-first sync engine with conflict resolution |
|
|
48
|
-
| `storage.ts` | File upload, download, presigned URLs |
|
|
49
|
-
| `adapters/` | Platform adapters: Node/Bun, Web, React Native |
|
|
50
|
-
| `typegen/` | CLI to generate TypeScript types from your schema |
|
|
41
|
+
// Auth (Phase 2)
|
|
42
|
+
const { token, user } = await client.auth.login({
|
|
43
|
+
email: "user@example.com",
|
|
44
|
+
password: "secret",
|
|
45
|
+
});
|
|
51
46
|
|
|
52
|
-
|
|
47
|
+
// Realtime (Phase 3)
|
|
48
|
+
const unsubscribe = client.realtime.subscribe("posts", (event) => {
|
|
49
|
+
console.log("Change:", event);
|
|
50
|
+
});
|
|
53
51
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
52
|
+
// Sync (Phase 4)
|
|
53
|
+
client.sync.start({ collections: ["posts"] });
|
|
54
|
+
```
|
|
57
55
|
|
|
58
|
-
|
|
59
|
-
import { createWebAdapter } from "@boltstore/client/adapters/web";
|
|
56
|
+
## API
|
|
60
57
|
|
|
61
|
-
|
|
62
|
-
import { createReactNativeAdapter } from "@boltstore/client/adapters/react-native";
|
|
58
|
+
### Client
|
|
63
59
|
|
|
64
|
-
|
|
65
|
-
|
|
60
|
+
```typescript
|
|
61
|
+
const client = new BoltStoreClient({ url: string, token?: string });
|
|
62
|
+
client.setToken(token: string);
|
|
63
|
+
client.onTokenExpired(callback: () => Promise<string>);
|
|
66
64
|
```
|
|
67
65
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
```ts
|
|
71
|
-
import { connectRealtime } from "@boltstore/client";
|
|
66
|
+
### Collections
|
|
72
67
|
|
|
73
|
-
|
|
68
|
+
```typescript
|
|
69
|
+
client.collections.list(): Promise<Collection[]>
|
|
70
|
+
client.collections.get(name: string): Promise<Collection>
|
|
71
|
+
```
|
|
74
72
|
|
|
75
|
-
|
|
76
|
-
console.log(`${event.type}:`, event.record);
|
|
77
|
-
});
|
|
73
|
+
### Records
|
|
78
74
|
|
|
79
|
-
|
|
75
|
+
```typescript
|
|
76
|
+
client.records.list(collection: string, options?: QueryOptions): Promise<PaginatedResponse>
|
|
77
|
+
client.records.get(collection: string, id: string): Promise<Record>
|
|
78
|
+
client.records.create(collection: string, data: object): Promise<Record>
|
|
79
|
+
client.records.update(collection: string, id: string, data: object): Promise<Record>
|
|
80
|
+
client.records.delete(collection: string, id: string): Promise<void>
|
|
81
|
+
client.records.count(collection: string, filter?: string): Promise<number>
|
|
80
82
|
```
|
|
81
83
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
```
|
|
85
|
-
|
|
84
|
+
### Query Options
|
|
85
|
+
|
|
86
|
+
```typescript
|
|
87
|
+
interface QueryOptions {
|
|
88
|
+
filter?: string;
|
|
89
|
+
sort?: string[];
|
|
90
|
+
page?: number;
|
|
91
|
+
perPage?: number;
|
|
92
|
+
cursor?: string;
|
|
93
|
+
limit?: number;
|
|
94
|
+
fields?: string[];
|
|
95
|
+
expand?: string[];
|
|
96
|
+
search?: string;
|
|
97
|
+
}
|
|
98
|
+
```
|
|
86
99
|
|
|
87
|
-
|
|
88
|
-
collections: ["todos", "notes"],
|
|
89
|
-
onConflict: (local, server, strategy) => {
|
|
90
|
-
// Custom conflict resolution
|
|
91
|
-
return server; // server-wins default
|
|
92
|
-
},
|
|
93
|
-
});
|
|
100
|
+
## Development
|
|
94
101
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
field: "title",
|
|
101
|
-
newValue: "Updated offline",
|
|
102
|
-
});
|
|
102
|
+
```bash
|
|
103
|
+
bun install
|
|
104
|
+
bun run build # compile TypeScript
|
|
105
|
+
bun test # run tests
|
|
106
|
+
bun run dev # watch mode
|
|
103
107
|
```
|
|
104
108
|
|
|
105
|
-
##
|
|
106
|
-
|
|
107
|
-
Generate TypeScript types from your Boltstore schema:
|
|
109
|
+
## Publishing
|
|
108
110
|
|
|
109
111
|
```bash
|
|
110
|
-
|
|
112
|
+
npm publish
|
|
111
113
|
```
|
|
112
114
|
|
|
113
115
|
## License
|
|
114
116
|
|
|
115
|
-
MIT
|
|
117
|
+
MIT
|
package/dist/client.d.ts
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import type { ApiResponse, CollectionInfo, BoltstoreRecord, ListOptions, BatchOperation, BatchResult, QueryOptions } from "@boltstore/utils";
|
|
2
|
+
import { BoltstoreError } from "./errors";
|
|
3
|
+
import type { TypedCollection } from "./types";
|
|
4
|
+
import type { HttpMethod, TokenPair, UserProfile, OAuthProvider, ClientConfig, HealthCheck, PaginatedResult, TypedRecord, TypedBatchOperation, PaginateOptions } from "./types";
|
|
5
|
+
export { BoltstoreError };
|
|
6
|
+
export { TypedCollectionImpl } from "./typed-collection";
|
|
7
|
+
export type { TypedCollection } from "./typed-collection";
|
|
8
|
+
export type { TokenPair, UserProfile, OAuthProvider, ClientConfig, HealthCheck, PaginatedResult, PaginateOptions, TypedRecord, TypedBatchOperation, };
|
|
9
|
+
export declare class BoltstoreClient {
|
|
10
|
+
private baseUrl;
|
|
11
|
+
private database;
|
|
12
|
+
private token;
|
|
13
|
+
private refreshToken;
|
|
14
|
+
constructor(config: ClientConfig);
|
|
15
|
+
collection<Fields = Record<string, unknown>>(name: string): TypedCollection<Fields>;
|
|
16
|
+
setToken(token: string | undefined): void;
|
|
17
|
+
getToken(): string | undefined;
|
|
18
|
+
setRefreshToken(token: string | undefined): void;
|
|
19
|
+
getRefreshToken(): string | undefined;
|
|
20
|
+
auth: {
|
|
21
|
+
register: (email: string, password: string) => Promise<UserProfile>;
|
|
22
|
+
login: (email: string, password: string) => Promise<TokenPair>;
|
|
23
|
+
refresh: (refreshToken?: string) => Promise<TokenPair>;
|
|
24
|
+
autoRefresh: (thresholdSeconds?: number) => Promise<TokenPair | null>;
|
|
25
|
+
logout: () => Promise<void>;
|
|
26
|
+
me: () => Promise<UserProfile>;
|
|
27
|
+
updateProfile: (data: {
|
|
28
|
+
email?: string;
|
|
29
|
+
password?: string;
|
|
30
|
+
}) => Promise<UserProfile>;
|
|
31
|
+
oauthUrl: (provider: OAuthProvider, redirectUri: string) => Promise<string>;
|
|
32
|
+
oauthExchange: (provider: OAuthProvider, code: string, redirectUri: string) => Promise<TokenPair>;
|
|
33
|
+
};
|
|
34
|
+
health: {
|
|
35
|
+
check: () => Promise<HealthCheck>;
|
|
36
|
+
};
|
|
37
|
+
collections: {
|
|
38
|
+
list: () => Promise<CollectionInfo[]>;
|
|
39
|
+
get: (name: string) => Promise<CollectionInfo>;
|
|
40
|
+
};
|
|
41
|
+
records: {
|
|
42
|
+
create: (collection: string, data: Record<string, unknown>) => Promise<BoltstoreRecord>;
|
|
43
|
+
list: (collection: string, options?: ListOptions) => Promise<BoltstoreRecord[]>;
|
|
44
|
+
get: (collection: string, id: string) => Promise<BoltstoreRecord>;
|
|
45
|
+
update: (collection: string, id: string, data: Record<string, unknown>) => Promise<BoltstoreRecord>;
|
|
46
|
+
delete: (collection: string, id: string) => Promise<void>;
|
|
47
|
+
count: (collection: string, filter?: Record<string, unknown>) => Promise<number>;
|
|
48
|
+
distinct: (collection: string, field: string) => Promise<unknown[]>;
|
|
49
|
+
batch: (collection: string, operations: BatchOperation[]) => Promise<BatchResult>;
|
|
50
|
+
paginate: (collection: string, options: PaginateOptions) => Promise<PaginatedResult<BoltstoreRecord>>;
|
|
51
|
+
listAll: (collection: string, options?: Omit<PaginateOptions, "page">) => Promise<BoltstoreRecord[]>;
|
|
52
|
+
};
|
|
53
|
+
query(options: QueryOptions): Promise<{
|
|
54
|
+
data: BoltstoreRecord[];
|
|
55
|
+
meta: Record<string, unknown>;
|
|
56
|
+
}>;
|
|
57
|
+
request<T = unknown>(method: HttpMethod, path: string, body?: unknown, retries?: number): Promise<ApiResponse<T>>;
|
|
58
|
+
dbPath(path: string): string;
|
|
59
|
+
buildListPath(collection: string, options?: ListOptions): string;
|
|
60
|
+
}
|
|
61
|
+
export default BoltstoreClient;
|
|
62
|
+
//# sourceMappingURL=client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mapp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AAe,CAAC,CAAC;8BA+B7E,MAAM,YAAY,IAAI,CAAC,eAAe,EAAE,MAAM,CAAC,KAAG,OAAO,CAAC,eAAe,EAAE,CAAC;MAgBxG;IAEI,KAAK,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC;QAAE,IAAI,EAAE,eAAe,EAAE,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;KAAE,CAAC;IAKjG,OAAO,CAAC,CAAC,GAAG,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,EAAE,OAAO,SAAI,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;IAkDlH,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAK5B,aAAa,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,MAAM;CAoBjE;AAED,eAAe,eAAe,CAAC"}
|
package/dist/client.js
ADDED
|
@@ -0,0 +1,290 @@
|
|
|
1
|
+
import { BoltstoreError } from "./errors";
|
|
2
|
+
import { decodeJwtPayload } from "./jwt";
|
|
3
|
+
import { TypedCollectionImpl } from "./typed-collection";
|
|
4
|
+
export { BoltstoreError };
|
|
5
|
+
export { TypedCollectionImpl } from "./typed-collection";
|
|
6
|
+
export class BoltstoreClient {
|
|
7
|
+
constructor(config) {
|
|
8
|
+
this.auth = {
|
|
9
|
+
register: async (email, password) => {
|
|
10
|
+
const res = await this.request("POST", this.dbPath("/auth/register"), { email, password });
|
|
11
|
+
return res.data;
|
|
12
|
+
},
|
|
13
|
+
login: async (email, password) => {
|
|
14
|
+
const res = await this.request("POST", this.dbPath("/auth/login"), { email, password });
|
|
15
|
+
this.token = res.data.accessToken;
|
|
16
|
+
this.refreshToken = res.data.refreshToken;
|
|
17
|
+
return res.data;
|
|
18
|
+
},
|
|
19
|
+
refresh: async (refreshToken) => {
|
|
20
|
+
const token = refreshToken || this.refreshToken;
|
|
21
|
+
if (!token)
|
|
22
|
+
throw new BoltstoreError(400, "MISSING_REFRESH_TOKEN", "No refresh token available.");
|
|
23
|
+
const res = await this.request("POST", this.dbPath("/auth/refresh"), { refreshToken: token });
|
|
24
|
+
this.token = res.data.accessToken;
|
|
25
|
+
this.refreshToken = res.data.refreshToken;
|
|
26
|
+
return res.data;
|
|
27
|
+
},
|
|
28
|
+
autoRefresh: async (thresholdSeconds = 60) => {
|
|
29
|
+
if (!this.token || !this.refreshToken)
|
|
30
|
+
return null;
|
|
31
|
+
const payload = decodeJwtPayload(this.token);
|
|
32
|
+
if (!payload || !payload.exp)
|
|
33
|
+
return null;
|
|
34
|
+
const nowSec = Math.floor(Date.now() / 1000);
|
|
35
|
+
if (payload.exp - nowSec > thresholdSeconds)
|
|
36
|
+
return null;
|
|
37
|
+
return this.auth.refresh();
|
|
38
|
+
},
|
|
39
|
+
logout: async () => {
|
|
40
|
+
await this.request("POST", this.dbPath("/auth/logout"));
|
|
41
|
+
this.token = undefined;
|
|
42
|
+
this.refreshToken = undefined;
|
|
43
|
+
},
|
|
44
|
+
me: async () => {
|
|
45
|
+
const res = await this.request("GET", this.dbPath("/auth/me"));
|
|
46
|
+
return res.data;
|
|
47
|
+
},
|
|
48
|
+
updateProfile: async (data) => {
|
|
49
|
+
const res = await this.request("PATCH", this.dbPath("/auth/me"), data);
|
|
50
|
+
return res.data;
|
|
51
|
+
},
|
|
52
|
+
oauthUrl: async (provider, redirectUri) => {
|
|
53
|
+
const res = await this.request("GET", this.dbPath(`/auth/oauth/${provider}/url?redirect_uri=${encodeURIComponent(redirectUri)}`));
|
|
54
|
+
return res.data.url;
|
|
55
|
+
},
|
|
56
|
+
oauthExchange: async (provider, code, redirectUri) => {
|
|
57
|
+
const res = await this.request("POST", this.dbPath(`/auth/oauth/${provider}`), {
|
|
58
|
+
code,
|
|
59
|
+
redirect_uri: redirectUri,
|
|
60
|
+
});
|
|
61
|
+
this.token = res.data.accessToken;
|
|
62
|
+
this.refreshToken = res.data.refreshToken;
|
|
63
|
+
return res.data;
|
|
64
|
+
},
|
|
65
|
+
};
|
|
66
|
+
this.health = {
|
|
67
|
+
check: async () => {
|
|
68
|
+
const res = await this.request("GET", "/api/health");
|
|
69
|
+
return res.data ?? { status: "unknown", version: "", uptime: 0, timestamp: "" };
|
|
70
|
+
},
|
|
71
|
+
};
|
|
72
|
+
this.collections = {
|
|
73
|
+
list: async () => {
|
|
74
|
+
const res = await this.request("GET", this.dbPath("/collections"));
|
|
75
|
+
return res.data ?? [];
|
|
76
|
+
},
|
|
77
|
+
get: async (name) => {
|
|
78
|
+
const res = await this.request("GET", this.dbPath(`/collections/${name}`));
|
|
79
|
+
return res.data;
|
|
80
|
+
},
|
|
81
|
+
};
|
|
82
|
+
this.records = {
|
|
83
|
+
create: async (collection, data) => {
|
|
84
|
+
const res = await this.request("POST", this.dbPath(`/collections/${collection}/records`), data);
|
|
85
|
+
return res.data;
|
|
86
|
+
},
|
|
87
|
+
list: async (collection, options) => {
|
|
88
|
+
const path = this.buildListPath(collection, options);
|
|
89
|
+
const res = await this.request("GET", path);
|
|
90
|
+
return res.data ?? [];
|
|
91
|
+
},
|
|
92
|
+
get: async (collection, id) => {
|
|
93
|
+
const res = await this.request("GET", this.dbPath(`/collections/${collection}/records/${id}`));
|
|
94
|
+
return res.data;
|
|
95
|
+
},
|
|
96
|
+
update: async (collection, id, data) => {
|
|
97
|
+
const res = await this.request("PATCH", this.dbPath(`/collections/${collection}/records/${id}`), data);
|
|
98
|
+
return res.data;
|
|
99
|
+
},
|
|
100
|
+
delete: async (collection, id) => {
|
|
101
|
+
await this.request("DELETE", this.dbPath(`/collections/${collection}/records/${id}`));
|
|
102
|
+
},
|
|
103
|
+
count: async (collection, filter) => {
|
|
104
|
+
const params = new URLSearchParams();
|
|
105
|
+
if (filter) {
|
|
106
|
+
for (const [k, v] of Object.entries(filter)) {
|
|
107
|
+
if (v === null || v === undefined)
|
|
108
|
+
continue;
|
|
109
|
+
if (typeof v === "object" && !Array.isArray(v)) {
|
|
110
|
+
throw new BoltstoreError(400, "INVALID_FILTER", `Filter value for "${k}" must be a scalar or array.`);
|
|
111
|
+
}
|
|
112
|
+
params.set(k, Array.isArray(v) ? v.join(",") : String(v));
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
const qs = params.toString();
|
|
116
|
+
const path = this.dbPath(`/collections/${collection}/records/count`) + (qs ? `?${qs}` : "");
|
|
117
|
+
const res = await this.request("GET", path);
|
|
118
|
+
return res.data?.count ?? 0;
|
|
119
|
+
},
|
|
120
|
+
distinct: async (collection, field) => {
|
|
121
|
+
const res = await this.request("GET", this.dbPath(`/collections/${collection}/records/distinct?field=${encodeURIComponent(field)}`));
|
|
122
|
+
return res.data?.values ?? [];
|
|
123
|
+
},
|
|
124
|
+
batch: async (collection, operations) => {
|
|
125
|
+
const res = await this.request("POST", this.dbPath(`/collections/${collection}/records/batch`), operations);
|
|
126
|
+
return res.data;
|
|
127
|
+
},
|
|
128
|
+
paginate: async (collection, options) => {
|
|
129
|
+
const perPage = options.perPage ?? 50;
|
|
130
|
+
const params = new URLSearchParams();
|
|
131
|
+
params.set("page", String(options.page));
|
|
132
|
+
params.set("per_page", String(perPage));
|
|
133
|
+
if (options.sort)
|
|
134
|
+
params.set("sort", options.sort);
|
|
135
|
+
if (options.direction)
|
|
136
|
+
params.set("direction", options.direction);
|
|
137
|
+
if (options.filter) {
|
|
138
|
+
for (const [k, v] of Object.entries(options.filter)) {
|
|
139
|
+
if (v === null || v === undefined)
|
|
140
|
+
continue;
|
|
141
|
+
if (typeof v === "object" && !Array.isArray(v)) {
|
|
142
|
+
throw new BoltstoreError(400, "INVALID_FILTER", `Filter value for "${k}" must be a scalar or array.`);
|
|
143
|
+
}
|
|
144
|
+
params.set(k, Array.isArray(v) ? v.join(",") : String(v));
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
const qs = params.toString();
|
|
148
|
+
const path = this.dbPath(`/collections/${collection}/records`) + (qs ? `?${qs}` : "");
|
|
149
|
+
const res = await this.request("GET", path);
|
|
150
|
+
const meta = res.meta ?? {};
|
|
151
|
+
return {
|
|
152
|
+
data: res.data ?? [],
|
|
153
|
+
meta: {
|
|
154
|
+
page: meta.page ?? options.page,
|
|
155
|
+
per_page: meta.per_page ?? perPage,
|
|
156
|
+
total: meta.total ?? (res.data?.length ?? 0),
|
|
157
|
+
total_pages: meta.total_pages ?? 1,
|
|
158
|
+
},
|
|
159
|
+
};
|
|
160
|
+
},
|
|
161
|
+
listAll: async (collection, options) => {
|
|
162
|
+
const perPage = options?.perPage ?? 100;
|
|
163
|
+
const maxPages = 1000;
|
|
164
|
+
const all = [];
|
|
165
|
+
let page = 1;
|
|
166
|
+
while (true) {
|
|
167
|
+
const result = await this.records.paginate(collection, { ...options, page, perPage });
|
|
168
|
+
all.push(...result.data);
|
|
169
|
+
if (page >= result.meta.total_pages)
|
|
170
|
+
break;
|
|
171
|
+
if (page >= maxPages)
|
|
172
|
+
throw new BoltstoreError(400, "TOO_MANY_PAGES", `listAll stopped after ${maxPages} pages.`);
|
|
173
|
+
page++;
|
|
174
|
+
}
|
|
175
|
+
return all;
|
|
176
|
+
},
|
|
177
|
+
};
|
|
178
|
+
this.baseUrl = config.baseUrl.replace(/\/$/, "");
|
|
179
|
+
this.database = config.database;
|
|
180
|
+
this.token = config.token;
|
|
181
|
+
this.refreshToken = config.refreshToken;
|
|
182
|
+
}
|
|
183
|
+
collection(name) {
|
|
184
|
+
return new TypedCollectionImpl(this, name, (path) => this.dbPath(path));
|
|
185
|
+
}
|
|
186
|
+
setToken(token) {
|
|
187
|
+
this.token = token;
|
|
188
|
+
}
|
|
189
|
+
getToken() {
|
|
190
|
+
return this.token;
|
|
191
|
+
}
|
|
192
|
+
setRefreshToken(token) {
|
|
193
|
+
this.refreshToken = token;
|
|
194
|
+
}
|
|
195
|
+
getRefreshToken() {
|
|
196
|
+
return this.refreshToken;
|
|
197
|
+
}
|
|
198
|
+
async query(options) {
|
|
199
|
+
const res = await this.request("POST", this.dbPath("/query"), options);
|
|
200
|
+
return { data: res.data ?? [], meta: res.meta ?? {} };
|
|
201
|
+
}
|
|
202
|
+
async request(method, path, body, retries = 1) {
|
|
203
|
+
if (this.refreshToken && this.token) {
|
|
204
|
+
try {
|
|
205
|
+
await this.auth.autoRefresh();
|
|
206
|
+
}
|
|
207
|
+
catch { /* ignore auto-refresh failures */ }
|
|
208
|
+
}
|
|
209
|
+
const headers = {
|
|
210
|
+
"Content-Type": "application/json",
|
|
211
|
+
"Accept": "application/json",
|
|
212
|
+
};
|
|
213
|
+
if (this.token)
|
|
214
|
+
headers["Authorization"] = `Bearer ${this.token}`;
|
|
215
|
+
const init = { method, headers };
|
|
216
|
+
if (body !== undefined)
|
|
217
|
+
init.body = JSON.stringify(body);
|
|
218
|
+
let lastError;
|
|
219
|
+
for (let attempt = 0; attempt <= retries; attempt++) {
|
|
220
|
+
try {
|
|
221
|
+
const response = await globalThis.fetch(`${this.baseUrl}${path}`, init);
|
|
222
|
+
let json;
|
|
223
|
+
const contentType = response.headers.get("Content-Type") || "";
|
|
224
|
+
if (!contentType.includes("application/json")) {
|
|
225
|
+
const text = await response.text();
|
|
226
|
+
throw new BoltstoreError(response.status, "INVALID_RESPONSE", `Expected JSON response, got ${contentType} (status ${response.status}): ${text.slice(0, 200)}`);
|
|
227
|
+
}
|
|
228
|
+
try {
|
|
229
|
+
json = (await response.json());
|
|
230
|
+
}
|
|
231
|
+
catch {
|
|
232
|
+
throw new BoltstoreError(response.status, "PARSE_ERROR", `Failed to parse response from Boltstore server (status ${response.status}).`);
|
|
233
|
+
}
|
|
234
|
+
if (json.error) {
|
|
235
|
+
throw new BoltstoreError(response.status, json.error.code, json.error.message, json.error.details);
|
|
236
|
+
}
|
|
237
|
+
return json;
|
|
238
|
+
}
|
|
239
|
+
catch (err) {
|
|
240
|
+
lastError = err instanceof Error ? err : new Error(String(err));
|
|
241
|
+
const isNetworkError = lastError.message.includes("fetch") || lastError.message.includes("network");
|
|
242
|
+
if (attempt < retries && isNetworkError) {
|
|
243
|
+
await new Promise((r) => setTimeout(r, 500 * (attempt + 1)));
|
|
244
|
+
continue;
|
|
245
|
+
}
|
|
246
|
+
break;
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
if (lastError instanceof BoltstoreError)
|
|
250
|
+
throw lastError;
|
|
251
|
+
throw new BoltstoreError(0, "NETWORK_ERROR", lastError?.message || "Network request failed");
|
|
252
|
+
}
|
|
253
|
+
dbPath(path) {
|
|
254
|
+
if (this.database)
|
|
255
|
+
return `/api/${this.database}${path}`;
|
|
256
|
+
return `/api${path}`;
|
|
257
|
+
}
|
|
258
|
+
buildListPath(collection, options) {
|
|
259
|
+
const params = new URLSearchParams();
|
|
260
|
+
if (options?.sort)
|
|
261
|
+
params.set("sort", options.sort);
|
|
262
|
+
if (options?.direction)
|
|
263
|
+
params.set("direction", options.direction);
|
|
264
|
+
if (options?.limit !== undefined)
|
|
265
|
+
params.set("limit", String(options.limit));
|
|
266
|
+
if (options?.offset !== undefined)
|
|
267
|
+
params.set("offset", String(options.offset));
|
|
268
|
+
if (options?.page !== undefined)
|
|
269
|
+
params.set("page", String(options.page));
|
|
270
|
+
if (options?.perPage !== undefined)
|
|
271
|
+
params.set("per_page", String(options.perPage));
|
|
272
|
+
if (options?.fields)
|
|
273
|
+
params.set("fields", options.fields.join(","));
|
|
274
|
+
if (options?.expand)
|
|
275
|
+
params.set("expand", options.expand.join(","));
|
|
276
|
+
if (options?.filter) {
|
|
277
|
+
for (const [k, v] of Object.entries(options.filter)) {
|
|
278
|
+
if (v === null || v === undefined)
|
|
279
|
+
continue;
|
|
280
|
+
if (typeof v === "object" && !Array.isArray(v))
|
|
281
|
+
continue;
|
|
282
|
+
params.set(k, Array.isArray(v) ? v.join(",") : String(v));
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
const qs = params.toString();
|
|
286
|
+
return this.dbPath(`/collections/${collection}/records`) + (qs ? `?${qs}` : "");
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
export default BoltstoreClient;
|
|
290
|
+
//# sourceMappingURL=client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,EAAE,mBAAmB,EAAsB,MAAM,oBAAoB,CAAC;AAe7E,OAAO,EAAE,cAAc,EAAE,CAAC;AAC1B,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAczD,MAAM,OAAO,eAAe;IAM1B,YAAY,MAAoB;QA2BhC,SAAI,GAAG;YACL,QAAQ,EAAE,KAAK,EAAE,KAAa,EAAE,QAAgB,EAAwB,EAAE;gBACxE,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,OAAO,CAAc,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAC;gBACxG,OAAO,GAAG,CAAC,IAAK,CAAC;YACnB,CAAC;YAED,KAAK,EAAE,KAAK,EAAE,KAAa,EAAE,QAAgB,EAAsB,EAAE;gBACnE,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,OAAO,CAAY,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAC;gBACnG,IAAI,CAAC,KAAK,GAAG,GAAG,CAAC,IAAK,CAAC,WAAW,CAAC;gBACnC,IAAI,CAAC,YAAY,GAAG,GAAG,CAAC,IAAK,CAAC,YAAY,CAAC;gBAC3C,OAAO,GAAG,CAAC,IAAK,CAAC;YACnB,CAAC;YAED,OAAO,EAAE,KAAK,EAAE,YAAqB,EAAsB,EAAE;gBAC3D,M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M,CAAC;IACb,OAAO,CAAC,EAAE,OAAO,CAAC;gBAEN,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO;CAO7E"}
|
package/dist/errors.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,cAAe,SAAQ,KAAK;IAKvC,YAAY,MAAc,EAAE,IAAY,EAAE,OAAe,EAAE,OAAiB;QAC1E,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,gBAAgB,CAAC;QAC7B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;CACF"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @boltstore/client — JavaScript/TypeScript SDK for Boltstore.
|
|
3
|
+
*
|
|
4
|
+
* Zero-dependency client for browser, Node.js, React Native, and Deno.
|
|
5
|
+
* Provides type-safe access to Boltstore's non-admin REST API.
|
|
6
|
+
*
|
|
7
|
+
* @module @boltstore/client
|
|
8
|
+
*/
|
|
9
|
+
export { BoltstoreClient, BoltstoreError, TypedCollectionImpl, type ClientConfig, type PaginatedResult, type TypedRecord, type TypedCollection, type PaginateOptions, type TokenPair, type UserProfile, type OAuthProvider, type HealthCheck, } from "./client";
|
|
10
|
+
export type { TypedBatchOperation } from "./types";
|
|
11
|
+
export type { ApiResponse, CollectionInfo, DatabaseInfo, BoltstoreRecord, ColumnDefinition, ColumnType, ListOptions, BatchOperation, BatchResult, QueryOptions, Filter, FilterCondition, FilterGroup, FilterOperator, SortSpec, PaginationMeta, } from "@boltstore/utils";
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EACL,eAAe,EACf,cAAc,EACd,mBAAmB,EACnB,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,KAAK,WAAW,EAChB,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,SAAS,EACd,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,KAAK,WAAW,GACjB,MAAM,UAAU,CAAC;AAElB,YAAY,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAEnD,YAAY,EACV,WAAW,EACX,cAAc,EACd,YAAY,EACZ,eAAe,EACf,gBAAgB,EAChB,UAAU,EACV,WAAW,EACX,cAAc,EACd,WAAW,EACX,YAAY,EACZ,MAAM,EACN,eAAe,EACf,WAAW,EACX,cAAc,EACd,QAAQ,EACR,cAAc,GACf,MAAM,kBAAkB,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @boltstore/client — JavaScript/TypeScript SDK for Boltstore.
|
|
3
|
+
*
|
|
4
|
+
* Zero-dependency client for browser, Node.js, React Native, and Deno.
|
|
5
|
+
* Provides type-safe access to Boltstore's non-admin REST API.
|
|
6
|
+
*
|
|
7
|
+
* @module @boltstore/client
|
|
8
|
+
*/
|
|
9
|
+
export { BoltstoreClient, BoltstoreError, TypedCollectionImpl, } from "./client";
|
|
10
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EACL,eAAe,EACf,cAAc,EACd,mBAAmB,GAUpB,MAAM,UAAU,CAAC"}
|
package/dist/jwt.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jwt.d.ts","sourceRoot":"","sources":["../src/jwt.ts"],"names":[],"mappings":"AAAA,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG;IAAE,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CAAE,GAAG,IAAI,CAS/F"}
|