nestjs-temporal-core 2.0.4 → 2.0.6
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 +112 -10
- package/dist/client/index.d.ts +1 -0
- package/dist/client/index.js +1 -0
- package/dist/client/index.js.map +1 -1
- package/dist/client/temporal-client.module.js +12 -2
- package/dist/client/temporal-client.module.js.map +1 -1
- package/dist/client/temporal-client.service.d.ts +4 -0
- package/dist/client/temporal-client.service.js +56 -3
- package/dist/client/temporal-client.service.js.map +1 -1
- package/dist/{schedule → client}/temporal-schedule.service.d.ts +6 -7
- package/dist/{schedule → client}/temporal-schedule.service.js +52 -38
- package/dist/client/temporal-schedule.service.js.map +1 -0
- package/dist/constants.d.ts +55 -0
- package/dist/constants.js +49 -1
- package/dist/constants.js.map +1 -1
- package/dist/decorators/activity-method.decorator.js.map +1 -1
- package/dist/decorators/activity.decorator.js.map +1 -1
- package/dist/decorators/index.d.ts +1 -0
- package/dist/decorators/index.js +1 -0
- package/dist/decorators/index.js.map +1 -1
- package/dist/decorators/query.decorator.js.map +1 -1
- package/dist/decorators/scheduled-workflow.decorator.js +3 -0
- package/dist/decorators/scheduled-workflow.decorator.js.map +1 -1
- package/dist/decorators/signal.decorator.js.map +1 -1
- package/dist/decorators/update.decorator.d.ts +2 -0
- package/dist/decorators/update.decorator.js +34 -0
- package/dist/decorators/update.decorator.js.map +1 -0
- package/dist/index.d.ts +9 -5
- package/dist/index.js +42 -5
- package/dist/index.js.map +1 -1
- package/dist/interfaces/activity.interface.d.ts +1 -0
- package/dist/interfaces/base.interface.d.ts +10 -1
- package/dist/interfaces/client.interface.d.ts +19 -3
- package/dist/interfaces/client.interface.js +11 -0
- package/dist/interfaces/client.interface.js.map +1 -1
- package/dist/interfaces/index.d.ts +5 -0
- package/dist/interfaces/index.js +14 -0
- package/dist/interfaces/index.js.map +1 -1
- package/dist/interfaces/schedule.interface.d.ts +23 -0
- package/dist/interfaces/worker.interface.d.ts +19 -3
- package/dist/interfaces/workflow.interface.d.ts +7 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/worker/temporal-metadata.accessor.d.ts +2 -0
- package/dist/worker/temporal-metadata.accessor.js +12 -0
- package/dist/worker/temporal-metadata.accessor.js.map +1 -1
- package/dist/worker/worker-manager.service.d.ts +3 -2
- package/dist/worker/worker-manager.service.js +50 -12
- package/dist/worker/worker-manager.service.js.map +1 -1
- package/package.json +4 -2
- package/dist/schedule/index.d.ts +0 -2
- package/dist/schedule/index.js +0 -19
- package/dist/schedule/index.js.map +0 -1
- package/dist/schedule/temporal-schedule.module.d.ts +0 -7
- package/dist/schedule/temporal-schedule.module.js +0 -94
- package/dist/schedule/temporal-schedule.module.js.map +0 -1
- package/dist/schedule/temporal-schedule.service.js.map +0 -1
|
@@ -4,3 +4,8 @@ export * from './worker.interface';
|
|
|
4
4
|
export * from './workflow.interface';
|
|
5
5
|
export * from './activity.interface';
|
|
6
6
|
export * from './schedule.interface';
|
|
7
|
+
export { RetryPolicy, Duration, SearchAttributes, VersioningIntent, LogLevel, } from '@temporalio/common';
|
|
8
|
+
export { ScheduleOverlapPolicy, WorkflowExecution, WorkflowHandle, Client, Connection, WorkflowClient, } from '@temporalio/client';
|
|
9
|
+
export { Worker, NativeConnection, Runtime, RuntimeOptions, WorkerOptions as TemporalWorkerSDKOptions, } from '@temporalio/worker';
|
|
10
|
+
export { Workflow, WorkflowInfo, ContinueAsNewOptions, ParentClosePolicy, ChildWorkflowOptions, } from '@temporalio/workflow';
|
|
11
|
+
export { ActivityInterface, Context as ActivityContext, Info as ActivityInfo, } from '@temporalio/activity';
|
package/dist/interfaces/index.js
CHANGED
|
@@ -14,10 +14,24 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.ActivityContext = exports.ParentClosePolicy = exports.Runtime = exports.NativeConnection = exports.Worker = exports.WorkflowClient = exports.Connection = exports.Client = exports.ScheduleOverlapPolicy = void 0;
|
|
17
18
|
__exportStar(require("./base.interface"), exports);
|
|
18
19
|
__exportStar(require("./client.interface"), exports);
|
|
19
20
|
__exportStar(require("./worker.interface"), exports);
|
|
20
21
|
__exportStar(require("./workflow.interface"), exports);
|
|
21
22
|
__exportStar(require("./activity.interface"), exports);
|
|
22
23
|
__exportStar(require("./schedule.interface"), exports);
|
|
24
|
+
var client_1 = require("@temporalio/client");
|
|
25
|
+
Object.defineProperty(exports, "ScheduleOverlapPolicy", { enumerable: true, get: function () { return client_1.ScheduleOverlapPolicy; } });
|
|
26
|
+
Object.defineProperty(exports, "Client", { enumerable: true, get: function () { return client_1.Client; } });
|
|
27
|
+
Object.defineProperty(exports, "Connection", { enumerable: true, get: function () { return client_1.Connection; } });
|
|
28
|
+
Object.defineProperty(exports, "WorkflowClient", { enumerable: true, get: function () { return client_1.WorkflowClient; } });
|
|
29
|
+
var worker_1 = require("@temporalio/worker");
|
|
30
|
+
Object.defineProperty(exports, "Worker", { enumerable: true, get: function () { return worker_1.Worker; } });
|
|
31
|
+
Object.defineProperty(exports, "NativeConnection", { enumerable: true, get: function () { return worker_1.NativeConnection; } });
|
|
32
|
+
Object.defineProperty(exports, "Runtime", { enumerable: true, get: function () { return worker_1.Runtime; } });
|
|
33
|
+
var workflow_1 = require("@temporalio/workflow");
|
|
34
|
+
Object.defineProperty(exports, "ParentClosePolicy", { enumerable: true, get: function () { return workflow_1.ParentClosePolicy; } });
|
|
35
|
+
var activity_1 = require("@temporalio/activity");
|
|
36
|
+
Object.defineProperty(exports, "ActivityContext", { enumerable: true, get: function () { return activity_1.Context; } });
|
|
23
37
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/interfaces/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/interfaces/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAQA,mDAAiC;AAGjC,qDAAmC;AAGnC,qDAAmC;AAGnC,uDAAqC;AAGrC,uDAAqC;AAGrC,uDAAqC;AAWrC,6CAO4B;AANxB,+GAAA,qBAAqB,OAAA;AAGrB,gGAAA,MAAM,OAAA;AACN,oGAAA,UAAU,OAAA;AACV,wGAAA,cAAc,OAAA;AAGlB,6CAM4B;AALxB,gGAAA,MAAM,OAAA;AACN,0GAAA,gBAAgB,OAAA;AAChB,iGAAA,OAAO,OAAA;AAKX,iDAM8B;AAF1B,6GAAA,iBAAiB,OAAA;AAIrB,iDAI8B;AAF1B,2GAAA,OAAO,OAAmB"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ModuleMetadata, Type } from '@nestjs/common';
|
|
2
|
+
import { ScheduleOverlapPolicy } from '@temporalio/client';
|
|
2
3
|
export interface TemporalScheduleOptions {
|
|
3
4
|
namespace?: string;
|
|
4
5
|
}
|
|
@@ -15,3 +16,25 @@ export interface ListSchedulesOptions {
|
|
|
15
16
|
pageSize?: number;
|
|
16
17
|
query?: string;
|
|
17
18
|
}
|
|
19
|
+
export interface ScheduleSpec {
|
|
20
|
+
cronExpressions?: string[];
|
|
21
|
+
intervals?: {
|
|
22
|
+
every: {
|
|
23
|
+
seconds?: number;
|
|
24
|
+
minutes?: number;
|
|
25
|
+
hours?: number;
|
|
26
|
+
days?: number;
|
|
27
|
+
};
|
|
28
|
+
}[];
|
|
29
|
+
}
|
|
30
|
+
export interface ScheduleAction {
|
|
31
|
+
workflowType: string;
|
|
32
|
+
taskQueue: string;
|
|
33
|
+
args?: any[];
|
|
34
|
+
memo?: Record<string, unknown>;
|
|
35
|
+
}
|
|
36
|
+
export interface BackfillOptions {
|
|
37
|
+
startTime: Date;
|
|
38
|
+
endTime: Date;
|
|
39
|
+
overlap?: ScheduleOverlapPolicy;
|
|
40
|
+
}
|
|
@@ -1,18 +1,34 @@
|
|
|
1
1
|
import { ModuleMetadata, Type } from '@nestjs/common';
|
|
2
|
-
import {
|
|
2
|
+
import { RuntimeOptions, DataConverter } from '@temporalio/worker';
|
|
3
|
+
import { ConnectionOptions } from './base.interface';
|
|
3
4
|
export interface TemporalWorkerOptions {
|
|
4
|
-
connection:
|
|
5
|
+
connection: ConnectionOptions;
|
|
5
6
|
namespace?: string;
|
|
6
7
|
taskQueue: string;
|
|
7
8
|
workflowsPath: string;
|
|
8
9
|
activityClasses?: Array<Type<any>>;
|
|
9
10
|
runtimeOptions?: RuntimeOptions;
|
|
10
|
-
|
|
11
|
+
reuseV8Context?: boolean;
|
|
12
|
+
maxConcurrentWorkflowTaskExecutions?: number;
|
|
13
|
+
maxConcurrentActivityTaskExecutions?: number;
|
|
14
|
+
maxConcurrentLocalActivityExecutions?: number;
|
|
15
|
+
maxConcurrentWorkflowTaskPolls?: number;
|
|
16
|
+
maxConcurrentActivityTaskPolls?: number;
|
|
17
|
+
maxCachedWorkflows?: number;
|
|
18
|
+
workflowThreadPoolSize?: number;
|
|
19
|
+
debugMode?: boolean;
|
|
20
|
+
showStackTraceSources?: boolean;
|
|
21
|
+
useVersioning?: boolean;
|
|
22
|
+
buildId?: string;
|
|
11
23
|
autoStart?: {
|
|
12
24
|
enabled?: boolean;
|
|
13
25
|
delayMs?: number;
|
|
14
26
|
};
|
|
15
27
|
allowWorkerFailure?: boolean;
|
|
28
|
+
maxActivitiesPerSecond?: number;
|
|
29
|
+
maxTaskQueueActivitiesPerSecond?: number;
|
|
30
|
+
dataConverter?: DataConverter;
|
|
31
|
+
workflowTaskTimeout?: string | number;
|
|
16
32
|
monitoring?: {
|
|
17
33
|
statsIntervalMs?: number;
|
|
18
34
|
metrics?: {
|
|
@@ -7,6 +7,9 @@ export interface WorkflowOptions {
|
|
|
7
7
|
workflowRunTimeout?: string | number;
|
|
8
8
|
workflowTaskTimeout?: string | number;
|
|
9
9
|
retry?: RetryPolicy;
|
|
10
|
+
cronSchedule?: string;
|
|
11
|
+
workflowIdReusePolicy?: 'ALLOW_DUPLICATE' | 'ALLOW_DUPLICATE_FAILED_ONLY' | 'REJECT_DUPLICATE';
|
|
12
|
+
workflowIdConflictPolicy?: 'FAIL' | 'USE_EXISTING' | 'TERMINATE_EXISTING';
|
|
10
13
|
}
|
|
11
14
|
export interface WorkflowMethodOptions {
|
|
12
15
|
name?: string;
|
|
@@ -17,3 +20,7 @@ export interface QueryMethodOptions {
|
|
|
17
20
|
export interface SignalMethodOptions {
|
|
18
21
|
name?: string;
|
|
19
22
|
}
|
|
23
|
+
export interface UpdateMethodOptions {
|
|
24
|
+
name?: string;
|
|
25
|
+
validator?: (...args: any[]) => void;
|
|
26
|
+
}
|