@chevre/domain 23.2.0-alpha.59 → 23.2.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/eventSeries/unsetVideoFormat.ts +31 -0
- package/lib/chevre/emailMessageBuilder.d.ts +0 -3
- package/lib/chevre/emailMessageBuilder.js +5 -15
- package/lib/chevre/repo/eventSeries.d.ts +4 -0
- package/lib/chevre/repo/eventSeries.js +6 -0
- package/lib/chevre/service/assetTransaction/reserve/start/factory/createStartParams.js +9 -7
- package/lib/chevre/service/offer/event/authorize/factory.js +9 -7
- package/lib/chevre/service/offer/eventServiceByCOA/authorize/factory.js +19 -7
- package/package.json +2 -3
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// tslint:disable:no-console
|
|
2
|
+
import * as mongoose from 'mongoose';
|
|
3
|
+
|
|
4
|
+
import { chevre } from '../../../../lib/index';
|
|
5
|
+
|
|
6
|
+
// const excludedProject = { id: String(process.env.EXCLUDED_PROJECT_ID) };
|
|
7
|
+
|
|
8
|
+
async function main() {
|
|
9
|
+
await mongoose.connect(<string>process.env.MONGOLAB_URI, { autoIndex: false });
|
|
10
|
+
|
|
11
|
+
const eventSeriesRepo = await chevre.repository.EventSeries.createInstance(mongoose.connection);
|
|
12
|
+
|
|
13
|
+
let updateResult: any;
|
|
14
|
+
|
|
15
|
+
updateResult = await eventSeriesRepo.unsetUnnecessaryFields({
|
|
16
|
+
filter: {
|
|
17
|
+
// _id: { $eq: 'akewitdke' },
|
|
18
|
+
videoFormat: { $exists: true }
|
|
19
|
+
},
|
|
20
|
+
$unset: {
|
|
21
|
+
videoFormat: 1
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
console.log(updateResult);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
main()
|
|
28
|
+
.then(() => {
|
|
29
|
+
console.log('success!');
|
|
30
|
+
})
|
|
31
|
+
.catch(console.error);
|
|
@@ -1,10 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Eメールメッセージビルダー
|
|
4
|
-
*/
|
|
5
|
-
// import { } from '../@types/pug2';
|
|
6
|
-
// tslint:disable-next-line:no-reference
|
|
7
|
-
/// <reference path="../@types/pug2.d.ts" />
|
|
8
2
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
9
3
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
10
4
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -18,16 +12,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
18
12
|
exports.createSendOrderMessage = createSendOrderMessage;
|
|
19
13
|
exports.createReturnOrderMessage = createReturnOrderMessage;
|
|
20
14
|
exports.createRefundMessage = createRefundMessage;
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
// import { Settings } from './settings';
|
|
15
|
+
/**
|
|
16
|
+
* Eメールメッセージビルダー
|
|
17
|
+
*/
|
|
25
18
|
// support pug@3(2026-02-03~)
|
|
26
|
-
|
|
27
|
-
const
|
|
28
|
-
if (USE_DEPRECATED_PUG2) {
|
|
29
|
-
pug = pug2;
|
|
30
|
-
}
|
|
19
|
+
const pug = require("pug");
|
|
20
|
+
const factory = require("./factory");
|
|
31
21
|
function createEmailMessageText(params) {
|
|
32
22
|
return __awaiter(this, void 0, void 0, function* () {
|
|
33
23
|
var _a, _b, _c;
|
|
@@ -105,5 +105,9 @@ export declare class EventSeriesRepo {
|
|
|
105
105
|
} & Required<{
|
|
106
106
|
_id: string;
|
|
107
107
|
}>>>;
|
|
108
|
+
unsetUnnecessaryFields(params: {
|
|
109
|
+
filter: FilterQuery<factory.eventSeries.IEvent>;
|
|
110
|
+
$unset: IUnset;
|
|
111
|
+
}): Promise<import("mongoose").UpdateWriteOpResult>;
|
|
108
112
|
}
|
|
109
113
|
export {};
|
|
@@ -589,5 +589,11 @@ class EventSeriesRepo {
|
|
|
589
589
|
.sort({ startDate: factory.sortType.Descending })
|
|
590
590
|
.cursor();
|
|
591
591
|
}
|
|
592
|
+
unsetUnnecessaryFields(params) {
|
|
593
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
594
|
+
return this.eventSeriesModel.updateMany(params.filter, { $unset: params.$unset }, { timestamps: false })
|
|
595
|
+
.exec();
|
|
596
|
+
});
|
|
597
|
+
}
|
|
592
598
|
}
|
|
593
599
|
exports.EventSeriesRepo = EventSeriesRepo;
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.createStartParams = createStartParams;
|
|
4
4
|
const factory = require("../../../../../factory");
|
|
5
|
-
const USE_DEPRECATED_VIDEO_FORMAT = process.env.USE_DEPRECATED_VIDEO_FORMAT === '1';
|
|
6
5
|
function createStartParams(params) {
|
|
7
6
|
var _a;
|
|
8
7
|
const { reservationNumber, acceptedOffers4transactionObject, objectSubReservations, agent, expires, project, instrument } = params;
|
|
@@ -37,7 +36,7 @@ function createReservationFor(params, useOptimizeReservation) {
|
|
|
37
36
|
}
|
|
38
37
|
function optimizeReservationSuperEvent(params, useOptimizeReservation) {
|
|
39
38
|
const superEvent = params.superEvent;
|
|
40
|
-
return Object.assign(Object.assign(
|
|
39
|
+
return Object.assign(Object.assign({ id: superEvent.id,
|
|
41
40
|
// kanaName: superEvent.kanaName, // 廃止(2024-01-26~)
|
|
42
41
|
location: superEvent.location, name: superEvent.name, soundFormat: superEvent.soundFormat, typeOf: superEvent.typeOf, workPerformed: superEvent.workPerformed }, (superEvent.headline !== undefined)
|
|
43
42
|
? { headline: superEvent.headline }
|
|
@@ -47,12 +46,15 @@ function optimizeReservationSuperEvent(params, useOptimizeReservation) {
|
|
|
47
46
|
additionalProperty: (Array.isArray(superEvent.additionalProperty))
|
|
48
47
|
? superEvent.additionalProperty
|
|
49
48
|
: []
|
|
50
|
-
}), (USE_DEPRECATED_VIDEO_FORMAT)
|
|
51
|
-
? {
|
|
52
|
-
// 現時点で型廃止済だがデータとしては互換性維持(2026-01-15~)
|
|
53
|
-
videoFormat: superEvent.videoFormat
|
|
54
49
|
}
|
|
55
|
-
|
|
50
|
+
// videoFormatをデータとしても廃止(万が一に備えてUSE_DEPRECATED_VIDEO_FORMATで再設定可能)(2026-02-03~)
|
|
51
|
+
// ...(USE_DEPRECATED_VIDEO_FORMAT)
|
|
52
|
+
// ? {
|
|
53
|
+
// // 現時点で型廃止済だがデータとしては互換性維持(2026-01-15~)
|
|
54
|
+
// videoFormat: (<any>superEvent).videoFormat
|
|
55
|
+
// }
|
|
56
|
+
// : undefined
|
|
57
|
+
);
|
|
56
58
|
}
|
|
57
59
|
function createIssuedThrough(params) {
|
|
58
60
|
var _a;
|
|
@@ -7,7 +7,6 @@ exports.createReserveTransactionStartParams = createReserveTransactionStartParam
|
|
|
7
7
|
exports.responseBody2acceptedOffers4result = responseBody2acceptedOffers4result;
|
|
8
8
|
const moment = require("moment");
|
|
9
9
|
const factory = require("../../../../factory");
|
|
10
|
-
const USE_DEPRECATED_VIDEO_FORMAT = process.env.USE_DEPRECATED_VIDEO_FORMAT === '1';
|
|
11
10
|
function createReserveTransactionStartParams(params) {
|
|
12
11
|
var _a;
|
|
13
12
|
const { transaction, transactionNumber } = params;
|
|
@@ -298,12 +297,15 @@ function createReservation(params) {
|
|
|
298
297
|
startDate: moment(event.startDate)
|
|
299
298
|
.toDate(),
|
|
300
299
|
// 最適化(2022-05-31~)
|
|
301
|
-
superEvent: Object.assign(Object.assign(
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
300
|
+
superEvent: Object.assign(Object.assign({ typeOf: event.superEvent.typeOf, id: event.superEvent.id, location: event.superEvent.location, name: event.superEvent.name, soundFormat: event.superEvent.soundFormat, workPerformed }, (typeof event.superEvent.duration === 'string') ? { duration: event.superEvent.duration } : undefined), (event.superEvent.headline !== undefined) ? { headline: event.superEvent.headline } : undefined
|
|
301
|
+
// videoFormatをデータとしても廃止(万が一に備えてUSE_DEPRECATED_VIDEO_FORMATで再設定可能)(2026-02-03~)
|
|
302
|
+
// ...(USE_DEPRECATED_VIDEO_FORMAT)
|
|
303
|
+
// ? {
|
|
304
|
+
// // 現時点で型廃止済だがデータとしては互換性維持(2026-01-15~)
|
|
305
|
+
// videoFormat: (<any>event.superEvent).videoFormat
|
|
306
|
+
// }
|
|
307
|
+
// : undefined
|
|
308
|
+
)
|
|
307
309
|
};
|
|
308
310
|
if (params.issuedThrough.typeOf !== factory.product.ProductType.EventService) {
|
|
309
311
|
throw new factory.errors.Argument('issuedThrough', `issuedThrough.typeOf must be ${factory.product.ProductType.EventService}`);
|
|
@@ -6,7 +6,6 @@ exports.responseBody2acceptedOffers4result = responseBody2acceptedOffers4result;
|
|
|
6
6
|
const moment = require("moment");
|
|
7
7
|
const util = require("util");
|
|
8
8
|
const factory = require("../../../../factory");
|
|
9
|
-
const USE_DEPRECATED_VIDEO_FORMAT = process.env.USE_DEPRECATED_VIDEO_FORMAT === '1';
|
|
10
9
|
function createAuthorizeSeatReservationActionAttributes(params) {
|
|
11
10
|
var _a;
|
|
12
11
|
const transaction = params.transaction;
|
|
@@ -123,12 +122,25 @@ function responseBody2acceptedOffers4result(params) {
|
|
|
123
122
|
branchCode: event.location.branchCode,
|
|
124
123
|
name: event.location.name
|
|
125
124
|
}, name: event.name, startDate: moment(event.startDate)
|
|
126
|
-
.toDate(), superEvent:
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
:
|
|
125
|
+
.toDate(), superEvent: {
|
|
126
|
+
typeOf: event.superEvent.typeOf,
|
|
127
|
+
id: event.superEvent.id,
|
|
128
|
+
identifier: event.superEvent.identifier,
|
|
129
|
+
name: event.superEvent.name,
|
|
130
|
+
alternativeHeadline: event.superEvent.alternativeHeadline,
|
|
131
|
+
location: event.superEvent.location,
|
|
132
|
+
soundFormat: event.superEvent.soundFormat,
|
|
133
|
+
workPerformed: workPerformed,
|
|
134
|
+
duration: event.superEvent.duration,
|
|
135
|
+
coaInfo: event.superEvent.coaInfo
|
|
136
|
+
// videoFormatをデータとしても廃止(万が一に備えてUSE_DEPRECATED_VIDEO_FORMATで再設定可能)(2026-02-03~)
|
|
137
|
+
// ...(USE_DEPRECATED_VIDEO_FORMAT)
|
|
138
|
+
// ? {
|
|
139
|
+
// // 現時点で型廃止済だがデータとしては互換性維持(2026-01-15~)
|
|
140
|
+
// videoFormat: (<any>event.superEvent).videoFormat
|
|
141
|
+
// }
|
|
142
|
+
// : undefined
|
|
143
|
+
}, id: event.id });
|
|
132
144
|
const ticketNumber = util.format('%s:%s:%s', reservationFor.id, tmpReserve.seatSection, tmpReserve.seatNum);
|
|
133
145
|
const ticketedSeat = {
|
|
134
146
|
typeOf: factory.placeType.Seat,
|
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.4.0-alpha.
|
|
14
|
+
"@chevre/factory": "5.4.0-alpha.30",
|
|
15
15
|
"@cinerino/sdk": "13.0.0",
|
|
16
16
|
"@motionpicture/coa-service": "9.6.0",
|
|
17
17
|
"@motionpicture/gmo-service": "5.4.0-alpha.1",
|
|
@@ -28,7 +28,6 @@
|
|
|
28
28
|
"node-fpe-v1": "npm:node-fpe@1.0.0",
|
|
29
29
|
"node-fpe-v2": "npm:node-fpe@2.0.4",
|
|
30
30
|
"pug": "3.0.3",
|
|
31
|
-
"pug2": "npm:pug@2.0.4",
|
|
32
31
|
"uniqid": "5.4.0",
|
|
33
32
|
"uuid": "^3.4.0"
|
|
34
33
|
},
|
|
@@ -118,5 +117,5 @@
|
|
|
118
117
|
"postversion": "git push origin --tags",
|
|
119
118
|
"prepublishOnly": "npm run clean && npm run build && npm test && npm run doc"
|
|
120
119
|
},
|
|
121
|
-
"version": "23.2.0-alpha.
|
|
120
|
+
"version": "23.2.0-alpha.60"
|
|
122
121
|
}
|