@resistdesign/voltra
    Preparing search index...

    Module api

    Server-side API utilities: routing, ORM, indexing, and data access control.

    Import from the API subpath only:

    import {
    AWS,
    addRoutesToRouteMap,
    handleCloudFunctionEvent,
    type CloudFunctionResponse,
    } from "@resistdesign/voltra/api";
    import {
    AWS,
    addRoutesToRouteMap,
    handleCloudFunctionEvent,
    type CloudFunctionResponse,
    } from "@resistdesign/voltra/api";

    const routes = addRoutesToRouteMap({}, [
    {
    path: "",
    authConfig: { anyAuthorized: true },
    handler: async () => "WELCOME!!!!",
    },
    ]);

    export const handler = async (
    event: any,
    ): Promise<CloudFunctionResponse> =>
    handleCloudFunctionEvent(
    event,
    AWS.normalizeCloudFunctionEvent,
    routes,
    [
    process.env.CLIENT_ORIGIN as string,
    /https:\\/\\/example\\.com(:.*?$|\\/.*$|$)/gim,
    ],
    );

    See also: @resistdesign/voltra/app for client-side app helpers.

    Reference examples:

    • examples/README.md
    • examples/api/backend-routing.ts

    Classes

    DynamoDBDataItemDBDriver
    ExactIndex
    FullTextDdbBackend
    FullTextDdbWriter
    FullTextMemoryBackend
    IndexingRelationshipDriver
    IndexMutationCoordinator
    IndexQueryError
    InMemoryDataItemDBDriver
    InMemoryFileItemDBDriver
    InMemoryItemRelationshipDBDriver
    LossyIndex
    RelationalDdbBackend
    RelationalInMemoryBackend
    S3FileItemDBDriver
    StructuredDdbBackend
    StructuredDdbOccupancyMaintenance
    StructuredDdbReader
    StructuredDdbWriter
    StructuredInMemoryBackend
    StructuredInMemoryIndex
    TypeInfoORMService

    Type Aliases - Routing

    RouteMap

    Type Aliases - other

    AuthInfo
    BaseDACRole
    BaseFile
    BaseFileItem
    BaseFileLocationInfo
    BaseTypeInfoORMServiceConfig
    BatchGetItemInput
    BatchGetItemOutput
    BatchWriteItemInput
    BatchWriteItemOutput
    CloudFileServiceDriver
    CloudFunctionEventRouter
    CloudFunctionEventTransformer
    CloudFunctionResponse
    CORSPattern
    DACAccessResult
    DACConstraint
    DACDataItemResourceAccessResultMap
    DACPathMatchResults
    DACResourcePath
    DACResourcePathPart
    DACRole
    DACWildcardSignifier
    DataItemDBDriver
    DataItemDBDriverConfig
    Direction
    DocId
    DocTokenBatchReader
    DocTokenKey
    DocTokenReader
    DocumentIndexWriter
    DocumentRecord
    DynamoBatchWriter
    DynamoDBSpecificConfig
    DynamoQueryClient
    Edge
    EdgeKey
    EdgePage
    EdgePutEvent
    EdgeQueryEvent
    EdgeRemoveEvent
    ExactBatchReader
    ExactCursorState
    ExactDdbIdentity
    ExactDdbItem
    ExactDdbKey
    ExactQueryOptions
    ExactQueryResult
    ExactReader
    ExactS3Pointer
    ExactWriter
    FullTextDdbBackendConfig
    FullTextDdbWriterConfig
    FullTextTableNames
    GetItemInput
    GetItemOutput
    IndexAndExpression
    IndexBackend
    IndexCandidatePage
    IndexDocumentInput
    IndexedFieldCapabilities
    IndexedFieldsByType
    IndexedTextCapabilities
    IndexExpression
    IndexingRelationshipDriverConfig
    IndexItemKind
    IndexMutationWrite
    IndexOrderBy
    IndexOrExpression
    IndexQueryValue
    IndexRangeExpression
    IndexReader
    IndexScalarIdentity
    IndexSearchCursorEnvelope
    IndexSearchDiagnostics
    IndexSearchLimits
    IndexSearchOptions
    IndexTableConfig
    IndexTableKey
    IndexTermExpression
    IndexTextExpression
    IndexWriter
    InMemoryFileSpecificConfig
    InMemoryItemRelationshipDBDriverConfig
    InMemorySpecificConfig
    ItemRelationshipDBDriver
    KeysAndAttributes
    LambdaResponse
    ListFilesResult
    LossyCursorState
    LossyDdbIdentity
    LossyDdbItem
    LossyDdbKey
    LossyPagingReader
    LossyPostingsPage
    LossyPostingsPageOptions
    LossyQueryOptions
    LossyQueryResult
    LossyReader
    LossyS3Pointer
    LossyWriter
    NormalizedCloudFunctionEventData
    PlannerMetadata
    PutItemInput
    PutItemOutput
    QueryInput
    QueryOutput
    RebuildStructuredOccupancyConfig
    RebuildStructuredOccupancyResult
    RelationalBackend
    RelationalCursorState
    RelationalHandlerDependencies
    RelationalHandlerEvent
    RelationalQueryOptions
    RelationEdgesDdbDependencies
    RelationEdgesDdbItem
    RelationEdgesDdbKey
    RelationEdgesQueryRequest
    RelationEdgesQueryResult
    RelationsDdbConfig
    RelationsTableNames
    RelLambdaResponse
    RemoveDocumentInput
    ReplaceDocumentInput
    ResolvedSearchLimits
    Route
    RouteAuthConfig
    RouteHandler
    RouteHandlerFactory
    S3SpecificConfig
    SearchExactInput
    SearchLimits
    SearchLossyInput
    SearchResult
    SearchTrace
    SortingStrategy
    StructuredChunkBounds
    StructuredCursorState
    StructuredDdbConfig
    StructuredDerivedMutation
    StructuredDocFieldsItem
    StructuredDocFieldsKey
    StructuredDocFieldsRecord
    StructuredDocFieldsState
    StructuredDocumentRecord
    StructuredHandlerDependencies
    StructuredHandlerEvent
    StructuredIndexDocumentEvent
    StructuredMissingItem
    StructuredOccupancyBackfillDocument
    StructuredOccupancyField
    StructuredOccupancyFieldMap
    StructuredOccupancyGenerationState
    StructuredOccupancyItem
    StructuredOccupancyPage
    StructuredOccupancyRebuildController
    StructuredOccupancyReindexer
    StructuredRangeIndexItem
    StructuredRangeIndexKey
    StructuredReader
    StructuredSearchEvent
    StructuredTableNames
    StructuredTermIndexItem
    StructuredTermIndexKey
    StructuredTermMode
    StructuredWriteContext
    StructuredWriter
    StructuredWriterDependencies
    SupportedDataItemDBDriverEntry
    TextIndexBackend
    TextMatchMode
    TokenizationResult
    TokenStats
    TokenStatsReader
    TypeInfoORMDACConfig
    TypeInfoORMIndexingConfig
    TypeInfoORMIndexingConfigSeed
    TypeInfoORMManualIndexingConfig
    TypeInfoORMReindexStoredItemConfig
    TypeInfoORMReindexStoredTypeConfig
    TypeInfoORMReindexStoredTypeResults
    TypeInfoORMReplaceIndexingConfig
    TypeInfoORMRouteMapConfig
    TypeInfoORMServiceConfig
    TypeInfoORMServiceDACOptions
    WriteRequest

    Functions - Routing

    addRoutesToRouteMap

    Functions - other

    addRouteMapToRouteMap
    addRouteToRouteMap
    assertIndexPartitionKey
    assertIndexSortKey
    assertIndexTableConfig
    assertIndexTableKey
    buildExactDdbItem
    buildExactDdbKey
    buildExactS3Key
    buildIndexDocumentSortKey
    buildIndexKey
    buildIndexScalarKey
    buildLossyDdbItem
    buildLossyDdbKey
    buildLossyS3Key
    buildRelationEdgeDdbItem
    buildRelationEdgeDdbKey
    buildStructuredChunkBounds
    buildStructuredDocFieldsItem
    buildStructuredDocFieldsKey
    buildStructuredGenerationStateItem
    buildStructuredGenerationStateKey
    buildStructuredMissingItem
    buildStructuredMissingItems
    buildStructuredMissingPartitionKey
    buildStructuredOccupancyItem
    buildStructuredOccupancyItems
    buildStructuredOccupancyPartitionKey
    buildStructuredRangeItem
    buildStructuredRangeKey
    buildStructuredRangePartitionKey
    buildStructuredTermItem
    buildStructuredTermKey
    cleanRelationshipItem
    createIndexBackend
    createSearchTrace
    criteriaToIndexExpression
    decodeExactCursor
    decodeIndexDocumentSortKey
    decodeIndexIdentity
    decodeIndexScalarIdentity
    decodeIndexSearchCursor
    decodeLossyCursor
    decodeRelationalCursor
    decodeStructuredCursor
    encodeDocKey
    encodeDocMirrorKey
    encodeDocMirrorSortKey
    encodeDocTokenPositionSortKey
    encodeDocTokenSortKey
    encodeExactCursor
    encodeExactIndexValue
    encodeIndexIdentity
    encodeIndexScalarIdentity
    encodeIndexSearchCursor
    encodeLossyCursor
    encodeRelationalCursor
    encodeRelationEdgePartitionKey
    encodeSortableIndexNumber
    encodeSortableIndexValue
    encodeStructuredCriterionChunk
    encodeStructuredCursor
    encodeStructuredNumber
    encodeTokenDocSortKey
    encodeTokenKey
    fingerprintIndexQuery
    getDACPathsMatch
    getDACRoleHasAccessToDataItem
    getDataItemDACResourcePath
    getDataItemFieldValueDACResourcePath
    getDriverMethodWithModifiedError
    getFlattenedDACConstraints
    getFullORMDACRole
    getItemRelationshipDACResourcePath
    getItemRelationshipOriginDACConstraint
    getItemRelationshipOriginDACResourcePath
    getItemRelationshipOriginDACRole
    getItemTypeDACConstraint
    getItemTypeDACResourcePath
    getItemTypeDACRole
    getORMDACResourcePath
    getResourceAccessByDACRole
    getTypeInfoORMIndexingConfigFromTypeInfoMap
    getTypeInfoORMRouteMap
    getValueIsWildcardSignifier
    handler
    indexDocument
    isStructuredOccupancyFieldValue
    loadExactPositions
    loadLossyIndex
    mergeDACAccessResults
    mergeDACDataItemResourceAccessResultMaps
    normalizeIndexText
    qualifyIndexField
    rebuildStructuredOccupancy
    removeDocument
    replaceFullTextDocument
    resolveSearchLimits
    searchExact
    searchIndex
    searchLossy
    serializeStructuredValue
    setIndexBackend
    setRelationalHandlerDependencies
    setStructuredHandlerDependencies
    stableStringify
    storeExactPositions
    storeLossyIndex
    structuredHandler
    tokenize
    tokenizeLossyTrigrams

    Variables - Routing

    handleCloudFunctionEvent

    Variables - other

    DEFAULT_INDEX_SEARCH_LIMITS
    docTokenPositionsSchema
    docTokensSchema
    DynamoDBSupportedDataItemDBDriverEntry
    exactDdbSchema
    exactPostingsSchema
    FULL_TEXT_TOKEN_STATS_SORT_KEY
    fullTextDocMirrorSchema
    fullTextTokenStatsSchema
    INDEX_FIELD_IDENTITY_VERSION
    INDEX_ITEM_KINDS
    INDEX_KEY_PARTS
    INDEX_KEY_SEPARATOR
    INDEX_KEY_VERSION
    INDEX_PARTITION_KEY_MAX_BYTES
    INDEX_SEARCH_CURSOR_VERSION
    INDEX_SORT_KEY_MAX_BYTES
    INDEX_TABLE_KIND_ATTRIBUTE
    INDEX_TABLE_PARTITION_KEY
    INDEX_TABLE_SORT_KEY
    INITIAL_STRUCTURED_OCCUPANCY_GENERATION
    InMemoryFileSupportedDataItemDBDriverEntry
    InMemorySupportedDataItemDBDriverEntry
    lossyDdbSchema
    lossyPostingsSchema
    relationEdgesSchema
    S3SupportedFileItemDBDriverEntry
    SEARCH_CAPS
    SEARCH_DEFAULTS
    STRUCTURED_OCCUPANCY_CELL_BUDGET
    STRUCTURED_OCCUPANCY_PAGE_BUDGET
    STRUCTURED_OCCUPANCY_PAGE_SIZE
    structuredDocFieldsSchema
    structuredRangeIndexSchema
    structuredTermIndexSchema
    SUPPORTED_TYPE_INFO_ORM_DB_DRIVERS
    TYPE_INFO_ORM_API_PATH_METHOD_NAME_MAP
    WILDCARD_SIGNIFIER_PROTOTYPE

    Namespaces

    AWS

    Enumerations

    DACConstraintType
    DATA_ITEM_DB_DRIVER_ERRORS
    IndexQueryErrorCode
    SupportedTypeInfoORMDBDriverNames
    TYPE_INFO_ORM_ROUTE_MAP_ERRORS