@dbos-inc/dbos-sdk 1.28.7-preview.gdb2d0f0508 → 1.29.83-preview.g0c5a5d6c8e

Sign up to get free protection for your applications and to get access to all the features.
Files changed (74) hide show
  1. package/dist/src/context.d.ts +36 -0
  2. package/dist/src/context.d.ts.map +1 -1
  3. package/dist/src/context.js +104 -1
  4. package/dist/src/context.js.map +1 -1
  5. package/dist/src/data_validation.d.ts.map +1 -1
  6. package/dist/src/data_validation.js +6 -2
  7. package/dist/src/data_validation.js.map +1 -1
  8. package/dist/src/dbos-executor.d.ts +36 -20
  9. package/dist/src/dbos-executor.d.ts.map +1 -1
  10. package/dist/src/dbos-executor.js +309 -21
  11. package/dist/src/dbos-executor.js.map +1 -1
  12. package/dist/src/dbos-runtime/runtime.d.ts +3 -8
  13. package/dist/src/dbos-runtime/runtime.d.ts.map +1 -1
  14. package/dist/src/dbos-runtime/runtime.js +7 -11
  15. package/dist/src/dbos-runtime/runtime.js.map +1 -1
  16. package/dist/src/dbos.d.ts +109 -0
  17. package/dist/src/dbos.d.ts.map +1 -0
  18. package/dist/src/dbos.js +551 -0
  19. package/dist/src/dbos.js.map +1 -0
  20. package/dist/src/debugger/debug_workflow.d.ts.map +1 -1
  21. package/dist/src/debugger/debug_workflow.js +5 -1
  22. package/dist/src/debugger/debug_workflow.js.map +1 -1
  23. package/dist/src/decorators.d.ts +11 -2
  24. package/dist/src/decorators.d.ts.map +1 -1
  25. package/dist/src/decorators.js +30 -8
  26. package/dist/src/decorators.js.map +1 -1
  27. package/dist/src/error.d.ts +6 -0
  28. package/dist/src/error.d.ts.map +1 -1
  29. package/dist/src/error.js +20 -2
  30. package/dist/src/error.js.map +1 -1
  31. package/dist/src/eventreceiver.d.ts +6 -2
  32. package/dist/src/eventreceiver.d.ts.map +1 -1
  33. package/dist/src/httpServer/handler.d.ts +0 -1
  34. package/dist/src/httpServer/handler.d.ts.map +1 -1
  35. package/dist/src/httpServer/handler.js +5 -13
  36. package/dist/src/httpServer/handler.js.map +1 -1
  37. package/dist/src/httpServer/middleware.d.ts +13 -2
  38. package/dist/src/httpServer/middleware.d.ts.map +1 -1
  39. package/dist/src/httpServer/middleware.js +101 -1
  40. package/dist/src/httpServer/middleware.js.map +1 -1
  41. package/dist/src/httpServer/server.d.ts +3 -2
  42. package/dist/src/httpServer/server.d.ts.map +1 -1
  43. package/dist/src/httpServer/server.js +40 -30
  44. package/dist/src/httpServer/server.js.map +1 -1
  45. package/dist/src/index.d.ts +2 -1
  46. package/dist/src/index.d.ts.map +1 -1
  47. package/dist/src/index.js +3 -3
  48. package/dist/src/index.js.map +1 -1
  49. package/dist/src/procedure.d.ts +1 -0
  50. package/dist/src/procedure.d.ts.map +1 -1
  51. package/dist/src/procedure.js.map +1 -1
  52. package/dist/src/scheduler/scheduler.d.ts.map +1 -1
  53. package/dist/src/scheduler/scheduler.js +3 -1
  54. package/dist/src/scheduler/scheduler.js.map +1 -1
  55. package/dist/src/system_database.d.ts.map +1 -1
  56. package/dist/src/system_database.js.map +1 -1
  57. package/dist/src/telemetry/logs.d.ts +11 -5
  58. package/dist/src/telemetry/logs.d.ts.map +1 -1
  59. package/dist/src/telemetry/logs.js +8 -11
  60. package/dist/src/telemetry/logs.js.map +1 -1
  61. package/dist/src/testing/testing_runtime.d.ts.map +1 -1
  62. package/dist/src/testing/testing_runtime.js +10 -4
  63. package/dist/src/testing/testing_runtime.js.map +1 -1
  64. package/dist/src/user_database.d.ts +1 -1
  65. package/dist/src/user_database.d.ts.map +1 -1
  66. package/dist/src/wfqueue.d.ts.map +1 -1
  67. package/dist/src/wfqueue.js +17 -2
  68. package/dist/src/wfqueue.js.map +1 -1
  69. package/dist/src/workflow.d.ts +7 -6
  70. package/dist/src/workflow.d.ts.map +1 -1
  71. package/dist/src/workflow.js +10 -187
  72. package/dist/src/workflow.js.map +1 -1
  73. package/dist/tsconfig.build.tsbuildinfo +1 -1
  74. package/package.json +5 -1
