Skip to content

Commit

Permalink
置換アクションを追加
Browse files Browse the repository at this point in the history
  • Loading branch information
ilovegadd committed Mar 18, 2024
1 parent 864c5e3 commit 46634a3
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 15 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Expand Up @@ -8,6 +8,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/).

### Added

- 置換アクションを追加

### Changed

- MovieTicket認証アクションのobjectを最適化
Expand Down
17 changes: 17 additions & 0 deletions src/action/update/replace.ts
@@ -0,0 +1,17 @@
import * as ActionFactory from '../../action';
import { ActionType } from '../../actionType';

export type IAgent = ActionFactory.IParticipantAsPerson | ActionFactory.IParticipantAsWebApplication;
export type IObject = any;
export type IResult = any;
export type IReplacer = any;

export interface IAttributes<TObject, TResult> extends ActionFactory.IAttributes<ActionType.ReplaceAction, TObject, TResult> {
potentialActions?: never;
replacer?: IReplacer;
}

/**
* 置換アクション
*/
export type IAction<TAttributes extends IAttributes<IObject, IResult>> = ActionFactory.IAction<TAttributes>;
2 changes: 2 additions & 0 deletions src/index.ts
Expand Up @@ -43,6 +43,7 @@ import * as SendEmailMessageActionFactory from './action/transfer/send/message/e
import * as SendOrderActionFactory from './action/transfer/send/order';
import * as DeleteActionFactory from './action/update/delete';
import * as DeleteMemberActionFactory from './action/update/delete/member';
import * as ReplaceActionFactory from './action/update/replace';

import { ActionStatusType } from './actionStatusType';
import { ActionType } from './actionType';
Expand Down Expand Up @@ -318,6 +319,7 @@ export namespace action {
export import IAttributes = DeleteActionFactory.IAttributes;
export import member = DeleteMemberActionFactory;
}
export import replace = ReplaceActionFactory;
}

export namespace consume {
Expand Down
2 changes: 1 addition & 1 deletion src/order.ts
Expand Up @@ -124,7 +124,7 @@ export type IWorkPerformed = Pick<
>;
export type ISuperEvent = Pick<
EventReservationFactory.IOptimizedSuperEvent,
'additionalProperty' | 'id'
'id'
// | 'kanaName' // 廃止(2024-01-22~)
| 'location'
| 'name' | 'soundFormat' | 'typeOf'
Expand Down
3 changes: 3 additions & 0 deletions src/reservation.ts
Expand Up @@ -58,6 +58,9 @@ export interface IUnderName {
gender?: string;
givenName?: string;
id?: string;
/**
* システム利用識別子のみ継承
*/
identifier?: IPropertyValue<string>[];
telephone?: string;
url?: string;
Expand Down
21 changes: 7 additions & 14 deletions src/reservation/event.ts
Expand Up @@ -13,15 +13,14 @@ import * as ReservationFactory from '../reservation';
import { ReservationStatusType } from '../reservationStatusType';
import { ReservationType } from '../reservationType';

export type IOptimizedWorkPerformed = Omit<
export type IOptimizedWorkPerformed = Pick<
IWorkPerformed,
// 不要なので廃止(2022-12-19~)
'project' |
'name'
> & {
// ↓コンテンツ名称がstring型だった時期の予約に関して互換性を維持するため(2022-07-28~)
name?: string | IMultilingualString;
};
'typeOf' | 'id' | 'identifier' | 'duration' | 'contentRating' | 'version'
>
& {
// ↓コンテンツ名称がstring型だった時期の予約に関して互換性を維持するため(2022-07-28~)
name?: string | IMultilingualString;
};
export type IOptimizedSuperEvent = Pick<ISuperEvent,
'additionalProperty' | 'id'
// | 'kanaName' // 廃止(2024-01-26~)
Expand All @@ -37,8 +36,6 @@ export type IOptimizedSuperEvent = Pick<ISuperEvent,
};
export interface IReservationFor {
endDate: Date;
// 不要なので廃止(2022-12-19~)
// eventStatus: EventStatusType;
id: string;
/**
* COA予約でのみ使用されている
Expand All @@ -51,13 +48,9 @@ export interface IReservationFor {
coaInfo?: ICOAInfo;
location: IEventLocation;
name: IEventName;
// 不要なので廃止(2022-12-19~)
// project: Pick<IProject, 'id' | 'typeOf'>;
startDate: Date;
superEvent: IOptimizedSuperEvent;
typeOf: EventType.ScreeningEvent;
// ↓廃止(2022-04-18~)
// workPerformed?: IWorkPerformed;
doorTime?: Date;
}
export type IPriceComponentSpecification = ITicketPriceComponent;
Expand Down

0 comments on commit 46634a3

Please sign in to comment.