@slflows/sdk 0.2.0 → 0.4.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.
Files changed (2) hide show
  1. package/dist/v1/index.d.ts +15 -7
  2. package/package.json +1 -1
@@ -1005,7 +1005,7 @@ interface EntityLifecycleComponent {
1005
1005
  status: EntityLifecycleStatus;
1006
1006
  signals: Record<string, any> | null;
1007
1007
  }
1008
- type EntityLifecycleStatus = "draft" | "in_progress" | "ready" | "drifted" | "failed" | "draining" | "draining_failed" | "drained";
1008
+ type EntityLifecycleStatus = "draft" | "in_progress" | "ready" | "failed" | "draining" | "draining_failed" | "drained";
1009
1009
  interface EntityHTTPEndpoint {
1010
1010
  url: string;
1011
1011
  }
@@ -1037,18 +1037,26 @@ interface EventContext {
1037
1037
  outputKey: string;
1038
1038
  };
1039
1039
  }
1040
- interface EntityLifecycleCallbackOutput {
1040
+ interface BaseLifecycleCallbackOutput {
1041
1041
  signalUpdates?: Record<string, any>;
1042
- newStatus?: EntityLifecycleStatus;
1043
1042
  customStatusDescription?: string | null;
1043
+ }
1044
+ interface EntityNonSchedulableLifecycleCallbackOutput extends BaseLifecycleCallbackOutput {
1045
+ newStatus: Exclude<EntityLifecycleStatus, "in_progress" | "draining">;
1046
+ }
1047
+ interface EntitySchedulableLifecycleCallbackOutput extends BaseLifecycleCallbackOutput {
1048
+ newStatus: "in_progress" | "draining";
1044
1049
  nextScheduleDelay?: number;
1045
1050
  }
1046
- interface AppLifecycleCallbackOutput {
1047
- signalUpdates?: Record<string, any>;
1048
- newStatus?: AppLifecycleStatus;
1049
- customStatusDescription?: string | null;
1051
+ type EntityLifecycleCallbackOutput = EntityNonSchedulableLifecycleCallbackOutput | EntitySchedulableLifecycleCallbackOutput;
1052
+ interface AppNonSchedulableLifecycleCallbackOutput extends BaseLifecycleCallbackOutput {
1053
+ newStatus: Exclude<AppLifecycleStatus, "in_progress" | "draining">;
1054
+ }
1055
+ interface AppSchedulableLifecycleCallbackOutput extends BaseLifecycleCallbackOutput {
1056
+ newStatus: "in_progress" | "draining";
1050
1057
  nextScheduleDelay?: number;
1051
1058
  }
1059
+ type AppLifecycleCallbackOutput = AppNonSchedulableLifecycleCallbackOutput | AppSchedulableLifecycleCallbackOutput;
1052
1060
  type AppLifecycleStatus = "draft" | "in_progress" | "ready" | "failed" | "draining" | "draining_failed" | "drained";
1053
1061
  interface AppOnCreateOutput {
1054
1062
  ok?: {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@slflows/sdk",
3
- "version": "0.2.0",
3
+ "version": "0.4.0",
4
4
  "files": [
5
5
  "dist"
6
6
  ],