Skip to content

Commit

Permalink
[TASK] fixed typings
Browse files Browse the repository at this point in the history
  • Loading branch information
MathisBurger committed Jan 24, 2022
1 parent c04550e commit 5235ae2
Show file tree
Hide file tree
Showing 23 changed files with 149 additions and 165 deletions.
2 changes: 1 addition & 1 deletion src/models/Badge.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ export interface BadgeInterface {
/**
* The type of the badge
*/
type: string;
type?: string;
}
6 changes: 3 additions & 3 deletions src/models/ContactCard.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ export interface ContactCardInterface {
/**
* The ID of the contact
*/
contact_id: string;
contact_id?: string;
/**
* The type of the contact
*/
contact_type: string;
contact_type?: string;
/**
* The deeplink of the contact
*/
deeplink: string;
deeplink?: string;
}
14 changes: 7 additions & 7 deletions src/models/CropInfo.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ export interface CropInfoFaceInterface {
/**
* The information on the face that was provided by the tinder algorithm.
*/
algo: FacialScopeInterface;
algo?: FacialScopeInterface;
/**
* The percentage value of the bounding box.
*/
bounding_box_percentage: boolean;
bounding_box_percentage?: boolean;
}

/**
Expand All @@ -21,21 +21,21 @@ export interface CropInfoInterface {
/**
* The face recognition data the user applied himself.
*/
user: FacialScopeInterface;
user?: FacialScopeInterface;
/**
* The face recognition data that was applied by the user itself
*/
algo: FacialScopeInterface;
algo?: FacialScopeInterface;
/**
* @ignore No description provided
*/
proceeded_by_bullseye: boolean;
proceeded_by_bullseye?: boolean;
/**
* If the user is customized
*/
user_customized: boolean;
user_customized?: boolean;
/**
* The face recognition data of all faces on the profile picture.
*/
faces: CropInfoFaceInterface[];
faces?: CropInfoFaceInterface[];
}
14 changes: 7 additions & 7 deletions src/models/Descriptor.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,29 @@ export interface DescriptorInterface {
/**
* The ID of an descriptor
*/
id: string;
id?: string;
/**
* The name of an descriptor
*/
name: string;
name?: string;
/**
* The prompt of an descriptor
*/
prompt: string;
prompt?: string;
/**
* The type of an descriptor
*/
type: string;
type?: string;
/**
* The icon url of an descriptor
*/
icon_url: string;
icon_url?: string;
/**
* The icon urls of an descriptor
*/
icon_urls: SizedImage[];
icon_urls?: SizedImage[];
/**
* The choice selections of a descriptor.
*/
choice_selections: ChoiceSelectionInterface[];
choice_selections?: ChoiceSelectionInterface[];
}
8 changes: 4 additions & 4 deletions src/models/FacialScope.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@ export interface FacialScopeInterface {
/**
* The width of the profile picture
*/
width_pct: number;
width_pct?: number;
/**
* The x offset of the picture
*/
x_offset_pct: number;
x_offset_pct?: number;
/**
* The height of the profile picture
*/
height_pct: number;
height_pct?: number;
/**
* The y offset of the picture
*/
y_offset_pct: number;
y_offset_pct?: number;
}
4 changes: 2 additions & 2 deletions src/models/Hashes.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ export type ValueHash = {
/**
* The version of the hash
*/
version: string;
version?: string;
/**
* The value of the hash
*/
value: number;
value?: number;
};
20 changes: 8 additions & 12 deletions src/models/Instagram.d.ts
Original file line number Diff line number Diff line change
@@ -1,23 +1,19 @@
/**
* The type of an instagram photo
*/
import { ParseableInterface } from './ModelInterfaces';
import { parse } from 'date-fns';
import { DATE_TIME_FORMAT } from '../Constants';

export type InstagramPhotoType = {
/**
* The image
*/
image: string;
image?: string;
/**
* The thumbnail of the photo
*/
thumbnail: string;
thumbnail?: string;
/**
* The TS value
*/
ts: string;
ts?: string;
};

