@camstack/addon-training 0.1.38 → 0.1.40

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 (24) hide show
  1. package/dist/{MotionZonesSettings-D3OhWtEJ.mjs → MotionZonesSettings-DBtAXpEm.mjs} +3 -3
  2. package/dist/{PrivacyMaskSettings-D5a0tK5y.mjs → PrivacyMaskSettings-C3tyM8s9.mjs} +4 -4
  3. package/dist/{SceneMonitorEditor-RWeMMIUm.mjs → SceneMonitorEditor-D6Q3z17B.mjs} +3 -3
  4. package/dist/_stub.js +13 -13
  5. package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_training_page-D_GAsIra.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_training_page-CHYHBYUh.mjs} +3 -3
  6. package/dist/_virtual_mf___mfe_internal__addon_training_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-NCFNuw0Q.mjs +26 -0
  7. package/dist/{dist-CxvYt5PP.js → dist-CJXTMYT2.js} +411 -291
  8. package/dist/{dist-C4t8abQo.mjs → dist-CbTzxq0W.mjs} +411 -291
  9. package/dist/{grid-2x2-BFM3iXou.mjs → grid-2x2-tkDBCRad.mjs} +1 -1
  10. package/dist/{hostInit-CqaQP3BW.mjs → hostInit-GIXFhqMx.mjs} +2 -2
  11. package/dist/index.js +1 -1
  12. package/dist/orchestrator/training.addon.js +1 -1
  13. package/dist/orchestrator/training.addon.mjs +1 -1
  14. package/dist/{player-overlays-BTkYq6-O.mjs → player-overlays-DMLlEwmn.mjs} +1 -1
  15. package/dist/providers/modal/training-modal.addon.js +1 -1
  16. package/dist/providers/modal/training-modal.addon.mjs +1 -1
  17. package/dist/remoteEntry.js +1 -1
  18. package/dist/{responsive-BBw-VKsK.mjs → responsive-C0tM8Z6S.mjs} +1 -1
  19. package/dist/{scene-monitor-copy-DRCqH33h.mjs → scene-monitor-copy-B-6xPmDm.mjs} +1 -1
  20. package/dist/{square-C1cboEBq.mjs → square-D49AvsjC.mjs} +1 -1
  21. package/dist/{trash-2-8N-Lzjyo.mjs → trash-2-BwTJ2h2p.mjs} +1 -1
  22. package/dist/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_training_page__remoteEntry_js-B31_EXdz.mjs → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_training_page__remoteEntry_js-B3ZFopEz.mjs} +1 -1
  23. package/package.json +1 -1
  24. package/dist/_virtual_mf___mfe_internal__addon_training_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-DJjJv3yI.mjs +0 -26
@@ -13041,6 +13041,329 @@ method(object({
13041
13041
  password: string()
13042
13042
  }), AuthResultSchema.nullable(), { kind: "mutation" }), method(object({ state: string() }), string()), method(record(string(), string()), AuthResultSchema, { kind: "mutation" }), method(object({ token: string() }), AuthResultSchema.nullable());
