@camstack/types 1.2.361 → 1.2.362

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.
@@ -101,6 +101,11 @@ declare const BackupArchiveEntrySchema: z.ZodObject<{
101
101
  scheme: z.ZodString;
102
102
  keyId: z.ZodString;
103
103
  }, z.core.$strip>>;
104
+ databases: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodEnum<{
105
+ events: "events";
106
+ history: "history";
107
+ settings: "settings";
108
+ }>>>>;
104
109
  }, z.core.$strip>;
105
110
  declare const BackupEntrySchema: z.ZodObject<{
106
111
  id: z.ZodString;
@@ -154,7 +159,17 @@ declare const ArchiveManifestSchema: z.ZodObject<{
154
159
  takenAt: z.ZodNumber;
155
160
  livePath: z.ZodString;
156
161
  snapshotPath: z.ZodString;
162
+ databaseId: z.ZodOptional<z.ZodEnum<{
163
+ events: "events";
164
+ history: "history";
165
+ settings: "settings";
166
+ }>>;
157
167
  }, z.core.$strip>>>;
168
+ omittedDatabases: z.ZodOptional<z.ZodArray<z.ZodEnum<{
169
+ events: "events";
170
+ history: "history";
171
+ settings: "settings";
172
+ }>>>;
158
173
  }, z.core.$strip>;
