@dxos/functions 0.8.4-main.b97322e → 0.8.4-main.bc674ce
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/browser/index.mjs +1098 -372
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/node-esm/index.mjs +1098 -372
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/types/src/errors.d.ts +91 -38
- package/dist/types/src/errors.d.ts.map +1 -1
- package/dist/types/src/example/fib.d.ts +7 -0
- package/dist/types/src/example/fib.d.ts.map +1 -0
- package/dist/types/src/example/forex-effect.d.ts +3 -0
- package/dist/types/src/example/forex-effect.d.ts.map +1 -0
- package/dist/types/src/example/index.d.ts +12 -0
- package/dist/types/src/example/index.d.ts.map +1 -0
- package/dist/types/src/example/reply.d.ts +3 -0
- package/dist/types/src/example/reply.d.ts.map +1 -0
- package/dist/types/src/example/sleep.d.ts +5 -0
- package/dist/types/src/example/sleep.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +5 -7
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/operation-compatibility.test.d.ts +2 -0
- package/dist/types/src/operation-compatibility.test.d.ts.map +1 -0
- package/dist/types/src/protocol/functions-ai-http-client.d.ts +12 -0
- package/dist/types/src/protocol/functions-ai-http-client.d.ts.map +1 -0
- package/dist/types/src/protocol/index.d.ts +2 -0
- package/dist/types/src/protocol/index.d.ts.map +1 -0
- package/dist/types/src/protocol/protocol.d.ts +7 -0
- package/dist/types/src/protocol/protocol.d.ts.map +1 -0
- package/dist/types/src/protocol/protocol.test.d.ts +2 -0
- package/dist/types/src/protocol/protocol.test.d.ts.map +1 -0
- package/dist/types/src/sdk.d.ts +114 -0
- package/dist/types/src/sdk.d.ts.map +1 -0
- package/dist/types/src/services/credentials.d.ts +22 -3
- package/dist/types/src/services/credentials.d.ts.map +1 -1
- package/dist/types/src/services/event-logger.d.ts +74 -30
- package/dist/types/src/services/event-logger.d.ts.map +1 -1
- package/dist/types/src/services/function-invocation-service.d.ts +16 -0
- package/dist/types/src/services/function-invocation-service.d.ts.map +1 -0
- package/dist/types/src/services/index.d.ts +5 -5
- package/dist/types/src/services/index.d.ts.map +1 -1
- package/dist/types/src/services/queues.d.ts +23 -6
- package/dist/types/src/services/queues.d.ts.map +1 -1
- package/dist/types/src/services/tracing.d.ts +70 -7
- package/dist/types/src/services/tracing.d.ts.map +1 -1
- package/dist/types/src/types/Function.d.ts +52 -0
- package/dist/types/src/types/Function.d.ts.map +1 -0
- package/dist/types/src/types/Script.d.ts +21 -0
- package/dist/types/src/types/Script.d.ts.map +1 -0
- package/dist/types/src/types/Trigger.d.ts +121 -0
- package/dist/types/src/types/Trigger.d.ts.map +1 -0
- package/dist/types/src/types/TriggerEvent.d.ts +74 -0
- package/dist/types/src/types/TriggerEvent.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +6 -0
- package/dist/types/src/types/index.d.ts.map +1 -0
- package/dist/types/src/types/url.d.ts +13 -0
- package/dist/types/src/types/url.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +26 -68
- package/src/errors.ts +13 -5
- package/src/example/fib.ts +32 -0
- package/src/example/forex-effect.ts +40 -0
- package/src/example/index.ts +13 -0
- package/src/example/reply.ts +21 -0
- package/src/example/sleep.ts +24 -0
- package/src/index.ts +5 -9
- package/src/operation-compatibility.test.ts +185 -0
- package/src/protocol/functions-ai-http-client.ts +67 -0
- package/src/{executor → protocol}/index.ts +1 -1
- package/src/protocol/protocol.test.ts +59 -0
- package/src/protocol/protocol.ts +262 -0
- package/src/sdk.ts +289 -0
- package/src/services/credentials.ts +101 -3
- package/src/services/event-logger.ts +77 -37
- package/src/services/function-invocation-service.ts +37 -0
- package/src/services/index.ts +5 -5
- package/src/services/queues.ts +37 -10
- package/src/services/tracing.ts +142 -17
- package/src/types/Function.ts +82 -0
- package/src/types/Script.ts +34 -0
- package/src/types/Trigger.ts +143 -0
- package/src/types/TriggerEvent.ts +62 -0
- package/src/types/index.ts +9 -0
- package/src/types/url.ts +32 -0
- package/dist/lib/browser/bundler/index.mjs +0 -247
- package/dist/lib/browser/bundler/index.mjs.map +0 -7
- package/dist/lib/browser/chunk-3NGCSUEW.mjs +0 -328
- package/dist/lib/browser/chunk-3NGCSUEW.mjs.map +0 -7
- package/dist/lib/browser/edge/index.mjs +0 -69
- package/dist/lib/browser/edge/index.mjs.map +0 -7
- package/dist/lib/browser/testing/index.mjs +0 -91
- package/dist/lib/browser/testing/index.mjs.map +0 -7
- package/dist/lib/node-esm/bundler/index.mjs +0 -249
- package/dist/lib/node-esm/bundler/index.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-FJ2MU7TL.mjs +0 -330
- package/dist/lib/node-esm/chunk-FJ2MU7TL.mjs.map +0 -7
- package/dist/lib/node-esm/edge/index.mjs +0 -71
- package/dist/lib/node-esm/edge/index.mjs.map +0 -7
- package/dist/lib/node-esm/testing/index.mjs +0 -92
- package/dist/lib/node-esm/testing/index.mjs.map +0 -7
- package/dist/types/src/bundler/bundler.d.ts +0 -50
- package/dist/types/src/bundler/bundler.d.ts.map +0 -1
- package/dist/types/src/bundler/bundler.test.d.ts +0 -2
- package/dist/types/src/bundler/bundler.test.d.ts.map +0 -1
- package/dist/types/src/bundler/index.d.ts +0 -2
- package/dist/types/src/bundler/index.d.ts.map +0 -1
- package/dist/types/src/edge/functions.d.ts +0 -16
- package/dist/types/src/edge/functions.d.ts.map +0 -1
- package/dist/types/src/edge/index.d.ts +0 -2
- package/dist/types/src/edge/index.d.ts.map +0 -1
- package/dist/types/src/executor/executor.d.ts +0 -8
- package/dist/types/src/executor/executor.d.ts.map +0 -1
- package/dist/types/src/executor/index.d.ts +0 -2
- package/dist/types/src/executor/index.d.ts.map +0 -1
- package/dist/types/src/handler.d.ts +0 -62
- package/dist/types/src/handler.d.ts.map +0 -1
- package/dist/types/src/schema.d.ts +0 -38
- package/dist/types/src/schema.d.ts.map +0 -1
- package/dist/types/src/services/database.d.ts +0 -29
- package/dist/types/src/services/database.d.ts.map +0 -1
- package/dist/types/src/services/function-call-service.d.ts +0 -16
- package/dist/types/src/services/function-call-service.d.ts.map +0 -1
- package/dist/types/src/services/service-container.d.ts +0 -56
- package/dist/types/src/services/service-container.d.ts.map +0 -1
- package/dist/types/src/services/service-registry.d.ts +0 -29
- package/dist/types/src/services/service-registry.d.ts.map +0 -1
- package/dist/types/src/services/service-registry.test.d.ts +0 -2
- package/dist/types/src/services/service-registry.test.d.ts.map +0 -1
- package/dist/types/src/testing/index.d.ts +0 -3
- package/dist/types/src/testing/index.d.ts.map +0 -1
- package/dist/types/src/testing/layer.d.ts +0 -10
- package/dist/types/src/testing/layer.d.ts.map +0 -1
- package/dist/types/src/testing/logger.d.ts +0 -5
- package/dist/types/src/testing/logger.d.ts.map +0 -1
- package/dist/types/src/testing/services.d.ts +0 -70
- package/dist/types/src/testing/services.d.ts.map +0 -1
- package/dist/types/src/trace.d.ts +0 -124
- package/dist/types/src/trace.d.ts.map +0 -1
- package/dist/types/src/translations.d.ts +0 -12
- package/dist/types/src/translations.d.ts.map +0 -1
- package/dist/types/src/types.d.ts +0 -411
- package/dist/types/src/types.d.ts.map +0 -1
- package/dist/types/src/url.d.ts +0 -17
- package/dist/types/src/url.d.ts.map +0 -1
- package/src/bundler/bundler.test.ts +0 -59
- package/src/bundler/bundler.ts +0 -292
- package/src/bundler/index.ts +0 -5
- package/src/edge/functions.ts +0 -64
- package/src/edge/index.ts +0 -9
- package/src/executor/executor.ts +0 -54
- package/src/handler.ts +0 -120
- package/src/schema.ts +0 -57
- package/src/services/database.ts +0 -70
- package/src/services/function-call-service.ts +0 -64
- package/src/services/service-container.ts +0 -113
- package/src/services/service-registry.test.ts +0 -42
- package/src/services/service-registry.ts +0 -56
- package/src/testing/index.ts +0 -6
- package/src/testing/layer.ts +0 -31
- package/src/testing/logger.ts +0 -16
- package/src/testing/services.ts +0 -168
- package/src/trace.ts +0 -180
- package/src/translations.ts +0 -20
- package/src/types.ts +0 -211
- package/src/url.ts +0 -52
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export * from './database';
|
|
2
|
-
export * from './queues';
|
|
3
|
-
export * from './service-container';
|
|
4
1
|
export * from './credentials';
|
|
5
|
-
export
|
|
2
|
+
export { ConfiguredCredentialsService, type ServiceCredential } from './credentials';
|
|
6
3
|
export * from './event-logger';
|
|
7
|
-
export
|
|
4
|
+
export { createEventLogger, createDefectLogger } from './event-logger';
|
|
5
|
+
export * from './function-invocation-service';
|
|
6
|
+
export * from './queues';
|
|
7
|
+
export * from './tracing';
|
|
8
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/services/index.ts"],"names":[],"mappings":"AAIA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/services/index.ts"],"names":[],"mappings":"AAIA,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,4BAA4B,EAAE,KAAK,iBAAiB,EAAE,MAAM,eAAe,CAAC;AACrF,cAAc,gBAAgB,CAAC;AAC/B,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACvE,cAAc,+BAA+B,CAAC;AAC9C,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC"}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as Context from 'effect/Context';
|
|
2
|
+
import * as Effect from 'effect/Effect';
|
|
3
|
+
import * as Layer from 'effect/Layer';
|
|
4
|
+
import type { Entity } from '@dxos/echo';
|
|
2
5
|
import type { Queue, QueueAPI, QueueFactory } from '@dxos/echo-db';
|
|
3
|
-
|
|
6
|
+
import type { DXN, QueueSubspaceTag } from '@dxos/keys';
|
|
7
|
+
declare const QueueService_base: Context.TagClass<QueueService, "@dxos/functions/QueueService", {
|
|
4
8
|
/**
|
|
5
9
|
* API to access the queues.
|
|
6
10
|
*/
|
|
@@ -9,22 +13,35 @@ declare const QueueService_base: Context.TagClass<QueueService, "QueueService",
|
|
|
9
13
|
* The queue that is used to store the context of the current research.
|
|
10
14
|
* @deprecated Use `ContextQueueService` instead.
|
|
11
15
|
*/
|
|
12
|
-
readonly
|
|
16
|
+
readonly queue: Queue | undefined;
|
|
13
17
|
}>;
|
|
14
18
|
/**
|
|
15
19
|
* Gives access to all queues.
|
|
16
20
|
*/
|
|
17
21
|
export declare class QueueService extends QueueService_base {
|
|
18
22
|
static notAvailable: Layer.Layer<QueueService, never, never>;
|
|
19
|
-
static make: (queues: QueueFactory,
|
|
23
|
+
static make: (queues: QueueFactory, queue?: Queue) => Context.Tag.Service<QueueService>;
|
|
24
|
+
static layer: (queues: QueueFactory, queue?: Queue) => Layer.Layer<QueueService>;
|
|
25
|
+
/**
|
|
26
|
+
* Gets a queue by its DXN.
|
|
27
|
+
*/
|
|
28
|
+
static getQueue: <T extends Entity.Unknown = Entity.Unknown>(dxn: DXN) => Effect.Effect<Queue<T>, never, QueueService>;
|
|
29
|
+
/**
|
|
30
|
+
* Creates a new queue.
|
|
31
|
+
*/
|
|
32
|
+
static createQueue: <T extends Entity.Unknown = Entity.Unknown>(options?: {
|
|
33
|
+
subspaceTag?: QueueSubspaceTag;
|
|
34
|
+
}) => Effect.Effect<Queue<T>, never, QueueService>;
|
|
35
|
+
static append: <T extends Entity.Unknown = Entity.Unknown>(queue: Queue<T>, objects: T[]) => Effect.Effect<void>;
|
|
20
36
|
}
|
|
21
|
-
declare const ContextQueueService_base: Context.TagClass<ContextQueueService, "ContextQueueService", {
|
|
22
|
-
readonly
|
|
37
|
+
declare const ContextQueueService_base: Context.TagClass<ContextQueueService, "@dxos/functions/ContextQueueService", {
|
|
38
|
+
readonly queue: Queue;
|
|
23
39
|
}>;
|
|
24
40
|
/**
|
|
25
41
|
* Gives access to a specific queue passed as a context.
|
|
26
42
|
*/
|
|
27
43
|
export declare class ContextQueueService extends ContextQueueService_base {
|
|
44
|
+
static layer: (queue: Queue) => Layer.Layer<ContextQueueService, never, never>;
|
|
28
45
|
}
|
|
29
46
|
export {};
|
|
30
47
|
//# sourceMappingURL=queues.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queues.d.ts","sourceRoot":"","sources":["../../../../src/services/queues.ts"],"names":[],"mappings":"AAIA,OAAO,
|
|
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,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AACnE,OAAO,KAAK,EAAE,GAAG,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;;IAQpD;;OAEG;qBACc,QAAQ;IAEzB;;;OAGG;oBACa,KAAK,GAAG,SAAS;;AAfrC;;GAEG;AACH,qBAAa,YAAa,SAAQ,iBAc/B;IACD,MAAM,CAAC,YAAY,0CAUhB;IAEH,MAAM,CAAC,IAAI,GAAI,QAAQ,YAAY,EAAE,QAAQ,KAAK,KAAG,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,YAAY,CAAC,CAKpF;IAEF,MAAM,CAAC,KAAK,GAAI,QAAQ,YAAY,EAAE,QAAQ,KAAK,KAAG,KAAK,CAAC,KAAK,CAAC,YAAY,CAAC,CACf;IAEhE;;OAEG;IACH,MAAM,CAAC,QAAQ,GAAI,CAAC,SAAS,MAAM,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,EAC1D,KAAK,GAAG,KACP,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,YAAY,CAAC,CAAsE;IAErH;;OAEG;IACH,MAAM,CAAC,WAAW,GAAI,CAAC,SAAS,MAAM,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,EAAE,UAAU;QACzE,WAAW,CAAC,EAAE,gBAAgB,CAAC;KAChC,KAAG,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,YAAY,CAAC,CAC2B;IAE3E,MAAM,CAAC,MAAM,GAAI,CAAC,SAAS,MAAM,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,EAAE,OAAO,KAAK,CAAC,CAAC,CAAC,EAAE,SAAS,CAAC,EAAE,KAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CACjE;CAC/C;;oBAQmB,KAAK;;AANzB;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,wBAKtC;IACD,MAAM,CAAC,KAAK,GAAI,OAAO,KAAK,oDAAmD;CAChF"}
|
|
@@ -1,13 +1,29 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as Context from 'effect/Context';
|
|
2
|
+
import * as Effect from 'effect/Effect';
|
|
3
|
+
import * as Layer from 'effect/Layer';
|
|
2
4
|
import { AgentStatus } from '@dxos/ai';
|
|
3
|
-
import { Obj } from '@dxos/echo';
|
|
4
|
-
import
|
|
5
|
-
|
|
5
|
+
import { type DXN, Obj } from '@dxos/echo';
|
|
6
|
+
import { ObjectId } from '@dxos/keys';
|
|
7
|
+
import { Message } from '@dxos/types';
|
|
8
|
+
import type { Trigger } from '../types';
|
|
9
|
+
declare const TracingService_base: Context.TagClass<TracingService, "@dxos/functions/TracingService", {
|
|
10
|
+
/**
|
|
11
|
+
* Gets the parent message ID.
|
|
12
|
+
*/
|
|
13
|
+
getTraceContext: () => TracingService.TraceContext;
|
|
6
14
|
/**
|
|
7
15
|
* Write an event to the tracing queue.
|
|
8
16
|
* @param event - The event to write. Must be an a typed object.
|
|
9
17
|
*/
|
|
10
|
-
write(event:
|
|
18
|
+
write: (event: Obj.Unknown, traceContext: TracingService.TraceContext) => void;
|
|
19
|
+
traceInvocationStart({ payload, target, }: {
|
|
20
|
+
payload: TracingService.FunctionInvocationPayload;
|
|
21
|
+
target?: DXN;
|
|
22
|
+
}): Effect.Effect<TracingService.InvocationTraceData>;
|
|
23
|
+
traceInvocationEnd({ trace, exception, }: {
|
|
24
|
+
trace: TracingService.InvocationTraceData;
|
|
25
|
+
exception?: any;
|
|
26
|
+
}): Effect.Effect<void>;
|
|
11
27
|
}>;
|
|
12
28
|
/**
|
|
13
29
|
* Provides a way for compute primitives (functions, workflows, tools)
|
|
@@ -15,11 +31,58 @@ declare const TracingService_base: Context.TagClass<TracingService, "TracingServ
|
|
|
15
31
|
*/
|
|
16
32
|
export declare class TracingService extends TracingService_base {
|
|
17
33
|
static noop: Context.Tag.Service<TracingService>;
|
|
18
|
-
static
|
|
34
|
+
static layerNoop: Layer.Layer<TracingService>;
|
|
35
|
+
/**
|
|
36
|
+
* Creates a TracingService layer that emits events to the parent tracing service.
|
|
37
|
+
*/
|
|
38
|
+
static layerSubframe: (mapContext: (currentContext: TracingService.TraceContext) => TracingService.TraceContext) => Layer.Layer<TracingService, never, TracingService>;
|
|
39
|
+
/**
|
|
40
|
+
* Create sublayer to trace an invocation.
|
|
41
|
+
* @param data
|
|
42
|
+
* @returns
|
|
43
|
+
*/
|
|
44
|
+
static layerInvocation: (data: TracingService.InvocationTraceData) => Layer.Layer<TracingService, never, TracingService>;
|
|
19
45
|
/**
|
|
20
46
|
* Emit the current human-readable execution status.
|
|
21
47
|
*/
|
|
22
|
-
static emitStatus: (data: Obj.MakeProps<typeof AgentStatus>) => Effect.Effect<
|
|
48
|
+
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>;
|
|
23
50
|
}
|
|
51
|
+
export declare namespace TracingService {
|
|
52
|
+
interface TraceContext {
|
|
53
|
+
currentInvocation?: InvocationTraceData;
|
|
54
|
+
/**
|
|
55
|
+
* If this thread sprung from a tool call, this is the ID of the message containing the tool call.
|
|
56
|
+
*/
|
|
57
|
+
parentMessage?: ObjectId;
|
|
58
|
+
/**
|
|
59
|
+
* If the current thread is a byproduct of a tool call, this is the ID of the tool call.
|
|
60
|
+
*/
|
|
61
|
+
toolCallId?: string;
|
|
62
|
+
debugInfo?: unknown;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Trace data for a function/trigger invocation.
|
|
66
|
+
*/
|
|
67
|
+
interface InvocationTraceData {
|
|
68
|
+
invocationId: ObjectId;
|
|
69
|
+
invocationTraceQueue?: DXN.String;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Payload for a function/trigger invocation.
|
|
73
|
+
*/
|
|
74
|
+
interface FunctionInvocationPayload {
|
|
75
|
+
data?: any;
|
|
76
|
+
inputNodeId?: string;
|
|
77
|
+
trigger?: {
|
|
78
|
+
id: string;
|
|
79
|
+
kind: Trigger.Kind;
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Goes into {@link Message['properties']}
|
|
85
|
+
*/
|
|
86
|
+
export declare const MESSAGE_PROPERTY_TOOL_CALL_ID: "toolCallId";
|
|
24
87
|
export {};
|
|
25
88
|
//# sourceMappingURL=tracing.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tracing.d.ts","sourceRoot":"","sources":["../../../../src/services/tracing.ts"],"names":[],"mappings":"AAIA,OAAO,
|
|
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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E,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,OAAO,WAAW,CAAC,EAAE,SAAS,CAAC,KACrD,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,EAAE,cAAc,CAAC,CAW5C;IAEH,MAAM,CAAC,sBAAsB,EAAE,CAC7B,IAAI,EAAE,GAAG,CAAC,SAAS,CAAC,OAAO,OAAO,CAAC,OAAO,CAAC,KACxC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,EAAE,cAAc,CAAC,CAa5C;CACJ;AAED,yBAAiB,cAAc,CAAC;IAC9B,UAAiB,YAAY;QAC3B,iBAAiB,CAAC,EAAE,mBAAmB,CAAC;QAExC;;WAEG;QACH,aAAa,CAAC,EAAE,QAAQ,CAAC;QAEzB;;WAEG;QACH,UAAU,CAAC,EAAE,MAAM,CAAC;QAEpB,SAAS,CAAC,EAAE,OAAO,CAAC;KACrB;IAED;;OAEG;IACH,UAAiB,mBAAmB;QAClC,YAAY,EAAE,QAAQ,CAAC;QACvB,oBAAoB,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC;KACnC;IAED;;OAEG;IACH,UAAiB,yBAAyB;QACxC,IAAI,CAAC,EAAE,GAAG,CAAC;QACX,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,OAAO,CAAC,EAAE;YACR,EAAE,EAAE,MAAM,CAAC;YACX,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC;SACpB,CAAC;KACH;CACF;AAED;;GAEG;AACH,eAAO,MAAM,6BAA6B,EAAG,YAAqB,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import * as Schema from 'effect/Schema';
|
|
2
|
+
import { Obj, Type } from '@dxos/echo';
|
|
3
|
+
/**
|
|
4
|
+
* Function deployment.
|
|
5
|
+
*/
|
|
6
|
+
export declare const Function: Type.Obj<{
|
|
7
|
+
readonly version: string;
|
|
8
|
+
readonly source?: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
|
|
9
|
+
readonly source: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
|
|
10
|
+
readonly content: string;
|
|
11
|
+
}>;
|
|
12
|
+
readonly description?: string | undefined;
|
|
13
|
+
readonly name?: string | undefined;
|
|
14
|
+
readonly changed?: boolean | undefined;
|
|
15
|
+
}> | undefined;
|
|
16
|
+
readonly description?: string | undefined;
|
|
17
|
+
readonly name: string;
|
|
18
|
+
readonly key?: string | undefined;
|
|
19
|
+
readonly updated?: string | undefined;
|
|
20
|
+
readonly inputSchema?: import("@dxos/echo/internal").JsonSchemaType | undefined;
|
|
21
|
+
readonly outputSchema?: import("@dxos/echo/internal").JsonSchemaType | undefined;
|
|
22
|
+
readonly services?: readonly string[] | undefined;
|
|
23
|
+
readonly binding?: string | undefined;
|
|
24
|
+
}, Schema.Struct.Fields>;
|
|
25
|
+
export interface Function extends Schema.Schema.Type<typeof Function> {
|
|
26
|
+
}
|
|
27
|
+
export declare const make: (props: Obj.MakeProps<typeof Function>) => Obj.Obj<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
|
|
28
|
+
readonly version: string;
|
|
29
|
+
readonly source?: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
|
|
30
|
+
readonly source: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
|
|
31
|
+
readonly content: string;
|
|
32
|
+
}>;
|
|
33
|
+
readonly description?: string | undefined;
|
|
34
|
+
readonly name?: string | undefined;
|
|
35
|
+
readonly changed?: boolean | undefined;
|
|
36
|
+
}> | undefined;
|
|
37
|
+
readonly description?: string | undefined;
|
|
38
|
+
readonly name: string;
|
|
39
|
+
readonly key?: string | undefined;
|
|
40
|
+
readonly updated?: string | undefined;
|
|
41
|
+
readonly inputSchema?: import("@dxos/echo/internal").JsonSchemaType | undefined;
|
|
42
|
+
readonly outputSchema?: import("@dxos/echo/internal").JsonSchemaType | undefined;
|
|
43
|
+
readonly services?: readonly string[] | undefined;
|
|
44
|
+
readonly binding?: string | undefined;
|
|
45
|
+
}>;
|
|
46
|
+
/**
|
|
47
|
+
* Copies properties from source to target.
|
|
48
|
+
* @param target - Target object to copy properties to.
|
|
49
|
+
* @param source - Source object to copy properties from.
|
|
50
|
+
*/
|
|
51
|
+
export declare const setFrom: (target: Function, source: Function) => void;
|
|
52
|
+
//# sourceMappingURL=Function.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Function.d.ts","sourceRoot":"","sources":["../../../../src/types/Function.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAA0B,GAAG,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAK/D;;GAEG;AACH,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;wBA4CpB,CAAC;AAEF,MAAM,WAAW,QAAS,SAAQ,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,QAAQ,CAAC;CAAG;AAExE,eAAO,MAAM,IAAI,GAAI,OAAO,GAAG,CAAC,SAAS,CAAC,OAAO,QAAQ,CAAC;;;;;;;;;;;;;;;;;;EAA8B,CAAC;AAEzF;;;;GAIG;AACH,eAAO,MAAM,OAAO,GAAI,QAAQ,QAAQ,EAAE,QAAQ,QAAQ,SAYzD,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
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 source: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
|
|
8
|
+
readonly content: string;
|
|
9
|
+
}>;
|
|
10
|
+
readonly description?: string | undefined;
|
|
11
|
+
readonly name?: string | undefined;
|
|
12
|
+
readonly changed?: boolean | undefined;
|
|
13
|
+
}, Schema.Struct.Fields>;
|
|
14
|
+
export interface Script extends Schema.Schema.Type<typeof Script> {
|
|
15
|
+
}
|
|
16
|
+
type Props = Omit<Obj.MakeProps<typeof Script>, 'source'> & {
|
|
17
|
+
source?: string;
|
|
18
|
+
};
|
|
19
|
+
export declare const make: ({ source, ...props }?: Props) => Script;
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=Script.d.ts.map
|
|
@@ -0,0 +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;;;;;;;wBAalB,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,MACQ,CAAC"}
|
|
@@ -0,0 +1,121 @@
|
|
|
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.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
|
+
}>;
|
|
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.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
|
+
}>;
|
|
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> & {
|
|
85
|
+
readonly [x: string]: any;
|
|
86
|
+
}> | undefined;
|
|
87
|
+
readonly inputNodeId?: string | undefined;
|
|
88
|
+
readonly enabled?: boolean | undefined;
|
|
89
|
+
readonly spec?: {
|
|
90
|
+
readonly kind: "email";
|
|
91
|
+
} | {
|
|
92
|
+
readonly queue: string;
|
|
93
|
+
readonly kind: "queue";
|
|
94
|
+
} | {
|
|
95
|
+
readonly kind: "subscription";
|
|
96
|
+
readonly query: {
|
|
97
|
+
readonly raw?: string | undefined;
|
|
98
|
+
readonly ast: QueryAST.QuerySelectClause | QueryAST.QueryFilterClause | QueryAST.QueryReferenceTraversalClause | QueryAST.QueryIncomingReferencesClause | QueryAST.QueryRelationClause | QueryAST.QueryRelationTraversalClause | QueryAST.QueryUnionClause | QueryAST.QuerySetDifferenceClause | QueryAST.QueryOrderClause | QueryAST.QueryOptionsClause | QueryAST.QueryLimitClause;
|
|
99
|
+
};
|
|
100
|
+
readonly options?: {
|
|
101
|
+
readonly deep?: boolean | undefined;
|
|
102
|
+
readonly delay?: number | undefined;
|
|
103
|
+
} | undefined;
|
|
104
|
+
} | {
|
|
105
|
+
readonly kind: "timer";
|
|
106
|
+
readonly cron: string;
|
|
107
|
+
} | {
|
|
108
|
+
readonly kind: "webhook";
|
|
109
|
+
readonly method?: string | undefined;
|
|
110
|
+
readonly port?: number | undefined;
|
|
111
|
+
} | undefined;
|
|
112
|
+
readonly input?: {
|
|
113
|
+
readonly [x: string]: any;
|
|
114
|
+
} | undefined;
|
|
115
|
+
}, Schema.Struct.Fields>;
|
|
116
|
+
export interface Trigger extends Schema.Schema.Type<typeof TriggerSchema> {
|
|
117
|
+
}
|
|
118
|
+
export declare const Trigger: Type.Obj<Trigger>;
|
|
119
|
+
export declare const make: (props: Obj.MakeProps<typeof Trigger>) => Obj.Obj<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & Trigger>;
|
|
120
|
+
export {};
|
|
121
|
+
//# sourceMappingURL=Trigger.d.ts.map
|
|
@@ -0,0 +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,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAKjD;;;;GAIG;AACH,e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AAE/D,eAAO,MAAM,IAAI,GAAI,OAAO,GAAG,CAAC,SAAS,CAAC,OAAO,OAAO,CAAC,2GAA6B,CAAC"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import * as Schema from 'effect/Schema';
|
|
2
|
+
export declare const EmailEvent: Schema.Struct<{
|
|
3
|
+
from: typeof Schema.String;
|
|
4
|
+
to: typeof Schema.String;
|
|
5
|
+
subject: typeof Schema.String;
|
|
6
|
+
created: typeof Schema.String;
|
|
7
|
+
body: typeof Schema.String;
|
|
8
|
+
}>;
|
|
9
|
+
export type EmailEvent = Schema.Schema.Type<typeof EmailEvent>;
|
|
10
|
+
export declare const QueueEvent: Schema.Struct<{
|
|
11
|
+
queue: Schema.refine<string, typeof Schema.NonEmptyString>;
|
|
12
|
+
item: typeof Schema.Any;
|
|
13
|
+
cursor: typeof Schema.String;
|
|
14
|
+
}>;
|
|
15
|
+
export type QueueEvent = Schema.Schema.Type<typeof QueueEvent>;
|
|
16
|
+
export declare const SubscriptionEvent: Schema.Struct<{
|
|
17
|
+
/**
|
|
18
|
+
* Type of the mutation.
|
|
19
|
+
*/
|
|
20
|
+
type: typeof Schema.String;
|
|
21
|
+
/**
|
|
22
|
+
* Reference to the object that was changed or created.
|
|
23
|
+
*/
|
|
24
|
+
subject: import("@dxos/echo/internal").RefSchema<any>;
|
|
25
|
+
/**
|
|
26
|
+
* @deprecated
|
|
27
|
+
*/
|
|
28
|
+
changedObjectId: Schema.optional<typeof Schema.String>;
|
|
29
|
+
}>;
|
|
30
|
+
export type SubscriptionEvent = Schema.Schema.Type<typeof SubscriptionEvent>;
|
|
31
|
+
export declare const TimerEvent: Schema.Struct<{
|
|
32
|
+
tick: typeof Schema.Number;
|
|
33
|
+
}>;
|
|
34
|
+
export type TimerEvent = Schema.Schema.Type<typeof TimerEvent>;
|
|
35
|
+
export declare const WebhookEvent: Schema.Struct<{
|
|
36
|
+
url: typeof Schema.String;
|
|
37
|
+
method: Schema.Literal<["GET", "POST"]>;
|
|
38
|
+
headers: Schema.Record$<typeof Schema.String, typeof Schema.String>;
|
|
39
|
+
bodyText: typeof Schema.String;
|
|
40
|
+
}>;
|
|
41
|
+
export type WebhookEvent = Schema.Schema.Type<typeof WebhookEvent>;
|
|
42
|
+
export declare const TriggerEvent: Schema.Union<[Schema.Struct<{
|
|
43
|
+
from: typeof Schema.String;
|
|
44
|
+
to: typeof Schema.String;
|
|
45
|
+
subject: typeof Schema.String;
|
|
46
|
+
created: typeof Schema.String;
|
|
47
|
+
body: typeof Schema.String;
|
|
48
|
+
}>, Schema.Struct<{
|
|
49
|
+
queue: Schema.refine<string, typeof Schema.NonEmptyString>;
|
|
50
|
+
item: typeof Schema.Any;
|
|
51
|
+
cursor: typeof Schema.String;
|
|
52
|
+
}>, Schema.Struct<{
|
|
53
|
+
/**
|
|
54
|
+
* Type of the mutation.
|
|
55
|
+
*/
|
|
56
|
+
type: typeof Schema.String;
|
|
57
|
+
/**
|
|
58
|
+
* Reference to the object that was changed or created.
|
|
59
|
+
*/
|
|
60
|
+
subject: import("@dxos/echo/internal").RefSchema<any>;
|
|
61
|
+
/**
|
|
62
|
+
* @deprecated
|
|
63
|
+
*/
|
|
64
|
+
changedObjectId: Schema.optional<typeof Schema.String>;
|
|
65
|
+
}>, Schema.Struct<{
|
|
66
|
+
tick: typeof Schema.Number;
|
|
67
|
+
}>, Schema.Struct<{
|
|
68
|
+
url: typeof Schema.String;
|
|
69
|
+
method: Schema.Literal<["GET", "POST"]>;
|
|
70
|
+
headers: Schema.Record$<typeof Schema.String, typeof Schema.String>;
|
|
71
|
+
bodyText: typeof Schema.String;
|
|
72
|
+
}>]>;
|
|
73
|
+
export type TriggerEvent = Schema.Schema.Type<typeof TriggerEvent>;
|
|
74
|
+
//# sourceMappingURL=TriggerEvent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TriggerEvent.d.ts","sourceRoot":"","sources":["../../../../src/types/TriggerEvent.ts"],"names":[],"mappings":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Ac,OAAO,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type Obj } from '@dxos/echo';
|
|
2
|
+
export declare const FUNCTIONS_META_KEY = "dxos.org/service/function";
|
|
3
|
+
export declare const FUNCTIONS_PRESET_META_KEY = "dxos.org/service/function-preset";
|
|
4
|
+
/**
|
|
5
|
+
* NOTE: functionId is backend ID, not ECHO object id.
|
|
6
|
+
*/
|
|
7
|
+
export declare const getUserFunctionIdInMetadata: (meta: Obj.ReadonlyMeta) => string | undefined;
|
|
8
|
+
/**
|
|
9
|
+
* NOTE: functionId is backend ID, not ECHO object id.
|
|
10
|
+
* Must be called inside Obj.changeMeta() since it mutates the meta.
|
|
11
|
+
*/
|
|
12
|
+
export declare const setUserFunctionIdInMetadata: (meta: Obj.Meta, functionId: string) => void;
|
|
13
|
+
//# sourceMappingURL=url.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"url.d.ts","sourceRoot":"","sources":["../../../../src/types/url.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,GAAG,EAAE,MAAM,YAAY,CAAC;AAGtC,eAAO,MAAM,kBAAkB,8BAA8B,CAAC;AAE9D,eAAO,MAAM,yBAAyB,qCAAqC,CAAC;AAE5E;;GAEG;AACH,eAAO,MAAM,2BAA2B,GAAI,MAAM,GAAG,CAAC,YAAY,uBAEjE,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,2BAA2B,GAAI,MAAM,GAAG,CAAC,IAAI,EAAE,YAAY,MAAM,SAS7E,CAAC"}
|