@tinycloud/sdk-services 3.2.6-beta.2 → 3.2.6-beta.4

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.
Files changed (59) hide show
  1. package/dist/{BaseService-4wwJq1Gn.d.cts → BaseService-1Ug6y7DC.d.cts} +1 -1
  2. package/dist/{BaseService-BGr2slUz.d.ts → BaseService-Bn07Vudy.d.ts} +1 -1
  3. package/dist/encryption/index.cjs +2 -0
  4. package/dist/encryption/index.cjs.map +1 -1
  5. package/dist/encryption/index.d.cts +2 -2
  6. package/dist/encryption/index.d.ts +2 -2
  7. package/dist/encryption/index.js +2 -0
  8. package/dist/encryption/index.js.map +1 -1
  9. package/dist/index.cjs +15 -7
  10. package/dist/index.cjs.map +1 -1
  11. package/dist/index.d.cts +14 -11
  12. package/dist/index.d.ts +14 -11
  13. package/dist/index.js +15 -7
  14. package/dist/index.js.map +1 -1
  15. package/dist/internal/decrypt-transport-response-error.d.cts +1 -1
  16. package/dist/internal/decrypt-transport-response-error.d.ts +1 -1
  17. package/dist/kv/index.cjs +2 -0
  18. package/dist/kv/index.cjs.map +1 -1
  19. package/dist/kv/index.d.cts +7 -4
  20. package/dist/kv/index.d.ts +7 -4
  21. package/dist/kv/index.js +2 -0
  22. package/dist/kv/index.js.map +1 -1
  23. package/dist/kv/replication/contractConstants.cjs +115 -0
  24. package/dist/kv/replication/contractConstants.cjs.map +1 -0
  25. package/dist/kv/replication/contractConstants.d.cts +77 -0
  26. package/dist/kv/replication/contractConstants.d.ts +77 -0
  27. package/dist/kv/replication/contractConstants.js +75 -0
  28. package/dist/kv/replication/contractConstants.js.map +1 -0
  29. package/dist/kv/replication/grantPolicyConstants.cjs +42 -0
  30. package/dist/kv/replication/grantPolicyConstants.cjs.map +1 -0
  31. package/dist/kv/replication/grantPolicyConstants.d.cts +10 -0
  32. package/dist/kv/replication/grantPolicyConstants.d.ts +10 -0
  33. package/dist/kv/replication/grantPolicyConstants.js +14 -0
  34. package/dist/kv/replication/grantPolicyConstants.js.map +1 -0
  35. package/dist/kv/replication/grantPolicyTypes.cjs +19 -0
  36. package/dist/kv/replication/grantPolicyTypes.cjs.map +1 -0
  37. package/dist/kv/replication/grantPolicyTypes.d.cts +87 -0
  38. package/dist/kv/replication/grantPolicyTypes.d.ts +87 -0
  39. package/dist/kv/replication/grantPolicyTypes.js +1 -0
  40. package/dist/kv/replication/grantPolicyTypes.js.map +1 -0
  41. package/dist/kv/replication/index.cjs +5 -4
  42. package/dist/kv/replication/index.cjs.map +1 -1
  43. package/dist/kv/replication/index.d.cts +6 -3
  44. package/dist/kv/replication/index.d.ts +6 -3
  45. package/dist/kv/replication/index.js +5 -4
  46. package/dist/kv/replication/index.js.map +1 -1
  47. package/dist/scope-BnyVPZ5E.d.ts +1659 -0
  48. package/dist/scope-CQ5kmHlt.d.cts +1659 -0
  49. package/dist/sql/index.cjs +2 -0
  50. package/dist/sql/index.cjs.map +1 -1
  51. package/dist/sql/index.d.cts +2 -2
  52. package/dist/sql/index.d.ts +2 -2
  53. package/dist/sql/index.js +2 -0
  54. package/dist/sql/index.js.map +1 -1
  55. package/dist/{types-D-9A3Sut.d.cts → types-gmdUiorz.d.cts} +2 -0
  56. package/dist/{types-D-9A3Sut.d.ts → types-gmdUiorz.d.ts} +2 -0
  57. package/package.json +40 -1
  58. package/dist/scope-CoKKmMiI.d.ts +0 -957
  59. package/dist/scope-D7wmjbMH.d.cts +0 -957
