Services
Services group related actions together. A service is a logical container that organizes your actions under a common namespace.
Defining a Service
Services are plain objects with a name, description, and array of actions. You can define them directly or use the createServices helper for better type inference:
Note: The
createServiceshelper is optional - you can also pass the array directly (services: [...]). Similarly, you can usecreateActionsto wrap action arrays, or pass them directly - both approaches work.
Options
Example: Full Service Setup
Using Services in the Server
Invoking Actions
Once the server is running, invoke actions via POST to /api/services: