@chevre/factory 4.376.0-alpha.1 → 4.376.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/trade/order.d.ts +1 -12
- package/lib/action/transfer/return/invoice.d.ts +1 -1
- package/lib/action/transfer/return/order.d.ts +3 -3
- package/lib/action/transfer/send/message/email.d.ts +5 -1
- package/lib/order.d.ts +8 -8
- package/lib/transaction/placeOrder.d.ts +19 -2
- package/lib/transaction/returnOrder.d.ts +4 -6
- package/package.json +1 -1
|
@@ -2,27 +2,16 @@ import * as ActionFactory from '../../action';
|
|
|
2
2
|
import { ActionType } from '../../actionType';
|
|
3
3
|
import { ISimpleOrder } from '../../order';
|
|
4
4
|
import { TransactionType } from '../../transactionType';
|
|
5
|
-
import { IAttributes as ISendEmailMessageActionAttributes } from '../transfer/send/message/email';
|
|
6
5
|
export type IAgent = ActionFactory.IParticipant;
|
|
7
6
|
export type IRecipient = ActionFactory.IParticipant;
|
|
8
7
|
export type IObject = ISimpleOrder;
|
|
9
8
|
export interface IResult {
|
|
10
9
|
}
|
|
11
|
-
export type IPotentialSendEmailMessageAction = Pick<ISendEmailMessageActionAttributes, 'object'>;
|
|
12
|
-
export interface IPotentialSendOrderAction {
|
|
13
|
-
potentialActions?: {
|
|
14
|
-
sendEmailMessage?: IPotentialSendEmailMessageAction[];
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
export interface IPotentialActions {
|
|
18
|
-
sendOrder?: IPotentialSendOrderAction;
|
|
19
|
-
}
|
|
20
10
|
export interface IPurpose {
|
|
21
11
|
typeOf: TransactionType.PlaceOrder;
|
|
22
12
|
id: string;
|
|
23
13
|
}
|
|
24
|
-
export interface IAttributes extends Pick<ActionFactory.IAttributes<ActionType.OrderAction, IObject, IResult>, 'typeOf' | 'result' | 'purpose' | 'project' | '
|
|
25
|
-
potentialActions?: IPotentialActions;
|
|
14
|
+
export interface IAttributes extends Pick<ActionFactory.IAttributes<ActionType.OrderAction, IObject, IResult>, 'typeOf' | 'result' | 'purpose' | 'project' | 'object' | 'error' | 'agent'> {
|
|
26
15
|
purpose?: IPurpose;
|
|
27
16
|
}
|
|
28
17
|
/**
|
|
@@ -13,7 +13,7 @@ export interface IResult {
|
|
|
13
13
|
export type IPotentialSendEmailMessageAction = Pick<ISendEmailMessageActionAttributes, 'object'>;
|
|
14
14
|
export interface IPotentialActions {
|
|
15
15
|
/**
|
|
16
|
-
*
|
|
16
|
+
* 返金取引確定を通知するEメール送信アクション
|
|
17
17
|
*/
|
|
18
18
|
sendEmailMessage?: IPotentialSendEmailMessageAction[];
|
|
19
19
|
}
|
|
@@ -15,7 +15,8 @@ export type IObject = OrderFactory.ISimpleOrder & {
|
|
|
15
15
|
*/
|
|
16
16
|
dateReturned: Date;
|
|
17
17
|
};
|
|
18
|
-
export
|
|
18
|
+
export interface IResult {
|
|
19
|
+
}
|
|
19
20
|
export type IPotentialReturnInvoiceAction = Pick<IReturnInvoiceActionAttributes, 'object' | 'potentialActions'>;
|
|
20
21
|
export type IPotentialReturnPointAwardAction = ReturnPointAwardActionFactory.IAttributes;
|
|
21
22
|
export type IPotentialSendEmailMessageAction = Pick<ISendEmailMessageActionAttributes, 'object'>;
|
|
@@ -34,11 +35,10 @@ export interface IPotentialActions {
|
|
|
34
35
|
*/
|
|
35
36
|
sendEmailMessage?: IPotentialSendEmailMessageAction[];
|
|
36
37
|
}
|
|
37
|
-
export interface IAttributes extends ReturnActionFactory.IAttributes<IObject, IResult> {
|
|
38
|
+
export interface IAttributes extends Pick<ReturnActionFactory.IAttributes<IObject, IResult>, 'typeOf' | 'sameAs' | 'result' | 'recipient' | 'project' | 'potentialActions' | 'object' | 'error' | 'agent'> {
|
|
38
39
|
agent: IAgent;
|
|
39
40
|
recipient: IRecipient;
|
|
40
41
|
potentialActions?: IPotentialActions;
|
|
41
|
-
purpose?: never;
|
|
42
42
|
}
|
|
43
43
|
/**
|
|
44
44
|
* 返品アクション
|
|
@@ -9,7 +9,11 @@ export type IOptimizedObject = Pick<IEmailMessage, 'identifier' | 'typeOf'> & {
|
|
|
9
9
|
identifier: string;
|
|
10
10
|
text?: never;
|
|
11
11
|
};
|
|
12
|
-
export type IObject =
|
|
12
|
+
export type IObject =
|
|
13
|
+
/**
|
|
14
|
+
* @deprecated use IOptimizedObject
|
|
15
|
+
*/
|
|
16
|
+
IObjectAsEmailMessage | IOptimizedObject;
|
|
13
17
|
export interface IResult {
|
|
14
18
|
statusCode?: number;
|
|
15
19
|
statusMessage?: string;
|
package/lib/order.d.ts
CHANGED
|
@@ -206,14 +206,6 @@ export interface ISimpleOrder {
|
|
|
206
206
|
* The merchant- specific identifier for the transaction.
|
|
207
207
|
*/
|
|
208
208
|
orderNumber: string;
|
|
209
|
-
/**
|
|
210
|
-
* The total price of the entire transaction.
|
|
211
|
-
*/
|
|
212
|
-
price: number;
|
|
213
|
-
/**
|
|
214
|
-
* The currency (in 3 - letter ISO 4217 format) of the order price.
|
|
215
|
-
*/
|
|
216
|
-
priceCurrency: PriceCurrency;
|
|
217
209
|
/**
|
|
218
210
|
* Date order was placed.
|
|
219
211
|
*/
|
|
@@ -305,6 +297,14 @@ export interface IOrder extends ISimpleOrder {
|
|
|
305
297
|
*/
|
|
306
298
|
paymentMethods: IReferencedInvoice[];
|
|
307
299
|
previousOrderStatus?: OrderStatus;
|
|
300
|
+
/**
|
|
301
|
+
* The total price of the entire transaction.
|
|
302
|
+
*/
|
|
303
|
+
price: number;
|
|
304
|
+
/**
|
|
305
|
+
* The currency (in 3 - letter ISO 4217 format) of the order price.
|
|
306
|
+
*/
|
|
307
|
+
priceCurrency: PriceCurrency;
|
|
308
308
|
/**
|
|
309
309
|
* Returner
|
|
310
310
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { passport } from '@waiter/factory';
|
|
2
2
|
import { AccountType } from '../accountType';
|
|
3
|
-
import { IAttributes as
|
|
3
|
+
import { IAttributes as ISendEmailMessageActionAttributes } from '../action/transfer/send/message/email';
|
|
4
4
|
import { IExtendId } from '../autoGenerated';
|
|
5
5
|
import { IClientUser } from '../clientUser';
|
|
6
6
|
import { CreativeWorkType } from '../creativeWorkType';
|
|
@@ -185,8 +185,25 @@ export interface IResult {
|
|
|
185
185
|
* エラー
|
|
186
186
|
*/
|
|
187
187
|
export type IError = any;
|
|
188
|
+
export type IPotentialSendEmailMessageAction = Pick<ISendEmailMessageActionAttributes, 'object'>;
|
|
189
|
+
export interface IPotentialSendOrderAction {
|
|
190
|
+
potentialActions?: {
|
|
191
|
+
sendEmailMessage?: IPotentialSendEmailMessageAction[];
|
|
192
|
+
};
|
|
193
|
+
}
|
|
194
|
+
export interface IOrderPotentialActions {
|
|
195
|
+
sendOrder?: IPotentialSendOrderAction;
|
|
196
|
+
}
|
|
188
197
|
export interface IPotentialActions {
|
|
189
|
-
order:
|
|
198
|
+
order: {
|
|
199
|
+
/**
|
|
200
|
+
* @deprecated use onOrderProcessing(already migrated 2024-06-29~)
|
|
201
|
+
*/
|
|
202
|
+
potentialActions?: IOrderPotentialActions;
|
|
203
|
+
onOrderProcessing?: {
|
|
204
|
+
sendEmailMessage?: IPotentialSendEmailMessageAction[];
|
|
205
|
+
};
|
|
206
|
+
};
|
|
190
207
|
}
|
|
191
208
|
export interface IAttributes extends TransactionFactory.IAttributes<Omit<IStartParams, 'expiresInSeconds'>, IResult, IError, IPotentialActions> {
|
|
192
209
|
}
|
|
@@ -89,15 +89,12 @@ export interface IReturnOrderActionParams {
|
|
|
89
89
|
*/
|
|
90
90
|
potentialActions?: {
|
|
91
91
|
/**
|
|
92
|
-
*
|
|
92
|
+
* 返金アクションについてカスタマイズする場合に指定
|
|
93
93
|
* 属性名称がrefundCreditCardであるが、全ての決済方法に適用可能
|
|
94
94
|
*/
|
|
95
95
|
refundCreditCard?: IRefundParams[];
|
|
96
96
|
/**
|
|
97
|
-
*
|
|
98
|
-
*/
|
|
99
|
-
/**
|
|
100
|
-
* Eメール送信アクション
|
|
97
|
+
* 返品時Eメール送信アクション
|
|
101
98
|
*/
|
|
102
99
|
sendEmailMessage?: ISendEmailMessageParams[];
|
|
103
100
|
};
|
|
@@ -137,7 +134,7 @@ export interface IReturnFeesMovieTicket {
|
|
|
137
134
|
typeOf: string;
|
|
138
135
|
};
|
|
139
136
|
}
|
|
140
|
-
export type IReturnPolicyItemCondition = IOfferItemCondition
|
|
137
|
+
export type IReturnPolicyItemCondition = Pick<IOfferItemCondition, 'id' | 'identifier' | 'itemOffered' | 'typeOf'>;
|
|
141
138
|
/**
|
|
142
139
|
* 取引に適用される返品ポリシー
|
|
143
140
|
* 販売者の返品ポリシー、あるいは、プロジェクトの返品ポリシーから選択される
|
|
@@ -161,6 +158,7 @@ export interface IObject {
|
|
|
161
158
|
order: IReturnableOrder[];
|
|
162
159
|
reason: Reason;
|
|
163
160
|
returnPolicy: IReturnPolicy;
|
|
161
|
+
usedReservationExists?: boolean;
|
|
164
162
|
}
|
|
165
163
|
export type IReturnOrderPotentialAction = Pick<IReturnOrderActionAttributes, 'agent' | 'object' | 'potentialActions' | 'typeOf'>;
|
|
166
164
|
export interface IPotentialActions {
|