@chevre/factory 8.2.0-alpha.5 → 8.2.0-alpha.7

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.
@@ -1,11 +1,12 @@
1
1
  import type { COAFactory } from '@coasystems/factory';
2
2
  import { IParticipantAsWebApplication, IAction as IBaseAction } from '../../action';
3
3
  import { ActionType } from '../../actionType';
4
- import { IAcceptedTicketOfferItemOffered, IAcceptedTicketOfferWithoutDetail as IAcceptedOfferWithoutDetail4chevre } from '../../assetTransaction/reserve';
4
+ import { IItemOfferedServiceOutput, IAcceptedTicketOfferItemOffered, IAcceptedTicketOfferWithoutDetail as IAcceptedOfferWithoutDetail4chevre } from '../../assetTransaction/reserve';
5
5
  import { AssetTransactionType } from '../../assetTransactionType';
6
6
  import { IOffer } from '../../offer';
7
7
  import { OfferType } from '../../offerType';
8
8
  import { ITicketPriceSpecification } from '../../order';
9
+ import { IPropertyValue } from '../../propertyValue';
9
10
  import { IRecipe, IUpdTmpReserveSeatArgs, IUpdTmpReserveSeatResult } from '../../recipe/acceptCOAOffer';
10
11
  import { TransactionType } from '../../transactionType';
11
12
  import { IAttributes as IBaseAttributes } from '../accept';
@@ -166,7 +167,11 @@ export type IAcceptedOffer4COA = Pick<IAcceptedOfferWithoutDetail4chevre, 'id' |
166
167
  * 単価オファーコード
167
168
  */
168
169
  identifier: string;
169
- itemOffered: IAcceptedTicketOfferItemOffered;
170
+ itemOffered: {
171
+ serviceOutput?: IItemOfferedServiceOutput & {
172
+ additionalProperty?: IPropertyValue<string>[];
173
+ };
174
+ };
170
175
  ticketInfo: ICOATicketInfoWithDetails;
171
176
  /**
172
177
  * COAイベントでは、priceSpecificationで価格を表現しきれないので、numberとしてのpriceが必要
@@ -123,24 +123,17 @@ export type ITokenizedProgramMembershipUsed = string;
123
123
  */
124
124
  export type IAcceptedProgramMembershipUsed = IPermitIssuedThroughFaceToFace | IPermitIssuedThroughMembershipService | IProgramMembershipUsedAsTicket | ITokenizedProgramMembershipUsed;
125
125
  export type IAcceptedSubReservation = ISubReservation4eventReservation;
