@camstack/addon-admin-ui 1.2.414 → 1.2.415

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.
Files changed (85) hide show
  1. package/dist/assets/{AddonAssetIcon-CiyNEuF3.js → AddonAssetIcon-J2YmEasA.js} +1 -1
  2. package/dist/assets/{Addons-9Ntbbvgn.js → Addons-CcdgOyOO.js} +1 -1
  3. package/dist/assets/{AdminPage-AxxoFTwj.js → AdminPage-DZa71Fya.js} +1 -1
  4. package/dist/assets/{AdminSectionedPage-wv2KbpPY.js → AdminSectionedPage-nmyV-dfR.js} +1 -1
  5. package/dist/assets/{AiProfiles-DtfrZsD8.js → AiProfiles-9jMzBzNa.js} +1 -1
  6. package/dist/assets/{BrokerForm-DYs5YMw7.js → BrokerForm-Cai607rI.js} +1 -1
  7. package/dist/assets/{Build-Bbsh45rO.js → Build-rlb_Md4t.js} +1 -1
  8. package/dist/assets/{Calendars-Bp8UlqyS.js → Calendars-auVMN1xO.js} +1 -1
  9. package/dist/assets/{Cluster-Db_0LcV7.js → Cluster-DecXGJa-.js} +1 -1
  10. package/dist/assets/{ClusterStepModel-Ujdent0T.js → ClusterStepModel-Brf32Xwq.js} +1 -1
  11. package/dist/assets/{CompositionEditor-CdWGVYfL.js → CompositionEditor-1WMlUjtw.js} +1 -1
  12. package/dist/assets/{CompositionEditorPage-CjnZXHub.js → CompositionEditorPage-CKqeBbnj.js} +1 -1
  13. package/dist/assets/{Data-DCUR3Do4.js → Data-0Gl0I7ot.js} +1 -1
  14. package/dist/assets/{DeviceDetail-CZxfLwDt.js → DeviceDetail-Cv6ugNVF.js} +1 -1
  15. package/dist/assets/{DeviceDoActionFields-M1-cm4xE.js → DeviceDoActionFields-BadrffZL.js} +1 -1
  16. package/dist/assets/{Devices-xefXTWNQ.js → Devices-CO3jlMI-.js} +1 -1
  17. package/dist/assets/{EmbedPlayerPage-C4rC--Y0.js → EmbedPlayerPage-NHoANeQm.js} +1 -1
  18. package/dist/assets/{Identity-BuokIWZc.js → Identity-DzJ2ejGr.js} +1 -1
  19. package/dist/assets/{IntegrationDetail-BBQWdUoR.js → IntegrationDetail-DosIUkoT.js} +1 -1
  20. package/dist/assets/{IntegrationHub-D7m0tt3n.js → IntegrationHub-DlwmD1Sj.js} +1 -1
  21. package/dist/assets/{Integrations-B0GrMxBX.js → Integrations-D-vMxVFT.js} +1 -1
  22. package/dist/assets/{Integrations-dN5g1PqM.js → Integrations-rV4rh_ci.js} +1 -1
  23. package/dist/assets/{Library-DL-5D2g6.js → Library-BMYQ8KJC.js} +1 -1
  24. package/dist/assets/{Locations-BqrDsUcD.js → Locations-sz21K01g.js} +1 -1
  25. package/dist/assets/{Logs-Dav8clyj.js → Logs-BeFo3flC.js} +1 -1
  26. package/dist/assets/{MotionZonesSettings-BfWjD8hK.js → MotionZonesSettings-BfJFRtZQ.js} +1 -1
  27. package/dist/assets/{MyAccess-CnxCCRpH.js → MyAccess-CbH7GgdC.js} +1 -1
  28. package/dist/assets/{Network-CXe4NAwb.js → Network-lg62RXyO.js} +1 -1
  29. package/dist/assets/{NodeAddonsSettingsPanel-eGGiB7Gp.js → NodeAddonsSettingsPanel-Dq85Oylu.js} +1 -1
  30. package/dist/assets/{Notifications-zwPWEcam.js → Notifications-kWmlVcic.js} +1 -1
  31. package/dist/assets/{PrivacyMaskSettings-BPD-cNPU.js → PrivacyMaskSettings-DSnnErvY.js} +1 -1
  32. package/dist/assets/{Recordings-CcCIT4Gs.js → Recordings-BLZGoHXQ.js} +1 -1
  33. package/dist/assets/{ScanNetworkModal-YzsUQrq0.js → ScanNetworkModal-BnZJdknU.js} +1 -1
  34. package/dist/assets/{SceneMonitorEditor-BtFfFnSY.js → SceneMonitorEditor-CluoYR2z.js} +1 -1
  35. package/dist/assets/{SessionsList-BVvajOmu.js → SessionsList-Ui2cG8V8.js} +1 -1
  36. package/dist/assets/{Showroom-CLnfjDQQ.js → Showroom-Diy2wlnI.js} +1 -1
  37. package/dist/assets/{System-Dxifud1c.js → System-CyMf_AF0.js} +1 -1
  38. package/dist/assets/{Terminal-C6_NYFWm.js → Terminal-ElcJgLsa.js} +1 -1
  39. package/dist/assets/{Viewer-BywAV7TJ.js → Viewer-0b1BYnx3.js} +1 -1
  40. package/dist/assets/{_virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host--JmqaIIU.js → _virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-iWm7gRA_.js} +1 -1
  41. package/dist/assets/{archive-DvMy75Ee.js → archive-CngdI34p.js} +1 -1
  42. package/dist/assets/{authed-media-B6SNzeDV.js → authed-media-DaxA3cqw.js} +1 -1
  43. package/dist/assets/{boxes-BbFLEqjO.js → boxes-CJRnfSTP.js} +1 -1
  44. package/dist/assets/circle-slash-B2PrzTgD.js +1 -0
  45. package/dist/assets/client-BYOggSLi.js +357 -0
  46. package/dist/assets/crop-Bq46dIDQ.js +1 -0
  47. package/dist/assets/{device-integration-icon-DvILibFL.js → device-integration-icon-BkkixYrR.js} +1 -1
  48. package/dist/assets/device-picker-model-BM4-uHuf.js +1 -0
  49. package/dist/assets/{dist-D_YvoVQ5.js → dist-DD2Ym9kF.js} +1 -1
  50. package/dist/assets/dist-Dt7prXg8.js +357 -0
  51. package/dist/assets/{format-size-i2-3yT80.js → format-size-C90aMRQ9.js} +1 -1
  52. package/dist/assets/{history-DoJQd23x.js → history-X5XG2uu3.js} +1 -1
  53. package/dist/assets/{hostInit-dlvQUWnb.js → hostInit-DGLtUwv9.js} +1 -1
  54. package/dist/assets/{index--0j0V6fk.js → index-D_ATesoN.js} +3 -3
  55. package/dist/assets/{layers-BBMzZsJ3.js → layers-Btc4sTc4.js} +1 -1
  56. package/dist/assets/{location-owned-usage-6H1F9dcr.js → location-owned-usage-zUpdLUDD.js} +1 -1
  57. package/dist/assets/{log-in-BhkinxHr.js → log-in-DxDo-liU.js} +1 -1
  58. package/dist/assets/{mf-entry-bootstrap-0-52355347.js → mf-entry-bootstrap-0-e818953d.js} +2 -2
  59. package/dist/assets/{monitor-smartphone-DcTkQ_Rl.js → monitor-smartphone-CvgyeQQW.js} +1 -1
  60. package/dist/assets/mount-BM4-uHuf.js +1 -0
  61. package/dist/assets/{notification-schedule-field-C3Ps_sjb.js → notification-schedule-field-CKjodzam.js} +1 -1
  62. package/dist/assets/{octagon-alert-mGzXqEh3.js → octagon-alert-BW5_FdyE.js} +1 -1
  63. package/dist/assets/{player-overlays-DhAVQAuk.js → player-overlays-CAEToHRq.js} +1 -1
  64. package/dist/assets/remoteEntry-Bm1eIH_f.js +1 -0
  65. package/dist/assets/{send-CXor3Vf2.js → send-D7hTXQTK.js} +1 -1
  66. package/dist/assets/{settings-2-R7xBbd9W.js → settings-2-BsqzuNO0.js} +1 -1
  67. package/dist/assets/{src-BVZ1cdXr.js → src-CjCvm7Vj.js} +3 -3
  68. package/dist/assets/{use-scenes-feed-DF7ABZC6.js → use-scenes-feed-DTKTpWcX.js} +1 -1
  69. package/dist/assets/{use-stationary-objects-Cyqk4-Jq.js → use-stationary-objects-Ws4b2I32.js} +1 -1
  70. package/dist/assets/useEventInvalidation-BM4-uHuf.js +1 -0
  71. package/dist/assets/{useNodeUrlSelection-DOmfdTJF.js → useNodeUrlSelection-rFFMwXkk.js} +1 -1
  72. package/dist/assets/user-round-NmZjI7bl.js +1 -0
  73. package/dist/assets/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-DNWcI_gX.js → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-B2OcA9Dp.js} +2 -2
  74. package/dist/index.html +7 -7
  75. package/dist/server/addon.js +360 -331
  76. package/package.json +1 -1
  77. package/dist/assets/circle-slash-DhZ8wTvm.js +0 -1
  78. package/dist/assets/client-D3_JYCRi.js +0 -357
  79. package/dist/assets/crop-BPSAV2Fe.js +0 -1
  80. package/dist/assets/device-picker-model-CxO0bdpI.js +0 -1
  81. package/dist/assets/dist-e9ekShbj.js +0 -357
  82. package/dist/assets/mount-CxO0bdpI.js +0 -1
  83. package/dist/assets/remoteEntry-XnKDtVAT.js +0 -1
  84. package/dist/assets/useEventInvalidation-CxO0bdpI.js +0 -1
  85. package/dist/assets/user-round-BfjaNmIC.js +0 -1
