@resistdesign/voltra
    Preparing search index...

    Class TypeInfoORMClient

    Client implementation of the client-safe TypeInfoORMClientAPI contract.

    The configuration pointing to the Type Info ORM RouteMap.

    Implements

    • TypeInfoORMClientAPI
    Index

    Constructors

    Methods

    • Create an item of the provided type.

      Parameters

      • typeName: string

        TypeInfo type name.

      • item: TypeInfoDataItem

        Item payload to persist.

      Returns Promise<any>

      The created item result.

    • Create a relationship between items.

      Parameters

      • relationshipItem: BaseItemRelationshipInfo

        Relationship payload.

      Returns Promise<boolean>

      Whether the relationship was created.

    • Delete an item by its primary field value.

      Parameters

      • typeName: string

        TypeInfo type name.

      • primaryFieldValue: any

        Primary field value to delete.

      Returns Promise<boolean>

      Whether the delete succeeded.

    • Delete a relationship between items.

      Parameters

      • relationshipItem: BaseItemRelationshipInfo

        Relationship payload.

      Returns Promise<DeleteRelationshipResults>

      Results describing the deletion.

    • List items for a given type.

      Parameters

      • typeName: string

        TypeInfo type name.

      • config: ListItemsConfig

        List configuration including filters and paging.

      • OptionalselectedFields: string[]

        Optional fields to project.

      Returns Promise<ListItemsResults<TypeInfoDataItem>>

      List results for the query.

    • List related items for a relationship query.

      Parameters

      • config: ListRelationshipsConfig

        Relationship list query configuration.

      • OptionalselectedFields: string[]

        Optional fields to project on related items.

      Returns Promise<ListItemsResults<Partial<TypeInfoDataItem>>>

      Related item list results.

    • List relationship records matching the query.

      Parameters

      • config: ListRelationshipsConfig

        Relationship list query configuration.

      Returns Promise<ListItemsResults<ItemRelationshipInfo>>

      Relationship list results.

    • Dispatch a request to the configured service.

      Parameters

      • path: TypeInfoORMAPIRoutePaths

        Route path for the ORM method.

      • args: any[]

        Arguments to send in the request body.

      Returns Promise<any>

      Parsed response payload.

    • Read an item by its primary field value.

      Parameters

      • typeName: string

        TypeInfo type name.

      • primaryFieldValue: any

        Primary field value to lookup.

      • OptionalselectedFields: string[]

      Returns Promise<TypeInfoDataItem>

      The retrieved item, if found.

    • Update an item by replacing it with the provided payload.

      Parameters

      • typeName: string

        TypeInfo type name.

      • item: TypeInfoDataItem

        Updated item payload.

      Returns Promise<boolean>

      Whether the update succeeded.