@dxos/functions 0.8.4-main.b97322e → 0.8.4-main.c4373fc
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/bundler/index.mjs +61 -39
- package/dist/lib/browser/bundler/index.mjs.map +3 -3
- package/dist/lib/browser/chunk-J5LGTIGS.mjs +10 -0
- package/dist/lib/browser/chunk-J5LGTIGS.mjs.map +7 -0
- package/dist/lib/browser/chunk-LKYT2SAL.mjs +665 -0
- package/dist/lib/browser/chunk-LKYT2SAL.mjs.map +7 -0
- package/dist/lib/browser/edge/index.mjs +22 -8
- package/dist/lib/browser/edge/index.mjs.map +3 -3
- package/dist/lib/browser/index.mjs +1035 -143
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/testing/index.mjs +81 -41
- package/dist/lib/browser/testing/index.mjs.map +3 -3
- package/dist/lib/node-esm/bundler/index.mjs +60 -39
- package/dist/lib/node-esm/bundler/index.mjs.map +3 -3
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +11 -0
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-NAQIKLZB.mjs +667 -0
- package/dist/lib/node-esm/chunk-NAQIKLZB.mjs.map +7 -0
- package/dist/lib/node-esm/edge/index.mjs +21 -8
- package/dist/lib/node-esm/edge/index.mjs.map +3 -3
- package/dist/lib/node-esm/index.mjs +1035 -143
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/testing/index.mjs +81 -41
- package/dist/lib/node-esm/testing/index.mjs.map +3 -3
- package/dist/types/src/bundler/bundler.d.ts +11 -12
- package/dist/types/src/bundler/bundler.d.ts.map +1 -1
- package/dist/types/src/edge/functions.d.ts +3 -2
- package/dist/types/src/edge/functions.d.ts.map +1 -1
- package/dist/types/src/errors.d.ts +89 -20
- package/dist/types/src/errors.d.ts.map +1 -1
- package/dist/types/src/examples/fib.d.ts +7 -0
- package/dist/types/src/examples/fib.d.ts.map +1 -0
- package/dist/types/src/examples/index.d.ts +4 -0
- package/dist/types/src/examples/index.d.ts.map +1 -0
- package/dist/types/src/examples/reply.d.ts +3 -0
- package/dist/types/src/examples/reply.d.ts.map +1 -0
- package/dist/types/src/examples/sleep.d.ts +5 -0
- package/dist/types/src/examples/sleep.d.ts.map +1 -0
- package/dist/types/src/executor/executor.d.ts +7 -1
- package/dist/types/src/executor/executor.d.ts.map +1 -1
- package/dist/types/src/handler.d.ts +56 -9
- package/dist/types/src/handler.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +3 -1
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/schema.d.ts +11 -6
- package/dist/types/src/schema.d.ts.map +1 -1
- package/dist/types/src/services/credentials.d.ts +20 -3
- package/dist/types/src/services/credentials.d.ts.map +1 -1
- package/dist/types/src/services/database.d.ts +44 -6
- package/dist/types/src/services/database.d.ts.map +1 -1
- package/dist/types/src/services/event-logger.d.ts +68 -30
- package/dist/types/src/services/event-logger.d.ts.map +1 -1
- package/dist/types/src/services/function-invocation-service.d.ts +28 -0
- package/dist/types/src/services/function-invocation-service.d.ts.map +1 -0
- package/dist/types/src/services/function-invocation-service.test.d.ts +2 -0
- package/dist/types/src/services/function-invocation-service.test.d.ts.map +1 -0
- package/dist/types/src/services/index.d.ts +5 -3
- package/dist/types/src/services/index.d.ts.map +1 -1
- package/dist/types/src/services/local-function-execution.d.ts +34 -0
- package/dist/types/src/services/local-function-execution.d.ts.map +1 -0
- 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/remote-function-execution-service.d.ts +22 -0
- package/dist/types/src/services/remote-function-execution-service.d.ts.map +1 -0
- package/dist/types/src/services/service-container.d.ts +7 -6
- package/dist/types/src/services/service-container.d.ts.map +1 -1
- package/dist/types/src/services/service-registry.d.ts +4 -2
- package/dist/types/src/services/service-registry.d.ts.map +1 -1
- package/dist/types/src/services/tracing.d.ts +39 -5
- package/dist/types/src/services/tracing.d.ts.map +1 -1
- package/dist/types/src/testing/layer.d.ts +11 -3
- package/dist/types/src/testing/layer.d.ts.map +1 -1
- package/dist/types/src/testing/logger.d.ts +4 -4
- package/dist/types/src/testing/logger.d.ts.map +1 -1
- package/dist/types/src/testing/persist-database.test.d.ts +2 -0
- package/dist/types/src/testing/persist-database.test.d.ts.map +1 -0
- package/dist/types/src/testing/services.d.ts +7 -18
- package/dist/types/src/testing/services.d.ts.map +1 -1
- package/dist/types/src/trace.d.ts +21 -23
- package/dist/types/src/trace.d.ts.map +1 -1
- package/dist/types/src/triggers/index.d.ts +4 -0
- package/dist/types/src/triggers/index.d.ts.map +1 -0
- package/dist/types/src/triggers/input-builder.d.ts +3 -0
- package/dist/types/src/triggers/input-builder.d.ts.map +1 -0
- package/dist/types/src/triggers/invocation-tracer.d.ts +37 -0
- package/dist/types/src/triggers/invocation-tracer.d.ts.map +1 -0
- package/dist/types/src/triggers/trigger-dispatcher.d.ts +78 -0
- package/dist/types/src/triggers/trigger-dispatcher.d.ts.map +1 -0
- package/dist/types/src/triggers/trigger-dispatcher.test.d.ts +2 -0
- package/dist/types/src/triggers/trigger-dispatcher.test.d.ts.map +1 -0
- package/dist/types/src/triggers/trigger-state-store.d.ts +28 -0
- package/dist/types/src/triggers/trigger-state-store.d.ts.map +1 -0
- package/dist/types/src/types.d.ts +71 -252
- package/dist/types/src/types.d.ts.map +1 -1
- package/dist/types/src/url.d.ts +11 -7
- package/dist/types/src/url.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +38 -42
- package/src/bundler/bundler.test.ts +8 -9
- package/src/bundler/bundler.ts +38 -35
- package/src/edge/functions.ts +8 -5
- package/src/errors.ts +13 -5
- package/src/examples/fib.ts +32 -0
- package/src/examples/index.ts +7 -0
- package/src/examples/reply.ts +21 -0
- package/src/examples/sleep.ts +24 -0
- package/src/executor/executor.ts +14 -10
- package/src/handler.ts +125 -20
- package/src/index.ts +3 -3
- package/src/schema.ts +16 -2
- package/src/services/credentials.ts +86 -3
- package/src/services/database.ts +123 -18
- package/src/services/event-logger.ts +71 -37
- package/src/services/function-invocation-service.test.ts +81 -0
- package/src/services/function-invocation-service.ts +84 -0
- package/src/services/index.ts +5 -3
- package/src/services/local-function-execution.ts +153 -0
- package/src/services/queues.ts +39 -10
- package/src/services/remote-function-execution-service.ts +63 -0
- package/src/services/service-container.ts +13 -11
- package/src/services/service-registry.test.ts +4 -1
- package/src/services/service-registry.ts +11 -4
- package/src/services/tracing.ts +112 -11
- package/src/testing/layer.ts +87 -4
- package/src/testing/logger.ts +5 -4
- package/src/testing/persist-database.test.ts +87 -0
- package/src/testing/services.ts +11 -64
- package/src/trace.ts +19 -21
- package/src/triggers/index.ts +7 -0
- package/src/triggers/input-builder.ts +35 -0
- package/src/triggers/invocation-tracer.ts +101 -0
- package/src/triggers/trigger-dispatcher.test.ts +665 -0
- package/src/triggers/trigger-dispatcher.ts +533 -0
- package/src/triggers/trigger-state-store.ts +61 -0
- package/src/types.ts +44 -37
- package/src/url.ts +14 -11
- package/dist/lib/browser/chunk-3NGCSUEW.mjs +0 -328
- package/dist/lib/browser/chunk-3NGCSUEW.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/types/src/services/function-call-service.d.ts +0 -16
- package/dist/types/src/services/function-call-service.d.ts.map +0 -1
- package/src/services/function-call-service.ts +0 -64
|
@@ -1,31 +1,27 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
1
|
+
import * as Schema from 'effect/Schema';
|
|
2
|
+
import { QueryAST, Type } from '@dxos/echo';
|
|
3
|
+
import { Expando, Ref } from '@dxos/echo/internal';
|
|
3
4
|
/**
|
|
4
5
|
* Type discriminator for TriggerType.
|
|
5
6
|
* Every spec has a type field of type TriggerKind that we can use to understand which type we're working with.
|
|
6
7
|
* https://www.typescriptlang.org/docs/handbook/2/narrowing.html#discriminated-unions
|
|
7
8
|
*/
|
|
8
|
-
export declare
|
|
9
|
-
|
|
10
|
-
Webhook = "webhook",
|
|
11
|
-
Subscription = "subscription",
|
|
12
|
-
Email = "email",
|
|
13
|
-
Queue = "queue"
|
|
14
|
-
}
|
|
9
|
+
export declare const TriggerKinds: readonly ["timer", "webhook", "subscription", "email", "queue"];
|
|
10
|
+
export type TriggerKind = (typeof TriggerKinds)[number];
|
|
15
11
|
/**
|
|
16
12
|
* Cron timer.
|
|
17
13
|
*/
|
|
18
14
|
declare const TimerTriggerSchema: Schema.mutable<Schema.Struct<{
|
|
19
|
-
kind: Schema.Literal<[
|
|
15
|
+
kind: Schema.Literal<["timer"]>;
|
|
20
16
|
cron: Schema.SchemaClass<string, string, never>;
|
|
21
17
|
}>>;
|
|
22
18
|
export type TimerTrigger = Schema.Schema.Type<typeof TimerTriggerSchema>;
|
|
23
19
|
declare const EmailTriggerSchema: Schema.mutable<Schema.Struct<{
|
|
24
|
-
kind: Schema.Literal<[
|
|
20
|
+
kind: Schema.Literal<["email"]>;
|
|
25
21
|
}>>;
|
|
26
22
|
export type EmailTrigger = Schema.Schema.Type<typeof EmailTriggerSchema>;
|
|
27
23
|
declare const QueueTriggerSchema: Schema.mutable<Schema.Struct<{
|
|
28
|
-
kind: Schema.Literal<[
|
|
24
|
+
kind: Schema.Literal<["queue"]>;
|
|
29
25
|
queue: Schema.refine<string, typeof Schema.NonEmptyString>;
|
|
30
26
|
}>>;
|
|
31
27
|
export type QueueTrigger = Schema.Schema.Type<typeof QueueTriggerSchema>;
|
|
@@ -33,7 +29,7 @@ export type QueueTrigger = Schema.Schema.Type<typeof QueueTriggerSchema>;
|
|
|
33
29
|
* Webhook.
|
|
34
30
|
*/
|
|
35
31
|
declare const WebhookTriggerSchema: Schema.mutable<Schema.Struct<{
|
|
36
|
-
kind: Schema.Literal<[
|
|
32
|
+
kind: Schema.Literal<["webhook"]>;
|
|
37
33
|
method: Schema.optional<Schema.SchemaClass<string, string, never>>;
|
|
38
34
|
port: Schema.optional<Schema.SchemaClass<number, number, never>>;
|
|
39
35
|
}>>;
|
|
@@ -42,11 +38,11 @@ export type WebhookTrigger = Schema.Schema.Type<typeof WebhookTriggerSchema>;
|
|
|
42
38
|
* Subscription.
|
|
43
39
|
*/
|
|
44
40
|
declare const SubscriptionTriggerSchema: Schema.mutable<Schema.Struct<{
|
|
45
|
-
kind: Schema.Literal<[
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}
|
|
41
|
+
kind: Schema.Literal<["subscription"]>;
|
|
42
|
+
query: Schema.mutable<Schema.Struct<{
|
|
43
|
+
string: Schema.optional<Schema.SchemaClass<string, string, never>>;
|
|
44
|
+
ast: Schema.Schema<QueryAST.QuerySelectClause | QueryAST.QueryFilterClause | QueryAST.QueryReferenceTraversalClause | QueryAST.QueryIncomingReferencesClause | QueryAST.QueryRelationClause | QueryAST.QueryRelationTraversalClause | QueryAST.QueryUnionClause | QueryAST.QuerySetDifferenceClause | QueryAST.QueryOrderClause | QueryAST.QueryOptionsClause, QueryAST.QuerySelectClause | QueryAST.QueryFilterClause | QueryAST.QueryReferenceTraversalClause | QueryAST.QueryIncomingReferencesClause | QueryAST.QueryRelationClause | QueryAST.QueryRelationTraversalClause | QueryAST.QueryUnionClause | QueryAST.QuerySetDifferenceClause | QueryAST.QueryOrderClause | QueryAST.QueryOptionsClause, never>;
|
|
45
|
+
}>>;
|
|
50
46
|
options: Schema.optional<Schema.Struct<{
|
|
51
47
|
deep: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
|
|
52
48
|
delay: Schema.optional<Schema.SchemaClass<number, number, never>>;
|
|
@@ -57,26 +53,26 @@ export type SubscriptionTrigger = Schema.Schema.Type<typeof SubscriptionTriggerS
|
|
|
57
53
|
* Trigger schema (discriminated union).
|
|
58
54
|
*/
|
|
59
55
|
export declare const TriggerSchema: Schema.Union<[Schema.mutable<Schema.Struct<{
|
|
60
|
-
kind: Schema.Literal<[
|
|
56
|
+
kind: Schema.Literal<["timer"]>;
|
|
61
57
|
cron: Schema.SchemaClass<string, string, never>;
|
|
62
58
|
}>>, Schema.mutable<Schema.Struct<{
|
|
63
|
-
kind: Schema.Literal<[
|
|
59
|
+
kind: Schema.Literal<["webhook"]>;
|
|
64
60
|
method: Schema.optional<Schema.SchemaClass<string, string, never>>;
|
|
65
61
|
port: Schema.optional<Schema.SchemaClass<number, number, never>>;
|
|
66
62
|
}>>, Schema.mutable<Schema.Struct<{
|
|
67
|
-
kind: Schema.Literal<[
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
}
|
|
63
|
+
kind: Schema.Literal<["subscription"]>;
|
|
64
|
+
query: Schema.mutable<Schema.Struct<{
|
|
65
|
+
string: Schema.optional<Schema.SchemaClass<string, string, never>>;
|
|
66
|
+
ast: Schema.Schema<QueryAST.QuerySelectClause | QueryAST.QueryFilterClause | QueryAST.QueryReferenceTraversalClause | QueryAST.QueryIncomingReferencesClause | QueryAST.QueryRelationClause | QueryAST.QueryRelationTraversalClause | QueryAST.QueryUnionClause | QueryAST.QuerySetDifferenceClause | QueryAST.QueryOrderClause | QueryAST.QueryOptionsClause, QueryAST.QuerySelectClause | QueryAST.QueryFilterClause | QueryAST.QueryReferenceTraversalClause | QueryAST.QueryIncomingReferencesClause | QueryAST.QueryRelationClause | QueryAST.QueryRelationTraversalClause | QueryAST.QueryUnionClause | QueryAST.QuerySetDifferenceClause | QueryAST.QueryOrderClause | QueryAST.QueryOptionsClause, never>;
|
|
67
|
+
}>>;
|
|
72
68
|
options: Schema.optional<Schema.Struct<{
|
|
73
69
|
deep: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
|
|
74
70
|
delay: Schema.optional<Schema.SchemaClass<number, number, never>>;
|
|
75
71
|
}>>;
|
|
76
72
|
}>>, Schema.mutable<Schema.Struct<{
|
|
77
|
-
kind: Schema.Literal<[
|
|
73
|
+
kind: Schema.Literal<["email"]>;
|
|
78
74
|
}>>, Schema.mutable<Schema.Struct<{
|
|
79
|
-
kind: Schema.Literal<[
|
|
75
|
+
kind: Schema.Literal<["queue"]>;
|
|
80
76
|
queue: Schema.refine<string, typeof Schema.NonEmptyString>;
|
|
81
77
|
}>>]>;
|
|
82
78
|
export type TriggerType = Schema.Schema.Type<typeof TriggerSchema>;
|
|
@@ -103,8 +99,18 @@ export declare const QueueTriggerOutput: Schema.mutable<Schema.Struct<{
|
|
|
103
99
|
}>>;
|
|
104
100
|
export type QueueTriggerOutput = Schema.Schema.Type<typeof QueueTriggerOutput>;
|
|
105
101
|
export declare const SubscriptionTriggerOutput: Schema.mutable<Schema.Struct<{
|
|
102
|
+
/**
|
|
103
|
+
* Type of the mutation.
|
|
104
|
+
*/
|
|
106
105
|
type: typeof Schema.String;
|
|
107
|
-
|
|
106
|
+
/**
|
|
107
|
+
* Reference to the object that was changed or created.
|
|
108
|
+
*/
|
|
109
|
+
subject: Type.ref<Type.obj<Schema.Struct<{}>>>;
|
|
110
|
+
/**
|
|
111
|
+
* @deprecated
|
|
112
|
+
*/
|
|
113
|
+
changedObjectId: Schema.optional<typeof Schema.String>;
|
|
108
114
|
}>>;
|
|
109
115
|
export type SubscriptionTriggerOutput = Schema.Schema.Type<typeof SubscriptionTriggerOutput>;
|
|
110
116
|
export declare const TimerTriggerOutput: Schema.mutable<Schema.Struct<{
|
|
@@ -116,7 +122,7 @@ export type TimerTriggerOutput = Schema.Schema.Type<typeof TimerTriggerOutput>;
|
|
|
116
122
|
* Function is invoked with the `payload` passed as input data.
|
|
117
123
|
* The event that triggers the function is available in the function context.
|
|
118
124
|
*/
|
|
119
|
-
|
|
125
|
+
declare const FunctionTrigger_: Type.obj<Schema.Struct<{
|
|
120
126
|
/**
|
|
121
127
|
* Function or workflow to invoke.
|
|
122
128
|
*/
|
|
@@ -129,75 +135,26 @@ export declare const FunctionTriggerSchema: Schema.Struct<{
|
|
|
129
135
|
inputNodeId: Schema.optional<Schema.SchemaClass<string, string, never>>;
|
|
130
136
|
enabled: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
|
|
131
137
|
spec: Schema.optional<Schema.Union<[Schema.mutable<Schema.Struct<{
|
|
132
|
-
kind: Schema.Literal<[
|
|
138
|
+
kind: Schema.Literal<["timer"]>;
|
|
133
139
|
cron: Schema.SchemaClass<string, string, never>;
|
|
134
140
|
}>>, Schema.mutable<Schema.Struct<{
|
|
135
|
-
kind: Schema.Literal<[
|
|
141
|
+
kind: Schema.Literal<["webhook"]>;
|
|
136
142
|
method: Schema.optional<Schema.SchemaClass<string, string, never>>;
|
|
137
143
|
port: Schema.optional<Schema.SchemaClass<number, number, never>>;
|
|
138
144
|
}>>, Schema.mutable<Schema.Struct<{
|
|
139
|
-
kind: Schema.Literal<[
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
}>;
|
|
144
|
-
options: Schema.optional<Schema.Struct<{
|
|
145
|
-
deep: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
|
|
146
|
-
delay: Schema.optional<Schema.SchemaClass<number, number, never>>;
|
|
145
|
+
kind: Schema.Literal<["subscription"]>;
|
|
146
|
+
query: Schema.mutable<Schema.Struct<{
|
|
147
|
+
string: Schema.optional<Schema.SchemaClass<string, string, never>>;
|
|
148
|
+
ast: Schema.Schema<QueryAST.QuerySelectClause | QueryAST.QueryFilterClause | QueryAST.QueryReferenceTraversalClause | QueryAST.QueryIncomingReferencesClause | QueryAST.QueryRelationClause | QueryAST.QueryRelationTraversalClause | QueryAST.QueryUnionClause | QueryAST.QuerySetDifferenceClause | QueryAST.QueryOrderClause | QueryAST.QueryOptionsClause, QueryAST.QuerySelectClause | QueryAST.QueryFilterClause | QueryAST.QueryReferenceTraversalClause | QueryAST.QueryIncomingReferencesClause | QueryAST.QueryRelationClause | QueryAST.QueryRelationTraversalClause | QueryAST.QueryUnionClause | QueryAST.QuerySetDifferenceClause | QueryAST.QueryOrderClause | QueryAST.QueryOptionsClause, never>;
|
|
147
149
|
}>>;
|
|
148
|
-
}>>, Schema.mutable<Schema.Struct<{
|
|
149
|
-
kind: Schema.Literal<[TriggerKind.Email]>;
|
|
150
|
-
}>>, Schema.mutable<Schema.Struct<{
|
|
151
|
-
kind: Schema.Literal<[TriggerKind.Queue]>;
|
|
152
|
-
queue: Schema.refine<string, typeof Schema.NonEmptyString>;
|
|
153
|
-
}>>]>>;
|
|
154
|
-
/**
|
|
155
|
-
* Passed as the input data to the function.
|
|
156
|
-
* Must match the function's input schema.
|
|
157
|
-
*
|
|
158
|
-
* @example
|
|
159
|
-
* {
|
|
160
|
-
* item: '{{$.trigger.event}}',
|
|
161
|
-
* instructions: 'Summarize and perform entity-extraction'
|
|
162
|
-
* mailbox: { '/': 'dxn:echo:AAA:ZZZ' }
|
|
163
|
-
* }
|
|
164
|
-
*/
|
|
165
|
-
input: Schema.optional<Schema.mutable<Schema.Record$<typeof Schema.String, typeof Schema.Any>>>;
|
|
166
|
-
}>;
|
|
167
|
-
export type FunctionTriggerType = Schema.Schema.Type<typeof FunctionTriggerSchema>;
|
|
168
|
-
declare const FunctionTrigger_base: import("@dxos/echo-schema").TypedObjectPrototype<import("@dxos/echo-schema").TypedObjectFields<Readonly<{
|
|
169
|
-
/**
|
|
170
|
-
* Function or workflow to invoke.
|
|
171
|
-
*/
|
|
172
|
-
function: Schema.optional<Schema.SchemaClass<Ref<Expando>, import("@dxos/echo-protocol").EncodedReference, never>>;
|
|
173
|
-
/**
|
|
174
|
-
* Only used for workflowSchema.
|
|
175
|
-
* Specifies the input node in the circuit.
|
|
176
|
-
* @deprecated Remove and enforce a single input node in all compute graphSchema.
|
|
177
|
-
*/
|
|
178
|
-
inputNodeId: Schema.optional<Schema.SchemaClass<string, string, never>>;
|
|
179
|
-
enabled: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
|
|
180
|
-
spec: Schema.optional<Schema.Union<[Schema.mutable<Schema.Struct<{
|
|
181
|
-
kind: Schema.Literal<[TriggerKind.Timer]>;
|
|
182
|
-
cron: Schema.SchemaClass<string, string, never>;
|
|
183
|
-
}>>, Schema.mutable<Schema.Struct<{
|
|
184
|
-
kind: Schema.Literal<[TriggerKind.Webhook]>;
|
|
185
|
-
method: Schema.optional<Schema.SchemaClass<string, string, never>>;
|
|
186
|
-
port: Schema.optional<Schema.SchemaClass<number, number, never>>;
|
|
187
|
-
}>>, Schema.mutable<Schema.Struct<{
|
|
188
|
-
kind: Schema.Literal<[TriggerKind.Subscription]>;
|
|
189
|
-
filter: Schema.Struct<{
|
|
190
|
-
type: Schema.optional<Schema.SchemaClass<string, string, never>>;
|
|
191
|
-
props: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.Any>>;
|
|
192
|
-
}>;
|
|
193
150
|
options: Schema.optional<Schema.Struct<{
|
|
194
151
|
deep: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
|
|
195
152
|
delay: Schema.optional<Schema.SchemaClass<number, number, never>>;
|
|
196
153
|
}>>;
|
|
197
154
|
}>>, Schema.mutable<Schema.Struct<{
|
|
198
|
-
kind: Schema.Literal<[
|
|
155
|
+
kind: Schema.Literal<["email"]>;
|
|
199
156
|
}>>, Schema.mutable<Schema.Struct<{
|
|
200
|
-
kind: Schema.Literal<[
|
|
157
|
+
kind: Schema.Literal<["queue"]>;
|
|
201
158
|
queue: Schema.refine<string, typeof Schema.NonEmptyString>;
|
|
202
159
|
}>>]>>;
|
|
203
160
|
/**
|
|
@@ -212,200 +169,62 @@ declare const FunctionTrigger_base: import("@dxos/echo-schema").TypedObjectProto
|
|
|
212
169
|
* }
|
|
213
170
|
*/
|
|
214
171
|
input: Schema.optional<Schema.mutable<Schema.Record$<typeof Schema.String, typeof Schema.Any>>>;
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
function: Schema.optional<Schema.SchemaClass<Ref<Expando>, import("@dxos/echo-protocol").EncodedReference, never>>;
|
|
220
|
-
/**
|
|
221
|
-
* Only used for workflowSchema.
|
|
222
|
-
* Specifies the input node in the circuit.
|
|
223
|
-
* @deprecated Remove and enforce a single input node in all compute graphSchema.
|
|
224
|
-
*/
|
|
225
|
-
inputNodeId: Schema.optional<Schema.SchemaClass<string, string, never>>;
|
|
226
|
-
enabled: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
|
|
227
|
-
spec: Schema.optional<Schema.Union<[Schema.mutable<Schema.Struct<{
|
|
228
|
-
kind: Schema.Literal<[TriggerKind.Timer]>;
|
|
229
|
-
cron: Schema.SchemaClass<string, string, never>;
|
|
230
|
-
}>>, Schema.mutable<Schema.Struct<{
|
|
231
|
-
kind: Schema.Literal<[TriggerKind.Webhook]>;
|
|
232
|
-
method: Schema.optional<Schema.SchemaClass<string, string, never>>;
|
|
233
|
-
port: Schema.optional<Schema.SchemaClass<number, number, never>>;
|
|
234
|
-
}>>, Schema.mutable<Schema.Struct<{
|
|
235
|
-
kind: Schema.Literal<[TriggerKind.Subscription]>;
|
|
236
|
-
filter: Schema.Struct<{
|
|
237
|
-
type: Schema.optional<Schema.SchemaClass<string, string, never>>;
|
|
238
|
-
props: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.Any>>;
|
|
239
|
-
}>;
|
|
240
|
-
options: Schema.optional<Schema.Struct<{
|
|
241
|
-
deep: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
|
|
242
|
-
delay: Schema.optional<Schema.SchemaClass<number, number, never>>;
|
|
243
|
-
}>>;
|
|
244
|
-
}>>, Schema.mutable<Schema.Struct<{
|
|
245
|
-
kind: Schema.Literal<[TriggerKind.Email]>;
|
|
246
|
-
}>>, Schema.mutable<Schema.Struct<{
|
|
247
|
-
kind: Schema.Literal<[TriggerKind.Queue]>;
|
|
248
|
-
queue: Schema.refine<string, typeof Schema.NonEmptyString>;
|
|
249
|
-
}>>]>>;
|
|
250
|
-
/**
|
|
251
|
-
* Passed as the input data to the function.
|
|
252
|
-
* Must match the function's input schema.
|
|
253
|
-
*
|
|
254
|
-
* @example
|
|
255
|
-
* {
|
|
256
|
-
* item: '{{$.trigger.event}}',
|
|
257
|
-
* instructions: 'Summarize and perform entity-extraction'
|
|
258
|
-
* mailbox: { '/': 'dxn:echo:AAA:ZZZ' }
|
|
259
|
-
* }
|
|
260
|
-
*/
|
|
261
|
-
input: Schema.optional<Schema.mutable<Schema.Record$<typeof Schema.String, typeof Schema.Any>>>;
|
|
262
|
-
}>>>;
|
|
263
|
-
/**
|
|
264
|
-
* Function trigger.
|
|
265
|
-
*/
|
|
266
|
-
export declare class FunctionTrigger extends FunctionTrigger_base {
|
|
172
|
+
}>>;
|
|
173
|
+
export interface FunctionTrigger extends Schema.Schema.Type<typeof FunctionTrigger_> {
|
|
174
|
+
}
|
|
175
|
+
export interface FunctionTriggerEncoded extends Schema.Schema.Encoded<typeof FunctionTrigger_> {
|
|
267
176
|
}
|
|
177
|
+
export declare const FunctionTrigger: Schema.Schema<FunctionTrigger, FunctionTriggerEncoded>;
|
|
268
178
|
/**
|
|
269
179
|
* Function manifest file.
|
|
270
180
|
*/
|
|
271
181
|
export declare const FunctionManifestSchema: Schema.Struct<{
|
|
272
|
-
functions: Schema.optional<Schema.mutable<Schema.Array$<Schema.Schema<import("@dxos/echo
|
|
273
|
-
description?: string | undefined;
|
|
274
|
-
version: string;
|
|
182
|
+
functions: Schema.optional<Schema.mutable<Schema.Array$<Schema.Schema<import("@dxos/echo/internal").ExcludeId<Type.OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
|
|
275
183
|
name: string;
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
source?: Ref<import("@dxos/echo/Type").OfKind<import("@dxos/echo-schema").EntityKind.Object> & {
|
|
279
|
-
description?: string | undefined;
|
|
184
|
+
description?: string | undefined;
|
|
185
|
+
source?: Ref<Type.OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
|
|
280
186
|
name?: string | undefined;
|
|
187
|
+
description?: string | undefined;
|
|
281
188
|
changed?: boolean | undefined;
|
|
282
|
-
source: Ref<
|
|
189
|
+
source: Ref<Type.OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
|
|
283
190
|
content: string;
|
|
284
191
|
}>;
|
|
285
192
|
}> | undefined;
|
|
193
|
+
version: string;
|
|
194
|
+
key?: string | undefined;
|
|
195
|
+
inputSchema?: Type.JsonSchema | undefined;
|
|
196
|
+
outputSchema?: Type.JsonSchema | undefined;
|
|
286
197
|
binding?: string | undefined;
|
|
287
|
-
}> & import("@dxos/echo
|
|
198
|
+
}> & import("@dxos/echo/internal").WithMeta, {
|
|
288
199
|
id: string;
|
|
289
|
-
version: string;
|
|
290
200
|
name: string;
|
|
201
|
+
version: string;
|
|
291
202
|
description?: string | undefined;
|
|
292
|
-
inputSchema?: import("@dxos/echo-schema").JsonSchemaType | undefined;
|
|
293
|
-
outputSchema?: import("@dxos/echo-schema").JsonSchemaType | undefined;
|
|
294
203
|
source?: import("@dxos/echo-protocol").EncodedReference | undefined;
|
|
204
|
+
key?: string | undefined;
|
|
205
|
+
inputSchema?: Type.JsonSchema | undefined;
|
|
206
|
+
outputSchema?: Type.JsonSchema | undefined;
|
|
295
207
|
binding?: string | undefined;
|
|
296
208
|
}, never>>>>;
|
|
297
|
-
triggers: Schema.optional<Schema.mutable<Schema.Array$<Schema.Schema<import("@dxos/echo
|
|
298
|
-
/**
|
|
299
|
-
* Function or workflow to invoke.
|
|
300
|
-
*/
|
|
301
|
-
function: Schema.optional<Schema.SchemaClass<Ref<Expando>, import("@dxos/echo-protocol").EncodedReference, never>>;
|
|
302
|
-
/**
|
|
303
|
-
* Only used for workflowSchema.
|
|
304
|
-
* Specifies the input node in the circuit.
|
|
305
|
-
* @deprecated Remove and enforce a single input node in all compute graphSchema.
|
|
306
|
-
*/
|
|
307
|
-
inputNodeId: Schema.optional<Schema.SchemaClass<string, string, never>>;
|
|
308
|
-
enabled: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
|
|
309
|
-
spec: Schema.optional<Schema.Union<[Schema.mutable<Schema.Struct<{
|
|
310
|
-
kind: Schema.Literal<[TriggerKind.Timer]>;
|
|
311
|
-
cron: Schema.SchemaClass<string, string, never>;
|
|
312
|
-
}>>, Schema.mutable<Schema.Struct<{
|
|
313
|
-
kind: Schema.Literal<[TriggerKind.Webhook]>;
|
|
314
|
-
method: Schema.optional<Schema.SchemaClass<string, string, never>>;
|
|
315
|
-
port: Schema.optional<Schema.SchemaClass<number, number, never>>;
|
|
316
|
-
}>>, Schema.mutable<Schema.Struct<{
|
|
317
|
-
kind: Schema.Literal<[TriggerKind.Subscription]>;
|
|
318
|
-
filter: Schema.Struct<{
|
|
319
|
-
type: Schema.optional<Schema.SchemaClass<string, string, never>>;
|
|
320
|
-
props: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.Any>>;
|
|
321
|
-
}>;
|
|
322
|
-
options: Schema.optional<Schema.Struct<{
|
|
323
|
-
deep: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
|
|
324
|
-
delay: Schema.optional<Schema.SchemaClass<number, number, never>>;
|
|
325
|
-
}>>;
|
|
326
|
-
}>>, Schema.mutable<Schema.Struct<{
|
|
327
|
-
kind: Schema.Literal<[TriggerKind.Email]>;
|
|
328
|
-
}>>, Schema.mutable<Schema.Struct<{
|
|
329
|
-
kind: Schema.Literal<[TriggerKind.Queue]>;
|
|
330
|
-
queue: Schema.refine<string, typeof Schema.NonEmptyString>;
|
|
331
|
-
}>>]>>;
|
|
332
|
-
/**
|
|
333
|
-
* Passed as the input data to the function.
|
|
334
|
-
* Must match the function's input schema.
|
|
335
|
-
*
|
|
336
|
-
* @example
|
|
337
|
-
* {
|
|
338
|
-
* item: '{{$.trigger.event}}',
|
|
339
|
-
* instructions: 'Summarize and perform entity-extraction'
|
|
340
|
-
* mailbox: { '/': 'dxn:echo:AAA:ZZZ' }
|
|
341
|
-
* }
|
|
342
|
-
*/
|
|
343
|
-
input: Schema.optional<Schema.mutable<Schema.Record$<typeof Schema.String, typeof Schema.Any>>>;
|
|
344
|
-
}>, import("@dxos/echo-schema").TypedObjectOptions>> & import("@dxos/echo-schema").WithMeta, Schema.Struct.Encoded<Readonly<{
|
|
345
|
-
/**
|
|
346
|
-
* Function or workflow to invoke.
|
|
347
|
-
*/
|
|
348
|
-
function: Schema.optional<Schema.SchemaClass<Ref<Expando>, import("@dxos/echo-protocol").EncodedReference, never>>;
|
|
349
|
-
/**
|
|
350
|
-
* Only used for workflowSchema.
|
|
351
|
-
* Specifies the input node in the circuit.
|
|
352
|
-
* @deprecated Remove and enforce a single input node in all compute graphSchema.
|
|
353
|
-
*/
|
|
354
|
-
inputNodeId: Schema.optional<Schema.SchemaClass<string, string, never>>;
|
|
355
|
-
enabled: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
|
|
356
|
-
spec: Schema.optional<Schema.Union<[Schema.mutable<Schema.Struct<{
|
|
357
|
-
kind: Schema.Literal<[TriggerKind.Timer]>;
|
|
358
|
-
cron: Schema.SchemaClass<string, string, never>;
|
|
359
|
-
}>>, Schema.mutable<Schema.Struct<{
|
|
360
|
-
kind: Schema.Literal<[TriggerKind.Webhook]>;
|
|
361
|
-
method: Schema.optional<Schema.SchemaClass<string, string, never>>;
|
|
362
|
-
port: Schema.optional<Schema.SchemaClass<number, number, never>>;
|
|
363
|
-
}>>, Schema.mutable<Schema.Struct<{
|
|
364
|
-
kind: Schema.Literal<[TriggerKind.Subscription]>;
|
|
365
|
-
filter: Schema.Struct<{
|
|
366
|
-
type: Schema.optional<Schema.SchemaClass<string, string, never>>;
|
|
367
|
-
props: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.Any>>;
|
|
368
|
-
}>;
|
|
369
|
-
options: Schema.optional<Schema.Struct<{
|
|
370
|
-
deep: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
|
|
371
|
-
delay: Schema.optional<Schema.SchemaClass<number, number, never>>;
|
|
372
|
-
}>>;
|
|
373
|
-
}>>, Schema.mutable<Schema.Struct<{
|
|
374
|
-
kind: Schema.Literal<[TriggerKind.Email]>;
|
|
375
|
-
}>>, Schema.mutable<Schema.Struct<{
|
|
376
|
-
kind: Schema.Literal<[TriggerKind.Queue]>;
|
|
377
|
-
queue: Schema.refine<string, typeof Schema.NonEmptyString>;
|
|
378
|
-
}>>]>>;
|
|
379
|
-
/**
|
|
380
|
-
* Passed as the input data to the function.
|
|
381
|
-
* Must match the function's input schema.
|
|
382
|
-
*
|
|
383
|
-
* @example
|
|
384
|
-
* {
|
|
385
|
-
* item: '{{$.trigger.event}}',
|
|
386
|
-
* instructions: 'Summarize and perform entity-extraction'
|
|
387
|
-
* mailbox: { '/': 'dxn:echo:AAA:ZZZ' }
|
|
388
|
-
* }
|
|
389
|
-
*/
|
|
390
|
-
input: Schema.optional<Schema.mutable<Schema.Record$<typeof Schema.String, typeof Schema.Any>>>;
|
|
391
|
-
}>>, never>>>>;
|
|
209
|
+
triggers: Schema.optional<Schema.mutable<Schema.Array$<Schema.Schema<import("@dxos/echo/internal").ExcludeId<FunctionTrigger> & import("@dxos/echo/internal").WithMeta, FunctionTriggerEncoded, never>>>>;
|
|
392
210
|
}>;
|
|
393
211
|
export type FunctionManifest = Schema.Schema.Type<typeof FunctionManifestSchema>;
|
|
394
|
-
export declare const FUNCTION_TYPES: (
|
|
212
|
+
export declare const FUNCTION_TYPES: (Type.obj<Schema.Struct<{
|
|
213
|
+
key: Schema.optional<typeof Schema.String>;
|
|
395
214
|
name: typeof Schema.NonEmptyString;
|
|
396
215
|
version: typeof Schema.String;
|
|
397
216
|
description: Schema.optional<typeof Schema.String>;
|
|
398
|
-
source: Schema.optional<import("@dxos/echo
|
|
399
|
-
description?: string | undefined;
|
|
217
|
+
source: Schema.optional<import("@dxos/echo/internal").Ref$<Type.OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
|
|
400
218
|
name?: string | undefined;
|
|
219
|
+
description?: string | undefined;
|
|
401
220
|
changed?: boolean | undefined;
|
|
402
|
-
source: Ref<
|
|
221
|
+
source: Ref<Type.OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
|
|
403
222
|
content: string;
|
|
404
223
|
}>;
|
|
405
224
|
}>>;
|
|
406
|
-
inputSchema: Schema.optional<Schema.Schema<
|
|
407
|
-
outputSchema: Schema.optional<Schema.Schema<
|
|
225
|
+
inputSchema: Schema.optional<Schema.Schema<Type.JsonSchema, Type.JsonSchema, never>>;
|
|
226
|
+
outputSchema: Schema.optional<Schema.Schema<Type.JsonSchema, Type.JsonSchema, never>>;
|
|
408
227
|
binding: Schema.optional<typeof Schema.String>;
|
|
409
|
-
}>> |
|
|
228
|
+
}>> | Schema.Schema<FunctionTrigger, FunctionTriggerEncoded, never>)[];
|
|
410
229
|
export {};
|
|
411
230
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.ts"],"names":[],"mappings":"AAIA,OAAO,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.ts"],"names":[],"mappings":"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"}
|
package/dist/types/src/url.d.ts
CHANGED
|
@@ -1,15 +1,19 @@
|
|
|
1
|
-
import { type ObjectMeta } from '@dxos/echo
|
|
1
|
+
import { type ObjectMeta } from '@dxos/echo/internal';
|
|
2
2
|
import { type SpaceId } from '@dxos/keys';
|
|
3
|
+
export declare const FUNCTIONS_META_KEY = "dxos.org/service/function";
|
|
3
4
|
export declare const FUNCTIONS_PRESET_META_KEY = "dxos.org/service/function-preset";
|
|
4
|
-
export declare const getUserFunctionUrlInMetadata: (meta: ObjectMeta) => string | undefined;
|
|
5
|
-
export declare const setUserFunctionUrlInMetadata: (meta: ObjectMeta, functionUrl: string) => void;
|
|
6
5
|
/**
|
|
7
6
|
* NOTE: functionId is backend ID, not ECHO object id.
|
|
8
7
|
*/
|
|
9
|
-
export declare const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
export declare const getUserFunctionIdInMetadata: (meta: ObjectMeta) => string | undefined;
|
|
9
|
+
/**
|
|
10
|
+
* NOTE: functionId is backend ID, not ECHO object id.
|
|
11
|
+
*/
|
|
12
|
+
export declare const setUserFunctionIdInMetadata: (meta: ObjectMeta, functionId: string) => void;
|
|
13
|
+
/**
|
|
14
|
+
* NOTE: functionId is backend ID, not ECHO object id.
|
|
15
|
+
*/
|
|
16
|
+
export declare const getInvocationUrl: (functionId: string, edgeUrl: string, options?: InvocationOptions) => string;
|
|
13
17
|
export type InvocationOptions = {
|
|
14
18
|
spaceId?: SpaceId;
|
|
15
19
|
subjectId?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"url.d.ts","sourceRoot":"","sources":["../../../src/url.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"url.d.ts","sourceRoot":"","sources":["../../../src/url.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,YAAY,CAAC;AAG1C,eAAO,MAAM,kBAAkB,8BAA8B,CAAC;AAE9D,eAAO,MAAM,yBAAyB,qCAAqC,CAAC;AAM5E;;GAEG;AACH,eAAO,MAAM,2BAA2B,GAAI,MAAM,UAAU,uBAE3D,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,2BAA2B,GAAI,MAAM,UAAU,EAAE,YAAY,MAAM,SAS/E,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB,GAAI,YAAY,MAAM,EAAE,SAAS,MAAM,EAAE,UAAS,iBAAsB,WASpG,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC"}
|