@chevre/domain 21.2.0-alpha.106 → 21.2.0-alpha.107

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.
@@ -586,7 +586,10 @@ function createScreeningEventSeriesFromCOA(params) {
586
586
  endDate: endDate,
587
587
  startDate: startDate,
588
588
  coaInfo,
589
- offers: Object.assign({ project: { typeOf: params.project.typeOf, id: params.project.id }, typeOf: factory.offerType.Offer, priceCurrency: factory.priceCurrency.JPY }, (Array.isArray(unacceptedPaymentMethod)) ? { unacceptedPaymentMethod: unacceptedPaymentMethod } : undefined),
589
+ offers: Object.assign({
590
+ // 不要なので廃止(2023-06-09~)
591
+ // project: { typeOf: params.project.typeOf, id: params.project.id },
592
+ typeOf: factory.offerType.Offer, priceCurrency: factory.priceCurrency.JPY }, (Array.isArray(unacceptedPaymentMethod)) ? { unacceptedPaymentMethod: unacceptedPaymentMethod } : undefined),
590
593
  additionalProperty
591
594
  };
592
595
  }
package/package.json CHANGED
@@ -9,8 +9,8 @@
9
9
  }
10
10
  ],
11
11
  "dependencies": {
12
- "@chevre/factory": "4.313.0-alpha.30",
13
- "@cinerino/sdk": "3.157.0-alpha.9",
12
+ "@chevre/factory": "4.313.0-alpha.31",
13
+ "@cinerino/sdk": "3.157.0-alpha.11",
14
14
  "@motionpicture/coa-service": "9.2.0",
15
15
  "@motionpicture/gmo-service": "5.2.0",
16
16
  "@sendgrid/mail": "6.4.0",
@@ -117,5 +117,5 @@
117
117
  "postversion": "git push origin --tags",
118
118
  "prepublishOnly": "npm run clean && npm run build && npm test && npm run doc"
119
119
  },
120
- "version": "21.2.0-alpha.106"
120
+ "version": "21.2.0-alpha.107"
121
121
  }