@@ -1,11 +1,46 @@
1
1
  /// <reference types="node" />
2
2
  /// <reference types="node" />
3
+ /// <reference types="node" />
3
4
  /// <reference types="node/http" />
4
5
  import { Span } from "@opentelemetry/sdk-trace-base";
5
6
  import { GlobalLogger as Logger, Logger as DBOSLogger } from "./telemetry/logs";
6
7
  import { IncomingHttpHeaders } from "http";
7
8
  import { ParsedUrlQuery } from "querystring";
9
+ import { UserDatabaseClient } from "./user_database";
8
10
  import { DBOSExecutor } from "./dbos-executor";
11
+ import { AsyncLocalStorage } from "async_hooks";
12
+ import { WorkflowContext, WorkflowContextImpl } from "./workflow";
13
+ import { TransactionContextImpl } from "./transaction";
14
+ import { StepContextImpl } from "./step";
15
+ export interface DBOSLocalCtx {
16
+ ctx?: DBOSContext;
17
+ parentCtx?: DBOSLocalCtx;
18
+ idAssignedForNextWorkflow?: string;
19
+ queueAssignedForWorkflows?: string;
20
+ parentWorkflowId?: string;
21
+ parentWorkflowFid?: number;
22
+ workflowId?: string;
23
+ functionId?: number;
24
+ inRecovery?: boolean;
25
+ curStepFunctionId?: number;
26
+ curTxFunctionId?: number;
27
+ sqlClient?: UserDatabaseClient;
28
+ span?: Span;
29
+ authenticatedUser?: string;
30
+ authenticatedRoles?: string[];
31
+ assumedRole?: string;
32
+ request?: HTTPRequest;
33
+ }
34
+ export declare const asyncLocalCtx: AsyncLocalStorage<DBOSLocalCtx>;
35
+ export declare function getCurrentContextStore(): DBOSLocalCtx | undefined;
36
+ export declare function getCurrentDBOSContext(): DBOSContext | undefined;
37
+ export declare function assertCurrentDBOSContext(): DBOSContext;
38
+ export declare function assertCurrentWorkflowContext(): WorkflowContextImpl;
39
+ export declare function runWithDBOSContext<R>(ctx: DBOSContext, callback: () => Promise<R>): Promise<R>;
40
+ export declare function runWithTopContext<R>(ctx: DBOSLocalCtx, callback: () => Promise<R>): Promise<R>;
41
+ export declare function runWithTransactionContext<Client extends UserDatabaseClient, R>(ctx: TransactionContextImpl<Client>, callback: () => Promise<R>): Promise<R>;
42
+ export declare function runWithStepContext<R>(ctx: StepContextImpl, callback: () => Promise<R>): Promise<R>;
43
+ export declare function runWithWorkflowContext<R>(ctx: WorkflowContext, callback: () => Promise<R>): Promise<R>;
9
44
  export interface HTTPRequest {
10
45
  readonly headers?: IncomingHttpHeaders;
11
46
  readonly rawHeaders?: string[];
@@ -15,6 +50,7 @@ export interface HTTPRequest {
15
50
  readonly query?: ParsedUrlQuery;
16
51
  readonly querystring?: string;
17
52
  readonly url?: string;
53
+ readonly method?: string;
18
54
  readonly ip?: string;
19
55
  readonly requestID?: string;
20
56
  }
@@ -1 +1 @@
1
- {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/context.ts"],"names":[],"mappings":";;;AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,+BAA+B,CAAC;AACrD,OAAO,EAAE,YAAY,IAAI,MAAM,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEhF,OAAO,EAAE,mBAAmB,EAAE,MAAM,MAAM,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE7C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAI/C,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,OAAO,CAAC,EAAE,mBAAmB,CAAC;IACvC,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IAC/B,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,KAAK,CAAC,EAAE,cAAc,CAAC;IAChC,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,WAAW;IA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EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,CAAC,EAAE,CAAC;IAI/D,SAAS,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,CAAC,GAAG,SAAS;IACxC,SAAS,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,YAAY,EAAE,CAAC,GAAG,CAAC;CAS9C"}
@@ -1,9 +1,112 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.InitContext = exports.DBOSContextImpl = void 0;
3
+ exports.InitContext = exports.DBOSContextImpl = exports.runWithWorkflowContext = exports.runWithStepContext = exports.runWithTransactionContext = exports.runWithTopContext = exports.runWithDBOSContext = exports.assertCurrentWorkflowContext = exports.assertCurrentDBOSContext = exports.getCurrentDBOSContext = exports.getCurrentContextStore = exports.asyncLocalCtx = void 0;
4
4
  const logs_1 = require("./telemetry/logs");
5
5
  const lodash_1 = require("lodash");
6
6
  const error_1 = require("./error");
7
+ const async_hooks_1 = require("async_hooks");
8
+ const error_2 = require("./error");
9
+ function isWithinWorkflowCtx(ctx) {
10
+ if (ctx.workflowId === undefined)
11
+ return false;
12
+ return true;
13
+ }
14
+ function isInStepCtx(ctx) {
15
+ if (ctx.workflowId === undefined)
16
+ return false;
17
+ if (ctx.curStepFunctionId)
18
+ return true;
19
+ return false;
20
+ }
21
+ function isInTxnCtx(ctx) {
22
+ if (ctx.workflowId === undefined)
23
+ return false;
24
+ if (ctx.curTxFunctionId)
25
+ return true;
26
+ return false;
27
+ }
28
+ function isInWorkflowCtx(ctx) {
29
+ if (!isWithinWorkflowCtx(ctx))
30
+ return false;
31
+ if (isInStepCtx(ctx))
32
+ return false;
33
+ if (isInTxnCtx(ctx))
34
+ return false;
35
+ return true;
36
+ }
37
+ exports.asyncLocalCtx = new async_hooks_1.AsyncLocalStorage();
38
+ function getCurrentContextStore() {
39
+ return exports.asyncLocalCtx.getStore();
40
+ }
41
+ exports.getCurrentContextStore = getCurrentContextStore;
42
+ function getCurrentDBOSContext() {
43
+ return exports.asyncLocalCtx.getStore()?.ctx;
44
+ }
45
+ exports.getCurrentDBOSContext = getCurrentDBOSContext;
46
+ function assertCurrentDBOSContext() {
47
+ const ctx = exports.asyncLocalCtx.getStore()?.ctx;
48
+ if (!ctx)
49
+ throw new error_1.DBOSNotRegisteredError("No current DBOS Context");
50
+ return ctx;
51
+ }
52
+ exports.assertCurrentDBOSContext = assertCurrentDBOSContext;
53
+ function assertCurrentWorkflowContext() {
54
+ const ctx = assertCurrentDBOSContext();
55
+ if (!isInWorkflowCtx(exports.asyncLocalCtx.getStore())) {
56
+ throw new error_2.DBOSInvalidWorkflowTransitionError();
57
+ }
58
+ return ctx;
59
+ }
60
+ exports.assertCurrentWorkflowContext = assertCurrentWorkflowContext;
61
+ async function runWithDBOSContext(ctx, callback) {
62
+ return await exports.asyncLocalCtx.run({
63
+ ctx,
64
+ workflowId: ctx.workflowUUID,
65
+ }, callback);
66
+ }
67
+ exports.runWithDBOSContext = runWithDBOSContext;
68
+ async function runWithTopContext(ctx, callback) {
69
+ return await exports.asyncLocalCtx.run(ctx, callback);
70
+ }
71
+ exports.runWithTopContext = runWithTopContext;
72
+ async function runWithTransactionContext(ctx, callback) {
73
+ // Check we are in a workflow context and not in a step / transaction already
74
+ const pctx = getCurrentContextStore();
75
+ if (!pctx)
76
+ throw new error_2.DBOSInvalidWorkflowTransitionError();
77
+ if (!isInWorkflowCtx(pctx))
78
+ throw new error_2.DBOSInvalidWorkflowTransitionError();
79
+ return await exports.asyncLocalCtx.run({
80
+ ctx,
81
+ workflowId: ctx.workflowUUID,
82
+ curTxFunctionId: ctx.functionID,
83
+ parentCtx: pctx,
84
+ }, callback);
85
+ }
86
+ exports.runWithTransactionContext = runWithTransactionContext;
87
+ async function runWithStepContext(ctx, callback) {
88
+ // Check we are in a workflow context and not in a step / transaction already
89
+ const pctx = getCurrentContextStore();
90
+ if (!pctx)
91
+ throw new error_2.DBOSInvalidWorkflowTransitionError();
92
+ if (!isInWorkflowCtx(pctx))
93
+ throw new error_2.DBOSInvalidWorkflowTransitionError();
94
+ return await exports.asyncLocalCtx.run({
95
+ ctx,
96
+ workflowId: ctx.workflowUUID,
97
+ curStepFunctionId: ctx.functionID,
98
+ parentCtx: pctx,
99
+ }, callback);
100
+ }
101
+ exports.runWithStepContext = runWithStepContext;
102
+ async function runWithWorkflowContext(ctx, callback) {
103
+ // TODO: Check context, this could be a child workflow?
104
+ return await exports.asyncLocalCtx.run({
105
+ ctx,
106
+ workflowId: ctx.workflowUUID,
107
+ }, callback);
108
+ }
109
+ exports.runWithWorkflowContext = runWithWorkflowContext;
7
110
  class DBOSContextImpl {
8
111
  operationName;
9
112
  span;
@@ -1 +1 @@
1
- {"version":3,"file":"context.js","sourceRoot":"","sources":["../../src/context.ts"],"names":[],"mappings":";;;AACA,2CAAgF;AAChF,mCAA6B;AAK7B,mCAAiD;AA8BjD,MAAa,eAAe;IAWL;IAAgC;IAVrD,OAAO,GAAgB,EAAE,CAAC,CAAM,6BAA6B;IAC7D,iBAAiB,GAAW,EAAE,CAAC,CAAK,uCAAuC;IAC3E,kBAAkB,GAAa,EAAE,CAAC,CAAK,qDAAqD;IAC5F,WAAW,GAAW,EAAE,CAAC,CAAM,6EAA6E;IAC5G,YAAY,GAAW,EAAE,CAAC,CAAM,4CAA4C;IAC5E,UAAU,GAAW,OAAO,CAAC,GAAG,CAAC,UAAU,IAAI,OAAO,CAAC,CAAE,mEAAmE;IAC5H,kBAAkB,GAAW,OAAO,CAAC,GAAG,CAAC,gBAAgB,IAAI,EAAE,CAAC,CAAC,yEAAyE;IAC1I,aAAa,GAAW,OAAO,CAAC,GAAG,CAAC,WAAW,IAAI,EAAE,CAAC,CAAE,oEAAoE;IACnH,MAAM,CAAa,CAAM,qDAAqD;IAEvF,YAAqB,aAAqB,EAAW,IAAU,EAAE,MAAc,EAAE,SAA2B;QAAvF,kBAAa,GAAb,aAAa,CAAQ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MAAM,CAAC,CAAC;IACjD,CAAC;IAID,SAAS,CAAI,GAAW,EAAE,YAAgB;QACxC,MAAM,KAAK,GAAG,IAAA,YAAG,EAAC,IAAI,CAAC,WAAW,EAAE,GAAG,EAAE,YAAY,CAAC,CAAC;QACvD,sGAAsG;QACtG,IAAI,KAAK,IAAI,YAAY,IAAI,OAAO,KAAK,KAAK,OAAO,YAAY,EAAE,CAAC;YAClE,MAAM,IAAI,8BAAsB,CAAC,GAAG,EAAE,OAAO,YAAY,EAAE,OAAO,KAAK,CAAC,CAAC;QAC3E,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;CACF;AArCD,kCAqCC"}
@@ -1 +1 @@
1
- {"version":3,"file":"data_validation.d.ts","sourceRoot":"","sources":["../../src/data_validation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAsB,MAAM,cAAc,CAAC;AAI1E,wBAAgB,kBAAkB,CAAC,IAAI,SAAS,OAAO,EAAE,EAAE,OAAO,EAAE,sBAAsB,EAAE,IAAI,EAAE,IAAI,QA4KrG"}
1
+ {"version":3,"file":"data_validation.d.ts","sourceRoot":"","sources":["../../src/data_validation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAsB,MAAM,cAAc,CAAC;AAI1E,wBAAgB,kBAAkB,CAAC,IAAI,SAAS,OAAO,EAAE,EAAE,OAAO,EAAE,sBAAsB,EAAE,IAAI,EAAE,IAAI,QA+KrG"}
@@ -2,17 +2,21 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.validateMethodArgs = void 0;
4
4
  const decorators_1 = require("./decorators");
5
+ const context_1 = require("./context");
5
6
  const error_1 = require("./error");
6
7
  function validateMethodArgs(methReg, args) {
7
8
  let opCtx = undefined;
9
+ if (!methReg.passContext) {
10
+ opCtx = (0, context_1.getCurrentDBOSContext)();
11
+ }
8
12
  const validationError = (msg) => {
9
13
  const err = new error_1.DBOSDataValidationError(msg);
10
- opCtx?.span.addEvent("DataValidationError", { message: err.message });
14
+ opCtx?.span?.addEvent("DataValidationError", { message: err.message });
11
15
  return err;
12
16
  };
13
17
  // Input validation
14
18
  methReg.args.forEach((argDescriptor, idx) => {
15
- if (idx === 0) {
19
+ if (idx === 0 && methReg.passContext) {
16
20
  // Context, may find a more robust way.
17
21
  opCtx = args[idx];
18
22
  return;
@@ -1 +1 @@
1
- {"version":3,"file":"data_validation.js","sourceRoot":"","sources":["../../src/data_validation.ts"],"names":[],"mappings":";;;AAAA,6CAA0E;AAE1E,mCAAkD;AAElD,SAAgB,kBAAkB,CAAyB,OAA+B,EAAE,IAAU;IAElG,IAAI,KAAK,GAAiC,SAAS,CAAC;IAEpD,MAAM,eAAe,GAAG,CAAC,GAAU,EAAE,EAAE;QACnC,MAAM,GAAG,GAAG,IAAI,+BAAuB,CAAC,GAAG,CAAC,CAAC;QAC7C,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,qBAAqB,EAAE,EAAE,OAAO,EAAE,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC;QACtE,OAAO,GAAG,CAAC;IACf,CAAC,CAAA;IAED,mBAAmB;IACnB,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,aAAa,EAAE,GAAG,EAAE,EAAE;QACxC,IAAI,GAAG,KAAK,CAAC,EACb,CAAC;YACC,uCAAuC;YACvC,KAAK,GAAG,IAAI,CAAC,GAAG,CAAoB,CAAC;YACrC,OAAO;QACT,CAAC;QAED,2BAA2B;QAC3B,IAAI,GAAG,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;YACvB,IAAI,aAAa,CAAC,QAAQ,KAAK,+BAAkB,CAAC,QAAQ;gBACvD,aAAa,CAAC,QAAQ,KAAK,+BAAkB,CAAC,OAAO,IAAI,OAAO,CAAC,QAAQ,EAAE,kBAAkB,KAAK,+BAAkB,CAAC,QAAQ,EAChI,CAAC;gBACC,MAAM,eAAe,CAAC,4CAA4C,OAAO,CAAC,IAAI,MAAM,IAAI,CAAC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C,CAAC;IACH,OAAO,IAAI,CAAC;AAChB,CAAC;AA/KD,gDA+KC"}
@@ -1,5 +1,5 @@
1
1
  /// <reference types="node" />
2
- import { Workflow, WorkflowConfig, WorkflowHandle, WorkflowParams, WorkflowStatus, BufferedResult } from './workflow';
2
+ import { Workflow, WorkflowConfig, WorkflowHandle, WorkflowParams, WorkflowContextImpl, WorkflowStatus, BufferedResult, GetWorkflowQueueInput, GetWorkflowQueueOutput } from './workflow';
3
3
  import { Transaction, TransactionConfig } from './transaction';
4
4
  import { StepConfig, StepFunction } from './step';
5
5
  import { TelemetryCollector } from './telemetry/collector';
@@ -11,7 +11,7 @@ import { SystemDatabase } from './system_database';
11
11
  import { UserDatabase, UserDatabaseName } from './user_database';
12
12
  import { MethodRegistrationBase, ConfiguredInstance } from './decorators';
13
13
  import { StoredProcedure, StoredProcedureConfig } from './procedure';
14
- import { DBOSEventReceiver, DBOSExecutorContext } from ".";
14
+ import { DBOSEventReceiver, DBOSExecutorContext, GetWorkflowsInput, GetWorkflowsOutput } from ".";
15
15
  import { DBOSScheduler } from './scheduler/scheduler';
16
16
  import { DBOSEventReceiverState, DBOSEventReceiverQuery, DBNotificationCallback, DBNotificationListener } from "./eventreceiver";
17
17
  export interface DBOSNull {
@@ -33,23 +33,27 @@ export interface DBOSConfig {
33
33
  readonly allowed_origins?: string[];
34
34
  };
35
35
  }
36
- interface WorkflowInfo {
36
+ interface WorkflowRegInfo {
37
37
  workflow: Workflow<unknown[], unknown>;
38
38
  config: WorkflowConfig;
39
+ registration?: MethodRegistrationBase;
39
40
  }
40
- interface TransactionInfo {
41
+ interface TransactionRegInfo {
41
42
  transaction: Transaction<unknown[], unknown>;
42
43
  config: TransactionConfig;
44
+ registration: MethodRegistrationBase;
43
45
  }
44
- interface StepInfo {
46
+ interface StepRegInfo {
45
47
  step: StepFunction<unknown[], unknown>;
46
48
  config: StepConfig;
49
+ registration: MethodRegistrationBase;
47
50
  }
48
- interface ProcedureInfo {
51
+ interface ProcedureRegInfo {
49
52
  procedure: StoredProcedure<unknown>;
50
53
  config: StoredProcedureConfig;
54
+ registration: MethodRegistrationBase;
51
55
  }
52
- interface InternalWorkflowParams extends WorkflowParams {
56
+ export interface InternalWorkflowParams extends WorkflowParams {
53
57
  readonly tempWfType?: string;
54
58
  readonly tempWfName?: string;
55
59
  readonly tempWfClass?: string;
@@ -69,10 +73,10 @@ export declare class DBOSExecutor implements DBOSExecutorContext {
69
73
  readonly systemDatabase: SystemDatabase;
70
74
  readonly procedurePool: Pool;
71
75
  static readonly tempWorkflowName = "temp_workflow";
72
- readonly workflowInfoMap: Map<string, WorkflowInfo>;
73
- readonly transactionInfoMap: Map<string, TransactionInfo>;
74
- readonly stepInfoMap: Map<string, StepInfo>;
75
- readonly procedureInfoMap: Map<string, ProcedureInfo>;
76
+ readonly workflowInfoMap: Map<string, WorkflowRegInfo>;
77
+ readonly transactionInfoMap: Map<string, TransactionRegInfo>;
78
+ readonly stepInfoMap: Map<string, StepRegInfo>;
79
+ readonly procedureInfoMap: Map<string, ProcedureRegInfo>;
76
80
  readonly registeredOperations: Array<MethodRegistrationBase>;
77
81
  readonly pendingWorkflowMap: Map<string, Promise<unknown>>;
78
82
  readonly workflowResultBuffer: Map<string, Map<number, BufferedResult>>;
@@ -91,7 +95,9 @@ export declare class DBOSExecutor implements DBOSExecutorContext {
91
95
  [key: string]: object;
92
96
  };
93
97
  eventReceivers: DBOSEventReceiver[];
94
- scheduler: DBOSScheduler | null;
98
+ scheduler?: DBOSScheduler;
99
+ wfqEnded?: Promise<void>;
100
+ static globalInstance: DBOSExecutor | undefined;
95
101
  constructor(config: DBOSConfig, systemDatabase?: SystemDatabase);
96
102
  configureDbClient(): void;
97
103
  getRegistrationsFor(obj: DBOSEventReceiver): {
@@ -102,23 +108,23 @@ export declare class DBOSExecutor implements DBOSExecutorContext {
102
108
  init(classes?: object[]): Promise<void>;
103
109
  callProcedure<R extends QueryResultRow = any>(proc: StoredProcedure<unknown>, args: unknown[]): Promise<R[]>;
104
110
  destroy(): Promise<void>;
105
- getWorkflowInfo(wf: Workflow<unknown[], unknown>): WorkflowInfo | undefined;
111
+ getWorkflowInfo(wf: Workflow<unknown[], unknown>): WorkflowRegInfo | undefined;
106
112
  getWorkflowInfoByStatus(wf: WorkflowStatus): {
107
- wfInfo: WorkflowInfo | undefined;
113
+ wfInfo: WorkflowRegInfo | undefined;
108
114
  configuredInst: ConfiguredInstance | null;
109
115
  };
110
- getTransactionInfo(tf: Transaction<unknown[], unknown>): TransactionInfo | undefined;
116
+ getTransactionInfo(tf: Transaction<unknown[], unknown>): TransactionRegInfo | undefined;
111
117
  getTransactionInfoByNames(className: string, functionName: string, cfgName: string): {
112
- txnInfo: TransactionInfo | undefined;
118
+ txnInfo: TransactionRegInfo | undefined;
113
119
  clsInst: ConfiguredInstance | null;
114
120
  };
115
- getStepInfo(cf: StepFunction<unknown[], unknown>): StepInfo | undefined;
121
+ getStepInfo(cf: StepFunction<unknown[], unknown>): StepRegInfo | undefined;
116
122
  getStepInfoByNames(className: string, functionName: string, cfgName: string): {
117
- commInfo: StepInfo | undefined;
123
+ commInfo: StepRegInfo | undefined;
118
124
  clsInst: ConfiguredInstance | null;
119
125
  };
120
126
  getProcedureClassName(pf: StoredProcedure<unknown>): string;
121
- getProcedureInfo(pf: StoredProcedure<unknown>): ProcedureInfo | undefined;
127
+ getProcedureInfo(pf: StoredProcedure<unknown>): ProcedureRegInfo | undefined;
122
128
  workflow<T extends unknown[], R>(wf: Workflow<T, R>, params: InternalWorkflowParams, ...args: T): Promise<WorkflowHandle<R>>;
123
129
  internalWorkflow<T extends unknown[], R>(wf: Workflow<T, R>, params: InternalWorkflowParams, callerUUID?: string, callerFunctionID?: number, ...args: T): Promise<WorkflowHandle<R>>;
124
130
  /**
@@ -126,9 +132,16 @@ export declare class DBOSExecutor implements DBOSExecutorContext {
126
132
  */
127
133
  debugWorkflow<T extends unknown[], R>(wf: Workflow<T, R>, params: WorkflowParams, callerUUID?: string, callerFunctionID?: number, ...args: T): Promise<WorkflowHandle<R>>;
128
134
  transaction<T extends unknown[], R>(txn: Transaction<T, R>, params: WorkflowParams, ...args: T): Promise<R>;
135
+ callTransactionFunction<T extends unknown[], R>(txn: Transaction<T, R>, clsinst: ConfiguredInstance | null, wfCtx: WorkflowContextImpl, ...args: T): Promise<R>;
129
136
  procedure<R>(proc: StoredProcedure<R>, params: WorkflowParams, ...args: unknown[]): Promise<R>;
130
137
  executeProcedure<R>(func: (client: PoolClient) => Promise<R>, config: TransactionConfig): Promise<R>;
131
138
  external<T extends unknown[], R>(stepFn: StepFunction<T, R>, params: WorkflowParams, ...args: T): Promise<R>;
139
+ /**
140
+ * Execute a step function.
141
+ * If it encounters any error, retry according to its configured retry policy until the maximum number of attempts is reached, then throw an DBOSError.
142
+ * The step may execute many times, but once it is complete, it will not re-execute.
143
+ */
144
+ callStepFunction<T extends unknown[], R>(stepFn: StepFunction<T, R>, clsInst: ConfiguredInstance | null, wfCtx: WorkflowContextImpl, ...args: T): Promise<R>;
132
145
  send<T>(destinationUUID: string, message: T, topic?: string, idempotencyKey?: string): Promise<void>;
133
146
  /**
134
147
  * Wait for a workflow to emit an event, then return its value.
@@ -137,7 +150,10 @@ export declare class DBOSExecutor implements DBOSExecutorContext {
137
150
  /**
138
151
  * Retrieve a handle for a workflow UUID.
139
152
  */
140
- retrieveWorkflow<R>(workflowUUID: string): WorkflowHandle<R>;
153
+ retrieveWorkflow<R>(workflowID: string): WorkflowHandle<R>;
154
+ getWorkflowStatus(workflowID: string): Promise<WorkflowStatus | null>;
155
+ getWorkflows(input: GetWorkflowsInput): Promise<GetWorkflowsOutput>;
156
+ getWorkflowQueue(input: GetWorkflowQueueInput): Promise<GetWorkflowQueueOutput>;
141
157
  queryUserDB(sql: string, params?: unknown[]): Promise<unknown[]>;
142
158
  userDBListen(channels: string[], callback: DBNotificationCallback): Promise<DBNotificationListener>;
143
159
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"dbos-executor.d.ts","sourceRo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