Extend SignalingTariff type, add StorageQuotaChanged WS event types and wire initial state

Summary

The backend sends a StorageQuotaChanged event over the signaling WebSocket and will include usedQuota in the join_success tariff payload.

The backend Quota struct is:

pub struct Quota {
    pub total: Option<u64>, // None = unlimited
    pub used: u64,
}

Implementation details

  1. In joinSuccess.ts, extend SignalingTariff:
export interface SignalingTariff {
  id: TariffId;
  name: string;
  quotas: Record<string, number>;
  usedQuota: Record<string, number>; // NEW
  disabledFeatures: BackendFeatures[];
}
  1. In core.ts incoming types, add:
export interface StorageQuotaChanged {
  message: 'storage_quota_changed';
  quota: {
    total?: number;
    used: number;
  };
}
// and add | StorageQuotaChanged to the Message union
  1. In configSlice.ts initialState, update:
tariff: {
  id: '' as TariffId,
  name: '',
  quotas: {},
  usedQuota: {}, // NEW
  disabledFeatures: [],
},
  1. Remove the commented-out dead code block in core.ts handleRoomServerCoreMessage referencing assetStorage?.usedStorage.

Acceptance criteria

  • SignalingTariff.usedQuota field exists with type Record<string, number>
  • TypeScript compiles without errors after the change
  • StorageQuotaChanged is part of the core.Message discriminated union
  • Initial Redux state for config.tariff.usedQuota is {}
  • Dead assetStorage comment block is removed from core.ts
Edited by Maximilian Fuß