Subscription Details¶
This scheme describes internal configuration / subscription details that SDK will request by calling /subscription_details.
Etag and caching
- The SDK should store the
Etagvalue from the response in local storage alongside the cached data. - On subsequent requests the SDK should include cached
Etagvalue in theif-none-matchheader. - If the configuration hasn't changed, the server will respond with a
304status code. Otherwise, it will return the updated configuration and a newEtagthat shoul be updated in the storage for the further requests.
Convert from snake_case
While API uses snake_case for field names, the SDK schemes adhere to a camelCase convention.
Scheme¶
SubscriptionDetails {
poweredBySticker: PoweredBySticker | null // (1)!
retryCounts: RetryCounts | null // (2)!
operationDelaysSequence: List<OperationDelay> | null // (3)!
}
-
Controls the behavior of the “Powered by Aiuta” label that may be present on some SDK screens (e.g. the progress animation screen).
Defaults
urlIos: null urlAndroid: null isVisible: false -
Specifies the number of additional attempts if an error occurs on a particular action before the user is shown an error telling them that something went wrong (the user can click the try again button to restart the process).
Defaults
photoUpload: 2 operationStart: 0 operationStatus: 2 resultDownload: 2 -
Sequence of delays before requesting the generation operation status.
If the sequence does not contain a value with an
infinitemode and ends before a successful result is obtained, the operation will fail with a timeout error, the user will be shown a "something went wrong" error.Defaults
[ { mode: recurring delay: 1 repeat: 4 }, { mode: recurring delay: 0.5 repeat: 20 }, { mode: infinite delay: 3 } ]
Powered By Sticker¶
PoweredBySticker {
urlIos: String | null // (1)!
urlAndroid: String | null // (2)!
isVisible: true | false | null // (3)!
}
-
URL for iOS to open by click on the "powered by" label. If not specified the label interaction is disabled.
Default is
nulland "powered by" label is not interactive. -
URL for Android to open by click on the "powered by" label. If not specified the label interaction is disabled.
Default is
nulland "powered by" label is not interactive. -
The only value to "powered by" label be visible is explicit
truein the subscription details. In any other case "powered by" is hidden.Default is
falseand "powered by" label is hidden.
Retry Counts¶
RetryCounts {
photoUpload: Int | null // (1)!
operationStart: Int | null // (2)!
operationStatus: Int | null // (3)!
resultDownload: Int | null // (4)!
}
-
Number of retries for photo uploading
2by default -
Number of network request retries to start try-on operation, has no effect if the server responds with error
0by default -
Number of network request retries per loop to check operation status, if the server responded, the number of retries will reset in the next loop after the delay in the
operationDelaysSequence2by default -
Number of retries to load the generated image
2by default
Operation Delays¶
OperationDelay {
mode: recurring // (1)!
delay: Double // (2)!
repeat: Int // (3)!
}
-
recurringdelay will be repeated a specifiedrepeatnumber of times. -
Delay in seconds before next request the operation status.
-
Number of repeates for the
recurringdelay.
OperationDelay {
mode: infinite // (1)!
delay: Double // (2)!
}
-
infinitedelay will repeat infinitely. -
Delay in seconds before next request the operation status.
Timeout error
If the sequence does not contain a value with an infinite mode and ends before a successful result is obtained, the operation will fail with a timeout error, the user will be shown a "something went wrong" error.