@@ -13025,6 +13025,329 @@ method(object({
13025
13025
  password: string()
13026
13026
  }), AuthResultSchema.nullable(), { kind: "mutation" }), method(object({ state: string() }), string()), method(record(string(), string()), AuthResultSchema, { kind: "mutation" }), method(object({ token: string() }), AuthResultSchema.nullable());
13027
13027
  /**
13028
+ * Query filter for settings-store collections.
13029
+ */
13030
+ var QueryFilterSchema = object({
13031
+ where: record(string(), unknown()).optional(),
13032
+ whereIn: record(string(), array(unknown())).optional(),
13033
+ whereBetween: record(string(), tuple([unknown(), unknown()])).optional(),
13034
+ /** NULL-safe exclusion: matches rows whose field is NULL OR != the value. */
13035
+ whereNot: record(string(), unknown()).optional(),
13036
+ /** NULL-safe exclusion of a SET — `whereNot` for more than one value. An
13037
+ * empty list excludes nothing. See `QueryFilter.whereNotIn`. */
13038
+ whereNotIn: record(string(), array(unknown())).optional(),
13039
+ orderBy: object({
13040
+ field: string(),
13041
+ direction: _enum(["asc", "desc"])
13042
+ }).optional(),
13043
+ limit: number().optional(),
13044
+ offset: number().optional()
13045
+ });
13046
+ /**
13047
+ * The predicate half of a filter, for BULK MUTATIONS.
13048
+ *
13049
+ * Deliberately not `QueryFilterSchema`: `orderBy` / `limit` / `offset` have no
13050
+ * meaning for a statement that rewrites a set, and accepting them would invite
13051
+ * a caller to believe `limit` bounds the damage. Every field is optional here
13052
+ * only so the shape stays composable — the implementation REJECTS a filter
13053
+ * that compiles to no predicate, because that is the whole collection.
13054
+ */
13055
+ var MutationFilterSchema = object({
13056
+ where: record(string(), unknown()).optional(),
13057
+ whereIn: record(string(), array(unknown())).optional(),
13058
+ whereBetween: record(string(), tuple([unknown(), unknown()])).optional(),
13059
+ whereNot: record(string(), unknown()).optional(),
13060
+ whereNotIn: record(string(), array(unknown())).optional()
13061
+ });
13062
+ /**
13063
+ * One scalar an {@link settingsStoreCapability.methods.aggregate} call asks for.
13064
+ *
13065
+ * `as` names the slot in the result, so the SAME column may be asked twice with
13066
+ * two operations (`MIN(startMs)` and `MAX(startMs)` in one round trip) — which
13067
+ * a `Record<column, op>` shape could not express.
13068
+ */
13069
+ var AggregateFieldSchema = object({
13070
+ /** Result key. */
13071
+ as: string().min(1),
13072
+ /** Column to aggregate. Must be a real column of a declared collection. */
13073
+ field: string().min(1),
13074
+ op: _enum([
13075
+ "sum",
13076
+ "min",
13077
+ "max"
13078
+ ])
13079
+ });
13080
+ /**
13081
+ * `COUNT(*)` plus one number per requested field.
13082
+ *
13083
+ * `null` means NO ROW MATCHED, never zero: a `SUM` over an empty set and a sum
13084
+ * that really is 0 are different facts, and an accounting caller that renders
13085
+ * "0 bytes, oldest = 0" for "nothing here" reports a lie about a disk.
13086
+ */
13087
+ var AggregateResultSchema = object({
13088
+ count: number().int(),
13089
+ values: record(string(), number().nullable())
13090
+ });
13091
+ /** A single stored record: `{ id, data }`. */
13092
+ var SettingsRecordSchema = object({
13093
+ id: string(),
13094
+ data: record(string(), unknown())
13095
+ });
13096
+ /**
13097
+ * One record of a BULK insert — {@link SettingsRecordSchema} with the id made
13098
+ * optional.
13099
+ *
13100
+ * A separate schema rather than loosening the shared one: every other method
13101
+ * on this cap addresses a row BY its id, and making that field optional
13102
+ * everywhere would turn a forgotten key into a silently generated one on
13103
+ * `update` and `delete` as well.
13104
+ */
13105
+ var BulkRecordSchema = object({
13106
+ id: string().optional(),
13107
+ data: record(string(), unknown())
13108
+ });
13109
+ /**
13110
+ * The database FILES one `sqlite-settings` engine process owns (D851).
13111
+ * Closed on purpose: a file is a thing the engine opens, backs up and gives a
13112
+ * serving thread, so a new one is a code change, never a string a caller
13113
+ * invents. `settings` is `camstack.db` and the default for every collection
13114
+ * that names no file.
13115
+ */
13116
+ var DataStoreDatabaseSchema = _enum([
13117
+ "settings",
13118
+ "events",
13119
+ "history"
13120
+ ]);
13121
+ DataStoreDatabaseSchema.options;
13122
+ /**
13123
+ * One write inside a {@link settingsStoreCapability.methods.transact} call.
13124
+ * The three that a "replace this set, bump that revision" write needs, plus
13125
+ * the batched upsert a rollup writer needs.
13126
+ */
13127
+ var TransactOpSchema = discriminatedUnion("op", [
13128
+ object({
13129
+ op: literal("deleteWhere"),
13130
+ collection: string(),
13131
+ filter: MutationFilterSchema
13132
+ }),
13133
+ object({
13134
+ op: literal("insertMany"),
13135
+ collection: string(),
13136
+ records: array(BulkRecordSchema).readonly()
13137
+ }),
13138
+ object({
13139
+ op: literal("update"),
13140
+ collection: string(),
13141
+ id: string(),
13142
+ data: record(string(), unknown())
13143
+ }),
13144
+ object({
13145
+ op: literal("upsertMany"),
13146
+ collection: string(),
13147
+ conflict: array(string()).readonly(),
13148
+ records: array(BulkRecordSchema).readonly()
13149
+ })
13150
+ ]);
13151
+ /**
13152
+ * The precondition of a transaction: the row `key` of `collection` must hold
13153
+ * `equals` in `column`, read INSIDE the transaction.
13154
+ */
13155
+ var TransactGuardSchema = object({
13156
+ collection: string(),
13157
+ key: string(),
13158
+ column: string(),
13159
+ equals: unknown()
13160
+ });
13161
+ /**
13162
+ * Column declaration for a structured (SQL-backed) collection.
13163
+ *
13164
+ * Logical types — the backend translates each to the matching SQLite
13165
+ * storage class and handles per-type marshaling:
13166
+ * - `TEXT` / `INTEGER` / `REAL` — native SQLite types, pass-through
13167
+ * - `JSON` — TEXT under the hood; serialised on write, parsed on read
13168
+ * - `BOOLEAN` — INTEGER 0/1 under the hood; coerced both directions
13169
+ */
13170
+ var CollectionColumnSchema = object({
13171
+ name: string(),
13172
+ type: _enum([
13173
+ "TEXT",
13174
+ "INTEGER",
13175
+ "REAL",
13176
+ "JSON",
13177
+ "BOOLEAN"
13178
+ ]),
13179
+ primaryKey: boolean().optional(),
13180
+ notNull: boolean().optional(),
13181
+ unique: boolean().optional(),
13182
+ /**
13183
+ * Column DEFAULT. Required for B2: the four `ensureTable` consumers declare
13184
+ * columns like `enabled INTEGER NOT NULL DEFAULT 1`, and without this the
13185
+ * collection surface simply cannot express their existing tables — which is
13186
+ * why they were still on the uncapped `table*` API.
13187
+ */
13188
+ defaultValue: union([
13189
+ string(),
13190
+ number(),
13191
+ boolean()
13192
+ ]).optional()
13193
+ });
13194
+ var CollectionIndexSchema = object({
13195
+ name: string(),
13196
+ columns: array(string()).readonly(),
13197
+ unique: boolean().optional()
13198
+ });
13199
+ /**
13200
+ * The input of `declareCollection` — ONE schema for the door and for the
13201
+ * engine behind it, so the two surfaces cannot drift (the dispatcher forwards
13202
+ * the payload untouched).
13203
+ *
13204
+ * - `database` — the file the collection lives in (D851). Absent means
13205
+ * `settings`. A declaration naming a file other than the one the table is
13206
+ * already in is REFUSED by the engine, never moved.
13207
+ * - `primaryKey` — a COMPOSITE key, as column names. A single name is the same
13208
+ * as `primaryKey: true` on that column. A composite-keyed collection has no
13209
+ * `id`: it is written with `insertMany` / `upsertMany` / `transact` and read
13210
+ * with `query` / `count` / `aggregate` / `deleteWhere`; the calls that
13211
+ * address one row by id are refused.
13212
+ * - `withoutRowid` — emit `WITHOUT ROWID`. Requires a primary key.
13213
+ */
13214
+ var DeclareCollectionInputSchema = object({
13215
+ namespace: string().optional(),
13216
+ collection: string(),
13217
+ columns: array(CollectionColumnSchema).readonly(),
13218
+ indexes: array(CollectionIndexSchema).readonly().optional(),
13219
+ database: DataStoreDatabaseSchema.optional(),
13220
+ primaryKey: array(string()).readonly().optional(),
13221
+ withoutRowid: boolean().optional()
13222
+ });
13223
+ method(object({
13224
+ namespace: string().optional(),
13225
+ collection: string(),
13226
+ key: string()
13227
+ }), unknown(), { auth: "admin" }), method(object({
13228
+ namespace: string().optional(),
13229
+ collection: string(),
13230
+ key: string(),
13231
+ value: unknown()
13232
+ }), _void(), {
13233
+ kind: "mutation",
13234
+ auth: "admin"
13235
+ }), method(object({
13236
+ namespace: string().optional(),
13237
+ collection: string(),
13238
+ filter: QueryFilterSchema.optional(),
13239
+ columns: array(string()).readonly().optional()
13240
+ }), array(SettingsRecordSchema).readonly(), { auth: "admin" }), method(object({
13241
+ namespace: string().optional(),
13242
+ collection: string(),
13243
+ /** Declared columns identifying the slot; must be covered by a UNIQUE
13244
+ * index on the collection. Never empty. */
13245
+ conflict: array(string()).readonly(),
13246
+ record: BulkRecordSchema
13247
+ }), object({
13248
+ /** The id the row HAS: assigned by SQLite on an insert, or the existing
13249
+ * row's own id on an update. */
13250
+ id: union([string(), number()]) }), {
13251
+ kind: "mutation",
13252
+ auth: "admin"
13253
+ }), method(object({
13254
+ namespace: string().optional(),
13255
+ collection: string(),
13256
+ conflict: array(string()).readonly(),
13257
+ records: array(BulkRecordSchema).readonly()
13258
+ }), object({ upserted: number().int() }), {
13259
+ kind: "mutation",
13260
+ auth: "admin"
13261
+ }), method(object({
13262
+ namespace: string().optional(),
13263
+ collection: string(),
13264
+ record: object({
13265
+ id: string().optional(),
13266
+ data: record(string(), unknown())
13267
+ })
13268
+ }), object({
13269
+ /**
13270
+ * The id the row ACTUALLY got (D473): the one supplied, the UUID minted
13271
+ * for an absent one, or the ROWID SQLite assigned on an `INTEGER`
13272
+ * primary key — which is the only place an auto key is knowable.
13273
+ */
13274
+ id: union([string(), number()]) }), {
13275
+ kind: "mutation",
13276
+ auth: "admin"
13277
+ }), method(object({
13278
+ namespace: string().optional(),
13279
+ collection: string(),
13280
+ records: array(BulkRecordSchema).readonly()
13281
+ }), object({ inserted: number().int() }), {
13282
+ kind: "mutation",
13283
+ auth: "admin"
13284
+ }), method(object({
13285
+ namespace: string().optional(),
13286
+ guard: TransactGuardSchema.optional(),
13287
+ ops: array(TransactOpSchema).readonly()
13288
+ }), object({
13289
+ applied: boolean(),
13290
+ current: unknown().optional()
13291
+ }), {
13292
+ kind: "mutation",
13293
+ auth: "admin"
13294
+ }), method(object({
13295
+ namespace: string().optional(),
13296
+ collection: string(),
13297
+ id: string(),
13298
+ data: record(string(), unknown())
13299
+ }), _void(), {
13300
+ kind: "mutation",
13301
+ auth: "admin"
13302
+ }), method(object({
13303
+ namespace: string().optional(),
13304
+ collection: string(),
13305
+ key: string()
13306
+ }), _void(), {
13307
+ kind: "mutation",
13308
+ auth: "admin"
13309
+ }), method(object({
13310
+ namespace: string().optional(),
13311
+ collection: string(),
13312
+ filter: MutationFilterSchema
13313
+ }), object({ deleted: number().int() }), {
13314
+ kind: "mutation",
13315
+ auth: "admin"
13316
+ }), method(object({
13317
+ namespace: string().optional(),
13318
+ collection: string(),
13319
+ filter: MutationFilterSchema,
13320
+ data: record(string(), unknown())
13321
+ }), object({ updated: number().int() }), {
13322
+ kind: "mutation",
13323
+ auth: "admin"
13324
+ }), method(object({
13325
+ namespace: string().optional(),
13326
+ collection: string(),
13327
+ filter: QueryFilterSchema.optional()
13328
+ }), number(), { auth: "admin" }), method(object({
13329
+ namespace: string().optional(),
13330
+ collection: string(),
13331
+ fields: array(AggregateFieldSchema).readonly(),
13332
+ filter: QueryFilterSchema.optional()
13333
+ }), AggregateResultSchema, { auth: "admin" }), method(object({
13334
+ namespace: string().optional(),
13335
+ collection: string(),
13336
+ field: string(),
13337
+ bucketSize: number().int().positive(),
13338
+ origin: number().int(),
13339
+ filter: QueryFilterSchema.optional()
13340
+ }), array(object({
13341
+ bucket: number().int(),
13342
+ count: number().int()
13343
+ })).readonly(), { auth: "admin" }), method(object({
13344
+ namespace: string().optional(),
13345
+ collection: string()
13346
+ }), boolean(), { auth: "admin" }), method(DeclareCollectionInputSchema, _void(), {
13347
+ kind: "mutation",
13348
+ auth: "admin"
13349
+ });
13350
+ /**
13028
13351
  * How long one snapshot may take end to end: the pinned copy of the whole
13029
13352
  * database plus `PRAGMA integrity_check` over the copy, on the hub's slowest
13030
13353
  * disk. ~800 MB at a pessimistic 10 MB/s is under 3 minutes; the bound is
@@ -13037,7 +13360,11 @@ var DATABASE_SNAPSHOT_TIMEOUT_MS = 30 * 6e4;
13037
13360
  * database has no sidecars and is just as owned). Paths are absolute on the
13038
13361
  * owner's host.
13039
13362
  */
