@dotbep/core 0.2.8 → 0.2.9
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/index.d.ts +0 -35
- package/dist/index.js +927 -972
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -21,25 +21,6 @@ export declare const ActionSchema: z.ZodObject<{
|
|
|
21
21
|
guideIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
22
22
|
}, z.core.$strip>;
|
|
23
23
|
|
|
24
|
-
export declare type Adapter = z.infer<typeof AdapterSchema>;
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* Handler registered for a specific Adapter.id.
|
|
28
|
-
* Receives the raw output of a resolver and returns a transformed payload
|
|
29
|
-
* compatible with the target lens input schema.
|
|
30
|
-
*/
|
|
31
|
-
export declare type AdapterHandler = (data: unknown) => unknown;
|
|
32
|
-
|
|
33
|
-
export declare class Adapters extends Entity<Adapter> {
|
|
34
|
-
constructor(getBep: () => BEP);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export declare const AdapterSchema: z.ZodObject<{
|
|
38
|
-
id: z.ZodString;
|
|
39
|
-
name: z.ZodString;
|
|
40
|
-
description: z.ZodString;
|
|
41
|
-
}, z.core.$strip>;
|
|
42
|
-
|
|
43
24
|
/** Input type for add() on non-autoId entities — id is optional, validated by the Zod schema */
|
|
44
25
|
declare type AddInput<T extends object> = Omit<T, 'id'> & {
|
|
45
26
|
id?: string;
|
|
@@ -117,7 +98,6 @@ export declare class Bep {
|
|
|
117
98
|
private _zip;
|
|
118
99
|
readonly project: Singleton<Project>;
|
|
119
100
|
readonly actions: Actions;
|
|
120
|
-
readonly adapters: Adapters;
|
|
121
101
|
readonly annexes: Annexes;
|
|
122
102
|
readonly deliverables: Deliverables;
|
|
123
103
|
readonly effects: Effects;
|
|
@@ -408,11 +388,6 @@ export declare const BEPSchema: z.ZodObject<{
|
|
|
408
388
|
description: z.ZodString;
|
|
409
389
|
envKeys: z.ZodArray<z.ZodString>;
|
|
410
390
|
}, z.core.$strip>>;
|
|
411
|
-
adapters: z.ZodArray<z.ZodObject<{
|
|
412
|
-
id: z.ZodString;
|
|
413
|
-
name: z.ZodString;
|
|
414
|
-
description: z.ZodString;
|
|
415
|
-
}, z.core.$strip>>;
|
|
416
391
|
remoteData: z.ZodArray<z.ZodObject<{
|
|
417
392
|
id: z.ZodUUID;
|
|
418
393
|
name: z.ZodString;
|
|
@@ -608,7 +583,6 @@ export declare interface BepTypes {
|
|
|
608
583
|
eventId: string;
|
|
609
584
|
} & Record<string, unknown>>;
|
|
610
585
|
resolvers: Record<string, (url: string, ...args: any[]) => unknown>;
|
|
611
|
-
adapters: Record<string, (data: unknown) => unknown>;
|
|
612
586
|
env: Record<string, string>;
|
|
613
587
|
}
|
|
614
588
|
|
|
@@ -931,11 +905,6 @@ export declare class Engine {
|
|
|
931
905
|
* Throws if the remoteDataId does not exist in the BEP or has no resolver assigned.
|
|
932
906
|
*/
|
|
933
907
|
getRemoteData(remoteDataId: string): Promise<unknown>;
|
|
934
|
-
/**
|
|
935
|
-
* Runs an adapter to transform data into a lens-compatible format.
|
|
936
|
-
* Throws if the adapterId has no registered handler.
|
|
937
|
-
*/
|
|
938
|
-
useAdapter(adapterId: string, data: unknown): unknown;
|
|
939
908
|
private _assertInit;
|
|
940
909
|
private _resolveBep;
|
|
941
910
|
private _fire;
|
|
@@ -2252,21 +2221,17 @@ export declare class Runtime<T extends {
|
|
|
2252
2221
|
effects: Record<string, any>;
|
|
2253
2222
|
automations: Record<string, any>;
|
|
2254
2223
|
resolvers: Record<string, any>;
|
|
2255
|
-
adapters: Record<string, any>;
|
|
2256
2224
|
env: Record<string, any>;
|
|
2257
2225
|
} = BepTypes> {
|
|
2258
2226
|
protected readonly env: T['env'];
|
|
2259
2227
|
readonly effects: Record<string, EffectHandler>;
|
|
2260
2228
|
readonly automations: Record<string, AutomationHandler>;
|
|
2261
2229
|
readonly resolvers: Record<string, ResolverHandler>;
|
|
2262
|
-
readonly adapters: Record<string, AdapterHandler>;
|
|
2263
2230
|
constructor({ env }?: RuntimeOptions);
|
|
2264
2231
|
protected effect<K extends keyof T['effects'] & string>(key: K, handler: (instance: WorkflowInstance, ...args: Parameters<T['effects'][K]>) => Promise<void>): this;
|
|
2265
2232
|
protected automation<K extends keyof T['automations'] & string>(key: K, handler: (instance: WorkflowInstance, ...args: Parameters<T['automations'][K]>) => Promise<ReturnType<T['automations'][K]>>): this;
|
|
2266
2233
|
protected resolver<K extends keyof T['resolvers'] & string>(key: K, handler: (...args: Parameters<T['resolvers'][K]>) => Promise<ReturnType<T['resolvers'][K]>>): this;
|
|
2267
|
-
protected adapter<K extends keyof T['adapters'] & string>(key: K, handler: (...args: Parameters<T['adapters'][K]>) => ReturnType<T['adapters'][K]>): this;
|
|
2268
2234
|
/* Excluded from this release type: _runResolver */
|
|
2269
|
-
/* Excluded from this release type: _runAdapter */
|
|
2270
2235
|
}
|
|
2271
2236
|
|
|
2272
2237
|
/**
|