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

    Type Alias ResourceType

    type ResourceType = {
        createResourceType(
            resourceTypeData: ResourceTypeSkeleton,
            resourceTypeUuid?: string,
        ): Promise<ResourceTypeSkeleton>;
        deleteResourceType(resourceTypeUuid: string): Promise<ResourceTypeSkeleton>;
        deleteResourceTypeByName(
            resourceTypeName: string,
        ): Promise<ResourceTypeSkeleton>;
        exportResourceType(
            resourceTypeUuid: string,
        ): Promise<ResourceTypeExportInterface>;
        exportResourceTypeByName(
            resourceTypeName: string,
        ): Promise<ResourceTypeExportInterface>;
        exportResourceTypes(): Promise<ResourceTypeExportInterface>;
        importFirstResourceType(
            importData: ResourceTypeExportInterface,
        ): Promise<ResourceTypeSkeleton>;
        importResourceType(
            resourceTypeUuid: string,
            importData: ResourceTypeExportInterface,
        ): Promise<ResourceTypeSkeleton>;
        importResourceTypeByName(
            resourceTypeName: string,
            importData: ResourceTypeExportInterface,
        ): Promise<ResourceTypeSkeleton>;
        importResourceTypes(
            importData: ResourceTypeExportInterface,
            resultCallback?: ResultCallback<ResourceTypeSkeleton>,
        ): Promise<ResourceTypeSkeleton[]>;
        readResourceType(resourceTypeUuid: string): Promise<ResourceTypeSkeleton>;
        readResourceTypeByName(
            resourceTypeName: string,
        ): Promise<ResourceTypeSkeleton>;
        readResourceTypes(): Promise<ResourceTypeSkeleton[]>;
        updateResourceType(
            resourceTypeUuid: string,
            resourceTypeData: ResourceTypeSkeleton,
        ): Promise<ResourceTypeSkeleton>;
    }
    Index
    • Import resource types

      Parameters

      • importData: ResourceTypeExportInterface

        import data

      • OptionalresultCallback: ResultCallback<ResourceTypeSkeleton>

        Optional callback to process individual results. When given, the outcome of every resource type is passed to it once, as it happens: a resource type that was imported as the resource type (a resource type that needed no update as it is in the import data), a resource type that could not be imported as an error that names the resource type and carries the cause. Such a resource type is not part of the result and does not stop the others, and the function does not throw for it. Without it, the failures are collected and thrown as one error after every resource type was tried.

      Returns Promise<ResourceTypeSkeleton[]>

      a promise that resolves to the imported resource type objects