PreferenceApiClient
Contains all the endpoints needed to manage dynamic preferences.
Constructors
new PreferenceApiClient()
new PreferenceApiClient():
PreferenceApiClient
Returns
Methods
getAllPreferences()
static
getAllPreferences(config
?):Promise
<SCPaginatedResponse
<SCPreferenceType
>>
This endpoint retrieves all available dynamic preferences.
Parameters
Parameter | Type | Description |
---|---|---|
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
Parameter | Type | Description |
---|---|---|
id | string | 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
Parameter | Type | Description |
---|---|---|
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
Parameter | Type | Description |
---|---|---|
data | any | |
config ? | AxiosRequestConfig <any > |
Returns
Promise
<SCPreferenceType
| SCPreferenceType
[]>