forked from laurengarcia/url-metadata
-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.d.ts
80 lines (73 loc) · 1.99 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
// Type definitions for url-metadata
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export = urlMetadata
declare function urlMetadata(
url: string,
options?: urlMetadata.Options,
): Promise<urlMetadata.Result>
declare namespace urlMetadata {
interface Options {
userAgent?: string
fromEmail?: string
maxRedirects?: number
timeout?: number
descriptionLength?: number
ensureSecureImageRequest?: boolean
sourceMap?: { [key: string]: string }
encode?: (v: string) => string
decode?: (v: Buffer) => string
}
interface Result {
url: string
canonical: string
title: string
image: string
author: string
description: string
keywords: string
source: string
price: string
priceCurrency: string
availability: string
robots: string
jsonld: any
'og:url': string
'og:locale': string
'og:locale:alternate': string
'og:title': string
'og:type': string
'og:description': string
'og:determiner': string
'og:site_name': string
'og:image': string
'og:image:secure_url': string
'og:image:type': string
'og:image:width': string
'og:image:height': string
'twitter:title': string
'twitter:image': string
'twitter:image:alt': string
'twitter:card': string
'twitter:site': string
'twitter:site:id': string
'twitter:account_id': string
'twitter:creator': string
'twitter:creator:id': string
'twitter:player': string
'twitter:player:width': string
'twitter:player:height': string
'twitter:player:stream':string
'article:published_time'?: string
'article:modified_time'?: string
'article:expiration_time'?: string
'article:author'?: string
'article:section'?: string
'article:tag'?: string
'og:article:published_time'?: string
'og:article:modified_time'?: string
'og:article:expiration_time'?: string
'og:article:author'?: string
'og:article:section'?: string
'og:article:tag'?: string
}
}