@chevre/domain 21.13.0-alpha.7 → 21.13.0-alpha.8

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.
Files changed (38) hide show
  1. package/lib/chevre/service/event.d.ts +1 -0
  2. package/lib/chevre/service/event.js +7 -3
  3. package/lib/chevre/settings.d.ts +0 -1
  4. package/lib/chevre/settings.js +1 -5
  5. package/package.json +2 -2
  6. package/example/src/chevre/assetTransaction/searchGMOTrade.ts +0 -27
  7. package/example/src/chevre/countDelayedTasks.ts +0 -22
  8. package/example/src/chevre/countDelayedTransactions.ts +0 -60
  9. package/example/src/chevre/countMoneyTransferTransaction.ts +0 -36
  10. package/example/src/chevre/countOffers.ts +0 -32
  11. package/example/src/chevre/createDeleteTransactionTasks.ts +0 -108
  12. package/example/src/chevre/createDeleteTransactionTasksIfNotExist.ts +0 -98
  13. package/example/src/chevre/createDeleteTransactionTasksOfDeletedPeople.ts +0 -126
  14. package/example/src/chevre/createManyEventsIfNotExist.ts +0 -365
  15. package/example/src/chevre/iam/searchMemberOfIdsByMemberId.ts +0 -31
  16. package/example/src/chevre/iam/searchProjectIdsByMemberId.ts +0 -32
  17. package/example/src/chevre/offer/searchAllByIdsAndOfferCatalogId.ts +0 -34
  18. package/example/src/chevre/offer/searchEventTicketOffers.ts +0 -54
  19. package/example/src/chevre/offer/searchOffersByCatalog.ts +0 -40
  20. package/example/src/chevre/processPay.ts +0 -90
  21. package/example/src/chevre/processRegisterMembership.ts +0 -110
  22. package/example/src/chevre/processRegisterPaymentCard.ts +0 -98
  23. package/example/src/chevre/processReserve.ts +0 -114
  24. package/example/src/chevre/publishConfirmationNumber.ts +0 -27
  25. package/example/src/chevre/publishPermitOwnershipInfoToken.ts +0 -56
  26. package/example/src/chevre/reIndex.ts +0 -25
  27. package/example/src/chevre/redisConfig.ts +0 -32
  28. package/example/src/chevre/saveTasks.ts +0 -41
  29. package/example/src/chevre/searchAbortedTasks.ts +0 -34
  30. package/example/src/chevre/searchAcceptedOfferIds.ts +0 -23
  31. package/example/src/chevre/searchOffersFromAggregateOffer.ts +0 -168
  32. package/example/src/chevre/searchOrdersWithUnwoundOffers.ts +0 -35
  33. package/example/src/chevre/searchReservationNumbersByOrderNumbers.ts +0 -58
  34. package/example/src/chevre/task/executeTasks.ts +0 -26
  35. package/example/src/chevre/unsetContainsInPlaceFromMovieTheater.ts +0 -41
  36. package/example/src/chevre/updateOfferCatalogs.ts +0 -40
  37. package/example/src/chevre/updateTransaction.ts +0 -38
  38. package/example/src/playOnMoment.ts +0 -24
