@chevre/factory 4.393.0-alpha.8 → 4.393.0
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 +12 -3
- package/lib/action/authorize/paymentMethod/any.d.ts +39 -4
- package/lib/action/cancel/coaReserve.d.ts +30 -0
- package/lib/action/cancel/reservation.d.ts +13 -2
- package/lib/action/consume/use/reservation.d.ts +11 -5
- package/lib/action/consume/use.d.ts +1 -1
- package/lib/action/interact/inform.d.ts +36 -7
- package/lib/action/reserve.d.ts +11 -2
- package/lib/action/trade/pay.d.ts +19 -9
- package/lib/action/trade/refund.d.ts +24 -20
- package/lib/action/transfer/send/message/email.d.ts +2 -0
- package/lib/action.d.ts +16 -2
- package/lib/advanceBookingRequirement.d.ts +60 -0
- package/lib/advanceBookingRequirement.js +2 -0
- package/lib/assetTransaction/cancelReservation.d.ts +8 -5
- package/lib/assetTransaction/pay.d.ts +12 -5
- package/lib/assetTransaction/refund.d.ts +19 -10
- package/lib/assetTransaction/reserve.d.ts +8 -1
- package/lib/authorization.d.ts +3 -0
- package/lib/certificationStatusEnumeration.d.ts +4 -0
- package/lib/certificationStatusEnumeration.js +8 -0
- package/lib/creativeWork/{certification.d.ts → certification/webApplication.d.ts} +5 -5
- package/lib/creativeWork/certification/webApplication.js +2 -0
- package/lib/creativeWork/certification/webSite.d.ts +47 -0
- package/lib/creativeWork/certification/webSite.js +2 -0
- package/lib/creativeWork/noteDigitalDocument.d.ts +1 -1
- package/lib/creativeWorkType.d.ts +2 -1
- package/lib/creativeWorkType.js +1 -0
- package/lib/iam.d.ts +7 -3
- package/lib/iam.js +7 -3
- package/lib/identityProvider.d.ts +0 -2
- package/lib/index.d.ts +37 -2
- package/lib/index.js +48 -4
- package/lib/notification/accountTitle.d.ts +4 -0
- package/lib/notification/accountTitle.js +2 -0
- package/lib/notification/categoryCode.d.ts +2 -0
- package/lib/notification/categoryCode.js +2 -0
- package/lib/notification/creativeWork.d.ts +4 -0
- package/lib/notification/creativeWork.js +2 -0
- package/lib/notification/event.d.ts +13 -0
- package/lib/notification/offer.d.ts +2 -0
- package/lib/notification/offer.js +2 -0
- package/lib/notification/offerCatalog.d.ts +4 -0
- package/lib/notification/offerCatalog.js +2 -0
- package/lib/notification/payAction.d.ts +8 -0
- package/lib/notification/payAction.js +2 -0
- package/lib/notification/person.d.ts +7 -0
- package/lib/notification/person.js +2 -0
- package/lib/notification/place.d.ts +9 -0
- package/lib/notification/place.js +2 -0
- package/lib/notification/product.d.ts +2 -0
- package/lib/notification/product.js +2 -0
- package/lib/notification/refundAction.d.ts +8 -0
- package/lib/notification/refundAction.js +2 -0
- package/lib/notification/transaction.d.ts +2 -0
- package/lib/notification/transaction.js +10 -0
- package/lib/potentialAction.d.ts +6 -0
- package/lib/product.d.ts +1 -11
- package/lib/recipe/cancelPendingCOAReserve.d.ts +23 -0
- package/lib/recipe/cancelPendingCOAReserve.js +2 -0
- package/lib/recipe/refundCreditCard.d.ts +1 -1
- package/lib/recipe/sendEmailMessage.d.ts +22 -0
- package/lib/recipe/sendEmailMessage.js +2 -0
- package/lib/recipe.d.ts +6 -2
- package/lib/recipe.js +4 -0
- package/lib/service/paymentService.d.ts +5 -2
- package/lib/task/cancelPendingReservation.d.ts +12 -2
- package/lib/task/checkResource.d.ts +6 -1
- package/lib/task/handleNotification.d.ts +5 -0
- package/lib/task/invalidatePaymentUrl.d.ts +15 -0
- package/lib/task/invalidatePaymentUrl.js +2 -0
- package/lib/task/onAuthorizationCreated.d.ts +6 -5
- package/lib/task/pay.d.ts +8 -5
- package/lib/task/publishPaymentUrl.d.ts +7 -2
- package/lib/task/refund.d.ts +5 -3
- package/lib/task/triggerWebhook.d.ts +59 -5
- package/lib/task/useReservation.d.ts +1 -1
- package/lib/task/voidPayTransaction.d.ts +0 -2
- package/lib/task/voidReserveTransaction.d.ts +0 -2
- package/lib/task.d.ts +18 -0
- package/lib/taskName.d.ts +1 -0
- package/lib/taskName.js +1 -0
- package/lib/taskStatus.d.ts +11 -6
- package/lib/taskStatus.js +10 -5
- package/lib/unitPriceOffer.d.ts +8 -5
- package/package.json +2 -2
- /package/lib/{creativeWork/certification.js → action/cancel/coaReserve.js} +0 -0
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
import * as ActionFactory from '../../action';
|
|
2
2
|
import { ActionType } from '../../actionType';
|
|
3
|
-
import { IAgent, IObjectWithoutDetail } from '../../assetTransaction/pay';
|
|
3
|
+
import { IAgent, IObjectWithoutDetail, IPaymentMethodWithoutDetail } from '../../assetTransaction/pay';
|
|
4
4
|
import { AssetTransactionType } from '../../assetTransactionType';
|
|
5
5
|
import { IExecTran3dsArgs, IExecTran3dsResult, IRecipe } from '../../recipe/publishPaymentUrl';
|
|
6
6
|
import { TransactionType } from '../../transactionType';
|
|
7
7
|
import * as AcceptActionFactory from '../accept';
|
|
8
8
|
export { IExecTran3dsArgs, IExecTran3dsResult, IAgent, IRecipe };
|
|
9
|
+
export type IPaymentMethod = Pick<IPaymentMethodWithoutDetail, 'amount' | 'creditCard' | 'identifier' | 'method'>;
|
|
10
|
+
export type IPayObject = Pick<IObjectWithoutDetail, 'id' | 'typeOf'> & {
|
|
11
|
+
paymentMethod: IPaymentMethod;
|
|
12
|
+
};
|
|
9
13
|
export interface IObject {
|
|
10
|
-
object:
|
|
14
|
+
object: IPayObject;
|
|
11
15
|
transactionNumber: string;
|
|
12
16
|
typeOf: AssetTransactionType.Pay;
|
|
13
17
|
}
|
|
@@ -22,11 +26,16 @@ export interface IPurpose {
|
|
|
22
26
|
/**
|
|
23
27
|
* 決済採用アクション属性
|
|
24
28
|
*/
|
|
25
|
-
export interface IAttributes extends AcceptActionFactory.IAttributes<IObject, IResult> {
|
|
29
|
+
export interface IAttributes extends Pick<AcceptActionFactory.IAttributes<IObject, IResult>, 'agent' | 'error' | 'identifier' | 'location' | 'object' | 'project' | 'purpose' | 'result' | 'sameAs' | 'typeOf'> {
|
|
26
30
|
typeOf: ActionType.AcceptAction;
|
|
27
31
|
object: IObject;
|
|
28
32
|
agent: IAgent;
|
|
29
33
|
purpose: IPurpose;
|
|
34
|
+
/**
|
|
35
|
+
* add identifier for an unique index(2025-02-25~)
|
|
36
|
+
* authorize payment action identifier
|
|
37
|
+
*/
|
|
38
|
+
identifier?: string;
|
|
30
39
|
}
|
|
31
40
|
/**
|
|
32
41
|
* 決済採用アクション
|
|
@@ -82,13 +82,43 @@ export interface IObjectIncludingPaymentMethodDetails {
|
|
|
82
82
|
*/
|
|
83
83
|
ticketToken?: string;
|
|
84
84
|
}
|
|
85
|
-
export type
|
|
85
|
+
export type IAuthorizeAnyPaymentObject = Pick<IObjectIncludingPaymentMethodDetails, 'amount' | 'issuedThrough' | 'paymentMethod' | 'name' | 'additionalProperty' | 'ticketToken'> & {
|
|
86
|
+
creditCard?: never;
|
|
87
|
+
method?: never;
|
|
88
|
+
movieTickets?: never;
|
|
89
|
+
paymentMethodId?: never;
|
|
90
|
+
fromLocation?: never;
|
|
91
|
+
description?: string;
|
|
92
|
+
};
|
|
93
|
+
export type IAuthorizeCreditCardObject = Pick<IObjectIncludingPaymentMethodDetails, 'amount' | 'issuedThrough' | 'paymentMethod' | 'creditCard' | 'method' | 'name' | 'additionalProperty' | 'ticketToken'> & {
|
|
86
94
|
/**
|
|
87
|
-
*
|
|
88
|
-
* CreditCardのみ対応
|
|
95
|
+
* 決済URL発行の場合、発行済のpaymentMethodIdを指定
|
|
89
96
|
*/
|
|
90
97
|
paymentMethodId?: string;
|
|
98
|
+
movieTickets?: never;
|
|
99
|
+
fromLocation?: never;
|
|
100
|
+
description?: string;
|
|
101
|
+
};
|
|
102
|
+
export type IAuthorizeMovieTicketObject = Pick<IObjectIncludingPaymentMethodDetails, 'issuedThrough' | 'paymentMethod' | 'movieTickets' | 'name' | 'additionalProperty' | 'ticketToken'> & {
|
|
103
|
+
/**
|
|
104
|
+
* fix 0 as JPY
|
|
105
|
+
*/
|
|
106
|
+
amount: 0;
|
|
107
|
+
creditCard?: never;
|
|
108
|
+
method?: never;
|
|
109
|
+
paymentMethodId?: never;
|
|
110
|
+
fromLocation?: never;
|
|
111
|
+
description?: string;
|
|
112
|
+
};
|
|
113
|
+
export type IAuthorizePaymentCardObject = Pick<IObjectIncludingPaymentMethodDetails, 'amount' | 'issuedThrough' | 'paymentMethod' | 'fromLocation' | 'name' | 'additionalProperty'> & {
|
|
114
|
+
description?: string;
|
|
115
|
+
creditCard?: never;
|
|
116
|
+
method?: never;
|
|
117
|
+
movieTickets?: never;
|
|
118
|
+
ticketToken?: never;
|
|
119
|
+
paymentMethodId?: never;
|
|
91
120
|
};
|
|
121
|
+
export type IObjectWithoutDetail = IAuthorizeAnyPaymentObject | IAuthorizeCreditCardObject | IAuthorizeMovieTicketObject | IAuthorizePaymentCardObject;
|
|
92
122
|
export type IObject = Pick<IObjectIncludingPaymentMethodDetails, 'typeOf' | 'paymentMethodId' | 'accountId'>;
|
|
93
123
|
export interface IResultPaymentMethod {
|
|
94
124
|
/**
|
|
@@ -169,8 +199,13 @@ export interface IAttributes extends AuthorizeActionFactory.IAttributes<IObject,
|
|
|
169
199
|
instrument: IInstrument;
|
|
170
200
|
recipient: IRecipient;
|
|
171
201
|
purpose: IPurpose;
|
|
202
|
+
/**
|
|
203
|
+
* add identifier for an unique index(2025-02-25~)
|
|
204
|
+
* authorize payment action identifier
|
|
205
|
+
*/
|
|
206
|
+
identifier: string;
|
|
172
207
|
}
|
|
173
208
|
/**
|
|
174
|
-
*
|
|
209
|
+
* authorize payment action
|
|
175
210
|
*/
|
|
176
211
|
export type IAction = ActionFactory.IAction<IAttributes>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import * as ActionFactory from '../../action';
|
|
2
|
+
import { ActionType } from '../../actionType';
|
|
3
|
+
import { AssetTransactionType } from '../../assetTransactionType';
|
|
4
|
+
import { IOrder } from '../../order';
|
|
5
|
+
import { IDelTmpReserveArgs, IRecipe, IResultAsError } from '../../recipe/cancelPendingCOAReserve';
|
|
6
|
+
import { IAvailableReservationStatusType } from '../../reservation';
|
|
7
|
+
import { ITransaction as IPlaceOrder } from '../../transaction/placeOrder';
|
|
8
|
+
import { IAction as IReturnReserveTransactionAction } from '../transfer/return/reserveTransaction';
|
|
9
|
+
export { IRecipe as ICancelPendingCOAReserveRecipe };
|
|
10
|
+
export type IDelTmpReserveResultAsError = IResultAsError;
|
|
11
|
+
export type IAgent = ActionFactory.IParticipantAsProject;
|
|
12
|
+
export type IObject = IDelTmpReserveArgs & {
|
|
13
|
+
reservationStatus: IAvailableReservationStatusType;
|
|
14
|
+
transactionNumber: string;
|
|
15
|
+
typeOf: AssetTransactionType.COAReserveTransaction;
|
|
16
|
+
};
|
|
17
|
+
export interface IResult {
|
|
18
|
+
}
|
|
19
|
+
export type IOrderAsInstrument = Pick<IOrder, 'orderNumber' | 'typeOf'>;
|
|
20
|
+
export type IReturnActionAsInstrument = Pick<IReturnReserveTransactionAction, 'id' | 'purpose' | 'typeOf'>;
|
|
21
|
+
export type IPlaceOrderAsInstrument = Pick<IPlaceOrder, 'id' | 'typeOf'>;
|
|
22
|
+
export type IInstrument = IOrderAsInstrument | IReturnActionAsInstrument | IPlaceOrderAsInstrument;
|
|
23
|
+
export interface IAttributes extends Pick<ActionFactory.IAttributes<ActionType.CancelAction, IObject, IResult>, 'typeOf' | 'result' | 'project' | 'object' | 'agent' | 'instrument'> {
|
|
24
|
+
agent: IAgent;
|
|
25
|
+
instrument?: IInstrument[];
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* cancel coa reserve
|
|
29
|
+
*/
|
|
30
|
+
export type IAction = ActionFactory.IAction<IAttributes>;
|
|
@@ -2,10 +2,13 @@ import * as ActionFactory from '../../action';
|
|
|
2
2
|
import { ActionType } from '../../actionType';
|
|
3
3
|
import { AssetTransactionType } from '../../assetTransactionType';
|
|
4
4
|
import { EventType } from '../../eventType';
|
|
5
|
+
import { IOrder } from '../../order';
|
|
5
6
|
import { ProductType } from '../../product';
|
|
6
7
|
import { IAvailableReservationStatusType } from '../../reservation';
|
|
7
8
|
import { ReservationType } from '../../reservationType';
|
|
9
|
+
import { ITransaction as IPlaceOrder } from '../../transaction/placeOrder';
|
|
8
10
|
import { TripType } from '../../tripType';
|
|
11
|
+
import { IAction as IReturnReserveTransactionAction } from '../transfer/return/reserveTransaction';
|
|
9
12
|
export type IAgent = ActionFactory.IParticipantAsProject;
|
|
10
13
|
export interface IReservationPackageAsObject {
|
|
11
14
|
reservationFor: {
|
|
@@ -64,11 +67,19 @@ export interface IPurpose {
|
|
|
64
67
|
*/
|
|
65
68
|
id: string;
|
|
66
69
|
}
|
|
67
|
-
export
|
|
70
|
+
export type IOrderAsInstrument = Pick<IOrder, 'orderNumber' | 'typeOf'>;
|
|
71
|
+
export type IReturnActionAsInstrument = Pick<IReturnReserveTransactionAction, 'id' | 'purpose' | 'typeOf'>;
|
|
72
|
+
export type IPlaceOrderAsInstrument = Pick<IPlaceOrder, 'id' | 'typeOf'>;
|
|
73
|
+
export type IInstrument = IOrderAsInstrument | IReturnActionAsInstrument | IPlaceOrderAsInstrument;
|
|
74
|
+
export interface IAttributes extends Pick<ActionFactory.IAttributes<ActionType.CancelAction, IObject, IResult>, 'typeOf' | 'result' | 'purpose' | 'project' | 'object' | 'agent' | 'instrument'> {
|
|
68
75
|
agent: IAgent;
|
|
69
76
|
purpose: IPurpose;
|
|
77
|
+
/**
|
|
78
|
+
* add(2025-02-17~)
|
|
79
|
+
*/
|
|
80
|
+
instrument?: IInstrument[];
|
|
70
81
|
}
|
|
71
82
|
/**
|
|
72
|
-
*
|
|
83
|
+
* cancel reservation action
|
|
73
84
|
*/
|
|
74
85
|
export type IAction = ActionFactory.IAction<IAttributes>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { IParticipantAsPerson, IParticipantAsWebApplication } from '../../../action';
|
|
2
|
+
import { IOrder } from '../../../order';
|
|
2
3
|
import { PlaceType } from '../../../placeType';
|
|
3
4
|
import { ITicket, ITicketType } from '../../../reservation';
|
|
4
5
|
import { IIssuedThrough, IReservation, IReservationFor } from '../../../reservation/event';
|
|
@@ -18,11 +19,12 @@ export interface IResult {
|
|
|
18
19
|
export interface ILocation {
|
|
19
20
|
typeOf: PlaceType.Place;
|
|
20
21
|
/**
|
|
21
|
-
*
|
|
22
|
+
* entrance gate identifier
|
|
22
23
|
*/
|
|
23
24
|
identifier: string;
|
|
24
25
|
}
|
|
25
|
-
export
|
|
26
|
+
export type IOrderAsInstrument = Pick<IOrder, 'orderNumber' | 'typeOf'>;
|
|
27
|
+
export interface ITicketAsInstrument {
|
|
26
28
|
/**
|
|
27
29
|
* JWT
|
|
28
30
|
*/
|
|
@@ -33,12 +35,16 @@ export interface IInstrument {
|
|
|
33
35
|
ticketToken?: string;
|
|
34
36
|
typeOf: ObjectType.Ticket;
|
|
35
37
|
}
|
|
36
|
-
export
|
|
38
|
+
export type IInstrument = IOrderAsInstrument | ITicketAsInstrument;
|
|
39
|
+
export interface IAttributes extends Pick<UseActionFactory.IAttributes<IObject, IResult>, 'agent' | 'error' | 'instrument' | 'location' | 'object' | 'project' | 'result' | 'typeOf' | 'error'> {
|
|
37
40
|
agent: IAgent;
|
|
38
|
-
|
|
41
|
+
/**
|
|
42
|
+
* extend to array(2025-02-17~)
|
|
43
|
+
*/
|
|
44
|
+
instrument: IInstrument | IInstrument[];
|
|
39
45
|
location?: ILocation;
|
|
40
46
|
}
|
|
41
47
|
/**
|
|
42
|
-
*
|
|
48
|
+
* use reservation action
|
|
43
49
|
*/
|
|
44
50
|
export type IAction = UseActionFactory.IAction<IAttributes>;
|
|
@@ -5,6 +5,6 @@ export type IResult = any;
|
|
|
5
5
|
export interface IAttributes<TObject, TResult> extends Pick<ActionFactory.IAttributes<ActionType.UseAction, TObject, TResult>, 'typeOf' | 'result' | 'project' | 'object' | 'location' | 'error' | 'instrument' | 'agent'> {
|
|
6
6
|
}
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* use action
|
|
9
9
|
*/
|
|
10
10
|
export type IAction<TAttributes extends IAttributes<IObject, IResult>> = ActionFactory.IAction<TAttributes>;
|
|
@@ -1,12 +1,40 @@
|
|
|
1
1
|
import * as ActionFactory from '../../action';
|
|
2
2
|
import { ActionType } from '../../actionType';
|
|
3
3
|
import { AssetTransactionType } from '../../assetTransactionType';
|
|
4
|
+
import { EventType } from '../../eventType';
|
|
4
5
|
import { IOrder } from '../../order';
|
|
6
|
+
import { ITransaction as IPlaceOrder } from '../../transaction/placeOrder';
|
|
7
|
+
import { IAccountTitleAsNotification } from '../../notification/accountTitle';
|
|
8
|
+
import { ICategoryCodeAsNotification } from '../../notification/categoryCode';
|
|
9
|
+
import { IMovieAsNotification, INoteDigitalDocumentAsNotification } from '../../notification/creativeWork';
|
|
10
|
+
import { IEvent4inform, IEventAsNotification } from '../../notification/event';
|
|
11
|
+
import { IOfferAsNotification } from '../../notification/offer';
|
|
12
|
+
import { IOfferCatalogAsNotification } from '../../notification/offerCatalog';
|
|
13
|
+
import { IOrder4inform } from '../../notification/order';
|
|
14
|
+
import { IPayAction4inform } from '../../notification/payAction';
|
|
15
|
+
import { IPersonAsNotification } from '../../notification/person';
|
|
16
|
+
import { IHasPOSAsNotification, IMovieTheaterAsNotification } from '../../notification/place';
|
|
17
|
+
import { IProductAsNotification } from '../../notification/product';
|
|
18
|
+
import { IRefundAction4inform } from '../../notification/refundAction';
|
|
19
|
+
import { IReservation4inform } from '../../notification/reservation';
|
|
20
|
+
import { IPlaceOrderAsNotification } from '../../notification/transaction';
|
|
5
21
|
export type IAgent = ActionFactory.IParticipantAsProject;
|
|
6
|
-
export type
|
|
7
|
-
url
|
|
22
|
+
export type IRecipientAsWebApplicationDeprecated = Pick<ActionFactory.IRecipientAsAnonymousWebApplication, 'id' | 'name' | 'typeOf'> & {
|
|
23
|
+
url?: string;
|
|
8
24
|
};
|
|
9
|
-
export type
|
|
25
|
+
export type IRecipientAsSellerDeprecated = Pick<ActionFactory.IParticipantAsSeller, 'id' | 'name' | 'typeOf'> & {
|
|
26
|
+
url?: string;
|
|
27
|
+
};
|
|
28
|
+
export type IRecipientDeprecated = IRecipientAsWebApplicationDeprecated | IRecipientAsSellerDeprecated;
|
|
29
|
+
/**
|
|
30
|
+
* redefine informAction.recipient(2025-02-15~)
|
|
31
|
+
*/
|
|
32
|
+
export type IRecipient = Pick<ActionFactory.IParticipantAsWebApplication, 'name' | 'typeOf'> & {
|
|
33
|
+
id?: never;
|
|
34
|
+
url?: never;
|
|
35
|
+
};
|
|
36
|
+
export type IAnyResourceAsObject = IPlaceOrderAsNotification | IOfferCatalogAsNotification | IHasPOSAsNotification | IMovieTheaterAsNotification | IOfferAsNotification | IAccountTitleAsNotification | IProductAsNotification | ICategoryCodeAsNotification | IMovieAsNotification | INoteDigitalDocumentAsNotification | IPersonAsNotification | IEvent4inform | IEventAsNotification<EventType>;
|
|
37
|
+
export type IObject = IAnyResourceAsObject | IOrder4inform | IReservation4inform | IPayAction4inform | IRefundAction4inform;
|
|
10
38
|
export interface IPayTransactionAsPurpose {
|
|
11
39
|
id: string;
|
|
12
40
|
typeOf: AssetTransactionType.Pay;
|
|
@@ -17,18 +45,19 @@ export interface IRefundTransactionAsPurpose {
|
|
|
17
45
|
}
|
|
18
46
|
export type IPurpose = IPayTransactionAsPurpose | IRefundTransactionAsPurpose;
|
|
19
47
|
export type IOrderAsAbout = Pick<IOrder, 'orderNumber' | 'typeOf'>;
|
|
20
|
-
export type
|
|
48
|
+
export type IPlaceOrderAsAbout = Pick<IPlaceOrder, 'id' | 'typeOf'>;
|
|
49
|
+
export type IAbout = IOrderAsAbout | IPlaceOrderAsAbout;
|
|
21
50
|
export interface IResult {
|
|
22
51
|
statusCode?: number;
|
|
23
52
|
useFetchAPI?: boolean;
|
|
24
53
|
}
|
|
25
|
-
export interface IAttributes<TObject> extends Pick<ActionFactory.IAttributes<ActionType.InformAction, TObject, IResult>, 'agent' | 'object' | 'project' | 'purpose' | 'recipient' | 'result' | 'typeOf' | 'target'> {
|
|
54
|
+
export interface IAttributes<TObject extends IObject> extends Pick<ActionFactory.IAttributes<ActionType.InformAction, TObject, IResult>, 'agent' | 'object' | 'project' | 'purpose' | 'recipient' | 'result' | 'typeOf' | 'target'> {
|
|
26
55
|
agent: IAgent;
|
|
27
|
-
recipient: IRecipient;
|
|
56
|
+
recipient: IRecipient | IRecipientDeprecated;
|
|
28
57
|
purpose?: IPurpose;
|
|
29
58
|
about?: IAbout;
|
|
30
59
|
}
|
|
31
60
|
/**
|
|
32
|
-
*
|
|
61
|
+
* inform action
|
|
33
62
|
*/
|
|
34
63
|
export type IAction<TAttributes extends IAttributes<IObject>> = ActionFactory.IAction<TAttributes>;
|
package/lib/action/reserve.d.ts
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import * as ActionFactory from '../action';
|
|
2
2
|
import { ActionType } from '../actionType';
|
|
3
3
|
import { AssetTransactionType } from '../assetTransactionType';
|
|
4
|
+
import { IOrder } from '../order';
|
|
4
5
|
import { IAvailableReservationStatusType } from '../reservation';
|
|
5
6
|
import { IReservationFor as IBusReservationFor } from '../reservation/busReservation';
|
|
6
7
|
import { IReservationFor as IEventReservationFor } from '../reservation/event';
|
|
7
8
|
import { ReservationType } from '../reservationType';
|
|
9
|
+
import { ITransaction as IPlaceOrder } from '../transaction/placeOrder';
|
|
8
10
|
import { IAttributes as IMoneyTransferActionAttributes } from './transfer/moneyTransfer';
|
|
9
11
|
export type IAgent = ActionFactory.IParticipantAsProject;
|
|
10
12
|
export type IReservationFor = (Pick<IBusReservationFor, 'id' | 'typeOf'> | Pick<IEventReservationFor, 'id' | 'typeOf'>) & {
|
|
@@ -33,12 +35,19 @@ export type IPurpose = IAssetTransactionAsReservePurpose;
|
|
|
33
35
|
export interface IPotentialActions {
|
|
34
36
|
moneyTransfer?: IMoneyTransferActionAttributes[];
|
|
35
37
|
}
|
|
36
|
-
export
|
|
38
|
+
export type IOrderAsInstrument = Pick<IOrder, 'orderNumber' | 'typeOf'>;
|
|
39
|
+
export type IPlaceOrderAsInstrument = Pick<IPlaceOrder, 'id' | 'typeOf'>;
|
|
40
|
+
export type IInstrument = IOrderAsInstrument | IPlaceOrderAsInstrument;
|
|
41
|
+
export interface IAttributes extends Pick<ActionFactory.IAttributes<ActionType.ReserveAction, IObject, IResult>, 'agent' | 'object' | 'potentialActions' | 'project' | 'purpose' | 'typeOf' | 'error' | 'instrument'> {
|
|
37
42
|
agent: IAgent;
|
|
38
43
|
potentialActions?: IPotentialActions;
|
|
39
44
|
purpose: IPurpose;
|
|
45
|
+
/**
|
|
46
|
+
* add(2025-02-17~)
|
|
47
|
+
*/
|
|
48
|
+
instrument?: IInstrument[];
|
|
40
49
|
}
|
|
41
50
|
/**
|
|
42
|
-
*
|
|
51
|
+
* reserve action
|
|
43
52
|
*/
|
|
44
53
|
export type IAction = ActionFactory.IAction<IAttributes>;
|
|
@@ -5,19 +5,24 @@ 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 {
|
|
14
|
+
import { IAction as IAuthorizeInvoiceAction } from '../authorize/invoice';
|
|
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;
|
|
18
20
|
export interface IOrderAsPayPurpose {
|
|
19
21
|
typeOf: OrderType.Order;
|
|
20
22
|
confirmationNumber: string;
|
|
23
|
+
/**
|
|
24
|
+
* required(2025-02-14~)
|
|
25
|
+
*/
|
|
21
26
|
orderNumber?: string;
|
|
22
27
|
}
|
|
23
28
|
export interface IPurposeAsAssetTransaction {
|
|
@@ -26,7 +31,7 @@ export interface IPurposeAsAssetTransaction {
|
|
|
26
31
|
transactionNumber?: string;
|
|
27
32
|
}
|
|
28
33
|
export type IPurposeAsReturnAction = Pick<IReturnOrderActionAttributes, 'object' | 'typeOf'>;
|
|
29
|
-
export type IPurpose = IOrderAsPayPurpose |
|
|
34
|
+
export type IPurpose = IOrderAsPayPurpose | IPurposeAsReturnAction;
|
|
30
35
|
export type AvailablePaymentMethodType = string;
|
|
31
36
|
export interface IPendingTransaction {
|
|
32
37
|
typeOf: AccountFactory.transactionType;
|
|
@@ -92,21 +97,27 @@ export interface IPaymentService {
|
|
|
92
97
|
serviceOutput?: IPaymentServiceOutput;
|
|
93
98
|
}
|
|
94
99
|
export type IObject = [IPaymentService];
|
|
95
|
-
export
|
|
100
|
+
export interface IInformPayment {
|
|
101
|
+
purpose: IPayTransactionAsPurpose | IRefundTransactionAsPurpose;
|
|
102
|
+
recipient?: never;
|
|
96
103
|
/**
|
|
97
104
|
* potentialAction id
|
|
98
105
|
*/
|
|
99
|
-
id
|
|
100
|
-
}
|
|
106
|
+
id: string;
|
|
107
|
+
}
|
|
101
108
|
export interface IPotentialActions {
|
|
102
109
|
add2report: boolean;
|
|
103
110
|
informPayment?: IInformPayment[];
|
|
104
111
|
}
|
|
105
|
-
export
|
|
112
|
+
export type IOrderAsInstrument = Pick<IOrder, 'orderNumber' | 'typeOf'>;
|
|
113
|
+
export type IAuthorizeActionAsInstrument = Pick<IAuthorizeInvoiceAction, 'id' | 'typeOf'>;
|
|
114
|
+
export interface IPayTransactionAsInstrument {
|
|
106
115
|
id: string;
|
|
107
116
|
transactionNumber: string;
|
|
108
117
|
typeOf: AssetTransactionType.Pay;
|
|
109
118
|
}
|
|
119
|
+
export type IRefundActionAsInstrument = Pick<IRefundAction, 'id' | 'typeOf'>;
|
|
120
|
+
export type IInstrument = IPayTransactionAsInstrument | IOrderAsInstrument | IAuthorizeActionAsInstrument | IRefundActionAsInstrument;
|
|
110
121
|
export interface IResult {
|
|
111
122
|
}
|
|
112
123
|
export interface ILocation {
|
|
@@ -119,11 +130,10 @@ export interface ILocation {
|
|
|
119
130
|
export interface IAttributes extends Pick<ActionFactory.IAttributes<ActionType.PayAction, IObject, IResult>, 'agent' | 'error' | 'instrument' | 'location' | 'object' | 'potentialActions' | 'purpose' | 'recipient' | 'result' | 'project' | 'sameAs' | 'typeOf'> {
|
|
120
131
|
agent: IAgent;
|
|
121
132
|
/**
|
|
122
|
-
* redefine IInstrument(2024-06-15~)
|
|
123
133
|
* 注文決済の場合、決済取引として存在(2024-06-15~)
|
|
124
134
|
* 返品手数料決済の場合、存在しない
|
|
125
135
|
*/
|
|
126
|
-
instrument?: IInstrument;
|
|
136
|
+
instrument?: IPayTransactionAsInstrument | IInstrument[];
|
|
127
137
|
potentialActions?: IPotentialActions;
|
|
128
138
|
purpose: IPurpose;
|
|
129
139
|
recipient: IRecipient;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import * as ActionFactory from '../../action';
|
|
2
2
|
import { ActionType } from '../../actionType';
|
|
3
|
-
import {
|
|
4
|
-
import { IRecipe as
|
|
3
|
+
import { IOrder } from '../../order';
|
|
4
|
+
import { IAlterTranResult, IRecipe as IRefundCreditCardRecipe, IResultAsError as IRefundCreditCardResultAsError } from '../../recipe/refundCreditCard';
|
|
5
|
+
import { IRecipe as IRefundMovieTicketRecipe, IResultAsError as IRefundMovieTicketResultAsError, ISeatInfoSyncCancelIn, ISeatInfoSyncCancelResult, ISeatInfoSyncIn, ISeatInfoSyncResult } from '../../recipe/refundMovieTicket';
|
|
5
6
|
import { TransactionType } from '../../transactionType';
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
7
|
+
import { IRefundTransactionAsPurpose } from '../interact/inform';
|
|
8
|
+
import { IAction as IReturnInvoiceAction } from '../transfer/return/invoice';
|
|
9
|
+
import { IOrderAsPayPurpose, IPaymentMethod, IPaymentService as IPaymentServiceOnPay, IPurposeAsReturnAction } from './pay';
|
|
8
10
|
export { IAlterTranResult, ISeatInfoSyncCancelIn, ISeatInfoSyncCancelResult, ISeatInfoSyncIn, ISeatInfoSyncResult, IRefundCreditCardRecipe, IRefundMovieTicketRecipe };
|
|
9
11
|
export type IAgent = ActionFactory.IParticipantAsSeller;
|
|
10
12
|
export type IRecipient = ActionFactory.IParticipant;
|
|
@@ -13,14 +15,9 @@ export type IPaymentService = Omit<IPaymentServiceOnPay, 'paymentMethod'> & {
|
|
|
13
15
|
paymentMethod: Pick<IPaymentMethod, 'accountId' | 'name' | 'paymentMethodId' | 'typeOf' | 'additionalProperty'>;
|
|
14
16
|
};
|
|
15
17
|
export type IObject = [IPaymentService];
|
|
16
|
-
export
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
export interface ISeatInfoSyncResultAsError {
|
|
21
|
-
name: string;
|
|
22
|
-
message: string;
|
|
23
|
-
}
|
|
18
|
+
export type IAlterTranResultAsError = IRefundCreditCardResultAsError;
|
|
19
|
+
export type ISearchTradeResultAsError = IRefundCreditCardResultAsError;
|
|
20
|
+
export type ISeatInfoSyncResultAsError = IRefundMovieTicketResultAsError;
|
|
24
21
|
export interface IResult {
|
|
25
22
|
/**
|
|
26
23
|
* ペイメントカード決済の場合
|
|
@@ -29,12 +26,14 @@ export interface IResult {
|
|
|
29
26
|
transactionNumber: string;
|
|
30
27
|
};
|
|
31
28
|
}
|
|
32
|
-
export
|
|
29
|
+
export interface IInformPayment {
|
|
30
|
+
purpose: IRefundTransactionAsPurpose;
|
|
31
|
+
recipient?: never;
|
|
33
32
|
/**
|
|
34
33
|
* potentialAction id
|
|
35
34
|
*/
|
|
36
|
-
id
|
|
37
|
-
}
|
|
35
|
+
id: string;
|
|
36
|
+
}
|
|
38
37
|
export interface IPotentialActions {
|
|
39
38
|
add2report: boolean;
|
|
40
39
|
informPayment?: IInformPayment[];
|
|
@@ -43,17 +42,22 @@ export interface IPurposeAsPlaceOrder {
|
|
|
43
42
|
typeOf: TransactionType.PlaceOrder;
|
|
44
43
|
id: string;
|
|
45
44
|
}
|
|
46
|
-
export
|
|
47
|
-
IPurposeAsReturnAction |
|
|
48
|
-
|
|
49
|
-
|
|
45
|
+
export { IOrderAsPayPurpose, IPurposeAsReturnAction };
|
|
46
|
+
export type IPurpose = IOrderAsPayPurpose | IPurposeAsReturnAction | IPurposeAsPlaceOrder;
|
|
47
|
+
export type IOrderAsInstrument = Pick<IOrder, 'orderNumber' | 'typeOf'>;
|
|
48
|
+
export type IReturnActionAsInstrument = Pick<IReturnInvoiceAction, 'id' | 'typeOf'>;
|
|
49
|
+
export type IInstrument = IOrderAsInstrument | IReturnActionAsInstrument;
|
|
50
50
|
export interface IAttributes extends Pick<ActionFactory.IAttributes<ActionType.RefundAction, IObject, IResult>, 'agent' | 'error' | 'object' | 'potentialActions' | 'purpose' | 'recipient' | 'result' | 'project' | 'sameAs' | 'typeOf'> {
|
|
51
51
|
agent: IAgent;
|
|
52
52
|
recipient?: IRecipient;
|
|
53
53
|
purpose: IPurpose;
|
|
54
54
|
potentialActions?: IPotentialActions;
|
|
55
|
+
/**
|
|
56
|
+
* add(2025-02-17~)
|
|
57
|
+
*/
|
|
58
|
+
instrument?: IInstrument[];
|
|
55
59
|
}
|
|
56
60
|
/**
|
|
57
|
-
*
|
|
61
|
+
* refund action
|
|
58
62
|
*/
|
|
59
63
|
export type IAction = ActionFactory.IAction<IAttributes>;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { IParticipantAsCustomer, IParticipantAsPerson, IParticipantAsProject, IParticipantAsWebApplication } from '../../../../action';
|
|
2
2
|
import { ICreativeWork as IEmailMessage } from '../../../../creativeWork/message/email';
|
|
3
3
|
import { ISimpleOrder } from '../../../../order';
|
|
4
|
+
import { IRecipe, ISendMultipleArgs, ISendMultipleResult } from '../../../../recipe/sendEmailMessage';
|
|
4
5
|
import * as SendActionFactory from '../../send';
|
|
6
|
+
export { IRecipe, ISendMultipleArgs, ISendMultipleResult };
|
|
5
7
|
export type IAgent = IParticipantAsProject;
|
|
6
8
|
export type IRecipient = IParticipantAsWebApplication | IParticipantAsPerson | IParticipantAsCustomer;
|
|
7
9
|
export type IObjectAsEmailMessage = Pick<IEmailMessage, 'about' | 'identifier' | 'name' | 'sender' | 'text' | 'toRecipient' | 'typeOf'>;
|
package/lib/action.d.ts
CHANGED
|
@@ -10,8 +10,11 @@ import { IProject } from './project';
|
|
|
10
10
|
import { SortType } from './sortType';
|
|
11
11
|
export interface IParticipantOptionalAttributes {
|
|
12
12
|
name?: string;
|
|
13
|
-
url?: string;
|
|
14
13
|
}
|
|
14
|
+
export type IRecipientAsAnonymousWebApplication = IParticipantOptionalAttributes & {
|
|
15
|
+
typeOf: CreativeWorkType.WebApplication;
|
|
16
|
+
id?: never;
|
|
17
|
+
};
|
|
15
18
|
export type IParticipantAsWebApplication = IParticipantOptionalAttributes & {
|
|
16
19
|
typeOf: CreativeWorkType.WebApplication;
|
|
17
20
|
id: string;
|
|
@@ -48,6 +51,7 @@ export interface IPurpose {
|
|
|
48
51
|
typeOf: string;
|
|
49
52
|
id?: string;
|
|
50
53
|
}
|
|
54
|
+
export type IRecipient = IParticipant | IRecipientAsAnonymousWebApplication;
|
|
51
55
|
export interface ISameAs {
|
|
52
56
|
/**
|
|
53
57
|
* タスクID or 資産取引ID
|
|
@@ -71,7 +75,7 @@ export interface IAttributes<T extends ActionType, TObject, TResult> {
|
|
|
71
75
|
object: TObject;
|
|
72
76
|
potentialActions?: any;
|
|
73
77
|
purpose?: IPurpose;
|
|
74
|
-
recipient?:
|
|
78
|
+
recipient?: IRecipient;
|
|
75
79
|
result?: TResult;
|
|
76
80
|
sameAs?: ISameAs;
|
|
77
81
|
/**
|
|
@@ -86,6 +90,10 @@ export interface IAttributes<T extends ActionType, TObject, TResult> {
|
|
|
86
90
|
cancelAction?: any;
|
|
87
91
|
about?: any;
|
|
88
92
|
target?: IEntryPoint;
|
|
93
|
+
/**
|
|
94
|
+
* globally unique identifier(2025-02-25~)
|
|
95
|
+
*/
|
|
96
|
+
identifier?: string;
|
|
89
97
|
}
|
|
90
98
|
/**
|
|
91
99
|
* アクション動的属性
|
|
@@ -156,6 +164,12 @@ export interface ISearchConditions {
|
|
|
156
164
|
identifier?: {
|
|
157
165
|
$eq?: string;
|
|
158
166
|
};
|
|
167
|
+
id?: {
|
|
168
|
+
$eq?: string;
|
|
169
|
+
};
|
|
170
|
+
orderNumber?: {
|
|
171
|
+
$eq?: string;
|
|
172
|
+
};
|
|
159
173
|
};
|
|
160
174
|
location?: {
|
|
161
175
|
id?: {
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { IMultilingualString } from './multilingualString';
|
|
2
|
+
import { IProject } from './project';
|
|
3
|
+
import { IQuantitativeValue } from './quantitativeValue';
|
|
4
|
+
import { SortType } from './sortType';
|
|
5
|
+
import { UnitCode } from './unitCode';
|
|
6
|
+
interface IAdvanceBookingActualUsageHours {
|
|
7
|
+
typeOf: 'OpeningHoursSpecification';
|
|
8
|
+
/**
|
|
9
|
+
* 開始時刻
|
|
10
|
+
* hh:mm:ss[Z|(+|-)hh:mm]
|
|
11
|
+
*/
|
|
12
|
+
opens: string;
|
|
13
|
+
}
|
|
14
|
+
interface IAdvanceBookingRequirement extends Pick<IQuantitativeValue<UnitCode.Day>, 'typeOf' | 'maxValue' | 'minValue' | 'unitCode' | 'description'> {
|
|
15
|
+
project: Pick<IProject, 'id' | 'typeOf'>;
|
|
16
|
+
id: string;
|
|
17
|
+
/**
|
|
18
|
+
* 事前予約要件コード
|
|
19
|
+
*/
|
|
20
|
+
identifier: string;
|
|
21
|
+
/**
|
|
22
|
+
* n日前から
|
|
23
|
+
*/
|
|
24
|
+
maxValue?: number;
|
|
25
|
+
/**
|
|
26
|
+
* n日前まで
|
|
27
|
+
*/
|
|
28
|
+
minValue?: number;
|
|
29
|
+
/**
|
|
30
|
+
* 要件説明
|
|
31
|
+
*/
|
|
32
|
+
description?: IMultilingualString;
|
|
33
|
+
unitCode: UnitCode.Day;
|
|
34
|
+
/**
|
|
35
|
+
* 基準となるイベント開始日の時刻
|
|
36
|
+
* 未定義の場合、イベントのstartDate
|
|
37
|
+
*/
|
|
38
|
+
valueReference?: IAdvanceBookingActualUsageHours;
|
|
39
|
+
}
|
|
40
|
+
interface ISearchConditions {
|
|
41
|
+
limit?: number;
|
|
42
|
+
page?: number;
|
|
43
|
+
sort?: {
|
|
44
|
+
identifier?: SortType;
|
|
45
|
+
};
|
|
46
|
+
project?: {
|
|
47
|
+
id?: {
|
|
48
|
+
$eq?: string;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
id?: {
|
|
52
|
+
$eq?: string;
|
|
53
|
+
$in?: string[];
|
|
54
|
+
};
|
|
55
|
+
identifier?: {
|
|
56
|
+
$eq?: string;
|
|
57
|
+
$regex?: string;
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
export { IAdvanceBookingActualUsageHours, IAdvanceBookingRequirement, ISearchConditions };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IAttributes as ICancelReservationActionAttributes } from '../action/cancel/reservation';
|
|
1
|
+
import { IAttributes as ICancelReservationActionAttributes, IOrderAsInstrument, IReturnActionAsInstrument } from '../action/cancel/reservation';
|
|
2
2
|
import * as AssetTransactionFactory from '../assetTransaction';
|
|
3
3
|
import { ITransaction as IReserveTransaction } from '../assetTransaction/reserve';
|
|
4
4
|
import { AssetTransactionType } from '../assetTransactionType';
|
|
@@ -8,10 +8,13 @@ import { IReservation as IEventReservation, IReservationFor as IEventReservation
|
|
|
8
8
|
import { IReservation as IReservationPackage } from '../reservation/reservationPackage';
|
|
9
9
|
export import IAgent = AssetTransactionFactory.IAgent;
|
|
10
10
|
export type IStartParamsWithoutDetail = AssetTransactionFactory.IStartParams<AssetTransactionType.CancelReservation, IAgent, undefined, IObjectWithoutDetail>;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
export type IInstrument = IOrderAsInstrument | IReturnActionAsInstrument;
|
|
12
|
+
export interface IStartParams extends AssetTransactionFactory.IStartParams<AssetTransactionType.CancelReservation, IAgent, undefined, IObject> {
|
|
13
|
+
/**
|
|
14
|
+
* add(2025-02-17~)
|
|
15
|
+
*/
|
|
16
|
+
instrument?: IInstrument[];
|
|
17
|
+
}
|
|
15
18
|
export interface IResult {
|
|
16
19
|
}
|
|
17
20
|
/**
|