-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.d.ts
93 lines (86 loc) · 2.39 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
81
82
83
84
85
86
87
88
89
90
91
92
93
declare namespace RegistrySDK {
interface MetaData {
uptime: number
}
interface addonInfos {
name: string,
description: string,
latest: string,
createdAt: Date,
updatedAt: Date,
author: {
username: string,
description: string
},
organisation: {
name: string,
createdAt: Date,
updatedAt: Date
},
version: [
{
version: string,
git: string,
createdAt: string
}
]
}
interface addonId {
addonId: number
}
interface listOrgas {
[name: string]: {
description: string,
owner: string,
users: string[]
addons: string[]
}
}
interface orgaInfos {
name: string,
description: string,
createdAt: Date,
updatedAt: Date,
owner: {
username: string,
createdAt: Date,
updatedAt: Date
},
users: [
{
username: string,
createdAt: Date,
updatedAt: Date
}
]
addons: [
{
name: string,
description: string,
latest: string,
createdAt: Date,
updatedAt: Date
}
]
}
interface orgaUserinfos {
createdAt: Date,
updatedAt: Date,
organisationId: number,
userId: number
}
export function meta(): Promise<MetaData>;
export function login(username: string, password: string): Promise<string>;
export function createAccount(username: string, password: string, email: string): Promise<void>;
export function getAllAddons(): Promise<string[]>;
export function getOneAddon(name: string): Promise<addonInfos>;
export function publishAddon(addonDirectory: string, token: string): Promise<addonId>;
export function getAllOrganizations(): Promise<listOrgas>
export function getOneOrganization(orgaName: string): Promise<orgaInfos>
export function orgaAddUser(orgaName: string, username: string, token: string): Promise<orgaUserinfos>
export namespace constants {
export const registry_url: string | URL;
}
}
export as namespace RegistrySDK;
export = RegistrySDK;