13040
- var DatabaseSnapshotTargetsSchema = object({ databases: array(object({ livePath: string() })) });
13363
+ var DatabaseSnapshotTargetsSchema = object({ databases: array(object({
13364
+ /** Which owned file this is — the handle `writeSnapshot` takes. */
13365
+ databaseId: DataStoreDatabaseSchema,
13366
+ livePath: string()
13367
+ })) });
13041
13368
  /** One b-tree table of the snapshot and the rows it holds. */
13042
13369
  var DatabaseSnapshotTableSchema = object({
13043
13370
  name: string(),
@@ -13070,6 +13397,10 @@ var DatabaseSnapshotResultSchema = object({
13070
13397
  /** When the pinned read transaction began (ms epoch) — the snapshot's instant. */
13071
13398
  takenAt: number()
13072
13399
  });
13400
+ /** A snapshot the owner wrote, with the file it belongs to. */
13401
+ var DatabaseSnapshotWrittenSchema = DatabaseSnapshotResultSchema.extend({ databaseId: DataStoreDatabaseSchema });
13402
+ /** Which database `writeSnapshot` copies. Required: an unstated ask is not guessed. */
13403
+ var DatabaseSnapshotRequestSchema = object({ databaseId: DataStoreDatabaseSchema });
13073
13404
  /**
13074
13405
  * A snapshot as an ARCHIVE records it (`ArchiveManifest.sqliteSnapshots`):
13075
13406
  * the same facts, with both paths relative to the archive root (the node's
@@ -13079,9 +13410,11 @@ var ArchiveSqliteSnapshotSchema = DatabaseSnapshotResultSchema.extend({
13079
13410
  /** Archive-relative path of the live database the archive does NOT carry. */
13080
13411
  livePath: string(),
13081
13412
  /** Archive-relative path of the verified copy it carries in its place. */
13082
- snapshotPath: string()
13413
+ snapshotPath: string(),
13414
+ /** Absent on an archive made before several files were owned: that was `settings`. */
13415
+ databaseId: DataStoreDatabaseSchema.optional()
13083
13416
  });
