@chevre/factory 11.0.0-alpha.2 → 11.0.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/chevre/index.d.ts
CHANGED
|
@@ -490,7 +490,6 @@ export declare namespace transaction {
|
|
|
490
490
|
export import IAgent = TransactionFactory.IAgent;
|
|
491
491
|
export import IPassportBeforeStart = TransactionFactory.IPassportBeforeStart;
|
|
492
492
|
export import ISendEmailMessageParams = TransactionFactory.ISendEmailMessageParams;
|
|
493
|
-
export import ITasksExportAction = TransactionFactory.ITasksExportAction;
|
|
494
493
|
export import placeOrder = PlaceOrderTransactionFactory;
|
|
495
494
|
export import returnOrder = ReturnOrderTransactionFactory;
|
|
496
495
|
}
|
|
@@ -1,16 +1,13 @@
|
|
|
1
|
+
import { ActionStatusType } from '../actionStatusType';
|
|
1
2
|
import { IExtendId } from '../autoGenerated';
|
|
2
3
|
import { IClientUser } from '../clientUser';
|
|
3
4
|
import { CreativeWorkType } from '../creativeWorkType';
|
|
5
|
+
import { OrganizationType } from '../organizationType';
|
|
4
6
|
import { IIdentifier } from '../person';
|
|
5
|
-
import { PersonType } from '../personType';
|
|
6
7
|
import { SortType } from '../sortType';
|
|
7
|
-
import { IAgent as IBaseAgent,
|
|
8
|
+
import { IAgent as IBaseAgent, IStartParams as IBaseStartParams, IAttributes as IBaseAttributes } from '../transaction';
|
|
8
9
|
import { TransactionStatusType } from '../transactionStatusType';
|
|
9
10
|
import { TransactionType } from '../transactionType';
|
|
10
|
-
export interface IMemberOfPayload {
|
|
11
|
-
iss: string;
|
|
12
|
-
sub: string;
|
|
13
|
-
}
|
|
14
11
|
/**
|
|
15
12
|
* 取引人
|
|
16
13
|
*/
|
|
@@ -49,12 +46,14 @@ export interface IObject {
|
|
|
49
46
|
broker?: never;
|
|
50
47
|
}
|
|
51
48
|
export type IClientUserBeforeStart = Pick<IClientUser, 'aud' | 'client_id' | 'exp' | 'iat' | 'iss' | 'jti' | 'sub' | 'token_use' | 'username'>;
|
|
52
|
-
export
|
|
49
|
+
export interface ISeller {
|
|
50
|
+
typeOf: OrganizationType.Corporation;
|
|
51
|
+
id: string;
|
|
53
52
|
name: {
|
|
54
53
|
ja?: string;
|
|
55
54
|
};
|
|
56
55
|
additionalProperty?: never;
|
|
57
|
-
}
|
|
56
|
+
}
|
|
58
57
|
export interface IInstrument {
|
|
59
58
|
typeOf: CreativeWorkType.WebApplication;
|
|
60
59
|
/**
|
|
@@ -65,7 +64,7 @@ export interface IInstrument {
|
|
|
65
64
|
/**
|
|
66
65
|
* 取引開始パラメーター
|
|
67
66
|
*/
|
|
68
|
-
export interface IStartParams extends Pick<IBaseStartParams<TransactionType.PlaceOrder, IAgent,
|
|
67
|
+
export interface IStartParams extends Pick<IBaseStartParams<TransactionType.PlaceOrder, IAgent, IObject>, 'agent' | 'project' | 'object' | 'typeOf'> {
|
|
69
68
|
/**
|
|
70
69
|
* 販売者
|
|
71
70
|
*/
|
|
@@ -104,12 +103,20 @@ export interface IResult {
|
|
|
104
103
|
order?: never;
|
|
105
104
|
numAcceptedOffers?: never;
|
|
106
105
|
}
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
106
|
+
export interface ITasksExportAction {
|
|
107
|
+
actionStatus: ActionStatusType;
|
|
108
|
+
agent?: {
|
|
109
|
+
name: string;
|
|
110
|
+
};
|
|
111
|
+
startDate?: Date;
|
|
112
|
+
endDate?: Date;
|
|
113
|
+
}
|
|
114
|
+
export interface IAttributes extends Pick<IBaseAttributes<Omit<IStartParams, 'expiresInSeconds'>>, 'agent' | 'endDate' | 'expires' | 'instrument' | 'object' | 'project' | 'seller' | 'startDate' | 'status' | 'typeOf'> {
|
|
115
|
+
/**
|
|
116
|
+
* 取引結果
|
|
117
|
+
*/
|
|
118
|
+
result?: IResult;
|
|
119
|
+
tasksExportAction?: ITasksExportAction;
|
|
113
120
|
}
|
|
114
121
|
/**
|
|
115
122
|
* 注文取引
|
|
@@ -134,10 +141,6 @@ export interface ISearchConditions {
|
|
|
134
141
|
* IDリスト
|
|
135
142
|
*/
|
|
136
143
|
ids?: string[];
|
|
137
|
-
/**
|
|
138
|
-
* ステータスリスト
|
|
139
|
-
* @deprecated use tasksExportAction
|
|
140
|
-
*/
|
|
141
144
|
statuses?: TransactionStatusType[];
|
|
142
145
|
status?: {
|
|
143
146
|
$in?: TransactionStatusType[];
|
|
@@ -151,9 +154,9 @@ export interface ISearchConditions {
|
|
|
151
154
|
*/
|
|
152
155
|
startThrough?: Date;
|
|
153
156
|
agent?: {
|
|
154
|
-
typeOf?: PersonType.Person | CreativeWorkType.WebApplication;
|
|
155
|
-
ids?: string[];
|
|
156
157
|
identifiers?: IIdentifier;
|
|
158
|
+
typeOf?: never;
|
|
159
|
+
ids?: never;
|
|
157
160
|
};
|
|
158
161
|
seller?: {
|
|
159
162
|
ids?: string[];
|
|
@@ -28,7 +28,7 @@ export interface IReturnableOrder {
|
|
|
28
28
|
/**
|
|
29
29
|
* 取引開始パラメータ
|
|
30
30
|
*/
|
|
31
|
-
export interface IStartParams extends Pick<IBaseStartParams<TransactionType.ReturnOrder, IAgent,
|
|
31
|
+
export interface IStartParams extends Pick<IBaseStartParams<TransactionType.ReturnOrder, IAgent, IObject>, 'project' | 'typeOf' | 'object' | 'agent'> {
|
|
32
32
|
expiresInSeconds: number;
|
|
33
33
|
seller?: never;
|
|
34
34
|
}
|
|
@@ -100,7 +100,11 @@ export interface IPotentialActions {
|
|
|
100
100
|
*/
|
|
101
101
|
returnOrder: IReturnOrderPotentialAction[];
|
|
102
102
|
}
|
|
103
|
-
export interface IAttributes extends IBaseAttributes<Pick<IStartParams, 'project' | 'typeOf' | 'object' | 'agent'
|
|
103
|
+
export interface IAttributes extends Pick<IBaseAttributes<Pick<IStartParams, 'project' | 'typeOf' | 'object' | 'agent'>>, 'agent' | 'expires' | 'object' | 'project' | 'startDate' | 'status' | 'typeOf'> {
|
|
104
|
+
/**
|
|
105
|
+
* 事後に発生するアクション
|
|
106
|
+
*/
|
|
107
|
+
potentialActions?: IPotentialActions;
|
|
104
108
|
}
|
|
105
109
|
/**
|
|
106
110
|
* 返品取引
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import { passport } from '@waiter/factory';
|
|
2
|
-
import { ActionStatusType } from './actionStatusType';
|
|
3
|
-
import { IExtendId } from './autoGenerated';
|
|
4
2
|
import { ICustomization as IEmailICustomization } from './creativeWork/message/email';
|
|
5
3
|
import { ICreativeWork as IWebApplication } from './creativeWork/softwareApplication/webApplication';
|
|
6
|
-
import { IMultilingualString } from './multilingualString';
|
|
7
4
|
import { OrganizationType } from './organizationType';
|
|
8
5
|
import { IPersonAttributes } from './person';
|
|
9
6
|
import { TransactionStatusType } from './transactionStatusType';
|
|
@@ -15,14 +12,6 @@ export interface IAgentAsPerson extends Pick<IPersonAttributes, 'id' | 'identifi
|
|
|
15
12
|
name?: string;
|
|
16
13
|
}
|
|
17
14
|
export type IAgent = IAgentAsWebApplication | IAgentAsPerson;
|
|
18
|
-
/**
|
|
19
|
-
* 販売者
|
|
20
|
-
*/
|
|
21
|
-
export interface ISeller {
|
|
22
|
-
typeOf: OrganizationType.Corporation;
|
|
23
|
-
id: string;
|
|
24
|
-
name: IMultilingualString;
|
|
25
|
-
}
|
|
26
15
|
/**
|
|
27
16
|
* Eメール送信パラメータ
|
|
28
17
|
*/
|
|
@@ -45,18 +34,10 @@ export interface IProject {
|
|
|
45
34
|
id: string;
|
|
46
35
|
typeOf: OrganizationType.Project;
|
|
47
36
|
}
|
|
48
|
-
export interface ITasksExportAction {
|
|
49
|
-
actionStatus: ActionStatusType;
|
|
50
|
-
agent?: {
|
|
51
|
-
name: string;
|
|
52
|
-
};
|
|
53
|
-
startDate?: Date;
|
|
54
|
-
endDate?: Date;
|
|
55
|
-
}
|
|
56
37
|
/**
|
|
57
38
|
* 取引開始パラメータ
|
|
58
39
|
*/
|
|
59
|
-
export interface IStartParams<T extends TransactionType, TAgent,
|
|
40
|
+
export interface IStartParams<T extends TransactionType, TAgent, TObject> {
|
|
60
41
|
project: IProject;
|
|
61
42
|
/**
|
|
62
43
|
* 取引タイプ
|
|
@@ -66,10 +47,6 @@ export interface IStartParams<T extends TransactionType, TAgent, TRecipient, TOb
|
|
|
66
47
|
* 取引主体
|
|
67
48
|
*/
|
|
68
49
|
agent: TAgent;
|
|
69
|
-
/**
|
|
70
|
-
* 取引物受取者
|
|
71
|
-
*/
|
|
72
|
-
recipient?: TRecipient;
|
|
73
50
|
/**
|
|
74
51
|
* 取引対象
|
|
75
52
|
*/
|
|
@@ -79,19 +56,11 @@ export interface IStartParams<T extends TransactionType, TAgent, TRecipient, TOb
|
|
|
79
56
|
*/
|
|
80
57
|
expires: Date;
|
|
81
58
|
}
|
|
82
|
-
export type IAttributes<TStartParams
|
|
59
|
+
export type IAttributes<TStartParams> = TStartParams & {
|
|
83
60
|
/**
|
|
84
61
|
* 取引状態
|
|
85
62
|
*/
|
|
86
63
|
status: TransactionStatusType;
|
|
87
|
-
/**
|
|
88
|
-
* 取引結果
|
|
89
|
-
*/
|
|
90
|
-
result?: TResult;
|
|
91
|
-
/**
|
|
92
|
-
* 取引エラー
|
|
93
|
-
*/
|
|
94
|
-
error?: TError;
|
|
95
64
|
/**
|
|
96
65
|
* 取引進行期限
|
|
97
66
|
*/
|
|
@@ -104,10 +73,4 @@ export type IAttributes<TStartParams, TResult, TError, TPotentialActions> = TSta
|
|
|
104
73
|
* 取引終了日時
|
|
105
74
|
*/
|
|
106
75
|
endDate?: Date;
|
|
107
|
-
tasksExportAction?: ITasksExportAction;
|
|
108
|
-
/**
|
|
109
|
-
* 事後に発生するアクション
|
|
110
|
-
*/
|
|
111
|
-
potentialActions?: TPotentialActions;
|
|
112
76
|
};
|
|
113
|
-
export type ITransaction<TStartParams, TResult, TError, TPotentialActions> = IExtendId<IAttributes<TStartParams, TResult, TError, TPotentialActions>>;
|