@camstack/server 1.2.380 → 1.2.381

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.
@@ -46,6 +46,11 @@ exports.redactDeviceInfoSecrets = redactDeviceInfoSecrets;
46
46
  exports.redactDeviceInfoRecordSecrets = redactDeviceInfoRecordSecrets;
47
47
  exports.redactSettingsSections = redactSettingsSections;
48
48
  exports.redactSettingsAggregate = redactSettingsAggregate;
49
+ exports.redactSettingsForm = redactSettingsForm;
50
+ exports.redactExportSetup = redactExportSetup;
51
+ exports.redactDeepSecrets = redactDeepSecrets;
52
+ exports.redactStatusAggregateSetup = redactStatusAggregateSetup;
53
+ exports.redactStatusAggregateBatchSetup = redactStatusAggregateBatchSetup;
49
54
  exports.redactConfigEntries = redactConfigEntries;
50
55
  exports.redactStreamUrlSecrets = redactStreamUrlSecrets;
51
56
  /** What a non-admin sees instead of the value. Matches the `***` convention
@@ -131,18 +136,6 @@ function redactDeviceInfoRecordSecrets(data) {
131
136
  out[key] = redactDeviceInfoSecrets(value);
132
137
  return out;
133
138
  }
134
- /** One settings field as the aggregate emits it: `{ key, value, … }`. */
135
- function redactField(field) {
136
- if (!isRecord(field))
137
- return field;
138
- const key = field['key'];
139
- if (typeof key !== 'string' || !isSecretConfigKey(key))
140
- return field;
141
- const value = field['value'];
142
- if (typeof value !== 'string' || value.length === 0)
143
- return field;
144
- return { ...field, value: exports.REDACTED_SECRET };
145
- }
146
139
  /**
147
140
  * Project a `SettingsSchemaWithValues` (`{ sections: [{ fields: [...] }] }`).
148
141
  * Used by `getDeviceSettingsAggregate` and `getSettingsSchema`.
@@ -161,7 +154,10 @@ function redactSettingsSections(data) {
161
154
  const fields = section['fields'];
162
155
  if (!Array.isArray(fields))
163
156
  return section;
164
- return { ...section, fields: fields.map(redactField) };
157
+ // The same field-aware walk as the addon forms: by TYPE, at any depth,
158
+ // into array rows — a device form carries `password`-typed fields whose
159
+ // key no keyword catches, and HomeKit's pairing `qr-code` (D634 r2).
160
+ return { ...section, fields: fields.map(redactFormField) };
165
161
  }),
166
162
  };
167
163
  }
@@ -177,11 +173,173 @@ function redactSettingsAggregate(data) {
177
173
  return data;
178
174
  return { ...data, settings: redactSettingsSections(settings) };
179
175
  }
176
+ /** True when a hydrated form field carries a credential: by TYPE first, then by name. */
177
+ function isSecretFormField(field) {
178
+ // A `qr-code` in a settings form is a PAIRING code (HomeKit `X-HM://…`):
179
+ // whoever scans it controls the accessory.
180
+ if (field['type'] === 'password' || field['secret'] === true || field['type'] === 'qr-code') {
181
+ return true;
182
+ }
183
+ const key = field['key'];
184
+ return typeof key === 'string' && isSecretConfigKey(key);
185
+ }
186
+ /** The `itemFields` of an array field, when it declares them. */
187
+ function itemFieldsOf(field) {
188
+ const items = field?.['itemFields'];
189
+ return Array.isArray(items) ? items : undefined;
190
+ }
191
+ /** The declared item field named `key`, if any. */
192
+ function itemField(itemFields, key) {
193
+ const found = itemFields?.find((f) => isRecord(f) && f['key'] === key);
194
+ return isRecord(found) ? found : undefined;
195
+ }
196
+ /**
197
+ * Withhold every secret inside one form VALUE, whatever its shape.
198
+ *
199
+ * Round 1 replaced only a secret field's string value, so an array of rows
200
+ * (`editable-array` — mqtt-broker `brokers[].password`), a `multiple` secret
201
+ * (an array of strings) and a JSON object holding a `token` all went out
202
+ * whole. So the value is walked: an array element by element, an object key
203
+ * by key — a key is secret when its declared item field is (`password` /
204
+ * `secret: true`) or its NAME is — and everything under a secret is withheld.
205
+ * A non-secret string that is a URL loses its userinfo / credential params
206
+ * (`mqtt://user:pass@host`), the same masker the stream URLs use.
207
+ */
208
+ function redactFormValue(value, secret, itemFields) {
209
+ if (typeof value === 'string') {
210
+ if (value.length === 0)
211
+ return value;
212
+ if (secret)
213
+ return exports.REDACTED_SECRET;
214
+ return value.includes('://') ? (0, types_1.maskUrlCredentials)(value) : value;
215
+ }
216
+ if (Array.isArray(value))
217
+ return value.map((el) => redactFormValue(el, secret, itemFields));
218
+ if (!isRecord(value))
219
+ return value;
220
+ const out = {};
221
+ for (const [key, child] of Object.entries(value)) {
222
+ const declared = itemField(itemFields, key);
223
+ const childSecret = secret || (declared !== undefined && isSecretFormField(declared)) || isSecretConfigKey(key);
224
+ out[key] = redactFormValue(child, childSecret, itemFieldsOf(declared));
225
+ }
226
+ return out;
227
+ }
228
+ /** One hydrated form field, its secret withheld and its children walked. */
229
+ function redactFormField(field) {
230
+ if (!isRecord(field))
231
+ return field;
232
+ const nested = field['fields'];
233
+ const tabs = field['tabs'];
234
+ if (Array.isArray(nested))
235
+ return { ...field, fields: nested.map(redactFormField) };
236
+ if (Array.isArray(tabs)) {
237
+ return {
238
+ ...field,
239
+ tabs: tabs.map((tab) => {
240
+ if (!isRecord(tab))
241
+ return tab;
242
+ const tabFields = tab['fields'];
243
+ return Array.isArray(tabFields) ? { ...tab, fields: tabFields.map(redactFormField) } : tab;
244
+ }),
245
+ };
246
+ }
247
+ if (!('value' in field))
248
+ return field;
249
+ const redacted = {
250
+ ...field,
251
+ value: redactFormValue(field['value'], isSecretFormField(field), itemFieldsOf(field)),
252
+ };
253
+ // The HomeKit QR caption spells the setup code out in prose.
254
+ const caption = field['caption'];
255
+ return field['type'] === 'qr-code' && typeof caption === 'string' && caption.length > 0
256
+ ? { ...redacted, caption: exports.REDACTED_SECRET }
257
+ : redacted;
258
+ }
259
+ /**
260
+ * Project an ADDON settings form (`addonSettings.getGlobalSettings` /
261
+ * `getIntegrationSettings` / `getDeviceSettings`, a `SettingsSchemaWithValues`).
262
+ *
263
+ * Unlike {@link redactSettingsSections} (device forms, whose secrets are named
264
+ * by key convention) this decides by the FIELD: an addon's credential is often
265
+ * called something no keyword catches — an ntfy `topic`, a PEM `privateKey`
266
+ * marked `secret: true` — and addon forms nest fields in groups and sub-tabs.
267
+ * `hydrateSchema` fills a password field with its stored value on purpose (a
268
+ * masked value clobbered secrets on save), so this boundary is the only place
269
+ * the value is withheld from a non-admin; an admin still gets the real form,
270
+ * and `updateGlobalSettings` / `updateDeviceSettings` are admin-only, so a
271
+ * redacted value can never be written back (D634).
272
+ */
273
+ function redactSettingsForm(data) {
274
+ if (!isRecord(data))
275
+ return data;
276
+ const sections = data['sections'];
277
+ if (!Array.isArray(sections))
278
+ return data;
279
+ return {
280
+ ...data,
281
+ sections: sections.map((section) => {
282
+ if (!isRecord(section))
283
+ return section;
284
+ const fields = section['fields'];
285
+ return Array.isArray(fields) ? { ...section, fields: fields.map(redactFormField) } : section;
286
+ }),
287
+ };
288
+ }
289
+ /**
290
+ * Project a `deviceExport.getStatus` answer: drop the `setup` block.
291
+ *
292
+ * `setup` is the export's PAIRING material — HomeKit's `X-HM://` setup URI as
293
+ * `qr`, the Alexa export's Lambda ingress token as a `secret: true` row. The
294
+ * row flag only masks in the UI; the value travels. Only the admin export
295
+ * panel renders it, so a non-admin keeps the link state and counts and never
296
+ * receives the block (D634 r2). One object or a fanned-out array.
297
+ */
298
+ function redactExportSetup(data) {
299
+ if (Array.isArray(data))
300
+ return data.map((row) => redactExportSetup(row));
301
+ if (!isRecord(data) || !('setup' in data))
302
+ return data;
303
+ const { setup: _setup, ...rest } = data;
304
+ return rest;
305
+ }
306
+ /**
307
+ * Walk an arbitrary payload and withhold every secret-NAMED key's value and
308
+ * every URL's credentials — for surfaces with no schema to consult: the raw
309
+ * upstream state a device exposes (Home Assistant attributes carry
310
+ * `access_token` and `?token=` picture URLs), an integration's `info`, a
311
+ * broker list's `url` (D634 r3).
312
+ */
313
+ function redactDeepSecrets(data) {
314
+ return redactFormValue(data, false, undefined);
315
+ }
316
+ /** The status-aggregate entry that carries export pairing material. */
317
+ const DEVICE_EXPORT_CAP = 'device-export';
318
+ /**
319
+ * Project a single status aggregate (`Record<capName, status | null>`): the
320
+ * `device-export` entry loses its `setup` (D634 r3 — defence in depth; the
321
+ * aggregation itself no longer asks a system collection cap per device).
322
+ */
323
+ function redactStatusAggregateSetup(data) {
324
+ if (!isRecord(data) || !(DEVICE_EXPORT_CAP in data))
325
+ return data;
326
+ return { ...data, [DEVICE_EXPORT_CAP]: redactExportSetup(data[DEVICE_EXPORT_CAP]) };
327
+ }
328
+ /** Project a batch status aggregate (`Record<deviceId, Record<capName, status>>`). */
329
+ function redactStatusAggregateBatchSetup(data) {
330
+ if (!isRecord(data))
331
+ return data;
332
+ const out = {};
333
+ for (const [deviceId, statuses] of Object.entries(data)) {
334
+ out[deviceId] = redactStatusAggregateSetup(statuses);
335
+ }
336
+ return out;
337
+ }
180
338
  /** Project a flat `ConfigEntry[]` — `getConfigSchema`'s `{ key, value }` rows. */
