@chevre/domain 20.2.0-alpha.46 → 20.2.0-alpha.47
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/migrateOwnershipInfos2newUserPool.ts +1 -1
- package/example/src/chevre/ownershipInfosCsv2peopleJson.ts +2 -2
- package/lib/chevre/service/delivery/product/factory.js +9 -3
- package/lib/chevre/service/transaction/orderProgramMembership/findPaymentCardPermit.d.ts +1 -1
- package/package.json +3 -3
- package/CHANGELOG.md +0 -2069
- package/example/.gitignore +0 -1
- package/example/src/chevre/.gitignore +0 -1
|
@@ -55,7 +55,7 @@ async function main() {
|
|
|
55
55
|
let updateCount = 0;
|
|
56
56
|
await cursor.eachAsync(async (doc) => {
|
|
57
57
|
i += 1;
|
|
58
|
-
const ownershipInfo = <chevre.factory.ownershipInfo.IOwnershipInfo<chevre.factory.ownershipInfo.
|
|
58
|
+
const ownershipInfo = <chevre.factory.ownershipInfo.IOwnershipInfo<chevre.factory.ownershipInfo.IPermitAsGood>>doc.toObject();
|
|
59
59
|
|
|
60
60
|
const owner = <chevre.factory.person.IPerson>ownershipInfo.ownedBy;
|
|
61
61
|
let iss =
|
|
@@ -132,7 +132,7 @@ function findAccount(params: {
|
|
|
132
132
|
customer: { id: string };
|
|
133
133
|
now: Date;
|
|
134
134
|
}) {
|
|
135
|
-
return async (): Promise<chevre.factory.ownershipInfo.
|
|
135
|
+
return async (): Promise<chevre.factory.ownershipInfo.IPermitAsGood | undefined> => {
|
|
136
136
|
const ownershipInfoRepo = new chevre.repository.OwnershipInfo(mongoose.connection);
|
|
137
137
|
|
|
138
138
|
// let accountOwnershipInfos = await search({
|
|
@@ -171,7 +171,7 @@ function findAccount(params: {
|
|
|
171
171
|
// throw new domain.factory.errors.NotFound('accountOwnershipInfos');
|
|
172
172
|
}
|
|
173
173
|
|
|
174
|
-
return <chevre.factory.ownershipInfo.
|
|
174
|
+
return <chevre.factory.ownershipInfo.IPermitAsGood>ownershipInfos[0].typeOfGood;
|
|
175
175
|
};
|
|
176
176
|
}
|
|
177
177
|
|
|
@@ -5,6 +5,7 @@ const moment = require("moment");
|
|
|
5
5
|
const factory = require("../../../factory");
|
|
6
6
|
const MAX_OWNED_THROUGH = '3000-01-01T00:00:00Z';
|
|
7
7
|
function createProductOwnershipInfo(params) {
|
|
8
|
+
var _a, _b;
|
|
8
9
|
let ownershipInfo;
|
|
9
10
|
let ownedThrough;
|
|
10
11
|
// どういう期間でいくらのオファーなのか
|
|
@@ -48,9 +49,14 @@ function createProductOwnershipInfo(params) {
|
|
|
48
49
|
throw new factory.errors.NotFound('Order.acceptedOffers.priceSpecification.referenceQuantity.value');
|
|
49
50
|
}
|
|
50
51
|
const itemOffered = params.acceptedOffer.itemOffered;
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
// 最適化(2023-02-01~)
|
|
53
|
+
const issuedThrough = (typeof ((_a = itemOffered.issuedThrough) === null || _a === void 0 ? void 0 : _a.typeOf) === 'string')
|
|
54
|
+
? Object.assign({ id: itemOffered.issuedThrough.id, typeOf: itemOffered.issuedThrough.typeOf }, (typeof ((_b = itemOffered.issuedThrough.serviceType) === null || _b === void 0 ? void 0 : _b.typeOf) === 'string')
|
|
55
|
+
? { serviceType: itemOffered.issuedThrough.serviceType }
|
|
56
|
+
: undefined) : undefined;
|
|
57
|
+
const typeOfGood = Object.assign(Object.assign(Object.assign({
|
|
58
|
+
// project: itemOffered.project, // 最適化(2023-02-01~)
|
|
59
|
+
identifier: itemOffered.identifier, typeOf: itemOffered.typeOf }, (typeof (issuedThrough === null || issuedThrough === void 0 ? void 0 : issuedThrough.typeOf) === 'string') ? { issuedThrough } : undefined), (itemOffered.validFor !== undefined) ? { validFor: itemOffered.validFor } : undefined), (itemOffered.name !== undefined) ? { name: itemOffered.name } : undefined);
|
|
54
60
|
ownershipInfo = {
|
|
55
61
|
project: params.project,
|
|
56
62
|
typeOf: 'OwnershipInfo',
|
package/package.json
CHANGED
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
}
|
|
10
10
|
],
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@chevre/factory": "4.284.0-alpha.
|
|
13
|
-
"@cinerino/sdk": "3.
|
|
12
|
+
"@chevre/factory": "4.284.0-alpha.4",
|
|
13
|
+
"@cinerino/sdk": "3.137.0-alpha.2",
|
|
14
14
|
"@motionpicture/coa-service": "9.2.0",
|
|
15
15
|
"@motionpicture/gmo-service": "5.2.0",
|
|
16
16
|
"@sendgrid/mail": "6.4.0",
|
|
@@ -120,5 +120,5 @@
|
|
|
120
120
|
"postversion": "git push origin --tags",
|
|
121
121
|
"prepublishOnly": "npm run clean && npm run build && npm test && npm run doc"
|
|
122
122
|
},
|
|
123
|
-
"version": "20.2.0-alpha.
|
|
123
|
+
"version": "20.2.0-alpha.47"
|
|
124
124
|
}
|