@pelican.ts/sdk 0.4.16-next.0 → 0.4.16-next.2
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 +4 -4
- package/dist/api/index.d.ts +4 -4
- package/dist/api/index.js +12 -5
- package/dist/api/index.mjs +12 -5
- package/dist/index.js +6 -3
- package/dist/index.mjs +6 -3
- package/package.json +1 -1
package/dist/api/index.d.mts
CHANGED
|
@@ -444,7 +444,7 @@ declare class NodesAllocations {
|
|
|
444
444
|
private readonly r;
|
|
445
445
|
private readonly id;
|
|
446
446
|
constructor(requester: AxiosInstance, id: number);
|
|
447
|
-
list: (include?: ("node" | "server")[]) => Promise<AllocationRel[]>;
|
|
447
|
+
list: (page?: number, per_page?: number, include?: ("node" | "server")[]) => Promise<AllocationRel[]>;
|
|
448
448
|
create: (ip: string, ports: string[], alias?: string) => Promise<void>;
|
|
449
449
|
delete: (alloc_id: number) => Promise<void>;
|
|
450
450
|
}
|
|
@@ -560,10 +560,10 @@ declare const CreateServerSchema: z.ZodObject<{
|
|
|
560
560
|
allocations: z.ZodNumber;
|
|
561
561
|
backups: z.ZodNumber;
|
|
562
562
|
}, z.core.$strip>;
|
|
563
|
-
allocation: z.
|
|
564
|
-
default: z.
|
|
563
|
+
allocation: z.ZodObject<{
|
|
564
|
+
default: z.ZodString;
|
|
565
565
|
additional: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
566
|
-
}, z.core.$strip
|
|
566
|
+
}, z.core.$strip>;
|
|
567
567
|
deploy: z.ZodOptional<z.ZodObject<{
|
|
568
568
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
569
569
|
dedicated_ip: z.ZodOptional<z.ZodBoolean>;
|
package/dist/api/index.d.ts
CHANGED
|
@@ -444,7 +444,7 @@ declare class NodesAllocations {
|
|
|
444
444
|
private readonly r;
|
|
445
445
|
private readonly id;
|
|
446
446
|
constructor(requester: AxiosInstance, id: number);
|
|
447
|
-
list: (include?: ("node" | "server")[]) => Promise<AllocationRel[]>;
|
|
447
|
+
list: (page?: number, per_page?: number, include?: ("node" | "server")[]) => Promise<AllocationRel[]>;
|
|
448
448
|
create: (ip: string, ports: string[], alias?: string) => Promise<void>;
|
|
449
449
|
delete: (alloc_id: number) => Promise<void>;
|
|
450
450
|
}
|
|
@@ -560,10 +560,10 @@ declare const CreateServerSchema: z.ZodObject<{
|
|
|
560
560
|
allocations: z.ZodNumber;
|
|
561
561
|
backups: z.ZodNumber;
|
|
562
562
|
}, z.core.$strip>;
|
|
563
|
-
allocation: z.
|
|
564
|
-
default: z.
|
|
563
|
+
allocation: z.ZodObject<{
|
|
564
|
+
default: z.ZodString;
|
|
565
565
|
additional: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
566
|
-
}, z.core.$strip
|
|
566
|
+
}, z.core.$strip>;
|
|
567
567
|
deploy: z.ZodOptional<z.ZodObject<{
|
|
568
568
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
569
569
|
dedicated_ip: z.ZodOptional<z.ZodBoolean>;
|
package/dist/api/index.js
CHANGED
|
@@ -198,9 +198,13 @@ var NodesAllocations = class {
|
|
|
198
198
|
this.r = requester;
|
|
199
199
|
this.id = id;
|
|
200
200
|
}
|
|
201
|
-
list = async (include) => {
|
|
201
|
+
list = async (page = 1, per_page = 50, include) => {
|
|
202
202
|
const { data } = await this.r.get(`/nodes/${this.id}/allocations`, {
|
|
203
|
-
params: {
|
|
203
|
+
params: {
|
|
204
|
+
page,
|
|
205
|
+
per_page,
|
|
206
|
+
include: include?.join(",")
|
|
207
|
+
}
|
|
204
208
|
});
|
|
205
209
|
return data.data.map((d) => d.attributes);
|
|
206
210
|
};
|
|
@@ -440,9 +444,9 @@ var CreateServerSchema = import_zod6.default.object({
|
|
|
440
444
|
backups: import_zod6.default.number().min(0)
|
|
441
445
|
}),
|
|
442
446
|
allocation: import_zod6.default.object({
|
|
443
|
-
default: import_zod6.default.string()
|
|
447
|
+
default: import_zod6.default.string(),
|
|
444
448
|
additional: import_zod6.default.array(import_zod6.default.string()).optional()
|
|
445
|
-
})
|
|
449
|
+
}),
|
|
446
450
|
deploy: import_zod6.default.object({
|
|
447
451
|
tags: import_zod6.default.array(import_zod6.default.string()).optional(),
|
|
448
452
|
dedicated_ip: import_zod6.default.boolean().optional(),
|
|
@@ -1411,7 +1415,10 @@ var ServerFiles = class {
|
|
|
1411
1415
|
contents = async (path) => {
|
|
1412
1416
|
const { data } = await this.r.get(
|
|
1413
1417
|
`/servers/${this.id}/files/contents`,
|
|
1414
|
-
{
|
|
1418
|
+
{
|
|
1419
|
+
params: { file: path },
|
|
1420
|
+
responseType: "text"
|
|
1421
|
+
}
|
|
1415
1422
|
);
|
|
1416
1423
|
return data;
|
|
1417
1424
|
};
|
package/dist/api/index.mjs
CHANGED
|
@@ -161,9 +161,13 @@ var NodesAllocations = class {
|
|
|
161
161
|
this.r = requester;
|
|
162
162
|
this.id = id;
|
|
163
163
|
}
|
|
164
|
-
list = async (include) => {
|
|
164
|
+
list = async (page = 1, per_page = 50, include) => {
|
|
165
165
|
const { data } = await this.r.get(`/nodes/${this.id}/allocations`, {
|
|
166
|
-
params: {
|
|
166
|
+
params: {
|
|
167
|
+
page,
|
|
168
|
+
per_page,
|
|
169
|
+
include: include?.join(",")
|
|
170
|
+
}
|
|
167
171
|
});
|
|
168
172
|
return data.data.map((d) => d.attributes);
|
|
169
173
|
};
|
|
@@ -403,9 +407,9 @@ var CreateServerSchema = z6.object({
|
|
|
403
407
|
backups: z6.number().min(0)
|
|
404
408
|
}),
|
|
405
409
|
allocation: z6.object({
|
|
406
|
-
default: z6.string()
|
|
410
|
+
default: z6.string(),
|
|
407
411
|
additional: z6.array(z6.string()).optional()
|
|
408
|
-
})
|
|
412
|
+
}),
|
|
409
413
|
deploy: z6.object({
|
|
410
414
|
tags: z6.array(z6.string()).optional(),
|
|
411
415
|
dedicated_ip: z6.boolean().optional(),
|
|
@@ -1374,7 +1378,10 @@ var ServerFiles = class {
|
|
|
1374
1378
|
contents = async (path) => {
|
|
1375
1379
|
const { data } = await this.r.get(
|
|
1376
1380
|
`/servers/${this.id}/files/contents`,
|
|
1377
|
-
{
|
|
1381
|
+
{
|
|
1382
|
+
params: { file: path },
|
|
1383
|
+
responseType: "text"
|
|
1384
|
+
}
|
|
1378
1385
|
);
|
|
1379
1386
|
return data;
|
|
1380
1387
|
};
|
package/dist/index.js
CHANGED
|
@@ -129,9 +129,9 @@ var CreateServerSchema = import_zod6.default.object({
|
|
|
129
129
|
backups: import_zod6.default.number().min(0)
|
|
130
130
|
}),
|
|
131
131
|
allocation: import_zod6.default.object({
|
|
132
|
-
default: import_zod6.default.string()
|
|
132
|
+
default: import_zod6.default.string(),
|
|
133
133
|
additional: import_zod6.default.array(import_zod6.default.string()).optional()
|
|
134
|
-
})
|
|
134
|
+
}),
|
|
135
135
|
deploy: import_zod6.default.object({
|
|
136
136
|
tags: import_zod6.default.array(import_zod6.default.string()).optional(),
|
|
137
137
|
dedicated_ip: import_zod6.default.boolean().optional(),
|
|
@@ -981,7 +981,10 @@ var ServerFiles = class {
|
|
|
981
981
|
contents = async (path2) => {
|
|
982
982
|
const { data } = await this.r.get(
|
|
983
983
|
`/servers/${this.id}/files/contents`,
|
|
984
|
-
{
|
|
984
|
+
{
|
|
985
|
+
params: { file: path2 },
|
|
986
|
+
responseType: "text"
|
|
987
|
+
}
|
|
985
988
|
);
|
|
986
989
|
return data;
|
|
987
990
|
};
|
package/dist/index.mjs
CHANGED
|
@@ -84,9 +84,9 @@ var CreateServerSchema = z6.object({
|
|
|
84
84
|
backups: z6.number().min(0)
|
|
85
85
|
}),
|
|
86
86
|
allocation: z6.object({
|
|
87
|
-
default: z6.string()
|
|
87
|
+
default: z6.string(),
|
|
88
88
|
additional: z6.array(z6.string()).optional()
|
|
89
|
-
})
|
|
89
|
+
}),
|
|
90
90
|
deploy: z6.object({
|
|
91
91
|
tags: z6.array(z6.string()).optional(),
|
|
92
92
|
dedicated_ip: z6.boolean().optional(),
|
|
@@ -936,7 +936,10 @@ var ServerFiles = class {
|
|
|
936
936
|
contents = async (path2) => {
|
|
937
937
|
const { data } = await this.r.get(
|
|
938
938
|
`/servers/${this.id}/files/contents`,
|
|
939
|
-
{
|
|
939
|
+
{
|
|
940
|
+
params: { file: path2 },
|
|
941
|
+
responseType: "text"
|
|
942
|
+
}
|
|
940
943
|
);
|
|
941
944
|
return data;
|
|
942
945
|
};
|