159
174
  declare const LocationStatSchema: z.ZodObject<{
160
175
  name: z.ZodString;
@@ -265,6 +280,11 @@ declare const BackupScheduleSchema: z.ZodObject<{
265
280
  locationIds: z.ZodReadonly<z.ZodArray<z.ZodString>>;
266
281
  retentionCount: z.ZodNumber;
267
282
  dataSources: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
283
+ databases: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodEnum<{
284
+ events: "events";
285
+ history: "history";
286
+ settings: "settings";
287
+ }>>>>;
268
288
  lastAttemptAt: z.ZodOptional<z.ZodNumber>;
269
289
  lastSuccessAt: z.ZodOptional<z.ZodNumber>;
270
290
  lastError: z.ZodOptional<z.ZodString>;
@@ -321,6 +341,11 @@ export declare const backupCapability: {
321
341
  locations: z.ZodOptional<z.ZodArray<z.ZodString>>;
322
342
  label: z.ZodOptional<z.ZodString>;
323
343
  retentionCount: z.ZodOptional<z.ZodNumber>;
344
+ databases: z.ZodOptional<z.ZodArray<z.ZodEnum<{
345
+ events: "events";
346
+ history: "history";
347
+ settings: "settings";
348
+ }>>>;
324
349
  }, z.core.$strip>>, z.ZodObject<{
325
350
  runId: z.ZodString;
326
351
  queued: z.ZodBoolean;
@@ -455,7 +480,17 @@ export declare const backupCapability: {
455
480
  takenAt: z.ZodNumber;
456
481
  livePath: z.ZodString;
457
482
  snapshotPath: z.ZodString;
483
+ databaseId: z.ZodOptional<z.ZodEnum<{
484
+ events: "events";
485
+ history: "history";
486
+ settings: "settings";
487
+ }>>;
458
488
  }, z.core.$strip>>>;
489
+ omittedDatabases: z.ZodOptional<z.ZodArray<z.ZodEnum<{
490
+ events: "events";
491
+ history: "history";
492
+ settings: "settings";
493
+ }>>>;
459
494
  }, z.core.$strip>>, import("./capability-definition.js").CapabilityMethodKind>;
460
495
  readonly restore: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
461
496
  destinationId: z.ZodString;
@@ -530,6 +565,11 @@ export declare const backupCapability: {
530
565
  scheme: z.ZodString;
531
566
  keyId: z.ZodString;
532
567
  }, z.core.$strip>>;
568
+ databases: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodEnum<{
569
+ events: "events";
570
+ history: "history";
571
+ settings: "settings";
572
+ }>>>>;
533
573
  }, z.core.$strip>>>, import("./capability-definition.js").CapabilityMethodKind>;
534
574
  /**
535
575
  * Upsert a per-destination policy row. The `locationId` MUST be
@@ -569,6 +609,11 @@ export declare const backupCapability: {
569
609
  locationIds: z.ZodReadonly<z.ZodArray<z.ZodString>>;
570
610
  retentionCount: z.ZodNumber;
571
611
  dataSources: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
612
+ databases: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodEnum<{
613
+ events: "events";
614
+ history: "history";
615
+ settings: "settings";
616
+ }>>>>;
572
617
  lastAttemptAt: z.ZodOptional<z.ZodNumber>;
573
618
  lastSuccessAt: z.ZodOptional<z.ZodNumber>;
574
619
  lastError: z.ZodOptional<z.ZodString>;
@@ -588,6 +633,11 @@ export declare const backupCapability: {
588
633
  locationIds: z.ZodReadonly<z.ZodArray<z.ZodString>>;
589
634
  retentionCount: z.ZodNumber;
590
635
  dataSources: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
636
+ databases: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodEnum<{
637
+ events: "events";
638
+ history: "history";
639
+ settings: "settings";
640
+ }>>>>;
591
641
  }, z.core.$strip>, z.ZodObject<{
592
642
  id: z.ZodString;
593
643
  label: z.ZodString;
@@ -596,6 +646,11 @@ export declare const backupCapability: {
596
646
  locationIds: z.ZodReadonly<z.ZodArray<z.ZodString>>;
597
647
  retentionCount: z.ZodNumber;
598
648
  dataSources: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
649
+ databases: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodEnum<{
650
+ events: "events";
651
+ history: "history";
652
+ settings: "settings";
653
+ }>>>>;
599
654
  lastAttemptAt: z.ZodOptional<z.ZodNumber>;
600
655
  lastSuccessAt: z.ZodOptional<z.ZodNumber>;
601
656
  lastError: z.ZodOptional<z.ZodString>;
@@ -29,6 +29,11 @@ export declare const DATABASE_SNAPSHOT_TIMEOUT_MS: number;
29
29
  */
30
30
  export declare const DatabaseSnapshotTargetsSchema: z.ZodObject<{
31
31
  databases: z.ZodArray<z.ZodObject<{
32
+ databaseId: z.ZodEnum<{
33
+ events: "events";
34
+ history: "history";
35
+ settings: "settings";
36
+ }>;
32
37
  livePath: z.ZodString;
33
38
  }, z.core.$strip>>;
34
39
  }, z.core.$strip>;
@@ -60,6 +65,36 @@ export declare const DatabaseSnapshotResultSchema: z.ZodObject<{
60
65
  takenAt: z.ZodNumber;
61
66
  }, z.core.$strip>;
62
67
  export type DatabaseSnapshotResult = z.infer<typeof DatabaseSnapshotResultSchema>;
68
+ /** A snapshot the owner wrote, with the file it belongs to. */
69
+ export declare const DatabaseSnapshotWrittenSchema: z.ZodObject<{
70
+ livePath: z.ZodString;
71
+ snapshotPath: z.ZodString;
72
+ sizeBytes: z.ZodNumber;
73
+ pageCount: z.ZodNumber;
74
+ pageSize: z.ZodNumber;
75
+ tables: z.ZodArray<z.ZodObject<{
76
+ name: z.ZodString;
77
+ rows: z.ZodNumber;
78
+ }, z.core.$strip>>;
79
+ copyMs: z.ZodNumber;
80
+ verifyMs: z.ZodNumber;
81
+ takenAt: z.ZodNumber;
82
+ databaseId: z.ZodEnum<{
83
+ events: "events";
84
+ history: "history";
85
+ settings: "settings";
86
+ }>;
87
+ }, z.core.$strip>;
88
+ export type DatabaseSnapshotWritten = z.infer<typeof DatabaseSnapshotWrittenSchema>;
89
+ /** Which database `writeSnapshot` copies. Required: an unstated ask is not guessed. */
90
+ export declare const DatabaseSnapshotRequestSchema: z.ZodObject<{
91
+ databaseId: z.ZodEnum<{
92
+ events: "events";
93
+ history: "history";
94
+ settings: "settings";
95
+ }>;
96
+ }, z.core.$strip>;
97
+ export type DatabaseSnapshotRequest = z.infer<typeof DatabaseSnapshotRequestSchema>;
63
98
  /**
64
99
  * A snapshot as an ARCHIVE records it (`ArchiveManifest.sqliteSnapshots`):
65
100
  * the same facts, with both paths relative to the archive root (the node's
@@ -78,6 +113,11 @@ export declare const ArchiveSqliteSnapshotSchema: z.ZodObject<{
78
113
  takenAt: z.ZodNumber;
79
114
  livePath: z.ZodString;
80
115
  snapshotPath: z.ZodString;
116
+ databaseId: z.ZodOptional<z.ZodEnum<{
117
+ events: "events";
118
+ history: "history";
119
+ settings: "settings";
120
+ }>>;
81
121
  }, z.core.$strip>;
82
122
  export type ArchiveSqliteSnapshot = z.infer<typeof ArchiveSqliteSnapshotSchema>;
83
123
  /**
@@ -103,21 +143,36 @@ export declare const databaseSnapshotCapability: {
103
143
  readonly internal: true;
104
144
  readonly methods: {
105
145
  /**
106
- * Which databases this owner snapshots. Answered from memory — no file is
107
- * touched — so a backup can ask it before deciding anything.
146
+ * EVERY database file this owner has open, with its id. Answered from
147
+ * memory — no file is touched — so a backup can ask it before deciding
148
+ * anything. A file created at runtime is listed from the moment it opens,
149
+ * so no backup can leave it out (D693).
108
150
  */
109
151
  readonly listDatabases: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{}, z.core.$strip>, z.ZodObject<{
110
152
  databases: z.ZodArray<z.ZodObject<{
153
+ databaseId: z.ZodEnum<{
154
+ events: "events";
155
+ history: "history";
156
+ settings: "settings";
157
+ }>;
111
158
  livePath: z.ZodString;
112
159
  }, z.core.$strip>>;
113
160
  }, z.core.$strip>, import("./capability-definition.js").CapabilityMethodKind>;
114
161
  /**
115
- * Write `<db>.backup-snapshot` and return what it holds. Throws — and
116
- * leaves no file under the final name — when the copy fails
117
- * `integrity_check` or its row counts differ from the pinned source's.
118
- * A second call while one is running joins it.
162
+ * Write `<db>.backup-snapshot` for ONE database and return what it holds.
163
+ * Throws — and leaves no file under the final name — when the copy fails
164
+ * `integrity_check` or its row counts differ from the pinned source's, or
165
+ * when the database is not open. A second call for the SAME database while
166
+ * one is running joins it; different databases run one after the other
167
+ * (the disk reserve check is per copy).
119
168
  */
120
- readonly writeSnapshot: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{}, z.core.$strip>, z.ZodObject<{
169
+ readonly writeSnapshot: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
170
+ databaseId: z.ZodEnum<{
171
+ events: "events";
172
+ history: "history";
173
+ settings: "settings";
174
+ }>;
175
+ }, z.core.$strip>, z.ZodObject<{
121
176
  livePath: z.ZodString;
122
177
  snapshotPath: z.ZodString;
123
178
  sizeBytes: z.ZodNumber;
@@ -130,6 +185,11 @@ export declare const databaseSnapshotCapability: {
130
185
  copyMs: z.ZodNumber;
131
186
  verifyMs: z.ZodNumber;
132
187
  takenAt: z.ZodNumber;
188
+ databaseId: z.ZodEnum<{
189
+ events: "events";
190
+ history: "history";
191
+ settings: "settings";
192
+ }>;
133
193
  }, z.core.$strip>, "mutation">;
134
194
  };
135
195
  };
