@resistdesign/voltra
    Preparing search index...

    Type Alias TypeInfoORMClientAPI

    Client-safe TypeInfoORM API shape derived from TypeInfoORMAPI.

    This type is intentionally explicit and does not include any context?: TypeInfoORMContext arguments so app-side callers cannot pass server DAC context.

    type TypeInfoORMClientAPI = {
        create: (typeName: string, item: TypeInfoDataItem) => Promise<any>;
        createRelationship: (
            relationshipItem: BaseItemRelationshipInfo,
        ) => Promise<boolean>;
        delete: (typeName: string, primaryFieldValue: any) => Promise<boolean>;
        deleteRelationship: (
            relationshipItem: BaseItemRelationshipInfo,
        ) => Promise<DeleteRelationshipResults>;
        list: (
            typeName: string,
            config: ListItemsConfig,
            selectedFields?: (keyof TypeInfoDataItem)[],
        ) => Promise<ListItemsResults<Partial<TypeInfoDataItem>>>;
        listRelatedItems: (
            config: ListRelationshipsConfig,
            selectedFields?: (keyof TypeInfoDataItem)[],
        ) => Promise<ListItemsResults<Partial<TypeInfoDataItem>>>;
        listRelationships: (
            config: ListRelationshipsConfig,
        ) => Promise<ListItemsResults<ItemRelationshipInfo>>;
        read: (
            typeName: string,
            primaryFieldValue: any,
            selectedFields?: (keyof TypeInfoDataItem)[],
        ) => Promise<Partial<TypeInfoDataItem>>;
        update: (
            typeName: string,
            item: TypeInfoDataItem,
            updateConfig?: TypeInfoORMUpdateConfig,
        ) => Promise<boolean>;
    }

    Implemented by

    Index

    Properties

    create: (typeName: string, item: TypeInfoDataItem) => Promise<any>

    Create an item.

    Type Declaration

      • (typeName: string, item: TypeInfoDataItem): Promise<any>
      • Parameters

        • typeName: string

          Type name to create.

        • item: TypeInfoDataItem

          Item payload to create.

        Returns Promise<any>

        The created item result.

    createRelationship: (
        relationshipItem: BaseItemRelationshipInfo,
    ) => Promise<boolean>

    Create a relationship record.

    Type Declaration

      • (relationshipItem: BaseItemRelationshipInfo): Promise<boolean>
      • Parameters

        • relationshipItem: BaseItemRelationshipInfo

          Relationship payload to create.

        Returns Promise<boolean>

        Whether the create succeeded.

    delete: (typeName: string, primaryFieldValue: any) => Promise<boolean>

    Delete an item by primary field value.

    Type Declaration

      • (typeName: string, primaryFieldValue: any): Promise<boolean>
      • Parameters

        • typeName: string

          Type name to delete.

        • primaryFieldValue: any

          Primary field value to delete.

        Returns Promise<boolean>

        Whether the delete succeeded.

    deleteRelationship: (
        relationshipItem: BaseItemRelationshipInfo,
    ) => Promise<DeleteRelationshipResults>

    Delete a relationship record.

    Type Declaration

    list: (
        typeName: string,
        config: ListItemsConfig,
        selectedFields?: (keyof TypeInfoDataItem)[],
    ) => Promise<ListItemsResults<Partial<TypeInfoDataItem>>>

    List items matching the configuration.

    Type Declaration

    listRelatedItems: (
        config: ListRelationshipsConfig,
        selectedFields?: (keyof TypeInfoDataItem)[],
    ) => Promise<ListItemsResults<Partial<TypeInfoDataItem>>>

    List related items for a relationship query.

    Type Declaration

    listRelationships: (
        config: ListRelationshipsConfig,
    ) => Promise<ListItemsResults<ItemRelationshipInfo>>

    List relationships matching the query.

    Type Declaration

    read: (
        typeName: string,
        primaryFieldValue: any,
        selectedFields?: (keyof TypeInfoDataItem)[],
    ) => Promise<Partial<TypeInfoDataItem>>

    Read an item by primary field value.

    Type Declaration

      • (
            typeName: string,
            primaryFieldValue: any,
            selectedFields?: (keyof TypeInfoDataItem)[],
        ): Promise<Partial<TypeInfoDataItem>>
      • Parameters

        • typeName: string

          Type name to read.

        • primaryFieldValue: any

          Primary field value to lookup.

        • OptionalselectedFields: (keyof TypeInfoDataItem)[]

          Optional fields to project.

        Returns Promise<Partial<TypeInfoDataItem>>

        Retrieved item data.

    update: (
        typeName: string,
        item: TypeInfoDataItem,
        updateConfig?: TypeInfoORMUpdateConfig,
    ) => Promise<boolean>

    Update an item.

    Type Declaration