Skip to content

Commit

Permalink
sync typing for moments
Browse files Browse the repository at this point in the history
  • Loading branch information
aldhosutra committed Nov 4, 2022
1 parent c1eab68 commit f112936
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 8 deletions.
3 changes: 2 additions & 1 deletion src/types/core/account/profile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ export type ProfileActivityName =
| 'mintNFT'
| 'NFTSale'
| 'deliverSecret'
| 'winRaffle';
| 'winRaffle'
| 'momentCreated';

export type ProfileActivity = Omit<ActivityBase, 'name'> & {
name: ProfileActivityName;
Expand Down
3 changes: 2 additions & 1 deletion src/types/core/chain/collection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ export type CollectionActivityName =
| 'raffled'
| 'secretDelivered'
| 'videoCallAnswered'
| 'videoCallRejected';
| 'videoCallRejected'
| 'momentCreated';

export type CollectionActivity = Omit<ActivityBase, 'name'> & {
name: CollectionActivityName;
Expand Down
3 changes: 2 additions & 1 deletion src/types/core/chain/nft/NFTActivity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ export type NFTActivityName =
| 'redeem'
| 'secretDelivered'
| 'videoCallAnswered'
| 'videoCallRejected';
| 'videoCallRejected'
| 'momentCreated';

export type NFTActivity = Omit<ActivityBase, 'name'> & {
name: NFTActivityName;
Expand Down
13 changes: 8 additions & 5 deletions src/types/core/service/feed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import { NFTBase } from '../chain/nft';
import { NFTPrice } from '../chain/nft/NFTPrice';
import { Persona } from '../account/persona';
import { NFTType } from '../chain/nft/NFTType';
import { MomentBase } from '../chain/moment';
import { ResponseVersioned } from './api';

export interface FeedItem {
type: NFTType | 'nft';
Expand All @@ -24,10 +26,11 @@ export interface FeedItem {

export type Feeds = FeedItem[];

export interface MomentItem {
id: string;
username: string;
photo: string;
}
export type MomentItem = MomentBase;

export type Moments = MomentItem[];

export type FeedsAndMoments = {
feed: ResponseVersioned<Feeds>;
moment: ResponseVersioned<Moments>;
};

0 comments on commit f112936

Please sign in to comment.