@chevre/factory 8.1.0-alpha.6 → 8.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.
@@ -2,12 +2,20 @@ 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 { IOrder } from '../order';
5
+ import { IMultilingualString } from '../multilingualString';
6
+ import { ICategory as IOfferCategory, IValidRateLimit } from '../offer';
7
+ import { OfferType } from '../offerType';
8
+ import { OrderType } from '../orderType';
6
9
  import { PermitType } from '../permit';
7
10
  import { PriceCurrency } from '../priceCurrency';
11
+ import { IPriceSpecification as ICategoryCodeChargeSpecification } from '../priceSpecification/categoryCodeChargeSpecification';
12
+ import { IPriceSpecification as ICompoundPriceSpecification } from '../priceSpecification/compoundPriceSpecification';
13
+ import { IPriceSpecification as IMovieTicketTypeChargeSpecification } from '../priceSpecification/movieTicketTypeChargeSpecification';
14
+ import { IPriceSpecification as IUnitPriceOfferPriceSpecification } from '../priceSpecification/unitPriceSpecification';
15
+ import { IServiceType, ProductType } from '../product';
8
16
  import { IPropertyValue } from '../propertyValue';
9
17
  import { ITicketIssuedBy, TicketType, IUnderName as IReservationUnderName, IBroker, ISeat as IReservationSeat } from '../reservation';
10
- import { IIssuedThrough as IEventReservationIssuedThrough, IPrice as IReservationPrice, IReservation as IEventReservation, IReservationForLegacy as IEventReservationReservationFor, IReservedTicket, ISubReservation as ISubReservation4eventReservation, ITicketType } from '../reservation/event';
18
+ import { IReservation as IEventReservation, IReservationForLegacy as IEventReservationReservationFor, IReservedTicket, ISubReservation as ISubReservation4eventReservation } from '../reservation/event';
11
19
  import { IReservation as IReservationPackage } from '../reservation/reservationPackage';
12
20
  import { ReservationStatusType } from '../reservationStatusType';
13
21
  import { ReservationType } from '../reservationType';
@@ -191,7 +199,11 @@ export interface IAcceptedOffer4object {
191
199
  id: string;
192
200
  itemOffered: IAcceptedTicketOfferItemOffered4object;
193
201
  }
