@chevre/domain 26.0.0-alpha.11 → 26.0.0-alpha.13

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.
@@ -1,7 +1,7 @@
1
1
  import type { AnyKeys, Connection, FilterQuery, ProjectionType } from 'mongoose';
2
2
  import { factory } from '../factory';
3
3
  import { IDocType } from './mongoose/schemas/task';
4
- type IKeyOfProjection = keyof factory.task.ITask<factory.taskName> | 'expires';
4
+ type IKeyOfProjection = keyof factory.task.ITask<factory.taskName>;
5
5
  /**
6
6
  * タスク管理リポジトリ
7
7
  */
@@ -17,13 +17,13 @@ export declare class AdminTaskRepo {
17
17
  */
18
18
  findTasks(params: factory.task.ISearchConditions, inclusion: IKeyOfProjection[]): Promise<factory.task.ITask<factory.taskName>[]>;
19
19
  getCursor(conditions: FilterQuery<factory.task.ITask<factory.taskName>>, projection: ProjectionType<factory.task.ITask<factory.taskName>>): import("mongoose").Cursor<import("mongoose").Document<unknown, Record<string, never>, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & Omit<import("@chevre/factory/lib/chevre/task").ITask | import("@chevre/factory/lib/chevre/task/confirmPayTransaction").ITask | import("@chevre/factory/lib/chevre/task/confirmReserveTransaction").ITask | import("@chevre/factory/lib/chevre/task/createAccountingReport").ITask | import("@chevre/factory/lib/chevre/task/onAssetTransactionStatusChanged").ITask | import("@chevre/factory/lib/chevre/task/onAuthorizationCreated").ITask | import("@chevre/factory/lib/chevre/task/onEventChanged").ITask | import("@chevre/factory/lib/chevre/task/onResourceDeleted").ITask | import("@chevre/factory/lib/chevre/task/onResourceUpdated").ITask | import("@chevre/factory/lib/chevre/task/onOrderPaymentCompleted").ITask | import("@chevre/factory/lib/chevre/task/placeOrder").ITask | import("@chevre/factory/lib/chevre/task/returnOrder").ITask | import("@chevre/factory/lib/chevre/task/returnPayTransaction").ITask | import("@chevre/factory/lib/chevre/task/returnReserveTransaction").ITask | import("@chevre/factory/lib/chevre/task/sendEmailMessage").ITask | import("@chevre/factory/lib/chevre/task/sendOrder").ITask | import("@chevre/factory/lib/chevre/task/triggerWebhook").ITask | import("@chevre/factory/lib/chevre/task/useReservation").ITask | import("@chevre/factory/lib/chevre/task/voidPayTransaction").ITask, "id"> & {
20
- expires?: Date;
20
+ expires?: never;
21
21
  } & {
22
22
  _id: import("mongoose").Types.ObjectId;
23
23
  } & {
24
24
  __v: number;
25
25
  }, import("mongoose").QueryOptions<IDocType>, (import("mongoose").Document<unknown, Record<string, never>, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & Omit<import("@chevre/factory/lib/chevre/task").ITask | import("@chevre/factory/lib/chevre/task/confirmPayTransaction").ITask | import("@chevre/factory/lib/chevre/task/confirmReserveTransaction").ITask | import("@chevre/factory/lib/chevre/task/createAccountingReport").ITask | import("@chevre/factory/lib/chevre/task/onAssetTransactionStatusChanged").ITask | import("@chevre/factory/lib/chevre/task/onAuthorizationCreated").ITask | import("@chevre/factory/lib/chevre/task/onEventChanged").ITask | import("@chevre/factory/lib/chevre/task/onResourceDeleted").ITask | import("@chevre/factory/lib/chevre/task/onResourceUpdated").ITask | import("@chevre/factory/lib/chevre/task/onOrderPaymentCompleted").ITask | import("@chevre/factory/lib/chevre/task/placeOrder").ITask | import("@chevre/factory/lib/chevre/task/returnOrder").ITask | import("@chevre/factory/lib/chevre/task/returnPayTransaction").ITask | import("@chevre/factory/lib/chevre/task/returnReserveTransaction").ITask | import("@chevre/factory/lib/chevre/task/sendEmailMessage").ITask | import("@chevre/factory/lib/chevre/task/sendOrder").ITask | import("@chevre/factory/lib/chevre/task/triggerWebhook").ITask | import("@chevre/factory/lib/chevre/task/useReservation").ITask | import("@chevre/factory/lib/chevre/task/voidPayTransaction").ITask, "id"> & {
26
- expires?: Date;
26
+ expires?: never;
27
27
  } & {
28
28
  _id: import("mongoose").Types.ObjectId;
29
29
  } & {
@@ -4,6 +4,7 @@ exports.AdminTaskRepo = void 0;
4
4
  const factory_1 = require("../factory");
5
5
  const settings_1 = require("../settings");
6
6
  const task_1 = require("./mongoose/schemas/task");
7
+ // | 'expires'; // 非同期アクションは移行につきexpires廃止(2026-08-05~)
7
8
  const AVAILABLE_PROJECT_FIELDS = [
8
9
  'alternateName',
9
10
  'identifier',
@@ -19,7 +20,7 @@ const AVAILABLE_PROJECT_FIELDS = [
19
20
  'executor',
20
21
  'data',
21
22
  'dateAborted',
22
- 'expires'
23
+ // 'expires' // 非同期アクションは移行につきexpires廃止(2026-08-05~)
23
24
  ];
24
25
  /**
25
26
  * タスク管理リポジトリ
@@ -32,8 +32,7 @@ interface IOnEventChanged {
32
32
  informEvent2agg?: factory.project.IInformParams[];
33
33
  }
34
34
  export interface IStorageSettings {
35
- useScheduledDeleteTransactionTask?: boolean;
36
- deleteTransactionTaskExpiresInDays?: number;
35
+ deleteTransactionTaskExpiresInDays: number;
37
36
  /**
38
37
  * 取引保管期間(Confirmed)
39
38
  * default:365
@@ -2,10 +2,7 @@ import { IndexDefinition, IndexOptions, Model, Schema, SchemaDefinition } from '
2
2
  import { IVirtuals } from '../virtuals';
3
3
  import { factory } from '../../../factory';
4
4
  type IDocType = Omit<factory.task.ITask<factory.taskName>, 'id'> & {
5
- /**
6
- * 非同期アクション移行前のタスクには残っている(2026-07-29時点)
7
- */
8
- expires?: Date;
5
+ expires?: never;
9
6
  };
10
7
  type IModel = Model<IDocType, Record<string, never>, Record<string, never>, IVirtuals>;
11
8
  type ISchemaDefinition = SchemaDefinition<IDocType>;
@@ -22,7 +22,7 @@ const schemaDefinition = {
22
22
  executor: mongoose_1.SchemaTypes.Mixed,
23
23
  data: mongoose_1.SchemaTypes.Mixed,
24
24
  dateAborted: Date,
25
- expires: Date // add(2024-04-23~)
25
+ // expires: Date // add(2024-04-23~) // 非同期アクションは移行につきexpires廃止(2026-08-05~)
26
26
  };
27
27
  const schemaOptions = {
28
28
  autoIndex: settings_1.MONGO_AUTO_INDEX,
@@ -93,15 +93,16 @@ const indexes = [
93
93
  }
94
94
  }
95
95
  ],
96
- [
97
- { expires: 1, runsAt: -1 },
98
- {
99
- name: 'expires',
100
- partialFilterExpression: {
101
- expires: { $exists: true }
102
- }
103
- }
104
- ],
96
+ // 非同期アクションは移行につきexpires廃止(2026-08-05~)
97
+ // [
98
+ // { expires: 1, runsAt: -1 },
99
+ // {
100
+ // name: 'expires',
101
+ // partialFilterExpression: {
102
+ // expires: { $exists: true }
103
+ // }
104
+ // }
105
+ // ],
105
106
  [
106
107
  { remainingNumberOfTries: 1, runsAt: -1 },
107
108
  { name: 'searchByRemainingNumberOfTries-v2' }
@@ -195,15 +196,16 @@ const indexes = [
195
196
  }
196
197
  }
197
198
  ],
198
- [
199
- { status: 1, expires: 1 },
200
- {
201
- name: 'makeExpiredMany',
202
- partialFilterExpression: {
203
- expires: { $exists: true }
204
- }
205
- }
206
- ],
199
+ // 非同期アクションは移行につきexpires廃止(2026-08-05~)
200
+ // [
201
+ // { status: 1, expires: 1 },
202
+ // {
203
+ // name: 'makeExpiredMany',
204
+ // partialFilterExpression: {
205
+ // expires: { $exists: true }
206
+ // }
207
+ // }
208
+ // ],
207
209
  [
208
210
  // add unique index(2025-03-28~)
209
211
  { alternateName: 1 },
@@ -18,4 +18,10 @@ export declare class ScheduledTaskMigrationRepo {
18
18
  validationErrors: import("mongoose").Error[];
19
19
  } | undefined;
20
20
  }) | undefined>;
21
+ deleteLagacyTasks(params: {
22
+ limit: number;
23
+ }): Promise<import("mongodb").DeleteResult | undefined>;
24
+ deleteLagacyAsyncActions(params: {
25
+ limit: number;
26
+ }): Promise<import("mongodb").DeleteResult | undefined>;
21
27
  }
@@ -66,5 +66,56 @@ class ScheduledTaskMigrationRepo {
66
66
  }
67
67
  return result;
68
68
  }
69
+ async deleteLagacyTasks(params) {
70
+ const { limit } = params;
71
+ const deletingTasks = await this.taskModel.find({
72
+ name: {
73
+ $in: [
74
+ factory_1.factory.taskName.DeleteTransaction,
75
+ factory_1.factory.taskName.ImportEventsFromCOA,
76
+ factory_1.factory.taskName.ImportEventCapacitiesFromCOA
77
+ ]
78
+ }
79
+ }, { _id: 1 })
80
+ .limit(limit)
81
+ .lean()
82
+ .exec();
83
+ // console.log(deletingTasks);
84
+ if (deletingTasks.length === 0) {
85
+ return;
86
+ }
87
+ ;
88
+ return this.taskModel.deleteMany({
89
+ _id: { $in: deletingTasks.map((doc) => doc._id) }
90
+ })
91
+ .exec();
92
+ }
93
+ async deleteLagacyAsyncActions(params) {
94
+ const { limit } = params;
95
+ const deletingTasks = await this.taskModel.find({
96
+ name: {
97
+ $in: [
98
+ factory_1.factory.taskName.AcceptCOAOffer,
99
+ factory_1.factory.taskName.AuthorizePayment,
100
+ factory_1.factory.taskName.CheckMovieTicket,
101
+ factory_1.factory.taskName.PublishPaymentUrl,
102
+ factory_1.factory.taskName.VoidReserveTransaction
103
+ ]
104
+ },
105
+ expires: { $exists: true, $lte: new Date() }
106
+ }, { _id: 1 })
107
+ .limit(limit)
108
+ .lean()
109
+ .exec();
110
+ // console.log(deletingTasks);
111
+ if (deletingTasks.length === 0) {
112
+ return;
113
+ }
114
+ ;
115
+ return this.taskModel.deleteMany({
116
+ _id: { $in: deletingTasks.map((doc) => doc._id) }
117
+ })
118
+ .exec();
119
+ }
69
120
  }
