@dxos/functions 0.8.4-main.9be5663bfe → 0.8.4-main.abd8ff62ef
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/lib/neutral/index.mjs +126 -917
- package/dist/lib/neutral/index.mjs.map +4 -4
- package/dist/lib/neutral/meta.json +1 -1
- package/dist/types/src/index.d.ts +0 -6
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/protocol/functions-ai-http-client.d.ts.map +1 -1
- package/dist/types/src/protocol/protocol.d.ts +1 -1
- package/dist/types/src/protocol/protocol.d.ts.map +1 -1
- package/dist/types/src/sdk.d.ts +3 -7
- package/dist/types/src/sdk.d.ts.map +1 -1
- package/dist/types/src/services/credentials.d.ts +15 -38
- package/dist/types/src/services/credentials.d.ts.map +1 -1
- package/dist/types/src/services/function-invocation-service.d.ts +3 -5
- package/dist/types/src/services/function-invocation-service.d.ts.map +1 -1
- package/dist/types/src/services/index.d.ts +1 -4
- package/dist/types/src/services/index.d.ts.map +1 -1
- package/dist/types/src/services/queues.d.ts +1 -49
- package/dist/types/src/services/queues.d.ts.map +1 -1
- package/dist/types/src/services/tracing.d.ts +1 -107
- package/dist/types/src/services/tracing.d.ts.map +1 -1
- package/dist/types/src/types/index.d.ts +0 -3
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/types/url.d.ts +1 -1
- package/dist/types/src/types/url.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +15 -20
- package/src/index.ts +0 -6
- package/src/protocol/protocol.test.ts +10 -10
- package/src/protocol/protocol.ts +37 -12
- package/src/sdk.ts +5 -15
- package/src/services/credentials.ts +75 -118
- package/src/services/function-invocation-service.ts +3 -9
- package/src/services/index.ts +1 -4
- package/src/services/queues.ts +1 -87
- package/src/services/tracing.ts +0 -192
- package/src/types/index.ts +0 -3
- package/src/types/url.ts +1 -1
- package/dist/lib/neutral/Trace.mjs +0 -38
- package/dist/lib/neutral/Trace.mjs.map +0 -7
- package/dist/lib/neutral/chunk-5T7GOX2V.mjs +0 -149
- package/dist/lib/neutral/chunk-5T7GOX2V.mjs.map +0 -7
- package/dist/lib/neutral/chunk-IVDUS56O.mjs +0 -49
- package/dist/lib/neutral/chunk-IVDUS56O.mjs.map +0 -7
- package/dist/lib/neutral/chunk-J5LGTIGS.mjs +0 -10
- package/dist/lib/neutral/chunk-J5LGTIGS.mjs.map +0 -7
- package/dist/lib/neutral/fib-N45KAC7C.mjs +0 -23
- package/dist/lib/neutral/fib-N45KAC7C.mjs.map +0 -7
- package/dist/lib/neutral/reply-EUEPKNJF.mjs +0 -19
- package/dist/lib/neutral/reply-EUEPKNJF.mjs.map +0 -7
- package/dist/lib/neutral/sleep-PUK3D4FF.mjs +0 -15
- package/dist/lib/neutral/sleep-PUK3D4FF.mjs.map +0 -7
- package/dist/types/src/Trace.d.ts +0 -155
- package/dist/types/src/Trace.d.ts.map +0 -1
- package/dist/types/src/errors.d.ts +0 -121
- package/dist/types/src/errors.d.ts.map +0 -1
- package/dist/types/src/example/definitions.d.ts +0 -11
- package/dist/types/src/example/definitions.d.ts.map +0 -1
- package/dist/types/src/example/fib.d.ts +0 -8
- package/dist/types/src/example/fib.d.ts.map +0 -1
- package/dist/types/src/example/forex-effect.d.ts +0 -3
- package/dist/types/src/example/forex-effect.d.ts.map +0 -1
- package/dist/types/src/example/index.d.ts +0 -4
- package/dist/types/src/example/index.d.ts.map +0 -1
- package/dist/types/src/example/reply.d.ts +0 -4
- package/dist/types/src/example/reply.d.ts.map +0 -1
- package/dist/types/src/example/sleep.d.ts +0 -6
- package/dist/types/src/example/sleep.d.ts.map +0 -1
- package/dist/types/src/process/Process.d.ts +0 -247
- package/dist/types/src/process/Process.d.ts.map +0 -1
- package/dist/types/src/process/ServiceResolver.d.ts +0 -74
- package/dist/types/src/process/ServiceResolver.d.ts.map +0 -1
- package/dist/types/src/process/StorageService.d.ts +0 -58
- package/dist/types/src/process/StorageService.d.ts.map +0 -1
- package/dist/types/src/services/event-logger.d.ts +0 -81
- package/dist/types/src/services/event-logger.d.ts.map +0 -1
- package/dist/types/src/types/Script.d.ts +0 -22
- package/dist/types/src/types/Script.d.ts.map +0 -1
- package/dist/types/src/types/Trigger.d.ts +0 -120
- package/dist/types/src/types/Trigger.d.ts.map +0 -1
- package/dist/types/src/types/TriggerEvent.d.ts +0 -75
- package/dist/types/src/types/TriggerEvent.d.ts.map +0 -1
- package/src/Trace.ts +0 -202
- package/src/errors.ts +0 -21
- package/src/example/definitions.ts +0 -49
- package/src/example/fib.ts +0 -23
- package/src/example/forex-effect.ts +0 -40
- package/src/example/index.ts +0 -12
- package/src/example/reply.ts +0 -19
- package/src/example/sleep.ts +0 -17
- package/src/process/Process.ts +0 -486
- package/src/process/ServiceResolver.ts +0 -174
- package/src/process/StorageService.ts +0 -99
- package/src/services/event-logger.ts +0 -127
- package/src/types/Script.ts +0 -38
- package/src/types/Trigger.ts +0 -154
- package/src/types/TriggerEvent.ts +0 -62
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import * as Context from 'effect/Context';
|
|
2
|
-
import * as Effect from 'effect/Effect';
|
|
3
|
-
import * as Layer from 'effect/Layer';
|
|
4
|
-
import * as Scope from 'effect/Scope';
|
|
5
|
-
import type { DXN, SpaceId } from '@dxos/keys';
|
|
6
|
-
import { ServiceNotAvailableError } from '../errors';
|
|
7
|
-
import * as Process from './Process';
|
|
8
|
-
declare const ServiceResolverTypeId: "~@dxos/functions/ServiceResolver";
|
|
9
|
-
type ServiceResolverTypeId = typeof ServiceResolverTypeId;
|
|
10
|
-
export interface ServiceResolver {
|
|
11
|
-
readonly [ServiceResolverTypeId]: ServiceResolverTypeId;
|
|
12
|
-
/**
|
|
13
|
-
* Resolve a set of services identified by their tags.
|
|
14
|
-
* Returns a Context containing all requested services, or fails with ServiceNotAvailableError.
|
|
15
|
-
*/
|
|
16
|
-
resolve<Tag extends Context.Tag<any, any>>(tag: Tag, context: ResolutionContext): Effect.Effect<Context.Tag.Service<Tag>, ServiceNotAvailableError, Scope.Scope>;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Tag for the ServiceResolver service.
|
|
20
|
-
*/
|
|
21
|
-
export declare const ServiceResolver: Context.Tag<ServiceResolver, ServiceResolver>;
|
|
22
|
-
export declare const resolve: <Tag extends Context.Tag<any, any>>(tag: Tag, context: ResolutionContext) => Effect.Effect<Context.Tag.Service<Tag>, ServiceNotAvailableError, Scope.Scope | ServiceResolver>;
|
|
23
|
-
export declare const resolveAll: <const Tags extends readonly Context.Tag<any, any>[]>(tags: Tags, context: ResolutionContext) => Effect.Effect<Context.Context<Tags[number]>, ServiceNotAvailableError, Scope.Scope | ServiceResolver>;
|
|
24
|
-
/**
|
|
25
|
-
* Provides context for service resolution.
|
|
26
|
-
*/
|
|
27
|
-
export interface ResolutionContext {
|
|
28
|
-
/**
|
|
29
|
-
* Under which identity the process is running.
|
|
30
|
-
*/
|
|
31
|
-
readonly identity?: string;
|
|
32
|
-
/**
|
|
33
|
-
* Under which space the process is running.
|
|
34
|
-
*/
|
|
35
|
-
readonly space?: SpaceId;
|
|
36
|
-
/**
|
|
37
|
-
* DXN of the conversation feed the process is running in.
|
|
38
|
-
*/
|
|
39
|
-
readonly conversation?: DXN.String;
|
|
40
|
-
/**
|
|
41
|
-
* Under which process the process is running.
|
|
42
|
-
*/
|
|
43
|
-
readonly process?: Process.ID;
|
|
44
|
-
}
|
|
45
|
-
export declare const succeed: <I, S>(tag: Context.Tag<I, S>, getService: (context: ResolutionContext) => Effect.Effect<S, ServiceNotAvailableError, Scope.Scope>) => ServiceResolver;
|
|
46
|
-
/**
|
|
47
|
-
* Create a ServiceResolver from a custom resolution function.
|
|
48
|
-
*/
|
|
49
|
-
export declare const make: (resolveFn: <I, S>(tag: Context.Tag<I, S>, context: ResolutionContext) => Effect.Effect<S, ServiceNotAvailableError, Scope.Scope>) => ServiceResolver;
|
|
50
|
-
/**
|
|
51
|
-
* Create a ServiceResolver backed by a static Context.
|
|
52
|
-
* Tags present in the context are resolved; missing tags fail with ServiceNotAvailableError.
|
|
53
|
-
*/
|
|
54
|
-
export declare const fromContext: (ctx: Context.Context<any>) => ServiceResolver;
|
|
55
|
-
/**
|
|
56
|
-
* Create a ServiceResolver that resolves tags from the current Effect context.
|
|
57
|
-
* Only the specified tags are available; requests for other tags fail.
|
|
58
|
-
*/
|
|
59
|
-
export declare const fromRequirements: <const Tags extends readonly Context.Tag<any, any>[]>(...tags: Tags) => Effect.Effect<ServiceResolver, never, Context.Tag.Identifier<Tags[number]>>;
|
|
60
|
-
/**
|
|
61
|
-
* Like {@link fromRequirements} but returns a Layer that provides ServiceResolver.
|
|
62
|
-
*/
|
|
63
|
-
export declare const layerRequirements: <const Tags extends readonly Context.Tag<any, any>[]>(...tags: Tags) => Layer.Layer<ServiceResolver, never, Context.Tag.Identifier<Tags[number]>>;
|
|
64
|
-
/**
|
|
65
|
-
* Compose multiple resolvers left to right. Earlier resolvers take precedence:
|
|
66
|
-
* the first resolver that can satisfy a tag wins.
|
|
67
|
-
*/
|
|
68
|
-
export declare const compose: (...resolvers: readonly ServiceResolver[]) => ServiceResolver;
|
|
69
|
-
/**
|
|
70
|
-
* An empty resolver that fails for any requested service.
|
|
71
|
-
*/
|
|
72
|
-
export declare const empty: ServiceResolver;
|
|
73
|
-
export {};
|
|
74
|
-
//# sourceMappingURL=ServiceResolver.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ServiceResolver.d.ts","sourceRoot":"","sources":["../../../../src/process/ServiceResolver.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC1C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AAEtC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AAEtC,OAAO,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,YAA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AAC,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CACjB,CAAC;AAE3D;;;GAGG;AACH,eAAO,MAAM,OAAO,GAAI,GAAG,WAAW,SAAS,eAAe,EAAE,KAAG,eAYhE,CAAC;AAEJ;;GAEG;AACH,eAAO,MAAM,KAAK,EAAE,eAElB,CAAC"}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import * as Context from 'effect/Context';
|
|
2
|
-
import * as Effect from 'effect/Effect';
|
|
3
|
-
import * as Option from 'effect/Option';
|
|
4
|
-
import * as Pipeable from 'effect/Pipeable';
|
|
5
|
-
import * as Schema from 'effect/Schema';
|
|
6
|
-
export interface Service {
|
|
7
|
-
/** Read a value by key. Returns `None` if key does not exist. */
|
|
8
|
-
get<S extends Schema.Schema<any, string, any>>(schema: S, key: string): Effect.Effect<Option.Option<Schema.Schema.Type<S>>, never, Schema.Schema.Context<S>>;
|
|
9
|
-
/** Write a value for the given key. */
|
|
10
|
-
set<S extends Schema.Schema<any, string, any>>(schema: S, key: string, value: Schema.Schema.Type<S>): Effect.Effect<void, never, Schema.Schema.Context<S>>;
|
|
11
|
-
/** Remove a key. */
|
|
12
|
-
delete(key: string): Effect.Effect<void>;
|
|
13
|
-
/** List all keys, optionally filtered by prefix. */
|
|
14
|
-
list(prefix?: string): Effect.Effect<readonly string[]>;
|
|
15
|
-
/** Remove all keys managed by this scoped store. */
|
|
16
|
-
clear(): Effect.Effect<void>;
|
|
17
|
-
}
|
|
18
|
-
declare const StorageService_base: Context.TagClass<StorageService, "@dxos/functions/StorageService", Service>;
|
|
19
|
-
/**
|
|
20
|
-
* Scoped key-value storage service for processes.
|
|
21
|
-
* Each process receives its own namespaced instance via the process manager.
|
|
22
|
-
* Construct a live implementation with `StorageService.layer` from `@dxos/functions-runtime`.
|
|
23
|
-
*/
|
|
24
|
-
export declare class StorageService extends StorageService_base {
|
|
25
|
-
}
|
|
26
|
-
export declare const get: <S extends Schema.Schema<any, string, any>>(schema: S, key: string) => Effect.Effect<Option.Option<Schema.Schema.Type<S>>, never, Schema.Schema.Context<S> | StorageService>;
|
|
27
|
-
export declare const set: <S extends Schema.Schema<any, string, any>>(schema: S, key: string, value: Schema.Schema.Type<S>) => Effect.Effect<void, never, Schema.Schema.Context<S> | StorageService>;
|
|
28
|
-
export declare const deleteKey: (key: string) => Effect.Effect<void, never, StorageService>;
|
|
29
|
-
export declare const list: (prefix?: string | undefined) => Effect.Effect<readonly string[], never, StorageService>;
|
|
30
|
-
export declare const clear: () => Effect.Effect<void, never, StorageService>;
|
|
31
|
-
/**
|
|
32
|
-
* Typed key in a storage service.
|
|
33
|
-
*/
|
|
34
|
-
export interface Key<T> extends Pipeable.Pipeable {
|
|
35
|
-
readonly key: string;
|
|
36
|
-
get: Effect.Effect<Option.Option<T>, never, StorageService>;
|
|
37
|
-
set(value: T): Effect.Effect<void, never, StorageService>;
|
|
38
|
-
delete(): Effect.Effect<void, never, StorageService>;
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* Create a typed key in a storage service.
|
|
42
|
-
*/
|
|
43
|
-
export declare const key: <S extends Schema.Schema<any, string, any>>(schema: S, key: string) => Key<Schema.Schema.Type<S>>;
|
|
44
|
-
/**
|
|
45
|
-
* Typed key in a storage service with a default value.
|
|
46
|
-
*/
|
|
47
|
-
export interface KeyWithDefault<T, U> extends Pipeable.Pipeable {
|
|
48
|
-
readonly key: string;
|
|
49
|
-
get: Effect.Effect<T | U, never, StorageService>;
|
|
50
|
-
set(value: U): Effect.Effect<void, never, StorageService>;
|
|
51
|
-
delete(): Effect.Effect<void, never, StorageService>;
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* Assign a default value to a key if it is not present.
|
|
55
|
-
*/
|
|
56
|
-
export declare const withDefault: <T>(getDefault: () => NoInfer<T>) => (key: Key<T>) => KeyWithDefault<T, T>;
|
|
57
|
-
export {};
|
|
58
|
-
//# sourceMappingURL=StorageService.d.ts.map
|
|
@@ -1 +0,0 @@
|
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AAC,QAAQ;IAC7D,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,GAAG,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,cAAc,CAAC,CAAC;IACjD,GAAG,CAAC,KAAK,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,EAAE,cAAc,CAAC,CAAC;IAC1D,MAAM,IAAI,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,EAAE,cAAc,CAAC,CAAC;CACtD;AAED;;GAEG;AACH,eAAO,MAAM,WAAW,GACrB,CAAC,EAAE,YAAY,MAAM,OAAO,CAAC,CAAC,CAAC,MAC/B,KAAK,GAAG,CAAC,CAAC,CAAC,KAAG,cAAc,CAAC,CAAC,EAAE,CAAC,CAUjC,CAAC"}
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import * as Context from 'effect/Context';
|
|
2
|
-
import * as Effect from 'effect/Effect';
|
|
3
|
-
import * as Layer from 'effect/Layer';
|
|
4
|
-
import * as Schema from 'effect/Schema';
|
|
5
|
-
import { Type } from '@dxos/echo';
|
|
6
|
-
import { LogLevel } from '@dxos/log';
|
|
7
|
-
import { TracingService } from './tracing';
|
|
8
|
-
export declare const ComputeEventPayload: Schema.Union<[Schema.Struct<{
|
|
9
|
-
type: Schema.Literal<["begin-compute"]>;
|
|
10
|
-
nodeId: typeof Schema.String;
|
|
11
|
-
/**
|
|
12
|
-
* Names of the inputs begin computed.
|
|
13
|
-
*/
|
|
14
|
-
inputs: Schema.Array$<typeof Schema.String>;
|
|
15
|
-
}>, Schema.Struct<{
|
|
16
|
-
type: Schema.Literal<["end-compute"]>;
|
|
17
|
-
nodeId: typeof Schema.String;
|
|
18
|
-
/**
|
|
19
|
-
* Names of the outputs computed.
|
|
20
|
-
*/
|
|
21
|
-
outputs: Schema.Array$<typeof Schema.String>;
|
|
22
|
-
}>, Schema.Struct<{
|
|
23
|
-
type: Schema.Literal<["compute-input"]>;
|
|
24
|
-
nodeId: typeof Schema.String;
|
|
25
|
-
property: typeof Schema.String;
|
|
26
|
-
value: typeof Schema.Any;
|
|
27
|
-
}>, Schema.Struct<{
|
|
28
|
-
type: Schema.Literal<["compute-output"]>;
|
|
29
|
-
nodeId: typeof Schema.String;
|
|
30
|
-
property: typeof Schema.String;
|
|
31
|
-
value: typeof Schema.Any;
|
|
32
|
-
}>, Schema.Struct<{
|
|
33
|
-
type: Schema.Literal<["custom"]>;
|
|
34
|
-
nodeId: typeof Schema.String;
|
|
35
|
-
event: typeof Schema.Any;
|
|
36
|
-
}>]>;
|
|
37
|
-
export type ComputeEventPayload = Schema.Schema.Type<typeof ComputeEventPayload>;
|
|
38
|
-
export declare const ComputeEvent: Type.Obj<{
|
|
39
|
-
readonly payload: {
|
|
40
|
-
readonly type: "begin-compute";
|
|
41
|
-
readonly nodeId: string;
|
|
42
|
-
readonly inputs: readonly string[];
|
|
43
|
-
} | {
|
|
44
|
-
readonly type: "end-compute";
|
|
45
|
-
readonly nodeId: string;
|
|
46
|
-
readonly outputs: readonly string[];
|
|
47
|
-
} | {
|
|
48
|
-
readonly type: "compute-input";
|
|
49
|
-
readonly value: any;
|
|
50
|
-
readonly property: string;
|
|
51
|
-
readonly nodeId: string;
|
|
52
|
-
} | {
|
|
53
|
-
readonly type: "compute-output";
|
|
54
|
-
readonly value: any;
|
|
55
|
-
readonly property: string;
|
|
56
|
-
readonly nodeId: string;
|
|
57
|
-
} | {
|
|
58
|
-
readonly type: "custom";
|
|
59
|
-
readonly nodeId: string;
|
|
60
|
-
readonly event: any;
|
|
61
|
-
};
|
|
62
|
-
}, Schema.Struct.Fields>;
|
|
63
|
-
declare const ComputeEventLogger_base: Context.TagClass<ComputeEventLogger, "@dxos/functions/ComputeEventLogger", {
|
|
64
|
-
readonly log: (event: ComputeEventPayload) => void;
|
|
65
|
-
readonly nodeId: string | undefined;
|
|
66
|
-
}>;
|
|
67
|
-
/**
|
|
68
|
-
* Logs event for the compute workflows.
|
|
69
|
-
*/
|
|
70
|
-
export declare class ComputeEventLogger extends ComputeEventLogger_base {
|
|
71
|
-
static noop: Context.Tag.Service<ComputeEventLogger>;
|
|
72
|
-
/**
|
|
73
|
-
* Implements ComputeEventLogger using TracingService.
|
|
74
|
-
*/
|
|
75
|
-
static layerFromTracing: Layer.Layer<ComputeEventLogger, never, TracingService>;
|
|
76
|
-
}
|
|
77
|
-
export declare const logCustomEvent: (data: any) => Effect.Effect<void, never, ComputeEventLogger>;
|
|
78
|
-
export declare const createDefectLogger: <A, E, R>() => ((self: Effect.Effect<A, E, R>) => Effect.Effect<A, E, R>);
|
|
79
|
-
export declare const createEventLogger: (level: LogLevel, message?: string) => Context.Tag.Service<ComputeEventLogger>;
|
|
80
|
-
export {};
|
|
81
|
-
//# sourceMappingURL=event-logger.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"event-logger.d.ts","sourceRoot":"","sources":["../../../../src/services/event-logger.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC1C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAO,IAAI,EAAE,MAAM,YAAY,CAAC;AAEvC,OAAO,EAAE,QAAQ,EAAO,MAAM,WAAW,CAAC;AAE1C,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAE3C,eAAO,MAAM,mBAAmB;;;IAI5B;;OAEG;;;;;IAMH;;OAEG;;;;;;;;;;;;;;;;IAoBN,CAAC;AACF,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEjF,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;wBAEyD,CAAC;;kBAOjE,CAAC,KAAK,EAAE,mBAAmB,KAAK,IAAI;qBAAmB,MAAM,GAAG,SAAS;;AAL3F;;GAEG;AACH,qBAAa,kBAAmB,SAAQ,uBAGrC;IACD,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAGlD;IAEF;;OAEG;IACH,MAAM,CAAC,gBAAgB,yDAWrB;CACH;AAED,eAAO,MAAM,cAAc,GAAI,MAAM,GAAG,mDAWpC,CAAC;AAEL,eAAO,MAAM,kBAAkB,GAAI,CAAC,EAAE,CAAC,EAAE,CAAC,OAAK,CAAC,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,KAAK,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAMrG,CAAC;AAEJ,eAAO,MAAM,iBAAiB,GAC5B,OAAO,QAAQ,EACf,UAAS,MAAgB,KACxB,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,kBAAkB,CAiBxC,CAAC"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import * as Schema from 'effect/Schema';
|
|
2
|
-
import { Obj, Type } from '@dxos/echo';
|
|
3
|
-
/**
|
|
4
|
-
* Source script.
|
|
5
|
-
*/
|
|
6
|
-
export declare const Script: Type.Obj<{
|
|
7
|
-
readonly name?: string | undefined;
|
|
8
|
-
readonly description?: string | undefined;
|
|
9
|
-
readonly changed?: boolean | undefined;
|
|
10
|
-
readonly source: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
|
|
11
|
-
readonly name?: string | undefined;
|
|
12
|
-
readonly content: string;
|
|
13
|
-
}>;
|
|
14
|
-
}, Schema.Struct.Fields>;
|
|
15
|
-
export interface Script extends Schema.Schema.Type<typeof Script> {
|
|
16
|
-
}
|
|
17
|
-
type Props = Omit<Obj.MakeProps<typeof Script>, 'source'> & {
|
|
18
|
-
source?: string;
|
|
19
|
-
};
|
|
20
|
-
export declare const make: ({ source, ...props }?: Props) => Script;
|
|
21
|
-
export {};
|
|
22
|
-
//# sourceMappingURL=Script.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Script.d.ts","sourceRoot":"","sources":["../../../../src/types/Script.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAc,GAAG,EAAO,IAAI,EAAE,MAAM,YAAY,CAAC;AAIxD;;GAEG;AACH,eAAO,MAAM,MAAM;;;;;;;;wBAiBlB,CAAC;AAEF,MAAM,WAAW,MAAO,SAAQ,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,MAAM,CAAC;CAAG;AAEpE,KAAK,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,OAAO,MAAM,CAAC,EAAE,QAAQ,CAAC,GAAG;IAAE,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAEhF,eAAO,MAAM,IAAI,GAAI,uBAA2B,KAAU,KAAG,MACqB,CAAC"}
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
import * as Schema from 'effect/Schema';
|
|
2
|
-
import { Obj, QueryAST, Type } from '@dxos/echo';
|
|
3
|
-
/**
|
|
4
|
-
* Type discriminator for TriggerType.
|
|
5
|
-
* Every spec has a type field of type TriggerKind that we can use to understand which type we're working with.
|
|
6
|
-
* https://www.typescriptlang.org/docs/handbook/2/narrowing.html#discriminated-unions
|
|
7
|
-
*/
|
|
8
|
-
export declare const Kinds: readonly ["email", "queue", "subscription", "timer", "webhook"];
|
|
9
|
-
export type Kind = (typeof Kinds)[number];
|
|
10
|
-
export declare const EmailSpec: Schema.Struct<{
|
|
11
|
-
kind: Schema.Literal<["email"]>;
|
|
12
|
-
}>;
|
|
13
|
-
export type EmailSpec = Schema.Schema.Type<typeof EmailSpec>;
|
|
14
|
-
export declare const QueueSpec: Schema.Struct<{
|
|
15
|
-
kind: Schema.Literal<["queue"]>;
|
|
16
|
-
queue: Schema.refine<string, typeof Schema.NonEmptyString>;
|
|
17
|
-
}>;
|
|
18
|
-
export type QueueSpec = Schema.Schema.Type<typeof QueueSpec>;
|
|
19
|
-
/**
|
|
20
|
-
* Subscription.
|
|
21
|
-
*/
|
|
22
|
-
export declare const SubscriptionSpec: Schema.Struct<{
|
|
23
|
-
kind: Schema.Literal<["subscription"]>;
|
|
24
|
-
query: Schema.Struct<{
|
|
25
|
-
raw: Schema.optional<Schema.SchemaClass<string, string, never>>;
|
|
26
|
-
ast: Schema.Schema<QueryAST.QuerySelectClause | QueryAST.QueryFilterClause | QueryAST.QueryReferenceTraversalClause | QueryAST.QueryIncomingReferencesClause | QueryAST.QueryRelationClause | QueryAST.QueryRelationTraversalClause | QueryAST.QueryHierarchyTraversalClause | QueryAST.QueryUnionClause | QueryAST.QuerySetDifferenceClause | QueryAST.QueryOrderClause | QueryAST.QueryOptionsClause | QueryAST.QueryLimitClause | QueryAST.QueryFromClause, QueryAST.QuerySelectClause | QueryAST.QueryFilterClause | QueryAST.QueryReferenceTraversalClause | QueryAST.QueryIncomingReferencesClause | QueryAST.QueryRelationClause | QueryAST.QueryRelationTraversalClause | QueryAST.QueryHierarchyTraversalClause | QueryAST.QueryUnionClause | QueryAST.QuerySetDifferenceClause | QueryAST.QueryOrderClause | QueryAST.QueryOptionsClause | QueryAST.QueryLimitClause | QueryAST.QueryFromClause, never>;
|
|
27
|
-
}>;
|
|
28
|
-
options: Schema.optional<Schema.Struct<{
|
|
29
|
-
deep: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
|
|
30
|
-
delay: Schema.optional<Schema.SchemaClass<number, number, never>>;
|
|
31
|
-
}>>;
|
|
32
|
-
}>;
|
|
33
|
-
export type SubscriptionSpec = Schema.Schema.Type<typeof SubscriptionSpec>;
|
|
34
|
-
/**
|
|
35
|
-
* Cron timer.
|
|
36
|
-
*/
|
|
37
|
-
export declare const TimerSpec: Schema.Struct<{
|
|
38
|
-
kind: Schema.Literal<["timer"]>;
|
|
39
|
-
cron: Schema.SchemaClass<string, string, never>;
|
|
40
|
-
}>;
|
|
41
|
-
export type TimerSpec = Schema.Schema.Type<typeof TimerSpec>;
|
|
42
|
-
/**
|
|
43
|
-
* Webhook.
|
|
44
|
-
*/
|
|
45
|
-
export declare const WebhookSpec: Schema.Struct<{
|
|
46
|
-
kind: Schema.Literal<["webhook"]>;
|
|
47
|
-
method: Schema.optional<Schema.SchemaClass<string, string, never>>;
|
|
48
|
-
port: Schema.optional<Schema.SchemaClass<number, number, never>>;
|
|
49
|
-
}>;
|
|
50
|
-
export type WebhookSpec = Schema.Schema.Type<typeof WebhookSpec>;
|
|
51
|
-
/**
|
|
52
|
-
* Trigger schema.
|
|
53
|
-
*/
|
|
54
|
-
export declare const Spec: Schema.Union<[Schema.Struct<{
|
|
55
|
-
kind: Schema.Literal<["email"]>;
|
|
56
|
-
}>, Schema.Struct<{
|
|
57
|
-
kind: Schema.Literal<["queue"]>;
|
|
58
|
-
queue: Schema.refine<string, typeof Schema.NonEmptyString>;
|
|
59
|
-
}>, Schema.Struct<{
|
|
60
|
-
kind: Schema.Literal<["subscription"]>;
|
|
61
|
-
query: Schema.Struct<{
|
|
62
|
-
raw: Schema.optional<Schema.SchemaClass<string, string, never>>;
|
|
63
|
-
ast: Schema.Schema<QueryAST.QuerySelectClause | QueryAST.QueryFilterClause | QueryAST.QueryReferenceTraversalClause | QueryAST.QueryIncomingReferencesClause | QueryAST.QueryRelationClause | QueryAST.QueryRelationTraversalClause | QueryAST.QueryHierarchyTraversalClause | QueryAST.QueryUnionClause | QueryAST.QuerySetDifferenceClause | QueryAST.QueryOrderClause | QueryAST.QueryOptionsClause | QueryAST.QueryLimitClause | QueryAST.QueryFromClause, QueryAST.QuerySelectClause | QueryAST.QueryFilterClause | QueryAST.QueryReferenceTraversalClause | QueryAST.QueryIncomingReferencesClause | QueryAST.QueryRelationClause | QueryAST.QueryRelationTraversalClause | QueryAST.QueryHierarchyTraversalClause | QueryAST.QueryUnionClause | QueryAST.QuerySetDifferenceClause | QueryAST.QueryOrderClause | QueryAST.QueryOptionsClause | QueryAST.QueryLimitClause | QueryAST.QueryFromClause, never>;
|
|
64
|
-
}>;
|
|
65
|
-
options: Schema.optional<Schema.Struct<{
|
|
66
|
-
deep: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
|
|
67
|
-
delay: Schema.optional<Schema.SchemaClass<number, number, never>>;
|
|
68
|
-
}>>;
|
|
69
|
-
}>, Schema.Struct<{
|
|
70
|
-
kind: Schema.Literal<["timer"]>;
|
|
71
|
-
cron: Schema.SchemaClass<string, string, never>;
|
|
72
|
-
}>, Schema.Struct<{
|
|
73
|
-
kind: Schema.Literal<["webhook"]>;
|
|
74
|
-
method: Schema.optional<Schema.SchemaClass<string, string, never>>;
|
|
75
|
-
port: Schema.optional<Schema.SchemaClass<number, number, never>>;
|
|
76
|
-
}>]>;
|
|
77
|
-
export type Spec = Schema.Schema.Type<typeof Spec>;
|
|
78
|
-
/**
|
|
79
|
-
* Function trigger.
|
|
80
|
-
* Function is invoked with the `payload` passed as input data.
|
|
81
|
-
* The event that triggers the function is available in the function context.
|
|
82
|
-
*/
|
|
83
|
-
declare const TriggerSchema: Type.Obj<{
|
|
84
|
-
readonly function?: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & Obj.Unknown> | undefined;
|
|
85
|
-
readonly input?: {
|
|
86
|
-
readonly [x: string]: any;
|
|
87
|
-
} | undefined;
|
|
88
|
-
readonly inputNodeId?: string | undefined;
|
|
89
|
-
readonly enabled?: boolean | undefined;
|
|
90
|
-
readonly spec?: {
|
|
91
|
-
readonly kind: "email";
|
|
92
|
-
} | {
|
|
93
|
-
readonly queue: string;
|
|
94
|
-
readonly kind: "queue";
|
|
95
|
-
} | {
|
|
96
|
-
readonly kind: "subscription";
|
|
97
|
-
readonly query: {
|
|
98
|
-
readonly raw?: string | undefined;
|
|
99
|
-
readonly ast: QueryAST.QuerySelectClause | QueryAST.QueryFilterClause | QueryAST.QueryReferenceTraversalClause | QueryAST.QueryIncomingReferencesClause | QueryAST.QueryRelationClause | QueryAST.QueryRelationTraversalClause | QueryAST.QueryHierarchyTraversalClause | QueryAST.QueryUnionClause | QueryAST.QuerySetDifferenceClause | QueryAST.QueryOrderClause | QueryAST.QueryOptionsClause | QueryAST.QueryLimitClause | QueryAST.QueryFromClause;
|
|
100
|
-
};
|
|
101
|
-
readonly options?: {
|
|
102
|
-
readonly deep?: boolean | undefined;
|
|
103
|
-
readonly delay?: number | undefined;
|
|
104
|
-
} | undefined;
|
|
105
|
-
} | {
|
|
106
|
-
readonly kind: "timer";
|
|
107
|
-
readonly cron: string;
|
|
108
|
-
} | {
|
|
109
|
-
readonly kind: "webhook";
|
|
110
|
-
readonly method?: string | undefined;
|
|
111
|
-
readonly port?: number | undefined;
|
|
112
|
-
} | undefined;
|
|
113
|
-
readonly concurrency?: number | undefined;
|
|
114
|
-
}, Schema.Struct.Fields>;
|
|
115
|
-
export interface Trigger extends Schema.Schema.Type<typeof TriggerSchema> {
|
|
116
|
-
}
|
|
117
|
-
export declare const Trigger: Type.Obj<Trigger>;
|
|
118
|
-
export declare const make: (props: Obj.MakeProps<typeof Trigger>) => Obj.OfShape<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & Trigger>;
|
|
119
|
-
export {};
|
|
120
|
-
//# sourceMappingURL=Trigger.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Trigger.d.ts","sourceRoot":"","sources":["../../../../src/types/Trigger.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAGxC,OAAO,EAAc,GAAG,EAAE,QAAQ,EAAO,IAAI,EAAE,MAAM,YAAY,CAAC;AAIlE;;;;GAIG;AACH,eAAO,MAAM,KAAK,iEAAkE,CAAC;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OAAO,GAAG,CAAC,SAAS,CAAC,OAAO,OAAO,CAAC,+GAA6B,CAAC"}
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import * as Schema from 'effect/Schema';
|
|
2
|
-
import { Obj, Ref } from '@dxos/echo';
|
|
3
|
-
export declare const EmailEvent: Schema.Struct<{
|
|
4
|
-
from: typeof Schema.String;
|
|
5
|
-
to: typeof Schema.String;
|
|
6
|
-
subject: typeof Schema.String;
|
|
7
|
-
created: typeof Schema.String;
|
|
8
|
-
body: typeof Schema.String;
|
|
9
|
-
}>;
|
|
10
|
-
export type EmailEvent = Schema.Schema.Type<typeof EmailEvent>;
|
|
11
|
-
export declare const QueueEvent: Schema.Struct<{
|
|
12
|
-
queue: Schema.refine<string, typeof Schema.NonEmptyString>;
|
|
13
|
-
item: typeof Schema.Any;
|
|
14
|
-
cursor: typeof Schema.String;
|
|
15
|
-
}>;
|
|
16
|
-
export type QueueEvent = Schema.Schema.Type<typeof QueueEvent>;
|
|
17
|
-
export declare const SubscriptionEvent: Schema.Struct<{
|
|
18
|
-
/**
|
|
19
|
-
* Type of the mutation.
|
|
20
|
-
*/
|
|
21
|
-
type: typeof Schema.String;
|
|
22
|
-
/**
|
|
23
|
-
* Reference to the object that was changed or created.
|
|
24
|
-
*/
|
|
25
|
-
subject: Ref.RefSchema<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & Obj.Unknown>;
|
|
26
|
-
/**
|
|
27
|
-
* @deprecated
|
|
28
|
-
*/
|
|
29
|
-
changedObjectId: Schema.optional<typeof Schema.String>;
|
|
30
|
-
}>;
|
|
31
|
-
export type SubscriptionEvent = Schema.Schema.Type<typeof SubscriptionEvent>;
|
|
32
|
-
export declare const TimerEvent: Schema.Struct<{
|
|
33
|
-
tick: typeof Schema.Number;
|
|
34
|
-
}>;
|
|
35
|
-
export type TimerEvent = Schema.Schema.Type<typeof TimerEvent>;
|
|
36
|
-
export declare const WebhookEvent: Schema.Struct<{
|
|
37
|
-
url: typeof Schema.String;
|
|
38
|
-
method: Schema.Literal<["GET", "POST"]>;
|
|
39
|
-
headers: Schema.Record$<typeof Schema.String, typeof Schema.String>;
|
|
40
|
-
bodyText: typeof Schema.String;
|
|
41
|
-
}>;
|
|
42
|
-
export type WebhookEvent = Schema.Schema.Type<typeof WebhookEvent>;
|
|
43
|
-
export declare const TriggerEvent: Schema.Union<[Schema.Struct<{
|
|
44
|
-
from: typeof Schema.String;
|
|
45
|
-
to: typeof Schema.String;
|
|
46
|
-
subject: typeof Schema.String;
|
|
47
|
-
created: typeof Schema.String;
|
|
48
|
-
body: typeof Schema.String;
|
|
49
|
-
}>, Schema.Struct<{
|
|
50
|
-
queue: Schema.refine<string, typeof Schema.NonEmptyString>;
|
|
51
|
-
item: typeof Schema.Any;
|
|
52
|
-
cursor: typeof Schema.String;
|
|
53
|
-
}>, Schema.Struct<{
|
|
54
|
-
/**
|
|
55
|
-
* Type of the mutation.
|
|
56
|
-
*/
|
|
57
|
-
type: typeof Schema.String;
|
|
58
|
-
/**
|
|
59
|
-
* Reference to the object that was changed or created.
|
|
60
|
-
*/
|
|
61
|
-
subject: Ref.RefSchema<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & Obj.Unknown>;
|
|
62
|
-
/**
|
|
63
|
-
* @deprecated
|
|
64
|
-
*/
|
|
65
|
-
changedObjectId: Schema.optional<typeof Schema.String>;
|
|
66
|
-
}>, Schema.Struct<{
|
|
67
|
-
tick: typeof Schema.Number;
|
|
68
|
-
}>, Schema.Struct<{
|
|
69
|
-
url: typeof Schema.String;
|
|
70
|
-
method: Schema.Literal<["GET", "POST"]>;
|
|
71
|
-
headers: Schema.Record$<typeof Schema.String, typeof Schema.String>;
|
|
72
|
-
bodyText: typeof Schema.String;
|
|
73
|
-
}>]>;
|
|
74
|
-
export type TriggerEvent = Schema.Schema.Type<typeof TriggerEvent>;
|
|
75
|
-
//# sourceMappingURL=TriggerEvent.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TriggerEvent.d.ts","sourceRoot":"","sources":["../../../../src/types/TriggerEvent.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAO,GAAG,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAQ3C,eAAO,MAAM,UAAU;;;;;;EAMrB,CAAC;AACH,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,UAAU,CAAC,CAAC;AAE/D,eAAO,MAAM,UAAU;;;;EAIrB,CAAC;AACH,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,UAAU,CAAC,CAAC;AAE/D,eAAO,MAAM,iBAAiB;IAC5B;;OAEG;;IAIH;;OAEG;;IAGH;;OAEG;;EAEH,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE7E,eAAO,MAAM,UAAU;;EAAyC,CAAC;AACjE,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,UAAU,CAAC,CAAC;AAE/D,eAAO,MAAM,YAAY;;;;;EAKvB,CAAC;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,YAAY,CAAC,CAAC;AAEnE,eAAO,MAAM,YAAY;;;;;;;;;;;IA7BvB;;OAEG;;IAIH;;OAEG;;IAGH;;OAEG;;;;;;;;;IAgBwG,CAAC;AAC9G,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,YAAY,CAAC,CAAC"}
|