@tearleads/client-sdk 0.1.30 → 0.1.32

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 (37) hide show
  1. package/index.d.ts +1 -1
  2. package/index.js.map +1 -1
  3. package/internal/api-client/operationTransportFactory.js +1 -0
  4. package/internal/api-client/operationTransportFactory.js.map +1 -1
  5. package/internal/api-client/routes/blobs/get.d.ts +6 -1
  6. package/internal/api-client/routes/blobs/get.js +98 -2
  7. package/internal/api-client/routes/blobs/get.js.map +1 -1
  8. package/internal/validators/operation/blobDownloads.d.ts +163 -0
  9. package/internal/validators/operation/blobDownloads.js +43 -0
  10. package/internal/validators/operation/blobDownloads.js.map +1 -0
  11. package/internal/validators/operation/index.d.ts +1 -0
  12. package/internal/validators/operation/index.js +1 -0
  13. package/internal/validators/operation/index.js.map +1 -1
  14. package/internal/validators/operation/registry.d.ts +2 -0
  15. package/internal/validators/operation/registry.js +2 -0
  16. package/internal/validators/operation/registry.js.map +1 -1
  17. package/package.json +1 -1
  18. package/stores/container-contents/state.js +1 -0
  19. package/stores/container-contents/state.js.map +1 -1
  20. package/stores/container-contents/types.d.ts +2 -0
  21. package/stores/container-contents/types.js.map +1 -1
  22. package/stores/container-contents/utils.js +10 -0
  23. package/stores/container-contents/utils.js.map +1 -1
  24. package/stores/documents/documentStore/syncFinalize.js +7 -3
  25. package/stores/documents/documentStore/syncFinalize.js.map +1 -1
  26. package/workflows/container-contents/documentQueries/hydrationSql.js +16 -0
  27. package/workflows/container-contents/documentQueries/hydrationSql.js.map +1 -0
  28. package/workflows/container-contents/documentQueries/sql.js +16 -7
  29. package/workflows/container-contents/documentQueries/sql.js.map +1 -1
  30. package/workflows/container-contents/documentQueries.d.ts +6 -1
  31. package/workflows/container-contents/documentQueries.js +15 -8
  32. package/workflows/container-contents/documentQueries.js.map +1 -1
  33. package/workflows/container-contents/index.d.ts +1 -0
  34. package/workflows/container-contents/index.js.map +1 -1
  35. package/workflows/container-contents/pendingDownloads.d.ts +12 -0
  36. package/workflows/container-contents/pendingDownloads.js +45 -0
  37. package/workflows/container-contents/pendingDownloads.js.map +1 -0
