@tinycloud/sdk-core 3.8.0-beta.4 → 3.8.0-beta.9

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/index.cjs CHANGED
@@ -7311,8 +7311,14 @@ var DelegationManager = class {
7311
7311
  };
7312
7312
  }
7313
7313
  }
7314
- /** Query lifecycle-complete delegation history for the authenticated account. */
7315
- async query(options2 = {}) {
7314
+ /**
7315
+ * Query lifecycle-complete delegation history for the authenticated account.
7316
+ *
7317
+ * `scope.spaces` lists the spaces to sign `tinycloud.delegation/list` for, in order. Omitted, the
7318
+ * account space is tried, then the session's own space. A caller that knows which of them the session
7319
+ * holds passes only those; an empty list sends nothing and answers PERMISSION_DENIED.
7320
+ */
7321
+ async query(options2 = {}, scope = {}) {
7316
7322
  const validated = AccountDelegationQueryOptionsSchema.safeParse(options2);
7317
7323
  if (!validated.success) {
7318
7324
  return {
@@ -7346,7 +7352,7 @@ var DelegationManager = class {
7346
7352
  }
7347
7353
  try {
7348
7354
  let response;
7349
- for (const spaceId of /* @__PURE__ */ new Set([accountSpaceId, this.session.spaceId])) {
7355
+ for (const spaceId of new Set(scope.spaces ?? [accountSpaceId, this.session.spaceId])) {
7350
7356
  const headers = Object.fromEntries(new Headers(this.invokeAny(this.session, [{
7351
7357
  spaceId,
7352
7358
  service: "delegation",