@tinycloud/sdk-core 3.8.0-beta.15 → 3.8.0-beta.17

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.
@@ -426,6 +426,7 @@ interface UnifiedContentSource {
426
426
  readonly kvResource: string;
427
427
  readonly selector: UnifiedResourceSelector;
428
428
  readonly encryptionNetwork: string;
429
+ readonly encryptionKeyPath?: string;
429
430
  readonly encryptedSymmetricKeyDigestHex: string;
430
431
  readonly keyVersion: number;
431
432
  readonly mode: "mutable" | "immutable";
@@ -426,6 +426,7 @@ interface UnifiedContentSource {
426
426
  readonly kvResource: string;
427
427
  readonly selector: UnifiedResourceSelector;
428
428
  readonly encryptionNetwork: string;
429
+ readonly encryptionKeyPath?: string;
429
430
  readonly encryptedSymmetricKeyDigestHex: string;
430
431
  readonly keyVersion: number;
431
432
  readonly mode: "mutable" | "immutable";
@@ -2612,7 +2612,7 @@ var hashes = { ...sha2_browser_exports, ...identity_exports2 };
2612
2612
  var import_ed255194 = require("@noble/curves/ed25519");
2613
2613
 
2614
2614
  // src/delegations/ShareRecipientClient.ts
2615
- var import_sdk_services3 = require("@tinycloud/sdk-services");
2615
+ var import_sdk_services4 = require("@tinycloud/sdk-services");
2616
2616
  var import_ed255193 = require("@noble/curves/ed25519");
2617
2617
  var import_sha2564 = require("@noble/hashes/sha256");
2618
2618
 
@@ -3693,6 +3693,7 @@ var import_sha2563 = require("@noble/hashes/sha256");
3693
3693
  var import_blake32 = require("@noble/hashes/blake3");
3694
3694
  var import_ed255192 = require("@noble/curves/ed25519");
3695
3695
  var import_zod4 = require("zod");
3696
+ var import_sdk_services3 = require("@tinycloud/sdk-services");
3696
3697
 
3697
3698
  // src/policy/errors.ts
3698
3699
  var SignedObjectProfileError = class extends Error {
@@ -4239,9 +4240,9 @@ function redactedCode(error) {
4239
4240
  if (error instanceof ShareConflict) return error.code;
4240
4241
  const code3 = error && typeof error === "object" && "code" in error ? error.code : void 0;
4241
4242
  if (typeof code3 !== "string") return "SHARE_INVALID";
4242
- if (code3 === import_sdk_services3.ErrorCodes.KV_PRECONDITION_FAILED || code3 === "412") return "SHARE_CONFLICT";
4243
- if (code3 === import_sdk_services3.ErrorCodes.NODE_BUSY || code3 === import_sdk_services3.ErrorCodes.REQUEST_TIMEOUT) return "SHARE_OFFLINE";
4244
- if (code3 === import_sdk_services3.ErrorCodes.OUTCOME_UNKNOWN) return "SHARE_WRITE_FAILED";
4243
+ if (code3 === import_sdk_services4.ErrorCodes.KV_PRECONDITION_FAILED || code3 === "412") return "SHARE_CONFLICT";
4244
+ if (code3 === import_sdk_services4.ErrorCodes.NODE_BUSY || code3 === import_sdk_services4.ErrorCodes.REQUEST_TIMEOUT) return "SHARE_OFFLINE";
4245
+ if (code3 === import_sdk_services4.ErrorCodes.OUTCOME_UNKNOWN) return "SHARE_WRITE_FAILED";
4245
4246
  if (code3 === "KV_NOT_FOUND" || code3 === "NOT_FOUND" || code3 === "404") return "SHARE_NOT_FOUND";
4246
4247
  if (code3.includes("EXPIRED") || code3 === "expired") return "SHARE_EXPIRED";
4247
4248
  if (code3.includes("REVOK")) return "SHARE_REVOKED";
@@ -4480,7 +4481,7 @@ var ShareRecipientClient = class {
4480
4481
  if (portableDelegation !== void 0 && kv !== void 0) {
4481
4482
  const result2 = await kv.put(resolvedPath, bytes2, { contentType: input.contentType ?? envelope.content.mimeType, ifMatch: input.etag });
4482
4483
  if (!result2.ok) {
4483
- if (result2.error.code === import_sdk_services3.ErrorCodes.KV_PRECONDITION_FAILED) throw new ShareConflict(resolvedPath, result2.error.meta?.etag);
4484
+ if (result2.error.code === import_sdk_services4.ErrorCodes.KV_PRECONDITION_FAILED) throw new ShareConflict(resolvedPath, result2.error.meta?.etag);
4484
4485
  throw result2.error;
4485
4486
  }
4486
4487
  return { etag: result2.data.headers.etag };
@@ -4488,7 +4489,7 @@ var ShareRecipientClient = class {
4488
4489
  if (policySession !== void 0) return this.nativeSave(envelope, policySession, resolvedPath, bytes2, input);
4489
4490
  const result = await kv.put(resolvedPath, bytes2, { contentType: input.contentType ?? envelope.content.mimeType, ifMatch: input.etag });
4490
4491
  if (!result.ok) {
4491
- if (result.error.code === import_sdk_services3.ErrorCodes.KV_PRECONDITION_FAILED) throw new ShareConflict(resolvedPath, result.error.meta?.etag);
4492
+ if (result.error.code === import_sdk_services4.ErrorCodes.KV_PRECONDITION_FAILED) throw new ShareConflict(resolvedPath, result.error.meta?.etag);
4492
4493
  throw result.error;
4493
4494
  }
4494
4495
  return { etag: result.data.headers.etag };
@@ -4572,8 +4573,8 @@ var ShareRecipientClient = class {
4572
4573
  if (this.options.createKVService !== void 0) {
4573
4574
  return this.options.createKVService({ hosts: [origin], session, invoke, fetch: this.fetchFn });
4574
4575
  }
4575
- const context = new import_sdk_services3.ServiceContext({ hosts: [origin], session, invoke, fetch: this.fetchFn });
4576
- const service = new import_sdk_services3.KVService({ prefix: "" });
4576
+ const context = new import_sdk_services4.ServiceContext({ hosts: [origin], session, invoke, fetch: this.fetchFn });
4577
+ const service = new import_sdk_services4.KVService({ prefix: "" });
4577
4578
  context.registerService("kv", service);
4578
4579
  service.initialize(context);
4579
4580
  return service;