SDK Packages
Overview
The Kinotic TypeScript SDK is organized into several packages, each providing a focused set of functionality. All packages are published under the @kinotic-ai scope.
@kinotic-ai/core
Core connectivity, service proxying, events, and CRUD abstractions. This is the foundation package required by all Kinotic applications.
Key Exports
| Export | Description |
|---|---|
Kinotic | Main entry point for connecting to a Kinotic server |
ConnectionInfo | Connection configuration (host, port, headers) |
ConnectedInfo | Information about the established connection |
IServiceRegistry | Interface for the service registry |
ServiceRegistry | Service registry implementation |
IEventBus | Interface for the event bus |
EventBus | Event bus implementation |
CRI | Kinotic Resource Identifier interface |
createCRI | Factory function for creating CRI instances |
CrudServiceProxy | Generic CRUD service proxy |
ICrudServiceProxy | CRUD service proxy interface |
Page | Paginated result container |
Pageable | Pagination request parameters |
IterablePage | Async-iterable page for streaming results |
Sort | Sort configuration for queries |
KinoticError | Base error class |
AuthenticationError | Authentication failure error |
AuthorizationError | Authorization failure error |
Decorators
| Decorator | Description |
|---|---|
@Publish(namespace, name?) | Publish a class as a remote service |
@Version(version) | Set semantic version for a service |
@Scope | Mark a property as the service scope |
@Context() | Inject request context into a method parameter |
@AbacPolicy(expression) | ABAC policy for service method authorization |
@kinotic-ai/persistence
Entity persistence layer for defining, syncing, and interacting with Elasticsearch-backed entities.
Key Exports
| Export | Description |
|---|---|
PersistencePlugin | Plugin to register with Kinotic for persistence support |
IEntityService | Interface for entity CRUD operations |
IAdminEntityService | Interface for admin-level entity operations |
IEntitiesService | Interface for managing entity definitions |
IAdminEntitiesService | Interface for admin entity definition management |
QueryParameter | Query parameter for named queries |
QueryOptions | Options for query execution |
MultiTenancyType | Enum: NONE, SHARED, DEDICATED |
EntityType | Enum: TABLE, DATA_STREAM |
PrecisionType | Enum: INT, SHORT, LONG, FLOAT, DOUBLE |
Entity Decorators
| Decorator | Description |
|---|---|
@Entity(multiTenancyType?, entityType?) | Mark a class as a persisted entity |
@EntityServiceDecorators(config) | Configure per-operation decorators |
@AutoGeneratedId | Server-generated ID field |
@Id | Manually-assigned ID field |
@NotNull | Required field |
@Text | Full-text search indexing |
@Precision(PrecisionType) | Numeric precision |
@NotIndexed | Exclude from indexing |
@Flattened | Flattened object mapping |
@Nested | Nested object mapping |
@Discriminator(propertyName) | Polymorphic type discriminator |
@TenantId | Tenant identifier field |
@Version | Optimistic locking |
@TimeReference | Time reference for data streams |
@Query(statement) | Named query definition |
Policy Factory Functions
| Function | Description |
|---|---|
$AbacPolicy(expression) | ABAC policy for entity operations |
$Policy(policies) | Policy rules matrix |
$Role(roles) | Role-based access |
@kinotic-ai/os-api
Platform-level management APIs for interacting with Kinotic OS services like application management, project management, and migrations.
Key Exports
| Export | Description |
|---|---|
OsApiPlugin | Plugin to register with Kinotic for OS API access |
IApplicationService | Application CRUD operations |
IProjectService | Project management operations |
IMigrationService | Migration execution and management |
IEntityDefinitionService | Entity definition management |
INamedQueriesDefinitionService | Named queries definition management |
IDataInsightsService | Data insights and analytics |
ILogManager | Log level management |
LogManager | Log manager implementation |
Application | Application model |
Project | Project model |
ProjectType | Project type enum |
EntityDefinition | Entity definition model |
MigrationDefinition | Migration definition model |
MigrationRequest | Migration execution request |
MigrationResult | Migration execution result |
@kinotic-ai/idl
Interface Definition Language types used internally by the SDK for service and type definitions. Useful when building tooling or working with the Kinotic type system programmatically.
Key Exports
| Export | Description |
|---|---|
C3Type | Base type in the Kinotic type hierarchy |
ServiceDefinition | Complete definition of a published service |
FunctionDefinition | Definition of a service method |
The IDL package provides the type system that powers code generation, entity synchronization, and service registration. Most application developers will not need to interact with this package directly.