@chevre/domain 23.1.0-alpha.16 → 23.1.0-alpha.18
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/event.d.ts +2 -1
- package/lib/chevre/repo/event.js +2 -1
- package/lib/chevre/service/transaction/placeOrder/confirm/validation/factory.d.ts +9 -0
- package/lib/chevre/service/transaction/placeOrder/confirm/validation/factory.js +2 -0
- package/lib/chevre/service/transaction/placeOrder/confirm/validation/validateInvoiceReferencesOrder.d.ts +8 -0
- package/lib/chevre/service/transaction/placeOrder/confirm/validation/validateInvoiceReferencesOrder.js +45 -0
- package/lib/chevre/service/transaction/placeOrder/confirm/validation/validatePrice.d.ts +3 -0
- package/lib/chevre/service/transaction/placeOrder/confirm/validation/validatePrice.js +38 -0
- package/lib/chevre/service/transaction/placeOrder/confirm/validation.d.ts +2 -8
- package/lib/chevre/service/transaction/placeOrder/confirm/validation.js +5 -35
- package/package.json +1 -1
- package/example/src/chevre/upsertManyEventsByAdditionalProperty.ts +0 -193
|
@@ -79,8 +79,9 @@ export declare class EventRepo {
|
|
|
79
79
|
* 特定の追加特性をキーにして、存在しなければ作成する(複数対応)
|
|
80
80
|
* 施設コンテンツとルームは1つに限定
|
|
81
81
|
* 存在すれば、特定の属性のみ更新する
|
|
82
|
+
* @deprecated migrate to upsertManyScreeningEventByIdentifier
|
|
82
83
|
*/
|
|
83
|
-
|
|
84
|
+
upsertManyByAdditionalPropertyDeprecated(params: {
|
|
84
85
|
events: factory.event.screeningEvent.IAttributes[];
|
|
85
86
|
additionalPropertyFilter: {
|
|
86
87
|
name: string;
|
package/lib/chevre/repo/event.js
CHANGED
|
@@ -295,9 +295,10 @@ class EventRepo {
|
|
|
295
295
|
* 特定の追加特性をキーにして、存在しなければ作成する(複数対応)
|
|
296
296
|
* 施設コンテンツとルームは1つに限定
|
|
297
297
|
* 存在すれば、特定の属性のみ更新する
|
|
298
|
+
* @deprecated migrate to upsertManyScreeningEventByIdentifier
|
|
298
299
|
*/
|
|
299
300
|
// tslint:disable-next-line:max-func-body-length
|
|
300
|
-
|
|
301
|
+
upsertManyByAdditionalPropertyDeprecated(params, options) {
|
|
301
302
|
return __awaiter(this, void 0, void 0, function* () {
|
|
302
303
|
const { update } = options;
|
|
303
304
|
const bulkWriteOps = [];
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as factory from '../../../../../factory';
|
|
2
|
+
export type IAcceptPayAction = Pick<factory.action.accept.pay.IAction, 'object' | 'result' | 'endDate'>;
|
|
3
|
+
export type IAuthorizeEventServiceOffer = factory.action.authorize.offer.eventService.IAction;
|
|
4
|
+
export type IAuthorizeProductOffer = factory.action.authorize.offer.product.IAction;
|
|
5
|
+
export type IAuthorizeMoneyTransferOffer = factory.action.authorize.offer.moneyTransfer.IAction;
|
|
6
|
+
export type IAuthorizePaymentAction = Pick<factory.action.authorize.paymentMethod.any.IAction, 'id' | 'result' | 'endDate' | 'instrument'> & {
|
|
7
|
+
object: Pick<factory.action.authorize.paymentMethod.any.IObject, 'typeOf'>;
|
|
8
|
+
};
|
|
9
|
+
export type IPayTransaction = Pick<factory.assetTransaction.pay.ITransaction, 'object'>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as factory from '../../../../../factory';
|
|
2
|
+
import { IAuthorizePaymentAction } from './factory';
|
|
3
|
+
declare function validateInvoiceReferencesOrder(authorizePaymentActions: IAuthorizePaymentAction[],
|
|
4
|
+
/**
|
|
5
|
+
* 受け入れられた興行オファー
|
|
6
|
+
*/
|
|
7
|
+
eventReservationAcceptedOffers: factory.order.IAcceptedOffer<factory.order.IReservation>[]): void;
|
|
8
|
+
export { validateInvoiceReferencesOrder };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.validateInvoiceReferencesOrder = validateInvoiceReferencesOrder;
|
|
4
|
+
const createDebug = require("debug");
|
|
5
|
+
const factory = require("../../../../../factory");
|
|
6
|
+
const debug = createDebug('chevre-domain:service:transaction');
|
|
7
|
+
function validateInvoiceReferencesOrder(authorizePaymentActions,
|
|
8
|
+
/**
|
|
9
|
+
* 受け入れられた興行オファー
|
|
10
|
+
*/
|
|
11
|
+
eventReservationAcceptedOffers) {
|
|
12
|
+
// 興行オファーに含まれるイベントIDリスト
|
|
13
|
+
let eventIdsMustBe = [];
|
|
14
|
+
if (Array.isArray(eventReservationAcceptedOffers)) {
|
|
15
|
+
eventReservationAcceptedOffers.forEach((offer) => {
|
|
16
|
+
eventIdsMustBe.push(offer.itemOffered.reservationFor.id);
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
eventIdsMustBe = [...new Set(eventIdsMustBe)];
|
|
20
|
+
debug('validateInvoiceReferencesOrder: eventIdsMustBe: ', JSON.stringify(eventIdsMustBe));
|
|
21
|
+
// 全決済承認について、承認ごとに検証
|
|
22
|
+
authorizePaymentActions.forEach((authorizePaymentAction) => {
|
|
23
|
+
var _a, _b, _c, _d;
|
|
24
|
+
const paymentMethodId = (_a = authorizePaymentAction.result) === null || _a === void 0 ? void 0 : _a[0].paymentMethodId;
|
|
25
|
+
const paymentServiceType = (_b = authorizePaymentAction.result) === null || _b === void 0 ? void 0 : _b[0].issuedThrough.typeOf;
|
|
26
|
+
if (paymentServiceType !== factory.service.paymentService.PaymentServiceType.CreditCard) {
|
|
27
|
+
// クレジットカードIF以外は検証不要
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
const orderedItemsByInvoice = (_d = (_c = authorizePaymentAction.result) === null || _c === void 0 ? void 0 : _c[0].referencesOrder) === null || _d === void 0 ? void 0 : _d.orderedItem;
|
|
31
|
+
if (!Array.isArray(orderedItemsByInvoice)) {
|
|
32
|
+
// 決済承認時に注文アイテムの指定がなければ検証不要
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
// 請求の関連注文アイテムが定義されていれば(空配列であったとしても)、イベントIDの一致検証が必要
|
|
36
|
+
// 請求の関連イベントIDリスト
|
|
37
|
+
const eventIdsByInvoice = orderedItemsByInvoice.map((orderedItem) => orderedItem.orderedItem.serviceOutput.reservationFor.id);
|
|
38
|
+
debug('validateInvoiceReferencesOrder: eventIdsByInvoice: ', JSON.stringify(eventIdsByInvoice), paymentServiceType, paymentMethodId);
|
|
39
|
+
const eventIdsMatched = eventIdsMustBe.length === eventIdsByInvoice.length
|
|
40
|
+
&& eventIdsMustBe.every((eventIdMustExist) => eventIdsByInvoice.includes(eventIdMustExist));
|
|
41
|
+
if (!eventIdsMatched) {
|
|
42
|
+
throw new factory.errors.Argument('id', `referencesOrder.orderedItem not matched. ${paymentMethodId}`);
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { IAuthorizeEventServiceOffer, IAuthorizeMoneyTransferOffer, IAuthorizePaymentAction, IAuthorizeProductOffer } from './factory';
|
|
2
|
+
declare function validatePrice(authorizePaymentActions: IAuthorizePaymentAction[], authorizeEventServiceOfferActions: Pick<IAuthorizeEventServiceOffer, 'id' | 'result'>[], authorizeProductOfferActions: Pick<IAuthorizeProductOffer, 'id' | 'result'>[], authorizeMoneyTansferActions: Pick<IAuthorizeMoneyTransferOffer, 'id' | 'result'>[]): void;
|
|
3
|
+
export { validatePrice };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.validatePrice = validatePrice;
|
|
4
|
+
const factory = require("../../../../../factory");
|
|
5
|
+
function validatePrice(authorizePaymentActions, authorizeEventServiceOfferActions, authorizeProductOfferActions, authorizeMoneyTansferActions) {
|
|
6
|
+
let priceByAgent = 0;
|
|
7
|
+
let priceBySeller = 0;
|
|
8
|
+
// 決済承認を確認
|
|
9
|
+
authorizePaymentActions.forEach(({ result }) => {
|
|
10
|
+
var _a;
|
|
11
|
+
const resultAsInvoice = (Array.isArray(result))
|
|
12
|
+
// ? result.find(({ typeOf }) => typeOf === factory.action.authorize.paymentMethod.any.ResultType.Payment)
|
|
13
|
+
? result[0]
|
|
14
|
+
: undefined;
|
|
15
|
+
const jpyAmount = (((_a = resultAsInvoice === null || resultAsInvoice === void 0 ? void 0 : resultAsInvoice.totalPaymentDue) === null || _a === void 0 ? void 0 : _a.currency) === factory.priceCurrency.JPY)
|
|
16
|
+
? resultAsInvoice.totalPaymentDue.value
|
|
17
|
+
: 0;
|
|
18
|
+
priceByAgent += jpyAmount;
|
|
19
|
+
});
|
|
20
|
+
// 販売者が提供するアイテムの発生金額
|
|
21
|
+
[
|
|
22
|
+
...authorizeEventServiceOfferActions,
|
|
23
|
+
...authorizeProductOfferActions,
|
|
24
|
+
...authorizeMoneyTansferActions
|
|
25
|
+
].forEach(({ id, result }) => {
|
|
26
|
+
const priceByAction = result === null || result === void 0 ? void 0 : result.price;
|
|
27
|
+
if (typeof priceByAction === 'number' && priceByAction >= 0) {
|
|
28
|
+
priceBySeller += priceByAction;
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
// price未確定(オファー未指定)のオファー承認アクションが存在すれば確定不可能(2023-11-27~)
|
|
32
|
+
throw new factory.errors.Argument('id', `some actions with no offer specified. [${id}]`);
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
if (priceByAgent !== priceBySeller) {
|
|
36
|
+
throw new factory.errors.Argument('id', `prices are not matched. [${priceByAgent},${priceBySeller}]`);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -1,13 +1,7 @@
|
|
|
1
1
|
import * as factory from '../../../../factory';
|
|
2
2
|
import { placeOrder as PlaceOrderFactory } from '../../../../factory/transaction';
|
|
3
|
-
|
|
4
|
-
export
|
|
5
|
-
export type IAuthorizeProductOffer = factory.action.authorize.offer.product.IAction;
|
|
6
|
-
export type IAuthorizeMoneyTransferOffer = factory.action.authorize.offer.moneyTransfer.IAction;
|
|
7
|
-
export type IAuthorizePaymentAction = Pick<factory.action.authorize.paymentMethod.any.IAction, 'id' | 'result' | 'endDate' | 'instrument'> & {
|
|
8
|
-
object: Pick<factory.action.authorize.paymentMethod.any.IObject, 'typeOf'>;
|
|
9
|
-
};
|
|
10
|
-
export type IPayTransaction = Pick<factory.assetTransaction.pay.ITransaction, 'object'>;
|
|
3
|
+
import { IAcceptPayAction, IAuthorizeEventServiceOffer, IAuthorizeMoneyTransferOffer, IAuthorizePaymentAction, IAuthorizeProductOffer, IPayTransaction } from './validation/factory';
|
|
4
|
+
export { IAcceptPayAction, IAuthorizeEventServiceOffer, IAuthorizeMoneyTransferOffer, IAuthorizePaymentAction, IAuthorizeProductOffer, IPayTransaction };
|
|
11
5
|
/**
|
|
12
6
|
* 取引が確定可能な状態かどうかをチェックする
|
|
13
7
|
*/
|
|
@@ -11,7 +11,9 @@ exports.validateEventOffers = validateEventOffers;
|
|
|
11
11
|
const createDebug = require("debug");
|
|
12
12
|
const util_1 = require("util");
|
|
13
13
|
const factory = require("../../../../factory");
|
|
14
|
+
const validateInvoiceReferencesOrder_1 = require("./validation/validateInvoiceReferencesOrder");
|
|
14
15
|
const validateMovieTicket_1 = require("./validation/validateMovieTicket");
|
|
16
|
+
const validatePrice_1 = require("./validation/validatePrice");
|
|
15
17
|
const debug = createDebug('chevre-domain:service:transaction');
|
|
16
18
|
/**
|
|
17
19
|
* 取引が確定可能な状態かどうかをチェックする
|
|
@@ -19,7 +21,9 @@ const debug = createDebug('chevre-domain:service:transaction');
|
|
|
19
21
|
function validateTransaction(transaction, acceptPayActions, authorizePaymentActions, authorizeEventServiceOfferActions, authorizeMoneyTansferActions, authorizeProductOfferActions, eventReservationAcceptedOffers, payTransactions, customer) {
|
|
20
22
|
// validateProfile(transaction);
|
|
21
23
|
validateProfile({ customer });
|
|
22
|
-
validatePrice(authorizePaymentActions, authorizeEventServiceOfferActions, authorizeProductOfferActions, authorizeMoneyTansferActions);
|
|
24
|
+
(0, validatePrice_1.validatePrice)(authorizePaymentActions, authorizeEventServiceOfferActions, authorizeProductOfferActions, authorizeMoneyTansferActions);
|
|
25
|
+
// 請求のreferencesOrder検証(2025-11-23~)
|
|
26
|
+
(0, validateInvoiceReferencesOrder_1.validateInvoiceReferencesOrder)(authorizePaymentActions, eventReservationAcceptedOffers);
|
|
23
27
|
// 利用可能な通貨単位に対して取引検証
|
|
24
28
|
validateMonetaryAmount(authorizePaymentActions, authorizeEventServiceOfferActions);
|
|
25
29
|
// 利用可能なMovieTicketIF決済方法タイプに対して動的にコーディング
|
|
@@ -119,40 +123,6 @@ function validateProfile(params) {
|
|
|
119
123
|
throw new factory.errors.Argument('Transaction', 'customer name required');
|
|
120
124
|
}
|
|
121
125
|
}
|
|
122
|
-
function validatePrice(authorizePaymentActions, authorizeEventServiceOfferActions, authorizeProductOfferActions, authorizeMoneyTansferActions) {
|
|
123
|
-
let priceByAgent = 0;
|
|
124
|
-
let priceBySeller = 0;
|
|
125
|
-
// 決済承認を確認
|
|
126
|
-
authorizePaymentActions.forEach(({ result }) => {
|
|
127
|
-
var _a;
|
|
128
|
-
const resultAsInvoice = (Array.isArray(result))
|
|
129
|
-
// ? result.find(({ typeOf }) => typeOf === factory.action.authorize.paymentMethod.any.ResultType.Payment)
|
|
130
|
-
? result[0]
|
|
131
|
-
: undefined;
|
|
132
|
-
const jpyAmount = (((_a = resultAsInvoice === null || resultAsInvoice === void 0 ? void 0 : resultAsInvoice.totalPaymentDue) === null || _a === void 0 ? void 0 : _a.currency) === factory.priceCurrency.JPY)
|
|
133
|
-
? resultAsInvoice.totalPaymentDue.value
|
|
134
|
-
: 0;
|
|
135
|
-
priceByAgent += jpyAmount;
|
|
136
|
-
});
|
|
137
|
-
// 販売者が提供するアイテムの発生金額
|
|
138
|
-
[
|
|
139
|
-
...authorizeEventServiceOfferActions,
|
|
140
|
-
...authorizeProductOfferActions,
|
|
141
|
-
...authorizeMoneyTansferActions
|
|
142
|
-
].forEach(({ id, result }) => {
|
|
143
|
-
const priceByAction = result === null || result === void 0 ? void 0 : result.price;
|
|
144
|
-
if (typeof priceByAction === 'number' && priceByAction >= 0) {
|
|
145
|
-
priceBySeller += priceByAction;
|
|
146
|
-
}
|
|
147
|
-
else {
|
|
148
|
-
// price未確定(オファー未指定)のオファー承認アクションが存在すれば確定不可能(2023-11-27~)
|
|
149
|
-
throw new factory.errors.Argument('id', `some actions with no offer specified. [${id}]`);
|
|
150
|
-
}
|
|
151
|
-
});
|
|
152
|
-
if (priceByAgent !== priceBySeller) {
|
|
153
|
-
throw new factory.errors.Argument('id', `prices are not matched. [${priceByAgent},${priceBySeller}]`);
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
126
|
function validatePaymentUrl(transaction, acceptPayActions, authorizePaymentActions) {
|
|
157
127
|
var _a;
|
|
158
128
|
// 決済URLが発行されている場合、検証
|
package/package.json
CHANGED
|
@@ -1,193 +0,0 @@
|
|
|
1
|
-
// tslint:disable:no-console
|
|
2
|
-
import * as mongoose from 'mongoose';
|
|
3
|
-
import { chevre } from '../../../lib/index';
|
|
4
|
-
|
|
5
|
-
const PROJECT_ID = String(process.env.PROJECT_ID);
|
|
6
|
-
|
|
7
|
-
// tslint:disable-next-line:max-func-body-length
|
|
8
|
-
async function main() {
|
|
9
|
-
const now = new Date();
|
|
10
|
-
await mongoose.connect(<string>process.env.MONGOLAB_URI, { autoIndex: false });
|
|
11
|
-
|
|
12
|
-
const eventRepo = await chevre.repository.Event.createInstance(mongoose.connection);
|
|
13
|
-
const result = await eventRepo.upsertManyByAdditionalProperty(
|
|
14
|
-
{
|
|
15
|
-
events: [
|
|
16
|
-
{
|
|
17
|
-
additionalProperty: [
|
|
18
|
-
{
|
|
19
|
-
name: 'sampleCreateId',
|
|
20
|
-
value: 'akeuu512i-202410171410-01'
|
|
21
|
-
}
|
|
22
|
-
],
|
|
23
|
-
project: {
|
|
24
|
-
id: PROJECT_ID,
|
|
25
|
-
typeOf: chevre.factory.organizationType.Project
|
|
26
|
-
},
|
|
27
|
-
typeOf: chevre.factory.eventType.ScreeningEvent,
|
|
28
|
-
doorTime: new Date('2024-10-17T05:30:00.000Z'),
|
|
29
|
-
endDate: new Date('2024-10-17T05:45:00.000Z'),
|
|
30
|
-
eventStatus: chevre.factory.eventStatusType.EventScheduled,
|
|
31
|
-
// eventStatus: chevre.factory.eventStatusType.EventCancelled,
|
|
32
|
-
location: {
|
|
33
|
-
typeOf: chevre.factory.placeType.ScreeningRoom,
|
|
34
|
-
branchCode: '10',
|
|
35
|
-
name: {
|
|
36
|
-
ja: 'シネマ1',
|
|
37
|
-
en: 'CINEMA1'
|
|
38
|
-
},
|
|
39
|
-
address: {
|
|
40
|
-
ja: '7階',
|
|
41
|
-
en: '7F'
|
|
42
|
-
}
|
|
43
|
-
},
|
|
44
|
-
name: {
|
|
45
|
-
en: 'Ocean\'s Eight',
|
|
46
|
-
ja: 'オーシャンズ8'
|
|
47
|
-
},
|
|
48
|
-
offers: {
|
|
49
|
-
typeOf: chevre.factory.offerType.Offer,
|
|
50
|
-
// availabilityEnds: new Date('2024-09-15T11:45:00.000Z'),
|
|
51
|
-
// availabilityStarts: new Date('2024-09-01T15:00:00.000Z'),
|
|
52
|
-
eligibleQuantity: {
|
|
53
|
-
typeOf: 'QuantitativeValue',
|
|
54
|
-
unitCode: chevre.factory.unitCode.C62,
|
|
55
|
-
maxValue: 10
|
|
56
|
-
},
|
|
57
|
-
itemOffered: {
|
|
58
|
-
id: '6603a61f0c914b6c7fd18f99',
|
|
59
|
-
name: {
|
|
60
|
-
ja: 'アップロードテスト用(ムビチケあり)'
|
|
61
|
-
},
|
|
62
|
-
serviceOutput: {
|
|
63
|
-
typeOf: chevre.factory.reservationType.EventReservation,
|
|
64
|
-
reservedTicket: {
|
|
65
|
-
typeOf: 'Ticket',
|
|
66
|
-
ticketedSeat: {
|
|
67
|
-
typeOf: chevre.factory.placeType.Seat
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
},
|
|
71
|
-
typeOf: chevre.factory.product.ProductType.EventService,
|
|
72
|
-
availableChannel: {
|
|
73
|
-
typeOf: 'ServiceChannel',
|
|
74
|
-
serviceLocation: {
|
|
75
|
-
typeOf: chevre.factory.placeType.ScreeningRoom,
|
|
76
|
-
branchCode: '10',
|
|
77
|
-
name: {
|
|
78
|
-
ja: 'シネマ1',
|
|
79
|
-
en: 'CINEMA1'
|
|
80
|
-
},
|
|
81
|
-
containedInPlace: {
|
|
82
|
-
typeOf: chevre.factory.placeType.MovieTheater,
|
|
83
|
-
id: '5bfb841d5a78d7948369979a',
|
|
84
|
-
branchCode: '118',
|
|
85
|
-
name: {
|
|
86
|
-
ja: 'シネモーション赤坂 ',
|
|
87
|
-
en: 'CineMotion Akasaka'
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
},
|
|
92
|
-
serviceType: {
|
|
93
|
-
codeValue: '0001',
|
|
94
|
-
id: '64caf203c73a205ccefe80c5',
|
|
95
|
-
inCodeSet: {
|
|
96
|
-
typeOf: 'CategoryCodeSet',
|
|
97
|
-
identifier: chevre.factory.categoryCode.CategorySetIdentifier.ServiceType
|
|
98
|
-
},
|
|
99
|
-
typeOf: 'CategoryCode'
|
|
100
|
-
}
|
|
101
|
-
},
|
|
102
|
-
// validFrom: new Date('2024-09-01T15:00:00.000Z'),
|
|
103
|
-
// validThrough: new Date('2024-09-15T11:45:00.000Z'),
|
|
104
|
-
seller: {
|
|
105
|
-
typeOf: chevre.factory.organizationType.Corporation,
|
|
106
|
-
id: '59d20831e53ebc2b4e774466',
|
|
107
|
-
name: {
|
|
108
|
-
ja: 'シネモーション赤坂',
|
|
109
|
-
en: 'CineMotion Akasaka'
|
|
110
|
-
},
|
|
111
|
-
makesOffer: [
|
|
112
|
-
{
|
|
113
|
-
typeOf: chevre.factory.offerType.Offer,
|
|
114
|
-
availableAtOrFrom: { id: '51qbjcfr72h62m06vtv5kkhgje' },
|
|
115
|
-
availabilityEnds: now,
|
|
116
|
-
availabilityStarts: now,
|
|
117
|
-
validFrom: now,
|
|
118
|
-
validThrough: now
|
|
119
|
-
}
|
|
120
|
-
]
|
|
121
|
-
},
|
|
122
|
-
unacceptedPaymentMethod: [
|
|
123
|
-
'MovieTicket'
|
|
124
|
-
]
|
|
125
|
-
},
|
|
126
|
-
organizer: {
|
|
127
|
-
id: '59d20831e53ebc2b4e774466'
|
|
128
|
-
},
|
|
129
|
-
startDate: new Date('2024-10-17T05:30:00.000Z'),
|
|
130
|
-
superEvent: {
|
|
131
|
-
typeOf: chevre.factory.eventType.ScreeningEventSeries,
|
|
132
|
-
id: 'akeuu512i',
|
|
133
|
-
videoFormat: [
|
|
134
|
-
{
|
|
135
|
-
typeOf: '2D',
|
|
136
|
-
name: '2D'
|
|
137
|
-
}
|
|
138
|
-
],
|
|
139
|
-
soundFormat: [],
|
|
140
|
-
workPerformed: {
|
|
141
|
-
typeOf: chevre.factory.creativeWorkType.Movie,
|
|
142
|
-
identifier: '00002',
|
|
143
|
-
id: '5bfb841d5a78d79483699803',
|
|
144
|
-
name: {
|
|
145
|
-
en: 'Ocean\'s Eight',
|
|
146
|
-
ja: 'オーシャンズ8'
|
|
147
|
-
},
|
|
148
|
-
duration: 'PT1H50M'
|
|
149
|
-
},
|
|
150
|
-
location: {
|
|
151
|
-
typeOf: chevre.factory.placeType.MovieTheater,
|
|
152
|
-
id: '5bfb841d5a78d7948369979a',
|
|
153
|
-
branchCode: '118',
|
|
154
|
-
name: {
|
|
155
|
-
ja: 'シネモーション赤坂 ',
|
|
156
|
-
en: 'CineMotion Akasaka'
|
|
157
|
-
}
|
|
158
|
-
},
|
|
159
|
-
kanaName: '',
|
|
160
|
-
name: {
|
|
161
|
-
en: 'Ocean\'s Eight',
|
|
162
|
-
ja: 'オーシャンズ8'
|
|
163
|
-
},
|
|
164
|
-
additionalProperty: [],
|
|
165
|
-
startDate: new Date('2020-08-31T15:00:00.000Z'),
|
|
166
|
-
endDate: new Date('2030-01-01T15:00:00.000Z'),
|
|
167
|
-
description: {
|
|
168
|
-
en: '2018 United States crime movie.',
|
|
169
|
-
ja: '2018年のアメリカ合衆国の犯罪映画。'
|
|
170
|
-
},
|
|
171
|
-
headline: {
|
|
172
|
-
ja: '2018/12/14'
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
],
|
|
177
|
-
additionalPropertyFilter: { name: 'sampleCreateId' },
|
|
178
|
-
eventSeries: {
|
|
179
|
-
id: 'akeuu512i'
|
|
180
|
-
},
|
|
181
|
-
screeningRoom: {
|
|
182
|
-
branchCode: '10'
|
|
183
|
-
}
|
|
184
|
-
},
|
|
185
|
-
{ update: false }
|
|
186
|
-
);
|
|
187
|
-
// tslint:disable-next-line:no-null-keyword
|
|
188
|
-
console.dir(result, { depth: null });
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
main()
|
|
192
|
-
.then(console.log)
|
|
193
|
-
.catch(console.error);
|