Esposter
    Preparing search index...

    Module @esposter/db - v2.36.0

    @esposter/db

    Apache-2.0 licensed

    Database connection utilities for Esposter — server environment only. Provides composables for Drizzle ORM (PostgreSQL), Azure Table Storage, Azure Blob Storage, Azure AI Search, and Azure WebPubSub.


    We highly recommend you take a look at the documentation to level up.

    Composable / Service Description
    Drizzle (PostgreSQL) drizzle-orm client wired to the DATABASE_URL connection string
    Azure Table Storage useTableClient — creates a typed TableClient for a given table name
    Azure Blob Storage useBlobServiceClient — creates a BlobServiceClient
    Azure AI Search useSearchIndexClient — creates a typed SearchIndexClient
    Azure WebPubSub useWebPubSubServiceClient — creates a WebPubSubServiceClient
    Link preview getLinkPreview — fetches Open Graph metadata from a URL
    • Server-only: this package must not be imported in browser code.
    • Depends on @esposter/db-schema for Drizzle relation and schema definitions.
    • Azure clients currently use the credential form required by each caller. Some app-facing paths still use connection strings or keys because the main app is hosted outside Azure and does not have managed identity.

    Run from packages/db/:

    pnpm build        # compile to dist/
    pnpm test # vitest watch mode (coverage is run from the repo root)
    pnpm lint:fix # auto-fix lint
    pnpm typecheck # type check

    This project is licensed under the Apache-2.0 license.

    ExecutedAutomodAction
    GetPermissions
    MentionConditionBuilder
    MessageCreationRejection
    CLAUSE_REGEX
    ContentTypes
    dayjs
    getPermissions
    KeysToCapitalize
    KeysToUncapitalize
    MAX_QUEUE_VISIBILITY_TIMEOUT_MS
    MentionBadgeConditionBuilders
    MentionNotificationConditionBuilders
    PUSH_SUBSCRIPTION_COLUMNS
    RangeOperators
    addMessageMetadata
    cloneFiles
    copyBlob
    countEntities
    createEntity
    createMessage
    deleteDirectory
    deleteEntity
    deleteTablePartitionEntities
    deserializeClause
    deserializeEntity
    deserializeKey
    deserializeValue
    enqueueScheduledMessageJob
    enqueueTodoReminder
    executeAutomodAction
    filtersToClauses
    generateDownloadFileSasUrls
    generateDownloadThumbnailSasUrls
    generateReadSasUrl
    generateUploadFileSasEntities
    generateWriteSasUrl
    getBlobName
    getBroadcastMentionConditions
    getBroadcastNotificationCondition
    getContainerClient
    getContentBlobName
    getDirectMessageNotificationCondition
    getEntity
    getEntityWithEtag
    getFileBlobNames
    getIsConflict
    getIsNotFound
    getIsSerializable
    getLinkPreviewResponse
    getMentionBadgeConditions
    getMentionConditions
    getMentionedUserIdCondition
    getMentionNotificationConditions
    getMessageCreationRejection
    getPushSubscriptionsForMessage
    getPushSubscriptionsForThreadFollowers
    getPushSubscriptionsForUser
    getQueueClient
    getRoleMemberIds
    getRoleMentionBadgeCondition
    getRoleMentionCondition
    getSearchNonNullClause
    getSearchNullClause
    getServiceBusSender
    getTableClient
    getTableNullClause
    getThumbnailBlobName
    getTopNEntities
    getTopNEntitiesByClass
    getTopNEntitiesByType
    getUserMentionBadgeCondition
    getUserMentionCondition
    getVersionPath
    getWebPubSubServiceClient
    hasPermission
    incrementMentionCounts
    listBlobNames
    purgeResource
    serializeClause
    serializeClauses
    serializeClausesCore
    serializeEntity
    serializeKey
    serializeSearchClauses
    submitTransactionBatches
    syncProperties
    updateEntity
    upsertEntity
    writeModerationLogEntry