Skip to content

Commit

Permalink
Merge branch 'release/4.367.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
ilovegadd committed Apr 18, 2024
2 parents 524ffbd + b8afb5b commit 50bfedf
Show file tree
Hide file tree
Showing 16 changed files with 123 additions and 130 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Expand Up @@ -18,6 +18,20 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/).

### Security

## v4.367.0 - 2024-04-19

### Changed

- 注文のadditionalPropertyを廃止
- 注文のdiscountsを廃止
- 予約にチケット識別子を拡張
- 決済カードにチケット識別子を拡張
- 予約取引開始時のチケット識別子指定に対応
- アクションのpurposeを最適化
- 注文検索条件拡張
- 資産取引検索条件拡張
- 予約取消取引のobjectをReservationPackageとして再定義

## v4.366.0 - 2024-04-12

### Changed
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "@chevre/factory",
"version": "4.366.0",
"version": "4.367.0",
"description": "Chevre Factory Library for Javascript",
"main": "./lib/index.js",
"types": "./lib/index.d.ts",
Expand Down
16 changes: 2 additions & 14 deletions src/action/authorize.ts
@@ -1,26 +1,14 @@
import * as ActionFactory from '../action';
import { ActionType } from '../actionType';

/**
* 承認対象インターフェース
*/
export type IObject = any;
/**
* 承認結果インターフェース
*/
export type IResult = any;
/**
* 承認目的インターフェース
*/
export type IPurpose = any;
/**
* アクション属性インターフェース
*/
export interface IAttributes<TObject, TResult> extends ActionFactory.IAttributes<ActionType.AuthorizeAction, TObject, TResult> {
purpose: IPurpose;
purpose?: IPurpose;
recipient: ActionFactory.IParticipant;
}
/**
* 承認アクションインターフェース
* 承認アクション
*/
export type IAction<TAttributes extends IAttributes<IObject, IResult>> = ActionFactory.IAction<TAttributes>;
2 changes: 1 addition & 1 deletion src/action/check/paymentMethod/movieTicket.ts
Expand Up @@ -2,7 +2,7 @@ import type * as surfrock from '@surfrock/sdk';

import * as ActionFactory from '../../../action';
import { OrganizationType } from '../../../organizationType';
import { IMovieTicket as IMovieTicketPaymentCard, IServiceOutput as IMovieTicketServiceOutput } from '../../../paymentMethod/paymentCard/movieTicket';
import { IMovieTicketPaymentCard, IMovieTicketServiceOutput } from '../../../paymentMethod/paymentCard/movieTicket';
import { TransactionType } from '../../../transactionType';
import * as CheckActionFactory from '../../check';
import * as PayActionFactory from '../../trade/pay';
Expand Down
7 changes: 4 additions & 3 deletions src/action/consume/use.ts
Expand Up @@ -3,9 +3,10 @@ import { ActionType } from '../../actionType';

