Business IntelliSense
RDT can configure your workspace with full TypeScript IntelliSense for the LIDS Scripting API and JSON Schema validation for business-service configuration files. This gives you autocompletion, type checking, hover documentation, and validation directly in your editor.
What You Get
After setup, your workspace gains:
- Type definitions for the
apiglobal object — the LIDS Scripting API with 25+ sub-modules - Autocompletion and hover documentation in JavaScript/TypeScript business scripts
- Auto-imports enabled for SAMO-specific types
- JSON Schema validation for business-service entity, service, message, connector, and tenant configs
How to Set Up
- Click the Copilot status bar item (bottom-right of VS Code)
- Select Setup IntelliSense Config (or Update IntelliSense Config if already configured)
- A progress notification walks through the setup steps
- On completion,
samo.d.tsopens in the editor so you can browse the API
Screenshot needed
The Copilot status bar Quick Pick menu showing the IntelliSense setup option
If the configuration already exists, the menu shows Update instead of Setup. Re-running updates the type definitions and schemas to the latest version bundled with the extension. Existing custom settings in .vscode/settings.json are preserved.
LIDS Scripting API Type Definitions
The setup copies samo.d.ts (3,300+ lines of TypeScript declarations) into your workspace's .vscode/ directory. This file declares the global api object that is available in all LIDS business scripts.
Common Types
The type definitions also provide shared types used across the API:
| Type | Values / Description |
|---|---|
EntityRef | Entity reference with type and ID |
HttpMethod | GET, POST, PUT, DELETE, PATCH, HEAD, OPTIONS |
ContentType | application/json, application/xml, text/plain, text/html, application/pdf, etc. |
FailLevel | warning, error, fatal |
JSON Schema Validation
The setup configures VS Code to validate business-service JSON configuration files against 5 schemas:
| File Pattern | Schema | What It Validates |
|---|---|---|
**/business-service/entities/**/*.json | entities_schema.json | Entity definitions, state management, triggers, actions, workflows |
**/business-service/services/**/*.json | services_schema.json | Service definitions, inheritance, triggers, actions |
**/business-service/messages/**/*.json | messages_schema.json | Message and notification definitions |
**/business-service/tenants/**/*.json | tenant_schema.json | Multi-tenant configuration |
**/business-service/connectors/**/*.json | connectors_schema.json | External data connector configuration |
What It Looks Like
After setup, editing a business-service JSON file gives you:
- Property autocompletion — press
Ctrl+Spaceto see valid fields - Type validation — ensures values match expected types
- Required field checking — flags missing mandatory properties
- Red squiggles on invalid or unknown properties
GIF needed
JSON schema validation in a business-service entity file — autocompletion and error highlighting
What Gets Created
After a successful setup, these files exist in your workspace:
<workspace>/
└── .vscode/
├── samo.d.ts # LIDS Scripting API type definitions
└── settings.json # Updated with schema associations + auto-import settings
Settings Added
The following settings are merged into .vscode/settings.json:
{
"json.schemas": [
{ "fileMatch": ["**/business-service/entities/**/*.json"], "url": "..." },
{ "fileMatch": ["**/business-service/services/**/*.json"], "url": "..." },
{ "fileMatch": ["**/business-service/messages/**/*.json"], "url": "..." },
{ "fileMatch": ["**/business-service/tenants/**/*.json"], "url": "..." },
{ "fileMatch": ["**/business-service/connectors/**/*.json"], "url": "..." }
],
"typescript.preferences.includePackageJsonAutoImports": "on",
"typescript.suggest.autoImports": true,
"typescript.suggest.includeAutomaticOptionalChainCompletions": true,
"javascript.suggest.autoImports": true,
"javascript.preferences.includePackageJsonAutoImports": "on"
}
Duplicate schema entries are automatically deduplicated by URL.
Troubleshooting
| Problem | Solution |
|---|---|
No autocompletion on api.* | Verify .vscode/samo.d.ts exists. Re-run setup if missing. |
| No validation on business-service JSON files | Check .vscode/settings.json for json.schemas entries. Re-run setup. |
| Stale type definitions | Run Update IntelliSense Config from the Copilot menu to get the latest bundled version. |
| Setup option not visible | Ensure a workspace folder is open. The Copilot status bar shows a warning if no workspace is detected. |