Skip to main content

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 api global 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

  1. Click the Copilot status bar item (bottom-right of VS Code)
  2. Select Setup IntelliSense Config (or Update IntelliSense Config if already configured)
  3. A progress notification walks through the setup steps
  4. On completion, samo.d.ts opens in the editor so you can browse the API

Screenshot needed

The Copilot status bar Quick Pick menu showing the IntelliSense setup option

info

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:

TypeValues / Description
EntityRefEntity reference with type and ID
HttpMethodGET, POST, PUT, DELETE, PATCH, HEAD, OPTIONS
ContentTypeapplication/json, application/xml, text/plain, text/html, application/pdf, etc.
FailLevelwarning, error, fatal

JSON Schema Validation

The setup configures VS Code to validate business-service JSON configuration files against 5 schemas:

File PatternSchemaWhat It Validates
**/business-service/entities/**/*.jsonentities_schema.jsonEntity definitions, state management, triggers, actions, workflows
**/business-service/services/**/*.jsonservices_schema.jsonService definitions, inheritance, triggers, actions
**/business-service/messages/**/*.jsonmessages_schema.jsonMessage and notification definitions
**/business-service/tenants/**/*.jsontenant_schema.jsonMulti-tenant configuration
**/business-service/connectors/**/*.jsonconnectors_schema.jsonExternal data connector configuration

What It Looks Like

After setup, editing a business-service JSON file gives you:

  • Property autocompletion — press Ctrl+Space to 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

ProblemSolution
No autocompletion on api.*Verify .vscode/samo.d.ts exists. Re-run setup if missing.
No validation on business-service JSON filesCheck .vscode/settings.json for json.schemas entries. Re-run setup.
Stale type definitionsRun Update IntelliSense Config from the Copilot menu to get the latest bundled version.
Setup option not visibleEnsure a workspace folder is open. The Copilot status bar shows a warning if no workspace is detected.