Skip to content

Commit

Permalink
注文のorderedItem.orderedItemにidを保証
Browse files Browse the repository at this point in the history
ISimpleOrderを最適化(customerを廃止)
  • Loading branch information
ilovegadd committed Mar 6, 2024
1 parent 11ebaba commit dfc5415
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/).
- 施設コンテンツのcoaInfoを拡張
- 施設コンテンツのlocationを最適化(kanaNameを廃止)
- 資産取引を最適化(agent)
- 注文のorderedItem.orderedItemにidを保証
- ISimpleOrderを最適化(customerを廃止)

### Deprecated

Expand Down
16 changes: 7 additions & 9 deletions src/order.ts
Original file line number Diff line number Diff line change
Expand Up @@ -284,17 +284,14 @@ export type IBroker = Pick<IPerson, 'id' | 'typeOf'>;
export type IParticipantAsReturner = IParticipantAsPerson | IParticipantAsProject | IParticipantAsWebApplication;
export type IReturner = Pick<IParticipantAsReturner, 'id' | 'typeOf'>;
export type IIdentifier = IPropertyValue<string>[];
export type ISimpleCustomer = Pick<ICustomer, 'id' | 'typeOf'>;
// export type ISimpleCustomer = Pick<ICustomer, 'id' | 'typeOf'>; // 廃止(2024-03-06~)
export type ISimpleSeller = Pick<ISeller, 'id' | 'typeOf' | 'name'>;
export interface ISimpleOrder {
/**
* object type
*/
typeOf: OrderType;
/**
* Party placing the order.
*/
customer: ISimpleCustomer;
// customer: ISimpleCustomer; // 廃止(2024-03-06~)
/**
* The merchant- specific identifier for the transaction.
*/
Expand Down Expand Up @@ -332,6 +329,7 @@ export interface IEventServiceAsOrderedItem {
reservationFor: IReservationFor4EventServiceOrderedItem;
};
serviceType?: EventReservationFactory.IServiceTypeOfIssuedThrough;
id: string; // add(2024-03-06~)
}
export type IReservationFor4TransportationOrderedItem = Pick<ITripAsReservationFor, 'typeOf' | 'id' | 'arrivalTime' | 'departureTime'>;
export interface ITransportationAsOrderedItem {
Expand All @@ -341,11 +339,11 @@ export interface ITransportationAsOrderedItem {
reservationFor: IReservationFor4TransportationOrderedItem;
};
serviceType?: EventReservationFactory.IServiceTypeOfIssuedThrough;
id: string; // add(2024-03-06~)
}
export type IProductAsOrderedItem = Pick<
IProduct,
'id' | 'serviceType' | 'typeOf'
>;
export type IProductAsOrderedItem = Pick<IProduct, 'serviceType' | 'typeOf'> & {
id: string;
};
/**
* 注文アイテム
* {@link https://schema.org/OrderItem}
Expand Down
4 changes: 3 additions & 1 deletion src/reservation/busReservation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ import { ReservationType } from '../reservationType';
import { ITripWithDetails as IBusTrip } from '../trip/busTrip';
import { TripType } from '../tripType';

export type IReservationFor = Pick<IBusTrip, 'arrivalBusStop' | 'arrivalTime' | 'busName' | 'busNumber' | 'departureBusStop' | 'departureTime' | 'id' | 'identifier' | 'name' | 'typeOf'>;
export type IReservationFor = Pick<IBusTrip, 'arrivalBusStop' | 'arrivalTime' | 'busName' | 'busNumber' | 'departureBusStop' | 'departureTime' | 'id' | 'identifier' | 'name' | 'typeOf'> & {
id: string;
};
export type IPriceComponentSpecification = ITicketPriceComponent;
export type IPriceSpecification = ITicketPriceSpecification;
export interface ISubReservation {
Expand Down

0 comments on commit dfc5415

Please sign in to comment.