diff --git a/api/@ohos.request.d.ts b/api/@ohos.request.d.ts index 765fb4a1efd14d35e050b1d8625ac883640f7b2c..c8c6a7accfa42528e4e430cec0c8e472d7b9988b 100644 --- a/api/@ohos.request.d.ts +++ b/api/@ohos.request.d.ts @@ -2807,6 +2807,38 @@ declare namespace request { text?: string; } + /** + * Options of the minimum speed of the task. + * + * @typedef MinSpeed + * @syscap SystemCapability.Request.FileTransferAgent + * @since 20 + */ + interface MinSpeed { + /** + * The minimum speed of the task, in bytes per second. + * If the speed of the task is lower than this value for a period of time, the task fails. + * If the value is set to 0, no minimum speed limit will be activated. + * If not specified, this value is set to 0. + * + * @type { ?number } + * @syscap SystemCapability.Request.FileTransferAgent + * @since 20 + */ + speed?: number; + /** + * Duration of the speed which is allowed to be below the minimum speed, in seconds. + * If the speed of the task is lower than this value for a period of time, the task fails. + * If the value is set to 0, no minimum speed limit will be activated. + * If not specified, this value is set to 0. + * + * @type { ?number } + * @syscap SystemCapability.Request.FileTransferAgent + * @since 20 + */ + duration?: number; + } + /** * The configurations for a task. * Using a flexible configuration for clear upload and download functions. @@ -3370,6 +3402,14 @@ declare namespace request { * @since 15 */ notification?: Notification; + /** + * Customizes the minimum speed of the task. + * + * @type { ?MinSpeed } + * @syscap SystemCapability.Request.FileTransferAgent + * @since 20 + */ + minSpeed?: MinSpeed; } /** @@ -3799,7 +3839,14 @@ declare namespace request { * @atomicservice * @since 12 */ - REDIRECT = 0x80 + REDIRECT = 0x80, + /** + * Indicates the speed of the task is too slow. + * + * @syscap SystemCapability.Request.FileTransferAgent + * @since 20 + */ + LOW_SPEED = 0x90 } /**