13043
13043
  /**
13044
+ * Query filter for settings-store collections.
13045
+ */
13046
+ var QueryFilterSchema = object({
13047
+ where: record(string(), unknown()).optional(),
13048
+ whereIn: record(string(), array(unknown())).optional(),
13049
+ whereBetween: record(string(), tuple([unknown(), unknown()])).optional(),
13050
+ /** NULL-safe exclusion: matches rows whose field is NULL OR != the value. */
13051
+ whereNot: record(string(), unknown()).optional(),
13052
+ /** NULL-safe exclusion of a SET — `whereNot` for more than one value. An
13053
+ * empty list excludes nothing. See `QueryFilter.whereNotIn`. */
13054
+ whereNotIn: record(string(), array(unknown())).optional(),
13055
+ orderBy: object({
13056
+ field: string(),
13057
+ direction: _enum(["asc", "desc"])
13058
+ }).optional(),
13059
+ limit: number().optional(),
13060
+ offset: number().optional()
13061
+ });
13062
+ /**
13063
+ * The predicate half of a filter, for BULK MUTATIONS.
13064
+ *
13065
+ * Deliberately not `QueryFilterSchema`: `orderBy` / `limit` / `offset` have no
13066
+ * meaning for a statement that rewrites a set, and accepting them would invite
13067
+ * a caller to believe `limit` bounds the damage. Every field is optional here
13068
+ * only so the shape stays composable — the implementation REJECTS a filter
13069
+ * that compiles to no predicate, because that is the whole collection.
13070
+ */
13071
+ var MutationFilterSchema = object({
13072
+ where: record(string(), unknown()).optional(),
13073
+ whereIn: record(string(), array(unknown())).optional(),
13074
+ whereBetween: record(string(), tuple([unknown(), unknown()])).optional(),
13075
+ whereNot: record(string(), unknown()).optional(),
13076
+ whereNotIn: record(string(), array(unknown())).optional()
13077
+ });
13078
+ /**
13079
+ * One scalar an {@link settingsStoreCapability.methods.aggregate} call asks for.
13080
+ *
13081
+ * `as` names the slot in the result, so the SAME column may be asked twice with
13082
+ * two operations (`MIN(startMs)` and `MAX(startMs)` in one round trip) — which
13083
+ * a `Record<column, op>` shape could not express.
13084
+ */
13085
+ var AggregateFieldSchema = object({
13086
+ /** Result key. */
13087
+ as: string().min(1),
13088
+ /** Column to aggregate. Must be a real column of a declared collection. */
13089
+ field: string().min(1),
13090
+ op: _enum([
13091
+ "sum",
13092
+ "min",
13093
+ "max"
13094
+ ])
13095
+ });
13096
+ /**
13097
+ * `COUNT(*)` plus one number per requested field.
13098
+ *
13099
+ * `null` means NO ROW MATCHED, never zero: a `SUM` over an empty set and a sum
13100
+ * that really is 0 are different facts, and an accounting caller that renders
13101
+ * "0 bytes, oldest = 0" for "nothing here" reports a lie about a disk.
13102
+ */
13103
+ var AggregateResultSchema = object({
13104
+ count: number().int(),
13105
+ values: record(string(), number().nullable())
13106
+ });
13107
+ /** A single stored record: `{ id, data }`. */
13108
+ var SettingsRecordSchema = object({
13109
+ id: string(),
13110
+ data: record(string(), unknown())
13111
+ });
13112
+ /**
13113
+ * One record of a BULK insert — {@link SettingsRecordSchema} with the id made
13114
+ * optional.
13115
+ *
13116
+ * A separate schema rather than loosening the shared one: every other method
13117
+ * on this cap addresses a row BY its id, and making that field optional
13118
+ * everywhere would turn a forgotten key into a silently generated one on
13119
+ * `update` and `delete` as well.
13120
+ */
13121
+ var BulkRecordSchema = object({
13122
+ id: string().optional(),
13123
+ data: record(string(), unknown())
13124
+ });
13125
+ /**
13126
+ * The database FILES one `sqlite-settings` engine process owns (D851).
13127
+ * Closed on purpose: a file is a thing the engine opens, backs up and gives a
13128
+ * serving thread, so a new one is a code change, never a string a caller
13129
+ * invents. `settings` is `camstack.db` and the default for every collection
13130
+ * that names no file.
13131
+ */
13132
+ var DataStoreDatabaseSchema = _enum([
13133
+ "settings",
13134
+ "events",
13135
+ "history"
13136
+ ]);
13137
+ DataStoreDatabaseSchema.options;
13138
+ /**
13139
+ * One write inside a {@link settingsStoreCapability.methods.transact} call.
13140
+ * The three that a "replace this set, bump that revision" write needs, plus
13141
+ * the batched upsert a rollup writer needs.
13142
+ */
13143
+ var TransactOpSchema = discriminatedUnion("op", [
13144
+ object({
13145
+ op: literal("deleteWhere"),
13146
+ collection: string(),
13147
+ filter: MutationFilterSchema
13148
+ }),
13149
+ object({
13150
+ op: literal("insertMany"),
13151
+ collection: string(),
13152
+ records: array(BulkRecordSchema).readonly()
13153
+ }),
13154
+ object({
13155
+ op: literal("update"),
13156
+ collection: string(),
13157
+ id: string(),
13158
+ data: record(string(), unknown())
13159
+ }),
13160
+ object({
13161
+ op: literal("upsertMany"),
13162
+ collection: string(),
13163
+ conflict: array(string()).readonly(),
13164
+ records: array(BulkRecordSchema).readonly()
13165
+ })
13166
+ ]);
13167
+ /**
13168
+ * The precondition of a transaction: the row `key` of `collection` must hold
13169
+ * `equals` in `column`, read INSIDE the transaction.
13170
+ */
13171
+ var TransactGuardSchema = object({
13172
+ collection: string(),
13173
+ key: string(),
13174
+ column: string(),
13175
+ equals: unknown()
13176
+ });
13177
+ /**
13178
+ * Column declaration for a structured (SQL-backed) collection.
13179
+ *
13180
+ * Logical types — the backend translates each to the matching SQLite
13181
+ * storage class and handles per-type marshaling:
13182
+ * - `TEXT` / `INTEGER` / `REAL` — native SQLite types, pass-through
13183
+ * - `JSON` — TEXT under the hood; serialised on write, parsed on read
13184
+ * - `BOOLEAN` — INTEGER 0/1 under the hood; coerced both directions
13185
+ */
13186
+ var CollectionColumnSchema = object({
13187
+ name: string(),
13188
+ type: _enum([
13189
+ "TEXT",
13190
+ "INTEGER",
13191
+ "REAL",
13192
+ "JSON",
13193
+ "BOOLEAN"
13194
+ ]),
13195
+ primaryKey: boolean().optional(),
13196
+ notNull: boolean().optional(),
13197
+ unique: boolean().optional(),
13198
+ /**
13199
+ * Column DEFAULT. Required for B2: the four `ensureTable` consumers declare
13200
+ * columns like `enabled INTEGER NOT NULL DEFAULT 1`, and without this the
13201
+ * collection surface simply cannot express their existing tables — which is
13202
+ * why they were still on the uncapped `table*` API.
13203
+ */
13204
+ defaultValue: union([
13205
+ string(),
13206
+ number(),
13207
+ boolean()
13208
+ ]).optional()
13209
+ });
13210
+ var CollectionIndexSchema = object({
13211
+ name: string(),
13212
+ columns: array(string()).readonly(),
13213
+ unique: boolean().optional()
13214
+ });
13215
+ /**
13216
+ * The input of `declareCollection` — ONE schema for the door and for the
13217
+ * engine behind it, so the two surfaces cannot drift (the dispatcher forwards
13218
+ * the payload untouched).
13219
+ *
13220
+ * - `database` — the file the collection lives in (D851). Absent means
13221
+ * `settings`. A declaration naming a file other than the one the table is
13222
+ * already in is REFUSED by the engine, never moved.
13223
+ * - `primaryKey` — a COMPOSITE key, as column names. A single name is the same
13224
+ * as `primaryKey: true` on that column. A composite-keyed collection has no
13225
+ * `id`: it is written with `insertMany` / `upsertMany` / `transact` and read
13226
+ * with `query` / `count` / `aggregate` / `deleteWhere`; the calls that
13227
+ * address one row by id are refused.
13228
+ * - `withoutRowid` — emit `WITHOUT ROWID`. Requires a primary key.
13229
+ */
13230
+ var DeclareCollectionInputSchema = object({
13231
+ namespace: string().optional(),
13232
+ collection: string(),
13233
+ columns: array(CollectionColumnSchema).readonly(),
13234
+ indexes: array(CollectionIndexSchema).readonly().optional(),
13235
+ database: DataStoreDatabaseSchema.optional(),
13236
+ primaryKey: array(string()).readonly().optional(),
13237
+ withoutRowid: boolean().optional()
13238
+ });
13239
+ method(object({
13240
+ namespace: string().optional(),
13241
+ collection: string(),
13242
+ key: string()
13243
+ }), unknown(), { auth: "admin" }), method(object({
13244
+ namespace: string().optional(),
13245
+ collection: string(),
13246
+ key: string(),
13247
+ value: unknown()
13248
+ }), _void(), {
13249
+ kind: "mutation",
13250
+ auth: "admin"
13251
+ }), method(object({
13252
+ namespace: string().optional(),
13253
+ collection: string(),
13254
+ filter: QueryFilterSchema.optional(),
13255
+ columns: array(string()).readonly().optional()
13256
+ }), array(SettingsRecordSchema).readonly(), { auth: "admin" }), method(object({
13257
+ namespace: string().optional(),
13258
+ collection: string(),
13259
+ /** Declared columns identifying the slot; must be covered by a UNIQUE
13260
+ * index on the collection. Never empty. */
13261
+ conflict: array(string()).readonly(),
13262
+ record: BulkRecordSchema
13263
+ }), object({
13264
+ /** The id the row HAS: assigned by SQLite on an insert, or the existing
13265
+ * row's own id on an update. */
13266
+ id: union([string(), number()]) }), {
13267
+ kind: "mutation",
13268
+ auth: "admin"
13269
+ }), method(object({
13270
+ namespace: string().optional(),
13271
+ collection: string(),
13272
+ conflict: array(string()).readonly(),
13273
+ records: array(BulkRecordSchema).readonly()
13274
+ }), object({ upserted: number().int() }), {
13275
+ kind: "mutation",
13276
+ auth: "admin"
13277
+ }), method(object({
13278
+ namespace: string().optional(),
13279
+ collection: string(),
13280
+ record: object({
13281
+ id: string().optional(),
13282
+ data: record(string(), unknown())
13283
+ })
13284
+ }), object({
13285
+ /**
13286
+ * The id the row ACTUALLY got (D473): the one supplied, the UUID minted
13287
+ * for an absent one, or the ROWID SQLite assigned on an `INTEGER`
13288
+ * primary key — which is the only place an auto key is knowable.
13289
+ */
13290
+ id: union([string(), number()]) }), {
13291
+ kind: "mutation",
13292
+ auth: "admin"
13293
+ }), method(object({
13294
+ namespace: string().optional(),
13295
+ collection: string(),
13296
+ records: array(BulkRecordSchema).readonly()
13297
+ }), object({ inserted: number().int() }), {
13298
+ kind: "mutation",
13299
+ auth: "admin"
13300
+ }), method(object({
13301
+ namespace: string().optional(),
13302
+ guard: TransactGuardSchema.optional(),
13303
+ ops: array(TransactOpSchema).readonly()
13304
+ }), object({
13305
+ applied: boolean(),
13306
+ current: unknown().optional()
13307
+ }), {
13308
+ kind: "mutation",
13309
+ auth: "admin"
13310
+ }), method(object({
13311
+ namespace: string().optional(),
13312
+ collection: string(),
13313
+ id: string(),
13314
+ data: record(string(), unknown())
13315
+ }), _void(), {
13316
+ kind: "mutation",
13317
+ auth: "admin"
13318
+ }), method(object({
13319
+ namespace: string().optional(),
13320
+ collection: string(),
13321
+ key: string()
13322
+ }), _void(), {
13323
+ kind: "mutation",
13324
+ auth: "admin"
13325
+ }), method(object({
13326
+ namespace: string().optional(),
13327
+ collection: string(),
13328
+ filter: MutationFilterSchema
13329
+ }), object({ deleted: number().int() }), {
13330
+ kind: "mutation",
13331
+ auth: "admin"
13332
+ }), method(object({
13333
+ namespace: string().optional(),
13334
+ collection: string(),
13335
+ filter: MutationFilterSchema,
13336
+ data: record(string(), unknown())
13337
+ }), object({ updated: number().int() }), {
13338
+ kind: "mutation",
13339
+ auth: "admin"
13340
+ }), method(object({
13341
+ namespace: string().optional(),
13342
+ collection: string(),
13343
+ filter: QueryFilterSchema.optional()
13344
+ }), number(), { auth: "admin" }), method(object({
13345
+ namespace: string().optional(),
13346
+ collection: string(),
13347
+ fields: array(AggregateFieldSchema).readonly(),
13348
+ filter: QueryFilterSchema.optional()
13349
+ }), AggregateResultSchema, { auth: "admin" }), method(object({
13350
+ namespace: string().optional(),
13351
+ collection: string(),
13352
+ field: string(),
13353
+ bucketSize: number().int().positive(),
13354
+ origin: number().int(),
13355
+ filter: QueryFilterSchema.optional()
13356
+ }), array(object({
13357
+ bucket: number().int(),
13358
+ count: number().int()
13359
+ })).readonly(), { auth: "admin" }), method(object({
13360
+ namespace: string().optional(),
13361
+ collection: string()
13362
+ }), boolean(), { auth: "admin" }), method(DeclareCollectionInputSchema, _void(), {
13363
+ kind: "mutation",
13364
+ auth: "admin"
13365
+ });
13366
+ /**
13044
13367
  * How long one snapshot may take end to end: the pinned copy of the whole
13045
13368
  * database plus `PRAGMA integrity_check` over the copy, on the hub's slowest
13046
13369
  * disk. ~800 MB at a pessimistic 10 MB/s is under 3 minutes; the bound is
@@ -13053,7 +13376,11 @@ var DATABASE_SNAPSHOT_TIMEOUT_MS = 30 * 6e4;
13053
13376
  * database has no sidecars and is just as owned). Paths are absolute on the
13054
13377
  * owner's host.
13055
13378
  */
