@chevre/domain 21.2.0-alpha.5 → 21.2.0-alpha.50
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/example/src/chevre/aggregation/aggregateSystem.ts +58 -31
- package/example/src/chevre/countDelayedTasks.ts +17 -0
- package/example/src/chevre/countDelayedTransactions.ts +60 -0
- package/example/src/chevre/countMoneyTransferTransaction.ts +36 -0
- package/example/src/chevre/createManyEventsIfNotExist.ts +4 -1
- package/example/src/chevre/migrateOrderAdditionalProperties.ts +85 -0
- package/example/src/chevre/migrateStockHolderKeys.ts +89 -0
- package/example/src/chevre/saveTasks.ts +13 -10
- package/example/src/chevre/searchAbortedTasks.ts +36 -0
- package/example/src/chevre/task/executeTasks.ts +26 -0
- package/example/src/chevre/transaction/findCreditCard.ts +1 -1
- package/example/src/chevre/transaction/orderMembershipService.ts +1 -1
- package/example/src/chevre/transaction/startExportTasks.ts +20 -0
- package/example/src/chevre/updateTransaction.ts +1 -1
- package/lib/chevre/credentials.d.ts +1 -0
- package/lib/chevre/credentials.js +2 -1
- package/lib/chevre/eventEmitter/assetTransaction.d.ts +21 -0
- package/lib/chevre/eventEmitter/assetTransaction.js +25 -0
- package/lib/chevre/eventEmitter/task.d.ts +18 -0
- package/lib/chevre/eventEmitter/task.js +25 -0
- package/lib/chevre/eventEmitter/transaction.d.ts +21 -0
- package/lib/chevre/eventEmitter/transaction.js +25 -0
- package/lib/chevre/eventEmitter.d.ts +4 -0
- package/lib/chevre/eventEmitter.js +9 -0
- package/lib/chevre/index.d.ts +3 -2
- package/lib/chevre/index.js +5 -3
- package/lib/chevre/repo/account.js +0 -4
- package/lib/chevre/repo/accountTitle.js +0 -4
- package/lib/chevre/repo/accountTransaction.d.ts +3 -11
- package/lib/chevre/repo/accountTransaction.js +1 -58
- package/lib/chevre/repo/accountingReport.js +0 -4
- package/lib/chevre/repo/action.d.ts +12 -1
- package/lib/chevre/repo/action.js +9 -29
- package/lib/chevre/repo/additionalProperty.js +0 -4
- package/lib/chevre/repo/aggregation.js +0 -4
- package/lib/chevre/repo/assetTransaction.d.ts +22 -7
- package/lib/chevre/repo/assetTransaction.js +173 -55
- package/lib/chevre/repo/categoryCode.js +0 -4
- package/lib/chevre/repo/code.js +0 -4
- package/lib/chevre/repo/comment.d.ts +4 -1
- package/lib/chevre/repo/comment.js +20 -9
- package/lib/chevre/repo/confirmationNumber.d.ts +0 -1
- package/lib/chevre/repo/confirmationNumber.js +3 -15
- package/lib/chevre/repo/creativeWork.d.ts +1 -3
- package/lib/chevre/repo/creativeWork.js +0 -4
- package/lib/chevre/repo/customer.js +0 -4
- package/lib/chevre/repo/emailMessage.d.ts +1 -27
- package/lib/chevre/repo/emailMessage.js +0 -4
- package/lib/chevre/repo/event.d.ts +5 -1
- package/lib/chevre/repo/event.js +0 -4
- package/lib/chevre/repo/member.js +0 -4
- package/lib/chevre/repo/merchantReturnPolicy.d.ts +1 -3
- package/lib/chevre/repo/merchantReturnPolicy.js +0 -4
- package/lib/chevre/repo/mongoose/schemas/account.d.ts +5 -2
- package/lib/chevre/repo/mongoose/schemas/account.js +1 -0
- package/lib/chevre/repo/mongoose/schemas/accountTitle.d.ts +30 -3
- package/lib/chevre/repo/mongoose/schemas/accountTitle.js +1 -0
- package/lib/chevre/repo/mongoose/schemas/accountTransaction.d.ts +32 -3
- package/lib/chevre/repo/mongoose/schemas/accountTransaction.js +2 -1
- package/lib/chevre/repo/mongoose/schemas/accountingReport.d.ts +14 -3
- package/lib/chevre/repo/mongoose/schemas/accountingReport.js +1 -0
- package/lib/chevre/repo/mongoose/schemas/action.d.ts +44 -3
- package/lib/chevre/repo/mongoose/schemas/action.js +2 -1
- package/lib/chevre/repo/mongoose/schemas/additionalProperty.d.ts +18 -3
- package/lib/chevre/repo/mongoose/schemas/additionalProperty.js +1 -0
- package/lib/chevre/repo/mongoose/schemas/aggregation.d.ts +5 -2
- package/lib/chevre/repo/mongoose/schemas/aggregation.js +1 -0
- package/lib/chevre/repo/mongoose/schemas/assetTransaction.d.ts +45 -3
- package/lib/chevre/repo/mongoose/schemas/assetTransaction.js +3 -1
- package/lib/chevre/repo/mongoose/schemas/authorization.d.ts +20 -3
- package/lib/chevre/repo/mongoose/schemas/authorization.js +2 -1
- package/lib/chevre/repo/mongoose/schemas/categoryCode.d.ts +26 -3
- package/lib/chevre/repo/mongoose/schemas/categoryCode.js +1 -0
- package/lib/chevre/repo/mongoose/schemas/comments.d.ts +28 -3
- package/lib/chevre/repo/mongoose/schemas/comments.js +2 -1
- package/lib/chevre/repo/mongoose/schemas/creativeWork.d.ts +44 -3
- package/lib/chevre/repo/mongoose/schemas/creativeWork.js +1 -0
- package/lib/chevre/repo/mongoose/schemas/customer.d.ts +26 -3
- package/lib/chevre/repo/mongoose/schemas/customer.js +1 -0
- package/lib/chevre/repo/mongoose/schemas/emailMessages.d.ts +22 -3
- package/lib/chevre/repo/mongoose/schemas/emailMessages.js +1 -0
- package/lib/chevre/repo/mongoose/schemas/event.d.ts +72 -3
- package/lib/chevre/repo/mongoose/schemas/event.js +1 -0
- package/lib/chevre/repo/mongoose/schemas/member.d.ts +14 -3
- package/lib/chevre/repo/mongoose/schemas/member.js +1 -0
- package/lib/chevre/repo/mongoose/schemas/merchantReturnPolicy.d.ts +22 -3
- package/lib/chevre/repo/mongoose/schemas/merchantReturnPolicy.js +1 -0
- package/lib/chevre/repo/mongoose/schemas/offer.d.ts +66 -3
- package/lib/chevre/repo/mongoose/schemas/offer.js +1 -0
- package/lib/chevre/repo/mongoose/schemas/offerCatalog.d.ts +28 -3
- package/lib/chevre/repo/mongoose/schemas/offerCatalog.js +1 -0
- package/lib/chevre/repo/mongoose/schemas/order.d.ts +52 -3
- package/lib/chevre/repo/mongoose/schemas/order.js +2 -1
- package/lib/chevre/repo/mongoose/schemas/ownershipInfo.d.ts +26 -3
- package/lib/chevre/repo/mongoose/schemas/ownershipInfo.js +2 -1
- package/lib/chevre/repo/mongoose/schemas/place.d.ts +50 -3
- package/lib/chevre/repo/mongoose/schemas/place.js +1 -0
- package/lib/chevre/repo/mongoose/schemas/priceSpecification.d.ts +30 -3
- package/lib/chevre/repo/mongoose/schemas/priceSpecification.js +1 -0
- package/lib/chevre/repo/mongoose/schemas/product.d.ts +32 -3
- package/lib/chevre/repo/mongoose/schemas/product.js +1 -0
- package/lib/chevre/repo/mongoose/schemas/project.d.ts +24 -3
- package/lib/chevre/repo/mongoose/schemas/project.js +1 -0
- package/lib/chevre/repo/mongoose/schemas/reservation.d.ts +62 -3
- package/lib/chevre/repo/mongoose/schemas/reservation.js +2 -1
- package/lib/chevre/repo/mongoose/schemas/role.d.ts +12 -3
- package/lib/chevre/repo/mongoose/schemas/role.js +1 -0
- package/lib/chevre/repo/mongoose/schemas/seller.d.ts +32 -3
- package/lib/chevre/repo/mongoose/schemas/seller.js +1 -0
- package/lib/chevre/repo/mongoose/schemas/serviceOutput.d.ts +12 -3
- package/lib/chevre/repo/mongoose/schemas/serviceOutput.js +2 -1
- package/lib/chevre/repo/mongoose/schemas/task.d.ts +31 -3
- package/lib/chevre/repo/mongoose/schemas/task.js +3 -1
- package/lib/chevre/repo/mongoose/schemas/telemetry.d.ts +22 -3
- package/lib/chevre/repo/mongoose/schemas/telemetry.js +1 -0
- package/lib/chevre/repo/mongoose/schemas/transaction.d.ts +41 -3
- package/lib/chevre/repo/mongoose/schemas/transaction.js +3 -1
- package/lib/chevre/repo/mongoose/schemas/trip.d.ts +12 -3
- package/lib/chevre/repo/mongoose/schemas/trip.js +1 -0
- package/lib/chevre/repo/offer.js +0 -5
- package/lib/chevre/repo/offerCatalog.js +0 -4
- package/lib/chevre/repo/order.d.ts +25 -0
- package/lib/chevre/repo/order.js +5 -4
- package/lib/chevre/repo/ownershipInfo.js +0 -4
- package/lib/chevre/repo/permit.js +0 -4
- package/lib/chevre/repo/place.d.ts +5 -1
- package/lib/chevre/repo/place.js +1 -10
- package/lib/chevre/repo/priceSpecification.js +0 -4
- package/lib/chevre/repo/product.js +0 -4
- package/lib/chevre/repo/project.js +0 -4
- package/lib/chevre/repo/reservation.js +0 -4
- package/lib/chevre/repo/role.js +0 -4
- package/lib/chevre/repo/seller.js +0 -4
- package/lib/chevre/repo/serviceOutput.js +0 -4
- package/lib/chevre/repo/stockHolder.js +30 -0
- package/lib/chevre/repo/task.d.ts +38 -2
- package/lib/chevre/repo/task.js +96 -10
- package/lib/chevre/repo/telemetry.js +0 -4
- package/lib/chevre/repo/transaction.d.ts +23 -3
- package/lib/chevre/repo/transaction.js +174 -58
- package/lib/chevre/repo/trip.js +0 -4
- package/lib/chevre/service/aggregation/system.d.ts +67 -22
- package/lib/chevre/service/aggregation/system.js +101 -89
- package/lib/chevre/service/assetTransaction/cancelReservation.js +1 -5
- package/lib/chevre/service/assetTransaction/moneyTransfer.js +1 -1
- package/lib/chevre/service/assetTransaction/pay.js +10 -4
- package/lib/chevre/service/assetTransaction/refund.js +1 -1
- package/lib/chevre/service/assetTransaction/registerService.js +1 -2
- package/lib/chevre/service/assetTransaction/reserve.js +1 -1
- package/lib/chevre/service/assetTransaction.d.ts +6 -2
- package/lib/chevre/service/assetTransaction.js +9 -5
- package/lib/chevre/service/notification/factory.js +2 -2
- package/lib/chevre/service/notification.d.ts +3 -1
- package/lib/chevre/service/notification.js +41 -7
- package/lib/chevre/service/offer/event/voidTransaction.d.ts +2 -0
- package/lib/chevre/service/offer/event/voidTransaction.js +17 -1
- package/lib/chevre/service/offer.js +1 -1
- package/lib/chevre/service/order/onOrderStatusChanged.js +1 -1
- package/lib/chevre/service/order/placeOrder.js +1 -1
- package/lib/chevre/service/order/returnOrder.js +1 -5
- package/lib/chevre/service/order/sendOrder.js +1 -1
- package/lib/chevre/service/payment/any/onPaid.js +1 -1
- package/lib/chevre/service/payment/any/onRefund.js +1 -1
- package/lib/chevre/service/payment/any.js +60 -10
- package/lib/chevre/service/payment/movieTicket/validation.d.ts +6 -2
- package/lib/chevre/service/payment/movieTicket/validation.js +12 -25
- package/lib/chevre/service/payment/movieTicket.d.ts +4 -1
- package/lib/chevre/service/payment/movieTicket.js +4 -3
- package/lib/chevre/service/product.js +1 -5
- package/lib/chevre/service/report/telemetry.d.ts +0 -11
- package/lib/chevre/service/report/telemetry.js +21 -24
- package/lib/chevre/service/reserve/cancelReservation.js +0 -2
- package/lib/chevre/service/reserve/potentialActions/onReservationCanceled.d.ts +0 -3
- package/lib/chevre/service/reserve/potentialActions/onReservationCanceled.js +20 -20
- package/lib/chevre/service/reserve/potentialActions/onReservationCheckedIn.js +2 -3
- package/lib/chevre/service/reserve/potentialActions/onReservationConfirmed.js +2 -31
- package/lib/chevre/service/reserve/potentialActions/onReservationUsed.js +2 -3
- package/lib/chevre/service/reserve/useReservation.js +1 -8
- package/lib/chevre/service/task/confirmRegisterServiceTransaction.js +1 -1
- package/lib/chevre/service/task/returnPayTransaction.js +1 -5
- package/lib/chevre/service/task/voidReserveTransaction.js +3 -1
- package/lib/chevre/service/task.d.ts +9 -0
- package/lib/chevre/service/task.js +43 -4
- package/lib/chevre/service/transaction/moneyTransfer.js +4 -4
- package/lib/chevre/service/transaction/orderProgramMembership.js +2 -1
- package/lib/chevre/service/transaction/placeOrder/exportTasks/factory.js +30 -29
- package/lib/chevre/service/transaction/placeOrder.js +1 -5
- package/lib/chevre/service/transaction/placeOrderInProgress/factory.js +1 -1
- package/lib/chevre/service/transaction/placeOrderInProgress/potentialActions/moneyTransfer.d.ts +1 -0
- package/lib/chevre/service/transaction/placeOrderInProgress/potentialActions/moneyTransfer.js +1 -1
- package/lib/chevre/service/transaction/placeOrderInProgress/potentialActions/registerService.d.ts +1 -0
- package/lib/chevre/service/transaction/placeOrderInProgress/potentialActions/registerService.js +1 -1
- package/lib/chevre/service/transaction/placeOrderInProgress/potentialActions.d.ts +1 -0
- package/lib/chevre/service/transaction/placeOrderInProgress/result/acceptedOffers.d.ts +3 -0
- package/lib/chevre/service/transaction/placeOrderInProgress/result/acceptedOffers.js +7 -3
- package/lib/chevre/service/transaction/placeOrderInProgress/result.d.ts +1 -0
- package/lib/chevre/service/transaction/placeOrderInProgress/result.js +2 -2
- package/lib/chevre/service/transaction/placeOrderInProgress/validation/validateMovieTicket.d.ts +1 -1
- package/lib/chevre/service/transaction/placeOrderInProgress/validation/validateMovieTicket.js +2 -2
- package/lib/chevre/service/transaction/placeOrderInProgress/validation.d.ts +2 -1
- package/lib/chevre/service/transaction/placeOrderInProgress/validation.js +23 -17
- package/lib/chevre/service/transaction/placeOrderInProgress.d.ts +1 -0
- package/lib/chevre/service/transaction/placeOrderInProgress.js +17 -10
- package/lib/chevre/service/transaction/returnOrder.js +1 -5
- package/lib/chevre/service/transaction.d.ts +6 -0
- package/lib/chevre/service/transaction.js +9 -7
- package/lib/chevre/settings.d.ts +4 -1
- package/lib/chevre/settings.js +11 -4
- package/package.json +5 -5
- package/example/src/chevre/migrateMoneyTransferPendingTransactionIdentifier.ts +0 -96
- package/example/src/chevre/migrateMovieAdditionalProperties.ts +0 -98
|
@@ -6,8 +6,10 @@ import { chevre } from '../../../../lib/index';
|
|
|
6
6
|
const EXCLUDED_PROJECT_ID = process.env.EXCLUDED_PROJECT_ID;
|
|
7
7
|
const AGGREGATE_DAYS = Number(process.env.AGGREGATE_DAYS);
|
|
8
8
|
const AGGREGATE_CLIENT_IDS = (typeof process.env.AGGREGATE_CLIENT_IDS === 'string') ? process.env.AGGREGATE_CLIENT_IDS.split(' ') : [];
|
|
9
|
+
const ONE_DAY_IN_HOURS = 24;
|
|
9
10
|
console.log('AGGREGATE_CLIENT_IDS:', AGGREGATE_CLIENT_IDS);
|
|
10
11
|
|
|
12
|
+
// tslint:disable-next-line:max-func-body-length
|
|
11
13
|
async function main() {
|
|
12
14
|
await mongoose.connect(<string>process.env.MONGOLAB_URI, { autoIndex: false });
|
|
13
15
|
|
|
@@ -18,94 +20,119 @@ async function main() {
|
|
|
18
20
|
const actionRepo = new chevre.repository.Action(mongoose.connection);
|
|
19
21
|
const taskRepo = new chevre.repository.Task(mongoose.connection);
|
|
20
22
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
23
|
+
let result: { aggregationCount: number; aggregateDuration: string };
|
|
24
|
+
|
|
25
|
+
result = await chevre.service.aggregation.system.aggregatePlaceOrder({
|
|
26
|
+
aggregateDurationUnit: 'hours',
|
|
27
|
+
aggregationCount: AGGREGATE_DAYS * ONE_DAY_IN_HOURS,
|
|
28
|
+
excludedProjectId: EXCLUDED_PROJECT_ID,
|
|
29
|
+
clientIds: AGGREGATE_CLIENT_IDS
|
|
24
30
|
})({
|
|
25
31
|
agregation: aggregationRepo,
|
|
26
|
-
|
|
32
|
+
transaction: transactionRepo
|
|
27
33
|
});
|
|
34
|
+
console.log('aggregatePlaceOrder processed.', result);
|
|
35
|
+
// return;
|
|
28
36
|
|
|
29
|
-
await chevre.service.aggregation.system.
|
|
30
|
-
|
|
37
|
+
result = await chevre.service.aggregation.system.aggregateTask({
|
|
38
|
+
aggregateDurationUnit: 'hours',
|
|
39
|
+
aggregationCount: AGGREGATE_DAYS * ONE_DAY_IN_HOURS,
|
|
31
40
|
excludedProjectId: EXCLUDED_PROJECT_ID
|
|
32
41
|
})({
|
|
33
42
|
agregation: aggregationRepo,
|
|
34
|
-
|
|
43
|
+
task: taskRepo
|
|
35
44
|
});
|
|
45
|
+
console.log('aggregateTask processed.', result);
|
|
36
46
|
|
|
37
|
-
await chevre.service.aggregation.system.
|
|
38
|
-
|
|
47
|
+
result = await chevre.service.aggregation.system.aggregatePayMovieTicketAction({
|
|
48
|
+
aggregateDurationUnit: 'hours',
|
|
49
|
+
aggregationCount: AGGREGATE_DAYS * ONE_DAY_IN_HOURS,
|
|
39
50
|
excludedProjectId: EXCLUDED_PROJECT_ID
|
|
40
51
|
})({
|
|
41
52
|
agregation: aggregationRepo,
|
|
42
|
-
|
|
53
|
+
action: actionRepo
|
|
43
54
|
});
|
|
55
|
+
console.log('aggregatePayMovieTicketAction processed.', result);
|
|
44
56
|
|
|
45
|
-
await chevre.service.aggregation.system.
|
|
46
|
-
|
|
57
|
+
result = await chevre.service.aggregation.system.aggregatePayTransaction({
|
|
58
|
+
aggregateDurationUnit: 'hours',
|
|
59
|
+
aggregationCount: AGGREGATE_DAYS * ONE_DAY_IN_HOURS,
|
|
47
60
|
excludedProjectId: EXCLUDED_PROJECT_ID
|
|
48
61
|
})({
|
|
49
62
|
agregation: aggregationRepo,
|
|
50
|
-
|
|
63
|
+
assetTransaction: assetTransactionRepo
|
|
51
64
|
});
|
|
65
|
+
console.log('aggregatePayTransaction processed.', result);
|
|
52
66
|
|
|
53
|
-
await chevre.service.aggregation.system.
|
|
54
|
-
|
|
67
|
+
result = await chevre.service.aggregation.system.aggregateEvent({
|
|
68
|
+
aggregateDurationUnit: 'hours',
|
|
69
|
+
aggregationCount: AGGREGATE_DAYS * ONE_DAY_IN_HOURS,
|
|
55
70
|
excludedProjectId: EXCLUDED_PROJECT_ID
|
|
56
71
|
})({
|
|
57
72
|
agregation: aggregationRepo,
|
|
58
|
-
|
|
73
|
+
event: eventRepo
|
|
59
74
|
});
|
|
75
|
+
console.log('aggregateEvent processed.', result);
|
|
60
76
|
|
|
61
|
-
await chevre.service.aggregation.system.
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
77
|
+
result = await chevre.service.aggregation.system.aggregateReserveTransaction({
|
|
78
|
+
aggregateDurationUnit: 'hours',
|
|
79
|
+
aggregationCount: AGGREGATE_DAYS * ONE_DAY_IN_HOURS,
|
|
80
|
+
excludedProjectId: EXCLUDED_PROJECT_ID
|
|
65
81
|
})({
|
|
66
82
|
agregation: aggregationRepo,
|
|
67
|
-
|
|
83
|
+
assetTransaction: assetTransactionRepo
|
|
68
84
|
});
|
|
85
|
+
console.log('aggregateReserveTransaction processed.', result);
|
|
69
86
|
|
|
70
|
-
await chevre.service.aggregation.system.aggregateAuthorizeOrderAction({
|
|
71
|
-
|
|
87
|
+
result = await chevre.service.aggregation.system.aggregateAuthorizeOrderAction({
|
|
88
|
+
aggregateDurationUnit: 'hours',
|
|
89
|
+
aggregationCount: AGGREGATE_DAYS * ONE_DAY_IN_HOURS,
|
|
72
90
|
excludedProjectId: EXCLUDED_PROJECT_ID
|
|
73
91
|
})({
|
|
74
92
|
agregation: aggregationRepo,
|
|
75
93
|
action: actionRepo
|
|
76
94
|
});
|
|
95
|
+
console.log('aggregateAuthorizeOrderAction processed.', result);
|
|
77
96
|
|
|
78
|
-
await chevre.service.aggregation.system.aggregateAuthorizeEventServiceOfferAction({
|
|
79
|
-
|
|
97
|
+
result = await chevre.service.aggregation.system.aggregateAuthorizeEventServiceOfferAction({
|
|
98
|
+
aggregateDurationUnit: 'hours',
|
|
99
|
+
aggregationCount: AGGREGATE_DAYS * ONE_DAY_IN_HOURS,
|
|
80
100
|
excludedProjectId: EXCLUDED_PROJECT_ID
|
|
81
101
|
})({
|
|
82
102
|
agregation: aggregationRepo,
|
|
83
103
|
action: actionRepo
|
|
84
104
|
});
|
|
105
|
+
console.log('aggregateAuthorizeEventServiceOfferAction processed.', result);
|
|
85
106
|
|
|
86
|
-
await chevre.service.aggregation.system.aggregateAuthorizePaymentAction({
|
|
87
|
-
|
|
107
|
+
result = await chevre.service.aggregation.system.aggregateAuthorizePaymentAction({
|
|
108
|
+
aggregateDurationUnit: 'hours',
|
|
109
|
+
aggregationCount: AGGREGATE_DAYS * ONE_DAY_IN_HOURS,
|
|
88
110
|
excludedProjectId: EXCLUDED_PROJECT_ID
|
|
89
111
|
})({
|
|
90
112
|
agregation: aggregationRepo,
|
|
91
113
|
action: actionRepo
|
|
92
114
|
});
|
|
115
|
+
console.log('aggregateAuthorizePaymentAction processed.', result);
|
|
93
116
|
|
|
94
|
-
await chevre.service.aggregation.system.aggregateUseAction({
|
|
95
|
-
|
|
117
|
+
result = await chevre.service.aggregation.system.aggregateUseAction({
|
|
118
|
+
aggregateDurationUnit: 'hours',
|
|
119
|
+
aggregationCount: AGGREGATE_DAYS * ONE_DAY_IN_HOURS,
|
|
96
120
|
excludedProjectId: EXCLUDED_PROJECT_ID
|
|
97
121
|
})({
|
|
98
122
|
agregation: aggregationRepo,
|
|
99
123
|
action: actionRepo
|
|
100
124
|
});
|
|
125
|
+
console.log('aggregateUseAction processed.', result);
|
|
101
126
|
|
|
102
|
-
await chevre.service.aggregation.system.aggregateCheckMovieTicketAction({
|
|
103
|
-
|
|
127
|
+
result = await chevre.service.aggregation.system.aggregateCheckMovieTicketAction({
|
|
128
|
+
aggregateDurationUnit: 'hours',
|
|
129
|
+
aggregationCount: AGGREGATE_DAYS * ONE_DAY_IN_HOURS,
|
|
104
130
|
excludedProjectId: EXCLUDED_PROJECT_ID
|
|
105
131
|
})({
|
|
106
132
|
agregation: aggregationRepo,
|
|
107
133
|
action: actionRepo
|
|
108
134
|
});
|
|
135
|
+
console.log('aggregateCheckMovieTicketAction processed.', result);
|
|
109
136
|
}
|
|
110
137
|
|
|
111
138
|
main()
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// tslint:disable:no-console
|
|
2
|
+
import * as mongoose from 'mongoose';
|
|
3
|
+
|
|
4
|
+
import { chevre } from '../../../lib/index';
|
|
5
|
+
|
|
6
|
+
export async function main() {
|
|
7
|
+
await mongoose.connect(<string>process.env.MONGOLAB_URI);
|
|
8
|
+
|
|
9
|
+
const taskRepo = new chevre.repository.Task(mongoose.connection);
|
|
10
|
+
|
|
11
|
+
const count = await taskRepo.countDelayedTasks({ delayInSeconds: 60 });
|
|
12
|
+
console.log('count:', count);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
main()
|
|
16
|
+
.then()
|
|
17
|
+
.catch(console.error);
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
// tslint:disable:no-console
|
|
2
|
+
import * as mongoose from 'mongoose';
|
|
3
|
+
|
|
4
|
+
import { chevre } from '../../../lib/index';
|
|
5
|
+
|
|
6
|
+
export async function main() {
|
|
7
|
+
await mongoose.connect(<string>process.env.MONGOLAB_URI);
|
|
8
|
+
|
|
9
|
+
const assetTransactionRepo = new chevre.repository.AssetTransaction(mongoose.connection);
|
|
10
|
+
const transactionRepo = new chevre.repository.Transaction(mongoose.connection);
|
|
11
|
+
|
|
12
|
+
for (const typeOf of [
|
|
13
|
+
chevre.factory.transactionType.PlaceOrder,
|
|
14
|
+
chevre.factory.transactionType.ReturnOrder,
|
|
15
|
+
chevre.factory.transactionType.MoneyTransfer
|
|
16
|
+
]) {
|
|
17
|
+
const count = await transactionRepo.count({
|
|
18
|
+
typeOf,
|
|
19
|
+
statuses: [
|
|
20
|
+
chevre.factory.transactionStatusType.Canceled,
|
|
21
|
+
chevre.factory.transactionStatusType.Confirmed,
|
|
22
|
+
chevre.factory.transactionStatusType.Expired
|
|
23
|
+
],
|
|
24
|
+
tasksExportationStatuses: [
|
|
25
|
+
chevre.factory.transactionTasksExportationStatus.Exporting,
|
|
26
|
+
chevre.factory.transactionTasksExportationStatus.Unexported
|
|
27
|
+
],
|
|
28
|
+
endThrough: new Date()
|
|
29
|
+
});
|
|
30
|
+
console.log('count:', count, typeOf);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
for (const typeOf of [
|
|
34
|
+
chevre.factory.assetTransactionType.CancelReservation,
|
|
35
|
+
chevre.factory.assetTransactionType.MoneyTransfer,
|
|
36
|
+
chevre.factory.assetTransactionType.Pay,
|
|
37
|
+
chevre.factory.assetTransactionType.Refund,
|
|
38
|
+
chevre.factory.assetTransactionType.RegisterService,
|
|
39
|
+
chevre.factory.assetTransactionType.Reserve
|
|
40
|
+
]) {
|
|
41
|
+
const count = await assetTransactionRepo.count({
|
|
42
|
+
typeOf,
|
|
43
|
+
statuses: [
|
|
44
|
+
chevre.factory.transactionStatusType.Canceled,
|
|
45
|
+
chevre.factory.transactionStatusType.Confirmed,
|
|
46
|
+
chevre.factory.transactionStatusType.Expired
|
|
47
|
+
],
|
|
48
|
+
tasksExportationStatuses: [
|
|
49
|
+
chevre.factory.transactionTasksExportationStatus.Exporting,
|
|
50
|
+
chevre.factory.transactionTasksExportationStatus.Unexported
|
|
51
|
+
],
|
|
52
|
+
endThrough: new Date()
|
|
53
|
+
});
|
|
54
|
+
console.log('count:', count, typeOf);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
main()
|
|
59
|
+
.then()
|
|
60
|
+
.catch(console.error);
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
// tslint:disable:no-console
|
|
2
|
+
import * as moment from 'moment';
|
|
3
|
+
import * as mongoose from 'mongoose';
|
|
4
|
+
|
|
5
|
+
import { chevre } from '../../../lib/index';
|
|
6
|
+
|
|
7
|
+
const project = { id: String(process.env.PROJECT_ID) };
|
|
8
|
+
|
|
9
|
+
// tslint:disable-next-line:max-func-body-length
|
|
10
|
+
export async function main() {
|
|
11
|
+
const now = new Date();
|
|
12
|
+
await mongoose.connect(<string>process.env.MONGOLAB_URI);
|
|
13
|
+
|
|
14
|
+
const transactionRepo = new chevre.repository.Transaction(mongoose.connection);
|
|
15
|
+
|
|
16
|
+
const transactions = await transactionRepo.search<chevre.factory.transactionType.MoneyTransfer>(
|
|
17
|
+
{
|
|
18
|
+
project: { id: { $eq: project.id } },
|
|
19
|
+
typeOf: chevre.factory.transactionType.MoneyTransfer,
|
|
20
|
+
statuses: [chevre.factory.transactionStatusType.Confirmed],
|
|
21
|
+
startFrom: moment(now)
|
|
22
|
+
.add(-1, 'year')
|
|
23
|
+
.toDate(),
|
|
24
|
+
startThrough: now,
|
|
25
|
+
inclusion: ['_id', 'startDate', 'typeOf', 'object'],
|
|
26
|
+
exclusion: []
|
|
27
|
+
}
|
|
28
|
+
);
|
|
29
|
+
const count = transactions.filter((t) => t.object.description === '受け取り')
|
|
30
|
+
.length;
|
|
31
|
+
console.log('transactions found', count);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
main()
|
|
35
|
+
.then()
|
|
36
|
+
.catch(console.error);
|
|
@@ -197,7 +197,10 @@ async function main() {
|
|
|
197
197
|
}
|
|
198
198
|
]);
|
|
199
199
|
console.log(result);
|
|
200
|
-
console.log('upsertedIds:', (Array.isArray(result?.
|
|
200
|
+
console.log('upsertedIds:', (Array.isArray(result?.getUpsertedIds()))
|
|
201
|
+
? result?.getUpsertedIds()
|
|
202
|
+
.map((u: any) => u._id)
|
|
203
|
+
: []);
|
|
201
204
|
}
|
|
202
205
|
|
|
203
206
|
main()
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
// tslint:disable:no-console
|
|
2
|
+
import * as moment from 'moment';
|
|
3
|
+
import * as mongoose from 'mongoose';
|
|
4
|
+
|
|
5
|
+
import { chevre } from '../../../lib/index';
|
|
6
|
+
|
|
7
|
+
// const project = { id: String(process.env.PROJECT_ID) };
|
|
8
|
+
// const EXCLUDED_PROJECT_ID = process.env.EXCLUDED_PROJECT_ID;
|
|
9
|
+
|
|
10
|
+
// tslint:disable-next-line:max-func-body-length
|
|
11
|
+
async function main() {
|
|
12
|
+
await mongoose.connect(<string>process.env.MONGOLAB_URI, { autoIndex: false });
|
|
13
|
+
|
|
14
|
+
const orderRepo = new chevre.repository.Order(mongoose.connection);
|
|
15
|
+
|
|
16
|
+
const cursor = orderRepo.getCursor(
|
|
17
|
+
{
|
|
18
|
+
// 'project.id': { $eq: project.id },
|
|
19
|
+
// 'project.id': { $ne: EXCLUDED_PROJECT_ID },
|
|
20
|
+
orderDate: {
|
|
21
|
+
$gte: moment()
|
|
22
|
+
.add(-1, 'months')
|
|
23
|
+
.toDate()
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
paymentMethods: 1,
|
|
28
|
+
project: 1,
|
|
29
|
+
orderDate: 1
|
|
30
|
+
}
|
|
31
|
+
);
|
|
32
|
+
console.log('movies found');
|
|
33
|
+
|
|
34
|
+
const additionalPropertyNames: string[] = [];
|
|
35
|
+
const projectIds: string[] = [];
|
|
36
|
+
const unexpextedprojectIds: string[] = [];
|
|
37
|
+
|
|
38
|
+
let i = 0;
|
|
39
|
+
await cursor.eachAsync(async (doc) => {
|
|
40
|
+
i += 1;
|
|
41
|
+
const order: chevre.factory.order.IOrder = doc.toObject();
|
|
42
|
+
|
|
43
|
+
const additionalPropertyNamesOnOrder = order.paymentMethods.reduce<string[]>(
|
|
44
|
+
(a, b) => {
|
|
45
|
+
if (Array.isArray(b.additionalProperty)) {
|
|
46
|
+
return [...a, ...b.additionalProperty.map((p) => p.name)];
|
|
47
|
+
} else {
|
|
48
|
+
return a;
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
[]
|
|
52
|
+
);
|
|
53
|
+
if (Array.isArray(additionalPropertyNamesOnOrder) && additionalPropertyNamesOnOrder.length > 0) {
|
|
54
|
+
console.log(
|
|
55
|
+
additionalPropertyNamesOnOrder.join(','),
|
|
56
|
+
additionalPropertyNamesOnOrder.length,
|
|
57
|
+
'additionalPropertyNamesOnOrder found',
|
|
58
|
+
order.project.id,
|
|
59
|
+
order.id,
|
|
60
|
+
order.orderDate
|
|
61
|
+
);
|
|
62
|
+
additionalPropertyNames.push(...additionalPropertyNamesOnOrder);
|
|
63
|
+
projectIds.push(order.project.id);
|
|
64
|
+
additionalPropertyNamesOnOrder.forEach((name) => {
|
|
65
|
+
if (!name.match(/^[a-zA-Z]*$/)) {
|
|
66
|
+
// throw new Error(`not matched ${creativeWork.project.id} ${creativeWork.id}`);
|
|
67
|
+
unexpextedprojectIds.push(order.project.id);
|
|
68
|
+
}
|
|
69
|
+
// tslint:disable-next-line:no-magic-numbers
|
|
70
|
+
if (name.length < 5) {
|
|
71
|
+
// throw new Error(`length matched ${creativeWork.project.id} ${creativeWork.id} ${name}`);
|
|
72
|
+
unexpextedprojectIds.push(order.project.id);
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
console.log(i, 'orders checked');
|
|
78
|
+
console.log('additionalPropertyNames:', [...new Set(additionalPropertyNames)]);
|
|
79
|
+
console.log('projectIds:', [...new Set(projectIds)]);
|
|
80
|
+
console.log('unexpextedprojectIds:', [...new Set(unexpextedprojectIds)]);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
main()
|
|
84
|
+
.then()
|
|
85
|
+
.catch(console.error);
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
// tslint:disable:no-console
|
|
2
|
+
import * as moment from 'moment';
|
|
3
|
+
import * as mongoose from 'mongoose';
|
|
4
|
+
import * as redis from 'redis';
|
|
5
|
+
|
|
6
|
+
import { chevre } from '../../../lib/index';
|
|
7
|
+
|
|
8
|
+
// const project = { id: String(process.env.PROJECT_ID) };
|
|
9
|
+
|
|
10
|
+
const EXCLUDED_PROJECT_ID = process.env.EXCLUDED_PROJECT_ID;
|
|
11
|
+
|
|
12
|
+
async function main() {
|
|
13
|
+
const client = redis.createClient<redis.RedisDefaultModules, Record<string, never>, Record<string, never>>({
|
|
14
|
+
socket: {
|
|
15
|
+
host: process.env.REDIS_HOST,
|
|
16
|
+
port: Number(process.env.REDIS_PORT)
|
|
17
|
+
},
|
|
18
|
+
password: process.env.REDIS_KEY
|
|
19
|
+
});
|
|
20
|
+
await client.connect();
|
|
21
|
+
await mongoose.connect(<string>process.env.MONGOLAB_URI);
|
|
22
|
+
|
|
23
|
+
const eventRepo = new chevre.repository.Event(mongoose.connection);
|
|
24
|
+
const stockHolderRepo = new chevre.repository.StockHolder(client);
|
|
25
|
+
|
|
26
|
+
const cursor = eventRepo.getCursor(
|
|
27
|
+
{
|
|
28
|
+
// 'project.id': { $eq: project.id },
|
|
29
|
+
'project.id': { $ne: EXCLUDED_PROJECT_ID },
|
|
30
|
+
typeOf: { $eq: chevre.factory.eventType.ScreeningEvent },
|
|
31
|
+
startDate: {
|
|
32
|
+
$gte: moment('2023-04-23T15:00:00Z')
|
|
33
|
+
.toDate()
|
|
34
|
+
}
|
|
35
|
+
// _id: { $eq: 'al6aff83w' }
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
// _id: 1,
|
|
39
|
+
}
|
|
40
|
+
);
|
|
41
|
+
console.log('events found');
|
|
42
|
+
|
|
43
|
+
let i = 0;
|
|
44
|
+
let updateCount = 0;
|
|
45
|
+
await cursor.eachAsync(async (doc) => {
|
|
46
|
+
i += 1;
|
|
47
|
+
const event: chevre.factory.event.screeningEvent.IEvent = doc.toObject();
|
|
48
|
+
|
|
49
|
+
const oldKey = chevre.repository.StockHolder.GET_KEY({
|
|
50
|
+
eventId: event.id,
|
|
51
|
+
startDate: new Date()
|
|
52
|
+
});
|
|
53
|
+
const newKey = chevre.repository.StockHolder.GET_KEY({
|
|
54
|
+
eventId: event.id,
|
|
55
|
+
startDate: moment(event.startDate)
|
|
56
|
+
.toDate()
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
let conflicted = false;
|
|
60
|
+
try {
|
|
61
|
+
await stockHolderRepo.checkIfConflicted({
|
|
62
|
+
key: newKey,
|
|
63
|
+
eventId: event.id
|
|
64
|
+
});
|
|
65
|
+
} catch (error) {
|
|
66
|
+
conflicted = true;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
if (conflicted) {
|
|
70
|
+
updateCount += 1;
|
|
71
|
+
await stockHolderRepo.migrateKey({
|
|
72
|
+
key: newKey,
|
|
73
|
+
eventId: event.id
|
|
74
|
+
});
|
|
75
|
+
console.log(
|
|
76
|
+
'updated...', event.project.id, event.id, event.startDate, i);
|
|
77
|
+
} else {
|
|
78
|
+
console.log(
|
|
79
|
+
'already exist...', event.project.id, event.id, event.startDate, i);
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
console.log(i, 'events checked');
|
|
84
|
+
console.log(updateCount, 'events updated');
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
main()
|
|
88
|
+
.then()
|
|
89
|
+
.catch(console.error);
|
|
@@ -10,16 +10,19 @@ async function main() {
|
|
|
10
10
|
|
|
11
11
|
const taskRepo = new chevre.repository.Task(mongoose.connection);
|
|
12
12
|
|
|
13
|
-
const result = await taskRepo.saveMany(
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
13
|
+
const result = await taskRepo.saveMany(
|
|
14
|
+
[{
|
|
15
|
+
name: chevre.factory.taskName.TriggerWebhook,
|
|
16
|
+
runsAt: new Date(),
|
|
17
|
+
data: {},
|
|
18
|
+
executionResults: [],
|
|
19
|
+
project: { id: project.id, typeOf: chevre.factory.organizationType.Project },
|
|
20
|
+
numberOfTried: 0,
|
|
21
|
+
remainingNumberOfTries: 1,
|
|
22
|
+
status: chevre.factory.taskStatus.Ready
|
|
23
|
+
}],
|
|
24
|
+
{ emitImmediately: false }
|
|
25
|
+
);
|
|
23
26
|
|
|
24
27
|
console.log(result, 'tasks saved');
|
|
25
28
|
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
// tslint:disable:no-console
|
|
2
|
+
import * as moment from 'moment-timezone';
|
|
3
|
+
import * as mongoose from 'mongoose';
|
|
4
|
+
|
|
5
|
+
import { chevre } from '../../../lib/index';
|
|
6
|
+
|
|
7
|
+
async function main() {
|
|
8
|
+
await mongoose.connect(<string>process.env.MONGOLAB_URI, { autoIndex: false });
|
|
9
|
+
|
|
10
|
+
const taskRepo = new chevre.repository.Task(mongoose.connection);
|
|
11
|
+
|
|
12
|
+
const tasks = <chevre.factory.task.ITask<chevre.factory.taskName.ConfirmPayTransaction>[]>await taskRepo.search({
|
|
13
|
+
// limit: 100,
|
|
14
|
+
// page: 1,
|
|
15
|
+
name: {
|
|
16
|
+
$in: [chevre.factory.taskName.ConfirmPayTransaction]
|
|
17
|
+
// $nin: [
|
|
18
|
+
// chevre.factory.taskName.ImportEventsFromCOA,
|
|
19
|
+
// chevre.factory.taskName.ImportEventCapacitiesFromCOA
|
|
20
|
+
// ]
|
|
21
|
+
},
|
|
22
|
+
statuses: [chevre.factory.taskStatus.Aborted],
|
|
23
|
+
runsFrom: moment('2023-05-02T22:00:00Z')
|
|
24
|
+
.toDate(),
|
|
25
|
+
sort: { runsAt: chevre.factory.sortType.Ascending }
|
|
26
|
+
});
|
|
27
|
+
console.log(tasks.map((task) => `${task.project.id},${task.id},${task.name},${moment(task.runsAt)
|
|
28
|
+
.tz('Asia/Tokyo')
|
|
29
|
+
.format('YYYY-MM-DDTHH:mm:ssZ')},"${task.data.object[0]?.transactionNumber}"`)
|
|
30
|
+
.join('\n'));
|
|
31
|
+
console.log(tasks.length);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
main()
|
|
35
|
+
.then(console.log)
|
|
36
|
+
.catch(console.error);
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// tslint:disable:no-console
|
|
2
|
+
import * as mongoose from 'mongoose';
|
|
3
|
+
|
|
4
|
+
import { chevre } from '../../../../lib/index';
|
|
5
|
+
|
|
6
|
+
async function main() {
|
|
7
|
+
await mongoose.connect(<string>process.env.MONGOLAB_URI, { autoIndex: false });
|
|
8
|
+
|
|
9
|
+
const taskRepo = new chevre.repository.Task(mongoose.connection);
|
|
10
|
+
const result = await taskRepo.executeTasks({
|
|
11
|
+
now: new Date(),
|
|
12
|
+
delayInSeconds: 60,
|
|
13
|
+
limit: 1,
|
|
14
|
+
name: {
|
|
15
|
+
$nin: [
|
|
16
|
+
chevre.factory.taskName.ImportEventCapacitiesFromCOA,
|
|
17
|
+
chevre.factory.taskName.ImportEventsFromCOA
|
|
18
|
+
]
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
console.log(result);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
main()
|
|
25
|
+
.then(console.log)
|
|
26
|
+
.catch(console.error);
|
|
@@ -11,7 +11,7 @@ async function main() {
|
|
|
11
11
|
|
|
12
12
|
const projectRepo = new chevre.repository.Project(mongoose.connection);
|
|
13
13
|
const productRepo = new chevre.repository.Product(mongoose.connection);
|
|
14
|
-
const personRepo = new chevre.repository.Person({ userPoolId: chevre.settings.userPoolIdNew });
|
|
14
|
+
const personRepo = new chevre.repository.Person({ userPoolId: chevre.settings.settings.userPoolIdNew });
|
|
15
15
|
|
|
16
16
|
const result = await findCreditCard({
|
|
17
17
|
project: { id: project.id },
|
|
@@ -19,7 +19,7 @@ async function main() {
|
|
|
19
19
|
});
|
|
20
20
|
await redisClient.connect();
|
|
21
21
|
|
|
22
|
-
const personRepo = new chevre.repository.Person({ userPoolId: chevre.settings.userPoolIdNew });
|
|
22
|
+
const personRepo = new chevre.repository.Person({ userPoolId: chevre.settings.settings.userPoolIdNew });
|
|
23
23
|
const actionRepo = new chevre.repository.Action(mongoose.connection);
|
|
24
24
|
const accountRepo = new chevre.repository.Account(mongoose.connection);
|
|
25
25
|
const accountingReportRepo = new chevre.repository.AccountingReport(mongoose.connection);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// tslint:disable:no-console
|
|
2
|
+
import * as mongoose from 'mongoose';
|
|
3
|
+
|
|
4
|
+
import { chevre } from '../../../../lib/index';
|
|
5
|
+
|
|
6
|
+
async function main() {
|
|
7
|
+
await mongoose.connect(<string>process.env.MONGOLAB_URI, { autoIndex: false });
|
|
8
|
+
|
|
9
|
+
const transactionRepo = new chevre.repository.Transaction(mongoose.connection);
|
|
10
|
+
const result = await transactionRepo.startExportTasks({
|
|
11
|
+
typeOf: { $in: [chevre.factory.transactionType.PlaceOrder] },
|
|
12
|
+
status: chevre.factory.transactionStatusType.Confirmed,
|
|
13
|
+
tasksExportAction: { agent: { name: 'xxx' } }
|
|
14
|
+
});
|
|
15
|
+
console.log(result);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
main()
|
|
19
|
+
.then(console.log)
|
|
20
|
+
.catch(console.error);
|
|
@@ -31,7 +31,8 @@ exports.credentials = {
|
|
|
31
31
|
},
|
|
32
32
|
lineNotify: {
|
|
33
33
|
url: process.env.LINE_NOTIFY_URL,
|
|
34
|
-
accessToken: process.env.LINE_NOTIFY_ACCESS_TOKEN
|
|
34
|
+
accessToken: process.env.LINE_NOTIFY_ACCESS_TOKEN,
|
|
35
|
+
accessTokenAlert: process.env.LINE_NOTIFY_ACCESS_TOKEN_ALERT
|
|
35
36
|
},
|
|
36
37
|
movieticketReserve: {
|
|
37
38
|
// tslint:disable-next-line:no-magic-numbers
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { EventEmitter } from 'events';
|
|
3
|
+
import * as factory from '../factory';
|
|
4
|
+
interface IListenArgsOnAssetTransactionStatusChanged {
|
|
5
|
+
/**
|
|
6
|
+
* 取引ID
|
|
7
|
+
*/
|
|
8
|
+
id: string;
|
|
9
|
+
typeOf: factory.assetTransactionType;
|
|
10
|
+
status: factory.transactionStatusType;
|
|
11
|
+
}
|
|
12
|
+
type IOnAssetTransactionStatusChangedListener = (listenArgs: IListenArgsOnAssetTransactionStatusChanged) => void;
|
|
13
|
+
/**
|
|
14
|
+
* 資産取引イベントエミッター
|
|
15
|
+
*/
|
|
16
|
+
declare class AssetTransactionEventEmitter extends EventEmitter {
|
|
17
|
+
onAssetTransactionStatusChanged(listner: IOnAssetTransactionStatusChangedListener): void;
|
|
18
|
+
emitAssetTransactionStatusChanged(args: IListenArgsOnAssetTransactionStatusChanged): void;
|
|
19
|
+
}
|
|
20
|
+
declare const assetTransactionEventEmitter: AssetTransactionEventEmitter;
|
|
21
|
+
export { IListenArgsOnAssetTransactionStatusChanged, assetTransactionEventEmitter };
|