diff --git a/api/@system.storage.d.ts b/api/@system.storage.d.ts index 26a49d9557e83330e13abf1b880b9f84b074ca8e..ad103508c8f40f1ea574550b0fcf264be4c05746 100644 --- a/api/@system.storage.d.ts +++ b/api/@system.storage.d.ts @@ -17,12 +17,16 @@ * @import import storage from '@system.storage'; * @since 3 * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @deprecated since 6 + * @FAModelOnly */ export interface GetStorageOptions { /** * Content index. - * For liteWearable and smartVision, the value contains a maximum of 32 characters and cannot contain special characters such as \/"*+,:;<=>?[]|\x7F. + * the value contains a maximum of 32 characters and cannot contain special characters such as \/"*+,:;<=>?[]|\x7F. * @since 3 + * @deprecated since 6 + * @FAModelOnly */ key: string; @@ -30,24 +34,32 @@ export interface GetStorageOptions { * Default value returned when the key does not exist. * If this parameter is not specified, an empty string is returned. * @since 3 + * @deprecated since 6 + * @FAModelOnly */ default?: string; /** * Called when the stored content is read successfully. * @since 3 + * @deprecated since 6 + * @FAModelOnly */ success?: (data: any) => void; /** * Called when the stored content fails to be read. * @since 3 + * @deprecated since 6 + * @FAModelOnly */ fail?: (data: string, code: number) => void; /** * Called when the execution is completed. * @since 3 + * @deprecated since 6 + * @FAModelOnly */ complete?: () => void; } @@ -56,36 +68,48 @@ export interface GetStorageOptions { * @import import storage from '@system.storage'; * @since 3 * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @deprecated since 6 + * @FAModelOnly */ export interface SetStorageOptions { /** * Index of the stored content to be modified. - * For liteWearable and smartVision, the value contains a maximum of 32 characters and cannot contain special characters such as \/"*+,:;<=>?[]|\x7F. + * the value contains a maximum of 32 characters and cannot contain special characters such as \/"*+,:;<=>?[]|\x7F. * @since 3 + * @deprecated since 6 + * @FAModelOnly */ key: string; /** - * Target storage content. If the content is an empty string, the data item with the key as the index will be deleted. + * Target storage content. * @since 3 + * @deprecated since 6 + * @FAModelOnly */ value: string; /** * Called when the stored content is modified successfully. * @since 3 + * @deprecated since 6 + * @FAModelOnly */ success?: () => void; /** * Called when the stored content fails to be modified. * @since 3 + * @deprecated since 6 + * @FAModelOnly */ fail?: (data: string, code: number) => void; /** * Called when the execution is completed. * @since 3 + * @deprecated since 6 + * @FAModelOnly */ complete?: () => void; } @@ -94,23 +118,31 @@ export interface SetStorageOptions { * @import import storage from '@system.storage'; * @since 3 * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @deprecated since 6 + * @FAModelOnly */ export interface ClearStorageOptions { /** * Called when the stored content is cleared successfully. * @since 3 + * @deprecated since 6 + * @FAModelOnly */ success?: () => void; /** * Called when the stored content fails to be cleared. * @since 3 + * @deprecated since 6 + * @FAModelOnly */ fail?: (data: string, code: number) => void; /** * Called when the execution is completed. * @since 3 + * @deprecated since 6 + * @FAModelOnly */ complete?: () => void; } @@ -118,31 +150,41 @@ export interface ClearStorageOptions { /** * @import import storage from '@system.storage'; * @since 3 + * @deprecated since 6 + * @FAModelOnly * @syscap SystemCapability.DistributedDataManager.Preferences.Core */ export interface DeleteStorageOptions { /** * Content index. - * For liteWearable and smartVision, the value contains a maximum of 32 characters and cannot contain special characters such as \/"*+,:;<=>?[]|\x7F. + * the value contains a maximum of 32 characters and cannot contain special characters such as \/"*+,:;<=>?[]|\x7F. * @since 3 + * @deprecated since 6 + * @FAModelOnly */ key: string; /** * Called when the stored content is deleted successfully. * @since 3 + * @deprecated since 6 + * @FAModelOnly */ success?: () => void; /** * Called when the stored content fails to be deleted. * @since 3 + * @deprecated since 6 + * @FAModelOnly */ fail?: (data: string, code: number) => void; /** * Called when the execution is completed. * @since 3 + * @deprecated since 6 + * @FAModelOnly */ complete?: () => void; } @@ -151,29 +193,39 @@ export interface DeleteStorageOptions { * @import import storage from '@system.storage'; * @since 3 * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @deprecated since 6 + * @FAModelOnly */ export default class Storage { /** * Reads the stored content. * @param options Options. + * @deprecated since 6 + * @FAModelOnly */ static get(options: GetStorageOptions): void; /** * Modifies the stored content. * @param options Options. + * @deprecated since 6 + * @FAModelOnly */ static set(options: SetStorageOptions): void; /** * Clears the stored content. * @param options Options. + * @deprecated since 6 + * @FAModelOnly */ static clear(options?: ClearStorageOptions): void; /** * Deletes the stored content. * @param options Options. + * @deprecated since 6 + * @FAModelOnly */ static delete(options: DeleteStorageOptions): void; }