@burdenoff/be-sdk 2026.1021.2 → 2026.1021.4
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/EventQueueFactory-JG7S6HOL.js +8 -0
- package/dist/{EventQueueFactory-ZHBJD3OD.js.map → EventQueueFactory-JG7S6HOL.js.map} +1 -1
- package/dist/{chunk-P67HNJGL.js → chunk-DNULGVN3.js} +14 -7
- package/dist/chunk-DNULGVN3.js.map +1 -0
- package/dist/{chunk-E5HKS7KD.js → chunk-DTE2MHKE.js} +4 -4
- package/dist/{chunk-E5HKS7KD.js.map → chunk-DTE2MHKE.js.map} +1 -1
- package/dist/{chunk-RTBCGUHC.js → chunk-GSIJ2DBJ.js} +6 -5
- package/dist/chunk-GSIJ2DBJ.js.map +1 -0
- package/dist/{chunk-XTIOBNT7.js → chunk-HEAQSZBX.js} +7 -6
- package/dist/chunk-HEAQSZBX.js.map +1 -0
- package/dist/{chunk-6VK53YR3.js → chunk-IZZ45AGA.js} +253 -15
- package/dist/chunk-IZZ45AGA.js.map +1 -0
- package/dist/chunk-JV7XNJP4.js +1334 -0
- package/dist/chunk-JV7XNJP4.js.map +1 -0
- package/dist/chunk-KS2HQCJR.js +56 -0
- package/dist/chunk-KS2HQCJR.js.map +1 -0
- package/dist/{chunk-GJR6AQAL.js → chunk-V3N6HDFE.js} +30 -9
- package/dist/chunk-V3N6HDFE.js.map +1 -0
- package/dist/{chunk-HDUS6UBO.js → chunk-YCSIHUYP.js} +3 -3
- package/dist/{chunk-HDUS6UBO.js.map → chunk-YCSIHUYP.js.map} +1 -1
- package/dist/env-4UWSUS64.js +4 -0
- package/dist/env-4UWSUS64.js.map +1 -0
- package/dist/event-queue/index.d.ts +1 -1
- package/dist/event-queue/index.js +4 -3
- package/dist/graph/index.d.ts +2 -2
- package/dist/graph/index.js +6 -5
- package/dist/index-BVXRewdr.d.ts +1066 -0
- package/dist/{index-Dl8EAdYu.d.ts → index-CL7koBpQ.d.ts} +1 -1
- package/dist/{index-D3DzCz1d.d.ts → index-DG5lCWNk.d.ts} +21 -152
- package/dist/index.d.ts +6 -6
- package/dist/index.js +19 -18
- package/dist/index.js.map +1 -1
- package/dist/init/index.js +1 -1
- package/dist/prisma/index.d.ts +2 -2
- package/dist/prisma/index.js +5 -4
- package/dist/prisma-extension-gYhYriA0.d.ts +174 -0
- package/dist/tracker/index.js +2 -2
- package/package.json +1 -1
- package/dist/EventQueueFactory-ZHBJD3OD.js +0 -7
- package/dist/chunk-6VK53YR3.js.map +0 -1
- package/dist/chunk-GJR6AQAL.js.map +0 -1
- package/dist/chunk-P67HNJGL.js.map +0 -1
- package/dist/chunk-RTBCGUHC.js.map +0 -1
- package/dist/chunk-VD4B362H.js +0 -464
- package/dist/chunk-VD4B362H.js.map +0 -1
- package/dist/chunk-XTIOBNT7.js.map +0 -1
- package/dist/index-CpXKka7c.d.ts +0 -690
- package/dist/prisma-extension-krXnYnrN.d.ts +0 -30
|
@@ -0,0 +1,1066 @@
|
|
|
1
|
+
import { S as ServiceLayer } from './layer-GNAVXBMf.js';
|
|
2
|
+
import { S as ShutdownDisposable } from './shutdown-registry-CW9LryO8.js';
|
|
3
|
+
import { E as EntityEventRbacMetadata, a as EntityEventType$1, b as GraphEventEmitter$1, G as GraphEventEmitterImpl, c as createGraphEventEmitter$1, g as getGraphEventEmitter, r as resetGraphEventEmitter } from './graph-emitter-r5TylDBm.js';
|
|
4
|
+
import { B as BurdenoffGraphQLClient } from './graphql-AaLJfGzz.js';
|
|
5
|
+
import { a as SDKContext } from './index-CfRZtB99.js';
|
|
6
|
+
|
|
7
|
+
interface EventMessage$1<T = unknown> {
|
|
8
|
+
id: string;
|
|
9
|
+
subject: string;
|
|
10
|
+
data: T;
|
|
11
|
+
metadata: EventMetadata;
|
|
12
|
+
timestamp: string;
|
|
13
|
+
sequence?: number;
|
|
14
|
+
}
|
|
15
|
+
interface EventMetadata {
|
|
16
|
+
correlationId: string;
|
|
17
|
+
tenantId?: string;
|
|
18
|
+
workspaceId?: string;
|
|
19
|
+
userId?: string;
|
|
20
|
+
source?: string;
|
|
21
|
+
version?: string;
|
|
22
|
+
[key: string]: unknown;
|
|
23
|
+
}
|
|
24
|
+
interface AcknowledgeableEvent<T = unknown> extends EventMessage$1<T> {
|
|
25
|
+
ack(): Promise<void>;
|
|
26
|
+
nak(delay?: number): Promise<void>;
|
|
27
|
+
term(): Promise<void>;
|
|
28
|
+
isRedelivered(): boolean;
|
|
29
|
+
getDeliveryAttempt(): number;
|
|
30
|
+
}
|
|
31
|
+
type EventHandler<T = unknown> = (event: AcknowledgeableEvent<T>) => Promise<void>;
|
|
32
|
+
interface StreamConfig {
|
|
33
|
+
name: string;
|
|
34
|
+
subjects: string[];
|
|
35
|
+
description?: string;
|
|
36
|
+
retention?: 'limits' | 'interest' | 'workqueue';
|
|
37
|
+
maxAge?: number;
|
|
38
|
+
maxMsgs?: number;
|
|
39
|
+
maxBytes?: number;
|
|
40
|
+
storage?: 'file' | 'memory';
|
|
41
|
+
replicas?: number;
|
|
42
|
+
maxConsumers?: number;
|
|
43
|
+
duplicateWindow?: number;
|
|
44
|
+
}
|
|
45
|
+
interface ConsumerOptions {
|
|
46
|
+
name: string;
|
|
47
|
+
stream: string;
|
|
48
|
+
filterSubject?: string;
|
|
49
|
+
deliverPolicy?: 'all' | 'last' | 'new' | 'byStartSequence' | 'byStartTime';
|
|
50
|
+
ackPolicy?: 'explicit' | 'all' | 'none';
|
|
51
|
+
ackWait?: number;
|
|
52
|
+
maxDeliver?: number;
|
|
53
|
+
maxAckPending?: number;
|
|
54
|
+
}
|
|
55
|
+
interface SubscriptionOptions {
|
|
56
|
+
stream?: string;
|
|
57
|
+
consumer?: string;
|
|
58
|
+
maxConcurrent?: number;
|
|
59
|
+
maxRetries?: number;
|
|
60
|
+
retryBackoff?: 'exponential' | 'linear' | 'fixed';
|
|
61
|
+
retryDelay?: number;
|
|
62
|
+
timeout?: number;
|
|
63
|
+
useLocking?: boolean;
|
|
64
|
+
lockTTL?: number;
|
|
65
|
+
ackPolicy?: 'explicit' | 'all' | 'none';
|
|
66
|
+
deliverPolicy?: 'all' | 'last' | 'new' | 'byStartSequence' | 'byStartTime';
|
|
67
|
+
maxDeliver?: number;
|
|
68
|
+
ackWait?: number;
|
|
69
|
+
maxAckPending?: number;
|
|
70
|
+
streamSubjects?: string[];
|
|
71
|
+
retention?: 'limits' | 'interest' | 'workqueue';
|
|
72
|
+
storage?: 'file' | 'memory';
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
declare enum QueueType {
|
|
76
|
+
REDIS_STREAMS = "redis-streams",
|
|
77
|
+
RABBITMQ = "rabbitmq",
|
|
78
|
+
KAFKA = "kafka",
|
|
79
|
+
SQS = "sqs"
|
|
80
|
+
}
|
|
81
|
+
interface BaseQueueConfig {
|
|
82
|
+
type: QueueType | string;
|
|
83
|
+
url: string;
|
|
84
|
+
user?: string;
|
|
85
|
+
password?: string;
|
|
86
|
+
token?: string;
|
|
87
|
+
creds?: string;
|
|
88
|
+
credsFile?: string;
|
|
89
|
+
maxReconnectAttempts?: number;
|
|
90
|
+
reconnectTimeWait?: number;
|
|
91
|
+
connectionTimeout?: number;
|
|
92
|
+
name?: string;
|
|
93
|
+
}
|
|
94
|
+
interface PublisherConfig extends BaseQueueConfig {
|
|
95
|
+
defaultTTL?: number;
|
|
96
|
+
enableDeduplication?: boolean;
|
|
97
|
+
defaultPriority?: 'low' | 'normal' | 'high';
|
|
98
|
+
}
|
|
99
|
+
interface ConsumerConfig extends Partial<BaseQueueConfig> {
|
|
100
|
+
stream: string;
|
|
101
|
+
consumer: string;
|
|
102
|
+
filterSubject?: string;
|
|
103
|
+
maxConcurrent?: number;
|
|
104
|
+
maxDeliver?: number;
|
|
105
|
+
ackWait?: number;
|
|
106
|
+
ackPolicy?: 'explicit' | 'all' | 'none';
|
|
107
|
+
deliverPolicy?: 'all' | 'last' | 'new' | 'byStartSequence' | 'byStartTime';
|
|
108
|
+
maxAckPending?: number;
|
|
109
|
+
}
|
|
110
|
+
interface EventQueueHealthCheckResult {
|
|
111
|
+
status: 'healthy' | 'unhealthy' | 'degraded';
|
|
112
|
+
timestamp: string;
|
|
113
|
+
connected?: boolean;
|
|
114
|
+
latencyMs?: number;
|
|
115
|
+
details?: Record<string, unknown>;
|
|
116
|
+
error?: string;
|
|
117
|
+
}
|
|
118
|
+
interface QueueStatistics {
|
|
119
|
+
messagesPublished?: number;
|
|
120
|
+
messagesConsumed?: number;
|
|
121
|
+
messagesPending?: number;
|
|
122
|
+
queueSize?: number;
|
|
123
|
+
messagesFailed?: number;
|
|
124
|
+
activeConsumers?: number;
|
|
125
|
+
activePublishers?: number;
|
|
126
|
+
avgProcessingTimeMs?: number;
|
|
127
|
+
lastActivity?: string | null;
|
|
128
|
+
details?: Record<string, unknown>;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
interface IEventQueue {
|
|
132
|
+
connect(): Promise<void>;
|
|
133
|
+
disconnect(): Promise<void>;
|
|
134
|
+
isConnected(): boolean;
|
|
135
|
+
healthCheck(): Promise<EventQueueHealthCheckResult>;
|
|
136
|
+
getStatistics(): Promise<QueueStatistics>;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
interface PublishOptions {
|
|
140
|
+
messageId?: string;
|
|
141
|
+
priority?: 'low' | 'normal' | 'high';
|
|
142
|
+
ttl?: number;
|
|
143
|
+
delay?: number;
|
|
144
|
+
expectedStream?: string;
|
|
145
|
+
stream?: string;
|
|
146
|
+
streamSubjects?: string[];
|
|
147
|
+
retention?: 'limits' | 'interest' | 'workqueue';
|
|
148
|
+
storage?: 'file' | 'memory';
|
|
149
|
+
}
|
|
150
|
+
interface IEventPublisher extends IEventQueue {
|
|
151
|
+
ensureStream(config: StreamConfig): Promise<void>;
|
|
152
|
+
publish<T = unknown>(options: {
|
|
153
|
+
subject: string;
|
|
154
|
+
data: T;
|
|
155
|
+
metadata?: Partial<EventMetadata>;
|
|
156
|
+
options?: PublishOptions;
|
|
157
|
+
}): Promise<number | string>;
|
|
158
|
+
publishBatch<T = unknown>(events: Array<{
|
|
159
|
+
subject: string;
|
|
160
|
+
data: T;
|
|
161
|
+
metadata?: Partial<EventMetadata>;
|
|
162
|
+
options?: PublishOptions;
|
|
163
|
+
}>): Promise<Array<number | string>>;
|
|
164
|
+
publishWithAck<T = unknown, R = unknown>(options: {
|
|
165
|
+
subject: string;
|
|
166
|
+
data: T;
|
|
167
|
+
metadata?: Partial<EventMetadata>;
|
|
168
|
+
timeout?: number;
|
|
169
|
+
}): Promise<R>;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
interface ISubscription {
|
|
173
|
+
id: string;
|
|
174
|
+
subject: string;
|
|
175
|
+
unsubscribe(): Promise<void>;
|
|
176
|
+
isActive(): boolean;
|
|
177
|
+
getStats(): {
|
|
178
|
+
messagesReceived: number;
|
|
179
|
+
messagesProcessed: number;
|
|
180
|
+
messagesFailed: number;
|
|
181
|
+
lastActivity: string;
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
interface IEventConsumer extends IEventQueue {
|
|
185
|
+
ensureStream(config: StreamConfig): Promise<void>;
|
|
186
|
+
ensureConsumer(config: ConsumerConfig): Promise<void>;
|
|
187
|
+
subscribe<T = unknown>(options: {
|
|
188
|
+
subject: string;
|
|
189
|
+
handler: EventHandler<T>;
|
|
190
|
+
options?: SubscriptionOptions;
|
|
191
|
+
}): Promise<ISubscription>;
|
|
192
|
+
subscribeMultiple<T = unknown>(subjects: string[], handler: EventHandler<T>, options?: SubscriptionOptions): Promise<ISubscription[]>;
|
|
193
|
+
pull<T = unknown>(options: {
|
|
194
|
+
subject: string;
|
|
195
|
+
batch?: number;
|
|
196
|
+
timeout?: number;
|
|
197
|
+
}): Promise<AcknowledgeableEvent<T>[]>;
|
|
198
|
+
unsubscribeAll(): Promise<void>;
|
|
199
|
+
getSubscriptions(): ISubscription[];
|
|
200
|
+
processDLQ<T = unknown>(handler: EventHandler<T>): Promise<void>;
|
|
201
|
+
listSubjects?(stream?: string): Promise<string[]>;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
declare class EventQueueFactory {
|
|
205
|
+
static createPublisher(config: PublisherConfig): IEventPublisher;
|
|
206
|
+
static createConsumer(config: ConsumerConfig): IEventConsumer;
|
|
207
|
+
static createPublisherFromEnv(): IEventPublisher;
|
|
208
|
+
static createConsumerFromEnv(stream: string, consumer: string): IEventConsumer;
|
|
209
|
+
static createPublisherForLayer(_layer: ServiceLayer, serviceName: string): IEventPublisher;
|
|
210
|
+
static createConsumerForLayer(_layer: ServiceLayer, serviceName: string, stream: string, consumer: string): IEventConsumer;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
type IoRedis = {
|
|
214
|
+
status: string;
|
|
215
|
+
connect: () => Promise<void>;
|
|
216
|
+
disconnect: () => void;
|
|
217
|
+
quit: () => Promise<unknown>;
|
|
218
|
+
ping: () => Promise<string>;
|
|
219
|
+
on: (event: string, handler: (...args: unknown[]) => void) => void;
|
|
220
|
+
duplicate: () => IoRedis;
|
|
221
|
+
xadd: (...args: unknown[]) => Promise<string>;
|
|
222
|
+
xack: (...args: unknown[]) => Promise<number>;
|
|
223
|
+
xreadgroup: (...args: unknown[]) => Promise<unknown>;
|
|
224
|
+
xgroup: (...args: unknown[]) => Promise<unknown>;
|
|
225
|
+
xautoclaim: (...args: unknown[]) => Promise<unknown>;
|
|
226
|
+
xpending: (...args: unknown[]) => Promise<unknown>;
|
|
227
|
+
xlen: (key: string) => Promise<number>;
|
|
228
|
+
xinfo: (...args: unknown[]) => Promise<unknown>;
|
|
229
|
+
xrevrange: (...args: unknown[]) => Promise<unknown>;
|
|
230
|
+
xrange: (...args: unknown[]) => Promise<unknown>;
|
|
231
|
+
xdel: (key: string, ...ids: string[]) => Promise<number>;
|
|
232
|
+
set: (...args: unknown[]) => Promise<string | null>;
|
|
233
|
+
expire: (key: string, seconds: number) => Promise<number>;
|
|
234
|
+
del: (...keys: string[]) => Promise<number>;
|
|
235
|
+
sadd: (key: string, ...members: string[]) => Promise<number>;
|
|
236
|
+
smembers: (key: string) => Promise<string[]>;
|
|
237
|
+
zadd: (...args: unknown[]) => Promise<number>;
|
|
238
|
+
zrangebyscore: (...args: unknown[]) => Promise<string[]>;
|
|
239
|
+
zrem: (key: string, ...members: string[]) => Promise<number>;
|
|
240
|
+
pipeline: () => {
|
|
241
|
+
xadd: (...args: unknown[]) => unknown;
|
|
242
|
+
exec: () => Promise<Array<[Error | null, unknown]>>;
|
|
243
|
+
};
|
|
244
|
+
};
|
|
245
|
+
declare class RedisStreamsConnection {
|
|
246
|
+
private readonly config;
|
|
247
|
+
private client;
|
|
248
|
+
private connecting;
|
|
249
|
+
private readonly tls;
|
|
250
|
+
private readonly host;
|
|
251
|
+
private readonly normalisedUrl;
|
|
252
|
+
private readonly dbIndex;
|
|
253
|
+
constructor(config: BaseQueueConfig);
|
|
254
|
+
isConnected(): boolean;
|
|
255
|
+
connect(): Promise<void>;
|
|
256
|
+
private doConnect;
|
|
257
|
+
disconnect(): Promise<void>;
|
|
258
|
+
getClient(): IoRedis;
|
|
259
|
+
makeBlockingClient(): Promise<IoRedis>;
|
|
260
|
+
ping(): Promise<string>;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
interface RedisStreamsPublisherConfig extends PublisherConfig {
|
|
264
|
+
maxLen?: number;
|
|
265
|
+
dedupTtlSeconds?: number;
|
|
266
|
+
keyPrefix?: string;
|
|
267
|
+
}
|
|
268
|
+
declare class RedisStreamsEventPublisher implements IEventPublisher, ShutdownDisposable {
|
|
269
|
+
private config;
|
|
270
|
+
private connection;
|
|
271
|
+
private publishCount;
|
|
272
|
+
private lastPublishTime;
|
|
273
|
+
private readonly maxLen;
|
|
274
|
+
private readonly dedupTtl;
|
|
275
|
+
private readonly keyPrefix;
|
|
276
|
+
readonly shutdownName: string;
|
|
277
|
+
constructor(config: RedisStreamsPublisherConfig);
|
|
278
|
+
dispose(): Promise<void>;
|
|
279
|
+
connect(): Promise<void>;
|
|
280
|
+
disconnect(): Promise<void>;
|
|
281
|
+
isConnected(): boolean;
|
|
282
|
+
healthCheck(): Promise<EventQueueHealthCheckResult>;
|
|
283
|
+
getStatistics(): Promise<QueueStatistics>;
|
|
284
|
+
ensureStream(_config: StreamConfig): Promise<void>;
|
|
285
|
+
publish<T = unknown>(options: {
|
|
286
|
+
subject: string;
|
|
287
|
+
data: T;
|
|
288
|
+
metadata?: Partial<EventMetadata>;
|
|
289
|
+
options?: PublishOptions;
|
|
290
|
+
}): Promise<number | string>;
|
|
291
|
+
private publishInternal;
|
|
292
|
+
publishBatch<T = unknown>(events: Array<{
|
|
293
|
+
subject: string;
|
|
294
|
+
data: T;
|
|
295
|
+
metadata?: Partial<EventMetadata>;
|
|
296
|
+
options?: PublishOptions;
|
|
297
|
+
}>): Promise<Array<number | string>>;
|
|
298
|
+
publishWithAck<T = unknown, R = unknown>(opts: {
|
|
299
|
+
subject: string;
|
|
300
|
+
data: T;
|
|
301
|
+
metadata?: Partial<EventMetadata>;
|
|
302
|
+
timeout?: number;
|
|
303
|
+
}): Promise<R>;
|
|
304
|
+
sendReply(correlationId: string, data: unknown): Promise<void>;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
interface RedisStreamsConsumerConfig extends ConsumerConfig {
|
|
308
|
+
keyPrefix?: string;
|
|
309
|
+
}
|
|
310
|
+
declare class RedisStreamsEventConsumer implements IEventConsumer, ShutdownDisposable {
|
|
311
|
+
readonly shutdownName: string;
|
|
312
|
+
private readonly connection;
|
|
313
|
+
private subscriptions;
|
|
314
|
+
private readonly subscriptionLoops;
|
|
315
|
+
private readonly keyPrefix;
|
|
316
|
+
private readonly consumerName;
|
|
317
|
+
private readonly group;
|
|
318
|
+
private readonly maxDeliver;
|
|
319
|
+
private readonly ackWaitMs;
|
|
320
|
+
private readonly maxConcurrent;
|
|
321
|
+
private consumedCount;
|
|
322
|
+
private failedCount;
|
|
323
|
+
private lastActivity;
|
|
324
|
+
private stopped;
|
|
325
|
+
private sweepTimer;
|
|
326
|
+
private delayqTimer;
|
|
327
|
+
private readonly settlements;
|
|
328
|
+
private retainedSerializedFieldsBytes;
|
|
329
|
+
private knownStreams;
|
|
330
|
+
constructor(config: RedisStreamsConsumerConfig);
|
|
331
|
+
dispose(): Promise<void>;
|
|
332
|
+
connect(): Promise<void>;
|
|
333
|
+
disconnect(): Promise<void>;
|
|
334
|
+
isConnected(): boolean;
|
|
335
|
+
healthCheck(): Promise<EventQueueHealthCheckResult>;
|
|
336
|
+
getStatistics(): Promise<QueueStatistics>;
|
|
337
|
+
ensureStream(_config: StreamConfig): Promise<void>;
|
|
338
|
+
ensureConsumer(_config: ConsumerConfig): Promise<void>;
|
|
339
|
+
subscribe<T = unknown>(opts: {
|
|
340
|
+
subject: string;
|
|
341
|
+
handler: EventHandler<T>;
|
|
342
|
+
options?: SubscriptionOptions;
|
|
343
|
+
}): Promise<ISubscription>;
|
|
344
|
+
subscribeMultiple<T = unknown>(subjects: string[], handler: EventHandler<T>, options?: SubscriptionOptions): Promise<ISubscription[]>;
|
|
345
|
+
pull<T = unknown>(opts: {
|
|
346
|
+
subject: string;
|
|
347
|
+
batch?: number;
|
|
348
|
+
timeout?: number;
|
|
349
|
+
}): Promise<AcknowledgeableEvent<T>[]>;
|
|
350
|
+
unsubscribeAll(): Promise<void>;
|
|
351
|
+
getSubscriptions(): ISubscription[];
|
|
352
|
+
processDLQ<T = unknown>(handler: EventHandler<T>): Promise<void>;
|
|
353
|
+
listSubjects(_stream?: string): Promise<string[]>;
|
|
354
|
+
private resolveStartId;
|
|
355
|
+
private ensureGroup;
|
|
356
|
+
private spawnLoop;
|
|
357
|
+
private parseEntry;
|
|
358
|
+
private toAcknowledgeable;
|
|
359
|
+
private settlement;
|
|
360
|
+
private sweepPending;
|
|
361
|
+
private drainDelayQueues;
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
interface KeyspaceOptions {
|
|
365
|
+
prefix?: string;
|
|
366
|
+
}
|
|
367
|
+
declare function streamKey(subject: string, opts?: KeyspaceOptions): string;
|
|
368
|
+
declare function dlqKey(stream: string): string;
|
|
369
|
+
|
|
370
|
+
type EntityEventType = 'entity.created' | 'entity.updated' | 'entity.deleted';
|
|
371
|
+
interface GraphEventEmitter {
|
|
372
|
+
publishEntityEvent(eventType: EntityEventType, entity: {
|
|
373
|
+
id: string;
|
|
374
|
+
type: string;
|
|
375
|
+
data: Record<string, unknown>;
|
|
376
|
+
}, context: {
|
|
377
|
+
productName: string;
|
|
378
|
+
organizationId: string;
|
|
379
|
+
userId?: string;
|
|
380
|
+
workspaceId?: string;
|
|
381
|
+
}): Promise<void>;
|
|
382
|
+
}
|
|
383
|
+
declare class MemoryEventBus {
|
|
384
|
+
private handlers;
|
|
385
|
+
emit<T>(event: string, data: T): void;
|
|
386
|
+
on<T>(event: string, handler: EventHandler<T>): void;
|
|
387
|
+
off<T>(event: string, handler: EventHandler<T>): void;
|
|
388
|
+
private matchesPattern;
|
|
389
|
+
clear(): void;
|
|
390
|
+
}
|
|
391
|
+
declare class MemoryEventQueue implements GraphEventEmitter {
|
|
392
|
+
private queue;
|
|
393
|
+
private processing;
|
|
394
|
+
private handlers;
|
|
395
|
+
private maxRetries;
|
|
396
|
+
private retryDelay;
|
|
397
|
+
constructor(options?: {
|
|
398
|
+
maxRetries?: number;
|
|
399
|
+
retryDelay?: number;
|
|
400
|
+
});
|
|
401
|
+
publishEntityEvent(eventType: EntityEventType, entity: {
|
|
402
|
+
id: string;
|
|
403
|
+
type: string;
|
|
404
|
+
data: Record<string, unknown>;
|
|
405
|
+
}, context: {
|
|
406
|
+
productName: string;
|
|
407
|
+
organizationId: string;
|
|
408
|
+
userId?: string;
|
|
409
|
+
workspaceId?: string;
|
|
410
|
+
}): Promise<void>;
|
|
411
|
+
enqueue<T>(subject: string, data: T, metadata?: Record<string, unknown>): string;
|
|
412
|
+
registerHandler<T>(subject: string, handler: EventHandler<T>): void;
|
|
413
|
+
private processQueue;
|
|
414
|
+
get length(): number;
|
|
415
|
+
clear(): void;
|
|
416
|
+
publish<T>(subject: string, data: T, metadata?: Record<string, unknown>): Promise<void>;
|
|
417
|
+
close(): Promise<void>;
|
|
418
|
+
}
|
|
419
|
+
declare class MemoryEventPublisher implements IEventPublisher {
|
|
420
|
+
private queue;
|
|
421
|
+
private _connected;
|
|
422
|
+
private publishCount;
|
|
423
|
+
constructor();
|
|
424
|
+
connect(): Promise<void>;
|
|
425
|
+
disconnect(): Promise<void>;
|
|
426
|
+
isConnected(): boolean;
|
|
427
|
+
ensureStream(): Promise<void>;
|
|
428
|
+
publish<T = unknown>(options: {
|
|
429
|
+
subject: string;
|
|
430
|
+
data: T;
|
|
431
|
+
metadata?: Record<string, unknown>;
|
|
432
|
+
options?: PublishOptions;
|
|
433
|
+
}): Promise<string>;
|
|
434
|
+
publishBatch<T = unknown>(events: Array<{
|
|
435
|
+
subject: string;
|
|
436
|
+
data: T;
|
|
437
|
+
metadata?: Record<string, unknown>;
|
|
438
|
+
options?: PublishOptions;
|
|
439
|
+
}>): Promise<string[]>;
|
|
440
|
+
publishWithAck<T = unknown, R = unknown>(options: {
|
|
441
|
+
subject: string;
|
|
442
|
+
data: T;
|
|
443
|
+
metadata?: Partial<EventMetadata>;
|
|
444
|
+
timeout?: number;
|
|
445
|
+
}): Promise<R>;
|
|
446
|
+
healthCheck(): Promise<EventQueueHealthCheckResult>;
|
|
447
|
+
getStatistics(): Promise<QueueStatistics>;
|
|
448
|
+
getQueue(): MemoryEventQueue;
|
|
449
|
+
}
|
|
450
|
+
declare class MemoryEventConsumer implements IEventConsumer {
|
|
451
|
+
private streamName;
|
|
452
|
+
private consumerName;
|
|
453
|
+
private queue;
|
|
454
|
+
private bus;
|
|
455
|
+
private _connected;
|
|
456
|
+
private _subscriptions;
|
|
457
|
+
private consumeCount;
|
|
458
|
+
private subIdCounter;
|
|
459
|
+
constructor(streamName: string, consumerName: string);
|
|
460
|
+
connect(): Promise<void>;
|
|
461
|
+
disconnect(): Promise<void>;
|
|
462
|
+
isConnected(): boolean;
|
|
463
|
+
ensureStream(): Promise<void>;
|
|
464
|
+
ensureConsumer(): Promise<void>;
|
|
465
|
+
subscribe<T = unknown>(options: {
|
|
466
|
+
subject: string;
|
|
467
|
+
handler: EventHandler<T>;
|
|
468
|
+
queueGroup?: string;
|
|
469
|
+
}): Promise<ISubscription>;
|
|
470
|
+
subscribeMultiple<T = unknown>(subjects: string[], handler: EventHandler<T>): Promise<ISubscription[]>;
|
|
471
|
+
pull<T = unknown>(): Promise<AcknowledgeableEvent<T>[]>;
|
|
472
|
+
unsubscribeAll(): Promise<void>;
|
|
473
|
+
getSubscriptions(): ISubscription[];
|
|
474
|
+
processDLQ<T = unknown>(_handler: EventHandler<T>): Promise<void>;
|
|
475
|
+
healthCheck(): Promise<EventQueueHealthCheckResult>;
|
|
476
|
+
getStatistics(): Promise<QueueStatistics>;
|
|
477
|
+
getBus(): MemoryEventBus;
|
|
478
|
+
getQueue(): MemoryEventQueue;
|
|
479
|
+
}
|
|
480
|
+
declare function createMemoryPublisher(): IEventPublisher;
|
|
481
|
+
declare function createMemoryConsumer(stream: string, consumer: string): IEventConsumer;
|
|
482
|
+
declare function createGraphEventEmitter(): GraphEventEmitter;
|
|
483
|
+
|
|
484
|
+
interface ModuleEventPayload {
|
|
485
|
+
id: string;
|
|
486
|
+
type: string;
|
|
487
|
+
action: 'created' | 'updated' | 'deleted' | 'assigned' | 'removed' | string;
|
|
488
|
+
data: Record<string, unknown>;
|
|
489
|
+
metadata: {
|
|
490
|
+
tenantId?: string;
|
|
491
|
+
workspaceId?: string;
|
|
492
|
+
userId: string;
|
|
493
|
+
timestamp: string;
|
|
494
|
+
productSource: string;
|
|
495
|
+
correlationId?: string;
|
|
496
|
+
};
|
|
497
|
+
}
|
|
498
|
+
interface BulkEventPayload {
|
|
499
|
+
items: Array<{
|
|
500
|
+
id: string;
|
|
501
|
+
data: Record<string, unknown>;
|
|
502
|
+
}>;
|
|
503
|
+
metadata: {
|
|
504
|
+
tenantId?: string;
|
|
505
|
+
workspaceId?: string;
|
|
506
|
+
userId: string;
|
|
507
|
+
timestamp: string;
|
|
508
|
+
productSource: string;
|
|
509
|
+
};
|
|
510
|
+
}
|
|
511
|
+
interface ModuleEventsConfig {
|
|
512
|
+
moduleName: string;
|
|
513
|
+
subjectPrefix?: string;
|
|
514
|
+
loggerLabel?: string;
|
|
515
|
+
}
|
|
516
|
+
declare class ModuleEventsService {
|
|
517
|
+
private readonly productSource;
|
|
518
|
+
private readonly subjectPrefix;
|
|
519
|
+
private readonly loggerLabel;
|
|
520
|
+
private publisher;
|
|
521
|
+
private connected;
|
|
522
|
+
private connecting;
|
|
523
|
+
constructor(config: ModuleEventsConfig);
|
|
524
|
+
private ensureConnected;
|
|
525
|
+
private publish;
|
|
526
|
+
private buildPayload;
|
|
527
|
+
private buildSubject;
|
|
528
|
+
publishCreated(entityType: string, id: string, data: Record<string, unknown>, userId: string, tenantId?: string, workspaceId?: string): Promise<void>;
|
|
529
|
+
publishUpdated(entityType: string, id: string, data: Record<string, unknown>, userId: string, tenantId?: string, workspaceId?: string): Promise<void>;
|
|
530
|
+
publishDeleted(entityType: string, id: string, userId: string, tenantId?: string, workspaceId?: string): Promise<void>;
|
|
531
|
+
publishCustom(entityType: string, action: string, id: string, data: Record<string, unknown>, userId: string, tenantId?: string, workspaceId?: string): Promise<void>;
|
|
532
|
+
publishBulkCreated(_entityType: string, items: Array<{
|
|
533
|
+
id: string;
|
|
534
|
+
data: Record<string, unknown>;
|
|
535
|
+
}>, userId: string, tenantId?: string, workspaceId?: string): Promise<void>;
|
|
536
|
+
close(): Promise<void>;
|
|
537
|
+
healthCheck(): Promise<{
|
|
538
|
+
healthy: boolean;
|
|
539
|
+
message: string;
|
|
540
|
+
}>;
|
|
541
|
+
}
|
|
542
|
+
declare function createModuleEventsService(config: ModuleEventsConfig): ModuleEventsService;
|
|
543
|
+
|
|
544
|
+
declare enum EventPriority {
|
|
545
|
+
LOW = "low",
|
|
546
|
+
NORMAL = "normal",
|
|
547
|
+
HIGH = "high",
|
|
548
|
+
CRITICAL = "critical"
|
|
549
|
+
}
|
|
550
|
+
interface PublishEventOptions {
|
|
551
|
+
subject: string;
|
|
552
|
+
data: Record<string, unknown>;
|
|
553
|
+
priority?: EventPriority;
|
|
554
|
+
metadata?: Record<string, unknown>;
|
|
555
|
+
delay?: number;
|
|
556
|
+
messageId?: string;
|
|
557
|
+
workspaceId?: string;
|
|
558
|
+
organizationId?: string;
|
|
559
|
+
}
|
|
560
|
+
interface SubscribeOptions {
|
|
561
|
+
subject: string;
|
|
562
|
+
queueGroup?: string;
|
|
563
|
+
durableName?: string;
|
|
564
|
+
startPosition?: 'first' | 'last' | 'new';
|
|
565
|
+
ackMode?: 'explicit' | 'auto';
|
|
566
|
+
maxDeliver?: number;
|
|
567
|
+
ackWait?: number;
|
|
568
|
+
}
|
|
569
|
+
interface EventMessage {
|
|
570
|
+
id: string;
|
|
571
|
+
subject: string;
|
|
572
|
+
data: Record<string, unknown>;
|
|
573
|
+
priority: EventPriority;
|
|
574
|
+
metadata?: Record<string, unknown>;
|
|
575
|
+
workspaceId?: string;
|
|
576
|
+
organizationId?: string;
|
|
577
|
+
publishedAt: string;
|
|
578
|
+
publishedBy?: string;
|
|
579
|
+
}
|
|
580
|
+
interface PublishResult {
|
|
581
|
+
messageId: string;
|
|
582
|
+
subject: string;
|
|
583
|
+
sequence: number;
|
|
584
|
+
timestamp: string;
|
|
585
|
+
}
|
|
586
|
+
interface StreamInfo {
|
|
587
|
+
name: string;
|
|
588
|
+
subjects: string[];
|
|
589
|
+
messageCount: number;
|
|
590
|
+
byteCount: number;
|
|
591
|
+
firstSequence: number;
|
|
592
|
+
lastSequence: number;
|
|
593
|
+
consumerCount: number;
|
|
594
|
+
}
|
|
595
|
+
declare class EventsModule {
|
|
596
|
+
private client;
|
|
597
|
+
private context;
|
|
598
|
+
constructor(client: BurdenoffGraphQLClient, context: SDKContext);
|
|
599
|
+
createStream(name: string, subjects: string[], options?: {
|
|
600
|
+
maxMessages?: number;
|
|
601
|
+
maxBytes?: number;
|
|
602
|
+
maxAge?: number;
|
|
603
|
+
storageType?: 'file' | 'memory';
|
|
604
|
+
replicas?: number;
|
|
605
|
+
}): Promise<StreamInfo>;
|
|
606
|
+
getStreamInfo(name: string): Promise<StreamInfo>;
|
|
607
|
+
deleteStream(name: string): Promise<boolean>;
|
|
608
|
+
purgeStream(name: string, options?: {
|
|
609
|
+
subject?: string;
|
|
610
|
+
sequence?: number;
|
|
611
|
+
}): Promise<number>;
|
|
612
|
+
createConsumer(streamName: string, consumerName: string, options: SubscribeOptions): Promise<{
|
|
613
|
+
name: string;
|
|
614
|
+
pending: number;
|
|
615
|
+
}>;
|
|
616
|
+
deleteConsumer(streamName: string, consumerName: string): Promise<boolean>;
|
|
617
|
+
ackMessage(streamName: string, consumerName: string, sequence: number): Promise<boolean>;
|
|
618
|
+
nakMessage(streamName: string, consumerName: string, sequence: number): Promise<boolean>;
|
|
619
|
+
getConsumerInfo(streamName: string, consumerName: string): Promise<{
|
|
620
|
+
name: string;
|
|
621
|
+
pending: number;
|
|
622
|
+
redelivered: number;
|
|
623
|
+
numAckPending: number;
|
|
624
|
+
}>;
|
|
625
|
+
}
|
|
626
|
+
|
|
627
|
+
declare function createPublisher(): IEventPublisher;
|
|
628
|
+
declare function createConsumer(stream: string, consumer: string): IEventConsumer;
|
|
629
|
+
|
|
630
|
+
declare const EVENT_STREAMS_URL_ENV_KEYS: readonly ["REDIS_STREAMS_URL", "REDIS_URL"];
|
|
631
|
+
declare const GRAPH_EVENTS_URL_ENV_KEYS: readonly ["GRAPH_REDIS_URL", "REDIS_STREAMS_URL", "REDIS_URL"];
|
|
632
|
+
type EnvSource = Readonly<Record<string, string | undefined>>;
|
|
633
|
+
declare function resolveEventStreamsUrl(env?: EnvSource): string | undefined;
|
|
634
|
+
declare function resolveEventStreamsUrlSource(env?: EnvSource): string | undefined;
|
|
635
|
+
declare function resolveGraphEventsUrl(env?: EnvSource): string | undefined;
|
|
636
|
+
declare function resolveGraphEventsUrlSource(env?: EnvSource): string | undefined;
|
|
637
|
+
declare function eventKeyScopeForUrl(url: string | undefined): string;
|
|
638
|
+
|
|
639
|
+
type TaxonomyEventKind = 'fact' | 'command' | 'graph';
|
|
640
|
+
type TaxonomyEventLayer = 'wspace' | 'global';
|
|
641
|
+
type TaxonomyEventStatus = 'published' | 'planned';
|
|
642
|
+
type TaxonomyEventPii = 'none' | 'ids-only' | 'hashed' | 'names';
|
|
643
|
+
interface EventSpec<TPayload = unknown> {
|
|
644
|
+
readonly kind: TaxonomyEventKind;
|
|
645
|
+
readonly layer: TaxonomyEventLayer;
|
|
646
|
+
readonly producer: string;
|
|
647
|
+
readonly status: TaxonomyEventStatus;
|
|
648
|
+
readonly description: string;
|
|
649
|
+
readonly stream?: string;
|
|
650
|
+
readonly pii?: TaxonomyEventPii;
|
|
651
|
+
readonly __payload?: TPayload;
|
|
652
|
+
}
|
|
653
|
+
type EventTaxonomy = Readonly<Record<string, EventSpec>>;
|
|
654
|
+
type TaxonomyPayload<R extends EventTaxonomy, N extends keyof R> = R[N] extends EventSpec<infer P> ? P : never;
|
|
655
|
+
type PublishableEventName<R extends EventTaxonomy> = {
|
|
656
|
+
[N in keyof R]: R[N]['kind'] extends 'graph' ? never : N;
|
|
657
|
+
}[keyof R] & string;
|
|
658
|
+
declare const EVENT_TAXONOMY_BRAND: unique symbol;
|
|
659
|
+
type DefinedEventTaxonomy<R extends EventTaxonomy> = R & {
|
|
660
|
+
readonly [EVENT_TAXONOMY_BRAND]: true;
|
|
661
|
+
};
|
|
662
|
+
declare function eventSpec<TPayload>(spec: Omit<EventSpec<TPayload>, '__payload'>): EventSpec<TPayload>;
|
|
663
|
+
declare function taxonomyNameViolation(name: string, kind: TaxonomyEventKind): string | null;
|
|
664
|
+
declare function defineEventTaxonomy<const R extends EventTaxonomy>(registry: R): DefinedEventTaxonomy<R>;
|
|
665
|
+
declare function isDefinedEventTaxonomy(registry: unknown): registry is DefinedEventTaxonomy<EventTaxonomy>;
|
|
666
|
+
declare function taxonomyEventNames<R extends EventTaxonomy>(registry: R): Array<keyof R & string>;
|
|
667
|
+
declare function mergeEventTaxonomies<A extends EventTaxonomy, B extends EventTaxonomy>(a: DefinedEventTaxonomy<A>, b: DefinedEventTaxonomy<B>): DefinedEventTaxonomy<A & B>;
|
|
668
|
+
interface TaxonomyPublishMetadata extends Partial<EventMetadata> {
|
|
669
|
+
source: string;
|
|
670
|
+
}
|
|
671
|
+
declare function publishTaxonomyEvent<R extends EventTaxonomy, N extends PublishableEventName<R>>(publisher: Pick<IEventPublisher, 'publish'>, registry: DefinedEventTaxonomy<R>, name: N, payload: TaxonomyPayload<R, N>, metadata: TaxonomyPublishMetadata, options?: Omit<PublishOptions, 'stream'>): Promise<number | string>;
|
|
672
|
+
interface WorkspaceCreatedPayload {
|
|
673
|
+
workspaceId: string;
|
|
674
|
+
name?: string;
|
|
675
|
+
tenantId?: string | null;
|
|
676
|
+
orgId?: string | null;
|
|
677
|
+
organizationId?: string | null;
|
|
678
|
+
ownerId?: string;
|
|
679
|
+
type?: string;
|
|
680
|
+
projectId?: string;
|
|
681
|
+
status?: string;
|
|
682
|
+
}
|
|
683
|
+
interface WorkspaceMemberAddedPayload {
|
|
684
|
+
workspaceId: string;
|
|
685
|
+
userId: string;
|
|
686
|
+
roleIds?: string[];
|
|
687
|
+
addedBy?: string;
|
|
688
|
+
tenantId?: string | null;
|
|
689
|
+
}
|
|
690
|
+
interface WorkspaceMemberRemovedPayload {
|
|
691
|
+
workspaceId: string;
|
|
692
|
+
userId: string;
|
|
693
|
+
removedBy?: string;
|
|
694
|
+
previousRole?: string | null;
|
|
695
|
+
tenantId?: string | null;
|
|
696
|
+
}
|
|
697
|
+
interface WorkspaceMemberRoleUpdatedPayload {
|
|
698
|
+
workspaceId: string;
|
|
699
|
+
userId: string;
|
|
700
|
+
roleIds?: string[];
|
|
701
|
+
updatedBy?: string;
|
|
702
|
+
}
|
|
703
|
+
interface WorkspaceDeletedPayload {
|
|
704
|
+
workspaceId: string;
|
|
705
|
+
tenantId?: string | null;
|
|
706
|
+
deletedBy?: string;
|
|
707
|
+
}
|
|
708
|
+
interface GraphEntityEventPayload<TData = Record<string, unknown>> {
|
|
709
|
+
eventId: string;
|
|
710
|
+
eventType: 'entity.created' | 'entity.updated' | 'entity.deleted';
|
|
711
|
+
productSource: string;
|
|
712
|
+
organizationId: string;
|
|
713
|
+
entity: {
|
|
714
|
+
id: string;
|
|
715
|
+
type: string;
|
|
716
|
+
data: TData;
|
|
717
|
+
};
|
|
718
|
+
context: {
|
|
719
|
+
actorId?: string;
|
|
720
|
+
workspaceId?: string;
|
|
721
|
+
};
|
|
722
|
+
timestamp: string;
|
|
723
|
+
}
|
|
724
|
+
interface OrganizationDeletedPayload {
|
|
725
|
+
type: 'organization.deleted';
|
|
726
|
+
organizationId: string;
|
|
727
|
+
tenantId?: string | null;
|
|
728
|
+
actorId?: string;
|
|
729
|
+
occurredAt?: string;
|
|
730
|
+
}
|
|
731
|
+
interface UserDeletedPayload {
|
|
732
|
+
userId: string;
|
|
733
|
+
tenantId?: string | null;
|
|
734
|
+
}
|
|
735
|
+
interface SubscriptionChangedPayload {
|
|
736
|
+
subscriptionId: string;
|
|
737
|
+
tenantId: string;
|
|
738
|
+
workspaceId?: string;
|
|
739
|
+
planId?: string;
|
|
740
|
+
productId?: string;
|
|
741
|
+
status?: string;
|
|
742
|
+
}
|
|
743
|
+
declare const WSPACE_GRAPH_EVENTS_STREAM = "WSPACE_GRAPH_EVENTS";
|
|
744
|
+
declare const PLATFORM_EVENT_TAXONOMY: DefinedEventTaxonomy<{
|
|
745
|
+
readonly 'workspace.created': EventSpec<WorkspaceCreatedPayload>;
|
|
746
|
+
readonly 'workspace.initialized': EventSpec<WorkspaceCreatedPayload>;
|
|
747
|
+
readonly 'workspace.member.added': EventSpec<WorkspaceMemberAddedPayload>;
|
|
748
|
+
readonly 'workspace.member.removed': EventSpec<WorkspaceMemberRemovedPayload>;
|
|
749
|
+
readonly 'workspace.member.role_updated': EventSpec<WorkspaceMemberRoleUpdatedPayload>;
|
|
750
|
+
readonly 'workspace.deleted': EventSpec<WorkspaceDeletedPayload>;
|
|
751
|
+
readonly 'graph.module-workspace.Workspace.deleted': EventSpec<GraphEntityEventPayload<Record<string, unknown>>>;
|
|
752
|
+
readonly 'organization.deleted': EventSpec<OrganizationDeletedPayload>;
|
|
753
|
+
readonly 'user.deleted': EventSpec<UserDeletedPayload>;
|
|
754
|
+
readonly 'subscription.created': EventSpec<SubscriptionChangedPayload>;
|
|
755
|
+
readonly 'subscription.updated': EventSpec<SubscriptionChangedPayload>;
|
|
756
|
+
readonly 'subscription.cancelled': EventSpec<SubscriptionChangedPayload>;
|
|
757
|
+
}>;
|
|
758
|
+
interface VibecontrolsAgentConnectedPayload {
|
|
759
|
+
agentId: string;
|
|
760
|
+
workspaceId: string;
|
|
761
|
+
connectedAt: string;
|
|
762
|
+
}
|
|
763
|
+
interface VibecontrolsAgentDisconnectedPayload {
|
|
764
|
+
agentId: string;
|
|
765
|
+
workspaceId: string;
|
|
766
|
+
disconnectedAt: string;
|
|
767
|
+
reason?: string;
|
|
768
|
+
}
|
|
769
|
+
interface VibecontrolsSessionStartedPayload {
|
|
770
|
+
sessionId: string;
|
|
771
|
+
agentId: string;
|
|
772
|
+
workspaceId: string;
|
|
773
|
+
startedAt: string;
|
|
774
|
+
}
|
|
775
|
+
interface VibecontrolsSessionEndedPayload {
|
|
776
|
+
sessionId: string;
|
|
777
|
+
agentId: string;
|
|
778
|
+
workspaceId: string;
|
|
779
|
+
endedAt: string;
|
|
780
|
+
durationMs?: number;
|
|
781
|
+
}
|
|
782
|
+
interface WorkflowRunStartedPayload {
|
|
783
|
+
runId: string;
|
|
784
|
+
workflowId: string;
|
|
785
|
+
workspaceId: string;
|
|
786
|
+
startedAt: string;
|
|
787
|
+
triggerType?: string;
|
|
788
|
+
}
|
|
789
|
+
interface WorkflowRunCompletedPayload {
|
|
790
|
+
runId: string;
|
|
791
|
+
workflowId: string;
|
|
792
|
+
workspaceId: string;
|
|
793
|
+
completedAt: string;
|
|
794
|
+
durationMs?: number;
|
|
795
|
+
}
|
|
796
|
+
interface WorkflowRunFailedPayload {
|
|
797
|
+
runId: string;
|
|
798
|
+
workflowId: string;
|
|
799
|
+
workspaceId: string;
|
|
800
|
+
failedAt: string;
|
|
801
|
+
durationMs?: number;
|
|
802
|
+
errorCode?: string;
|
|
803
|
+
}
|
|
804
|
+
declare const REFERENCE_PRODUCT_EVENT_TAXONOMY: DefinedEventTaxonomy<{
|
|
805
|
+
readonly 'vibecontrols.agent.connected': EventSpec<VibecontrolsAgentConnectedPayload>;
|
|
806
|
+
readonly 'vibecontrols.agent.disconnected': EventSpec<VibecontrolsAgentDisconnectedPayload>;
|
|
807
|
+
readonly 'vibecontrols.session.started': EventSpec<VibecontrolsSessionStartedPayload>;
|
|
808
|
+
readonly 'vibecontrols.session.ended': EventSpec<VibecontrolsSessionEndedPayload>;
|
|
809
|
+
readonly 'workflow.run.started': EventSpec<WorkflowRunStartedPayload>;
|
|
810
|
+
readonly 'workflow.run.completed': EventSpec<WorkflowRunCompletedPayload>;
|
|
811
|
+
readonly 'workflow.run.failed': EventSpec<WorkflowRunFailedPayload>;
|
|
812
|
+
}>;
|
|
813
|
+
|
|
814
|
+
interface EventsManagerMessage<T = unknown> {
|
|
815
|
+
subject: string;
|
|
816
|
+
data: Uint8Array;
|
|
817
|
+
payload: T;
|
|
818
|
+
event: AcknowledgeableEvent<T>;
|
|
819
|
+
ack(): void;
|
|
820
|
+
nak(delay?: number): void;
|
|
821
|
+
term(): void;
|
|
822
|
+
}
|
|
823
|
+
type EventsManagerHandler<T = unknown> = (msg: EventsManagerMessage<T>) => Promise<void> | void;
|
|
824
|
+
interface EventsManagerStreamRoute {
|
|
825
|
+
subject: string;
|
|
826
|
+
stream: string;
|
|
827
|
+
}
|
|
828
|
+
interface EventsManagerOptions {
|
|
829
|
+
serviceName: string;
|
|
830
|
+
streamRoutes?: readonly EventsManagerStreamRoute[];
|
|
831
|
+
defaultStream?: string;
|
|
832
|
+
maxDeliver?: number;
|
|
833
|
+
strictSubjectFilter?: boolean;
|
|
834
|
+
requireRedisUrl?: boolean;
|
|
835
|
+
publisherFactory?: () => IEventPublisher;
|
|
836
|
+
consumerFactory?: (stream: string, consumer: string) => IEventConsumer;
|
|
837
|
+
}
|
|
838
|
+
interface EventsManagerSubscribeOptions {
|
|
839
|
+
stream?: string;
|
|
840
|
+
maxDeliver?: number;
|
|
841
|
+
deliverPolicy?: NonNullable<SubscriptionOptions['deliverPolicy']>;
|
|
842
|
+
}
|
|
843
|
+
declare class EventsManager {
|
|
844
|
+
private publisher;
|
|
845
|
+
private publisherConnecting;
|
|
846
|
+
private readonly consumers;
|
|
847
|
+
private readonly active;
|
|
848
|
+
private readonly serviceName;
|
|
849
|
+
private readonly routes;
|
|
850
|
+
private readonly defaultStream;
|
|
851
|
+
private readonly maxDeliver;
|
|
852
|
+
private readonly strict;
|
|
853
|
+
private readonly requireRedisUrl;
|
|
854
|
+
private readonly publisherFactory;
|
|
855
|
+
private readonly consumerFactory;
|
|
856
|
+
constructor(options: EventsManagerOptions);
|
|
857
|
+
connect(): Promise<void>;
|
|
858
|
+
private assertBusConfigured;
|
|
859
|
+
private connectPublisher;
|
|
860
|
+
publish(subject: string, payload: unknown, metadata?: Partial<EventMetadata>): Promise<void>;
|
|
861
|
+
subscribe<T = unknown>(subject: string, handler: EventsManagerHandler<T>, consumerName?: string, options?: EventsManagerSubscribeOptions): Promise<() => Promise<void>>;
|
|
862
|
+
close(): Promise<void>;
|
|
863
|
+
isConnected(): boolean;
|
|
864
|
+
getSubscriptionCount(): number;
|
|
865
|
+
resolveStream(subject: string): string | undefined;
|
|
866
|
+
consumerNameFor(subject: string): string;
|
|
867
|
+
}
|
|
868
|
+
interface EventsManagerSingleton {
|
|
869
|
+
get(): Promise<EventsManager>;
|
|
870
|
+
close(): Promise<void>;
|
|
871
|
+
}
|
|
872
|
+
declare function createEventsManagerSingleton(options: EventsManagerOptions): EventsManagerSingleton;
|
|
873
|
+
|
|
874
|
+
type LifecycleEventSource = 'stream' | 'graph';
|
|
875
|
+
interface LifecycleEventContext {
|
|
876
|
+
eventId: string;
|
|
877
|
+
subject: string;
|
|
878
|
+
source: LifecycleEventSource;
|
|
879
|
+
deliveryAttempt: number;
|
|
880
|
+
correlationId?: string;
|
|
881
|
+
}
|
|
882
|
+
interface WorkspaceDeletedFact {
|
|
883
|
+
workspaceId: string;
|
|
884
|
+
tenantId?: string;
|
|
885
|
+
organizationId?: string;
|
|
886
|
+
deletedBy?: string;
|
|
887
|
+
deletedAt?: string;
|
|
888
|
+
}
|
|
889
|
+
interface WorkspaceMemberRemovedFact {
|
|
890
|
+
workspaceId: string;
|
|
891
|
+
userId: string;
|
|
892
|
+
tenantId?: string;
|
|
893
|
+
removedBy?: string;
|
|
894
|
+
previousRole?: string;
|
|
895
|
+
}
|
|
896
|
+
interface OrganizationDeletedFact {
|
|
897
|
+
organizationId: string;
|
|
898
|
+
tenantId?: string;
|
|
899
|
+
deletedBy?: string;
|
|
900
|
+
deletedAt?: string;
|
|
901
|
+
}
|
|
902
|
+
interface LifecycleHandlers {
|
|
903
|
+
onWorkspaceDeleted?: (fact: WorkspaceDeletedFact, ctx: LifecycleEventContext) => Promise<void>;
|
|
904
|
+
onWorkspaceMemberRemoved?: (fact: WorkspaceMemberRemovedFact, ctx: LifecycleEventContext) => Promise<void>;
|
|
905
|
+
onOrganizationDeleted?: (fact: OrganizationDeletedFact, ctx: LifecycleEventContext) => Promise<void>;
|
|
906
|
+
}
|
|
907
|
+
interface LifecycleConsumerOptions {
|
|
908
|
+
serviceName: string;
|
|
909
|
+
layer: TaxonomyEventLayer;
|
|
910
|
+
handlers: LifecycleHandlers;
|
|
911
|
+
purpose?: string;
|
|
912
|
+
workspaceDeletedSources?: readonly LifecycleEventSource[];
|
|
913
|
+
graphStream?: string;
|
|
914
|
+
maxDeliver?: number;
|
|
915
|
+
dedupeWindowMs?: number;
|
|
916
|
+
consumerFactory?: (stream: string, consumer: string) => IEventConsumer;
|
|
917
|
+
}
|
|
918
|
+
interface LifecycleConsumer {
|
|
919
|
+
readonly group: string;
|
|
920
|
+
readonly subjects: readonly string[];
|
|
921
|
+
start(): Promise<void>;
|
|
922
|
+
stop(): Promise<void>;
|
|
923
|
+
isRunning(): boolean;
|
|
924
|
+
}
|
|
925
|
+
declare const LIFECYCLE_SUBJECTS: {
|
|
926
|
+
readonly workspaceDeleted: "workspace.deleted";
|
|
927
|
+
readonly workspaceDeletedGraph: "graph.module-workspace.Workspace.deleted";
|
|
928
|
+
readonly workspaceMemberRemoved: "workspace.member.removed";
|
|
929
|
+
readonly organizationDeleted: "organization.deleted";
|
|
930
|
+
};
|
|
931
|
+
declare function buildConsumerGroupName(serviceName: string, purpose?: string): string;
|
|
932
|
+
declare function parseWorkspaceDeletedStream(data: unknown): WorkspaceDeletedFact | null;
|
|
933
|
+
declare function parseWorkspaceDeletedGraph(data: unknown): WorkspaceDeletedFact | null;
|
|
934
|
+
declare function parseWorkspaceMemberRemoved(data: unknown): WorkspaceMemberRemovedFact | null;
|
|
935
|
+
declare function parseOrganizationDeleted(data: unknown): OrganizationDeletedFact | null;
|
|
936
|
+
declare function createLifecycleConsumer(options: LifecycleConsumerOptions): LifecycleConsumer;
|
|
937
|
+
|
|
938
|
+
type index_AcknowledgeableEvent<T = unknown> = AcknowledgeableEvent<T>;
|
|
939
|
+
type index_BaseQueueConfig = BaseQueueConfig;
|
|
940
|
+
type index_BulkEventPayload = BulkEventPayload;
|
|
941
|
+
type index_ConsumerConfig = ConsumerConfig;
|
|
942
|
+
type index_ConsumerOptions = ConsumerOptions;
|
|
943
|
+
type index_DefinedEventTaxonomy<R extends EventTaxonomy> = DefinedEventTaxonomy<R>;
|
|
944
|
+
declare const index_EVENT_STREAMS_URL_ENV_KEYS: typeof EVENT_STREAMS_URL_ENV_KEYS;
|
|
945
|
+
declare const index_EVENT_TAXONOMY_BRAND: typeof EVENT_TAXONOMY_BRAND;
|
|
946
|
+
declare const index_EntityEventRbacMetadata: typeof EntityEventRbacMetadata;
|
|
947
|
+
type index_EventHandler<T = unknown> = EventHandler<T>;
|
|
948
|
+
type index_EventMetadata = EventMetadata;
|
|
949
|
+
type index_EventPriority = EventPriority;
|
|
950
|
+
declare const index_EventPriority: typeof EventPriority;
|
|
951
|
+
type index_EventQueueFactory = EventQueueFactory;
|
|
952
|
+
declare const index_EventQueueFactory: typeof EventQueueFactory;
|
|
953
|
+
type index_EventQueueHealthCheckResult = EventQueueHealthCheckResult;
|
|
954
|
+
type index_EventSpec<TPayload = unknown> = EventSpec<TPayload>;
|
|
955
|
+
type index_EventTaxonomy = EventTaxonomy;
|
|
956
|
+
type index_EventsManager = EventsManager;
|
|
957
|
+
declare const index_EventsManager: typeof EventsManager;
|
|
958
|
+
type index_EventsManagerHandler<T = unknown> = EventsManagerHandler<T>;
|
|
959
|
+
type index_EventsManagerMessage<T = unknown> = EventsManagerMessage<T>;
|
|
960
|
+
type index_EventsManagerOptions = EventsManagerOptions;
|
|
961
|
+
type index_EventsManagerSingleton = EventsManagerSingleton;
|
|
962
|
+
type index_EventsManagerStreamRoute = EventsManagerStreamRoute;
|
|
963
|
+
type index_EventsManagerSubscribeOptions = EventsManagerSubscribeOptions;
|
|
964
|
+
type index_EventsModule = EventsModule;
|
|
965
|
+
declare const index_EventsModule: typeof EventsModule;
|
|
966
|
+
declare const index_GRAPH_EVENTS_URL_ENV_KEYS: typeof GRAPH_EVENTS_URL_ENV_KEYS;
|
|
967
|
+
type index_GraphEntityEventPayload<TData = Record<string, unknown>> = GraphEntityEventPayload<TData>;
|
|
968
|
+
declare const index_GraphEventEmitterImpl: typeof GraphEventEmitterImpl;
|
|
969
|
+
type index_IEventConsumer = IEventConsumer;
|
|
970
|
+
type index_IEventPublisher = IEventPublisher;
|
|
971
|
+
type index_IEventQueue = IEventQueue;
|
|
972
|
+
type index_ISubscription = ISubscription;
|
|
973
|
+
declare const index_LIFECYCLE_SUBJECTS: typeof LIFECYCLE_SUBJECTS;
|
|
974
|
+
type index_LifecycleConsumer = LifecycleConsumer;
|
|
975
|
+
type index_LifecycleConsumerOptions = LifecycleConsumerOptions;
|
|
976
|
+
type index_LifecycleEventContext = LifecycleEventContext;
|
|
977
|
+
type index_LifecycleEventSource = LifecycleEventSource;
|
|
978
|
+
type index_LifecycleHandlers = LifecycleHandlers;
|
|
979
|
+
type index_MemoryEventBus = MemoryEventBus;
|
|
980
|
+
declare const index_MemoryEventBus: typeof MemoryEventBus;
|
|
981
|
+
type index_MemoryEventConsumer = MemoryEventConsumer;
|
|
982
|
+
declare const index_MemoryEventConsumer: typeof MemoryEventConsumer;
|
|
983
|
+
type index_MemoryEventPublisher = MemoryEventPublisher;
|
|
984
|
+
declare const index_MemoryEventPublisher: typeof MemoryEventPublisher;
|
|
985
|
+
type index_MemoryEventQueue = MemoryEventQueue;
|
|
986
|
+
declare const index_MemoryEventQueue: typeof MemoryEventQueue;
|
|
987
|
+
type index_ModuleEventPayload = ModuleEventPayload;
|
|
988
|
+
type index_ModuleEventsConfig = ModuleEventsConfig;
|
|
989
|
+
type index_ModuleEventsService = ModuleEventsService;
|
|
990
|
+
declare const index_ModuleEventsService: typeof ModuleEventsService;
|
|
991
|
+
type index_OrganizationDeletedFact = OrganizationDeletedFact;
|
|
992
|
+
type index_OrganizationDeletedPayload = OrganizationDeletedPayload;
|
|
993
|
+
declare const index_PLATFORM_EVENT_TAXONOMY: typeof PLATFORM_EVENT_TAXONOMY;
|
|
994
|
+
type index_PublishEventOptions = PublishEventOptions;
|
|
995
|
+
type index_PublishOptions = PublishOptions;
|
|
996
|
+
type index_PublishResult = PublishResult;
|
|
997
|
+
type index_PublishableEventName<R extends EventTaxonomy> = PublishableEventName<R>;
|
|
998
|
+
type index_PublisherConfig = PublisherConfig;
|
|
999
|
+
type index_QueueStatistics = QueueStatistics;
|
|
1000
|
+
type index_QueueType = QueueType;
|
|
1001
|
+
declare const index_QueueType: typeof QueueType;
|
|
1002
|
+
declare const index_REFERENCE_PRODUCT_EVENT_TAXONOMY: typeof REFERENCE_PRODUCT_EVENT_TAXONOMY;
|
|
1003
|
+
type index_RedisStreamsConnection = RedisStreamsConnection;
|
|
1004
|
+
declare const index_RedisStreamsConnection: typeof RedisStreamsConnection;
|
|
1005
|
+
type index_RedisStreamsEventConsumer = RedisStreamsEventConsumer;
|
|
1006
|
+
declare const index_RedisStreamsEventConsumer: typeof RedisStreamsEventConsumer;
|
|
1007
|
+
type index_RedisStreamsEventPublisher = RedisStreamsEventPublisher;
|
|
1008
|
+
declare const index_RedisStreamsEventPublisher: typeof RedisStreamsEventPublisher;
|
|
1009
|
+
type index_StreamConfig = StreamConfig;
|
|
1010
|
+
type index_StreamInfo = StreamInfo;
|
|
1011
|
+
type index_SubscribeOptions = SubscribeOptions;
|
|
1012
|
+
type index_SubscriptionChangedPayload = SubscriptionChangedPayload;
|
|
1013
|
+
type index_SubscriptionOptions = SubscriptionOptions;
|
|
1014
|
+
type index_TaxonomyEventKind = TaxonomyEventKind;
|
|
1015
|
+
type index_TaxonomyEventLayer = TaxonomyEventLayer;
|
|
1016
|
+
type index_TaxonomyEventPii = TaxonomyEventPii;
|
|
1017
|
+
type index_TaxonomyEventStatus = TaxonomyEventStatus;
|
|
1018
|
+
type index_TaxonomyPayload<R extends EventTaxonomy, N extends keyof R> = TaxonomyPayload<R, N>;
|
|
1019
|
+
type index_TaxonomyPublishMetadata = TaxonomyPublishMetadata;
|
|
1020
|
+
type index_UserDeletedPayload = UserDeletedPayload;
|
|
1021
|
+
type index_VibecontrolsAgentConnectedPayload = VibecontrolsAgentConnectedPayload;
|
|
1022
|
+
type index_VibecontrolsAgentDisconnectedPayload = VibecontrolsAgentDisconnectedPayload;
|
|
1023
|
+
type index_VibecontrolsSessionEndedPayload = VibecontrolsSessionEndedPayload;
|
|
1024
|
+
type index_VibecontrolsSessionStartedPayload = VibecontrolsSessionStartedPayload;
|
|
1025
|
+
declare const index_WSPACE_GRAPH_EVENTS_STREAM: typeof WSPACE_GRAPH_EVENTS_STREAM;
|
|
1026
|
+
type index_WorkflowRunCompletedPayload = WorkflowRunCompletedPayload;
|
|
1027
|
+
type index_WorkflowRunFailedPayload = WorkflowRunFailedPayload;
|
|
1028
|
+
type index_WorkflowRunStartedPayload = WorkflowRunStartedPayload;
|
|
1029
|
+
type index_WorkspaceCreatedPayload = WorkspaceCreatedPayload;
|
|
1030
|
+
type index_WorkspaceDeletedFact = WorkspaceDeletedFact;
|
|
1031
|
+
type index_WorkspaceDeletedPayload = WorkspaceDeletedPayload;
|
|
1032
|
+
type index_WorkspaceMemberAddedPayload = WorkspaceMemberAddedPayload;
|
|
1033
|
+
type index_WorkspaceMemberRemovedFact = WorkspaceMemberRemovedFact;
|
|
1034
|
+
type index_WorkspaceMemberRemovedPayload = WorkspaceMemberRemovedPayload;
|
|
1035
|
+
type index_WorkspaceMemberRoleUpdatedPayload = WorkspaceMemberRoleUpdatedPayload;
|
|
1036
|
+
declare const index_buildConsumerGroupName: typeof buildConsumerGroupName;
|
|
1037
|
+
declare const index_createConsumer: typeof createConsumer;
|
|
1038
|
+
declare const index_createEventsManagerSingleton: typeof createEventsManagerSingleton;
|
|
1039
|
+
declare const index_createLifecycleConsumer: typeof createLifecycleConsumer;
|
|
1040
|
+
declare const index_createMemoryConsumer: typeof createMemoryConsumer;
|
|
1041
|
+
declare const index_createMemoryPublisher: typeof createMemoryPublisher;
|
|
1042
|
+
declare const index_createModuleEventsService: typeof createModuleEventsService;
|
|
1043
|
+
declare const index_createPublisher: typeof createPublisher;
|
|
1044
|
+
declare const index_defineEventTaxonomy: typeof defineEventTaxonomy;
|
|
1045
|
+
declare const index_eventKeyScopeForUrl: typeof eventKeyScopeForUrl;
|
|
1046
|
+
declare const index_eventSpec: typeof eventSpec;
|
|
1047
|
+
declare const index_getGraphEventEmitter: typeof getGraphEventEmitter;
|
|
1048
|
+
declare const index_isDefinedEventTaxonomy: typeof isDefinedEventTaxonomy;
|
|
1049
|
+
declare const index_mergeEventTaxonomies: typeof mergeEventTaxonomies;
|
|
1050
|
+
declare const index_parseOrganizationDeleted: typeof parseOrganizationDeleted;
|
|
1051
|
+
declare const index_parseWorkspaceDeletedGraph: typeof parseWorkspaceDeletedGraph;
|
|
1052
|
+
declare const index_parseWorkspaceDeletedStream: typeof parseWorkspaceDeletedStream;
|
|
1053
|
+
declare const index_parseWorkspaceMemberRemoved: typeof parseWorkspaceMemberRemoved;
|
|
1054
|
+
declare const index_publishTaxonomyEvent: typeof publishTaxonomyEvent;
|
|
1055
|
+
declare const index_resetGraphEventEmitter: typeof resetGraphEventEmitter;
|
|
1056
|
+
declare const index_resolveEventStreamsUrl: typeof resolveEventStreamsUrl;
|
|
1057
|
+
declare const index_resolveEventStreamsUrlSource: typeof resolveEventStreamsUrlSource;
|
|
1058
|
+
declare const index_resolveGraphEventsUrl: typeof resolveGraphEventsUrl;
|
|
1059
|
+
declare const index_resolveGraphEventsUrlSource: typeof resolveGraphEventsUrlSource;
|
|
1060
|
+
declare const index_taxonomyEventNames: typeof taxonomyEventNames;
|
|
1061
|
+
declare const index_taxonomyNameViolation: typeof taxonomyNameViolation;
|
|
1062
|
+
declare namespace index {
|
|
1063
|
+
export { type index_AcknowledgeableEvent as AcknowledgeableEvent, type index_BaseQueueConfig as BaseQueueConfig, type index_BulkEventPayload as BulkEventPayload, type index_ConsumerConfig as ConsumerConfig, type index_ConsumerOptions as ConsumerOptions, type index_DefinedEventTaxonomy as DefinedEventTaxonomy, index_EVENT_STREAMS_URL_ENV_KEYS as EVENT_STREAMS_URL_ENV_KEYS, index_EVENT_TAXONOMY_BRAND as EVENT_TAXONOMY_BRAND, index_EntityEventRbacMetadata as EntityEventRbacMetadata, EntityEventType$1 as EntityEventType, type index_EventHandler as EventHandler, type EventMessage$1 as EventMessage, type index_EventMetadata as EventMetadata, index_EventPriority as EventPriority, index_EventQueueFactory as EventQueueFactory, type index_EventQueueHealthCheckResult as EventQueueHealthCheckResult, type index_EventSpec as EventSpec, type index_EventTaxonomy as EventTaxonomy, index_EventsManager as EventsManager, type index_EventsManagerHandler as EventsManagerHandler, type index_EventsManagerMessage as EventsManagerMessage, type index_EventsManagerOptions as EventsManagerOptions, type index_EventsManagerSingleton as EventsManagerSingleton, type index_EventsManagerStreamRoute as EventsManagerStreamRoute, type index_EventsManagerSubscribeOptions as EventsManagerSubscribeOptions, index_EventsModule as EventsModule, index_GRAPH_EVENTS_URL_ENV_KEYS as GRAPH_EVENTS_URL_ENV_KEYS, type index_GraphEntityEventPayload as GraphEntityEventPayload, GraphEventEmitter$1 as GraphEventEmitter, index_GraphEventEmitterImpl as GraphEventEmitterImpl, type EventMessage as GraphQLEventMessage, type EventQueueHealthCheckResult as HealthCheckResult, type index_IEventConsumer as IEventConsumer, type index_IEventPublisher as IEventPublisher, type index_IEventQueue as IEventQueue, type index_ISubscription as ISubscription, index_LIFECYCLE_SUBJECTS as LIFECYCLE_SUBJECTS, type index_LifecycleConsumer as LifecycleConsumer, type index_LifecycleConsumerOptions as LifecycleConsumerOptions, type index_LifecycleEventContext as LifecycleEventContext, type index_LifecycleEventSource as LifecycleEventSource, type index_LifecycleHandlers as LifecycleHandlers, index_MemoryEventBus as MemoryEventBus, index_MemoryEventConsumer as MemoryEventConsumer, index_MemoryEventPublisher as MemoryEventPublisher, index_MemoryEventQueue as MemoryEventQueue, type index_ModuleEventPayload as ModuleEventPayload, type index_ModuleEventsConfig as ModuleEventsConfig, index_ModuleEventsService as ModuleEventsService, type index_OrganizationDeletedFact as OrganizationDeletedFact, type index_OrganizationDeletedPayload as OrganizationDeletedPayload, index_PLATFORM_EVENT_TAXONOMY as PLATFORM_EVENT_TAXONOMY, type index_PublishEventOptions as PublishEventOptions, type index_PublishOptions as PublishOptions, type index_PublishResult as PublishResult, type index_PublishableEventName as PublishableEventName, type index_PublisherConfig as PublisherConfig, type index_QueueStatistics as QueueStatistics, index_QueueType as QueueType, index_REFERENCE_PRODUCT_EVENT_TAXONOMY as REFERENCE_PRODUCT_EVENT_TAXONOMY, index_RedisStreamsConnection as RedisStreamsConnection, index_RedisStreamsEventConsumer as RedisStreamsEventConsumer, index_RedisStreamsEventPublisher as RedisStreamsEventPublisher, type index_StreamConfig as StreamConfig, type index_StreamInfo as StreamInfo, type index_SubscribeOptions as SubscribeOptions, type index_SubscriptionChangedPayload as SubscriptionChangedPayload, type index_SubscriptionOptions as SubscriptionOptions, type index_TaxonomyEventKind as TaxonomyEventKind, type index_TaxonomyEventLayer as TaxonomyEventLayer, type index_TaxonomyEventPii as TaxonomyEventPii, type index_TaxonomyEventStatus as TaxonomyEventStatus, type index_TaxonomyPayload as TaxonomyPayload, type index_TaxonomyPublishMetadata as TaxonomyPublishMetadata, type index_UserDeletedPayload as UserDeletedPayload, type index_VibecontrolsAgentConnectedPayload as VibecontrolsAgentConnectedPayload, type index_VibecontrolsAgentDisconnectedPayload as VibecontrolsAgentDisconnectedPayload, type index_VibecontrolsSessionEndedPayload as VibecontrolsSessionEndedPayload, type index_VibecontrolsSessionStartedPayload as VibecontrolsSessionStartedPayload, index_WSPACE_GRAPH_EVENTS_STREAM as WSPACE_GRAPH_EVENTS_STREAM, type index_WorkflowRunCompletedPayload as WorkflowRunCompletedPayload, type index_WorkflowRunFailedPayload as WorkflowRunFailedPayload, type index_WorkflowRunStartedPayload as WorkflowRunStartedPayload, type index_WorkspaceCreatedPayload as WorkspaceCreatedPayload, type index_WorkspaceDeletedFact as WorkspaceDeletedFact, type index_WorkspaceDeletedPayload as WorkspaceDeletedPayload, type index_WorkspaceMemberAddedPayload as WorkspaceMemberAddedPayload, type index_WorkspaceMemberRemovedFact as WorkspaceMemberRemovedFact, type index_WorkspaceMemberRemovedPayload as WorkspaceMemberRemovedPayload, type index_WorkspaceMemberRoleUpdatedPayload as WorkspaceMemberRoleUpdatedPayload, index_buildConsumerGroupName as buildConsumerGroupName, index_createConsumer as createConsumer, index_createEventsManagerSingleton as createEventsManagerSingleton, createGraphEventEmitter$1 as createGraphEventEmitter, index_createLifecycleConsumer as createLifecycleConsumer, index_createMemoryConsumer as createMemoryConsumer, createGraphEventEmitter as createMemoryGraphEventEmitter, index_createMemoryPublisher as createMemoryPublisher, index_createModuleEventsService as createModuleEventsService, index_createPublisher as createPublisher, index_defineEventTaxonomy as defineEventTaxonomy, index_eventKeyScopeForUrl as eventKeyScopeForUrl, index_eventSpec as eventSpec, index_getGraphEventEmitter as getGraphEventEmitter, index_isDefinedEventTaxonomy as isDefinedEventTaxonomy, index_mergeEventTaxonomies as mergeEventTaxonomies, index_parseOrganizationDeleted as parseOrganizationDeleted, index_parseWorkspaceDeletedGraph as parseWorkspaceDeletedGraph, index_parseWorkspaceDeletedStream as parseWorkspaceDeletedStream, index_parseWorkspaceMemberRemoved as parseWorkspaceMemberRemoved, index_publishTaxonomyEvent as publishTaxonomyEvent, dlqKey as redisDlqKey, streamKey as redisStreamKey, index_resetGraphEventEmitter as resetGraphEventEmitter, index_resolveEventStreamsUrl as resolveEventStreamsUrl, index_resolveEventStreamsUrlSource as resolveEventStreamsUrlSource, index_resolveGraphEventsUrl as resolveGraphEventsUrl, index_resolveGraphEventsUrlSource as resolveGraphEventsUrlSource, index_taxonomyEventNames as taxonomyEventNames, index_taxonomyNameViolation as taxonomyNameViolation };
|
|
1064
|
+
}
|
|
1065
|
+
|
|
1066
|
+
export { type QueueStatistics as $, type AcknowledgeableEvent as A, type BaseQueueConfig as B, type ConsumerConfig as C, type DefinedEventTaxonomy as D, EventsModule as E, type LifecycleConsumerOptions as F, GRAPH_EVENTS_URL_ENV_KEYS as G, type LifecycleEventContext as H, type IEventPublisher as I, type LifecycleEventSource as J, type LifecycleHandlers as K, LIFECYCLE_SUBJECTS as L, MemoryEventBus as M, MemoryEventConsumer as N, MemoryEventPublisher as O, MemoryEventQueue as P, type ModuleEventPayload as Q, type ModuleEventsConfig as R, ModuleEventsService as S, type OrganizationDeletedFact as T, type OrganizationDeletedPayload as U, PLATFORM_EVENT_TAXONOMY as V, type PublishEventOptions as W, type PublishOptions as X, type PublishResult as Y, type PublishableEventName as Z, type PublisherConfig as _, type BulkEventPayload as a, QueueType as a0, REFERENCE_PRODUCT_EVENT_TAXONOMY as a1, RedisStreamsConnection as a2, RedisStreamsEventConsumer as a3, RedisStreamsEventPublisher as a4, type StreamConfig as a5, type StreamInfo as a6, type SubscribeOptions as a7, type SubscriptionChangedPayload as a8, type SubscriptionOptions as a9, createMemoryConsumer as aA, createGraphEventEmitter as aB, createMemoryPublisher as aC, createModuleEventsService as aD, createPublisher as aE, defineEventTaxonomy as aF, eventKeyScopeForUrl as aG, eventSpec as aH, isDefinedEventTaxonomy as aI, mergeEventTaxonomies as aJ, parseOrganizationDeleted as aK, parseWorkspaceDeletedGraph as aL, parseWorkspaceDeletedStream as aM, parseWorkspaceMemberRemoved as aN, publishTaxonomyEvent as aO, dlqKey as aP, streamKey as aQ, resolveEventStreamsUrl as aR, resolveEventStreamsUrlSource as aS, resolveGraphEventsUrl as aT, resolveGraphEventsUrlSource as aU, taxonomyEventNames as aV, taxonomyNameViolation as aW, type TaxonomyEventKind as aa, type TaxonomyEventLayer as ab, type TaxonomyEventPii as ac, type TaxonomyEventStatus as ad, type TaxonomyPayload as ae, type TaxonomyPublishMetadata as af, type UserDeletedPayload as ag, type VibecontrolsAgentConnectedPayload as ah, type VibecontrolsAgentDisconnectedPayload as ai, type VibecontrolsSessionEndedPayload as aj, type VibecontrolsSessionStartedPayload as ak, WSPACE_GRAPH_EVENTS_STREAM as al, type WorkflowRunCompletedPayload as am, type WorkflowRunFailedPayload as an, type WorkflowRunStartedPayload as ao, type WorkspaceCreatedPayload as ap, type WorkspaceDeletedFact as aq, type WorkspaceDeletedPayload as ar, type WorkspaceMemberAddedPayload as as, type WorkspaceMemberRemovedFact as at, type WorkspaceMemberRemovedPayload as au, type WorkspaceMemberRoleUpdatedPayload as av, buildConsumerGroupName as aw, createConsumer as ax, createEventsManagerSingleton as ay, createLifecycleConsumer as az, type ConsumerOptions as b, EVENT_STREAMS_URL_ENV_KEYS as c, EVENT_TAXONOMY_BRAND as d, type EventHandler as e, type EventMessage$1 as f, type EventMetadata as g, EventPriority as h, index as i, EventQueueFactory as j, type EventQueueHealthCheckResult as k, type EventSpec as l, type EventTaxonomy as m, EventsManager as n, type EventsManagerHandler as o, type EventsManagerMessage as p, type EventsManagerOptions as q, type EventsManagerSingleton as r, type EventsManagerStreamRoute as s, type EventsManagerSubscribeOptions as t, type GraphEntityEventPayload as u, type EventMessage as v, type IEventConsumer as w, type IEventQueue as x, type ISubscription as y, type LifecycleConsumer as z };
|