Skip to content

Commit

Permalink
feat: add favorite type (#164)
Browse files Browse the repository at this point in the history
  • Loading branch information
morganridel authored Jun 20, 2023
1 parent d50913b commit 76580fb
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/frontend/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import type {
H5PItemType,
Invitation,
ItemCategory,
ItemFavorite,
ItemFlag,
ItemLike,
ItemLogin,
Expand Down Expand Up @@ -132,6 +133,8 @@ export type Password = string;
export type NewInvitation = Pick<Invitation, 'email' & 'permission'> &
Partial<Invitation>;

export type ItemFavoriteRecord = ImmutableCast<ItemFavorite>

export type ItemLikeRecord = ImmutableCast<ItemLike>;

export type AppRecord = ImmutableCast<App>;
Expand Down
1 change: 1 addition & 0 deletions src/services/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export * from './file';
export * from './flag';
export * from './h5p';
export * from './invitation';
export * from './item-favorite'
export * from './item-like';
export * from './item-login';
export * from './item-memberships';
Expand Down
1 change: 1 addition & 0 deletions src/services/item-favorite/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './types';
8 changes: 8 additions & 0 deletions src/services/item-favorite/types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { DiscriminatedItem } from '../index';
import { UUID } from '@/types';

export type ItemFavorite = {
id: UUID;
item: DiscriminatedItem;
createdAt: Date;
};

0 comments on commit 76580fb

Please sign in to comment.