yieldstar 0.4.6 → 0.5.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.
@@ -1,49 +0,0 @@
1
- import type { ScheduleDefinition, ScheduleOptions, ScheduleCreationResponse } from "@yieldstar/core";
2
- /**
3
- * Define a set of workflow schedules declaratively
4
- *
5
- * @param schedules Array of schedule definitions
6
- * @returns Schedule definitions that can be registered with YieldStar
7
- */
8
- export declare function defineSchedules<T extends Array<ScheduleDefinition<any>>>(schedules: T): T;
9
- /**
10
- * SDK extension for scheduling workflows
11
- */
12
- export interface SchedulerSdk<W extends Record<string, any>> {
13
- /**
14
- * Create a new scheduled workflow
15
- * @param options Schedule options
16
- * @returns Schedule creation response with the schedule ID
17
- */
18
- createSchedule<K extends string & keyof W>(options: ScheduleOptions & {
19
- workflowId: K;
20
- }): Promise<ScheduleCreationResponse>;
21
- /**
22
- * Update an existing schedule
23
- * @param scheduleId ID of the schedule to update
24
- * @param updates Partial schedule definition with fields to update
25
- */
26
- updateSchedule(scheduleId: string, updates: Partial<ScheduleDefinition>): Promise<void>;
27
- /**
28
- * Permanently remove a schedule
29
- * @param scheduleId ID of the schedule to delete
30
- */
31
- deleteSchedule(scheduleId: string): Promise<void>;
32
- /**
33
- * Retrieve a specific schedule by ID
34
- * @param scheduleId ID of the schedule to retrieve
35
- */
36
- getSchedule(scheduleId: string): Promise<ScheduleDefinition>;
37
- /**
38
- * List all schedules, optionally filtered by properties
39
- * @param filter Optional filter criteria
40
- */
41
- listSchedules(filter?: Partial<ScheduleDefinition>): Promise<ScheduleDefinition[]>;
42
- }
43
- /**
44
- * Create a scheduler SDK
45
- * @param client The scheduler client implementation
46
- * @returns An SDK with methods for managing workflow schedules
47
- */
48
- export declare function createSchedulerSdk<W extends Record<string, any>>(): SchedulerSdk<W>;
49
- //# sourceMappingURL=scheduler.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"scheduler.d.ts","sourceRoot":"","sources":["../../src/exports/scheduler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,kBAAkB,EAClB,eAAe,EACf,wBAAwB,EACzB,MAAM,iBAAiB,CAAC;AAEzB;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,CAAC,SAAS,KAAK,CAAC,kBAAkB,CAAC,GAAG,CAAC,CAAC,EACtE,SAAS,EAAE,CAAC,GACX,CAAC,CAEH;AAED;;GAEG;AACH,MAAM,WAAW,YAAY,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IACzD;;;;OAIG;IACH,cAAc,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,CAAC,EACvC,OAAO,EAAE,eAAe,GAAG;QAAE,UAAU,EAAE,CAAC,CAAA;KAAE,GAC3C,OAAO,CAAC,wBAAwB,CAAC,CAAC;IAErC;;;;OAIG;IACH,cAAc,CACZ,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,OAAO,CAAC,kBAAkB,CAAC,GACnC,OAAO,CAAC,IAAI,CAAC,CAAC;IAEjB;;;OAGG;IACH,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAElD;;;OAGG;IACH,WAAW,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC;IAE7D;;;OAGG;IACH,aAAa,CACX,MAAM,CAAC,EAAE,OAAO,CAAC,kBAAkB,CAAC,GACnC,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAAC;CAClC;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAChC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAC1B,YAAY,CAAC,CAAC,CAAC,CAQnB"}
@@ -1,31 +0,0 @@
1
- import type { WorkflowRouter, WorkflowGeneratorReturnType as CoreWorkflowGeneratorReturnType, EventParamsOf as CoreEventParamsOf, TriggerEvent as CoreTriggerEvent } from "@yieldstar/core";
2
- /**
3
- * Simplified type to extract the key type from a WorkflowRouter
4
- */
5
- export type WorkflowKey<W extends WorkflowRouter> = keyof W & string;
6
- /**
7
- * Simplified type to extract the parameters type from a workflow
8
- */
9
- export type WorkflowParams<W extends WorkflowRouter, K extends WorkflowKey<W>> = CoreEventParamsOf<W[K]>;
10
- /**
11
- * Simplified type for trigger events
12
- */
13
- export type TriggerEvent<W extends WorkflowRouter, K extends WorkflowKey<W>> = CoreTriggerEvent<K, WorkflowParams<W, K>>;
14
- /**
15
- * Simplified type for workflow return values
16
- */
17
- export type WorkflowResult<W extends WorkflowRouter, K extends WorkflowKey<W>> = CoreWorkflowGeneratorReturnType<W[K]>;
18
- /**
19
- * Helper type to simplify complex generic types
20
- * This helps TypeScript's inference by "flattening" nested types
21
- */
22
- export type Flatten<T> = {
23
- [P in keyof T]: T[P];
24
- };
25
- /**
26
- * Standard response type for trigger operations
27
- */
28
- export type TriggerResponse = {
29
- executionId: string;
30
- };
31
- //# sourceMappingURL=simplified-types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"simplified-types.d.ts","sourceRoot":"","sources":["../../src/exports/simplified-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EAEd,2BAA2B,IAAI,+BAA+B,EAC9D,aAAa,IAAI,iBAAiB,EAClC,YAAY,IAAI,gBAAgB,EACjC,MAAM,iBAAiB,CAAC;AAEzB;;GAEG;AACH,MAAM,MAAM,WAAW,CAAC,CAAC,SAAS,cAAc,IAAI,MAAM,CAAC,GAAG,MAAM,CAAC;AAErE;;GAEG;AACH,MAAM,MAAM,cAAc,CACxB,CAAC,SAAS,cAAc,EACxB,CAAC,SAAS,WAAW,CAAC,CAAC,CAAC,IACtB,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAE5B;;GAEG;AACH,MAAM,MAAM,YAAY,CACtB,CAAC,SAAS,cAAc,EACxB,CAAC,SAAS,WAAW,CAAC,CAAC,CAAC,IACtB,gBAAgB,CAAC,CAAC,EAAE,cAAc,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AAE9C;;GAEG;AACH,MAAM,MAAM,cAAc,CACxB,CAAC,SAAS,cAAc,EACxB,CAAC,SAAS,WAAW,CAAC,CAAC,CAAC,IACtB,+BAA+B,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAE1C;;;GAGG;AACH,MAAM,MAAM,OAAO,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAE,CAAC;AAElD;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG;IAAE,WAAW,EAAE,MAAM,CAAA;CAAE,CAAC"}
@@ -1,6 +0,0 @@
1
- import type { WorkflowGeneratorReturnType } from "@yieldstar/core";
2
- export type TriggerResult<W, K extends keyof W> = Promise<{
3
- executionId: string;
4
- }>;
5
- export type TriggerAndWaitResult<W, K extends keyof W> = Promise<WorkflowGeneratorReturnType<W[K]>>;
6
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/exports/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,iBAAiB,CAAC;AAEnE,MAAM,MAAM,aAAa,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,CAAC,IAAI,OAAO,CAAC;IACxD,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC,CAAC;AAEH,MAAM,MAAM,oBAAoB,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,CAAC,IAAI,OAAO,CAC9D,2BAA2B,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAClC,CAAC"}
@@ -1,9 +0,0 @@
1
- import type { WorkflowGeneratorReturnType } from "@yieldstar/core";
2
- export type TriggerAck = {
3
- executionId: string;
4
- };
5
- export type WorkflowResult<W, K extends keyof W> = {
6
- executionId: string;
7
- result: WorkflowGeneratorReturnType<W[K]>;
8
- };
9
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/internal/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,iBAAiB,CAAC;AAEnE,MAAM,MAAM,UAAU,GAAG;IACvB,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,cAAc,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,CAAC,IAAI;IACjD,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,2BAA2B,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAC3C,CAAC"}