@moogodev/client 0.1.0 → 0.1.2
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 +54 -0
- package/dist/client.d.ts +31 -5
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +136 -21
- package/dist/esm/client.d.ts +31 -5
- package/dist/esm/client.d.ts.map +1 -1
- package/dist/esm/client.js +136 -21
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/types.d.ts +53 -4
- package/dist/esm/types.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/types.d.ts +53 -4
- package/dist/types.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/client.ts +180 -25
- package/src/index.ts +9 -0
- package/src/types.ts +61 -4
package/README.md
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# @moogodev/client
|
|
2
|
+
|
|
3
|
+
Official JavaScript/TypeScript client for Moogo object storage.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @moogodev/client
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Quick Start
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { MoogoClient, createClientFromEnv } from '@moogodev/client';
|
|
15
|
+
|
|
16
|
+
// Reads from environment variables:
|
|
17
|
+
// MOOGO_API_URL, MOOGO_PROJECT_ID, MOOGO_BUCKET_ACCESS_KEY_ID, MOOGO_BUCKET_SECRET_KEY
|
|
18
|
+
const client = createClientFromEnv();
|
|
19
|
+
|
|
20
|
+
// Upload with custom Cache-Control
|
|
21
|
+
const response = await client.upload('avatars/user.png', fileBlob, {
|
|
22
|
+
contentType: 'image/png',
|
|
23
|
+
cacheControl: 'public, max-age=31536000, immutable',
|
|
24
|
+
onProgress: (loaded, total) => console.log(`${loaded}/${total}`),
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
console.log(response.object.public_url);
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Features
|
|
31
|
+
|
|
32
|
+
- **Full TypeScript support** — complete type definitions for all API responses
|
|
33
|
+
- **Cursor-based pagination** — stable `nextCursor` + `total` for listings
|
|
34
|
+
- **Range requests** — `206 Partial Content`, `416 Range Not Satisfiable`, `If-Range`
|
|
35
|
+
- **Custom Cache-Control** — send `Cache-Control` header on upload to override defaults
|
|
36
|
+
- **Presigned URLs** — GET (download) and PUT (browser direct upload)
|
|
37
|
+
- **Signed uploads** — returns upload URL + object metadata
|
|
38
|
+
- **Bucket operations** — list, create, update, delete, get info, toggle public
|
|
39
|
+
- **Credential management** — list, create, rotate, revoke storage credentials
|
|
40
|
+
- **Rate-limit handling** — `X-RateLimit-Reset` header parsing, `RateLimitedError` with `retryAfter`/`resetAt`
|
|
41
|
+
- **Typed errors** — all API error codes as distinct classes
|
|
42
|
+
- **Zero dependencies** — uses Web Crypto API (native in Node 18+, browsers, edge runtimes)
|
|
43
|
+
- **Works everywhere** — Node 18+, Deno, Bun, Cloudflare Workers, Vercel Edge, browsers (via bundler)
|
|
44
|
+
|
|
45
|
+
## Documentation
|
|
46
|
+
|
|
47
|
+
- [Full API Reference](https://moogo.dev/docs/javascript-client)
|
|
48
|
+
- [Object Storage API](https://moogo.dev/docs/object-storage)
|
|
49
|
+
- [Rate Limits](https://moogo.dev/docs/limits)
|
|
50
|
+
- [Error Codes](https://moogo.dev/docs/errors)
|
|
51
|
+
|
|
52
|
+
## License
|
|
53
|
+
|
|
54
|
+
MIT
|
package/dist/client.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Moogo JavaScript/TypeScript Client
|
|
3
3
|
* Official client for Moogo object storage API.
|
|
4
4
|
*/
|
|
5
|
-
import type { ClientConfig, Bucket, CreateBucketRequest, UpdateBucketRequest, BucketInfoResponse, ObjectResponse, UploadResponse, ListObjectsQuery, ListObjectsResponse, PresignedUrlRequest, PresignedUrlResponse, SignedUploadResponse, StorageCredential, CreateCredentialRequest, CreateCredentialResponse, RotateCredentialResponse } from './types.js';
|
|
5
|
+
import type { ClientConfig, Bucket, CreateBucketRequest, UpdateBucketRequest, BucketInfoResponse, ObjectResponse, UploadResponse, ListObjectsQuery, ListObjectsResponse, PresignedUrlRequest, PresignedUrlResponse, SignedUploadResponse, StorageCredential, CreateCredentialRequest, CreateCredentialResponse, RotateCredentialResponse, QueryRequest, QueryResponse, ExecRequest, ExecResponse, TransactionRequest, TransactionResponse } from './types.js';
|
|
6
6
|
/**
|
|
7
7
|
* Moogo client for object storage operations.
|
|
8
8
|
*
|
|
@@ -30,11 +30,16 @@ import type { ClientConfig, Bucket, CreateBucketRequest, UpdateBucketRequest, Bu
|
|
|
30
30
|
export declare class MoogoClient {
|
|
31
31
|
private readonly baseUrl;
|
|
32
32
|
private readonly projectId;
|
|
33
|
-
private readonly accessKeyId
|
|
34
|
-
private readonly secretKey
|
|
33
|
+
private readonly accessKeyId?;
|
|
34
|
+
private readonly secretKey?;
|
|
35
|
+
private readonly projectKey?;
|
|
35
36
|
private readonly fetchImpl;
|
|
36
37
|
private readonly timeout;
|
|
37
38
|
constructor(config: ClientConfig);
|
|
39
|
+
/** Check if configured for SQL operations (project key) */
|
|
40
|
+
private hasProjectKey;
|
|
41
|
+
/** Check if configured for storage operations (access key) */
|
|
42
|
+
private hasStorageCredentials;
|
|
38
43
|
/** Build the bucket catalog path */
|
|
39
44
|
private getCatalogPath;
|
|
40
45
|
/** Build the credentials path */
|
|
@@ -45,8 +50,10 @@ export declare class MoogoClient {
|
|
|
45
50
|
private hashString;
|
|
46
51
|
private getSigningKey;
|
|
47
52
|
private hmacSha256;
|
|
48
|
-
/** Execute a request with auth and error handling */
|
|
49
|
-
private
|
|
53
|
+
/** Execute a storage request with HMAC auth and error handling */
|
|
54
|
+
private requestStorage;
|
|
55
|
+
/** Execute a SQL request with Bearer token auth and error handling */
|
|
56
|
+
private requestSQL;
|
|
50
57
|
/** List all buckets in the project */
|
|
51
58
|
listBuckets(): Promise<Bucket[]>;
|
|
52
59
|
/** Get bucket info including usage stats */
|
|
@@ -149,6 +156,25 @@ export declare class MoogoClient {
|
|
|
149
156
|
getObjectETag(key: string, options?: {
|
|
150
157
|
bucket?: string;
|
|
151
158
|
}): Promise<string | null>;
|
|
159
|
+
/** Execute a SQL read query */
|
|
160
|
+
query(request: QueryRequest, options?: {
|
|
161
|
+
signal?: AbortSignal;
|
|
162
|
+
}): Promise<QueryResponse>;
|
|
163
|
+
/** Execute a SQL write statement */
|
|
164
|
+
exec(request: ExecRequest, options?: {
|
|
165
|
+
signal?: AbortSignal;
|
|
166
|
+
}): Promise<ExecResponse>;
|
|
167
|
+
/** Execute multiple SQL statements in a transaction */
|
|
168
|
+
transaction(request: TransactionRequest, options?: {
|
|
169
|
+
signal?: AbortSignal;
|
|
170
|
+
}): Promise<TransactionResponse>;
|
|
171
|
+
/** Run database maintenance (VACUUM, REINDEX, ANALYZE) */
|
|
172
|
+
maintenance(options?: {
|
|
173
|
+
signal?: AbortSignal;
|
|
174
|
+
}): Promise<{
|
|
175
|
+
success: true;
|
|
176
|
+
reclaimed_bytes: number;
|
|
177
|
+
}>;
|
|
152
178
|
}
|
|
153
179
|
/** Convenience function to create a client from environment variables */
|
|
154
180
|
export declare function createClientFromEnv(env?: Record<string, string | undefined>): MoogoClient;
|
package/dist/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EACV,YAAY,EACZ,MAAM,EACN,mBAAmB,EACnB,mBAAmB,EAEnB,kBAAkB,EAClB,cAAc,EACd,cAAc,EACd,gBAAgB,EAChB,mBAAmB,EACnB,mBAAmB,EACnB,oBAAoB,EACpB,oBAAoB,EACpB,iBAAiB,EAEjB,uBAAuB,EACvB,wBAAwB,EACxB,wBAAwB,
|
|
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,MAAM,GAAG,IAAI,CAAC;IAOvF,sBAAsB;IAChB,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAQvF,+BAA+B;IACzB,KAAK,CAAC,OAAO,EAAE,YAAY,EAAE,OAAO,GAAE;QAAE,MAAM,CAAC,EAAE,WAAW,CAAA;KAAO,GAAG,OAAO,CAAC,aAAa,CAAC;IAOlG,oCAAoC;IAC9B,IAAI,CAAC,OAAO,EAAE,WAAW,EAAE,OAAO,GAAE;QAAE,MAAM,CAAC,EAAE,WAAW,CAAA;KAAO,GAAG,OAAO,CAAC,YAAY,CAAC;IAO/F,uDAAuD;IACjD,WAAW,CAAC,OAAO,EAAE,kBAAkB,EAAE,OAAO,GAAE;QAAE,MAAM,CAAC,EAAE,WAAW,CAAA;KAAO,GAAG,OAAO,CAAC,mBAAmB,CAAC;IAOpH,0DAA0D;IACpD,WAAW,CAAC,OAAO,GAAE;QAAE,MAAM,CAAC,EAAE,WAAW,CAAA;KAAO,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,IAAI,CAAC;QAAC,eAAe,EAAE,MAAM,CAAA;KAAE,CAAC;CAO/G;AAED,yEAAyE;AACzE,wBAAgB,mBAAmB,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,GAAG,WAAW,CAgBzF"}
|
package/dist/client.js
CHANGED
|
@@ -38,6 +38,7 @@ class MoogoClient {
|
|
|
38
38
|
projectId;
|
|
39
39
|
accessKeyId;
|
|
40
40
|
secretKey;
|
|
41
|
+
projectKey;
|
|
41
42
|
fetchImpl;
|
|
42
43
|
timeout;
|
|
43
44
|
constructor(config) {
|
|
@@ -45,17 +46,31 @@ class MoogoClient {
|
|
|
45
46
|
throw new Error('baseUrl is required');
|
|
46
47
|
if (!config.projectId)
|
|
47
48
|
throw new Error('projectId is required');
|
|
48
|
-
if (!config.accessKeyId)
|
|
49
|
-
throw new Error('accessKeyId is required');
|
|
50
|
-
|
|
51
|
-
|
|
49
|
+
if (!config.accessKeyId && !config.projectKey) {
|
|
50
|
+
throw new Error('Either accessKeyId/secretKey (storage) or projectKey (SQL) is required');
|
|
51
|
+
}
|
|
52
|
+
if (config.accessKeyId && !config.secretKey) {
|
|
53
|
+
throw new Error('secretKey is required when accessKeyId is provided');
|
|
54
|
+
}
|
|
55
|
+
if (config.secretKey && !config.accessKeyId) {
|
|
56
|
+
throw new Error('accessKeyId is required when secretKey is provided');
|
|
57
|
+
}
|
|
52
58
|
this.baseUrl = config.baseUrl.replace(/\/+$/, '');
|
|
53
59
|
this.projectId = config.projectId;
|
|
54
60
|
this.accessKeyId = config.accessKeyId;
|
|
55
61
|
this.secretKey = config.secretKey;
|
|
62
|
+
this.projectKey = config.projectKey;
|
|
56
63
|
this.fetchImpl = config.fetch ?? fetch;
|
|
57
64
|
this.timeout = config.timeout ?? DEFAULT_TIMEOUT;
|
|
58
65
|
}
|
|
66
|
+
/** Check if configured for SQL operations (project key) */
|
|
67
|
+
hasProjectKey() {
|
|
68
|
+
return !!this.projectKey;
|
|
69
|
+
}
|
|
70
|
+
/** Check if configured for storage operations (access key) */
|
|
71
|
+
hasStorageCredentials() {
|
|
72
|
+
return !!this.accessKeyId && !!this.secretKey;
|
|
73
|
+
}
|
|
59
74
|
/** Build the bucket catalog path */
|
|
60
75
|
getCatalogPath() {
|
|
61
76
|
return `${this.baseUrl}/buckets/${this.projectId}`;
|
|
@@ -128,8 +143,11 @@ class MoogoClient {
|
|
|
128
143
|
.map(b => b.toString(16).padStart(2, '0'))
|
|
129
144
|
.join('');
|
|
130
145
|
}
|
|
131
|
-
/** Execute a request with auth and error handling */
|
|
132
|
-
async
|
|
146
|
+
/** Execute a storage request with HMAC auth and error handling */
|
|
147
|
+
async requestStorage(method, path, options = {}) {
|
|
148
|
+
if (!this.hasStorageCredentials()) {
|
|
149
|
+
throw new Error('Storage operations require accessKeyId and secretKey');
|
|
150
|
+
}
|
|
133
151
|
const url = new URL(path, this.baseUrl);
|
|
134
152
|
if (options.query) {
|
|
135
153
|
Object.entries(options.query).forEach(([k, v]) => {
|
|
@@ -185,34 +203,88 @@ class MoogoClient {
|
|
|
185
203
|
throw new errors_js_1.MoogoError('network_error', `Network error: ${error}`, 0);
|
|
186
204
|
}
|
|
187
205
|
}
|
|
206
|
+
/** Execute a SQL request with Bearer token auth and error handling */
|
|
207
|
+
async requestSQL(method, path, options = {}) {
|
|
208
|
+
if (!this.hasProjectKey()) {
|
|
209
|
+
throw new Error('SQL operations require projectKey');
|
|
210
|
+
}
|
|
211
|
+
const url = new URL(path, this.baseUrl);
|
|
212
|
+
if (options.query) {
|
|
213
|
+
Object.entries(options.query).forEach(([k, v]) => {
|
|
214
|
+
if (v !== undefined && v !== null)
|
|
215
|
+
url.searchParams.set(k, v);
|
|
216
|
+
});
|
|
217
|
+
}
|
|
218
|
+
const requestHeaders = {
|
|
219
|
+
'Authorization': `Bearer ${this.projectKey}`,
|
|
220
|
+
'Content-Type': 'application/json',
|
|
221
|
+
...options.headers,
|
|
222
|
+
};
|
|
223
|
+
const controller = new AbortController();
|
|
224
|
+
const timeoutId = setTimeout(() => controller.abort(), this.timeout);
|
|
225
|
+
const signal = options.signal
|
|
226
|
+
? AbortSignal.any([options.signal, controller.signal])
|
|
227
|
+
: controller.signal;
|
|
228
|
+
try {
|
|
229
|
+
const response = await this.fetchImpl(url.toString(), {
|
|
230
|
+
method,
|
|
231
|
+
headers: requestHeaders,
|
|
232
|
+
body: options.body,
|
|
233
|
+
signal,
|
|
234
|
+
});
|
|
235
|
+
clearTimeout(timeoutId);
|
|
236
|
+
const contentType = response.headers.get('Content-Type') || '';
|
|
237
|
+
const isJson = contentType.includes('application/json');
|
|
238
|
+
let data;
|
|
239
|
+
if (isJson) {
|
|
240
|
+
data = await response.json();
|
|
241
|
+
}
|
|
242
|
+
else {
|
|
243
|
+
data = await response.text();
|
|
244
|
+
}
|
|
245
|
+
if (!response.ok) {
|
|
246
|
+
throw (0, errors_js_1.createErrorFromResponse)(response, data);
|
|
247
|
+
}
|
|
248
|
+
return data;
|
|
249
|
+
}
|
|
250
|
+
catch (error) {
|
|
251
|
+
clearTimeout(timeoutId);
|
|
252
|
+
if (error instanceof errors_js_1.MoogoError)
|
|
253
|
+
throw error;
|
|
254
|
+
if (error instanceof DOMException && error.name === 'AbortError') {
|
|
255
|
+
throw new errors_js_1.MoogoError('timeout', 'Request timed out', 408);
|
|
256
|
+
}
|
|
257
|
+
throw new errors_js_1.MoogoError('network_error', `Network error: ${error}`, 0);
|
|
258
|
+
}
|
|
259
|
+
}
|
|
188
260
|
// ==================== Bucket Operations ====================
|
|
189
261
|
/** List all buckets in the project */
|
|
190
262
|
async listBuckets() {
|
|
191
|
-
const response = await this.
|
|
263
|
+
const response = await this.requestStorage('GET', this.getCatalogPath());
|
|
192
264
|
return response.buckets;
|
|
193
265
|
}
|
|
194
266
|
/** Get bucket info including usage stats */
|
|
195
267
|
async getBucketInfo(bucketId) {
|
|
196
|
-
const response = await this.
|
|
268
|
+
const response = await this.requestStorage('GET', `${this.getCatalogPath()}/${bucketId}`);
|
|
197
269
|
return response;
|
|
198
270
|
}
|
|
199
271
|
/** Create a new bucket */
|
|
200
272
|
async createBucket(request) {
|
|
201
|
-
const response = await this.
|
|
273
|
+
const response = await this.requestStorage('POST', this.getCatalogPath(), { body: JSON.stringify(request) });
|
|
202
274
|
return response.bucket;
|
|
203
275
|
}
|
|
204
276
|
/** Update bucket settings */
|
|
205
277
|
async updateBucket(bucketId, request) {
|
|
206
|
-
const response = await this.
|
|
278
|
+
const response = await this.requestStorage('PATCH', `${this.getCatalogPath()}/${bucketId}`, { body: JSON.stringify(request) });
|
|
207
279
|
return response.bucket;
|
|
208
280
|
}
|
|
209
281
|
/** Delete a bucket and all its objects */
|
|
210
282
|
async deleteBucket(bucketId) {
|
|
211
|
-
await this.
|
|
283
|
+
await this.requestStorage('DELETE', `${this.getCatalogPath()}/${bucketId}`);
|
|
212
284
|
}
|
|
213
285
|
/** Toggle bucket public/private (fans out to all objects) */
|
|
214
286
|
async setBucketPublic(bucketId, isPublic) {
|
|
215
|
-
const response = await this.
|
|
287
|
+
const response = await this.requestStorage('POST', `${this.getCatalogPath()}/${bucketId}/public`, { body: JSON.stringify({ is_public: isPublic }) });
|
|
216
288
|
return response.bucket;
|
|
217
289
|
}
|
|
218
290
|
// ==================== Object Operations ====================
|
|
@@ -229,6 +301,9 @@ class MoogoClient {
|
|
|
229
301
|
const query = {};
|
|
230
302
|
if (bucket !== 'default')
|
|
231
303
|
query.bucket = bucket;
|
|
304
|
+
if (!this.hasStorageCredentials()) {
|
|
305
|
+
throw new Error('Upload requires storage credentials (accessKeyId and secretKey)');
|
|
306
|
+
}
|
|
232
307
|
const requestHeaders = {};
|
|
233
308
|
if (contentType)
|
|
234
309
|
requestHeaders['Content-Type'] = contentType;
|
|
@@ -322,6 +397,9 @@ class MoogoClient {
|
|
|
322
397
|
const query = {};
|
|
323
398
|
if (bucket !== 'default')
|
|
324
399
|
query.bucket = bucket;
|
|
400
|
+
if (!this.hasStorageCredentials()) {
|
|
401
|
+
throw new Error('Download requires storage credentials (accessKeyId and secretKey)');
|
|
402
|
+
}
|
|
325
403
|
const requestHeaders = {
|
|
326
404
|
'X-Moogo-Access-Key-Id': this.accessKeyId,
|
|
327
405
|
};
|
|
@@ -381,6 +459,9 @@ class MoogoClient {
|
|
|
381
459
|
const query = {};
|
|
382
460
|
if (bucket !== 'default')
|
|
383
461
|
query.bucket = bucket;
|
|
462
|
+
if (!this.hasStorageCredentials()) {
|
|
463
|
+
throw new Error('HEAD requires storage credentials (accessKeyId and secretKey)');
|
|
464
|
+
}
|
|
384
465
|
const url = new URL(`${this.baseUrl}${path}`);
|
|
385
466
|
Object.entries(query).forEach(([k, v]) => url.searchParams.set(k, v));
|
|
386
467
|
const requestHeaders = {
|
|
@@ -424,7 +505,7 @@ class MoogoClient {
|
|
|
424
505
|
const query = {};
|
|
425
506
|
if (bucket !== 'default')
|
|
426
507
|
query.bucket = bucket;
|
|
427
|
-
await this.
|
|
508
|
+
await this.requestStorage('DELETE', path, { query, signal });
|
|
428
509
|
}
|
|
429
510
|
/** List objects in a bucket */
|
|
430
511
|
async listObjects(query = {}) {
|
|
@@ -443,7 +524,7 @@ class MoogoClient {
|
|
|
443
524
|
params.limit = String(query.limit);
|
|
444
525
|
if (query.cursor)
|
|
445
526
|
params.cursor = query.cursor;
|
|
446
|
-
return this.
|
|
527
|
+
return this.requestStorage('GET', `/p/${this.projectId}/bucket`, { query: params });
|
|
447
528
|
}
|
|
448
529
|
/** Get a presigned URL for an object */
|
|
449
530
|
async getPresignedUrl(key, request, options = {}) {
|
|
@@ -452,7 +533,7 @@ class MoogoClient {
|
|
|
452
533
|
const query = {};
|
|
453
534
|
if (bucket !== 'default')
|
|
454
535
|
query.bucket = bucket;
|
|
455
|
-
return this.
|
|
536
|
+
return this.requestStorage('POST', path, {
|
|
456
537
|
query,
|
|
457
538
|
body: JSON.stringify(request),
|
|
458
539
|
signal,
|
|
@@ -465,7 +546,7 @@ class MoogoClient {
|
|
|
465
546
|
const query = {};
|
|
466
547
|
if (bucket !== 'default')
|
|
467
548
|
query.bucket = bucket;
|
|
468
|
-
return this.
|
|
549
|
+
return this.requestStorage('POST', path, {
|
|
469
550
|
query,
|
|
470
551
|
body: JSON.stringify(request),
|
|
471
552
|
signal,
|
|
@@ -478,26 +559,26 @@ class MoogoClient {
|
|
|
478
559
|
const query = {};
|
|
479
560
|
if (bucket !== 'default')
|
|
480
561
|
query.bucket = bucket;
|
|
481
|
-
const response = await this.
|
|
562
|
+
const response = await this.requestStorage('PATCH', path, { query, body: JSON.stringify(updates), signal });
|
|
482
563
|
return response.object;
|
|
483
564
|
}
|
|
484
565
|
// ==================== Credential Operations ====================
|
|
485
566
|
/** List storage credentials */
|
|
486
567
|
async listCredentials() {
|
|
487
|
-
const response = await this.
|
|
568
|
+
const response = await this.requestStorage('GET', this.getCredentialsPath());
|
|
488
569
|
return response.credentials;
|
|
489
570
|
}
|
|
490
571
|
/** Create a new storage credential */
|
|
491
572
|
async createCredential(request) {
|
|
492
|
-
return this.
|
|
573
|
+
return this.requestStorage('POST', this.getCredentialsPath(), { body: JSON.stringify(request) });
|
|
493
574
|
}
|
|
494
575
|
/** Rotate a credential (generates new secret) */
|
|
495
576
|
async rotateCredential(credentialId) {
|
|
496
|
-
return this.
|
|
577
|
+
return this.requestStorage('POST', `${this.getCredentialsPath()}/${credentialId}/rotate`);
|
|
497
578
|
}
|
|
498
579
|
/** Revoke a credential */
|
|
499
580
|
async revokeCredential(credentialId) {
|
|
500
|
-
await this.
|
|
581
|
+
await this.requestStorage('DELETE', `${this.getCredentialsPath()}/${credentialId}`);
|
|
501
582
|
}
|
|
502
583
|
// ==================== Utility Methods ====================
|
|
503
584
|
/** Get the public URL for an object (if published) */
|
|
@@ -532,11 +613,45 @@ class MoogoClient {
|
|
|
532
613
|
return null;
|
|
533
614
|
return result.headers.get('ETag');
|
|
534
615
|
}
|
|
616
|
+
// ==================== SQL Operations ====================
|
|
617
|
+
/** Execute a SQL read query */
|
|
618
|
+
async query(request, options = {}) {
|
|
619
|
+
return this.requestSQL('POST', `/p/${this.projectId}/query`, {
|
|
620
|
+
body: JSON.stringify(request),
|
|
621
|
+
signal: options.signal,
|
|
622
|
+
});
|
|
623
|
+
}
|
|
624
|
+
/** Execute a SQL write statement */
|
|
625
|
+
async exec(request, options = {}) {
|
|
626
|
+
return this.requestSQL('POST', `/p/${this.projectId}/exec`, {
|
|
627
|
+
body: JSON.stringify(request),
|
|
628
|
+
signal: options.signal,
|
|
629
|
+
});
|
|
630
|
+
}
|
|
631
|
+
/** Execute multiple SQL statements in a transaction */
|
|
632
|
+
async transaction(request, options = {}) {
|
|
633
|
+
return this.requestSQL('POST', `/p/${this.projectId}/transaction`, {
|
|
634
|
+
body: JSON.stringify(request),
|
|
635
|
+
signal: options.signal,
|
|
636
|
+
});
|
|
637
|
+
}
|
|
638
|
+
/** Run database maintenance (VACUUM, REINDEX, ANALYZE) */
|
|
639
|
+
async maintenance(options = {}) {
|
|
640
|
+
return this.requestSQL('POST', `/p/${this.projectId}/maintenance`, { signal: options.signal });
|
|
641
|
+
}
|
|
535
642
|
}
|
|
536
643
|
exports.MoogoClient = MoogoClient;
|
|
537
644
|
/** Convenience function to create a client from environment variables */
|
|
538
645
|
function createClientFromEnv(env) {
|
|
539
646
|
const getEnv = (key) => env?.[key] ?? process.env[key];
|
|
647
|
+
const projectKey = getEnv('MOOGO_PROJECT_KEY');
|
|
648
|
+
if (projectKey) {
|
|
649
|
+
return new MoogoClient({
|
|
650
|
+
baseUrl: getEnv('MOOGO_API_URL') || 'https://api.moogo.dev',
|
|
651
|
+
projectId: getEnv('MOOGO_PROJECT_ID'),
|
|
652
|
+
projectKey,
|
|
653
|
+
});
|
|
654
|
+
}
|
|
540
655
|
return new MoogoClient({
|
|
541
656
|
baseUrl: getEnv('MOOGO_API_URL') || 'https://api.moogo.dev',
|
|
542
657
|
projectId: getEnv('MOOGO_PROJECT_ID'),
|
package/dist/esm/client.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Moogo JavaScript/TypeScript Client
|
|
3
3
|
* Official client for Moogo object storage API.
|
|
4
4
|
*/
|
|
5
|
-
import type { ClientConfig, Bucket, CreateBucketRequest, UpdateBucketRequest, BucketInfoResponse, ObjectResponse, UploadResponse, ListObjectsQuery, ListObjectsResponse, PresignedUrlRequest, PresignedUrlResponse, SignedUploadResponse, StorageCredential, CreateCredentialRequest, CreateCredentialResponse, RotateCredentialResponse } from './types.js';
|
|
5
|
+
import type { ClientConfig, Bucket, CreateBucketRequest, UpdateBucketRequest, BucketInfoResponse, ObjectResponse, UploadResponse, ListObjectsQuery, ListObjectsResponse, PresignedUrlRequest, PresignedUrlResponse, SignedUploadResponse, StorageCredential, CreateCredentialRequest, CreateCredentialResponse, RotateCredentialResponse, QueryRequest, QueryResponse, ExecRequest, ExecResponse, TransactionRequest, TransactionResponse } from './types.js';
|
|
6
6
|
/**
|
|
7
7
|
* Moogo client for object storage operations.
|
|
8
8
|
*
|
|
@@ -30,11 +30,16 @@ import type { ClientConfig, Bucket, CreateBucketRequest, UpdateBucketRequest, Bu
|
|
|
30
30
|
export declare class MoogoClient {
|
|
31
31
|
private readonly baseUrl;
|
|
32
32
|
private readonly projectId;
|
|
33
|
-
private readonly accessKeyId
|
|
34
|
-
private readonly secretKey
|
|
33
|
+
private readonly accessKeyId?;
|
|
34
|
+
private readonly secretKey?;
|
|
35
|
+
private readonly projectKey?;
|
|
35
36
|
private readonly fetchImpl;
|
|
36
37
|
private readonly timeout;
|
|
37
38
|
constructor(config: ClientConfig);
|
|
39
|
+
/** Check if configured for SQL operations (project key) */
|
|
40
|
+
private hasProjectKey;
|
|
41
|
+
/** Check if configured for storage operations (access key) */
|
|
42
|
+
private hasStorageCredentials;
|
|
38
43
|
/** Build the bucket catalog path */
|
|
39
44
|
private getCatalogPath;
|
|
40
45
|
/** Build the credentials path */
|
|
@@ -45,8 +50,10 @@ export declare class MoogoClient {
|
|
|
45
50
|
private hashString;
|
|
46
51
|
private getSigningKey;
|
|
47
52
|
private hmacSha256;
|
|
48
|
-
/** Execute a request with auth and error handling */
|
|
49
|
-
private
|
|
53
|
+
/** Execute a storage request with HMAC auth and error handling */
|
|
54
|
+
private requestStorage;
|
|
55
|
+
/** Execute a SQL request with Bearer token auth and error handling */
|
|
56
|
+
private requestSQL;
|
|
50
57
|
/** List all buckets in the project */
|
|
51
58
|
listBuckets(): Promise<Bucket[]>;
|
|
52
59
|
/** Get bucket info including usage stats */
|
|
@@ -149,6 +156,25 @@ export declare class MoogoClient {
|
|
|
149
156
|
getObjectETag(key: string, options?: {
|
|
150
157
|
bucket?: string;
|
|
151
158
|
}): Promise<string | null>;
|
|
159
|
+
/** Execute a SQL read query */
|
|
160
|
+
query(request: QueryRequest, options?: {
|
|
161
|
+
signal?: AbortSignal;
|
|
162
|
+
}): Promise<QueryResponse>;
|
|
163
|
+
/** Execute a SQL write statement */
|
|
164
|
+
exec(request: ExecRequest, options?: {
|
|
165
|
+
signal?: AbortSignal;
|
|
166
|
+
}): Promise<ExecResponse>;
|
|
167
|
+
/** Execute multiple SQL statements in a transaction */
|
|
168
|
+
transaction(request: TransactionRequest, options?: {
|
|
169
|
+
signal?: AbortSignal;
|
|
170
|
+
}): Promise<TransactionResponse>;
|
|
171
|
+
/** Run database maintenance (VACUUM, REINDEX, ANALYZE) */
|
|
172
|
+
maintenance(options?: {
|
|
173
|
+
signal?: AbortSignal;
|
|
174
|
+
}): Promise<{
|
|
175
|
+
success: true;
|
|
176
|
+
reclaimed_bytes: number;
|
|
177
|
+
}>;
|
|
152
178
|
}
|
|
153
179
|
/** Convenience function to create a client from environment variables */
|
|
154
180
|
export declare function createClientFromEnv(env?: Record<string, string | undefined>): MoogoClient;
|
package/dist/esm/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/client.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EACV,YAAY,EACZ,MAAM,EACN,mBAAmB,EACnB,mBAAmB,EAEnB,kBAAkB,EAClB,cAAc,EACd,cAAc,EACd,gBAAgB,EAChB,mBAAmB,EACnB,mBAAmB,EACnB,oBAAoB,EACpB,oBAAoB,EACpB,iBAAiB,EAEjB,uBAAuB,EACvB,wBAAwB,EACxB,wBAAwB,
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/client.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EACV,YAAY,EACZ,MAAM,EACN,mBAAmB,EACnB,mBAAmB,EAEnB,kBAAkB,EAClB,cAAc,EACd,cAAc,EACd,gBAAgB,EAChB,mBAAmB,EACnB,mBAAmB,EACnB,oBAAoB,EACpB,oBAAoB,E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