@tinycloud/share-sdk 1.5.0-beta.0 → 1.5.0-beta.2

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,4 +1,4 @@
1
- import { O as OwnerShareAction, a as OwnerShareMatcher, P as PublishedShareDeliveryMaterial, S as SignedDelegation, b as OwnerSharePolicyRegistrationReceipt, D as DelegatedShareKey, c as PublishedShare } from './owner-policy-aPmXIR3e.js';
1
+ import { O as OwnerShareAction, a as OwnerShareMatcher, P as PublishedShareDeliveryMaterial, S as SignedDelegation, b as OwnerSharePolicyRegistrationReceipt, D as DelegatedShareKey, c as PublishedShare } from './owner-policy-3AT7bguu.js';
2
2
 
3
3
  interface EncryptedShareHistoryStorage {
4
4
  put(value: Uint8Array): Promise<void>;
@@ -1,4 +1,4 @@
1
- import { O as OwnerShareAction, a as OwnerShareMatcher, P as PublishedShareDeliveryMaterial, S as SignedDelegation, b as OwnerSharePolicyRegistrationReceipt, D as DelegatedShareKey, c as PublishedShare } from './owner-policy-aPmXIR3e.cjs';
1
+ import { O as OwnerShareAction, a as OwnerShareMatcher, P as PublishedShareDeliveryMaterial, S as SignedDelegation, b as OwnerSharePolicyRegistrationReceipt, D as DelegatedShareKey, c as PublishedShare } from './owner-policy-3AT7bguu.cjs';
2
2
 
3
3
  interface EncryptedShareHistoryStorage {
4
4
  put(value: Uint8Array): Promise<void>;
package/dist/index.cjs CHANGED
@@ -5874,6 +5874,7 @@ function canonicalMailbox(value) {
5874
5874
  if (local.length > 64 || !/^[a-z0-9#$&'*+/=?^_`{|}~-]+(?:\.[a-z0-9#$&'*+/=?^_`{|}~-]+)*$/.test(local) || !isCanonicalEmailDomain(domain)) return void 0;
5875
5875
  return Object.freeze({ email, domain });
5876
5876
  }
5877
+ var POLICY_ROOT_MAX_LIFETIME_SECONDS = 31 * 24 * 60 * 60;
5877
5878
  async function signCompactUcanAuthorization(input) {
5878
5879
  if (input.notBefore >= input.expiresAt || input.expiresAt - input.notBefore > 60) {
5879
5880
  throw new TypeError("compact invocation lifetime must be between one and 60 seconds");
@@ -7203,6 +7204,7 @@ async function publishTargetShare(input) {
7203
7204
  target,
7204
7205
  expiresAt,
7205
7206
  expiryWasExplicit: input.expiryWasExplicit ?? input.expiresAt !== void 0,
7207
+ ...input.expiresInMs === void 0 ? {} : { expiresInMs: input.expiresInMs },
7206
7208
  origin: input.origin,
7207
7209
  ...input.notify === void 0 ? {} : { notify: input.notify },
7208
7210
  ...input.credentialDescriptor === void 0 ? {} : { credentialDescriptor: input.credentialDescriptor },