@dxos/functions 0.8.4-main.937b3ca → 0.8.4-main.9be5663bfe
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/README.md +4 -6
- package/dist/lib/neutral/Trace.mjs +38 -0
- package/dist/lib/neutral/Trace.mjs.map +7 -0
- package/dist/lib/neutral/chunk-5T7GOX2V.mjs +149 -0
- package/dist/lib/neutral/chunk-5T7GOX2V.mjs.map +7 -0
- package/dist/lib/neutral/chunk-IVDUS56O.mjs +49 -0
- package/dist/lib/neutral/chunk-IVDUS56O.mjs.map +7 -0
- package/dist/lib/neutral/chunk-J5LGTIGS.mjs +10 -0
- package/dist/lib/neutral/chunk-J5LGTIGS.mjs.map +7 -0
- package/dist/lib/neutral/fib-N45KAC7C.mjs +23 -0
- package/dist/lib/neutral/fib-N45KAC7C.mjs.map +7 -0
- package/dist/lib/{browser → neutral}/index.mjs +671 -634
- package/dist/lib/neutral/index.mjs.map +7 -0
- package/dist/lib/neutral/meta.json +1 -0
- package/dist/lib/neutral/reply-EUEPKNJF.mjs +19 -0
- package/dist/lib/neutral/reply-EUEPKNJF.mjs.map +7 -0
- package/dist/lib/neutral/sleep-PUK3D4FF.mjs +15 -0
- package/dist/lib/neutral/sleep-PUK3D4FF.mjs.map +7 -0
- package/dist/types/src/Trace.d.ts +155 -0
- package/dist/types/src/Trace.d.ts.map +1 -0
- package/dist/types/src/errors.d.ts.map +1 -1
- package/dist/types/src/example/definitions.d.ts +11 -0
- package/dist/types/src/example/definitions.d.ts.map +1 -0
- package/dist/types/src/example/fib.d.ts +3 -2
- package/dist/types/src/example/fib.d.ts.map +1 -1
- package/dist/types/src/example/index.d.ts +3 -11
- package/dist/types/src/example/index.d.ts.map +1 -1
- package/dist/types/src/example/reply.d.ts +2 -1
- package/dist/types/src/example/reply.d.ts.map +1 -1
- package/dist/types/src/example/sleep.d.ts +3 -2
- package/dist/types/src/example/sleep.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +4 -0
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/process/Process.d.ts +247 -0
- package/dist/types/src/process/Process.d.ts.map +1 -0
- package/dist/types/src/process/ServiceResolver.d.ts +74 -0
- package/dist/types/src/process/ServiceResolver.d.ts.map +1 -0
- package/dist/types/src/process/StorageService.d.ts +58 -0
- package/dist/types/src/process/StorageService.d.ts.map +1 -0
- package/dist/types/src/protocol/protocol.d.ts +2 -2
- package/dist/types/src/protocol/protocol.d.ts.map +1 -1
- package/dist/types/src/sdk.d.ts +4 -104
- package/dist/types/src/sdk.d.ts.map +1 -1
- package/dist/types/src/services/event-logger.d.ts +2 -2
- package/dist/types/src/services/function-invocation-service.d.ts +6 -5
- package/dist/types/src/services/function-invocation-service.d.ts.map +1 -1
- package/dist/types/src/services/queues.d.ts +5 -2
- package/dist/types/src/services/queues.d.ts.map +1 -1
- package/dist/types/src/services/tracing.d.ts +25 -2
- package/dist/types/src/services/tracing.d.ts.map +1 -1
- package/dist/types/src/types/Script.d.ts +4 -3
- package/dist/types/src/types/Script.d.ts.map +1 -1
- package/dist/types/src/types/Trigger.d.ts +40 -41
- package/dist/types/src/types/Trigger.d.ts.map +1 -1
- package/dist/types/src/types/TriggerEvent.d.ts +19 -18
- package/dist/types/src/types/TriggerEvent.d.ts.map +1 -1
- package/dist/types/src/types/index.d.ts +0 -1
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/types/url.d.ts +2 -2
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +25 -20
- package/src/Trace.ts +202 -0
- package/src/errors.ts +1 -1
- package/src/example/definitions.ts +49 -0
- package/src/example/fib.ts +15 -24
- package/src/example/forex-effect.ts +1 -1
- package/src/example/index.ts +7 -8
- package/src/example/reply.ts +11 -13
- package/src/example/sleep.ts +9 -16
- package/src/index.ts +4 -0
- package/src/process/Process.ts +486 -0
- package/src/process/ServiceResolver.ts +174 -0
- package/src/process/StorageService.ts +99 -0
- package/src/protocol/protocol.test.ts +0 -1
- package/src/protocol/protocol.ts +33 -28
- package/src/sdk.ts +6 -256
- package/src/services/event-logger.ts +1 -1
- package/src/services/function-invocation-service.ts +7 -5
- package/src/services/queues.ts +11 -2
- package/src/services/tracing.ts +35 -2
- package/src/types/Script.ts +7 -3
- package/src/types/Trigger.ts +24 -13
- package/src/types/TriggerEvent.ts +22 -28
- package/src/types/index.ts +0 -1
- package/src/types/url.ts +2 -2
- package/dist/lib/browser/index.mjs.map +0 -7
- package/dist/lib/browser/meta.json +0 -1
- package/dist/lib/node-esm/index.mjs +0 -1230
- package/dist/lib/node-esm/index.mjs.map +0 -7
- package/dist/lib/node-esm/meta.json +0 -1
- package/dist/types/src/operation-compatibility.test.d.ts +0 -2
- package/dist/types/src/operation-compatibility.test.d.ts.map +0 -1
- package/dist/types/src/types/Function.d.ts +0 -52
- package/dist/types/src/types/Function.d.ts.map +0 -1
- package/src/operation-compatibility.test.ts +0 -185
- package/src/types/Function.ts +0 -82
|
@@ -47,13 +47,13 @@ export declare const ComputeEvent: Type.Obj<{
|
|
|
47
47
|
} | {
|
|
48
48
|
readonly type: "compute-input";
|
|
49
49
|
readonly value: any;
|
|
50
|
-
readonly nodeId: string;
|
|
51
50
|
readonly property: string;
|
|
51
|
+
readonly nodeId: string;
|
|
52
52
|
} | {
|
|
53
53
|
readonly type: "compute-output";
|
|
54
54
|
readonly value: any;
|
|
55
|
-
readonly nodeId: string;
|
|
56
55
|
readonly property: string;
|
|
56
|
+
readonly nodeId: string;
|
|
57
57
|
} | {
|
|
58
58
|
readonly type: "custom";
|
|
59
59
|
readonly nodeId: string;
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import * as Context from 'effect/Context';
|
|
2
2
|
import * as Effect from 'effect/Effect';
|
|
3
3
|
import * as Layer from 'effect/Layer';
|
|
4
|
+
import { Operation } from '@dxos/operation';
|
|
4
5
|
import type { FunctionNotFoundError } from '../errors';
|
|
5
|
-
import { type
|
|
6
|
+
import { type InvocationServices } from '../sdk';
|
|
6
7
|
declare const FunctionInvocationService_base: Context.TagClass<FunctionInvocationService, "@dxos/functions/FunctionInvocationService", {
|
|
7
|
-
invokeFunction<I, O>(functionDef:
|
|
8
|
-
resolveFunction(key: string): Effect.Effect<
|
|
8
|
+
invokeFunction<I, O>(functionDef: Operation.Definition<I, O, any>, input: I): Effect.Effect<O, never, InvocationServices>;
|
|
9
|
+
resolveFunction(key: string): Effect.Effect<Operation.Definition.Any, FunctionNotFoundError>;
|
|
9
10
|
}>;
|
|
10
11
|
export declare class FunctionInvocationService extends FunctionInvocationService_base {
|
|
11
12
|
static layerNotAvailable: Layer.Layer<FunctionInvocationService, never, never>;
|
|
12
|
-
static invokeFunction: <I, O>(functionDef:
|
|
13
|
-
static resolveFunction: (key: string) => Effect.Effect<
|
|
13
|
+
static invokeFunction: <I, O>(functionDef: Operation.Definition<I, O, any>, input: I) => Effect.Effect<O, never, FunctionInvocationService | InvocationServices>;
|
|
14
|
+
static resolveFunction: (key: string) => Effect.Effect<Operation.Definition.Any, FunctionNotFoundError, FunctionInvocationService>;
|
|
14
15
|
}
|
|
15
16
|
export {};
|
|
16
17
|
//# sourceMappingURL=function-invocation-service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"function-invocation-service.d.ts","sourceRoot":"","sources":["../../../../src/services/function-invocation-service.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC1C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AAEtC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AACvD,OAAO,EAAE,KAAK,kBAAkB,EAAE,
|
|
1
|
+
{"version":3,"file":"function-invocation-service.d.ts","sourceRoot":"","sources":["../../../../src/services/function-invocation-service.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC1C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AAEtC,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AACvD,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,QAAQ,CAAC;;mBAK9B,CAAC,EAAE,CAAC,eACJ,SAAS,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,CAAC,SACrC,CAAC,GACP,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,KAAK,EAAE,kBAAkB,CAAC;yBAEzB,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,GAAG,EAAE,qBAAqB,CAAC;;AARhG,qBAAa,yBAA0B,SAAQ,8BAU5C;IACD,MAAM,CAAC,iBAAiB,uDAGrB;IAEH,MAAM,CAAC,cAAc,GAAI,CAAC,EAAE,CAAC,EAC3B,aAAa,SAAS,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,CAAC,EAC5C,OAAO,CAAC,KACP,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,KAAK,EAAE,yBAAyB,GAAG,kBAAkB,CAAC,CACyC;IAEnH,MAAM,CAAC,eAAe,GACpB,KAAK,MAAM,KACV,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,GAAG,EAAE,qBAAqB,EAAE,yBAAyB,CAAC,CACS;CACtG"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as Context from 'effect/Context';
|
|
2
2
|
import * as Effect from 'effect/Effect';
|
|
3
3
|
import * as Layer from 'effect/Layer';
|
|
4
|
-
import type
|
|
5
|
-
import type
|
|
4
|
+
import { type Entity } from '@dxos/echo';
|
|
5
|
+
import { type Queue, type QueueAPI, type QueueFactory } from '@dxos/echo-db';
|
|
6
6
|
import type { DXN, QueueSubspaceTag } from '@dxos/keys';
|
|
7
7
|
declare const QueueService_base: Context.TagClass<QueueService, "@dxos/functions/QueueService", {
|
|
8
8
|
/**
|
|
@@ -17,6 +17,7 @@ declare const QueueService_base: Context.TagClass<QueueService, "@dxos/functions
|
|
|
17
17
|
}>;
|
|
18
18
|
/**
|
|
19
19
|
* Gives access to all queues.
|
|
20
|
+
* @deprecated Use Feed.FeedService instead.
|
|
20
21
|
*/
|
|
21
22
|
export declare class QueueService extends QueueService_base {
|
|
22
23
|
static notAvailable: Layer.Layer<QueueService, never, never>;
|
|
@@ -39,9 +40,11 @@ declare const ContextQueueService_base: Context.TagClass<ContextQueueService, "@
|
|
|
39
40
|
}>;
|
|
40
41
|
/**
|
|
41
42
|
* Gives access to a specific queue passed as a context.
|
|
43
|
+
* @deprecated Use Feed.FeedService instead.
|
|
42
44
|
*/
|
|
43
45
|
export declare class ContextQueueService extends ContextQueueService_base {
|
|
44
46
|
static layer: (queue: Queue) => Layer.Layer<ContextQueueService, never, never>;
|
|
45
47
|
}
|
|
48
|
+
export declare const feedServiceFromQueueServiceLayer: Layer.Layer<import("@dxos/echo/Feed").FeedService, never, QueueService>;
|
|
46
49
|
export {};
|
|
47
50
|
//# sourceMappingURL=queues.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queues.d.ts","sourceRoot":"","sources":["../../../../src/services/queues.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC1C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AAEtC,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"queues.d.ts","sourceRoot":"","sources":["../../../../src/services/queues.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC1C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;A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,CAAC,CACjE;CAC/C;;oBASmB,KAAK;;AAPzB;;;GAGG;AACH,qBAAa,mBAAoB,SAAQ,wBAKtC;IACD,MAAM,CAAC,KAAK,GAAI,OAAO,KAAK,oDAAmD;CAChF;AAED,eAAO,MAAM,gCAAgC,yEAK5C,CAAC"}
|
|
@@ -2,7 +2,7 @@ import * as Context from 'effect/Context';
|
|
|
2
2
|
import * as Effect from 'effect/Effect';
|
|
3
3
|
import * as Layer from 'effect/Layer';
|
|
4
4
|
import { AgentStatus } from '@dxos/ai';
|
|
5
|
-
import { type DXN, Obj } from '@dxos/echo';
|
|
5
|
+
import { type DXN, Obj, Ref } from '@dxos/echo';
|
|
6
6
|
import { ObjectId } from '@dxos/keys';
|
|
7
7
|
import { Message } from '@dxos/types';
|
|
8
8
|
import type { Trigger } from '../types';
|
|
@@ -16,6 +16,10 @@ declare const TracingService_base: Context.TagClass<TracingService, "@dxos/funct
|
|
|
16
16
|
* @param event - The event to write. Must be an a typed object.
|
|
17
17
|
*/
|
|
18
18
|
write: (event: Obj.Unknown, traceContext: TracingService.TraceContext) => void;
|
|
19
|
+
/**
|
|
20
|
+
* Write an ephemeral event.
|
|
21
|
+
*/
|
|
22
|
+
ephemeral: (event: Obj.Unknown, traceContext: TracingService.TraceContext) => void;
|
|
19
23
|
traceInvocationStart({ payload, target, }: {
|
|
20
24
|
payload: TracingService.FunctionInvocationPayload;
|
|
21
25
|
target?: DXN;
|
|
@@ -28,6 +32,7 @@ declare const TracingService_base: Context.TagClass<TracingService, "@dxos/funct
|
|
|
28
32
|
/**
|
|
29
33
|
* Provides a way for compute primitives (functions, workflows, tools)
|
|
30
34
|
* to emit an execution trace as a series of structured ECHO objects.
|
|
35
|
+
* @deprecated Use Trace.TraceService instead.
|
|
31
36
|
*/
|
|
32
37
|
export declare class TracingService extends TracingService_base {
|
|
33
38
|
static noop: Context.Tag.Service<TracingService>;
|
|
@@ -46,7 +51,8 @@ export declare class TracingService extends TracingService_base {
|
|
|
46
51
|
* Emit the current human-readable execution status.
|
|
47
52
|
*/
|
|
48
53
|
static emitStatus: (data: Omit<Obj.MakeProps<typeof AgentStatus>, 'created'>) => Effect.Effect<void, never, TracingService>;
|
|
49
|
-
static emitConverationMessage: (data: Obj.MakeProps<typeof Message.Message>) => Effect.Effect<void, never, TracingService>;
|
|
54
|
+
static emitConverationMessage: (data: Obj.MakeProps<typeof Message.Message> | Message.Message) => Effect.Effect<void, never, TracingService>;
|
|
55
|
+
static emitEphemeralMessage: (data: Message.Message) => Effect.Effect<void, never, TracingService>;
|
|
50
56
|
}
|
|
51
57
|
export declare namespace TracingService {
|
|
52
58
|
interface TraceContext {
|
|
@@ -78,6 +84,23 @@ export declare namespace TracingService {
|
|
|
78
84
|
id: string;
|
|
79
85
|
kind: Trigger.Kind;
|
|
80
86
|
};
|
|
87
|
+
chat?: Ref.Ref<Obj.Unknown>;
|
|
88
|
+
process?: {
|
|
89
|
+
pid: string;
|
|
90
|
+
parentPid?: string;
|
|
91
|
+
/**
|
|
92
|
+
* Key of the executable.
|
|
93
|
+
*/
|
|
94
|
+
key: string;
|
|
95
|
+
/**
|
|
96
|
+
* Process name.
|
|
97
|
+
*/
|
|
98
|
+
name?: string;
|
|
99
|
+
/**
|
|
100
|
+
* Target object that the process is assigned to.
|
|
101
|
+
*/
|
|
102
|
+
target?: string;
|
|
103
|
+
};
|
|
81
104
|
}
|
|
82
105
|
}
|
|
83
106
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tracing.d.ts","sourceRoot":"","sources":["../../../../src/services/tracing.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC1C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AAEtC,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAE,KAAK,GAAG,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;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AO,CAAC,EAAE;YACR,EAAE,EAAE,MAAM,CAAC;YACX,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC;SACpB,CAAC;QACF,IAAI,CAAC,EAAE,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QAC5B,OAAO,CAAC,EAAE;YACR,GAAG,EAAE,MAAM,CAAC;YACZ,SAAS,CAAC,EAAE,MAAM,CAAC;YACnB;;eAEG;YACH,GAAG,EAAE,MAAM,CAAC;YAEZ;;eAEG;YACH,IAAI,CAAC,EAAE,MAAM,CAAC;YAEd;;eAEG;YACH,MAAM,CAAC,EAAE,MAAM,CAAC;SACjB,CAAC;KACH;CACF;AAED;;GAEG;AACH,eAAO,MAAM,6BAA6B,EAAG,YAAqB,CAAC"}
|
|
@@ -4,12 +4,13 @@ import { Obj, Type } from '@dxos/echo';
|
|
|
4
4
|
* Source script.
|
|
5
5
|
*/
|
|
6
6
|
export declare const Script: Type.Obj<{
|
|
7
|
+
readonly name?: string | undefined;
|
|
8
|
+
readonly description?: string | undefined;
|
|
9
|
+
readonly changed?: boolean | undefined;
|
|
7
10
|
readonly source: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
|
|
11
|
+
readonly name?: string | undefined;
|
|
8
12
|
readonly content: string;
|
|
9
13
|
}>;
|
|
10
|
-
readonly description?: string | undefined;
|
|
11
|
-
readonly name?: string | undefined;
|
|
12
|
-
readonly changed?: boolean | undefined;
|
|
13
14
|
}, Schema.Struct.Fields>;
|
|
14
15
|
export interface Script extends Schema.Schema.Type<typeof Script> {
|
|
15
16
|
}
|
|
@@ -1 +1 @@
|
|
|
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
|
|
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"}
|
|
@@ -7,73 +7,73 @@ import { Obj, QueryAST, Type } from '@dxos/echo';
|
|
|
7
7
|
*/
|
|
8
8
|
export declare const Kinds: readonly ["email", "queue", "subscription", "timer", "webhook"];
|
|
9
9
|
export type Kind = (typeof Kinds)[number];
|
|
10
|
-
export declare const EmailSpec: Schema.
|
|
10
|
+
export declare const EmailSpec: Schema.Struct<{
|
|
11
11
|
kind: Schema.Literal<["email"]>;
|
|
12
|
-
}
|
|
12
|
+
}>;
|
|
13
13
|
export type EmailSpec = Schema.Schema.Type<typeof EmailSpec>;
|
|
14
|
-
export declare const QueueSpec: Schema.
|
|
14
|
+
export declare const QueueSpec: Schema.Struct<{
|
|
15
15
|
kind: Schema.Literal<["queue"]>;
|
|
16
16
|
queue: Schema.refine<string, typeof Schema.NonEmptyString>;
|
|
17
|
-
}
|
|
17
|
+
}>;
|
|
18
18
|
export type QueueSpec = Schema.Schema.Type<typeof QueueSpec>;
|
|
19
19
|
/**
|
|
20
20
|
* Subscription.
|
|
21
21
|
*/
|
|
22
|
-
export declare const SubscriptionSpec: Schema.
|
|
22
|
+
export declare const SubscriptionSpec: Schema.Struct<{
|
|
23
23
|
kind: Schema.Literal<["subscription"]>;
|
|
24
|
-
query: Schema.
|
|
24
|
+
query: Schema.Struct<{
|
|
25
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.QueryUnionClause | QueryAST.QuerySetDifferenceClause | QueryAST.QueryOrderClause | QueryAST.QueryOptionsClause | QueryAST.QueryLimitClause, QueryAST.QuerySelectClause | QueryAST.QueryFilterClause | QueryAST.QueryReferenceTraversalClause | QueryAST.QueryIncomingReferencesClause | QueryAST.QueryRelationClause | QueryAST.QueryRelationTraversalClause | QueryAST.QueryUnionClause | QueryAST.QuerySetDifferenceClause | QueryAST.QueryOrderClause | QueryAST.QueryOptionsClause | QueryAST.QueryLimitClause, never>;
|
|
27
|
-
}
|
|
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
28
|
options: Schema.optional<Schema.Struct<{
|
|
29
29
|
deep: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
|
|
30
30
|
delay: Schema.optional<Schema.SchemaClass<number, number, never>>;
|
|
31
31
|
}>>;
|
|
32
|
-
}
|
|
32
|
+
}>;
|
|
33
33
|
export type SubscriptionSpec = Schema.Schema.Type<typeof SubscriptionSpec>;
|
|
34
34
|
/**
|
|
35
35
|
* Cron timer.
|
|
36
36
|
*/
|
|
37
|
-
export declare const TimerSpec: Schema.
|
|
37
|
+
export declare const TimerSpec: Schema.Struct<{
|
|
38
38
|
kind: Schema.Literal<["timer"]>;
|
|
39
39
|
cron: Schema.SchemaClass<string, string, never>;
|
|
40
|
-
}
|
|
40
|
+
}>;
|
|
41
41
|
export type TimerSpec = Schema.Schema.Type<typeof TimerSpec>;
|
|
42
42
|
/**
|
|
43
43
|
* Webhook.
|
|
44
44
|
*/
|
|
45
|
-
export declare const WebhookSpec: Schema.
|
|
45
|
+
export declare const WebhookSpec: Schema.Struct<{
|
|
46
46
|
kind: Schema.Literal<["webhook"]>;
|
|
47
47
|
method: Schema.optional<Schema.SchemaClass<string, string, never>>;
|
|
48
48
|
port: Schema.optional<Schema.SchemaClass<number, number, never>>;
|
|
49
|
-
}
|
|
49
|
+
}>;
|
|
50
50
|
export type WebhookSpec = Schema.Schema.Type<typeof WebhookSpec>;
|
|
51
51
|
/**
|
|
52
52
|
* Trigger schema.
|
|
53
53
|
*/
|
|
54
|
-
export declare const Spec: Schema.Union<[Schema.
|
|
54
|
+
export declare const Spec: Schema.Union<[Schema.Struct<{
|
|
55
55
|
kind: Schema.Literal<["email"]>;
|
|
56
|
-
}
|
|
56
|
+
}>, Schema.Struct<{
|
|
57
57
|
kind: Schema.Literal<["queue"]>;
|
|
58
58
|
queue: Schema.refine<string, typeof Schema.NonEmptyString>;
|
|
59
|
-
}
|
|
59
|
+
}>, Schema.Struct<{
|
|
60
60
|
kind: Schema.Literal<["subscription"]>;
|
|
61
|
-
query: Schema.
|
|
61
|
+
query: Schema.Struct<{
|
|
62
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.QueryUnionClause | QueryAST.QuerySetDifferenceClause | QueryAST.QueryOrderClause | QueryAST.QueryOptionsClause | QueryAST.QueryLimitClause, QueryAST.QuerySelectClause | QueryAST.QueryFilterClause | QueryAST.QueryReferenceTraversalClause | QueryAST.QueryIncomingReferencesClause | QueryAST.QueryRelationClause | QueryAST.QueryRelationTraversalClause | QueryAST.QueryUnionClause | QueryAST.QuerySetDifferenceClause | QueryAST.QueryOrderClause | QueryAST.QueryOptionsClause | QueryAST.QueryLimitClause, never>;
|
|
64
|
-
}
|
|
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
65
|
options: Schema.optional<Schema.Struct<{
|
|
66
66
|
deep: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
|
|
67
67
|
delay: Schema.optional<Schema.SchemaClass<number, number, never>>;
|
|
68
68
|
}>>;
|
|
69
|
-
}
|
|
69
|
+
}>, Schema.Struct<{
|
|
70
70
|
kind: Schema.Literal<["timer"]>;
|
|
71
71
|
cron: Schema.SchemaClass<string, string, never>;
|
|
72
|
-
}
|
|
72
|
+
}>, Schema.Struct<{
|
|
73
73
|
kind: Schema.Literal<["webhook"]>;
|
|
74
74
|
method: Schema.optional<Schema.SchemaClass<string, string, never>>;
|
|
75
75
|
port: Schema.optional<Schema.SchemaClass<number, number, never>>;
|
|
76
|
-
}
|
|
76
|
+
}>]>;
|
|
77
77
|
export type Spec = Schema.Schema.Type<typeof Spec>;
|
|
78
78
|
/**
|
|
79
79
|
* Function trigger.
|
|
@@ -81,41 +81,40 @@ export type Spec = Schema.Schema.Type<typeof Spec>;
|
|
|
81
81
|
* The event that triggers the function is available in the function context.
|
|
82
82
|
*/
|
|
83
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> &
|
|
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?: {
|
|
85
86
|
readonly [x: string]: any;
|
|
86
|
-
}
|
|
87
|
+
} | undefined;
|
|
87
88
|
readonly inputNodeId?: string | undefined;
|
|
88
89
|
readonly enabled?: boolean | undefined;
|
|
89
90
|
readonly spec?: {
|
|
90
|
-
kind: "email";
|
|
91
|
+
readonly kind: "email";
|
|
91
92
|
} | {
|
|
92
|
-
queue: string;
|
|
93
|
-
kind: "queue";
|
|
93
|
+
readonly queue: string;
|
|
94
|
+
readonly kind: "queue";
|
|
94
95
|
} | {
|
|
95
|
-
kind: "subscription";
|
|
96
|
-
query: {
|
|
97
|
-
raw?: string | undefined;
|
|
98
|
-
ast: QueryAST.QuerySelectClause | QueryAST.QueryFilterClause | QueryAST.QueryReferenceTraversalClause | QueryAST.QueryIncomingReferencesClause | QueryAST.QueryRelationClause | QueryAST.QueryRelationTraversalClause | QueryAST.QueryUnionClause | QueryAST.QuerySetDifferenceClause | QueryAST.QueryOrderClause | QueryAST.QueryOptionsClause | QueryAST.QueryLimitClause;
|
|
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;
|
|
99
100
|
};
|
|
100
|
-
options?: {
|
|
101
|
+
readonly options?: {
|
|
101
102
|
readonly deep?: boolean | undefined;
|
|
102
103
|
readonly delay?: number | undefined;
|
|
103
104
|
} | undefined;
|
|
104
105
|
} | {
|
|
105
|
-
kind: "timer";
|
|
106
|
-
cron: string;
|
|
106
|
+
readonly kind: "timer";
|
|
107
|
+
readonly cron: string;
|
|
107
108
|
} | {
|
|
108
|
-
kind: "webhook";
|
|
109
|
-
method?: string | undefined;
|
|
110
|
-
port?: number | undefined;
|
|
111
|
-
} | undefined;
|
|
112
|
-
readonly input?: {
|
|
113
|
-
[x: string]: any;
|
|
109
|
+
readonly kind: "webhook";
|
|
110
|
+
readonly method?: string | undefined;
|
|
111
|
+
readonly port?: number | undefined;
|
|
114
112
|
} | undefined;
|
|
113
|
+
readonly concurrency?: number | undefined;
|
|
115
114
|
}, Schema.Struct.Fields>;
|
|
116
115
|
export interface Trigger extends Schema.Schema.Type<typeof TriggerSchema> {
|
|
117
116
|
}
|
|
118
117
|
export declare const Trigger: Type.Obj<Trigger>;
|
|
119
|
-
export declare const make: (props: Obj.MakeProps<typeof Trigger>) => Obj.
|
|
118
|
+
export declare const make: (props: Obj.MakeProps<typeof Trigger>) => Obj.OfShape<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & Trigger>;
|
|
120
119
|
export {};
|
|
121
120
|
//# sourceMappingURL=Trigger.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Trigger.d.ts","sourceRoot":"","sources":["../../../../src/types/Trigger.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAGxC,OAAO,
|
|
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;AACrF,MAAM,MAAM,IAAI,GAAG,CAAC,OAAO,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC;AAI1C,eAAO,MAAM,SAAS;;EAEpB,CAAC;AACH,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,SAAS,CAAC,CAAC;AAI7D,eAAO,MAAM,SAAS;;;EAKpB,CAAC;AACH,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,SAAS,CAAC,CAAC;AAE7D;;GAEG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;EAc3B,CAAC;AACH,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE3E;;GAEG;AACH,eAAO,MAAM,SAAS;;;EAMpB,CAAC;AACH,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,SAAS,CAAC,CAAC;AAE7D;;GAEG;AACH,eAAO,MAAM,WAAW;;;;EAatB,CAAC;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,WAAW,CAAC,CAAC;AAEjE;;GAEG;AACH,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;IAEf,CAAC;AACH,MAAM,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnD;;;;GAIG;AACH,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAgDlB,CAAC;AAEF,MAAM,WAAW,OAAQ,SAAQ,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,aAAa,CAAC;CAAG;AAC5E,eAAO,MAAM,OAAO,EAAE,IAAI,CAAC,GAAG,CAAC,OAAO,CAAwB,CAAC;AAE/D,eAAO,MAAM,IAAI,GAAI,OAAO,GAAG,CAAC,SAAS,CAAC,OAAO,OAAO,CAAC,+GAA6B,CAAC"}
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
import * as Schema from 'effect/Schema';
|
|
2
|
-
|
|
2
|
+
import { Obj, Ref } from '@dxos/echo';
|
|
3
|
+
export declare const EmailEvent: Schema.Struct<{
|
|
3
4
|
from: typeof Schema.String;
|
|
4
5
|
to: typeof Schema.String;
|
|
5
6
|
subject: typeof Schema.String;
|
|
6
7
|
created: typeof Schema.String;
|
|
7
8
|
body: typeof Schema.String;
|
|
8
|
-
}
|
|
9
|
+
}>;
|
|
9
10
|
export type EmailEvent = Schema.Schema.Type<typeof EmailEvent>;
|
|
10
|
-
export declare const QueueEvent: Schema.
|
|
11
|
+
export declare const QueueEvent: Schema.Struct<{
|
|
11
12
|
queue: Schema.refine<string, typeof Schema.NonEmptyString>;
|
|
12
13
|
item: typeof Schema.Any;
|
|
13
14
|
cursor: typeof Schema.String;
|
|
14
|
-
}
|
|
15
|
+
}>;
|
|
15
16
|
export type QueueEvent = Schema.Schema.Type<typeof QueueEvent>;
|
|
16
|
-
export declare const SubscriptionEvent: Schema.
|
|
17
|
+
export declare const SubscriptionEvent: Schema.Struct<{
|
|
17
18
|
/**
|
|
18
19
|
* Type of the mutation.
|
|
19
20
|
*/
|
|
@@ -21,35 +22,35 @@ export declare const SubscriptionEvent: Schema.mutable<Schema.Struct<{
|
|
|
21
22
|
/**
|
|
22
23
|
* Reference to the object that was changed or created.
|
|
23
24
|
*/
|
|
24
|
-
subject: import("@dxos/echo/internal").
|
|
25
|
+
subject: Ref.RefSchema<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & Obj.Unknown>;
|
|
25
26
|
/**
|
|
26
27
|
* @deprecated
|
|
27
28
|
*/
|
|
28
29
|
changedObjectId: Schema.optional<typeof Schema.String>;
|
|
29
|
-
}
|
|
30
|
+
}>;
|
|
30
31
|
export type SubscriptionEvent = Schema.Schema.Type<typeof SubscriptionEvent>;
|
|
31
|
-
export declare const TimerEvent: Schema.
|
|
32
|
+
export declare const TimerEvent: Schema.Struct<{
|
|
32
33
|
tick: typeof Schema.Number;
|
|
33
|
-
}
|
|
34
|
+
}>;
|
|
34
35
|
export type TimerEvent = Schema.Schema.Type<typeof TimerEvent>;
|
|
35
|
-
export declare const WebhookEvent: Schema.
|
|
36
|
+
export declare const WebhookEvent: Schema.Struct<{
|
|
36
37
|
url: typeof Schema.String;
|
|
37
38
|
method: Schema.Literal<["GET", "POST"]>;
|
|
38
39
|
headers: Schema.Record$<typeof Schema.String, typeof Schema.String>;
|
|
39
40
|
bodyText: typeof Schema.String;
|
|
40
|
-
}
|
|
41
|
+
}>;
|
|
41
42
|
export type WebhookEvent = Schema.Schema.Type<typeof WebhookEvent>;
|
|
42
|
-
export declare const TriggerEvent: Schema.Union<[Schema.
|
|
43
|
+
export declare const TriggerEvent: Schema.Union<[Schema.Struct<{
|
|
43
44
|
from: typeof Schema.String;
|
|
44
45
|
to: typeof Schema.String;
|
|
45
46
|
subject: typeof Schema.String;
|
|
46
47
|
created: typeof Schema.String;
|
|
47
48
|
body: typeof Schema.String;
|
|
48
|
-
}
|
|
49
|
+
}>, Schema.Struct<{
|
|
49
50
|
queue: Schema.refine<string, typeof Schema.NonEmptyString>;
|
|
50
51
|
item: typeof Schema.Any;
|
|
51
52
|
cursor: typeof Schema.String;
|
|
52
|
-
}
|
|
53
|
+
}>, Schema.Struct<{
|
|
53
54
|
/**
|
|
54
55
|
* Type of the mutation.
|
|
55
56
|
*/
|
|
@@ -57,18 +58,18 @@ export declare const TriggerEvent: Schema.Union<[Schema.mutable<Schema.Struct<{
|
|
|
57
58
|
/**
|
|
58
59
|
* Reference to the object that was changed or created.
|
|
59
60
|
*/
|
|
60
|
-
subject: import("@dxos/echo/internal").
|
|
61
|
+
subject: Ref.RefSchema<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & Obj.Unknown>;
|
|
61
62
|
/**
|
|
62
63
|
* @deprecated
|
|
63
64
|
*/
|
|
64
65
|
changedObjectId: Schema.optional<typeof Schema.String>;
|
|
65
|
-
}
|
|
66
|
+
}>, Schema.Struct<{
|
|
66
67
|
tick: typeof Schema.Number;
|
|
67
|
-
}
|
|
68
|
+
}>, Schema.Struct<{
|
|
68
69
|
url: typeof Schema.String;
|
|
69
70
|
method: Schema.Literal<["GET", "POST"]>;
|
|
70
71
|
headers: Schema.Record$<typeof Schema.String, typeof Schema.String>;
|
|
71
72
|
bodyText: typeof Schema.String;
|
|
72
|
-
}
|
|
73
|
+
}>]>;
|
|
73
74
|
export type TriggerEvent = Schema.Schema.Type<typeof TriggerEvent>;
|
|
74
75
|
//# sourceMappingURL=TriggerEvent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TriggerEvent.d.ts","sourceRoot":"","sources":["../../../../src/types/TriggerEvent.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;
|
|
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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/types/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/types/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AACnC,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;AACrC,OAAO,KAAK,YAAY,MAAM,gBAAgB,CAAC;AAC/C,cAAc,OAAO,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type Obj } from '@dxos/echo';
|
|
2
|
-
export declare const FUNCTIONS_META_KEY = "dxos.
|
|
3
|
-
export declare const FUNCTIONS_PRESET_META_KEY = "dxos.
|
|
2
|
+
export declare const FUNCTIONS_META_KEY = "org.dxos.service.function";
|
|
3
|
+
export declare const FUNCTIONS_PRESET_META_KEY = "org.dxos.service.function-preset";
|
|
4
4
|
/**
|
|
5
5
|
* NOTE: functionId is backend ID, not ECHO object id.
|
|
6
6
|
*/
|