@chevre/domain 21.20.0-alpha.6 → 21.20.0-alpha.60
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/findTransactionById.ts +21 -0
- package/example/src/chevre/importCategoryCodesFromCOA.ts +2 -1
- package/example/src/chevre/importOffersFromCOA.ts +2 -1
- package/example/src/chevre/{migrateOrderPaymentMethodIdentifier.ts → migrateOrderAcceptedOfferSerialNumber.ts} +18 -19
- package/example/src/chevre/onAssetTransactionStatusChanged.ts +36 -0
- package/example/src/chevre/retryTasks.ts +39 -0
- package/example/src/chevre/searchActions.ts +13 -7
- package/example/src/chevre/searchOrderAcceptedOffers.ts +13 -3
- package/example/src/chevre/searchOrders.ts +13 -15
- package/example/src/chevre/searchSlicedAcceptedOffersByOrderNumber.ts +28 -0
- package/example/src/chevre/sendOrder.ts +37 -0
- package/example/src/chevre/transaction/processAcceptOffer.ts +48 -0
- package/example/src/chevre/transaction/processPlaceOrder.ts +73 -40
- package/lib/chevre/credentials.d.ts +2 -0
- package/lib/chevre/credentials.js +4 -2
- package/lib/chevre/errorHandler.js +3 -0
- package/lib/chevre/factory/order.d.ts +1 -0
- package/lib/chevre/factory/order.js +2 -1
- package/lib/chevre/factory/transaction.d.ts +10 -1
- package/lib/chevre/repo/acceptedOffer.d.ts +58 -2
- package/lib/chevre/repo/acceptedOffer.js +100 -4
- package/lib/chevre/repo/action.d.ts +18 -8
- package/lib/chevre/repo/action.js +90 -53
- package/lib/chevre/repo/mongoose/schemas/action.d.ts +1 -1
- package/lib/chevre/repo/mongoose/schemas/action.js +25 -11
- package/lib/chevre/repo/mongoose/schemas/order.d.ts +1 -1
- package/lib/chevre/repo/mongoose/schemas/order.js +38 -11
- package/lib/chevre/repo/order.js +43 -20
- package/lib/chevre/repo/orderInTransaction.d.ts +52 -0
- package/lib/chevre/repo/orderInTransaction.js +159 -0
- package/lib/chevre/repo/paymentServiceProvider.js +2 -1
- package/lib/chevre/repo/task.d.ts +0 -2
- package/lib/chevre/repo/task.js +56 -46
- package/lib/chevre/repo/transaction.d.ts +1 -1
- package/lib/chevre/repo/transaction.js +13 -36
- package/lib/chevre/repository.d.ts +5 -0
- package/lib/chevre/repository.js +15 -2
- package/lib/chevre/service/aggregation/event/importFromCOA.js +5 -5
- package/lib/chevre/service/assetTransaction/pay/factory.js +1 -6
- package/lib/chevre/service/assetTransaction/pay/potentialActions/createPayObjectServiceOutput.d.ts +9 -0
- package/lib/chevre/service/assetTransaction/pay/potentialActions/createPayObjectServiceOutput.js +143 -0
- package/lib/chevre/service/assetTransaction/pay/potentialActions.d.ts +11 -3
- package/lib/chevre/service/assetTransaction/pay/potentialActions.js +4 -165
- package/lib/chevre/service/assetTransaction/pay.d.ts +21 -11
- package/lib/chevre/service/assetTransaction/pay.js +67 -26
- package/lib/chevre/service/assetTransaction/reserve/factory.js +11 -14
- package/lib/chevre/service/assetTransaction/reserveCOA.d.ts +19 -0
- package/lib/chevre/service/assetTransaction/reserveCOA.js +46 -0
- package/lib/chevre/service/code.js +1 -1
- package/lib/chevre/service/delivery.js +2 -2
- package/lib/chevre/service/event/createEvent.js +1 -1
- package/lib/chevre/service/event.js +16 -24
- package/lib/chevre/service/moneyTransfer.js +1 -1
- package/lib/chevre/service/notification.js +71 -66
- package/lib/chevre/service/offer/any.d.ts +37 -0
- package/lib/chevre/service/offer/any.js +68 -0
- package/lib/chevre/service/offer/event/authorize.d.ts +7 -0
- package/lib/chevre/service/offer/event/authorize.js +20 -14
- package/lib/chevre/service/offer/event/cancel.d.ts +2 -0
- package/lib/chevre/service/offer/event/cancel.js +13 -1
- package/lib/chevre/service/offer/event/factory.d.ts +1 -1
- package/lib/chevre/service/offer/event/factory.js +11 -22
- package/lib/chevre/service/offer/event/importFromCOA.js +6 -8
- package/lib/chevre/service/offer/event/voidTransaction.d.ts +2 -0
- package/lib/chevre/service/offer/event/voidTransaction.js +24 -7
- package/lib/chevre/service/offer/eventServiceByCOA/authorize.d.ts +48 -0
- package/lib/chevre/service/offer/eventServiceByCOA/authorize.js +133 -0
- package/lib/chevre/service/offer/eventServiceByCOA/cancel.d.ts +39 -0
- package/lib/chevre/service/offer/eventServiceByCOA/cancel.js +59 -0
- package/lib/chevre/service/offer/eventServiceByCOA/changeOffers.d.ts +25 -0
- package/lib/chevre/service/offer/eventServiceByCOA/changeOffers.js +165 -0
- package/lib/chevre/service/offer/eventServiceByCOA/factory.js +10 -23
- package/lib/chevre/service/offer/eventServiceByCOA.d.ts +4 -89
- package/lib/chevre/service/offer/eventServiceByCOA.js +7 -292
- package/lib/chevre/service/offer/moneyTransfer/authorize.d.ts +10 -1
- package/lib/chevre/service/offer/moneyTransfer/authorize.js +49 -3
- package/lib/chevre/service/offer/moneyTransfer/returnMoneyTransfer.js +1 -1
- package/lib/chevre/service/offer/moneyTransfer/settleTransaction.d.ts +2 -0
- package/lib/chevre/service/offer/moneyTransfer/settleTransaction.js +47 -2
- package/lib/chevre/service/offer/moneyTransfer/voidTransaction.js +1 -1
- package/lib/chevre/service/offer/product/factory.js +2 -5
- package/lib/chevre/service/offer/product.d.ts +2 -0
- package/lib/chevre/service/offer/product.js +11 -23
- package/lib/chevre/service/order/confirmPayTransaction.d.ts +3 -1
- package/lib/chevre/service/order/confirmPayTransaction.js +5 -5
- package/lib/chevre/service/order/onAssetTransactionStatusChanged.d.ts +11 -1
- package/lib/chevre/service/order/onAssetTransactionStatusChanged.js +198 -6
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderDelivered/factory.js +51 -53
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderDelivered.d.ts +1 -1
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderDelivered.js +10 -25
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderDeliveredPartially/factory.d.ts +16 -0
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderDeliveredPartially/factory.js +91 -0
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderDeliveredPartially.d.ts +8 -0
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderDeliveredPartially.js +37 -0
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderInTransit.d.ts +10 -0
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderInTransit.js +85 -0
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderProcessing/createSendEmailMessageTaskIfNotExist.d.ts +8 -0
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderProcessing/createSendEmailMessageTaskIfNotExist.js +41 -0
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderProcessing/factory.d.ts +6 -10
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderProcessing/factory.js +71 -71
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderProcessing.d.ts +5 -2
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderProcessing.js +74 -80
- package/lib/chevre/service/order/onOrderStatusChanged.d.ts +3 -1
- package/lib/chevre/service/order/onOrderStatusChanged.js +5 -1
- package/lib/chevre/service/order/placeOrder.d.ts +3 -1
- package/lib/chevre/service/order/placeOrder.js +151 -45
- package/lib/chevre/service/order/returnOrder.js +25 -16
- package/lib/chevre/service/order/sendOrder.d.ts +5 -0
- package/lib/chevre/service/order/sendOrder.js +67 -33
- package/lib/chevre/service/payment/any.d.ts +6 -8
- package/lib/chevre/service/payment/any.js +25 -14
- package/lib/chevre/service/payment/creditCard.d.ts +8 -2
- package/lib/chevre/service/payment/creditCard.js +93 -76
- package/lib/chevre/service/payment/faceToFace.d.ts +1 -5
- package/lib/chevre/service/payment/movieTicket/checkByIdentifier.d.ts +0 -2
- package/lib/chevre/service/payment/movieTicket/checkByIdentifier.js +1 -0
- package/lib/chevre/service/payment/movieTicket/validation.d.ts +0 -2
- package/lib/chevre/service/payment/movieTicket.d.ts +1 -7
- package/lib/chevre/service/payment/movieTicket.js +1 -1
- package/lib/chevre/service/payment/paymentCard.d.ts +1 -3
- package/lib/chevre/service/payment/paymentCard.js +6 -6
- package/lib/chevre/service/payment.d.ts +5 -0
- package/lib/chevre/service/payment.js +41 -6
- package/lib/chevre/service/product.js +1 -1
- package/lib/chevre/service/reserve/cancelReservation.js +2 -2
- package/lib/chevre/service/reserve/checkInReservation.d.ts +1 -3
- package/lib/chevre/service/reserve/checkInReservation.js +6 -5
- package/lib/chevre/service/reserve/confirmReservation.js +1 -1
- package/lib/chevre/service/reserve/factory.js +0 -8
- package/lib/chevre/service/reserve/potentialActions/onReservationUsed.d.ts +1 -1
- package/lib/chevre/service/reserve/potentialActions/onReservationUsed.js +4 -4
- package/lib/chevre/service/reserve/searchByOrder.js +2 -1
- package/lib/chevre/service/reserve/useReservation.d.ts +1 -3
- package/lib/chevre/service/reserve/useReservation.js +10 -9
- package/lib/chevre/service/reserve/verifyToken4reservation.js +2 -0
- package/lib/chevre/service/task/confirmMoneyTransfer.js +4 -4
- package/lib/chevre/service/task/confirmPayTransaction.js +2 -1
- package/lib/chevre/service/task/confirmRegisterServiceTransaction.d.ts +1 -1
- package/lib/chevre/service/task/confirmRegisterServiceTransaction.js +30 -8
- package/lib/chevre/service/task/confirmReserveTransaction.d.ts +6 -1
- package/lib/chevre/service/task/confirmReserveTransaction.js +176 -29
- package/lib/chevre/service/task/importOffersFromCOA.js +2 -1
- package/lib/chevre/service/task/onAuthorizationCreated.js +0 -1
- package/lib/chevre/service/task/onResourceUpdated/onResourceDeleted.js +7 -7
- package/lib/chevre/service/task/pay.js +6 -0
- package/lib/chevre/service/task/placeOrder.js +9 -10
- package/lib/chevre/service/task/returnOrder.js +0 -3
- package/lib/chevre/service/task/returnPayTransaction.js +1 -1
- package/lib/chevre/service/task/returnReserveTransaction.js +3 -2
- package/lib/chevre/service/task/sendOrder.js +8 -4
- package/lib/chevre/service/task/useReservation.js +1 -1
- package/lib/chevre/service/task/voidPayTransaction.js +2 -2
- package/lib/chevre/service/task/voidReserveTransaction.js +8 -12
- package/lib/chevre/service/transaction/deleteTransaction.js +1 -1
- package/lib/chevre/service/transaction/moneyTransfer/potentialActions.js +2 -18
- package/lib/chevre/service/transaction/moneyTransfer.js +7 -6
- package/lib/chevre/service/transaction/placeOrder/exportTasks/factory.d.ts +2 -2
- package/lib/chevre/service/transaction/placeOrder/exportTasks/factory.js +17 -20
- package/lib/chevre/service/transaction/placeOrder.js +2 -1
- package/lib/chevre/service/transaction/placeOrderInProgress/confirm.d.ts +30 -0
- package/lib/chevre/service/transaction/placeOrderInProgress/confirm.js +200 -0
- package/lib/chevre/service/transaction/placeOrderInProgress/potentialActions/moneyTransfer.js +1 -1
- package/lib/chevre/service/transaction/placeOrderInProgress/potentialActions.js +22 -44
- package/lib/chevre/service/transaction/placeOrderInProgress/publishConfirmationNumberIfNotExist.d.ts +18 -0
- package/lib/chevre/service/transaction/placeOrderInProgress/publishConfirmationNumberIfNotExist.js +42 -0
- package/lib/chevre/service/transaction/placeOrderInProgress/publishOrderNumberIfNotExist.d.ts +23 -0
- package/lib/chevre/service/transaction/placeOrderInProgress/publishOrderNumberIfNotExist.js +46 -0
- package/lib/chevre/service/transaction/placeOrderInProgress/result/acceptedOffers.js +34 -37
- package/lib/chevre/service/transaction/placeOrderInProgress/result.js +13 -4
- package/lib/chevre/service/transaction/placeOrderInProgress/validation.d.ts +8 -23
- package/lib/chevre/service/transaction/placeOrderInProgress/validation.js +20 -1
- package/lib/chevre/service/transaction/placeOrderInProgress.d.ts +16 -65
- package/lib/chevre/service/transaction/placeOrderInProgress.js +14 -245
- package/lib/chevre/service/transaction/returnOrder/potentialActions/returnPointAward.js +1 -2
- package/lib/chevre/service/transaction/returnOrder/preStart.js +78 -50
- package/lib/chevre/service.js +0 -10
- package/lib/chevre/settings.d.ts +6 -3
- package/lib/chevre/settings.js +12 -4
- package/package.json +5 -9
- package/lib/chevre/service/util.d.ts +0 -19
- package/lib/chevre/service/util.js +0 -126
|
@@ -0,0 +1,21 @@
|
|
|
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 = await chevre.repository.Transaction.createInstance(mongoose.connection);
|
|
10
|
+
|
|
11
|
+
const transaction = await transactionRepo.findById({
|
|
12
|
+
typeOf: chevre.factory.transactionType.PlaceOrder,
|
|
13
|
+
id: '65ab04d5206595479469f50c',
|
|
14
|
+
inclusion: ['endDate', 'id', 'object', 'project', 'seller', 'startDate', 'status', 'typeOf']
|
|
15
|
+
});
|
|
16
|
+
console.log('transaction:', transaction);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
main()
|
|
20
|
+
.then(console.log)
|
|
21
|
+
.catch(console.error);
|
|
@@ -9,7 +9,8 @@ const project = { id: String(process.env.PROJECT_ID) };
|
|
|
9
9
|
|
|
10
10
|
const coaAuthClient = new COA.auth.RefreshToken({
|
|
11
11
|
endpoint: chevre.credentials.coa.endpoint,
|
|
12
|
-
refreshToken: chevre.credentials.coa.refreshToken
|
|
12
|
+
refreshToken: chevre.credentials.coa.refreshToken,
|
|
13
|
+
useFetch: chevre.credentials.coa.useFetch
|
|
13
14
|
});
|
|
14
15
|
|
|
15
16
|
async function main() {
|
|
@@ -9,7 +9,8 @@ const project = { id: String(process.env.PROJECT_ID) };
|
|
|
9
9
|
|
|
10
10
|
const coaAuthClient = new COA.auth.RefreshToken({
|
|
11
11
|
endpoint: chevre.credentials.coa.endpoint,
|
|
12
|
-
refreshToken: chevre.credentials.coa.refreshToken
|
|
12
|
+
refreshToken: chevre.credentials.coa.refreshToken,
|
|
13
|
+
useFetch: chevre.credentials.coa.useFetch
|
|
13
14
|
});
|
|
14
15
|
|
|
15
16
|
async function main() {
|
|
@@ -10,14 +10,15 @@ import { chevre } from '../../../lib/index';
|
|
|
10
10
|
async function main() {
|
|
11
11
|
await mongoose.connect(<string>process.env.MONGOLAB_URI, { autoIndex: false });
|
|
12
12
|
|
|
13
|
+
const acceptedOfferRepo = await chevre.repository.AcceptedOffer.createInstance(mongoose.connection);
|
|
13
14
|
const orderRepo = await chevre.repository.Order.createInstance(mongoose.connection);
|
|
14
15
|
|
|
15
16
|
const cursor = orderRepo.getCursor(
|
|
16
17
|
{
|
|
17
|
-
'
|
|
18
|
-
'
|
|
18
|
+
// 'acceptedOffers.serialNumber': { $exists: false },
|
|
19
|
+
'acceptedOffers.itemOffered.reservationNumber': { $exists: true },
|
|
19
20
|
// 'project.id': { $eq: project.id },
|
|
20
|
-
// orderNumber: { $eq: '
|
|
21
|
+
// orderNumber: { $eq: 'KOB1-3749861-4732433' },
|
|
21
22
|
orderDate: {
|
|
22
23
|
$gte: moment()
|
|
23
24
|
// tslint:disable-next-line:no-magic-numbers
|
|
@@ -33,7 +34,7 @@ async function main() {
|
|
|
33
34
|
orderDate: 1,
|
|
34
35
|
orderNumber: 1,
|
|
35
36
|
project: 1,
|
|
36
|
-
|
|
37
|
+
acceptedOffers: 1
|
|
37
38
|
}
|
|
38
39
|
);
|
|
39
40
|
console.log('orders found');
|
|
@@ -45,28 +46,26 @@ async function main() {
|
|
|
45
46
|
const order: Pick<
|
|
46
47
|
chevre.factory.order.IOrder,
|
|
47
48
|
'orderDate' | 'orderNumber' | 'project' | 'paymentMethods'
|
|
48
|
-
>
|
|
49
|
+
> & {
|
|
50
|
+
acceptedOffers: chevre.factory.order.IAcceptedOffer<chevre.factory.order.IReservation>[];
|
|
51
|
+
} = doc.toObject();
|
|
49
52
|
|
|
50
|
-
const
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
&&
|
|
54
|
-
// && invoice.paymentMethod.identifier === (<any>invoice).typeOf;
|
|
53
|
+
const alreadyMigrated = order.acceptedOffers.every((offer) => {
|
|
54
|
+
return typeof offer.serialNumber === 'string'
|
|
55
|
+
&& offer.serialNumber.length > 0
|
|
56
|
+
&& offer.itemOffered.reservationNumber === offer.serialNumber;
|
|
55
57
|
});
|
|
56
58
|
|
|
57
|
-
if (
|
|
58
|
-
console.log('noPayment.', order.project.id, order.orderNumber, order.orderDate, i);
|
|
59
|
-
} else if (alreadyMigrated) {
|
|
59
|
+
if (alreadyMigrated) {
|
|
60
60
|
console.log('already exist.', order.project.id, order.orderNumber, order.orderDate, i);
|
|
61
61
|
} else {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
await
|
|
62
|
+
for (const offer of order.acceptedOffers) {
|
|
63
|
+
console.log('updating...', order.project.id, order.orderNumber, order.orderDate, offer.itemOffered.reservationNumber, i);
|
|
64
|
+
await acceptedOfferRepo.fixSerialNumber({
|
|
65
65
|
project: { id: order.project.id },
|
|
66
66
|
orderNumber: order.orderNumber,
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
paymentMethod: { identifier: (<any>invoice).typeOf }
|
|
67
|
+
acceptedOffers: {
|
|
68
|
+
serialNumber: offer.itemOffered.reservationNumber
|
|
70
69
|
}
|
|
71
70
|
});
|
|
72
71
|
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
// tslint:disable:no-console
|
|
2
|
+
import * as mongoose from 'mongoose';
|
|
3
|
+
|
|
4
|
+
import { chevre } from '../../../lib/index';
|
|
5
|
+
|
|
6
|
+
const project = { id: String(process.env.PROJECT_ID) };
|
|
7
|
+
|
|
8
|
+
async function main() {
|
|
9
|
+
await mongoose.connect(<string>process.env.MONGOLAB_URI);
|
|
10
|
+
|
|
11
|
+
(await chevre.service.order.createService())
|
|
12
|
+
.onAssetTransactionStatusChanged({
|
|
13
|
+
project: { id: project.id, typeOf: chevre.factory.organizationType.Project },
|
|
14
|
+
object: {
|
|
15
|
+
typeOf: chevre.factory.assetTransactionType.Reserve,
|
|
16
|
+
transactionNumber: '863918387495116',
|
|
17
|
+
status: chevre.factory.transactionStatusType.Confirmed
|
|
18
|
+
},
|
|
19
|
+
purpose: {
|
|
20
|
+
confirmationNumber: '',
|
|
21
|
+
orderNumber: 'CIN1-3748070-2008463',
|
|
22
|
+
typeOf: chevre.factory.order.OrderType.Order
|
|
23
|
+
},
|
|
24
|
+
useOnOrderStatusChanged: true
|
|
25
|
+
})({
|
|
26
|
+
assetTransaction: await chevre.repository.AssetTransaction.createInstance(mongoose.connection),
|
|
27
|
+
acceptedOffer: await chevre.repository.AcceptedOffer.createInstance(mongoose.connection),
|
|
28
|
+
order: await chevre.repository.Order.createInstance(mongoose.connection),
|
|
29
|
+
task: await chevre.repository.Task.createInstance(mongoose.connection),
|
|
30
|
+
transaction: await chevre.repository.Transaction.createInstance(mongoose.connection)
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
main()
|
|
35
|
+
.then(console.log)
|
|
36
|
+
.catch(console.error);
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
// tslint:disable:no-implicit-dependencies no-console
|
|
2
|
+
import { chevre } from '../../../lib/index';
|
|
3
|
+
|
|
4
|
+
import * as moment from 'moment';
|
|
5
|
+
import * as mongoose from 'mongoose';
|
|
6
|
+
|
|
7
|
+
const project = { id: String(process.env.PROJECT_ID) };
|
|
8
|
+
|
|
9
|
+
async function main() {
|
|
10
|
+
await mongoose.connect(<string>process.env.MONGOLAB_URI, { autoIndex: false });
|
|
11
|
+
|
|
12
|
+
const taskRepo = await chevre.repository.Task.createInstance(mongoose.connection);
|
|
13
|
+
const result = await taskRepo.taskModel.updateMany(
|
|
14
|
+
{
|
|
15
|
+
status: { $eq: chevre.factory.taskStatus.Aborted },
|
|
16
|
+
lastTriedAt: {
|
|
17
|
+
$gt: moment()
|
|
18
|
+
.add(-1, 'day')
|
|
19
|
+
.toDate()
|
|
20
|
+
},
|
|
21
|
+
name: { $eq: chevre.factory.taskName.TriggerWebhook },
|
|
22
|
+
'project.id': { $eq: project.id }
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
$set: {
|
|
26
|
+
status: chevre.factory.taskStatus.Ready,
|
|
27
|
+
remainingNumberOfTries: 20
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
)
|
|
31
|
+
.exec();
|
|
32
|
+
console.log('result:', result);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
main()
|
|
36
|
+
.then(() => {
|
|
37
|
+
console.log('success!');
|
|
38
|
+
})
|
|
39
|
+
.catch(console.error);
|
|
@@ -5,20 +5,26 @@ import * as mongoose from 'mongoose';
|
|
|
5
5
|
|
|
6
6
|
// const project = { id: String(process.env.PROJECT_ID) };
|
|
7
7
|
|
|
8
|
+
mongoose.Model.on('index', (...args) => {
|
|
9
|
+
console.error('******** index event emitted. ********\n', args);
|
|
10
|
+
});
|
|
11
|
+
|
|
8
12
|
async function main() {
|
|
9
13
|
await mongoose.connect(<string>process.env.MONGOLAB_URI, { autoIndex: false });
|
|
10
14
|
|
|
11
15
|
const actionRepo = await chevre.repository.Action.createInstance(mongoose.connection);
|
|
12
16
|
const actions = await actionRepo.search(
|
|
13
17
|
{
|
|
14
|
-
|
|
18
|
+
limit: 1,
|
|
19
|
+
// typeOf: { $eq: chevre.factory.actionType.CheckAction },
|
|
15
20
|
// project: { id: { $eq: project.id } },
|
|
16
|
-
object: {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
21
|
+
// object: {
|
|
22
|
+
// movieTickets: {
|
|
23
|
+
// identifier: { $eq: '0947524082' },
|
|
24
|
+
// serviceOutput: { reservationFor: { id: { $eq: 'clhvvbpyn' } } }
|
|
25
|
+
// }
|
|
26
|
+
// }
|
|
27
|
+
instrument: { transactionNumber: { $eq: 'x' } }
|
|
22
28
|
},
|
|
23
29
|
['_id'],
|
|
24
30
|
[]
|
|
@@ -5,6 +5,10 @@ import { chevre } from '../../../lib/index';
|
|
|
5
5
|
|
|
6
6
|
const project = { id: String(process.env.PROJECT_ID) };
|
|
7
7
|
|
|
8
|
+
mongoose.Model.on('index', (...args) => {
|
|
9
|
+
console.error('******** index event emitted. ********\n', args);
|
|
10
|
+
});
|
|
11
|
+
|
|
8
12
|
async function main() {
|
|
9
13
|
await mongoose.connect(<string>process.env.MONGOLAB_URI);
|
|
10
14
|
|
|
@@ -16,10 +20,16 @@ async function main() {
|
|
|
16
20
|
limit: 10,
|
|
17
21
|
page: 1,
|
|
18
22
|
project: { id: { $eq: project.id } },
|
|
19
|
-
orderNumber: { $eq: '
|
|
20
|
-
acceptedOffers: {
|
|
23
|
+
orderNumber: { $eq: 'CIN7-9247770-0699829' },
|
|
24
|
+
acceptedOffers: {
|
|
25
|
+
itemOffered: {
|
|
26
|
+
typeOf: { $in: [chevre.factory.reservationType.EventReservation] },
|
|
27
|
+
reservationFor: { id: { $in: ['blpw1ew8f'] } },
|
|
28
|
+
reservedTicket: { ticketedSeat: { seatNumber: { $in: ['A-26', 'xxx'] } } }
|
|
29
|
+
}
|
|
30
|
+
}
|
|
21
31
|
},
|
|
22
|
-
['itemOffered', '
|
|
32
|
+
['itemOffered', 'priceSpecification']
|
|
23
33
|
);
|
|
24
34
|
// tslint:disable-next-line:no-null-keyword
|
|
25
35
|
console.dir(acceptedOffers, { depth: 1 });
|
|
@@ -5,21 +5,19 @@ import { chevre } from '../../../lib/index';
|
|
|
5
5
|
|
|
6
6
|
const project = { id: String(process.env.PROJECT_ID) };
|
|
7
7
|
|
|
8
|
+
mongoose.Model.on('index', (...args) => {
|
|
9
|
+
console.error('******** index event emitted. ********\n', args);
|
|
10
|
+
});
|
|
11
|
+
|
|
8
12
|
async function main() {
|
|
9
13
|
await mongoose.connect(<string>process.env.MONGOLAB_URI, { autoIndex: false });
|
|
10
14
|
|
|
11
|
-
const
|
|
15
|
+
const indexes = await mongoose.connection.db.collection('orders')
|
|
16
|
+
.indexes();
|
|
17
|
+
// console.log(indexes);
|
|
18
|
+
console.log(indexes.length, 'indexes found');
|
|
12
19
|
|
|
13
|
-
const
|
|
14
|
-
orderNumber: 'CIN4-3943271-4221863',
|
|
15
|
-
project: { id: project.id },
|
|
16
|
-
inclusion: [
|
|
17
|
-
// 'project', 'typeOf', 'orderNumber', 'dateReturned', 'id',
|
|
18
|
-
// 'customer', 'returner', 'seller', 'price', 'priceCurrency', 'orderDate'
|
|
19
|
-
],
|
|
20
|
-
exclusion: ['acceptedOffers']
|
|
21
|
-
});
|
|
22
|
-
console.log(order);
|
|
20
|
+
const orderRepo = await chevre.repository.Order.createInstance(mongoose.connection);
|
|
23
21
|
|
|
24
22
|
const orders = await orderRepo.search(
|
|
25
23
|
{
|
|
@@ -30,10 +28,10 @@ async function main() {
|
|
|
30
28
|
// itemOffered: {
|
|
31
29
|
// issuedThrough: { typeOf: { $eq: chevre.factory.product.ProductType.MembershipService } }
|
|
32
30
|
// }
|
|
33
|
-
},
|
|
34
|
-
orderedItem: {
|
|
35
|
-
$size: 3
|
|
36
31
|
}
|
|
32
|
+
// orderedItem: {
|
|
33
|
+
// $size: 3
|
|
34
|
+
// }
|
|
37
35
|
// paymentMethods: {
|
|
38
36
|
// paymentMethod: { identifier: { $in: ['Cash'] } }
|
|
39
37
|
// additionalProperty: {
|
|
@@ -49,7 +47,7 @@ async function main() {
|
|
|
49
47
|
customer: 1
|
|
50
48
|
}
|
|
51
49
|
);
|
|
52
|
-
console.log('orders found', orders);
|
|
50
|
+
// console.log('orders found', orders);
|
|
53
51
|
console.log(orders.length, 'orders found');
|
|
54
52
|
}
|
|
55
53
|
|
|
@@ -0,0 +1,28 @@
|
|
|
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);
|
|
8
|
+
|
|
9
|
+
const acceptedOfferRepo = await chevre.repository.AcceptedOffer.createInstance(mongoose.connection);
|
|
10
|
+
|
|
11
|
+
const result = await acceptedOfferRepo.searchSlicedAcceptedOffersByOrderNumber(
|
|
12
|
+
{
|
|
13
|
+
orderNumber: { $eq: 'CIN1-3748070-2008463' },
|
|
14
|
+
project: { id: { $eq: String(process.env.PROJECT_ID) } },
|
|
15
|
+
// tslint:disable-next-line:no-magic-numbers
|
|
16
|
+
$slice: [0, 2]
|
|
17
|
+
}
|
|
18
|
+
);
|
|
19
|
+
console.log(result);
|
|
20
|
+
console.log(result.acceptedOffers.map((offer) => {
|
|
21
|
+
return `${(<any>offer.itemOffered).id}`;
|
|
22
|
+
}));
|
|
23
|
+
console.log(result.acceptedOffers.length);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
main()
|
|
27
|
+
.then(console.log)
|
|
28
|
+
.catch(console.error);
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
// tslint:disable:no-console
|
|
2
|
+
import * as mongoose from 'mongoose';
|
|
3
|
+
|
|
4
|
+
import { chevre } from '../../../lib/index';
|
|
5
|
+
|
|
6
|
+
const project = { id: String(process.env.PROJECT_ID) };
|
|
7
|
+
|
|
8
|
+
async function main() {
|
|
9
|
+
await mongoose.connect(<string>process.env.MONGOLAB_URI);
|
|
10
|
+
|
|
11
|
+
(await chevre.service.order.createService())
|
|
12
|
+
.sendOrder({
|
|
13
|
+
agent: { id: project.id, typeOf: chevre.factory.organizationType.Project },
|
|
14
|
+
project: { id: project.id },
|
|
15
|
+
object: {
|
|
16
|
+
confirmationNumber: '57761',
|
|
17
|
+
orderNumber: 'CIN1-3748070-2008463',
|
|
18
|
+
previousOrderStatus: chevre.factory.orderStatus.OrderInTransit,
|
|
19
|
+
acceptedOffers: {
|
|
20
|
+
limit: 1,
|
|
21
|
+
page: 1
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
useOnOrderStatusChanged: false
|
|
25
|
+
})({
|
|
26
|
+
acceptedOffer: await chevre.repository.AcceptedOffer.createInstance(mongoose.connection),
|
|
27
|
+
action: await chevre.repository.Action.createInstance(mongoose.connection),
|
|
28
|
+
order: await chevre.repository.Order.createInstance(mongoose.connection),
|
|
29
|
+
ownershipInfo: await chevre.repository.OwnershipInfo.createInstance(mongoose.connection),
|
|
30
|
+
task: await chevre.repository.Task.createInstance(mongoose.connection),
|
|
31
|
+
transaction: await chevre.repository.Transaction.createInstance(mongoose.connection)
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
main()
|
|
36
|
+
.then(console.log)
|
|
37
|
+
.catch(console.error);
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
// tslint:disable:no-console
|
|
2
|
+
import * as mongoose from 'mongoose';
|
|
3
|
+
import * as redis from 'redis';
|
|
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
|
+
async function main() {
|
|
11
|
+
await mongoose.connect(<string>process.env.MONGOLAB_URI, { autoIndex: false });
|
|
12
|
+
const client = redis.createClient<redis.RedisDefaultModules, Record<string, never>, Record<string, never>>({
|
|
13
|
+
socket: {
|
|
14
|
+
port: Number(<string>process.env.REDIS_PORT),
|
|
15
|
+
host: <string>process.env.REDIS_HOST
|
|
16
|
+
},
|
|
17
|
+
password: <string>process.env.REDIS_KEY
|
|
18
|
+
});
|
|
19
|
+
await client.connect();
|
|
20
|
+
|
|
21
|
+
const orderInTransactionRepo = await chevre.repository.OrderInTransaction.createInstance(mongoose.connection);
|
|
22
|
+
|
|
23
|
+
const orderNumber: string = 'sampleOrderNumber';
|
|
24
|
+
const reservationNumber: string = 'sampleReservationNumber';
|
|
25
|
+
const acceptedOffers: chevre.factory.order.IAcceptedOffer<chevre.factory.order.IReservation>[] = [
|
|
26
|
+
{
|
|
27
|
+
typeOf: chevre.factory.offerType.Offer,
|
|
28
|
+
id: 'xxx',
|
|
29
|
+
itemOffered: <any>{ reservationNumber },
|
|
30
|
+
priceSpecification: <any>{}
|
|
31
|
+
}
|
|
32
|
+
];
|
|
33
|
+
let result: any = await orderInTransactionRepo.acceptOffer({
|
|
34
|
+
project: { id: project.id, typeOf: chevre.factory.organizationType.Project },
|
|
35
|
+
orderNumber,
|
|
36
|
+
acceptedOffers
|
|
37
|
+
});
|
|
38
|
+
console.log(result);
|
|
39
|
+
result = await orderInTransactionRepo.voidAcceptedOfferByReservationNumber({
|
|
40
|
+
orderNumber,
|
|
41
|
+
acceptedOffers: { reservationNumber: { $in: [reservationNumber] } }
|
|
42
|
+
});
|
|
43
|
+
console.log(result);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
main()
|
|
47
|
+
.then(console.log)
|
|
48
|
+
.catch(console.error);
|
|
@@ -71,61 +71,94 @@ async function main() {
|
|
|
71
71
|
paymentService: await chevre.repository.PaymentService.createInstance(mongoose.connection),
|
|
72
72
|
paymentServiceProvider: await chevre.repository.PaymentServiceProvider.createInstance(mongoose.connection),
|
|
73
73
|
person: await chevre.repository.Person.createInstance({ userPoolId: '' }),
|
|
74
|
-
project: await chevre.repository.Project.createInstance(mongoose.connection),
|
|
75
74
|
transactionNumber: await chevre.repository.TransactionNumber.createInstance(client),
|
|
76
75
|
transaction: await chevre.repository.Transaction.createInstance(mongoose.connection)
|
|
77
76
|
});
|
|
78
77
|
console.log(publishPaymentUrlResult);
|
|
79
78
|
|
|
80
79
|
// wait callback...
|
|
80
|
+
// tslint:disable-next-line:max-func-body-length
|
|
81
81
|
await new Promise<void>((resolve, reject) => {
|
|
82
82
|
const rl = readline.createInterface({
|
|
83
83
|
input: process.stdin,
|
|
84
84
|
output: process.stdout
|
|
85
85
|
});
|
|
86
86
|
|
|
87
|
+
// tslint:disable-next-line:max-func-body-length
|
|
87
88
|
rl.question('callback received?:\n', async () => {
|
|
88
89
|
try {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
90
|
+
await new Promise<void>(async (resolve2, reject2) => {
|
|
91
|
+
const rl2 = readline.createInterface({
|
|
92
|
+
input: process.stdin,
|
|
93
|
+
output: process.stdout
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
rl2.question('VOID or AUTH?:\n', async (jobCd) => {
|
|
97
|
+
if (jobCd === 'AUTH') {
|
|
98
|
+
const authorizeResult = await (await chevre.service.payment.any.createService()).authorize({
|
|
99
|
+
project: { id: project.id },
|
|
100
|
+
agent: { id: CLIENT_ID },
|
|
101
|
+
object: {
|
|
102
|
+
typeOf: chevre.factory.action.authorize.paymentMethod.any.ResultType.Payment,
|
|
103
|
+
amount: AMOUNT,
|
|
104
|
+
paymentMethodId: publishPaymentUrlResult.paymentMethodId,
|
|
105
|
+
paymentMethod: paymentMethodType,
|
|
106
|
+
issuedThrough: { id: paymentServiceId },
|
|
107
|
+
method: '1',
|
|
108
|
+
creditCard
|
|
109
|
+
},
|
|
110
|
+
purpose: { id: transaction.id, typeOf: transaction.typeOf },
|
|
111
|
+
paymentServiceType: chevre.factory.service.paymentService.PaymentServiceType.CreditCard,
|
|
112
|
+
location: {
|
|
113
|
+
typeOf: chevre.factory.creativeWorkType.WebApplication,
|
|
114
|
+
id: CLIENT_ID
|
|
115
|
+
},
|
|
116
|
+
options: {
|
|
117
|
+
useCancelPayTransactionOnFailed: false,
|
|
118
|
+
useCheckMovieTicketBeforePay: false,
|
|
119
|
+
useCheckByIdentifierIfNotYet: false,
|
|
120
|
+
useSearchTrade4accountId: false
|
|
121
|
+
}
|
|
122
|
+
})({
|
|
123
|
+
accountingReport: await chevre.repository.AccountingReport.createInstance(mongoose.connection),
|
|
124
|
+
action: await chevre.repository.Action.createInstance(mongoose.connection),
|
|
125
|
+
assetTransaction: await chevre.repository.AssetTransaction.createInstance(mongoose.connection),
|
|
126
|
+
event: await chevre.repository.Event.createInstance(mongoose.connection),
|
|
127
|
+
paymentAccepted: await chevre.repository.SellerPaymentAccepted.createInstance(mongoose.connection),
|
|
128
|
+
paymentService: await chevre.repository.PaymentService.createInstance(mongoose.connection),
|
|
129
|
+
paymentServiceProvider: await chevre.repository.PaymentServiceProvider.createInstance(mongoose.connection),
|
|
130
|
+
person: await chevre.repository.Person.createInstance({ userPoolId: '' }),
|
|
131
|
+
product: await chevre.repository.Product.createInstance(mongoose.connection),
|
|
132
|
+
task: await chevre.repository.Task.createInstance(mongoose.connection),
|
|
133
|
+
transactionNumber: await chevre.repository.TransactionNumber.createInstance(client),
|
|
134
|
+
transaction: await chevre.repository.Transaction.createInstance(mongoose.connection)
|
|
135
|
+
});
|
|
136
|
+
console.log('payment authorized.', authorizeResult.id);
|
|
137
|
+
} else if (jobCd === 'VOID') {
|
|
138
|
+
await (await chevre.service.payment.any.createService()).invalidatePaymentUrl({
|
|
139
|
+
project: { id: project.id, typeOf: chevre.factory.organizationType.Project },
|
|
140
|
+
purpose: { id: transaction.id, typeOf: transaction.typeOf }
|
|
141
|
+
})({
|
|
142
|
+
accountingReport: await chevre.repository.AccountingReport.createInstance(mongoose.connection),
|
|
143
|
+
action: await chevre.repository.Action.createInstance(mongoose.connection),
|
|
144
|
+
assetTransaction: await chevre.repository.AssetTransaction.createInstance(mongoose.connection),
|
|
145
|
+
paymentAccepted: await chevre.repository.SellerPaymentAccepted.createInstance(mongoose.connection),
|
|
146
|
+
paymentService: await chevre.repository.PaymentService.createInstance(mongoose.connection),
|
|
147
|
+
paymentServiceProvider: await chevre.repository.PaymentServiceProvider.createInstance(mongoose.connection),
|
|
148
|
+
task: await chevre.repository.Task.createInstance(mongoose.connection),
|
|
149
|
+
transaction: await chevre.repository.Transaction.createInstance(mongoose.connection)
|
|
150
|
+
});
|
|
151
|
+
console.log('payment voided.');
|
|
152
|
+
} else {
|
|
153
|
+
reject2(`jobCd ${jobCd} not implemented`);
|
|
154
|
+
|
|
155
|
+
return;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
// rl.close();
|
|
159
|
+
resolve2();
|
|
160
|
+
});
|
|
127
161
|
});
|
|
128
|
-
console.log('payment authorized.', authorizeResult.result);
|
|
129
162
|
|
|
130
163
|
resolve();
|
|
131
164
|
} catch (error) {
|
|
@@ -16,6 +16,7 @@ export declare const credentials: {
|
|
|
16
16
|
endpoint: string;
|
|
17
17
|
refreshToken: string;
|
|
18
18
|
timeout: number;
|
|
19
|
+
useFetch: boolean;
|
|
19
20
|
};
|
|
20
21
|
customSearch: {
|
|
21
22
|
engineId: string;
|
|
@@ -23,6 +24,7 @@ export declare const credentials: {
|
|
|
23
24
|
};
|
|
24
25
|
gmo: {
|
|
25
26
|
timeout: number;
|
|
27
|
+
useFetch: boolean;
|
|
26
28
|
};
|
|
27
29
|
lineNotify: {
|
|
28
30
|
url: string;
|
|
@@ -19,7 +19,8 @@ exports.credentials = {
|
|
|
19
19
|
endpoint: process.env.COA_ENDPOINT,
|
|
20
20
|
refreshToken: process.env.COA_REFRESH_TOKEN,
|
|
21
21
|
// tslint:disable-next-line:no-magic-numbers
|
|
22
|
-
timeout: (typeof process.env.COA_TIMEOUT === 'string') ? Number(process.env.COA_TIMEOUT) : 20000
|
|
22
|
+
timeout: (typeof process.env.COA_TIMEOUT === 'string') ? Number(process.env.COA_TIMEOUT) : 20000,
|
|
23
|
+
useFetch: process.env.COA_USE_FETCH === '1'
|
|
23
24
|
},
|
|
24
25
|
customSearch: {
|
|
25
26
|
engineId: process.env.CUSTOM_SEARCH_ENGINE_ID,
|
|
@@ -27,7 +28,8 @@ exports.credentials = {
|
|
|
27
28
|
},
|
|
28
29
|
gmo: {
|
|
29
30
|
// tslint:disable-next-line:no-magic-numbers
|
|
30
|
-
timeout: (typeof process.env.GMO_TIMEOUT === 'string') ? Number(process.env.GMO_TIMEOUT) : 10000
|
|
31
|
+
timeout: (typeof process.env.GMO_TIMEOUT === 'string') ? Number(process.env.GMO_TIMEOUT) : 10000,
|
|
32
|
+
useFetch: process.env.GMO_USE_FETCH === '1'
|
|
31
33
|
},
|
|
32
34
|
lineNotify: {
|
|
33
35
|
url: process.env.LINE_NOTIFY_URL,
|
|
@@ -65,6 +65,9 @@ exports.handleMongoError = handleMongoError;
|
|
|
65
65
|
function handleCOAError(error) {
|
|
66
66
|
var _a;
|
|
67
67
|
let handledError = error;
|
|
68
|
+
if (error.name === 'AbortError') {
|
|
69
|
+
handledError = new factory_1.errors.GatewayTimeout(`Gateway Timeout. name:${error.name} code:${error.code} message:${error.message}`);
|
|
70
|
+
}
|
|
68
71
|
if (error.name === 'COAServiceError') {
|
|
69
72
|
// error.requestOptions.uriを処理
|
|
70
73
|
const uri = (_a = error.requestOptions) === null || _a === void 0 ? void 0 : _a.uri;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as factory from '../factory';
|
|
2
|
+
export declare const POINT_AWARD_IDENTIFIER_NAME = "pointAwardIdentifiers";
|
|
2
3
|
export declare const AWARD_ACCOUNTS_IDENTIFIER_NAME = "awardAccounts";
|
|
3
4
|
export type IMaskedCustomer = factory.order.ICustomer | Pick<factory.order.ICustomer, 'id' | 'typeOf'>;
|
|
4
5
|
/**
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createMaskedCustomer = exports.AWARD_ACCOUNTS_IDENTIFIER_NAME = void 0;
|
|
3
|
+
exports.createMaskedCustomer = exports.AWARD_ACCOUNTS_IDENTIFIER_NAME = exports.POINT_AWARD_IDENTIFIER_NAME = void 0;
|
|
4
|
+
exports.POINT_AWARD_IDENTIFIER_NAME = 'pointAwardIdentifiers';
|
|
4
5
|
exports.AWARD_ACCOUNTS_IDENTIFIER_NAME = 'awardAccounts';
|
|
5
6
|
const MASKED_PROFILE = '****';
|
|
6
7
|
/**
|