package/index.d.ts CHANGED
@@ -11,7 +11,7 @@ export type { DocumentSnapshot, DocumentStoreFacade, DocumentStoreRelinkInput, D
11
11
  export { createDocumentStore, discardRegisteredDocumentLocalState, getOrCreateDocumentStore, openDocumentStore, requestDomainDocumentSync, subscribeToPersistedDocuments, } from "./stores/documents/index.js";
12
12
  export type { EncryptedBlobStoreCipher, EncryptedBlobStoreKey, EncryptedBlobStoreOptions, WrapEncryptedBlobStoreOptions, } from "./workflows/blobs/index.js";
13
13
  export { createBlobStore, createEncryptedBlobStore, createLazyEncryptedBlobStore, createMemoryBlobStore, decryptDocumentAttachmentBlob, hydrateDocumentAttachmentBlobs, purgeOpfsBlobStore, uploadDocumentAttachment, wrapEncryptedBlobStore, } from "./workflows/blobs/index.js";
14
- export type { ContainerContentsRootAdopter, ContainerContentsRootAdoptionInput, ContainerContentsStoreWorkflowRuntime, ContainerContentsWorkflowRuntime, ContainerDocumentLinkInput as ContainerDocumentQueriesLinkInput, ContainerSystemSlotDefinition, RecoveryFolder, } from "./workflows/container-contents/index.js";
14
+ export type { ContainerContentsRootAdopter, ContainerContentsRootAdoptionInput, ContainerContentsStoreWorkflowRuntime, ContainerContentsWorkflowRuntime, ContainerDocumentLinkInput as ContainerDocumentQueriesLinkInput, ContainerSystemSlotDefinition, PendingDownloadQueueItem, RecoveryFolder, } from "./workflows/container-contents/index.js";
15
15
  export { createContainerContentsDocumentsRuntime, createContainerContentsProjectionUserKeyResolver, createContainerContentsStoreWorkflowRuntime, createContainerContentsSyncLane, createContainerContentsWorkflowRuntime, createContainerParentSyncLane, createInitializedContainerMetadataDocument, defaultContainerContentsPersistence, deriveContainerSystemSlot, initializeDocumentLinksSchema, listBlobInfo, listDocumentLinkedContainerIds, loadContainerInfo, loadContainerSyncWatermark, loadDocumentAttributionRanges, loadDocumentInfo, replaceDocumentLinks, saveContainerSyncWatermark, syncedContainerDocumentObjectSyncState, } from "./workflows/container-contents/index.js";
16
16
  export type { AggregatedContainerKekLog, ContainerMutationAuthor, ContainerReciteApi, ContainerWriteRefusal, KeyringRebuildResult, MaterializedContainerRekeyPlan, } from "./workflows/containers/index.js";
17
17
  export { buildMaterializedContainerRekeyPlan, buildRootContainerCreatePlan, ContainerAuthorAccessError, ContainerKekRepairInaccessibleError, ContainerKekRepairRequiredError, ContainerKeyringOverrideStaleError, ContainerPathTooDeepError, classifyContainerWriteRefusal, containerWriterProjectionFromRekeyPlan, createRemoteContainer, fetchContainerKekLog, GroupShareNameMismatchError, HistoricalWrapUnavailableError, type HistoricalWrapUnavailableReason, isProjectionVerificationCancelledError, moveRemoteContainer, rebuildKeyringEntriesFromLog, recoverKeyringEntryFromWraps, rekeyRemoteContainer, revokeRemoteContainer, rootContainerWriterProjectionFromCreatePlan, shareRemoteContainer, shareRemoteContainerWithGroup, } from "./workflows/containers/index.js";
package/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,iFAAiF;AACjF,2EAA2E;AAC3E,4FAA4F;AAC5F,OAAO,EAGL,iBAAiB,GAElB,MAAM,uBAAuB,CAAC;AAmK/B,OAAO,EAEL,KAAK,EAEL,yBAAyB,EACzB,sCAAsC,EACtC,gCAAgC,EAChC,sCAAsC,EACtC,iBAAiB,EACjB,wCAAwC,EACxC,kCAAkC,EAClC,kBAAkB,EAClB,2CAA2C,EAC3C,qCAAqC,EACrC,+BAA+B,EAC/B,gCAAgC,EAChC,gCAAgC,EAChC,yBAAyB,EACzB,+BAA+B,EAC/B,0BAA0B,EAC1B,yBAAyB,EACzB,QAAQ,EACR,mBAAmB,EAKnB,8BAA8B,EAC9B,2BAA2B,EAC3B,MAAM,EAGN,2BAA2B,EAC3B,8BAA8B,EAC9B,2BAA2B,EAC3B,mCAAmC,EACnC,6BAA6B,EAC7B,oBAAoB,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C,kCAAkC,EAClC,0CAA0C,EAC1C,6BAA6B,EAC7B,oCAAoC,EACpC,4BAA4B,EAC5B,8BAA8B,EAC9B,2BAA2B,EAC3B,8BAA8B,EAC9B,uCAAuC,EACvC,iCAAiC,EACjC,2BAA2B,EAC3B,8BAA8B,EAC9B,mCAAmC,EACnC,gCAAgC,EAChC,sBAAsB,EACtB,gCAAgC,EAChC,0CAA0C,EAC1C,gCAAgC,EAChC,yBAAyB,EACzB,6BAA6B,GAC9B,MAAM,2BAA2B,CAAC;AAUnC,OAAO,EACL,gCAAgC,EAChC,+BAA+B,EAC/B,6BAA6B,EAC7B,8BAA8B,EAC9B,mCAAmC,GACpC,MAAM,wBAAwB,CAAC;AAOhC,OAAO,EACL,sBAAsB,EACtB,qCAAqC,EACrC,kCAAkC,EAClC,4BAA4B,EAC5B,gBAAgB,GACjB,MAAM,0BAA0B,CAAC;AAWlC,OAAO,EACL,uBAAuB,EACvB,kBAAkB,EAClB,6BAA6B,EAC7B,8BAA8B,EAC9B,qBAAqB,EACrB,gBAAgB,EAChB,oBAAoB,EACpB,6BAA6B,GAW9B,MAAM,kBAAkB,CAAC;AAe1B,OAAO,EACL,oBAAoB,EACpB,gCAAgC,EAChC,gCAAgC,EAChC,mCAAmC,EACnC,yBAAyB,EACzB,gCAAgC,EAChC,oCAAoC,GACrC,MAAM,kBAAkB,CAAC","sourcesContent":["// Current SDK contract: unified device-first handles and atomic revision checks.\n// Authority loaders take exact heads, including cached citations. Obsolete\n// adapters are excluded; authored policy journals survive restart. See workflows/README.md.\nexport {\n type ApiRequestCounts,\n type ApiRequestEndpointCounts,\n ApiRequestMetrics,\n type ApiRequestMetricsSnapshot,\n} from \"@tearleads/api-client\";\nexport type {\n AbandonOrganizationPolicyMutationInput,\n AddOrganizationGroupUserInput,\n BlobInfo,\n BlobInfoAttachmentKind,\n BlobInfoDocumentReference,\n BlobInfoInput,\n BlobInfoList,\n BlobInfoSort,\n BlobInfoSortDirection,\n BlobInfoSortKey,\n BrowserLocalKeyringOptions,\n ClientDatabaseOptions,\n ContainerContents,\n ContainerContentsContextValue,\n ContainerContentsStore,\n ContainerContentsStoreOptions,\n ContainerDocumentLinkInput,\n ContainerDocumentLinks,\n ContainerDocumentObjectSyncState,\n ContainerDocumentObjectSyncStatus,\n ContainerDocumentQueries,\n ContainerDocumentSidebarRow,\n ContainerInfo,\n ContainerInfoInput,\n ContainerItemRow,\n ContainerItemSort,\n ContainerItemSortDirection,\n ContainerItemSortKey,\n ContainerNode,\n ContainerShareAccessLevel,\n CreateOrganizationOptions,\n DatabaseListener,\n DatabaseOptions,\n DatabaseSnapshot,\n DatabaseStatus,\n DeviceFirst,\n DeviceFirstContainerContents,\n DiscardUnreadableOrganizationPolicyMutationInput,\n DocumentAttachmentStatus,\n DocumentAttachmentUpload,\n DocumentAttributionRangesInput,\n DocumentAttributionRangesPage,\n DocumentContextValue,\n DocumentInfo,\n DocumentInfoInput,\n DocumentList,\n DocumentSort,\n DocumentSortDirection,\n DocumentSortKey,\n DocumentStore,\n DocumentSubscriptionOptions,\n Documents,\n DocumentsRuntime,\n DomainScope,\n FileSaver,\n Identity,\n IdentityGenerationResult,\n IdentityKeyPackage,\n IdentityListener,\n IdentityOptions,\n IdentitySnapshot,\n ImportedOrganizationUser,\n IndexedDbLocalKeyringManifestStoreOptions,\n IndexedDbWrappingKeyKeystoreOptions,\n LinkDocumentToContainerInput,\n ListDocumentsInput,\n LocalKeyPurpose,\n LocalKeyring,\n LocalKeyringManifest,\n LocalKeyringManifestFormat,\n LocalKeyringManifestStorage,\n LocalKeyringManifestStore,\n LocalKeyringOptions,\n LocalKeyringPinCode,\n LocalKeyringScope,\n LocalKeyringSession,\n LocalOrganizationSummary,\n LocalProjectionReconciledDelta,\n LocalProjectionSnapshot,\n LocalProjectionView,\n LocalSecretContext,\n LocalStorageLocalKeyringManifestStoreOptions,\n Logger,\n MergeDocumentSummary,\n MoveDocumentToContainerInput,\n NetworkListener,\n NetworkMode,\n NetworkStatusSource,\n NormalizedLocalKeyringScope,\n OpenContainerDocumentInput,\n OpenDocumentInput,\n OpenDocumentOptions,\n OrganizationBilling,\n OrganizationBillingHistory,\n OrganizationBillingHistoryEntry,\n OrganizationBillingManagementUrl,\n OrganizationBillingView,\n OrganizationContainerGrant,\n OrganizationContainerGrants,\n OrganizationDataUsage,\n OrganizationDirectory,\n OrganizationDirectoryAndGroups,\n OrganizationDirectoryUser,\n OrganizationGrantRef,\n OrganizationGroupContainer,\n OrganizationGroupContainers,\n OrganizationGroupDetails,\n OrganizationGroupMember,\n OrganizationGroupMembers,\n OrganizationGroupMutationReceipt,\n OrganizationGroupPolicyHistory,\n OrganizationGroupSummary,\n OrganizationPolicyGrantChange,\n OrganizationPolicyGroupChange,\n /** Verified organization display page with an optional older-page cursor. */\n OrganizationPolicyHistory,\n OrganizationPolicyHistoryEntry,\n OrganizationProfile,\n Organizations,\n OrganizationUserDetail,\n PendingWriteQueueItem,\n PendingWriteQueueItemStatus,\n PendingWriteQueueObjectKind,\n PendingWriteQueueOperation,\n PendingWriteQueueOperationKind,\n PendingWriteQueueOperationStatus,\n // Persistence notifications distinguish placement changes from content saves.\n PersistedDocumentListener,\n PinCodeBrowserLocalKeyringOptions,\n PinCodeWrappingKeyKeystoreOptions,\n PurgeDocumentInput,\n PurgeDocumentResult,\n ReconciliationService,\n RemoveOrganizationGroupUserInput,\n ResolvedUserIdentity,\n SaveFileRequest,\n SecurityIncident,\n SecurityIncidentListener,\n SecurityIncidentObjectKind,\n SecurityIncidents,\n Session,\n SessionContext,\n SessionCreateOrganizationResult,\n SessionListener,\n SessionRecoverOrganizationResult,\n SessionRegistrationRefusal,\n SessionRegistrationResult,\n SessionSnapshot,\n SetActiveDocumentContainerInput,\n SetLinkedContainerIdsForDocument,\n UnlinkDocumentFromContainerInput,\n UnwrapLocalSecretInput,\n UserIdentities,\n UserSession,\n WrapLocalSecretInput,\n WrappedLocalSecretEnvelope,\n WrappedLocalSecretFormat,\n WrappingKeyHandle,\n WrappingKeyKeystore,\n WrappingKeyMaterialStorage,\n} from \"./client\";\nexport {\n type BlobStoreFactory,\n Blobs,\n type ClientOptions,\n createBrowserLocalKeyring,\n createBrowserLocalKeyringManifestStore,\n createBrowserNetworkStatusSource,\n createContainerDocumentObjectSyncState,\n createDomainScope,\n createIndexedDbLocalKeyringManifestStore,\n createIndexedDbWrappingKeyKeystore,\n createLocalKeyring,\n createLocalStorageLocalKeyringManifestStore,\n createMemoryLocalKeyringManifestStore,\n createMemoryWrappingKeyKeystore,\n createPinCodeBrowserLocalKeyring,\n createPinCodeWrappingKeyKeystore,\n createRevenueCatPurchases,\n createUnavailableDirectCheckout,\n createUnavailablePurchases,\n createWebViewLocalKeyring,\n Database,\n DEFAULT_DOCUMENT_ID,\n type DirectCheckoutAppearance,\n type DirectCheckoutCapability,\n type DirectCheckoutConfirmation,\n type DirectCheckoutSession,\n DirectCheckoutUnavailableError,\n decodeLocalKeyringSqliteKey,\n Events,\n type EventsListener,\n type EventsSnapshot,\n encodeLocalKeyringSqliteKey,\n enqueueReconciliationForEvents,\n IDENTITY_KEY_PACKAGE_FORMAT,\n isPinCodeWrappedLocalSecretEnvelope,\n LOCAL_KEYRING_MANIFEST_FORMAT,\n localKeyringScopeKey,\n Network,\n normalizeLocalKeyringScope,\n type PrincipalHistoryKeyProvider,\n type PrincipalHistoryKeyScope,\n PurchaseAbortedError,\n PurchaseAlreadyOwnedError,\n PurchaseCancelledError,\n PurchaseIdentityPendingError,\n PurchaseProviderStalledError,\n type PurchasesCapability,\n PurchasesUnavailableError,\n PurgedOrganizationRecoveryBillingRequiredError,\n parseLocalKeyringManifest,\n type RevenueCatBackend,\n type RevenueCatCustomerInfo,\n type RevenueCatPackage,\n type RevenueCatPurchasesConfig,\n SyncBillingGate,\n type SyncBillingGateListener,\n type SyncPurchaseResult,\n type SyncSubscriptionOption,\n serializeLocalKeyringManifest,\n Tearleads,\n WRAPPED_LOCAL_SECRET_FORMAT,\n} from \"./client\";\nexport type {\n BlobByteSource,\n BlobByteSourceInput,\n BlobBytes,\n BlobStore,\n DiscoveredDocumentInput,\n DocumentAttachment,\n DocumentClientProjectionDefinition,\n DocumentClientProjectionDeleteInput,\n DocumentClientProjectionSaveInput,\n DocumentFieldValidationIssue,\n DocumentProjection,\n DocumentProjectorDefinition,\n DocumentProjectorInput,\n DocumentProjectorRegistry,\n DocumentProjectorRegistryInput,\n DocumentRow,\n DocumentRowSummary,\n DocumentSummary,\n StoredDocumentKind,\n StoredDocumentState,\n StructuredDocumentMap,\n StructuredDocumentShape,\n StructuredDocumentText,\n ValidatedDocumentFields,\n} from \"./documents\";\nexport {\n addDocumentAttachments,\n blobByteSourceInputLength,\n createBlobByteSource,\n createDocumentProjectorRegistry,\n createDocumentSignerDeviceId,\n DEFAULT_DOCUMENT_ACCESS_EPOCH,\n DEFAULT_DOCUMENT_KIND,\n defaultDocumentProjectorRegistry,\n deriveStoredDocumentTitle,\n ensureDocumentAttachmentStructure,\n getDocumentAttachments,\n getDocumentClientProjectionTables,\n getStoredDocumentTypeLabel,\n getUntitledDocumentTitle,\n initializeStoredDocumentKind,\n projectStoredDocumentState,\n readBlobByteSource,\n readStoredDocumentState,\n readStringDocumentField,\n resolveOpIdAttribution,\n sameDocumentAttachments,\n summarizeDocumentContributors,\n writerByPeerId,\n writeStoredDocumentFields,\n} from \"./documents\";\nexport type {\n ContainerContentsSnapshot,\n ContainerContentsStoreRuntime,\n ContainerContentsStoreState,\n ContainerContentsStoreSyncAgent,\n ContainerContentsStoreSyncState,\n ContainerState,\n PurgeOptions,\n PurgeProgress,\n} from \"./stores/container-contents\";\nexport {\n createContainerContentsStore,\n createContainerContentsStoreState,\n createContainerContentsStoreSyncAgent,\n getOrCreateContainerContentsStore,\n isSystemContainerNode,\n requestContainerContentsDocumentPriming,\n subscribeToContainerContentsStore,\n updateContainerContentsSnapshot,\n updateContainerContentsStoreRuntime,\n} from \"./stores/container-contents\";\nexport type {\n DocumentSnapshot,\n DocumentStoreFacade,\n DocumentStoreRelinkInput,\n DocumentStructuredFieldPatch,\n} from \"./stores/documents\";\nexport {\n createDocumentStore,\n discardRegisteredDocumentLocalState,\n getOrCreateDocumentStore,\n openDocumentStore,\n requestDomainDocumentSync,\n subscribeToPersistedDocuments,\n} from \"./stores/documents\";\nexport type {\n EncryptedBlobStoreCipher,\n EncryptedBlobStoreKey,\n EncryptedBlobStoreOptions,\n WrapEncryptedBlobStoreOptions,\n} from \"./workflows/blobs\";\nexport {\n createBlobStore,\n createEncryptedBlobStore,\n createLazyEncryptedBlobStore,\n createMemoryBlobStore,\n decryptDocumentAttachmentBlob,\n hydrateDocumentAttachmentBlobs,\n purgeOpfsBlobStore,\n uploadDocumentAttachment,\n wrapEncryptedBlobStore,\n} from \"./workflows/blobs\";\nexport type {\n ContainerContentsRootAdopter,\n ContainerContentsRootAdoptionInput,\n ContainerContentsStoreWorkflowRuntime,\n ContainerContentsWorkflowRuntime,\n // Distinct from the canonical `ContainerDocumentLinkInput` (./client); the\n // documentQueries variant has a different shape, so it keeps a disambiguating\n // alias on the public surface.\n ContainerDocumentLinkInput as ContainerDocumentQueriesLinkInput,\n ContainerSystemSlotDefinition,\n RecoveryFolder,\n} from \"./workflows/container-contents\";\nexport {\n createContainerContentsDocumentsRuntime,\n createContainerContentsProjectionUserKeyResolver,\n createContainerContentsStoreWorkflowRuntime,\n createContainerContentsSyncLane,\n createContainerContentsWorkflowRuntime,\n createContainerParentSyncLane,\n createInitializedContainerMetadataDocument,\n defaultContainerContentsPersistence,\n deriveContainerSystemSlot,\n initializeDocumentLinksSchema,\n listBlobInfo,\n listDocumentLinkedContainerIds,\n loadContainerInfo,\n loadContainerSyncWatermark,\n loadDocumentAttributionRanges,\n loadDocumentInfo,\n replaceDocumentLinks,\n saveContainerSyncWatermark,\n syncedContainerDocumentObjectSyncState,\n} from \"./workflows/container-contents\";\nexport type {\n AggregatedContainerKekLog,\n ContainerMutationAuthor,\n ContainerReciteApi,\n ContainerWriteRefusal,\n KeyringRebuildResult,\n MaterializedContainerRekeyPlan,\n} from \"./workflows/containers\";\nexport {\n buildMaterializedContainerRekeyPlan,\n buildRootContainerCreatePlan,\n ContainerAuthorAccessError,\n ContainerKekRepairInaccessibleError,\n ContainerKekRepairRequiredError,\n ContainerKeyringOverrideStaleError,\n ContainerPathTooDeepError,\n classifyContainerWriteRefusal,\n containerWriterProjectionFromRekeyPlan,\n createRemoteContainer,\n fetchContainerKekLog,\n GroupShareNameMismatchError,\n HistoricalWrapUnavailableError,\n type HistoricalWrapUnavailableReason,\n isProjectionVerificationCancelledError,\n moveRemoteContainer,\n rebuildKeyringEntriesFromLog,\n recoverKeyringEntryFromWraps,\n rekeyRemoteContainer,\n revokeRemoteContainer,\n rootContainerWriterProjectionFromCreatePlan,\n shareRemoteContainer,\n shareRemoteContainerWithGroup,\n} from \"./workflows/containers\";\nexport type {\n DocumentRecord,\n DocumentSyncContainerRekeyBuilder,\n DocumentSyncPullContinuation,\n DocumentSyncUpdateIsolationError,\n DocumentsPersistence,\n DocumentsWorkflowRuntime,\n DocumentsWorkflowRuntimeInput,\n IncomingDocumentSyncUpdateValidator,\n LocalAttachmentRecord,\n PendingAttachmentRecord,\n PendingUpdateInsert,\n PendingUpdateRecord,\n SyncRemoteDocumentInput,\n} from \"./workflows/documents\";\nexport {\n buildMaterializedDocumentCreatePlan,\n createDocumentProjectionUserKeyResolver,\n createDocumentsWorkflowRuntime,\n createRemoteDocument,\n DOCUMENT_SYNC_TRACE_FRAGMENT,\n DOCUMENT_SYNC_TRACE_PATTERN,\n DOCUMENTS_APP_KIND,\n DocumentRawHistoryUnavailableError,\n defaultDocumentsPersistence,\n deletePersistedDocument,\n isDatabaseUnavailableError,\n isDocumentSyncUpdateIsolationError,\n persistedDocumentCreateStateFromResponse,\n readPullContinuation,\n syncRemoteDocument,\n unwrapContainerKekPath,\n unwrapDocumentContentKeyTarget,\n validateDocumentSyncUpdateImports,\n} from \"./workflows/documents\";\n// Nominal identity constructors are available only through the testing subpath\n// for low-level runtime tests.\nexport type {\n AcknowledgedPrincipalCurrentInput,\n AcknowledgedPrincipalCurrentRetirement,\n AcknowledgedPrincipalPredecessor,\n AuthoredPrincipalMutation,\n OrganizationGroupPolicyHistoryEntry,\n OrganizationNativePurchaseEligibility,\n OrganizationPrincipalMemberChange,\n OrganizationPrincipalMemberChangeType,\n OrganizationPrincipalPolicyHistory,\n OrganizationPrincipalPolicyHistoryEntry,\n PrincipalMutationJournalContext,\n PrincipalMutationJournalScope,\n PrincipalMutationResponse,\n ReconcileOrganizationDataUsageInput,\n} from \"./workflows/organizations\";\nexport {\n abandonJournaledPrincipalMutation,\n addOrganizationGroupUser,\n buildInitialGroupPolicyRequest,\n buildInitialMemberGroupPolicyRequest,\n buildOrganizationGroupPolicyHistory,\n buildOrganizationProfileDocumentPatch,\n buildRosterProfileDocumentPatch,\n captureAcknowledgedPrincipalPredecessor,\n checkNativePurchaseEligibility,\n createInitializedRosterProfileDocument,\n createOrganizationGroup,\n DEFAULT_PERSONAL_ORGANIZATION_PROFILE_NAME,\n deriveOrganizationMetadataContainerSystemSlot,\n deriveOrganizationRosterProfileContainerSystemSlot,\n discardUnreadableJournaledPrincipalMutation,\n GroupMembershipNameMismatchError,\n getOrganizationProfileDocumentLocalId,\n getRosterProfileDocumentLocalId,\n importOrganizationUser,\n loadLocalOrganizationDataUsage,\n loadLocalOrganizationDirectoryAndGroups,\n loadOrganizationBilling,\n loadOrganizationBillingHistory,\n loadOrganizationBillingManagementUrl,\n ORGANIZATION_METADATA_CONTAINER_NAME,\n ORGANIZATION_PROFILE_DOCUMENT_KIND,\n ORGANIZATION_ROSTER_PROFILE_CONTAINER_NAME,\n PendingPrincipalMutationError,\n PrincipalMutationOutcomeUnknownError,\n ROSTER_PROFILE_DOCUMENT_KIND,\n readJournaledPrincipalMutation,\n readOrganizationProfileName,\n reconcileOrganizationDataUsage,\n reconcileOrganizationDirectoryAndGroups,\n recoverJournaledPrincipalMutation,\n removeOrganizationGroupUser,\n resolveOrganizationBillingView,\n retainAcknowledgedPrincipalCurrents,\n revokeOrganizationContainerGrant,\n startOrganizationTrial,\n submitJournaledPrincipalMutation,\n subscribeOrganizationReadModelInvalidation,\n UnreadablePrincipalMutationError,\n updateOrganizationProfile,\n updateOrganizationRosterEntry,\n} from \"./workflows/organizations\";\nexport type {\n CacheReferencedPrincipalPoliciesOptions,\n PrincipalHistoryProtectionLease,\n ProjectionPolicyHistoryRecoveryOptions,\n RecoveredPrincipalPolicyHistory,\n RecoveredScopedPrincipalPolicyHistory,\n RecoverPrincipalPolicyHistoryOptions,\n RecoverScopedPrincipalPolicyHistoryOptions,\n} from \"./workflows/principals\";\nexport {\n cacheReferencedPrincipalPolicies,\n PrincipalPolicyHistoryReadError,\n recoverPrincipalPolicyHistory,\n recoverProjectionPolicyHistory,\n recoverScopedPrincipalPolicyHistory,\n} from \"./workflows/principals\";\nexport type {\n InitialRootMetadataBootstrap,\n ProvisionedSystemContainerSpec,\n RegisterIdentityInput,\n RegistrationApi,\n} from \"./workflows/registration\";\nexport {\n bootstrapRootContainer,\n buildInitialOrganizationPolicyRequest,\n createInitialRootMetadataBootstrap,\n persistRegistrationBootstrap,\n registerIdentity,\n} from \"./workflows/registration\";\nexport type {\n RootIdentitiesApi,\n RootIdentitiesPage,\n RootIdentitiesQueryInput,\n RootIdentity,\n RootIdentityDetail,\n RootIdentityOrganization,\n RootIdentitySession,\n RootRequestOutcome,\n} from \"./workflows/root\";\nexport {\n listRootDataUsageReport,\n listRootIdentities,\n listRootIdentityOrganizations,\n listRootOrganizationIdentities,\n listRootOrganizations,\n loadRootIdentity,\n loadRootOrganization,\n loadRootOrganizationDataUsage,\n type RootDataUsageApi,\n type RootDataUsageReportPage,\n type RootOrganization,\n type RootOrganizationDetail,\n type RootOrganizationIdentitiesPage,\n type RootOrganizationIdentity,\n type RootOrganizationPageQueryInput,\n type RootOrganizationsApi,\n type RootOrganizationsPage,\n type RootOrganizationsQueryInput,\n} from \"./workflows/root\";\nexport type {\n ClearRemoteSyncStateResult,\n DomainSyncCoordinator,\n DomainSyncSnapshot,\n RemoteResetInput,\n RemoteResetReplacement,\n SyncIdleOptions,\n SyncLane,\n SyncLaneConfig,\n SyncLaneLastAction,\n SyncLanePhase,\n SyncLaneSnapshot,\n SyncLaneStatus,\n} from \"./workflows/sync\";\nexport {\n clearRemoteSyncState,\n getDomainSyncCoordinatorSnapshot,\n getOrCreateDomainSyncCoordinator,\n hasDomainSyncCoordinatorPendingWork,\n requestAllDomainSyncLanes,\n subscribeToDomainSyncCoordinator,\n waitForDomainSyncCoordinatorToSettle,\n} from \"./workflows/sync\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,iFAAiF;AACjF,2EAA2E;AAC3E,4FAA4F;AAC5F,OAAO,EAGL,iBAAiB,GAElB,MAAM,uBAAuB,CAAC;AAmK/B,OAAO,EAEL,KAAK,EAEL,yBAAyB,EACzB,sCAAsC,EACtC,gCAAgC,EAChC,sCAAsC,EACtC,iBAAiB,EACjB,wCAAwC,EACxC,kCAAkC,EAClC,kBAAkB,EAClB,2CAA2C,EAC3C,qCAAqC,EACrC,+BAA+B,EAC/B,gCAAgC,EAChC,gCAAgC,EAChC,yBAAyB,EACzB,+BAA+B,EAC/B,0BAA0B,EAC1B,yBAAyB,EACzB,QAAQ,EACR,mBAAmB,EAKnB,8BAA8B,EAC9B,2BAA2B,EAC3B,MAAM,EAGN,2BAA2B,EAC3B,8BAA8B,EAC9B,2BAA2B,EAC3B,mCAAmC,EACnC,6BAA6B,EAC7B,oBAAoB,EACpB,OAAO,EACP,0BAA0B,EAG1B,oBAAoB,EACpB,yBAAyB,EACzB,sBAAsB,EACtB,4BAA4B,EAC5B,4BAA4B,EAE5B,yBAAyB,EACzB,8CAA8C,EAC9C,yBAAyB,EAKzB,eAAe,EAIf,6BAA6B,EAC7B,SAAS,EACT,2BAA2B,GAC5B,MAAM,UAAU,CAAC;AA2BlB,OAAO,EACL,sBAAsB,EACtB,yB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AAgC,EAChC,yBAAyB,EACzB,6BAA6B,GAC9B,MAAM,2BAA2B,CAAC;AAUnC,OAAO,EACL,gCAAgC,EAChC,+BAA+B,EAC/B,6BAA6B,EAC7B,8BAA8B,EAC9B,mCAAmC,GACpC,MAAM,wBAAwB,CAAC;AAOhC,OAAO,EACL,sBAAsB,EACtB,qCAAqC,EACrC,kCAAkC,EAClC,4BAA4B,EAC5B,gBAAgB,GACjB,MAAM,0BAA0B,CAAC;AAWlC,OAAO,EACL,uBAAuB,EACvB,kBAAkB,EAClB,6BAA6B,EAC7B,8BAA8B,EAC9B,qBAAqB,EACrB,gBAAgB,EAChB,oBAAoB,EACpB,6BAA6B,GAW9B,MAAM,kBAAkB,CAAC;AAe1B,OAAO,EACL,oBAAoB,EACpB,gCAAgC,EAChC,gCAAgC,EAChC,mCAAmC,EACnC,yBAAyB,EACzB,gCAAgC,EAChC,oCAAoC,GACrC,MAAM,kBAAkB,CAAC","sourcesContent":["// Current SDK contract: unified device-first handles and atomic revision checks.\n// Authority loaders take exact heads, including cached citations. Obsolete\n// adapters are excluded; authored policy journals survive restart. See workflows/README.md.\nexport {\n type ApiRequestCounts,\n type ApiRequestEndpointCounts,\n ApiRequestMetrics,\n type ApiRequestMetricsSnapshot,\n} from \"@tearleads/api-client\";\nexport type {\n AbandonOrganizationPolicyMutationInput,\n AddOrganizationGroupUserInput,\n BlobInfo,\n BlobInfoAttachmentKind,\n BlobInfoDocumentReference,\n BlobInfoInput,\n BlobInfoList,\n BlobInfoSort,\n BlobInfoSortDirection,\n BlobInfoSortKey,\n BrowserLocalKeyringOptions,\n ClientDatabaseOptions,\n ContainerContents,\n ContainerContentsContextValue,\n ContainerContentsStore,\n ContainerContentsStoreOptions,\n ContainerDocumentLinkInput,\n ContainerDocumentLinks,\n ContainerDocumentObjectSyncState,\n ContainerDocumentObjectSyncStatus,\n ContainerDocumentQueries,\n ContainerDocumentSidebarRow,\n ContainerInfo,\n ContainerInfoInput,\n ContainerItemRow,\n ContainerItemSort,\n ContainerItemSortDirection,\n ContainerItemSortKey,\n ContainerNode,\n ContainerShareAccessLevel,\n CreateOrganizationOptions,\n DatabaseListener,\n DatabaseOptions,\n DatabaseSnapshot,\n DatabaseStatus,\n DeviceFirst,\n DeviceFirstContainerContents,\n DiscardUnreadableOrganizationPolicyMutationInput,\n DocumentAttachmentStatus,\n DocumentAttachmentUpload,\n DocumentAttributionRangesInput,\n DocumentAttributionRangesPage,\n DocumentContextValue,\n DocumentInfo,\n DocumentInfoInput,\n DocumentList,\n DocumentSort,\n DocumentSortDirection,\n DocumentSortKey,\n DocumentStore,\n DocumentSubscriptionOptions,\n Documents,\n DocumentsRuntime,\n DomainScope,\n FileSaver,\n Identity,\n IdentityGenerationResult,\n IdentityKeyPackage,\n IdentityListener,\n IdentityOptions,\n IdentitySnapshot,\n ImportedOrganizationUser,\n IndexedDbLocalKeyringManifestStoreOptions,\n IndexedDbWrappingKeyKeystoreOptions,\n LinkDocumentToContainerInput,\n ListDocumentsInput,\n LocalKeyPurpose,\n LocalKeyring,\n LocalKeyringManifest,\n LocalKeyringManifestFormat,\n LocalKeyringManifestStorage,\n LocalKeyringManifestStore,\n LocalKeyringOptions,\n LocalKeyringPinCode,\n LocalKeyringScope,\n LocalKeyringSession,\n LocalOrganizationSummary,\n LocalProjectionReconciledDelta,\n LocalProjectionSnapshot,\n LocalProjectionView,\n LocalSecretContext,\n LocalStorageLocalKeyringManifestStoreOptions,\n Logger,\n MergeDocumentSummary,\n MoveDocumentToContainerInput,\n NetworkListener,\n NetworkMode,\n NetworkStatusSource,\n NormalizedLocalKeyringScope,\n OpenContainerDocumentInput,\n OpenDocumentInput,\n OpenDocumentOptions,\n OrganizationBilling,\n OrganizationBillingHistory,\n OrganizationBillingHistoryEntry,\n OrganizationBillingManagementUrl,\n OrganizationBillingView,\n OrganizationContainerGrant,\n OrganizationContainerGrants,\n OrganizationDataUsage,\n OrganizationDirectory,\n OrganizationDirectoryAndGroups,\n OrganizationDirectoryUser,\n OrganizationGrantRef,\n OrganizationGroupContainer,\n OrganizationGroupContainers,\n OrganizationGroupDetails,\n OrganizationGroupMember,\n OrganizationGroupMembers,\n OrganizationGroupMutationReceipt,\n OrganizationGroupPolicyHistory,\n OrganizationGroupSummary,\n OrganizationPolicyGrantChange,\n OrganizationPolicyGroupChange,\n /** Verified organization display page with an optional older-page cursor. */\n OrganizationPolicyHistory,\n OrganizationPolicyHistoryEntry,\n OrganizationProfile,\n Organizations,\n OrganizationUserDetail,\n PendingWriteQueueItem,\n PendingWriteQueueItemStatus,\n PendingWriteQueueObjectKind,\n PendingWriteQueueOperation,\n PendingWriteQueueOperationKind,\n PendingWriteQueueOperationStatus,\n // Persistence notifications distinguish placement changes from content saves.\n PersistedDocumentListener,\n PinCodeBrowserLocalKeyringOptions,\n PinCodeWrappingKeyKeystoreOptions,\n PurgeDocumentInput,\n PurgeDocumentResult,\n ReconciliationService,\n RemoveOrganizationGroupUserInput,\n ResolvedUserIdentity,\n SaveFileRequest,\n SecurityIncident,\n SecurityIncidentListener,\n SecurityIncidentObjectKind,\n SecurityIncidents,\n Session,\n SessionContext,\n SessionCreateOrganizationResult,\n SessionListener,\n SessionRecoverOrganizationResult,\n SessionRegistrationRefusal,\n SessionRegistrationResult,\n SessionSnapshot,\n SetActiveDocumentContainerInput,\n SetLinkedContainerIdsForDocument,\n UnlinkDocumentFromContainerInput,\n UnwrapLocalSecretInput,\n UserIdentities,\n UserSession,\n WrapLocalSecretInput,\n WrappedLocalSecretEnvelope,\n WrappedLocalSecretFormat,\n WrappingKeyHandle,\n WrappingKeyKeystore,\n WrappingKeyMaterialStorage,\n} from \"./client\";\nexport {\n type BlobStoreFactory,\n Blobs,\n type ClientOptions,\n createBrowserLocalKeyring,\n createBrowserLocalKeyringManifestStore,\n createBrowserNetworkStatusSource,\n createContainerDocumentObjectSyncState,\n createDomainScope,\n createIndexedDbLocalKeyringManifestStore,\n createIndexedDbWrappingKeyKeystore,\n createLocalKeyring,\n createLocalStorageLocalKeyringManifestStore,\n createMemoryLocalKeyringManifestStore,\n createMemoryWrappingKeyKeystore,\n createPinCodeBrowserLocalKeyring,\n createPinCodeWrappingKeyKeystore,\n createRevenueCatPurchases,\n createUnavailableDirectCheckout,\n createUnavailablePurchases,\n createWebViewLocalKeyring,\n Database,\n DEFAULT_DOCUMENT_ID,\n type DirectCheckoutAppearance,\n type DirectCheckoutCapability,\n type DirectCheckoutConfirmation,\n type DirectCheckoutSession,\n DirectCheckoutUnavailableError,\n decodeLocalKeyringSqliteKey,\n Events,\n type EventsListener,\n type EventsSnapshot,\n encodeLocalKeyringSqliteKey,\n enqueueReconciliationForEvents,\n IDENTITY_KEY_PACKAGE_FORMAT,\n isPinCodeWrappedLocalSecretEnvelope,\n LOCAL_KEYRING_MANIFEST_FORMAT,\n localKeyringScopeKey,\n Network,\n normalizeLocalKeyringScope,\n type PrincipalHistoryKeyProvider,\n type PrincipalHistoryKeyScope,\n PurchaseAbortedError,\n PurchaseAlreadyOwnedError,\n PurchaseCancelledError,\n PurchaseIdentityPendingError,\n PurchaseProviderStalledError,\n type PurchasesCapability,\n PurchasesUnavailableError,\n PurgedOrganizationRecoveryBillingRequiredError,\n parseLocalKeyringManifest,\n type RevenueCatBackend,\n type RevenueCatCustomerInfo,\n type RevenueCatPackage,\n type RevenueCatPurchasesConfig,\n SyncBillingGate,\n type SyncBillingGateListener,\n type SyncPurchaseResult,\n type SyncSubscriptionOption,\n serializeLocalKeyringManifest,\n Tearleads,\n WRAPPED_LOCAL_SECRET_FORMAT,\n} from \"./client\";\nexport type {\n BlobByteSource,\n BlobByteSourceInput,\n BlobBytes,\n BlobStore,\n DiscoveredDocumentInput,\n DocumentAttachment,\n DocumentClientProjectionDefinition,\n DocumentClientProjectionDeleteInput,\n DocumentClientProjectionSaveInput,\n DocumentFieldValidationIssue,\n DocumentProjection,\n DocumentProjectorDefinition,\n DocumentProjectorInput,\n DocumentProjectorRegistry,\n DocumentProjectorRegistryInput,\n DocumentRow,\n DocumentRowSummary,\n DocumentSummary,\n StoredDocumentKind,\n StoredDocumentState,\n StructuredDocumentMap,\n StructuredDocumentShape,\n StructuredDocumentText,\n ValidatedDocumentFields,\n} from \"./documents\";\nexport {\n addDocumentAttachments,\n blobByteSourceInputLength,\n createBlobByteSource,\n createDocumentProjectorRegistry,\n createDocumentSignerDeviceId,\n DEFAULT_DOCUMENT_ACCESS_EPOCH,\n DEFAULT_DOCUMENT_KIND,\n defaultDocumentProjectorRegistry,\n deriveStoredDocumentTitle,\n ensureDocumentAttachmentStructure,\n getDocumentAttachments,\n getDocumentClientProjectionTables,\n getStoredDocumentTypeLabel,\n getUntitledDocumentTitle,\n initializeStoredDocumentKind,\n projectStoredDocumentState,\n readBlobByteSource,\n readStoredDocumentState,\n readStringDocumentField,\n resolveOpIdAttribution,\n sameDocumentAttachments,\n summarizeDocumentContributors,\n writerByPeerId,\n writeStoredDocumentFields,\n} from \"./documents\";\nexport type {\n ContainerContentsSnapshot,\n ContainerContentsStoreRuntime,\n ContainerContentsStoreState,\n ContainerContentsStoreSyncAgent,\n ContainerContentsStoreSyncState,\n ContainerState,\n PurgeOptions,\n PurgeProgress,\n} from \"./stores/container-contents\";\nexport {\n createContainerContentsStore,\n createContainerContentsStoreState,\n createContainerContentsStoreSyncAgent,\n getOrCreateContainerContentsStore,\n isSystemContainerNode,\n requestContainerContentsDocumentPriming,\n subscribeToContainerContentsStore,\n updateContainerContentsSnapshot,\n updateContainerContentsStoreRuntime,\n} from \"./stores/container-contents\";\nexport type {\n DocumentSnapshot,\n DocumentStoreFacade,\n DocumentStoreRelinkInput,\n DocumentStructuredFieldPatch,\n} from \"./stores/documents\";\nexport {\n createDocumentStore,\n discardRegisteredDocumentLocalState,\n getOrCreateDocumentStore,\n openDocumentStore,\n requestDomainDocumentSync,\n subscribeToPersistedDocuments,\n} from \"./stores/documents\";\nexport type {\n EncryptedBlobStoreCipher,\n EncryptedBlobStoreKey,\n EncryptedBlobStoreOptions,\n WrapEncryptedBlobStoreOptions,\n} from \"./workflows/blobs\";\nexport {\n createBlobStore,\n createEncryptedBlobStore,\n createLazyEncryptedBlobStore,\n createMemoryBlobStore,\n decryptDocumentAttachmentBlob,\n hydrateDocumentAttachmentBlobs,\n purgeOpfsBlobStore,\n uploadDocumentAttachment,\n wrapEncryptedBlobStore,\n} from \"./workflows/blobs\";\nexport type {\n ContainerContentsRootAdopter,\n ContainerContentsRootAdoptionInput,\n ContainerContentsStoreWorkflowRuntime,\n ContainerContentsWorkflowRuntime,\n // Distinct from the canonical `ContainerDocumentLinkInput` (./client); the\n // documentQueries variant has a different shape, so it keeps a disambiguating\n // alias on the public surface.\n ContainerDocumentLinkInput as ContainerDocumentQueriesLinkInput,\n ContainerSystemSlotDefinition,\n PendingDownloadQueueItem,\n RecoveryFolder,\n} from \"./workflows/container-contents\";\nexport {\n createContainerContentsDocumentsRuntime,\n createContainerContentsProjectionUserKeyResolver,\n createContainerContentsStoreWorkflowRuntime,\n createContainerContentsSyncLane,\n createContainerContentsWorkflowRuntime,\n createContainerParentSyncLane,\n createInitializedContainerMetadataDocument,\n defaultContainerContentsPersistence,\n deriveContainerSystemSlot,\n initializeDocumentLinksSchema,\n listBlobInfo,\n listDocumentLinkedContainerIds,\n loadContainerInfo,\n loadContainerSyncWatermark,\n loadDocumentAttributionRanges,\n loadDocumentInfo,\n replaceDocumentLinks,\n saveContainerSyncWatermark,\n syncedContainerDocumentObjectSyncState,\n} from \"./workflows/container-contents\";\nexport type {\n AggregatedContainerKekLog,\n ContainerMutationAuthor,\n ContainerReciteApi,\n ContainerWriteRefusal,\n KeyringRebuildResult,\n MaterializedContainerRekeyPlan,\n} from \"./workflows/containers\";\nexport {\n buildMaterializedContainerRekeyPlan,\n buildRootContainerCreatePlan,\n ContainerAuthorAccessError,\n ContainerKekRepairInaccessibleError,\n ContainerKekRepairRequiredError,\n ContainerKeyringOverrideStaleError,\n ContainerPathTooDeepError,\n classifyContainerWriteRefusal,\n containerWriterProjectionFromRekeyPlan,\n createRemoteContainer,\n fetchContainerKekLog,\n GroupShareNameMismatchError,\n HistoricalWrapUnavailableError,\n type HistoricalWrapUnavailableReason,\n isProjectionVerificationCancelledError,\n moveRemoteContainer,\n rebuildKeyringEntriesFromLog,\n recoverKeyringEntryFromWraps,\n rekeyRemoteContainer,\n revokeRemoteContainer,\n rootContainerWriterProjectionFromCreatePlan,\n shareRemoteContainer,\n shareRemoteContainerWithGroup,\n} from \"./workflows/containers\";\nexport type {\n DocumentRecord,\n DocumentSyncContainerRekeyBuilder,\n DocumentSyncPullContinuation,\n DocumentSyncUpdateIsolationError,\n DocumentsPersistence,\n DocumentsWorkflowRuntime,\n DocumentsWorkflowRuntimeInput,\n IncomingDocumentSyncUpdateValidator,\n LocalAttachmentRecord,\n PendingAttachmentRecord,\n PendingUpdateInsert,\n PendingUpdateRecord,\n SyncRemoteDocumentInput,\n} from \"./workflows/documents\";\nexport {\n buildMaterializedDocumentCreatePlan,\n createDocumentProjectionUserKeyResolver,\n createDocumentsWorkflowRuntime,\n createRemoteDocument,\n DOCUMENT_SYNC_TRACE_FRAGMENT,\n DOCUMENT_SYNC_TRACE_PATTERN,\n DOCUMENTS_APP_KIND,\n DocumentRawHistoryUnavailableError,\n defaultDocumentsPersistence,\n deletePersistedDocument,\n isDatabaseUnavailableError,\n isDocumentSyncUpdateIsolationError,\n persistedDocumentCreateStateFromResponse,\n readPullContinuation,\n syncRemoteDocument,\n unwrapContainerKekPath,\n unwrapDocumentContentKeyTarget,\n validateDocumentSyncUpdateImports,\n} from \"./workflows/documents\";\n// Nominal identity constructors are available only through the testing subpath\n// for low-level runtime tests.\nexport type {\n AcknowledgedPrincipalCurrentInput,\n AcknowledgedPrincipalCurrentRetirement,\n AcknowledgedPrincipalPredecessor,\n AuthoredPrincipalMutation,\n OrganizationGroupPolicyHistoryEntry,\n OrganizationNativePurchaseEligibility,\n OrganizationPrincipalMemberChange,\n OrganizationPrincipalMemberChangeType,\n OrganizationPrincipalPolicyHistory,\n OrganizationPrincipalPolicyHistoryEntry,\n PrincipalMutationJournalContext,\n PrincipalMutationJournalScope,\n PrincipalMutationResponse,\n ReconcileOrganizationDataUsageInput,\n} from \"./workflows/organizations\";\nexport {\n abandonJournaledPrincipalMutation,\n addOrganizationGroupUser,\n buildInitialGroupPolicyRequest,\n buildInitialMemberGroupPolicyRequest,\n buildOrganizationGroupPolicyHistory,\n buildOrganizationProfileDocumentPatch,\n buildRosterProfileDocumentPatch,\n captureAcknowledgedPrincipalPredecessor,\n checkNativePurchaseEligibility,\n createInitializedRosterProfileDocument,\n createOrganizationGroup,\n DEFAULT_PERSONAL_ORGANIZATION_PROFILE_NAME,\n deriveOrganizationMetadataContainerSystemSlot,\n deriveOrganizationRosterProfileContainerSystemSlot,\n discardUnreadableJournaledPrincipalMutation,\n GroupMembershipNameMismatchError,\n getOrganizationProfileDocumentLocalId,\n getRosterProfileDocumentLocalId,\n importOrganizationUser,\n loadLocalOrganizationDataUsage,\n loadLocalOrganizationDirectoryAndGroups,\n loadOrganizationBilling,\n loadOrganizationBillingHistory,\n loadOrganizationBillingManagementUrl,\n ORGANIZATION_METADATA_CONTAINER_NAME,\n ORGANIZATION_PROFILE_DOCUMENT_KIND,\n ORGANIZATION_ROSTER_PROFILE_CONTAINER_NAME,\n PendingPrincipalMutationError,\n PrincipalMutationOutcomeUnknownError,\n ROSTER_PROFILE_DOCUMENT_KIND,\n readJournaledPrincipalMutation,\n readOrganizationProfileName,\n reconcileOrganizationDataUsage,\n reconcileOrganizationDirectoryAndGroups,\n recoverJournaledPrincipalMutation,\n removeOrganizationGroupUser,\n resolveOrganizationBillingView,\n retainAcknowledgedPrincipalCurrents,\n revokeOrganizationContainerGrant,\n startOrganizationTrial,\n submitJournaledPrincipalMutation,\n subscribeOrganizationReadModelInvalidation,\n UnreadablePrincipalMutationError,\n updateOrganizationProfile,\n updateOrganizationRosterEntry,\n} from \"./workflows/organizations\";\nexport type {\n CacheReferencedPrincipalPoliciesOptions,\n PrincipalHistoryProtectionLease,\n ProjectionPolicyHistoryRecoveryOptions,\n RecoveredPrincipalPolicyHistory,\n RecoveredScopedPrincipalPolicyHistory,\n RecoverPrincipalPolicyHistoryOptions,\n RecoverScopedPrincipalPolicyHistoryOptions,\n} from \"./workflows/principals\";\nexport {\n cacheReferencedPrincipalPolicies,\n PrincipalPolicyHistoryReadError,\n recoverPrincipalPolicyHistory,\n recoverProjectionPolicyHistory,\n recoverScopedPrincipalPolicyHistory,\n} from \"./workflows/principals\";\nexport type {\n InitialRootMetadataBootstrap,\n ProvisionedSystemContainerSpec,\n RegisterIdentityInput,\n RegistrationApi,\n} from \"./workflows/registration\";\nexport {\n bootstrapRootContainer,\n buildInitialOrganizationPolicyRequest,\n createInitialRootMetadataBootstrap,\n persistRegistrationBootstrap,\n registerIdentity,\n} from \"./workflows/registration\";\nexport type {\n RootIdentitiesApi,\n RootIdentitiesPage,\n RootIdentitiesQueryInput,\n RootIdentity,\n RootIdentityDetail,\n RootIdentityOrganization,\n RootIdentitySession,\n RootRequestOutcome,\n} from \"./workflows/root\";\nexport {\n listRootDataUsageReport,\n listRootIdentities,\n listRootIdentityOrganizations,\n listRootOrganizationIdentities,\n listRootOrganizations,\n loadRootIdentity,\n loadRootOrganization,\n loadRootOrganizationDataUsage,\n type RootDataUsageApi,\n type RootDataUsageReportPage,\n type RootOrganization,\n type RootOrganizationDetail,\n type RootOrganizationIdentitiesPage,\n type RootOrganizationIdentity,\n type RootOrganizationPageQueryInput,\n type RootOrganizationsApi,\n type RootOrganizationsPage,\n type RootOrganizationsQueryInput,\n} from \"./workflows/root\";\nexport type {\n ClearRemoteSyncStateResult,\n DomainSyncCoordinator,\n DomainSyncSnapshot,\n RemoteResetInput,\n RemoteResetReplacement,\n SyncIdleOptions,\n SyncLane,\n SyncLaneConfig,\n SyncLaneLastAction,\n SyncLanePhase,\n SyncLaneSnapshot,\n SyncLaneStatus,\n} from \"./workflows/sync\";\nexport {\n clearRemoteSyncState,\n getDomainSyncCoordinatorSnapshot,\n getOrCreateDomainSyncCoordinator,\n hasDomainSyncCoordinatorPendingWork,\n requestAllDomainSyncLanes,\n subscribeToDomainSyncCoordinator,\n waitForDomainSyncCoordinatorToSettle,\n} from \"./workflows/sync\";\n"]}
@@ -3,6 +3,7 @@ import { createBinaryResponseOperationTransport, } from "./binaryResponseOperati
3
3
  import { createJsonOperationTransport, } from "./operationTransport.js";
4
4
  export function createOperationTransport(responseRequest) {
5
5
  return {
6
+ reportFailure: responseRequest.reportFailure,
6
7
  ...createBinaryRequestOperationTransport(responseRequest),
7
8
  ...createJsonOperationTransport(responseRequest),
8
9
  ...createBinaryResponseOperationTransport(responseRequest),
@@ -1 +1 @@
1
- {"version":3,"file":"operationTransportFactory.js","sourceRoot":"","sources":["operationTransportFactory.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,qCAAqC,GACtC,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAEL,sCAAsC,GACvC,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACL,4BAA4B,GAE7B,MAAM,sBAAsB,CAAC;AAO9B,MAAM,UAAU,wBAAwB,CACtC,eAA2C;IAE3C,OAAO;QACL,GAAG,qCAAqC,CAAC,eAAe,CAAC;QACzD,GAAG,4BAA4B,CAAC,eAAe,CAAC;QAChD,GAAG,sCAAsC,CAAC,eAAe,CAAC;KAC3D,CAAC;AACJ,CAAC","sourcesContent":["import {\n type BinaryRequestOperationTransport,\n createBinaryRequestOperationTransport,\n} from \"./binaryRequestOperationTransport\";\nimport {\n type BinaryResponseOperationTransport,\n createBinaryResponseOperationTransport,\n} from \"./binaryResponseOperationTransport\";\nimport {\n createJsonOperationTransport,\n type JsonOperationTransport,\n} from \"./operationTransport\";\nimport type { OperationResponseRequestFn } from \"./types\";\n\nexport type OperationTransport = BinaryRequestOperationTransport &\n JsonOperationTransport &\n BinaryResponseOperationTransport;\n\nexport function createOperationTransport(\n responseRequest: OperationResponseRequestFn,\n): OperationTransport {\n return {\n ...createBinaryRequestOperationTransport(responseRequest),\n ...createJsonOperationTransport(responseRequest),\n ...createBinaryResponseOperationTransport(responseRequest),\n };\n}\n"]}
1
+ {"version":3,"file":"operationTransportFactory.js","sourceRoot":"","sources":["operationTransportFactory.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,qCAAqC,GACtC,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAEL,sCAAsC,GACvC,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACL,4BAA4B,GAE7B,MAAM,sBAAsB,CAAC;AAQ9B,MAAM,UAAU,wBAAwB,CACtC,eAA2C;IAE3C,OAAO;QACL,aAAa,EAAE,eAAe,CAAC,aAAa;QAC5C,GAAG,qCAAqC,CAAC,eAAe,CAAC;QACzD,GAAG,4BAA4B,CAAC,eAAe,CAAC;QAChD,GAAG,sCAAsC,CAAC,eAAe,CAAC;KAC3D,CAAC;AACJ,CAAC","sourcesContent":["import {\n type BinaryRequestOperationTransport,\n createBinaryRequestOperationTransport,\n} from \"./binaryRequestOperationTransport\";\nimport {\n type BinaryResponseOperationTransport,\n createBinaryResponseOperationTransport,\n} from \"./binaryResponseOperationTransport\";\nimport {\n createJsonOperationTransport,\n type JsonOperationTransport,\n} from \"./operationTransport\";\nimport type { OperationResponseRequestFn } from \"./types\";\n\nexport type OperationTransport = BinaryRequestOperationTransport &\n JsonOperationTransport &\n BinaryResponseOperationTransport &\n Pick<OperationResponseRequestFn, \"reportFailure\">;\n\nexport function createOperationTransport(\n responseRequest: OperationResponseRequestFn,\n): OperationTransport {\n return {\n reportFailure: responseRequest.reportFailure,\n ...createBinaryRequestOperationTransport(responseRequest),\n ...createJsonOperationTransport(responseRequest),\n ...createBinaryResponseOperationTransport(responseRequest),\n };\n}\n"]}
@@ -1,4 +1,6 @@
1
1
  import type { BinaryResponseOperationTransport } from "../../binaryResponseOperationTransport.js";
2
+ import type { JsonOperationTransport } from "../../operationTransport.js";
3
+ import type { OperationResponseRequestFn } from "../../types.js";
2
4
  export interface BlobBytesResponse {
3
5
  readonly blobId: string;
4
6
  readonly byteLength: number;
@@ -11,4 +13,7 @@ export interface UploadMultipartBlobPartBytesRequest {
11
13
  readonly sha256: string;
12
14
  readonly uploadId: string;
13
15
  }
14
- export declare function getBlobBytes(transport: BinaryResponseOperationTransport, blobId: string): Promise<BlobBytesResponse | null>;
16
+ type BlobDownloadTransport = Pick<JsonOperationTransport, "requestResult"> & Pick<BinaryResponseOperationTransport, "requestBinaryResponse"> & Pick<OperationResponseRequestFn, "reportFailure">;
17
+ type DownloadFetch = (url: string, init: RequestInit) => Promise<Response>;
18
+ export declare function getBlobBytes(transport: BlobDownloadTransport, blobId: string, downloadFetch?: DownloadFetch): Promise<BlobBytesResponse | null>;
19
+ export {};
@@ -1,5 +1,101 @@
1
- import { blobWireHeaderKeys, getBlobBytesOperation, } from "../../../validators/operation/index.js";
2
- export async function getBlobBytes(transport, blobId) {
1
+ import { blobWireHeaderKeys, getBlobBytesOperation, getBlobDownloadOperation, } from "../../../validators/operation/index.js";
2
+ export async function getBlobBytes(transport, blobId, downloadFetch = (url, init) => fetch(url, init)) {
3
+ // Refresh at most once. R2 expiration errors can appear as CORS/network
4
+ // failures in browsers, so both rejected fetches and 403s need a fresh URL.
5
+ for (let attempt = 0; attempt < 2; attempt += 1) {
6
+ const result = await transport.requestResult(getBlobDownloadOperation, { params: { blobId } }, { reportErrors: false });
7
+ if (!result.ok) {
8
+ if (result.kind === "http" && result.status === 404) {
9
+ return getBlobStream(transport, blobId);
10
+ }
11
+ result.report();
12
+ return null;
13
+ }
14
+ const descriptor = result.data;
15
+ if (descriptor.blobId !== blobId) {
16
+ transport.reportFailure({
17
+ kind: "shape",
18
+ method: "GET",
19
+ path: `/blobs/${blobId}/download`,
20
+ status: 200,
21
+ statusText: "",
22
+ message: `Blob ${blobId} download descriptor has the wrong identity`,
23
+ });
24
+ return null;
25
+ }
26
+ if (descriptor.source.kind === "api") {
27
+ return getBlobStream(transport, blobId);
28
+ }
29
+ try {
30
+ // Never send the application's session or cookies to the object store.
31
+ // Reject redirects and keep bearer URLs out of referrers and errors.
32
+ const response = await downloadFetch(descriptor.source.url, {
33
+ cache: "no-store",
34
+ credentials: "omit",
35
+ redirect: "error",
36
+ referrerPolicy: "no-referrer",
37
+ });
38
+ if (response.status !== 200) {
39
+ await response.body?.cancel().catch(() => { });
40
+ if (response.status === 403) {
41
+ continue;
42
+ }
43
+ break;
44
+ }
45
+ return {
46
+ blobId: descriptor.blobId,
47
+ byteLength: descriptor.byteLength,
48
+ sha256: descriptor.sha256,
49
+ encryptedBytes: response.body
50
+ ? signedDownloadBodyStream(response.body)
51
+ : bufferedResponseBodyStream(await response.arrayBuffer()),
52
+ };
53
+ }
54
+ catch {
55
+ // The downstream SDK still verifies length, hash and authenticated
56
+ // encryption. An error after streaming begins propagates to that reader.
57
+ }
58
+ }
59
+ // Preserve downloads when storage is unreachable or a native HTTP bridge
60
+ // cannot use the signed URL. This endpoint checks current access again.
61
+ // A storage failure alone must not signal that the API is offline.
62
+ return getBlobStream(transport, blobId);
63
+ }
64
+ function signedDownloadBodyStream(stream) {
65
+ const reader = stream.getReader();
66
+ // Native network errors may contain the bearer URL. Keep failures generic
67
+ // before downstream readers log them, without buffering or eager reads.
68
+ return new ReadableStream({
69
+ async pull(controller) {
70
+ try {
71
+ const { done, value } = await reader.read();
72
+ if (done) {
73
+ controller.close();
74
+ reader.releaseLock();
75
+ }
76
+ else {
77
+ controller.enqueue(value);
78
+ }
79
+ }
80
+ catch {
81
+ controller.error(new Error("Blob download interrupted"));
82
+ reader.releaseLock();
83
+ }
84
+ },
85
+ async cancel(reason) {
86
+ try {
87
+ await reader.cancel(reason);
88
+ }
89
+ catch {
90
+ throw new Error("Blob download cancellation failed");
91
+ }
92
+ finally {
93
+ reader.releaseLock();
94
+ }
95
+ },
96
+ }, { highWaterMark: 0 });
97
+ }
98
+ async function getBlobStream(transport, blobId) {
3
99
  const result = await transport.requestBinaryResponse(getBlobBytesOperation, {
4
100
  params: { blobId },
5
101
  });
@@ -1 +1 @@
1
- {"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AAC,EAAE,CAAC;gBACzB,UAAU,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;YAC5B,CAAC;YACD,UAAU,CAAC,KAAK,EAAE,CAAC;QACrB,CAAC;KACF,CAAC,CAAC;AACL,CAAC","sourcesContent":["import {\n blobWireHeaderKeys,\n getBlobBytesOperation,\n} from \"@tearleads/validators/operation\";\nimport type { BinaryResponseOperationTransport } from \"../../binaryResponseOperationTransport\";\n\nexport interface BlobBytesResponse {\n readonly blobId: string;\n readonly byteLength: number;\n readonly encryptedBytes: ReadableStream<Uint8Array>;\n readonly sha256: string;\n}\n\nexport interface UploadMultipartBlobPartBytesRequest {\n readonly byteLength: number;\n readonly encryptedBytes: Blob | BufferSource;\n readonly sha256: string;\n readonly uploadId: string;\n}\n\nexport async function getBlobBytes(\n transport: BinaryResponseOperationTransport,\n blobId: string,\n): Promise<BlobBytesResponse | null> {\n const result = await transport.requestBinaryResponse(getBlobBytesOperation, {\n params: { blobId },\n });\n if (!result) {\n return null;\n }\n\n const { headers, response } = result;\n const byteLength = Number(headers[blobWireHeaderKeys.blobByteLength]);\n\n // On the browser / WKWebView-fetch path the body is streamed, so\n // `response.body` is a live ReadableStream. Under a native HTTP bridge\n // (CapacitorHttp — which the Capacitor iOS/Android builds enable so cross-origin\n // API requests reach the backend at all; the WKWebView's own fetch fails from\n // the app's https://localhost origin) the response is buffered natively and\n // `response.body` is null even for a valid 200. So take the bytes either way:\n // the stream when present, otherwise buffer the response and re-wrap it as a\n // one-shot ReadableStream so callers keep a single streaming interface. This\n // does not weaken validation — a truncated or corrupted body is still caught\n // downstream by the X-Tearleads-Blob-Sha256 integrity check; it only stops a\n // buffered-but-valid response from being rejected here as malformed.\n const encryptedBytes =\n response.body ?? bufferedResponseBodyStream(await response.arrayBuffer());\n\n return {\n blobId: headers[blobWireHeaderKeys.blobId],\n byteLength,\n encryptedBytes,\n sha256: headers[blobWireHeaderKeys.blobSha256],\n };\n}\n\n// Wraps a fully-buffered response body as a single-chunk ReadableStream, so a\n// native HTTP bridge that only exposes the buffered bytes (no WHATWG\n// `response.body` stream) can still satisfy the streaming\n// `BlobBytesResponse.encryptedBytes` contract. An empty buffer yields an\n// immediately-closed, zero-chunk stream.\nfunction bufferedResponseBodyStream(\n buffer: ArrayBuffer,\n): ReadableStream<Uint8Array> {\n const bytes = new Uint8Array(buffer);\n return new ReadableStream<Uint8Array>({\n start(controller) {\n if (bytes.byteLength > 0) {\n controller.enqueue(bytes);\n }\n controller.close();\n },\n });\n}\n"]}
1
+ {"version":3,"file":"get.js","sourceRoot":"","sources":["get.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,qBAAqB,EACrB,wBAAwB,GACzB,MAAM,iCAAiC,CAAC;AAyBzC,MAAM,CAAC,KAAK,UAAU,YAAY,CAChC,SAAgC,EAChC,MAAc,EACd,gBAA+B,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,IAAI,CAAC;IAE9D,wEAAwE;IACxE,4EAA4E;IAC5E,KAAK,IAAI,OAAO,GAAG,CAAC,EAAE,OAAO,GAAG,CAAC,EAAE,OAAO,IAAI,CAAC,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,MAAM,SAAS,CAAC,aAAa,CAC1C,wBAAwB,EACxB,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,EAAE,EACtB,EAAE,YAAY,EAAE,KAAK,EAAE,CACxB,CAAC;QACF,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;YACf,IAAI,MAAM,CAAC,IAAI,KAAK,MAAM,IAAI,MAAM,CAAC,MAAM,KAAK,GAAG,EAAE,CAAC;gBACpD,OAAO,aAAa,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;YAC1C,CAAC;YACD,MAAM,CAAC,MAAM,EAAE,CAAC;YAChB,OAAO,IAAI,CAAC;QACd,CAAC;QACD,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC;QAC/B,IAAI,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eaderKeys,\n getBlobBytesOperation,\n getBlobDownloadOperation,\n} from \"@tearleads/validators/operation\";\nimport type { BinaryResponseOperationTransport } from \"../../binaryResponseOperationTransport\";\nimport type { JsonOperationTransport } from \"../../operationTransport\";\nimport type { OperationResponseRequestFn } from \"../../types\";\n\nexport interface BlobBytesResponse {\n readonly blobId: string;\n readonly byteLength: number;\n readonly encryptedBytes: ReadableStream<Uint8Array>;\n readonly sha256: string;\n}\n\nexport interface UploadMultipartBlobPartBytesRequest {\n readonly byteLength: number;\n readonly encryptedBytes: Blob | BufferSource;\n readonly sha256: string;\n readonly uploadId: string;\n}\n\ntype BlobDownloadTransport = Pick<JsonOperationTransport, \"requestResult\"> &\n Pick<BinaryResponseOperationTransport, \"requestBinaryResponse\"> &\n Pick<OperationResponseRequestFn, \"reportFailure\">;\n\ntype DownloadFetch = (url: string, init: RequestInit) => Promise<Response>;\n\nexport async function getBlobBytes(\n transport: BlobDownloadTransport,\n blobId: string,\n downloadFetch: DownloadFetch = (url, init) => fetch(url, init),\n): Promise<BlobBytesResponse | null> {\n // Refresh at most once. R2 expiration errors can appear as CORS/network\n // failures in browsers, so both rejected fetches and 403s need a fresh URL.\n for (let attempt = 0; attempt < 2; attempt += 1) {\n const result = await transport.requestResult(\n getBlobDownloadOperation,\n { params: { blobId } },\n { reportErrors: false },\n );\n if (!result.ok) {\n if (result.kind === \"http\" && result.status === 404) {\n return getBlobStream(transport, blobId);\n }\n result.report();\n return null;\n }\n const descriptor = result.data;\n if (descriptor.blobId !== blobId) {\n transport.reportFailure({\n kind: \"shape\",\n method: \"GET\",\n path: `/blobs/${blobId}/download`,\n status: 200,\n statusText: \"\",\n message: `Blob ${blobId} download descriptor has the wrong identity`,\n });\n return null;\n }\n if (descriptor.source.kind === \"api\") {\n return getBlobStream(transport, blobId);\n }\n try {\n // Never send the application's session or cookies to the object store.\n // Reject redirects and keep bearer URLs out of referrers and errors.\n const response = await downloadFetch(descriptor.source.url, {\n cache: \"no-store\",\n credentials: \"omit\",\n redirect: \"error\",\n referrerPolicy: \"no-referrer\",\n });\n if (response.status !== 200) {\n await response.body?.cancel().catch(() => {});\n if (response.status === 403) {\n continue;\n }\n break;\n }\n return {\n blobId: descriptor.blobId,\n byteLength: descriptor.byteLength,\n sha256: descriptor.sha256,\n encryptedBytes: response.body\n ? signedDownloadBodyStream(response.body)\n : bufferedResponseBodyStream(await response.arrayBuffer()),\n };\n } catch {\n // The downstream SDK still verifies length, hash and authenticated\n // encryption. An error after streaming begins propagates to that reader.\n }\n }\n // Preserve downloads when storage is unreachable or a native HTTP bridge\n // cannot use the signed URL. This endpoint checks current access again.\n // A storage failure alone must not signal that the API is offline.\n return getBlobStream(transport, blobId);\n}\n\nfunction signedDownloadBodyStream(\n stream: ReadableStream<Uint8Array>,\n): ReadableStream<Uint8Array> {\n const reader = stream.getReader();\n // Native network errors may contain the bearer URL. Keep failures generic\n // before downstream readers log them, without buffering or eager reads.\n return new ReadableStream<Uint8Array>(\n {\n async pull(controller) {\n try {\n const { done, value } = await reader.read();\n if (done) {\n controller.close();\n reader.releaseLock();\n } else {\n controller.enqueue(value);\n }\n } catch {\n controller.error(new Error(\"Blob download interrupted\"));\n reader.releaseLock();\n }\n },\n async cancel(reason) {\n try {\n await reader.cancel(reason);\n } catch {\n throw new Error(\"Blob download cancellation failed\");\n } finally {\n reader.releaseLock();\n }\n },\n },\n { highWaterMark: 0 },\n );\n}\n\nasync function getBlobStream(\n transport: Pick<BinaryResponseOperationTransport, \"requestBinaryResponse\">,\n blobId: string,\n): Promise<BlobBytesResponse | null> {\n const result = await transport.requestBinaryResponse(getBlobBytesOperation, {\n params: { blobId },\n });\n if (!result) {\n return null;\n }\n\n const { headers, response } = result;\n const byteLength = Number(headers[blobWireHeaderKeys.blobByteLength]);\n\n // On the browser / WKWebView-fetch path the body is streamed, so\n // `response.body` is a live ReadableStream. Under a native HTTP bridge\n // (CapacitorHttp — which the Capacitor iOS/Android builds enable so cross-origin\n // API requests reach the backend at all; the WKWebView's own fetch fails from\n // the app's https://localhost origin) the response is buffered natively and\n // `response.body` is null even for a valid 200. So take the bytes either way:\n // the stream when present, otherwise buffer the response and re-wrap it as a\n // one-shot ReadableStream so callers keep a single streaming interface. This\n // does not weaken validation — a truncated or corrupted body is still caught\n // downstream by the X-Tearleads-Blob-Sha256 integrity check; it only stops a\n // buffered-but-valid response from being rejected here as malformed.\n const encryptedBytes =\n response.body ?? bufferedResponseBodyStream(await response.arrayBuffer());\n\n return {\n blobId: headers[blobWireHeaderKeys.blobId],\n byteLength,\n encryptedBytes,\n sha256: headers[blobWireHeaderKeys.blobSha256],\n };\n}\n\n// Wraps a fully-buffered response body as a single-chunk ReadableStream, so a\n// native HTTP bridge that only exposes the buffered bytes (no WHATWG\n// `response.body` stream) can still satisfy the streaming\n// `BlobBytesResponse.encryptedBytes` contract. An empty buffer yields an\n// immediately-closed, zero-chunk stream.\nfunction bufferedResponseBodyStream(\n buffer: ArrayBuffer,\n): ReadableStream<Uint8Array> {\n const bytes = new Uint8Array(buffer);\n return new ReadableStream<Uint8Array>({\n start(controller) {\n if (bytes.byteLength > 0) {\n controller.enqueue(bytes);\n }\n controller.close();\n },\n });\n}\n"]}
@@ -0,0 +1,163 @@
1
+ import { z } from "zod";
2
+ import { ErrorResponseSchema } from "../response/index.js";
3
+ export declare const BlobDownloadResponseSchema: z.ZodObject<{
4
+ blobId: z.ZodString;
5
+ byteLength: z.ZodCustom<number, number>;
6
+ sha256: z.ZodCustom<string, string>;
7
+ source: z.ZodDiscriminatedUnion<[z.ZodObject<{
8
+ kind: z.ZodLiteral<"api">;
9
+ }, z.core.$strict>, z.ZodObject<{
10
+ kind: z.ZodLiteral<"signed-url">;
11
+ url: z.ZodCustom<string, string>;
12
+ expiresAt: z.ZodCustom<string, string>;
13
+ }, z.core.$strict>], "kind">;
14
+ }, z.core.$strict>;
15
+ export type BlobDownloadResponse = z.infer<typeof BlobDownloadResponseSchema>;
16
+ export declare const getBlobDownloadOperation: Omit<{
17
+ readonly auth: "session";
18
+ readonly failureResponses: {
19
+ readonly 400: z.ZodType<{
20
+ error: string;
21
+ }, {
22
+ error: string;
23
+ }, z.core.$ZodTypeInternals<{
24
+ error: string;
25
+ }, {
26
+ error: string;
27
+ }>>;
28
+ readonly 401: z.ZodType<{
29
+ error: string;
30
+ code?: "session_refresh_required" | undefined;
31
+ }, {
32
+ error: string;
33
+ code?: "session_refresh_required" | undefined;
34
+ }, z.core.$ZodTypeInternals<{
35
+ error: string;
36
+ code?: "session_refresh_required" | undefined;
37
+ }, {
38
+ error: string;
39
+ code?: "session_refresh_required" | undefined;
40
+ }>>;
41
+ readonly 403: z.ZodType<{
42
+ error: string;
43
+ }, {
44
+ error: string;
45
+ }, z.core.$ZodTypeInternals<{
46
+ error: string;
47
+ }, {
48
+ error: string;
49
+ }>>;
50
+ readonly 404: z.ZodType<{
51
+ error: string;
52
+ }, {
53
+ error: string;
54
+ }, z.core.$ZodTypeInternals<{
55
+ error: string;
56
+ }, {
57
+ error: string;
58
+ }>>;
59
+ readonly 409: z.ZodType<{
60
+ error: string;
61
+ }, {
62
+ error: string;
63
+ }, z.core.$ZodTypeInternals<{
64
+ error: string;
65
+ }, {
66
+ error: string;
67
+ }>>;
68
+ readonly 500: z.ZodType<{
69
+ error: string;
70
+ }, {
71
+ error: string;
72
+ }, z.core.$ZodTypeInternals<{
73
+ error: string;
74
+ }, {
75
+ error: string;
76
+ }>>;
77
+ };
78
+ readonly failureStatuses: readonly [400, 401, 403, 404, 409, 500];
79
+ readonly id: "blobs.download.get";
80
+ readonly method: "GET";
81
+ readonly params: z.ZodObject<{
82
+ blobId: z.ZodString;
83
+ }, z.core.$strict>;
84
+ readonly path: "/blobs/{blobId}/download";
85
+ readonly responses: {
86
+ readonly 200: z.ZodObject<{
87
+ blobId: z.ZodString;
88
+ byteLength: z.ZodCustom<number, number>;
89
+ sha256: z.ZodCustom<string, string>;
90
+ source: z.ZodDiscriminatedUnion<[z.ZodObject<{
91
+ kind: z.ZodLiteral<"api">;
92
+ }, z.core.$strict>, z.ZodObject<{
93
+ kind: z.ZodLiteral<"signed-url">;
94
+ url: z.ZodCustom<string, string>;
95
+ expiresAt: z.ZodCustom<string, string>;
96
+ }, z.core.$strict>], "kind">;
97
+ }, z.core.$strict>;
98
+ };
99
+ }, "failureResponses" | "failureStatuses"> & {
100
+ readonly failureResponses: {
101
+ readonly 400: z.ZodType<{
102
+ error: string;
103
+ }, {
104
+ error: string;
105
+ }, z.core.$ZodTypeInternals<{
106
+ error: string;
107
+ }, {
108
+ error: string;
109
+ }>>;
110
+ readonly 401: z.ZodType<{
111
+ error: string;
112
+ code?: "session_refresh_required" | undefined;
113
+ }, {
114
+ error: string;
115
+ code?: "session_refresh_required" | undefined;
116
+ }, z.core.$ZodTypeInternals<{
117
+ error: string;
118
+ code?: "session_refresh_required" | undefined;
119
+ }, {
120
+ error: string;
121
+ code?: "session_refresh_required" | undefined;
122
+ }>>;
123
+ readonly 403: z.ZodType<{
124
+ error: string;
125
+ }, {
126
+ error: string;
127
+ }, z.core.$ZodTypeInternals<{
128
+ error: string;
129
+ }, {
130
+ error: string;
131
+ }>>;
132
+ readonly 404: z.ZodType<{
133
+ error: string;
134
+ }, {
135
+ error: string;
136
+ }, z.core.$ZodTypeInternals<{
137
+ error: string;
138
+ }, {
139
+ error: string;
140
+ }>>;
141
+ readonly 409: z.ZodType<{
142
+ error: string;
143
+ }, {
144
+ error: string;
145
+ }, z.core.$ZodTypeInternals<{
146
+ error: string;
147
+ }, {
148
+ error: string;
149
+ }>>;
150
+ readonly 500: z.ZodType<{
151
+ error: string;
152
+ }, {
153
+ error: string;
154
+ }, z.core.$ZodTypeInternals<{
155
+ error: string;
156
+ }, {
157
+ error: string;
158
+ }>>;
159
+ } & {
160
+ readonly 503: typeof ErrorResponseSchema;
161
+ };
162
+ readonly failureStatuses: readonly [400, 401, 403, 404, 409, 500] | readonly [400, 401, 403, 404, 409, 500, 503];
163
+ };
@@ -0,0 +1,43 @@
1
+ import { z } from "zod";
2
+ import { registerJsonSchemaFragment } from "../jsonSchema.js";
3
+ import { ErrorResponseSchema, SessionFailureResponseSchema } from "../response/index.js";
4
+ import { safeNonNegativeIntegerSchema, sha256HexStringSchema, uuidStringSchema, } from "../schema.js";
5
+ import { BlobBytesPathParamsSchema } from "./blobBytes.js";
6
+ import { defineJsonOperation } from "./definition.js";
7
+ const downloadUrlSchema = z.url().regex(/^https?:\/\//u);
8
+ const downloadExpirySchema = z.iso.datetime();
9
+ function stringSchemaFragment(schema) {
10
+ const { $schema: _dialect, ...fragment } = z.toJSONSchema(schema);
11
+ return registerJsonSchemaFragment(z.custom((value) => schema.safeParse(value).success), fragment);
12
+ }
13
+ export const BlobDownloadResponseSchema = z.strictObject({
14
+ blobId: uuidStringSchema,
15
+ byteLength: safeNonNegativeIntegerSchema,
16
+ sha256: sha256HexStringSchema,
17
+ source: z.discriminatedUnion("kind", [
18
+ z.strictObject({ kind: z.literal("api") }),
19
+ z.strictObject({
20
+ kind: z.literal("signed-url"),
21
+ url: stringSchemaFragment(downloadUrlSchema),
22
+ expiresAt: stringSchemaFragment(downloadExpirySchema),
23
+ }),
24
+ ]),
25
+ });
26
+ export const getBlobDownloadOperation = defineJsonOperation({
27
+ auth: "session",
28
+ failureResponses: {
29
+ 400: ErrorResponseSchema,
30
+ 401: SessionFailureResponseSchema,
31
+ 403: ErrorResponseSchema,
32
+ 404: ErrorResponseSchema,
33
+ 409: ErrorResponseSchema,
34
+ 500: ErrorResponseSchema,
35
+ },
36
+ failureStatuses: [400, 401, 403, 404, 409, 500],
37
+ id: "blobs.download.get",
38
+ method: "GET",
39
+ params: BlobBytesPathParamsSchema,
40
+ path: "/blobs/{blobId}/download",
41
+ responses: { 200: BlobDownloadResponseSchema },
42
+ });
43
+ //# sourceMappingURL=blobDownloads.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"blobDownloads.js","sourceRoot":"","sources":["blobDownloads.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,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EAAE,oBAAoB,CAAC,oBAAoB,CAAC;SACtD,CAAC;KACH,CAAC;CACH,CAAC,CAAC;AAIH,MAAM,CAAC,MAAM,wBAAwB,GAAG,mBAAmB,CAAC;IAC1D,IAAI,EAAE,SAAS;IACf,gBAAgB,EAAE;QAChB,GAAG,EAAE,mBAAmB;QACxB,GAAG,EAAE,4BAA4B;QACjC,GAAG,EAAE,mBAAmB;QACxB,GAAG,EAAE,mBAAmB;QACxB,GAAG,EAAE,mBAAmB;QACxB,GAAG,EAAE,mBAAmB;KACzB;IACD,eAAe,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC;IAC/C,EAAE,EAAE,oBAAoB;IACxB,MAAM,EAAE,KAAK;IACb,MAAM,EAAE,yBAAyB;IACjC,IAAI,EAAE,0BAA0B;IAChC,SAAS,EAAE,EAAE,GAAG,EAAE,0BAA0B,EAAE;CAC/C,CAAC,CAAC","sourcesContent":["import { z } from \"zod\";\nimport { registerJsonSchemaFragment } from \"../jsonSchema\";\nimport { ErrorResponseSchema, SessionFailureResponseSchema } from \"../response\";\nimport {\n safeNonNegativeIntegerSchema,\n sha256HexStringSchema,\n uuidStringSchema,\n} from \"../schema\";\nimport { BlobBytesPathParamsSchema } from \"./blobBytes\";\nimport { defineJsonOperation } from \"./definition\";\n\nconst downloadUrlSchema = z.url().regex(/^https?:\\/\\//u);\nconst downloadExpirySchema = z.iso.datetime();\n\nfunction stringSchemaFragment(schema: z.ZodType<string>) {\n const { $schema: _dialect, ...fragment } = z.toJSONSchema(schema);\n return registerJsonSchemaFragment(\n z.custom<string>((value) => schema.safeParse(value).success),\n fragment,\n );\n}\n\nexport const BlobDownloadResponseSchema = z.strictObject({\n blobId: uuidStringSchema,\n byteLength: safeNonNegativeIntegerSchema,\n sha256: sha256HexStringSchema,\n source: z.discriminatedUnion(\"kind\", [\n z.strictObject({ kind: z.literal(\"api\") }),\n z.strictObject({\n kind: z.literal(\"signed-url\"),\n url: stringSchemaFragment(downloadUrlSchema),\n expiresAt: stringSchemaFragment(downloadExpirySchema),\n }),\n ]),\n});\n\nexport type BlobDownloadResponse = z.infer<typeof BlobDownloadResponseSchema>;\n\nexport const getBlobDownloadOperation = defineJsonOperation({\n auth: \"session\",\n failureResponses: {\n 400: ErrorResponseSchema,\n 401: SessionFailureResponseSchema,\n 403: ErrorResponseSchema,\n 404: ErrorResponseSchema,\n 409: ErrorResponseSchema,\n 500: ErrorResponseSchema,\n },\n failureStatuses: [400, 401, 403, 404, 409, 500],\n id: \"blobs.download.get\",\n method: \"GET\",\n params: BlobBytesPathParamsSchema,\n path: \"/blobs/{blobId}/download\",\n responses: { 200: BlobDownloadResponseSchema },\n});\n"]}
@@ -3,6 +3,7 @@ export { type BlobAttachmentBindingPathParams, BlobAttachmentBindingPathParamsSc
3
3
  export { challengeOperation, destroySessionOperation, isChallengeOperationRequest, isChallengeOperationResponse, isDestroySessionOperationResponse, isListSessionsOperationResponse, isLogoutOperationResponse, isRegistrationOperationRequest, isRegistrationOperationResponse, isUserIdentityOperationResponse, isVerifyOperationRequest, isVerifyOperationResponse, isWebSocketTicketOperationResponse, listSessionsOperation, logoutOperation, registerOperation, userIdentityOperation, verifyOperation, webSocketTicketOperation, } from "./auth.js";
4
4
  export { billingWebhookWireHeaderKeys, billingWebhookWireHeaderNames, isReceiveRevenueCatWebhookOperationRequest, isReceiveRevenueCatWebhookOperationResponse, isReceiveStripeWebhookOperationRequest, isReceiveStripeWebhookOperationResponse, type RevenueCatWebhookHeaders, RevenueCatWebhookHeadersSchema, receiveRevenueCatWebhookOperation, receiveStripeWebhookOperation, type StripeWebhookHeaders, StripeWebhookHeadersSchema, } from "./billingWebhooks.js";
5
5
  export { BinaryBodySchema, type BlobBytesPathParams, BlobBytesPathParamsSchema, type BlobBytesResponseHeaders, BlobBytesResponseHeadersSchema, blobWireHeaderKeys, blobWireHeaderNames, getBlobBytesOperation, isUploadMultipartBlobPartBytesOperationResponse, type MultipartBlobPartHeaders, MultipartBlobPartHeadersSchema, type MultipartBlobPartPathParams, MultipartBlobPartPathParamsSchema, uploadMultipartBlobPartBytesOperation, } from "./blobBytes.js";
6
+ export { type BlobDownloadResponse, BlobDownloadResponseSchema, getBlobDownloadOperation, } from "./blobDownloads.js";
6
7
  export { type ContainerMutationPathParams, ContainerMutationPathParamsSchema, createContainerOperation, createContainerWithMetadataDocumentOperation, deleteContainerOperation, isContainerMutationOperationRequest, isContainerMutationOperationResponse, isContainerRotationOperationRequest, isContainerRotationOperationResponse, isCreateContainerWithMetadataDocumentOperationRequest, isCreateContainerWithMetadataDocumentOperationResponse, isDeleteContainerOperationResponse, moveContainerOperation, reciteContainerOperation, rekeyContainerOperation, revokeContainerOperation, shareContainerOperation, } from "./containerMutations.js";
7
8
  export { type ContainerKekLogQuery, ContainerKekLogQuerySchema, type ContainerReadPathParams, ContainerReadPathParamsSchema, getContainerKekLogOperation, isGetContainerKekLogOperationResponse, isListContainerDocumentsOperationResponse, isListContainerParentLanesOperationRequest, isListContainerParentLanesOperationResponse, type ListContainerDocumentsQuery, ListContainerDocumentsQuerySchema, listContainerDocumentsOperation, listContainerParentLanesOperation, } from "./containerReads.js";
8
9
  export { type ContainerReplacementAuthorizationsResponse, ContainerReplacementAuthorizationsResponseSchema, getContainerReplacementAuthorizationsOperation, } from "./containerReplacement.js";
@@ -3,6 +3,7 @@ export { BlobAttachmentBindingPathParamsSchema, BlobAttachmentPathParamsSchema,
3
3
  export { challengeOperation, destroySessionOperation, isChallengeOperationRequest, isChallengeOperationResponse, isDestroySessionOperationResponse, isListSessionsOperationResponse, isLogoutOperationResponse, isRegistrationOperationRequest, isRegistrationOperationResponse, isUserIdentityOperationResponse, isVerifyOperationRequest, isVerifyOperationResponse, isWebSocketTicketOperationResponse, listSessionsOperation, logoutOperation, registerOperation, userIdentityOperation, verifyOperation, webSocketTicketOperation, } from "./auth.js";
4
4
  export { billingWebhookWireHeaderKeys, billingWebhookWireHeaderNames, isReceiveRevenueCatWebhookOperationRequest, isReceiveRevenueCatWebhookOperationResponse, isReceiveStripeWebhookOperationRequest, isReceiveStripeWebhookOperationResponse, RevenueCatWebhookHeadersSchema, receiveRevenueCatWebhookOperation, receiveStripeWebhookOperation, StripeWebhookHeadersSchema, } from "./billingWebhooks.js";
5
5
  export { BinaryBodySchema, BlobBytesPathParamsSchema, BlobBytesResponseHeadersSchema, blobWireHeaderKeys, blobWireHeaderNames, getBlobBytesOperation, isUploadMultipartBlobPartBytesOperationResponse, MultipartBlobPartHeadersSchema, MultipartBlobPartPathParamsSchema, uploadMultipartBlobPartBytesOperation, } from "./blobBytes.js";
6
+ export { BlobDownloadResponseSchema, getBlobDownloadOperation, } from "./blobDownloads.js";
6
7
  export { ContainerMutationPathParamsSchema, createContainerOperation, createContainerWithMetadataDocumentOperation, deleteContainerOperation, isContainerMutationOperationRequest, isContainerMutationOperationResponse, isContainerRotationOperationRequest, isContainerRotationOperationResponse, isCreateContainerWithMetadataDocumentOperationRequest, isCreateContainerWithMetadataDocumentOperationResponse, isDeleteContainerOperationResponse, moveContainerOperation, reciteContainerOperation, rekeyContainerOperation, revokeContainerOperation, shareContainerOperation, } from "./containerMutations.js";
7
8
  export { ContainerKekLogQuerySchema, ContainerReadPathParamsSchema, getContainerKekLogOperation, isGetContainerKekLogOperationResponse, isListContainerDocumentsOperationResponse, isListContainerParentLanesOperationRequest, isListContainerParentLanesOperationResponse, ListContainerDocumentsQuerySchema, listContainerDocumentsOperation, listContainerParentLanesOperation, } from "./containerReads.js";
8
9
  export { ContainerReplacementAuthorizationsResponseSchema, getContainerReplacementAuthorizationsOperation, } from "./containerReplacement.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACrE,OAAO,EAEL,qCAAqC,EAErC,8BAA8B,EAC9B,2BAA2B,EAE3B,mCAAmC,E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pC,2BAA2B,EAC3B,iCAAiC,EACjC,2CAA2C,EAC3C,uCAAuC,EACvC,6CAA6C,EAC7C,8CAA8C,EAC9C,oCAAoC,EACpC,qCAAqC,EACrC,2CAA2C,EAE3C,8BAA8B,GAC/B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAEL,yCAAyC,EAEzC,wCAAwC,EACxC,qCAAqC,EACrC,oCAAoC,EACpC,+CAA+C,EAC/C,8CAA8C,GAC/C,MAAM,qBAAqB,CAAC","sourcesContent":["export { apiVersionHeaderName, parseApiVersion } from \"./apiVersion\";\nexport {\n type BlobAttachmentBindingPathParams,\n BlobAttachmentBindingPathParamsSchema,\n type BlobAttachmentPathParams,\n BlobAttachmentPathParamsSchema,\n bindBlobAttachmentOperation,\n type DocumentAttachmentsPathParams,\n DocumentAttachmentsPathParamsSchema,\n detachBlobAttachmentOperation,\n isBindBlobAttachmentOperationRequest,\n isBindBlobAttachmentOperationResponse,\n isDetachBlobAttachmentOperationRequest,\n isDetachBlobAttachmentOperationResponse,\n isListDocumentAttachmentsOperationResponse,\n listDocumentAttachmentsOperation,\n} from \"./attachments\";\nexport {\n challengeOperation,\n destroySessionOperation,\n isChallengeOperationRequest,\n isChallengeOperationResponse,\n isDestroySessionOperationResponse,\n isListSessionsOperationResponse,\n isLogoutOperationResponse,\n isRegistrationOperationRequest,\n isRegistrationOperationResponse,\n isUserIdentityOperationResponse,\n isVerifyOperationRequest,\n isVerifyOperationResponse,\n isWebSocketTicketOperationResponse,\n listSessionsOperation,\n logoutOperation,\n registerOperation,\n userIdentityOperation,\n verifyOperation,\n webSocketTicketOperation,\n} from \"./auth\";\nexport {\n billingWebhookWireHeaderKeys,\n billingWebhookWireHeaderNames,\n isReceiveRevenueCatWebhookOperationRequest,\n isReceiveRevenueCatWebhookOperationResponse,\n isReceiveStripeWebhookOperationRequest,\n isReceiveStripeWebhookOperationResponse,\n type RevenueCatWebhookHeaders,\n RevenueCatWebhookHeadersSchema,\n receiveRevenueCatWebhookOperation,\n receiveStripeWebhookOperation,\n type StripeWebhookHeaders,\n StripeWebhookHeadersSchema,\n} from \"./billingWebhooks\";\nexport {\n BinaryBodySchema,\n type BlobBytesPathParams,\n BlobBytesPathParamsSchema,\n type BlobBytesResponseHeaders,\n BlobBytesResponseHeadersSchema,\n blobWireHeaderKeys,\n blobWireHeaderNames,\n getBlobBytesOperation,\n isUploadMultipartBlobPartBytesOperationResponse,\n type MultipartBlobPartHeaders,\n MultipartBlobPartHeadersSchema,\n type MultipartBlobPartPathParams,\n MultipartBlobPartPathParamsSchema,\n uploadMultipartBlobPartBytesOperation,\n} from \"./blobBytes\";\nexport {\n type ContainerMutationPathParams,\n ContainerMutationPathParamsSchema,\n createContainerOperation,\n createContainerWithMetadataDocumentOperation,\n deleteContainerOperation,\n isContainerMutationOperationRequest,\n isContainerMutationOperationResponse,\n isContainerRotationOperationRequest,\n isContainerRotationOperationResponse,\n isCreateContainerWithMetadataDocumentOperationRequest,\n isCreateContainerWithMetadataDocumentOperationResponse,\n isDeleteContainerOperationResponse,\n moveContainerOperation,\n reciteContainerOperation,\n rekeyContainerOperation,\n revokeContainerOperation,\n shareContainerOperation,\n} from \"./containerMutations\";\nexport {\n type ContainerKekLogQuery,\n ContainerKekLogQuerySchema,\n type ContainerReadPathParams,\n ContainerReadPathParamsSchema,\n getContainerKekLogOperation,\n isGetContainerKekLogOperationResponse,\n isListContainerDocumentsOperationResponse,\n isListContainerParentLanesOperationRequest,\n isListContainerParentLanesOperationResponse,\n type ListContainerDocumentsQuery,\n ListContainerDocumentsQuerySchema,\n listContainerDocumentsOperation,\n listContainerParentLanesOperation,\n} from \"./containerReads\";\nexport {\n type ContainerReplacementAuthorizationsResponse,\n ContainerReplacementAuthorizationsResponseSchema,\n getContainerReplacementAuthorizationsOperation,\n} from \"./containerReplacement\";\nexport {\n defineHttpOperation,\n defineJsonOperation,\n type HttpOperation,\n type HttpOperationMediaType,\n type HttpOperationMethod,\n type JsonOperation,\n type JsonOperationMethod,\n type OperationSchemaInput,\n type OperationSchemaOutput,\n operationRequestPath,\n operationRequestPathForInput,\n operationRequestPathWithQuery,\n operationRoutePath,\n type RuntimeRefinement,\n} from \"./definition\";\nexport {\n type DocumentAttributionPathParams,\n DocumentAttributionPathParamsSchema,\n type DocumentAttributionRangesQuery,\n DocumentAttributionRangesQuerySchema,\n type DocumentAttributionRequestHeaders,\n DocumentAttributionRequestHeadersSchema,\n documentAttributionWireHeaderKeys,\n documentAttributionWireHeaderNames,\n getDocumentAttributionOperation,\n isGetDocumentAttributionOperationResponse,\n isListDocumentAttributionRangesOperationResponse,\n listDocumentAttributionRangesOperation,\n} from \"./documentAttribution\";\nexport {\n createDocumentOperation,\n type DocumentMutationPathParams,\n DocumentMutationPathParamsSchema,\n type DocumentPurgeProofQuery,\n DocumentPurgeProofQuerySchema,\n getDocumentPurgeProofOperation,\n isCreateDocumentOperationRequest,\n isCreateDocumentOperationResponse,\n isDocumentLinkSetMutationOperationRequest,\n isDocumentLinkSetMutationOperationResponse,\n isGetDocumentPurgeProofOperationResponse,\n isPurgeDocumentOperationRequest,\n isPurgeDocumentOperationResponse,\n linkDocumentOperation,\n purgeDocumentOperation,\n unlinkDocumentOperation,\n} from \"./documentMutations\";\nexport {\n type DocumentSyncPathParams,\n DocumentSyncPathParamsSchema,\n documentSyncOperation,\n isDocumentSyncOperationRequest,\n isDocumentSyncOperationResponse,\n} from \"./documentSync\";\nexport {\n operationRequestHeaderNames,\n operationResponseHeaderNames,\n} from \"./headerNames\";\nexport {\n getHealthOperation,\n isGetHealthOperationResponse,\n} from \"./health\";\nexport {\n completeMultipartBlobStageOperation,\n getMultipartBlobStageOperation,\n initiateMultipartBlobStageOperation,\n isCompleteMultipartBlobStageOperationRequest,\n isCompleteMultipartBlobStageOperationResponse,\n isGetMultipartBlobStageOperationResponse,\n isInitiateMultipartBlobStageOperationRequest,\n isInitiateMultipartBlobStageOperationResponse,\n type MultipartBlobStagePathParams,\n MultipartBlobStagePathParamsSchema,\n} from \"./multipartBlobs\";\nexport {\n claimNativeOrganizationSubscriptionOperation,\n getOrganizationBillingHistoryOperation,\n getOrganizationBillingManagementUrlOperation,\n getOrganizationBillingOperation,\n getOrganizationNativePurchaseEligibilityOperation,\n isClaimNativeOrganizationSubscriptionOperationResponse,\n isGetOrganizationBillingHistoryOperationResponse,\n isGetOrganizationBillingManagementUrlOperationResponse,\n isGetOrganizationBillingOperationResponse,\n isGetOrganizationNativePurchaseEligibilityOperationResponse,\n isStartOrganizationTrialOperationResponse,\n type OrganizationBillingNativeClaimPathParams,\n OrganizationBillingNativeClaimPathParamsSchema,\n type OrganizationBillingNativeEligibilityQuery,\n OrganizationBillingNativeEligibilityQuerySchema,\n type OrganizationBillingPathParams,\n OrganizationBillingPathParamsSchema,\n startOrganizationTrialOperation,\n} from \"./organizationBilling\";\nexport { getOrganizationPolicyHistoryOperation } from \"./organizationPolicyHistory\";\nexport {\n createOrganizationGroupOperation,\n createOrganizationOperation,\n deleteOrganizationGroupOperation,\n getOrganizationDataUsageOperation,\n getOrganizationReadModelOperation,\n isCreateOrganizationGroupOperationRequest,\n isCreateOrganizationGroupOperationResponse,\n isCreateOrganizationOperationRequest,\n isCreateOrganizationOperationResponse,\n isDeleteOrganizationGroupOperationResponse,\n isGetOrganizationDataUsageOperationResponse,\n isGetOrganizationReadModelOperationResponse,\n isListOrganizationGroupMembersOperationResponse,\n isUpdateOrganizationProfileOperationRequest,\n isUpdateOrganizationProfileOperationResponse,\n isUpdateOrganizationRosterEntryOperationRequest,\n isUpdateOrganizationRosterEntryOperationResponse,\n listOrganizationGroupMembersOperation,\n type OrganizationGroupPathParams,\n OrganizationGroupPathParamsSchema,\n type OrganizationPathParams,\n OrganizationPathParamsSchema,\n type OrganizationRosterPathParams,\n OrganizationRosterPathParamsSchema,\n updateOrganizationProfileOperation,\n updateOrganizationRosterEntryOperation,\n} from \"./organizations\";\nexport {\n type PrincipalPolicyPageQuery,\n PrincipalPolicyPageQuerySchema,\n} from \"./principalPolicyPageQuery\";\nexport {\n commitOrganizationGroupPolicyOperation,\n getPrincipalPolicyOperation,\n isCommitOrganizationGroupPolicyOperationRequest,\n isCommitOrganizationGroupPolicyOperationResponse,\n isGetPrincipalPolicyOperationResponse,\n isPutPrincipalPolicyOperationRequest,\n isPutPrincipalPolicyOperationResponse,\n type OrganizationGroupPolicyPathParams,\n OrganizationGroupPolicyPathParamsSchema,\n type PrincipalPolicyPathParams,\n PrincipalPolicyPathParamsSchema,\n putPrincipalPolicyOperation,\n} from \"./principals\";\nexport {\n getProjectionPolicyHistoryOperation,\n type ProjectionPolicyHistoryQuery,\n ProjectionPolicyHistoryQuerySchema,\n} from \"./projectionPolicyHistory\";\nexport { protocolOperations } from \"./registry\";\nexport {\n getRootIdentityOperation,\n isGetRootIdentityOperationResponse,\n isListRootIdentitiesOperationResponse,\n isListRootIdentityOrganizationsOperationResponse,\n listRootIdentitiesOperation,\n listRootIdentityOrganizationsOperation,\n MAX_ROOT_IDENTITY_PAGE_SIZE,\n type RootIdentitiesQuery,\n RootIdentitiesQuerySchema,\n type RootIdentityPathParams,\n RootIdentityPathParamsSchema,\n} from \"./root\";\nexport {\n getRootOrganizationDataUsageOperation,\n getRootOrganizationOperation,\n listRootDataUsageReportOperation,\n listRootOrganizationIdentitiesOperation,\n listRootOrganizationsOperation,\n type RootOrganizationPageQuery,\n type RootOrganizationsQuery,\n} from \"./rootOrganizations\";\nexport {\n cancelStripeSubscriptionOperation,\n createStripeCheckoutOperation,\n createStripeCheckoutSessionOperation,\n createStripePortalOperation,\n getStripeCheckoutOptionsOperation,\n isCancelStripeSubscriptionOperationResponse,\n isCreateStripeCheckoutOperationResponse,\n isCreateStripeCheckoutSessionOperationRequest,\n isCreateStripeCheckoutSessionOperationResponse,\n isCreateStripePortalOperationRequest,\n isCreateStripePortalOperationResponse,\n isGetStripeCheckoutOptionsOperationResponse,\n type StripeCheckoutPathParams,\n StripeCheckoutPathParamsSchema,\n} from \"./stripeCheckout\";\nexport {\n type ContainerWriterProjectionPathParams,\n ContainerWriterProjectionPathParamsSchema,\n type DocumentWriterProjectionPathParams,\n DocumentWriterProjectionPathParamsSchema,\n getContainerWriterProjectionOperation,\n getDocumentWriterProjectionOperation,\n isGetContainerWriterProjectionOperationResponse,\n isGetDocumentWriterProjectionOperationResponse,\n} from \"./writerProjections\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACrE,OAAO,EAEL,qCAAqC,EAErC,8BAA8B,EAC9B,2BAA2B,EAE3B,mCAAmC,EACnC,6BAA6B,EAC7B,oCAAoC,EACpC,qCAAqC,EACrC,sCAAsC,EACtC,uCAAuC,EACvC,0CAA0C,EAC1C,gCAAgC,GACjC,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,kBAAkB,EAClB,uBAAuB,EACvB,2BAA2B,EAC3B,4BAA4B,EAC5B,iCAAiC,EACjC,+BAA+B,EAC/B,yBAAyB,EACzB,8BAA8B,EAC9B,+BAA+B,EAC/B,+BAA+B,EAC/B,wBAAwB,EACxB,yBAAyB,EACzB,kCAAkC,EAClC,qBAAqB,EACrB,eAAe,EACf,iBAAiB,EACjB,qBAAqB,EACrB,eAAe,EACf,wBAAwB,GACzB,MAAM,QAAQ,CAAC;AAChB,OAAO,EACL,4BAA4B,EAC5B,6BAA6B,EAC7B,0CAA0C,EAC1C,2CAA2C,EAC3C,sCAAsC,EACtC,uCAAuC,EAEvC,8BAA8B,EAC9B,iCAAiC,EACjC,6BAA6B,EAE7B,0BAA0B,GAC3B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,gBAAgB,EAEhB,yBAAyB,EAEzB,8BAA8B,EAC9B,kBAAkB,EAClB,mBAAmB,EACnB,qBAAqB,EACrB,+CAA+C,EAE/C,8BAA8B,EAE9B,iCAAiC,EACjC,qCAAqC,GACtC,MAAM,aAAa,CAAC;AACrB,OAAO,EAEL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Ac,CAAC;AACtB,OAAO,EACL,mCAAmC,EAEnC,kCAAkC,GACnC,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,EACL,wBAAwB,EACxB,kCAAkC,EAClC,qCAAqC,EACrC,gDAAgD,EAChD,2BAA2B,EAC3B,sCAAsC,EACtC,2BAA2B,EAE3B,yBAAyB,EAEzB,4BAA4B,GAC7B,MAAM,QAAQ,CAAC;AAChB,OAAO,EACL,qCAAqC,EACrC,4BAA4B,EAC5B,gCAAgC,EAChC,uCAAuC,EACvC,8BAA8B,GAG/B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,iCAAiC,EACjC,6BAA6B,EAC7B,oCAAoC,EACpC,2BAA2B,EAC3B,iCAAiC,EACjC,2CAA2C,EAC3C,uCAAuC,EACvC,6CAA6C,EAC7C,8CAA8C,EAC9C,oCAAoC,EACpC,qCAAqC,EACrC,2CAA2C,EAE3C,8BAA8B,GAC/B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAEL,yCAAyC,EAEzC,wCAAwC,EACxC,qCAAqC,EACrC,oCAAoC,EACpC,+CAA+C,EAC/C,8CAA8C,GAC/C,MAAM,qBAAqB,CAAC","sourcesContent":["export { apiVersionHeaderName, parseApiVersion } from \"./apiVersion\";\nexport {\n type BlobAttachmentBindingPathParams,\n BlobAttachmentBindingPathParamsSchema,\n type BlobAttachmentPathParams,\n BlobAttachmentPathParamsSchema,\n bindBlobAttachmentOperation,\n type DocumentAttachmentsPathParams,\n DocumentAttachmentsPathParamsSchema,\n detachBlobAttachmentOperation,\n isBindBlobAttachmentOperationRequest,\n isBindBlobAttachmentOperationResponse,\n isDetachBlobAttachmentOperationRequest,\n isDetachBlobAttachmentOperationResponse,\n isListDocumentAttachmentsOperationResponse,\n listDocumentAttachmentsOperation,\n} from \"./attachments\";\nexport {\n challengeOperation,\n destroySessionOperation,\n isChallengeOperationRequest,\n isChallengeOperationResponse,\n isDestroySessionOperationResponse,\n isListSessionsOperationResponse,\n isLogoutOperationResponse,\n isRegistrationOperationRequest,\n isRegistrationOperationResponse,\n isUserIdentityOperationResponse,\n isVerifyOperationRequest,\n isVerifyOperationResponse,\n isWebSocketTicketOperationResponse,\n listSessionsOperation,\n logoutOperation,\n registerOperation,\n userIdentityOperation,\n verifyOperation,\n webSocketTicketOperation,\n} from \"./auth\";\nexport {\n billingWebhookWireHeaderKeys,\n billingWebhookWireHeaderNames,\n isReceiveRevenueCatWebhookOperationRequest,\n isReceiveRevenueCatWebhookOperationResponse,\n isReceiveStripeWebhookOperationRequest,\n isReceiveStripeWebhookOperationResponse,\n type RevenueCatWebhookHeaders,\n RevenueCatWebhookHeadersSchema,\n receiveRevenueCatWebhookOperation,\n receiveStripeWebhookOperation,\n type StripeWebhookHeaders,\n StripeWebhookHeadersSchema,\n} from \"./billingWebhooks\";\nexport {\n BinaryBodySchema,\n type BlobBytesPathParams,\n BlobBytesPathParamsSchema,\n type BlobBytesResponseHeaders,\n BlobBytesResponseHeadersSchema,\n blobWireHeaderKeys,\n blobWireHeaderNames,\n getBlobBytesOperation,\n isUploadMultipartBlobPartBytesOperationResponse,\n type MultipartBlobPartHeaders,\n MultipartBlobPartHeadersSchema,\n type MultipartBlobPartPathParams,\n MultipartBlobPartPathParamsSchema,\n uploadMultipartBlobPartBytesOperation,\n} from \"./blobBytes\";\nexport {\n type BlobDownloadResponse,\n BlobDownloadResponseSchema,\n getBlobDownloadOperation,\n} from \"./blobDownloads\";\nexport {\n type ContainerMutationPathParams,\n ContainerMutationPathParamsSchema,\n createContainerOperation,\n createContainerWithMetadataDocumentOperation,\n deleteContainerOperation,\n isContainerMutationOperationRequest,\n isContainerMutationOperationResponse,\n isContainerRotationOperationRequest,\n isContainerRotationOperationResponse,\n isCreateContainerWithMetadataDocumentOperationRequest,\n isCreateContainerWithMetadataDocumentOperationResponse,\n isDeleteContainerOperationResponse,\n moveContainerOperation,\n reciteContainerOperation,\n rekeyContainerOperation,\n revokeContainerOperation,\n shareContainerOperation,\n} from \"./containerMutations\";\nexport {\n type ContainerKekLogQuery,\n ContainerKekLogQuerySchema,\n type ContainerReadPathParams,\n ContainerReadPathParamsSchema,\n getContainerKekLogOperation,\n isGetContainerKekLogOperationResponse,\n isListContainerDocumentsOperationResponse,\n isListContainerParentLanesOperationRequest,\n isListContainerParentLanesOperationResponse,\n type ListContainerDocumentsQuery,\n ListContainerDocumentsQuerySchema,\n listContainerDocumentsOperation,\n listContainerParentLanesOperation,\n} from \"./containerReads\";\nexport {\n type ContainerReplacementAuthorizationsResponse,\n ContainerReplacementAuthorizationsResponseSchema,\n getContainerReplacementAuthorizationsOperation,\n} from \"./containerReplacement\";\nexport {\n defineHttpOperation,\n defineJsonOperation,\n type HttpOperation,\n type HttpOperationMediaType,\n type HttpOperationMethod,\n type JsonOperation,\n type JsonOperationMethod,\n type OperationSchemaInput,\n type OperationSchemaOutput,\n operationRequestPath,\n operationRequestPathForInput,\n operationRequestPathWithQuery,\n operationRoutePath,\n type RuntimeRefinement,\n} from \"./definition\";\nexport {\n type DocumentAttributionPathParams,\n DocumentAttributionPathParamsSchema,\n type DocumentAttributionRangesQuery,\n DocumentAttributionRangesQuerySchema,\n type DocumentAttributionRequestHeaders,\n DocumentAttributionRequestHeadersSchema,\n documentAttributionWireHeaderKeys,\n documentAttributionWireHeaderNames,\n getDocumentAttributionOperation,\n isGetDocumentAttributionOperationResponse,\n isListDocumentAttributionRangesOperationResponse,\n listDocumentAttributionRangesOperation,\n} from \"./documentAttribution\";\nexport {\n createDocumentOperation,\n type DocumentMutationPathParams,\n DocumentMutationPathParamsSchema,\n type DocumentPurgeProofQuery,\n DocumentPurgeProofQuerySchema,\n getDocumentPurgeProofOperation,\n isCreateDocumentOperationRequest,\n isCreateDocumentOperationResponse,\n isDocumentLinkSetMutationOperationRequest,\n isDocumentLinkSetMutationOperationResponse,\n isGetDocumentPurgeProofOperationResponse,\n isPurgeDocumentOperationRequest,\n isPurgeDocumentOperationResponse,\n linkDocumentOperation,\n purgeDocumentOperation,\n unlinkDocumentOperation,\n} from \"./documentMutations\";\nexport {\n type DocumentSyncPathParams,\n DocumentSyncPathParamsSchema,\n documentSyncOperation,\n isDocumentSyncOperationRequest,\n isDocumentSyncOperationResponse,\n} from \"./documentSync\";\nexport {\n operationRequestHeaderNames,\n operationResponseHeaderNames,\n} from \"./headerNames\";\nexport {\n getHealthOperation,\n isGetHealthOperationResponse,\n} from \"./health\";\nexport {\n completeMultipartBlobStageOperation,\n getMultipartBlobStageOperation,\n initiateMultipartBlobStageOperation,\n isCompleteMultipartBlobStageOperationRequest,\n isCompleteMultipartBlobStageOperationResponse,\n isGetMultipartBlobStageOperationResponse,\n isInitiateMultipartBlobStageOperationRequest,\n isInitiateMultipartBlobStageOperationResponse,\n type MultipartBlobStagePathParams,\n MultipartBlobStagePathParamsSchema,\n} from \"./multipartBlobs\";\nexport {\n claimNativeOrganizationSubscriptionOperation,\n getOrganizationBillingHistoryOperation,\n getOrganizationBillingManagementUrlOperation,\n getOrganizationBillingOperation,\n getOrganizationNativePurchaseEligibilityOperation,\n isClaimNativeOrganizationSubscriptionOperationResponse,\n isGetOrganizationBillingHistoryOperationResponse,\n isGetOrganizationBillingManagementUrlOperationResponse,\n isGetOrganizationBillingOperationResponse,\n isGetOrganizationNativePurchaseEligibilityOperationResponse,\n isStartOrganizationTrialOperationResponse,\n type OrganizationBillingNativeClaimPathParams,\n OrganizationBillingNativeClaimPathParamsSchema,\n type OrganizationBillingNativeEligibilityQuery,\n OrganizationBillingNativeEligibilityQuerySchema,\n type OrganizationBillingPathParams,\n OrganizationBillingPathParamsSchema,\n startOrganizationTrialOperation,\n} from \"./organizationBilling\";\nexport { getOrganizationPolicyHistoryOperation } from \"./organizationPolicyHistory\";\nexport {\n createOrganizationGroupOperation,\n createOrganizationOperation,\n deleteOrganizationGroupOperation,\n getOrganizationDataUsageOperation,\n getOrganizationReadModelOperation,\n isCreateOrganizationGroupOperationRequest,\n isCreateOrganizationGroupOperationResponse,\n isCreateOrganizationOperationRequest,\n isCreateOrganizationOperationResponse,\n isDeleteOrganizationGroupOperationResponse,\n isGetOrganizationDataUsageOperationResponse,\n isGetOrganizationReadModelOperationResponse,\n isListOrganizationGroupMembersOperationResponse,\n isUpdateOrganizationProfileOperationRequest,\n isUpdateOrganizationProfileOperationResponse,\n isUpdateOrganizationRosterEntryOperationRequest,\n isUpdateOrganizationRosterEntryOperationResponse,\n listOrganizationGroupMembersOperation,\n type OrganizationGroupPathParams,\n OrganizationGroupPathParamsSchema,\n type OrganizationPathParams,\n OrganizationPathParamsSchema,\n type OrganizationRosterPathParams,\n OrganizationRosterPathParamsSchema,\n updateOrganizationProfileOperation,\n updateOrganizationRosterEntryOperation,\n} from \"./organizations\";\nexport {\n type PrincipalPolicyPageQuery,\n PrincipalPolicyPageQuerySchema,\n} from \"./principalPolicyPageQuery\";\nexport {\n commitOrganizationGroupPolicyOperation,\n getPrincipalPolicyOperation,\n isCommitOrganizationGroupPolicyOperationRequest,\n isCommitOrganizationGroupPolicyOperationResponse,\n isGetPrincipalPolicyOperationResponse,\n isPutPrincipalPolicyOperationRequest,\n isPutPrincipalPolicyOperationResponse,\n type OrganizationGroupPolicyPathParams,\n OrganizationGroupPolicyPathParamsSchema,\n type PrincipalPolicyPathParams,\n PrincipalPolicyPathParamsSchema,\n putPrincipalPolicyOperation,\n} from \"./principals\";\nexport {\n getProjectionPolicyHistoryOperation,\n type ProjectionPolicyHistoryQuery,\n ProjectionPolicyHistoryQuerySchema,\n} from \"./projectionPolicyHistory\";\nexport { protocolOperations } from \"./registry\";\nexport {\n getRootIdentityOperation,\n isGetRootIdentityOperationResponse,\n isListRootIdentitiesOperationResponse,\n isListRootIdentityOrganizationsOperationResponse,\n listRootIdentitiesOperation,\n listRootIdentityOrganizationsOperation,\n MAX_ROOT_IDENTITY_PAGE_SIZE,\n type RootIdentitiesQuery,\n RootIdentitiesQuerySchema,\n type RootIdentityPathParams,\n RootIdentityPathParamsSchema,\n} from \"./root\";\nexport {\n getRootOrganizationDataUsageOperation,\n getRootOrganizationOperation,\n listRootDataUsageReportOperation,\n listRootOrganizationIdentitiesOperation,\n listRootOrganizationsOperation,\n type RootOrganizationPageQuery,\n type RootOrganizationsQuery,\n} from \"./rootOrganizations\";\nexport {\n cancelStripeSubscriptionOperation,\n createStripeCheckoutOperation,\n createStripeCheckoutSessionOperation,\n createStripePortalOperation,\n getStripeCheckoutOptionsOperation,\n isCancelStripeSubscriptionOperationResponse,\n isCreateStripeCheckoutOperationResponse,\n isCreateStripeCheckoutSessionOperationRequest,\n isCreateStripeCheckoutSessionOperationResponse,\n isCreateStripePortalOperationRequest,\n isCreateStripePortalOperationResponse,\n isGetStripeCheckoutOptionsOperationResponse,\n type StripeCheckoutPathParams,\n StripeCheckoutPathParamsSchema,\n} from \"./stripeCheckout\";\nexport {\n type ContainerWriterProjectionPathParams,\n ContainerWriterProjectionPathParamsSchema,\n type DocumentWriterProjectionPathParams,\n DocumentWriterProjectionPathParamsSchema,\n getContainerWriterProjectionOperation,\n getDocumentWriterProjectionOperation,\n isGetContainerWriterProjectionOperationResponse,\n isGetDocumentWriterProjectionOperationResponse,\n} from \"./writerProjections\";\n"]}