mirror of
https://gitee.com/openharmony/interface_sdk-js
synced 2024-10-07 14:13:45 +00:00
commit
ac3f570f05
20
api/@ohos.app.form.formHost.d.ts
vendored
20
api/@ohos.app.form.formHost.d.ts
vendored
@ -1021,6 +1021,26 @@ declare namespace formHost {
|
||||
*/
|
||||
function clearRouterProxy(formIds: Array<string>): Promise<void>;
|
||||
|
||||
/**
|
||||
* Set result of publish form.
|
||||
*
|
||||
* @permission ohos.permission.REQUIRE_FORM
|
||||
* @param { string } formId - Indicates the form id.
|
||||
* @param { formInfo.PublishFormResult } result - The result of publish form.
|
||||
* @throws { BusinessError } 201 - Permissions denied.
|
||||
* @throws { BusinessError } 202 - caller is not system app.
|
||||
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
|
||||
* @throws { BusinessError } 16500050 - An IPC connection error happened.
|
||||
* @throws { BusinessError } 16500060 - A service connection error happened, please try again later.
|
||||
* @throws { BusinessError } 16501000 - An internal functional error occurred.
|
||||
* @throws { BusinessError } 16501001 - The ID of the form to be operated does not exist.
|
||||
* @syscap SystemCapability.Ability.Form
|
||||
* @systemapi
|
||||
* @stagemodelonly
|
||||
* @since 12
|
||||
*/
|
||||
function setPublishFormResult(formId: string, result: formInfo.PublishFormResult): void;
|
||||
|
||||
/**
|
||||
* Set permanent dynamic ArkTS forms recyclable, they will be recycled when memory is low.
|
||||
*
|
||||
|
84
api/@ohos.app.form.formInfo.d.ts
vendored
84
api/@ohos.app.form.formInfo.d.ts
vendored
@ -1324,6 +1324,90 @@ declare namespace formInfo {
|
||||
FORM_SHARE
|
||||
}
|
||||
|
||||
/**
|
||||
* The result of publish form.
|
||||
*
|
||||
* @typedef PublishFormResult
|
||||
* @syscap SystemCapability.Ability.Form
|
||||
* @systemapi
|
||||
* @stagemodelonly
|
||||
* @since 12
|
||||
*/
|
||||
interface PublishFormResult {
|
||||
/**
|
||||
* The error code.
|
||||
*
|
||||
* @type { PublishFormErrorCode }
|
||||
* @syscap SystemCapability.Ability.Form
|
||||
* @systemapi
|
||||
* @stagemodelonly
|
||||
* @since 12
|
||||
*/
|
||||
code: PublishFormErrorCode;
|
||||
|
||||
/**
|
||||
* The message.
|
||||
*
|
||||
* @type { string }
|
||||
* @syscap SystemCapability.Ability.Form
|
||||
* @systemapi
|
||||
* @stagemodelonly
|
||||
* @since 12
|
||||
*/
|
||||
message: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* The error code of publish form.
|
||||
*
|
||||
* @enum { number }
|
||||
* @syscap SystemCapability.Ability.Form
|
||||
* @systemapi
|
||||
* @stagemodelonly
|
||||
* @since 12
|
||||
*/
|
||||
enum PublishFormErrorCode {
|
||||
/**
|
||||
* Publish form success.
|
||||
*
|
||||
* @syscap SystemCapability.Ability.Form
|
||||
* @systemapi
|
||||
* @stagemodelonly
|
||||
* @since 12
|
||||
*/
|
||||
SUCCESS,
|
||||
|
||||
/**
|
||||
* Host has no space to publish form.
|
||||
*
|
||||
* @syscap SystemCapability.Ability.Form
|
||||
* @systemapi
|
||||
* @stagemodelonly
|
||||
* @since 12
|
||||
*/
|
||||
NO_SPACE,
|
||||
|
||||
/**
|
||||
* Check param failed.
|
||||
*
|
||||
* @syscap SystemCapability.Ability.Form
|
||||
* @systemapi
|
||||
* @stagemodelonly
|
||||
* @since 12
|
||||
*/
|
||||
PARAM_ERROR,
|
||||
|
||||
/**
|
||||
* Internal error occurs during form processing.
|
||||
*
|
||||
* @syscap SystemCapability.Ability.Form
|
||||
* @systemapi
|
||||
* @stagemodelonly
|
||||
* @since 12
|
||||
*/
|
||||
INTERNAL_ERROR,
|
||||
}
|
||||
|
||||
/**
|
||||
* Information about a running form.
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user