/** @packageDocumentation * @module Settings */ import { AuthorizedClientRequestContext } from "./AuthorizedClientRequestContext"; /** Possible values for SettingsResults.status * @alpha */ export declare enum SettingsStatus { SETTINGS_ERROR_BASE = 110592, /** The specified setting was successfully saved, deleted, or retrieved. */ Success = 0, /** Access to the specified setting was blocked. */ AuthorizationError = 110593, /** The Url for the setting is not properly formed. Check the characters in the setting name. */ UrlError = 110594, /** An invalid projectId was specified. */ ProjectInvalid = 110595, /** An invalid iModelId was specified. */ IModelInvalid = 110596, /** The setting specified for deletion or retrieval does not exist. */ SettingNotFound = 110597, /** The settings server malfunctioned. */ ServerError = 110598, /** An unexpected error occurred. */ UnknownError = 110600 } /** The result of the SettingsAdmin methods to save, retrieve, and delete settings. * These are constructed by the SettingsAdmin methods and examined by applications. * @alpha */ export declare class SettingsResult { status: SettingsStatus; errorMessage?: string | undefined; setting?: any; /** Construct a new SettingsResult. SettingsResult objects are created by the SettingsAdmin methods. * @internal * @param status The result of the settings method. * @param errorMessage An error message that is sometimes returned by the server. * @param setting The object returned by the "get" Settings methods. */ constructor(status: SettingsStatus, errorMessage?: string | undefined, setting?: any); } /** The result of the SettingsAdmin methods to retrieve all settings by namespace. * These are constructed by the SettingsAdmin "getxxxByNamespace" methods and examined by applications. * @alpha */ export declare class SettingsMapResult { status: SettingsStatus; errorMessage?: string | undefined; settingsMap?: Map | undefined; /** Construct a new SettingsResult. SettingsResult objects are created by the SettingsAdmin methods. * @internal * @param status The result of the settings method. * @param errorMessage An error message that is sometimes returned by the server. * @param settingsMap A Map of name to property objects. */ constructor(status: SettingsStatus, errorMessage?: string | undefined, settingsMap?: Map | undefined); } /** Methods available to save and get Settings objects on behalf of combinations of the Application, Project, iModel, and User * @alpha */ export interface SettingsAdmin { /** Saves a user-specific settings object to the settings service. * @param requestContext The client request context. * @param settings The object to be saved. It is saved as a JSON string. * @param namespace A program-supplied namespace that is used to organize settings and prevent name collisions. * @param name The name of the setting. Acceptable characters are alphanumeric and the period character. * @param applicationSpecific Specifies whether the setting is specific to the current application, or used by all applications. * @param projectId The wsgId of the Project, if the settings is specific to a project, otherwise undefined. * @param iModelId The wsgId of the iModel, if the setting is specific to an iModel, otherwise undefined. The projectId must be specified if iModelId is specified. * @return The result of the save operation. The setting member is undefined for save operations. */ saveUserSetting(requestContext: AuthorizedClientRequestContext, settings: any, namespace: string, name: string, applicationSpecific: boolean, projectId?: string, iModelId?: string): Promise; /** Retrieves a user-specific settings object from the settings service. * @param requestContext The client request context. * @param namespace A program-supplied namespace that is used to organize settings and prevent name collisions. * @param name The name of the setting. Acceptable characters are alphanumeric and the period character. * @param applicationSpecific Specifies whether the setting is specific to the current application, or used by all applications. * @param projectId The wsgId of the Project, if the settings is specific to a project, otherwise undefined. * @param iModelId The wsgId of the iModel, if the setting is specific to an iModel, otherwise undefined. The projectId must be specified if iModelId is specified. * @return The result of the retrieval operation. The setting member contains the setting if the operation succeeds. */ getUserSetting(requestContext: AuthorizedClientRequestContext, namespace: string, name: string, applicationSpecific: boolean, projectId?: string, iModelId?: string): Promise; /** Deletes a user-specific settings object from the settings service. * @param namespace A program-supplied namespace that is used to organize settings and prevent name collisions. * @param name The name of the setting. Acceptable characters are alphanumeric and the period character. * @param applicationSpecific Specifies whether the setting is specific to the current application, or used by all applications. * @param projectId The wsgId of the Project, if the settings is specific to a project, otherwise undefined. * @param iModelId The wsgId of the iModel, if the setting is specific to an iModel, otherwise undefined. The projectId must be specified if iModelId is specified. * @return The result of the save operation. The setting member is undefined for delete operations. If the setting specified for deletion * does not exists, the SettingsResult.status is SettingsStatus.SettingNotFound. */ deleteUserSetting(requestContext: AuthorizedClientRequestContext, namespace: string, name: string, applicationSpecific: boolean, projectId?: string, iModelId?: string): Promise; /** Retrieves an array of user-specific settings objects that are stored with the specified namespace * @param requestContext The client request context. * @param namespace A program - supplied namespace that is used to organize settings and prevent name collisions. * @param applicationSpecific Specifies whether the setting is specific to the current application, or used by all applications. * @param projectId The wsgId of the Project, to retrieve settings specific to a project, otherwise undefined. * @param iModelId The wsgId of the iModel, to retrieve settings specific to an iModel, otherwise undefined. The projectId must be specified if iModelId is specified. * @return The result of the retrieval operation. If successful, SettingsResult.settingsMap contains a map of string to settings values containing all of the settings stored with the specified namespace. */ getUserSettingsByNamespace(requestContext: AuthorizedClientRequestContext, namespace: string, applicationSpecific: boolean, projectId?: string, iModelId?: string): Promise; /** Saves a shared settings object to the settings service. * @param requestContext The client request context. * @param settings The object to be saved. It is saved as a JSON string. * @param namespace A program-supplied namespace that is used to organize settings and prevent name collisions. * @param name The name of the setting. Acceptable characters are alphanumeric and the period character. * @param applicationSpecific Specifies whether the setting is specific to the current application, or used by all applications. * @param projectId The wsgId of the Project, if the settings is specific to a project, otherwise undefined. * @param iModelId The wsgId of the iModel, if the setting is specific to an iModel, otherwise undefined. The projectId must be specified if iModelId is specified. * @return The result of the save operation. The setting member is undefined for save operations. */ saveSharedSetting(requestContext: AuthorizedClientRequestContext, settings: any, namespace: string, name: string, applicationSpecific: boolean, projectId: string, iModelId?: string): Promise; /** Retrieves a shared settings object from the settings service. * @param requestContext The client request context. * @param namespace A program-supplied namespace that is used to organize settings and prevent name collisions. * @param name The name of the setting. Acceptable characters are alphanumeric and the period character. * @param applicationSpecific Specifies whether the setting is specific to the current application, or used by all applications. * @param projectId The wsgId of the Project (required for Shared Setting). * @param iModelId The wsgId of the iModel, if the setting is specific to an iModel, otherwise undefined. * @return The result of the retrieval operation. The setting member contains the setting if the operation succeeds. */ getSharedSetting(requestContext: AuthorizedClientRequestContext, namespace: string, name: string, applicationSpecific: boolean, projectId: string, iModelId?: string): Promise; /** Deletes a shared settings object from the settings service. * @param namespace A program-supplied namespace that is used to organize settings and prevent name collisions. * @param name The name of the setting. Acceptable characters are alphanumeric and the period character. * @param applicationSpecific Specifies whether the setting is specific to the current application, or used by all applications. * @param projectId The wsgId of the Project (required for Shared Setting). * @param iModelId The wsgId of the iModel, if the setting is specific to an iModel, otherwise undefined. * @return The result of the save operation. The setting member is undefined for delete operations. If the setting specified for deletion * does not exists, the SettingsResult.status is SettingsStatus.SettingNotFound. */ deleteSharedSetting(requestContext: AuthorizedClientRequestContext, namespace: string, name: string, applicationSpecific: boolean, projectId: string, iModelId?: string): Promise; /** Retrieves an array of shared settings objects that are stored with the specified namespace * @param requestContext The client request context. * @param namespace A program - supplied namespace that is used to organize settings and prevent name collisions. * @param applicationSpecific Specifies whether the setting is specific to the current application, or used by all applications. * @param projectId The wsgId of the Project (required for Shared Setting). * @param iModelId The wsgId of the iModel, to retrieve settings specific to an iModel, otherwise undefined. * @return The result of the retrieval operation. If successful, SettingsResult.settingsMap contains a map of string to settings values containing all of the settings stored with the specified namespace. */ getSharedSettingsByNamespace(requestContext: AuthorizedClientRequestContext, namespace: string, applicationSpecific: boolean, projectId: string, iModelId?: string): Promise; /** Saves a non-user-specific settings object to the settings service. * @param requestContext The client request context. * @param settings The object to be saved. It is saved as a JSON string. * @param namespace A program-supplied namespace that is used to organize settings and prevent name collisions. * @param name The name of the setting. Acceptable characters are alphanumeric and the period character. * @param applicationSpecific Specifies whether the setting is specific to the current application, or used by all applications. * @param projectId The wsgId of the Project, if the settings is specific to a project, otherwise undefined. * @param iModelId The wsgId of the iModel, if the setting is specific to an iModel, otherwise undefined. The projectId must be specified if iModelId is specified. * @return The result of the save operation. The setting member is undefined for save operations. * @note The logged in user must have the appropriate permissions to save a non-user-specific setting. */ saveSetting(requestContext: AuthorizedClientRequestContext, settings: any, namespace: string, name: string, applicationSpecific: boolean, projectId?: string, iModelId?: string): Promise; /** Retrieves a non-user-specific settings object from the settings service. * @param requestContext The client request context. * @param namespace A program-supplied namespace that is used to organize settings and prevent name collisions. * @param name The name of the setting. Acceptable characters are alphanumeric and the period character. * @param applicationSpecific Specifies whether the setting is specific to the current application, or used by all applications. * @param projectId The wsgId of the Project, if the settings is specific to a project, otherwise undefined. * @param iModelId The wsgId of the iModel, if the setting is specific to an iModel, otherwise undefined. The projectId must be specified if iModelId is specified. * @return The result of the retrieval operation. The setting member contains the setting if the operation succeeds. */ getSetting(requestContext: AuthorizedClientRequestContext, namespace: string, name: string, applicationSpecific: boolean, projectId?: string, iModelId?: string): Promise; /** Deletes a non-user-specific settings object from the settings service. * @param requestContext The client request context. * @param namespace A program-supplied namespace that is used to organize settings and prevent name collisions. * @param name The name of the setting. Acceptable characters are alphanumeric and the period character. * @param applicationSpecific Specifies whether the setting is specific to the current application, or used by all applications. * @param projectId The wsgId of the Project, if the settings is specific to a project, otherwise undefined. * @param iModelId The wsgId of the iModel, if the setting is specific to an iModel, otherwise undefined. The projectId must be specified if iModelId is specified. * @return The result of the save operation. The setting member is undefined for delete operations. If the setting specified for deletion * does not exists, the SettingsResult.status is SettingsStatus.SettingNotFound. * @note The logged in user must have the appropriate permissions to delete a non-user-specific setting. */ deleteSetting(requestContext: AuthorizedClientRequestContext, namespace: string, name: string, applicationSpecific: boolean, projectId?: string, iModelId?: string): Promise; /** Retrieves an array of non-user-specific settings objects that are stored with the specified namespace * @param requestContext The client request context. * @param namespace A program - supplied namespace that is used to organize settings and prevent name collisions. * @param applicationSpecific Specifies whether the setting is specific to the current application, or used by all applications. * @param projectId The wsgId of the Project, to retrieve settings specific to a project, otherwise undefined. * @param iModelId The wsgId of the iModel, to retrieve settings specific to an iModel, otherwise undefined. The projectId must be specified if iModelId is specified. * @return The result of the retrieval operation. If successful, SettingsResult.settingsMap contains a map of string to settings values containing all of the settings stored with the specified namespace. */ getSettingsByNamespace(requestContext: AuthorizedClientRequestContext, namespace: string, applicationSpecific: boolean, projectId?: string, iModelId?: string): Promise; } //# sourceMappingURL=SettingsAdmin.d.ts.map