126
+ /**
127
+ * 予約取引開始前の指定予約属性
128
+ */
126
129
  export interface IEventReservatonAsItemOfferedServiceOutput {
127
130
  typeOf: ReservationType.EventReservation;
128
- /**
129
- * 追加特性
130
- */
131
- additionalProperty?: IPropertyValue<string>[];
132
131
  /**
133
132
  * 予約追加テキスト
134
133
  */
135
134
  additionalTicketText?: string;
136
135
  programMembershipUsed?: IAcceptedProgramMembershipUsed;
137
136
  reservedTicket?: {
138
- /**
139
- * チケット識別子
140
- * 指定された場合、決済カードの対象チケット識別子と関連付けされます
141
- * /^[0-9a-zA-Z]{8,16}$/
142
- */
143
- identifier?: string;
144
137
  issuedBy?: Pick<ITicketIssuedBy, 'name' | 'typeOf'>;
145
138
  typeOf: TicketType;
146
139
  /**
@@ -152,14 +145,12 @@ export interface IEventReservatonAsItemOfferedServiceOutput {
152
145
  }
153
146
  export type IItemOfferedServiceOutput = IEventReservatonAsItemOfferedServiceOutput;
154
147
  /**
155
- * 受け入れられたオファーのアイテム
148
+ * 予約取引開始前の指定オファーのアイテム
156
149
  */
157
150
  export interface IAcceptedTicketOfferItemOffered {
158
- pointAward?: never;
159
151
  serviceOutput?: IItemOfferedServiceOutput;
160
152
  }
161
153
  export interface IAcceptedTicketOfferItemOffered4object {
162
- pointAward?: never;
163
154
  serviceOutput: {
164
155
  id: string;
165
156
  };
@@ -209,7 +200,7 @@ export type IMultipleAcceptedAppliesToMovieTicket = {
209
200
  */
210
201
  export type IAcceptedAppliesToMovieTicket = ISingleAcceptedAppliesToMovieTicket | IMultipleAcceptedAppliesToMovieTicket;
211
202
  /**
212
- * 受け入れられたチケットオファー(詳細なし)
203
+ * 予約取引開始前の指定チケットオファー(詳細なし)
213
204
  */
214
205
  export interface IAcceptedTicketOfferWithoutDetail {
215
206
  /**
@@ -327,6 +318,9 @@ export interface IEventOfferTokenPayload {
327
318
  * トークンの中身については @see IEventOfferTokenPayload
328
319
  */
329
320
  export type IEventOfferToken = string;
321
+ /**
322
+ * 予約取引開始前の指定オブジェクト
323
+ */
330
324
  export interface IObjectWithoutDetail {
331
325
  acceptedOffer?: IAcceptedTicketOfferWithoutDetail[];
332
326
  broker?: IBroker;
@@ -360,11 +354,12 @@ export type IMovieTicketTypeChargePriceComponent = Pick<IMovieTicketTypeChargeSp
360
354
  export type IUnitPriceComponent = Pick<IUnitPriceOfferPriceSpecification, 'accounting' | 'appliesToMovieTicket' | 'appliesToAddOn' | 'name' | 'price' | 'priceCurrency' | 'referenceQuantity' | 'typeOf' | 'valueAddedTaxIncluded'>;
361
355
  export type ITicketPriceComponent = ICategoryChargePriceComponent | IMovieTicketTypeChargePriceComponent | IUnitPriceComponent;
362
356
  export type IPrice = Pick<ICompoundPriceSpecification<ITicketPriceComponent>, 'priceComponent' | 'priceCurrency' | 'typeOf' | 'valueAddedTaxIncluded'>;
363
- export type IEventReservationAsSubReservation = Pick<IEventReservation, 'additionalProperty' | 'additionalTicketText' | 'id' | 'programMembershipUsed' | 'subReservation' | 'typeOf'> & {
357
+ export type IEventReservationAsSubReservation = Pick<IEventReservation, 'additionalTicketText' | 'id' | 'programMembershipUsed' | 'subReservation' | 'typeOf'> & {
364
358
  numSeats?: number;
365
359
  price?: IPrice;
366
360
  priceCurrency?: PriceCurrency;
367
361
  reservedTicket: ISubReservationReservedTicket;
362
+ additionalProperty?: never;
368
363
  };
369
364
  export type IObjectSubReservation = IEventReservationAsSubReservation;
370
365
  export type IServiceTypeOfIssuedThrough = Pick<IServiceType, 'codeValue' | 'inCodeSet' | 'typeOf'>;
@@ -200,10 +200,11 @@ export type IEventReservation = Pick<IRawReservation, 'additionalProperty' | 'ad
200
200
  /**
201
201
  * COAの場合の予約
202
202
  */
203
- export type ICOAEventReservation = Pick<IRawReservation, 'additionalProperty' | 'additionalTicketText' | 'id' | 'programMembershipUsed' | 'reservationNumber' | 'typeOf'> & {
203
+ export type ICOAEventReservation = Pick<IRawReservation, 'additionalTicketText' | 'id' | 'programMembershipUsed' | 'reservationNumber' | 'typeOf'> & {
204
204
  issuedThrough: ICOAIssuedThrough;
205
205
  reservationFor: ICOAEventAsReservationFor;
206
206
  reservedTicket: ICOAReservedTicket;
207
+ additionalProperty?: IPropertyValue<string>[];
207
208
  };
208
209
  /**
209
210
  * オファー提供アイテムとしての予約
@@ -16,11 +16,14 @@ export interface IMovieTicketServiceOutput {
16
16
  reservedTicket: {
17
17
  /**
18
18
  * チケット識別子
19
- * 指定された場合、予約のチケット識別子と関連付けされます
20
- * /^[0-9a-zA-Z]{8,16}$/
19
+ * 予約のチケット識別子と関連付けされる
20
+ * 指定は不可
21
21
  */
22
22
  identifier?: string;
23
- ticketedSeat: ISeat;
23
+ /**
24
+ * 決済カードと関連付ける座席
25
+ */
26
+ ticketedSeat: Pick<ISeat, 'seatNumber' | 'seatRow' | 'seatSection' | 'typeOf'>;
24
27
  };
25
28
  }
26
29
  /**
@@ -1,14 +1,2 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- // public async lockIfNotLimitExceeded
4
- // reservationCount<=nであれば$push+$incする
5
- // public async lock
6
- // [reservationFor.id+seatNumber+seatSection][reservationNumber][subReservation.id]にunique indexを作成した上で$push+$incする
7
- // public async unlock
8
- // [id]あるいは[seatNumber+seatSection]でreservations.subReservationsから$pull+$incする
9
- // public async countUnavailableOffers
10
- // reservationCountを返す
11
- // public async getHolder
12
- // [id]あるいは[seatNumber+seatSection]でreservationNumberを返す
13
- // public async searchHolders
14
- // [id]あるいは[seatNumber+seatSection]のリストでreservationNumberのリストを返す
@@ -79,7 +79,7 @@ export interface ITicket {
79
79
  /**
80
80
  * チケット識別子
81
81
  */
82
- identifier?: string;
82
+ identifier: string;
83
83
  /**
84
84
  * The organization issuing the ticket or permit.
85
85
  */
@@ -199,5 +199,5 @@ export interface IReservation {
199
199
  * 出席(入場)済かどうか
200
200
  */
201
201
  attended?: boolean;
202
- additionalProperty?: IPropertyValue<string>[];
202
+ additionalProperty?: never;
203
203
  }
@@ -17,10 +17,6 @@ export { IOfferMerchantReturnPolicy, IOfferMerchantReturnPolicySearchConditions,
17
17
  export interface IItemOffered {
18
18
  typeOf: ProductType;
19
19
  serviceOutput?: never;
20
- /**
21
- * 特典
22
- */
23
- pointAward?: never;
24
20
  }
25
21
  /**
26
22
  * 単価オファーの価格仕様
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chevre/factory",
3
- "version": "8.2.0-alpha.5",
3
+ "version": "8.2.0-alpha.7",
4
4
  "main": "./lib/index.js",
5
5
  "types": "./lib/index.d.ts",
6
6
  "files": [