feat(scripts): add typed Parameters.Get<T>() helpers for script API
Replace raw dictionary casting with ScriptParameters wrapper that provides Get<T>, Get<T?>, Get<T[]>, and Get<List<T>> with clear error messages, numeric conversion, and JsonElement support for Inbound API parameters.
This commit is contained in:
@@ -156,6 +156,10 @@ Inbound API scripts **cannot** call shared scripts directly — shared scripts a
|
||||
- **Input parameters** are available as defined in the method definition.
|
||||
- **Return value** construction matching the defined return structure.
|
||||
|
||||
#### Parameter Access
|
||||
- `Parameters["key"]` — Raw dictionary access.
|
||||
- `Parameters.Get<T>("key")` — Typed access (same API as site runtime scripts). See Site Runtime component for full type support.
|
||||
|
||||
#### Database Access
|
||||
- `Database.Connection("connectionName")` — Obtain a raw MS SQL client connection for querying the configuration or machine data databases directly from central.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user