diff --git a/api/@system.request.d.ts b/api/@system.request.d.ts index 6054f120dc3c79dd9c68399a3437f19c09c8e8f6..b8a8a708907e7be8b996473b21b09c2f48a2d5e2 100644 --- a/api/@system.request.d.ts +++ b/api/@system.request.d.ts @@ -14,12 +14,12 @@ */ /** - * @syscap SystemCapability.Miscservices.Upload + * @syscap SystemCapability.MiscServices.Upload */ export interface UploadResponse { /** * Status code returned by the server. - * @syscap SystemCapability.Miscservices.Upload + * @syscap SystemCapability.MiscServices.Upload * @since 3 */ code: number; @@ -27,64 +27,64 @@ export interface UploadResponse { /** * Content returned by the server. * The value type is determined by the returned content. - * @syscap SystemCapability.Miscservices.Upload + * @syscap SystemCapability.MiscServices.Upload * @since 3 */ data: string; /** * Headers returned by the server. - * @syscap SystemCapability.Miscservices.Upload + * @syscap SystemCapability.MiscServices.Upload * @since 3 */ headers: Object; } /** - * @syscap SystemCapability.Miscservices.Download + * @syscap SystemCapability.MiscServices.Download */ export interface DownloadResponse { /** * Download token, which is used to obtain the download status. - * @syscap SystemCapability.Miscservices.Download + * @syscap SystemCapability.MiscServices.Download * @since 3 */ token: string; } /** - * @syscap SystemCapability.Miscservices.Download + * @syscap SystemCapability.MiscServices.Download */ export interface OnDownloadCompleteResponse { /** * URI of the download file. - * @syscap SystemCapability.Miscservices.Download + * @syscap SystemCapability.MiscServices.Download * @since 3 */ uri: string; } /** - * @syscap SystemCapability.Miscservices.Upload + * @syscap SystemCapability.MiscServices.Upload */ export interface RequestFile { /** * File name in the header when multipart is used. - * @syscap SystemCapability.Miscservices.Upload + * @syscap SystemCapability.MiscServices.Upload * @since 3 */ filename?: string; /** * Name of a form item when multipart is used. The default value is file. - * @syscap SystemCapability.Miscservices.Upload + * @syscap SystemCapability.MiscServices.Upload * @since 3 */ name?: string; /** * Local storage directory of a file. - * @syscap SystemCapability.Miscservices.Upload + * @syscap SystemCapability.MiscServices.Upload * @since 3 */ uri: string; @@ -92,99 +92,99 @@ export interface RequestFile { /** * Type of the file content. * By default, the type is obtained based on the suffix of the file name or URI. - * @syscap SystemCapability.Miscservices.Upload + * @syscap SystemCapability.MiscServices.Upload * @since 3 */ type?: string; } /** - * @syscap SystemCapability.Miscservices.Upload + * @syscap SystemCapability.MiscServices.Upload */ export interface RequestData { /** * Name of the form element. - * @syscap SystemCapability.Miscservices.Upload + * @syscap SystemCapability.MiscServices.Upload * @since 3 */ name: string; /** * Value of the form element. - * @syscap SystemCapability.Miscservices.Upload + * @syscap SystemCapability.MiscServices.Upload * @since 3 */ value: string; } /** - * @syscap SystemCapability.Miscservices.Upload + * @syscap SystemCapability.MiscServices.Upload */ export interface UploadRequestOptions { /** * Resource URL. - * @syscap SystemCapability.Miscservices.Upload + * @syscap SystemCapability.MiscServices.Upload * @since 3 */ url: string; /** * Form data in the request body. - * @syscap SystemCapability.Miscservices.Upload + * @syscap SystemCapability.MiscServices.Upload * @since 3 */ data?: Array; /** * List of files to upload, which is submitted through multipart/form-data. - * @syscap SystemCapability.Miscservices.Upload + * @syscap SystemCapability.MiscServices.Upload * @since 3 */ files: Array; /** * Request header. - * @syscap SystemCapability.Miscservices.Upload + * @syscap SystemCapability.MiscServices.Upload * @since 3 */ header?: Object; /** * Request methods available: POST and PUT. The default value is POST. - * @syscap SystemCapability.Miscservices.Upload + * @syscap SystemCapability.MiscServices.Upload * @since 3 */ method?: string; /** * Called when the files are uploaded successfully. - * @syscap SystemCapability.Miscservices.Upload + * @syscap SystemCapability.MiscServices.Upload * @since 3 */ success?: (data: UploadResponse) => void; /** * Called when uploading fails. - * @syscap SystemCapability.Miscservices.Upload + * @syscap SystemCapability.MiscServices.Upload * @since 3 */ fail?: (data: any, code: number) => void; /** * Called when the execution is completed. - * @syscap SystemCapability.Miscservices.Upload + * @syscap SystemCapability.MiscServices.Upload * @since 3 */ complete?: () => void; } /** - * @syscap SystemCapability.Miscservices.Download + * @syscap SystemCapability.MiscServices.Download */ export interface DownloadRequestOptions { /** * Resource URL. - * @syscap SystemCapability.Miscservices.Download + * @syscap SystemCapability.MiscServices.Download * @since 3 */ url: string; @@ -192,14 +192,14 @@ export interface DownloadRequestOptions { /** * Name of the file to downloaded. * The value is obtained from the current request or resource URL by default. - * @syscap SystemCapability.Miscservices.Download + * @syscap SystemCapability.MiscServices.Download * @since 3 */ filename?: string; /** * Request header. - * @syscap SystemCapability.Miscservices.Download + * @syscap SystemCapability.MiscServices.Download * @since 3 */ header?: string; @@ -207,61 +207,61 @@ export interface DownloadRequestOptions { /** * Download description. * The default value is the file name. - * @syscap SystemCapability.Miscservices.Download + * @syscap SystemCapability.MiscServices.Download * @since 3 */ description?: string; /** * Called when the files are successfully downloaded. - * @syscap SystemCapability.Miscservices.Download + * @syscap SystemCapability.MiscServices.Download * @since 3 */ success?: (data: DownloadResponse) => void; /** * Called when downloading fails. - * @syscap SystemCapability.Miscservices.Download + * @syscap SystemCapability.MiscServices.Download * @since 3 */ fail?: (data: any, code: number) => void; /** * Called when the execution is completed. - * @syscap SystemCapability.Miscservices.Download + * @syscap SystemCapability.MiscServices.Download * @since 3 */ complete?: () => void; } /** - * @syscap SystemCapability.Miscservices.Download + * @syscap SystemCapability.MiscServices.Download */ export interface OnDownloadCompleteOptions { /** * Token of the result returned by the download function. - * @syscap SystemCapability.Miscservices.Download + * @syscap SystemCapability.MiscServices.Download * @since 3 */ token: string; /** * Called when the downloads are successfully obtained - * @syscap SystemCapability.Miscservices.Download + * @syscap SystemCapability.MiscServices.Download * @since 3 */ success?: (data: OnDownloadCompleteResponse) => void; /** * Called when the downloads fail to be obtained. - * @syscap SystemCapability.Miscservices.Download + * @syscap SystemCapability.MiscServices.Download * @since 3 */ fail?: (data: any, code: number) => void; /** * Called when the execution is completed. - * @syscap SystemCapability.Miscservices.Download + * @syscap SystemCapability.MiscServices.Download * @since 3 */ complete?: () => void; @@ -274,21 +274,21 @@ export default class Request { /** * Upload files. * @param options Options. - * @syscap SystemCapability.Miscservices.Upload + * @syscap SystemCapability.MiscServices.Upload */ static upload(options: UploadRequestOptions): void; /** * This API is used to download files. * @param options Options. - * @syscap SystemCapability.Miscservices.Download + * @syscap SystemCapability.MiscServices.Download */ static download(options: DownloadRequestOptions): void; /** * Listens to download task status. * @param options Options. - * @syscap SystemCapability.Miscservices.Download + * @syscap SystemCapability.MiscServices.Download */ static onDownloadComplete(options: OnDownloadCompleteOptions): void; -} +} \ No newline at end of file