@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.
@@ -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
  }
@@ -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: { include: include?.join(",") }
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
  };
@@ -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: { include: include?.join(",") }
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
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pelican.ts/sdk",
3
- "version": "0.4.16-next.0",
3
+ "version": "0.4.16-next.1",
4
4
  "description": "Pelican panel SDK for TypeScript",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",