Fix StartOS 0.4 TypeScript packaging to match SDK API

This commit is contained in:
MacPro
2026-04-09 15:10:44 -05:00
parent 68ec875ee7
commit 8298c083c7
3436 changed files with 867051 additions and 92 deletions
+40
View File
@@ -0,0 +1,40 @@
import * as T from '../types';
import * as IST from '../actions/input/inputSpecTypes';
import { Action, ActionInfo } from './setupActions';
export type RunActionInput<Input> = Input | ((prev?: {
spec: IST.InputSpec;
value: Input | null;
}) => Input);
export declare const runAction: <Input extends Record<string, unknown>>(options: {
effects: T.Effects;
actionId: T.ActionId;
input?: RunActionInput<Input>;
}) => Promise<T.ActionResult | null>;
type GetActionInputType<A extends ActionInfo<T.ActionId, any>> = A extends Action<T.ActionId, infer I> ? I : never;
type TaskBase = {
reason?: string;
replayId?: string;
};
type TaskInput<T extends ActionInfo<T.ActionId, any>> = {
kind: 'partial';
value: T.DeepPartial<GetActionInputType<T>>;
};
export type TaskOptions<T extends ActionInfo<T.ActionId, any>> = TaskBase & ({
when?: Exclude<T.TaskTrigger, {
condition: 'input-not-matches';
}>;
input?: TaskInput<T>;
} | {
when: T.TaskTrigger & {
condition: 'input-not-matches';
};
input: TaskInput<T>;
});
export declare const createTask: <T extends ActionInfo<T.ActionId, any>>(options: {
effects: T.Effects;
packageId: T.PackageId;
action: T;
severity: T.TaskSeverity;
options?: TaskOptions<T>;
}) => Promise<null>;
export {};