@chevre/domain 23.1.0-alpha.8 → 23.1.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/example/src/chevre/{eventOffer/adminEventOffers.ts → acceptedPaymentMethodOffer/adminAcceptedPaymentMethodOffers.ts} +12 -11
- package/example/src/chevre/actions/checkAcceptPayActions.ts +60 -0
- package/example/src/chevre/assetTransaction/checkPayTransactionsTicketToken.ts +67 -0
- package/example/src/chevre/assetTransaction/processReserve.ts +7 -3
- package/example/src/chevre/authorizeEventServiceOffer.ts +6 -5
- package/example/src/chevre/eventSeries/migrateEventSeriesUnacceptedPaymentMethod.ts +93 -0
- package/example/src/chevre/importEventsFromCOA.ts +5 -5
- package/example/src/chevre/member/migrateMemberIdentifier.ts +20 -15
- package/example/src/chevre/pendingReservation/findEventSeatOffersBySection.ts +46 -0
- package/example/src/chevre/place/checkSectionCount.ts +27 -0
- package/example/src/chevre/place/findSectionsByRoom.ts +50 -0
- package/example/src/chevre/project/unsetProjectSettings.ts +73 -0
- package/example/src/chevre/reIndex.ts +1 -2
- package/example/src/chevre/roles/{addAdminSellerEventIfNotExists.ts → addAdminSellerEventOfferIfNotExists.ts} +1 -1
- package/example/src/chevre/stockHolder/findSeatsBySection.ts +59 -0
- package/example/src/chevre/stockHolder/searchSeats.ts +2 -2
- package/lib/chevre/repo/acceptedPaymentMethod.d.ts +41 -0
- package/lib/chevre/repo/acceptedPaymentMethod.js +180 -0
- package/lib/chevre/repo/authorization.d.ts +3 -2
- package/lib/chevre/repo/authorization.js +13 -5
- package/lib/chevre/repo/event.d.ts +1 -35
- package/lib/chevre/repo/event.js +2 -102
- package/lib/chevre/repo/eventOffer.js +3 -3
- package/lib/chevre/repo/mongoose/schemas/acceptedPaymentMethod.d.ts +10 -0
- package/lib/chevre/repo/mongoose/schemas/acceptedPaymentMethod.js +97 -0
- package/lib/chevre/repo/mongoose/schemas/eventOffer.js +48 -35
- package/lib/chevre/repo/mongoose/schemas/member.js +10 -0
- package/lib/chevre/repo/note.js +4 -2
- package/lib/chevre/repo/pendingReservation.js +28 -71
- package/lib/chevre/repo/place/seat.d.ts +24 -0
- package/lib/chevre/repo/place/seat.js +103 -21
- package/lib/chevre/repo/place/section.d.ts +20 -0
- package/lib/chevre/repo/place/section.js +47 -0
- package/lib/chevre/repo/ticket.d.ts +7 -1
- package/lib/chevre/repo/ticket.js +14 -1
- package/lib/chevre/repository.d.ts +5 -0
- package/lib/chevre/repository.js +15 -2
- package/lib/chevre/service/assetTransaction/pay/factory.d.ts +1 -1
- package/lib/chevre/service/assetTransaction/pay/factory.js +8 -3
- package/lib/chevre/service/assetTransaction/pay/validateAcceptedPaymentMethodIfNeeded.d.ts +16 -0
- package/lib/chevre/service/assetTransaction/pay/validateAcceptedPaymentMethodIfNeeded.js +94 -0
- package/lib/chevre/service/assetTransaction/pay.d.ts +6 -1
- package/lib/chevre/service/assetTransaction/pay.js +6 -1
- package/lib/chevre/service/assetTransaction/reserve/start.d.ts +4 -0
- package/lib/chevre/service/assetTransaction/reserve/start.js +4 -1
- package/lib/chevre/service/assetTransaction/reserve/validateStartRequest/fixExtendedEventOffer.d.ts +2 -2
- package/lib/chevre/service/assetTransaction/reserve/validateStartRequest/fixExtendedEventOffer.js +8 -8
- package/lib/chevre/service/assetTransaction/reserve/validateStartRequest/validateIssuedOfferIfExists.d.ts +7 -2
- package/lib/chevre/service/assetTransaction/reserve/validateStartRequest/validateIssuedOfferIfExists.js +32 -32
- package/lib/chevre/service/assetTransaction/reserve/validateStartRequest/validateMemberTierIfExists.d.ts +1 -1
- package/lib/chevre/service/assetTransaction/reserve/validateStartRequest/validateMemberTierIfExists.js +10 -54
- package/lib/chevre/service/assetTransaction/reserve/validateStartRequest/verifyTicketTokenAsNeeded.d.ts +23 -0
- package/lib/chevre/service/assetTransaction/reserve/validateStartRequest/verifyTicketTokenAsNeeded.js +62 -0
- package/lib/chevre/service/assetTransaction/reserve/validateStartRequest.d.ts +34 -1
- package/lib/chevre/service/assetTransaction/reserve/validateStartRequest.js +21 -9
- package/lib/chevre/service/offer/event/authorize/factory.d.ts +0 -4
- package/lib/chevre/service/offer/event/authorize/factory.js +2 -5
- package/lib/chevre/service/offer/event/authorize/processStartReserve4chevre/requestedProgramMembershipUsed2permit.js +1 -1
- package/lib/chevre/service/offer/event/authorize/processStartReserve4chevre.d.ts +1 -0
- package/lib/chevre/service/offer/event/authorize/processStartReserve4chevre.js +2 -7
- package/lib/chevre/service/offer/event/authorize.d.ts +1 -0
- package/lib/chevre/service/offer/event/authorize.js +7 -7
- package/lib/chevre/service/offer/event/issueEventOfferTicket.d.ts +48 -0
- package/lib/chevre/service/offer/event/issueEventOfferTicket.js +123 -0
- package/lib/chevre/service/offer/event.d.ts +2 -1
- package/lib/chevre/service/offer/event.js +3 -1
- package/lib/chevre/service/offer.d.ts +31 -1
- package/lib/chevre/service/offer.js +104 -34
- package/lib/chevre/service/payment/any/authorize/fixTransactionNumber.d.ts +9 -0
- package/lib/chevre/service/payment/any/authorize/fixTransactionNumber.js +22 -11
- package/lib/chevre/service/payment/any/authorize/handlePrePublishedPaymentMethodIdOnAuthorizing.d.ts +19 -2
- package/lib/chevre/service/payment/any/authorize/handlePrePublishedPaymentMethodIdOnAuthorizing.js +87 -9
- package/lib/chevre/service/payment/any/factory.d.ts +20 -3
- package/lib/chevre/service/payment/any/factory.js +26 -6
- package/lib/chevre/service/payment/any/publishPaymentUrl/fixTransactionNumberOnPublishPaymentUrl.d.ts +4 -0
- package/lib/chevre/service/payment/any/publishPaymentUrl/fixTransactionNumberOnPublishPaymentUrl.js +15 -11
- package/lib/chevre/service/payment/any/verifyTicketTokenAsNeeded.d.ts +6 -3
- package/lib/chevre/service/payment/any/verifyTicketTokenAsNeeded.js +8 -22
- package/lib/chevre/service/payment/any.d.ts +5 -1
- package/lib/chevre/service/payment/any.js +22 -13
- package/lib/chevre/service/payment/factory.js +0 -5
- package/lib/chevre/service/payment/movieTicket/authorize.js +0 -5
- package/lib/chevre/service/task/authorizePayment.js +2 -0
- package/lib/chevre/service/task/publishPaymentUrl.js +4 -0
- package/lib/chevre/service/transaction/placeOrder/confirm/publishCode.js +1 -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 +3 -3
- package/example/src/chevre/checkReplaceActions.ts +0 -65
- package/example/src/chevre/upsertManyEventsByAdditionalProperty.ts +0 -193
- package/lib/chevre/service/code.d.ts +0 -8
- package/lib/chevre/service/code.js +0 -7
|
@@ -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);
|