@buildspacestudio/sdk 0.1.2 → 0.2.1
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 +4 -4
- package/dist/auth/client.d.ts +59 -10
- package/dist/auth/client.d.ts.map +1 -1
- package/dist/auth/client.js +39 -0
- package/dist/auth/client.js.map +1 -1
- package/dist/auth/index.d.ts +1 -0
- package/dist/auth/index.d.ts.map +1 -1
- package/dist/auth/index.js.map +1 -1
- package/dist/auth/server.d.ts +90 -1
- package/dist/auth/server.d.ts.map +1 -1
- package/dist/auth/server.js +98 -3
- package/dist/auth/server.js.map +1 -1
- package/dist/client/index.d.ts +63 -0
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +63 -0
- package/dist/client/index.js.map +1 -1
- package/dist/config.d.ts +10 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js.map +1 -1
- package/dist/errors.d.ts +18 -0
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +17 -0
- package/dist/errors.js.map +1 -1
- package/dist/events/client.d.ts +41 -0
- package/dist/events/client.d.ts.map +1 -1
- package/dist/events/client.js +41 -0
- package/dist/events/client.js.map +1 -1
- package/dist/events/server.d.ts +37 -0
- package/dist/events/server.d.ts.map +1 -1
- package/dist/events/server.js +32 -0
- package/dist/events/server.js.map +1 -1
- package/dist/http.d.ts +10 -0
- package/dist/http.d.ts.map +1 -1
- package/dist/http.js +12 -0
- package/dist/http.js.map +1 -1
- package/dist/index.d.ts +56 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +55 -0
- package/dist/index.js.map +1 -1
- package/dist/notifications/server.d.ts +52 -0
- package/dist/notifications/server.d.ts.map +1 -1
- package/dist/notifications/server.js +38 -0
- package/dist/notifications/server.js.map +1 -1
- package/dist/storage/client.d.ts +59 -0
- package/dist/storage/client.d.ts.map +1 -1
- package/dist/storage/client.js +55 -1
- package/dist/storage/client.js.map +1 -1
- package/dist/storage/server.d.ts +61 -0
- package/dist/storage/server.d.ts.map +1 -1
- package/dist/storage/server.js +50 -0
- package/dist/storage/server.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,25 +1,77 @@
|
|
|
1
1
|
import type { HttpTransport } from "../http";
|
|
2
|
+
/** Options for sending a custom email. */
|
|
2
3
|
export interface SendOptions {
|
|
4
|
+
/** HTML body of the email. */
|
|
3
5
|
html: string;
|
|
6
|
+
/** Arbitrary metadata to attach to the notification for tracking. */
|
|
4
7
|
metadata?: Record<string, unknown>;
|
|
8
|
+
/** Reply-to email address. */
|
|
5
9
|
replyTo?: string;
|
|
10
|
+
/** Email subject line. */
|
|
6
11
|
subject: string;
|
|
12
|
+
/** Plain-text fallback body. Recommended for email accessibility. */
|
|
7
13
|
text?: string;
|
|
14
|
+
/** Recipient email address, or an array of addresses for multiple recipients. */
|
|
8
15
|
to: string | string[];
|
|
9
16
|
}
|
|
17
|
+
/** Options for sending a template-based email. */
|
|
10
18
|
export interface SendTemplateOptions {
|
|
19
|
+
/** Arbitrary metadata to attach to the notification for tracking. */
|
|
11
20
|
metadata?: Record<string, unknown>;
|
|
21
|
+
/** Recipient email address, or an array of addresses. */
|
|
12
22
|
to: string | string[];
|
|
23
|
+
/** Template variable substitutions, e.g. `{ firstName: "Alex" }`. */
|
|
13
24
|
variables?: Record<string, string>;
|
|
14
25
|
}
|
|
26
|
+
/** Result of a successfully sent notification. */
|
|
15
27
|
export interface SendResult {
|
|
28
|
+
/** Buildspace notification ID. */
|
|
16
29
|
id: string;
|
|
30
|
+
/** Underlying email provider's message ID, if available. */
|
|
17
31
|
providerMessageId?: string;
|
|
18
32
|
}
|
|
33
|
+
/**
|
|
34
|
+
* Server-side notification methods for sending transactional emails.
|
|
35
|
+
*
|
|
36
|
+
* Access via `buildspace.notifications` on the server SDK.
|
|
37
|
+
* **Not available on the client SDK** — calling `buildspace.notifications`
|
|
38
|
+
* on the client throws a `BuildspaceError`.
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* ```ts
|
|
42
|
+
* // Send a custom email
|
|
43
|
+
* await buildspace.notifications.send({
|
|
44
|
+
* to: "user@example.com",
|
|
45
|
+
* subject: "Welcome!",
|
|
46
|
+
* html: "<h1>You're in!</h1>",
|
|
47
|
+
* });
|
|
48
|
+
*
|
|
49
|
+
* // Send from a saved template
|
|
50
|
+
* await buildspace.notifications.sendTemplate("welcome-email", {
|
|
51
|
+
* to: "user@example.com",
|
|
52
|
+
* variables: { firstName: "Alex" },
|
|
53
|
+
* });
|
|
54
|
+
* ```
|
|
55
|
+
*/
|
|
19
56
|
export declare class NotificationsServerNamespace {
|
|
20
57
|
private readonly transport;
|
|
21
58
|
constructor(transport: HttpTransport);
|
|
59
|
+
/**
|
|
60
|
+
* Send a custom email with inline HTML content.
|
|
61
|
+
*
|
|
62
|
+
* @param opts - Email content and recipient options.
|
|
63
|
+
* @returns The notification ID and optional provider message ID.
|
|
64
|
+
*/
|
|
22
65
|
send(opts: SendOptions): Promise<SendResult>;
|
|
66
|
+
/**
|
|
67
|
+
* Send an email using a pre-configured template.
|
|
68
|
+
*
|
|
69
|
+
* Templates are created in the Buildspace Creator Studio.
|
|
70
|
+
*
|
|
71
|
+
* @param templateSlug - The slug of the template to use, e.g. `"welcome-email"`.
|
|
72
|
+
* @param opts - Recipient and template variable options.
|
|
73
|
+
* @returns The notification ID and optional provider message ID.
|
|
74
|
+
*/
|
|
23
75
|
sendTemplate(templateSlug: string, opts: SendTemplateOptions): Promise<SendResult>;
|
|
24
76
|
}
|
|
25
77
|
//# sourceMappingURL=server.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/notifications/server.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7C,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAA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G,MAAM,EAAE,CAAC;CACvB;AAED,kDAAkD;AAClD,MAAM,WAAW,mBAAmB;IAClC,qEAAqE;IACrE,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnC,yDAAyD;IACzD,EAAE,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACtB,qEAAqE;IACrE,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACpC;AAED,kDAAkD;AAClD,MAAM,WAAW,UAAU;IACzB,kCAAkC;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,4DAA4D;IAC5D,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,qBAAa,4BAA4B;IACvC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAgB;gBAE9B,SAAS,EAAE,aAAa;IAIpC;;;;;OAKG;IACH,IAAI,CAAC,IAAI,EAAE,WAAW,GAAG,OAAO,CAAC,UAAU,CAAC;IAgB5C;;;;;;;;OAQG;IACH,YAAY,CAAC,YAAY,EAAE,MAAM,EAAE,IAAI,EAAE,mBAAmB,GAAG,OAAO,CAAC,UAAU,CAAC;CAanF"}
|
|
@@ -1,8 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Server-side notification methods for sending transactional emails.
|
|
3
|
+
*
|
|
4
|
+
* Access via `buildspace.notifications` on the server SDK.
|
|
5
|
+
* **Not available on the client SDK** — calling `buildspace.notifications`
|
|
6
|
+
* on the client throws a `BuildspaceError`.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```ts
|
|
10
|
+
* // Send a custom email
|
|
11
|
+
* await buildspace.notifications.send({
|
|
12
|
+
* to: "user@example.com",
|
|
13
|
+
* subject: "Welcome!",
|
|
14
|
+
* html: "<h1>You're in!</h1>",
|
|
15
|
+
* });
|
|
16
|
+
*
|
|
17
|
+
* // Send from a saved template
|
|
18
|
+
* await buildspace.notifications.sendTemplate("welcome-email", {
|
|
19
|
+
* to: "user@example.com",
|
|
20
|
+
* variables: { firstName: "Alex" },
|
|
21
|
+
* });
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
1
24
|
export class NotificationsServerNamespace {
|
|
2
25
|
transport;
|
|
3
26
|
constructor(transport) {
|
|
4
27
|
this.transport = transport;
|
|
5
28
|
}
|
|
29
|
+
/**
|
|
30
|
+
* Send a custom email with inline HTML content.
|
|
31
|
+
*
|
|
32
|
+
* @param opts - Email content and recipient options.
|
|
33
|
+
* @returns The notification ID and optional provider message ID.
|
|
34
|
+
*/
|
|
6
35
|
send(opts) {
|
|
7
36
|
return this.transport.request({
|
|
8
37
|
service: "notifications",
|
|
@@ -18,6 +47,15 @@ export class NotificationsServerNamespace {
|
|
|
18
47
|
},
|
|
19
48
|
});
|
|
20
49
|
}
|
|
50
|
+
/**
|
|
51
|
+
* Send an email using a pre-configured template.
|
|
52
|
+
*
|
|
53
|
+
* Templates are created in the Buildspace Creator Studio.
|
|
54
|
+
*
|
|
55
|
+
* @param templateSlug - The slug of the template to use, e.g. `"welcome-email"`.
|
|
56
|
+
* @param opts - Recipient and template variable options.
|
|
57
|
+
* @returns The notification ID and optional provider message ID.
|
|
58
|
+
*/
|
|
21
59
|
sendTemplate(templateSlug, opts) {
|
|
22
60
|
return this.transport.request({
|
|
23
61
|
service: "notifications",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.js","sourceRoot":"","sources":["../../src/notifications/server.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"server.js","sourceRoot":"","sources":["../../src/notifications/server.ts"],"names":[],"mappings":"AAoCA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,OAAO,4BAA4B;IACtB,SAAS,CAAgB;IAE1C,YAAY,SAAwB;QAClC,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC7B,CAAC;IAED;;;;;OAKG;IACH,IAAI,CAAC,IAAiB;QACpB,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,CAAa;YACxC,OAAO,EAAE,eAAe;YACxB,IAAI,EAAE,wBAAwB;YAC9B,MAAM,EAAE,MAAM;YACd,IAAI,EAAE;gBACJ,EAAE,EAAE,IAAI,CAAC,EAAE;gBACX,OAAO,EAAE,IAAI,CAAC,OAAO;gBACrB,IAAI,EAAE,IAAI,CAAC,IAAI;gBACf,IAAI,EAAE,IAAI,CAAC,IAAI;gBACf,QAAQ,EAAE,IAAI,CAAC,OAAO;gBACtB,QAAQ,EAAE,IAAI,CAAC,QAAQ;aACxB;SACF,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;OAQG;IACH,YAAY,CAAC,YAAoB,EAAE,IAAyB;QAC1D,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,CAAa;YACxC,OAAO,EAAE,eAAe;YACxB,IAAI,EAAE,iCAAiC;YACvC,MAAM,EAAE,MAAM;YACd,IAAI,EAAE;gBACJ,QAAQ,EAAE,YAAY;gBACtB,EAAE,EAAE,IAAI,CAAC,EAAE;gBACX,SAAS,EAAE,IAAI,CAAC,SAAS;gBACzB,QAAQ,EAAE,IAAI,CAAC,QAAQ;aACxB;SACF,CAAC,CAAC;IACL,CAAC;CACF"}
|
package/dist/storage/client.d.ts
CHANGED
|
@@ -1,32 +1,91 @@
|
|
|
1
1
|
import type { HttpTransport } from "../http";
|
|
2
2
|
import type { StorageObject } from "./server";
|
|
3
|
+
/** Options for uploading a file from the client. */
|
|
3
4
|
export interface UploadOptions {
|
|
5
|
+
/** MIME type override. If omitted, inferred from the `File` object or defaults to `"application/octet-stream"`. */
|
|
4
6
|
contentType?: string;
|
|
7
|
+
/** Storage path/key for the file, e.g. `"avatars/user-123.png"`. */
|
|
5
8
|
path: string;
|
|
6
9
|
}
|
|
10
|
+
/** Result of a successful client-side file upload. */
|
|
7
11
|
export interface UploadResponse {
|
|
12
|
+
/** The resolved storage key. */
|
|
8
13
|
key: string;
|
|
14
|
+
/** File size in bytes. */
|
|
9
15
|
size: number;
|
|
16
|
+
/** Signed download URL for the uploaded file. */
|
|
10
17
|
url: string;
|
|
11
18
|
}
|
|
19
|
+
/** Result of requesting a signed download URL. */
|
|
12
20
|
export interface GetUrlResponse {
|
|
21
|
+
/** URL lifetime in seconds, if applicable. */
|
|
13
22
|
expiresIn?: number;
|
|
23
|
+
/** The storage key of the object. */
|
|
14
24
|
key: string;
|
|
25
|
+
/** The signed download URL. */
|
|
15
26
|
url: string;
|
|
16
27
|
}
|
|
28
|
+
/**
|
|
29
|
+
* Client-side storage methods for uploading and managing files.
|
|
30
|
+
*
|
|
31
|
+
* Access via `buildspace.storage` on the client SDK.
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```ts
|
|
35
|
+
* // Upload a file (handles signed URL + PUT automatically)
|
|
36
|
+
* const { key, url } = await buildspace.storage.upload(file, {
|
|
37
|
+
* path: "avatars/user-123.png",
|
|
38
|
+
* });
|
|
39
|
+
*
|
|
40
|
+
* // Get a download URL for an existing file
|
|
41
|
+
* const { url } = await buildspace.storage.getUrl(key);
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
17
44
|
export declare class StorageClientNamespace {
|
|
18
45
|
private readonly transport;
|
|
19
46
|
constructor(transport: HttpTransport);
|
|
47
|
+
/**
|
|
48
|
+
* Upload a `File` or `Blob` to Buildspace storage.
|
|
49
|
+
*
|
|
50
|
+
* This method handles the full upload flow:
|
|
51
|
+
* 1. Requests a pre-signed upload URL from the API
|
|
52
|
+
* 2. Uploads the file directly to the storage provider
|
|
53
|
+
* 3. Returns a signed download URL for the uploaded file
|
|
54
|
+
*
|
|
55
|
+
* @param file - The file or blob to upload.
|
|
56
|
+
* @param opts - Upload options including the storage path.
|
|
57
|
+
* @returns The storage key, file size, and a signed download URL.
|
|
58
|
+
*
|
|
59
|
+
* @throws {BuildspaceError} If the upload URL request or the direct upload fails.
|
|
60
|
+
*/
|
|
20
61
|
upload(file: File | Blob, opts: UploadOptions): Promise<UploadResponse>;
|
|
62
|
+
/**
|
|
63
|
+
* Get a time-limited signed URL for downloading a stored file.
|
|
64
|
+
*
|
|
65
|
+
* @param key - The storage key of the object.
|
|
66
|
+
* @param opts - Optional settings.
|
|
67
|
+
* @param opts.expiresIn - URL lifetime in seconds.
|
|
68
|
+
*/
|
|
21
69
|
getUrl(key: string, opts?: {
|
|
22
70
|
expiresIn?: number;
|
|
23
71
|
}): Promise<GetUrlResponse>;
|
|
72
|
+
/**
|
|
73
|
+
* List stored objects, optionally filtered by key prefix.
|
|
74
|
+
*
|
|
75
|
+
* @param prefix - Only return objects whose key starts with this prefix.
|
|
76
|
+
* @param opts - Pagination options.
|
|
77
|
+
*/
|
|
24
78
|
list(prefix?: string, opts?: {
|
|
25
79
|
limit?: number;
|
|
26
80
|
offset?: number;
|
|
27
81
|
}): Promise<{
|
|
28
82
|
objects: StorageObject[];
|
|
29
83
|
}>;
|
|
84
|
+
/**
|
|
85
|
+
* Delete a stored object by key.
|
|
86
|
+
*
|
|
87
|
+
* @param key - The storage key of the object to delete.
|
|
88
|
+
*/
|
|
30
89
|
delete(key: string): Promise<void>;
|
|
31
90
|
}
|
|
32
91
|
//# sourceMappingURL=client.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/storage/client.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/storage/client.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE9C,oDAAoD;AACpD,MAAM,WAAW,aAAa;IAC5B,mHAAmH;IACnH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,oEAAoE;IACpE,IAAI,EAAE,MAAM,CAAC;CACd;AAED,sDAAsD;AACtD,MAAM,WAAW,cAAc;IAC7B,gCAAgC;IAChC,GAAG,EAAE,MAAM,CAAC;IACZ,0BAA0B;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,iDAAiD;IACjD,GAAG,EAAE,MAAM,CAAC;CACb;AAED,kDAAkD;AAClD,MAAM,WAAW,cAAc;IAC7B,8CAA8C;IAC9C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qCAAqC;IACrC,GAAG,EAAE,MAAM,CAAC;IACZ,+BAA+B;IAC/B,GAAG,EAAE,MAAM,CAAC;CACb;AAED;;;;;;;;;;;;;;;GAeG;AACH,qBAAa,sBAAsB;IACjC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAgB;gBAE9B,SAAS,EAAE,aAAa;IAIpC;;;;;;;;;;;;;OAaG;IACG,MAAM,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,EAAE,IAAI,EAAE,aAAa,GAAG,OAAO,CAAC,cAAc,CAAC;IAuC7E;;;;;;OAMG;IACH,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,cAAc,CAAC;IAW3E;;;;;OAKG;IACH,IAAI,CACF,MAAM,CAAC,EAAE,MAAM,EACf,IAAI,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,GACzC,OAAO,CAAC;QAAE,OAAO,EAAE,aAAa,EAAE,CAAA;KAAE,CAAC;IAYxC;;;;OAIG;IACG,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAQzC"}
|
package/dist/storage/client.js
CHANGED
|
@@ -1,8 +1,39 @@
|
|
|
1
|
+
import { BuildspaceError } from "../errors";
|
|
2
|
+
/**
|
|
3
|
+
* Client-side storage methods for uploading and managing files.
|
|
4
|
+
*
|
|
5
|
+
* Access via `buildspace.storage` on the client SDK.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```ts
|
|
9
|
+
* // Upload a file (handles signed URL + PUT automatically)
|
|
10
|
+
* const { key, url } = await buildspace.storage.upload(file, {
|
|
11
|
+
* path: "avatars/user-123.png",
|
|
12
|
+
* });
|
|
13
|
+
*
|
|
14
|
+
* // Get a download URL for an existing file
|
|
15
|
+
* const { url } = await buildspace.storage.getUrl(key);
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
1
18
|
export class StorageClientNamespace {
|
|
2
19
|
transport;
|
|
3
20
|
constructor(transport) {
|
|
4
21
|
this.transport = transport;
|
|
5
22
|
}
|
|
23
|
+
/**
|
|
24
|
+
* Upload a `File` or `Blob` to Buildspace storage.
|
|
25
|
+
*
|
|
26
|
+
* This method handles the full upload flow:
|
|
27
|
+
* 1. Requests a pre-signed upload URL from the API
|
|
28
|
+
* 2. Uploads the file directly to the storage provider
|
|
29
|
+
* 3. Returns a signed download URL for the uploaded file
|
|
30
|
+
*
|
|
31
|
+
* @param file - The file or blob to upload.
|
|
32
|
+
* @param opts - Upload options including the storage path.
|
|
33
|
+
* @returns The storage key, file size, and a signed download URL.
|
|
34
|
+
*
|
|
35
|
+
* @throws {BuildspaceError} If the upload URL request or the direct upload fails.
|
|
36
|
+
*/
|
|
6
37
|
async upload(file, opts) {
|
|
7
38
|
const contentType = opts.contentType ?? (file instanceof File ? file.type : "application/octet-stream");
|
|
8
39
|
const signed = await this.transport.request({
|
|
@@ -21,7 +52,12 @@ export class StorageClientNamespace {
|
|
|
21
52
|
body: file,
|
|
22
53
|
});
|
|
23
54
|
if (!response.ok) {
|
|
24
|
-
throw new
|
|
55
|
+
throw new BuildspaceError({
|
|
56
|
+
service: "storage",
|
|
57
|
+
status: response.status,
|
|
58
|
+
code: "storage/upload-failed",
|
|
59
|
+
message: `Direct upload failed: ${response.statusText}`,
|
|
60
|
+
});
|
|
25
61
|
}
|
|
26
62
|
const { url } = await this.getUrl(signed.key);
|
|
27
63
|
return {
|
|
@@ -30,6 +66,13 @@ export class StorageClientNamespace {
|
|
|
30
66
|
url,
|
|
31
67
|
};
|
|
32
68
|
}
|
|
69
|
+
/**
|
|
70
|
+
* Get a time-limited signed URL for downloading a stored file.
|
|
71
|
+
*
|
|
72
|
+
* @param key - The storage key of the object.
|
|
73
|
+
* @param opts - Optional settings.
|
|
74
|
+
* @param opts.expiresIn - URL lifetime in seconds.
|
|
75
|
+
*/
|
|
33
76
|
getUrl(key, opts) {
|
|
34
77
|
return this.transport.request({
|
|
35
78
|
service: "storage",
|
|
@@ -40,6 +83,12 @@ export class StorageClientNamespace {
|
|
|
40
83
|
},
|
|
41
84
|
});
|
|
42
85
|
}
|
|
86
|
+
/**
|
|
87
|
+
* List stored objects, optionally filtered by key prefix.
|
|
88
|
+
*
|
|
89
|
+
* @param prefix - Only return objects whose key starts with this prefix.
|
|
90
|
+
* @param opts - Pagination options.
|
|
91
|
+
*/
|
|
43
92
|
list(prefix, opts) {
|
|
44
93
|
return this.transport.request({
|
|
45
94
|
service: "storage",
|
|
@@ -51,6 +100,11 @@ export class StorageClientNamespace {
|
|
|
51
100
|
},
|
|
52
101
|
});
|
|
53
102
|
}
|
|
103
|
+
/**
|
|
104
|
+
* Delete a stored object by key.
|
|
105
|
+
*
|
|
106
|
+
* @param key - The storage key of the object to delete.
|
|
107
|
+
*/
|
|
54
108
|
async delete(key) {
|
|
55
109
|
await this.transport.request({
|
|
56
110
|
service: "storage",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/storage/client.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/storage/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAgC5C;;;;;;;;;;;;;;;GAeG;AACH,MAAM,OAAO,sBAAsB;IAChB,SAAS,CAAgB;IAE1C,YAAY,SAAwB;QAClC,IAAI,CAAC,SAAS,GAAG,SAAS,C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,EAAE,IAA6B;QAC/C,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,CAAiB;YAC5C,OAAO,EAAE,SAAS;YAClB,IAAI,EAAE,iBAAiB;YACvB,KAAK,EAAE;gBACL,GAAG;gBACH,UAAU,EAAE,IAAI,EAAE,SAAS;aAC5B;SACF,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,IAAI,CACF,MAAe,EACf,IAA0C;QAE1C,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,CAA+B;YAC1D,OAAO,EAAE,SAAS;YAClB,IAAI,EAAE,qBAAqB;YAC3B,KAAK,EAAE;gBACL,MAAM;gBACN,KAAK,EAAE,IAAI,EAAE,KAAK;gBAClB,MAAM,EAAE,IAAI,EAAE,MAAM;aACrB;SACF,CAAC,CAAC;IACL,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,MAAM,CAAC,GAAW;QACtB,MAAM,IAAI,CAAC,SAAS,CAAC,OAAO,CAAO;YACjC,OAAO,EAAE,SAAS;YAClB,IAAI,EAAE,oBAAoB;YAC1B,MAAM,EAAE,QAAQ;YAChB,IAAI,EAAE,EAAE,GAAG,EAAE;SACd,CAAC,CAAC;IACL,CAAC;CACF"}
|
package/dist/storage/server.d.ts
CHANGED
|
@@ -1,25 +1,70 @@
|
|
|
1
1
|
import type { HttpTransport } from "../http";
|
|
2
|
+
/** Options for requesting a pre-signed upload URL on the server. */
|
|
2
3
|
export interface ServerUploadOptions {
|
|
4
|
+
/** MIME type of the file, e.g. `"image/png"`. */
|
|
3
5
|
contentType: string;
|
|
6
|
+
/** Storage path/key for the file, e.g. `"avatars/user-123.png"`. */
|
|
4
7
|
key: string;
|
|
8
|
+
/** File size in bytes. */
|
|
5
9
|
size: number;
|
|
6
10
|
}
|
|
11
|
+
/** Metadata for a stored object. */
|
|
7
12
|
export interface StorageObject {
|
|
13
|
+
/** MIME type of the stored file. */
|
|
8
14
|
contentType: string;
|
|
15
|
+
/** ISO 8601 timestamp of when the object was created. */
|
|
9
16
|
createdAt: string;
|
|
17
|
+
/** Unique object identifier. */
|
|
10
18
|
id: string;
|
|
19
|
+
/** Storage key/path of the object. */
|
|
11
20
|
key: string;
|
|
21
|
+
/** File size in bytes. */
|
|
12
22
|
size: number;
|
|
23
|
+
/** ID of the user who uploaded the object, or `null` if uploaded via server key. */
|
|
13
24
|
uploadedBy: string | null;
|
|
14
25
|
}
|
|
26
|
+
/**
|
|
27
|
+
* Server-side storage methods for managing file uploads and downloads.
|
|
28
|
+
*
|
|
29
|
+
* Access via `buildspace.storage` on the server SDK.
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```ts
|
|
33
|
+
* // Get a pre-signed upload URL
|
|
34
|
+
* const { upload_url, key } = await buildspace.storage.getUploadUrl({
|
|
35
|
+
* key: "avatars/user-123.png",
|
|
36
|
+
* contentType: "image/png",
|
|
37
|
+
* size: file.size,
|
|
38
|
+
* });
|
|
39
|
+
*
|
|
40
|
+
* // Upload directly to the signed URL
|
|
41
|
+
* await fetch(upload_url, { method: "PUT", body: file });
|
|
42
|
+
*
|
|
43
|
+
* // Get a signed download URL
|
|
44
|
+
* const { url } = await buildspace.storage.getSignedUrl(key);
|
|
45
|
+
* ```
|
|
46
|
+
*/
|
|
15
47
|
export declare class StorageServerNamespace {
|
|
16
48
|
private readonly transport;
|
|
17
49
|
constructor(transport: HttpTransport);
|
|
50
|
+
/**
|
|
51
|
+
* Request a pre-signed URL for direct file upload.
|
|
52
|
+
*
|
|
53
|
+
* @param opts - Upload options including the storage key, content type, and file size.
|
|
54
|
+
* @returns The signed upload URL, the resolved key, and expiry time in seconds.
|
|
55
|
+
*/
|
|
18
56
|
getUploadUrl(opts: ServerUploadOptions): Promise<{
|
|
19
57
|
expires_in: number;
|
|
20
58
|
key: string;
|
|
21
59
|
upload_url: string;
|
|
22
60
|
}>;
|
|
61
|
+
/**
|
|
62
|
+
* Get a time-limited signed URL for downloading a stored file.
|
|
63
|
+
*
|
|
64
|
+
* @param key - The storage key of the object.
|
|
65
|
+
* @param opts - Optional settings.
|
|
66
|
+
* @param opts.expiresIn - URL lifetime in seconds. Uses server default if omitted.
|
|
67
|
+
*/
|
|
23
68
|
getSignedUrl(key: string, opts?: {
|
|
24
69
|
expiresIn?: number;
|
|
25
70
|
}): Promise<{
|
|
@@ -27,13 +72,29 @@ export declare class StorageServerNamespace {
|
|
|
27
72
|
key: string;
|
|
28
73
|
url: string;
|
|
29
74
|
}>;
|
|
75
|
+
/**
|
|
76
|
+
* List stored objects, optionally filtered by key prefix.
|
|
77
|
+
*
|
|
78
|
+
* @param prefix - Only return objects whose key starts with this prefix, e.g. `"avatars/"`.
|
|
79
|
+
* @param opts - Pagination options.
|
|
80
|
+
*/
|
|
30
81
|
list(prefix?: string, opts?: {
|
|
31
82
|
limit?: number;
|
|
32
83
|
offset?: number;
|
|
33
84
|
}): Promise<{
|
|
34
85
|
objects: StorageObject[];
|
|
35
86
|
}>;
|
|
87
|
+
/**
|
|
88
|
+
* Delete a stored object by key.
|
|
89
|
+
*
|
|
90
|
+
* @param key - The storage key of the object to delete.
|
|
91
|
+
*/
|
|
36
92
|
delete(key: string): Promise<void>;
|
|
93
|
+
/**
|
|
94
|
+
* Get current storage usage statistics for the app.
|
|
95
|
+
*
|
|
96
|
+
* @returns Byte counts and object count.
|
|
97
|
+
*/
|
|
37
98
|
getUsage(): Promise<{
|
|
38
99
|
maxStorageBytes: number;
|
|
39
100
|
objectCount: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/storage/server.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7C,MAAM,WAAW,mBAAmB;IAClC,WAAW,EAAE,MAAM,CAAC;IACpB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,aAAa;IAC5B,WAAW,EAAE,MAAM,CAAC;I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E,MAAM,CAAC;KACtB,CAAC;CAUH"}
|
package/dist/storage/server.js
CHANGED
|
@@ -1,8 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Server-side storage methods for managing file uploads and downloads.
|
|
3
|
+
*
|
|
4
|
+
* Access via `buildspace.storage` on the server SDK.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```ts
|
|
8
|
+
* // Get a pre-signed upload URL
|
|
9
|
+
* const { upload_url, key } = await buildspace.storage.getUploadUrl({
|
|
10
|
+
* key: "avatars/user-123.png",
|
|
11
|
+
* contentType: "image/png",
|
|
12
|
+
* size: file.size,
|
|
13
|
+
* });
|
|
14
|
+
*
|
|
15
|
+
* // Upload directly to the signed URL
|
|
16
|
+
* await fetch(upload_url, { method: "PUT", body: file });
|
|
17
|
+
*
|
|
18
|
+
* // Get a signed download URL
|
|
19
|
+
* const { url } = await buildspace.storage.getSignedUrl(key);
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
1
22
|
export class StorageServerNamespace {
|
|
2
23
|
transport;
|
|
3
24
|
constructor(transport) {
|
|
4
25
|
this.transport = transport;
|
|
5
26
|
}
|
|
27
|
+
/**
|
|
28
|
+
* Request a pre-signed URL for direct file upload.
|
|
29
|
+
*
|
|
30
|
+
* @param opts - Upload options including the storage key, content type, and file size.
|
|
31
|
+
* @returns The signed upload URL, the resolved key, and expiry time in seconds.
|
|
32
|
+
*/
|
|
6
33
|
getUploadUrl(opts) {
|
|
7
34
|
return this.transport.request({
|
|
8
35
|
service: "storage",
|
|
@@ -15,6 +42,13 @@ export class StorageServerNamespace {
|
|
|
15
42
|
},
|
|
16
43
|
});
|
|
17
44
|
}
|
|
45
|
+
/**
|
|
46
|
+
* Get a time-limited signed URL for downloading a stored file.
|
|
47
|
+
*
|
|
48
|
+
* @param key - The storage key of the object.
|
|
49
|
+
* @param opts - Optional settings.
|
|
50
|
+
* @param opts.expiresIn - URL lifetime in seconds. Uses server default if omitted.
|
|
51
|
+
*/
|
|
18
52
|
getSignedUrl(key, opts) {
|
|
19
53
|
return this.transport.request({
|
|
20
54
|
service: "storage",
|
|
@@ -25,6 +59,12 @@ export class StorageServerNamespace {
|
|
|
25
59
|
},
|
|
26
60
|
});
|
|
27
61
|
}
|
|
62
|
+
/**
|
|
63
|
+
* List stored objects, optionally filtered by key prefix.
|
|
64
|
+
*
|
|
65
|
+
* @param prefix - Only return objects whose key starts with this prefix, e.g. `"avatars/"`.
|
|
66
|
+
* @param opts - Pagination options.
|
|
67
|
+
*/
|
|
28
68
|
list(prefix, opts) {
|
|
29
69
|
return this.transport.request({
|
|
30
70
|
service: "storage",
|
|
@@ -36,6 +76,11 @@ export class StorageServerNamespace {
|
|
|
36
76
|
},
|
|
37
77
|
});
|
|
38
78
|
}
|
|
79
|
+
/**
|
|
80
|
+
* Delete a stored object by key.
|
|
81
|
+
*
|
|
82
|
+
* @param key - The storage key of the object to delete.
|
|
83
|
+
*/
|
|
39
84
|
async delete(key) {
|
|
40
85
|
await this.transport.request({
|
|
41
86
|
service: "storage",
|
|
@@ -44,6 +89,11 @@ export class StorageServerNamespace {
|
|
|
44
89
|
body: { key },
|
|
45
90
|
});
|
|
46
91
|
}
|
|
92
|
+
/**
|
|
93
|
+
* Get current storage usage statistics for the app.
|
|
94
|
+
*
|
|
95
|
+
* @returns Byte counts and object count.
|
|
96
|
+
*/
|
|
47
97
|
getUsage() {
|
|
48
98
|
return this.transport.request({
|
|
49
99
|
service: "storage",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.js","sourceRoot":"","sources":["../../src/storage/server.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"server.js","sourceRoot":"","sources":["../../src/storage/server.ts"],"names":[],"mappings":"AA4BA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,OAAO,sBAAsB;IAChB,SAAS,CAAgB;IAE1C,YAAY,SAAwB;QAClC,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC7B,CA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