@@ -1,208 +0,0 @@
1
- // tslint:disable:no-console
2
- import * as moment from 'moment';
3
- import * as mongoose from 'mongoose';
4
-
5
- import { chevre } from '../../../lib/index';
6
-
7
- const PROJECT_ID = String(process.env.PROJECT_ID);
8
- const filterName: string = 'eventIdentifier';
9
-
10
- // tslint:disable-next-line:max-func-body-length
11
- async function main() {
12
- await mongoose.connect(<string>process.env.MONGOLAB_URI);
13
-
14
- const eventRepo = new chevre.repository.Event(mongoose.connection);
15
-
16
- const result = await eventRepo.createManyIfNotExist<chevre.factory.eventType.ScreeningEvent>([
17
- {
18
- attributes: {
19
- additionalProperty: [{
20
- name: filterName,
21
- value: '20230201143000-03'
22
- }],
23
- project: {
24
- id: PROJECT_ID,
25
- typeOf: chevre.factory.organizationType.Project
26
- },
27
- typeOf: chevre.factory.eventType.ScreeningEvent,
28
- doorTime: moment('2023-02-01T05:00:00.000Z')
29
- .toDate(),
30
- startDate: moment('2023-02-01T05:00:00.000Z')
31
- .toDate(),
32
- endDate: moment('2023-02-01T06:00:00.000Z')
33
- .toDate(),
34
- // workPerformed: {
35
- // typeOf: chevre.factory.creativeWorkType.Movie,
36
- // identifier: '1622100',
37
- // id: '5bfb841d5a78d7948369980a',
38
- // name: {
39
- // en: 'Pet',
40
- // ja: 'ペット'
41
- // },
42
- // duration: 'PT2H3M'
43
- // },
44
- location: {
45
- typeOf: chevre.factory.placeType.ScreeningRoom,
46
- branchCode: '10',
47
- name: {
48
- ja: 'シネマ1',
49
- en: 'CINEMA1'
50
- },
51
- address: {
52
- ja: '7階',
53
- en: '7F'
54
- }
55
- },
56
- superEvent: {
57
- typeOf: chevre.factory.eventType.ScreeningEventSeries,
58
- project: {
59
- typeOf: chevre.factory.organizationType.Project,
60
- id: 'cinerino'
61
- },
62
- id: '7k9ayl8hc',
63
- videoFormat: [
64
- {
65
- typeOf: '2D',
66
- name: '2D'
67
- }
68
- ],
69
- soundFormat: [],
70
- workPerformed: {
71
- typeOf: chevre.factory.creativeWorkType.Movie,
72
- identifier: '1622100',
73
- id: '5bfb841d5a78d7948369980a',
74
- name: {
75
- en: 'Pet',
76
- ja: 'ペット'
77
- },
78
- duration: 'PT2H3M'
79
- },
80
- location: {
81
- typeOf: chevre.factory.placeType.MovieTheater,
82
- id: '5bfb841d5a78d7948369979a',
83
- branchCode: '118',
84
- name: {
85
- ja: 'シネモーション赤坂 ',
86
- en: 'CineMotion Akasaka'
87
- },
88
- kanaName: 'シネモーションアカサカ'
89
- },
90
- kanaName: 'ペットカナタイトル',
91
- name: {
92
- en: 'PetPetPetPet',
93
- ja: 'ペット'
94
- },
95
- additionalProperty: [
96
- {
97
- name: 'sortNumber',
98
- value: '99'
99
- }
100
- ],
101
- startDate: moment('2020-03-31T15:00:00.000Z')
102
- .toDate(),
103
- endDate: moment('2034-12-01T15:00:00.000Z')
104
- .toDate(),
105
- description: {
106
- en: 'english description',
107
- ja: 'ムビチケ検証用のイベントです。'
108
- },
109
- headline: {
110
- en: 'headlineheadlineheadlineheadlineheadlineheadlineheadline',
111
- ja: 'サブタイトルkanaName'
112
- },
113
- subtitleLanguage: {
114
- typeOf: 'Language',
115
- name: 'Japanese'
116
- }
117
- },
118
- name: {
119
- en: 'PetPetPetPet',
120
- ja: 'ペット'
121
- },
122
- eventStatus: chevre.factory.eventStatusType.EventScheduled,
123
- offers: {
124
- typeOf: chevre.factory.offerType.Offer,
125
- priceCurrency: chevre.factory.priceCurrency.JPY,
126
- availabilityEnds: moment('2023-02-01T01:20:00.000Z')
127
- .toDate(),
128
- availabilityStarts: moment('2023-01-30T15:00:00.000Z')
129
- .toDate(),
130
- eligibleQuantity: {
131
- typeOf: 'QuantitativeValue',
132
- unitCode: chevre.factory.unitCode.C62,
133
- maxValue: 6,
134
- value: 1
135
- },
136
- itemOffered: {
137
- id: '6308580bdef565000a9aa1fd',
138
- name: {
139
- ja: '通常興行カタログ'
140
- },
141
- serviceOutput: {
142
- typeOf: chevre.factory.reservationType.EventReservation,
143
- reservedTicket: {
144
- typeOf: 'Ticket',
145
- ticketedSeat: {
146
- typeOf: chevre.factory.placeType.Seat
147
- }
148
- }
149
- },
150
- typeOf: chevre.factory.product.ProductType.EventService,
151
- availableChannel: {
152
- typeOf: 'ServiceChannel',
153
- serviceLocation: {
154
- typeOf: chevre.factory.placeType.ScreeningRoom,
155
- branchCode: '10',
156
- name: {
157
- ja: 'シネマ1',
158
- en: 'CINEMA1'
159
- },
160
- containedInPlace: {
161
- typeOf: chevre.factory.placeType.MovieTheater,
162
- id: '5bfb841d5a78d7948369979a',
163
- branchCode: '118',
164
- name: {
165
- ja: 'シネモーション赤坂 ',
166
- en: 'CineMotion Akasaka'
167
- }
168
- }
169
- }
170
- },
171
- serviceType: {
172
- codeValue: '0001',
173
- id: '5e3361d01dc1ef1a20dd8737',
174
- inCodeSet: {
175
- typeOf: 'CategoryCodeSet',
176
- identifier: chevre.factory.categoryCode.CategorySetIdentifier.ServiceType
177
- },
178
- typeOf: 'CategoryCode'
179
- }
180
- },
181
- validFrom: moment('2023-01-29T15:00:00.000Z')
182
- .toDate(),
183
- validThrough: moment('2023-02-01T01:20:00.000Z')
184
- .toDate(),
185
- seller: {
186
- typeOf: chevre.factory.organizationType.Corporation,
187
- id: '59d20831e53ebc2b4e774466',
188
- name: {
189
- ja: 'シネモーション赤坂',
190
- en: 'CineMotion Akasaka'
191
- },
192
- makesOffer: []
193
- }
194
- }
195
- },
196
- filter: { name: filterName }
197
- }
198
- ]);
199
- console.log(result);
200
- console.log('upsertedIds:', (Array.isArray(result?.getUpsertedIds()))
201
- ? result?.getUpsertedIds()
202
- .map((u: any) => u._id)
203
- : []);
204
- }
205
-
206
- main()
207
- .then(console.log)
208
- .catch(console.error);