@chevre/factory 4.375.0-alpha.0 → 4.375.0-alpha.10

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.
@@ -5,8 +5,10 @@ import * as ReserveTransactionFactory from '../../../assetTransaction/reserve';
5
5
  import { AssetTransactionType } from '../../../assetTransactionType';
6
6
  import * as ScreeningEventFactory from '../../../event/screeningEvent';
7
7
  import * as OfferFactory from '../../../offer';
8
+ import { OfferType } from '../../../offerType';
8
9
  import * as OrderFactory from '../../../order';
9
10
  import { PriceCurrency } from '../../../priceCurrency';
11
+ import { IPriceSpecification as IUnitPriceSpecification } from '../../../priceSpecification/unitPriceSpecification';
10
12
  import { ICategoryCodeChargePriceComponent, IMovieTicketTypeChargePriceComponent, ITicketOffer, ITicketPriceSpecification, ITicketUnitPriceComponent } from '../../../product';
11
13
  import * as WebAPIFactory from '../../../service/webAPI';
12
14
  import { TransactionType } from '../../../transactionType';
@@ -48,10 +50,25 @@ export type IInstrumentAsAssetTransaction<T extends WebAPIFactory.Identifier> =
48
50
  export type IRequestBody<T extends WebAPIFactory.Identifier> = T extends WebAPIFactory.Identifier.COA ? COA.factory.reserve.IUpdTmpReserveSeatArgs : T extends WebAPIFactory.Identifier.Chevre ? {} : never;
49
51
  export type IResponseBody<T extends WebAPIFactory.Identifier> = T extends WebAPIFactory.Identifier.COA ? COA.factory.reserve.IUpdTmpReserveSeatResult : T extends WebAPIFactory.Identifier.Chevre ? {} : never;
50
52
  export type IResultAcceptedOffer = OrderFactory.IAcceptedOffer<OrderFactory.IReservation>;
