@tinycloud/sdk-services 2.10.0-beta.0 → 2.10.0

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.
@@ -1,5 +1,5 @@
1
- import { B as BaseService } from '../BaseService-DxSU4U-v.cjs';
2
- import { R as Result, I as IService } from '../types-KCcgZiab.cjs';
1
+ import { B as BaseService } from '../BaseService-BhpVpA9b.cjs';
2
+ import { R as Result, I as IService } from '../types-qwMmB7qB.cjs';
3
3
 
4
4
  /**
5
5
  * KV Service Types
@@ -179,6 +179,8 @@ interface KVListOptions {
179
179
  raw?: boolean;
180
180
  /** Maximum number of keys the node may return. */
181
181
  limit?: number;
182
+ /** Opaque scope-bound cursor returned by a previous bounded list. */
183
+ cursor?: string;
182
184
  /**
183
185
  * Custom timeout for this operation in milliseconds.
184
186
  */
@@ -318,6 +320,8 @@ interface KVListResponse {
318
320
  keys: string[];
319
321
  /** True when more matching keys exist than the requested limit. */
320
322
  truncated?: boolean;
323
+ /** Opaque cursor for the next page, when the node returned one. */
324
+ nextCursor?: string;
321
325
  }
322
326
  /**
323
327
  * Response from signed KV read URL creation.
@@ -1,5 +1,5 @@
1
- import { B as BaseService } from '../BaseService-BiYeqCRT.js';
2
- import { R as Result, I as IService } from '../types-KCcgZiab.js';
1
+ import { B as BaseService } from '../BaseService-CuV-ZVPs.js';
2
+ import { R as Result, I as IService } from '../types-qwMmB7qB.js';
3
3
 
4
4
  /**
5
5
  * KV Service Types
@@ -179,6 +179,8 @@ interface KVListOptions {
179
179
  raw?: boolean;
180
180
  /** Maximum number of keys the node may return. */
181
181
  limit?: number;
182
+ /** Opaque scope-bound cursor returned by a previous bounded list. */
183
+ cursor?: string;
182
184
  /**
183
185
  * Custom timeout for this operation in milliseconds.
184
186
  */
@@ -318,6 +320,8 @@ interface KVListResponse {
318
320
  keys: string[];
319
321
  /** True when more matching keys exist than the requested limit. */
320
322
  truncated?: boolean;
323
+ /** Opaque cursor for the next page, when the node returned one. */
324
+ nextCursor?: string;
321
325
  }
322
326
  /**
323
327
  * Response from signed KV read URL creation.
package/dist/kv/index.js CHANGED
@@ -1283,7 +1283,10 @@ var KVService = class extends BaseService {
1283
1283
  KVAction.LIST,
1284
1284
  void 0,
1285
1285
  options?.signal,
1286
- options?.limit === void 0 ? void 0 : { "x-tinycloud-limit": String(options.limit) }
1286
+ options?.limit === void 0 && options?.cursor === void 0 ? void 0 : {
1287
+ ...options?.limit === void 0 ? {} : { "x-tinycloud-limit": String(options.limit) },
1288
+ ...options?.cursor === void 0 ? {} : { "x-tinycloud-cursor": options.cursor }
1289
+ }
1287
1290
  );
1288
1291
  if (!response.ok) {
1289
1292
  if (response.status === 401) {
@@ -1315,7 +1318,8 @@ var KVService = class extends BaseService {
1315
1318
  }
1316
1319
  return ok({
1317
1320
  keys,
1318
- ...response.headers.get("x-tinycloud-truncated") === null ? {} : { truncated: response.headers.get("x-tinycloud-truncated") === "true" }
1321
+ ...response.headers.get("x-tinycloud-truncated") === null ? {} : { truncated: response.headers.get("x-tinycloud-truncated") === "true" },
1322
+ ...response.headers.get("x-tinycloud-next-cursor") === null ? {} : { nextCursor: response.headers.get("x-tinycloud-next-cursor") ?? void 0 }
1319
1323
  });
1320
1324
  } catch (error) {
1321
1325
  return err(wrapError("kv", error));