Appearance
staff.me
3 methods on staff.me. Each returns the answer's data and throws NoviqaError on a failed answer.
preferences
GET
/admin/v1/me/preferencesGet the own desk
The signed-in staff member's desk document (columns, layouts, panels, options), kept on the server so every device shows the same. The content is the terminal's own JSON object. Never saved: content {} and version 0.
Returns
Promise<Settings>The answer's
data.Errors
401
auth.session_expired: session expired, sign in again403
auth.invalid_terminal: this terminal cannot be used here403
auth.otp_enrol_required: your group requires one-time codes: set them up to continue403
auth.password_change_required: you must change your password first500
internal: something went wrongts
import { staff } from "@/lib/noviqa"
const data = await staff.me.preferences()bash
curl -X GET "$NOVIQA_API_URL/admin/v1/me/preferences" \
-H "Authorization: Bearer $NOVIQA_TOKEN"json
{
"success": true,
"code": "ok",
"message": "done",
"data": {
"content": null,
"updated_at": "2026-09-25T10:15:00Z",
"version": 1
},
"request_id": "5b7f2c1e"
}ts
staff.me.preferences(options?: RequestOptions): Promise<chart.Settings>updatePreferences
PUT
/admin/v1/me/preferencesSave the own desk
Replaces the desk document. content must be a JSON object of at most 256 KiB. expected_version is the version you last read: when the stored one differs the save is refused (conflict); 0 overwrites whatever is stored. Answers the saved document with its new version.
Request body
contentanyAny JSON value.
expected_versionintegerReturns
Promise<Settings>The answer's
data.Errors
400
invalid_input: invalid input401
auth.session_expired: session expired, sign in again403
auth.csrf_invalid: request refused: reload the page and try again403
auth.invalid_terminal: this terminal cannot be used here403
auth.otp_enrol_required: your group requires one-time codes: set them up to continue403
auth.password_change_required: you must change your password first409
conflict: already exists500
internal: something went wrongts
import { staff } from "@/lib/noviqa"
const data = await staff.me.updatePreferences({
content: {
columns: {
accounts: [
"login",
"name",
"balance"
]
}
},
expected_version: 3
})bash
curl -X PUT "$NOVIQA_API_URL/admin/v1/me/preferences" \
-H "Authorization: Bearer $NOVIQA_TOKEN" \
-H "Content-Type: application/json" \
--data-raw '{
"content": {
"columns": {
"accounts": [
"login",
"name",
"balance"
]
}
},
"expected_version": 3
}'json
{
"success": true,
"code": "ok",
"message": "done",
"data": {
"content": null,
"updated_at": "2026-09-25T10:15:00Z",
"version": 1
},
"request_id": "5b7f2c1e"
}ts
staff.me.updatePreferences(body: chart.Body, options?: RequestOptions): Promise<chart.Settings>patchPreferences
PATCH
/admin/v1/me/preferencesChange part of the own desk
Merges the top-level keys of content into the stored desk document: a key with value null is removed, every other key is replaced whole, keys you leave out stay. expected_version as for the full save (0 merges into whatever is stored). The merged document must stay within 256 KiB. Answers the saved document with its new version.
Request body
contentanyAny JSON value.
expected_versionintegerReturns
Promise<Settings>The answer's
data.Errors
400
invalid_input: invalid input401
auth.session_expired: session expired, sign in again403
auth.csrf_invalid: request refused: reload the page and try again403
auth.invalid_terminal: this terminal cannot be used here403
auth.otp_enrol_required: your group requires one-time codes: set them up to continue403
auth.password_change_required: you must change your password first409
conflict: already exists500
internal: something went wrongts
import { staff } from "@/lib/noviqa"
const data = await staff.me.patchPreferences({
content: {
old_layout: null,
panels: {
journal: true
}
},
expected_version: 0
})bash
curl -X PATCH "$NOVIQA_API_URL/admin/v1/me/preferences" \
-H "Authorization: Bearer $NOVIQA_TOKEN" \
-H "Content-Type: application/json" \
--data-raw '{
"content": {
"old_layout": null,
"panels": {
"journal": true
}
},
"expected_version": 0
}'json
{
"success": true,
"code": "ok",
"message": "done",
"data": {
"content": null,
"updated_at": "2026-09-25T10:15:00Z",
"version": 1
},
"request_id": "5b7f2c1e"
}ts
staff.me.patchPreferences(body: chart.Body, options?: RequestOptions): Promise<chart.Settings>