194
- export type IOrderAsReservePurpose = Pick<IOrder, 'confirmationNumber' | 'orderNumber' | 'typeOf'>;
202
+ export interface IOrderAsReservePurpose {
203
+ confirmationNumber: string;
204
+ orderNumber: string;
205
+ typeOf: OrderType;
206
+ }
195
207
  export interface IPotentialActionsParams {
196
208
  reserve?: {
197
209
  purpose?: IOrderAsReservePurpose;
@@ -274,19 +286,47 @@ export interface IObjectWithoutDetail {
274
286
  };
275
287
  }
276
288
  export type IReservationFor = IEventReservationReservationFor;
289
+ /**
290
+ * 予約取引に保管されるticketType
291
+ */
292
+ export interface ITicketType {
293
+ additionalProperty?: IPropertyValue<string>[];
294
+ category?: IOfferCategory;
295
+ color?: string;
296
+ description?: string | IMultilingualString;
297
+ id?: string;
298
+ identifier: string;
299
+ name?: IMultilingualString;
300
+ typeOf: OfferType.Offer;
301
+ validRateLimit?: IValidRateLimit;
302
+ }
277
303
  export type ISubReservationReservedTicket = Omit<IReservedTicket, 'ticketType'> & {
278
304
  /**
279
305
  * 予約側ではticketType廃止予定であり、予約取引には残す
280
306
  */
281
307
  ticketType: ITicketType;
282
308
  };
283
- export type IEventReservationAsSubReservation = Pick<IEventReservation, 'additionalProperty' | 'additionalTicketText' | 'id' | 'numSeats' | 'programMembershipUsed' | 'subReservation' | 'typeOf'> & {
284
- price?: IReservationPrice;
309
+ export type ICategoryChargePriceComponent = Pick<ICategoryCodeChargeSpecification, 'accounting' | 'appliesToCategoryCode' | 'name' | 'price' | 'priceCurrency' | 'typeOf' | 'valueAddedTaxIncluded'>;
310
+ export type IMovieTicketTypeChargePriceComponent = Pick<IMovieTicketTypeChargeSpecification, 'accounting' | 'appliesToMovieTicket' | 'appliesToVideoFormat' | 'name' | 'price' | 'priceCurrency' | 'typeOf' | 'valueAddedTaxIncluded'>;
311
+ export type IUnitPriceComponent = Pick<IUnitPriceOfferPriceSpecification, 'accounting' | 'appliesToMovieTicket' | 'appliesToAddOn' | 'name' | 'price' | 'priceCurrency' | 'referenceQuantity' | 'typeOf' | 'valueAddedTaxIncluded'>;
312
+ export type ITicketPriceComponent = ICategoryChargePriceComponent | IMovieTicketTypeChargePriceComponent | IUnitPriceComponent;
313
+ export type IPrice = Pick<ICompoundPriceSpecification<ITicketPriceComponent>, 'priceComponent' | 'priceCurrency' | 'typeOf' | 'valueAddedTaxIncluded'>;
314
+ export type IEventReservationAsSubReservation = Pick<IEventReservation, 'additionalProperty' | 'additionalTicketText' | 'id' | 'programMembershipUsed' | 'subReservation' | 'typeOf'> & {
315
+ numSeats?: number;
316
+ price?: IPrice;
285
317
  priceCurrency?: PriceCurrency;
286
318
  reservedTicket: ISubReservationReservedTicket;
287
319
  };
288
320
  export type IObjectSubReservation = IEventReservationAsSubReservation;
289
- export type IIssuedThrough = IEventReservationIssuedThrough;
321
+ export type IServiceTypeOfIssuedThrough = Pick<IServiceType, 'codeValue' | 'inCodeSet' | 'typeOf'>;
322
+ export interface IIssuedThrough {
323
+ typeOf: ProductType.EventService;
324
+ serviceType?: IServiceTypeOfIssuedThrough;
325
+ /**
326
+ * 興行id
327
+ */
328
+ id: string;
329
+ }
290
330
  /**
291
331
  * 予約取引に保管される予約者情報
292
332
  */
@@ -1,2 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ ;
@@ -1,6 +1,7 @@
1
1
  import { ActionType } from '../actionType';
2
+ import { IIssuedThrough, IPrice } from '../assetTransaction/reserve';
2
3
  import { IProvider, ITicket, IUnderName } from '../reservation';
3
- import { IIssuedThrough, IReservation as IEventReservation, IReservationForLegacy, IPrice } from '../reservation/event';
4
+ import { IReservation as IEventReservation, IReservationForLegacy } from '../reservation/event';
4
5
  import { ReservationStatusType } from '../reservationStatusType';
5
6
  import { ReservationType } from '../reservationType';
6
7
  import { ISubReservationReservedTicket } from '../assetTransaction/reserve';
@@ -1,5 +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
4
  import { ICreativeWork as IWebApplication } from './creativeWork/softwareApplication/webApplication';
4
5
  import { ICustomer as ICustomerOrganization } from './customer';
5
6
  import { ICOAInfo, ISuperEvent as IEventSeries } from './event/screeningEvent';
@@ -8,6 +9,7 @@ import { IMonetaryAmount } from './monetaryAmount';
8
9
  import { IMultilingualString } from './multilingualString';
9
10
  import { IOffer } from './offer';
10
11
  import { OrderStatus } from './orderStatus';
12
+ import { OrderType } from './orderType';
11
13
  import { OrganizationType } from './organizationType';
12
14
  import { PaymentStatusType } from './paymentStatusType';
13
15
  import { IPerson, IProfile } from './person';
@@ -17,19 +19,17 @@ import { PriceCurrency } from './priceCurrency';
17
19
  import { IPriceSpecification as ICompoundPriceSpecification } from './priceSpecification/compoundPriceSpecification';
18
20
  import { ProductType } from './product';
19
21
  import { IPropertyValue } from './propertyValue';
20
- import { ICategoryChargePriceComponent, IIssuedThrough, IMovieTicketTypeChargePriceComponent, IOptimizedSuperEventLegacy, IOptimizedWorkPerformedLegacy, IReservation as IRawReservation, IReservationForLegacy, IReservedTicket as IRawReservedTicket, ITicketType, IUnitPriceComponent, IServiceTypeOfIssuedThrough } from './reservation/event';
22
+ import { IOptimizedSuperEventLegacy, IOptimizedWorkPerformedLegacy, IReservation as IRawReservation, IReservationForLegacy, IReservedTicket as IRawReservedTicket } from './reservation/event';
21
23
  import { ReservationType } from './reservationType';
22
24
  import { ISeller as IBaseSeller } from './seller';
23
25
  import { IPaymentMethodAsServiceOutput, PaymentServiceType } from './service/paymentService';
24
26
  import { SortType } from './sortType';
25
27
  import { UnitCode } from './unitCode';
28
+ export { OrderType };
26
29
  export interface IProject {
27
30
  typeOf: OrganizationType.Project;
28
31
  id: string;
29
32
  }
30
- export declare enum OrderType {
31
- Order = "Order"
32
- }
33
33
  export interface IOrderPaymentMethodIssuedThrough {
34
34
  typeOf: PaymentServiceType;
35
35
  /**
@@ -151,27 +151,29 @@ export type ICOATicketInfoWithDetails = COAFactory.reserve.IUpdReserveTicket & {
151
151
  */
152
152
  usePoint: number;
153
153
  };
154
- export type IReservedTicket = Pick<IRawReservedTicket, 'typeOf' | 'ticketedSeat' | 'identifier' | // 追加(2024-04-15~)
155
- 'ticketNumber'> & {
156
- ticketType: ITicketType;
154
+ export type ITicketTypeInOrder = Pick<ITicketType, 'id' | 'identifier' | 'name' | 'typeOf' | 'additionalProperty' | 'description'>;
155
+ export type IReservedTicket = Pick<IRawReservedTicket, 'typeOf' | 'ticketedSeat' | 'identifier'> & {
156
+ ticketType: ITicketTypeInOrder;
157
+ ticketNumber?: never;
157
158
  dateIssued?: never;
158
159
  ticketToken?: never;
159
160
  coaTicketInfo?: never;
160
161
  coaReserveAmount?: never;
161
162
  };
163
+ export type ICOATicketType = Pick<ITicketType, 'id' | 'identifier' | 'name' | 'typeOf'>;
162
164
  /**
163
165
  * COAの場合の予約チケット
164
166
  */
165
167
  export type ICOAReservedTicket = Pick<IRawReservedTicket, 'typeOf' | 'ticketedSeat' | 'identifier' | // 追加(2024-04-15~)
166
168
  'ticketNumber' | 'dateIssued' | 'ticketToken'> & {
167
- ticketType: ITicketType;
169
+ ticketType: ICOATicketType;
168
170
  /**
169
171
  * COA券種情報
170
172
  */
171
173
  coaTicketInfo?: ICOATicketInfoWithDetails;
172
174
  coaReserveAmount?: number;
173
175
  };
174
- export interface ICOAIssuedThrough extends Pick<IIssuedThrough, 'typeOf'> {
176
+ export interface ICOAIssuedThrough {
175
177
  typeOf: ProductType.EventService;
176
178
  serviceType?: never;
177
179
  /**
@@ -1,7 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.OrderType = void 0;
4
- var OrderType;
5
- (function (OrderType) {
6
- OrderType["Order"] = "Order";
7
- })(OrderType || (exports.OrderType = OrderType = {}));
4
+ const orderType_1 = require("./orderType");
5
+ Object.defineProperty(exports, "OrderType", { enumerable: true, get: function () { return orderType_1.OrderType; } });
@@ -0,0 +1,3 @@
1
+ export declare enum OrderType {
2
+ Order = "Order"
3
+ }
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.OrderType = void 0;
4
+ var OrderType;
5
+ (function (OrderType) {
6
+ OrderType["Order"] = "Order";
7
+ })(OrderType || (exports.OrderType = OrderType = {}));
@@ -58,7 +58,6 @@ export interface IReportDocument {
58
58
  export interface ISearchConditions {
59
59
  limit?: number;
60
60
  page?: number;
61
- $unwindAcceptedOffers?: '1';
62
61
  project?: {
63
62
  id?: {
64
63
  $eq?: string;
@@ -2,15 +2,7 @@ import { ILocation as IEventLocation, IName as IEventName, ISuperEvent } from '.
2
2
  import { IWorkPerformed } from '../event/eventSeries';
3
3
  import { EventType } from '../eventType';
4
4
  import { IMultilingualString } from '../multilingualString';
5
- import { ICategory as IOfferCategory, IValidRateLimit } from '../offer';
6
- import { OfferType } from '../offerType';
7
- import { IPriceSpecification as ICategoryCodeChargeSpecification } from '../priceSpecification/categoryCodeChargeSpecification';
8
- import { IPriceSpecification as ICompoundPriceSpecification } from '../priceSpecification/compoundPriceSpecification';
9
- import { IPriceSpecification as IMovieTicketTypeChargeSpecification } from '../priceSpecification/movieTicketTypeChargeSpecification';
10
- import { IPriceSpecification as IUnitPriceOfferPriceSpecification } from '../priceSpecification/unitPriceSpecification';
11
- import { ProductType } from '../product';
12
- import { IPropertyValue } from '../propertyValue';
13
- import { TicketType, ISeat as IReservationSeat, IServiceTypeOfIssuedThrough, IReservation as IBaseReservation, IAvailableReservationStatusType, ITicket } from '../reservation';
5
+ import { TicketType, ISeat as IReservationSeat, IReservation as IBaseReservation, IAvailableReservationStatusType, ITicket } from '../reservation';
14
6
  import { ReservationStatusType } from '../reservationStatusType';
15
7
  import { ReservationType } from '../reservationType';
16
8
  import { SortType } from '../sortType';
@@ -99,38 +91,12 @@ export interface IReservationForMinimized {
99
91
  name?: never;
100
92
  doorTime?: never;
101
93
  }
102
- export type ICategoryChargePriceComponent = Pick<ICategoryCodeChargeSpecification, 'accounting' | 'appliesToCategoryCode' | 'name' | 'price' | 'priceCurrency' | 'typeOf' | 'valueAddedTaxIncluded'>;
103
- export type IMovieTicketTypeChargePriceComponent = Pick<IMovieTicketTypeChargeSpecification, 'accounting' | 'appliesToMovieTicket' | 'appliesToVideoFormat' | 'name' | 'price' | 'priceCurrency' | 'typeOf' | 'valueAddedTaxIncluded'>;
104
- export type IUnitPriceComponent = Pick<IUnitPriceOfferPriceSpecification, 'accounting' | 'appliesToMovieTicket' | 'appliesToAddOn' | 'name' | 'price' | 'priceCurrency' | 'referenceQuantity' | 'typeOf' | 'valueAddedTaxIncluded'>;
105
- export type ITicketPriceComponent = ICategoryChargePriceComponent | IMovieTicketTypeChargePriceComponent | IUnitPriceComponent;
106
- export type IPrice = Pick<ICompoundPriceSpecification<ITicketPriceComponent>, 'priceComponent' | 'priceCurrency' | 'typeOf' | 'valueAddedTaxIncluded'>;
107
- export type IPriceSpecification = never;
108
94
  export interface ISubReservation {
109
95
  reservedTicket: {
110
96
  typeOf: TicketType;
111
97
  ticketedSeat: IReservationSeat;
112
98
  };
113
99
  }
114
- export { IServiceTypeOfIssuedThrough };
115
- export interface IIssuedThrough {
116
- typeOf: ProductType.EventService;
117
- serviceType?: IServiceTypeOfIssuedThrough;
118
- /**
119
- * 興行id
120
- */
121
- id: string;
122
- }
123
- export interface ITicketType {
124
- additionalProperty?: IPropertyValue<string>[];
125
- category?: IOfferCategory;
126
- color?: string;
127
- description?: string | IMultilingualString;
128
- id?: string;
129
- identifier: string;
130
- name?: IMultilingualString;
131
- typeOf: OfferType.Offer;
132
- validRateLimit?: IValidRateLimit;
133
- }
134
100
  export type IReservedTicket = ITicket & {
135
101
  /**
136
102
  * 予約ドキュメント内のticketTypeは廃止済(2026-03-26~)
@@ -140,7 +106,7 @@ export type IReservedTicket = ITicket & {
140
106
  /**
141
107
  * イベント予約
142
108
  */
143
- export interface IReservation extends IBaseReservation<IPriceSpecification> {
109
+ export interface IReservation extends IBaseReservation {
144
110
  bookingTime: Date;
145
111
  id: string;
146
112
  reservationFor: IReservationForMinimized;
@@ -151,6 +117,7 @@ export interface IReservation extends IBaseReservation<IPriceSpecification> {
151
117
  typeOf: ReservationType.EventReservation;
152
118
  issuedThrough?: never;
153
119
  priceCurrency?: never;
120
+ numSeats?: never;
154
121
  }
155
122
  export interface IReservationForSearchConditions {
156
123
  typeOf?: EventType;
@@ -1,11 +1,10 @@
1
1
  import { IReservation as IBaseReservation } from '../reservation';
2
2
  import { ReservationType } from '../reservationType';
3
- type IPriceSpecification = never;
4
- type ISubReservation = IBaseReservation<IPriceSpecification>;
3
+ type ISubReservation = IBaseReservation;
5
4
  /**
6
5
  * 予約パッケージインターフェース
7
6
  */
8
- export interface IReservation extends IBaseReservation<IPriceSpecification> {
7
+ export interface IReservation extends IBaseReservation {
9
8
  /**
10
9
  * The individual reservations included in the package. Typically a repeated property.
11
10
  */
@@ -5,7 +5,6 @@ import { ISeatingType } from './place/seat';
5
5
  import { PlaceType } from './placeType';
6
6
  import { IPriceSpecification as IGenericPriceSpecification } from './priceSpecification';
7
7
  import { PriceSpecificationType } from './priceSpecificationType';
8
- import { IServiceType } from './product';
9
8
  import { IProgramMembership } from './programMembership';
10
9
  import { IProject } from './project';
11
10
  import { IPropertyValue } from './propertyValue';
@@ -109,7 +108,9 @@ export interface IBroker {
109
108
  export type IProgramMembershipIssuedThroughFaceToFace = Pick<IProgramMembership, 'typeOf'> & {
110
109
  identifier: string;
111
110
  issuedThrough: {
112
- serviceType: Pick<IServiceType, 'codeValue'>;
111
+ serviceType: {
112
+ codeValue: string;
113
+ };
113
114
  typeOf: PaymentServiceType.FaceToFace;
114
115
  };
115
116
  };
@@ -117,12 +118,13 @@ export type IProgramMembershipIssuedThroughCreditCard = Pick<IProgramMembership,
117
118
  identifier: string;
118
119
  issuedThrough: {
119
120
  id: string;
120
- serviceType: Pick<IServiceType, 'codeValue'>;
121
+ serviceType: {
122
+ codeValue: string;
123
+ };
121
124
  typeOf: PaymentServiceType.CreditCard;
122
125
  };
123
126
  };
124
127
  export type IProgramMembershipUsed = IProgramMembershipIssuedThroughFaceToFace | IProgramMembershipIssuedThroughCreditCard;
125
- export type IServiceTypeOfIssuedThrough = Pick<IServiceType, 'codeValue' | 'inCodeSet' | 'typeOf'>;
126
128
  export type IAvailableReservationStatusType = ReservationStatusType.ReservationCancelled | ReservationStatusType.ReservationConfirmed | ReservationStatusType.ReservationPending;
127
129
  export interface IProvider {
128
130
  /**
@@ -139,7 +141,7 @@ export interface IProvider {
139
141
  * For offers of tickets, restaurant reservations, flights, or rental cars, use Offer.
140
142
  * {@link https://schema.org/Reservation}
141
143
  */
142
- export interface IReservation<T extends Omit<IPriceSpecification, 'project'>> {
144
+ export interface IReservation {
143
145
  project: Pick<IProject, 'id' | 'typeOf'>;
144
146
  /**
145
147
  * type of object
@@ -153,10 +155,6 @@ export interface IReservation<T extends Omit<IPriceSpecification, 'project'>> {
153
155
  * Any additional text to appear on a ticket, such as additional privileges or identifiers.
154
156
  */
155
157
  additionalTicketText?: string;
156
- /**
157
- * Who made the reservation.
158
- * SupersededBy broker(2022-05-13~)
159
- */
160
158
  /**
161
159
  * Date the reservation was made.
162
160
  */
@@ -170,17 +168,6 @@ export interface IReservation<T extends Omit<IPriceSpecification, 'project'>> {
170
168
  * Time the reservation was last modified.
171
169
  */
172
170
  modifiedTime?: Date;
173
- /**
174
- * Web page where reservation can be modified.
175
- */
176
- /**
177
- * Number of seats if unreserved seating.
178
- */
179
- numSeats?: number;
180
- /**
181
- * Total price of the Reservation.
182
- */
183
- price?: T;
184
171
  /**
185
172
  * Any membership in a frequent flyer, hotel loyalty program, etc. being applied to the reservation.
186
173
  */
@@ -6,7 +6,6 @@ exports.ReservationType = void 0;
6
6
  */
7
7
  var ReservationType;
8
8
  (function (ReservationType) {
9
- // BusReservation = 'BusReservation',
10
9
  ReservationType["EventReservation"] = "EventReservation";
11
10
  ReservationType["ReservationPackage"] = "ReservationPackage";
12
11
  })(ReservationType || (exports.ReservationType = ReservationType = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chevre/factory",
3
- "version": "8.1.0-alpha.6",
3
+ "version": "8.1.0",
4
4
  "main": "./lib/index.js",
5
5
  "types": "./lib/index.d.ts",
6
6
  "files": [