@chevre/factory 4.393.0-alpha.21 → 4.393.0-alpha.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,12 +5,13 @@ import { ActionType } from '../../actionType';
5
5
  import { AssetTransactionType } from '../../assetTransactionType';
6
6
  import { CreativeWorkType } from '../../creativeWorkType';
7
7
  import { IPaymentServiceOutput } from '../../invoice';
8
- import { ITotalPaymentDue, OrderType } from '../../order';
8
+ import { IOrder, ITotalPaymentDue, OrderType } from '../../order';
9
9
  import { IMovieTicketPaymentCard } from '../../paymentMethod/paymentCard/movieTicket';
10
10
  import { IPropertyValue } from '../../propertyValue';
11
11
  import { IAlterTranResult, IRecipe as IPayCreditCardRecipe } from '../../recipe/payCreditCard';
12
12
  import { IRecipe as IPayMovieTicketRecipe, ISeatInfoSyncIn, ISeatInfoSyncResult } from '../../recipe/payMovieTicket';
13
13
  import { PaymentServiceType } from '../../service/paymentService';
14
+ import { IAction as IAuthorizeInvoiceAction } from '../authorize/invoice';
14
15
  import { IPayTransactionAsPurpose, IRefundTransactionAsPurpose } from '../interact/inform';
15
16
  export { IAlterTranResult, ISeatInfoSyncIn, ISeatInfoSyncResult, IPayCreditCardRecipe, IPayMovieTicketRecipe };
16
17
  export import IAgent = ActionFactory.IParticipantAsProject;
@@ -107,11 +108,14 @@ export interface IPotentialActions {
107
108
  add2report: boolean;
108
109
  informPayment?: IInformPayment[];
109
110
  }