181
339
  function redactConfigEntries(data) {
182
340
  if (!Array.isArray(data))
183
341
  return data;
184
- return data.map(redactField);
342
+ return data.map(redactFormField);
185
343
  }
186
344
  /**
187
345
  * URL fields whose VALUE is an RTSP/RTMP restream address and can embed
@@ -237,6 +395,21 @@ function redactStreamUrlSecrets(data) {
237
395
  * failing test rather than a silent leak.
238
396
  */
239
397
  exports.NON_ADMIN_CONFIG_REDACTED_METHODS = new Map([
398
+ // ── Addon settings forms (D634) — hydrated with the STORED secret ──
399
+ ['addonSettings.getGlobalSettings', redactSettingsForm],
400
+ ['addonSettings.getIntegrationSettings', redactSettingsForm],
401
+ ['addonSettings.getDeviceSettings', redactSettingsForm],
402
+ ['deviceExport.getStatus', redactExportSetup],
403
+ // ── Round-3 sweep: the per-device device-ops twins and the listings ──
404
+ ['deviceOps.getConfigEntries', redactConfigEntries],
405
+ ['deviceOps.getSettingsSchema', redactSettingsSections],
406
+ ['deviceOps.getRawState', redactDeepSecrets],
407
+ ['mqttBroker.listBrokers', redactDeepSecrets],
408
+ ['integrations.list', redactDeepSecrets],
409
+ ['integrations.get', redactDeepSecrets],
410
+ ['integrations.getByAddonId', redactDeepSecrets],
411
+ ['deviceManager.getDeviceStatusAggregate', redactStatusAggregateSetup],
412
+ ['deviceManager.getDeviceStatusAggregateBatch', redactStatusAggregateBatchSetup],
240
413
  ['deviceManager.getDevice', redactDeviceInfoSecrets],
241
414
  ['deviceManager.listAll', redactDeviceInfoSecrets],
242
415
  ['deviceManager.getChildren', redactDeviceInfoSecrets],
@@ -1523,7 +1523,7 @@ function createCapRouter_broker(getProvider, createRemoteProxy) {
1523
1523
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
1524
1524
  return p.unsubscribe(methodInput);
1525
1525
  }),
1526
- getState: trpc_middleware_js_1.protectedProcedure
1526
+ getState: trpc_middleware_js_1.adminProcedure
1527
1527
  .input(types_23.brokerCapability.methods.getState.input.loose())
1528
1528
  .output(types_23.brokerCapability.methods.getState.output)
1529
1529
  .query(async ({ input, ctx }) => {
@@ -2582,7 +2582,7 @@ function createCapRouter_deviceExport(getProvider, createRemoteProxy) {
2582
2582
  const p = resolveProvider('device-export', input?.nodeId, () => getProvider(ctx, input?.addonId), createRemoteProxy);
2583
2583
  return p.listExposedDevices();
2584
2584
  }),
2585
- exposeDevice: trpc_middleware_js_1.protectedProcedure
2585
+ exposeDevice: trpc_middleware_js_1.adminProcedure
2586
2586
  .input(types_42.deviceExportCapability.methods.exposeDevice.input.loose())
2587
2587
  .output(types_42.deviceExportCapability.methods.exposeDevice.output)
2588
2588
  .mutation(async ({ input, ctx }) => {
@@ -2591,7 +2591,7 @@ function createCapRouter_deviceExport(getProvider, createRemoteProxy) {
2591
2591
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
2592
2592
  return p.exposeDevice(methodInput);
2593
2593
  }),
2594
- unexposeDevice: trpc_middleware_js_1.protectedProcedure
2594
+ unexposeDevice: trpc_middleware_js_1.adminProcedure
2595
2595
  .input(types_42.deviceExportCapability.methods.unexposeDevice.input.loose())
2596
2596
  .output(types_42.deviceExportCapability.methods.unexposeDevice.output)
2597
2597
  .mutation(async ({ input, ctx }) => {
@@ -2667,7 +2667,7 @@ function createCapRouter_deviceManager(getProvider, createRemoteProxy) {
2667
2667
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
2668
2668
  return p.removeDevice(methodInput);
2669
2669
  }),
2670
- persistConfig: trpc_middleware_js_1.protectedProcedure
2670
+ persistConfig: trpc_middleware_js_1.adminProcedure
2671
2671
  .input(types_43.deviceManagerCapability.methods.persistConfig.input.loose())
2672
2672
  .output(types_43.deviceManagerCapability.methods.persistConfig.output)
2673
2673
  .mutation(async ({ input, ctx }) => {
@@ -2676,7 +2676,7 @@ function createCapRouter_deviceManager(getProvider, createRemoteProxy) {
2676
2676
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
2677
2677
  return p.persistConfig(methodInput);
2678
2678
  }),
2679
- loadConfig: trpc_middleware_js_1.protectedProcedure
2679
+ loadConfig: trpc_middleware_js_1.adminProcedure
2680
2680
  .input(types_43.deviceManagerCapability.methods.loadConfig.input.loose())
2681
2681
  .output(types_43.deviceManagerCapability.methods.loadConfig.output)
2682
2682
  .query(async ({ input, ctx }) => {
@@ -2685,7 +2685,7 @@ function createCapRouter_deviceManager(getProvider, createRemoteProxy) {
2685
2685
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
2686
2686
  return p.loadConfig(methodInput);
2687
2687
  }),
2688
- loadRuntimeState: trpc_middleware_js_1.protectedProcedure
2688
+ loadRuntimeState: trpc_middleware_js_1.adminProcedure
2689
2689
  .input(types_43.deviceManagerCapability.methods.loadRuntimeState.input.loose())
2690
2690
  .output(types_43.deviceManagerCapability.methods.loadRuntimeState.output)
2691
2691
  .query(async ({ input, ctx }) => {
@@ -3437,7 +3437,7 @@ function createCapRouter_deviceOps(getProvider, createRemoteProxy) {
3437
3437
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
3438
3438
  return p.getConfigEntries(methodInput);
3439
3439
  }),
3440
- setConfig: trpc_middleware_js_1.protectedProcedure
3440
+ setConfig: trpc_middleware_js_1.adminProcedure
3441
3441
  .input(types_44.deviceOpsCapability.methods.setConfig.input.loose())
3442
3442
  .output(types_44.deviceOpsCapability.methods.setConfig.output)
3443
3443
  .mutation(async ({ input, ctx }) => {
@@ -3455,7 +3455,7 @@ function createCapRouter_deviceOps(getProvider, createRemoteProxy) {
3455
3455
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
3456
3456
  return p.runAction(methodInput);
3457
3457
  }),
3458
- removeDevice: trpc_middleware_js_1.protectedProcedure
3458
+ removeDevice: trpc_middleware_js_1.adminProcedure
3459
3459
  .input(types_44.deviceOpsCapability.methods.removeDevice.input.loose())
3460
3460
  .output(types_44.deviceOpsCapability.methods.removeDevice.output)
3461
3461
  .mutation(async ({ input, ctx }) => {
@@ -5233,7 +5233,7 @@ function createCapRouter_mqttBroker(getProvider, createRemoteProxy) {
5233
5233
  const p = resolveProvider('mqtt-broker', input?.nodeId, () => getProvider(ctx, input?.addonId), createRemoteProxy);
5234
5234
  return p.listBrokers();
5235
5235
  }),
5236
- getBrokerConfig: trpc_middleware_js_1.protectedProcedure
5236
+ getBrokerConfig: trpc_middleware_js_1.adminProcedure
5237
5237
  .input(types_74.mqttBrokerCapability.methods.getBrokerConfig.input.loose())
5238
5238
  .output(types_74.mqttBrokerCapability.methods.getBrokerConfig.output)
5239
5239
  .query(async ({ input, ctx }) => {
@@ -5242,7 +5242,7 @@ function createCapRouter_mqttBroker(getProvider, createRemoteProxy) {
5242
5242
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
5243
5243
  return p.getBrokerConfig(methodInput);
5244
5244
  }),
5245
- addBroker: trpc_middleware_js_1.protectedProcedure
5245
+ addBroker: trpc_middleware_js_1.adminProcedure
5246
5246
  .input(types_74.mqttBrokerCapability.methods.addBroker.input.loose())
5247
5247
  .output(types_74.mqttBrokerCapability.methods.addBroker.output)
5248
5248
  .mutation(async ({ input, ctx }) => {
@@ -5251,7 +5251,7 @@ function createCapRouter_mqttBroker(getProvider, createRemoteProxy) {
5251
5251
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
5252
5252
  return p.addBroker(methodInput);
5253
5253
  }),
5254
- removeBroker: trpc_middleware_js_1.protectedProcedure
5254
+ removeBroker: trpc_middleware_js_1.adminProcedure
5255
5255
  .input(types_74.mqttBrokerCapability.methods.removeBroker.input.loose())
5256
5256
  .output(types_74.mqttBrokerCapability.methods.removeBroker.output)
5257
5257
  .mutation(async ({ input, ctx }) => {
@@ -5260,7 +5260,7 @@ function createCapRouter_mqttBroker(getProvider, createRemoteProxy) {
5260
5260
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
5261
5261
  return p.removeBroker(methodInput);
5262
5262
  }),
5263
- testConnection: trpc_middleware_js_1.protectedProcedure
5263
+ testConnection: trpc_middleware_js_1.adminProcedure
5264
5264
  .input(types_74.mqttBrokerCapability.methods.testConnection.input.loose())
5265
5265
  .output(types_74.mqttBrokerCapability.methods.testConnection.output)
5266
5266
  .mutation(async ({ input, ctx }) => {
@@ -5269,7 +5269,7 @@ function createCapRouter_mqttBroker(getProvider, createRemoteProxy) {
5269
5269
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
5270
5270
  return p.testConnection(methodInput);
5271
5271
  }),
5272
- startEmbeddedBroker: trpc_middleware_js_1.protectedProcedure
5272
+ startEmbeddedBroker: trpc_middleware_js_1.adminProcedure
5273
5273
  .input(types_74.mqttBrokerCapability.methods.startEmbeddedBroker.input.loose())
5274
5274
  .output(types_74.mqttBrokerCapability.methods.startEmbeddedBroker.output)
5275
5275
  .mutation(async ({ input, ctx }) => {
@@ -5278,7 +5278,7 @@ function createCapRouter_mqttBroker(getProvider, createRemoteProxy) {
5278
5278
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
5279
5279
  return p.startEmbeddedBroker(methodInput);
5280
5280
  }),
5281
- stopEmbeddedBroker: trpc_middleware_js_1.protectedProcedure
5281
+ stopEmbeddedBroker: trpc_middleware_js_1.adminProcedure
5282
5282
  .input(types_74.mqttBrokerCapability.methods.stopEmbeddedBroker.input.loose())
5283
5283
  .output(types_74.mqttBrokerCapability.methods.stopEmbeddedBroker.output)
5284
5284
  .mutation(async ({ input, ctx }) => {
@@ -5632,7 +5632,7 @@ function createCapRouter_notificationOutput(getProvider, createRemoteProxy) {
5632
5632
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
5633
5633
  return p.listTargetKinds(methodInput);
5634
5634
  }),
5635
- listTargets: trpc_middleware_js_1.protectedProcedure
5635
+ listTargets: trpc_middleware_js_1.adminProcedure
5636
5636
  .input(types_80.notificationOutputCapability.methods.listTargets.input.loose())
5637
5637
  .output(types_80.notificationOutputCapability.methods.listTargets.output)
5638
5638
  .query(async ({ input, ctx }) => {
@@ -5641,7 +5641,7 @@ function createCapRouter_notificationOutput(getProvider, createRemoteProxy) {
5641
5641
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
5642
5642
  return p.listTargets(methodInput);
5643
5643
  }),
5644
- discoverTargets: trpc_middleware_js_1.protectedProcedure
5644
+ discoverTargets: trpc_middleware_js_1.adminProcedure
5645
5645
  .input(types_80.notificationOutputCapability.methods.discoverTargets.input.loose())
5646
5646
  .output(types_80.notificationOutputCapability.methods.discoverTargets.output)
5647
5647
  .query(async ({ input, ctx }) => {
@@ -5650,7 +5650,7 @@ function createCapRouter_notificationOutput(getProvider, createRemoteProxy) {
5650
5650
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
5651
5651
  return p.discoverTargets(methodInput);
5652
5652
  }),
5653
- send: trpc_middleware_js_1.protectedProcedure
5653
+ send: trpc_middleware_js_1.adminProcedure
5654
5654
  .input(types_80.notificationOutputCapability.methods.send.input.loose())
5655
5655
  .output(types_80.notificationOutputCapability.methods.send.output)
5656
5656
  .mutation(async ({ input, ctx }) => {
@@ -5659,7 +5659,7 @@ function createCapRouter_notificationOutput(getProvider, createRemoteProxy) {
5659
5659
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
5660
5660
  return p.send(methodInput);
5661
5661
  }),
5662
- testTarget: trpc_middleware_js_1.protectedProcedure
5662
+ testTarget: trpc_middleware_js_1.adminProcedure
5663
5663
  .input(types_80.notificationOutputCapability.methods.testTarget.input.loose())
5664
5664
  .output(types_80.notificationOutputCapability.methods.testTarget.output)
5665
5665
  .mutation(async ({ input, ctx }) => {
@@ -5668,7 +5668,7 @@ function createCapRouter_notificationOutput(getProvider, createRemoteProxy) {
5668
5668
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
5669
5669
  return p.testTarget(methodInput);
5670
5670
  }),
5671
- upsertTarget: trpc_middleware_js_1.protectedProcedure
5671
+ upsertTarget: trpc_middleware_js_1.adminProcedure
5672
5672
  .input(types_80.notificationOutputCapability.methods.upsertTarget.input.loose())
5673
5673
  .output(types_80.notificationOutputCapability.methods.upsertTarget.output)
5674
5674
  .mutation(async ({ input, ctx }) => {
@@ -5677,7 +5677,7 @@ function createCapRouter_notificationOutput(getProvider, createRemoteProxy) {
5677
5677
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
5678
5678
  return p.upsertTarget(methodInput);
5679
5679
  }),
5680
- deleteTarget: trpc_middleware_js_1.protectedProcedure
5680
+ deleteTarget: trpc_middleware_js_1.adminProcedure
5681
5681
  .input(types_80.notificationOutputCapability.methods.deleteTarget.input.loose())
5682
5682
  .output(types_80.notificationOutputCapability.methods.deleteTarget.output)
5683
5683
  .mutation(async ({ input, ctx }) => {
@@ -5686,7 +5686,7 @@ function createCapRouter_notificationOutput(getProvider, createRemoteProxy) {
5686
5686
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
5687
5687
  return p.deleteTarget(methodInput);
5688
5688
  }),
5689
- setTargetEnabled: trpc_middleware_js_1.protectedProcedure
5689
+ setTargetEnabled: trpc_middleware_js_1.adminProcedure
5690
5690
  .input(types_80.notificationOutputCapability.methods.setTargetEnabled.input.loose())
5691
5691
  .output(types_80.notificationOutputCapability.methods.setTargetEnabled.output)
5692
5692
  .mutation(async ({ input, ctx }) => {
@@ -8745,7 +8745,7 @@ function createCapRouter_serverManagement(getProvider, createRemoteProxy) {
8745
8745
  }
8746
8746
  function createCapRouter_settingsStore(getProvider, createRemoteProxy) {
8747
8747
  return (0, trpc_middleware_js_1.trpcRouter)({
8748
- get: trpc_middleware_js_1.protectedProcedure
8748
+ get: trpc_middleware_js_1.adminProcedure
8749
8749
  .input(types_104.settingsStoreCapability.methods.get.input.loose())
8750
8750
  .output(types_104.settingsStoreCapability.methods.get.output)
8751
8751
  .query(async ({ input, ctx }) => {
@@ -8754,7 +8754,7 @@ function createCapRouter_settingsStore(getProvider, createRemoteProxy) {
8754
8754
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
8755
8755
  return p.get(methodInput);
8756
8756
  }),
8757
- set: trpc_middleware_js_1.protectedProcedure
8757
+ set: trpc_middleware_js_1.adminProcedure
8758
8758
  .input(types_104.settingsStoreCapability.methods.set.input.loose())
8759
8759
  .output(types_104.settingsStoreCapability.methods.set.output)
8760
8760
  .mutation(async ({ input, ctx }) => {
@@ -8763,7 +8763,7 @@ function createCapRouter_settingsStore(getProvider, createRemoteProxy) {
8763
8763
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
8764
8764
  return p.set(methodInput);
8765
8765
  }),
8766
- query: trpc_middleware_js_1.protectedProcedure
8766
+ query: trpc_middleware_js_1.adminProcedure
8767
8767
  .input(types_104.settingsStoreCapability.methods.query.input.loose())
8768
8768
  .output(types_104.settingsStoreCapability.methods.query.output)
8769
8769
  .query(async ({ input, ctx }) => {
@@ -8772,7 +8772,7 @@ function createCapRouter_settingsStore(getProvider, createRemoteProxy) {
8772
8772
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
8773
8773
  return p.query(methodInput);
8774
8774
  }),
8775
- upsert: trpc_middleware_js_1.protectedProcedure
8775
+ upsert: trpc_middleware_js_1.adminProcedure
8776
8776
  .input(types_104.settingsStoreCapability.methods.upsert.input.loose())
8777
8777
  .output(types_104.settingsStoreCapability.methods.upsert.output)
8778
8778
  .mutation(async ({ input, ctx }) => {
@@ -8781,7 +8781,7 @@ function createCapRouter_settingsStore(getProvider, createRemoteProxy) {
8781
8781
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
8782
8782
  return p.upsert(methodInput);
8783
8783
  }),
8784
- insert: trpc_middleware_js_1.protectedProcedure
8784
+ insert: trpc_middleware_js_1.adminProcedure
8785
8785
  .input(types_104.settingsStoreCapability.methods.insert.input.loose())
8786
8786
  .output(types_104.settingsStoreCapability.methods.insert.output)
8787
8787
  .mutation(async ({ input, ctx }) => {
@@ -8790,7 +8790,7 @@ function createCapRouter_settingsStore(getProvider, createRemoteProxy) {
8790
8790
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
8791
8791
  return p.insert(methodInput);
8792
8792
  }),
8793
- insertMany: trpc_middleware_js_1.protectedProcedure
8793
+ insertMany: trpc_middleware_js_1.adminProcedure
8794
8794
  .input(types_104.settingsStoreCapability.methods.insertMany.input.loose())
8795
8795
  .output(types_104.settingsStoreCapability.methods.insertMany.output)
8796
8796
  .mutation(async ({ input, ctx }) => {
@@ -8799,7 +8799,7 @@ function createCapRouter_settingsStore(getProvider, createRemoteProxy) {
8799
8799
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
8800
8800
  return p.insertMany(methodInput);
8801
8801
  }),
8802
- update: trpc_middleware_js_1.protectedProcedure
8802
+ update: trpc_middleware_js_1.adminProcedure
8803
8803
  .input(types_104.settingsStoreCapability.methods.update.input.loose())
8804
8804
  .output(types_104.settingsStoreCapability.methods.update.output)
8805
8805
  .mutation(async ({ input, ctx }) => {
@@ -8808,7 +8808,7 @@ function createCapRouter_settingsStore(getProvider, createRemoteProxy) {
8808
8808
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
8809
8809
  return p.update(methodInput);
8810
8810
  }),
8811
- delete: trpc_middleware_js_1.protectedProcedure
8811
+ delete: trpc_middleware_js_1.adminProcedure
8812
8812
  .input(types_104.settingsStoreCapability.methods.delete.input.loose())
8813
8813
  .output(types_104.settingsStoreCapability.methods.delete.output)
8814
8814
  .mutation(async ({ input, ctx }) => {
@@ -8817,7 +8817,7 @@ function createCapRouter_settingsStore(getProvider, createRemoteProxy) {
8817
8817
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
8818
8818
  return p.delete(methodInput);
8819
8819
  }),
8820
- deleteWhere: trpc_middleware_js_1.protectedProcedure
8820
+ deleteWhere: trpc_middleware_js_1.adminProcedure
8821
8821
  .input(types_104.settingsStoreCapability.methods.deleteWhere.input.loose())
8822
8822
  .output(types_104.settingsStoreCapability.methods.deleteWhere.output)
8823
8823
  .mutation(async ({ input, ctx }) => {
@@ -8826,7 +8826,7 @@ function createCapRouter_settingsStore(getProvider, createRemoteProxy) {
8826
8826
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
8827
8827
  return p.deleteWhere(methodInput);
8828
8828
  }),
8829
- updateWhere: trpc_middleware_js_1.protectedProcedure
8829
+ updateWhere: trpc_middleware_js_1.adminProcedure
8830
8830
  .input(types_104.settingsStoreCapability.methods.updateWhere.input.loose())
8831
8831
  .output(types_104.settingsStoreCapability.methods.updateWhere.output)
8832
8832
  .mutation(async ({ input, ctx }) => {
@@ -8835,7 +8835,7 @@ function createCapRouter_settingsStore(getProvider, createRemoteProxy) {
8835
8835
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
8836
8836
  return p.updateWhere(methodInput);
8837
8837
  }),
8838
- count: trpc_middleware_js_1.protectedProcedure
8838
+ count: trpc_middleware_js_1.adminProcedure
8839
8839
  .input(types_104.settingsStoreCapability.methods.count.input.loose())
8840
8840
  .output(types_104.settingsStoreCapability.methods.count.output)
8841
8841
  .query(async ({ input, ctx }) => {
@@ -8844,7 +8844,7 @@ function createCapRouter_settingsStore(getProvider, createRemoteProxy) {
8844
8844
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
8845
8845
  return p.count(methodInput);
8846
8846
  }),
8847
- aggregate: trpc_middleware_js_1.protectedProcedure
8847
+ aggregate: trpc_middleware_js_1.adminProcedure
8848
8848
  .input(types_104.settingsStoreCapability.methods.aggregate.input.loose())
8849
8849
  .output(types_104.settingsStoreCapability.methods.aggregate.output)
8850
8850
  .query(async ({ input, ctx }) => {
@@ -8853,7 +8853,7 @@ function createCapRouter_settingsStore(getProvider, createRemoteProxy) {
8853
8853
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
8854
8854
  return p.aggregate(methodInput);
8855
8855
  }),
8856
- histogram: trpc_middleware_js_1.protectedProcedure
8856
+ histogram: trpc_middleware_js_1.adminProcedure
8857
8857
  .input(types_104.settingsStoreCapability.methods.histogram.input.loose())
8858
8858
  .output(types_104.settingsStoreCapability.methods.histogram.output)
8859
8859
  .query(async ({ input, ctx }) => {
@@ -8862,7 +8862,7 @@ function createCapRouter_settingsStore(getProvider, createRemoteProxy) {
8862
8862
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
8863
8863
  return p.histogram(methodInput);
8864
8864
  }),
8865
- isEmpty: trpc_middleware_js_1.protectedProcedure
8865
+ isEmpty: trpc_middleware_js_1.adminProcedure
8866
8866
  .input(types_104.settingsStoreCapability.methods.isEmpty.input.loose())
8867
8867
  .output(types_104.settingsStoreCapability.methods.isEmpty.output)
8868
8868
  .query(async ({ input, ctx }) => {
@@ -8871,7 +8871,7 @@ function createCapRouter_settingsStore(getProvider, createRemoteProxy) {
8871
8871
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
8872
8872
  return p.isEmpty(methodInput);
8873
8873
  }),
8874
- declareCollection: trpc_middleware_js_1.protectedProcedure
8874
+ declareCollection: trpc_middleware_js_1.adminProcedure
8875
8875
  .input(types_104.settingsStoreCapability.methods.declareCollection.input.loose())
8876
8876
  .output(types_104.settingsStoreCapability.methods.declareCollection.output)
8877
8877
  .mutation(async ({ input, ctx }) => {
@@ -9031,7 +9031,7 @@ function createCapRouter_ssoBridge(getProvider, createRemoteProxy) {
9031
9031
  }
9032
9032
  function createCapRouter_storage(getProvider, createRemoteProxy) {
9033
9033
  return (0, trpc_middleware_js_1.trpcRouter)({
9034
- resolve: trpc_middleware_js_1.protectedProcedure
9034
+ resolve: trpc_middleware_js_1.adminProcedure
9035
9035
  .input(types_108.storageCapability.methods.resolve.input.loose())
9036
9036
  .output(types_108.storageCapability.methods.resolve.output)
9037
9037
  .query(async ({ input, ctx }) => {
@@ -9040,7 +9040,7 @@ function createCapRouter_storage(getProvider, createRemoteProxy) {
9040
9040
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
9041
9041
  return p.resolve(methodInput);
9042
9042
  }),
9043
- write: trpc_middleware_js_1.protectedProcedure
9043
+ write: trpc_middleware_js_1.adminProcedure
9044
9044
  .input(types_108.storageCapability.methods.write.input.loose())
9045
9045
  .output(types_108.storageCapability.methods.write.output)
9046
9046
  .mutation(async ({ input, ctx }) => {
@@ -9049,7 +9049,7 @@ function createCapRouter_storage(getProvider, createRemoteProxy) {
9049
9049
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
9050
9050
  return p.write(methodInput);
9051
9051
  }),
9052
- read: trpc_middleware_js_1.protectedProcedure
9052
+ read: trpc_middleware_js_1.adminProcedure
9053
9053
  .input(types_108.storageCapability.methods.read.input.loose())
9054
9054
  .output(types_108.storageCapability.methods.read.output)
9055
9055
  .query(async ({ input, ctx }) => {
@@ -9058,7 +9058,7 @@ function createCapRouter_storage(getProvider, createRemoteProxy) {
9058
9058
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
9059
9059
  return p.read(methodInput);
9060
9060
  }),
9061
- exists: trpc_middleware_js_1.protectedProcedure
9061
+ exists: trpc_middleware_js_1.adminProcedure
9062
9062
  .input(types_108.storageCapability.methods.exists.input.loose())
9063
9063
  .output(types_108.storageCapability.methods.exists.output)
9064
9064
  .query(async ({ input, ctx }) => {
@@ -9067,7 +9067,7 @@ function createCapRouter_storage(getProvider, createRemoteProxy) {
9067
9067
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
9068
9068
  return p.exists(methodInput);
9069
9069
  }),
9070
- list: trpc_middleware_js_1.protectedProcedure
9070
+ list: trpc_middleware_js_1.adminProcedure
9071
9071
  .input(types_108.storageCapability.methods.list.input.loose())
9072
9072
  .output(types_108.storageCapability.methods.list.output)
9073
9073
  .query(async ({ input, ctx }) => {
@@ -9076,7 +9076,7 @@ function createCapRouter_storage(getProvider, createRemoteProxy) {
9076
9076
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
9077
9077
  return p.list(methodInput);
9078
9078
  }),
9079
- delete: trpc_middleware_js_1.protectedProcedure
9079
+ delete: trpc_middleware_js_1.adminProcedure
9080
9080
  .input(types_108.storageCapability.methods.delete.input.loose())
9081
9081
  .output(types_108.storageCapability.methods.delete.output)
9082
9082
  .mutation(async ({ input, ctx }) => {
@@ -9094,7 +9094,7 @@ function createCapRouter_storage(getProvider, createRemoteProxy) {
9094
9094
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
9095
9095
  return p.getAvailableSpace(methodInput);
9096
9096
  }),
9097
- beginUpload: trpc_middleware_js_1.protectedProcedure
9097
+ beginUpload: trpc_middleware_js_1.adminProcedure
9098
9098
  .input(types_108.storageCapability.methods.beginUpload.input.loose())
9099
9099
  .output(types_108.storageCapability.methods.beginUpload.output)
9100
9100
  .mutation(async ({ input, ctx }) => {
@@ -9103,7 +9103,7 @@ function createCapRouter_storage(getProvider, createRemoteProxy) {
9103
9103
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
9104
9104
  return p.beginUpload(methodInput);
9105
9105
  }),
9106
- writeChunk: trpc_middleware_js_1.protectedProcedure
9106
+ writeChunk: trpc_middleware_js_1.adminProcedure
9107
9107
  .input(types_108.storageCapability.methods.writeChunk.input.loose())
9108
9108
  .output(types_108.storageCapability.methods.writeChunk.output)
9109
9109
  .mutation(async ({ input, ctx }) => {
@@ -9112,7 +9112,7 @@ function createCapRouter_storage(getProvider, createRemoteProxy) {
9112
9112
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
9113
9113
  return p.writeChunk(methodInput);
9114
9114
  }),
9115
- finalizeUpload: trpc_middleware_js_1.protectedProcedure
9115
+ finalizeUpload: trpc_middleware_js_1.adminProcedure
9116
9116
  .input(types_108.storageCapability.methods.finalizeUpload.input.loose())
9117
9117
  .output(types_108.storageCapability.methods.finalizeUpload.output)
9118
9118
  .mutation(async ({ input, ctx }) => {
@@ -9121,7 +9121,7 @@ function createCapRouter_storage(getProvider, createRemoteProxy) {
9121
9121
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
9122
9122
  return p.finalizeUpload(methodInput);
9123
9123
  }),
9124
- abortUpload: trpc_middleware_js_1.protectedProcedure
9124
+ abortUpload: trpc_middleware_js_1.adminProcedure
9125
9125
  .input(types_108.storageCapability.methods.abortUpload.input.loose())
9126
9126
  .output(types_108.storageCapability.methods.abortUpload.output)
9127
9127
  .mutation(async ({ input, ctx }) => {
@@ -9130,7 +9130,7 @@ function createCapRouter_storage(getProvider, createRemoteProxy) {
9130
9130
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
9131
9131
  return p.abortUpload(methodInput);
9132
9132
  }),
9133
- beginDownload: trpc_middleware_js_1.protectedProcedure
9133
+ beginDownload: trpc_middleware_js_1.adminProcedure
9134
9134
  .input(types_108.storageCapability.methods.beginDownload.input.loose())
9135
9135
  .output(types_108.storageCapability.methods.beginDownload.output)
9136
9136
  .mutation(async ({ input, ctx }) => {
@@ -9139,7 +9139,7 @@ function createCapRouter_storage(getProvider, createRemoteProxy) {
9139
9139
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
9140
9140
  return p.beginDownload(methodInput);
9141
9141
  }),
9142
- readChunk: trpc_middleware_js_1.protectedProcedure
9142
+ readChunk: trpc_middleware_js_1.adminProcedure
9143
9143
  .input(types_108.storageCapability.methods.readChunk.input.loose())
9144
9144
  .output(types_108.storageCapability.methods.readChunk.output)
9145
9145
  .query(async ({ input, ctx }) => {
@@ -9148,7 +9148,7 @@ function createCapRouter_storage(getProvider, createRemoteProxy) {
9148
9148
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
9149
9149
  return p.readChunk(methodInput);
9150
9150
  }),
9151
- endDownload: trpc_middleware_js_1.protectedProcedure
9151
+ endDownload: trpc_middleware_js_1.adminProcedure
9152
9152
  .input(types_108.storageCapability.methods.endDownload.input.loose())
9153
9153
  .output(types_108.storageCapability.methods.endDownload.output)
9154
9154
  .mutation(async ({ input, ctx }) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/server",
3
- "version": "1.2.380",
3
+ "version": "1.2.381",
4
4
  "private": false,
5
5
  "files": [
6
6
  "dist",
@@ -35,17 +35,17 @@
35
35
  ]
36
36
  },
37
37
  "dependencies": {
38
- "@camstack/addon-admin-ui": "1.2.261",
38
+ "@camstack/addon-admin-ui": "1.2.262",
39
39
  "@camstack/addon-agent-ui": "1.2.143",
40
40
  "@camstack/addon-auth": "1.2.123",
41
41
  "@camstack/addon-decoder-nodeav": "1.2.115",
42
- "@camstack/addon-notifiers": "1.2.119",
42
+ "@camstack/addon-notifiers": "1.2.120",
43
43
  "@camstack/addon-pipeline": "1.2.290",
44
44
  "@camstack/addon-pipeline-orchestrator": "1.2.247",
45
- "@camstack/addon-post-analysis": "1.2.276",
45
+ "@camstack/addon-post-analysis": "1.2.277",
46
46
  "@camstack/sdk": "1.2.118",
47
- "@camstack/system": "1.2.294",
48
- "@camstack/types": "1.2.250",
47
+ "@camstack/system": "1.2.295",
48
+ "@camstack/types": "1.2.251",
49
49
  "@camstack/ui-library": "1.2.201",
50
50
  "@fastify/compress": "^9.0.0",
51
51
  "@fastify/cookie": "^11.0.2",