skedyul 0.1.28 → 0.1.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/config.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { ToolRegistry, WebhookRegistry } from './types';
1
+ import type { ToolRegistry, WebhookRegistry, ToolMetadata, WebhookMetadata } from './types';
2
2
  export type EnvVisibility = 'visible' | 'encrypted';
3
3
  export interface EnvVariableDefinition {
4
4
  /** Human-readable label for the variable */
@@ -189,6 +189,38 @@ export interface SkedyulConfig {
189
189
  */
190
190
  workflows?: WorkflowDefinition[];
191
191
  }
192
+ /**
193
+ * Serializable snapshot of SkedyulConfig for database storage.
194
+ *
195
+ * This type mirrors SkedyulConfig but replaces non-serializable fields
196
+ * (dynamic imports, handlers) with their serializable metadata equivalents.
197
+ *
198
+ * Use this type when storing executable configuration in the database.
199
+ */
200
+ export interface SerializableSkedyulConfig {
201
+ /** App name */
202
+ name: string;
203
+ /** App version (semver) */
204
+ version?: string;
205
+ /** App description */
206
+ description?: string;
207
+ /** Compute layer: 'serverless' (Lambda) or 'dedicated' (ECS/Docker) */
208
+ computeLayer?: ComputeLayerType;
209
+ /** Tool metadata array (serialized from ToolRegistry) */
210
+ tools?: ToolMetadata[];
211
+ /** Webhook metadata array (serialized from WebhookRegistry) */
212
+ webhooks?: WebhookMetadata[];
213
+ /** Path to the workflows directory */
214
+ workflowsPath?: string;
215
+ /** Global/version-level environment variable schema */
216
+ env?: EnvSchema;
217
+ /** Install-time configuration */
218
+ install?: InstallConfig;
219
+ /** Communication channels this app provides */
220
+ communicationChannels?: CommunicationChannelDefinition[];
221
+ /** Workflows this app provides */
222
+ workflows?: WorkflowDefinition[];
223
+ }
192
224
  /**
193
225
  * Define a Skedyul app configuration with full type safety.
194
226
  *
package/dist/index.d.ts CHANGED
@@ -2,4 +2,4 @@ export * from './types';
2
2
  export { server } from './server';
3
3
  export { workplace, communicationChannel, configure, getConfig } from './core/client';
4
4
  export { defineConfig, loadConfig, validateConfig, getRequiredInstallEnvKeys, getAllEnvKeys, CONFIG_FILE_NAMES, } from './config';
5
- export type { SkedyulConfig, EnvVariableDefinition, EnvSchema, EnvVisibility, InstallConfig, AppModelDefinition, ComputeLayerType, AppFieldVisibility, AppFieldDefinition, ChannelToolBindings, ChannelIdentifierType, ChannelIdentifierValue, CommunicationChannelDefinition, WorkflowActionInput, WorkflowAction, WorkflowDefinition, } from './config';
5
+ export type { SkedyulConfig, SerializableSkedyulConfig, EnvVariableDefinition, EnvSchema, EnvVisibility, InstallConfig, AppModelDefinition, ComputeLayerType, AppFieldVisibility, AppFieldDefinition, ChannelToolBindings, ChannelIdentifierType, ChannelIdentifierValue, CommunicationChannelDefinition, WorkflowActionInput, WorkflowAction, WorkflowDefinition, } from './config';
package/dist/types.d.ts CHANGED
@@ -161,7 +161,7 @@ export interface WebhookLifecycleResult {
161
161
  * Return null if the API doesn't support programmatic management
162
162
  * (user must configure manually).
163
163
  */
164
- export type WebhookLifecycleHook<TContext = WebhookLifecycleContext> = (context: TContext) => Promise<WebhookLifecycleResult | null> | WebhookLifecycleResult | null;
164
+ export type WebhookLifecycleHook<TContext = WebhookLifecycleContext> = (context: TContext) => Promise<WebhookLifecycleResult | null | undefined> | WebhookLifecycleResult | null | undefined;
165
165
  export interface WebhookDefinition {
166
166
  name: string;
167
167
  description: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skedyul",
3
- "version": "0.1.28",
3
+ "version": "0.1.30",
4
4
  "description": "The Skedyul SDK for Node.js",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",