@chevre/domain 23.1.0-alpha.20 → 23.1.0-alpha.21
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/project/unsetProjectSettings.ts +7 -1
- package/example/src/chevre/roles/{addAdminSellerEventIfNotExists.ts → addAdminSellerEventOfferIfNotExists.ts} +1 -1
- package/lib/chevre/service/assetTransaction/pay/factory.d.ts +1 -1
- package/lib/chevre/service/assetTransaction/pay.d.ts +1 -1
- package/lib/chevre/service/payment/any/authorize/fixTransactionNumber.d.ts +4 -0
- package/lib/chevre/service/payment/any/authorize/fixTransactionNumber.js +5 -1
- package/lib/chevre/service/payment/any/factory.d.ts +6 -2
- package/lib/chevre/service/payment/any/factory.js +4 -1
- package/lib/chevre/service/payment/any.js +3 -2
- package/lib/chevre/service/payment/factory.js +0 -5
- package/lib/chevre/service/payment/movieTicket/authorize.js +0 -5
- package/package.json +2 -2
|
@@ -11,7 +11,13 @@ async function main() {
|
|
|
11
11
|
|
|
12
12
|
const cursor = projectRepo.getCursor(
|
|
13
13
|
{
|
|
14
|
-
_id: {
|
|
14
|
+
_id: {
|
|
15
|
+
$nin: [
|
|
16
|
+
'ttts-development', 'sskts-development',
|
|
17
|
+
'ttts-test', 'sskts-test',
|
|
18
|
+
'ttts-production', 'sskts-production'
|
|
19
|
+
]
|
|
20
|
+
}
|
|
15
21
|
},
|
|
16
22
|
{
|
|
17
23
|
_id: 1,
|
|
@@ -14,7 +14,7 @@ async function main() {
|
|
|
14
14
|
chevre.factory.role.organizationRole.RoleName.SellersInventoryManager
|
|
15
15
|
];
|
|
16
16
|
const permissions = [
|
|
17
|
-
'admin.sellers.
|
|
17
|
+
'admin.sellers.eventOffers.*'
|
|
18
18
|
];
|
|
19
19
|
for (const roleName of roleNames) {
|
|
20
20
|
for (const permission of permissions) {
|
|
@@ -14,7 +14,7 @@ export declare function createStartParams(params: factory.assetTransaction.pay.I
|
|
|
14
14
|
*/
|
|
15
15
|
id: string;
|
|
16
16
|
}[];
|
|
17
|
-
instrument: factory.action.trade.pay.
|
|
17
|
+
instrument: factory.action.trade.pay.IPlaceOrderRelatedInstrument[];
|
|
18
18
|
}, options: {
|
|
19
19
|
checkedAction: {
|
|
20
20
|
id: string;
|
|
@@ -105,7 +105,7 @@ export import IPaymentAgencyTransaction = CreditCardPayment.IPaymentAgencyTransa
|
|
|
105
105
|
* 取引開始
|
|
106
106
|
*/
|
|
107
107
|
export declare function start(params: factory.assetTransaction.pay.IStartParamsWithoutDetail & {
|
|
108
|
-
instrument: factory.action.trade.pay.
|
|
108
|
+
instrument: factory.action.trade.pay.IPlaceOrderRelatedInstrument[];
|
|
109
109
|
}, options: {
|
|
110
110
|
pendingPaymentAgencyTransaction?: CreditCardPayment.IPaymentAgencyTransaction;
|
|
111
111
|
/**
|
|
@@ -32,6 +32,10 @@ declare function fixTransactionNumber(params: {
|
|
|
32
32
|
* 承認時に指定のチケット、あるいは、決済採用時に指定のチケット
|
|
33
33
|
*/
|
|
34
34
|
invoiceByTicketToken?: IInvoiceByTicketToken;
|
|
35
|
+
/**
|
|
36
|
+
* 承認時に指定のチケット、あるいは、決済採用時に指定のチケット
|
|
37
|
+
*/
|
|
38
|
+
ticketToken?: string;
|
|
35
39
|
permitOrInvoice?: never;
|
|
36
40
|
id?: never;
|
|
37
41
|
} | {
|
|
@@ -25,6 +25,7 @@ function fixTransactionNumber(params) {
|
|
|
25
25
|
let pendingPaymentAgencyTransaction;
|
|
26
26
|
let creditCard = object.creditCard;
|
|
27
27
|
let invoiceByTicketToken;
|
|
28
|
+
let ticketToken;
|
|
28
29
|
// ticketTokenを解釈(2024-08-13~)
|
|
29
30
|
const { verifyPaymentMethodTicketResult } = yield (0, verifyTicketTokenAsNeeded_1.verifyTicketTokenAsNeeded)({
|
|
30
31
|
project: { id: transaction.project.id },
|
|
@@ -50,6 +51,7 @@ function fixTransactionNumber(params) {
|
|
|
50
51
|
if (typeof paymentMethodIdByTicketToken === 'string') {
|
|
51
52
|
transactionNumber = paymentMethodIdByTicketToken;
|
|
52
53
|
invoiceByTicketToken = verifyPaymentMethodTicketResult.invoiceByTicketToken;
|
|
54
|
+
ticketToken = verifyPaymentMethodTicketResult.ticketToken;
|
|
53
55
|
}
|
|
54
56
|
}
|
|
55
57
|
}
|
|
@@ -77,6 +79,7 @@ function fixTransactionNumber(params) {
|
|
|
77
79
|
pendingPaymentAgencyTransaction = authorizeParams.pendingPaymentAgencyTransaction;
|
|
78
80
|
if (typeof ((_f = authorizeParams.acceptAction2ticketResult) === null || _f === void 0 ? void 0 : _f.ticketToken) === 'string') {
|
|
79
81
|
invoiceByTicketToken = authorizeParams.acceptAction2ticketResult.invoiceByTicketToken;
|
|
82
|
+
ticketToken = authorizeParams.acceptAction2ticketResult.ticketToken;
|
|
80
83
|
}
|
|
81
84
|
}
|
|
82
85
|
else {
|
|
@@ -88,7 +91,8 @@ function fixTransactionNumber(params) {
|
|
|
88
91
|
const publishTransactionNumberResult = yield repos.transactionNumber.publishByTimestamp({ startDate: new Date() });
|
|
89
92
|
transactionNumber = publishTransactionNumberResult.transactionNumber;
|
|
90
93
|
}
|
|
91
|
-
return Object.assign(Object.assign(Object.assign({ transactionNumber
|
|
94
|
+
return Object.assign(Object.assign(Object.assign({ transactionNumber,
|
|
95
|
+
ticketToken }, (pendingPaymentAgencyTransaction !== undefined) ? { pendingPaymentAgencyTransaction } : undefined), (creditCard !== undefined) ? { creditCard } : undefined), (invoiceByTicketToken !== undefined) ? { invoiceByTicketToken } : undefined
|
|
92
96
|
// ...(permitOrInvoice !== undefined) ? { permitOrInvoice } : undefined
|
|
93
97
|
);
|
|
94
98
|
});
|
|
@@ -35,9 +35,13 @@ export declare function creatPayTransactionStartParams(params: {
|
|
|
35
35
|
confirmationNumber: string;
|
|
36
36
|
orderNumber: string;
|
|
37
37
|
};
|
|
38
|
-
action: Pick<factory.action.authorize.
|
|
38
|
+
action: Pick<factory.action.authorize.paymentMethod.any.IAction, 'id' | 'typeOf'>;
|
|
39
|
+
/**
|
|
40
|
+
* 決済方法チケット
|
|
41
|
+
*/
|
|
42
|
+
ticketToken?: string;
|
|
39
43
|
}): factory.assetTransaction.pay.IStartParamsWithoutDetail & {
|
|
40
|
-
instrument: factory.action.trade.pay.
|
|
44
|
+
instrument: factory.action.trade.pay.IPlaceOrderRelatedInstrument[];
|
|
41
45
|
};
|
|
42
46
|
export declare function createMovieTicket(params: factory.action.trade.pay.IMovieTicket): factory.action.trade.pay.IMovieTicket;
|
|
43
47
|
export declare function createAuthorizeResult(params: {
|
|
@@ -49,6 +49,7 @@ function creatPublishPaymentUrlParams(params) {
|
|
|
49
49
|
}
|
|
50
50
|
function creatPayTransactionStartParams(params) {
|
|
51
51
|
var _a, _b, _c, _d;
|
|
52
|
+
const { ticketToken } = params;
|
|
52
53
|
let expires = moment(params.transaction.expires)
|
|
53
54
|
.add(1, 'month')
|
|
54
55
|
.toDate(); // 余裕を持って
|
|
@@ -66,9 +67,11 @@ function creatPayTransactionStartParams(params) {
|
|
|
66
67
|
? params.accountId
|
|
67
68
|
: (typeof params.object.accountId === 'string') ? params.object.accountId : undefined;
|
|
68
69
|
const movieTickets = (Array.isArray(params.object.movieTickets)) ? params.object.movieTickets.map(createMovieTicket) : undefined;
|
|
70
|
+
const ticketAsInstrument = (typeof ticketToken === 'string') ? { ticketToken, typeOf: 'Ticket' } : undefined;
|
|
69
71
|
const instrument = [
|
|
70
72
|
{ id: params.action.id, typeOf: params.action.typeOf },
|
|
71
|
-
{ orderNumber, typeOf: factory.order.OrderType.Order }
|
|
73
|
+
{ orderNumber, typeOf: factory.order.OrderType.Order },
|
|
74
|
+
...(ticketAsInstrument !== undefined) ? [ticketAsInstrument] : [] // add ticketAsInstrument(2025-11-25~)
|
|
72
75
|
];
|
|
73
76
|
return Object.assign({ project: { id: params.transaction.project.id, typeOf: factory.organizationType.Project }, typeOf: factory.assetTransactionType.Pay, transactionNumber: params.transactionNumber, agent: {
|
|
74
77
|
typeOf: params.transaction.seller.typeOf,
|
|
@@ -443,7 +443,7 @@ function authorize(params) {
|
|
|
443
443
|
if (typeof fixTransactionNumberResult.id === 'string') {
|
|
444
444
|
return { id: fixTransactionNumberResult.id };
|
|
445
445
|
}
|
|
446
|
-
const { transactionNumber, pendingPaymentAgencyTransaction, creditCard, invoiceByTicketToken } = fixTransactionNumberResult;
|
|
446
|
+
const { transactionNumber, pendingPaymentAgencyTransaction, creditCard, invoiceByTicketToken, ticketToken } = fixTransactionNumberResult;
|
|
447
447
|
// let transactionNumber: string | undefined;
|
|
448
448
|
// let pendingPaymentAgencyTransaction: PayTransactionService.IPaymentAgencyTransaction | undefined;
|
|
449
449
|
// let creditCard: factory.action.authorize.paymentMethod.any.ICreditCard | undefined = params.object.creditCard;
|
|
@@ -538,7 +538,8 @@ function authorize(params) {
|
|
|
538
538
|
// confirmationNumber required(2025-02-12~)
|
|
539
539
|
// orderNumber required(2025-02-14~)
|
|
540
540
|
order: { confirmationNumber, orderNumber },
|
|
541
|
-
action: { id: action.id, typeOf: action.typeOf }
|
|
541
|
+
action: { id: action.id, typeOf: action.typeOf },
|
|
542
|
+
ticketToken
|
|
542
543
|
});
|
|
543
544
|
payTransaction = yield PayTransactionService.start(startParams, Object.assign({
|
|
544
545
|
// useCheckByIdentifierIfNotYet: params.options.useCheckByIdentifierIfNotYet,
|
|
@@ -15,11 +15,6 @@ function createPayOrderAction(params) {
|
|
|
15
15
|
confirmationNumber: params.order.confirmationNumber,
|
|
16
16
|
orderNumber: params.order.orderNumber
|
|
17
17
|
};
|
|
18
|
-
// const instrument: factory.action.trade.pay.IInstrument = {
|
|
19
|
-
// id: params.transaction.id,
|
|
20
|
-
// transactionNumber: params.transaction.transactionNumber,
|
|
21
|
-
// typeOf: params.transaction.typeOf
|
|
22
|
-
// };
|
|
23
18
|
const instrument = [
|
|
24
19
|
{
|
|
25
20
|
id: params.transaction.id,
|
|
@@ -48,11 +48,6 @@ function authorize(params, transaction, paymentServiceId, options) {
|
|
|
48
48
|
}, typeOf: paymentMethodType }, (typeof accountId === 'string') ? { accountId } : undefined),
|
|
49
49
|
movieTickets: paymentMethod === null || paymentMethod === void 0 ? void 0 : paymentMethod.movieTickets
|
|
50
50
|
};
|
|
51
|
-
// const instrument: factory.action.trade.pay.IInstrument = {
|
|
52
|
-
// id: transaction.id,
|
|
53
|
-
// transactionNumber: transaction.transactionNumber,
|
|
54
|
-
// typeOf: transaction.typeOf
|
|
55
|
-
// };
|
|
56
51
|
const instrument = [
|
|
57
52
|
{
|
|
58
53
|
id: transaction.id,
|
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": "5.3.0-alpha.
|
|
14
|
+
"@chevre/factory": "5.3.0-alpha.5",
|
|
15
15
|
"@cinerino/sdk": "12.9.0-alpha.1",
|
|
16
16
|
"@motionpicture/coa-service": "9.6.0",
|
|
17
17
|
"@motionpicture/gmo-service": "5.4.0-alpha.1",
|
|
@@ -115,5 +115,5 @@
|
|
|
115
115
|
"postversion": "git push origin --tags",
|
|
116
116
|
"prepublishOnly": "npm run clean && npm run build && npm test && npm run doc"
|
|
117
117
|
},
|
|
118
|
-
"version": "23.1.0-alpha.
|
|
118
|
+
"version": "23.1.0-alpha.21"
|
|
119
119
|
}
|