@chevre/domain 24.1.0-alpha.10 → 24.1.0-alpha.12

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.
@@ -30,7 +30,7 @@ export type IRecipeAsActionAttributes<T extends factory.recipe.RecipeCategory> =
30
30
  export type IMinimizedPurchaseNumberAuthResult = Pick<factory.action.check.paymentMethod.movieTicket.IPurchaseNumberAuthResult, 'mkknmiNumSum' | 'resultInfo' | 'ykknmiNumSum'> & {
31
31
  knyknrNoInfoOut: Omit<factory.action.check.paymentMethod.movieTicket.IPurchaseNumberInfo, 'ykknInfo' | 'mkknInfo'>[] | null;
32
32
  };
33
- export type IKeyOfProjection = keyof IAction<factory.actionType> | keyof IAction<factory.actionType.AuthorizeAction> | keyof IAction<factory.actionType.MoneyTransfer> | keyof IAction<factory.actionType.ReplaceAction> | 'identifier';
33
+ export type IKeyOfProjection = keyof IAction<factory.actionType> | keyof IAction<factory.actionType.AuthorizeAction> | keyof IAction<factory.actionType.ReplaceAction> | 'identifier';
34
34
  export declare const AVAILABLE_PROJECT_FIELDS: IKeyOfProjection[];
