Skip to main content

PreferenceApiClient

Contains all the endpoints needed to manage dynamic preferences.

Constructors

new PreferenceApiClient()

new PreferenceApiClient(): PreferenceApiClient

Returns

PreferenceApiClient

Methods

getAllPreferences()

static getAllPreferences(config?): Promise <SCPaginatedResponse<SCPreferenceType>>

This endpoint retrieves all available dynamic preferences.

Parameters

ParameterTypeDescription
config?AxiosRequestConfig<any>

Returns

Promise <SCPaginatedResponse<SCPreferenceType>>

Source

services/preference/index.ts:29


getSpecificPreference()

static getSpecificPreference(id, config?): Promise<SCPreferenceType>

This endpoint retrieves a specific dynamic preference.

Parameters

ParameterTypeDescription
idstring | number
config?AxiosRequestConfig<any>

Returns

Promise<SCPreferenceType>

Source

services/preference/index.ts:62


searchPreferences()

static searchPreferences(search?, section?, keys?, ordering?, config?): Promise <SCPaginatedResponse<SCPreferenceType>>

This endpoint searches dynamic preferences.

Parameters

ParameterTypeDescription
search?string
section?string
keys?string
ordering?string
config?AxiosRequestConfig<any>

Returns

Promise <SCPaginatedResponse<SCPreferenceType>>

Source

services/preference/index.ts:41


updatePreferences()

static updatePreferences(data, config?): Promise<SCPreferenceType | SCPreferenceType[]>

This endpoint patches one or more dynamic preferences.

Parameters

ParameterTypeDescription
dataany
config?AxiosRequestConfig<any>

Returns

Promise<SCPreferenceType | SCPreferenceType[]>

Source

services/preference/index.ts:71