Normalization helpers
The normalization helpers are exported from the package root so consumers and tests can reuse the exact same logic the library uses internally. All are pure functions: any input shape in, one normalized shape out, no side effects.
1. Main-type constants
MAIN_TYPE_FOLDER // 0
MAIN_TYPE_REGISTER // 99
The two well-known mainType values (everything else is a document). See
SelectedEntry for how mainType is computed.
2. Selection caps
MAX_SELECTION_RAW_LENGTH // 65 536 characters
MAX_SELECTION_ENTRIES // 10 000 entries
The rich-client selection string is parsed under these bounds (bounded parsing): a raw string over the length cap or a parsed result over the entry cap is treated as unreadable — the normalized selection is empty and nothing is thrown. The length cap is checked first so the split never runs on hostile input.
3. Functions
| Function | Behavior |
|---|---|
|
Parses the raw rich-client selection string ( |
|
Normalizes one raw id/type pair into a |
|
Derives the enclosing |
|
Extracts the session block ( |
|
Extracts the user block ( |
|
Normalizes a webclient event payload ( |
|
Normalizes a rich-client raw payload (all-string field set) into an
|
4. RichEnvironmentInfo
The fields derivable from osjxGetEnvironment(n) reads (self-init path):
| Field | Slot | Meaning |
|---|---|---|
|
10 |
Client version (may carry a trailing space) |
|
— |
GUI language short code ( |
|
3 |
User login name |
|
14 |
Full user name |
|
16 |
User e-mail |
|
18 |
User GUID |
|
27 |
Current session GUID |