@slflows/sdk 0.5.1 → 0.6.0
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/v1/index.d.ts +11 -3
- package/package.json +1 -1
package/dist/v1/index.d.ts
CHANGED
|
@@ -827,8 +827,9 @@ interface AppUIComponent {
|
|
|
827
827
|
}
|
|
828
828
|
type SimpleType = "string" | "number" | "boolean" | "any";
|
|
829
829
|
type SimpleTypeArray = [SimpleType];
|
|
830
|
+
type JsonSchemaType = "string" | "number" | "boolean" | "object" | "array" | "integer" | "null";
|
|
830
831
|
interface JsonSchema {
|
|
831
|
-
type?:
|
|
832
|
+
type?: JsonSchemaType;
|
|
832
833
|
properties?: Record<string, JsonSchema>;
|
|
833
834
|
items?: JsonSchema;
|
|
834
835
|
required?: string[];
|
|
@@ -837,7 +838,7 @@ interface JsonSchema {
|
|
|
837
838
|
oneOf?: JsonSchema[];
|
|
838
839
|
description?: string;
|
|
839
840
|
additionalProperties?: boolean | {
|
|
840
|
-
type:
|
|
841
|
+
type: JsonSchemaType;
|
|
841
842
|
};
|
|
842
843
|
}
|
|
843
844
|
type Type = SimpleType | SimpleTypeArray | JsonSchema;
|
|
@@ -917,6 +918,7 @@ interface AppBlockComponentInput {
|
|
|
917
918
|
onEvent: (input: EventInput) => Promise<void>;
|
|
918
919
|
}
|
|
919
920
|
interface AppBlockComponentOutput {
|
|
921
|
+
order?: number;
|
|
920
922
|
name?: string;
|
|
921
923
|
description?: string;
|
|
922
924
|
default?: boolean;
|
|
@@ -995,6 +997,9 @@ interface EntityInput extends AppInput {
|
|
|
995
997
|
/** Block (entity) instance context and configuration */
|
|
996
998
|
block: EntityContext;
|
|
997
999
|
}
|
|
1000
|
+
interface EntityOutput extends AppBlockComponentOutput {
|
|
1001
|
+
modified?: boolean;
|
|
1002
|
+
}
|
|
998
1003
|
/**
|
|
999
1004
|
* Block (entity) runtime context containing configuration and state.
|
|
1000
1005
|
* Available in all block-level handlers (onEvent, onSync, onDrain, etc.).
|
|
@@ -1012,6 +1017,8 @@ interface EntityContext {
|
|
|
1012
1017
|
lifecycle: EntityLifecycleComponent | null;
|
|
1013
1018
|
/** HTTP endpoint information (null if block has no HTTP handler) */
|
|
1014
1019
|
http: EntityHTTPEndpoint | null;
|
|
1020
|
+
/** Outputs of the block */
|
|
1021
|
+
outputs: Record<string, EntityOutput>;
|
|
1015
1022
|
}
|
|
1016
1023
|
interface EntityLifecycleComponent {
|
|
1017
1024
|
status: EntityLifecycleStatus;
|
|
@@ -1052,6 +1059,7 @@ interface EventContext {
|
|
|
1052
1059
|
};
|
|
1053
1060
|
}
|
|
1054
1061
|
interface BaseLifecycleCallbackOutput {
|
|
1062
|
+
outputUpdates?: Record<string, AppBlockComponentOutput | null>;
|
|
1055
1063
|
signalUpdates?: Record<string, any>;
|
|
1056
1064
|
customStatusDescription?: string | null;
|
|
1057
1065
|
}
|
|
@@ -1147,4 +1155,4 @@ interface UIRequest {
|
|
|
1147
1155
|
payload?: any;
|
|
1148
1156
|
}
|
|
1149
1157
|
|
|
1150
|
-
export { type AppBlock, type AppBlockComponentInput, type AppBlockComponentOutput, type AppBlockConfigField, type AppBlockHTTPComponent, type AppBlockSchedule, type AppBlockSignal, type AppBlockUIComponent, type AppConfigField, type AppContext, type AppHTTPComponent, type AppHTTPEndpoint, type AppInput, type AppLifecycleCallbackOutput, type AppLifecycleStatus, type AppOnCreateOutput, type AppOnHTTPRequestInput, type AppOnInternalMessageInput, type AppOnTimerInput, type AppOnTriggerInput, type AppOnUIRequestInput, type AppSchedule, type AppSchema, type AppSignal, type AppUIComponent, type EntityContext, type EntityHTTPEndpoint, type EntityInput, type EntityLifecycleCallbackOutput, type EntityLifecycleComponent, type EntityLifecycleStatus, type EntityOnHTTPRequestInput, type EntityOnInternalMessageInput, type EntityOnTimerInput, type EntityOnTriggerInput, type EntityOnUIRequestInput, type EntityView, type EntityViewType, type EventContext, type EventInput, type HTTPRequest, type JsonSchema, type ScheduleDefinition, type Type, type UIRequest, blocks, defineApp, events, getInvocationMetadata, http, kv, lifecycle, messaging, timers, ui };
|
|
1158
|
+
export { type AppBlock, type AppBlockComponentInput, type AppBlockComponentOutput, type AppBlockConfigField, type AppBlockHTTPComponent, type AppBlockSchedule, type AppBlockSignal, type AppBlockUIComponent, type AppConfigField, type AppContext, type AppHTTPComponent, type AppHTTPEndpoint, type AppInput, type AppLifecycleCallbackOutput, type AppLifecycleStatus, type AppOnCreateOutput, type AppOnHTTPRequestInput, type AppOnInternalMessageInput, type AppOnTimerInput, type AppOnTriggerInput, type AppOnUIRequestInput, type AppSchedule, type AppSchema, type AppSignal, type AppUIComponent, type EntityContext, type EntityHTTPEndpoint, type EntityInput, type EntityLifecycleCallbackOutput, type EntityLifecycleComponent, type EntityLifecycleStatus, type EntityOnHTTPRequestInput, type EntityOnInternalMessageInput, type EntityOnTimerInput, type EntityOnTriggerInput, type EntityOnUIRequestInput, type EntityOutput, type EntityView, type EntityViewType, type EventContext, type EventInput, type HTTPRequest, type JsonSchema, type ScheduleDefinition, type Type, type UIRequest, blocks, defineApp, events, getInvocationMetadata, http, kv, lifecycle, messaging, timers, ui };
|