@chevre/factory 8.1.0 → 8.2.0-alpha.1

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.
@@ -3,11 +3,11 @@ import { ActionType } from '../actionType';
3
3
  import { AssetTransactionType } from '../assetTransactionType';
4
4
  import { IOrder } from '../order';
5
5
  import { IAvailableReservationStatusType } from '../reservation';
6
- import { IReservationForLegacy as IEventReservationFor } from '../reservation/event';
6
+ import { IReservationForMinimized } from '../reservation/event';
7
7
  import { ReservationType } from '../reservationType';
8
8
  import { ITransaction as IPlaceOrder } from '../transaction/placeOrder';
9
9
  export type IAgent = IParticipantAsProject;
10
- export type IReservationFor = Pick<IEventReservationFor, 'id' | 'typeOf'> & {
10
+ export type IReservationFor = Pick<IReservationForMinimized, 'id' | 'typeOf'> & {
11
11
  optimized: boolean;
12
12
  };
13
13
  export interface IObject {
@@ -3,7 +3,7 @@ import { IAgent, ISearchConditions as IBaseSearchConditions, IStartParams as IBa
3
3
  import { ITransaction as IReserveTransaction } from '../assetTransaction/reserve';
4
4
  import { AssetTransactionType } from '../assetTransactionType';
5
5
  import { IExtendId } from '../autoGenerated';
6
- import { IReservation as IEventReservation, IReservationForLegacy as IEventReservationFor } from '../reservation/event';
6
+ import { IReservation as IEventReservation, IReservationForMinimized as IEventReservationFor } from '../reservation/event';
7
7
  import { IReservation as IReservationPackage } from '../reservation/reservationPackage';
8
8
  export { IAgent };
9
9
  export type IStartParamsWithoutDetail = IBaseStartParams<AssetTransactionType.CancelReservation, IAgent, undefined, IObjectWithoutDetail>;
@@ -2,6 +2,9 @@ import { IInstrument as IReserveActionInstrument } from '../action/reserve';
2
2
  import { IAgent, ISearchConditions as IBaseSearchConditions, IStartParams as IBaseStartParams, IAttributes as IBaseAttributes } from '../assetTransaction';
3
3
  import { AssetTransactionType } from '../assetTransactionType';
4
4
  import { IExtendId } from '../autoGenerated';
5
+ import { IWorkPerformed } from '../event/eventSeries';
6
+ import { ILocation as IEventLocation, IName as IEventName, ISuperEvent } from '../event/screeningEvent';
7
+ import { EventType } from '../eventType';
5
8
  import { IMultilingualString } from '../multilingualString';
6
9
  import { ICategory as IOfferCategory, IValidRateLimit } from '../offer';
7
10
  import { OfferType } from '../offerType';
@@ -15,12 +18,58 @@ import { IPriceSpecification as IUnitPriceOfferPriceSpecification } from '../pri
15
18
  import { IServiceType, ProductType } from '../product';
16
19
  import { IPropertyValue } from '../propertyValue';
17
20
  import { ITicketIssuedBy, TicketType, IUnderName as IReservationUnderName, IBroker, ISeat as IReservationSeat } from '../reservation';
18
- import { IReservation as IEventReservation, IReservationForLegacy as IEventReservationReservationFor, IReservedTicket, ISubReservation as ISubReservation4eventReservation } from '../reservation/event';
21
+ import { IReservation as IEventReservation, IReservedTicket, ISubReservation as ISubReservation4eventReservation } from '../reservation/event';
19
22
  import { IReservation as IReservationPackage } from '../reservation/reservationPackage';
20
23
  import { ReservationStatusType } from '../reservationStatusType';
21
24
  import { ReservationType } from '../reservationType';
22
25
  import { PaymentServiceType } from '../service/paymentService';
23
26
  import { IUnitPriceOffer } from '../unitPriceOffer';
27
+ export type IOptimizedWorkPerformedLegacy = Pick<IWorkPerformed, 'typeOf' | 'id' | 'identifier' | 'duration' | 'contentRating' | 'version'> & {
28
+ name?: string | IMultilingualString;
29
+ };
30
+ /**
31
+ * 予約対象施設コンテンツ
32
+ */
33
+ export type IOptimizedSuperEventLegacy = Pick<ISuperEvent, 'additionalProperty' | 'id' | 'location' | 'name' | 'soundFormat' | 'typeOf' | 'headline'> & {
34
+ workPerformed: IOptimizedWorkPerformedLegacy;
35
+ /**
36
+ * COA予約でのみ使用
37
+ */
38
+ identifier?: never;
39
+ /**
40
+ * COA予約でのみ使用
41
+ */
42
+ alternativeHeadline?: never;
43
+ /**
44
+ * COA予約でのみ使用
45
+ */
46
+ duration?: never;
47
+ /**
48
+ * COA予約でのみ使用
49
+ */
50
+ coaInfo?: never;
51
+ };
52
+ /**
53
+ * 予約対象イベント
54
+ */
55
+ export interface IReservationForLegacy {
56
+ endDate: Date;
57
+ id: string;
58
+ location: IEventLocation;
59
+ name: IEventName;
60
+ startDate: Date;
61
+ superEvent: IOptimizedSuperEventLegacy;
62
+ typeOf: EventType.ScreeningEvent;
63
+ doorTime?: Date;
64
+ /**
65
+ * COA予約でのみ使用
66
+ */
67
+ identifier?: never;
68
+ /**
69
+ * COA予約でのみ使用
70
+ */
71
+ coaInfo?: never;
72
+ }
24
73
  export { IAgent };
25
74
  export type IInstrument = IReserveActionInstrument;
26
75
  export type IStartParamsWithoutDetail = IBaseStartParams<AssetTransactionType.Reserve, IAgent, undefined, IObjectWithoutDetail>;
@@ -285,7 +334,7 @@ export interface IObjectWithoutDetail {
285
334
  id: string;
286
335
  };
287
336
  }
288
- export type IReservationFor = IEventReservationReservationFor;
337
+ export type IReservationFor = IReservationForLegacy;
289
338
  /**
290
339
  * 予約取引に保管されるticketType
291
340
  */
@@ -1,5 +1,5 @@
1
1
  import { IAction as IReturnOrderAction } from '../action/transfer/return/order';
2
- import { IAcceptedOffer, IOrder } from '../order';
2
+ import { IAcceptedOffer, IOrder, ITicketPriceSpecification } from '../order';
3
3
  import { OrderStatus } from '../orderStatus';
4
4
  /**
5
5
  * 返品通知
@@ -19,7 +19,12 @@ export type IProcessingOrder4inform = Pick<IOrder, 'project' | 'typeOf' | 'selle
19
19
  * 配送中通知
20
20
  */
21
21
  export type IInTransitOrder4inform = Pick<IOrder, 'project' | 'typeOf' | 'orderNumber'> & {
22
- acceptedOffers: IAcceptedOffer[];
22
+ acceptedOffers: (Omit<IAcceptedOffer, 'priceSpecification'> & {
23
+ /**
24
+ * COA以外では注文ドキュメントにpriceSpecificationが存在しないのでIFを補完
25
+ */
26
+ priceSpecification?: ITicketPriceSpecification;
27
+ })[];
23
28
  id?: string;
24
29
  orderStatus: OrderStatus.OrderInTransit;
25
30
  };
@@ -1,7 +1,7 @@
1
1
  import { ActionType } from '../actionType';
2
- import { IIssuedThrough, IPrice } from '../assetTransaction/reserve';
3
- import { IProvider, ITicket, IUnderName } from '../reservation';
4
- import { IReservation as IEventReservation, IReservationForLegacy } from '../reservation/event';
2
+ import { IIssuedThrough, IPrice, IReservationForLegacy } from '../assetTransaction/reserve';
3
+ import { IProvider, IUnderName } from '../reservation';
4
+ import { IReservation as IEventReservation } from '../reservation/event';
5
5
  import { ReservationStatusType } from '../reservationStatusType';
6
6
  import { ReservationType } from '../reservationType';
7
7
  import { ISubReservationReservedTicket } from '../assetTransaction/reserve';
@@ -49,7 +49,9 @@ export interface IReservation4informCheckedIn {
49
49
  /**
50
50
  * 発券通知がarrayの場合、ひとつめのみreservedTicket.ticketTokenが含まれる(2024-10-30~)
51
51
  */
52
- reservedTicket?: Pick<ITicket, 'ticketToken'>;
52
+ reservedTicket?: {
53
+ ticketToken?: string;
54
+ };
53
55
  reservationNumber?: never;
54
56
  reservationStatus?: never;
55
57
  attended?: never;
@@ -67,7 +69,9 @@ export interface IReservationPackage4informCheckedIn {
67
69
  /**
68
70
  * 発券通知がarrayの場合、ひとつめのみreservedTicket.ticketTokenが含まれる(2024-10-30~)
69
71
  */
70
- reservedTicket?: Pick<ITicket, 'ticketToken'>;
72
+ reservedTicket?: {
73
+ ticketToken?: string;
74
+ };
71
75
  subReservation: Pick<ISubReservation4inform, 'id'>[];
72
76
  id?: never;
73
77
  reservationStatus?: never;
@@ -1,6 +1,6 @@
1
1
  import type { COAFactory } from '@coasystems/factory';
2
2
  import { IParticipantAsPerson, IParticipantAsProject, IParticipantAsWebApplication } from './action';
3
- import { ICategoryChargePriceComponent, IMovieTicketTypeChargePriceComponent, IUnitPriceComponent, IIssuedThrough, IServiceTypeOfIssuedThrough, ITicketType } from './assetTransaction/reserve';
3
+ import { ICategoryChargePriceComponent, IMovieTicketTypeChargePriceComponent, IUnitPriceComponent, IIssuedThrough, IServiceTypeOfIssuedThrough, ITicketType, IOptimizedSuperEventLegacy, IOptimizedWorkPerformedLegacy, IReservationForLegacy } from './assetTransaction/reserve';
4
4
  import { ICreativeWork as IWebApplication } from './creativeWork/softwareApplication/webApplication';
5
5
  import { ICustomer as ICustomerOrganization } from './customer';
6
6
  import { ICOAInfo, ISuperEvent as IEventSeries } from './event/screeningEvent';
@@ -19,10 +19,11 @@ import { PriceCurrency } from './priceCurrency';
19
19
  import { IPriceSpecification as ICompoundPriceSpecification } from './priceSpecification/compoundPriceSpecification';
20
20
  import { ProductType } from './product';
21
21
  import { IPropertyValue } from './propertyValue';
22
- import { IOptimizedSuperEventLegacy, IOptimizedWorkPerformedLegacy, IReservation as IRawReservation, IReservationForLegacy, IReservedTicket as IRawReservedTicket } from './reservation/event';
22
+ import { IReservation as IRawReservation, IReservedTicket as IRawReservedTicket } from './reservation/event';
23
23
  import { ReservationType } from './reservationType';
24
24
  import { ISeller as IBaseSeller } from './seller';
25
25
  import { IPaymentMethodAsServiceOutput, PaymentServiceType } from './service/paymentService';
26
+ import { IService, Identifier } from './service/webAPI';
26
27
  import { SortType } from './sortType';
27
28
  import { UnitCode } from './unitCode';
28
29
  export { OrderType };
@@ -165,13 +166,23 @@ export type ICOATicketType = Pick<ITicketType, 'id' | 'identifier' | 'name' | 't
165
166
  * COAの場合の予約チケット
166
167
  */
167
168
  export type ICOAReservedTicket = Pick<IRawReservedTicket, 'typeOf' | 'ticketedSeat' | 'identifier' | // 追加(2024-04-15~)
168
- 'ticketNumber' | 'dateIssued' | 'ticketToken'> & {
169
+ 'dateIssued'> & {
169
170
  ticketType: ICOATicketType;
170
171
  /**
171
172
  * COA券種情報
172
173
  */
173
174
  coaTicketInfo?: ICOATicketInfoWithDetails;
174
175
  coaReserveAmount?: number;
176
+ /**
177
+ * The unique identifier for the ticket.
178
+ */
179
+ ticketNumber?: string;
180
+ /**
181
+ * If the barcode image is hosted on your site, the value of the field is URL of the image, or a barcode or QR URI,
182
+ * such as "barcode128:AB34" (ISO-15417 barcodes), "qrCode:AB34" (QR codes),
183
+ * "aztecCode:AB34" (Aztec codes), "barcodeEAN:1234" (EAN codes) and "barcodeUPCA:1234" (UPCA codes).
184
+ */
185
+ ticketToken?: string;
175
186
  };
176
187
  export interface ICOAIssuedThrough {
177
188
  typeOf: ProductType.EventService;
@@ -211,20 +222,40 @@ export type ITicketPriceComponent = ICategoryChargePriceComponent | IMovieTicket
211
222
  */
212
223
  export type ITicketPriceSpecification = Pick<ICompoundPriceSpecification<ITicketPriceComponent>, 'priceComponent' | 'priceCurrency' | 'typeOf' | 'valueAddedTaxIncluded'>;
213
224
  export type IOfferOptimized4acceptedOffer = Pick<IOffer, 'typeOf' | 'id' | 'itemOffered' | 'offeredThrough' | 'name'>;
214
- /**
215
- * 受け入れオファー
216
- */
217
- export interface IAcceptedOffer extends IOfferOptimized4acceptedOffer {
225
+ export interface ICOAAcceptedOffer extends IOfferOptimized4acceptedOffer {
218
226
  /**
219
227
  * オファー対象アイテム
220
228
  */
221
- itemOffered: IItemOffered;
229
+ itemOffered: ICOAEventReservation;
230
+ offeredThrough: Pick<IService<Identifier>, 'typeOf'> & {
231
+ identifier: Identifier.COA;
232
+ };
222
233
  priceSpecification?: ITicketPriceSpecification;
223
234
  /**
224
- * 資産取引を特定する番号(2024-01-30~)
235
+ * 資産取引番号
236
+ * 2024-01-30~
225
237
  */
226
- serialNumber?: string;
238
+ serialNumber: string;
227
239
  }
240
+ export interface IOptimizedAcceptedOffer extends IOfferOptimized4acceptedOffer {
241
+ /**
242
+ * オファー対象アイテム
243
+ */
244
+ itemOffered: IEventReservation;
245
+ offeredThrough: Pick<IService<Identifier>, 'typeOf'> & {
246
+ identifier: Identifier.Chevre;
247
+ };
248
+ priceSpecification?: ITicketPriceSpecification;
249
+ /**
250
+ * 資産取引番号
251
+ * 2024-01-30~
252
+ */
253
+ serialNumber: string;
254
+ }
255
+ /**
256
+ * 受け入れオファー
257
+ */
258
+ export type IAcceptedOffer = ICOAAcceptedOffer | IOptimizedAcceptedOffer;
228
259
  /**
229
260
  * 販売者
230
261
  */
@@ -1,57 +1,10 @@
1
- import { ILocation as IEventLocation, IName as IEventName, ISuperEvent } from '../event/screeningEvent';
1
+ import { ILocation as IEventLocation, ISuperEvent } from '../event/screeningEvent';
2
2
  import { IWorkPerformed } from '../event/eventSeries';
3
3
  import { EventType } from '../eventType';
4
- import { IMultilingualString } from '../multilingualString';
5
4
  import { TicketType, ISeat as IReservationSeat, IReservation as IBaseReservation, IAvailableReservationStatusType, ITicket } from '../reservation';
6
5
  import { ReservationStatusType } from '../reservationStatusType';
7
6
  import { ReservationType } from '../reservationType';
8
7
  import { SortType } from '../sortType';
9
- export type IOptimizedWorkPerformedLegacy = Pick<IWorkPerformed, 'typeOf' | 'id' | 'identifier' | 'duration' | 'contentRating' | 'version'> & {
10
- name?: string | IMultilingualString;
11
- };
12
- /**
13
- * 予約対象施設コンテンツ
14
- */
15
- export type IOptimizedSuperEventLegacy = Pick<ISuperEvent, 'additionalProperty' | 'id' | 'location' | 'name' | 'soundFormat' | 'typeOf' | 'headline'> & {
16
- workPerformed: IOptimizedWorkPerformedLegacy;
17
- /**
18
- * COA予約でのみ使用
19
- */
20
- identifier?: never;
21
- /**
22
- * COA予約でのみ使用
23
- */
24
- alternativeHeadline?: never;
25
- /**
26
- * COA予約でのみ使用
27
- */
28
- duration?: never;
29
- /**
30
- * COA予約でのみ使用
31
- */
32
- coaInfo?: never;
33
- };
34
- /**
35
- * 予約対象イベント
36
- */
37
- export interface IReservationForLegacy {
38
- endDate: Date;
39
- id: string;
40
- location: IEventLocation;
41
- name: IEventName;
42
- startDate: Date;
43
- superEvent: IOptimizedSuperEventLegacy;
44
- typeOf: EventType.ScreeningEvent;
45
- doorTime?: Date;
46
- /**
47
- * COA予約でのみ使用
48
- */
49
- identifier?: never;
50
- /**
51
- * COA予約でのみ使用
52
- */
53
- coaInfo?: never;
54
- }
55
8
  export type IMinimizedWorkPerformed = Pick<IWorkPerformed, 'typeOf' | 'id' | 'identifier' | 'version'> & {
56
9
  duration?: never;
57
10
  contentRating?: never;
@@ -102,6 +55,8 @@ export type IReservedTicket = ITicket & {
102
55
  * 予約ドキュメント内のticketTypeは廃止済(2026-03-26~)
103
56
  */
104
57
  ticketType?: never;
58
+ ticketNumber?: never;
59
+ ticketToken?: never;
105
60
  };
106
61
  /**
107
62
  * イベント予約
@@ -187,10 +142,6 @@ export interface IReservedTicketSearchConditions {
187
142
  $in?: string[];
188
143
  };
189
144
  };
190
- /**
191
- * discontinue ticketType(2026-05-06~)
192
- */
193
- ticketType?: never;
194
145
  }
195
146
  export interface IStringSearchConditions {
196
147
  $eq?: string;
@@ -89,21 +89,10 @@ export interface ITicket {
89
89
  * 座席指定でない場合、この値は存在しない
90
90
  */
91
91
  ticketedSeat?: ISeat;
92
- /**
93
- * The unique identifier for the ticket.
94
- */
95
- ticketNumber?: string;
96
- /**
97
- * If the barcode image is hosted on your site, the value of the field is URL of the image, or a barcode or QR URI,
98
- * such as "barcode128:AB34" (ISO-15417 barcodes), "qrCode:AB34" (QR codes),
99
- * "aztecCode:AB34" (Aztec codes), "barcodeEAN:1234" (EAN codes) and "barcodeUPCA:1234" (UPCA codes).
100
- */
101
- ticketToken?: string;
102
92
  }
103
93
  export interface IBroker {
104
94
  typeOf: PersonType.Person;
105
95
  id: string;
106
- name?: string;
107
96
  }
108
97
  export type IProgramMembershipIssuedThroughFaceToFace = Pick<IProgramMembership, 'typeOf'> & {
109
98
  identifier: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chevre/factory",
3
- "version": "8.1.0",
3
+ "version": "8.2.0-alpha.1",
4
4
  "main": "./lib/index.js",
5
5
  "types": "./lib/index.d.ts",
6
6
  "files": [