13084
- method(object({}), DatabaseSnapshotTargetsSchema, { auth: "admin" }), method(object({}), DatabaseSnapshotResultSchema, {
13417
+ method(object({}), DatabaseSnapshotTargetsSchema, { auth: "admin" }), method(DatabaseSnapshotRequestSchema, DatabaseSnapshotWrittenSchema, {
13085
13418
  kind: "mutation",
13086
13419
  auth: "admin",
13087
13420
  timeoutMs: DATABASE_SNAPSHOT_TIMEOUT_MS
@@ -13202,7 +13535,12 @@ var BackupArchiveEntrySchema = object({
13202
13535
  /** Top-level locations included in the archive (db, addons, tls, …). */
13203
13536
  locations: array(string()).readonly(),
13204
13537
  /** Present when the archive is encrypted; restore then needs that key. */
13205
- encryption: BackupArchiveEncryptionSchema.optional()
13538
+ encryption: BackupArchiveEncryptionSchema.optional(),
13539
+ /**
13540
+ * The databases the run asked to carry (its retention class). Absent on an
13541
+ * archive made before several files were owned: that was `['settings']`.
13542
+ */
13543
+ databases: array(DataStoreDatabaseSchema).readonly().optional()
13206
13544
  });
13207
13545
  var BackupEntrySchema = object({
13208
13546
  id: string(),
@@ -13236,7 +13574,12 @@ var ArchiveManifestSchema = object({
13236
13574
  * Live SQLite databases this archive carries as their OWNER's verified
13237
13575
  * snapshot instead of as files (D693). Absent on archives made before.
13238
13576
  */
13239
- sqliteSnapshots: array(ArchiveSqliteSnapshotSchema).optional()
13577
+ sqliteSnapshots: array(ArchiveSqliteSnapshotSchema).optional(),
13578
+ /**
13579
+ * Owned database files the run did NOT carry (not selected): left out of the
13580
+ * tar and the entry list alike. Absent when every owned file was carried.
13581
+ */
13582
+ omittedDatabases: array(DataStoreDatabaseSchema).optional()
13240
13583
  });
13241
13584
  var LocationStatSchema = object({
13242
13585
  name: string(),
@@ -13358,6 +13701,12 @@ var BackupScheduleSchema = object({
13358
13701
  /** Optional subset of source locations to include; omitted = all. */
13359
13702
  dataSources: array(string()).readonly().optional(),
13360
13703
  /**
13704
+ * Which database files this schedule carries. Absent = `['settings']`
13705
+ * (an unstated ask is the minimum, D382). Events and history run weekly,
13706
+ * settings nightly (D852).
13707
+ */
13708
+ databases: array(DataStoreDatabaseSchema).readonly().optional(),
13709
+ /**
13361
13710
  * ms-epoch of the last tick that FIRED this schedule. Stamped before the
13362
13711
  * archive runs (it is the dedupe anchor), so it says "attempted", never
13363
13712
  * "succeeded" — a run refused by every destination stamps it too.
@@ -13381,7 +13730,9 @@ method(_void(), array(BackupDestinationInfoSchema).readonly(), { auth: "admin" }
13381
13730
  * retention). Omitted = each destination's own policy
13382
13731
  * retention (manual runs).
13383
13732
  */
13384
- retentionCount: number().int().min(1).max(1e3).optional()
13733
+ retentionCount: number().int().min(1).max(1e3).optional(),
13734
+ /** Database files to carry; omitted = `['settings']`. */
13735
+ databases: array(DataStoreDatabaseSchema).optional()
13385
13736
  }).optional(), BackupTriggerResultSchema, {
13386
13737
  kind: "mutation",
13387
13738
  auth: "admin"
@@ -13463,7 +13814,8 @@ method(_void(), array(BackupDestinationInfoSchema).readonly(), { auth: "admin" }
13463
13814
  enabled: boolean(),
13464
13815
  locationIds: array(string()).readonly(),
13465
13816
  retentionCount: number().int().min(1).max(1e3),
13466
- dataSources: array(string()).readonly().optional()
13817
+ dataSources: array(string()).readonly().optional(),
13818
+ databases: array(DataStoreDatabaseSchema).readonly().optional()
13467
13819
  }), BackupScheduleSchema, {
13468
13820
  kind: "mutation",
13469
13821
  auth: "admin"
@@ -15130,329 +15482,6 @@ method(_void(), array(CustomModelDescriptorSchema).readonly(), { auth: "admin" }
15130
15482
  timeoutMs: 30 * 6e4
15131
15483
  });
15132
15484
  /**
15133
- * Query filter for settings-store collections.
15134
- */
15135
- var QueryFilterSchema = object({
15136
- where: record(string(), unknown()).optional(),
15137
- whereIn: record(string(), array(unknown())).optional(),
15138
- whereBetween: record(string(), tuple([unknown(), unknown()])).optional(),
15139
- /** NULL-safe exclusion: matches rows whose field is NULL OR != the value. */
15140
- whereNot: record(string(), unknown()).optional(),
15141
- /** NULL-safe exclusion of a SET — `whereNot` for more than one value. An
15142
- * empty list excludes nothing. See `QueryFilter.whereNotIn`. */
15143
- whereNotIn: record(string(), array(unknown())).optional(),
15144
- orderBy: object({
15145
- field: string(),
15146
- direction: _enum(["asc", "desc"])
15147
- }).optional(),
15148
- limit: number().optional(),
15149
- offset: number().optional()
15150
- });
15151
- /**
15152
- * The predicate half of a filter, for BULK MUTATIONS.
15153
- *
15154
- * Deliberately not `QueryFilterSchema`: `orderBy` / `limit` / `offset` have no
15155
- * meaning for a statement that rewrites a set, and accepting them would invite
15156
- * a caller to believe `limit` bounds the damage. Every field is optional here
15157
- * only so the shape stays composable — the implementation REJECTS a filter
15158
- * that compiles to no predicate, because that is the whole collection.
15159
- */
15160
- var MutationFilterSchema = object({
15161
- where: record(string(), unknown()).optional(),
15162
- whereIn: record(string(), array(unknown())).optional(),
15163
- whereBetween: record(string(), tuple([unknown(), unknown()])).optional(),
15164
- whereNot: record(string(), unknown()).optional(),
15165
- whereNotIn: record(string(), array(unknown())).optional()
15166
- });
15167
- /**
15168
- * One scalar an {@link settingsStoreCapability.methods.aggregate} call asks for.
15169
- *
15170
- * `as` names the slot in the result, so the SAME column may be asked twice with
15171
- * two operations (`MIN(startMs)` and `MAX(startMs)` in one round trip) — which
15172
- * a `Record<column, op>` shape could not express.
15173
- */
15174
- var AggregateFieldSchema = object({
15175
- /** Result key. */
15176
- as: string().min(1),
15177
- /** Column to aggregate. Must be a real column of a declared collection. */
15178
- field: string().min(1),
15179
- op: _enum([
15180
- "sum",
15181
- "min",
15182
- "max"
15183
- ])
15184
- });
15185
- /**
15186
- * `COUNT(*)` plus one number per requested field.
15187
- *
15188
- * `null` means NO ROW MATCHED, never zero: a `SUM` over an empty set and a sum
15189
- * that really is 0 are different facts, and an accounting caller that renders
15190
- * "0 bytes, oldest = 0" for "nothing here" reports a lie about a disk.
15191
- */
15192
- var AggregateResultSchema = object({
15193
- count: number().int(),
15194
- values: record(string(), number().nullable())
15195
- });
15196
- /** A single stored record: `{ id, data }`. */
15197
- var SettingsRecordSchema = object({
15198
- id: string(),
15199
- data: record(string(), unknown())
15200
- });
15201
- /**
15202
- * One record of a BULK insert — {@link SettingsRecordSchema} with the id made
15203
- * optional.
15204
- *
15205
- * A separate schema rather than loosening the shared one: every other method
15206
- * on this cap addresses a row BY its id, and making that field optional
15207
- * everywhere would turn a forgotten key into a silently generated one on
15208
- * `update` and `delete` as well.
15209
- */
15210
- var BulkRecordSchema = object({
15211
- id: string().optional(),
15212
- data: record(string(), unknown())
15213
- });
15214
- /**
15215
- * The database FILES one `sqlite-settings` engine process owns (D851).
15216
- * Closed on purpose: a file is a thing the engine opens, backs up and gives a
15217
- * serving thread, so a new one is a code change, never a string a caller
15218
- * invents. `settings` is `camstack.db` and the default for every collection
15219
- * that names no file.
15220
- */
15221
- var DataStoreDatabaseSchema = _enum([
15222
- "settings",
15223
- "events",
15224
- "history"
15225
- ]);
15226
- DataStoreDatabaseSchema.options;
15227
- /**
15228
- * One write inside a {@link settingsStoreCapability.methods.transact} call.
15229
- * The three that a "replace this set, bump that revision" write needs, plus
15230
- * the batched upsert a rollup writer needs.
15231
- */
15232
- var TransactOpSchema = discriminatedUnion("op", [
15233
- object({
15234
- op: literal("deleteWhere"),
15235
- collection: string(),
15236
- filter: MutationFilterSchema
15237
- }),
15238
- object({
15239
- op: literal("insertMany"),
15240
- collection: string(),
15241
- records: array(BulkRecordSchema).readonly()
15242
- }),
15243
- object({
15244
- op: literal("update"),
15245
- collection: string(),
15246
- id: string(),
15247
- data: record(string(), unknown())
15248
- }),
15249
- object({
15250
- op: literal("upsertMany"),
15251
- collection: string(),
15252
- conflict: array(string()).readonly(),
15253
- records: array(BulkRecordSchema).readonly()
15254
- })
15255
- ]);
15256
- /**
15257
- * The precondition of a transaction: the row `key` of `collection` must hold
15258
- * `equals` in `column`, read INSIDE the transaction.
15259
- */
15260
- var TransactGuardSchema = object({
15261
- collection: string(),
15262
- key: string(),
15263
- column: string(),
15264
- equals: unknown()
15265
- });
15266
- /**
15267
- * Column declaration for a structured (SQL-backed) collection.
15268
- *
15269
- * Logical types — the backend translates each to the matching SQLite
15270
- * storage class and handles per-type marshaling:
15271
- * - `TEXT` / `INTEGER` / `REAL` — native SQLite types, pass-through
15272
- * - `JSON` — TEXT under the hood; serialised on write, parsed on read
15273
- * - `BOOLEAN` — INTEGER 0/1 under the hood; coerced both directions
15274
- */
15275
- var CollectionColumnSchema = object({
15276
- name: string(),
15277
- type: _enum([
15278
- "TEXT",
15279
- "INTEGER",
15280
- "REAL",
15281
- "JSON",
15282
- "BOOLEAN"
15283
- ]),
15284
- primaryKey: boolean().optional(),
15285
- notNull: boolean().optional(),
15286
- unique: boolean().optional(),
15287
- /**
15288
- * Column DEFAULT. Required for B2: the four `ensureTable` consumers declare
15289
- * columns like `enabled INTEGER NOT NULL DEFAULT 1`, and without this the
15290
- * collection surface simply cannot express their existing tables — which is
15291
- * why they were still on the uncapped `table*` API.
15292
- */
15293
- defaultValue: union([
15294
- string(),
15295
- number(),
15296
- boolean()
15297
- ]).optional()
15298
- });
15299
- var CollectionIndexSchema = object({
15300
- name: string(),
15301
- columns: array(string()).readonly(),
15302
- unique: boolean().optional()
15303
- });
15304
- /**
15305
- * The input of `declareCollection` — ONE schema for the door and for the
15306
- * engine behind it, so the two surfaces cannot drift (the dispatcher forwards
15307
- * the payload untouched).
15308
- *
15309
- * - `database` — the file the collection lives in (D851). Absent means
15310
- * `settings`. A declaration naming a file other than the one the table is
15311
- * already in is REFUSED by the engine, never moved.
15312
- * - `primaryKey` — a COMPOSITE key, as column names. A single name is the same
15313
- * as `primaryKey: true` on that column. A composite-keyed collection has no
15314
- * `id`: it is written with `insertMany` / `upsertMany` / `transact` and read
15315
- * with `query` / `count` / `aggregate` / `deleteWhere`; the calls that
15316
- * address one row by id are refused.
15317
- * - `withoutRowid` — emit `WITHOUT ROWID`. Requires a primary key.
15318
- */
15319
- var DeclareCollectionInputSchema = object({
15320
- namespace: string().optional(),
15321
- collection: string(),
15322
- columns: array(CollectionColumnSchema).readonly(),
15323
- indexes: array(CollectionIndexSchema).readonly().optional(),
15324
- database: DataStoreDatabaseSchema.optional(),
15325
- primaryKey: array(string()).readonly().optional(),
15326
- withoutRowid: boolean().optional()
15327
- });
15328
- method(object({
15329
- namespace: string().optional(),
15330
- collection: string(),
15331
- key: string()
15332
- }), unknown(), { auth: "admin" }), method(object({
15333
- namespace: string().optional(),
15334
- collection: string(),
15335
- key: string(),
15336
- value: unknown()
15337
- }), _void(), {
15338
- kind: "mutation",
15339
- auth: "admin"
15340
- }), method(object({
15341
- namespace: string().optional(),
15342
- collection: string(),
15343
- filter: QueryFilterSchema.optional(),
15344
- columns: array(string()).readonly().optional()
15345
- }), array(SettingsRecordSchema).readonly(), { auth: "admin" }), method(object({
15346
- namespace: string().optional(),
15347
- collection: string(),
15348
- /** Declared columns identifying the slot; must be covered by a UNIQUE
15349
- * index on the collection. Never empty. */
15350
- conflict: array(string()).readonly(),
15351
- record: BulkRecordSchema
15352
- }), object({
15353
- /** The id the row HAS: assigned by SQLite on an insert, or the existing
15354
- * row's own id on an update. */
15355
- id: union([string(), number()]) }), {
15356
- kind: "mutation",
15357
- auth: "admin"
15358
- }), method(object({
15359
- namespace: string().optional(),
15360
- collection: string(),
15361
- conflict: array(string()).readonly(),
15362
- records: array(BulkRecordSchema).readonly()
15363
- }), object({ upserted: number().int() }), {
15364
- kind: "mutation",
15365
- auth: "admin"
15366
- }), method(object({
15367
- namespace: string().optional(),
15368
- collection: string(),
15369
- record: object({
15370
- id: string().optional(),
15371
- data: record(string(), unknown())
15372
- })
15373
- }), object({
15374
- /**
15375
- * The id the row ACTUALLY got (D473): the one supplied, the UUID minted
15376
- * for an absent one, or the ROWID SQLite assigned on an `INTEGER`
15377
- * primary key — which is the only place an auto key is knowable.
15378
- */
15379
- id: union([string(), number()]) }), {
15380
- kind: "mutation",
15381
- auth: "admin"
15382
- }), method(object({
15383
- namespace: string().optional(),
15384
- collection: string(),
15385
- records: array(BulkRecordSchema).readonly()
15386
- }), object({ inserted: number().int() }), {
15387
- kind: "mutation",
15388
- auth: "admin"
15389
- }), method(object({
15390
- namespace: string().optional(),
15391
- guard: TransactGuardSchema.optional(),
15392
- ops: array(TransactOpSchema).readonly()
15393
- }), object({
15394
- applied: boolean(),
15395
- current: unknown().optional()
15396
- }), {
15397
- kind: "mutation",
15398
- auth: "admin"
15399
- }), method(object({
15400
- namespace: string().optional(),
15401
- collection: string(),
15402
- id: string(),
15403
- data: record(string(), unknown())
15404
- }), _void(), {
15405
- kind: "mutation",
15406
- auth: "admin"
15407
- }), method(object({
15408
- namespace: string().optional(),
15409
- collection: string(),
15410
- key: string()
15411
- }), _void(), {
15412
- kind: "mutation",
15413
- auth: "admin"
15414
- }), method(object({
15415
- namespace: string().optional(),
15416
- collection: string(),
15417
- filter: MutationFilterSchema
15418
- }), object({ deleted: number().int() }), {
15419
- kind: "mutation",
15420
- auth: "admin"
15421
- }), method(object({
15422
- namespace: string().optional(),
15423
- collection: string(),
15424
- filter: MutationFilterSchema,
15425
- data: record(string(), unknown())
15426
- }), object({ updated: number().int() }), {
15427
- kind: "mutation",
15428
- auth: "admin"
15429
- }), method(object({
15430
- namespace: string().optional(),
15431
- collection: string(),
15432
- filter: QueryFilterSchema.optional()
15433
- }), number(), { auth: "admin" }), method(object({
15434
- namespace: string().optional(),
15435
- collection: string(),
15436
- fields: array(AggregateFieldSchema).readonly(),
15437
- filter: QueryFilterSchema.optional()
15438
- }), AggregateResultSchema, { auth: "admin" }), method(object({
15439
- namespace: string().optional(),
15440
- collection: string(),
15441
- field: string(),
15442
- bucketSize: number().int().positive(),
15443
- origin: number().int(),
15444
- filter: QueryFilterSchema.optional()
15445
- }), array(object({
15446
- bucket: number().int(),
15447
- count: number().int()
15448
- })).readonly(), { auth: "admin" }), method(object({
15449
- namespace: string().optional(),
15450
- collection: string()
15451
- }), boolean(), { auth: "admin" }), method(DeclareCollectionInputSchema, _void(), {
15452
- kind: "mutation",
15453
- auth: "admin"
15454
- });
15455
- /**
15456
15485
  * What one engine says about itself. The orchestrator uses `kind` to pick
15457
15486
  * a registrant for a collection; `engineId` is what a log line names when
15458
15487
  * a call is routed or refused.
@@ -53140,7 +53169,7 @@ var AdminUIAddon = class extends BaseAddon {
53140
53169
  capability: adminUiCapability,
53141
53170
  provider: {
53142
53171
  getStaticDir: async () => ({ staticDir: resolveAdminUiDistDir() }),
53143
- getVersion: async () => ({ version: "1.2.414" })
53172
+ getVersion: async () => ({ version: "1.2.415" })
53144
53173
  }
53145
53174
  }];
53146
53175
  }