@@ -44,7 +44,7 @@ export * from './custom-actions.js';
44
44
  export type { CustomModelDescriptor, ICustomModelRegistryProvider, ImportModelBundleInput, ImportModelBundleResult, ModelBundleFile, } from './custom-model-registry.cap.js';
45
45
  export { CustomModelDescriptorSchema, customModelRegistryCapability, ImportModelBundleInputSchema, ImportModelBundleResultSchema, ModelBundleFileSchema, } from './custom-model-registry.cap.js';
46
46
  export { type DataStoreEngineInfo, dataStoreProviderCapability, EngineInfoSchema as DataStoreEngineInfoSchema, type IDataStoreProvider, } from './data-store-provider.cap.js';
47
- export { type ArchiveSqliteSnapshot, ArchiveSqliteSnapshotSchema, DATABASE_SNAPSHOT_PARTIAL_SUFFIX, DATABASE_SNAPSHOT_SUFFIX, DATABASE_SNAPSHOT_TIMEOUT_MS, type DatabaseSnapshotResult, DatabaseSnapshotResultSchema, type DatabaseSnapshotTable, DatabaseSnapshotTableSchema, type DatabaseSnapshotTargets, DatabaseSnapshotTargetsSchema, databaseSnapshotCapability, type IDatabaseSnapshotProvider, } from './database-snapshot.cap.js';
47
+ export { type ArchiveSqliteSnapshot, ArchiveSqliteSnapshotSchema, DATABASE_SNAPSHOT_PARTIAL_SUFFIX, DATABASE_SNAPSHOT_SUFFIX, DATABASE_SNAPSHOT_TIMEOUT_MS, type DatabaseSnapshotRequest, DatabaseSnapshotRequestSchema, type DatabaseSnapshotResult, DatabaseSnapshotResultSchema, type DatabaseSnapshotTable, DatabaseSnapshotTableSchema, type DatabaseSnapshotTargets, DatabaseSnapshotTargetsSchema, type DatabaseSnapshotWritten, DatabaseSnapshotWrittenSchema, databaseSnapshotCapability, type IDatabaseSnapshotProvider, } from './database-snapshot.cap.js';
48
48
  export { type IKeychainProvider, KEYCHAIN_MAX_REFS_PER_CALL, type KeychainResolveEntry, KeychainResolveEntrySchema, type KeychainResolveResult, KeychainResolveResultSchema, type KeychainSecretMeta, KeychainSecretMetaSchema, type KeychainState, KeychainStateSchema, type KeychainUnavailableReason, KeychainUnavailableReasonSchema, keychainCapability, } from './keychain.cap.js';
49
49
  export { type IKeychainAdminProvider, KEYCHAIN_RESET_CONFIRMATION, type KeychainAdminSecret, KeychainAdminSecretSchema, type KeychainAuditAction, KeychainAuditActionSchema, type KeychainAuditEntry, KeychainAuditEntrySchema, type KeychainKeySource, type KeychainKeySourceKind, KeychainKeySourceKindSchema, KeychainKeySourceSchema, KEYCHAIN_RESET_TRIGGER_ACTOR, type KeychainResetRecord, KeychainResetRecordSchema, type KeychainSecretUsage, KeychainSecretUsageSchema, type KeychainStatus, KeychainStatusSchema, keychainAdminCapability, type SystemHeldSecretName, SystemHeldSecretNameSchema, } from './keychain-admin.cap.js';
50
50
  export type { DecoderHwAccelConfig, HwAccelChoice, IDecoderCapProvider, } from './decoder.cap.js';