35
35
  /**
36
36
  * アクション状態管理リポジトリ
@@ -4,6 +4,7 @@ type ISubReservationAsFindResult = Pick<factory.reservation.eventReservation.IRe
4
4
  price?: factory.reservation.eventReservation.IPrice;
5
5
  reservedTicket?: Pick<factory.reservation.eventReservation.IReservedTicket, 'ticketType'>;
6
6
  reservationFor?: factory.assetTransaction.reserve.IReservationFor;
7
+ issuedThrough?: factory.assetTransaction.reserve.IIssuedThrough;
7
8
  };
8
9
  /**
9
10
  * 予約取引リポジトリ
@@ -96,7 +96,8 @@ class ReserveTransactionRepo {
96
96
  reservationFor: '$object.reservationFor',
97
97
  reservedTicket: {
98
98
  ticketType: '$object.subReservation.reservedTicket.ticketType',
99
- }
99
+ },
100
+ issuedThrough: '$object.issuedThrough',
100
101
  }
101
102
  }
102
103
  ]);
@@ -66,48 +66,48 @@ const indexes = [
66
66
  }
67
67
  }
68
68
  ],
69
- [
70
- { 'mainEntity.orderStatus': 1, 'mainEntity.orderDate': -1 },
71
- {
72
- name: 'searchByOrderStatus'
73
- }
74
- ],
75
- [
76
- { 'mainEntity.confirmationNumber': 1, 'mainEntity.orderDate': -1 },
77
- {
78
- name: 'searchByConfirmationNumber',
79
- partialFilterExpression: {
80
- 'mainEntity.confirmationNumber': { $exists: true }
81
- }
82
- }
83
- ],
84
- [
85
- { 'mainEntity.customer.id': 1, 'mainEntity.orderDate': -1 },
86
- {
87
- name: 'searchByCustomerId',
88
- partialFilterExpression: {
89
- 'mainEntity.customer.id': { $exists: true }
90
- }
91
- }
92
- ],
93
- [
94
- { 'mainEntity.paymentMethods.accountId': 1, 'mainEntity.orderDate': -1 },
95
- {
96
- name: 'searchByPaymentMethodsAccountId',
97
- partialFilterExpression: {
98
- 'mainEntity.paymentMethods.accountId': { $exists: true }
99
- }
100
- }
101
- ],
102
- [
103
- { 'mainEntity.paymentMethods.typeOf': 1, 'mainEntity.orderDate': -1 },
104
- {
105
- name: 'searchByPaymentMethodTypeOf',
106
- partialFilterExpression: {
107
- 'mainEntity.paymentMethods.typeOf': { $exists: true }
108
- }
109
- }
110
- ],
69
+ // [
70
+ // { 'mainEntity.orderStatus': 1, 'mainEntity.orderDate': -1 },
71
+ // {
72
+ // name: 'searchByOrderStatus'
73
+ // }
74
+ // ],
75
+ // [
76
+ // { 'mainEntity.confirmationNumber': 1, 'mainEntity.orderDate': -1 },
77
+ // {
78
+ // name: 'searchByConfirmationNumber',
79
+ // partialFilterExpression: {
80
+ // 'mainEntity.confirmationNumber': { $exists: true }
81
+ // }
82
+ // }
83
+ // ],
84
+ // [
85
+ // { 'mainEntity.customer.id': 1, 'mainEntity.orderDate': -1 },
86
+ // {
87
+ // name: 'searchByCustomerId',
88
+ // partialFilterExpression: {
89
+ // 'mainEntity.customer.id': { $exists: true }
90
+ // }
91
+ // }
92
+ // ],
93
+ // [
94
+ // { 'mainEntity.paymentMethods.accountId': 1, 'mainEntity.orderDate': -1 },
95
+ // {
96
+ // name: 'searchByPaymentMethodsAccountId',
97
+ // partialFilterExpression: {
98
+ // 'mainEntity.paymentMethods.accountId': { $exists: true }
99
+ // }
100
+ // }
101
+ // ],
102
+ // [
103
+ // { 'mainEntity.paymentMethods.typeOf': 1, 'mainEntity.orderDate': -1 },
104
+ // {
105
+ // name: 'searchByPaymentMethodTypeOf',
106
+ // partialFilterExpression: {
107
+ // 'mainEntity.paymentMethods.typeOf': { $exists: true }
108
+ // }
109
+ // }
110
+ // ],
111
111
  [
112
112
  { 'mainEntity.paymentMethods.paymentMethodId': 1, 'mainEntity.orderDate': -1 },
113
113
  {
@@ -3,9 +3,10 @@ import { IVirtuals } from '../virtuals';
3
3
  import { factory } from '../../../factory';
4
4
  type IDocType = (Omit<factory.reservation.eventReservation.IReservation, 'id'>) & {
5
5
  _id: string;
6
- bookingAgent?: any;
7
6
  previousReservationStatus?: factory.reservationStatusType;
8
- priceCurrency?: factory.priceCurrency;
7
+ price?: never;
8
+ priceCurrency?: never;
9
+ issuedThrough?: never;
9
10
  };
10
11
  type IModel = Model<IDocType, Record<string, never>, Record<string, never>, IVirtuals>;
11
12
  type ISchemaDefinition = SchemaDefinition<IDocType>;
@@ -22,18 +22,11 @@ const schemaDefinition = {
22
22
  required: true
23
23
  },
24
24
  additionalTicketText: String,
25
- bookingAgent: mongoose_1.SchemaTypes.Mixed,
26
25
  bookingTime: Date,
27
26
  broker: mongoose_1.SchemaTypes.Mixed,
28
- // cancelReservationUrl: String,
29
- // checkinUrl: String,
30
- // confirmReservationUrl: String,
31
27
  modifiedTime: Date,
32
- // modifyReservationUrl: String,
33
28
  numSeats: Number,
34
29
  previousReservationStatus: String,
35
- price: mongoose_1.SchemaTypes.Mixed,
36
- priceCurrency: String,
37
30
  programMembershipUsed: mongoose_1.SchemaTypes.Mixed,
38
31
  reservationFor: mongoose_1.SchemaTypes.Mixed,
39
32
  reservationNumber: {
@@ -50,6 +43,9 @@ const schemaDefinition = {
50
43
  checkedIn: { type: Boolean, default: false },
51
44
  attended: { type: Boolean, default: false },
52
45
  additionalProperty: mongoose_1.SchemaTypes.Mixed,
46
+ // bookingAgent: SchemaTypes.Mixed,
47
+ price: mongoose_1.SchemaTypes.Mixed,
48
+ priceCurrency: String,
53
49
  issuedThrough: mongoose_1.SchemaTypes.Mixed
54
50
  };
55
51
  const schemaOptions = {
@@ -8,9 +8,7 @@ export interface IUpdatePartiallyParams {
8
8
  export type ICancelResult = UpdateWriteOpResult;
9
9
  export type ICheckedInResult = UpdateWriteOpResult;
10
10
  type ISavingReservedTicket = Omit<factory.assetTransaction.reserve.ISubReservationReservedTicket, 'ticketType'> & {
11
- ticketType: {
12
- id?: string;
13
- };
11
+ ticketType?: never;
14
12
  };
15
13
  /**
16
14
  * ドキュメントとして保管する予約
@@ -22,7 +20,7 @@ export type ICreatingReservation = Omit<factory.reservation.eventReservation.IRe
22
20
  /**
23
21
  * 廃止予定の予約属性
24
22
  */
