Frodo Library - v4.0.0-10
    Preparing search index...

    Type Alias ManagedObject

    type ManagedObject = {
        createManagedObject(
            type: string,
            moData: IdObjectSkeletonInterface,
            id?: string,
        ): Promise<IdObjectSkeletonInterface>;
        deleteManagedObject(
            type: string,
            id: string,
        ): Promise<IdObjectSkeletonInterface>;
        deleteManagedObjects(type: string, filter: string): Promise<number>;
        queryManagedObjects(
            type: string,
            filter?: string,
            fields?: string[],
            pageSize?: number,
        ): Promise<IdObjectSkeletonInterface[]>;
        readManagedObject(
            type: string,
            id: string,
            fields: string[],
        ): Promise<IdObjectSkeletonInterface>;
        readManagedObjects(
            type: string,
            fields: string[],
        ): Promise<IdObjectSkeletonInterface[]>;
        resolveFullName(type: string, id: string): Promise<string>;
        resolvePerpetratorUuid(id: string): Promise<string>;
        resolveUserName(type: string, id: string): Promise<string>;
        updateManagedObject(
            type: string,
            id: string,
            moData: IdObjectSkeletonInterface,
        ): Promise<IdObjectSkeletonInterface>;
        updateManagedObjectProperties(
            type: string,
            id: string,
            operations: PatchOperationInterface[],
            rev?: string,
        ): Promise<IdObjectSkeletonInterface>;
        updateManagedObjectsProperties(
            type: string,
            filter: string,
            operations: PatchOperationInterface[],
            rev?: string,
            pageSize?: number,
        ): Promise<IdObjectSkeletonInterface[]>;
    }
    Index

    Methods

    • Delete managed objects by filter

      Parameters

      • type: string

        managed object type, e.g. alpha_user or user

      • filter: string

        filter

      Returns Promise<number>

      a promise that resolves the number of deleted objects

    • Query managed objects

      Parameters

      • type: string

        managed object type, e.g. alpha_user or user

      • Optionalfilter: string

        CREST search filter

      • Optionalfields: string[]

        array of fields to return

      • OptionalpageSize: number

      Returns Promise<IdObjectSkeletonInterface[]>

      a promise resolving to an array of managed objects

    • Read managed object

      Parameters

      • type: string

        managed object type, e.g. alpha_user or user

      • id: string

        managed object id

      • fields: string[]

      Returns Promise<IdObjectSkeletonInterface>

      a promise that resolves to an IdObjectSkeletonInterface

    • Read all managed object of the specified type

      Parameters

      • type: string

        managed object type, e.g. alpha_user or user

      • fields: string[]

        array of fields to return

      Returns Promise<IdObjectSkeletonInterface[]>

      a promise that resolves to an array of IdObjectSkeletonInterfaces

    • Resolve a managed object's uuid to a human readable full name

      Parameters

      • type: string

        managed object type, e.g. teammember or alpha_user

      • id: string

        managed object _id

      Returns Promise<string>

      resolved full name or uuid if any error occurs during reslution

    • Resolve a perpetrator's uuid to a human readable string identifying the perpetrator

      Parameters

      • id: string

        managed object _id

      Returns Promise<string>

      resolved perpetrator descriptive string or uuid if any error occurs during reslution

    • Resolve a managed object's uuid to a human readable username

      Parameters

      • type: string

        managed object type, e.g. teammember or alpha_user

      • id: string

        managed object _id

      Returns Promise<string>

      resolved username or uuid if any error occurs during reslution

    • Partially update managed object through a collection of patch operations.

      Parameters

      • type: string

        managed object type, e.g. alpha_user or user

      • id: string

        managed object id

      • operations: PatchOperationInterface[]

        collection of patch operations to perform on the object

      • Optionalrev: string

        managed object revision

      Returns Promise<IdObjectSkeletonInterface>

      a promise that resolves to an IdObjectSkeletonInterface

    • Partially update multiple managed object through a collection of patch operations.

      Parameters

      • type: string

        managed object type, e.g. alpha_user or user

      • filter: string

        CREST search filter

      • operations: PatchOperationInterface[]

        collection of patch operations to perform on the object

      • Optionalrev: string

        managed object revision

      • OptionalpageSize: number

        page size

      Returns Promise<IdObjectSkeletonInterface[]>

      a promise that resolves to an IdObjectSkeletonInterface