13056
- var DatabaseSnapshotTargetsSchema = object({ databases: array(object({ livePath: string() })) });
13379
+ var DatabaseSnapshotTargetsSchema = object({ databases: array(object({
13380
+ /** Which owned file this is — the handle `writeSnapshot` takes. */
13381
+ databaseId: DataStoreDatabaseSchema,
13382
+ livePath: string()
13383
+ })) });
13057
13384
  /** One b-tree table of the snapshot and the rows it holds. */
13058
13385
  var DatabaseSnapshotTableSchema = object({
13059
13386
  name: string(),
@@ -13086,6 +13413,10 @@ var DatabaseSnapshotResultSchema = object({
13086
13413
  /** When the pinned read transaction began (ms epoch) — the snapshot's instant. */
13087
13414
  takenAt: number()
13088
13415
  });
13416
+ /** A snapshot the owner wrote, with the file it belongs to. */
13417
+ var DatabaseSnapshotWrittenSchema = DatabaseSnapshotResultSchema.extend({ databaseId: DataStoreDatabaseSchema });
13418
+ /** Which database `writeSnapshot` copies. Required: an unstated ask is not guessed. */
13419
+ var DatabaseSnapshotRequestSchema = object({ databaseId: DataStoreDatabaseSchema });
13089
13420
  /**
13090
13421
  * A snapshot as an ARCHIVE records it (`ArchiveManifest.sqliteSnapshots`):
13091
13422
  * the same facts, with both paths relative to the archive root (the node's
@@ -13095,9 +13426,11 @@ var ArchiveSqliteSnapshotSchema = DatabaseSnapshotResultSchema.extend({
13095
13426
  /** Archive-relative path of the live database the archive does NOT carry. */
13096
13427
  livePath: string(),
13097
13428
  /** Archive-relative path of the verified copy it carries in its place. */
13098
- snapshotPath: string()
13429
+ snapshotPath: string(),
13430
+ /** Absent on an archive made before several files were owned: that was `settings`. */
13431
+ databaseId: DataStoreDatabaseSchema.optional()
13099
13432
  });