@@ -1,365 +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 ORGANIZER_ID = process.env.ORGANIZER_ID;
9
- if (typeof ORGANIZER_ID !== 'string' || ORGANIZER_ID.length === 0) {
10
- throw new Error('ORGANIZER_ID undefined');
11
- }
12
-
13
- // tslint:disable-next-line:max-func-body-length
14
- async function main() {
15
- await mongoose.connect(<string>process.env.MONGOLAB_URI);
16
-
17
- const eventRepo = new chevre.repository.Event(mongoose.connection);
18
-
19
- const result = await eventRepo.createManyIfNotExist<chevre.factory.eventType.ScreeningEvent>([
20
- {
21
- attributes: {
22
- organizer: { id: String(ORGANIZER_ID) },
23
- typeOf: chevre.factory.eventType.ScreeningEvent,
24
- project: { id: PROJECT_ID, typeOf: chevre.factory.organizationType.Project },
25
- name: {
26
- en: 'PetPetPetPet',
27
- ja: 'ペット'
28
- },
29
- doorTime: moment('2023-06-27T00:00:00.000Z')
30
- .toDate(),
31
- endDate: moment('2023-06-27T01:00:00.000Z')
32
- .toDate(),
33
- eventStatus: chevre.factory.eventStatusType.EventCancelled,
34
- location: {
35
- typeOf: chevre.factory.placeType.ScreeningRoom,
36
- branchCode: '30',
37
- name: {
38
- ja: 'シネマ3',
39
- en: 'CINEMA3'
40
- },
41
- address: {
42
- ja: '7階',
43
- en: '7F'
44
- }
45
- },
46
- startDate: moment('2023-06-27T00:00:00.000Z')
47
- .toDate(),
48
- superEvent: {
49
- typeOf: chevre.factory.eventType.ScreeningEventSeries,
50
- id: '7k9ayl8hc',
51
- videoFormat: [
52
- {
53
- typeOf: '2D',
54
- name: '2D'
55
- }
56
- ],
57
- soundFormat: [],
58
- workPerformed: {
59
- typeOf: chevre.factory.creativeWorkType.Movie,
60
- identifier: '1622100',
61
- id: '5bfb841d5a78d7948369980a',
62
- name: {
63
- en: 'Pet',
64
- ja: 'ペット'
65
- },
66
- duration: 'PT2H3M'
67
- },
68
- location: {
69
- typeOf: chevre.factory.placeType.MovieTheater,
70
- id: '5bfb841d5a78d7948369979a',
71
- branchCode: '118',
72
- name: {
73
- ja: 'シネモーション赤坂 ',
74
- en: 'CineMotion Akasaka'
75
- },
76
- kanaName: 'シネモーションアカサカ'
77
- },
78
- kanaName: 'ペットカナタイトル',
79
- name: {
80
- en: 'PetPetPetPet',
81
- ja: 'ペット'
82
- },
83
- additionalProperty: [
84
- {
85
- name: 'sortNumber',
86
- value: '99'
87
- }
88
- ],
89
- startDate: moment('2020-03-31T15:00:00.000Z')
90
- .toDate(),
91
- endDate: moment('2034-12-01T15:00:00.000Z')
92
- .toDate(),
93
- description: {
94
- en: 'english description',
95
- ja: 'イベント説明'
96
- },
97
- headline: {
98
- en: 'headlineheadlineheadlineheadlineheadlineheadlineheadline',
99
- ja: 'サブタイトルkanaName'
100
- },
101
- subtitleLanguage: {
102
- typeOf: 'Language',
103
- name: 'Japanese'
104
- }
105
- },
106
- offers: {
107
- typeOf: chevre.factory.offerType.Offer,
108
- availabilityEnds: moment('2023-06-26T14:20:00.000Z')
109
- .toDate(),
110
- availabilityStarts: moment('2023-06-23T15:00:00.000Z')
111
- .toDate(),
112
- eligibleQuantity: {
113
- typeOf: 'QuantitativeValue',
114
- unitCode: chevre.factory.unitCode.C62,
115
- maxValue: 6,
116
- value: 1
117
- },
118
- itemOffered: {
119
- id: '6308580bdef565000a9aa1fd',
120
- name: {
121
- ja: '通常興行カタログ'
122
- },
123
- serviceOutput: {
124
- typeOf: chevre.factory.reservationType.EventReservation,
125
- reservedTicket: {
126
- typeOf: 'Ticket',
127
- ticketedSeat: {
128
- typeOf: chevre.factory.placeType.Seat
129
- }
130
- }
131
- },
132
- typeOf: chevre.factory.product.ProductType.EventService,
133
- availableChannel: {
134
- typeOf: 'ServiceChannel',
135
- serviceLocation: {
136
- typeOf: chevre.factory.placeType.ScreeningRoom,
137
- branchCode: '30',
138
- name: {
139
- ja: 'シネマ3',
140
- en: 'CINEMA3'
141
- },
142
- containedInPlace: {
143
- typeOf: chevre.factory.placeType.MovieTheater,
144
- id: '5bfb841d5a78d7948369979a',
145
- branchCode: '118',
146
- name: {
147
- ja: 'シネモーション赤坂 ',
148
- en: 'CineMotion Akasaka'
149
- }
150
- }
151
- }
152
- },
153
- serviceType: {
154
- codeValue: '0001',
155
- id: '5e3361d01dc1ef1a20dd8737',
156
- inCodeSet: {
157
- typeOf: 'CategoryCodeSet',
158
- identifier: chevre.factory.categoryCode.CategorySetIdentifier.ServiceType
159
- },
160
- typeOf: 'CategoryCode'
161
- }
162
- },
163
- validFrom: moment('2023-06-23T15:00:00.000Z')
164
- .toDate(),
165
- validThrough: moment('2023-06-26T14:20:00.000Z')
166
- .toDate(),
167
- seller: {
168
- typeOf: chevre.factory.organizationType.Corporation,
169
- id: '59d20831e53ebc2b4e774466',
170
- name: {
171
- ja: 'シネモーション赤坂',
172
- en: 'CineMotion Akasaka'
173
- },
174
- makesOffer: [
175
- ]
176
- }
177
- },
178
- maximumAttendeeCapacity: 90,
179
- remainingAttendeeCapacity: 90,
180
- additionalProperty: [{
181
- name: 'eventIdentifier',
182
- value: `bySample2023062701`
183
- }]
184
- },
185
- filter: {
186
- name: 'eventIdentifier'
187
- }
188
- },
189
- {
190
- attributes: {
191
- organizer: { id: String(ORGANIZER_ID) },
192
- typeOf: chevre.factory.eventType.ScreeningEvent,
193
- project: { id: PROJECT_ID, typeOf: chevre.factory.organizationType.Project },
194
- name: {
195
- en: 'PetPetPetPet',
196
- ja: 'ペット'
197
- },
198
- doorTime: moment('2023-06-27T01:00:00.000Z')
199
- .toDate(),
200
- endDate: moment('2023-06-27T02:00:00.000Z')
201
- .toDate(),
202
- eventStatus: chevre.factory.eventStatusType.EventCancelled,
203
- location: {
204
- typeOf: chevre.factory.placeType.ScreeningRoom,
205
- branchCode: '30',
206
- name: {
207
- ja: 'シネマ3',
208
- en: 'CINEMA3'
209
- },
210
- address: {
211
- ja: '7階',
212
- en: '7F'
213
- }
214
- },
215
- startDate: moment('2023-06-27T01:00:00.000Z')
216
- .toDate(),
217
- superEvent: {
218
- typeOf: chevre.factory.eventType.ScreeningEventSeries,
219
- id: '7k9ayl8hc',
220
- videoFormat: [
221
- {
222
- typeOf: '2D',
223
- name: '2D'
224
- }
225
- ],
226
- soundFormat: [],
227
- workPerformed: {
228
- typeOf: chevre.factory.creativeWorkType.Movie,
229
- identifier: '1622100',
230
- id: '5bfb841d5a78d7948369980a',
231
- name: {
232
- en: 'Pet',
233
- ja: 'ペット'
234
- },
235
- duration: 'PT2H3M'
236
- },
237
- location: {
238
- typeOf: chevre.factory.placeType.MovieTheater,
239
- id: '5bfb841d5a78d7948369979a',
240
- branchCode: '118',
241
- name: {
242
- ja: 'シネモーション赤坂 ',
243
- en: 'CineMotion Akasaka'
244
- },
245
- kanaName: 'シネモーションアカサカ'
246
- },
247
- kanaName: 'ペットカナタイトル',
248
- name: {
249
- en: 'PetPetPetPet',
250
- ja: 'ペット'
251
- },
252
- additionalProperty: [
253
- {
254
- name: 'sortNumber',
255
- value: '99'
256
- }
257
- ],
258
- startDate: moment('2020-03-31T15:00:00.000Z')
259
- .toDate(),
260
- endDate: moment('2034-12-01T15:00:00.000Z')
261
- .toDate(),
262
- description: {
263
- en: 'english description',
264
- ja: 'イベント説明'
265
- },
266
- headline: {
267
- en: 'headlineheadlineheadlineheadlineheadlineheadlineheadline',
268
- ja: 'サブタイトルkanaName'
269
- },
270
- subtitleLanguage: {
271
- typeOf: 'Language',
272
- name: 'Japanese'
273
- }
274
- },
275
- offers: {
276
- typeOf: chevre.factory.offerType.Offer,
277
- availabilityEnds: moment('2023-06-26T14:20:00.000Z')
278
- .toDate(),
279
- availabilityStarts: moment('2023-06-23T15:00:00.000Z')
280
- .toDate(),
281
- eligibleQuantity: {
282
- typeOf: 'QuantitativeValue',
283
- unitCode: chevre.factory.unitCode.C62,
284
- maxValue: 6,
285
- value: 1
286
- },
287
- itemOffered: {
288
- id: '6308580bdef565000a9aa1fd',
289
- name: {
290
- ja: '通常興行カタログ'
291
- },
292
- serviceOutput: {
293
- typeOf: chevre.factory.reservationType.EventReservation,
294
- reservedTicket: {
295
- typeOf: 'Ticket',
296
- ticketedSeat: {
297
- typeOf: chevre.factory.placeType.Seat
298
- }
299
- }
300
- },
301
- typeOf: chevre.factory.product.ProductType.EventService,
302
- availableChannel: {
303
- typeOf: 'ServiceChannel',
304
- serviceLocation: {
305
- typeOf: chevre.factory.placeType.ScreeningRoom,
306
- branchCode: '30',
307
- name: {
308
- ja: 'シネマ3',
309
- en: 'CINEMA3'
310
- },
311
- containedInPlace: {
312
- typeOf: chevre.factory.placeType.MovieTheater,
313
- id: '5bfb841d5a78d7948369979a',
314
- branchCode: '118',
315
- name: {
316
- ja: 'シネモーション赤坂 ',
317
- en: 'CineMotion Akasaka'
318
- }
319
- }
320
- }
321
- },
322
- serviceType: {
323
- codeValue: '0001',
324
- id: '5e3361d01dc1ef1a20dd8737',
325
- inCodeSet: {
326
- typeOf: 'CategoryCodeSet',
327
- identifier: chevre.factory.categoryCode.CategorySetIdentifier.ServiceType
328
- },
329
- typeOf: 'CategoryCode'
330
- }
331
- },
332
- validFrom: moment('2023-06-23T15:00:00.000Z')
333
- .toDate(),
334
- validThrough: moment('2023-06-26T14:20:00.000Z')
335
- .toDate(),
336
- seller: {
337
- typeOf: chevre.factory.organizationType.Corporation,
338
- id: '59d20831e53ebc2b4e774466',
339
- name: {
340
- ja: 'シネモーション赤坂',
341
- en: 'CineMotion Akasaka'
342
- },
343
- makesOffer: [
344
- ]
345
- }
346
- },
347
- maximumAttendeeCapacity: 90,
348
- remainingAttendeeCapacity: 90,
349
- additionalProperty: [{
350
- name: 'eventIdentifier',
351
- value: `bySample2023062702`
352
- }]
353
- },
354
- filter: {
355
- name: 'eventIdentifier'
356
- }
357
- }
358
- ]);
359
- console.log('result:', result);
360
-
361
- }
362
-
363
- main()
364
- .then(console.log)
365
- .catch(console.error);
@@ -1,31 +0,0 @@
1
- // tslint:disable:no-console
2
- import * as mongoose from 'mongoose';
3
-
4
- import { chevre } from '../../../../lib/index';
5
-
6
- const PROJECT_ID = String(process.env.PROJECT_ID);
7
- const memberId = String(process.env.MEMBER_ID);
8
-
9
- async function main() {
10
- await mongoose.connect(<string>process.env.MONGOLAB_URI);
11
-
12
- const memberRepo = new chevre.repository.Member(mongoose.connection);
13
-
14
- const ids = await memberRepo.searchMemberOfIdsByMemberId({
15
- member: {
16
- id: memberId,
17
- memberOf: {
18
- // typeOf: chevre.factory.organizationType.Corporation,
19
- typeOf: chevre.factory.organizationType.Project
20
- }
21
- },
22
- project: {
23
- id: PROJECT_ID
24
- }
25
- });
26
- console.log(ids);
27
- }
28
-
29
- main()
30
- .then(console.log)
31
- .catch(console.error);
@@ -1,32 +0,0 @@
1
- // tslint:disable:no-console
2
- import * as mongoose from 'mongoose';
3
-
4
- import { chevre } from '../../../../lib/index';
5
-
6
- // const PROJECT_ID = String(process.env.PROJECT_ID);
7
- const memberId = String(process.env.MEMBER_ID);
8
-
9
- async function main() {
10
- await mongoose.connect(<string>process.env.MONGOLAB_URI, { autoIndex: true });
11
-
12
- const memberRepo = new chevre.repository.Member(mongoose.connection);
13
-
14
- const ids = await memberRepo.searchProjectIdsByMemberId({
15
- member: {
16
- id: memberId
17
- },
18
- project: {
19
- id: {
20
- // $regex: 'c'
21
- }
22
- },
23
- limit: 3,
24
- page: 1
25
-
26
- });
27
- console.log(ids);
28
- }
29
-
30
- main()
31
- .then(console.log)
32
- .catch(console.error);
@@ -1,34 +0,0 @@
1
- // tslint:disable:no-console
2
- // import * as redis from 'redis';
3
- import * as mongoose from 'mongoose';
4
-
5
- import { chevre } from '../../../../lib/index';
6
-
7
- async function main() {
8
- await mongoose.connect(<string>process.env.MONGOLAB_URI, { autoIndex: false });
9
-
10
- const offerRepo = new chevre.repository.Offer(mongoose.connection);
11
-
12
- const offers = await offerRepo.searchAllByIdsAndOfferCatalogId({
13
- ids: ['xx', 'xxx', '1001', '901'],
14
- includedInDataCatalog: {
15
- // id: ['0001'],
16
- // isOfferCatalogItem: false
17
- id: ['6509262f69b07dde13c708eb', '6509262f69b07dde13c708ex', '6508dd91584bb60769914d2b', '651360e04df434b49114e4bb'],
18
- isOfferCatalogItem: true
19
- },
20
- excludeAppliesToMovieTicket: false
21
- });
22
- // console.log(offers);
23
- console.log(offers.map((offer) => {
24
- return `${offer.project?.id} ${offer.identifier} ${offer.priceSpecification?.price} ${offer.name?.ja} ${offer.id} ${offer.offerIndex}`;
25
- }));
26
- console.log(offers.length);
27
- }
28
-
29
- main()
30
- .then(console.log)
31
- .catch((error) => {
32
- console.error(chevre.errorHandler.handleMongoError(error));
33
- console.error(error.name, error.code, error.message);
34
- });
@@ -1,54 +0,0 @@
1
- // tslint:disable:no-console
2
- import * as mongoose from 'mongoose';
3
- import * as redis from 'redis';
4
-
5
- import { chevre } from '../../../../lib/index';
6
-
7
- // const PROJECT_ID = process.env.PROJECT_ID;
8
-
9
- async function main() {
10
- const client = redis.createClient<redis.RedisDefaultModules, Record<string, never>, Record<string, never>>({
11
- socket: {
12
- port: Number(<string>process.env.REDIS_PORT),
13
- host: <string>process.env.REDIS_HOST
14
- },
15
- password: <string>process.env.REDIS_KEY
16
- });
17
- await client.connect();
18
-
19
- await mongoose.connect(<string>process.env.MONGOLAB_URI, { autoIndex: false });
20
-
21
- const eventRepo = new chevre.repository.Event(mongoose.connection);
22
- const priceSpecificationRepo = new chevre.repository.PriceSpecification(mongoose.connection);
23
- const offerRepo = new chevre.repository.Offer(mongoose.connection);
24
- const offerCatalogRepo = new chevre.repository.OfferCatalog(mongoose.connection);
25
- const offerRateLimitRepo = new chevre.repository.rateLimit.Offer(client);
26
- const productRepo = new chevre.repository.Product(mongoose.connection);
27
-
28
- const { ticketOffers } = await chevre.service.offer.event.searchEventTicketOffers({
29
- event: { id: 'ale6qiedq' },
30
- onlyValid: true,
31
- includedInDataCatalog: { id: '' },
32
- priceSpecification: {},
33
- validateOfferRateLimit: true,
34
- addSortIndex: true,
35
- useIncludeInDataCatalog: true,
36
- limit: 100,
37
- page: 1
38
- // ...(typeof availableAtId === 'string') ? { store: { id: availableAtId } } : undefined
39
- })({
40
- event: eventRepo,
41
- offer: offerRepo,
42
- offerCatalog: offerCatalogRepo,
43
- offerRateLimit: offerRateLimitRepo,
44
- priceSpecification: priceSpecificationRepo,
45
- product: productRepo
46
- });
47
- console.log(ticketOffers);
48
- console.log(ticketOffers.map((o) => o.sortIndex));
49
- console.log(ticketOffers.length);
50
- }
51
-
52
- main()
53
- .then(console.log)
54
- .catch(console.error);
@@ -1,40 +0,0 @@
1
- // tslint:disable:no-console
2
- // import * as redis from 'redis';
3
- import * as mongoose from 'mongoose';
4
-
5
- import { chevre } from '../../../../lib/index';
6
-
7
- async function main() {
8
- await mongoose.connect(<string>process.env.MONGOLAB_URI, { autoIndex: false });
9
-
10
- const offerRepo = new chevre.repository.Offer(mongoose.connection);
11
-
12
- const { offers, sortedOfferIds } = await offerRepo.searchByOfferCatalogIdWithSortIndex({
13
- limit: 10,
14
- page: 1,
15
- // ids: ['xx', 'xxx', '1001', '901'],
16
- offerCatalog: {
17
- id: '0001',
18
- isOfferCatalogItem: false
19
- },
20
- excludeAppliesToMovieTicket: false,
21
- useIncludeInDataCatalog: false,
22
- priceSpecification: {
23
- // appliesToMovieTicket: {
24
- // serviceOutput: { typeOf: { $eq: 'SurfRock' } },
25
- // serviceType: { $exists: true }
26
- // }
27
- }
28
- });
29
- // console.log(offers);
30
- console.log(offers.map((offer) => {
31
- const sortIndex = sortedOfferIds.findIndex((s) => s === offer.id);
32
-
33
- return `${offer.project?.id} ${offer.identifier} ${offer.priceSpecification?.price} ${offer.name?.ja} ${offer.id} ${offer.offerIndex} ${sortIndex}`;
34
- }));
35
- console.log(offers.length);
36
- }
37
-
38
- main()
39
- .then(console.log)
40
- .catch(console.error);
@@ -1,90 +0,0 @@
1
- // tslint:disable:no-console
2
- import * as moment from 'moment';
3
- import * as mongoose from 'mongoose';
4
- import * as redis from 'redis';
5
-
6
- import { chevre } from '../../../lib/index';
7
-
8
- const project = { id: String(process.env.PROJECT_ID) };
9
-
10
- // tslint:disable-next-line:max-func-body-length
11
- async function main() {
12
- const client = redis.createClient<redis.RedisDefaultModules, Record<string, never>, Record<string, never>>({
13
- socket: {
14
- port: Number(<string>process.env.REDIS_PORT),
15
- host: <string>process.env.REDIS_HOST
16
- },
17
- password: <string>process.env.REDIS_KEY
18
- });
19
- await client.connect();
20
- await mongoose.connect(<string>process.env.MONGOLAB_URI, { autoIndex: false });
21
-
22
- const accountingReportRepo = new chevre.repository.AccountingReport(mongoose.connection);
23
- const actionRepo = new chevre.repository.Action(mongoose.connection);
24
- const productRepo = new chevre.repository.Product(mongoose.connection);
25
- const projectRepo = new chevre.repository.Project(mongoose.connection);
26
- const sellerRepo = new chevre.repository.Seller(mongoose.connection);
27
- const taskRepo = new chevre.repository.Task(mongoose.connection);
28
- const assetTransactionRepo = new chevre.repository.AssetTransaction(mongoose.connection);
29
- const eventRepo = new chevre.repository.Event(mongoose.connection);
30
- const personRepo = new chevre.repository.Person({ userPoolId: 'xxx' });
31
- const transactionNumberRepo = new chevre.repository.TransactionNumber(client);
32
-
33
- const { transactionNumber } = await transactionNumberRepo.publishByTimestamp({ startDate: new Date() });
34
-
35
- const transaction = await chevre.service.assetTransaction.pay.start(
36
- {
37
- project: { id: project.id, typeOf: chevre.factory.organizationType.Project },
38
- typeOf: chevre.factory.assetTransactionType.Pay,
39
- transactionNumber: transactionNumber,
40
- agent: { typeOf: chevre.factory.personType.Person, name: 'サンプル決済者名称', id: '' },
41
- expires: moment()
42
- .add(1, 'minute')
43
- .toDate(),
44
- object: {
45
- typeOf: chevre.factory.service.paymentService.PaymentServiceType.CreditCard,
46
- id: 'xxx',
47
- paymentMethod: {
48
- amount: 1,
49
- identifier: 'CreditCard',
50
- method: '1',
51
- creditCard: {
52
- memberId: 'xxx',
53
- cardSeq: 91
54
- // cardPass?: string;
55
- }
56
-
57
- }
58
- },
59
- recipient: {
60
- typeOf: chevre.factory.organizationType.Corporation,
61
- id: '5d0abf30ac3fb200198ebb2c',
62
- name: 'xx'
63
- }
64
- },
65
- {
66
- useCheckMovieTicketBeforePay: true,
67
- useCheckByIdentifierIfNotYet: true,
68
- searchTrade4accountId: false
69
- }
70
- )({
71
- accountingReport: accountingReportRepo,
72
- action: actionRepo,
73
- event: eventRepo,
74
- person: personRepo,
75
- product: productRepo,
76
- project: projectRepo,
77
- seller: sellerRepo,
78
- assetTransaction: assetTransactionRepo,
79
- task: taskRepo
80
- });
81
- console.log(transaction);
82
- console.log('transaction started');
83
-
84
- }
85
-
86
- main()
87
- .then(() => {
88
- console.log('success!');
89
- })
90
- .catch(console.error);