@chevre/domain 26.1.0-alpha.7 → 27.0.0-alpha.0

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,6 +1,6 @@
1
1
  import { EventEmitter } from 'events';
2
2
  import type { Connection } from 'mongoose';
3
- import type { createClient } from 'redis';
3
+ import type { RedisClientType } from '@redis/client';
4
4
  import { factory } from '../factory';
5
5
  interface IExecuteSettings {
6
6
  /**
@@ -45,7 +45,6 @@ interface ITaskAsNextFunctionParam {
45
45
  }
46
46
  type IAsyncActionNextFunction = (task: ITaskAsNextFunctionParam) => IOperationExecute<void>;
47
47
  type IOnTaskStatusChangedListener = (task: IChangedTask) => void;
48
- type RedisClientType = ReturnType<typeof createClient>;
49
48
  /**
50
49
  * タスクイベントエミッター
51
50
  */
@@ -33,13 +33,13 @@ export declare class AdminTaskRepo {
33
33
  }): Promise<{
34
34
  count: number;
35
35
  }>;
36
- 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, {}> & Pick<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, "name" | "description" | "project" | "identifier" | "data" | "status" | "runsAt" | "dateAborted" | "executionResults" | "executor" | "lastTriedAt" | "remainingNumberOfTries" | "numberOfTried"> & {
36
+ 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, {}> & Pick<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, "project" | "name" | "identifier" | "description" | "data" | "status" | "runsAt" | "dateAborted" | "executionResults" | "executor" | "lastTriedAt" | "remainingNumberOfTries" | "numberOfTried"> & {
37
37
  expires?: never;
38
38
  } & {
39
39
  _id: import("mongoose").Types.ObjectId;
40
40
  } & {
41
41
  __v: number;
42
- }, import("mongoose").QueryOptions<IDocType>, (import("mongoose").Document<unknown, Record<string, never>, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & Pick<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, "name" | "description" | "project" | "identifier" | "data" | "status" | "runsAt" | "dateAborted" | "executionResults" | "executor" | "lastTriedAt" | "remainingNumberOfTries" | "numberOfTried"> & {
42
+ }, import("mongoose").QueryOptions<IDocType>, (import("mongoose").Document<unknown, Record<string, never>, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & Pick<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, "project" | "name" | "identifier" | "description" | "data" | "status" | "runsAt" | "dateAborted" | "executionResults" | "executor" | "lastTriedAt" | "remainingNumberOfTries" | "numberOfTried"> & {
43
43
  expires?: never;
44
44
  } & {
45
45
  _id: import("mongoose").Types.ObjectId;
@@ -1,6 +1,5 @@
1
- import type { createClient } from 'redis';
1
+ import type { RedisClientType } from '@redis/client';
2
2
  import { AbstractConcurrentLockRepo, ILockParams, IUnlockParams } from './concurrentLockAbstract';
3
- type RedisClientType = ReturnType<typeof createClient>;
4
3
  /**
5
4
  * 同時実行ロックリポジトリ
6
5
  */
@@ -13,4 +12,3 @@ export declare class ConcurrentLockRepo implements AbstractConcurrentLockRepo {
13
12
  lock(params: ILockParams): Promise<void>;
14
13
  unlock(params: IUnlockParams): Promise<void>;
15
14
  }
16
- export {};
@@ -18,15 +18,6 @@ class ConcurrentLockRepo {
18
18
  const key = ConcurrentLockRepo.CREATE_REDIS_KEY(params);
19
19
  const value = params.audience.identifier;
20
20
  // setNXは非推奨のため、setで再実装(2026-08-23~)
21
- // const results = await this.redisClient.multi()
22
- // .setNX(key, value)
23
- // .expireAt(key, params.expires)
24
- // .exec();
25
- // if (Array.isArray(results) && (results[0] === 1 || (results as any)[0] === true)) { // eslint-disable-line @typescript-eslint/no-explicit-any
26
- // return;
27
- // } else {
28
- // throw new factory.errors.AlreadyInUse(params.about.identifier, []);
29
- // }
30
21
  const expiresAtMs = params.expires.getTime();
31
22
  const result = await this.redisClient.set(key, value, {
32
23
  NX: true,
@@ -1,10 +1,9 @@
1
1
  import type { COA } from '@motionpicture/coa-service';
2
- import type { createClient } from 'redis';
2
+ import type { RedisClientType } from '@redis/client';
3
3
  interface IOptions {
4
4
  scope: string;
5
5
  expireInSeconds: number;
6
6
  }
7
- type RedisClientType = ReturnType<typeof createClient>;
8
7
  /**
9
8
  * 認証情報リポジトリ
10
9
  */
@@ -45,4 +45,8 @@ export declare class MigrateActionRepo {
45
45
  id: string;
46
46
  expires: Date;
47
47
  }): Promise<void>;
48
+ migrateActionRecipeExpires(params: {
49
+ id: string;
50
+ expires: Date;
51
+ }): Promise<void>;
48
52
  }
@@ -28,5 +28,9 @@ class MigrateActionRepo {
28
28
  await this.actionModel.updateOne({ _id: { $eq: params.id } }, { $set: { expires: params.expires } })
29
29
  .exec();
30
30
  }
31
+ async migrateActionRecipeExpires(params) {
32
+ await this.actionRecipeModel.updateOne({ _id: { $eq: params.id } }, { $set: { expires: params.expires } })
33
+ .exec();
34
+ }
31
35
  }
32
36
  exports.MigrateActionRepo = MigrateActionRepo;
@@ -1,5 +1,5 @@
1
1
  import { JwtPayload } from 'jsonwebtoken';
2
- import type { createClient } from 'redis';
2
+ import type { RedisClientType } from '@redis/client';
3
3
  import { factory } from '../factory';
4
4
  import { IPassportValidator } from '../factory/transaction';
5
5
  export type IVerifiedPassport = factory.waiter.passport.IPassport & {
@@ -20,7 +20,6 @@ interface IOptions {
20
20
  secret: string;
21
21
  passportValidator?: IPassportValidator;
22
22
  }
23
- type RedisClientType = ReturnType<typeof createClient>;
24
23
  /**
25
24
  * 取引許可証リポジトリ
26
25
  */
@@ -37,8 +37,8 @@ export declare class PriceSpecificationRepo {
37
37
  };
38
38
  }): Promise<void>;
39
39
  getCursor(conditions: any, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown, Record<string, never>, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & (({
40
- name?: (string | import("@chevre/factory/lib/chevre/multilingualString").IMultilingualString) | undefined;
41
40
  project?: Pick<factory.project.IProject, "id" | "typeOf"> | undefined;
41
+ name?: (string | import("@chevre/factory/lib/chevre/multilingualString").IMultilingualString) | undefined;
42
42
  price: number;
43
43
  priceCurrency: factory.priceCurrency;
44
44
  typeOf: factory.priceSpecificationType.CategoryCodeChargeSpecification;
@@ -53,8 +53,8 @@ export declare class PriceSpecificationRepo {
53
53
  } & {
54
54
  __v: number;
55
55
  }) | ({
56
- name?: (string | import("@chevre/factory/lib/chevre/multilingualString").IMultilingualString) | undefined;
57
56
  project?: Pick<factory.project.IProject, "id" | "typeOf"> | undefined;
57
+ name?: (string | import("@chevre/factory/lib/chevre/multilingualString").IMultilingualString) | undefined;
58
58
  price: number;
59
59
  priceCurrency: factory.priceCurrency;
60
60
  typeOf: factory.priceSpecificationType.MovieTicketTypeChargeSpecification;
@@ -70,8 +70,8 @@ export declare class PriceSpecificationRepo {
70
70
  } & {
71
71
  __v: number;
72
72
  })), import("mongoose").QueryOptions<IDocType>, (import("mongoose").Document<unknown, Record<string, never>, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & (({
73
- name?: (string | import("@chevre/factory/lib/chevre/multilingualString").IMultilingualString) | undefined;
74
73
  project?: Pick<factory.project.IProject, "id" | "typeOf"> | undefined;
74
+ name?: (string | import("@chevre/factory/lib/chevre/multilingualString").IMultilingualString) | undefined;
75
75
  price: number;
76
76
  priceCurrency: factory.priceCurrency;
77
77
  typeOf: factory.priceSpecificationType.CategoryCodeChargeSpecification;
@@ -86,8 +86,8 @@ export declare class PriceSpecificationRepo {
86
86
  } & {
87
87
  __v: number;
88
88
  }) | ({
89
- name?: (string | import("@chevre/factory/lib/chevre/multilingualString").IMultilingualString) | undefined;
90
89
  project?: Pick<factory.project.IProject, "id" | "typeOf"> | undefined;
90
+ name?: (string | import("@chevre/factory/lib/chevre/multilingualString").IMultilingualString) | undefined;
91
91
  price: number;
92
92
  priceCurrency: factory.priceCurrency;
93
93
  typeOf: factory.priceSpecificationType.MovieTicketTypeChargeSpecification;
@@ -1,6 +1,5 @@
1
- import type { createClient } from 'redis';
1
+ import type { RedisClientType } from '@redis/client';
2
2
  import { factory } from '../../factory';
3
- type RedisClientType = ReturnType<typeof createClient>;
4
3
  /**
5
4
  * レート制限キーインターフェース
6
5
  */
@@ -35,4 +34,3 @@ export declare class OfferRateLimitRepo {
35
34
  unlock(params: IRateLimitKey): Promise<void>;
36
35
  getHolder(ratelimitKey: IRateLimitKey): Promise<string | null>;
37
36
  }
38
- export {};
@@ -39,13 +39,13 @@ export declare class TaskRepo {
39
39
  id: string;
40
40
  };
41
41
  }): Promise<(import("mongoose").FlattenMaps<{
42
- name: factory.taskName;
43
- description?: string | undefined;
44
42
  project: {
45
43
  id: string;
46
44
  typeOf: factory.organizationType.Project;
47
45
  };
46
+ name: factory.taskName;
48
47
  identifier?: string | undefined;
48
+ description?: string | undefined;
49
49
  data: import("@chevre/factory/lib/chevre/task").IData;
50
50
  status: factory.taskStatus;
51
51
  runsAt: Date;
@@ -1,4 +1,4 @@
1
- import type { createClient } from 'redis';
1
+ import type { RedisClientType } from '@redis/client';
2
2
  import { factory } from '../factory';
3
3
  interface IProcessKey {
4
4
  typeOf: factory.transactionType;
@@ -13,7 +13,6 @@ interface IProcessKey {
13
13
  interface IOptions {
14
14
  lockExpiresInSeconds: number;
15
15
  }
16
- type RedisClientType = ReturnType<typeof createClient>;
17
16
  /**
18
17
  * 取引プロセスリポジトリ
19
18
  */
package/package.json CHANGED
@@ -31,6 +31,7 @@
31
31
  "devDependencies": {
32
32
  "@eslint/js": "9.39.4",
33
33
  "@json2csv/plainjs": "7.0.6",
34
+ "@redis/client": "6.2.1",
34
35
  "@sendgrid/helpers": "8.0.0",
35
36
  "@size-limit/preset-big-lib": "12.0.0",
36
37
  "@types/debug": "4.1.13",
@@ -45,7 +46,6 @@
45
46
  "dependency-cruiser": "17.3.8",
46
47
  "eslint": "9.39.2",
47
48
  "mongoose": "8.23.0",
48
- "redis": "4.7.1",
49
49
  "rimraf": "6.1.3",
50
50
  "size-limit": "12.0.0",
51
51
  "typescript": "5.9.3",
@@ -54,7 +54,7 @@
54
54
  },
55
55
  "peerDependencies": {
56
56
  "mongoose": "^8.23.0",
57
- "redis": "^4.7.1"
57
+ "@redis/client": "^6.2.1"
58
58
  },
59
59
  "engines": {
60
60
  "node": ">=22.0.0",
@@ -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.1.0-alpha.7"
91
+ "version": "27.0.0-alpha.0"
92
92
  }