Skip to content

Commit

Permalink
fix types
Browse files Browse the repository at this point in the history
  • Loading branch information
malteish committed Sep 10, 2024
1 parent d1c7edf commit d04361b
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions packages/delivery-service/src/persistence/getDatabase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import Account from './account';
import { getIdEnsName } from './getIdEnsName';
import Messages from './messages';
import { syncAcknowledge } from './messages/syncAcknowledge';
import type { MetricsObject } from './metrics';
import type { IntervalMetric } from './metrics';
import Metrics from './metrics';
import Notification from './notification';
import Otp from './otp';
Expand Down Expand Up @@ -168,7 +168,7 @@ export interface IDatabase extends IAccountDatabase {
) => Promise<void>;
getMetrics: (
deliveryServiceProperties: DeliveryServiceProperties,
) => Promise<MetricsObject>;
) => Promise<IntervalMetric[]>;
countMessage: (
messageSizeBytes: number,
deliveryServiceProperties: DeliveryServiceProperties,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { DeliveryServiceProperties } from '@dm3-org/dm3-lib-delivery';
import { Redis, RedisPrefix } from '../getDatabase';
import { getCurrentIntervalTimestamp } from './getCurrentIntervalTimestamp';
import { IntervalMetric } from './metricTypes';

/**
* Get the metrics from the database, excluding the current interval.
Expand Down
4 changes: 2 additions & 2 deletions packages/delivery-service/src/persistence/metrics/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { getMetrics } from './getMetrics';
import type { IntervalMetric, MetricsMap, MetricsObject } from './metricTypes';
import type { IntervalMetric } from './metricTypes';
import { countMessage, countNotification } from './setMetrics';

export default {
Expand All @@ -8,4 +8,4 @@ export default {
countNotification,
};

export type { IntervalMetric, MetricsMap, MetricsObject };
export type { IntervalMetric };
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
type IntervalMetric = {
export type IntervalMetric = {
timestamp_start: number;
duration_seconds: number;
messageCount: number;
Expand Down

0 comments on commit d04361b

Please sign in to comment.