@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.
Files changed (98) hide show
  1. package/example/src/chevre/{eventOffer/adminEventOffers.ts → acceptedPaymentMethodOffer/adminAcceptedPaymentMethodOffers.ts} +12 -11
  2. package/example/src/chevre/actions/checkAcceptPayActions.ts +60 -0
  3. package/example/src/chevre/assetTransaction/checkPayTransactionsTicketToken.ts +67 -0
  4. package/example/src/chevre/assetTransaction/processReserve.ts +7 -3
  5. package/example/src/chevre/authorizeEventServiceOffer.ts +6 -5
  6. package/example/src/chevre/eventSeries/migrateEventSeriesUnacceptedPaymentMethod.ts +93 -0
  7. package/example/src/chevre/importEventsFromCOA.ts +5 -5
  8. package/example/src/chevre/member/migrateMemberIdentifier.ts +20 -15
  9. package/example/src/chevre/pendingReservation/findEventSeatOffersBySection.ts +46 -0
  10. package/example/src/chevre/place/checkSectionCount.ts +27 -0
  11. package/example/src/chevre/place/findSectionsByRoom.ts +50 -0
  12. package/example/src/chevre/project/unsetProjectSettings.ts +73 -0
  13. package/example/src/chevre/reIndex.ts +1 -2
  14. package/example/src/chevre/roles/{addAdminSellerEventIfNotExists.ts → addAdminSellerEventOfferIfNotExists.ts} +1 -1
  15. package/example/src/chevre/stockHolder/findSeatsBySection.ts +59 -0
  16. package/example/src/chevre/stockHolder/searchSeats.ts +2 -2
  17. package/lib/chevre/repo/acceptedPaymentMethod.d.ts +41 -0
  18. package/lib/chevre/repo/acceptedPaymentMethod.js +180 -0
  19. package/lib/chevre/repo/authorization.d.ts +3 -2
  20. package/lib/chevre/repo/authorization.js +13 -5
  21. package/lib/chevre/repo/event.d.ts +1 -35
  22. package/lib/chevre/repo/event.js +2 -102
  23. package/lib/chevre/repo/eventOffer.js +3 -3
  24. package/lib/chevre/repo/mongoose/schemas/acceptedPaymentMethod.d.ts +10 -0
  25. package/lib/chevre/repo/mongoose/schemas/acceptedPaymentMethod.js +97 -0
  26. package/lib/chevre/repo/mongoose/schemas/eventOffer.js +48 -35
  27. package/lib/chevre/repo/mongoose/schemas/member.js +10 -0
  28. package/lib/chevre/repo/note.js +4 -2
  29. package/lib/chevre/repo/pendingReservation.js +28 -71
  30. package/lib/chevre/repo/place/seat.d.ts +24 -0
  31. package/lib/chevre/repo/place/seat.js +103 -21
  32. package/lib/chevre/repo/place/section.d.ts +20 -0
  33. package/lib/chevre/repo/place/section.js +47 -0
  34. package/lib/chevre/repo/ticket.d.ts +7 -1
  35. package/lib/chevre/repo/ticket.js +14 -1
  36. package/lib/chevre/repository.d.ts +5 -0
  37. package/lib/chevre/repository.js +15 -2
  38. package/lib/chevre/service/assetTransaction/pay/factory.d.ts +1 -1
  39. package/lib/chevre/service/assetTransaction/pay/factory.js +8 -3
  40. package/lib/chevre/service/assetTransaction/pay/validateAcceptedPaymentMethodIfNeeded.d.ts +16 -0
  41. package/lib/chevre/service/assetTransaction/pay/validateAcceptedPaymentMethodIfNeeded.js +94 -0
  42. package/lib/chevre/service/assetTransaction/pay.d.ts +6 -1
  43. package/lib/chevre/service/assetTransaction/pay.js +6 -1
  44. package/lib/chevre/service/assetTransaction/reserve/start.d.ts +4 -0
  45. package/lib/chevre/service/assetTransaction/reserve/start.js +4 -1
  46. package/lib/chevre/service/assetTransaction/reserve/validateStartRequest/fixExtendedEventOffer.d.ts +2 -2
  47. package/lib/chevre/service/assetTransaction/reserve/validateStartRequest/fixExtendedEventOffer.js +8 -8
  48. package/lib/chevre/service/assetTransaction/reserve/validateStartRequest/validateIssuedOfferIfExists.d.ts +7 -2
  49. package/lib/chevre/service/assetTransaction/reserve/validateStartRequest/validateIssuedOfferIfExists.js +32 -32
  50. package/lib/chevre/service/assetTransaction/reserve/validateStartRequest/validateMemberTierIfExists.d.ts +1 -1
  51. package/lib/chevre/service/assetTransaction/reserve/validateStartRequest/validateMemberTierIfExists.js +10 -54
  52. package/lib/chevre/service/assetTransaction/reserve/validateStartRequest/verifyTicketTokenAsNeeded.d.ts +23 -0
  53. package/lib/chevre/service/assetTransaction/reserve/validateStartRequest/verifyTicketTokenAsNeeded.js +62 -0
  54. package/lib/chevre/service/assetTransaction/reserve/validateStartRequest.d.ts +34 -1
  55. package/lib/chevre/service/assetTransaction/reserve/validateStartRequest.js +21 -9
  56. package/lib/chevre/service/offer/event/authorize/factory.d.ts +0 -4
  57. package/lib/chevre/service/offer/event/authorize/factory.js +2 -5
  58. package/lib/chevre/service/offer/event/authorize/processStartReserve4chevre/requestedProgramMembershipUsed2permit.js +1 -1
  59. package/lib/chevre/service/offer/event/authorize/processStartReserve4chevre.d.ts +1 -0
  60. package/lib/chevre/service/offer/event/authorize/processStartReserve4chevre.js +2 -7
  61. package/lib/chevre/service/offer/event/authorize.d.ts +1 -0
  62. package/lib/chevre/service/offer/event/authorize.js +7 -7
  63. package/lib/chevre/service/offer/event/issueEventOfferTicket.d.ts +48 -0
  64. package/lib/chevre/service/offer/event/issueEventOfferTicket.js +123 -0
  65. package/lib/chevre/service/offer/event.d.ts +2 -1
  66. package/lib/chevre/service/offer/event.js +3 -1
  67. package/lib/chevre/service/offer.d.ts +31 -1
  68. package/lib/chevre/service/offer.js +104 -34
  69. package/lib/chevre/service/payment/any/authorize/fixTransactionNumber.d.ts +9 -0
  70. package/lib/chevre/service/payment/any/authorize/fixTransactionNumber.js +22 -11
  71. package/lib/chevre/service/payment/any/authorize/handlePrePublishedPaymentMethodIdOnAuthorizing.d.ts +19 -2
  72. package/lib/chevre/service/payment/any/authorize/handlePrePublishedPaymentMethodIdOnAuthorizing.js +87 -9
  73. package/lib/chevre/service/payment/any/factory.d.ts +20 -3
  74. package/lib/chevre/service/payment/any/factory.js +26 -6
  75. package/lib/chevre/service/payment/any/publishPaymentUrl/fixTransactionNumberOnPublishPaymentUrl.d.ts +4 -0
  76. package/lib/chevre/service/payment/any/publishPaymentUrl/fixTransactionNumberOnPublishPaymentUrl.js +15 -11
  77. package/lib/chevre/service/payment/any/verifyTicketTokenAsNeeded.d.ts +6 -3
  78. package/lib/chevre/service/payment/any/verifyTicketTokenAsNeeded.js +8 -22
  79. package/lib/chevre/service/payment/any.d.ts +5 -1
  80. package/lib/chevre/service/payment/any.js +22 -13
  81. package/lib/chevre/service/payment/factory.js +0 -5
  82. package/lib/chevre/service/payment/movieTicket/authorize.js +0 -5
  83. package/lib/chevre/service/task/authorizePayment.js +2 -0
  84. package/lib/chevre/service/task/publishPaymentUrl.js +4 -0
  85. package/lib/chevre/service/transaction/placeOrder/confirm/publishCode.js +1 -1
  86. package/lib/chevre/service/transaction/placeOrder/confirm/validation/factory.d.ts +9 -0
  87. package/lib/chevre/service/transaction/placeOrder/confirm/validation/factory.js +2 -0
  88. package/lib/chevre/service/transaction/placeOrder/confirm/validation/validateInvoiceReferencesOrder.d.ts +8 -0
  89. package/lib/chevre/service/transaction/placeOrder/confirm/validation/validateInvoiceReferencesOrder.js +45 -0
  90. package/lib/chevre/service/transaction/placeOrder/confirm/validation/validatePrice.d.ts +3 -0
  91. package/lib/chevre/service/transaction/placeOrder/confirm/validation/validatePrice.js +38 -0
  92. package/lib/chevre/service/transaction/placeOrder/confirm/validation.d.ts +2 -8
  93. package/lib/chevre/service/transaction/placeOrder/confirm/validation.js +5 -35
  94. package/package.json +3 -3
  95. package/example/src/chevre/checkReplaceActions.ts +0 -65
  96. package/example/src/chevre/upsertManyEventsByAdditionalProperty.ts +0 -193
  97. package/lib/chevre/service/code.d.ts +0 -8
  98. 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);
@@ -1,8 +0,0 @@
1
- /**
2
- * 承認サービス
3
- * ひとまず不要なので廃止(2025-07-18~)
4
- */
5
- /**
6
- * コードをトークンに変換する
7
- */
8
- export {};
@@ -1,7 +0,0 @@
1
- "use strict";
2
- /**
3
- * 承認サービス
4
- * ひとまず不要なので廃止(2025-07-18~)
5
- */
6
- // import * as jwt from 'jsonwebtoken';
7
- Object.defineProperty(exports, "__esModule", { value: true });