@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
    InMemoryDataItemDBDriver
    InMemoryFileItemDBDriver
    InMemoryItemRelationshipDBDriver
    LossyIndex
    RelationalDdbBackend
    RelationalInMemoryBackend
    S3FileItemDBDriver
    StructuredDdbBackend
    StructuredDdbReader
    StructuredDdbWriter
    StructuredInMemoryBackend
    StructuredInMemoryIndex
    TypeInfoORMService

    Type Aliases - Routing

    RouteMap

    Type Aliases - other

    AuthInfo
    BaseDACRole
    BaseFile
    BaseFileItem
    BaseFileLocationInfo
    BaseTypeInfoORMServiceConfig
    BatchGetItemInput
    BatchGetItemOutput
    BatchWriteItemInput
    BatchWriteItemOutput
    CandidatePage
    CloudFileServiceDriver
    CloudFunctionEventRouter
    CloudFunctionEventTransformer
    CloudFunctionResponse
    CORSPatter
    DACAccessResult
    DACConstraint
    DACDataItemResourceAccessResultMap
    DACPathMatchResults
    DACResourcePath
    DACResourcePathPart
    DACRole
    DACWildcardSignifier
    DataItemDBDriver
    DataItemDBDriverConfig
    Direction
    DocId
    DocTokenBatchReader
    DocTokenKey
    DocTokenReader
    DocumentRecord
    DynamoBatchWriter
    DynamoQueryClient
    Edge
    EdgeKey
    EdgePage
    EdgePutEvent
    EdgeQueryEvent
    EdgeRemoveEvent
    ExactBatchReader
    ExactCursorState
    ExactDdbItem
    ExactDdbKey
    ExactQueryOptions
    ExactQueryResult
    ExactReader
    ExactS3Pointer
    ExactWriter
    FullTextTableNames
    GetItemInput
    GetItemOutput
    IndexBackend
    IndexDocumentInput
    IndexingRelationshipDriverConfig
    IndexReader
    IndexWriter
    InMemoryFileSpecificConfig
    InMemoryItemRelationshipDBDriverConfig
    ItemRelationshipDBDriver
    KeysAndAttributes
    LambdaResponse
    ListFilesResult
    LossyCursorState
    LossyDdbItem
    LossyDdbKey
    LossyPagingReader
    LossyPostingsPage
    LossyPostingsPageOptions
    LossyQueryOptions
    LossyQueryResult
    LossyReader
    LossyS3Pointer
    LossyWriter
    NormalizedCloudFunctionEventData
    PlannerMetadata
    QueryInput
    QueryOutput
    RelationalBackend
    RelationalCursorState
    RelationalHandlerDependencies
    RelationalHandlerEvent
    RelationalQueryOptions
    RelationEdgesDdbDependencies
    RelationEdgesDdbItem
    RelationEdgesDdbKey
    RelationEdgesQueryRequest
    RelationEdgesQueryResult
    RelationsDdbConfig
    RelationsTableNames
    RelLambdaResponse
    RemoveDocumentInput
    ReplaceDocumentInput
    ResolvedSearchLimits
    Route
    RouteAuthConfig
    RouteHandler
    RouteHandlerFactory
    SearchExactInput
    SearchLossyInput
    SearchResult
    SearchTrace
    SortingStrategy
    StructuredCursorState
    StructuredDocFieldsItem
    StructuredDocFieldsKey
    StructuredDocFieldsRecord
    StructuredDocumentRecord
    StructuredHandlerDependencies
    StructuredHandlerEvent
    StructuredIndexDocumentEvent
    StructuredQueryOptions
    StructuredRangeIndexItem
    StructuredRangeIndexKey
    StructuredRangeWhere
    StructuredReader
    StructuredSearchDependencies
    StructuredSearchEvent
    StructuredTableNames
    StructuredTermIndexItem
    StructuredTermIndexKey
    StructuredTermMode
    StructuredTermWhere
    StructuredWriter
    StructuredWriterDependencies
    SupportedDataItemDBDriverEntry
    TokenizationResult
    TokenStats
    TokenStatsReader
    TypeInfoORMDACConfig
    TypeInfoORMIndexingConfig
    TypeInfoORMServiceConfig
    TypeInfoORMServiceDACOptions
    Where
    WhereAnd
    WhereOr
    WhereValue
    WriteRequest

    Functions - Routing

    addRoutesToRouteMap

    Functions - other

    addRouteMapToRouteMap
    addRouteToRouteMap
    buildExactDdbItem
    buildExactDdbKey
    buildExactS3Key
    buildLossyDdbKey
    buildLossyS3Key
    buildRelationEdgeDdbItem
    buildRelationEdgeDdbKey
    buildStructuredDocFieldsItem
    buildStructuredRangeItem
    buildStructuredRangeKey
    buildStructuredTermItem
    buildStructuredTermKey
    cleanRelationshipItem
    createSearchTrace
    decodeExactCursor
    decodeLossyCursor
    decodeRelationalCursor
    decodeStructuredCursor
    encodeDocKey
    encodeDocMirrorKey
    encodeDocTokenPositionSortKey
    encodeDocTokenSortKey
    encodeExactCursor
    encodeLossyCursor
    encodeRelationalCursor
    encodeRelationEdgePartitionKey
    encodeStructuredCursor
    encodeTokenDocSortKey
    encodeTokenKey
    getDACPathsMatch
    getDACRoleHasAccessToDataItem
    getDataItemDACResourcePath
    getDataItemFieldValueDACResourcePath
    getDriverMethodWithModifiedError
    getFlattenedDACConstraints
    getFullORMDACRole
    getItemRelationshipDACResourcePath
    getItemRelationshipOriginDACConstraint
    getItemRelationshipOriginDACResourcePath
    getItemRelationshipOriginDACRole
    getItemTypeDACConstraint
    getItemTypeDACResourcePath
    getItemTypeDACRole
    getORMDACResourcePath
    getResourceAccessByDACRole
    getTypeInfoORMRouteMap
    getValueIsWildcardSignifier
    indexDocument
    loadExactPositions
    loadLossyIndex
    mergeDACAccessResults
    mergeDACDataItemResourceAccessResultMaps
    qualifyIndexField
    relHandler
    removeDocument
    replaceFullTextDocument
    searchExact
    searchLossy
    searchStructured
    serializeStructuredValue
    setIndexBackend
    setRelationalHandlerDependencies
    setStructuredHandlerDependencies
    storeExactPositions
    storeLossyIndex
    structuredHandler
    tokenize
    tokenizeLossyTrigrams

    Variables - Routing

    handleCloudFunctionEvent

    Variables - other

    docTokenPositionsSchema
    docTokensSchema
    DynamoDBSupportedDataItemDBDriverEntry
    exactDdbSchema
    exactPostingsSchema
    fullTextDocMirrorSchema
    fullTextTokenStatsSchema
    InMemoryFileSupportedDataItemDBDriverEntry
    InMemorySupportedDataItemDBDriverEntry
    lossyDdbSchema
    lossyPostingsSchema
    relationEdgesSchema
    S3SupportedFileItemDBDriverEntry
    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
    SupportedTypeInfoORMDBDriverNames
    TYPE_INFO_ORM_ROUTE_MAP_ERRORS