@chevre/factory 5.3.0-alpha.1 → 5.3.0-alpha.3
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/accept/pay.d.ts +20 -1
- package/lib/action/authorize/paymentMethod/any.d.ts +21 -12
- package/lib/assetTransaction/pay.d.ts +40 -3
- package/lib/authorization.d.ts +9 -2
- package/lib/invoice.d.ts +0 -4
- package/lib/order.d.ts +1 -0
- package/lib/task/publishPaymentUrl.d.ts +1 -1
- package/package.json +1 -1
|
@@ -7,10 +7,16 @@ import { TransactionType } from '../../transactionType';
|
|
|
7
7
|
import * as AcceptActionFactory from '../accept';
|
|
8
8
|
export { IExecTran3dsArgs, IExecTran3dsResult, IAgent, IRecipe };
|
|
9
9
|
export type IPaymentMethod = Pick<IPaymentMethodWithoutDetail, 'amount' | 'creditCard' | 'identifier' | 'method'>;
|
|
10
|
-
|
|
10
|
+
/**
|
|
11
|
+
* 採用する決済方法
|
|
12
|
+
*/
|
|
13
|
+
export type IPayObject = Pick<IObjectWithoutDetail, 'id' | 'typeOf' | 'serviceOutput'> & {
|
|
11
14
|
paymentMethod: IPaymentMethod;
|
|
12
15
|
};
|
|
13
16
|
export interface IObject {
|
|
17
|
+
/**
|
|
18
|
+
* 決済方法(決済サービス)
|
|
19
|
+
*/
|
|
14
20
|
object: IPayObject;
|
|
15
21
|
transactionNumber: string;
|
|
16
22
|
typeOf: AssetTransactionType.Pay;
|
|
@@ -23,6 +29,14 @@ export interface IPurpose {
|
|
|
23
29
|
typeOf: TransactionType.PlaceOrder;
|
|
24
30
|
id: string;
|
|
25
31
|
}
|
|
32
|
+
/**
|
|
33
|
+
* 決済方法チケット
|
|
34
|
+
*/
|
|
35
|
+
export interface ITicketAsInstrument {
|
|
36
|
+
ticketToken: string;
|
|
37
|
+
typeOf: 'Ticket';
|
|
38
|
+
}
|
|
39
|
+
export type IInstrument = ITicketAsInstrument;
|
|
26
40
|
/**
|
|
27
41
|
* 決済採用アクション属性
|
|
28
42
|
*/
|
|
@@ -36,6 +50,11 @@ export interface IAttributes extends Pick<AcceptActionFactory.IAttributes<IObjec
|
|
|
36
50
|
* authorize payment action identifier
|
|
37
51
|
*/
|
|
38
52
|
identifier?: string;
|
|
53
|
+
/**
|
|
54
|
+
* 決済採用に使用されるチケット
|
|
55
|
+
* 2025-11-22まではinstrument自体存在しない
|
|
56
|
+
*/
|
|
57
|
+
instrument?: IInstrument[];
|
|
39
58
|
}
|
|
40
59
|
/**
|
|
41
60
|
* 決済採用アクション
|
|
@@ -2,7 +2,7 @@ import * as ActionFactory from '../../../action';
|
|
|
2
2
|
import * as CheckMovieTicketActionFactory from '../../../action/check/paymentMethod/movieTicket';
|
|
3
3
|
import { AvailablePaymentMethodType, IMovieTicket } from '../../../action/trade/pay';
|
|
4
4
|
import { ActionType } from '../../../actionType';
|
|
5
|
-
import { ICreditCard, IFromLocation, ITokenizedPaymentCard } from '../../../assetTransaction/pay';
|
|
5
|
+
import { ICreditCard, IFromLocation, IInvoiceReferenceOrder, ITokenizedPaymentCard } from '../../../assetTransaction/pay';
|
|
6
6
|
import { AssetTransactionType } from '../../../assetTransactionType';
|
|
7
7
|
import { IOrderPaymentMethodIssuedThrough, ITotalPaymentDue } from '../../../order';
|
|
8
8
|
import { PaymentStatusType } from '../../../paymentStatusType';
|
|
@@ -77,10 +77,12 @@ export interface IObjectIncludingPaymentMethodDetails {
|
|
|
77
77
|
*/
|
|
78
78
|
movieTickets?: IMovieTicket[];
|
|
79
79
|
/**
|
|
80
|
-
*
|
|
81
|
-
* 2024-08-13~
|
|
80
|
+
* 決済方法チケット
|
|
81
|
+
* 当初はメンバーシップチケットとして使用(2024-08-13~)
|
|
82
|
+
* メンバーシップチケットに限らず、承認前に発行された決済方法チケットを指定すると、paymentMethodIdはチケットに依存する
|
|
82
83
|
*/
|
|
83
84
|
ticketToken?: string;
|
|
85
|
+
referencesOrder: IInvoiceReferenceOrder;
|
|
84
86
|
}
|
|
85
87
|
export type IAuthorizeAnyPaymentObject = Pick<IObjectIncludingPaymentMethodDetails, 'amount' | 'issuedThrough' | 'paymentMethod' | 'name' | 'additionalProperty' | 'ticketToken'> & {
|
|
86
88
|
creditCard?: never;
|
|
@@ -88,16 +90,18 @@ export type IAuthorizeAnyPaymentObject = Pick<IObjectIncludingPaymentMethodDetai
|
|
|
88
90
|
movieTickets?: never;
|
|
89
91
|
paymentMethodId?: never;
|
|
90
92
|
fromLocation?: never;
|
|
91
|
-
description?:
|
|
93
|
+
description?: never;
|
|
94
|
+
referencesOrder?: never;
|
|
92
95
|
};
|
|
93
96
|
export type IAuthorizeCreditCardObject = Pick<IObjectIncludingPaymentMethodDetails, 'amount' | 'issuedThrough' | 'paymentMethod' | 'creditCard' | 'method' | 'name' | 'additionalProperty' | 'ticketToken'> & {
|
|
94
97
|
/**
|
|
95
98
|
* 決済URL発行の場合、発行済のpaymentMethodIdを指定
|
|
96
99
|
*/
|
|
97
100
|
paymentMethodId?: string;
|
|
101
|
+
referencesOrder?: IInvoiceReferenceOrder;
|
|
98
102
|
movieTickets?: never;
|
|
99
103
|
fromLocation?: never;
|
|
100
|
-
description?:
|
|
104
|
+
description?: never;
|
|
101
105
|
};
|
|
102
106
|
export type IAuthorizeMovieTicketObject = Pick<IObjectIncludingPaymentMethodDetails, 'issuedThrough' | 'paymentMethod' | 'movieTickets' | 'name' | 'additionalProperty' | 'ticketToken'> & {
|
|
103
107
|
/**
|
|
@@ -108,7 +112,8 @@ export type IAuthorizeMovieTicketObject = Pick<IObjectIncludingPaymentMethodDeta
|
|
|
108
112
|
method?: never;
|
|
109
113
|
paymentMethodId?: never;
|
|
110
114
|
fromLocation?: never;
|
|
111
|
-
description?:
|
|
115
|
+
description?: never;
|
|
116
|
+
referencesOrder?: never;
|
|
112
117
|
};
|
|
113
118
|
export type IAuthorizePaymentCardObject = Pick<IObjectIncludingPaymentMethodDetails, 'amount' | 'issuedThrough' | 'paymentMethod' | 'fromLocation' | 'name' | 'additionalProperty'> & {
|
|
114
119
|
description?: string;
|
|
@@ -117,7 +122,11 @@ export type IAuthorizePaymentCardObject = Pick<IObjectIncludingPaymentMethodDeta
|
|
|
117
122
|
movieTickets?: never;
|
|
118
123
|
ticketToken?: never;
|
|
119
124
|
paymentMethodId?: never;
|
|
125
|
+
referencesOrder?: never;
|
|
120
126
|
};
|
|
127
|
+
/**
|
|
128
|
+
* 決済承認リクエストの承認対象オブジェクト
|
|
129
|
+
*/
|
|
121
130
|
export type IObjectWithoutDetail = IAuthorizeAnyPaymentObject | IAuthorizeCreditCardObject | IAuthorizeMovieTicketObject | IAuthorizePaymentCardObject;
|
|
122
131
|
export type IObject = Pick<IObjectIncludingPaymentMethodDetails, 'typeOf' | 'paymentMethodId' | 'accountId'>;
|
|
123
132
|
export interface IResultPaymentMethod {
|
|
@@ -166,6 +175,11 @@ export interface IResultAsInvoice {
|
|
|
166
175
|
additionalProperty?: IPropertyValue<string>[];
|
|
167
176
|
typeOf: ResultType;
|
|
168
177
|
issuedThrough: IOrderPaymentMethodIssuedThrough;
|
|
178
|
+
/**
|
|
179
|
+
* 請求の関連注文
|
|
180
|
+
* support(2025-11-23~)
|
|
181
|
+
*/
|
|
182
|
+
referencesOrder?: IInvoiceReferenceOrder;
|
|
169
183
|
}
|
|
170
184
|
export type IResultAsPermit = Pick<IPermitAsServiceOutput, 'typeOf' | 'issuedThrough'> & {
|
|
171
185
|
/**
|
|
@@ -181,17 +195,12 @@ export interface IPurpose {
|
|
|
181
195
|
export declare enum ServiceIdentifier {
|
|
182
196
|
Chevre = "Chevre"
|
|
183
197
|
}
|
|
184
|
-
export interface IInstrumentAsService {
|
|
185
|
-
typeOf: 'WebAPI';
|
|
186
|
-
transactionNumber: never;
|
|
187
|
-
identifier: ServiceIdentifier;
|
|
188
|
-
}
|
|
189
198
|
export interface IInstrumentAsAssetTransaction {
|
|
190
199
|
typeOf: AssetTransactionType.Pay;
|
|
191
200
|
transactionNumber: string;
|
|
192
201
|
identifier: ServiceIdentifier;
|
|
193
202
|
}
|
|
194
|
-
export type IInstrument = IInstrumentAsAssetTransaction
|
|
203
|
+
export type IInstrument = IInstrumentAsAssetTransaction;
|
|
195
204
|
export interface IAttributes extends AuthorizeActionFactory.IAttributes<IObject, IResult> {
|
|
196
205
|
typeOf: ActionType.AuthorizeAction;
|
|
197
206
|
object: IObject;
|
|
@@ -2,8 +2,9 @@ import { IAction as IPayAction, IInstrument, ILocation, IMovieTicket, IOrderAsPa
|
|
|
2
2
|
import * as AssetTransactionFactory from '../assetTransaction';
|
|
3
3
|
import { AssetTransactionType } from '../assetTransactionType';
|
|
4
4
|
import { IExtendId } from '../autoGenerated';
|
|
5
|
+
import { IInvoice } from '../invoice';
|
|
5
6
|
import { IMonetaryAmount } from '../monetaryAmount';
|
|
6
|
-
import { ITotalPaymentDue } from '../order';
|
|
7
|
+
import { IEventServiceAsOrderedItem, IOrder, IReservationFor4EventServiceOrderedItem, ITotalPaymentDue } from '../order';
|
|
7
8
|
import { ICreditCard3DS, IUnauthorizedCardOfMember, IUncheckedCardRaw, IUncheckedCardTokenized } from '../paymentMethod/paymentCard/creditCard';
|
|
8
9
|
import { IPropertyValue } from '../propertyValue';
|
|
9
10
|
import { IPotentialAction as IPotentialInformAction, PaymentServiceType } from '../service/paymentService';
|
|
@@ -75,10 +76,44 @@ export interface IAccountsReceivableByServiceType {
|
|
|
75
76
|
accountsReceivable?: number;
|
|
76
77
|
}
|
|
77
78
|
export type IPayActionInObject = Pick<IPayAction, 'actionStatus' | 'id' | 'typeOf'>;
|
|
79
|
+
/**
|
|
80
|
+
* 決済承認結果としての請求書に関連する注文アイテムとしての興行
|
|
81
|
+
*/
|
|
82
|
+
export type IEventServiceAsInvoiceOrderedItem = Pick<IEventServiceAsOrderedItem, 'typeOf'> & {
|
|
83
|
+
serviceOutput: {
|
|
84
|
+
/**
|
|
85
|
+
* 請求書に関連するイベント
|
|
86
|
+
* 興行オファー承認のイベントリストと完全に一致する必要がある
|
|
87
|
+
*/
|
|
88
|
+
reservationFor: Pick<IReservationFor4EventServiceOrderedItem, 'id' | 'typeOf'>;
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
/**
|
|
92
|
+
* 決済承認結果としての請求書に関連する注文アイテム
|
|
93
|
+
*/
|
|
94
|
+
export interface IInvoiceOrderedItem {
|
|
95
|
+
typeOf: 'OrderItem';
|
|
96
|
+
orderedItem: IEventServiceAsInvoiceOrderedItem;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* 決済承認結果としての請求書に関連する注文
|
|
100
|
+
*/
|
|
101
|
+
export interface IInvoiceReferenceOrder extends Pick<IOrder, 'typeOf'> {
|
|
102
|
+
/**
|
|
103
|
+
* 決済承認プロセスにおいて注文アイテムを指定された場合のみ定義される
|
|
104
|
+
*/
|
|
105
|
+
orderedItem?: IInvoiceOrderedItem[];
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* 関連注文情報を含む請求情報
|
|
109
|
+
*/
|
|
110
|
+
export type IInvoiceAsPaymentServiceOutput = Pick<IInvoice, 'typeOf'> & {
|
|
111
|
+
referencesOrder: IInvoiceReferenceOrder;
|
|
112
|
+
};
|
|
78
113
|
/**
|
|
79
114
|
* 取引対象物
|
|
80
115
|
*/
|
|
81
|
-
export interface
|
|
116
|
+
export interface IPaymentServiceAsObject {
|
|
82
117
|
accountId: string;
|
|
83
118
|
paymentMethodId: string;
|
|
84
119
|
typeOf: PaymentServiceType;
|
|
@@ -96,14 +131,16 @@ export interface IObject {
|
|
|
96
131
|
checkedAction?: {
|
|
97
132
|
id: string;
|
|
98
133
|
};
|
|
134
|
+
serviceOutput?: IInvoiceAsPaymentServiceOutput;
|
|
99
135
|
}
|
|
136
|
+
export type IObject = IPaymentServiceAsObject;
|
|
100
137
|
export interface IPaymentMethodWithoutDetail extends IPaymentMethod {
|
|
101
138
|
/**
|
|
102
139
|
* 取引開始前の指定ではnumberに限定
|
|
103
140
|
*/
|
|
104
141
|
amount: number;
|
|
105
142
|
}
|
|
106
|
-
export interface IObjectWithoutDetail extends Pick<IObject, 'typeOf' | 'id' | 'paymentMethod'> {
|
|
143
|
+
export interface IObjectWithoutDetail extends Pick<IObject, 'serviceOutput' | 'typeOf' | 'id' | 'paymentMethod'> {
|
|
107
144
|
paymentMethod: IPaymentMethodWithoutDetail;
|
|
108
145
|
}
|
|
109
146
|
export type IPotentialAction = IPotentialInformAction;
|
package/lib/authorization.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { IResultAsInvoice } from './action/authorize/paymentMethod/any';
|
|
1
2
|
import { IEventOfferToken } from './assetTransaction/reserve';
|
|
2
3
|
import { CreativeWorkType } from './creativeWorkType';
|
|
3
4
|
import { IInvoice } from './invoice';
|
|
@@ -20,6 +21,12 @@ export type IPermitIssuedThroughOfObjectTypeOfGood = Pick<IPermitIssuedThroughAs
|
|
|
20
21
|
export type IPermitAsTypeOfGood = Pick<IPermitAsGood, 'identifier' | 'typeOf'> & {
|
|
21
22
|
issuedThrough?: IPermitIssuedThroughOfObjectTypeOfGood;
|
|
22
23
|
};
|
|
24
|
+
/**
|
|
25
|
+
* 決済方法チケットの請求情報
|
|
26
|
+
*/
|
|
27
|
+
export interface IInvoiceAsPaymentMethodServiceOutput extends Pick<IResultAsInvoice, 'paymentMethodId' | 'referencesOrder'> {
|
|
28
|
+
typeOf: IInvoice['typeOf'];
|
|
29
|
+
}
|
|
23
30
|
/**
|
|
24
31
|
* 決済サービス発行のチケット
|
|
25
32
|
* new(2025-11-11~)
|
|
@@ -27,7 +34,7 @@ export type IPermitAsTypeOfGood = Pick<IPermitAsGood, 'identifier' | 'typeOf'> &
|
|
|
27
34
|
export interface IPaymentMethodAsTypeOfGood {
|
|
28
35
|
id: string;
|
|
29
36
|
typeOf: PaymentServiceType.CreditCard | PaymentServiceType.MovieTicket;
|
|
30
|
-
serviceOutput:
|
|
37
|
+
serviceOutput: IInvoiceAsPaymentMethodServiceOutput;
|
|
31
38
|
issuedThrough?: never;
|
|
32
39
|
}
|
|
33
40
|
/**
|
|
@@ -39,7 +46,7 @@ export interface IFaceToFacePaymentMethodAsTypeOfGood {
|
|
|
39
46
|
*/
|
|
40
47
|
id?: never;
|
|
41
48
|
typeOf: PaymentServiceType.FaceToFace;
|
|
42
|
-
serviceOutput:
|
|
49
|
+
serviceOutput: IInvoiceAsPaymentMethodServiceOutput;
|
|
43
50
|
issuedThrough?: never;
|
|
44
51
|
}
|
|
45
52
|
export type IPermitOwnershipInfo = Pick<IOwnershipInfo<IPermitAsTypeOfGood>, 'typeOf' | 'typeOfGood'>;
|
package/lib/invoice.d.ts
CHANGED
|
@@ -11,9 +11,6 @@ import { ISeller } from './seller';
|
|
|
11
11
|
import { PaymentServiceType } from './service/paymentService';
|
|
12
12
|
export type IBroker = Pick<ISeller, 'id' | 'typeOf'> | IPerson;
|
|
13
13
|
export type IProvider = Pick<ISeller, 'id' | 'typeOf'> | IPerson;
|
|
14
|
-
export interface IReferenceOrder extends OrderFactory.IOrder {
|
|
15
|
-
acceptedOffers: OrderFactory.IAcceptedOffer<OrderFactory.IItemOffered>[];
|
|
16
|
-
}
|
|
17
14
|
export type IReservationPriceAccounting = Pick<IAccounting, 'accountsReceivable'>;
|
|
18
15
|
export type IAppliesToAddOn = Pick<IUnitPriceSpecAppliesToAddOn, 'typeOf'>;
|
|
19
16
|
export type IMinimizedCategoryCodeChargeSpecification = Pick<ICategoryCodeChargeSpecification, 'typeOf' | 'price'>;
|
|
@@ -126,7 +123,6 @@ export interface IInvoice {
|
|
|
126
123
|
/**
|
|
127
124
|
* The Order(s) related to this Invoice. One or more Orders may be combined into a single Invoice.
|
|
128
125
|
*/
|
|
129
|
-
referencesOrder?: IReferenceOrder;
|
|
130
126
|
/**
|
|
131
127
|
* The date the invoice is scheduled to be paid.
|
|
132
128
|
*/
|
package/lib/order.d.ts
CHANGED
|
@@ -85,6 +85,7 @@ export interface IReferencedInvoice {
|
|
|
85
85
|
*/
|
|
86
86
|
additionalProperty: IPropertyValue<string>[];
|
|
87
87
|
issuedThrough: IOrderPaymentMethodIssuedThrough;
|
|
88
|
+
referencesOrder?: never;
|
|
88
89
|
}
|
|
89
90
|
export type IWorkPerformed = Pick<EventReservationFactory.IOptimizedWorkPerformed, 'typeOf' | 'id' | 'identifier' | 'name' | 'duration'>;
|
|
90
91
|
export type ISuperEvent = Pick<EventReservationFactory.IOptimizedSuperEvent, 'id' | 'location' | 'name' | 'soundFormat' | 'typeOf' | 'videoFormat' | 'headline' | 'identifier' | 'alternativeHeadline' | 'duration' | 'coaInfo'> & {
|
|
@@ -11,7 +11,7 @@ export interface IData {
|
|
|
11
11
|
agent: {
|
|
12
12
|
id: string;
|
|
13
13
|
};
|
|
14
|
-
object: Pick<IAuthorizeCreditCardObject, 'amount' | 'creditCard' | 'issuedThrough' | 'method' | 'paymentMethod'>;
|
|
14
|
+
object: Pick<IAuthorizeCreditCardObject, 'amount' | 'creditCard' | 'issuedThrough' | 'method' | 'paymentMethod' | 'referencesOrder'>;
|
|
15
15
|
purpose: IPurpose;
|
|
16
16
|
paymentServiceType: PaymentServiceType;
|
|
17
17
|
location: ILocation;
|