@pelican.ts/sdk 0.3.3-next.3 → 0.3.3-next.4
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/index.d.mts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +6 -0
- package/dist/index.mjs +6 -0
- package/package.json +1 -1
- package/src/api/application/client.ts +4 -0
- package/src/api/client/client.ts +4 -0
package/dist/index.d.mts
CHANGED
|
@@ -556,6 +556,7 @@ declare class Client$1 {
|
|
|
556
556
|
account: Account;
|
|
557
557
|
private readonly r;
|
|
558
558
|
constructor(requester: AxiosInstance);
|
|
559
|
+
get $r(): AxiosInstance;
|
|
559
560
|
listPermissions: () => Promise<Record<string, Permission>>;
|
|
560
561
|
listServers: (type?: "accessible" | "mine" | "admin" | "admin-all", page?: number, per_page?: number, include?: ("egg" | "subusers")[]) => Promise<Server[]>;
|
|
561
562
|
server: (uuid: string) => ServerClient;
|
|
@@ -1571,6 +1572,7 @@ declare class Client {
|
|
|
1571
1572
|
eggs: Eggs;
|
|
1572
1573
|
mounts: Mounts;
|
|
1573
1574
|
constructor(requester: AxiosInstance);
|
|
1575
|
+
get $r(): AxiosInstance;
|
|
1574
1576
|
listServers: (search?: string, page?: number) => Promise<ApplicationServer[]>;
|
|
1575
1577
|
createServer: (opts: z.infer<typeof CreateServerSchema>) => Promise<ApplicationServer>;
|
|
1576
1578
|
getServerByExternalId: (external_id: string, include?: ("egg" | "subusers")[]) => Promise<ApplicationServer>;
|
package/dist/index.d.ts
CHANGED
|
@@ -556,6 +556,7 @@ declare class Client$1 {
|
|
|
556
556
|
account: Account;
|
|
557
557
|
private readonly r;
|
|
558
558
|
constructor(requester: AxiosInstance);
|
|
559
|
+
get $r(): AxiosInstance;
|
|
559
560
|
listPermissions: () => Promise<Record<string, Permission>>;
|
|
560
561
|
listServers: (type?: "accessible" | "mine" | "admin" | "admin-all", page?: number, per_page?: number, include?: ("egg" | "subusers")[]) => Promise<Server[]>;
|
|
561
562
|
server: (uuid: string) => ServerClient;
|
|
@@ -1571,6 +1572,7 @@ declare class Client {
|
|
|
1571
1572
|
eggs: Eggs;
|
|
1572
1573
|
mounts: Mounts;
|
|
1573
1574
|
constructor(requester: AxiosInstance);
|
|
1575
|
+
get $r(): AxiosInstance;
|
|
1574
1576
|
listServers: (search?: string, page?: number) => Promise<ApplicationServer[]>;
|
|
1575
1577
|
createServer: (opts: z.infer<typeof CreateServerSchema>) => Promise<ApplicationServer>;
|
|
1576
1578
|
getServerByExternalId: (external_id: string, include?: ("egg" | "subusers")[]) => Promise<ApplicationServer>;
|
package/dist/index.js
CHANGED
|
@@ -901,6 +901,9 @@ var Client = class {
|
|
|
901
901
|
this.r = requester;
|
|
902
902
|
this.account = new Account(requester);
|
|
903
903
|
}
|
|
904
|
+
get $r() {
|
|
905
|
+
return this.r;
|
|
906
|
+
}
|
|
904
907
|
listPermissions = async () => {
|
|
905
908
|
const { data } = await this.r.get("/permissions");
|
|
906
909
|
return data.attributes.permissions;
|
|
@@ -1989,6 +1992,9 @@ var Client2 = class {
|
|
|
1989
1992
|
this.eggs = new Eggs(requester);
|
|
1990
1993
|
this.mounts = new Mounts(requester);
|
|
1991
1994
|
}
|
|
1995
|
+
get $r() {
|
|
1996
|
+
return this.r;
|
|
1997
|
+
}
|
|
1992
1998
|
listServers = async (search, page = 1) => {
|
|
1993
1999
|
const { data } = await this.r.get("/servers", {
|
|
1994
2000
|
params: { search, page }
|
package/dist/index.mjs
CHANGED
|
@@ -864,6 +864,9 @@ var Client = class {
|
|
|
864
864
|
this.r = requester;
|
|
865
865
|
this.account = new Account(requester);
|
|
866
866
|
}
|
|
867
|
+
get $r() {
|
|
868
|
+
return this.r;
|
|
869
|
+
}
|
|
867
870
|
listPermissions = async () => {
|
|
868
871
|
const { data } = await this.r.get("/permissions");
|
|
869
872
|
return data.attributes.permissions;
|
|
@@ -1952,6 +1955,9 @@ var Client2 = class {
|
|
|
1952
1955
|
this.eggs = new Eggs(requester);
|
|
1953
1956
|
this.mounts = new Mounts(requester);
|
|
1954
1957
|
}
|
|
1958
|
+
get $r() {
|
|
1959
|
+
return this.r;
|
|
1960
|
+
}
|
|
1955
1961
|
listServers = async (search, page = 1) => {
|
|
1956
1962
|
const { data } = await this.r.get("/servers", {
|
|
1957
1963
|
params: { search, page }
|
package/package.json
CHANGED
package/src/api/client/client.ts
CHANGED
|
@@ -17,6 +17,10 @@ export class Client {
|
|
|
17
17
|
this.account = new Account(requester)
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
+
get $r(): AxiosInstance {
|
|
21
|
+
return this.r
|
|
22
|
+
}
|
|
23
|
+
|
|
20
24
|
listPermissions = async (): Promise<Record<string, Permission>> => {
|
|
21
25
|
const {data} = await this.r.get<
|
|
22
26
|
GenericResponse<{ permissions: Record<string, Permission> }, "system_permissions">
|