@chevre/factory 4.216.0 → 4.219.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/chevre.d.ts CHANGED
@@ -186,6 +186,11 @@ export declare namespace action {
186
186
  export import IAdditionalProperty = ActionFactory.IAdditionalProperty;
187
187
  export import IAttributes = ActionFactory.IAttributes;
188
188
  export import IDynamicAttributes = ActionFactory.IDynamicAttributes;
189
+ export import IParticipantAsWebApplication = ActionFactory.IParticipantAsWebApplication;
190
+ export import IParticipantAsPerson = ActionFactory.IParticipantAsPerson;
191
+ export import IParticipantAsSeller = ActionFactory.IParticipantAsSeller;
192
+ export import IParticipantAsProject = ActionFactory.IParticipantAsProject;
193
+ export import IParticipantAsCustomer = ActionFactory.IParticipantAsCustomer;
189
194
  export import IParticipant = ActionFactory.IParticipant;
190
195
  export import IPurpose = ActionFactory.IPurpose;
191
196
  export import ISortOrder = ActionFactory.ISortOrder;
@@ -2,7 +2,7 @@ import * as ActionFactory from '../../../action';
2
2
  import { ActionType } from '../../../actionType';
3
3
  import { TransactionType } from '../../../transactionType';
4
4
  import * as AuthorizeActionFactory from '../../authorize';
5
- export declare type IAgent = ActionFactory.IParticipant;
5
+ export declare type IAgent = ActionFactory.IParticipantAsSeller;
6
6
  export declare type IRecipient = ActionFactory.IParticipant;
7
7
  export declare enum ObjectType {
8
8
  PointAward = "PointAward"
@@ -8,7 +8,7 @@ import { IProduct } from '../../../product';
8
8
  import { ISeller } from '../../../seller';
9
9
  import { TransactionType } from '../../../transactionType';
10
10
  import * as AuthorizeActionFactory from '../../authorize';
11
- export declare type IAgent = ActionFactory.IParticipant;
11
+ export declare type IAgent = ActionFactory.IParticipantAsSeller;
12
12
  export declare type IRecipient = ActionFactory.IParticipant;
13
13
  export declare type IService = IProduct;
14
14
  export declare type IAcceptedOfferWithoutDetail = RegisterServiceTransactionFactory.IAcceptedOfferWithoutDetail;
@@ -11,7 +11,7 @@ import { PriceCurrency } from '../../../priceCurrency';
11
11
  import * as WebAPIFactory from '../../../service/webAPI';
12
12
  import { TransactionType } from '../../../transactionType';
13
13
  import * as AuthorizeActionFactory from '../../authorize';
14
- export declare type IAgent = ActionFactory.IParticipant;
14
+ export declare type IAgent = ActionFactory.IParticipantAsSeller;
15
15
  export declare type IRecipient = ActionFactory.IParticipant;
16
16
  export declare enum ObjectType {
17
17
  SeatReservation = "SeatReservation"
@@ -13,7 +13,7 @@ import { PaymentServiceType } from '../../../service/paymentService';
13
13
  import { TransactionType } from '../../../transactionType';
14
14
  import * as AuthorizeActionFactory from '../../authorize';
15
15
  export declare type IAgent = ActionFactory.IParticipant;
16
- export declare type IRecipient = ActionFactory.IParticipant;
16
+ export declare type IRecipient = ActionFactory.IParticipantAsSeller;
17
17
  export declare enum ResultType {
18
18
  Payment = "Payment"
19
19
  }
@@ -7,14 +7,18 @@ import { AssetTransactionType } from '../../assetTransactionType';
7
7
  import { IPaymentServiceOutput } from '../../invoice';
8
8
  import { IMonetaryAmount } from '../../monetaryAmount';
9
9
  import { OrderType } from '../../order';
10
+ import { OrganizationType } from '../../organizationType';
10
11
  import { IMovieTicket } from '../../paymentMethod/paymentCard/movieTicket';
11
12
  import { IPropertyValue } from '../../propertyValue';
12
13
  import { ISeller } from '../../seller';
13
14
  import { PaymentServiceType } from '../../service/paymentService';
14
15
  import { TransactionType } from '../../transactionType';
15
16
  import { IAttributes as IInformActionAttributes } from '../interact/inform';
16
- export declare type IAgent = ActionFactory.IParticipant;
17
- export declare type IRecipient = ISeller;
17
+ export interface IAgent {
18
+ id: string;
19
+ typeOf: OrganizationType.Project;
20
+ }
21
+ export declare type IRecipient = Omit<ISeller, 'branchCode' | 'paymentAccepted'>;
18
22
  export interface IOrderAsPayPurpose {
19
23
  typeOf: OrderType.Order;
20
24
  confirmationNumber?: string;
@@ -116,12 +120,13 @@ export interface IResult {
116
120
  seatInfoSyncResult?: any;
117
121
  }
118
122
  export interface IAttributes extends ActionFactory.IAttributes<ActionType.PayAction, IObject, IResult> {
123
+ agent: IAgent;
119
124
  instrument?: IInstrument;
120
125
  potentialActions?: IPotentialActions;
121
126
  purpose: IPurpose;
122
- recipient?: IRecipient;
127
+ recipient: IRecipient;
123
128
  }
124
129
  /**
125
- * 決済アクションインターフェース
130
+ * 決済アクション
126
131
  */
127
132
  export declare type IAction = ActionFactory.IAction<IAttributes>;
@@ -1,7 +1,15 @@
1
1
  import * as ActionFactory from '../../action';
2
2
  import { ActionType } from '../../actionType';
3
+ import { ISeller } from '../../seller';
3
4
  import { IAttributes as IInformActionAttributes } from '../interact/inform';
4
5
  import { IPaymentService as IPaymentServiceOnPay, IPayPurpose } from './pay';
6
+ /**
7
+ * agentはSeller
8
+ */
9
+ export interface IAgentAsSeller extends Omit<ISeller, 'branchCode' | 'paymentAccepted'> {
10
+ name: string;
11
+ }
12
+ export declare type IAgent = IAgentAsSeller | ActionFactory.IParticipant;
5
13
  export declare type IRecipient = ActionFactory.IParticipant;
6
14
  export declare type IPaymentService = IPaymentServiceOnPay & {
7
15
  refundFee?: number;
@@ -14,6 +22,7 @@ export interface IPotentialActions {
14
22
  }
15
23
  export declare type IPurpose = IPayPurpose;
16
24
  export interface IAttributes extends ActionFactory.IAttributes<ActionType.RefundAction, IObject, IResult> {
25
+ agent: IAgent;
17
26
  recipient?: IRecipient;
18
27
  purpose: IPurpose;
19
28
  potentialActions?: IPotentialActions;
@@ -2,24 +2,32 @@ import { ActionStatusType } from './actionStatusType';
2
2
  import { ActionType } from './actionType';
3
3
  import { IExtendId } from './autoGenerated';
4
4
  import { ICreativeWork as IWebApplication } from './creativeWork/softwareApplication/webApplication';
5
+ import { ICustomer } from './customer';
6
+ import { IMultilingualString } from './multilingualString';
5
7
  import { IPerson } from './person';
6
8
  import { IProject } from './project';
7
9
  import { IPropertyValue } from './propertyValue';
8
10
  import { ISeller } from './seller';
9
11
  import { SortType } from './sortType';
12
+ export declare type IParticipantAsWebApplication = Omit<IWebApplication, 'additionalProperty'>;
13
+ export declare type IParticipantAsPerson = Omit<IPerson, 'email' | 'telephone' | 'givenName' | 'familyName' | 'additionalProperty'>;
14
+ export declare type IParticipantAsSeller = Omit<ISeller, 'branchCode' | 'paymentAccepted' | 'project' | 'additionalProperty'>;
15
+ export declare type IParticipantAsProject = Omit<IProject, 'settings' | 'subscription' | 'alternateName' | 'description' | 'additionalProperty'>;
16
+ export declare type IParticipantAsCustomer = Omit<ICustomer, 'name' | 'branchCode' | 'contactPoint' | 'project' | 'additionalProperty'> & {
17
+ name?: string | IMultilingualString;
18
+ };
10
19
  /**
11
- * アクションへの関係者インターフェース
12
- * 継承先にて、インターフェースが強化される可能性あり
20
+ * アクションへの関係者
13
21
  */
14
- export declare type IParticipant = IWebApplication | IPerson | ISeller | IProject;
22
+ export declare type IParticipant = IParticipantAsWebApplication | IParticipantAsPerson | IParticipantAsSeller | IParticipantAsProject | IParticipantAsCustomer;
15
23
  /**
16
- * アクション目的インターフェース
24
+ * アクション目的
17
25
  */
18
26
  export interface IPurpose {
19
27
  typeOf: string;
20
28
  }
21
29
  /**
22
- * 追加属性インターフェース
30
+ * 追加属性
23
31
  */
24
32
  export declare type IAdditionalProperty = IPropertyValue<string>[];
25
33
  /**
@@ -76,7 +84,7 @@ export interface IAttributes<T extends ActionType, TObject, TResult> {
76
84
  typeOf: T;
77
85
  }
78
86
  /**
79
- * アクション動的属性インターフェース
87
+ * アクション動的属性
80
88
  * リポジトリに保管時にセット、あるいは変更される
81
89
  */
82
90
  export interface IDynamicAttributes {
@@ -94,18 +102,18 @@ export interface IDynamicAttributes {
94
102
  endDate?: Date;
95
103
  }
96
104
  /**
97
- * 抽象アクションインターフェース
105
+ * 抽象アクション
98
106
  * {@link https://schema.org/Action}
99
107
  */
100
108
  export declare type IAction<TAttributes extends IAttributes<ActionType, any, any>> = IExtendId<TAttributes & IDynamicAttributes>;
101
109
  /**
102
- * ソート条件インターフェース
110
+ * ソート条件
103
111
  */
104
112
  export interface ISortOrder {
105
113
  startDate?: SortType;
106
114
  }
107
115
  /**
108
- * 検索条件インターフェース
116
+ * 検索条件
109
117
  */
110
118
  export interface ISearchConditions {
111
119
  limit?: number;
@@ -1,5 +1,6 @@
1
1
  import * as GMO from '@motionpicture/gmo-service';
2
- import { IAgent as IPayAgent, IAttributes as IPayActionAttributes, IOrderAsPayPurpose, IPayPurpose, IPendingTransaction, IRecipient as IPayRecipient } from '../action/trade/pay';
2
+ import { IParticipant } from '../action';
3
+ import { IAttributes as IPayActionAttributes, IOrderAsPayPurpose, IPayPurpose, IPendingTransaction, IRecipient as IPayRecipient } from '../action/trade/pay';
3
4
  import * as TransactionFactory from '../assetTransaction';
4
5
  import { AssetTransactionType } from '../assetTransactionType';
5
6
  import { IExtendId } from '../autoGenerated';
@@ -9,13 +10,15 @@ import { IMovieTicket } from '../paymentMethod/paymentCard/movieTicket';
9
10
  import { IOnPaymentStatusChanged } from '../project';
10
11
  import { IPropertyValue } from '../propertyValue';
11
12
  import { PaymentServiceType } from '../service/paymentService';
12
- export declare type IAgent = IPayAgent;
13
+ export declare type IAgent = IParticipant;
13
14
  export declare type IRecipient = IPayRecipient;
14
15
  export declare type IObjectWithoutDetail = IObject;
15
16
  export declare type IStartParamsWithoutDetail = TransactionFactory.IStartParams<AssetTransactionType.Pay, IAgent, IRecipient, IObject> & {
17
+ recipient: IRecipient;
16
18
  purpose?: IPayPurpose;
17
19
  };
18
20
  export interface IStartParams extends TransactionFactory.IStartParams<AssetTransactionType.Pay, IAgent, IRecipient, IObject> {
21
+ recipient: IRecipient;
19
22
  }
20
23
  export interface IPotentialActionsParams {
21
24
  pay: {
@@ -1,10 +1,9 @@
1
1
  import * as CreativeWorkFactory from '../../creativeWork';
2
2
  import { CreativeWorkType } from '../../creativeWorkType';
3
- export interface IAttributes {
3
+ /**
4
+ * ウェブアプリケーション
5
+ */
6
+ export interface ICreativeWork extends CreativeWorkFactory.ICreativeWork {
4
7
  typeOf: CreativeWorkType.WebApplication;
5
8
  id: string;
6
9
  }
7
- /**
8
- * ウェブアプリケーションインターフェース
9
- */
10
- export declare type ICreativeWork = IAttributes & CreativeWorkFactory.ICreativeWork;
@@ -21,7 +21,6 @@ import { IPropertyValue } from './propertyValue';
21
21
  import { IProgramMembershipUsedSearchConditions } from './reservation';
22
22
  import * as EventReservationFactory from './reservation/event';
23
23
  import { ReservationType } from './reservationType';
24
- import { ISeller as ISellerOrganization } from './seller';
25
24
  import { IServiceType } from './serviceType';
26
25
  import { SortType } from './sortType';
27
26
  import { IThing } from './thing';
@@ -129,13 +128,29 @@ export interface IAcceptedOffer<T extends IItemOffered> extends IOfferOptimized4
129
128
  /**
130
129
  * 販売者
131
130
  */
132
- seller: ISeller;
131
+ seller: {
132
+ project: {
133
+ id: string;
134
+ typeOf: OrganizationType.Project;
135
+ };
136
+ typeOf: OrganizationType.Corporation;
137
+ name?: string | IMultilingualString;
138
+ };
133
139
  priceSpecification?: ITicketPriceSpecification;
134
140
  }
135
141
  /**
136
142
  * 販売者
137
143
  */
138
- export declare type ISeller = ISellerOrganization;
144
+ export interface ISeller {
145
+ project: {
146
+ id: string;
147
+ typeOf: OrganizationType.Project;
148
+ };
149
+ id: string;
150
+ typeOf: OrganizationType.Corporation;
151
+ name?: string | IMultilingualString;
152
+ url?: string;
153
+ }
139
154
  /**
140
155
  * ウェブアプリケーションとしてのカスタマー
141
156
  */
@@ -1,15 +1,18 @@
1
- import { ICustomer } from './order';
1
+ import { CreativeWorkType } from './creativeWorkType';
2
+ import { OrganizationType } from './organizationType';
2
3
  import * as PermitFactory from './permit';
4
+ import { IMemberOf } from './person';
5
+ import { PersonType } from './personType';
3
6
  import * as ProductFactory from './product';
4
7
  import { IProject } from './project';
8
+ import { IPropertyValue } from './propertyValue';
5
9
  import { IReservation as IEventReservation } from './reservation/event';
6
10
  import { ReservationType } from './reservationType';
7
- import { ISeller } from './seller';
8
11
  import * as WebAPIFactory from './service/webAPI';
9
12
  import { SortType } from './sortType';
10
13
  export declare type IBookingService = WebAPIFactory.IService<WebAPIFactory.Identifier>;
11
14
  /**
12
- * 予約インターフェース
15
+ * 予約
13
16
  */
14
17
  export interface IReservation {
15
18
  typeOf: ReservationType.EventReservation;
@@ -32,21 +35,49 @@ export interface IReservation {
32
35
  export declare type IReservationWithDetail = IReservation & IEventReservation;
33
36
  export declare type IPermit = PermitFactory.IPermit;
34
37
  /**
35
- * 所有対象物インターフェース (Product or Service)
38
+ * 所有対象物 (Product or Service)
36
39
  */
37
40
  export declare type IGood = IReservation | IPermit;
38
41
  /**
39
- * 所有対象物インターフェース(対象物詳細有)
42
+ * 所有対象物(対象物詳細有)
40
43
  */
41
44
  export declare type IGoodWithDetail = IReservationWithDetail | IPermit;
42
45
  /**
43
- * 所有者インターフェース
46
+ * 所有者
44
47
  */
45
- export declare type IOwner = Omit<ICustomer, 'name'>;
46
- export declare type IAcquiredFrom = ISeller;
48
+ export interface IOwnerAsOrganization {
49
+ typeOf: OrganizationType.Organization;
50
+ id: string;
51
+ project: {
52
+ id: string;
53
+ typeOf: OrganizationType.Project;
54
+ };
55
+ identifier?: IPropertyValue<string>[];
56
+ }
57
+ export interface IOwnerAsPerson {
58
+ typeOf: PersonType;
59
+ id: string;
60
+ identifier?: IPropertyValue<string>[];
61
+ memberOf?: IMemberOf;
62
+ }
63
+ export interface IOwnerAsWebApplication {
64
+ typeOf: CreativeWorkType.WebApplication;
65
+ id: string;
66
+ identifier?: IPropertyValue<string>[];
67
+ }
68
+ export declare type IOwner = IOwnerAsOrganization | IOwnerAsPerson | IOwnerAsWebApplication;
69
+ export interface IAcquiredFrom {
70
+ project: {
71
+ id: string;
72
+ typeOf: OrganizationType.Project;
73
+ };
74
+ id: string;
75
+ typeOf: OrganizationType.Corporation;
76
+ name: string;
77
+ }
47
78
  export declare type OwnershipInfoType = 'OwnershipInfo';
48
79
  /**
49
- * 所有権インターフェース
80
+ * 所有権
50
81
  */
51
82
  export interface IOwnershipInfo<T extends IGood | IGoodWithDetail> {
52
83
  project: IProject;
@@ -84,7 +115,7 @@ export interface IOwnershipInfo<T extends IGood | IGoodWithDetail> {
84
115
  typeOfGood: T;
85
116
  }
86
117
  /**
87
- * ソート条件インターフェース
118
+ * ソート条件
88
119
  */
89
120
  export interface ISortOrder {
90
121
  /**
@@ -93,7 +124,7 @@ export interface ISortOrder {
93
124
  ownedFrom?: SortType;
94
125
  }
95
126
  /**
96
- * 所有対象物検索条件インターフェース
127
+ * 所有対象物検索条件
97
128
  */
98
129
  export interface ITypeOfGoodSearchConditions {
99
130
  typeOf?: string | {
@@ -117,7 +148,7 @@ export interface ITypeOfGoodSearchConditions {
117
148
  };
118
149
  }
119
150
  /**
120
- * 所有権検索条件インターフェース
151
+ * 所有権検索条件
121
152
  */
122
153
  export interface ISearchConditions {
123
154
  limit?: number;
@@ -7,6 +7,7 @@ import * as ThingFactory from './thing';
7
7
  */
8
8
  export declare type IAdditionalProperty = IPropertyValue<string>[];
9
9
  export import IIdentifier = ThingFactory.IIdentifier;
10
+ export declare type IMemberOf = IProgramMembership;
10
11
  /**
11
12
  * プロフィールインターフェース
12
13
  */
@@ -53,6 +54,6 @@ export declare type IPerson = IProfile & {
53
54
  /**
54
55
  * An Organization (or ProgramMembership) to which this Person or Organization belongs.
55
56
  */
56
- memberOf?: IProgramMembership;
57
+ memberOf?: IMemberOf;
57
58
  typeOf: PersonType;
58
59
  };
@@ -1,7 +1,10 @@
1
1
  import { IAction as IPayAction } from '../action/trade/pay';
2
2
  import { IAction as IRefundAction } from '../action/trade/refund';
3
3
  import { IOrder } from '../order';
4
- export declare type IAction = IPayAction | IRefundAction;
4
+ export declare type IExpludedActionAttributes = 'additionalProperty' | 'agent' | 'description' | 'error' | 'identifier' | 'instrument' | 'potentialActions' | 'recipient' | 'result';
5
+ export declare type IOptimizedPayAction = Omit<IPayAction, IExpludedActionAttributes>;
6
+ export declare type IOptimizedRefundAction = Omit<IRefundAction, IExpludedActionAttributes>;
7
+ export declare type IAction = IOptimizedPayAction | IOptimizedRefundAction;
5
8
  /**
6
9
  * 経理レポートインターフェース
7
10
  */
@@ -25,7 +25,7 @@ export interface ISeller extends IOrganization {
25
25
  * A pointer to products or services offered by the organization or person.
26
26
  */
27
27
  paymentAccepted?: IPaymentAccepted[];
28
- typeOf: OrganizationType;
28
+ typeOf: OrganizationType.Corporation;
29
29
  }
30
30
  /**
31
31
  * ソート条件インターフェース
@@ -11,7 +11,6 @@ import { IInformParams, IProject } from '../project';
11
11
  import * as WebAPIFactory from '../service/webAPI';
12
12
  import * as TransactionFactory from '../transaction';
13
13
  import { TransactionType } from '../transactionType';
14
- export import ISeller = TransactionFactory.ISeller;
15
14
  /**
16
15
  * 取引人インターフェース
17
16
  */
@@ -91,6 +90,9 @@ export interface IStartParamsWithoutDetail {
91
90
  name?: string;
92
91
  };
93
92
  }
93
+ export interface ISeller extends TransactionFactory.ISeller {
94
+ id: string;
95
+ }
94
96
  /**
95
97
  * 取引開始パラメーターインターフェース
96
98
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chevre/factory",
3
- "version": "4.216.0",
3
+ "version": "4.219.0",
4
4
  "description": "Chevre Factory Library for Javascript",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",