70
121
  exports.ScheduledTaskMigrationRepo = ScheduledTaskMigrationRepo;
@@ -1,19 +1,19 @@
1
1
  import type { Connection, UpdateWriteOpResult } from 'mongoose';
2
2
  import { INextFunction } from '../eventEmitter/task';
3
3
  import { factory } from '../factory';
4
- import { IModel } from './mongoose/schemas/task';
4
+ import { IDocType } from './mongoose/schemas/task';
5
5
  import type { IExecutableTask } from '../taskSettings';
6
6
  /**
7
7
  * リトライ可能なタスク作成属性
8
8
  */
9
9
  type ICreatingTask = Pick<factory.task.IAttributes<factory.taskName>, 'data' | 'executionResults' | 'name' | 'numberOfTried' | 'project' | 'remainingNumberOfTries' | 'runsAt' | 'status' | 'identifier' | 'description'> & {
10
- expires?: Date;
10
+ expires?: never;
11
11
  };
12
12
  /**
13
13
  * タスクリポジトリ
14
14
  */
15
15
  export declare class TaskRepo {
16
- readonly taskModel: IModel;
16
+ private readonly taskModel;
17
17
  constructor(connection: Connection);
18
18
  saveMany(taskAttributes: ICreatingTask[]): Promise<{
19
19
  id: string;
@@ -31,6 +31,23 @@ export declare class TaskRepo {
31
31
  id: string;
32
32
  status: factory.taskStatus;
33
33
  } | undefined>;
34
+ /**
35
+ * イベント予約集計タスクの冗長な作成を避けるためのメソッド
36
+ */
37
+ findReadyAggregateEventTask(params: {
38
+ project: {
39
+ id: string;
40
+ };
41
+ reservationFor: {
42
+ id: string;
43
+ };
44
+ }): Promise<(import("mongoose").Document<unknown, Record<string, never>, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & Omit<import("@chevre/factory/lib/chevre/task").ITask | import("@chevre/factory/lib/chevre/task/confirmPayTransaction").ITask | import("@chevre/factory/lib/chevre/task/confirmReserveTransaction").ITask | import("@chevre/factory/lib/chevre/task/createAccountingReport").ITask | import("@chevre/factory/lib/chevre/task/onAssetTransactionStatusChanged").ITask | import("@chevre/factory/lib/chevre/task/onAuthorizationCreated").ITask | import("@chevre/factory/lib/chevre/task/onEventChanged").ITask | import("@chevre/factory/lib/chevre/task/onResourceDeleted").ITask | import("@chevre/factory/lib/chevre/task/onResourceUpdated").ITask | import("@chevre/factory/lib/chevre/task/onOrderPaymentCompleted").ITask | import("@chevre/factory/lib/chevre/task/placeOrder").ITask | import("@chevre/factory/lib/chevre/task/returnOrder").ITask | import("@chevre/factory/lib/chevre/task/returnPayTransaction").ITask | import("@chevre/factory/lib/chevre/task/returnReserveTransaction").ITask | import("@chevre/factory/lib/chevre/task/sendEmailMessage").ITask | import("@chevre/factory/lib/chevre/task/sendOrder").ITask | import("@chevre/factory/lib/chevre/task/triggerWebhook").ITask | import("@chevre/factory/lib/chevre/task/useReservation").ITask | import("@chevre/factory/lib/chevre/task/voidPayTransaction").ITask, "id"> & {
45
+ expires?: never;
46
+ } & {
47
+ _id: import("mongoose").Types.ObjectId;
48
+ } & {
49
+ __v: number;
50
+ }) | null>;
34
51
  /**
35
52
  * タスク識別子から冪等作成する
36
53
  * reimplement createIfNotExistByIdentifier(2025-03-28~)
@@ -52,7 +69,7 @@ export declare class TaskRepo {
52
69
  executor: {
53
70
  name: string;
54
71
  };
55
- expires?: Date;
72
+ expires?: never;
56
73
  }): Promise<IExecutableTask<factory.taskName> | null>;
57
74
  /**
58
75
  * 潜在的に実行されるべきタスクをカウントする
@@ -21,7 +21,7 @@ const executableTaskProjection = {
21
21
  project: 1,
22
22
  remainingNumberOfTries: 1,
23
23
  runsAt: 1,
24
- expires: 1
24
+ // expires: 1 // 非同期アクションは移行につきexpires廃止(2026-08-05~)
25
25
  };
26
26
  /**
27
27
  * タスクリポジトリ
@@ -87,6 +87,18 @@ class TaskRepo {
87
87
  const { id, status } = doc;
88
88
  return { id, status };
89
89
  }
90
+ /**
91
+ * イベント予約集計タスクの冗長な作成を避けるためのメソッド
92
+ */
93
+ async findReadyAggregateEventTask(params) {
94
+ return this.taskModel.findOne({
95
+ 'project.id': { $eq: params.project.id },
96
+ name: { $eq: factory_1.factory.taskName.AggregateScreeningEvent },
97
+ status: { $eq: factory_1.factory.taskStatus.Ready },
98
+ 'data.id': { $exists: true, $eq: params.reservationFor.id }
99
+ }, { _id: 1 })
100
+ .exec();
101
+ }
90
102
  /**
91
103
  * タスク識別子から冪等作成する
92
104
  * reimplement createIfNotExistByIdentifier(2025-03-28~)
@@ -217,7 +229,7 @@ class TaskRepo {
217
229
  _id: { $eq: params.id },
218
230
  status: { $eq: params.status },
219
231
  runsAt: { $lt: now },
220
- ...(params.expires instanceof Date) ? { expires: { $gt: now } } : undefined
232
+ // ...(params.expires instanceof Date) ? { expires: { $gt: now } } : undefined // 非同期アクションは移行につきexpires廃止(2026-08-05~)
221
233
  }, executableTaskProjection)
222
234
  .setOptions({ maxTimeMS: settings_1.MONGO_MAX_TIME_MS })
223
235
  .lean()
@@ -228,7 +240,7 @@ class TaskRepo {
228
240
  _id: { $eq: params.id },
229
241
  status: { $eq: params.status },
230
242
  runsAt: { $lt: now },
231
- ...(params.expires instanceof Date) ? { expires: { $gt: now } } : undefined
243
+ // ...(params.expires instanceof Date) ? { expires: { $gt: now } } : undefined // 非同期アクションは移行につきexpires廃止(2026-08-05~)
232
244
  }, {
233
245
  $set: {
234
246
  status: factory_1.factory.taskStatus.Running, // 実行中に変更
@@ -7,7 +7,7 @@ type IOperation<T> = (settings: IExecuteSettings) => Promise<T>;
7
7
  /**
8
8
  * タスク変更イベントを受けて実行する
9
9
  */
10
- declare function executeById(params: (IReadyTask | IRunningTask) & {
10
+ declare function executeTaskById(params: (Pick<IReadyTask, 'id' | 'status'> | Pick<IRunningTask, 'id' | 'status'>) & {
11
11
  executor: {
12
12
  /**
13
13
  * タスク実行者名称
@@ -15,4 +15,4 @@ declare function executeById(params: (IReadyTask | IRunningTask) & {
15
15
  name: string;
16
16
  };
17
17
  }, next?: INextFunction): IOperation<void>;
18
- export { executeById, };
18
+ export { executeTaskById, };
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.executeById = executeById;
6
+ exports.executeTaskById = executeTaskById;
7
7
  /**
8
8
  * タスクサービス
9
9
  */
@@ -13,10 +13,10 @@ const debug = (0, debug_1.default)('chevre-domain:service:task');
13
13
  /**
14
14
  * タスク変更イベントを受けて実行する
15
15
  */
16
- function executeById(params, next) {
16
+ function executeTaskById(params, next) {
17
17
  return async (settings) => {
18
18
  const taskRepo = new (await import('../repo/task.js')).TaskRepo(settings.connection);
19
- const { id, status, executor, expires } = params;
19
+ const { id, status, executor } = params;
20
20
  let task = null;
21
21
  try {
22
22
  // support status: Running(2025-03-05~)
@@ -24,12 +24,12 @@ function executeById(params, next) {
24
24
  id,
25
25
  status,
26
26
  executor: { name: executor.name },
27
- ...(expires instanceof Date) ? { expires } : undefined
27
+ // ...(expires instanceof Date) ? { expires } : undefined // 非同期アクションは移行につきexpires廃止(2026-08-05~)
28
28
  });
29
29
  }
30
30
  catch (error) {
31
31
  /* istanbul ignore next */
32
- debug('service.task.executeById error:', error);
32
+ debug('service.task.executeTaskById error:', error);
33
33
  }
34
34
  // タスクがなければ終了
35
35
  if (task !== null) {
@@ -1,6 +1,6 @@
1
1
  import { factory } from '../../../../factory';
2
2
  import type { ISetting } from '../../../../repo/setting';
3
- type IPlaceOrderPotentialTask = factory.task.IAttributes<factory.taskName.PlaceOrder> | factory.task.IAttributes<factory.taskName.VoidPayTransaction> | factory.task.voidReserveTransaction.IAttributes;
3
+ type IPlaceOrderPotentialTask = factory.task.IAttributes<factory.taskName.PlaceOrder> | factory.task.IAttributes<factory.taskName.VoidPayTransaction> | Omit<factory.task.voidReserveTransaction.IAttributes, 'expires'>;
4
4
  /**
5
5
  * 取引のタスクを作成する
6
6
  * 取引削除タスクを分離(2026-08-02~)
@@ -25,24 +25,18 @@ function exportTasksById(params) {
25
25
  }
26
26
  // search settings
27
27
  const setting = await repos.setting.findOne({ project: { id: { $eq: '*' } } }, ['storage']);
28
- const useScheduledDeleteTransactionTask = setting?.storage?.useScheduledDeleteTransactionTask === true;
29
28
  const deleteTransactionTaskExpiresInDays = setting?.storage?.deleteTransactionTaskExpiresInDays;
30
- const deleteTask = (0, factory_2.createScheduledTasks)({ transaction }, setting);
31
- if (useScheduledDeleteTransactionTask && typeof deleteTransactionTaskExpiresInDays === 'number' && deleteTransactionTaskExpiresInDays > 0) {
32
- // support scheduledTask(2026-08-02~)
33
- await repos.task.saveMany((0, factory_2.createImmediateTasks)({ transaction, taskRunsAt }));
34
- await repos.scheduledTask.addScheduledTasks([{
35
- ...deleteTask,
36
- expires: (0, moment_1.default)(deleteTask.runsAt)
37
- .add(deleteTransactionTaskExpiresInDays, 'days')
38
- .toDate()
39
- }]);
40
- }
41
- else {
42
- await repos.task.saveMany([
43
- ...(0, factory_2.createImmediateTasks)({ transaction, taskRunsAt }),
44
- deleteTask
45
- ]);
29
+ if (typeof deleteTransactionTaskExpiresInDays !== 'number') {
30
+ throw new factory_1.factory.errors.Internal('settings.storage.deleteTransactionTaskExpiresInDays required');
46
31
  }
32
+ const deleteTask = (0, factory_2.createScheduledTasks)({ transaction }, setting);
33
+ // support scheduledTask(2026-08-02~)
34
+ await repos.task.saveMany((0, factory_2.createImmediateTasks)({ transaction, taskRunsAt }));
35
+ await repos.scheduledTask.addScheduledTasks([{
36
+ ...deleteTask,
37
+ expires: (0, moment_1.default)(deleteTask.runsAt)
38
+ .add(deleteTransactionTaskExpiresInDays, 'days')
39
+ .toDate()
40
+ }]);
47
41
  };
48
42
  }
@@ -167,24 +167,18 @@ function exportTasksById(params) {
167
167
  }
168
168
  // search settings
169
169
  const setting = await repos.setting.findOne({ project: { id: { $eq: '*' } } }, ['storage']);
170
- const useScheduledDeleteTransactionTask = setting?.storage?.useScheduledDeleteTransactionTask === true;
171
170
  const deleteTransactionTaskExpiresInDays = setting?.storage?.deleteTransactionTaskExpiresInDays;
172
- const deleteTask = (0, factory_2.createScheduledTasks)({ transaction }, setting);
173
- if (useScheduledDeleteTransactionTask && typeof deleteTransactionTaskExpiresInDays === 'number' && deleteTransactionTaskExpiresInDays > 0) {
174
- // support scheduledTask(2026-08-02~)
175
- await repos.task.saveMany((0, factory_2.createImmediateTasks)({ transaction, taskRunsAt }));
176
- await repos.scheduledTask.addScheduledTasks([{
177
- ...deleteTask,
178
- expires: (0, moment_timezone_1.default)(deleteTask.runsAt)
179
- .add(deleteTransactionTaskExpiresInDays, 'days')
180
- .toDate()
181
- }]);
182
- }
183
- else {
184
- await repos.task.saveMany([
185
- ...(0, factory_2.createImmediateTasks)({ transaction, taskRunsAt }),
186
- deleteTask
187
- ]);
171
+ if (typeof deleteTransactionTaskExpiresInDays !== 'number') {
172
+ throw new factory_1.factory.errors.Internal('settings.storage.deleteTransactionTaskExpiresInDays required');
188
173
  }
174
+ const deleteTask = (0, factory_2.createScheduledTasks)({ transaction }, setting);
175
+ // support scheduledTask(2026-08-02~)
176
+ await repos.task.saveMany((0, factory_2.createImmediateTasks)({ transaction, taskRunsAt }));
177
+ await repos.scheduledTask.addScheduledTasks([{
178
+ ...deleteTask,
179
+ expires: (0, moment_timezone_1.default)(deleteTask.runsAt)
180
+ .add(deleteTransactionTaskExpiresInDays, 'days')
181
+ .toDate()
182
+ }]);
189
183
  };
190
184
  }
package/package.json CHANGED
@@ -88,5 +88,5 @@
88
88
  "postversion": "git push origin --tags",
89
89
  "prepublishOnly": "npm run clean && npm run build"
90
90
  },
91
- "version": "26.0.0-alpha.11"
91
+ "version": "26.0.0-alpha.13"
92
92
  }