Variable: ConfigSchemas
Makaio Framework / contracts / ConfigSchemas
Variable: ConfigSchemas
Section titled “Variable: ConfigSchemas”
constConfigSchemas:object
Defined in: ../../../packages/contracts/src/config/config-subjects.ts:23
Config domain schemas.
Subjects for config-related bus communication.
Each key becomes a subject identifier as: config.{key}
Bus subjects:
config.get- Request to get current configconfig.update- Request to update config
Type Declaration
Section titled “Type Declaration”get:
object
Get current config request. Empty request payload, returns full config.
get.request
Section titled “get.request”request:
ZodObject<{ },$strip>
get.response
Section titled “get.response”response:
ZodObject<{config:ZodObject<{$schema:ZodDefault<ZodLiteral<"makaio/config/v1">>;bus:ZodOptional<ZodObject<{remote:ZodOptional<ZodObject<…, …>>; },$strip>>;features:ZodOptional<ZodObject<{voiceBridge:ZodDefault<ZodBoolean>; },$strip>>;fileWatcher:ZodOptional<ZodObject<{backend:ZodDefault<ZodEnum<…>>; },$strip>>;mode:ZodDefault<ZodEnum<{hybrid:"hybrid";local:"local";remote:"remote"; }>>;relay:ZodOptional<ZodObject<{autoReconnect:ZodDefault<ZodOptional<…>>;heartbeatInterval:ZodDefault<ZodOptional<…>>;maxReconnectAttempts:ZodDefault<ZodOptional<…>>;token:ZodOptional<ZodString>;url:ZodOptional<ZodString>; },$strip>>;role:ZodDefault<ZodEnum<{main-dev-machine:"main-dev-machine";server:"server"; }>>; },$strip>; },$strip>
update
Section titled “update”update:
object
Update config request. Accepts full config object, validates and saves it.
update.request
Section titled “update.request”request:
ZodObject<{config:ZodObject<{$schema:ZodDefault<ZodLiteral<"makaio/config/v1">>;bus:ZodOptional<ZodObject<{remote:ZodOptional<ZodObject<…, …>>; },$strip>>;features:ZodOptional<ZodObject<{voiceBridge:ZodDefault<ZodBoolean>; },$strip>>;fileWatcher:ZodOptional<ZodObject<{backend:ZodDefault<ZodEnum<…>>; },$strip>>;mode:ZodDefault<ZodEnum<{hybrid:"hybrid";local:"local";remote:"remote"; }>>;relay:ZodOptional<ZodObject<{autoReconnect:ZodDefault<ZodOptional<…>>;heartbeatInterval:ZodDefault<ZodOptional<…>>;maxReconnectAttempts:ZodDefault<ZodOptional<…>>;token:ZodOptional<ZodString>;url:ZodOptional<ZodString>; },$strip>>;role:ZodDefault<ZodEnum<{main-dev-machine:"main-dev-machine";server:"server"; }>>; },$strip>; },$strip>
update.response
Section titled “update.response”response:
ZodObject<{success:ZodBoolean; },$strip>
Example
Section titled “Example”// Get current configconst config = await bus.request(ConfigSubjects.get, {});
// Update configawait bus.request(ConfigSubjects.update, { config: newConfig });