@pelican.ts/sdk 0.4.16-next.0 → 0.4.16-next.1
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 +1 -1
- package/dist/api/index.d.ts +1 -1
- package/dist/api/index.js +6 -2
- package/dist/api/index.mjs +6 -2
- 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
|
}
|
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
|
}
|
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
|
};
|
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
|
};
|