diff --git a/notNeededPackages.json b/notNeededPackages.json index b770290d84..c6e4011bdf 100644 --- a/notNeededPackages.json +++ b/notNeededPackages.json @@ -2580,6 +2580,12 @@ "sourceRepoURL": "https://github.com/foretagsplatsen/numbro/", "asOfVersion": "1.9.3" }, + { + "libraryName": "oembed-parser", + "typingsPackageName": "oembed-parser", + "sourceRepoURL": "https://www.npmjs.com/package/oembed-parser", + "asOfVersion": "1.2.2" + }, { "libraryName": "odata", "typingsPackageName": "odata", diff --git a/types/oembed-parser/index.d.ts b/types/oembed-parser/index.d.ts deleted file mode 100644 index 96fbf86f52..0000000000 --- a/types/oembed-parser/index.d.ts +++ /dev/null @@ -1,91 +0,0 @@ -// Type definitions for oembed-parser 1.2 -// Project: https://www.npmjs.com/package/oembed-parser -// Definitions by: BendingBender -// CodeBast4rd -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -export function extract(url: string): Promise; - -export function hasProvider(url: string): boolean; - -/** - * Basic data structure of every oembed response see https://oembed.com/ - */ -export interface OembedData { - type: 'rich' | 'video' | 'photo' | 'link'; - version: string; - /** A text title, describing the resource. */ - title?: string; - /** The name of the author/owner of the resource. */ - author_name?: string; - /** A URL for the author/owner of the resource. */ - author_url?: string; - /** The name of the resource provider. */ - provider_name?: string; - /** The url of the resource provider. */ - provider_url?: string; - /** The suggested cache lifetime for this resource, in seconds. Consumers may choose to use this value or not. */ - cache_age?: string; - /** - * A URL to a thumbnail image representing the resource. - * The thumbnail must respect any maxwidth and maxheight parameters. - * If this parameter is present, thumbnail_width and thumbnail_height must also be present. - */ - thumbnail_url?: string; - /** - * The width of the optional thumbnail. - * If this parameter is present, thumbnail_url and thumbnail_height must also be present. - */ - thumbnail_width?: number; - /** - * The height of the optional thumbnail. - * If this parameter is present, thumbnail_url and thumbnail_width must also be present. - */ - thumbnail_height?: number; -} - -export interface LinkTypeData extends OembedData { - readonly type: 'link'; -} - -export interface PhotoTypeData extends OembedData { - readonly type: 'photo'; - /** - * The source URL of the image. Consumers should be able to insert this URL into an element. - * Only HTTP and HTTPS URLs are valid. - */ - url: string; - /** The width in pixels of the image specified in the url parameter. */ - width: number; - /** The height in pixels of the image specified in the url parameter. */ - height: number; -} - -export interface VideoTypeData extends OembedData { - readonly type: 'video'; - /** - * The HTML required to embed a video player. - * The HTML should have no padding or margins. - * Consumers may wish to load the HTML in an off-domain iframe to avoid XSS vulnerabilities. - */ - html: string; - /** The width in pixels required to display the HTML. */ - width: number; - /** The height in pixels required to display the HTML. */ - height: number; -} - -export interface RichTypeData extends OembedData { - readonly type: 'rich'; - /** - * The HTML required to display the resource. - * The HTML should have no padding or margins. - * Consumers may wish to load the HTML in an off-domain iframe to avoid XSS vulnerabilities. - * The markup should be valid XHTML 1.0 Basic. - */ - html: string; - /** The width in pixels required to display the HTML. */ - width: number; - /** The height in pixels required to display the HTML. */ - height: number; -} diff --git a/types/oembed-parser/oembed-parser-tests.ts b/types/oembed-parser/oembed-parser-tests.ts deleted file mode 100644 index 9d9ff34470..0000000000 --- a/types/oembed-parser/oembed-parser-tests.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { extract, hasProvider, OembedData } from "oembed-parser"; - -const url = "https://www.youtube.com/watch?v=8jPQjjsBbIc"; - -extract(url).then(data => { - const parsedData: OembedData = data; -}); - -const providerExists: boolean = hasProvider(url); diff --git a/types/oembed-parser/tsconfig.json b/types/oembed-parser/tsconfig.json deleted file mode 100644 index fc66a47c65..0000000000 --- a/types/oembed-parser/tsconfig.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "compilerOptions": { - "module": "commonjs", - "lib": [ - "es6" - ], - "noImplicitAny": true, - "noImplicitThis": true, - "strictNullChecks": true, - "strictFunctionTypes": true, - "baseUrl": "../", - "typeRoots": [ - "../" - ], - "types": [], - "noEmit": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.d.ts", - "oembed-parser-tests.ts" - ] -} diff --git a/types/oembed-parser/tslint.json b/types/oembed-parser/tslint.json deleted file mode 100644 index 3db14f85ea..0000000000 --- a/types/oembed-parser/tslint.json +++ /dev/null @@ -1 +0,0 @@ -{ "extends": "dtslint/dt.json" }