@alneas/eaos-plugin-field-customization API
@alneas/eaos-plugin-field-customization API
Section titled “@alneas/eaos-plugin-field-customization API”Public entrypoints
Section titled “Public entrypoints”| Import | Contract |
|---|---|
@alneas/eaos-plugin-field-customization/schema |
Typed public export |
@alneas/eaos-plugin-field-customization/lifecycle |
Typed public export |
@alneas/eaos-plugin-field-customization/react |
Typed public export |
@alneas/eaos-plugin-field-customization/workspace |
Typed public export |
@alneas/eaos-plugin-field-customization/user-help |
Typed public export |
@alneas/eaos-plugin-field-customization |
Typed public export |
@alneas/eaos-plugin-field-customization/service |
Typed public export |
@alneas/eaos-plugin-field-customization/manifest |
Typed public export |
@alneas/eaos-plugin-field-customization/runtime |
Typed public export |
@alneas/eaos-plugin-field-customization/user-guide.json |
Packaged JSON contract/data asset; resolve this exported path with the host loader |
@alneas/eaos-plugin-field-customization/deployment.json |
Packaged JSON contract/data asset; resolve this exported path with the host loader |
[FUNCTION] applyFieldCustomizations
Section titled “[FUNCTION] applyFieldCustomizations”Projects display overrides and additive custom fields onto a cloned object schema.
Pure projection: existing validation constraints are never removed or weakened.
Imports: @alneas/eaos-plugin-field-customization, @alneas/eaos-plugin-field-customization/react, @alneas/eaos-plugin-field-customization/schema.
Signature
Section titled “Signature”declare function applyFieldCustomizations<T extends ObjectSchema>(base: T, fields: Record<string, FieldCustomization>): T;Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
base |
T |
Yes | Canonical object schema; original validation constraints are preserved. |
fields |
Record<string, FieldCustomization> |
Yes | Overrides keyed by field name; new custom_ fields require a supported explicit type. |
Returns
Section titled “Returns”T
A deep-cloned schema with display metadata and added required fields.
Type parameters
Section titled “Type parameters”T: JSON-schema-like object shape preserved by the projection.
Remarks
Section titled “Remarks”This pure projection does not validate all service input constraints. Existing field types/enums remain unchanged; false is_required never removes a base requirement. Prototype keys and unknown non-custom fields are skipped.
Errors and rejections
Section titled “Errors and rejections”May throw if base contains values unsupported by structuredClone.
Example
Section titled “Example”import { applyFieldCustomizations } from '@alneas/eaos-plugin-field-customization/schema';const schema = applyFieldCustomizations({ type: 'object', properties: { title: { type: 'string' } } }, { title: { display_label: 'Report title' }, custom_note: { type: 'string', help_text: 'Optional note' } });[FUNCTION] createExtension
Section titled “[FUNCTION] createExtension”Builds a host extension restricted to a verified, concrete tenant catalog.
Imports: @alneas/eaos-plugin-field-customization/runtime.
Signature
Section titled “Signature”declare function createExtension(input: { tenantIds: string[]; bindings?: PublicPluginBindings;}): { apiVersion: 1; id: string; tenantIds: string[]; manifests: _alneas_eaos_core.PluginManifest[]; lifecycle: _alneas_eaos_server_lifecycle_engine.LifecyclePlugin[]; routeFactories: { [x: string]: (options?: any) => any; };};Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
input |
{ tenantIds: string[]; bindings?: PublicPluginBindings; } |
Yes | Nonempty distinct concrete tenantIds plus required live bindings; wildcard IDs are rejected. |
Returns
Section titled “Returns”{ apiVersion: 1; id: string; tenantIds: string[]; manifests: _alneas_eaos_core.PluginManifest[]; lifecycle: _alneas_eaos_server_lifecycle_engine.LifecyclePlugin[]; routeFactories: { [x: string]: (options?: any) => any; }; }
An API-version-1 extension containing tenant IDs, configured manifest, lifecycle and route factories.
Remarks
Section titled “Remarks”This validates adapter presence and tenant admission, not the truth of host authorization. No activation or migration is executed. Principals outside the configured catalog resolve to null.
Errors and rejections
Section titled “Errors and rejections”Error for empty/duplicate/wildcard tenant IDs or missing host adapter functions.
Public members
Section titled “Public members”input.tenantIds
Section titled “input.tenantIds”Verified nonempty catalog of distinct concrete tenant IDs; wildcards are rejected.
input.bindings
Section titled “input.bindings”Required live host options and identity resolver; omitted bindings throw.
Example
Section titled “Example”import { createExtension, type PublicPluginBindings } from '@alneas/eaos-plugin-field-customization/runtime';export function configureExtension(tenantIds: string[], bindings: PublicPluginBindings) { return createExtension({ tenantIds, bindings }); }[FUNCTION] createPlugin
Section titled “[FUNCTION] createPlugin”Binds static plugin metadata to the host-configured route factory.
Imports: @alneas/eaos-plugin-field-customization.
Signature
Section titled “Signature”declare function createPlugin(options: FieldCustomizationOptions, resolvePrincipal: (c: Context) => Promise<PluginPrincipal | null>): PluginManifest;Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
options |
FieldCustomizationOptions |
Yes | Live host configuration; see FieldCustomizationOptions. |
resolvePrincipal |
(c: Context) => Promise<PluginPrincipal | null> |
Yes | Current authenticated Hono principal resolver; null denies admission. |
Returns
Section titled “Returns”PluginManifest
A cloned PluginManifest with a createRoutes closure; no routes are instantiated until called.
Remarks
Section titled “Remarks”Supplying a manifest does not activate a tenant or perform migrations. Host admission and live authorization remain mandatory.
Example
Section titled “Example”import { createPlugin, type FieldCustomizationOptions } from '@alneas/eaos-plugin-field-customization';export function configure(options: FieldCustomizationOptions, resolvePrincipal: Parameters<typeof createPlugin>[1]) { return createPlugin(options, resolvePrincipal); }[FUNCTION] createRoutes
Section titled “[FUNCTION] createRoutes”Creates tenant-scoped field definition read/write routes.
Imports: @alneas/eaos-plugin-field-customization.
Signature
Section titled “Signature”declare function createRoutes(options: FieldCustomizationOptions, resolvePrincipal: (c: Context) => Promise<PluginPrincipal | null>): hono.Hono<_alneas_eaos_server_plugin_data.PluginHttpEnv, hono_types.BlankSchema, "/">;Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
options |
FieldCustomizationOptions |
Yes | Live host persistence and authorization configuration; see FieldCustomizationOptions. |
resolvePrincipal |
(c: Context) => Promise<PluginPrincipal | null> |
Yes | Resolves current authenticated principal per Hono request, or null to deny access. |
Returns
Section titled “Returns”hono.Hono<_alneas_eaos_server_plugin_data.PluginHttpEnv, hono_types.BlankSchema, "/">
A Hono router ready to mount under the plugin API prefix.
Remarks
Section titled “Remarks”The host owns authentication, current tenant membership and plugin activation. Service errors become HTTP failures through the plugin router; adapter failures may propagate. Mutations can commit before a response failure; reload current state before retrying.
Example
Section titled “Example”import { createRoutes, type FieldCustomizationOptions } from '@alneas/eaos-plugin-field-customization';export function connectRoutes(options: FieldCustomizationOptions, resolvePrincipal: Parameters<typeof createRoutes>[1]) { return createRoutes(options, resolvePrincipal);}[FUNCTION] default
Section titled “[FUNCTION] default”Renders the plugin’s bundled repository-authored user guide.
Imports: @alneas/eaos-plugin-field-customization/user-help.
Signature
Section titled “Signature”declare function UserHelp(): React.JSX.Element;Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
| — | — | — | No call parameters. |
Returns
Section titled “Returns”React.JSX.Element
A collapsible UserGuide element containing static Japanese help.
Remarks
Section titled “Remarks”Requires React and
Example
Section titled “Example”import * as React from 'react';import UserHelp from '@alneas/eaos-plugin-field-customization/user-help';export function Help() { return <UserHelp/>; }[INTERFACE] FieldCustomization
Section titled “[INTERFACE] FieldCustomization”Display overrides and additive validation requirements for one schema field.
Imports: @alneas/eaos-plugin-field-customization, @alneas/eaos-plugin-field-customization/schema.
Signature
Section titled “Signature”interface FieldCustomization { display_label?: string; placeholder?: string; help_text?: string; is_required?: boolean; is_hidden?: boolean; display_order?: number; type?: 'string' | 'number' | 'boolean'; enum?: string[];}Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
display_label |
string |
No | Optional displayed field title, at most 2000 characters through the service. |
placeholder |
string |
No | Optional input hint, at most 2000 characters. |
help_text |
string |
No | Optional schema description/help, at most 2000 characters. |
is_required |
boolean |
No | True adds a requirement; false never removes base requirements. |
is_hidden |
boolean |
No | Display-only hidden flag; required base fields cannot be hidden through the service. |
display_order |
number |
No | Optional safe integer UI order with absolute value at most 10000. |
type |
'string' | 'number' | 'boolean' |
No | Required for a new custom_ field; forbidden for existing base fields. |
enum |
string[] |
No | Nonempty list of at most 100 strings for new string fields only; each at most 2000 characters. |
Returns
Section titled “Returns”Type declaration; no runtime value.
See also
Section titled “See also”FieldCustomizationService for a complete host integration example.
Public members
Section titled “Public members”display_label
Section titled “display_label”Optional displayed field title, at most 2000 characters through the service.
placeholder
Section titled “placeholder”Optional input hint, at most 2000 characters.
help_text
Section titled “help_text”Optional schema description/help, at most 2000 characters.
is_required
Section titled “is_required”True adds a requirement; false never removes base requirements.
is_hidden
Section titled “is_hidden”Display-only hidden flag; required base fields cannot be hidden through the service.
display_order
Section titled “display_order”Optional safe integer UI order with absolute value at most 10000.
Required for a new custom_ field; forbidden for existing base fields.
Nonempty list of at most 100 strings for new string fields only; each at most 2000 characters.
Example
Section titled “Example”See the owning declaration and linked feature guide for usage; no standalone example is documented in source.
[FUNCTION] FieldCustomizationForm
Section titled “[FUNCTION] FieldCustomizationForm”Renders a schema-driven plugin command form backed by a host callback.
Saves one display override through the host command transport; host carries resource/revision.
Imports: @alneas/eaos-plugin-field-customization/react.
Signature
Section titled “Signature”declare function FieldCustomizationForm({ save, labels }: { save(values: FieldCustomization): Promise<void>; labels: { display_label: string; placeholder: string; help_text: string; is_hidden: string; is_required: string; };}): React.JSX.Element;Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
{ save, labels } |
{ save(values: FieldCustomization): Promise<void>; labels: { display_label: string; placeholder: string; help_text: string; is_hidden: string; is_required: string; }; } |
Yes | save is an authenticated async host command and labels supplies field captions. Save receives display overrides; host closes over resource, field key and revision. |
Returns
Section titled “Returns”React.JSX.Element
A plugin help panel and react-tools FormView in create mode.
Remarks
Section titled “Remarks”Requires React,
Public members
Section titled “Public members”argument1.save
Section titled “argument1.save”Authenticated host field override callback; closes over authorized resource/field/revision and resolves on completion.
Parameters:
values: Display overrides for the host-selected field/resource; the host supplies the current definition revision.
Returns: Resolves without a value when the host command completes; the form handles its Promise outcome.
Errors and rejections
Section titled “Errors and rejections”Rejects host authorization, validation, transport or persistence failures; reload current state after uncertain write outcomes.
Example:
import { FieldCustomizationForm } from '@alneas/eaos-plugin-field-customization/react';type HostCommand = Parameters<typeof FieldCustomizationForm>[0]['save'];export async function runHostCommand(command: HostCommand, values: Parameters<HostCommand>[0]) { await command(values);}argument1.labels
Section titled “argument1.labels”Plugin field captions rendered by the command form.
argument1.labels.display_label
Section titled “argument1.labels.display_label”Display-label input caption.
argument1.labels.placeholder
Section titled “argument1.labels.placeholder”Placeholder input caption.
argument1.labels.help_text
Section titled “argument1.labels.help_text”Help-text input caption.
argument1.labels.is_hidden
Section titled “argument1.labels.is_hidden”Hidden-state input caption.
argument1.labels.is_required
Section titled “argument1.labels.is_required”Required-state input caption.
Example
Section titled “Example”import * as React from 'react';import { FieldCustomizationForm } from '@alneas/eaos-plugin-field-customization/react';export function Form({ save }: Pick<React.ComponentProps<typeof FieldCustomizationForm>, 'save'>) { return <FieldCustomizationForm save={save} labels={{ display_label: 'Label', placeholder: 'Placeholder', help_text: 'Help', is_hidden: 'Hidden', is_required: 'Required' }}/>; }[INTERFACE] FieldCustomizationOptions
Section titled “[INTERFACE] FieldCustomizationOptions”Tenant-isolated field storage with live resource authorization and base schema resolution.
Imports: @alneas/eaos-plugin-field-customization, @alneas/eaos-plugin-field-customization/service.
Signature
Section titled “Signature”interface FieldCustomizationOptions { store: PluginRecordStore<FieldDefinition>; authorize(principal: PluginPrincipal, action: 'read' | 'write', resource: string): Promise<boolean>; resolveSchema(principal: PluginPrincipal, resource: string): Promise<ObjectSchema | null>;}Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
store |
PluginRecordStore<FieldDefinition> |
Yes | Tenant/resource-isolated durable definition storage with atomic compare-and-swap replace. |
authorize |
Promise<boolean> |
Yes | Live lifecycle, membership and resource permission check for read/write; false denies access. |
resolveSchema |
Promise<ObjectSchema | null> |
Yes | Resolve the current canonical object schema for an authorized resource; null makes the resource unavailable. |
Returns
Section titled “Returns”Type declaration; no runtime value.
See also
Section titled “See also”FieldCustomizationService for a complete host integration example.
Public members
Section titled “Public members”Tenant/resource-isolated durable definition storage with atomic compare-and-swap replace.
authorize
Section titled “authorize”Live lifecycle, membership and resource permission check for read/write; false denies access.
Parameters:
principal: Verified tenant principal for this operation.action: Requested plugin action to authorize against current state.resource: Host-catalog resource identifier.
Returns: True only when current host policy allows access; false denies access.
Remarks
Section titled “Remarks”Must check live lifecycle, membership and resource permission.
Errors and rejections
Section titled “Errors and rejections”Propagates host adapter or SDK failures; async methods reject their Promise.
Example:
import type { FieldCustomizationOptions } from '@alneas/eaos-plugin-field-customization/service';import type { PluginPrincipal } from '@alneas/eaos-server/plugin-data';export function canReadFields(options: FieldCustomizationOptions, principal: PluginPrincipal, resource: string) { return options.authorize(principal, 'read', resource);}resolveSchema
Section titled “resolveSchema”Resolve the current canonical object schema for an authorized resource; null makes the resource unavailable.
Parameters:
principal: Verified tenant principal for this operation.resource: Host-catalog resource identifier.
Returns: The canonical object schema, or null when unavailable.
Errors and rejections
Section titled “Errors and rejections”Propagates host adapter or SDK failures; async methods reject their Promise.
Example:
import type { FieldCustomizationOptions } from '@alneas/eaos-plugin-field-customization/service';import type { PluginPrincipal } from '@alneas/eaos-server/plugin-data';export function resolveCurrentSchema(options: FieldCustomizationOptions, principal: PluginPrincipal, resource: string) { return options.resolveSchema(principal, resource); // May resolve null when the resource is unavailable.}Example
Section titled “Example”See the owning declaration and linked feature guide for usage; no standalone example is documented in source.
[FUNCTION] FieldCustomizationPage
Section titled “[FUNCTION] FieldCustomizationPage”Renders per-resource field overrides with revision-aware save and refresh controls.
Mount one provider per authorized resource; resource selection belongs to the host catalog.
Imports: @alneas/eaos-plugin-field-customization/react, @alneas/eaos-plugin-field-customization/workspace.
Signature
Section titled “Signature”declare function FieldCustomizationPage(): React.JSX.Element;Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
| — | — | — | No call parameters. |
Returns
Section titled “Returns”React.JSX.Element
The workspace page with loading/error state, or an alert when the host provider is missing.
Remarks
Section titled “Remarks”Requires React,
Example
Section titled “Example”import * as React from 'react';import { FieldCustomizationPage, FieldCustomizationProvider } from '@alneas/eaos-plugin-field-customization/workspace';export function Page(props: Omit<React.ComponentProps<typeof FieldCustomizationProvider>, 'children'>) { return <FieldCustomizationProvider {...props}><FieldCustomizationPage/></FieldCustomizationProvider>; }[FUNCTION] FieldCustomizationProvider
Section titled “[FUNCTION] FieldCustomizationProvider”Provides an isolated authenticated session for the plugin workspace.
Imports: @alneas/eaos-plugin-field-customization/react, @alneas/eaos-plugin-field-customization/workspace.
Signature
Section titled “Signature”declare const FieldCustomizationProvider: ({ tenantId, recordId, sessionKey, client, children }: _alneas_eaos_react.WorkspaceProviderProps<FieldWorkspaceData>) => React.DetailedReactHTMLElement<{ role: "status";}, HTMLElement> | React.FunctionComponentElement<React.ProviderProps<_alneas_eaos_react.WorkspaceClient<FieldWorkspaceData> | null>>;Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
{ tenantId, recordId, sessionKey, client, children } |
_alneas_eaos_react.WorkspaceProviderProps<FieldWorkspaceData> |
Yes | WorkspaceProviderProps containing verified tenant/resource/session IDs, stable client and children. |
Returns
Section titled “Returns”React.DetailedReactHTMLElement<{ role: "status"; }, HTMLElement> \| React.FunctionComponentElement<React.ProviderProps<_alneas_eaos_react.WorkspaceClient<FieldWorkspaceData> \| null>>
Children after the session is ready, otherwise loading/unavailable status content.
Remarks
Section titled “Remarks”Closes old UI sessions on scope change/unmount. The host owns transport authentication and authorization; see FieldCustomizationPage for setup.
Example
Section titled “Example”import * as React from 'react';import { FieldCustomizationPage, FieldCustomizationProvider } from '@alneas/eaos-plugin-field-customization/workspace';export function Page(props: Omit<React.ComponentProps<typeof FieldCustomizationProvider>, 'children'>) { return <FieldCustomizationProvider {...props}><FieldCustomizationPage/></FieldCustomizationProvider>; }[CLASS] FieldCustomizationService
Section titled “[CLASS] FieldCustomizationService”Reads and revision-checks tenant/resource field overrides without weakening base schema validation.
Imports: @alneas/eaos-plugin-field-customization, @alneas/eaos-plugin-field-customization/service.
Signature
Section titled “Signature”declare class FieldCustomizationService { constructor(options: FieldCustomizationOptions); read(p: PluginPrincipal, resource: string): Promise<{ id: string; revision: number; fields: Record<string, FieldCustomization>; schema: ObjectSchema; }>; write(p: PluginPrincipal, resource: string, input: Record<string, unknown>): Promise<{ id: string; revision: number; fields: Record<string, FieldCustomization>; schema: ObjectSchema; }>;}Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
options |
FieldCustomizationOptions |
Yes | Tenant-isolated storage, live resource authorization and canonical object schema resolver. |
Returns
Section titled “Returns”FieldCustomizationService
Remarks
Section titled “Remarks”Server-side host supplies current resource authorization, canonical object schema resolution and durable isolated storage. A write can persist before a final authorization check rejects; reload current state before retrying.
Constructor contract
Section titled “Constructor contract”Public members
Section titled “Public members”Reads a resource definition and merges its overrides into the current canonical schema.
Parameters:
p: Verified tenant principal.resource: Nonblank host-catalog resource ID.
Returns: Resource ID, revision, fields and projected schema; absent definitions use revision 0 and empty fields.
Errors and rejections
Section titled “Errors and rejections”Rejects invalid principal/resource, denied/revoked access (403), unavailable object schema (404), and propagated host failures.
Example:
import { FieldCustomizationService } from '@alneas/eaos-plugin-field-customization/service';import type { PluginPrincipal } from '@alneas/eaos-server/plugin-data';export function readFields(service: FieldCustomizationService, principal: PluginPrincipal, resource: string) { return service.read(principal, resource); }Replaces the complete field override map using resource-scoped optimistic concurrency.
Parameters:
p: Verified current tenant principal.resource: Host-catalog resource ID.input: Exactly revision (nonnegative integer, 0 for new definition) and fields (at most 100 overrides).
Returns: The new definition revision, copied fields and projected schema.
Remarks
Section titled “Remarks”Omitted fields are removed. Existing required base fields cannot be hidden or weakened; new names use custom_ prefix and a supported scalar type. Text is limited to 2000 characters, order magnitude to 10000 and string enum choices to 100. Final authorization occurs after persistence, so a rejection may follow a committed write.
Errors and rejections
Section titled “Errors and rejections”Rejects malformed/weakening overrides (400), denied/revoked access (403), unavailable schema (404), stale revision/CAS conflict (409), and host failures.
Example:
import { FieldCustomizationService } from '@alneas/eaos-plugin-field-customization/service';import type { PluginPrincipal } from '@alneas/eaos-server/plugin-data';export async function renameTitle(service: FieldCustomizationService, principal: PluginPrincipal, resource: string) { const current = await service.read(principal, resource); return service.write(principal, resource, { revision: current.revision, fields: { ...current.fields, title: { ...current.fields.title, display_label: 'Report title' } } });}Example
Section titled “Example”import { FieldCustomizationService, type FieldCustomizationOptions } from '@alneas/eaos-plugin-field-customization/service';export function connectFields(options: FieldCustomizationOptions) { return new FieldCustomizationService(options); }[INTERFACE] FieldDefinition
Section titled “[INTERFACE] FieldDefinition”Complete persisted override map for one host resource.
Imports: @alneas/eaos-plugin-field-customization, @alneas/eaos-plugin-field-customization/service.
Signature
Section titled “Signature”interface FieldDefinition { fields: Record<string, FieldCustomization>;}Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
fields |
Record<string, FieldCustomization> |
Yes | Complete resource override map; service writes replace this map rather than merging omitted keys. |
Returns
Section titled “Returns”Type declaration; no runtime value.
See also
Section titled “See also”FieldCustomizationService for a complete host integration example.
Public members
Section titled “Public members”fields
Section titled “fields”Complete resource override map; service writes replace this map rather than merging omitted keys.
Example
Section titled “Example”See the owning declaration and linked feature guide for usage; no standalone example is documented in source.
[INTERFACE] FieldWorkspaceData
Section titled “[INTERFACE] FieldWorkspaceData”Resource definition, revision and merged canonical schema returned to the workspace.
Imports: @alneas/eaos-plugin-field-customization/react, @alneas/eaos-plugin-field-customization/workspace.
Signature
Section titled “Signature”interface FieldWorkspaceData extends FieldDefinition { id: string; revision: number; schema: ObjectSchema;}Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
id |
string |
Yes | Authorized resource identifier. |
revision |
number |
Yes | Persisted field-definition revision; 0 when no definition exists. |
schema |
ObjectSchema |
Yes | Canonical base schema projected with stored field overrides. |
Returns
Section titled “Returns”Type declaration; no runtime value.
See also
Section titled “See also”FieldCustomizationService for a complete host integration example.
Public members
Section titled “Public members”Authorized resource identifier.
revision
Section titled “revision”Persisted field-definition revision; 0 when no definition exists.
schema
Section titled “schema”Canonical base schema projected with stored field overrides.
Example
Section titled “Example”See the owning declaration and linked feature guide for usage; no standalone example is documented in source.
[CONSTANT] lifecycle
Section titled “[CONSTANT] lifecycle”Declares lifecycle compatibility and schema dependencies for host orchestration.
Imports: @alneas/eaos-plugin-field-customization, @alneas/eaos-plugin-field-customization/lifecycle.
Signature
Section titled “Signature”declare const lifecycle: LifecyclePlugin;Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
| — | — | — | No call parameters. |
Returns
Section titled “Returns”Declared constant value.
Remarks
Section titled “Remarks”The host lifecycle engine owns installation and tenant admission; importing this value performs no migrations.
Example
Section titled “Example”import { lifecycle } from '@alneas/eaos-plugin-field-customization'console.log(lifecycle.id, lifecycle.version)[CONSTANT] manifest
Section titled “[CONSTANT] manifest”Declares static plugin metadata, navigation, public storage contracts and API prefix.
Static metadata shared by documentation inspection and the host-configured factory.
Imports: @alneas/eaos-plugin-field-customization/manifest.
Signature
Section titled “Signature”declare const manifest: PluginManifest;Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
| — | — | — | No call parameters. |
Returns
Section titled “Returns”Declared constant value.
Remarks
Section titled “Remarks”Inspection metadata only; use the package createPlugin factory with live host bindings to obtain routes. This declaration does not activate a tenant.
Example
Section titled “Example”import { manifest } from '@alneas/eaos-plugin-field-customization/manifest'console.log(manifest.id, manifest.version)[INTERFACE] ObjectSchema
Section titled “[INTERFACE] ObjectSchema”Extensible JSON-schema-like object used for safe display projections.
Imports: @alneas/eaos-plugin-field-customization, @alneas/eaos-plugin-field-customization/schema.
Signature
Section titled “Signature”interface ObjectSchema { type?: string; properties?: Record<string, any>; required?: string[]; [key: string]: any;}Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
type |
string |
No | Schema type; the service requires object. |
properties |
Record<string, any> |
No | Canonical property schemas; required by the service. |
required |
string[] |
No | Field keys whose validation requirement must be preserved. |
Returns
Section titled “Returns”Type declaration; no runtime value.
See also
Section titled “See also”FieldCustomizationService for a complete host integration example.
Public members
Section titled “Public members”Schema type; the service requires object.
properties
Section titled “properties”Canonical property schemas; required by the service.
required
Section titled “required”Field keys whose validation requirement must be preserved.
Example
Section titled “Example”See the owning declaration and linked feature guide for usage; no standalone example is documented in source.
[INTERFACE] PublicPluginBindings
Section titled “[INTERFACE] PublicPluginBindings”Live host service configuration and current authenticated principal resolver.
Imports: @alneas/eaos-plugin-field-customization/runtime.
Signature
Section titled “Signature”interface PublicPluginBindings { options: FieldCustomizationOptions; resolvePrincipal(context: Context): Promise<PluginPrincipal | null>;}Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
options |
FieldCustomizationOptions |
Yes | Live plugin service/storage/authorization configuration. |
resolvePrincipal |
Promise<PluginPrincipal | null> |
Yes | Resolve current verified Hono request identity, or null to deny access; rejection propagates. |
Returns
Section titled “Returns”Type declaration; no runtime value.
See also
Section titled “See also”FieldCustomizationService for a complete host integration example.
Public members
Section titled “Public members”options
Section titled “options”Live plugin service/storage/authorization configuration.
resolvePrincipal
Section titled “resolvePrincipal”Resolve current verified Hono request identity, or null to deny access; rejection propagates.
Parameters:
context: Current Hono request context.
Returns: A verified current principal, or null to deny admission.
Errors and rejections
Section titled “Errors and rejections”Propagates host adapter or SDK failures; async methods reject their Promise.
Example:
import type { PublicPluginBindings } from '@alneas/eaos-plugin-field-customization/runtime';export function resolveRequest(bindings: PublicPluginBindings, context: Parameters<PublicPluginBindings['resolvePrincipal']>[0]) { return bindings.resolvePrincipal(context); // Null denies unauthenticated or unavailable identity.}Example
Section titled “Example”See the owning declaration and linked feature guide for usage; no standalone example is documented in source.
[CONSTANT] recordSchema
Section titled “[CONSTANT] recordSchema”Exposes the canonical platform-records schema used by the plugin storage contract.
Imports: @alneas/eaos-plugin-field-customization, @alneas/eaos-plugin-field-customization/lifecycle.
Signature
Section titled “Signature”declare const recordSchema: Record<string, unknown>;Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
| — | — | — | No call parameters. |
Returns
Section titled “Returns”Declared constant value.
Remarks
Section titled “Remarks”This references getPlatformRecordsContract().schema; the plugin does not own a separate table schema.
Example
Section titled “Example”import { recordSchema } from '@alneas/eaos-plugin-field-customization'console.log(recordSchema.type, recordSchema.properties)