2024-02-07 22:48:42 +00:00
|
|
|
import AppProjections from "./AppProjections";
|
|
|
|
import { UpdateDefinition } from "./projections/ApplicationUpdates";
|
|
|
|
|
|
|
|
export default class AppQueries {
|
|
|
|
constructor(private readonly projections: AppProjections) {}
|
|
|
|
|
|
|
|
pendingApplicationUpdates(appName?: string): UpdateDefinition[] {
|
2024-03-10 08:49:52 +00:00
|
|
|
const updates = this.projections.ApplicationUpdates.getPendingUpdates();
|
|
|
|
if (!appName) {
|
|
|
|
return updates;
|
|
|
|
}
|
|
|
|
return updates.filter((update) => update.id === appName);
|
2024-02-07 22:48:42 +00:00
|
|
|
}
|
|
|
|
}
|