110
- export interface IInstrument {
111
+ export type IOrderAsInstrument = Pick<IOrder, 'orderNumber' | 'typeOf'>;
112
+ export type IAuthorizeActionAsInstrument = Pick<IAuthorizeInvoiceAction, 'id' | 'typeOf'>;
113
+ export interface IPayTransactionAsInstrument {
111
114
  id: string;
112
115
  transactionNumber: string;
113
116
  typeOf: AssetTransactionType.Pay;
114
117
  }
118
+ export type IInstrument = IPayTransactionAsInstrument | IOrderAsInstrument | IAuthorizeActionAsInstrument;
115
119
  export interface IResult {
116
120
  }
117
121
  export interface ILocation {
@@ -124,11 +128,10 @@ export interface ILocation {
124
128
  export interface IAttributes extends Pick<ActionFactory.IAttributes<ActionType.PayAction, IObject, IResult>, 'agent' | 'error' | 'instrument' | 'location' | 'object' | 'potentialActions' | 'purpose' | 'recipient' | 'result' | 'project' | 'sameAs' | 'typeOf'> {
125
129
  agent: IAgent;
126
130
  /**
127
- * redefine IInstrument(2024-06-15~)
128
131
  * 注文決済の場合、決済取引として存在(2024-06-15~)
129
132
  * 返品手数料決済の場合、存在しない
130
133
  */
131
- instrument?: IInstrument;
134
+ instrument?: IPayTransactionAsInstrument | IInstrument[];
132
135
  potentialActions?: IPotentialActions;
133
136
  purpose: IPurpose;
134
137
  recipient: IRecipient;
@@ -1,9 +1,11 @@
1
1
  import * as ActionFactory from '../../action';
2
2
  import { ActionType } from '../../actionType';
3
+ import { IOrder } from '../../order';
3
4
  import { IAlterTranResult, IRecipe as IRefundCreditCardRecipe } from '../../recipe/refundCreditCard';
4
5
  import { IRecipe as IRefundMovieTicketRecipe, ISeatInfoSyncCancelIn, ISeatInfoSyncCancelResult, ISeatInfoSyncIn, ISeatInfoSyncResult } from '../../recipe/refundMovieTicket';
5
6
  import { TransactionType } from '../../transactionType';
6
7
  import { IRefundTransactionAsPurpose } from '../interact/inform';
8
+ import { IAction as IReturnInvoiceAction } from '../transfer/return/invoice';
7
9
  import { IOrderAsPayPurpose, IPaymentMethod, IPaymentService as IPaymentServiceOnPay, IPurposeAsAssetTransaction, IPurposeAsReturnAction } from './pay';
8
10
  export { IAlterTranResult, ISeatInfoSyncCancelIn, ISeatInfoSyncCancelResult, ISeatInfoSyncIn, ISeatInfoSyncResult, IRefundCreditCardRecipe, IRefundMovieTicketRecipe };
9
11
  export type IAgent = ActionFactory.IParticipantAsSeller;
@@ -49,13 +51,20 @@ export type IPurpose = IOrderAsPayPurpose | // 決済カードIF承認時の着
49
51
  IPurposeAsReturnAction | // 注文返品の場合
50
52
  IPurposeAsPlaceOrder | // 注文取引における発行済決済URL無効化の場合
51
53
  IPurposeAsAssetTransaction;
54
+ export type IOrderAsInstrument = Pick<IOrder, 'orderNumber' | 'typeOf'>;
55
+ export type IReturnActionAsInstrument = Pick<IReturnInvoiceAction, 'id' | 'typeOf'>;
56
+ export type IInstrument = IOrderAsInstrument | IReturnActionAsInstrument;
52
57
  export interface IAttributes extends Pick<ActionFactory.IAttributes<ActionType.RefundAction, IObject, IResult>, 'agent' | 'error' | 'object' | 'potentialActions' | 'purpose' | 'recipient' | 'result' | 'project' | 'sameAs' | 'typeOf'> {
53
58
  agent: IAgent;
54
59
  recipient?: IRecipient;
55
60
  purpose: IPurpose;
56
61
  potentialActions?: IPotentialActions;
62
+ /**
63
+ * add(2025-02-17~)
64
+ */
65
+ instrument?: IInstrument[];
57
66
  }
58
67
  /**
59
- * 返金アクション
68
+ * refund action
60
69
  */
61
70
  export type IAction = ActionFactory.IAction<IAttributes>;
@@ -1,4 +1,4 @@
1
- import { IAction as IPayAction, ILocation, IMovieTicket, IOrderAsPayPurpose, IPendingTransaction, IRecipient as IPayRecipient } from '../action/trade/pay';
1
+ import { IAction as IPayAction, IInstrument, ILocation, IMovieTicket, IOrderAsPayPurpose, IPendingTransaction, IRecipient as IPayRecipient } from '../action/trade/pay';
2
2
  import * as AssetTransactionFactory from '../assetTransaction';
3
3
  import { AssetTransactionType } from '../assetTransactionType';
4
4
  import { IExtendId } from '../autoGenerated';
@@ -121,6 +121,10 @@ export interface IStartParams extends AssetTransactionFactory.IStartParams<Asset
121
121
  location?: ILocation;
122
122
  recipient: IRecipient;
123
123
  potentialAction?: IPotentialAction[];
124
+ /**
125
+ * add(2025-02-18~)
126
+ */
127
+ instrument?: IInstrument[];
124
128
  }
125
129
  export interface IOptimizedPayAction4order {
126
130
  object: {
@@ -1,5 +1,5 @@
1
1
  import { IPaymentMethod, IPurposeAsReturnAction } from '../action/trade/pay';
2
- import { IAttributes as IRefundActionAttributes, IRecipient as IRefundRecipient } from '../action/trade/refund';
2
+ import { IAttributes as IRefundActionAttributes, IInstrument, IRecipient as IRefundRecipient } from '../action/trade/refund';
3
3
  import * as AssetTransactionFactory from '../assetTransaction';
4
4
  import { AssetTransactionType } from '../assetTransactionType';
5
5
  import { IExtendId } from '../autoGenerated';
@@ -22,9 +22,18 @@ export interface IObject {
22
22
  }
23
23
  export type IObjectWithoutDetail = Pick<IObject, 'typeOf' | 'id' | 'paymentMethod' | 'refundFee'>;
24
24
  export type IPotentialAction = IPotentialInformAction;
25
- export type IStartParamsWithoutDetail = AssetTransactionFactory.IStartParams<AssetTransactionType.Refund, IAgent, IRecipient, IObjectWithoutDetail>;
25
+ export interface IStartParamsWithoutDetail extends AssetTransactionFactory.IStartParams<AssetTransactionType.Refund, IAgent, IRecipient, IObjectWithoutDetail> {
26
+ /**
27
+ * add(2025-02-18~)
28
+ */
29
+ instrument: IInstrument[];
30
+ }
26
31
  export interface IStartParams extends AssetTransactionFactory.IStartParams<AssetTransactionType.Refund, IAgent, IRecipient, IObject> {
27
32
  potentialAction?: IPotentialAction[];
33
+ /**
34
+ * add(2025-02-18~)
35
+ */
36
+ instrument?: IInstrument[];
28
37
  }
29
38
  export type IRefundPurpose = IPurposeAsReturnAction;
30
39
  export interface IPotentialActionsParams {
@@ -52,7 +61,7 @@ export interface IPotentialActions {
52
61
  }
53
62
  export type ITransaction = IExtendId<IAttributes>;
54
63
  /**
55
- * 返金取引
64
+ * refund transaction
56
65
  */
57
66
  export interface IAttributes extends AssetTransactionFactory.IAttributes<IStartParams, IResult, IError, IPotentialActions> {
58
67
  potentialAction?: IPotentialAction[];
@@ -2,12 +2,12 @@ import { IAttributes as IRefundActionAttributes } from '../action/trade/refund';
2
2
  import { IExtendId } from '../autoGenerated';
3
3
  import * as TaskFactory from '../task';
4
4
  import { TaskName } from '../taskName';
5
- export type IData = Pick<IRefundActionAttributes, 'agent' | 'object' | 'potentialActions' | 'project' | 'purpose' | 'recipient' | 'typeOf'>;
5
+ export type IData = Pick<IRefundActionAttributes, 'agent' | 'object' | 'potentialActions' | 'project' | 'purpose' | 'recipient' | 'typeOf' | 'instrument'>;
6
6
  export interface IAttributes extends TaskFactory.IAttributes {
7
7
  name: TaskName.Refund;
8
8
  data: IData;
9
9
  }
10
10
  /**
11
- * 返金タスク
11
+ * refund task
12
12
  */
13
13
  export type ITask = IExtendId<IAttributes>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chevre/factory",
3
- "version": "4.393.0-alpha.21",
3
+ "version": "4.393.0-alpha.22",
4
4
  "description": "Chevre Factory Library for Javascript",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",