@twinfinity/core
    Preparing search index...

    Interface UserSettingApCLient

    API for managing user specific settings

    interface UserSettingApCLient {
        delete(deleteUserSetting: DeleteUserSetting): Promise<Response>;
        get<T>(
            path: string,
            maxLevels?: number,
        ): Promise<TypedResponse<UserSettingListResults<T>>>;
        upsert<T>(upsertUserSetting: UpsertUserSetting<T>): Promise<Response>;
    }
    Index

    Methods

    Methods

    • Deletes the setting at the given path. An up-to-date etag must be provided in order to prevent concurrency issues

      Parameters

      Returns Promise<Response>

    • Looks for settings belonging to the current user, starting at path, and then recursively down the hierarchy.

      Example: There are settings at a a/b a/b/c

      path = 'a', maxLevels = 0 will return the setting at 'a' path = 'a', maxLevels = 1 will return the settings at 'a' and 'a/b' path = 'a', maxLevels = 2 will return the settings at 'a', 'a/b', 'a/b/c' path = 'a/b', maxLevels = 1 will return the settings at 'a/b' and 'a/b/c' path = 'b' will not return any setting

      Type Parameters

      • T

      Parameters

      • path: string

        Slash separated path to setting

      • OptionalmaxLevels: number

        Maximum recursion level when traversing the setting hierarchy. Default = 0 (current level)

      Returns Promise<TypedResponse<UserSettingListResults<T>>>

    • Set the setting at the given path. If a setting already exists at the given path, an up-to-date etag must be provided in order to prevent concurrency issues

      Type Parameters

      • T

      Parameters

      Returns Promise<Response>