@chevre/domain 25.2.0-alpha.3 → 25.2.0-alpha.31
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/lib/chevre/factory/customerTelephone2COATelNum.d.ts +3 -0
- package/lib/chevre/factory/customerTelephone2COATelNum.js +23 -0
- package/lib/chevre/repo/action/acceptPay.d.ts +15 -0
- package/lib/chevre/repo/action/acceptPay.js +47 -19
- package/lib/chevre/repo/action/actionProcess.js +57 -57
- package/lib/chevre/repo/action.d.ts +16 -9
- package/lib/chevre/repo/action.js +99 -180
- package/lib/chevre/repo/message.d.ts +1 -1
- package/lib/chevre/repo/message.js +1 -1
- package/lib/chevre/repo/mongoose/schemas/action.js +67 -66
- package/lib/chevre/repo/mongoose/schemas/order.d.ts +4 -0
- package/lib/chevre/repo/mongoose/schemas/order.js +10 -0
- package/lib/chevre/repo/mongoose/schemas/setting.d.ts +4 -0
- package/lib/chevre/repo/mongoose/schemas/task.js +12 -12
- package/lib/chevre/repo/order.d.ts +735 -0
- package/lib/chevre/repo/order.js +13 -20
- package/lib/chevre/repo/orderInTransaction.d.ts +45 -0
- package/lib/chevre/repo/orderInTransaction.js +175 -0
- package/lib/chevre/repo/person.d.ts +0 -15
- package/lib/chevre/repo/person.js +122 -108
- package/lib/chevre/repo/transaction/placeOrder.d.ts +2 -45
- package/lib/chevre/repo/transaction/placeOrder.js +43 -83
- package/lib/chevre/service/assetTransaction/pay/publishPaymentUrl.js +1 -1
- package/lib/chevre/service/assetTransaction/pay/start/factory.js +3 -4
- package/lib/chevre/service/offer/event/authorize/factory.d.ts +5 -5
- package/lib/chevre/service/offer/event/authorize/factory.js +30 -20
- package/lib/chevre/service/offer/event/authorize.d.ts +2 -2
- package/lib/chevre/service/offer/event/authorize.js +3 -3
- package/lib/chevre/service/offer/eventServiceByCOA/authorize/factory.d.ts +6 -7
- package/lib/chevre/service/offer/eventServiceByCOA/authorize/factory.js +10 -10
- package/lib/chevre/service/offer/eventServiceByCOA/authorize.d.ts +0 -5
- package/lib/chevre/service/offer/eventServiceByCOA/authorize.js +17 -14
- package/lib/chevre/service/offer/eventServiceByCOA/authorizeByAcceptAction.d.ts +0 -5
- package/lib/chevre/service/offer/eventServiceByCOA/authorizeByAcceptAction.js +2 -2
- package/lib/chevre/service/offer/eventServiceByCOA/changeOffers.js +1 -1
- package/lib/chevre/service/order/deleteOrder.d.ts +5 -1
- package/lib/chevre/service/order/deleteOrder.js +8 -1
- package/lib/chevre/service/order/onAssetTransactionStatusChanged/onPayTransactionConfirmed.d.ts +2 -0
- package/lib/chevre/service/order/onAssetTransactionStatusChanged/paymentDue2Processing.d.ts +2 -0
- package/lib/chevre/service/order/onAssetTransactionStatusChanged.d.ts +2 -0
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderProcessing/createSendEmailMessageTaskIfNotExist.d.ts +5 -1
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderProcessing/createSendEmailMessageTaskIfNotExist.js +95 -33
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderProcessing.d.ts +2 -0
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderReturned.js +2 -6
- package/lib/chevre/service/order/payOrder.d.ts +2 -0
- package/lib/chevre/service/order/placeOrder.d.ts +2 -0
- package/lib/chevre/service/payment/any/authorize/fixOrderAsNeeded.js +1 -2
- package/lib/chevre/service/payment/any/authorize/fixTransactionNumber.d.ts +3 -2
- package/lib/chevre/service/payment/any/authorize/handlePrePublishedPaymentMethodIdOnAuthorizing.d.ts +4 -3
- package/lib/chevre/service/payment/any/authorize/handlePrePublishedPaymentMethodIdOnAuthorizing.js +3 -31
- package/lib/chevre/service/payment/any/authorize.js +13 -37
- package/lib/chevre/service/payment/any/factory.d.ts +6 -6
- package/lib/chevre/service/payment/any/factory.js +19 -22
- package/lib/chevre/service/payment/any/findAcceptAction.d.ts +3 -1
- package/lib/chevre/service/payment/any/findAcceptAction.js +14 -6
- package/lib/chevre/service/payment/any/invalidatePaymentUrl.d.ts +2 -0
- package/lib/chevre/service/payment/any/invalidatePaymentUrl.js +4 -66
- package/lib/chevre/service/payment/any/publishPaymentUrl.d.ts +4 -0
- package/lib/chevre/service/payment/any/publishPaymentUrl.js +4 -18
- package/lib/chevre/service/payment/any/voidPayTransaction.d.ts +2 -0
- package/lib/chevre/service/payment/any/voidPayTransaction.js +1 -23
- package/lib/chevre/service/payment/creditCard/authorize/processAuthorizeCreditCard.d.ts +1 -1
- package/lib/chevre/service/payment/creditCard/authorize/processAuthorizeCreditCard.js +5 -9
- package/lib/chevre/service/reserve/potentialActions/onReservationConfirmed.js +17 -8
- package/lib/chevre/service/reserve/searchByOrder.js +2 -6
- package/lib/chevre/service/task/confirmReserveTransaction.js +2 -7
- package/lib/chevre/service/task/onAssetTransactionStatusChanged.js +2 -2
- package/lib/chevre/service/task/onOrderPaymentCompleted.js +2 -0
- package/lib/chevre/service/task/placeOrder.js +2 -2
- package/lib/chevre/service/task/publishPaymentUrl.js +7 -3
- package/lib/chevre/service/task/voidPayTransaction.js +3 -7
- package/lib/chevre/service/transaction/deleteTransaction/deletePayTransactionsByPlaceOrder.d.ts +15 -0
- package/lib/chevre/service/transaction/deleteTransaction/deletePayTransactionsByPlaceOrder.js +51 -0
- package/lib/chevre/service/transaction/deleteTransaction/deleteReservationsByPlaceOrder.d.ts +23 -0
- package/lib/chevre/service/transaction/deleteTransaction/deleteReservationsByPlaceOrder.js +64 -0
- package/lib/chevre/service/transaction/deleteTransaction.js +15 -152
- package/lib/chevre/service/transaction/placeOrder/confirm/potentialActions.js +0 -1
- package/lib/chevre/service/transaction/placeOrder/confirm/prepareUnitPriceOfferConditions.d.ts +7 -2
- package/lib/chevre/service/transaction/placeOrder/confirm/prepareUnitPriceOfferConditions.js +16 -12
- package/lib/chevre/service/transaction/placeOrder/confirm/validation/factory.d.ts +5 -1
- package/lib/chevre/service/transaction/placeOrder/confirm/validation.d.ts +11 -2
- package/lib/chevre/service/transaction/placeOrder/confirm/validation.js +112 -91
- package/lib/chevre/service/transaction/placeOrder/confirm.d.ts +4 -0
- package/lib/chevre/service/transaction/placeOrder/confirm.js +31 -74
- package/lib/chevre/service/transaction/placeOrder/publishConfirmationNumberIfNotExist.d.ts +4 -7
- package/lib/chevre/service/transaction/placeOrder/publishConfirmationNumberIfNotExist.js +33 -15
- package/lib/chevre/service/transaction/placeOrder/updateAgent.d.ts +2 -0
- package/lib/chevre/service/transaction/placeOrder/updateAgent.js +19 -9
- package/package.json +5 -4
|
@@ -21,9 +21,9 @@ const schemaDefinition = {
|
|
|
21
21
|
endDate: Date,
|
|
22
22
|
purpose: mongoose_1.SchemaTypes.Mixed,
|
|
23
23
|
potentialActions: mongoose_1.SchemaTypes.Mixed,
|
|
24
|
-
amount:
|
|
25
|
-
fromLocation:
|
|
26
|
-
toLocation:
|
|
24
|
+
// amount: SchemaTypes.Mixed, // discontinue(2026-07-08~)
|
|
25
|
+
// fromLocation: SchemaTypes.Mixed, // discontinue(2026-07-08~)
|
|
26
|
+
// toLocation: SchemaTypes.Mixed, // discontinue(2026-07-08~)
|
|
27
27
|
instrument: mongoose_1.SchemaTypes.Mixed,
|
|
28
28
|
location: mongoose_1.SchemaTypes.Mixed, // add location(2022-11-11~)
|
|
29
29
|
replacer: mongoose_1.SchemaTypes.Mixed, // add replacer(2024-03-19~)
|
|
@@ -221,15 +221,16 @@ const indexes = [
|
|
|
221
221
|
}
|
|
222
222
|
}
|
|
223
223
|
],
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
224
|
+
// 承認アクションのobject.event廃止につき検索条件も廃止(2026-07-07~)
|
|
225
|
+
// [
|
|
226
|
+
// { 'object.event.id': 1, startDate: -1 },
|
|
227
|
+
// {
|
|
228
|
+
// name: 'searchByObjectEventId',
|
|
229
|
+
// partialFilterExpression: {
|
|
230
|
+
// 'object.event.id': { $exists: true }
|
|
231
|
+
// }
|
|
232
|
+
// }
|
|
233
|
+
// ],
|
|
233
234
|
[
|
|
234
235
|
{ 'about.id': 1, startDate: -1 },
|
|
235
236
|
{
|
|
@@ -329,60 +330,60 @@ const indexes = [
|
|
|
329
330
|
}
|
|
330
331
|
}
|
|
331
332
|
],
|
|
332
|
-
[
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
],
|
|
341
|
-
[
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
],
|
|
350
|
-
[
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
],
|
|
359
|
-
[
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
],
|
|
368
|
-
[
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
],
|
|
377
|
-
[
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
],
|
|
333
|
+
// [
|
|
334
|
+
// { 'fromLocation.typeOf': 1, startDate: -1 },
|
|
335
|
+
// {
|
|
336
|
+
// name: 'searchByFromLocationTypeOf',
|
|
337
|
+
// partialFilterExpression: {
|
|
338
|
+
// 'fromLocation.typeOf': { $exists: true }
|
|
339
|
+
// }
|
|
340
|
+
// }
|
|
341
|
+
// ],
|
|
342
|
+
// [
|
|
343
|
+
// { 'fromLocation.accountNumber': 1, startDate: -1 },
|
|
344
|
+
// {
|
|
345
|
+
// name: 'searchByFromLocationAccountNumber',
|
|
346
|
+
// partialFilterExpression: {
|
|
347
|
+
// 'fromLocation.accountNumber': { $exists: true }
|
|
348
|
+
// }
|
|
349
|
+
// }
|
|
350
|
+
// ],
|
|
351
|
+
// [
|
|
352
|
+
// { 'fromLocation.accountType': 1, startDate: -1 },
|
|
353
|
+
// {
|
|
354
|
+
// name: 'searchByFromLocationAccountType',
|
|
355
|
+
// partialFilterExpression: {
|
|
356
|
+
// 'fromLocation.accountType': { $exists: true }
|
|
357
|
+
// }
|
|
358
|
+
// }
|
|
359
|
+
// ],
|
|
360
|
+
// [
|
|
361
|
+
// { 'toLocation.typeOf': 1, startDate: -1 },
|
|
362
|
+
// {
|
|
363
|
+
// name: 'searchByToLocationTypeOf',
|
|
364
|
+
// partialFilterExpression: {
|
|
365
|
+
// 'toLocation.typeOf': { $exists: true }
|
|
366
|
+
// }
|
|
367
|
+
// }
|
|
368
|
+
// ],
|
|
369
|
+
// [
|
|
370
|
+
// { 'toLocation.accountNumber': 1, startDate: -1 },
|
|
371
|
+
// {
|
|
372
|
+
// name: 'searchByToLocationAccountNumber',
|
|
373
|
+
// partialFilterExpression: {
|
|
374
|
+
// 'toLocation.accountNumber': { $exists: true }
|
|
375
|
+
// }
|
|
376
|
+
// }
|
|
377
|
+
// ],
|
|
378
|
+
// [
|
|
379
|
+
// { 'toLocation.accountType': 1, startDate: -1 },
|
|
380
|
+
// {
|
|
381
|
+
// name: 'searchByToLocationAccountType',
|
|
382
|
+
// partialFilterExpression: {
|
|
383
|
+
// 'toLocation.accountType': { $exists: true }
|
|
384
|
+
// }
|
|
385
|
+
// }
|
|
386
|
+
// ],
|
|
386
387
|
[
|
|
387
388
|
{ 'instrument.transactionNumber': 1, startDate: -1 },
|
|
388
389
|
{
|
|
@@ -7,6 +7,10 @@ type IDocType = Omit<factory.order.IOrder, 'id'> & {
|
|
|
7
7
|
* 注文取引IDとして再定義(2026-06-22~)
|
|
8
8
|
*/
|
|
9
9
|
identifier?: string;
|
|
10
|
+
/**
|
|
11
|
+
* 外部URL決済の場合に発行される決済方法IDとして定義(2026-07-12~)
|
|
12
|
+
*/
|
|
13
|
+
paymentMethodId?: string;
|
|
10
14
|
};
|
|
11
15
|
type IModel = Model<IDocType, Record<string, never>, Record<string, never>, IVirtuals>;
|
|
12
16
|
type ISchemaDefinition = SchemaDefinition<IDocType>;
|
|
@@ -27,6 +27,7 @@ const schemaDefinition = {
|
|
|
27
27
|
dateReturned: Date,
|
|
28
28
|
orderedItem: [mongoose_1.SchemaTypes.Mixed],
|
|
29
29
|
identifier: { type: String, required: true }, // 注文取引IDとして再定義(2026-06-22~)
|
|
30
|
+
paymentMethodId: { type: String, required: false }, // 注文取引から移行(2026-07-12~)
|
|
30
31
|
// 以下廃止(2026-06-13~)
|
|
31
32
|
// identifier: SchemaTypes.Mixed, // 廃止するためにMixed化(2026-06-12~)
|
|
32
33
|
// isGift: Boolean,
|
|
@@ -343,6 +344,15 @@ const indexes = [
|
|
|
343
344
|
}
|
|
344
345
|
}
|
|
345
346
|
],
|
|
347
|
+
[
|
|
348
|
+
{ paymentMethodId: 1, orderDate: -1 },
|
|
349
|
+
{
|
|
350
|
+
name: 'paymentMethodId',
|
|
351
|
+
partialFilterExpression: {
|
|
352
|
+
paymentMethodId: { $exists: true }
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
],
|
|
346
356
|
[
|
|
347
357
|
{ price: 1, orderDate: -1 },
|
|
348
358
|
{
|
|
@@ -214,19 +214,19 @@ const indexes = [
|
|
|
214
214
|
alternateName: { $exists: true }
|
|
215
215
|
}
|
|
216
216
|
}
|
|
217
|
+
],
|
|
218
|
+
// add unique index(dev)(2025-03-28~)
|
|
219
|
+
// add unique index(test,prod)(2026-07-08~)
|
|
220
|
+
[
|
|
221
|
+
{ identifier: 1 },
|
|
222
|
+
{
|
|
223
|
+
unique: true,
|
|
224
|
+
name: 'uniqueIdentifier',
|
|
225
|
+
partialFilterExpression: {
|
|
226
|
+
identifier: { $exists: true }
|
|
227
|
+
}
|
|
228
|
+
}
|
|
217
229
|
]
|
|
218
|
-
// eslint-disable-next-line no-warning-comments
|
|
219
|
-
// TODO add unique index(2025-03-28~)
|
|
220
|
-
// [
|
|
221
|
-
// { identifier: 1 },
|
|
222
|
-
// {
|
|
223
|
-
// unique: true,
|
|
224
|
-
// name: 'uniqueIdentifier',
|
|
225
|
-
// partialFilterExpression: {
|
|
226
|
-
// identifier: { $exists: true }
|
|
227
|
-
// }
|
|
228
|
-
// }
|
|
229
|
-
// ]
|
|
230
230
|
];
|
|
231
231
|
exports.indexes = indexes;
|
|
232
232
|
/**
|