@icecreamcake/autojs6-dts
Version:
TypeScript Declarations for AutoJs6
160 lines (158 loc) • 7.27 kB
TypeScript
declare namespace GitHub {
namespace Releases {
/**
* @example
* let response = [{
* 'url': 'https://api.github.com/repos/octocat/Hello-World/releases/1',
* 'html_url': 'https://github.com/octocat/Hello-World/releases/v1.0.0',
* 'assets_url': 'https://api.github.com/repos/octocat/Hello-World/releases/1/assets',
* 'upload_url': 'https://uploads.github.com/repos/octocat/Hello-World/releases/1/assets{?name,label}',
* 'tarball_url': 'https://api.github.com/repos/octocat/Hello-World/tarball/v1.0.0',
* 'zipball_url': 'https://api.github.com/repos/octocat/Hello-World/zipball/v1.0.0',
* 'id': 1,
* 'node_id': 'MDc6UmVsZWFzZTE=',
* 'tag_name': 'v1.0.0',
* 'target_commitish': 'master',
* 'name': 'v1.0.0',
* 'body': 'Description of the release',
* 'draft': false,
* 'prerelease': false,
* 'created_at': '2013-02-27T19:35:32Z',
* 'published_at': '2013-02-27T19:35:32Z',
* 'author': {
* 'login': 'octocat',
* 'id': 1,
* 'node_id': 'MDQ6VXNlcjE=',
* 'avatar_url': 'https://github.com/images/error/octocat_happy.gif',
* 'gravatar_id': '',
* 'url': 'https://api.github.com/users/octocat',
* 'html_url': 'https://github.com/octocat',
* 'followers_url': 'https://api.github.com/users/octocat/followers',
* 'following_url': 'https://api.github.com/users/octocat/following{/other_user}',
* 'gists_url': 'https://api.github.com/users/octocat/gists{/gist_id}',
* 'starred_url': 'https://api.github.com/users/octocat/starred{/owner}{/repo}',
* 'subscriptions_url': 'https://api.github.com/users/octocat/subscriptions',
* 'organizations_url': 'https://api.github.com/users/octocat/orgs',
* 'repos_url': 'https://api.github.com/users/octocat/repos',
* 'events_url': 'https://api.github.com/users/octocat/events{/privacy}',
* 'received_events_url': 'https://api.github.com/users/octocat/received_events',
* 'type': 'User',
* 'site_admin': false
* },
* 'assets': [{
* 'url': 'https://api.github.com/repos/octocat/Hello-World/releases/assets/1',
* 'browser_download_url': 'https://github.com/octocat/Hello-World/releases/download/v1.0.0/example.zip',
* 'id': 1,
* 'node_id': 'MDEyOlJlbGVhc2VBc3NldDE=',
* 'name': 'example.zip',
* 'label': 'short description',
* 'state': 'uploaded',
* 'content_type': 'application/zip',
* 'size': 1024,
* 'download_count': 42,
* 'created_at': '2013-02-27T19:35:32Z',
* 'updated_at': '2013-02-27T19:35:32Z',
* 'uploader': {
* 'login': 'octocat',
* 'id': 1,
* 'node_id': 'MDQ6VXNlcjE=',
* 'avatar_url': 'https://github.com/images/error/octocat_happy.gif',
* 'gravatar_id': '',
* 'url': 'https://api.github.com/users/octocat',
* 'html_url': 'https://github.com/octocat',
* 'followers_url': 'https://api.github.com/users/octocat/followers',
* 'following_url': 'https://api.github.com/users/octocat/following{/other_user}',
* 'gists_url': 'https://api.github.com/users/octocat/gists{/gist_id}',
* 'starred_url': 'https://api.github.com/users/octocat/starred{/owner}{/repo}',
* 'subscriptions_url': 'https://api.github.com/users/octocat/subscriptions',
* 'organizations_url': 'https://api.github.com/users/octocat/orgs',
* 'repos_url': 'https://api.github.com/users/octocat/repos',
* 'events_url': 'https://api.github.com/users/octocat/events{/privacy}',
* 'received_events_url': 'https://api.github.com/users/octocat/received_events',
* 'type': 'User',
* 'site_admin': false
* }
* }]
* }];
* @see https://docs.github.com/en/free-pro-team@latest/rest/reference/repos#releases
*/
interface ListItem {
assets: {
browser_download_url: string,
content_type: string,
created_at: string,
download_count: number,
id: number,
label: string,
name: string,
node_id: string,
size: number,
state: string,
updated_at: string,
uploader: {
avatar_url: string,
events_url: string,
followers_url: string,
following_url: string,
gists_url: string,
gravatar_id: string,
html_url: string,
id: number,
login: string,
node_id: string,
organizations_url: string,
received_events_url: string,
repos_url: string,
site_admin: boolean,
starred_url: string,
subscriptions_url: string,
type: string,
url: string,
},
url: string,
}[],
assets_url: string,
author: {
avatar_url: string,
events_url: string,
followers_url: string,
following_url: string,
gists_url: string,
gravatar_id: string,
html_url: string,
id: number,
login: string,
node_id: string,
organizations_url: string,
received_events_url: string,
repos_url: string,
site_admin: boolean,
starred_url: string,
subscriptions_url: string,
type: string,
url: string,
},
body: string,
created_at: string,
draft: boolean,
html_url: string,
id: number,
name: string,
node_id: string,
prerelease: boolean,
published_at: string,
tag_name: string,
tarball_url: string,
target_commitish: string,
upload_url: string,
url: string,
zipball_url: string,
}
interface ExtendedListItem extends ListItem {
version_name?: string,
brief_info_str?: string,
}
type List = ListItem[];
type ExtendedList = ExtendedListItem[];
}
}