Skip to content

Commit

Permalink
決済取引確定アクションのinstrumentを廃止
Browse files Browse the repository at this point in the history
アクションのIParticipantからidentifierを明示的に除外
  • Loading branch information
ilovegadd committed Mar 12, 2024
1 parent 2851091 commit a48f271
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 12 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Expand Up @@ -12,6 +12,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/).

- 決済取引確定アクションのagentを拡張
- 資産取引確定アクションのpotentialActionsを廃止
- 決済取引確定アクションのinstrumentを廃止
- アクションのIParticipantからidentifierを明示的に除外

### Deprecated

Expand Down
11 changes: 4 additions & 7 deletions src/action.ts
Expand Up @@ -5,7 +5,6 @@ import { CreativeWorkType } from './creativeWorkType';
import { OrganizationType } from './organizationType';
import { IPersonAttributes } from './person';
import { IProject } from './project';
// import { IPropertyValue } from './propertyValue';
import { SortType } from './sortType';

export interface IParticipantOptionalAttributes {
Expand All @@ -15,19 +14,23 @@ export interface IParticipantOptionalAttributes {
export type IParticipantAsWebApplication = IParticipantOptionalAttributes & {
typeOf: CreativeWorkType.WebApplication;
id: string;
identifier?: never; // identifierを排除のため
};
export type IParticipantAsPerson = IParticipantOptionalAttributes & Pick<IPersonAttributes, 'id' | 'typeOf'>;
export type IParticipantAsSeller = IParticipantOptionalAttributes & {
typeOf: OrganizationType.Corporation;
id: string;
identifier?: never; // identifierを排除のため
};
export type IParticipantAsProject = IParticipantOptionalAttributes & {
typeOf: OrganizationType.Project;
id: string;
identifier?: never; // identifierを排除のため
};
export type IParticipantAsCustomer = IParticipantOptionalAttributes & {
typeOf: OrganizationType.Organization;
id: string;
identifier?: never; // identifierを排除のため
};
/**
* アクションへの関係者
Expand All @@ -43,17 +46,11 @@ export type IParticipant = IParticipantAsWebApplication
export interface IPurpose {
typeOf: string;
}
/**
* 追加属性
*/
// export type IAdditionalProperty = IPropertyValue<string>[];
/**
* アクション属性
*/
export interface IAttributes<T extends ActionType, TObject, TResult> {
project: Pick<IProject, 'id' | 'typeOf'>;
// 不要なので廃止(2022-11-12~)
// additionalProperty?: IAdditionalProperty;
agent: IParticipant;
description?: string;
error?: any;
Expand Down
5 changes: 2 additions & 3 deletions src/action/interact/confirm.ts
Expand Up @@ -20,9 +20,8 @@ export type IResult = any;
export type IPotentialActions = any;
export interface IAttributes<TObject, TResult> extends Pick<
ActionFactory.IAttributes<ActionType.ConfirmAction, TObject, TResult>,
'agent' | 'error' | 'instrument' | 'object'
// | 'potentialActions' // 廃止(2024-03-11~)
| 'project' | 'purpose' | 'result' | 'typeOf'
'agent' | 'error' | 'object' | 'project' | 'purpose' | 'result' | 'typeOf'
// | 'potentialActions' // 廃止(2024-03-11~)
> {
agent: IAgent;
purpose: IPurpose;
Expand Down
4 changes: 2 additions & 2 deletions src/action/interact/confirm/pay.ts
@@ -1,6 +1,6 @@
import { AssetTransactionType } from '../../../assetTransactionType';
import { ISimpleOrder } from '../../../order';
import { IInstrument } from '../../authorize/paymentMethod/any';
// import { IInstrument } from '../../authorize/paymentMethod/any';
import * as ConfirmActionFactory from '../confirm';

export type IPurpose = ISimpleOrder;
Expand All @@ -24,7 +24,7 @@ export type IObject = IPayAssetTransaction[];
export type IResult = any;
export interface IAttributes extends ConfirmActionFactory.IAttributes<IObject, IResult> {
// 資産取引化(2024-03-11~)
instrument: IInstrument;
// instrument: IInstrument; // 廃止(2024-03-12~)
purpose: IPurpose;
}
/**
Expand Down

0 comments on commit a48f271

Please sign in to comment.