@@ -1,7 +1,10 @@
1
- import { K as KVReplicationDeps, a as KVReplicationController, R as ReplicationIdentity, P as PendingWriteStore } from '../../scope-D7wmjbMH.cjs';
2
- export { A as AuthorityRefusal, C as CLEAR_PENDING_WARNING, b as KVListPage, c as KVReadThrough, d as KVReplicaHandle, e as KVReplicaSpec, f as KVReplicaStorage, L as LocalGetResult, g as LocalListResult, h as LocalReadMeta, i as LocalReplicaStatus, j as LocalSyncResult, k as PendingWriteRecord, l as PendingWriteState, m as PinnedKey, n as PurgeTarget, o as ReplicaAuthorityState, p as ReplicaCoverage, q as ReplicaDevice, r as ReplicaGrantInfo, s as ReplicaState, t as ReplicaStatusEntry, u as ReplicationAuthority, v as ReplicationControl, w as ReplicationEvent, x as ReplicationOptions, y as ReplicationPurgeReport, z as ReplicationReason, B as ReplicationScheduler, D as ResolvedReplicationOptions, E as canonicalReplicationIdentity, F as replicationIdentityKey, G as requiresSecretsOptIn } from '../../scope-D7wmjbMH.cjs';
1
+ import { K as KVReplicationDeps, a as KVReplicationController, R as ReplicationIdentity, P as PendingWriteStore } from '../../scope-CQ5kmHlt.cjs';
2
+ export { A as AuthorityRefusal, C as CLEAR_PENDING_WARNING, b as KVListPage, c as KVReadThrough, d as KVReplicaHandle, e as KVReplicaSpec, f as KVReplicaStorage, L as LocalGetResult, g as LocalListResult, h as LocalReadMeta, i as LocalReplicaStatus, j as LocalSyncResult, k as PendingWriteRecord, l as PendingWriteState, m as PinnedKey, n as PurgeTarget, o as ReplicaAccountGate, p as ReplicaAdmitHook, q as ReplicaAuthorityState, r as ReplicaBrowserGateAccess, s as ReplicaBrowserGateSnapshot, t as ReplicaBrowserGateTx, u as ReplicaBrowserPageAdmission, v as ReplicaClock, w as ReplicaCoverage, x as ReplicaDeliveryDecision, y as ReplicaDenyInput, z as ReplicaDenyOutcome, B as ReplicaDevice, D as ReplicaEraseReport, E as ReplicaGateAccess, F as ReplicaGateReason, G as ReplicaGateScope, H as ReplicaGateSnapshot, I as ReplicaGateTx, J as ReplicaGatedError, M as ReplicaGatedHandle, N as ReplicaGatedSpec, O as ReplicaGatedStorage, Q as ReplicaGrantInfo, S as ReplicaGuardedStore, T as ReplicaInspectedStatus, U as ReplicaLifecycleGate, V as ReplicaPageAdmission, W as ReplicaPartitionEraser, X as ReplicaPartitionIndexEntry, Y as ReplicaPeerCommit, Z as ReplicaPrivateGateHash, _ as ReplicaPurgeIntent, $ as ReplicaQuotaLedger, a0 as ReplicaQuotaSpec, a1 as ReplicaSessionStamp, a2 as ReplicaStampedReply, a3 as ReplicaState, a4 as ReplicaStatusEntry, a5 as ReplicationAuthority, a6 as ReplicationControl, a7 as ReplicationEvent, a8 as ReplicationOptions, a9 as ReplicationPurgeReport, aa as ReplicationReason, ab as ReplicationScheduler, ac as ResolvedReplicationOptions, ad as SaltedHash, ae as canonicalReplicationIdentity, af as replicationIdentityKey, ag as requiresSecretsOptIn } from '../../scope-CQ5kmHlt.cjs';
3
+ export { ClampConsentAnchor, ConsentDeadlineMs, EffectiveGrantExpiry, EffectiveGrantExpiryInput, MintRemainingMs, NeedsSilentRenewal, ReplicaConsentAnchor, ReplicaConsentSource, ReplicaGrantPolicy } from './grantPolicyTypes.cjs';
3
4
  export { kvPrefixCovers } from './prefix.cjs';
