Skip to content

Configuration Scheme

The configuration is structured as a hierarchical object that controls various aspects of the SDK's behavior, appearance, and functionality. The configuration is designed to be flexible and extensible, allowing for customization of features, UI elements, and behavior.

Configuration

Configuration {
  auth: Auth // (1)!
  userInterface: UserInterface // (2)!
  features: Features // (3)!
  analytics: Analytics | null // (4)!
  debugSettings: DebugSettings // (5)!
}
  1. Required to authenticate Aiuta SDK to use API with your credentials. Supported authentication methods are ApiKey or Jwt + subscriptionId.

  2. Configuration of the user interface presentation style, swipe-to-dismiss policy, and UI components themes for the Aiuta SDK.

  3. Describes the set of features enabled in the SDK for the user and thier interaction with the app.

  4. Allows to receive analytics events from the SDK and send them to your analytics provider.

  5. Controls the logging settings and validation policies for various parameters.

Default configuration

The configuration itself, as well as all themes and most features, have built-in defaults on each platform. You decide how much detail you want to customize the behavior and appearance of the SDK. Starting with a few necessary parameters, ending with every aspect that is provided in the described schemes.

The minimum configuration for the fastest integration with the standard set of features and default UI requires only the following:

Platform specifics

Check out the details and nuances of the configuration in the implementation of the platform you need:

Sequence Diagram

Initialization process from launching the app to displaying products, including SDK configuration.

sequenceDiagram
    autonumber
    actor USR as ⠀<br>User
    participant APP as Your<br>App
    participant BE as Your<br>Backend
    participant SDK as Aiuta<br>SDK
    participant API as Aiuta<br>Backend
    participant GS as Storage
    note over GS: Aiuta or Yours

    USR->>APP: Launch the App
    par
        APP->>SDK: Initialize with Configuration

        activate SDK
        Note over APP,SDK: Includes auth, UI, features, analytics
        SDK->>API: Request internal configuration
        API-->>SDK: Internal configuration
        opt predefined models feature
            SDK->>API: Request predefined models
            API-->>SDK: Predefined models collection
        end
        deactivate SDK
    and
        APP->>BE: Load products
        BE-->>APP: Products
        Note over APP,BE: Including a flag whether<br>a virtual try-on is available
        APP-->>USR: Show products
        Note over APP,USR: Including a try-on button for<br>products with try-on feature
    end

Please note in 8 – 9 that you should obtain information about the availability of the virtual try-on feature for each of your products from your backend, as the SDK does not receive information about product availability and will attempt to launch a virtual try-on with any product you provide, which may result in an error if that product has not been trained by Aiuta.