13100
- method(object({}), DatabaseSnapshotTargetsSchema, { auth: "admin" }), method(object({}), DatabaseSnapshotResultSchema, {
13433
+ method(object({}), DatabaseSnapshotTargetsSchema, { auth: "admin" }), method(DatabaseSnapshotRequestSchema, DatabaseSnapshotWrittenSchema, {
13101
13434
  kind: "mutation",
13102
13435
  auth: "admin",
13103
13436
  timeoutMs: DATABASE_SNAPSHOT_TIMEOUT_MS
@@ -13218,7 +13551,12 @@ var BackupArchiveEntrySchema = object({
13218
13551
  /** Top-level locations included in the archive (db, addons, tls, …). */
13219
13552
  locations: array(string()).readonly(),
13220
13553
  /** Present when the archive is encrypted; restore then needs that key. */
13221
- encryption: BackupArchiveEncryptionSchema.optional()
13554
+ encryption: BackupArchiveEncryptionSchema.optional(),
13555
+ /**
13556
+ * The databases the run asked to carry (its retention class). Absent on an
13557
+ * archive made before several files were owned: that was `['settings']`.
13558
+ */
13559
+ databases: array(DataStoreDatabaseSchema).readonly().optional()
13222
13560
  });
13223
13561
  var BackupEntrySchema = object({
13224
13562
  id: string(),
@@ -13252,7 +13590,12 @@ var ArchiveManifestSchema = object({
13252
13590
  * Live SQLite databases this archive carries as their OWNER's verified
13253
13591
  * snapshot instead of as files (D693). Absent on archives made before.
13254
13592
  */
13255
- sqliteSnapshots: array(ArchiveSqliteSnapshotSchema).optional()
13593
+ sqliteSnapshots: array(ArchiveSqliteSnapshotSchema).optional(),
13594
+ /**
13595
+ * Owned database files the run did NOT carry (not selected): left out of the
13596
+ * tar and the entry list alike. Absent when every owned file was carried.
13597
+ */
13598
+ omittedDatabases: array(DataStoreDatabaseSchema).optional()
13256
13599
  });
13257
13600
  var LocationStatSchema = object({
13258
13601
  name: string(),
@@ -13374,6 +13717,12 @@ var BackupScheduleSchema = object({
13374
13717
  /** Optional subset of source locations to include; omitted = all. */
13375
13718
  dataSources: array(string()).readonly().optional(),
13376
13719
  /**
13720
+ * Which database files this schedule carries. Absent = `['settings']`
13721
+ * (an unstated ask is the minimum, D382). Events and history run weekly,
13722
+ * settings nightly (D852).
13723
+ */
13724
+ databases: array(DataStoreDatabaseSchema).readonly().optional(),
13725
+ /**
13377
13726
  * ms-epoch of the last tick that FIRED this schedule. Stamped before the
13378
13727
  * archive runs (it is the dedupe anchor), so it says "attempted", never
13379
13728
  * "succeeded" — a run refused by every destination stamps it too.
@@ -13397,7 +13746,9 @@ method(_void(), array(BackupDestinationInfoSchema).readonly(), { auth: "admin" }
13397
13746
  * retention). Omitted = each destination's own policy
13398
13747
  * retention (manual runs).
13399
13748
  */
13400
- retentionCount: number().int().min(1).max(1e3).optional()
13749
+ retentionCount: number().int().min(1).max(1e3).optional(),
13750
+ /** Database files to carry; omitted = `['settings']`. */
13751
+ databases: array(DataStoreDatabaseSchema).optional()
13401
13752
  }).optional(), BackupTriggerResultSchema, {
13402
13753
  kind: "mutation",
13403
13754
  auth: "admin"
@@ -13472,14 +13823,18 @@ method(_void(), array(BackupDestinationInfoSchema).readonly(), { auth: "admin" }
13472
13823
  ok: boolean(),
13473
13824
  error: string().optional(),
13474
13825
  nextRuns: array(number()).readonly()
13475
- })), method(_void(), array(BackupScheduleSchema).readonly(), { auth: "admin" }), method(object({
13826
+ })), method(_void(), array(BackupScheduleSchema).readonly(), { auth: "admin" }), method(_void(), object({
13827
+ answered: boolean(),
13828
+ databases: array(DataStoreDatabaseSchema).readonly()
13829
+ }), { auth: "admin" }), method(object({
13476
13830
  id: string().optional(),
13477
13831
  label: string(),
13478
13832
  cron: string(),
13479
13833
  enabled: boolean(),
13480
13834
  locationIds: array(string()).readonly(),
13481
13835
  retentionCount: number().int().min(1).max(1e3),
13482
- dataSources: array(string()).readonly().optional()
13836
+ dataSources: array(string()).readonly().optional(),
13837
+ databases: array(DataStoreDatabaseSchema).readonly().optional()
13483
13838
  }), BackupScheduleSchema, {
13484
13839
  kind: "mutation",
13485
13840
  auth: "admin"
@@ -15146,282 +15501,6 @@ method(_void(), array(CustomModelDescriptorSchema).readonly(), { auth: "admin" }
15146
15501
  timeoutMs: 30 * 6e4
15147
15502
  });
15148
15503
  /**
15149
- * Query filter for settings-store collections.
15150
- */
15151
- var QueryFilterSchema = object({
15152
- where: record(string(), unknown()).optional(),
15153
- whereIn: record(string(), array(unknown())).optional(),
15154
- whereBetween: record(string(), tuple([unknown(), unknown()])).optional(),
15155
- /** NULL-safe exclusion: matches rows whose field is NULL OR != the value. */
15156
- whereNot: record(string(), unknown()).optional(),
15157
- /** NULL-safe exclusion of a SET — `whereNot` for more than one value. An
15158
- * empty list excludes nothing. See `QueryFilter.whereNotIn`. */
15159
- whereNotIn: record(string(), array(unknown())).optional(),
15160
- orderBy: object({
15161
- field: string(),
15162
- direction: _enum(["asc", "desc"])
15163
- }).optional(),
15164
- limit: number().optional(),
15165
- offset: number().optional()
15166
- });
15167
- /**
15168
- * The predicate half of a filter, for BULK MUTATIONS.
15169
- *
15170
- * Deliberately not `QueryFilterSchema`: `orderBy` / `limit` / `offset` have no
15171
- * meaning for a statement that rewrites a set, and accepting them would invite
15172
- * a caller to believe `limit` bounds the damage. Every field is optional here
15173
- * only so the shape stays composable — the implementation REJECTS a filter
15174
- * that compiles to no predicate, because that is the whole collection.
15175
- */
15176
- var MutationFilterSchema = object({
15177
- where: record(string(), unknown()).optional(),
15178
- whereIn: record(string(), array(unknown())).optional(),
15179
- whereBetween: record(string(), tuple([unknown(), unknown()])).optional(),
15180
- whereNot: record(string(), unknown()).optional(),
15181
- whereNotIn: record(string(), array(unknown())).optional()
15182
- });
15183
- /**
15184
- * One scalar an {@link settingsStoreCapability.methods.aggregate} call asks for.
15185
- *
15186
- * `as` names the slot in the result, so the SAME column may be asked twice with
15187
- * two operations (`MIN(startMs)` and `MAX(startMs)` in one round trip) — which
15188
- * a `Record<column, op>` shape could not express.
15189
- */
15190
- var AggregateFieldSchema = object({
15191
- /** Result key. */
15192
- as: string().min(1),
15193
- /** Column to aggregate. Must be a real column of a declared collection. */
15194
- field: string().min(1),
15195
- op: _enum([
15196
- "sum",
15197
- "min",
15198
- "max"
15199
- ])
15200
- });
15201
- /**
15202
- * `COUNT(*)` plus one number per requested field.
15203
- *
15204
- * `null` means NO ROW MATCHED, never zero: a `SUM` over an empty set and a sum
15205
- * that really is 0 are different facts, and an accounting caller that renders
15206
- * "0 bytes, oldest = 0" for "nothing here" reports a lie about a disk.
15207
- */
15208
- var AggregateResultSchema = object({
15209
- count: number().int(),
15210
- values: record(string(), number().nullable())
15211
- });
15212
- /** A single stored record: `{ id, data }`. */
15213
- var SettingsRecordSchema = object({
15214
- id: string(),
15215
- data: record(string(), unknown())
15216
- });
15217
- /**
15218
- * One record of a BULK insert — {@link SettingsRecordSchema} with the id made
15219
- * optional.
15220
- *
15221
- * A separate schema rather than loosening the shared one: every other method
15222
- * on this cap addresses a row BY its id, and making that field optional
15223
- * everywhere would turn a forgotten key into a silently generated one on
15224
- * `update` and `delete` as well.
15225
- */
15226
- var BulkRecordSchema = object({
15227
- id: string().optional(),
15228
- data: record(string(), unknown())
15229
- });
15230
- /**
15231
- * One write inside a {@link settingsStoreCapability.methods.transact} call.
15232
- * Only the three that a "replace this set, bump that revision" write needs.
15233
- */
15234
- var TransactOpSchema = discriminatedUnion("op", [
15235
- object({
15236
- op: literal("deleteWhere"),
15237
- collection: string(),
15238
- filter: MutationFilterSchema
15239
- }),
15240
- object({
15241
- op: literal("insertMany"),
15242
- collection: string(),
15243
- records: array(BulkRecordSchema).readonly()
15244
- }),
15245
- object({
15246
- op: literal("update"),
15247
- collection: string(),
15248
- id: string(),
15249
- data: record(string(), unknown())
15250
- })
15251
- ]);
15252
- /**
15253
- * The precondition of a transaction: the row `key` of `collection` must hold
15254
- * `equals` in `column`, read INSIDE the transaction.
15255
- */
15256
- var TransactGuardSchema = object({
15257
- collection: string(),
15258
- key: string(),
15259
- column: string(),
15260
- equals: unknown()
15261
- });
15262
- /**
15263
- * Column declaration for a structured (SQL-backed) collection.
15264
- *
15265
- * Logical types — the backend translates each to the matching SQLite
15266
- * storage class and handles per-type marshaling:
15267
- * - `TEXT` / `INTEGER` / `REAL` — native SQLite types, pass-through
15268
- * - `JSON` — TEXT under the hood; serialised on write, parsed on read
15269
- * - `BOOLEAN` — INTEGER 0/1 under the hood; coerced both directions
15270
- */
15271
- var CollectionColumnSchema = object({
15272
- name: string(),
15273
- type: _enum([
15274
- "TEXT",
15275
- "INTEGER",
15276
- "REAL",
15277
- "JSON",
15278
- "BOOLEAN"
15279
- ]),
15280
- primaryKey: boolean().optional(),
15281
- notNull: boolean().optional(),
15282
- unique: boolean().optional(),
15283
- /**
15284
- * Column DEFAULT. Required for B2: the four `ensureTable` consumers declare
15285
- * columns like `enabled INTEGER NOT NULL DEFAULT 1`, and without this the
15286
- * collection surface simply cannot express their existing tables — which is
15287
- * why they were still on the uncapped `table*` API.
15288
- */
15289
- defaultValue: union([
15290
- string(),
15291
- number(),
15292
- boolean()
15293
- ]).optional()
15294
- });
15295
- var CollectionIndexSchema = object({
15296
- name: string(),
15297
- columns: array(string()).readonly(),
15298
- unique: boolean().optional()
15299
- });
15300
- method(object({
15301
- namespace: string().optional(),
15302
- collection: string(),
15303
- key: string()
15304
- }), unknown(), { auth: "admin" }), method(object({
15305
- namespace: string().optional(),
15306
- collection: string(),
15307
- key: string(),
15308
- value: unknown()
15309
- }), _void(), {
15310
- kind: "mutation",
15311
- auth: "admin"
15312
- }), method(object({
15313
- namespace: string().optional(),
15314
- collection: string(),
15315
- filter: QueryFilterSchema.optional(),
15316
- columns: array(string()).readonly().optional()
15317
- }), array(SettingsRecordSchema).readonly(), { auth: "admin" }), method(object({
15318
- namespace: string().optional(),
15319
- collection: string(),
15320
- /** Declared columns identifying the slot; must be covered by a UNIQUE
15321
- * index on the collection. Never empty. */
15322
- conflict: array(string()).readonly(),
15323
- record: BulkRecordSchema
15324
- }), object({
15325
- /** The id the row HAS: assigned by SQLite on an insert, or the existing
15326
- * row's own id on an update. */
15327
- id: union([string(), number()]) }), {
15328
- kind: "mutation",
15329
- auth: "admin"
15330
- }), method(object({
15331
- namespace: string().optional(),
15332
- collection: string(),
15333
- record: object({
15334
- id: string().optional(),
15335
- data: record(string(), unknown())
15336
- })
15337
- }), object({
15338
- /**
15339
- * The id the row ACTUALLY got (D473): the one supplied, the UUID minted
15340
- * for an absent one, or the ROWID SQLite assigned on an `INTEGER`
15341
- * primary key — which is the only place an auto key is knowable.
15342
- */
15343
- id: union([string(), number()]) }), {
15344
- kind: "mutation",
15345
- auth: "admin"
15346
- }), method(object({
15347
- namespace: string().optional(),
15348
- collection: string(),
15349
- records: array(BulkRecordSchema).readonly()
15350
- }), object({ inserted: number().int() }), {
15351
- kind: "mutation",
15352
- auth: "admin"
15353
- }), method(object({
15354
- namespace: string().optional(),
15355
- guard: TransactGuardSchema.optional(),
15356
- ops: array(TransactOpSchema).readonly()
15357
- }), object({
15358
- applied: boolean(),
15359
- current: unknown().optional()
15360
- }), {
15361
- kind: "mutation",
15362
- auth: "admin"
15363
- }), method(object({
15364
- namespace: string().optional(),
15365
- collection: string(),
15366
- id: string(),
15367
- data: record(string(), unknown())
15368
- }), _void(), {
15369
- kind: "mutation",
15370
- auth: "admin"
15371
- }), method(object({
15372
- namespace: string().optional(),
15373
- collection: string(),
15374
- key: string()
15375
- }), _void(), {
15376
- kind: "mutation",
15377
- auth: "admin"
15378
- }), method(object({
15379
- namespace: string().optional(),
15380
- collection: string(),
15381
- filter: MutationFilterSchema
15382
- }), object({ deleted: number().int() }), {
15383
- kind: "mutation",
15384
- auth: "admin"
15385
- }), method(object({
15386
- namespace: string().optional(),
15387
- collection: string(),
15388
- filter: MutationFilterSchema,
15389
- data: record(string(), unknown())
15390
- }), object({ updated: number().int() }), {
15391
- kind: "mutation",
15392
- auth: "admin"
15393
- }), method(object({
15394
- namespace: string().optional(),
15395
- collection: string(),
15396
- filter: QueryFilterSchema.optional()
15397
- }), number(), { auth: "admin" }), method(object({
15398
- namespace: string().optional(),
15399
- collection: string(),
15400
- fields: array(AggregateFieldSchema).readonly(),
15401
- filter: QueryFilterSchema.optional()
15402
- }), AggregateResultSchema, { auth: "admin" }), method(object({
15403
- namespace: string().optional(),
15404
- collection: string(),
15405
- field: string(),
15406
- bucketSize: number().int().positive(),
15407
- origin: number().int(),
15408
- filter: QueryFilterSchema.optional()
15409
- }), array(object({
15410
- bucket: number().int(),
15411
- count: number().int()
15412
- })).readonly(), { auth: "admin" }), method(object({
15413
- namespace: string().optional(),
15414
- collection: string()
15415
- }), boolean(), { auth: "admin" }), method(object({
15416
- namespace: string().optional(),
15417
- collection: string(),
15418
- columns: array(CollectionColumnSchema).readonly(),
15419
- indexes: array(CollectionIndexSchema).readonly().optional()
15420
- }), _void(), {
15421
- kind: "mutation",
15422
- auth: "admin"
15423
- });
15424
- /**
15425
15504
  * What one engine says about itself. The orchestrator uses `kind` to pick
15426
15505
  * a registrant for a collection; `engineId` is what a log line names when
15427
15506
  * a call is routed or refused.
@@ -15501,6 +15580,14 @@ id: union([string(), number()]) }), {
15501
15580
  }), object({ id: union([string(), number()]) }), {
15502
15581
  kind: "mutation",
15503
15582
  auth: "admin"
15583
+ }), method(object({
15584
+ namespace: string().optional(),
15585
+ collection: string(),
15586
+ conflict: array(string()).readonly(),
15587
+ records: array(BulkRecordSchema).readonly()
15588
+ }), object({ upserted: number().int() }), {
15589
+ kind: "mutation",
15590
+ auth: "admin"
15504
15591
  }), method(object({
15505
15592
  namespace: string().optional(),
15506
15593
  collection: string(),
@@ -15570,12 +15657,7 @@ id: union([string(), number()]) }), {
15570
15657
  })).readonly(), { auth: "admin" }), method(object({
15571
15658
  namespace: string().optional(),
15572
15659
  collection: string()
15573
- }), boolean(), { auth: "admin" }), method(object({
15574
- namespace: string().optional(),
15575
- collection: string(),
15576
- columns: array(CollectionColumnSchema).readonly(),
15577
- indexes: array(CollectionIndexSchema).readonly().optional()
15578
- }), _void(), {
15660
+ }), boolean(), { auth: "admin" }), method(DeclareCollectionInputSchema, _void(), {
15579
15661
  kind: "mutation",
15580
15662
  auth: "admin"
15581
15663
  });
@@ -31841,6 +31923,18 @@ var CalendarInfoSchema = object({
31841
31923
  source: CalendarSourceKindSchema,
31842
31924
  enabled: boolean()
31843
31925
  });
31926
+ /**
31927
+ * Time contract of {@link CalendarEvent}.
31928
+ *
31929
+ * - Timed event: `startMs` / `endMs` are real instants; `endMs` is exclusive.
31930
+ * - All-day event (`allDay: true`): the event is a run of calendar DATES, not
31931
+ * instants. `startMs` is UTC midnight of the first date and `endMs` is UTC
31932
+ * midnight of the day AFTER the last date (RFC 5545 exclusive DTEND), so a
31933
+ * one-day event spans exactly 24 h. Every provider produces that and no
31934
+ * consumer may read the instants in a local timezone: use
31935
+ * {@link calendarEventLocalSpan}. Reading UTC midnight as local time put an
31936
+ * all-day event on the following day for any viewer ahead of UTC.
31937
+ */
31844
31938
  var CalendarEventSchema = object({
31845
31939
  id: string().min(1),
31846
31940
  calendarId: string().min(1),
@@ -33983,7 +34077,15 @@ var HubAddressBookSchema = object({
33983
34077
  publicEndpoint: HubAddressRoleResolutionSchema
33984
34078
  }),
33985
34079
  /** The `hub=` an app link carries (D709), or null. */
33986
- appLinkHub: string().nullable()
34080
+ appLinkHub: string().nullable(),
34081
+ /**
34082
+ * Every origin a browser can really reach this hub at, in the scheme each
34083
+ * listener serves: `https://<lan>:<httpsPort>`, and `http://<lan>:<httpPort>`
34084
+ * while LAN HTTP is on, plus the public and custom addresses. Distinct from
34085
+ * `rows`, which show `http://` only while LAN HTTP is on. Never loopback,
34086
+ * never the app link. Absent on a hub older than D794's amendment.
34087
+ */
34088
+ listenerOrigins: array(string()).readonly().optional()
33987
34089
  });
33988
34090
  var AllowedAddressesSchema = object({
33989
34091
  /**
@@ -40942,6 +41044,12 @@ Object.freeze({
40942
41044
  addonId: null,
40943
41045
  access: "view"
40944
41046
  },
41047
+ "backup.listAvailableDatabases": {
41048
+ capName: "backup",
41049
+ capScope: "system",
41050
+ addonId: null,
41051
+ access: "view"
41052
+ },
40945
41053
  "backup.listDestinations": {
40946
41054
  capName: "backup",
40947
41055
  capScope: "system",
@@ -41662,6 +41770,12 @@ Object.freeze({
41662
41770
  addonId: null,
41663
41771
  access: "create"
41664
41772
  },
41773
+ "dataStoreProvider.upsertMany": {
41774
+ capName: "data-store-provider",
41775
+ capScope: "system",
41776
+ addonId: null,
41777
+ access: "create"
41778
+ },
41665
41779
  "dayNight.getOptions": {
41666
41780
  capName: "day-night",
41667
41781
  capScope: "device",
@@ -46510,6 +46624,12 @@ Object.freeze({
46510
46624
  addonId: null,
46511
46625
  access: "create"
46512
46626
  },
46627
+ "settingsStore.upsertMany": {
46628
+ capName: "settings-store",
46629
+ capScope: "system",
46630
+ addonId: null,
46631
+ access: "create"
46632
+ },
46513
46633
  "smoke.getStatus": {
46514
46634
  capName: "smoke",
46515
46635
  capScope: "device",