4
- import '../../types-D-9A3Sut.cjs';
5
+ import '../../types-gmdUiorz.cjs';
6
+ import './contractConstants.cjs';
7
+ import './grantPolicyConstants.cjs';
5
8
 
6
9
  declare function createKVReplication(deps: KVReplicationDeps): KVReplicationController;
7
10
 
@@ -1,7 +1,10 @@
1
- import { K as KVReplicationDeps, a as KVReplicationController, R as ReplicationIdentity, P as PendingWriteStore } from '../../scope-CoKKmMiI.js';
2
- export { A as AuthorityRefusal, C as CLEAR_PENDING_WARNING, b as KVListPage, c as KVReadThrough, d as KVReplicaHandle, e as KVReplicaSpec, f as KVReplicaStorage, L as LocalGetResult, g as LocalListResult, h as LocalReadMeta, i as LocalReplicaStatus, j as LocalSyncResult, k as PendingWriteRecord, l as PendingWriteState, m as PinnedKey, n as PurgeTarget, o as ReplicaAuthorityState, p as ReplicaCoverage, q as ReplicaDevice, r as ReplicaGrantInfo, s as ReplicaState, t as ReplicaStatusEntry, u as ReplicationAuthority, v as ReplicationControl, w as ReplicationEvent, x as ReplicationOptions, y as ReplicationPurgeReport, z as ReplicationReason, B as ReplicationScheduler, D as ResolvedReplicationOptions, E as canonicalReplicationIdentity, F as replicationIdentityKey, G as requiresSecretsOptIn } from '../../scope-CoKKmMiI.js';
1
+ import { K as KVReplicationDeps, a as KVReplicationController, R as ReplicationIdentity, P as PendingWriteStore } from '../../scope-BnyVPZ5E.js';
2
+ export { A as AuthorityRefusal, C as CLEAR_PENDING_WARNING, b as KVListPage, c as KVReadThrough, d as KVReplicaHandle, e as KVReplicaSpec, f as KVReplicaStorage, L as LocalGetResult, g as LocalListResult, h as LocalReadMeta, i as LocalReplicaStatus, j as LocalSyncResult, k as PendingWriteRecord, l as PendingWriteState, m as PinnedKey, n as PurgeTarget, o as ReplicaAccountGate, p as ReplicaAdmitHook, q as ReplicaAuthorityState, r as ReplicaBrowserGateAccess, s as ReplicaBrowserGateSnapshot, t as ReplicaBrowserGateTx, u as ReplicaBrowserPageAdmission, v as ReplicaClock, w as ReplicaCoverage, x as ReplicaDeliveryDecision, y as ReplicaDenyInput, z as ReplicaDenyOutcome, B as ReplicaDevice, D as ReplicaEraseReport, E as ReplicaGateAccess, F as ReplicaGateReason, G as ReplicaGateScope, H as ReplicaGateSnapshot, I as ReplicaGateTx, J as ReplicaGatedError, M as ReplicaGatedHandle, N as ReplicaGatedSpec, O as ReplicaGatedStorage, Q as ReplicaGrantInfo, S as ReplicaGuardedStore, T as ReplicaInspectedStatus, U as ReplicaLifecycleGate, V as ReplicaPageAdmission, W as ReplicaPartitionEraser, X as ReplicaPartitionIndexEntry, Y as ReplicaPeerCommit, Z as ReplicaPrivateGateHash, _ as ReplicaPurgeIntent, $ as ReplicaQuotaLedger, a0 as ReplicaQuotaSpec, a1 as ReplicaSessionStamp, a2 as ReplicaStampedReply, a3 as ReplicaState, a4 as ReplicaStatusEntry, a5 as ReplicationAuthority, a6 as ReplicationControl, a7 as ReplicationEvent, a8 as ReplicationOptions, a9 as ReplicationPurgeReport, aa as ReplicationReason, ab as ReplicationScheduler, ac as ResolvedReplicationOptions, ad as SaltedHash, ae as canonicalReplicationIdentity, af as replicationIdentityKey, ag as requiresSecretsOptIn } from '../../scope-BnyVPZ5E.js';
3
+ export { ClampConsentAnchor, ConsentDeadlineMs, EffectiveGrantExpiry, EffectiveGrantExpiryInput, MintRemainingMs, NeedsSilentRenewal, ReplicaConsentAnchor, ReplicaConsentSource, ReplicaGrantPolicy } from './grantPolicyTypes.js';
3
4
  export { kvPrefixCovers } from './prefix.js';
