@pelican.ts/sdk 0.4.4 → 0.4.6
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 +3 -0
- package/dist/api/index.d.ts +3 -0
- package/dist/api/index.js +9 -0
- package/dist/api/index.mjs +9 -0
- package/dist/index.d.mts +7 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +13 -0
- package/dist/index.mjs +13 -0
- package/package.json +1 -1
- package/src/api/client/server_backups.ts +11 -0
- package/src/humane/Server.ts +4 -0
- package/src/humane/ServerBackup.ts +10 -0
package/dist/api/index.d.mts
CHANGED
|
@@ -390,6 +390,9 @@ declare class ServerBackups {
|
|
|
390
390
|
downloadGetUrl: (backup_uuid: string) => Promise<string>;
|
|
391
391
|
download: (backup_uuid: string) => Promise<ArrayBuffer>;
|
|
392
392
|
delete: (backup_uuid: string) => Promise<void>;
|
|
393
|
+
rename: (backup_uuid: string, name: string) => Promise<void>;
|
|
394
|
+
toggleLock: (backup_uuid: string) => Promise<void>;
|
|
395
|
+
restore: (backup_uuid: string, truncate: boolean) => Promise<void>;
|
|
393
396
|
}
|
|
394
397
|
|
|
395
398
|
type StartupParams = {
|
package/dist/api/index.d.ts
CHANGED
|
@@ -390,6 +390,9 @@ declare class ServerBackups {
|
|
|
390
390
|
downloadGetUrl: (backup_uuid: string) => Promise<string>;
|
|
391
391
|
download: (backup_uuid: string) => Promise<ArrayBuffer>;
|
|
392
392
|
delete: (backup_uuid: string) => Promise<void>;
|
|
393
|
+
rename: (backup_uuid: string, name: string) => Promise<void>;
|
|
394
|
+
toggleLock: (backup_uuid: string) => Promise<void>;
|
|
395
|
+
restore: (backup_uuid: string, truncate: boolean) => Promise<void>;
|
|
393
396
|
}
|
|
394
397
|
|
|
395
398
|
type StartupParams = {
|
package/dist/api/index.js
CHANGED
|
@@ -365,6 +365,15 @@ var ServerBackups = class {
|
|
|
365
365
|
delete = async (backup_uuid) => {
|
|
366
366
|
await this.r.delete(`/servers/${this.id}/backups/${backup_uuid}`);
|
|
367
367
|
};
|
|
368
|
+
rename = async (backup_uuid, name) => {
|
|
369
|
+
await this.r.put(`/servers/${this.id}/backups/${backup_uuid}/rename`, { name });
|
|
370
|
+
};
|
|
371
|
+
toggleLock = async (backup_uuid) => {
|
|
372
|
+
await this.r.post(`/servers/${this.id}/backups/${backup_uuid}/lock`);
|
|
373
|
+
};
|
|
374
|
+
restore = async (backup_uuid, truncate) => {
|
|
375
|
+
await this.r.post(`/servers/${this.id}/backups/${backup_uuid}/restore`, { truncate });
|
|
376
|
+
};
|
|
368
377
|
};
|
|
369
378
|
|
|
370
379
|
// src/api/client/server_startup.ts
|
package/dist/api/index.mjs
CHANGED
|
@@ -328,6 +328,15 @@ var ServerBackups = class {
|
|
|
328
328
|
delete = async (backup_uuid) => {
|
|
329
329
|
await this.r.delete(`/servers/${this.id}/backups/${backup_uuid}`);
|
|
330
330
|
};
|
|
331
|
+
rename = async (backup_uuid, name) => {
|
|
332
|
+
await this.r.put(`/servers/${this.id}/backups/${backup_uuid}/rename`, { name });
|
|
333
|
+
};
|
|
334
|
+
toggleLock = async (backup_uuid) => {
|
|
335
|
+
await this.r.post(`/servers/${this.id}/backups/${backup_uuid}/lock`);
|
|
336
|
+
};
|
|
337
|
+
restore = async (backup_uuid, truncate) => {
|
|
338
|
+
await this.r.post(`/servers/${this.id}/backups/${backup_uuid}/restore`, { truncate });
|
|
339
|
+
};
|
|
331
340
|
};
|
|
332
341
|
|
|
333
342
|
// src/api/client/server_startup.ts
|
package/dist/index.d.mts
CHANGED
|
@@ -493,6 +493,9 @@ declare class ServerBackups {
|
|
|
493
493
|
downloadGetUrl: (backup_uuid: string) => Promise<string>;
|
|
494
494
|
download: (backup_uuid: string) => Promise<ArrayBuffer>;
|
|
495
495
|
delete: (backup_uuid: string) => Promise<void>;
|
|
496
|
+
rename: (backup_uuid: string, name: string) => Promise<void>;
|
|
497
|
+
toggleLock: (backup_uuid: string) => Promise<void>;
|
|
498
|
+
restore: (backup_uuid: string, truncate: boolean) => Promise<void>;
|
|
496
499
|
}
|
|
497
500
|
|
|
498
501
|
declare class ServerStartup {
|
|
@@ -616,6 +619,9 @@ declare class ServerBackup {
|
|
|
616
619
|
downloadGetUrl: () => Promise<string>;
|
|
617
620
|
download: () => Promise<ArrayBuffer>;
|
|
618
621
|
delete: () => Promise<void>;
|
|
622
|
+
rename: (name: string) => Promise<void>;
|
|
623
|
+
toggleLock: () => Promise<void>;
|
|
624
|
+
restore: (truncate: boolean) => Promise<void>;
|
|
619
625
|
}
|
|
620
626
|
|
|
621
627
|
declare class ServerDatabase {
|
|
@@ -809,6 +815,7 @@ declare class Server {
|
|
|
809
815
|
pullFileFromRemote: (...opts: Parameters<ServerFiles["pullFromRemote"]>) => Promise<void>;
|
|
810
816
|
compressMultipleFiles: (...opts: Parameters<ServerFiles["compress"]>) => Promise<FileObject>;
|
|
811
817
|
renameMultipleFiles: (...opts: Parameters<ServerFiles["rename"]>) => Promise<void>;
|
|
818
|
+
deleteMultipleFiles: (...opts: Parameters<ServerFiles["delete"]>) => Promise<void>;
|
|
812
819
|
getUsers: () => Promise<ServerUser[]>;
|
|
813
820
|
createUser: (email: string, permissions: SubuserPermission[] | string[]) => Promise<ServerUser>;
|
|
814
821
|
getStartupInfo: () => Promise<CustomListResponse<StartupParams, StartupMeta>>;
|
package/dist/index.d.ts
CHANGED
|
@@ -493,6 +493,9 @@ declare class ServerBackups {
|
|
|
493
493
|
downloadGetUrl: (backup_uuid: string) => Promise<string>;
|
|
494
494
|
download: (backup_uuid: string) => Promise<ArrayBuffer>;
|
|
495
495
|
delete: (backup_uuid: string) => Promise<void>;
|
|
496
|
+
rename: (backup_uuid: string, name: string) => Promise<void>;
|
|
497
|
+
toggleLock: (backup_uuid: string) => Promise<void>;
|
|
498
|
+
restore: (backup_uuid: string, truncate: boolean) => Promise<void>;
|
|
496
499
|
}
|
|
497
500
|
|
|
498
501
|
declare class ServerStartup {
|
|
@@ -616,6 +619,9 @@ declare class ServerBackup {
|
|
|
616
619
|
downloadGetUrl: () => Promise<string>;
|
|
617
620
|
download: () => Promise<ArrayBuffer>;
|
|
618
621
|
delete: () => Promise<void>;
|
|
622
|
+
rename: (name: string) => Promise<void>;
|
|
623
|
+
toggleLock: () => Promise<void>;
|
|
624
|
+
restore: (truncate: boolean) => Promise<void>;
|
|
619
625
|
}
|
|
620
626
|
|
|
621
627
|
declare class ServerDatabase {
|
|
@@ -809,6 +815,7 @@ declare class Server {
|
|
|
809
815
|
pullFileFromRemote: (...opts: Parameters<ServerFiles["pullFromRemote"]>) => Promise<void>;
|
|
810
816
|
compressMultipleFiles: (...opts: Parameters<ServerFiles["compress"]>) => Promise<FileObject>;
|
|
811
817
|
renameMultipleFiles: (...opts: Parameters<ServerFiles["rename"]>) => Promise<void>;
|
|
818
|
+
deleteMultipleFiles: (...opts: Parameters<ServerFiles["delete"]>) => Promise<void>;
|
|
812
819
|
getUsers: () => Promise<ServerUser[]>;
|
|
813
820
|
createUser: (email: string, permissions: SubuserPermission[] | string[]) => Promise<ServerUser>;
|
|
814
821
|
getStartupInfo: () => Promise<CustomListResponse<StartupParams, StartupMeta>>;
|
package/dist/index.js
CHANGED
|
@@ -373,6 +373,15 @@ var ServerBackups = class {
|
|
|
373
373
|
delete = async (backup_uuid) => {
|
|
374
374
|
await this.r.delete(`/servers/${this.id}/backups/${backup_uuid}`);
|
|
375
375
|
};
|
|
376
|
+
rename = async (backup_uuid, name) => {
|
|
377
|
+
await this.r.put(`/servers/${this.id}/backups/${backup_uuid}/rename`, { name });
|
|
378
|
+
};
|
|
379
|
+
toggleLock = async (backup_uuid) => {
|
|
380
|
+
await this.r.post(`/servers/${this.id}/backups/${backup_uuid}/lock`);
|
|
381
|
+
};
|
|
382
|
+
restore = async (backup_uuid, truncate) => {
|
|
383
|
+
await this.r.post(`/servers/${this.id}/backups/${backup_uuid}/restore`, { truncate });
|
|
384
|
+
};
|
|
376
385
|
};
|
|
377
386
|
|
|
378
387
|
// src/api/client/server_startup.ts
|
|
@@ -1786,6 +1795,9 @@ var ServerBackup = class {
|
|
|
1786
1795
|
downloadGetUrl = async () => this.client.backups.downloadGetUrl(this.uuid);
|
|
1787
1796
|
download = async () => this.client.backups.download(this.uuid);
|
|
1788
1797
|
delete = async () => this.client.backups.delete(this.uuid);
|
|
1798
|
+
rename = async (name) => this.client.backups.rename(this.uuid, name);
|
|
1799
|
+
toggleLock = async () => this.client.backups.toggleLock(this.uuid);
|
|
1800
|
+
restore = async (truncate) => this.client.backups.restore(this.uuid, truncate);
|
|
1789
1801
|
};
|
|
1790
1802
|
|
|
1791
1803
|
// src/humane/ServerDatabase.ts
|
|
@@ -2161,6 +2173,7 @@ var Server = class {
|
|
|
2161
2173
|
pullFileFromRemote = async (...opts) => this.client.files.pullFromRemote(...opts);
|
|
2162
2174
|
compressMultipleFiles = async (...opts) => this.client.files.compress(...opts);
|
|
2163
2175
|
renameMultipleFiles = async (...opts) => this.client.files.rename(...opts);
|
|
2176
|
+
deleteMultipleFiles = async (...opts) => this.client.files.delete(...opts);
|
|
2164
2177
|
getUsers = async () => {
|
|
2165
2178
|
const data = await this.client.users.list();
|
|
2166
2179
|
return data.map((d) => new ServerUser(this.client, d));
|
package/dist/index.mjs
CHANGED
|
@@ -328,6 +328,15 @@ var ServerBackups = class {
|
|
|
328
328
|
delete = async (backup_uuid) => {
|
|
329
329
|
await this.r.delete(`/servers/${this.id}/backups/${backup_uuid}`);
|
|
330
330
|
};
|
|
331
|
+
rename = async (backup_uuid, name) => {
|
|
332
|
+
await this.r.put(`/servers/${this.id}/backups/${backup_uuid}/rename`, { name });
|
|
333
|
+
};
|
|
334
|
+
toggleLock = async (backup_uuid) => {
|
|
335
|
+
await this.r.post(`/servers/${this.id}/backups/${backup_uuid}/lock`);
|
|
336
|
+
};
|
|
337
|
+
restore = async (backup_uuid, truncate) => {
|
|
338
|
+
await this.r.post(`/servers/${this.id}/backups/${backup_uuid}/restore`, { truncate });
|
|
339
|
+
};
|
|
331
340
|
};
|
|
332
341
|
|
|
333
342
|
// src/api/client/server_startup.ts
|
|
@@ -1741,6 +1750,9 @@ var ServerBackup = class {
|
|
|
1741
1750
|
downloadGetUrl = async () => this.client.backups.downloadGetUrl(this.uuid);
|
|
1742
1751
|
download = async () => this.client.backups.download(this.uuid);
|
|
1743
1752
|
delete = async () => this.client.backups.delete(this.uuid);
|
|
1753
|
+
rename = async (name) => this.client.backups.rename(this.uuid, name);
|
|
1754
|
+
toggleLock = async () => this.client.backups.toggleLock(this.uuid);
|
|
1755
|
+
restore = async (truncate) => this.client.backups.restore(this.uuid, truncate);
|
|
1744
1756
|
};
|
|
1745
1757
|
|
|
1746
1758
|
// src/humane/ServerDatabase.ts
|
|
@@ -2116,6 +2128,7 @@ var Server = class {
|
|
|
2116
2128
|
pullFileFromRemote = async (...opts) => this.client.files.pullFromRemote(...opts);
|
|
2117
2129
|
compressMultipleFiles = async (...opts) => this.client.files.compress(...opts);
|
|
2118
2130
|
renameMultipleFiles = async (...opts) => this.client.files.rename(...opts);
|
|
2131
|
+
deleteMultipleFiles = async (...opts) => this.client.files.delete(...opts);
|
|
2119
2132
|
getUsers = async () => {
|
|
2120
2133
|
const data = await this.client.users.list();
|
|
2121
2134
|
return data.map((d) => new ServerUser(this.client, d));
|
package/package.json
CHANGED
|
@@ -64,4 +64,15 @@ export class ServerBackups {
|
|
|
64
64
|
await this.r.delete(`/servers/${this.id}/backups/${backup_uuid}`)
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
+
rename = async (backup_uuid: string, name: string): Promise<void> => {
|
|
68
|
+
await this.r.put(`/servers/${this.id}/backups/${backup_uuid}/rename`, {name})
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
toggleLock = async (backup_uuid: string): Promise<void> => {
|
|
72
|
+
await this.r.post(`/servers/${this.id}/backups/${backup_uuid}/lock`)
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
restore = async (backup_uuid: string, truncate: boolean): Promise<void> => {
|
|
76
|
+
await this.r.post(`/servers/${this.id}/backups/${backup_uuid}/restore`, {truncate})
|
|
77
|
+
}
|
|
67
78
|
}
|
package/src/humane/Server.ts
CHANGED
|
@@ -194,6 +194,10 @@ export class Server {
|
|
|
194
194
|
...opts: Parameters<ServerFiles["rename"]>
|
|
195
195
|
) => this.client.files.rename(...opts)
|
|
196
196
|
|
|
197
|
+
deleteMultipleFiles = async (
|
|
198
|
+
...opts: Parameters<ServerFiles["delete"]>
|
|
199
|
+
) => this.client.files.delete(...opts)
|
|
200
|
+
|
|
197
201
|
getUsers = async () => {
|
|
198
202
|
const data = await this.client.users.list()
|
|
199
203
|
return data.map((d) => new ServerUser(this.client, d))
|
|
@@ -34,4 +34,14 @@ export class ServerBackup {
|
|
|
34
34
|
download = async () => this.client.backups.download(this.uuid)
|
|
35
35
|
|
|
36
36
|
delete = async () => this.client.backups.delete(this.uuid)
|
|
37
|
+
|
|
38
|
+
rename = async (
|
|
39
|
+
name: string
|
|
40
|
+
) => this.client.backups.rename(this.uuid, name)
|
|
41
|
+
|
|
42
|
+
toggleLock = async () => this.client.backups.toggleLock(this.uuid)
|
|
43
|
+
|
|
44
|
+
restore = async (
|
|
45
|
+
truncate: boolean
|
|
46
|
+
) => this.client.backups.restore(this.uuid, truncate)
|
|
37
47
|
}
|