25
- export type IDeprecatedField = 'price' | 'underName';
23
+ export type IDeprecatedField = 'price' | 'underName' | 'priceCurrency' | 'issuedThrough';
26
24
  export type IKeyOfProjection = Exclude<keyof factory.reservation.eventReservation.IReservation, IDeprecatedField> | 'reservedTicket.dateUsed' | 'reservationFor.id' | 'reservationFor.typeOf';
27
25
  export type IAttendedReservation = Pick<factory.reservation.eventReservation.IReservation, 'id' | 'typeOf' | 'project' | 'modifiedTime'> & {
28
26
  reservationFor: Pick<factory.reservation.eventReservation.IReservationForMinimized, 'id' | 'typeOf'>;
@@ -37,6 +35,14 @@ export type IReservationAsFindResult = Omit<factory.reservation.eventReservation
37
35
  * 実データとしてはまだ存在しているが型から廃止(2026-03-26~)
38
36
  */
39
37
  underName?: never;
38
+ /**
39
+ * discontinue(2026-05-10~)
40
+ */
41
+ priceCurrency?: never;
42
+ /**
43
+ * discontinue(2026-05-10~)
44
+ */
45
+ issuedThrough?: never;
40
46
  };
41
47
  /**
42
48
  * 予約リポジトリ
@@ -63,7 +69,6 @@ export declare class ReservationRepo {
63
69
  };
64
70
  provider: factory.reservation.IProvider;
65
71
  subReservation: factory.assetTransaction.reserve.IObjectSubReservation[];
66
- issuedThrough: factory.assetTransaction.reserve.IIssuedThrough;
67
72
  reservationFor: factory.assetTransaction.reserve.IReservationFor;
68
73
  reservationNumber: string;
69
74
  underName?: factory.reservation.IUnderName;
@@ -145,18 +150,20 @@ export declare class ReservationRepo {
145
150
  }): Promise<string[]>;
146
151
  getCursor(conditions: any, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown, Record<string, never>, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & Omit<import("@chevre/factory/lib/chevre/reservation/event").IReservation, "id"> & {
147
152
  _id: string;
148
- bookingAgent?: any;
149
153
  previousReservationStatus?: factory.reservationStatusType;
150
- priceCurrency?: factory.priceCurrency;
154
+ price?: never;
155
+ priceCurrency?: never;
156
+ issuedThrough?: never;
151
157
  } & Required<{
152
158
  _id: string;
153
159
  }> & {
154
160
  __v: number;
155
161
  }, import("mongoose").QueryOptions<IDocType>, (import("mongoose").Document<unknown, Record<string, never>, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & Omit<import("@chevre/factory/lib/chevre/reservation/event").IReservation, "id"> & {
156
162
  _id: string;
157
- bookingAgent?: any;
158
163
  previousReservationStatus?: factory.reservationStatusType;
159
- priceCurrency?: factory.priceCurrency;
164
+ price?: never;
165
+ priceCurrency?: never;
166
+ issuedThrough?: never;
160
167
  } & Required<{
161
168
  _id: string;
162
169
  }> & {
@@ -114,15 +114,18 @@ class ReservationRepo {
114
114
  const bulkWriteOps = [];
115
115
  if (Array.isArray(params.subReservation)) {
116
116
  params.subReservation.forEach((subReservation) => {
117
- const { price: _discontinuePrice, reservedTicket, ...subReservationWithoutPrice } = subReservation;
118
- const { ticketType, ...reservedTicketWithoutTicketType } = reservedTicket;
119
- // 予約ドキュメントのticketTypeを最小化(2026-04-03~)
120
- const savingReservedTicket = {
121
- ...reservedTicketWithoutTicketType,
122
- ticketType: {
123
- ...((typeof ticketType.id === 'string') && { id: ticketType.id })
124
- }
125
- };
117
+ const { price: _discontinuePrice, reservedTicket, priceCurrency: _discontinuePriceCurrency, // discontinue priceCurrency
118
+ ...subReservationWithoutPrice } = subReservation;
119
+ const { ticketType: _ticketType, ...reservedTicketWithoutTicketType } = reservedTicket;
120
+ // discontinue ticketType(2026-05-09~)
121
+ const savingReservedTicket = reservedTicketWithoutTicketType;
122
+ // // 予約ドキュメントのticketTypeを最小化(2026-04-03~)
123
+ // const savingReservedTicket: ISavingReservedTicket = {
124
+ // ...reservedTicketWithoutTicketType,
125
+ // ticketType: {
126
+ // ...((typeof ticketType.id === 'string') && { id: ticketType.id })
127
+ // }
128
+ // };
126
129
  // reservationFor最小化(2026-04-06~)
127
130
  const { minimizedReservationFor } = (0, minimizeReservationFor_1.minimizeReservationFor)(params.reservationFor);
128
131
  const setOnInsert = {
@@ -132,7 +135,7 @@ class ReservationRepo {
132
135
  bookingTime: params.bookingTime,
133
136
  checkedIn: false,
134
137
  attended: false,
135
- issuedThrough: params.issuedThrough,
138
+ // issuedThrough: params.issuedThrough, // discontinue issuedThrough
136
139
  project: { id: params.project.id, typeOf: factory_1.factory.organizationType.Project },
137
140
  reservationFor: minimizedReservationFor,
138
141
  reservationNumber: params.reservationNumber,
@@ -59,23 +59,9 @@ export declare class RoleRepo {
59
59
  } & {
60
60
  __v: number;
61
61
  }) | null>;
62
- addMember(params: Pick<IRole, 'member' | 'memberOf' | 'roleName'>): Promise<(import("mongoose").FlattenMaps<{
63
- typeOf: import("@chevre/factory/lib/chevre/role").RoleType;
64
- memberOf: {
65
- typeOf: factory.organizationType.Corporation | factory.organizationType.Project;
66
- };
67
- member: {
68
- typeOf: import("@chevre/factory/lib/chevre/role/organizationRole").IMemberType;
69
- };
70
- roleName: import("@chevre/factory/lib/chevre/role/organizationRole").RoleName;
71
- permissions: string[];
72
- }> & {
73
- _id: import("mongoose").Types.ObjectId;
74
- } & {
75
- __v: number;
76
- }) | null>;
77
62
  create(params: Pick<IRole, 'member' | 'memberOf' | 'permissions' | 'roleName'>): Promise<{
78
63
  id: string;
79
64
  }>;
65
+ deleteByRoleName(params: Pick<IRole, 'roleName'>): Promise<import("mongodb").DeleteResult>;
80
66
  }
81
67
  export {};
@@ -139,20 +139,6 @@ class RoleRepo {
139
139
  .lean()
140
140
  .exec();
141
141
  }
142
- async addMember(params) {
143
- const { roleName, member, memberOf } = params;
144
- return this.roleModel.findOneAndUpdate({
145
- roleName: { $eq: roleName },
146
- 'member.typeOf': { $ne: member.typeOf }
147
- }, {
148
- $set: { member, memberOf }
149
- }, {
150
- new: true,
151
- projection: { _id: 1 }
152
- })
153
- .lean()
154
- .exec();
155
- }
156
142
  async create(params) {
157
143
  const { member, memberOf, permissions, roleName } = params;
158
144
  const creatingRole = {
@@ -167,5 +153,12 @@ class RoleRepo {
167
153
  const savedId = insertedId;
168
154
  return { id: savedId };
169
155
  }
156
+ async deleteByRoleName(params) {
157
+ const { roleName } = params;
158
+ return this.roleModel.deleteOne({
159
+ roleName: { $eq: roleName }
160
+ })
161
+ .exec();
162
+ }
170
163
  }
171
164
  exports.RoleRepo = RoleRepo;
@@ -69,10 +69,11 @@ function createPotentialActions(params) {
69
69
  const reservationForByReserveTransaction = transaction.object.transaction?.object.reservationFor;
70
70
  if (reservationForByReserveTransaction !== undefined && typeof reservationNumber === 'string') {
71
71
  const cancelObject = {
72
- reservationFor: {
73
- typeOf: reservationForByReserveTransaction.typeOf,
74
- id: String(reservationForByReserveTransaction.id)
75
- },
72
+ // discontinue reservationFor(2026-05-09~)
73
+ // reservationFor: {
74
+ // typeOf: reservationForByReserveTransaction.typeOf,
75
+ // id: String(reservationForByReserveTransaction.id)
76
+ // },
76
77
  reservationNumber,
77
78
  // ReservationConfirmed->ReservationCancelledのみ処理されるように保証する
78
79
  reservationStatus: factory_1.factory.reservationStatusType.ReservationConfirmed,
@@ -100,13 +101,15 @@ function createPotentialActions(params) {
100
101
  cancelObject = {
101
102
  typeOf: reservation.typeOf,
102
103
  id: reservation.id,
103
- issuedThrough: {
104
- typeOf: reservation.issuedThrough?.typeOf
105
- },
106
- reservationFor: {
107
- typeOf: reservation.reservationFor.typeOf,
108
- id: String(reservation.reservationFor.id)
109
- },
104
+ // discontinue issuedThrough(2026-05-08~)
105
+ // issuedThrough: {
106
+ // typeOf: reservation.issuedThrough?.typeOf
107
+ // },
108
+ // discontinue reservationFor(2026-05-09~)
109
+ // reservationFor: {
110
+ // typeOf: reservation.reservationFor.typeOf,
111
+ // id: String(reservation.reservationFor.id)
112
+ // },
110
113
  reservationNumber: reservation.reservationNumber,
111
114
  // ReservationConfirmed->ReservationCancelledのみ処理されるように保証する
112
115
  reservationStatus: factory_1.factory.reservationStatusType.ReservationConfirmed
@@ -18,7 +18,7 @@ export declare function validateStartParams(params: IStartParams): (repos: {
18
18
  assetTransaction: AssetTransactionRepo;
19
19
  }) => Promise<{
20
20
  reserveTransaction: import("@chevre/factory/lib/chevre/assetTransaction/reserve").ITransaction | undefined;
21
- reservations: (Pick<import("@chevre/factory/lib/chevre/reservation/event").IReservation, "id" | "typeOf" | "issuedThrough" | "reservationNumber"> & {
21
+ reservations: (Pick<import("@chevre/factory/lib/chevre/reservation/event").IReservation, "id" | "typeOf" | "reservationNumber"> & {
22
22
  reservationFor: Pick<factory.reservation.eventReservation.IReservationForMinimized, "id" | "typeOf">;
23
23
  })[] | undefined;
24
24
  }>;
@@ -43,7 +43,7 @@ function validateStartParams(params) {
43
43
  const reservation = await repos.reservation.findReservationById({
44
44
  id: params.object.reservation.id,
45
45
  inclusion: [
46
- 'issuedThrough', 'typeOf', 'reservationNumber', 'reservationFor.id', 'reservationFor.typeOf', 'provider', 'reservationStatus'
46
+ 'typeOf', 'reservationNumber', 'reservationFor.id', 'reservationFor.typeOf', 'provider', 'reservationStatus'
47
47
  ]
48
48
  });
49
49
  // 販売者検証(2023-08-01~)
@@ -61,7 +61,8 @@ function confirmReservation(params) {
61
61
  ...rawReservation.reservedTicket,
62
62
  ticketType: ticketTypeByTransaction
63
63
  },
64
- reservationFor: reserveTransaction.object.reservationFor // reservationForは予約取引から参照する(2026-04-05~)
64
+ reservationFor: reserveTransaction.object.reservationFor, // reservationForは予約取引から参照する(2026-04-05~)
65
+ issuedThrough: reserveTransaction.object.issuedThrough // issuedThroughは予約取引から補完する(2026-05-08~)
65
66
  };
66
67
  });
67
68
  confirmedReservations = confirmedReservations.map((r) => {
@@ -189,25 +190,24 @@ params, options) {
189
190
  if (reserveTransaction.object.disablePendingReservations === true) {
190
191
  const reservationFor = reserveTransaction.object.reservationFor;
191
192
  const subReservations = reserveTransaction.object.subReservation;
192
- const issuedThrough = reserveTransaction.object.issuedThrough;
193
+ // const issuedThrough = reserveTransaction.object.issuedThrough;
193
194
  if (Array.isArray(subReservations)
194
195
  && typeof reservationFor?.typeOf === 'string'
195
- && typeof issuedThrough?.typeOf === 'string') {
196
- // confirmManyに変更(2023-06-13~)
197
- const confirmManyIfNotExistResult = await repos.reservation.confirmManyIfNotExist({
196
+ // && typeof issuedThrough?.typeOf === 'string'
197
+ ) {
198
+ await repos.reservation.confirmManyIfNotExist({
198
199
  bookingTime: reserveTransaction.startDate, // startDateに設定(2024-04-08~)
199
200
  project: { id: reserveTransaction.project.id },
200
201
  provider: (typeof reserveTransaction.object.provider?.id === 'string')
201
202
  ? reserveTransaction.object.provider
202
203
  : { id: reserveTransaction.agent.id, typeOf: factory_1.factory.organizationType.Corporation },
203
204
  subReservation: subReservations,
204
- issuedThrough,
205
+ // issuedThrough,
205
206
  reservationFor,
206
207
  reservationNumber: reserveTransaction.object.reservationNumber,
207
208
  underName,
208
209
  broker: reserveTransaction.object.broker
209
210
  });
210
- debug('confirmManyIfNotExistResult:', confirmManyIfNotExistResult, 'reservationNumber:', reservationPackage.reservationNumber);
211
211
  }
212
212
  }
213
213
  else {
@@ -21,7 +21,8 @@ function createCancelPendingReservationAction(params) {
21
21
  const reservationPackage = {
22
22
  typeOf: factory_1.factory.reservationType.ReservationPackage,
23
23
  reservationNumber: transaction.transactionNumber,
24
- reservationFor: { typeOf: reservationFor.typeOf, id: String(reservationFor.id) },
24
+ // discontinue reservationFor(2026-05-09~)
25
+ // reservationFor: { typeOf: reservationFor.typeOf, id: String(reservationFor.id) },
25
26
  reservationStatus: (typeof params.transaction.object.reservationStatus === 'string')
26
27
  ? params.transaction.object.reservationStatus
27
28
  : factory_1.factory.reservationStatusType.ReservationPending
@@ -5,11 +5,13 @@ import type { IDeprecatedField, IKeyOfProjection, ReservationRepo } from '../../
5
5
  * 予約検索レスポンスとしての予約
6
6
  * 予約ドキュメントに予約取引の情報を補完する
7
7
  */
