From a7a7e9acbdf03d006541b2e4494fd7a0d46ea243 Mon Sep 17 00:00:00 2001 From: Christian Rackerseder Date: Mon, 11 Feb 2019 07:36:20 +0100 Subject: [PATCH] Update Giphy API response type Aligned with official API docs: https://developers.giphy.com/docs/ --- types/giphy-api/index.d.ts | 88 ++++++++++++++++---------------------- 1 file changed, 38 insertions(+), 50 deletions(-) diff --git a/types/giphy-api/index.d.ts b/types/giphy-api/index.d.ts index e179e2b99b..f6174543eb 100644 --- a/types/giphy-api/index.d.ts +++ b/types/giphy-api/index.d.ts @@ -45,25 +45,45 @@ interface BaseImage { interface Result { data: [ { - type: "gif"; + type: string; id: string; slug: string; url: string; - bitly_gif_url: string; bitly_url: string; embed_url: string; username: string; source: string; rating: Rating; content_url: string; + user?: { + avatar_url: string; + banner_url: string; + profile_url: string; + username: string; + display_name: string; + twitter: string; + }, source_tld: string; source_post_url: string; - is_sticker: number; + update_datetime: string; + create_datetime: string; import_datetime: string; trending_datetime: string; + title: string; images: { + fixed_height: BaseImage & { + size: string; + mp4: string; + mp4_size: string; + webp: string; + webp_size: string; + }; fixed_height_still: BaseImage; - original_still: BaseImage; + fixed_height_downsampled: BaseImage & { + size: string; + webp: string; + webp_size: string; + }; fixed_width: BaseImage & { size: string; mp4: string; @@ -71,18 +91,13 @@ interface Result { webp: string; webp_size: string; }; - fixed_height_small_still: BaseImage; - fixed_height_downsampled: BaseImage & { + original_still: BaseImage; + fixed_width_still: BaseImage; + fixed_width_downsampled: BaseImage & { size: string; webp: string; webp_size: string; }; - preview: { - width: string; - height: string; - mp4: string; - mp4_size: string; - }; fixed_height_small: BaseImage & { size: string; mp4: string; @@ -90,20 +105,7 @@ interface Result { webp: string; webp_size: string; }; - downsized_still: BaseImage & { - size: string; - }; - downsized: BaseImage & { - size: string; - }; - downsized_large: BaseImage & { - size: string; - }; - fixed_width_small_still: BaseImage; - preview_webp: BaseImage & { - size: string; - }; - fixed_width_still: BaseImage; + fixed_height_small_still: BaseImage; fixed_width_small: BaseImage & { size: string; mp4: string; @@ -111,20 +113,20 @@ interface Result { webp: string; webp_size: string; }; - downsized_small: { - width: string; - height: string; - mp4: string; - mp4_size: string; + fixed_width_small_still: BaseImage; + downsized: BaseImage & { + size: string; }; - fixed_width_downsampled: BaseImage & { + downsized_still: BaseImage; + downsized_large: BaseImage & { size: string; - webp: string; - webp_size: string; }; downsized_medium: BaseImage & { size: string; }; + downsized_small: BaseImage & { + size: string; + }; original: BaseImage & { size: string; frames: string; @@ -133,15 +135,8 @@ interface Result { webp: string; webp_size: string; }; - fixed_height: BaseImage & { - size: string; - mp4: string; - mp4_size: string; - webp: string; - webp_size: string; - }; - looping: { mp4: string; mp4_size: string }; - original_mp4: { + looping: { mp4: string; }; + preview: { width: string; height: string; mp4: string; @@ -150,13 +145,6 @@ interface Result { preview_gif: BaseImage & { size: string; }; - title: string; - _score: number; - analytics: { - onload: { url: string }; - onclick: { url: string }; - onsent: { url: string }; - }; }; } ];