/**
Expand All @@ -27,21 +23,21 @@ export interface InstagramInterface {
/**
* The date of the last data fetch
*/
last_fetch_time: Date | string;
last_fetch_time?: Date | string;
/**
* If the initial fetch has been completed
*/
completed_initial_fetch: boolean;
completed_initial_fetch?: boolean;
/**
* All instagram photos of the user
*/
photos: InstagramPhotoType[];
photos?: InstagramPhotoType[];
/**
* The number of media posts
*/
media_count: number;
media_count?: number;
/**
* The instagram name of the user
*/
username: string;
username?: string;
}
12 changes: 6 additions & 6 deletions src/models/Job.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
* The company of an job
*/
export interface JobCompanyInterface {
displayed: boolean;
name: string;
displayed?: boolean;
name?: string;
}

/**
* The title of an job
*/
export interface JobTitleInterface {
displayed: boolean;
name: string;
displayed?: boolean;
name?: string;
}

/**
Expand All @@ -21,9 +21,9 @@ export interface JobInterface {
/**
* The company of the job
*/
company: JobCompanyInterface;
company?: JobCompanyInterface;
/**
* The title of the job
*/
title: JobTitleInterface;
title?: JobTitleInterface;
}
8 changes: 4 additions & 4 deletions src/models/LikePreview.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@ export interface LikePreviewInterface {
/**
* The user
*/
user: {
user?: {
/**
* The ID of the like preview
*/
_id: string;
_id?: string;
/**
* All photos of the like preview
*/
photos: UserPhotoInterface[];
photos?: UserPhotoInterface[];
/**
* If the liked user was recently active
*/
recently_active: boolean;
recently_active?: boolean;
};
}
44 changes: 22 additions & 22 deletions src/models/Match.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,94 +8,94 @@ export interface MatchInterface {
/**
* The ID of a match
*/
_id: string;
_id?: string;
/**
* The ID of a match
*/
id: string;
id?: string;
/**
* If a match was closed
*/
closed: boolean;
closed?: boolean;
/**
* The number of common friends
*/
common_friend_count: number;
common_friend_count?: number;
/**
* The number of common likes
*/
common_like_count: number;
common_like_count?: number;
/**
* The date when the match was created
*/
created_date: Date | string;
created_date?: Date | string;
/**
* If the match is dead
*/
dead: boolean;
dead?: boolean;
/**
* The last activity of the match
*/
last_activity_date: Date | string;
last_activity_date?: Date | string;
/**
* The number of messages
*/
message_count: number;
message_count?: number;
/**
* All messages
*/
messages: MessageInterface[];
messages?: MessageInterface[];
/**
* All participants of the match
*/
participants: string[];
participants?: string[];
/**
* If the match is pending
*/
pending: boolean;
pending?: boolean;
/**
* If the match is a super like
*/
is_super_like: boolean;
is_super_like?: boolean;
/**
* The the match is boosted
*/
is_boost_match: boolean;
is_boost_match?: boolean;
/**
* If the match is super boosted
*/
is_super_boost_match: boolean;
is_super_boost_match?: boolean;
/**
* If the match is based on experience
*/
is_experiences_match: boolean;
is_experiences_match?: boolean;
/**
* If the match is a fast match
*/
is_fast_match: boolean;
is_fast_match?: boolean;
/**
* If the match is opener
*/
is_opener: boolean;
is_opener?: boolean;
/**
* The person you matched with
*/
person: UserInterface;
person?: UserInterface;
/**
* If you are following for each other
*/
following: boolean;
following?: boolean;
/**
* The following moments
*/
following_moments: boolean;
following_moments?: boolean;
/**
* If the message has been seen
*/
seen?: {
/**
* If the match has been seen
*/
match_seen: boolean;
match_seen?: boolean;
};
}
3 changes: 0 additions & 3 deletions src/models/MatchedUser.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import { UserInterface } from './User';
import { ParseableInterface } from './ModelInterfaces';
import { parse } from 'date-fns';
import { DATE_TIME_FORMAT } from '../Constants';

export type MatchedUserInterface = Pick<
UserInterface,
Expand Down
Loading

0 comments on commit 5235ae2

Please sign in to comment.