51
- /**
52
- * 承認アクション結果
53
- */
54
- export interface IResult {
53
+ export interface IAcceptedOfferInResult extends Pick<ITicketOffer, 'acceptedPaymentMethod' | 'id' | 'typeOf'> {
54
+ typeOf: OfferType.Offer;
55
+ id: string;
56
+ includesObject: {
57
+ amountOfThisGood: number;
58
+ };
59
+ /**
60
+ * 取引確定時の検証に必要な情報のみ保管する
61
+ */
62
+ priceSpecification?: Pick<IUnitPriceSpecification, 'eligibleQuantity' | 'eligibleTransactionVolume'>;
63
+ }
64
+ export interface IResultAsAggregateOffer {
65
+ typeOf?: OfferType.AggregateOffer;
66
+ /**
67
+ * オファーIDごとの集計
68
+ */
69
+ offers?: IAcceptedOfferInResult[];
70
+ }
71
+ export interface IResult extends IResultAsAggregateOffer {
55
72
  /**
56
73
  * 決済金額
57
74
  * オファー未指定の場合、金額非確定なので、この属性は存在しない
@@ -63,13 +80,6 @@ export interface IResult {
63
80
  * currencyを口座タイプとして扱う
64
81
  */
65
82
  amount: OrderFactory.ITotalPaymentDue[];
66
- /**
67
- * 外部サービスへのリクエスト
68
- */
69
- /**
70
- * 外部サービスからのレスポンス
71
- */
72
- acceptedOffers?: IResultAcceptedOffer[];
73
83
  }
74
84
  export type ExcludedFieldsFromTicketPriceComponent = 'accounting' | 'id' | 'name' | 'priceCurrency' | 'valueAddedTaxIncluded';
75
85
  export type ITicketPriceComponent = Omit<ICategoryCodeChargePriceComponent, ExcludedFieldsFromTicketPriceComponent> | Omit<IMovieTicketTypeChargePriceComponent, ExcludedFieldsFromTicketPriceComponent> | Omit<ITicketUnitPriceComponent, ExcludedFieldsFromTicketPriceComponent>;
@@ -86,8 +96,7 @@ export type IAcceptedOfferPriceSpecification = Pick<ITicketPriceSpecification, '
86
96
  /**
87
97
  * 受け入れられたチケットオファー
88
98
  */
89
- export type IAcceptedOffer4chevre = Pick<ITicketOffer, 'acceptedPaymentMethod' | // add(2023-11-15~)
90
- 'id' | 'identifier' | 'typeOf' | 'priceCurrency' | 'itemOffered' | 'additionalProperty'> & Pick<ReserveTransactionFactory.IAcceptedTicketOfferWithoutDetail, 'id' | 'addOn' | 'additionalProperty'> & {
99
+ export type IAcceptedOffer4chevre = Pick<ITicketOffer, 'acceptedPaymentMethod' | 'id' | 'identifier' | 'typeOf' | 'priceCurrency' | 'itemOffered' | 'additionalProperty'> & Pick<ReserveTransactionFactory.IAcceptedTicketOfferWithoutDetail, 'id' | 'addOn' | 'additionalProperty'> & {
91
100
  addOn?: ReserveTransactionFactory.IAcceptedAddOn[];
92
101
  itemOffered?: ReserveTransactionFactory.IAcceptedTicketOfferItemOffered;
93
102
  priceSpecification: IAcceptedOfferPriceSpecification;
@@ -137,7 +146,7 @@ export interface IObjectWithoutDetail4COA {
137
146
  id: string;
138
147
  };
139
148
  }
140
- export type IAcceptedOffer<T extends WebAPIFactory.Identifier> = T extends WebAPIFactory.Identifier.COA ? IAcceptedOffer4COA : T extends WebAPIFactory.Identifier.Chevre ? IAcceptedOffer4chevre : never;
149
+ export type IAcceptedOffer<T extends WebAPIFactory.Identifier> = T extends WebAPIFactory.Identifier.COA ? IAcceptedOffer4COA : T extends WebAPIFactory.Identifier.Chevre ? Pick<IAcceptedOffer4chevre, 'acceptedPaymentMethod' | 'id' | 'priceSpecification' | 'typeOf'> : never;
141
150
  export type IAcceptedOfferWithoutDetail<T extends WebAPIFactory.Identifier> = T extends WebAPIFactory.Identifier.COA ? IAcceptedOfferWithoutDetail4COA : T extends WebAPIFactory.Identifier.Chevre ? IAcceptedOfferWithoutDetail4chevre : never;
142
151
  export type IObjectWithoutDetail<T extends WebAPIFactory.Identifier> = T extends WebAPIFactory.Identifier.COA ? IObjectWithoutDetail4COA : T extends WebAPIFactory.Identifier.Chevre ? IObjectWithoutDetail4chevre : never;
143
152
  export type ICOAPendingTransaction = Pick<COA.factory.reserve.IDelTmpReserveArgs, 'theaterCode' | 'dateJouei' | 'titleCode' | 'titleBranchNum' | 'timeBegin' | 'tmpReserveNum'> & {
@@ -160,7 +169,7 @@ export type IEvent = Pick<ScreeningEventFactory.IEvent, 'id' | 'typeOf'> & {
160
169
  export type IObject<T extends WebAPIFactory.Identifier> = {
161
170
  typeOf: ObjectType;
162
171
  event?: IEvent;
163
- acceptedOffer: IAcceptedOffer<T>[];
172
+ acceptedOffer?: IAcceptedOffer<T>[];
164
173
  /**
165
174
  * recipe有(仮予約時)のCOA興行オファー採用アクションID(2024-06-11~)
166
175
  */
@@ -18,7 +18,6 @@ export interface IResult {
18
18
  priceCurrency: PriceCurrency;
19
19
  requestBody?: IRequestBody;
20
20
  responseBody: IResponseBody;
21
- acceptedOffers: IResultAcceptedOffer[];
22
21
  }
23
22
  export import IItemOffered = OrderFactory.IMoneyTransfer;
24
23
  export interface IAcceptedOffer extends Omit<IOffer, 'addOn' | 'availability' | 'availableAtOrFrom'> {
@@ -43,7 +43,6 @@ export type IResultAcceptedOffer = OrderFactory.IAcceptedOffer<OrderFactory.IPer
43
43
  export interface IResult {
44
44
  price: number;
45
45
  priceCurrency: PriceCurrency;
46
- acceptedOffers: IResultAcceptedOffer;
47
46
  requestBody: RegisterServiceTransactionFactory.IStartParamsWithoutDetail;
48
47
  responseBody: RegisterServiceTransactionFactory.ITransaction;
49
48
  }
@@ -135,7 +135,7 @@ export interface IResultAsInvoice {
135
135
  }
136
136
  export type IResult = IResultAsInvoice | IResultAsInvoice[];
137
137
  export interface IPurpose {
138
- typeOf: TransactionType;
138
+ typeOf: TransactionType.PlaceOrder;
139
139
  id: string;
140
140
  }
141
141
  export declare enum ServiceIdentifier {
@@ -1,12 +1,15 @@
1
1
  import * as ActionFactory from '../../../action';
2
+ import { AssetTransactionType } from '../../../assetTransactionType';
2
3
  import { IInvoice } from '../../../invoice';
3
4
  import { IReferencedInvoice, ISimpleOrder } from '../../../order';
4
5
  import { IAttributes as ISendEmailMessageActionAttributes } from '../../transfer/send/message/email';
5
6
  import * as ReturnActionFactory from '../return';
6
7
  export type IAgent = ActionFactory.IParticipantAsProject;
7
- export type IRecipient = ActionFactory.IParticipant;
8
+ type IRecipientAttributes = 'id' | 'name' | 'typeOf';
9
+ export type IRecipient = Pick<ActionFactory.IParticipantAsCustomer, IRecipientAttributes> | Pick<ActionFactory.IParticipantAsPerson, IRecipientAttributes> | Pick<ActionFactory.IParticipantAsWebApplication, IRecipientAttributes>;
8
10
  export type IObject = Pick<IReferencedInvoice, 'accountId' | 'issuedThrough' | 'paymentMethod' | 'paymentMethodId' | 'totalPaymentDue' | 'name' | 'additionalProperty'> & Pick<IInvoice, 'typeOf'>;
9
- export type IResult = any;
11
+ export interface IResult {
12
+ }
10
13
  export interface IPotentialActions {
11
14
  /**
12
15
  * 返金処理完了を通知するEメール送信アクション
@@ -14,13 +17,19 @@ export interface IPotentialActions {
14
17
  sendEmailMessage?: ISendEmailMessageActionAttributes[];
15
18
  }
16
19
  export type IPurpose = ISimpleOrder;
17
- export interface IAttributes extends ReturnActionFactory.IAttributes<IObject, IResult> {
20
+ export interface IInstrument {
21
+ typeOf: AssetTransactionType.Refund;
22
+ transactionNumber: string;
23
+ }
24
+ export interface IAttributes extends Pick<ReturnActionFactory.IAttributes<IObject, IResult>, 'agent' | 'error' | 'instrument' | 'object' | 'potentialActions' | 'purpose' | 'recipient' | 'result' | 'project' | 'sameAs' | 'typeOf'> {
18
25
  agent: IAgent;
19
26
  recipient: IRecipient;
20
27
  purpose: IPurpose;
21
28
  potentialActions?: IPotentialActions;
29
+ instrument?: IInstrument;
22
30
  }
23
31
  /**
24
- * 決済返却アクション
32
+ * 請求返却アクション
25
33
  */
26
34
  export type IAction = ReturnActionFactory.IAction<IAttributes>;
35
+ export {};
@@ -1,6 +1,6 @@
1
1
  import * as ActionFactory from '../../../action';
2
2
  import * as OrderFactory from '../../../order';
3
- import { IAttributes as IReturnPaymentMethodActionAttributes } from '../../transfer/return/paymentMethod';
3
+ import { IAttributes as IReturnInvoiceActionAttributes } from '../../transfer/return/invoice';
4
4
  import * as ReturnActionFactory from '../return';
5
5
  import { IAttributes as ISendEmailMessageActionAttributes } from '../send/message/email';
6
6
  import * as ReturnPointAwardActionFactory from './pointAward';
@@ -16,12 +16,13 @@ export type IObject = OrderFactory.ISimpleOrder & {
16
16
  dateReturned: Date;
17
17
  };
18
18
  export type IResult = any;
19
+ export type IPotentialReturnInvoiceAction = Pick<IReturnInvoiceActionAttributes, 'object' | 'potentialActions'>;
19
20
  export interface IPotentialActions {
20
21
  /**
21
22
  * 決済返却アクション
22
23
  * refundから移行(2022-08-10~)
23
24
  */
24
- returnPaymentMethod: IReturnPaymentMethodActionAttributes[];
25
+ returnPaymentMethod: IPotentialReturnInvoiceAction[];
25
26
  /**
26
27
  * ポイントインセンティブ返却アクション
27
28
  */
package/lib/action.d.ts CHANGED
@@ -207,19 +207,6 @@ export interface ISearchConditions {
207
207
  $in?: string[];
208
208
  };
209
209
  };
210
- acceptedOffer?: {
211
- itemOffered?: {
212
- serviceOutput?: {
213
- reservedTicket?: {
214
- ticketedSeat?: {
215
- seatNumber?: {
216
- $in?: string[];
217
- };
218
- };
219
- };
220
- };
221
- };
222
- };
223
210
  typeOf?: {
224
211
  $eq?: string;
225
212
  $in?: string[];
@@ -105,10 +105,12 @@ export type IAttributes<TStartParams, TResult, TError, TPotentialActions> = TSta
105
105
  tasksExportAction?: ITasksExportAction;
106
106
  /**
107
107
  * タスクエクスポート日時
108
+ * @deprecated use tasksExportAction
108
109
  */
109
110
  tasksExportedAt?: Date;
110
111
  /**
111
112
  * タスクエクスポート状態
113
+ * @deprecated use tasksExportAction
112
114
  */
113
115
  tasksExportationStatus: TransactionTasksExportationStatus;
114
116
  /**
@@ -145,8 +147,12 @@ export interface ISearchConditions<T extends AssetTransactionType> {
145
147
  ids?: string[];
146
148
  /**
147
149
  * ステータスリスト
150
+ * @deprecated use tasksExportAction
148
151
  */
149
152
  statuses?: TransactionStatusType[];
153
+ status?: {
154
+ $in?: TransactionStatusType[];
155
+ };
150
156
  /**
151
157
  * 開始日時(から)
152
158
  */
@@ -170,5 +176,10 @@ export interface ISearchConditions<T extends AssetTransactionType> {
170
176
  $eq?: string;
171
177
  $in?: string[];
172
178
  };
173
- tasksExportationStatuses?: TransactionTasksExportationStatus[];
179
+ tasksExportAction?: {
180
+ actionStatus?: {
181
+ $eq?: ActionStatusType;
182
+ $in?: ActionStatusType[];
183
+ };
184
+ };
174
185
  }
package/lib/index.d.ts CHANGED
@@ -33,9 +33,9 @@ import * as RefundActionFactory from './action/trade/refund';
33
33
  import * as GiveActionFactory from './action/transfer/give';
34
34
  import * as GivePointAwardActionFactory from './action/transfer/give/pointAward';
35
35
  import * as MoneyTransferActionFactory from './action/transfer/moneyTransfer';
36
+ import * as ReturnInvoiceActionFactory from './action/transfer/return/invoice';
36
37
  import * as ReturnMoneyTransferActionFactory from './action/transfer/return/moneyTransfer';
37
38
  import * as ReturnOrderActionFactory from './action/transfer/return/order';
38
- import * as ReturnPaymentMethodActionFactory from './action/transfer/return/paymentMethod';
39
39
  import * as ReturnPointAwardActionFactory from './action/transfer/return/pointAward';
40
40
  import * as ReturnReserveTransactionActionFactory from './action/transfer/return/reserveTransaction';
41
41
  import * as SendEmailMessageActionFactory from './action/transfer/send/message/email';
@@ -273,9 +273,9 @@ export declare namespace action {
273
273
  * returnはネームスペース名に使えないのでreturnAction
274
274
  */
275
275
  namespace returnAction {
276
+ export import invoice = ReturnInvoiceActionFactory;
276
277
  export import moneyTransfer = ReturnMoneyTransferActionFactory;
277
278
  export import order = ReturnOrderActionFactory;
278
- export import paymentMethod = ReturnPaymentMethodActionFactory;
279
279
  export import pointAward = ReturnPointAwardActionFactory;
280
280
  export import reserveTransaction = ReturnReserveTransactionActionFactory;
281
281
  }
package/lib/index.js CHANGED
@@ -33,9 +33,9 @@ var PayActionFactory = require("./action/trade/pay");
33
33
  var RefundActionFactory = require("./action/trade/refund");
34
34
  var GivePointAwardActionFactory = require("./action/transfer/give/pointAward");
35
35
  var MoneyTransferActionFactory = require("./action/transfer/moneyTransfer");
36
+ var ReturnInvoiceActionFactory = require("./action/transfer/return/invoice");
36
37
  var ReturnMoneyTransferActionFactory = require("./action/transfer/return/moneyTransfer");
37
38
  var ReturnOrderActionFactory = require("./action/transfer/return/order");
38
- var ReturnPaymentMethodActionFactory = require("./action/transfer/return/paymentMethod");
39
39
  var ReturnPointAwardActionFactory = require("./action/transfer/return/pointAward");
40
40
  var ReturnReserveTransactionActionFactory = require("./action/transfer/return/reserveTransaction");
41
41
  var SendEmailMessageActionFactory = require("./action/transfer/send/message/email");
@@ -248,12 +248,12 @@ var action;
248
248
  */
249
249
  var returnAction;
250
250
  (function (returnAction) {
251
+ // tslint:disable-next-line:no-shadowed-variable
252
+ returnAction.invoice = ReturnInvoiceActionFactory;
251
253
  // tslint:disable-next-line:no-shadowed-variable
252
254
  returnAction.moneyTransfer = ReturnMoneyTransferActionFactory;
253
255
  // tslint:disable-next-line:no-shadowed-variable
254
256
  returnAction.order = ReturnOrderActionFactory;
255
- // tslint:disable-next-line:no-shadowed-variable
256
- returnAction.paymentMethod = ReturnPaymentMethodActionFactory;
257
257
  returnAction.pointAward = ReturnPointAwardActionFactory;
258
258
  returnAction.reserveTransaction = ReturnReserveTransactionActionFactory;
259
259
  })(returnAction = transfer.returnAction || (transfer.returnAction = {}));
@@ -1,8 +1,8 @@
1
- import { IAttributes as IReturnActionAttributes } from '../action/transfer/return/paymentMethod';
1
+ import { IPotentialReturnInvoiceAction } from '../action/transfer/return/order';
2
2
  import { IExtendId } from '../autoGenerated';
3
3
  import * as TaskFactory from '../task';
4
4
  import { TaskName } from '../taskName';
5
- export type IData = IReturnActionAttributes;
5
+ export type IData = IPotentialReturnInvoiceAction;
6
6
  export interface IAttributes extends TaskFactory.IAttributes {
7
7
  name: TaskName.ReturnPayTransaction;
8
8
  data: IData;
@@ -156,7 +156,7 @@ export interface IConfirmParams {
156
156
  */
157
157
  result?: IResultParams;
158
158
  }
159
- export type IOrderAsResult = Pick<OrderFactory.IOrder, 'broker' | 'confirmationNumber' | 'identifier' | 'name' | 'orderDate' | 'orderNumber' | 'orderStatus' | 'orderedItem' | 'paymentMethods' | 'price' | 'priceCurrency' | 'seller' | 'typeOf' | 'url'>;
159
+ export type IOrderAsResult = Pick<OrderFactory.IOrder, 'confirmationNumber' | 'identifier' | 'orderDate' | 'orderNumber' | 'orderStatus' | 'price' | 'priceCurrency' | 'typeOf' | 'url'>;
160
160
  export interface IAuthorizeActionAsResult {
161
161
  id: string;
162
162
  }
@@ -118,10 +118,12 @@ export type IAttributes<TStartParams, TResult, TError, TPotentialActions> = TSta
118
118
  tasksExportAction?: ITasksExportAction;
119
119
  /**
120
120
  * タスクエクスポート日時
121
+ * @deprecated use tasksExportAction
121
122
  */
122
123
  tasksExportedAt?: Date;
123
124
  /**
124
125
  * タスクエクスポート状態
126
+ * @deprecated use tasksExportAction
125
127
  */
126
128
  tasksExportationStatus: TransactionTasksExportationStatus;
127
129
  /**
@@ -155,8 +157,12 @@ export interface ISearchConditions<T extends TransactionType> {
155
157
  ids?: string[];
156
158
  /**
157
159
  * ステータスリスト
160
+ * @deprecated use tasksExportAction
158
161
  */
159
162
  statuses?: TransactionStatusType[];
163
+ status?: {
164
+ $in?: TransactionStatusType[];
165
+ };
160
166
  /**
161
167
  * 開始日時(から)
162
168
  */
@@ -174,18 +180,14 @@ export interface ISearchConditions<T extends TransactionType> {
174
180
  */
175
181
  endThrough?: Date;
176
182
  agent?: {
177
- typeOf?: PersonType;
183
+ typeOf?: PersonType.Person | IWebApplication['typeOf'];
178
184
  ids?: string[];
179
185
  identifiers?: IIdentifier;
180
- givenName?: string;
181
- familyName?: string;
182
- telephone?: string;
183
- email?: string;
184
186
  };
185
- tasksExportationStatuses?: TransactionTasksExportationStatus[];
186
187
  tasksExportAction?: {
187
188
  actionStatus?: {
188
189
  $eq?: ActionStatusType;
190
+ $in?: ActionStatusType[];
189
191
  };
190
192
  };
191
193
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chevre/factory",
3
- "version": "4.375.0-alpha.0",
3
+ "version": "4.375.0-alpha.10",
4
4
  "description": "Chevre Factory Library for Javascript",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",