@dbos-inc/dbos-enterprise 0.0.1 → 5.3.2-preview

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,7 +1,9 @@
1
1
  # DBOS Enterprise for TypeScript
2
2
 
3
- Closed-source extension of [DBOS Transact](https://github.com/dbos-inc/dbos-transact-ts).
4
- Requires a DBOS Conductor API key.
3
+ Closed-source extension of [DBOS Transact](https://github.com/dbos-inc/dbos-transact-ts)
4
+ that connects applications to DBOS Conductor. Requires a DBOS Conductor API key.
5
+ DBOS loads it automatically when you pass `conductorKey` to `DBOS.launch`, or
6
+ when running in DBOS Cloud.
5
7
  Licensed under the [DBOS Conductor Software License](https://www.dbos.dev/conductor-license).
6
8
 
7
9
  ```
@@ -0,0 +1,39 @@
1
+ /// <reference types="node" />
2
+ /// <reference types="node" />
3
+ import { DBOSExecutor } from '@dbos-inc/dbos-sdk/internal/dbos-executor';
4
+ import WebSocket from 'ws';
5
+ import type { ConductorConnection, ConductorOptions } from '@dbos-inc/dbos-sdk/internal/enterprise';
6
+ interface IntervalTimeout {
7
+ interval: NodeJS.Timeout | undefined;
8
+ timeout: NodeJS.Timeout | undefined;
9
+ }
10
+ export declare class ConductorWebsocket implements ConductorConnection {
11
+ readonly dbosExec: DBOSExecutor;
12
+ url: string;
13
+ websocket: WebSocket | undefined;
14
+ isShuttingDown: boolean;
15
+ pingPeriodMs: number;
16
+ pingTimeoutMs: number;
17
+ pingIntervalTimeout: IntervalTimeout | undefined;
18
+ reconnectDelayMs: number;
19
+ reconnectTimeout: NodeJS.Timeout | undefined;
20
+ retentionRound: Promise<void> | undefined;
21
+ readonly appName: string;
22
+ readonly executorMetadata?: Record<string, unknown>;
23
+ readonly metadataOnlyMode: boolean;
24
+ constructor(dbosExec: DBOSExecutor, options: ConductorOptions);
25
+ start(): void;
26
+ /** Logs a command's exception in full and returns the error message Conductor may see. */
27
+ reportException(context: string, e: unknown): string;
28
+ resetWebsocket(currWebsocket?: WebSocket, currPing?: IntervalTimeout): void;
29
+ setPingInterval(currWebsocket: WebSocket, currPing: IntervalTimeout): void;
30
+ dispatchLoop(): void;
31
+ /**
32
+ * Give a round in flight a bounded chance to finish before shutdown takes the system
33
+ * database away from it.
34
+ */
35
+ awaitRetention(timeoutMs?: number): Promise<void>;
36
+ stop(): Promise<void>;
37
+ }
38
+ export {};
39
+ //# sourceMappingURL=conductor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conductor.d.ts","sourceRoot":"","sources":["../../../src/conductor/conductor.ts"],"names":[],"mappings":";;AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC;AAGzE,OAAO,SAAS,MAAM,IAAI,CAAC;AAO3B,OAAO,KAAK,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AA2BpG,UAAU,eAAe;IACvB,QAAQ,EAAE,MAAM,CAAC,OAAO,GAAG,SAAS,CAAC;IACrC,OAAO,EAAE,MAAM,CAAC,OAAO,GAAG,SAAS,CAAC;CACrC;AAED,qBAAa,kBAAmB,YAAW,mBAAmB;IAiB1D,QAAQ,CAAC,QAAQ,EAAE,YAAY;IAhBjC,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,SAAS,GAAG,SAAS,CAAa;IAC7C,cAAc,UAAS;IACvB,YAAY,SAAS;IACrB,aAAa,SAAS;IACtB,mBAAmB,EAAE,eAAe,GAAG,SAAS,CAAa;IAC7D,gBAAgB,SAAQ;IACxB,gBAAgB,EAAE,MAAM,CAAC,OAAO,GAAG,SAAS,CAAa;IAEzD,cAAc,EAAE,OAAO,CAAC,IAAI,CAAC,GAAG,SAAS,CAAa;IAEtD,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACpD,QAAQ,CAAC,gBAAgB,EAAE,OAA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