@chevre/factory 11.0.0-alpha.1 → 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.
@@ -191,7 +191,17 @@ export type ICreateParams = Pick<IAttributes, 'name' | 'duration' | 'endDate' |
191
191
  /**
192
192
  * 検索条件
193
193
  */
194
- export interface ISearchConditions extends Pick<IBaseSearchConditions, 'additionalProperty' | 'endFrom' | 'endThrough' | 'id' | 'inSessionFrom' | 'inSessionThrough' | 'limit' | 'organizer' | 'page' | 'project' | 'sort' | 'startFrom' | 'startThrough'> {
194
+ export interface ISearchConditions extends Pick<IBaseSearchConditions, 'endFrom' | 'endThrough' | 'id' | 'inSessionFrom' | 'inSessionThrough' | 'limit' | 'organizer' | 'page' | 'project' | 'sort' | 'startFrom' | 'startThrough'> {
195
+ additionalProperty?: {
196
+ $elemMatch?: {
197
+ name?: {
198
+ /**
199
+ * 一致する名称の追加特性がひとつでも存在する
200
+ */
201
+ $eq?: string;
202
+ };
203
+ };
204
+ };
195
205
  typeOf?: EventType.ScreeningEventSeries;
196
206
  name?: string;
197
207
  location?: {
@@ -365,7 +365,16 @@ export interface IOfferSearchConditions {
365
365
  * イベント検索条件
366
366
  */
367
367
  export interface ISearchConditions extends IBaseSearchConditions {
368
- typeOf?: EventType.ScreeningEvent;
368
+ additionalProperty?: {
369
+ $elemMatch?: {
370
+ name?: {
371
+ /**
372
+ * 一致する名称の追加特性がひとつでも存在する
373
+ */
374
+ $eq?: string;
375
+ };
376
+ };
377
+ };
369
378
  /**
370
379
  * イベントステータス
371
380
  */
@@ -91,16 +91,4 @@ export interface ISearchConditions {
91
91
  * ISO 8601 date format
92
92
  */
93
93
  endThrough?: Date;
94
- additionalProperty?: {
95
- $elemMatch?: {
96
- name?: {
97
- /**
98
- * 一致する名称の追加特性がひとつでも存在する
99
- */
100
- $eq?: string;
101
- };
102
- };
103
- };
104
- typeOfIn?: never;
105
- name?: never;
106
94
  }
@@ -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
  }
@@ -2,16 +2,12 @@ import { ActionStatusType } from '../actionStatusType';
2
2
  import { IExtendId } from '../autoGenerated';
3
3
  import { IClientUser } from '../clientUser';
4
4
  import { CreativeWorkType } from '../creativeWorkType';
5
+ import { OrganizationType } from '../organizationType';
5
6
  import { IIdentifier } from '../person';
6
- import { PersonType } from '../personType';
7
7
  import { SortType } from '../sortType';
8
- import { IAgent as IBaseAgent, ISeller as IBaseSeller, IStartParams as IBaseStartParams, IAttributes as IBaseAttributes } from '../transaction';
8
+ import { IAgent as IBaseAgent, IStartParams as IBaseStartParams, IAttributes as IBaseAttributes } from '../transaction';
9
9
  import { TransactionStatusType } from '../transactionStatusType';
10
10
  import { TransactionType } from '../transactionType';
11
- export interface IMemberOfPayload {
12
- iss: string;
13
- sub: string;
14
- }
15
11
  /**
16
12
  * 取引人
17
13
  */
@@ -50,12 +46,14 @@ export interface IObject {
50
46
  broker?: never;
51
47
  }
52
48
  export type IClientUserBeforeStart = Pick<IClientUser, 'aud' | 'client_id' | 'exp' | 'iat' | 'iss' | 'jti' | 'sub' | 'token_use' | 'username'>;
53
- export type ISeller = Pick<IBaseSeller, 'id' | 'typeOf'> & {
49
+ export interface ISeller {
50
+ typeOf: OrganizationType.Corporation;
51
+ id: string;
54
52
  name: {
55
53
  ja?: string;
56
54
  };
57
55
  additionalProperty?: never;
58
- };
56
+ }
59
57
  export interface IInstrument {
60
58
  typeOf: CreativeWorkType.WebApplication;
61
59
  /**
@@ -66,7 +64,7 @@ export interface IInstrument {
66
64
  /**
67
65
  * 取引開始パラメーター
68
66
  */
69
- export interface IStartParams extends Pick<IBaseStartParams<TransactionType.PlaceOrder, IAgent, undefined, IObject>, 'agent' | 'project' | 'object' | 'typeOf'> {
67
+ export interface IStartParams extends Pick<IBaseStartParams<TransactionType.PlaceOrder, IAgent, IObject>, 'agent' | 'project' | 'object' | 'typeOf'> {
70
68
  /**
71
69
  * 販売者
72
70
  */
@@ -105,12 +103,20 @@ export interface IResult {
105
103
  order?: never;
106
104
  numAcceptedOffers?: never;
107
105
  }
108
- /**
109
- * エラー
110
- */
111
- export type IError = any;
112
- export type IPotentialActions = never;
113
- export interface IAttributes extends IBaseAttributes<Omit<IStartParams, 'expiresInSeconds'>, IResult, IError, IPotentialActions> {
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;
114
120
  }
115
121
  /**
116
122
  * 注文取引
@@ -135,10 +141,6 @@ export interface ISearchConditions {
135
141
  * IDリスト
136
142
  */
137
143
  ids?: string[];
138
- /**
139
- * ステータスリスト
140
- * @deprecated use tasksExportAction
141
- */
142
144
  statuses?: TransactionStatusType[];
143
145
  status?: {
144
146
  $in?: TransactionStatusType[];
@@ -152,9 +154,9 @@ export interface ISearchConditions {
152
154
  */
153
155
  startThrough?: Date;
154
156
  agent?: {
155
- typeOf?: PersonType.Person | CreativeWorkType.WebApplication;
156
- ids?: string[];
157
157
  identifiers?: IIdentifier;
158
+ typeOf?: never;
159
+ ids?: never;
158
160
  };
159
161
  seller?: {
160
162
  ids?: string[];
@@ -167,10 +169,4 @@ export interface ISearchConditions {
167
169
  $eq?: string;
168
170
  };
169
171
  };
170
- tasksExportAction?: {
171
- actionStatus?: {
172
- $eq?: ActionStatusType;
173
- $in?: ActionStatusType[];
174
- };
175
- };
176
172
  }
@@ -1,2 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ ;
@@ -28,7 +28,7 @@ export interface IReturnableOrder {
28
28
  /**
29
29
  * 取引開始パラメータ
30
30
  */
31
- export interface IStartParams extends Pick<IBaseStartParams<TransactionType.ReturnOrder, IAgent, undefined, IObject>, 'project' | 'typeOf' | 'object' | 'agent'> {
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'>, never, never, IPotentialActions> {
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, TRecipient, TObject> {
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, TResult, TError, TPotentialActions> = 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>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chevre/factory",
3
- "version": "11.0.0-alpha.1",
3
+ "version": "11.0.0-alpha.3",
4
4
  "main": "./lib/index.js",
5
5
  "types": "./lib/index.d.ts",
6
6
  "files": [