export type IObject = any;
export type IResult = any;
export type IPurpose = any;
export interface IAttributes<TObject, TResult> extends ActionFactory.IAttributes<ActionType.UseAction, TObject, TResult> {
purpose?: IPurpose;
export interface IAttributes<TObject, TResult> extends Pick<
ActionFactory.IAttributes<ActionType.UseAction, TObject, TResult>,
'typeOf' | 'result' | 'project' | 'object' | 'location' | 'error' | 'instrument' | 'agent'
> {
}
/**
* 使用アクション
Expand Down
2 changes: 0 additions & 2 deletions src/action/consume/use/reservation.ts
Expand Up @@ -16,7 +16,6 @@ export interface ILocation {
*/
identifier: string;
}
// export type IPotentialActions = any;
export interface IInstrument {
/**
* JWT
Expand All @@ -32,7 +31,6 @@ export interface IAttributes extends UseActionFactory.IAttributes<IObject, IResu
agent: IAgent;
instrument: IInstrument;
location?: ILocation;
// potentialActions?: IPotentialActions;
}
/**
* 予約使用アクション
Expand Down
2 changes: 1 addition & 1 deletion src/action/trade/pay.ts
Expand Up @@ -8,7 +8,7 @@ import { AssetTransactionType } from '../../assetTransactionType';
import { CreativeWorkType } from '../../creativeWorkType';
import { IPaymentServiceOutput } from '../../invoice';
import { ITotalPaymentDue, OrderType } from '../../order';
import { IMovieTicket as IMovieTicketPaymentCard } from '../../paymentMethod/paymentCard/movieTicket';
import { IMovieTicketPaymentCard } from '../../paymentMethod/paymentCard/movieTicket';
import { IPropertyValue } from '../../propertyValue';
import { PaymentServiceType } from '../../service/paymentService';
import { IAttributes as IInformActionAttributes } from '../interact/inform';
Expand Down
3 changes: 1 addition & 2 deletions src/additionalProperty.ts
Expand Up @@ -4,7 +4,6 @@ import { EventType } from './eventType';
import { IMultilingualString } from './multilingualString';
import { IOfferCatalog } from './offerCatalog';
import { OfferType } from './offerType';
import { OrderType } from './order';
import { PlaceType } from './placeType';
import { IProject } from './project';
import { PropertyValueType } from './propertyValue';
Expand All @@ -22,7 +21,7 @@ export type CategorySetIdentifier = CategoryCodeType
| PropertyValueType.LocationFeatureSpecification
| OfferCatalogType
| OfferType.Offer
| OrderType.Order
// | OrderType.Order // 廃止(2024-04-12~)
| PlaceType.MovieTheater
| PlaceType.Seat
| SellerType;
Expand Down
22 changes: 15 additions & 7 deletions src/assetTransaction/cancelReservation.ts
Expand Up @@ -6,8 +6,8 @@ import { IExtendId } from '../autoGenerated';
import { IClientUser } from '../clientUser';
import { IReservation as IBusReservation, IReservationFor as IBusReservationFor } from '../reservation/busReservation';
import { IReservation as IEventReservation, IReservationFor as IEventReservationFor } from '../reservation/event';
import { IReservation as IReservationPackage } from '../reservation/reservationPackage';

// 最適化(2022-05-27~)
export import IAgent = AssetTransactionFactory.IAgent;
export type IStartParamsWithoutDetail =
AssetTransactionFactory.IStartParams<AssetTransactionType.CancelReservation, IAgent, undefined, IObjectWithoutDetail>;
Expand All @@ -26,12 +26,11 @@ export interface IObjectWithoutDetail {
clientUser?: IClientUser;
reservation?: {
/**
* 予約IDをキーに取消
* 予約IDで取消
*/
id?: string;
// id?: string | string[];
/**
* 予約番号をキーに取消
* 予約番号で取消
*/
reservationNumber?: string;
};
Expand All @@ -56,12 +55,14 @@ export type IEventReservationAsObject = Pick<
/**
* 取引対象物
*/
export interface IObject {
export interface IObject extends Pick<IReservationPackage, 'reservationNumber' | 'typeOf'> { // IReservationPackageとして再定義(2024-04-18~)
clientUser?: IClientUser;
// 最適化(2022-12-28~)
// transaction?: IReserveTransaction;
transaction?: IReserveTransactionAsObject;
reservations?: IBusReservationAsObject[] | IEventReservationAsObject[];
/**
* 予約番号
*/
reservationNumber: string; // IReservationPackageとして再定義(2024-04-18~)
}
/**
* 取引確定パラメータ
Expand All @@ -79,5 +80,12 @@ export type ITransaction = IExtendId<IAttributes>;
export interface IAttributes
extends AssetTransactionFactory.IAttributes<IStartParams, IResult, IError, IPotentialActions> {
}
export interface IObjectSearchConditions {
reservationNumber?: {
$eq?: string;
$in?: string[];
};
}
export interface ISearchConditions extends AssetTransactionFactory.ISearchConditions<AssetTransactionType.CancelReservation> {
object?: IObjectSearchConditions; // 拡張(2024-04-18~)
}
6 changes: 6 additions & 0 deletions src/assetTransaction/pay.ts
Expand Up @@ -209,5 +209,11 @@ export interface ISearchConditions extends AssetTransactionFactory.ISearchCondit
accountId?: {
$eq?: string;
};
/**
* 決済サービスタイプ
*/
typeOf?: {
$eq?: string;
};
};
}
27 changes: 14 additions & 13 deletions src/assetTransaction/reserve.ts
Expand Up @@ -84,12 +84,16 @@ export interface IBusReservatonAsItemOfferedServiceOutput {
// 適用メンバーシップ
programMembershipUsed?: IAcceptedProgramMembershipUsed;
reservedTicket?: {
/**
* チケット識別子
* 指定された場合、決済カードの対象チケット識別子と関連付けされます
* /^[0-9a-zA-Z]{8,16}$/
*/
identifier?: string; // 拡張(2024-04-15~)
issuedBy?: ReservationFactory.IUnderName;
typeOf: ReservationFactory.TicketType;
/**
* 予約座席指定
* 指定席イベントの場合、座席を指定
* 自由席イベントの場合、あるいは、最大収容人数がないイベントの場合は、座席指定不要
* 座席指定
*/
ticketedSeat?: ReservationFactory.ISeat;
};
Expand All @@ -108,12 +112,16 @@ export interface IEventReservatonAsItemOfferedServiceOutput {
// 適用メンバーシップ
programMembershipUsed?: IAcceptedProgramMembershipUsed;
reservedTicket?: {
/**
* チケット識別子
* 指定された場合、決済カードの対象チケット識別子と関連付けされます
* /^[0-9a-zA-Z]{8,16}$/
*/
identifier?: string; // 拡張(2024-04-15~)
issuedBy?: ReservationFactory.IUnderName;
typeOf: ReservationFactory.TicketType;
/**
* 予約座席指定
* 指定席イベントの場合、座席を指定
* 自由席イベントの場合、あるいは、最大収容人数がないイベントの場合は、座席指定不要
* 座席指定
*/
ticketedSeat?: ReservationFactory.ISeat;
};
Expand Down Expand Up @@ -242,13 +250,6 @@ export type IOmittedReservationProperty = 'reservationFor' | 'broker' | 'issuedT
| 'project' | 'reservationNumber' | 'bookingTime' | 'modifiedTime' | 'underName' | 'checkedIn' | 'attended';
export type IObjectSubReservation =
Omit<IBusReservation, IOmittedReservationProperty> | Omit<IEventReservation, IOmittedReservationProperty>;
export type IObjectSubReservationReservedTicket = Pick<ReservationFactory.ITicket, 'issuedBy' | 'ticketedSeat' | 'ticketType'>;
export type IMinimizedObjectSubReservation = Pick<
IObjectSubReservation,
'typeOf' | 'id' | 'subReservation'
> & {
reservedTicket: IObjectSubReservationReservedTicket;
};
export type IIssuedThrough = IBusReservationIssuedThrough | IEventReservationIssuedThrough;
/**
* 取引対象物
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Expand Up @@ -408,7 +408,7 @@ export import ownershipInfo = OwnershipInfoFactory;

export namespace paymentMethod {
export type ISearchConditions = any;
export type IPaymentMethod = CreditCardFactory.ICheckedCard | MovieTicketFactory.IMovieTicket;
export type IPaymentMethod = CreditCardFactory.ICheckedCard | MovieTicketFactory.IMovieTicketPaymentCard;

export namespace paymentCard {
export import IPaymentCard = PaymentCardFactory.IPaymentCard;
Expand Down
66 changes: 23 additions & 43 deletions src/order.ts
Expand Up @@ -96,28 +96,6 @@ export interface IReferencedInvoice {
additionalProperty: IPropertyValue<string>[];
issuedThrough: IOrderPaymentMethodIssuedThrough;
}
/**
* ディスカウント
*/
export interface IDiscount {
/**
* 割引タイプ
*/
typeOf: string;
name: string;
/**
* Any discount applied.
*/
discount: number;
/**
* Code used to redeem a discount.
*/
discountCode: string;
/**
* The currency (in 3 - letter ISO 4217 format) of the discount.
*/
discountCurrency: string;
}
export type IWorkPerformed = Pick<
EventReservationFactory.IOptimizedWorkPerformed,
'typeOf' | 'id' | 'identifier' | 'name' | 'duration'
Expand All @@ -143,9 +121,10 @@ export type IEventAsReservationFor = Omit<EventReservationFactory.IReservationFo
export type IReservedTicket = Pick<
ITicket,
'typeOf' | 'ticketedSeat' |
'identifier' | // 追加(2024-04-15~)
'ticketNumber' |
// 以下COAのみ
'dateIssued' |
'ticketNumber' |
'ticketToken' |
'coaTicketInfo' |
'coaReserveAmount'
Expand All @@ -156,7 +135,6 @@ export type IBusReservation = Pick<
BusReservationFactory.IReservation,
'additionalProperty' |
'additionalTicketText' |
// 'bookingTime' |
'id' |
'issuedThrough' |
'programMembershipUsed' |
Expand All @@ -170,7 +148,6 @@ export type IEventReservation = Pick<
EventReservationFactory.IReservation,
'additionalProperty' |
'additionalTicketText' |
// 'bookingTime' |
'id' |
'issuedThrough' |
'programMembershipUsed' |
Expand Down Expand Up @@ -355,7 +332,7 @@ export interface IOrderedItem {
export interface IOrder extends ISimpleOrder {
id?: string; // 追加(2023-02-13~)
project: IProject;
additionalProperty?: IPropertyValue<string>[]; // 追加(2023-02-13~)
// additionalProperty?: IPropertyValue<string>[]; // 追加(2023-02-13~) // 廃止(2024-04-12~)
/**
* An entity that arranges for an exchange between a buyer and a seller.
* In most cases a broker never acquires or releases ownership of a product or service involved in an exchange.
Expand All @@ -370,10 +347,7 @@ export interface IOrder extends ISimpleOrder {
* Date order was returned.
*/
dateReturned?: Date;
/**
* discount infos
*/
discounts: IDiscount[];
// discounts: IDiscount[]; // 廃止(2024-04-16~)
/**
* The identifier property represents any kind of identifier for any kind of Thing
*/
Expand Down Expand Up @@ -584,6 +558,12 @@ export interface IAcceptedOffersSearchConditions {
* 使用メンバーシップ
*/
programMembershipUsed?: IProgramMembershipUsedSearchConditions;
reservedTicket?: {
/**
* 予約チケット識別子
*/
identifier?: { $eq?: string };
};
};
serialNumber?: { $eq?: string };
}
Expand All @@ -597,19 +577,19 @@ export interface ISearchConditions {
project?: {
id?: { $eq?: string };
};
additionalProperty?: {
$all?: IPropertyValue<string>[];
$in?: IPropertyValue<string>[];
$nin?: IPropertyValue<string>[];
$elemMatch?: {
name?: {
/**
* 一致する名称の追加特性がひとつでも存在する
*/
$eq?: string;
};
};
};
// additionalProperty?: { // 廃止(2024-04-12~)
// $all?: IPropertyValue<string>[];
// $in?: IPropertyValue<string>[];
// $nin?: IPropertyValue<string>[];
// $elemMatch?: {
// name?: {
// /**
// * 一致する名称の追加特性がひとつでも存在する
// */
// $eq?: string;
// };
// };
// };
broker?: {
id?: { $eq?: string };
};
Expand Down

0 comments on commit 50bfedf

Please sign in to comment.