@mendix/extensions-api - v0.9.0
    Preparing search index...

    Type Alias CustomBlobDocumentRegistrationOptions<TBlob>

    Properties of a new custom blob document type

    type CustomBlobDocumentRegistrationOptions<TBlob extends object = object> = {
        consistencyCheckRegistration?: ConsistencyCheckRegistration<TBlob>;
        defaultContent: TBlob;
        deserializationCallback?: (data: string) => Promise<TBlob | undefined>;
        readableTypeName?: string;
        serializationCallback?: (blob: TBlob) => Promise<string | undefined>;
        type: string;
    }

    Type Parameters

    • TBlob extends object = object
    Index

    Properties

    consistencyCheckRegistration?: ConsistencyCheckRegistration<TBlob>

    Optional array of consistency checks that will be run on documents of this type

    defaultContent: TBlob

    The content that will be used when user creates new document of this type.

    deserializationCallback?: (data: string) => Promise<TBlob | undefined>

    Optional function that will be called to convert the string back to the document contents. Defaults to JSON.parse

    readableTypeName?: string

    Human readable name for the document type. This will be shown in error logs related to this document type and in the UI. If it is not present, defaults to CustomBlobDocumentRegistrationOptions.type

    serializationCallback?: (blob: TBlob) => Promise<string | undefined>

    Optional function that will be called to convert the document contents to a string. Defaults to JSON.stringify

    type: string

    New document type being registered used to identify the custom document in Studio Pro. Must be unique. It is of the form . (e.g. MyCompany.MyDocumentType) where both the namespace and type are valid identifiers.