@chevre/domain 21.31.0-alpha.1 → 21.31.0
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/repo/mongoose/schemas/message.js +4 -4
- package/lib/chevre/repo/mongoose/schemas/paymentService.js +4 -4
- package/lib/chevre/service/assetTransaction/cancelReservation/factory.js +1 -1
- package/lib/chevre/service/moneyTransfer.js +6 -0
- package/lib/chevre/service/transaction/placeOrderInProgress/factory.js +6 -1
- package/lib/chevre/service/transaction/placeOrderInProgress/validation/validateStartRequest.d.ts +1 -1
- package/package.json +3 -3
|
@@ -38,10 +38,10 @@ const schemaDefinition = {
|
|
|
38
38
|
type: String,
|
|
39
39
|
required: true
|
|
40
40
|
},
|
|
41
|
-
toRecipient: mongoose_1.SchemaTypes.Mixed
|
|
42
|
-
__v:
|
|
43
|
-
createdAt:
|
|
44
|
-
updatedAt:
|
|
41
|
+
toRecipient: mongoose_1.SchemaTypes.Mixed
|
|
42
|
+
// __v: SchemaTypes.Mixed,
|
|
43
|
+
// createdAt: SchemaTypes.Mixed,
|
|
44
|
+
// updatedAt: SchemaTypes.Mixed
|
|
45
45
|
};
|
|
46
46
|
const schemaOptions = {
|
|
47
47
|
autoIndex: settings_1.MONGO_AUTO_INDEX,
|
|
@@ -16,10 +16,10 @@ const schemaDefinition = {
|
|
|
16
16
|
productID: { type: String, required: true },
|
|
17
17
|
provider: [mongoose_1.SchemaTypes.Mixed],
|
|
18
18
|
serviceOutput: mongoose_1.SchemaTypes.Mixed,
|
|
19
|
-
serviceType: mongoose_1.SchemaTypes.Mixed
|
|
20
|
-
__v:
|
|
21
|
-
createdAt:
|
|
22
|
-
updatedAt:
|
|
19
|
+
serviceType: mongoose_1.SchemaTypes.Mixed
|
|
20
|
+
// __v: SchemaTypes.Mixed,
|
|
21
|
+
// createdAt: SchemaTypes.Mixed,
|
|
22
|
+
// updatedAt: SchemaTypes.Mixed
|
|
23
23
|
};
|
|
24
24
|
const schemaOptions = {
|
|
25
25
|
autoIndex: settings_1.MONGO_AUTO_INDEX,
|
|
@@ -43,7 +43,7 @@ function createStartParams(params) {
|
|
|
43
43
|
if (typeof reservationNumber !== 'string') {
|
|
44
44
|
throw new factory.errors.Argument('object', 'reservationNumber must be specified');
|
|
45
45
|
}
|
|
46
|
-
const cancelReservationObject = Object.assign(Object.assign(Object.assign({
|
|
46
|
+
const cancelReservationObject = Object.assign(Object.assign(Object.assign({}, (typeof (reserveTransactionAsObject === null || reserveTransactionAsObject === void 0 ? void 0 : reserveTransactionAsObject.typeOf) === 'string') ? { transaction: reserveTransactionAsObject } : undefined), (Array.isArray(eventReservationsAsObject)) ? { reservations: eventReservationsAsObject } : undefined), { reservationNumber, typeOf: factory.reservationType.ReservationPackage // 拡張(2024-04-18~)
|
|
47
47
|
});
|
|
48
48
|
return {
|
|
49
49
|
project: { id: params.project.id, typeOf: params.project.typeOf },
|
|
@@ -258,6 +258,9 @@ function createAccountTransactionRecipient(params) {
|
|
|
258
258
|
};
|
|
259
259
|
}
|
|
260
260
|
else {
|
|
261
|
+
if (recipientType === factory.creativeWorkType.SoftwareApplication) {
|
|
262
|
+
throw new factory.errors.NotImplemented(`recipient.typeOf [${recipientType}] not implemented`);
|
|
263
|
+
}
|
|
261
264
|
const recipientButSeller = {
|
|
262
265
|
typeOf: recipientType,
|
|
263
266
|
id: String(params.recipient.id),
|
|
@@ -562,6 +565,9 @@ function createRecipient4depositFromNow(params) {
|
|
|
562
565
|
};
|
|
563
566
|
}
|
|
564
567
|
else if (typeof ((_b = params.recipient) === null || _b === void 0 ? void 0 : _b.typeOf) === 'string') {
|
|
568
|
+
if (params.recipient.typeOf === factory.creativeWorkType.SoftwareApplication) {
|
|
569
|
+
throw new factory.errors.NotImplemented(`recipient.typeOf [${params.recipient.typeOf}] not implemented`);
|
|
570
|
+
}
|
|
565
571
|
const recipientButSeller = {
|
|
566
572
|
typeOf: params.recipient.typeOf,
|
|
567
573
|
id: String(params.recipient.id),
|
|
@@ -4,7 +4,12 @@ exports.createStartParams = void 0;
|
|
|
4
4
|
const factory = require("../../../factory");
|
|
5
5
|
function createStartParams(params, expiresInSeconds, passport, seller, broker, customerType, memeberOfPayload) {
|
|
6
6
|
var _a, _b, _c, _d, _e;
|
|
7
|
-
|
|
7
|
+
let clientUser;
|
|
8
|
+
if (typeof ((_a = params.object.clientUser) === null || _a === void 0 ? void 0 : _a.client_id) === 'string') {
|
|
9
|
+
const { sub, token_use, iss, exp, iat, version, jti, client_id, username, aud, typ } = params.object.clientUser;
|
|
10
|
+
clientUser = { sub, token_use, iss, exp, iat, version, jti, client_id, username, aud, typ };
|
|
11
|
+
}
|
|
12
|
+
const transactionObject = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (typeof ((_b = params.object.passport) === null || _b === void 0 ? void 0 : _b.token) === 'string') ? { passportToken: params.object.passport.token } : undefined), (typeof (passport === null || passport === void 0 ? void 0 : passport.scope) === 'string') ? { passport } : undefined), (typeof (clientUser === null || clientUser === void 0 ? void 0 : clientUser.client_id) === 'string') ? { clientUser } : undefined), (typeof ((_c = params.object) === null || _c === void 0 ? void 0 : _c.name) === 'string') ? { name: (_d = params.object) === null || _d === void 0 ? void 0 : _d.name } : undefined), (typeof (broker === null || broker === void 0 ? void 0 : broker.typeOf) === 'string') ? { broker: broker } : undefined), (typeof ((_e = params.object.customer) === null || _e === void 0 ? void 0 : _e.typeOf) === 'string') ? { customer: params.object.customer } : undefined), (typeof customerType === 'string') ? { customerType } : undefined);
|
|
8
13
|
if (typeof seller.id !== 'string') {
|
|
9
14
|
throw new factory.errors.NotFound('seller.id');
|
|
10
15
|
}
|
package/package.json
CHANGED
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
],
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@aws-sdk/credential-providers": "3.433.0",
|
|
13
|
-
"@chevre/factory": "4.370.0
|
|
14
|
-
"@cinerino/sdk": "6.1.0
|
|
13
|
+
"@chevre/factory": "4.370.0",
|
|
14
|
+
"@cinerino/sdk": "6.1.0",
|
|
15
15
|
"@motionpicture/coa-service": "9.4.0",
|
|
16
16
|
"@motionpicture/gmo-service": "5.3.0",
|
|
17
17
|
"@sendgrid/mail": "6.4.0",
|
|
@@ -110,5 +110,5 @@
|
|
|
110
110
|
"postversion": "git push origin --tags",
|
|
111
111
|
"prepublishOnly": "npm run clean && npm run build && npm test && npm run doc"
|
|
112
112
|
},
|
|
113
|
-
"version": "21.31.0
|
|
113
|
+
"version": "21.31.0"
|
|
114
114
|
}
|