Skip to content

Commit

Permalink
Merge branch 'release/4.352.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
ilovegadd committed Jan 31, 2024
2 parents aff70a5 + 00e25bf commit e483780
Show file tree
Hide file tree
Showing 23 changed files with 185 additions and 70 deletions.
26 changes: 26 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,32 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/).

### Security

## v4.352.0 - 2024-02-01

### Added

- アクション検索条件拡張
- 注文取引のresult拡張
- 注文取引にignoreAccpetedOffersFromResultオプションを追加
- 注文取引検索条件拡張
- 決済サービスプロバイダーのIPaymentUrlSettingsにuse3DSを追加
- 注文オファーにserialNumberを追加
- オファー承認アクションにinstrument.transactionNumberを保証
- 販売者のmakesOfferにeligibleMembershipを追加
- 注文取引agentに外部メンバーシップ情報を追加

### Changed

- 決済タスクを最適化された決済アクションデータに対応
- 注文取引のpotentialActionsを最適化
- ConfirmReserveTransactionタスクのobjectを最適化
- ReserveActionのobjectを最適化
- 予約のISuperEventを最適化
- 注文のISuperEventを最適化
- タスクのreserveIfNotYetを廃止
- 通貨転送取引確定アクションを最適化
- SendOrderアクションのpotentialActionsを最適化

## v4.351.0 - 2024-01-17

