# Forge Server Usage Examples

These examples use the domain command surface exposed by the extension.
Persistence is handled by the server through SurrealDB.

## Status Check

```sqf
["status", []] call forge_server_extension_fnc_extCall params ["_status", "_ok"];
if (_ok && {_status isEqualTo "connected"}) then {
    systemChat "Forge persistence is online.";
};
```

## Actor Fetch

```sqf
private _uid = getPlayerUID player;
["actor:get", [_uid]] call forge_server_extension_fnc_extCall params ["_payload", "_ok"];
if (_ok) then {
    private _actor = fromJSON _payload;
    systemChat format ["Loaded actor %1", _actor getOrDefault ["uid", _uid]];
};
```

## Store Checkout

```sqf
private _checkout = createHashMapFromArray [
    ["requesterUid", getPlayerUID player],
    ["requesterName", name player],
    ["orgId", "default"],
    ["requesterIsDefaultOrgCeo", false],
    ["paymentMethod", "bank"],
    ["items", [
        createHashMapFromArray [
            ["classname", "FirstAidKit"],
            ["category", "item"],
            ["priceValue", 50],
            ["quantity", 2]
        ]
    ]],
    ["vehicles", []]
];

["store:checkout", [toJSON _checkout]] call forge_server_extension_fnc_extCall;
```
