@chevre/factory 10.5.0-alpha.8 → 11.0.0-alpha.1

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.
@@ -490,14 +490,7 @@ 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 ISortOrder = TransactionFactory.ISortOrder;
494
493
  export import ITasksExportAction = TransactionFactory.ITasksExportAction;
495
- type ISearchConditions<T extends TransactionType> = T extends TransactionType.PlaceOrder ? PlaceOrderTransactionFactory.ISearchConditions : never;
496
- type IStartParams<T extends TransactionType> = T extends TransactionType.PlaceOrder ? PlaceOrderTransactionFactory.IStartParams : never;
497
- type IResult<T extends TransactionType> = T extends TransactionType.PlaceOrder ? PlaceOrderTransactionFactory.IResult : never;
498
- type IPotentialActions<T extends TransactionType> = T extends TransactionType.PlaceOrder ? PlaceOrderTransactionFactory.IPotentialActions : never;
499
- type IAttributes<T extends TransactionType> = T extends TransactionType.PlaceOrder ? PlaceOrderTransactionFactory.IAttributes : never;
500
- type ITransaction<T extends TransactionType> = T extends TransactionType.PlaceOrder ? PlaceOrderTransactionFactory.ITransaction : never;
501
494
  export import placeOrder = PlaceOrderTransactionFactory;
502
495
  export import returnOrder = ReturnOrderTransactionFactory;
503
496
  }
@@ -1,7 +1,12 @@
1
+ import { ActionStatusType } from '../actionStatusType';
1
2
  import { IExtendId } from '../autoGenerated';
2
3
  import { IClientUser } from '../clientUser';
3
4
  import { CreativeWorkType } from '../creativeWorkType';
4
- import { IAgent as IBaseAgent, ISeller as IBaseSeller, ISearchConditions as IBaseSearchConditions, IStartParams as IBaseStartParams, IAttributes as IBaseAttributes } from '../transaction';
5
+ import { IIdentifier } from '../person';
6
+ import { PersonType } from '../personType';
7
+ import { SortType } from '../sortType';
8
+ import { IAgent as IBaseAgent, ISeller as IBaseSeller, IStartParams as IBaseStartParams, IAttributes as IBaseAttributes } from '../transaction';
9
+ import { TransactionStatusType } from '../transactionStatusType';
5
10
  import { TransactionType } from '../transactionType';
6
11
  export interface IMemberOfPayload {
7
12
  iss: string;
@@ -111,7 +116,46 @@ export interface IAttributes extends IBaseAttributes<Omit<IStartParams, 'expires
111
116
  * 注文取引
112
117
  */
113
118
  export type ITransaction = IExtendId<IAttributes>;
114
- export interface ISearchConditions extends IBaseSearchConditions<TransactionType.PlaceOrder> {
119
+ /**
120
+ * ソート条件
121
+ */
122
+ export interface ISortOrder {
123
+ startDate?: SortType;
124
+ }
125
+ export interface ISearchConditions {
126
+ limit?: number;
127
+ page?: number;
128
+ sort?: ISortOrder;
129
+ project?: {
130
+ id?: {
131
+ $eq?: string;
132
+ };
133
+ };
134
+ /**
135
+ * IDリスト
136
+ */
137
+ ids?: string[];
138
+ /**
139
+ * ステータスリスト
140
+ * @deprecated use tasksExportAction
141
+ */
142
+ statuses?: TransactionStatusType[];
143
+ status?: {
144
+ $in?: TransactionStatusType[];
145
+ };
146
+ /**
147
+ * 開始日時(から)
148
+ */
149
+ startFrom?: Date;
150
+ /**
151
+ * 開始日時(まで)
152
+ */
153
+ startThrough?: Date;
154
+ agent?: {
155
+ typeOf?: PersonType.Person | CreativeWorkType.WebApplication;
156
+ ids?: string[];
157
+ identifiers?: IIdentifier;
158
+ };
115
159
  seller?: {
116
160
  ids?: string[];
117
161
  };
@@ -123,4 +167,10 @@ export interface ISearchConditions extends IBaseSearchConditions<TransactionType
123
167
  $eq?: string;
124
168
  };
125
169
  };
170
+ tasksExportAction?: {
171
+ actionStatus?: {
172
+ $eq?: ActionStatusType;
173
+ $in?: ActionStatusType[];
174
+ };
175
+ };
126
176
  }
@@ -1,11 +1,10 @@
1
1
  import { IAttributes as IReturnOrderActionAttributes, IReturnPolicy } from '../action/transfer/return/order';
2
2
  import { IExtendId } from '../autoGenerated';
