@bunbase-ae/js 2.7.2 → 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 +1 -1
- package/src/admin.ts +38 -0
- package/src/index.ts +2 -0
package/package.json
CHANGED
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