• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2022-2023 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 *     http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16/**
17 * @file
18 * @kit FormKit
19 */
20
21import { AsyncCallback } from './@ohos.base';
22import formBindingData from './@ohos.app.form.formBindingData';
23/*** if arkts 1.1 */
24import formInfo from './@ohos.app.form.formInfo';
25/*** endif */
26import Want from './@ohos.app.ability.Want';
27
28/**
29 * Interface of formProvider.
30 *
31 * @namespace formProvider
32 * @syscap SystemCapability.Ability.Form
33 * @since 9
34 */
35/**
36 * Interface of formProvider.
37 *
38 * @namespace formProvider
39 * @syscap SystemCapability.Ability.Form
40 * @atomicservice
41 * @since arkts {'1.1':'11', '1.2':'20'}
42 * @arkts 1.1&1.2
43 */
44declare namespace formProvider {
45  /**
46   * Set next update time for a specified form.
47   *
48   * @param { string } formId - Indicates the form ID.
49   * @param { number } minute - Indicates duration minute before next update.
50   * @param { AsyncCallback<void> } callback - The callback of setFormNextRefreshTime.
51   * @throws { BusinessError } 401 - Parameter error. Possible causes:
52   *     1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed.
53   * @throws { BusinessError } 16500050 - An IPC connection error happened.
54   * @throws { BusinessError } 16500060 - A service connection error happened, please try again later.
55   * @throws { BusinessError } 16500100 - Failed to obtain the configuration information.
56   * @throws { BusinessError } 16501000 - An internal functional error occurred.
57   * @throws { BusinessError } 16501001 - The ID of the form to be operated does not exist.
58   * @throws { BusinessError } 16501002 - The number of forms exceeds upper bound.
59   * @throws { BusinessError } 16501003 - The form can not be operated by the current application.
60   * @syscap SystemCapability.Ability.Form
61   * @since 9
62   */
63  /**
64   * Set next update time for a specified form.
65   *
66   * @param { string } formId - Indicates the form ID.
67   * @param { number } minute - Indicates duration minute before next update.
68   * @param { AsyncCallback<void> } callback - The callback of setFormNextRefreshTime.
69   * @throws { BusinessError } 401 - Parameter error. Possible causes:
70   *     1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed.
71   * @throws { BusinessError } 16500050 - IPC connection error.
72   * @throws { BusinessError } 16500060 - Service connection error.
73   * @throws { BusinessError } 16500100 - Failed to obtain the configuration information.
74   * @throws { BusinessError } 16501000 - An internal functional error occurred.
75   * @throws { BusinessError } 16501001 - The ID of the form to be operated does not exist.
76   * @throws { BusinessError } 16501002 - The number of forms exceeds the maximum allowed.
77   * @throws { BusinessError } 16501003 - The form cannot be operated by the current application.
78   * @syscap SystemCapability.Ability.Form
79   * @atomicservice
80   * @since arkts {'1.1':'11', '1.2':'20'}
81   * @arkts 1.1&1.2
82   */
83  function setFormNextRefreshTime(formId: string, minute: number, callback: AsyncCallback<void>): void;
84
85  /**
86   * Set next update time for a specified form.
87   *
88   * @param { string } formId - Indicates the form ID.
89   * @param { number } minute - Indicates duration minute before next update.
90   * @returns { Promise<void> } The promise returned by the function.
91   * @throws { BusinessError } 401 - Parameter error. Possible causes:
92   *     1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed.
93   * @throws { BusinessError } 16500050 - An IPC connection error happened.
94   * @throws { BusinessError } 16500060 - A service connection error happened, please try again later.
95   * @throws { BusinessError } 16500100 - Failed to obtain the configuration information.
96   * @throws { BusinessError } 16501000 - An internal functional error occurred.
97   * @throws { BusinessError } 16501001 - The ID of the form to be operated does not exist.
98   * @throws { BusinessError } 16501002 - The number of forms exceeds upper bound.
99   * @throws { BusinessError } 16501003 - The form can not be operated by the current application.
100   * @syscap SystemCapability.Ability.Form
101   * @since 9
102   */
103  /**
104   * Set next update time for a specified form.
105   *
106   * @param { string } formId - Indicates the form ID.
107   * @param { number } minute - Indicates duration minute before next update.
108   * @returns { Promise<void> } The promise returned by the function.
109   * @throws { BusinessError } 401 - Parameter error. Possible causes:
110   *     1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed.
111   * @throws { BusinessError } 16500050 - IPC connection error.
112   * @throws { BusinessError } 16500060 - Service connection error.
113   * @throws { BusinessError } 16500100 - Failed to obtain the configuration information.
114   * @throws { BusinessError } 16501000 - An internal functional error occurred.
115   * @throws { BusinessError } 16501001 - The ID of the form to be operated does not exist.
116   * @throws { BusinessError } 16501002 - The number of forms exceeds the maximum allowed.
117   * @throws { BusinessError } 16501003 - The form cannot be operated by the current application.
118   * @syscap SystemCapability.Ability.Form
119   * @atomicservice
120   * @since arkts {'1.1':'11', '1.2':'20'}
121   * @arkts 1.1&1.2
122   */
123  function setFormNextRefreshTime(formId: string, minute: number): Promise<void>;
124
125  /**
126   * Update a specified form.
127   * Client to communication with FormManagerService.
128   *
129   * @param { string } formId - Indicates the form ID.
130   * @param { formBindingData.FormBindingData } formBindingData - Indicates the form data.
131   * @param { AsyncCallback<void> } callback - The callback of updateForm.
132   * @throws { BusinessError } 401 - Parameter error. Possible causes:
133   *     1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed.
134   * @throws { BusinessError } 16500050 - An IPC connection error happened.
135   * @throws { BusinessError } 16500060 - A service connection error happened, please try again later.
136   * @throws { BusinessError } 16500100 - Failed to obtain the configuration information.
137   * @throws { BusinessError } 16501000 - An internal functional error occurred.
138   * @throws { BusinessError } 16501001 - The ID of the form to be operated does not exist.
139   * @throws { BusinessError } 16501003 - The form can not be operated by the current application.
140   * @syscap SystemCapability.Ability.Form
141   * @since 9
142   */
143  /**
144   * Update a specified form.
145   * Client to communication with FormManagerService.
146   *
147   * @param { string } formId - Indicates the form ID.
148   * @param { formBindingData.FormBindingData } formBindingData - Indicates the form data.
149   * @param { AsyncCallback<void> } callback - The callback of updateForm.
150   * @throws { BusinessError } 401 - Parameter error. Possible causes:
151   *     1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed.
152   * @throws { BusinessError } 16500050 - IPC connection error.
153   * @throws { BusinessError } 16500060 - Service connection error.
154   * @throws { BusinessError } 16500100 - Failed to obtain the configuration information.
155   * @throws { BusinessError } 16501000 - An internal functional error occurred.
156   * @throws { BusinessError } 16501001 - The ID of the form to be operated does not exist.
157   * @throws { BusinessError } 16501003 - The form cannot be operated by the current application.
158   * @syscap SystemCapability.Ability.Form
159   * @atomicservice
160   * @since 11
161   */
162  function updateForm(
163    formId: string,
164    formBindingData: formBindingData.FormBindingData,
165    callback: AsyncCallback<void>
166  ): void;
167
168  /**
169   * Update a specified form.
170   * Client to communication with FormManagerService.
171   *
172   * @param { string } formId - Indicates the form ID.
173   * @param { formBindingData.FormBindingData } formBindingData - Indicates the form data.
174   * @returns { Promise<void> } The promise returned by the function.
175   * @throws { BusinessError } 401 - Parameter error. Possible causes:
176   *     1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed.
177   * @throws { BusinessError } 16500050 - An IPC connection error happened.
178   * @throws { BusinessError } 16500060 - A service connection error happened, please try again later.
179   * @throws { BusinessError } 16500100 - Failed to obtain the configuration information.
180   * @throws { BusinessError } 16501000 - An internal functional error occurred.
181   * @throws { BusinessError } 16501001 - The ID of the form to be operated does not exist.
182   * @throws { BusinessError } 16501003 - The form can not be operated by the current application.
183   * @syscap SystemCapability.Ability.Form
184   * @since 9
185   */
186  /**
187   * Update a specified form.
188   * Client to communication with FormManagerService.
189   *
190   * @param { string } formId - Indicates the form ID.
191   * @param { formBindingData.FormBindingData } formBindingData - Indicates the form data.
192   * @returns { Promise<void> } The promise returned by the function.
193   * @throws { BusinessError } 401 - Parameter error. Possible causes:
194   *     1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed.
195   * @throws { BusinessError } 16500050 - IPC connection error.
196   * @throws { BusinessError } 16500060 - Service connection error.
197   * @throws { BusinessError } 16500100 - Failed to obtain the configuration information.
198   * @throws { BusinessError } 16501000 - An internal functional error occurred.
199   * @throws { BusinessError } 16501001 - The ID of the form to be operated does not exist.
200   * @throws { BusinessError } 16501003 - The form cannot be operated by the current application.
201   * @syscap SystemCapability.Ability.Form
202   * @atomicservice
203   * @since 11
204   */
205  function updateForm(formId: string, formBindingData: formBindingData.FormBindingData): Promise<void>;
206
207  /**
208   * Get info of all forms belonging to current bundle.
209   * Client to communication with FormManagerService.
210   *
211   * @param { formInfo.FormInfoFilter } filter - Indicates the requirements the forms that the formInfos belong to have to meet.
212   * @param { AsyncCallback<Array<formInfo.FormInfo>> } callback - The callback is used to return the formInfo.
213   * @throws { BusinessError } 401 - Parameter error. Possible causes:
214   *     1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed.
215   * @throws { BusinessError } 16500050 - An IPC connection error happened.
216   * @throws { BusinessError } 16500100 - Failed to obtain the configuration information.
217   * @throws { BusinessError } 16501000 - An internal functional error occurred.
218   * @syscap SystemCapability.Ability.Form
219   * @since 9
220   */
221  /**
222   * Get info of all forms belonging to current bundle.
223   * Client to communication with FormManagerService.
224   *
225   * @param { formInfo.FormInfoFilter } filter - Indicates the requirements the forms that the formInfos belong to have to meet.
226   * @param { AsyncCallback<Array<formInfo.FormInfo>> } callback - The callback is used to return the formInfo.
227   * @throws { BusinessError } 401 - Parameter error. Possible causes:
228   *     1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed.
229   * @throws { BusinessError } 16500050 - IPC connection error.
230   * @throws { BusinessError } 16500100 - Failed to obtain the configuration information.
231   * @throws { BusinessError } 16501000 - An internal functional error occurred.
232   * @syscap SystemCapability.Ability.Form
233   * @atomicservice
234   * @since 11
235   */
236  function getFormsInfo(filter: formInfo.FormInfoFilter, callback: AsyncCallback<Array<formInfo.FormInfo>>): void;
237
238  /**
239   * Get infos of all forms belonging to current bundle.
240   * Client to communication with FormManagerService.
241   *
242   * @param { AsyncCallback<Array<formInfo.FormInfo>> } callback - The callback is used to return the formInfo.
243   * @throws { BusinessError } 401 - Parameter error. Possible causes:
244   *     1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed.
245   * @throws { BusinessError } 16500050 - An IPC connection error happened.
246   * @throws { BusinessError } 16500100 - Failed to obtain the configuration information.
247   * @throws { BusinessError } 16501000 - An internal functional error occurred.
248   * @syscap SystemCapability.Ability.Form
249   * @since 9
250   */
251  /**
252   * Get infos of all forms belonging to current bundle.
253   * Client to communication with FormManagerService.
254   *
255   * @param { AsyncCallback<Array<formInfo.FormInfo>> } callback - The callback is used to return the formInfo.
256   * @throws { BusinessError } 401 - Parameter error. Possible causes:
257   *     1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed.
258   * @throws { BusinessError } 16500050 - IPC connection error.
259   * @throws { BusinessError } 16500100 - Failed to obtain the configuration information.
260   * @throws { BusinessError } 16501000 - An internal functional error occurred.
261   * @syscap SystemCapability.Ability.Form
262   * @atomicservice
263   * @since 11
264   */
265  function getFormsInfo(callback: AsyncCallback<Array<formInfo.FormInfo>>): void;
266
267  /**
268   * Get infos of all forms belonging to current bundle.
269   * Client to communication with FormManagerService.
270   *
271   * @param { formInfo.FormInfoFilter } [filter] - Indicates the requirements the forms that the formInfos belong to have to meet.
272   * @returns { Promise<Array<formInfo.FormInfo>> } Returns the formInfo.
273   * @throws { BusinessError } 401 - Parameter error. Possible causes:
274   *     1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed.
275   * @throws { BusinessError } 16500050 - An IPC connection error happened.
276   * @throws { BusinessError } 16500100 - Failed to obtain the configuration information.
277   * @throws { BusinessError } 16501000 - An internal functional error occurred.
278   * @syscap SystemCapability.Ability.Form
279   * @since 9
280   */
281  /**
282   * Get infos of all forms belonging to current bundle.
283   * Client to communication with FormManagerService.
284   *
285   * @param { formInfo.FormInfoFilter } [filter] - Indicates the requirements the forms that the formInfos belong to have to meet.
286   * @returns { Promise<Array<formInfo.FormInfo>> } Returns the formInfo.
287   * @throws { BusinessError } 401 - Parameter error. Possible causes:
288   *     1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed.
289   * @throws { BusinessError } 16500050 - IPC connection error.
290   * @throws { BusinessError } 16500100 - Failed to obtain the configuration information.
291   * @throws { BusinessError } 16501000 - An internal functional error occurred.
292   * @syscap SystemCapability.Ability.Form
293   * @atomicservice
294   * @since 11
295   */
296  function getFormsInfo(filter?: formInfo.FormInfoFilter): Promise<Array<formInfo.FormInfo>>;
297
298  /**
299   * Request to publish a form to the form host.
300   *
301   * @param { Want } want - The want of the form to publish.
302   * @param { formBindingData.FormBindingData } formBindingData - Indicates the form data.
303   * @param { AsyncCallback<string> } callback - The callback is used to return the form id.
304   * @throws { BusinessError } 202 - The application is not a system application.
305   * @throws { BusinessError } 401 - Parameter error. Possible causes:
306   *     1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed.
307   * @throws { BusinessError } 16500050 - IPC connection error.
308   * @throws { BusinessError } 16500100 - Failed to obtain the configuration information.
309   * @throws { BusinessError } 16501000 - An internal functional error occurred.
310   * @syscap SystemCapability.Ability.Form
311   * @systemapi
312   * @since 9
313   */
314  function requestPublishForm(
315    want: Want,
316    formBindingData: formBindingData.FormBindingData,
317    callback: AsyncCallback<string>
318  ): void;
319
320  /**
321   * Request to publish a form to the form host.
322   *
323   * @param { Want } want - The want of the form to publish.
324   * @param { AsyncCallback<string> } callback - The callback is used to return the form id.
325   * @throws { BusinessError } 202 - The application is not a system application.
326   * @throws { BusinessError } 401 - Parameter error. Possible causes:
327   *     1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed.
328   * @throws { BusinessError } 16500050 - IPC connection error.
329   * @throws { BusinessError } 16500100 - Failed to obtain the configuration information.
330   * @throws { BusinessError } 16501000 - An internal functional error occurred.
331   * @syscap SystemCapability.Ability.Form
332   * @systemapi
333   * @since 9
334   */
335  function requestPublishForm(want: Want, callback: AsyncCallback<string>): void;
336
337  /**
338   * Request to publish a form to the form host.
339   *
340   * @param { Want } want - The want of the form to publish.
341   * @param { formBindingData.FormBindingData } [formBindingData] - Indicates the form data.
342   * @returns { Promise<string> } Returns the form id.
343   * @throws { BusinessError } 202 - The application is not a system application.
344   * @throws { BusinessError } 401 - Parameter error. Possible causes:
345   *     1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed.
346   * @throws { BusinessError } 16500050 - IPC connection error.
347   * @throws { BusinessError } 16500100 - Failed to obtain the configuration information.
348   * @throws { BusinessError } 16501000 - An internal functional error occurred.
349   * @syscap SystemCapability.Ability.Form
350   * @systemapi
351   * @since 9
352   */
353  function requestPublishForm(want: Want, formBindingData?: formBindingData.FormBindingData): Promise<string>;
354
355  /**
356   * Check if the request of publishing a form is supported by the host
357   *
358   * @param { AsyncCallback<boolean> } callback - The callback is used to return true if the request is supported.
359   * @throws { BusinessError } 202 - The application is not a system application.
360   * @throws { BusinessError } 401 - Parameter error. Possible causes:
361   *     1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed.
362   * @throws { BusinessError } 16500050 - IPC connection error.
363   * @throws { BusinessError } 16501000 - An internal functional error occurred.
364   * @syscap SystemCapability.Ability.Form
365   * @systemapi
366   * @since 9
367   */
368  function isRequestPublishFormSupported(callback: AsyncCallback<boolean>): void;
369
370  /**
371   * Check if the request of publishing a form is supported by the host
372   *
373   * @returns { Promise<boolean> } Returns true if the request is supported.
374   * @throws { BusinessError } 202 - The application is not a system application.
375   * @throws { BusinessError } 16500050 - IPC connection error.
376   * @throws { BusinessError } 16501000 - An internal functional error occurred.
377   * @syscap SystemCapability.Ability.Form
378   * @systemapi
379   * @since 9
380   */
381  function isRequestPublishFormSupported(): Promise<boolean>;
382
383  /**
384   * Get infos of the published form belonging to current bundle.
385   * Client to communicate with FormManagerService.
386   *
387   * @param { string } formId - Indicates the form ID.
388   * @returns { Promise<formInfo.FormInfo> } Returns the formInfo.
389   * @throws { BusinessError } 16500050 - IPC connection error.
390   * @throws { BusinessError } 16500100 - Failed to obtain the configuration information.
391   * @throws { BusinessError } 16501000 - An internal functional error occurred.
392   * @syscap SystemCapability.Ability.Form
393   * @atomicservice
394   * @since 18
395   * @deprecated since 20
396   * @useinstead getPublishedRunningFormInfoById
397   */
398  function getPublishedFormInfoById(formId: string): Promise<formInfo.FormInfo>;
399
400  /**
401   * Get infos of all published forms belonging to current bundle.
402   * Client to communicate with FormManagerService.
403   *
404   * @returns { Promise<Array<formInfo.FormInfo>> } Returns published formInfo belongs to the caller
405   * @throws { BusinessError } 16500050 - IPC connection error.
406   * @throws { BusinessError } 16500100 - Failed to obtain the configuration information.
407   * @throws { BusinessError } 16501000 - An internal functional error occurred.
408   * @syscap SystemCapability.Ability.Form
409   * @atomicservice
410   * @since 18
411   * @deprecated since 20
412   * @useinstead getPublishedRunningFormInfos
413   */
414  function getPublishedFormInfos(): Promise<Array<formInfo.FormInfo>>;
415
416  /**
417   * Get running form info by form id belonging to the current bundle.
418   *
419   * @param { string } formId - Indicates the form ID.
420   * @returns { Promise<formInfo.RunningFormInfo> } Returns the running formInfo.
421   * @throws { BusinessError } 16500050 - IPC connection error.
422   * @throws { BusinessError } 16500100 - Failed to obtain the configuration information.
423   * @throws { BusinessError } 16501000 - An internal functional error occurred.
424   * @throws { BusinessError } 16501001 - The ID of the form to be operated does not exist.
425   * @throws { BusinessError } 16501003 - The form cannot be operated by the current application.
426   * @syscap SystemCapability.Ability.Form
427   * @atomicservice
428   * @since 20
429   */
430  function getPublishedRunningFormInfoById(formId: string): Promise<formInfo.RunningFormInfo>;
431
432  /**
433   * Get running form infos of all published forms belonging to current bundle.
434   *
435   * @returns { Promise<Array<formInfo.RunningFormInfo>> } Returns published running formInfo belongs to the caller
436   * @throws { BusinessError } 16500050 - IPC connection error.
437   * @throws { BusinessError } 16500100 - Failed to obtain the configuration information.
438   * @throws { BusinessError } 16501000 - An internal functional error occurred.
439   * @syscap SystemCapability.Ability.Form
440   * @atomicservice
441   * @since 20
442   */
443  function getPublishedRunningFormInfos(): Promise<Array<formInfo.RunningFormInfo>>
444
445  /**
446   * Open the view of forms belonging to current bundle.
447   * Client to communication with FormManagerService.
448   *
449   * @param { Want } want - The want of the form to open.
450   * @throws { BusinessError } 16500050 - IPC connection error.
451   * @throws { BusinessError } 16500100 - Failed to obtain the configuration information.
452   * @throws { BusinessError } 16501000 - An internal functional error occurred.
453   * @syscap SystemCapability.Ability.Form
454   * @atomicservice
455   * @since 18
456   */
457  function openFormManager(want: Want): void;
458
459  /**
460   * Open the view of forms belonging to the specified bundle.
461   * Client to communication with FormManagerService.
462   *
463   * @permission ohos.permission.PUBLISH_FORM_CROSS_BUNDLE
464   * @param { Want } want - The want of the form to open.
465   * @throws { BusinessError } 201 - Permissions denied.
466   * @throws { BusinessError } 202 - The application is not a system application.
467   * @throws { BusinessError } 801 - Capability not supported.
468   * @throws { BusinessError } 16500050 - IPC connection error.
469   * @syscap SystemCapability.Ability.Form
470   * @systemapi
471   * @since 20
472   */
473  function openFormManagerCrossBundle(want: Want): void
474
475  /**
476   * Open the form edit ability
477   *
478   * @param { string } abilityName - Indicates the form edit ability name.
479   * @param { string } formId - Indicates the edit form ID.
480   * @param { boolean } isMainPage - Indicates open the main edit page, default is true
481   *
482   * @throws { BusinessError } 801 - Capability not supported.function openFormEditAbility can not work correctly due to limited device capabilities.
483   * @throws { BusinessError } 16500050 - IPC connection error.
484   * @throws { BusinessError } 16500100 - Failed to obtain the configuration information.
485   * @throws { BusinessError } 16501000 - An internal functional error occurred.
486   * @throws { BusinessError } 16501003 - The form cannot be operated by the current application.
487   * @throws { BusinessError } 16501007 - Form is not trust.
488   * @syscap SystemCapability.Ability.Form
489   * @since 18
490   */
491  function openFormEditAbility(abilityName: string, formId: string, isMainPage?: boolean): void;
492
493  /**
494   * Activate scene animation
495   *
496   * @param { string } formId - Indicates the edit form ID.
497   * @returns { Promise<void> } The promise returned by the function.
498   * @throws { BusinessError } 202 - The application is not a system application.
499   * @throws { BusinessError } 801 - Capability not supported.function activateSceneAnimation
500   *     can not work correctly due to limited device capabilities.
501   * @throws { BusinessError } 16500050 - IPC connection error.
502   * @throws { BusinessError } 16500060 - Service connection error.
503   * @throws { BusinessError } 16500100 - Failed to obtain the configuration information.
504   * @throws { BusinessError } 16501000 - An internal functional error occurred.
505   * @throws { BusinessError } 16501001 - The ID of the form to be operated does not exist.
506   * @throws { BusinessError } 16501003 - The form can not be operated by the current application.
507   * @throws { BusinessError } 16501011 - The form can not support this operation.
508   * @syscap SystemCapability.Ability.Form
509   * @systemapi
510   * @since 20
511   */
512  function activateSceneAnimation(formId: string): Promise<void>;
513
514  /**
515   * Deactivate scene animation
516   *
517   * @param { string } formId - Indicates the edit form ID.
518   * @returns { Promise<void> } The promise returned by the function.
519   * @throws { BusinessError } 202 - The application is not a system application.
520   * @throws { BusinessError } 801 - Capability not supported.function deactivateSceneAnimation can
521   *     not work correctly due to limited device capabilities.
522   * @throws { BusinessError } 16500050 - IPC connection error.
523   * @throws { BusinessError } 16500060 - Service connection error.
524   * @throws { BusinessError } 16500100 - Failed to obtain the configuration information.
525   * @throws { BusinessError } 16501000 - An internal functional error occurred.
526   * @throws { BusinessError } 16501001 - The ID of the form to be operated does not exist.
527   * @throws { BusinessError } 16501003 - The form can not be operated by the current application.
528   * @throws { BusinessError } 16501011 - The form can not support this operation.
529   * @syscap SystemCapability.Ability.Form
530   * @systemapi
531   * @since 20
532   */
533  function deactivateSceneAnimation(formId: string): Promise<void>;
534
535  /**
536   * Request form's overflow animation
537   *
538   * @param { string } formId - Indicates the edit form ID.
539   * @param { formInfo.OverflowInfo } overflowInfo - Indicates the overflow information.
540   * @returns { Promise<void> } The promise returned by the function.
541   * @throws { BusinessError } 801 - Capability not supported.function requestOverflow can
542   *     not work correctly due to limited device capabilities.
543   * @throws { BusinessError } 16500050 - IPC connection error.
544   * @throws { BusinessError } 16500060 - Service connection error.
545   * @throws { BusinessError } 16500100 - Failed to obtain the configuration information.
546   * @throws { BusinessError } 16501000 - An internal functional error occurred.
547   * @throws { BusinessError } 16501001 - The ID of the form to be operated does not exist.
548   * @throws { BusinessError } 16501003 - The form can not be operated by the current application.
549   * @throws { BusinessError } 16501011 - The form can not support this operation.
550   * @syscap SystemCapability.Ability.Form
551   * @atomicservice
552   * @since 20
553   */
554  function requestOverflow(formId: string, overflowInfo: formInfo.OverflowInfo): Promise<void>;
555
556  /**
557   * Cancel form's overflow animation
558   *
559   * @param { string } formId - Indicates the edit form ID.
560   * @returns { Promise<void> } The promise returned by the function.
561   * @throws { BusinessError } 801 - Capability not supported.function cancelOverflow can
562   *     not work correctly due to limited device capabilities.
563   * @throws { BusinessError } 16500050 - IPC connection error.
564   * @throws { BusinessError } 16500060 - Service connection error.
565   * @throws { BusinessError } 16500100 - Failed to obtain the configuration information.
566   * @throws { BusinessError } 16501000 - An internal functional error occurred.
567   * @throws { BusinessError } 16501001 - The ID of the form to be operated does not exist.
568   * @throws { BusinessError } 16501003 - The form can not be operated by the current application.
569   * @throws { BusinessError } 16501011 - The form can not support this operation.
570   * @syscap SystemCapability.Ability.Form
571   * @atomicservice
572   * @since 20
573   */
574  function cancelOverflow(formId: string): Promise<void>;
575
576  /**
577   * Get form rect belonging to current bundle
578   *
579   * @param { string } formId
580   *
581   * @returns { Promise<formInfo.Rect> }
582   * @throws { BusinessError } 801 - Capability not supported.function getFormRect can not work correctly
583   *    due to limited device capabilities.
584   * @throws { BusinessError } 16500050 - IPC connection error.
585   * @throws { BusinessError } 16500060 - Service connection error.
586   * @throws { BusinessError } 16500100 - Failed to obtain the configuration information.
587   * @throws { BusinessError } 16501000 - An internal functional error occurred.
588   * @throws { BusinessError } 16501001 - The ID of the form to be operated does not exist.
589   * @throws { BusinessError } 16501003 - The form cannot be operated by the current application.
590   * @syscap SystemCapability.Ability.Form
591   * @atomicservice
592   * @since 20
593   */
594  function getFormRect(formId: string): Promise<formInfo.Rect>;
595}
596export default formProvider;
597