Frodo Library - v5.0.0-47
    Preparing search index...

    Type Alias Mapping

    type Mapping = {
        createMapping(
            mappingId: string,
            mappingData: MappingSkeleton,
        ): Promise<MappingSkeleton>;
        createMappingExportTemplate(): MappingExportInterface;
        deleteMapping(mappingId: string): Promise<MappingSkeleton>;
        deleteMappings(
            connectorId?: string,
            moType?: string,
            resultCallback?: ResultCallback<MappingSkeleton>,
        ): Promise<MappingSkeleton[]>;
        exportMapping(
            mappingId: string,
            options?: MappingExportOptions,
        ): Promise<MappingExportInterface>;
        exportMappings(
            options?: MappingExportOptions,
        ): Promise<MappingExportInterface>;
        importFirstMapping(
            importData: MappingExportInterface,
            options?: MappingImportOptions,
        ): Promise<MappingSkeleton>;
        importMapping(
            mappingId: string,
            importData: MappingExportInterface,
            options?: MappingImportOptions,
        ): Promise<MappingSkeleton>;
        importMappings(
            importData: MappingExportInterface,
            options?: MappingImportOptions,
            resultCallback?: ResultCallback<MappingSkeleton>,
        ): Promise<MappingSkeleton[]>;
        isLegacyMapping(mappingId: string): boolean;
        readMapping(mappingId: string): Promise<MappingSkeleton>;
        readMappings(
            connectorId?: string,
            moType?: string,
        ): Promise<MappingSkeleton[]>;
        readSyncMappings(): Promise<MappingSkeleton[]>;
        updateMapping(
            mappingId: string,
            mappingData: MappingSkeleton,
        ): Promise<MappingSkeleton>;
        updateSyncMappings(mappings: MappingSkeleton[]): Promise<MappingSkeleton[]>;
    }
    Index
    • Delete mapping

      Parameters

      • mappingId: string

        id of the mapping (new: 'mapping/<name>', legacy: 'sync/<name>')

      Returns Promise<MappingSkeleton>

      a promise that resolves an mapping object

    • Delete all mappings, or only the mappings of a connector and/or a managed object type. With both, only the mappings that belong to both are deleted. Every selected mapping is tried: a mapping that cannot be deleted does not stop the others. Mappings that are not selected are left alone.

      Parameters

      • OptionalconnectorId: string

        limit mappings to connector

      • OptionalmoType: string

        limit mappings to managed object type

      • OptionalresultCallback: ResultCallback<MappingSkeleton>

        Optional callback to process individual results. When given, the outcome of every delete is passed to it as it happens (a failed delete as an error that names the mapping) and a failed delete does not throw. Without it, the failures are collected and thrown as one error after every mapping was tried. Failing to read the mappings always throws.

      Returns Promise<MappingSkeleton[]>

      a promise that resolves to an array of the deleted mapping objects

      If the mappings cannot be read (always), or if one or more mappings cannot be deleted and there is no result callback. The error carries one nested error per failed mapping, naming it.

    • Import all mappings. Every mapping is tried: a mapping that cannot be imported does not stop the others.

      Parameters

      • importData: MappingExportInterface

        import data

      • Optionaloptions: MappingImportOptions

        import options

      • OptionalresultCallback: ResultCallback<MappingSkeleton>

        Optional callback to process individual results. When given, the outcome of every mapping is passed to it as it happens (a failed mapping as an error that names the mapping and carries the cause) and a failed mapping does not throw: the mappings that were imported are returned. Without it, the failures are collected and thrown as one error after every mapping was tried.

      Returns Promise<MappingSkeleton[]>

      a promise resolving to an array of MappingSkeleton objects

      If one or more mappings cannot be imported and there is no result callback. The error carries one nested error per failed mapping.

    • Helper that returns a boolean indicating whether the mapping is a legacy mapping or not given the id

      Parameters

      • mappingId: string

        the mapping id

      Returns boolean

      true if the mapping is a legacy mapping, false otherwise

      if the id is invalid

    • Read mapping

      Parameters

      • mappingId: string

        id of the mapping (new: 'mapping/<name>', legacy: 'sync/<name>')

      Returns Promise<MappingSkeleton>

      a promise that resolves an mapping object

    • Read mappings

      Parameters

      • OptionalconnectorId: string

        limit mappings to connector

      • OptionalmoType: string

        limit mappings to managed object type

      Returns Promise<MappingSkeleton[]>

      a promise that resolves to an array of mapping objects