3
- import { IProject } from '../project';
4
- import { IAgent, ISeller, 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 { IAgent, ISeller };
7
- export type IResult = never;
8
- export type IError = any;
5
+ export type IAgent = Pick<IBaseAgent, 'id' | 'typeOf'> & {
6
+ identifier?: never;
7
+ };
9
8
  /**
10
9
  * 返品理由
11
10
  */
@@ -26,30 +25,12 @@ export interface IReturnableOrder {
26
25
  confirmationNumber: string;
27
26
  orderNumber: string;
28
27
  }
29
- /**
30
- * 注文返品開始パラメータ
31
- */
32
- export interface IStartParamsWithoutDetail {
33
- project: Pick<IProject, 'id' | 'typeOf'>;
34
- expiresInSeconds?: number;
35
- agent: IAgent;
36
- object: {
37
- order: IReturnableOrder | IReturnableOrder[];
38
- reason: Reason;
39
- };
40
- seller: {
41
- id: string;
42
- };
43
- }
44
28
  /**
45
29
  * 取引開始パラメータ
46
30
  */
47
- export interface IStartParams extends Omit<IBaseStartParams<TransactionType.ReturnOrder, IAgent, undefined, IObject>, 'expires'> {
48
- /**
49
- * 販売者
50
- */
51
- seller: ISeller;
31
+ export interface IStartParams extends Pick<IBaseStartParams<TransactionType.ReturnOrder, IAgent, undefined, IObject>, 'project' | 'typeOf' | 'object' | 'agent'> {
52
32
  expiresInSeconds: number;
33
+ seller?: never;
53
34
  }
54
35
  /**
55
36
  * 返金アクションカスタムパラメータ
@@ -98,20 +79,7 @@ export interface IPotentialActionsParams {
98
79
  /**
99
80
  * 注文返品アクション
100
81
  */
101
- returnOrder?: IReturnOrderActionParams | IReturnOrderActionParams[];
102
- }
103
- export interface IConfirmParams {
104
- /**
105
- * 取引ID
106
- */
107
- id: string;
108
- agent?: {
109
- id?: string;
110
- };
111
- /**
112
- * 取引確定後アクション
113
- */
114
- potentialActions?: IPotentialActionsParams;
82
+ returnOrder?: IReturnOrderActionParams | [IReturnOrderActionParams];
115
83
  }
116
84
  /**
117
85
  * 取引対象物
@@ -132,7 +100,7 @@ export interface IPotentialActions {
132
100
  */
133
101
  returnOrder: IReturnOrderPotentialAction[];
134
102
  }
135
- export interface IAttributes extends IBaseAttributes<Omit<IStartParams, 'expiresInSeconds'>, IResult, IError, IPotentialActions> {
103
+ export interface IAttributes extends IBaseAttributes<Pick<IStartParams, 'project' | 'typeOf' | 'object' | 'agent'>, never, never, IPotentialActions> {
136
104
  }
137
105
  /**
138
106
  * 返品取引
@@ -5,9 +5,7 @@ import { ICustomization as IEmailICustomization } from './creativeWork/message/e
5
5
  import { ICreativeWork as IWebApplication } from './creativeWork/softwareApplication/webApplication';
6
6
  import { IMultilingualString } from './multilingualString';
7
7
  import { OrganizationType } from './organizationType';
8
- import { IIdentifier, IPersonAttributes } from './person';
9
- import { PersonType } from './personType';
10
- import { SortType } from './sortType';
8
+ import { IPersonAttributes } from './person';
11
9
  import { TransactionStatusType } from './transactionStatusType';
12
10
  import { TransactionType } from './transactionType';
13
11
  export interface IAgentAsWebApplication extends Pick<IWebApplication, 'id' | 'identifier' | 'typeOf'> {
@@ -113,62 +111,3 @@ export type IAttributes<TStartParams, TResult, TError, TPotentialActions> = TSta
113
111
  potentialActions?: TPotentialActions;
114
112
  };
115
113
  export type ITransaction<TStartParams, TResult, TError, TPotentialActions> = IExtendId<IAttributes<TStartParams, TResult, TError, TPotentialActions>>;
116
- /**
117
- * ソート条件
118
- */
119
- export interface ISortOrder {
120
- startDate?: SortType;
121
- }
122
- export interface ISearchConditions<T extends TransactionType> {
123
- limit?: number;
124
- page?: number;
125
- sort?: ISortOrder;
126
- project?: {
127
- id?: {
128
- $eq?: string;
129
- };
130
- };
131
- /**
132
- * 取引タイプ
133
- */
134
- typeOf: T;
135
- /**
136
- * IDリスト
137
- */
138
- ids?: string[];
139
- /**
140
- * ステータスリスト
141
- * @deprecated use tasksExportAction
142
- */
143
- statuses?: TransactionStatusType[];
144
- status?: {
145
- $in?: TransactionStatusType[];
146
- };
147
- /**
148
- * 開始日時(から)
149
- */
150
- startFrom?: Date;
151
- /**
152
- * 開始日時(まで)
153
- */
154
- startThrough?: Date;
155
- /**
156
- * 終了日時(から)
157
- */
158
- endFrom?: Date;
159
- /**
160
- * 終了日時(まで)
161
- */
162
- endThrough?: Date;
163
- agent?: {
164
- typeOf?: PersonType.Person | IWebApplication['typeOf'];
165
- ids?: string[];
166
- identifiers?: IIdentifier;
167
- };
168
- tasksExportAction?: {
169
- actionStatus?: {
170
- $eq?: ActionStatusType;
171
- $in?: ActionStatusType[];
172
- };
173
- };
174
- }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chevre/factory",
3
- "version": "10.5.0-alpha.8",
3
+ "version": "11.0.0-alpha.1",
4
4
  "main": "./lib/index.js",
5
5
  "types": "./lib/index.d.ts",
6
6
  "files": [