This interface gives access to all resources assigned to this product template.

Hierarchy

  • Resources

Properties

Global resources allow to retrieve global settings for the product.

The info resource allows to retrieve information about the Infigo storefront in general.

Methods

  • Returns the media item which represents the avatar image for the current customer (if any). The avatar image is managed via the customer account page and is always available in the special album which is hidden from the UI.

    Parameters

    • callback: ((item) => void)

      The callback function that will be called once the media item is retrieved. If no avatar image is available, the callback will be called with null.

    Returns void

  • Retrieve all background categories.

    Parameters

    • callback: ((categories) => void)

      The callback function that will be called once the categories are retrieved.

    Returns void

  • Retrieve all background items within a category.

    Parameters

    • categoryOrId: string | BackgroundCategory

      The background category or the id.

    • callback: ((items) => void)

      The callback function that will be called once the background items are retrieved.

    Returns void

  • Retrieve all configured clipart albums.

    Parameters

    • callback: ((albums) => void)

      The callback function that will be called once the albums are retrieved.

        • (albums): void
        • Parameters

          Returns void

    Returns void

  • Shortcut helper function to retrieve a clipart item directly in a single call by the names of the clipart album and the clipart item.

    Parameters

    • albumName: string

      The name of the clipart album for the item to retrieve.

    • itemName: string

      The name of the clipart item to retrieve.

    • callback: ((item) => void)

      The callback function that will be called once the clipart item is retrieved. If the item is not found, the callback will be called with null.

        • (item): void
        • Parameters

          Returns void

    Returns void

  • Retrieve all clipart items within an album.

    Parameters

    • albumOrId: string | ClipartAlbum

      The clipart album or the id.

    • callback: ((items) => void)

      The callback function that will be called once the clipart items are retrieved.

        • (items): void
        • Parameters

          Returns void

    Returns void

  • Create a new media album with the given name. The name must be unique per user and the process will fail if the name is already in use.

    Parameters

    • name: string

      The new name of the media album.

    • callback: ((album) => void)

      The callback function that will be called once the album is created. The callback will be called with the newly created album object.

        • (album): void
        • Parameters

          Returns void

    Returns void

  • Deletes the media item with the given id. Note that not all media items can be deleted and the response should be checked.

    Parameters

    • id: number

      The media item id to delete.

    • Optional callback: ((response) => void)

      Callback function that will be called once the media item is deleted.

    Returns void

  • Load all available fonts for the current setup.

    Parameters

    • callback: ((fonts) => void)

      The callback function that will be called once the fonts are retrieved.

        • (fonts): void
        • Parameters

          Returns void

    Returns void

  • Retrieve all layout categories, optionally filtered by a page tag. You can tag layouts to be available for specific pages only via the template configuration. Those prefiltered lists can be retrieved via this method.

    Parameters

    • callback: ((categories) => void)

      The layout categories are returned via the callback function.

        • (categories): void
        • Parameters

          Returns void

    • Optional tag: string

      If not specified all layout categories are returned. Otherwise it will be the ones linked ot that specified page tag

    Returns void

  • Retrieve the layout items within the category.

    Parameters

    • albumOrId: string | LayoutCategory

      The layout category or the id.

    • callback: ((items) => void)

      The callback function that will be called once the layout items are retrieved.

        • (items): void
        • Parameters

          Returns void

    Returns void

  • Load all mask albums. Mask albums are used for image fields.

    Parameters

    • callback: ((albums) => void)

      The callback function that will be called once the albums are retrieved.

        • (albums): void
        • Parameters

          Returns void

    Returns void

  • Load all mask items within a mask album.

    Parameters

    • albumOrId: string | MaskAlbum

      The mask album or the id.

    • callback: ((items) => void)

      The callback function that will be called once the mask items are retrieved.

        • (items): void
        • Parameters

          Returns void

    Returns void

  • Retrieve all available media albums the user has access to. There are hidden albums which are not shown in the UI. By default this method will not return those, but via an additional flag they can be included. There is always at least one hidden album for special media (e.g. Avatar images).

    Parameters

    • callback: ((albums) => void)

      The callback function that will be called once the albums are retrieved.

        • (albums): void
        • Parameters

          Returns void

    • Optional includeHidden: boolean

      Optional flag, if set to true, hidden albums will be included in the result. Default value is false.

    Returns void

  • Retrieve child media items for a given media item. This is used for multi page images (e.g. PDF files) when extracting all pages is enabled. Then the first page will be the default media item within the album, the subsequent pages will be child items.

    Parameters

    • media: UserMediaItem

      The parent media item - aka the first page

    • callback: ((items) => void)

      Returns the child media items for the given parent media item. If this is only a single page document, the callback will be called with an empty array.

    Returns void

  • Retrieve all media items within a given album, optionally filtered by the given filter object.

    Parameters

    • albumOrId: string | MediaAlbum

      The album object or id to retrieve the media items for.

    • callback: ((items) => void)

      The callback function that will be called once the media items are retrieved.

    • Optional filter: MediaItemFilter

      Optional filter object to filter the media items.

    Returns void

  • Load all placeholder categories. Placeholder categories are used for image fields to render an image if the field has no value. Currently a product can have only one placeholder category to be used within the UI.

    Parameters

    • callback: ((albums) => void)

      The callback function that will be called once the categories are retrieved.

    Returns void

  • Load all placeholder items within a placeholder category.

    Parameters

    • albumOrId: string | PlaceholderCategory

      The placeholder category or the id.

    • callback: ((items) => void)

      The callback function that will be called once the items are retrieved.

    Returns void

  • Returns the special album - a hidden album used for internal media items like avatar images.

    Parameters

    • callback: ((album) => void)

      The callback function that will be called once the album is retrieved.

        • (album): void
        • Parameters

          Returns void

    Returns void

  • Retrieve all spot color albums.

    Parameters

    • callback: ((albums) => void)

      The callback function that will be called once the albums are retrieved.

    Returns void

  • Retrieve all spot color items within an album..

    Parameters

    • albumOrId: string | SpotColorAlbum

      The spot color album or id.

    • callback: ((items) => void)

      The callback function that will be called once the spot colors are retrieved.

    Returns void

  • Uploads a media item directly. The item is fully specified in this call via:

    • the file name
    • the mime type
    • the base64 encoded data

    The same upload restrictions apply as for the regular upload.

    Parameters

    • albumOrId: number | MediaAlbum

      The album to upload the media item to.

    • mimeType: string

      The mime type of the file. E.g. 'image/gif', 'image/jpeg', 'image/png', 'application/pdf', etc.

    • base64Data: string

      The base 64 encoded data of the image to upload.

    • fileName: string

      The filename of the image to upload.

    • callback: ((result) => void)

      The callback will be called once the upload is finished. The callback will be called with the newly created media item or null if it failed. It will also optionally contain a preflight info object.

    Returns void

  • Upload a media item. This triggers the upload dialog for a single upload. This will upload into the default album.

    The editor supports the following file types:

    • PNG
    • BMP
    • JPEG
    • GIF
    • TIFF
    • PDF

    Parameters

    • albumOrId: number | MediaAlbum

      [Unsupported]: the album parameter is currently not supported.

    • callback: ((mediaItem?, preflightInfo?) => void)

      The callback will be called once the upload is finished. The callback will be called with the newly created media item or null if it failed. It will also optionally contain a preflight info object.

        • (mediaItem?, preflightInfo?): void
        • Parameters

          Returns void

    Returns void

  • Uploads multiple media items. This triggers the upload dialog for multiple uploads. This will upload into the default album. Preflight info is not available for this method.

    The same upload restrictions apply as for the regular upload.

    Parameters

    • callback: ((mediaItems) => void)

      The callback will be called once the upload is finished. The callback will be called with the newly created media items or an empty array.

        • (mediaItems): void
        • Parameters

          Returns void

    Returns void

  • This returns all media items in the currently selected album. If the user changes the current album, this method will return the new items.

    Parameters

    • callback: ((items) => void)

      The callback function that will be called once the media items are retrieved. Same output as MediaItems.

    Returns void

Generated using TypeDoc