8
- type IReservationAsFindResult = Omit<factory.reservation.eventReservation.IReservation, 'price' | 'underName' | 'reservedTicket' | 'reservationFor'> & {
8
+ type IReservationAsFindResult = Omit<factory.reservation.eventReservation.IReservation, 'price' | 'priceCurrency' | 'underName' | 'reservedTicket' | 'reservationFor' | 'issuedThrough'> & {
9
9
  price?: factory.reservation.eventReservation.IPrice;
10
+ priceCurrency?: factory.priceCurrency.JPY;
10
11
  underName?: factory.assetTransaction.reserve.IUnderName;
11
12
  reservedTicket?: factory.assetTransaction.reserve.IObjectSubReservation['reservedTicket'];
12
13
  reservationFor?: factory.assetTransaction.reserve.IReservationFor;
14
+ issuedThrough?: factory.assetTransaction.reserve.IIssuedThrough;
13
15
  };
14
16
  /**
15
17
  * 予約を検索する
@@ -5,6 +5,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.findReservations = findReservations;
7
7
  const debug_1 = __importDefault(require("debug"));
8
+ // import { isDeepStrictEqual } from 'util';
9
+ const factory_1 = require("../../factory");
8
10
  const debug = (0, debug_1.default)('chevre-domain:service:reserve:findReservations');
9
11
  /**
10
12
  * 予約を検索する
@@ -18,9 +20,11 @@ function findReservations(params, options) {
18
20
  }
19
21
  else {
20
22
  const requirePrice = Object.keys(inclusion).includes('price');
23
+ const requirePriceCurrency = Object.keys(inclusion).includes('priceCurrency');
21
24
  const requireUnderName = Object.keys(inclusion).includes('underName');
22
25
  const requireReservedTicket = Object.keys(inclusion).includes('reservedTicket');
23
26
  const requireReservationFor = Object.keys(inclusion).includes('reservationFor');
27
+ const requireIssuedThrough = Object.keys(inclusion).includes('issuedThrough');
24
28
  const reservationIds = rawReservations.map(({ id }) => id);
25
29
  const subReservations = await repos.assetTransaction.reserve.findSubReservationsById({
26
30
  ids: reservationIds
@@ -33,6 +37,7 @@ function findReservations(params, options) {
33
37
  const underNameByTransaction = subReservationByTransaction?.underName;
34
38
  const ticketTypeByTransaction = subReservationByTransaction?.reservedTicket?.ticketType;
35
39
  const reservationForByTransaction = subReservationByTransaction?.reservationFor;
40
+ const issuedThroughByTransaction = subReservationByTransaction?.issuedThrough;
36
41
  // 予約ドキュメントを最適化し始めたため、もう等しくない(2026-04-06~)
37
42
  // // 予約取引から参照した属性と全く等しいはず
38
43
  // if (requirePrice) {
@@ -48,10 +53,11 @@ function findReservations(params, options) {
48
53
  // console.error('reservationForMatched: false!!!', reservation.id);
49
54
  // }
50
55
  // }
51
- const { reservationFor, reservedTicket, ...rawReservation4result } = reservation; // eslint-disable-line @typescript-eslint/no-unused-vars
56
+ const { reservationFor: _reservationFor, issuedThrough: _issuedThrough, priceCurrency: _priceCurrency, reservedTicket, ...rawReservation4result } = reservation;
52
57
  return {
53
58
  ...rawReservation4result, // 予約ドキュメントはそのまま返す
54
59
  ...(requirePrice && priceByTransaction !== undefined) ? { price: priceByTransaction } : undefined, // priceがあれば上書き
60
+ ...(requirePriceCurrency) ? { priceCurrency: factory_1.factory.priceCurrency.JPY } : undefined, // 必要あらば固定値を補完(2026-05-08~)
55
61
  ...(requireUnderName && underNameByTransaction !== undefined) ? { underName: underNameByTransaction } : undefined, // underNameがあれば上書き
56
62
  ...(requireReservedTicket && ticketTypeByTransaction !== undefined) // ticketTypeがあれば上書き
57
63
  ? {
@@ -63,7 +69,10 @@ function findReservations(params, options) {
63
69
  : undefined,
64
70
  ...(requireReservationFor && reservationForByTransaction !== undefined)
65
71
  ? { reservationFor: reservationForByTransaction }
66
- : undefined, // reservationForがあれば上書き(2026-04-06~)
72
+ : undefined, // reservationForがあれば上書き(2026-04-06~),
73
+ ...(requireIssuedThrough && issuedThroughByTransaction !== undefined)
74
+ ? { issuedThrough: issuedThroughByTransaction }
75
+ : undefined, // issuedThroughがあれば上書き(2026-05-09~)
67
76
  };
68
77
  });
69
78
  }
@@ -5,13 +5,14 @@ import { factory } from '../../../factory';
5
5
  import { AuthorizationRepo } from '../../../repo/authorization';
6
6
  import type { SettingRepo } from '../../../repo/setting';
7
7
  import type { TaskRepo } from '../../../repo/task';
8
- export type IConfirmedReservation = Omit<factory.reservation.eventReservation.IReservation, 'price' | 'underName' | 'reservedTicket' | 'reservationFor'> & {
8
+ export type IConfirmedReservation = Omit<factory.reservation.eventReservation.IReservation, 'price' | 'underName' | 'reservedTicket' | 'reservationFor' | 'issuedThrough'> & {
9
9
  price?: factory.reservation.eventReservation.IPrice;
10
10
  underName?: Pick<factory.reservation.IUnderName, 'id' | 'typeOf'>;
11
11
  reservedTicket: Omit<factory.assetTransaction.reserve.ISubReservationReservedTicket, 'ticketType'> & {
12
12
  ticketType: factory.reservation.eventReservation.ITicketType;
13
13
  };
14
14
  reservationFor: factory.assetTransaction.reserve.IReservationFor;
15
+ issuedThrough: factory.assetTransaction.reserve.IIssuedThrough;
15
16
  };
16
17
  /**
17
18
  * 予約確定後のアクション
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "dependencies": {
12
12
  "@aws-sdk/client-cognito-identity-provider": "3.600.0",
13
13
  "@aws-sdk/credential-providers": "3.600.0",
14
- "@chevre/factory": "8.1.0-alpha.4",
14
+ "@chevre/factory": "8.1.0-alpha.6",
15
15
  "@motionpicture/coa-service": "10.0.0",
16
16
  "@motionpicture/gmo-service": "6.1.0-alpha.0",
17
17
  "@sendgrid/client": "8.1.4",
@@ -91,5 +91,5 @@
91
91
  "postversion": "git push origin --tags",
92
92
  "prepublishOnly": "npm run clean && npm run build"
93
93
  },
94
- "version": "24.1.0-alpha.10"
94
+ "version": "24.1.0-alpha.12"
95
95
  }