@bunbase-ae/js 2.7.3-next.196.05185c7 → 2.7.3-next.201.21cdac2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bunbase-ae/js",
3
- "version": "2.7.3-next.196.05185c7",
3
+ "version": "2.7.3-next.201.21cdac2",
4
4
  "type": "module",
5
5
  "description": "TypeScript/JavaScript SDK for BunBase",
6
6
  "license": "UNLICENSED",
package/src/admin.ts CHANGED
@@ -198,6 +198,39 @@ export interface StorageBucket {
198
198
  created_at: number;
199
199
  }
200
200
 
201
+ export interface BackupRetentionPolicy {
202
+ keep_recent_hours?: number;
203
+ keep_daily_days?: number;
204
+ }
205
+
206
+ // Mirror of the server-side BackupDestinationConfig union (see
207
+ // apps/server/src/backupDestinations.ts). Stored as a JSON array under the
208
+ // `backup_destinations` settings key.
209
+ export type BackupDestinationConfig =
210
+ | {
211
+ type: "local";
212
+ id?: string;
213
+ path?: string;
214
+ retention?: BackupRetentionPolicy;
215
+ }
216
+ | {
217
+ type: "s3";
218
+ id?: string;
219
+ endpoint?: string;
220
+ bucket: string;
221
+ prefix?: string;
222
+ region?: string;
223
+ accessKeyId?: string;
224
+ secretAccessKey?: string;
225
+ retention?: BackupRetentionPolicy;
226
+ }
227
+ | {
228
+ type: "ssh";
229
+ id?: string;
230
+ dest: string;
231
+ retention?: BackupRetentionPolicy;
232
+ };
233
+
201
234
  export interface ServerSettings {
202
235
  auto_create_buckets?: boolean;
203
236
  auto_create_collections?: boolean;
@@ -256,6 +289,11 @@ export interface ServerSettings {
256
289
  backup_remote_s3_access_key_id?: string;
257
290
  backup_remote_s3_secret_access_key?: string;
258
291
  backup_remote_rsync_dest?: string;
292
+ // Multi-destination backup config (#331). When set, supersedes the legacy
293
+ // single-destination fields above. When unset/empty the scheduler synthesizes
294
+ // a destinations list from the legacy fields at runtime — the Studio UI uses
295
+ // this to drive a per-destination editor with explicit retention.
296
+ backup_destinations?: BackupDestinationConfig[];
259
297
  server_timezone?: string;
260
298
  server_locale?: string;
261
299
  access_log_level?: "info" | "warn" | "error";
package/src/index.ts CHANGED
@@ -8,7 +8,9 @@ export {
8
8
  type AdminSession,
9
9
  type AdminStoredFile,
10
10
  type AdminUser,
11
+ type BackupDestinationConfig,
11
12
  type BackupFile,
13
+ type BackupRetentionPolicy,
12
14
  type BucketAccessRule,
13
15
  type CollectionIntrospection,
14
16
  type CollectionMeta,