@chevre/factory 10.5.0-alpha.7 → 11.0.0-alpha.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.
|
@@ -8,7 +8,6 @@ import { IPlace as IRoom } from '../../place/screeningRoom';
|
|
|
8
8
|
import { IProduct } from '../../product';
|
|
9
9
|
import { ISeller } from '../../seller';
|
|
10
10
|
import { IObject as IPlaceOrderObject, ITransaction as IPlaceOrder } from '../../transaction/placeOrder';
|
|
11
|
-
import { IObject as IReturnOrderObject, ITransaction as IReturnOrder } from '../../transaction/returnOrder';
|
|
12
11
|
/**
|
|
13
12
|
* 削除者は現時点でプロジェクトのみ
|
|
14
13
|
*/
|
|
@@ -37,14 +36,7 @@ export type IObjectAsPlaceOrder = Pick<IPlaceOrder, 'id' | 'typeOf'> & {
|
|
|
37
36
|
endDate?: never;
|
|
38
37
|
project?: never;
|
|
39
38
|
};
|
|
40
|
-
export type
|
|
41
|
-
object: Pick<IReturnOrderObject, 'order'>;
|
|
42
|
-
specifyingMethod?: ObjectAsTransactionSpecifyingMethod.Id;
|
|
43
|
-
startDate?: never;
|
|
44
|
-
endDate?: never;
|
|
45
|
-
project?: never;
|
|
46
|
-
};
|
|
47
|
-
export type IObject = IObjectAsProduct | IObjectAsOfferCatalog | IObjectAsAggregateOffer | IObjectAsSeller | IObjectAsMovieTheater | IObjectAsRoom | IObjectAsEventSeries | IObjectAsPlaceOrder | IObjectAsReturnOrder;
|
|
39
|
+
export type IObject = IObjectAsProduct | IObjectAsOfferCatalog | IObjectAsAggregateOffer | IObjectAsSeller | IObjectAsMovieTheater | IObjectAsRoom | IObjectAsEventSeries | IObjectAsPlaceOrder;
|
|
48
40
|
/**
|
|
49
41
|
* deleteクエリのレスポンスなど削除結果を定義するべきであるが、ひとまず汎用的に
|
|
50
42
|
*/
|
package/lib/chevre/index.d.ts
CHANGED
|
@@ -492,12 +492,6 @@ export declare namespace transaction {
|
|
|
492
492
|
export import ISendEmailMessageParams = TransactionFactory.ISendEmailMessageParams;
|
|
493
493
|
export import ISortOrder = TransactionFactory.ISortOrder;
|
|
494
494
|
export import ITasksExportAction = TransactionFactory.ITasksExportAction;
|
|
495
|
-
type ISearchConditions<T extends TransactionType> = T extends TransactionType.PlaceOrder ? PlaceOrderTransactionFactory.ISearchConditions : T extends TransactionType.ReturnOrder ? ReturnOrderTransactionFactory.ISearchConditions : never;
|
|
496
|
-
type IStartParams<T extends TransactionType> = T extends TransactionType.PlaceOrder ? PlaceOrderTransactionFactory.IStartParams : T extends TransactionType.ReturnOrder ? ReturnOrderTransactionFactory.IStartParams : never;
|
|
497
|
-
type IResult<T extends TransactionType> = T extends TransactionType.PlaceOrder ? PlaceOrderTransactionFactory.IResult : T extends TransactionType.ReturnOrder ? ReturnOrderTransactionFactory.IResult : never;
|
|
498
|
-
type IPotentialActions<T extends TransactionType> = T extends TransactionType.PlaceOrder ? PlaceOrderTransactionFactory.IPotentialActions : T extends TransactionType.ReturnOrder ? ReturnOrderTransactionFactory.IPotentialActions : never;
|
|
499
|
-
type IAttributes<T extends TransactionType> = T extends TransactionType.PlaceOrder ? PlaceOrderTransactionFactory.IAttributes : T extends TransactionType.ReturnOrder ? ReturnOrderTransactionFactory.IAttributes : never;
|
|
500
|
-
type ITransaction<T extends TransactionType> = T extends TransactionType.PlaceOrder ? PlaceOrderTransactionFactory.ITransaction : T extends TransactionType.ReturnOrder ? ReturnOrderTransactionFactory.ITransaction : never;
|
|
501
495
|
export import placeOrder = PlaceOrderTransactionFactory;
|
|
502
496
|
export import returnOrder = ReturnOrderTransactionFactory;
|
|
503
497
|
}
|
|
@@ -2,7 +2,7 @@ import { IExtendId } from '../autoGenerated';
|
|
|
2
2
|
import { ITaskAttributes } from '../task';
|
|
3
3
|
import { TaskName } from '../taskName';
|
|
4
4
|
import type { ITransaction as IReturnOrder } from '../transaction/returnOrder';
|
|
5
|
-
export type IData = Pick<IReturnOrder, 'object' | 'potentialActions' | 'typeOf' | 'agent' | '
|
|
5
|
+
export type IData = Pick<IReturnOrder, 'object' | 'potentialActions' | 'typeOf' | 'agent' | 'startDate' | 'id'>;
|
|
6
6
|
export interface IAttributes extends ITaskAttributes {
|
|
7
7
|
name: TaskName.ConfirmReturnOrder;
|
|
8
8
|
data: IData;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { IObjectAsPlaceOrder
|
|
1
|
+
import { IObjectAsPlaceOrder } from '../action/update/delete';
|
|
2
2
|
import { IExtendId } from '../autoGenerated';
|
|
3
3
|
import { ITaskAttributes } from '../task';
|
|
4
4
|
import { TaskName } from '../taskName';
|
|
5
|
-
export { IObjectAsPlaceOrder,
|
|
6
|
-
export type IObject = IObjectAsPlaceOrder
|
|
5
|
+
export { IObjectAsPlaceOrder, };
|
|
6
|
+
export type IObject = IObjectAsPlaceOrder;
|
|
7
7
|
export interface IData {
|
|
8
8
|
object: IObject;
|
|
9
9
|
}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { IAttributes as IReturnOrderActionAttributes, IReturnPolicy } from '../action/transfer/return/order';
|
|
2
2
|
import { IExtendId } from '../autoGenerated';
|
|
3
|
-
import {
|
|
4
|
-
import { IAgent, ISeller, ISearchConditions as IBaseSearchConditions, ISendEmailMessageParams, IStartParams as IBaseStartParams, IAttributes as IBaseAttributes } from '../transaction';
|
|
3
|
+
import { IAgent as IBaseAgent, ISendEmailMessageParams, IStartParams as IBaseStartParams, IAttributes as IBaseAttributes } from '../transaction';
|
|
5
4
|
import { TransactionType } from '../transactionType';
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
}
|
|
9
|
-
export type IError = any;
|
|
5
|
+
export type IAgent = Pick<IBaseAgent, 'id' | 'typeOf'> & {
|
|
6
|
+
identifier?: never;
|
|
7
|
+
};
|
|
10
8
|
/**
|
|
11
9
|
* 返品理由
|
|
12
10
|
*/
|
|
@@ -27,30 +25,12 @@ export interface IReturnableOrder {
|
|
|
27
25
|
confirmationNumber: string;
|
|
28
26
|
orderNumber: string;
|
|
29
27
|
}
|
|
30
|
-
/**
|
|
31
|
-
* 注文返品開始パラメータ
|
|
32
|
-
*/
|
|
33
|
-
export interface IStartParamsWithoutDetail {
|
|
34
|
-
project: Pick<IProject, 'id' | 'typeOf'>;
|
|
35
|
-
expiresInSeconds?: number;
|
|
36
|
-
agent: IAgent;
|
|
37
|
-
object: {
|
|
38
|
-
order: IReturnableOrder | IReturnableOrder[];
|
|
39
|
-
reason: Reason;
|
|
40
|
-
};
|
|
41
|
-
seller: {
|
|
42
|
-
id: string;
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
28
|
/**
|
|
46
29
|
* 取引開始パラメータ
|
|
47
30
|
*/
|
|
48
|
-
export interface IStartParams extends
|
|
49
|
-
/**
|
|
50
|
-
* 販売者
|
|
51
|
-
*/
|
|
52
|
-
seller: ISeller;
|
|
31
|
+
export interface IStartParams extends Pick<IBaseStartParams<TransactionType.ReturnOrder, IAgent, undefined, IObject>, 'project' | 'typeOf' | 'object' | 'agent'> {
|
|
53
32
|
expiresInSeconds: number;
|
|
33
|
+
seller?: never;
|
|
54
34
|
}
|
|
55
35
|
/**
|
|
56
36
|
* 返金アクションカスタムパラメータ
|
|
@@ -99,20 +79,7 @@ export interface IPotentialActionsParams {
|
|
|
99
79
|
/**
|
|
100
80
|
* 注文返品アクション
|
|
101
81
|
*/
|
|
102
|
-
returnOrder?: IReturnOrderActionParams | IReturnOrderActionParams
|
|
103
|
-
}
|
|
104
|
-
export interface IConfirmParams {
|
|
105
|
-
/**
|
|
106
|
-
* 取引ID
|
|
107
|
-
*/
|
|
108
|
-
id: string;
|
|
109
|
-
agent?: {
|
|
110
|
-
id?: string;
|
|
111
|
-
};
|
|
112
|
-
/**
|
|
113
|
-
* 取引確定後アクション
|
|
114
|
-
*/
|
|
115
|
-
potentialActions?: IPotentialActionsParams;
|
|
82
|
+
returnOrder?: IReturnOrderActionParams | [IReturnOrderActionParams];
|
|
116
83
|
}
|
|
117
84
|
/**
|
|
118
85
|
* 取引対象物
|
|
@@ -133,20 +100,9 @@ export interface IPotentialActions {
|
|
|
133
100
|
*/
|
|
134
101
|
returnOrder: IReturnOrderPotentialAction[];
|
|
135
102
|
}
|
|
136
|
-
export interface IAttributes extends IBaseAttributes<
|
|
103
|
+
export interface IAttributes extends IBaseAttributes<Pick<IStartParams, 'project' | 'typeOf' | 'object' | 'agent'>, never, never, IPotentialActions> {
|
|
137
104
|
}
|
|
138
105
|
/**
|
|
139
106
|
* 返品取引
|
|
140
107
|
*/
|
|
141
108
|
export type ITransaction = IExtendId<IAttributes>;
|
|
142
|
-
export interface ISearchConditions extends IBaseSearchConditions<TransactionType.ReturnOrder> {
|
|
143
|
-
object?: {
|
|
144
|
-
order?: {
|
|
145
|
-
/**
|
|
146
|
-
* 返品対象注文番号
|
|
147
|
-
*/
|
|
148
|
-
orderNumbers?: string[];
|
|
149
|
-
};
|
|
150
|
-
result?: {};
|
|
151
|
-
};
|
|
152
|
-
}
|