@chevre/factory 4.393.0-alpha.21 → 4.393.0-alpha.23
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.
- package/lib/action/trade/pay.d.ts +10 -5
- package/lib/action/trade/refund.d.ts +11 -2
- package/lib/assetTransaction/pay.d.ts +5 -1
- package/lib/assetTransaction/refund.d.ts +12 -3
- package/lib/product.d.ts +1 -11
- package/lib/task/pay.d.ts +8 -5
- package/lib/task/refund.d.ts +2 -2
- package/package.json +1 -1
|
@@ -5,13 +5,15 @@ 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';
|
|
16
|
+
import { IAction as IRefundAction } from './refund';
|
|
15
17
|
export { IAlterTranResult, ISeatInfoSyncIn, ISeatInfoSyncResult, IPayCreditCardRecipe, IPayMovieTicketRecipe };
|
|
16
18
|
export import IAgent = ActionFactory.IParticipantAsProject;
|
|
17
19
|
export import IRecipient = ActionFactory.IParticipantAsSeller;
|
|
@@ -97,7 +99,7 @@ export interface IPaymentService {
|
|
|
97
99
|
export type IObject = [IPaymentService];
|
|
98
100
|
export interface IInformPayment {
|
|
99
101
|
purpose: IPayTransactionAsPurpose | IRefundTransactionAsPurpose;
|
|
100
|
-
recipient
|
|
102
|
+
recipient?: never;
|
|
101
103
|
/**
|
|
102
104
|
* potentialAction id
|
|
103
105
|
*/
|
|
@@ -107,11 +109,15 @@ export interface IPotentialActions {
|
|
|
107
109
|
add2report: boolean;
|
|
108
110
|
informPayment?: IInformPayment[];
|
|
109
111
|
}
|
|
110
|
-
export
|
|
112
|
+
export type IOrderAsInstrument = Pick<IOrder, 'orderNumber' | 'typeOf'>;
|
|
113
|
+
export type IAuthorizeActionAsInstrument = Pick<IAuthorizeInvoiceAction, 'id' | 'typeOf'>;
|
|
114
|
+
export interface IPayTransactionAsInstrument {
|
|
111
115
|
id: string;
|
|
112
116
|
transactionNumber: string;
|
|
113
117
|
typeOf: AssetTransactionType.Pay;
|
|
114
118
|
}
|
|
119
|
+
export type IRefundActionAsInstrument = Pick<IRefundAction, 'id' | 'typeOf'>;
|
|
120
|
+
export type IInstrument = IPayTransactionAsInstrument | IOrderAsInstrument | IAuthorizeActionAsInstrument | IRefundActionAsInstrument;
|
|
115
121
|
export interface IResult {
|
|
116
122
|
}
|
|
117
123
|
export interface ILocation {
|
|
@@ -124,11 +130,10 @@ export interface ILocation {
|
|
|
124
130
|
export interface IAttributes extends Pick<ActionFactory.IAttributes<ActionType.PayAction, IObject, IResult>, 'agent' | 'error' | 'instrument' | 'location' | 'object' | 'potentialActions' | 'purpose' | 'recipient' | 'result' | 'project' | 'sameAs' | 'typeOf'> {
|
|
125
131
|
agent: IAgent;
|
|
126
132
|
/**
|
|
127
|
-
* redefine IInstrument(2024-06-15~)
|
|
128
133
|
* 注文決済の場合、決済取引として存在(2024-06-15~)
|
|
129
134
|
* 返品手数料決済の場合、存在しない
|
|
130
135
|
*/
|
|
131
|
-
instrument?: IInstrument;
|
|
136
|
+
instrument?: IPayTransactionAsInstrument | IInstrument[];
|
|
132
137
|
potentialActions?: IPotentialActions;
|
|
133
138
|
purpose: IPurpose;
|
|
134
139
|
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;
|
|
@@ -31,7 +33,7 @@ export interface IResult {
|
|
|
31
33
|
}
|
|
32
34
|
export interface IInformPayment {
|
|
33
35
|
purpose: IRefundTransactionAsPurpose;
|
|
34
|
-
recipient
|
|
36
|
+
recipient?: never;
|
|
35
37
|
/**
|
|
36
38
|
* potentialAction id
|
|
37
39
|
*/
|
|
@@ -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
|
|
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[];
|
package/lib/product.d.ts
CHANGED
|
@@ -66,16 +66,6 @@ export interface ICredentials {
|
|
|
66
66
|
clientId?: string;
|
|
67
67
|
clientSecret?: string;
|
|
68
68
|
}
|
|
69
|
-
export interface IInformPayment {
|
|
70
|
-
recipient?: {
|
|
71
|
-
id?: never;
|
|
72
|
-
name?: never;
|
|
73
|
-
url?: string;
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
export interface IOnPaymentStatusChanged {
|
|
77
|
-
informPayment?: IInformPayment[];
|
|
78
|
-
}
|
|
79
69
|
export interface IAvailableChannel {
|
|
80
70
|
typeOf: 'ServiceChannel';
|
|
81
71
|
serviceUrl?: string;
|
|
@@ -88,7 +78,7 @@ export type IOffer = Pick<IBaseOffer, 'typeOf' | 'priceCurrency' | 'availability
|
|
|
88
78
|
};
|
|
89
79
|
};
|
|
90
80
|
/**
|
|
91
|
-
*
|
|
81
|
+
* product
|
|
92
82
|
* {@link https://schema.org/Product}
|
|
93
83
|
*/
|
|
94
84
|
export interface IProduct extends Pick<IThing, 'name' | 'description'> {
|
package/lib/task/pay.d.ts
CHANGED
|
@@ -1,18 +1,21 @@
|
|
|
1
|
-
import { IAttributes as IPayActionAttributes, IPurposeAsReturnAction } from '../action/trade/pay';
|
|
1
|
+
import { IAttributes as IPayActionAttributes, IOrderAsInstrument, IPurposeAsReturnAction, IRefundActionAsInstrument } from '../action/trade/pay';
|
|
2
2
|
import { IOptimizedPayAction4order } from '../assetTransaction/pay';
|
|
3
3
|
import { IExtendId } from '../autoGenerated';
|
|
4
4
|
import * as TaskFactory from '../task';
|
|
5
5
|
import { TaskName } from '../taskName';
|
|
6
|
+
export type IPayReturnFeeActionInstrument = IOrderAsInstrument | IRefundActionAsInstrument;
|
|
6
7
|
/**
|
|
7
|
-
*
|
|
8
|
+
* in case of pay return fee
|
|
8
9
|
*/
|
|
9
|
-
export interface IPayReturnFeeAction extends Pick<IPayActionAttributes, 'object' | 'potentialActions' | 'purpose' | 'typeOf'> {
|
|
10
|
+
export interface IPayReturnFeeAction extends Pick<IPayActionAttributes, 'object' | 'potentialActions' | 'purpose' | 'typeOf' | 'instrument'> {
|
|
11
|
+
instrument?: IPayReturnFeeActionInstrument[];
|
|
10
12
|
purpose: IPurposeAsReturnAction;
|
|
11
13
|
}
|
|
12
14
|
/**
|
|
13
|
-
*
|
|
15
|
+
* in case of pay order
|
|
14
16
|
*/
|
|
15
17
|
export type IPayOrderAction = Pick<IOptimizedPayAction4order, 'object' | 'purpose'> & {
|
|
18
|
+
instrument?: never;
|
|
16
19
|
typeOf?: never;
|
|
17
20
|
potentialActions?: never;
|
|
18
21
|
};
|
|
@@ -22,6 +25,6 @@ export interface IAttributes extends TaskFactory.IAttributes {
|
|
|
22
25
|
data: IData;
|
|
23
26
|
}
|
|
24
27
|
/**
|
|
25
|
-
*
|
|
28
|
+
* pay task
|
|
26
29
|
*/
|
|
27
30
|
export type ITask = IExtendId<IAttributes>;
|
package/lib/task/refund.d.ts
CHANGED
|
@@ -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>;
|