@hotmeshio/hotmesh 0.4.0 → 0.4.1
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/build/modules/enums.d.ts +110 -0
- package/build/modules/enums.js +134 -0
- package/build/modules/errors.d.ts +124 -0
- package/build/modules/errors.js +191 -0
- package/build/modules/key.d.ts +66 -0
- package/build/modules/key.js +190 -0
- package/build/modules/storage.d.ts +3 -0
- package/build/modules/storage.js +5 -0
- package/build/modules/utils.d.ts +119 -0
- package/build/modules/utils.js +374 -0
- package/build/package.json +1 -1
- package/build/services/activities/activity.d.ts +104 -0
- package/build/services/activities/activity.js +549 -0
- package/build/services/activities/await.d.ts +12 -0
- package/build/services/activities/await.js +114 -0
- package/build/services/activities/cycle.d.ts +19 -0
- package/build/services/activities/cycle.js +112 -0
- package/build/services/activities/hook.d.ts +27 -0
- package/build/services/activities/hook.js +168 -0
- package/build/services/activities/index.d.ts +19 -0
- package/build/services/activities/index.js +20 -0
- package/build/services/activities/interrupt.d.ts +16 -0
- package/build/services/activities/interrupt.js +158 -0
- package/build/services/activities/signal.d.ts +20 -0
- package/build/services/activities/signal.js +134 -0
- package/build/services/activities/trigger.d.ts +37 -0
- package/build/services/activities/trigger.js +246 -0
- package/build/services/activities/worker.d.ts +12 -0
- package/build/services/activities/worker.js +106 -0
- package/build/services/collator/index.d.ts +111 -0
- package/build/services/collator/index.js +293 -0
- package/build/services/compiler/deployer.d.ts +40 -0
- package/build/services/compiler/deployer.js +488 -0
- package/build/services/compiler/index.d.ts +32 -0
- package/build/services/compiler/index.js +112 -0
- package/build/services/compiler/validator.d.ts +34 -0
- package/build/services/compiler/validator.js +147 -0
- package/build/services/connector/factory.d.ts +22 -0
- package/build/services/connector/factory.js +99 -0
- package/build/services/connector/index.d.ts +30 -0
- package/build/services/connector/index.js +54 -0
- package/build/services/connector/providers/ioredis.d.ts +9 -0
- package/build/services/connector/providers/ioredis.js +26 -0
- package/build/services/connector/providers/nats.d.ts +9 -0
- package/build/services/connector/providers/nats.js +34 -0
- package/build/services/connector/providers/postgres.d.ts +20 -0
- package/build/services/connector/providers/postgres.js +102 -0
- package/build/services/connector/providers/redis.d.ts +9 -0
- package/build/services/connector/providers/redis.js +38 -0
- package/build/services/engine/index.d.ts +264 -0
- package/build/services/engine/index.js +761 -0
- package/build/services/exporter/index.d.ts +44 -0
- package/build/services/exporter/index.js +126 -0
- package/build/services/hotmesh/index.d.ts +483 -0
- package/build/services/hotmesh/index.js +622 -0
- package/build/services/logger/index.d.ts +16 -0
- package/build/services/logger/index.js +54 -0
- package/build/services/mapper/index.d.ts +28 -0
- package/build/services/mapper/index.js +81 -0
- package/build/services/memflow/client.d.ts +108 -0
- package/build/services/memflow/client.js +372 -0
- package/build/services/memflow/connection.d.ts +23 -0
- package/build/services/memflow/connection.js +33 -0
- package/build/services/memflow/context.d.ts +143 -0
- package/build/services/memflow/context.js +299 -0
- package/build/services/memflow/exporter.d.ts +51 -0
- package/build/services/memflow/exporter.js +215 -0
- package/build/services/memflow/handle.d.ts +90 -0
- package/build/services/memflow/handle.js +176 -0
- package/build/services/memflow/index.d.ts +116 -0
- package/build/services/memflow/index.js +122 -0
- package/build/services/memflow/schemas/factory.d.ts +29 -0
- package/build/services/memflow/schemas/factory.js +2492 -0
- package/build/services/memflow/search.d.ts +142 -0
- package/build/services/memflow/search.js +320 -0
- package/build/services/memflow/worker.d.ts +124 -0
- package/build/services/memflow/worker.js +514 -0
- package/build/services/memflow/workflow/all.d.ts +7 -0
- package/build/services/memflow/workflow/all.js +15 -0
- package/build/services/memflow/workflow/common.d.ts +20 -0
- package/build/services/memflow/workflow/common.js +47 -0
- package/build/services/memflow/workflow/context.d.ts +6 -0
- package/build/services/memflow/workflow/context.js +45 -0
- package/build/services/memflow/workflow/contextMethods.d.ts +14 -0
- package/build/services/memflow/workflow/contextMethods.js +33 -0
- package/build/services/memflow/workflow/didRun.d.ts +7 -0
- package/build/services/memflow/workflow/didRun.js +22 -0
- package/build/services/memflow/workflow/emit.d.ts +11 -0
- package/build/services/memflow/workflow/emit.js +29 -0
- package/build/services/memflow/workflow/enrich.d.ts +9 -0
- package/build/services/memflow/workflow/enrich.js +17 -0
- package/build/services/memflow/workflow/execChild.d.ts +18 -0
- package/build/services/memflow/workflow/execChild.js +102 -0
- package/build/services/memflow/workflow/execHook.d.ts +65 -0
- package/build/services/memflow/workflow/execHook.js +73 -0
- package/build/services/memflow/workflow/hook.d.ts +9 -0
- package/build/services/memflow/workflow/hook.js +56 -0
- package/build/services/memflow/workflow/index.d.ts +74 -0
- package/build/services/memflow/workflow/index.js +87 -0
- package/build/services/memflow/workflow/interrupt.d.ts +9 -0
- package/build/services/memflow/workflow/interrupt.js +24 -0
- package/build/services/memflow/workflow/isSideEffectAllowed.d.ts +10 -0
- package/build/services/memflow/workflow/isSideEffectAllowed.js +33 -0
- package/build/services/memflow/workflow/proxyActivities.d.ts +20 -0
- package/build/services/memflow/workflow/proxyActivities.js +97 -0
- package/build/services/memflow/workflow/random.d.ts +6 -0
- package/build/services/memflow/workflow/random.js +16 -0
- package/build/services/memflow/workflow/searchMethods.d.ts +6 -0
- package/build/services/memflow/workflow/searchMethods.js +25 -0
- package/build/services/memflow/workflow/signal.d.ts +7 -0
- package/build/services/memflow/workflow/signal.js +28 -0
- package/build/services/memflow/workflow/sleepFor.d.ts +8 -0
- package/build/services/memflow/workflow/sleepFor.js +35 -0
- package/build/services/memflow/workflow/trace.d.ts +14 -0
- package/build/services/memflow/workflow/trace.js +33 -0
- package/build/services/memflow/workflow/waitFor.d.ts +8 -0
- package/build/services/memflow/workflow/waitFor.js +35 -0
- package/build/services/meshcall/index.d.ts +194 -0
- package/build/services/meshcall/index.js +452 -0
- package/build/services/meshcall/schemas/factory.d.ts +9 -0
- package/build/services/meshcall/schemas/factory.js +189 -0
- package/build/services/meshdata/index.d.ts +795 -0
- package/build/services/meshdata/index.js +1235 -0
- package/build/services/meshos/index.d.ts +293 -0
- package/build/services/meshos/index.js +547 -0
- package/build/services/pipe/functions/array.d.ts +17 -0
- package/build/services/pipe/functions/array.js +74 -0
- package/build/services/pipe/functions/bitwise.d.ts +9 -0
- package/build/services/pipe/functions/bitwise.js +24 -0
- package/build/services/pipe/functions/conditional.d.ts +13 -0
- package/build/services/pipe/functions/conditional.js +36 -0
- package/build/services/pipe/functions/cron.d.ts +12 -0
- package/build/services/pipe/functions/cron.js +40 -0
- package/build/services/pipe/functions/date.d.ts +58 -0
- package/build/services/pipe/functions/date.js +171 -0
- package/build/services/pipe/functions/index.d.ts +29 -0
- package/build/services/pipe/functions/index.js +30 -0
- package/build/services/pipe/functions/json.d.ts +5 -0
- package/build/services/pipe/functions/json.js +12 -0
- package/build/services/pipe/functions/logical.d.ts +5 -0
- package/build/services/pipe/functions/logical.js +12 -0
- package/build/services/pipe/functions/math.d.ts +42 -0
- package/build/services/pipe/functions/math.js +184 -0
- package/build/services/pipe/functions/number.d.ts +21 -0
- package/build/services/pipe/functions/number.js +60 -0
- package/build/services/pipe/functions/object.d.ts +25 -0
- package/build/services/pipe/functions/object.js +81 -0
- package/build/services/pipe/functions/string.d.ts +23 -0
- package/build/services/pipe/functions/string.js +69 -0
- package/build/services/pipe/functions/symbol.d.ts +12 -0
- package/build/services/pipe/functions/symbol.js +33 -0
- package/build/services/pipe/functions/unary.d.ts +7 -0
- package/build/services/pipe/functions/unary.js +18 -0
- package/build/services/pipe/index.d.ts +48 -0
- package/build/services/pipe/index.js +242 -0
- package/build/services/quorum/index.d.ts +90 -0
- package/build/services/quorum/index.js +263 -0
- package/build/services/reporter/index.d.ts +50 -0
- package/build/services/reporter/index.js +348 -0
- package/build/services/router/config/index.d.ts +11 -0
- package/build/services/router/config/index.js +36 -0
- package/build/services/router/consumption/index.d.ts +34 -0
- package/build/services/router/consumption/index.js +395 -0
- package/build/services/router/error-handling/index.d.ts +8 -0
- package/build/services/router/error-handling/index.js +98 -0
- package/build/services/router/index.d.ts +57 -0
- package/build/services/router/index.js +121 -0
- package/build/services/router/lifecycle/index.d.ts +27 -0
- package/build/services/router/lifecycle/index.js +80 -0
- package/build/services/router/telemetry/index.d.ts +11 -0
- package/build/services/router/telemetry/index.js +32 -0
- package/build/services/router/throttling/index.d.ts +23 -0
- package/build/services/router/throttling/index.js +76 -0
- package/build/services/search/factory.d.ts +7 -0
- package/build/services/search/factory.js +24 -0
- package/build/services/search/index.d.ts +23 -0
- package/build/services/search/index.js +10 -0
- package/build/services/search/providers/postgres/postgres.d.ts +25 -0
- package/build/services/search/providers/postgres/postgres.js +149 -0
- package/build/services/search/providers/redis/ioredis.d.ts +19 -0
- package/build/services/search/providers/redis/ioredis.js +121 -0
- package/build/services/search/providers/redis/redis.d.ts +19 -0
- package/build/services/search/providers/redis/redis.js +134 -0
- package/build/services/serializer/index.d.ts +42 -0
- package/build/services/serializer/index.js +282 -0
- package/build/services/store/cache.d.ts +67 -0
- package/build/services/store/cache.js +128 -0
- package/build/services/store/factory.d.ts +8 -0
- package/build/services/store/factory.js +24 -0
- package/build/services/store/index.d.ts +89 -0
- package/build/services/store/index.js +9 -0
- package/build/services/store/providers/postgres/kvsql.d.ts +168 -0
- package/build/services/store/providers/postgres/kvsql.js +198 -0
- package/build/services/store/providers/postgres/kvtables.d.ts +20 -0
- package/build/services/store/providers/postgres/kvtables.js +441 -0
- package/build/services/store/providers/postgres/kvtransaction.d.ts +36 -0
- package/build/services/store/providers/postgres/kvtransaction.js +248 -0
- package/build/services/store/providers/postgres/kvtypes/hash.d.ts +60 -0
- package/build/services/store/providers/postgres/kvtypes/hash.js +1287 -0
- package/build/services/store/providers/postgres/kvtypes/list.d.ts +33 -0
- package/build/services/store/providers/postgres/kvtypes/list.js +194 -0
- package/build/services/store/providers/postgres/kvtypes/string.d.ts +20 -0
- package/build/services/store/providers/postgres/kvtypes/string.js +115 -0
- package/build/services/store/providers/postgres/kvtypes/zset.d.ts +41 -0
- package/build/services/store/providers/postgres/kvtypes/zset.js +214 -0
- package/build/services/store/providers/postgres/postgres.d.ts +145 -0
- package/build/services/store/providers/postgres/postgres.js +1036 -0
- package/build/services/store/providers/redis/_base.d.ts +137 -0
- package/build/services/store/providers/redis/_base.js +980 -0
- package/build/services/store/providers/redis/ioredis.d.ts +20 -0
- package/build/services/store/providers/redis/ioredis.js +180 -0
- package/build/services/store/providers/redis/redis.d.ts +18 -0
- package/build/services/store/providers/redis/redis.js +199 -0
- package/build/services/store/providers/store-initializable.d.ts +5 -0
- package/build/services/store/providers/store-initializable.js +2 -0
- package/build/services/stream/factory.d.ts +8 -0
- package/build/services/stream/factory.js +37 -0
- package/build/services/stream/index.d.ts +69 -0
- package/build/services/stream/index.js +11 -0
- package/build/services/stream/providers/nats/nats.d.ts +60 -0
- package/build/services/stream/providers/nats/nats.js +225 -0
- package/build/services/stream/providers/postgres/kvtables.d.ts +3 -0
- package/build/services/stream/providers/postgres/kvtables.js +146 -0
- package/build/services/stream/providers/postgres/postgres.d.ts +107 -0
- package/build/services/stream/providers/postgres/postgres.js +519 -0
- package/build/services/stream/providers/redis/ioredis.d.ts +61 -0
- package/build/services/stream/providers/redis/ioredis.js +272 -0
- package/build/services/stream/providers/redis/redis.d.ts +61 -0
- package/build/services/stream/providers/redis/redis.js +305 -0
- package/build/services/stream/providers/stream-initializable.d.ts +4 -0
- package/build/services/stream/providers/stream-initializable.js +2 -0
- package/build/services/sub/factory.d.ts +7 -0
- package/build/services/sub/factory.js +29 -0
- package/build/services/sub/index.d.ts +22 -0
- package/build/services/sub/index.js +10 -0
- package/build/services/sub/providers/nats/nats.d.ts +19 -0
- package/build/services/sub/providers/nats/nats.js +105 -0
- package/build/services/sub/providers/postgres/postgres.d.ts +19 -0
- package/build/services/sub/providers/postgres/postgres.js +92 -0
- package/build/services/sub/providers/redis/ioredis.d.ts +17 -0
- package/build/services/sub/providers/redis/ioredis.js +81 -0
- package/build/services/sub/providers/redis/redis.d.ts +17 -0
- package/build/services/sub/providers/redis/redis.js +72 -0
- package/build/services/task/index.d.ts +36 -0
- package/build/services/task/index.js +206 -0
- package/build/services/telemetry/index.d.ts +52 -0
- package/build/services/telemetry/index.js +306 -0
- package/build/services/worker/index.d.ts +77 -0
- package/build/services/worker/index.js +197 -0
- package/package.json +1 -1
- package/.github/ISSUE_TEMPLATE/bug_report.md +0 -38
- package/.github/ISSUE_TEMPLATE/feature_request.md +0 -20
- package/typedoc.json +0 -47
- package/types/activity.ts +0 -268
- package/types/app.ts +0 -20
- package/types/async.ts +0 -6
- package/types/cache.ts +0 -1
- package/types/collator.ts +0 -9
- package/types/error.ts +0 -56
- package/types/exporter.ts +0 -102
- package/types/hook.ts +0 -44
- package/types/hotmesh.ts +0 -314
- package/types/index.ts +0 -306
- package/types/job.ts +0 -233
- package/types/logger.ts +0 -8
- package/types/manifest.ts +0 -70
- package/types/map.ts +0 -5
- package/types/memflow.ts +0 -645
- package/types/meshcall.ts +0 -235
- package/types/meshdata.ts +0 -278
- package/types/ms.d.ts +0 -7
- package/types/nats.ts +0 -270
- package/types/pipe.ts +0 -90
- package/types/postgres.ts +0 -114
- package/types/provider.ts +0 -161
- package/types/quorum.ts +0 -167
- package/types/redis.ts +0 -404
- package/types/serializer.ts +0 -40
- package/types/stats.ts +0 -117
- package/types/stream.ts +0 -231
- package/types/task.ts +0 -7
- package/types/telemetry.ts +0 -16
- package/types/transition.ts +0 -20
package/types/meshcall.ts
DELETED
|
@@ -1,235 +0,0 @@
|
|
|
1
|
-
import { ProviderConfig, ProvidersConfig } from './provider';
|
|
2
|
-
import { LogLevel } from './logger';
|
|
3
|
-
|
|
4
|
-
interface MeshCallExecOptions {
|
|
5
|
-
/**
|
|
6
|
-
* Cache id when caching, flushing and retrieving function results.
|
|
7
|
-
*/
|
|
8
|
-
id: string;
|
|
9
|
-
/**
|
|
10
|
-
* Time to live for the cache key. For example, `1 day`, `1 hour`. Refer to the syntax for the `ms` NPM package.
|
|
11
|
-
*/
|
|
12
|
-
ttl?: string;
|
|
13
|
-
/**
|
|
14
|
-
* If true, the cache will first be flushed and the function will be executed.
|
|
15
|
-
*/
|
|
16
|
-
flush?: boolean;
|
|
17
|
-
}
|
|
18
|
-
interface MeshCallConnectParams {
|
|
19
|
-
/**
|
|
20
|
-
* Log level for the worker
|
|
21
|
-
*/
|
|
22
|
-
logLevel?: LogLevel;
|
|
23
|
-
/**
|
|
24
|
-
* Idempotent GUID for the worker and engine
|
|
25
|
-
*/
|
|
26
|
-
guid?: string;
|
|
27
|
-
/**
|
|
28
|
-
* Namespace for grouping common functions
|
|
29
|
-
*/
|
|
30
|
-
namespace?: string;
|
|
31
|
-
/**
|
|
32
|
-
* Unique topic for the worker function
|
|
33
|
-
*/
|
|
34
|
-
topic: string;
|
|
35
|
-
/**
|
|
36
|
-
* Redis configuration; use 'connection' instead of 'redis'
|
|
37
|
-
* @deprecated
|
|
38
|
-
*/
|
|
39
|
-
redis?: ProviderConfig;
|
|
40
|
-
/**
|
|
41
|
-
* Provider configuration
|
|
42
|
-
*/
|
|
43
|
-
connection?: ProviderConfig | ProvidersConfig;
|
|
44
|
-
/**
|
|
45
|
-
* The linked worker function that will be called; optional if read only
|
|
46
|
-
*/
|
|
47
|
-
callback?: (...args: any[]) => any;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
interface MeshCallExecParams {
|
|
51
|
-
/**
|
|
52
|
-
* namespace for grouping common functions
|
|
53
|
-
*/
|
|
54
|
-
namespace?: string;
|
|
55
|
-
/**
|
|
56
|
-
* topic assigned to the worker when it was connected
|
|
57
|
-
*/
|
|
58
|
-
topic: string;
|
|
59
|
-
/**
|
|
60
|
-
* Arguments to pass to the worker function
|
|
61
|
-
*/
|
|
62
|
-
args: any[];
|
|
63
|
-
/**
|
|
64
|
-
* Redis configuration; use 'connection' instead of 'redis'
|
|
65
|
-
* @deprecated
|
|
66
|
-
*/
|
|
67
|
-
redis?: ProviderConfig;
|
|
68
|
-
/**
|
|
69
|
-
* Provider configuration
|
|
70
|
-
*/
|
|
71
|
-
connection?: ProviderConfig | ProvidersConfig;
|
|
72
|
-
/**
|
|
73
|
-
* Execution options like caching ttl
|
|
74
|
-
*/
|
|
75
|
-
options?: MeshCallExecOptions;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
interface MeshCallFlushOptions {
|
|
79
|
-
/**
|
|
80
|
-
* Cache id when caching/flushing/retrieving function results.
|
|
81
|
-
*/
|
|
82
|
-
id: string;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
interface MeshCallFlushParams {
|
|
86
|
-
/**
|
|
87
|
-
* namespace for grouping common functions
|
|
88
|
-
*/
|
|
89
|
-
namespace?: string;
|
|
90
|
-
/**
|
|
91
|
-
* id for cached response to flush
|
|
92
|
-
*/
|
|
93
|
-
id?: string;
|
|
94
|
-
/**
|
|
95
|
-
* topic assigned to the worker when it was connected
|
|
96
|
-
*/
|
|
97
|
-
topic: string;
|
|
98
|
-
/**
|
|
99
|
-
* Redis configuration; use 'connection' instead of 'redis'
|
|
100
|
-
* @deprecated
|
|
101
|
-
*/
|
|
102
|
-
redis?: ProviderConfig;
|
|
103
|
-
/**
|
|
104
|
-
* Provider configuration
|
|
105
|
-
*/
|
|
106
|
-
connection?: ProviderConfig | ProvidersConfig;
|
|
107
|
-
/**
|
|
108
|
-
* Options for the flush
|
|
109
|
-
*/
|
|
110
|
-
options?: MeshCallFlushOptions;
|
|
111
|
-
}
|
|
112
|
-
interface MeshCallCronOptions {
|
|
113
|
-
/**
|
|
114
|
-
* Idempotent GUID for the function
|
|
115
|
-
* */
|
|
116
|
-
id: string;
|
|
117
|
-
/**
|
|
118
|
-
* For example, `1 day`, `1 hour`. Fidelity is generally
|
|
119
|
-
* within 5 seconds. Refer to the syntax for the `ms` NPM package.
|
|
120
|
-
* Standard cron syntax is also supported. (e.g. `0 0 * * *`)
|
|
121
|
-
*/
|
|
122
|
-
interval: string;
|
|
123
|
-
/**
|
|
124
|
-
* Maximum number of cycles to run before exiting the cron.
|
|
125
|
-
*/
|
|
126
|
-
maxCycles?: number;
|
|
127
|
-
/**
|
|
128
|
-
* Time in seconds to sleep before invoking the first cycle.
|
|
129
|
-
* For example, `1 day`, `1 hour`. Fidelity is generally
|
|
130
|
-
* within 5 seconds. Refer to the syntax for the `ms` NPM package.
|
|
131
|
-
* If the interval field uses standard cron syntax, this field is ignored.
|
|
132
|
-
*/
|
|
133
|
-
delay?: string;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
interface MeshCallInterruptOptions {
|
|
137
|
-
/**
|
|
138
|
-
* Idempotent GUID for the cron function
|
|
139
|
-
*/
|
|
140
|
-
id: string;
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
interface MeshCallCronParams {
|
|
144
|
-
/**
|
|
145
|
-
* Log level for the cron
|
|
146
|
-
*/
|
|
147
|
-
logLevel?: LogLevel;
|
|
148
|
-
/**
|
|
149
|
-
* Idempotent GUID for the worker and engine used for the cron
|
|
150
|
-
*/
|
|
151
|
-
guid?: string;
|
|
152
|
-
/**
|
|
153
|
-
* Namespace for grouping common cron functions. (e.g. `hmsh:[namespace]:j:*`)
|
|
154
|
-
*/
|
|
155
|
-
namespace?: string;
|
|
156
|
-
/**
|
|
157
|
-
* Unique topic for the cron function to identify the worker
|
|
158
|
-
*/
|
|
159
|
-
topic: string;
|
|
160
|
-
/**
|
|
161
|
-
* Redis configuration; use 'connection' instead of 'redis'
|
|
162
|
-
* @deprecated
|
|
163
|
-
*/
|
|
164
|
-
redis?: ProviderConfig;
|
|
165
|
-
/**
|
|
166
|
-
* Provider configuration
|
|
167
|
-
*/
|
|
168
|
-
connection?: ProviderConfig | ProvidersConfig;
|
|
169
|
-
/**
|
|
170
|
-
* Arguments to pass to the cron job; arguments will be passed to the callback
|
|
171
|
-
* each time it runs
|
|
172
|
-
*/
|
|
173
|
-
args: any[];
|
|
174
|
-
/**
|
|
175
|
-
* linked worker function to run; if not provided, the system will
|
|
176
|
-
* attempt to start the cron job using the topic, but a new
|
|
177
|
-
* worker will not be created. This is useful for spawning a cron job
|
|
178
|
-
* from an ephemeral node process.
|
|
179
|
-
*/
|
|
180
|
-
callback?: (...args: any[]) => any;
|
|
181
|
-
/**
|
|
182
|
-
* Options for the cron job
|
|
183
|
-
*/
|
|
184
|
-
options: MeshCallCronOptions;
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
interface MeshCallInstanceOptions {
|
|
188
|
-
/**
|
|
189
|
-
* if true, the connection to HotMesh will be in readonly mode
|
|
190
|
-
* and the instantiated client will not route messages
|
|
191
|
-
* @default false
|
|
192
|
-
*/
|
|
193
|
-
readonly?: boolean;
|
|
194
|
-
/**
|
|
195
|
-
* Idempotent GUID for the worker and engine
|
|
196
|
-
*/
|
|
197
|
-
guid?: string;
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
interface MeshCallInterruptParams {
|
|
201
|
-
/**
|
|
202
|
-
* namespace for grouping common functions
|
|
203
|
-
*/
|
|
204
|
-
namespace?: string;
|
|
205
|
-
/**
|
|
206
|
-
* topic assigned to the cron worker when it was connected
|
|
207
|
-
*/
|
|
208
|
-
topic: string;
|
|
209
|
-
/**
|
|
210
|
-
* Redis configuration; use 'connection' instead of 'redis'
|
|
211
|
-
* @deprecated
|
|
212
|
-
*/
|
|
213
|
-
redis?: ProviderConfig;
|
|
214
|
-
/**
|
|
215
|
-
* Provider configuration
|
|
216
|
-
*/
|
|
217
|
-
connection?: ProviderConfig | ProvidersConfig;
|
|
218
|
-
/**
|
|
219
|
-
* Options for interrupting the cron
|
|
220
|
-
*/
|
|
221
|
-
options: MeshCallInterruptOptions;
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
export {
|
|
225
|
-
MeshCallConnectParams,
|
|
226
|
-
MeshCallExecParams,
|
|
227
|
-
MeshCallCronParams,
|
|
228
|
-
MeshCallExecOptions,
|
|
229
|
-
MeshCallCronOptions,
|
|
230
|
-
MeshCallInterruptOptions,
|
|
231
|
-
MeshCallInterruptParams,
|
|
232
|
-
MeshCallFlushOptions,
|
|
233
|
-
MeshCallFlushParams,
|
|
234
|
-
MeshCallInstanceOptions,
|
|
235
|
-
};
|
package/types/meshdata.ts
DELETED
|
@@ -1,278 +0,0 @@
|
|
|
1
|
-
import { HookOptions, WorkflowConfig, WorkflowSearchOptions } from './memflow';
|
|
2
|
-
import { StringStringType } from './serializer';
|
|
3
|
-
|
|
4
|
-
export type CallOptions = {
|
|
5
|
-
/**
|
|
6
|
-
* if provided along with a `ttl`, the function will be cached
|
|
7
|
-
*/
|
|
8
|
-
id?: string;
|
|
9
|
-
/**
|
|
10
|
-
* in format '1 minute', '5 minutes', '1 hour', 'infinity', etc
|
|
11
|
-
*/
|
|
12
|
-
ttl?: string;
|
|
13
|
-
/**
|
|
14
|
-
* full GUID (including prefix)
|
|
15
|
-
*/
|
|
16
|
-
$guid?: string;
|
|
17
|
-
/**
|
|
18
|
-
* exec, hook, proxy
|
|
19
|
-
*/
|
|
20
|
-
$type?: string;
|
|
21
|
-
/**
|
|
22
|
-
* if set to false explicitly it will not await the result
|
|
23
|
-
*/
|
|
24
|
-
await?: boolean;
|
|
25
|
-
/**
|
|
26
|
-
* taskQueue for the workflowId (defaults to entity)
|
|
27
|
-
*/
|
|
28
|
-
taskQueue?: string;
|
|
29
|
-
/**
|
|
30
|
-
* defaults to `entity` input parameter; allows override of the workflowId prefix
|
|
31
|
-
*/
|
|
32
|
-
prefix?: string;
|
|
33
|
-
search?: WorkflowSearchOptions;
|
|
34
|
-
/**
|
|
35
|
-
* list of state field names to return (this is NOT the final response)
|
|
36
|
-
*/
|
|
37
|
-
fields?: string[];
|
|
38
|
-
/**
|
|
39
|
-
* namespace for the the execution client
|
|
40
|
-
* @default 'memflow'
|
|
41
|
-
*/
|
|
42
|
-
namespace?: string;
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Custom marker data field used for adding a searchable marker to the job.
|
|
46
|
-
* markers always begin with a dash (-). Any field that does not
|
|
47
|
-
* begin with a dash will be removed and will not be inserted with
|
|
48
|
-
* the initial data set.
|
|
49
|
-
*/
|
|
50
|
-
marker?: StringStringType;
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
* If provided, the job will initialize in an pending state, reserving
|
|
54
|
-
* only the job ID (HSETNX) and persisting search and marker (if provided).
|
|
55
|
-
* If a `resume` signal is sent before the specified number of seconds,
|
|
56
|
-
* the job will resume as normal. If the job is not resumed within the
|
|
57
|
-
* number of seconds provided, the job will be scrubbed. No dependencies
|
|
58
|
-
* are set for a job in a pending state; however, dependencies will be
|
|
59
|
-
* added after the job is resumed if necessary.
|
|
60
|
-
*/
|
|
61
|
-
pending?: number;
|
|
62
|
-
|
|
63
|
-
//flush?: boolean;
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
export type ConnectOptions = {
|
|
67
|
-
/**
|
|
68
|
-
* the task queue for the connected function for greater specificity
|
|
69
|
-
*/
|
|
70
|
-
taskQueue?: string;
|
|
71
|
-
/**
|
|
72
|
-
* prefix for the workflowId (defaults to entity value if not provided)
|
|
73
|
-
*/
|
|
74
|
-
prefix?: string;
|
|
75
|
-
/**
|
|
76
|
-
* optional namespace for the the worker
|
|
77
|
-
* @default 'memflow'
|
|
78
|
-
*/
|
|
79
|
-
namespace?: string;
|
|
80
|
-
/**
|
|
81
|
-
* extended worker options
|
|
82
|
-
*/
|
|
83
|
-
options?: WorkerOptions;
|
|
84
|
-
/**
|
|
85
|
-
* optional search configuration
|
|
86
|
-
*/
|
|
87
|
-
search?: WorkflowSearchOptions;
|
|
88
|
-
};
|
|
89
|
-
|
|
90
|
-
/**
|
|
91
|
-
* Connect a function to the operational data layer.
|
|
92
|
-
* @template T - the return type of the connected function
|
|
93
|
-
*/
|
|
94
|
-
export type ConnectionInput<T> = {
|
|
95
|
-
/**
|
|
96
|
-
* The connected function's entity identifier
|
|
97
|
-
*
|
|
98
|
-
* @example
|
|
99
|
-
* user
|
|
100
|
-
*/
|
|
101
|
-
entity: string;
|
|
102
|
-
/**
|
|
103
|
-
* The target function reference
|
|
104
|
-
*
|
|
105
|
-
* @example
|
|
106
|
-
* function() { return "hello world" }
|
|
107
|
-
*/
|
|
108
|
-
target: (...args: any[]) => T;
|
|
109
|
-
/**
|
|
110
|
-
* Extended connection options (e.g., ttl, taskQueue)
|
|
111
|
-
* @example
|
|
112
|
-
* { ttl: 'infinity' }
|
|
113
|
-
*/
|
|
114
|
-
options?: ConnectOptions;
|
|
115
|
-
};
|
|
116
|
-
|
|
117
|
-
/**
|
|
118
|
-
* Executes a remote function by its global entity identifier with specified arguments.
|
|
119
|
-
* If options.ttl is infinity, the function will be cached indefinitely and can only be
|
|
120
|
-
* removed by calling `flush`. During this time, the function will remain active and can
|
|
121
|
-
* its state can be augmented by calling `set`, `incr`, `del`, etc OR by calling a
|
|
122
|
-
* transactional 'hook' function.
|
|
123
|
-
*
|
|
124
|
-
* @template T The expected return type of the remote function.
|
|
125
|
-
*/
|
|
126
|
-
export type ExecInput = {
|
|
127
|
-
/**
|
|
128
|
-
* the connected function's entity identifier
|
|
129
|
-
* @example
|
|
130
|
-
* user
|
|
131
|
-
*/
|
|
132
|
-
entity: string;
|
|
133
|
-
/**
|
|
134
|
-
* the function's input arguments
|
|
135
|
-
* @example
|
|
136
|
-
* ['Jane', 'Doe']
|
|
137
|
-
*/
|
|
138
|
-
args: any[];
|
|
139
|
-
/**
|
|
140
|
-
* Extended options for the hook function, like specifying a taskQueue or ttl
|
|
141
|
-
* @example
|
|
142
|
-
* { ttl: '5 minutes' }
|
|
143
|
-
*/
|
|
144
|
-
options?: Partial<MeshDataWorkflowOptions>;
|
|
145
|
-
};
|
|
146
|
-
|
|
147
|
-
/**
|
|
148
|
-
* Hook function inputs. Hooks augment running jobs.
|
|
149
|
-
*/
|
|
150
|
-
export type HookInput = {
|
|
151
|
-
/**
|
|
152
|
-
* The target function's entity identifier
|
|
153
|
-
* @example 'user'
|
|
154
|
-
*/
|
|
155
|
-
entity: string;
|
|
156
|
-
/**
|
|
157
|
-
* The target execution id (workflowId/jobId)
|
|
158
|
-
* @example 'jsmith123'
|
|
159
|
-
*/
|
|
160
|
-
id: string;
|
|
161
|
-
/**
|
|
162
|
-
* The hook function's entity identifier
|
|
163
|
-
* @example 'user.notify'
|
|
164
|
-
*/
|
|
165
|
-
hookEntity: string;
|
|
166
|
-
/**
|
|
167
|
-
* The hook function's input arguments
|
|
168
|
-
* @example 'notify'
|
|
169
|
-
*/
|
|
170
|
-
hookArgs: any[];
|
|
171
|
-
/**
|
|
172
|
-
* Extended options for the hook function, like specifying a taskQueue
|
|
173
|
-
* @example { taskQueue: 'priority' }
|
|
174
|
-
*/
|
|
175
|
-
options?: Partial<HookOptions>;
|
|
176
|
-
};
|
|
177
|
-
|
|
178
|
-
export type MeshDataWorkflowOptions = {
|
|
179
|
-
/**
|
|
180
|
-
* The app deployment namespace
|
|
181
|
-
*/
|
|
182
|
-
namespace?: string;
|
|
183
|
-
|
|
184
|
-
/**
|
|
185
|
-
* Target connected functions more specifically by taskQueue
|
|
186
|
-
*/
|
|
187
|
-
taskQueue?: string;
|
|
188
|
-
|
|
189
|
-
/**
|
|
190
|
-
* The connected function's entity identifier
|
|
191
|
-
*/
|
|
192
|
-
prefix?: string;
|
|
193
|
-
|
|
194
|
-
/**
|
|
195
|
-
* The function execution id (shorthand for workflowId)
|
|
196
|
-
*/
|
|
197
|
-
id?: string;
|
|
198
|
-
|
|
199
|
-
/**
|
|
200
|
-
* The function execution id
|
|
201
|
-
*/
|
|
202
|
-
workflowId?: string;
|
|
203
|
-
|
|
204
|
-
/**
|
|
205
|
-
* The function name (`entity` is a shorthand for this)
|
|
206
|
-
*/
|
|
207
|
-
workflowName?: string;
|
|
208
|
-
|
|
209
|
-
/**
|
|
210
|
-
* The open telemetry trace context for the workflow, used for logging and tracing. If a sink is enabled, this will be sent to the sink.
|
|
211
|
-
*/
|
|
212
|
-
workflowTrace?: string;
|
|
213
|
-
|
|
214
|
-
/**
|
|
215
|
-
* The open telemetry span context for the workflow, used for logging and tracing. If a sink is enabled, this will be sent to the sink.
|
|
216
|
-
*/
|
|
217
|
-
workflowSpan?: string;
|
|
218
|
-
|
|
219
|
-
/**
|
|
220
|
-
* Search fields to seed function state when it first initializes
|
|
221
|
-
*/
|
|
222
|
-
search?: WorkflowSearchOptions;
|
|
223
|
-
|
|
224
|
-
/**
|
|
225
|
-
* Extended execution options
|
|
226
|
-
*/
|
|
227
|
-
config?: WorkflowConfig;
|
|
228
|
-
|
|
229
|
-
/**
|
|
230
|
-
* Set to 'infinity', '1 minute', '1 hour', etc
|
|
231
|
-
*/
|
|
232
|
-
ttl?: string;
|
|
233
|
-
|
|
234
|
-
/**
|
|
235
|
-
* If set to false explicitly it will not await the result
|
|
236
|
-
* @default true
|
|
237
|
-
*/
|
|
238
|
-
await?: boolean;
|
|
239
|
-
|
|
240
|
-
/**
|
|
241
|
-
* Custom marker data field used for adding a searchable marker to the job.
|
|
242
|
-
* markers always begin with a dash (-). Any field that does not
|
|
243
|
-
* begin with a dash will be removed and will not be inserted with
|
|
244
|
-
* the initial data set.
|
|
245
|
-
*/
|
|
246
|
-
marker?: StringStringType;
|
|
247
|
-
|
|
248
|
-
/**
|
|
249
|
-
* If provided, the job will initialize in a pending state, reserving
|
|
250
|
-
* only the job ID (HSETNX) and persisting search and marker (if provided).
|
|
251
|
-
* If a `resume` signal is sent before the specified number of seconds,
|
|
252
|
-
* the job will resume as normal. If the job is not resumed within the
|
|
253
|
-
* number of seconds provided, the job will be scrubbed. No dependencies
|
|
254
|
-
* are set for a job in a pending state; however, dependencies will be
|
|
255
|
-
* added after the job is resumed (if necessary).
|
|
256
|
-
*/
|
|
257
|
-
pending?: number;
|
|
258
|
-
|
|
259
|
-
/**
|
|
260
|
-
* sets the number of seconds a workflow may exist after completion. As the process engine is an in-memory cache, the default policy is to expire and scrub the job hash as soon as it completes.
|
|
261
|
-
* @default 1
|
|
262
|
-
*/
|
|
263
|
-
expire?: number;
|
|
264
|
-
|
|
265
|
-
/**
|
|
266
|
-
* set to false to optimize workflows that do not require a `signal in`.
|
|
267
|
-
* explicitly set to true to force the workflow to remain open and persistent.
|
|
268
|
-
* @default true
|
|
269
|
-
*/
|
|
270
|
-
signalIn?: boolean;
|
|
271
|
-
|
|
272
|
-
/**
|
|
273
|
-
* set to `true` by the system when a workflow is started with a ttl, ensuring
|
|
274
|
-
* that the workflow will remain active until the ttl expires and the workflow
|
|
275
|
-
* is scrubbed. This is a system flag and should not be set by the user.
|
|
276
|
-
*/
|
|
277
|
-
persistent?: boolean;
|
|
278
|
-
};
|