ghostfolio/libs/common/src/lib/interfaces/user.interface.ts
Shaunak Das 7577a452f0
Feature/add activities count to GET user endpoint (#4351)
* Add activities count to GET user endpoint

* Update changelog
2025-02-23 08:50:59 +01:00

26 lines
770 B
TypeScript

import { SubscriptionOfferKey } from '@ghostfolio/common/types';
import { SubscriptionType } from '@ghostfolio/common/types/subscription-type.type';
import { Access, Account, Tag } from '@prisma/client';
import { SystemMessage } from './system-message.interface';
import { UserSettings } from './user-settings.interface';
// TODO: Compare with UserWithSettings
export interface User {
access: Pick<Access, 'alias' | 'id' | 'permissions'>[];
accounts: Account[];
activitiesCount: number;
dateOfFirstActivity: Date;
id: string;
permissions: string[];
settings: UserSettings;
systemMessage?: SystemMessage;
subscription: {
expiresAt?: Date;
offer: SubscriptionOfferKey;
type: SubscriptionType;
};
tags: (Tag & { isUsed: boolean })[];
}