@pelican.ts/sdk 0.4.7 → 0.4.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/index.d.mts +0 -9
- package/dist/api/index.d.ts +0 -9
- package/dist/api/index.js +0 -13
- package/dist/api/index.mjs +0 -13
- package/dist/index.d.mts +0 -16
- package/dist/index.d.ts +0 -16
- package/dist/index.js +0 -23
- package/dist/index.mjs +0 -23
- package/package.json +1 -1
- package/src/api/client/account.ts +0 -20
- package/src/humane/Account.ts +0 -13
package/dist/api/index.d.mts
CHANGED
|
@@ -62,15 +62,6 @@ declare class Account {
|
|
|
62
62
|
create: (name: string, public_key: string) => Promise<SSHKey>;
|
|
63
63
|
delete: (fingerprint: string) => Promise<void>;
|
|
64
64
|
};
|
|
65
|
-
twoFactor: {
|
|
66
|
-
info: () => Promise<{
|
|
67
|
-
image_url_data: string;
|
|
68
|
-
}>;
|
|
69
|
-
enable: (code: string) => Promise<{
|
|
70
|
-
tokens: string[];
|
|
71
|
-
}>;
|
|
72
|
-
disable: (password: string) => Promise<void>;
|
|
73
|
-
};
|
|
74
65
|
}
|
|
75
66
|
|
|
76
67
|
type GenericResponse<T, N extends string = string, M = undefined> = {
|
package/dist/api/index.d.ts
CHANGED
|
@@ -62,15 +62,6 @@ declare class Account {
|
|
|
62
62
|
create: (name: string, public_key: string) => Promise<SSHKey>;
|
|
63
63
|
delete: (fingerprint: string) => Promise<void>;
|
|
64
64
|
};
|
|
65
|
-
twoFactor: {
|
|
66
|
-
info: () => Promise<{
|
|
67
|
-
image_url_data: string;
|
|
68
|
-
}>;
|
|
69
|
-
enable: (code: string) => Promise<{
|
|
70
|
-
tokens: string[];
|
|
71
|
-
}>;
|
|
72
|
-
disable: (password: string) => Promise<void>;
|
|
73
|
-
};
|
|
74
65
|
}
|
|
75
66
|
|
|
76
67
|
type GenericResponse<T, N extends string = string, M = undefined> = {
|
package/dist/api/index.js
CHANGED
|
@@ -84,19 +84,6 @@ var Account = class {
|
|
|
84
84
|
await this.r.post(`/account/ssh-keys/remove`, { fingerprint });
|
|
85
85
|
}
|
|
86
86
|
};
|
|
87
|
-
twoFactor = {
|
|
88
|
-
info: async () => {
|
|
89
|
-
const { data } = await this.r.get("/account/two-factor");
|
|
90
|
-
return data;
|
|
91
|
-
},
|
|
92
|
-
enable: async (code) => {
|
|
93
|
-
const { data } = await this.r.post("/account/two-factor", { code });
|
|
94
|
-
return data;
|
|
95
|
-
},
|
|
96
|
-
disable: async (password) => {
|
|
97
|
-
await this.r.delete("/account/two-factor", { data: { password } });
|
|
98
|
-
}
|
|
99
|
-
};
|
|
100
87
|
};
|
|
101
88
|
|
|
102
89
|
// src/api/client/client.ts
|
package/dist/api/index.mjs
CHANGED
|
@@ -47,19 +47,6 @@ var Account = class {
|
|
|
47
47
|
await this.r.post(`/account/ssh-keys/remove`, { fingerprint });
|
|
48
48
|
}
|
|
49
49
|
};
|
|
50
|
-
twoFactor = {
|
|
51
|
-
info: async () => {
|
|
52
|
-
const { data } = await this.r.get("/account/two-factor");
|
|
53
|
-
return data;
|
|
54
|
-
},
|
|
55
|
-
enable: async (code) => {
|
|
56
|
-
const { data } = await this.r.post("/account/two-factor", { code });
|
|
57
|
-
return data;
|
|
58
|
-
},
|
|
59
|
-
disable: async (password) => {
|
|
60
|
-
await this.r.delete("/account/two-factor", { data: { password } });
|
|
61
|
-
}
|
|
62
|
-
};
|
|
63
50
|
};
|
|
64
51
|
|
|
65
52
|
// src/api/client/client.ts
|
package/dist/index.d.mts
CHANGED
|
@@ -370,15 +370,6 @@ declare class Account$1 {
|
|
|
370
370
|
create: (name: string, public_key: string) => Promise<SSHKey>;
|
|
371
371
|
delete: (fingerprint: string) => Promise<void>;
|
|
372
372
|
};
|
|
373
|
-
twoFactor: {
|
|
374
|
-
info: () => Promise<{
|
|
375
|
-
image_url_data: string;
|
|
376
|
-
}>;
|
|
377
|
-
enable: (code: string) => Promise<{
|
|
378
|
-
tokens: string[];
|
|
379
|
-
}>;
|
|
380
|
-
disable: (password: string) => Promise<void>;
|
|
381
|
-
};
|
|
382
373
|
}
|
|
383
374
|
|
|
384
375
|
declare class ServerDatabases {
|
|
@@ -579,13 +570,6 @@ declare class Account {
|
|
|
579
570
|
listSshKeys: () => Promise<SSHKey[]>;
|
|
580
571
|
createSshKey: (name: string, public_key: string) => Promise<SSHKey>;
|
|
581
572
|
deleteSshKey: (fingerprint: string) => Promise<void>;
|
|
582
|
-
get2faQR: () => Promise<{
|
|
583
|
-
image_url_data: string;
|
|
584
|
-
}>;
|
|
585
|
-
enable2fa: (code: string) => Promise<{
|
|
586
|
-
tokens: string[];
|
|
587
|
-
}>;
|
|
588
|
-
disable2fa: (password: string) => Promise<void>;
|
|
589
573
|
}
|
|
590
574
|
|
|
591
575
|
declare class ServerAllocation {
|
package/dist/index.d.ts
CHANGED
|
@@ -370,15 +370,6 @@ declare class Account$1 {
|
|
|
370
370
|
create: (name: string, public_key: string) => Promise<SSHKey>;
|
|
371
371
|
delete: (fingerprint: string) => Promise<void>;
|
|
372
372
|
};
|
|
373
|
-
twoFactor: {
|
|
374
|
-
info: () => Promise<{
|
|
375
|
-
image_url_data: string;
|
|
376
|
-
}>;
|
|
377
|
-
enable: (code: string) => Promise<{
|
|
378
|
-
tokens: string[];
|
|
379
|
-
}>;
|
|
380
|
-
disable: (password: string) => Promise<void>;
|
|
381
|
-
};
|
|
382
373
|
}
|
|
383
374
|
|
|
384
375
|
declare class ServerDatabases {
|
|
@@ -579,13 +570,6 @@ declare class Account {
|
|
|
579
570
|
listSshKeys: () => Promise<SSHKey[]>;
|
|
580
571
|
createSshKey: (name: string, public_key: string) => Promise<SSHKey>;
|
|
581
572
|
deleteSshKey: (fingerprint: string) => Promise<void>;
|
|
582
|
-
get2faQR: () => Promise<{
|
|
583
|
-
image_url_data: string;
|
|
584
|
-
}>;
|
|
585
|
-
enable2fa: (code: string) => Promise<{
|
|
586
|
-
tokens: string[];
|
|
587
|
-
}>;
|
|
588
|
-
disable2fa: (password: string) => Promise<void>;
|
|
589
573
|
}
|
|
590
574
|
|
|
591
575
|
declare class ServerAllocation {
|
package/dist/index.js
CHANGED
|
@@ -92,19 +92,6 @@ var Account = class {
|
|
|
92
92
|
await this.r.post(`/account/ssh-keys/remove`, { fingerprint });
|
|
93
93
|
}
|
|
94
94
|
};
|
|
95
|
-
twoFactor = {
|
|
96
|
-
info: async () => {
|
|
97
|
-
const { data } = await this.r.get("/account/two-factor");
|
|
98
|
-
return data;
|
|
99
|
-
},
|
|
100
|
-
enable: async (code) => {
|
|
101
|
-
const { data } = await this.r.post("/account/two-factor", { code });
|
|
102
|
-
return data;
|
|
103
|
-
},
|
|
104
|
-
disable: async (password) => {
|
|
105
|
-
await this.r.delete("/account/two-factor", { data: { password } });
|
|
106
|
-
}
|
|
107
|
-
};
|
|
108
95
|
};
|
|
109
96
|
|
|
110
97
|
// src/api/client/client.ts
|
|
@@ -1721,16 +1708,6 @@ var Account2 = class {
|
|
|
1721
1708
|
listSshKeys = async () => this.client.account.sshKeys.list();
|
|
1722
1709
|
createSshKey = async (name, public_key) => this.client.account.sshKeys.create(name, public_key);
|
|
1723
1710
|
deleteSshKey = async (fingerprint) => this.client.account.sshKeys.delete(fingerprint);
|
|
1724
|
-
get2faQR = async () => this.client.account.twoFactor.info();
|
|
1725
|
-
enable2fa = async (code) => {
|
|
1726
|
-
const tokens = await this.client.account.twoFactor.enable(code);
|
|
1727
|
-
this.$has2faEnabled = true;
|
|
1728
|
-
return tokens;
|
|
1729
|
-
};
|
|
1730
|
-
disable2fa = async (password) => {
|
|
1731
|
-
await this.client.account.twoFactor.disable(password);
|
|
1732
|
-
this.$has2faEnabled = false;
|
|
1733
|
-
};
|
|
1734
1711
|
};
|
|
1735
1712
|
|
|
1736
1713
|
// src/humane/ServerAllocation.ts
|
package/dist/index.mjs
CHANGED
|
@@ -47,19 +47,6 @@ var Account = class {
|
|
|
47
47
|
await this.r.post(`/account/ssh-keys/remove`, { fingerprint });
|
|
48
48
|
}
|
|
49
49
|
};
|
|
50
|
-
twoFactor = {
|
|
51
|
-
info: async () => {
|
|
52
|
-
const { data } = await this.r.get("/account/two-factor");
|
|
53
|
-
return data;
|
|
54
|
-
},
|
|
55
|
-
enable: async (code) => {
|
|
56
|
-
const { data } = await this.r.post("/account/two-factor", { code });
|
|
57
|
-
return data;
|
|
58
|
-
},
|
|
59
|
-
disable: async (password) => {
|
|
60
|
-
await this.r.delete("/account/two-factor", { data: { password } });
|
|
61
|
-
}
|
|
62
|
-
};
|
|
63
50
|
};
|
|
64
51
|
|
|
65
52
|
// src/api/client/client.ts
|
|
@@ -1676,16 +1663,6 @@ var Account2 = class {
|
|
|
1676
1663
|
listSshKeys = async () => this.client.account.sshKeys.list();
|
|
1677
1664
|
createSshKey = async (name, public_key) => this.client.account.sshKeys.create(name, public_key);
|
|
1678
1665
|
deleteSshKey = async (fingerprint) => this.client.account.sshKeys.delete(fingerprint);
|
|
1679
|
-
get2faQR = async () => this.client.account.twoFactor.info();
|
|
1680
|
-
enable2fa = async (code) => {
|
|
1681
|
-
const tokens = await this.client.account.twoFactor.enable(code);
|
|
1682
|
-
this.$has2faEnabled = true;
|
|
1683
|
-
return tokens;
|
|
1684
|
-
};
|
|
1685
|
-
disable2fa = async (password) => {
|
|
1686
|
-
await this.client.account.twoFactor.disable(password);
|
|
1687
|
-
this.$has2faEnabled = false;
|
|
1688
|
-
};
|
|
1689
1666
|
};
|
|
1690
1667
|
|
|
1691
1668
|
// src/humane/ServerAllocation.ts
|
package/package.json
CHANGED
|
@@ -69,24 +69,4 @@ export class Account {
|
|
|
69
69
|
await this.r.post(`/account/ssh-keys/remove`, {fingerprint})
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
|
-
|
|
73
|
-
twoFactor = {
|
|
74
|
-
info: async (): Promise<{ image_url_data: string }> => {
|
|
75
|
-
const {data} = await this.r.get<
|
|
76
|
-
Awaited<ReturnType<typeof this.twoFactor.info>>
|
|
77
|
-
>("/account/two-factor")
|
|
78
|
-
return data
|
|
79
|
-
},
|
|
80
|
-
|
|
81
|
-
enable: async (code: string): Promise<{ tokens: string[] }> => {
|
|
82
|
-
const {data} = await this.r.post<
|
|
83
|
-
Awaited<ReturnType<typeof this.twoFactor.enable>>
|
|
84
|
-
>("/account/two-factor", {code})
|
|
85
|
-
return data
|
|
86
|
-
},
|
|
87
|
-
|
|
88
|
-
disable: async (password: string): Promise<void> => {
|
|
89
|
-
await this.r.delete("/account/two-factor", {data: {password}})
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
72
|
}
|
package/src/humane/Account.ts
CHANGED
|
@@ -57,17 +57,4 @@ export class Account {
|
|
|
57
57
|
|
|
58
58
|
deleteSshKey = async (fingerprint: string) =>
|
|
59
59
|
this.client.account.sshKeys.delete(fingerprint)
|
|
60
|
-
|
|
61
|
-
get2faQR = async () => this.client.account.twoFactor.info()
|
|
62
|
-
|
|
63
|
-
enable2fa = async (code: string) => {
|
|
64
|
-
const tokens = await this.client.account.twoFactor.enable(code)
|
|
65
|
-
this.$has2faEnabled = true
|
|
66
|
-
return tokens
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
disable2fa = async (password: string) => {
|
|
70
|
-
await this.client.account.twoFactor.disable(password)
|
|
71
|
-
this.$has2faEnabled = false
|
|
72
|
-
}
|
|
73
60
|
}
|