### Added
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
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@chevre/factory",
"version": "4.351.0",
"version": "4.352.0",
"description": "Chevre Factory Library for Javascript",
"main": "./lib/index.js",
"types": "./lib/index.d.ts",
Expand Down
7 changes: 7 additions & 0 deletions src/action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ export interface ISearchConditions {
limit?: number;
page?: number;
sort?: ISortOrder;
id?: {
$in?: string[];
$nin?: string[];
};
project?: {
id?: { $eq?: string };
};
Expand All @@ -113,6 +117,9 @@ export interface ISearchConditions {
$in?: string[];
};
};
instrument?: {
transactionNumber?: { $eq?: string };
};
location?: {
id?: { $eq?: string };
identifier?: { $eq?: string };
Expand Down
10 changes: 8 additions & 2 deletions src/action/authorize/offer/eventService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,13 @@ export enum ObjectType {
SeatReservation = 'SeatReservation'
}

export type IInstrument<T extends WebAPIFactory.Identifier> = WebAPIFactory.IService<T>;
export type IInstrument<T extends WebAPIFactory.Identifier> = WebAPIFactory.IService<T> & {
/**
* Chevre->予約取引番号
* COA->仮予約番号
*/
transactionNumber?: string;
};

export type IRequestBody<T extends WebAPIFactory.Identifier> =
T extends WebAPIFactory.Identifier.COA ? COA.factory.reserve.IUpdTmpReserveSeatArgs :
Expand Down Expand Up @@ -193,7 +199,7 @@ export type IObject<T extends WebAPIFactory.Identifier> = {
/**
* 進行中取引
*/
pendingTransaction?: IPendingTransaction<T>;
pendingTransaction: IPendingTransaction<T>;
} & Omit<IObjectWithoutDetail<T>, 'acceptedOffer' | 'reservationFor'>;

export interface IPurpose {
Expand Down
18 changes: 9 additions & 9 deletions src/action/authorize/offer/moneyTransfer.ts
Original file line number Diff line number Diff line change
@@ -1,48 +1,48 @@
import * as ActionFactory from '../../../action';
import { ActionType } from '../../../actionType';
import * as MoneyTransferTransactionFactory from '../../../assetTransaction/moneyTransfer';
import { AssetTransactionType } from '../../../assetTransactionType';
import { IOffer } from '../../../offer';
import * as OrderFactory from '../../../order';
import { PriceCurrency } from '../../../priceCurrency';
import { TransactionType } from '../../../transactionType';
import * as AuthorizeActionFactory from '../../authorize';

// 最適化(2022-06-01~)
export type IAgent = ActionFactory.IParticipantAsWebApplication | ActionFactory.IParticipantAsPerson | ActionFactory.IParticipantAsSeller;
// 最適化(2022-06-01~)
export type IRecipient = ActionFactory.IParticipantAsWebApplication | ActionFactory.IParticipantAsPerson;
export type IRequestBody = any;
export type IRequestBody = MoneyTransferTransactionFactory.IStartParamsWithoutDetail;
export type IResponseBody = MoneyTransferTransactionFactory.ITransaction;
export import IPendingTransaction = OrderFactory.IMoneyTransferPendingTransaction;
export type IResultAcceptedOffer = OrderFactory.IAcceptedOffer<OrderFactory.IMoneyTransfer>;
export interface IResult {
price: number;
priceCurrency: PriceCurrency;
requestBody?: IRequestBody;
responseBody: IResponseBody;
acceptedOffers: IResultAcceptedOffer[];
}
export import IItemOffered = OrderFactory.IMoneyTransfer;
export interface IAcceptedOffer extends Omit<IOffer, 'addOn' | 'availability' | 'availableAtOrFrom'> {
itemOffered: IItemOffered;
// seller: ISeller;
seller: ActionFactory.IParticipantAsSeller;
}
export type IObject = IAcceptedOffer;

export interface ITransactionPurpose {
typeOf: TransactionType;
id: string;
}

export type IPurpose = ITransactionPurpose;

export type IError = any;

export interface IInstrument {
typeOf: AssetTransactionType.MoneyTransfer;
transactionNumber: string;
}
export interface IAttributes extends AuthorizeActionFactory.IAttributes<IObject, IResult> {
typeOf: ActionType.AuthorizeAction;
agent: IAgent;
instrument: IInstrument;
recipient: IRecipient;
object: IObject;
purpose: IPurpose;
}

export type IAction = ActionFactory.IAction<IAttributes>;
21 changes: 10 additions & 11 deletions src/action/interact/confirm/moneyTransfer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,26 @@ import { ISimpleOrder } from '../../../order';
import { TransactionType } from '../../../transactionType';
import * as ConfirmActionFactory from '../confirm';

/**
* 転送元あるいは転送先の場所インターフェース
*/
export interface IObject {
// 必要最低限に最適化(2022-05-16~)
pendingTransaction: {
/**
* 資産取引ID
*/
id: string;
};
// pendingTransaction: { // 廃止(2024-01-30~)
// /**
// * 資産取引ID
// */
// id: string;
// };
transactionNumber: string;
typeOf: AssetTransactionType.MoneyTransfer;
}
export type IResult = any;
export interface ITransactionPurpose {
typeOf: TransactionType;
typeOf: TransactionType.MoneyTransfer;
id: string;
}
export type IPurpose = ITransactionPurpose | ISimpleOrder;
export interface IAttributes extends ConfirmActionFactory.IAttributes<IObject, IResult> {
/**
* 注文取引から発生した場合はISimpleOrder
*/
purpose: IPurpose;
}
/**
Expand Down
4 changes: 1 addition & 3 deletions src/action/interact/confirm/registerService.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import * as RegisterServiceFactory from '../../../assetTransaction/registerService';
import { AssetTransactionType } from '../../../assetTransactionType';
import { ISimpleOrder } from '../../../order';
// import * as OrderProgramMembershipFactory from '../../../task/orderProgramMembership';
import * as ConfirmActionFactory from '../confirm';

export type IObject = Pick<RegisterServiceFactory.IConfirmParams, 'transactionNumber' | 'endDate'> & {
transactionNumber?: string;
transactionNumber: string;
typeOf: AssetTransactionType.RegisterService;
// permit.identifierでも確定可能にする(2022-07-19~)
object?: { itemOffered?: { serviceOutput?: { identifier?: string } } };
Expand All @@ -14,7 +13,6 @@ export type IPurpose = ISimpleOrder;
export type IResult = any;
// tslint:disable-next-line:no-empty-interface
export interface IPotentialActions {
// orderProgramMembership?: OrderProgramMembershipFactory.IAttributes[]; // 廃止(2023-08-18~)
}
export interface IAttributes extends ConfirmActionFactory.IAttributes<IObject, IResult> {
potentialActions?: IPotentialActions;
Expand Down
6 changes: 5 additions & 1 deletion src/action/reserve.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ import { ReservationType } from '../reservationType';
import { IAttributes as IMoneyTransferActionAttributes } from './transfer/moneyTransfer';

export type IAgent = ActionFactory.IParticipantAsProject;
export type IReservationFor = IBusReservationFor | IEventReservationFor;
// optimize(2024-01-24~)
// export type IReservationFor = IBusReservationFor | IEventReservationFor;
export type IReservationFor = (Pick<IBusReservationFor, 'id' | 'typeOf'> | Pick<IEventReservationFor, 'id' | 'typeOf'>) & {
optimized: boolean;
};
// ReservationPackageに拡張(2022-12-22~)
export interface IReservationPackageAsObject {
reservationFor: IReservationFor;
Expand Down
12 changes: 2 additions & 10 deletions src/action/transfer/send/order.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ import {
} from '../../../action';
import * as OrderFactory from '../../../order';
import { IGood, IOwnershipInfo } from '../../../ownershipInfo';
import { IAttributes as IMoneyTransferActionAttributes } from '../../interact/confirm/moneyTransfer';
import { IAttributes as IRegisterServiceAttributes } from '../../interact/confirm/registerService';
import * as SendActionFactory from '../send';
import { IAttributes as ISendEmailMessageActionAttributes } from './message/email';

Expand All @@ -27,14 +25,8 @@ export type IObject = OrderFactory.ISimpleOrder & {
*/
export type IResult = IOwnershipInfo<IGood>[];
export interface IPotentialActions {
/**
* 通貨転送アクション
*/
moneyTransfer?: IMoneyTransferActionAttributes[];
/**
* サービス登録アクション
*/
registerService?: IRegisterServiceAttributes[];
// moneyTransfer?: IMoneyTransferActionAttributes[]; // 通貨転送アクション廃止(2024-01-29~)
// registerService?: IRegisterServiceAttributes[]; // サービス登録アクション廃止(2024-01-30~)
/**
* Eメール送信アクション
*/
Expand Down
20 changes: 19 additions & 1 deletion src/assetTransaction/pay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,11 +154,29 @@ export interface IStartParams extends AssetTransactionFactory.IStartParams<Asset
location?: ILocation;
recipient: IRecipient;
}
export interface IOptimizedPayAction4order {
object: {
paymentMethod: {
/**
* 決済取引番号
*/
paymentMethodId: string;
};
};
/**
* 決済元の注文
*/
purpose: Pick<IOrderAsPayPurpose, 'typeOf'> & {
confirmationNumber: string;
orderNumber: string;
};
typeOf?: never;
}
export interface IPotentialActions {
/**
* 決済アクション
*/
pay: IPayActionAttributes[];
pay: IPayActionAttributes[] | IOptimizedPayAction4order[];
}
export interface IPotentialActionsParams {
pay: {
Expand Down
10 changes: 7 additions & 3 deletions src/iam.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,21 @@ export interface IRoleSearchConditions {
}

export type IMemberType = PersonType | CreativeWorkType.WebApplication;
// export type IMemberHasRole = Pick<IRole, 'typeOf' | 'memberOf' | 'roleName'>[];
export type IMemberHasRole = Pick<IRole, 'typeOf' | 'roleName'>[];
export interface IMemberOfRole {
typeOf: IMemberType;
/**
* クライアントID
*/
id: string;
image?: string;
name?: string;
username?: string;
hasRole: IMemberHasRole;
// memberOfを必須化(2023-07-24~)
memberOf: { typeOf: OrganizationType.Corporation | OrganizationType.Project; id: string };
/**
* プロジェクトメンバー or 販売者メンバー
*/
memberOf: { typeOf: OrganizationType.Corporation | OrganizationType.Project; id: string }; // memberOfを必須化(2023-07-24~)
}
export interface IMember {
typeOf: RoleType;
Expand Down
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -660,6 +660,7 @@ export namespace task {
export import cancelPendingReservation = CancelPendingReservationTaskFactory;
export import cancelReservation = CancelReservationTaskFactory;
export import createEvent = CreateEventTaskFactory;
export import confirmReserveTransaction = ConfirmReserveTransactionTaskFactory;
export import deleteTransaction = DeleteTransactionTaskFactory;
export import importEventCapacitiesFromCOA = ImportEventCapacitiesFromCOATaskFactory;
export import importEventsFromCOA = ImportEventsFromCOATaskFactory;
Expand Down
25 changes: 17 additions & 8 deletions src/order.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,18 @@ export type IWorkPerformed = Pick<
EventReservationFactory.IOptimizedWorkPerformed,
'typeOf' | 'id' | 'identifier' | 'name' | 'duration'
>;
export type ISuperEvent = Omit<EventReservationFactory.IOptimizedSuperEvent, 'workPerformed'> & {
export type ISuperEvent = Pick<
EventReservationFactory.IOptimizedSuperEvent,
'additionalProperty' | 'id'
// | 'kanaName' // 廃止(2024-01-22~)
| 'location'
| 'name' | 'soundFormat' | 'typeOf'
| 'videoFormat'
// | 'description' // 廃止(2024-01-26~)
| 'headline'
// ↓COAのみ
| 'identifier' | 'alternativeHeadline' | 'duration' | 'coaInfo'
> & {
workPerformed: IWorkPerformed;
};
export type ITripAsReservationFor = BusReservationFactory.IReservationFor;
Expand Down Expand Up @@ -231,8 +242,6 @@ export type ITicketPriceSpecification = Omit<ICompoundPriceSpecification<ITicket
export type IOfferOptimized4acceptedOffer = Pick<
IOffer,
'typeOf' | 'id' | 'itemOffered' | 'offeredThrough' | 'name'
// 不要なので廃止(2023-07-01~)
// | 'priceCurrency'
>;
/**
* 受け入れオファー
Expand All @@ -242,12 +251,11 @@ export interface IAcceptedOffer<T extends IItemOffered> extends IOfferOptimized4
* オファー対象アイテム
*/
itemOffered: T;
// 不要なので廃止(2023-07-01~)
// seller: {
// typeOf: OrganizationType.Corporation;
// name?: string | IMultilingualString;
// };
priceSpecification?: ITicketPriceSpecification;
/**
* 資産取引を特定する番号(2024-01-30~)
*/
serialNumber?: string;
}
/**
* 販売者
Expand Down Expand Up @@ -583,6 +591,7 @@ export interface IAcceptedOffersSearchConditions {
*/
programMembershipUsed?: IProgramMembershipUsedSearchConditions;
};
serialNumber?: { $eq?: string };
}
/**
* 注文検索条件
Expand Down
10 changes: 6 additions & 4 deletions src/reservation/event.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,13 @@ export type IOptimizedWorkPerformed = Omit<
name?: string | IMultilingualString;
};
export type IOptimizedSuperEvent = Pick<ISuperEvent,
// 不要なので廃止(2022-12-19~)
// 'project' |
'additionalProperty' | 'id' | 'kanaName' | 'location'
'additionalProperty' | 'id'
// | 'kanaName' // 廃止(2024-01-26~)
| 'location'
| 'name' | 'soundFormat' | 'typeOf'
| 'videoFormat' | 'description' | 'headline'
| 'videoFormat'
// | 'description' // 廃止(2024-01-26~)
| 'headline'
// ↓COAのみ
| 'identifier' | 'alternativeHeadline' | 'duration' | 'coaInfo'
> & {
Expand Down

0 comments on commit e483780

Please sign in to comment.