4
- import '../../types-D-9A3Sut.js';
5
+ import '../../types-gmdUiorz.js';
6
+ import './contractConstants.js';
7
+ import './grantPolicyConstants.js';
5
8
 
6
9
  declare function createKVReplication(deps: KVReplicationDeps): KVReplicationController;
7
10
 
@@ -1169,23 +1169,24 @@ function createKVReplication(deps) {
1169
1169
  if (!local && !opened?.opening && !opened?.authorityRevoked) inspected = await inspectPersistedStatus(prefix);
1170
1170
  local ?? (local = inspected.local);
1171
1171
  if (inspected.missing && !opened?.reason && !opened?.authorityRevoked && !opened?.opening && !isClosed) return void 0;
1172
- const revoked = opened?.authorityRevoked === true || local?.authority.state === "revoked";
1172
+ const full = local && !("redacted" in local) ? local : void 0;
1173
+ const revoked = opened?.authorityRevoked === true || full?.authority.state === "revoked";
1173
1174
  const rootUnsupported = opened?.lastError === "REPLICATION_ROOT_UNSUPPORTED";
1174
- const state = isClosed ? "closed" : revoked ? "revoked" : rootUnsupported ? "unavailable" : opened?.reason === "grant_missing" ? "grant_missing" : local?.coverage === "complete" && local.authority.state === "valid" ? "ready" : opened?.reason || inspected.errorCode ? "unavailable" : "idle";
1175
+ const state = isClosed ? "closed" : revoked ? "revoked" : rootUnsupported ? "unavailable" : opened?.reason === "grant_missing" ? "grant_missing" : full?.coverage === "complete" && full.authority.state === "valid" ? "ready" : opened?.reason || inspected.errorCode ? "unavailable" : "idle";
1175
1176
  return {
1176
1177
  prefix,
1177
1178
  state,
1178
1179
  ...opened?.reason ? { reason: opened.reason } : inspected.errorCode ? { reason: "replica_unavailable" } : {},
1179
1180
  ...inspected.errorCode ?? opened?.lastError ? { errorCode: inspected.errorCode ?? opened?.lastError } : {},
1180
1181
  ...local ?? {},
1181
- ...revoked ? { authority: { state: "revoked", expiresAt: local?.authority.expiresAt ?? null } } : {},
1182
+ ...revoked ? { authority: { state: "revoked", expiresAt: full?.authority.expiresAt ?? null } } : {},
1182
1183
  pending: {
1183
1184
  inFlight: records.filter((r) => r.state === "in_flight").length,
1184
1185
  committed: records.filter((r) => r.state === "committed").length,
1185
1186
  ambiguous: records.filter((r) => r.state === "ambiguous").length
1186
1187
  },
1187
1188
  pinned: pinnedKeys(snapshot, prefix, scheduler.now()),
1188
- lagMs: local?.lastSyncAt ? scheduler.now() - Date.parse(local.lastSyncAt) : null
1189
+ lagMs: full?.lastSyncAt ? scheduler.now() - Date.parse(full.lastSyncAt) : null
1189
1190
  };
1190
1191
  }));
1191
1192
  return entries.filter((entry) => entry !== void 0);