@chevre/factory 4.393.0-alpha.23 → 4.393.0-alpha.24

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.
@@ -6,6 +6,7 @@ import { IOrder } from '../../order';
6
6
  import { ProductType } from '../../product';
7
7
  import { IAvailableReservationStatusType } from '../../reservation';
8
8
  import { ReservationType } from '../../reservationType';
9
+ import { ITransaction as IPlaceOrder } from '../../transaction/placeOrder';
9
10
  import { TripType } from '../../tripType';
10
11
  import { IAction as IReturnReserveTransactionAction } from '../transfer/return/reserveTransaction';
11
12
  export type IAgent = ActionFactory.IParticipantAsProject;
@@ -68,7 +69,8 @@ export interface IPurpose {
68
69
  }
69
70
  export type IOrderAsInstrument = Pick<IOrder, 'orderNumber' | 'typeOf'>;
70
71
  export type IReturnActionAsInstrument = Pick<IReturnReserveTransactionAction, 'id' | 'purpose' | 'typeOf'>;
71
- export type IInstrument = IOrderAsInstrument | IReturnActionAsInstrument;
72
+ export type IPlaceOrderAsInstrument = Pick<IPlaceOrder, 'id' | 'typeOf'>;
73
+ export type IInstrument = IOrderAsInstrument | IReturnActionAsInstrument | IPlaceOrderAsInstrument;
72
74
  export interface IAttributes extends Pick<ActionFactory.IAttributes<ActionType.CancelAction, IObject, IResult>, 'typeOf' | 'result' | 'purpose' | 'project' | 'object' | 'agent' | 'instrument'> {
73
75
  agent: IAgent;
74
76
  purpose: IPurpose;
@@ -2,6 +2,7 @@ import * as ActionFactory from '../../action';
2
2
  import { ActionType } from '../../actionType';
3
3
  import { AssetTransactionType } from '../../assetTransactionType';
4
4
  import { IOrder } from '../../order';
5
+ import { ITransaction as IPlaceOrder } from '../../transaction/placeOrder';
5
6
  export type IAgent = ActionFactory.IParticipantAsProject;
6
7
  export type IRecipientAsWebApplicationDeprecated = Pick<ActionFactory.IRecipientAsAnonymousWebApplication, 'id' | 'name' | 'typeOf'> & {
7
8
  url?: string;
@@ -28,7 +29,8 @@ export interface IRefundTransactionAsPurpose {
28
29
  }
29
30
  export type IPurpose = IPayTransactionAsPurpose | IRefundTransactionAsPurpose;
30
31
  export type IOrderAsAbout = Pick<IOrder, 'orderNumber' | 'typeOf'>;
31
- export type IAbout = IOrderAsAbout;
32
+ export type IPlaceOrderAsAbout = Pick<IPlaceOrder, 'id' | 'typeOf'>;
33
+ export type IAbout = IOrderAsAbout | IPlaceOrderAsAbout;
32
34
  export interface IResult {
33
35
  statusCode?: number;
34
36
  useFetchAPI?: boolean;
@@ -6,6 +6,7 @@ import { IAvailableReservationStatusType } from '../reservation';
6
6
  import { IReservationFor as IBusReservationFor } from '../reservation/busReservation';
7
7
  import { IReservationFor as IEventReservationFor } from '../reservation/event';
8
8
  import { ReservationType } from '../reservationType';
9
+ import { ITransaction as IPlaceOrder } from '../transaction/placeOrder';
9
10
  import { IAttributes as IMoneyTransferActionAttributes } from './transfer/moneyTransfer';
10
11
  export type IAgent = ActionFactory.IParticipantAsProject;
11
12
  export type IReservationFor = (Pick<IBusReservationFor, 'id' | 'typeOf'> | Pick<IEventReservationFor, 'id' | 'typeOf'>) & {
@@ -35,7 +36,8 @@ export interface IPotentialActions {
35
36
  moneyTransfer?: IMoneyTransferActionAttributes[];
36
37
  }
37
38
  export type IOrderAsInstrument = Pick<IOrder, 'orderNumber' | 'typeOf'>;
38
- export type IInstrument = IOrderAsInstrument;
39
+ export type IPlaceOrderAsInstrument = Pick<IPlaceOrder, 'id' | 'typeOf'>;
40
+ export type IInstrument = IOrderAsInstrument | IPlaceOrderAsInstrument;
39
41
  export interface IAttributes extends Pick<ActionFactory.IAttributes<ActionType.ReserveAction, IObject, IResult>, 'agent' | 'object' | 'potentialActions' | 'project' | 'purpose' | 'typeOf' | 'error' | 'instrument'> {
40
42
  agent: IAgent;
41
43
  potentialActions?: IPotentialActions;
@@ -1,4 +1,4 @@
1
- import { IAttributes as ICancelReservationActionAttributes, IInstrument } from '../action/cancel/reservation';
1
+ import { IAttributes as ICancelReservationActionAttributes, IOrderAsInstrument, IReturnActionAsInstrument } from '../action/cancel/reservation';
2
2
  import * as AssetTransactionFactory from '../assetTransaction';
3
3
  import { ITransaction as IReserveTransaction } from '../assetTransaction/reserve';
4
4
  import { AssetTransactionType } from '../assetTransactionType';
@@ -8,9 +8,7 @@ import { IReservation as IEventReservation, IReservationFor as IEventReservation
8
8
  import { IReservation as IReservationPackage } from '../reservation/reservationPackage';
9
9
  export import IAgent = AssetTransactionFactory.IAgent;
10
10
  export type IStartParamsWithoutDetail = AssetTransactionFactory.IStartParams<AssetTransactionType.CancelReservation, IAgent, undefined, IObjectWithoutDetail>;
11
- /**
12
- * 取引開始パラメータ
13
- */
11
+ export type IInstrument = IOrderAsInstrument | IReturnActionAsInstrument;
14
12
  export interface IStartParams extends AssetTransactionFactory.IStartParams<AssetTransactionType.CancelReservation, IAgent, undefined, IObject> {
15
13
  /**
16
14
  * add(2025-02-17~)
@@ -1,4 +1,4 @@
1
- import { IInstrument, IOrderAsInstrument } from '../action/reserve';
1
+ import { IInstrument as IReserveActionInstrument } from '../action/reserve';
2
2
  import { IPointAward } from '../action/transfer/moneyTransfer';
3
3
  import { ActionType } from '../actionType';
4
4
  import * as AssetTransactionFactory from '../assetTransaction';
@@ -17,7 +17,7 @@ import { ReservationType } from '../reservationType';
17
17
  import { PaymentServiceType } from '../service/paymentService';
18
18
  import { IUnitPriceOffer } from '../unitPriceOffer';
19
19
  export import IAgent = AssetTransactionFactory.IAgent;
20
- export { IInstrument, IOrderAsInstrument };
20
+ export type IInstrument = IReserveActionInstrument;
21
21
  export type IStartParamsWithoutDetail = AssetTransactionFactory.IStartParams<AssetTransactionType.Reserve, IAgent, undefined, IObjectWithoutDetail>;
22
22
  /**
23
23
  * 取引開始パラメータ
package/lib/index.d.ts CHANGED
@@ -140,6 +140,8 @@ import { UnitCode } from './unitCode';
140
140
  import * as UnitPriceOfferFactory from './unitPriceOffer';
141
141
  import * as EventNotification from './notification/event';
142
142
  import * as OrderNotification from './notification/order';
143
+ import * as PayActionNotification from './notification/payAction';
144
+ import * as RefundActionNotification from './notification/refundAction';
143
145
  import * as ReservationNotification from './notification/reservation';
144
146
  import * as TaskFactory from './task';
145
147
  import * as AcceptCOAOfferTaskFactory from './task/acceptCOAOffer';
@@ -372,6 +374,8 @@ export declare namespace notification {
372
374
  export import event = EventNotification;
373
375
  export import order = OrderNotification;
374
376
  export import reservation = ReservationNotification;
377
+ export import payAction = PayActionNotification;
378
+ export import refundAction = RefundActionNotification;
375
379
  }
376
380
  export import offer = OfferFactory;
377
381
  export import offerCatalog = OfferCatalogFactory;
package/lib/index.js CHANGED
@@ -132,6 +132,8 @@ var unitCode_1 = require("./unitCode");
132
132
  var UnitPriceOfferFactory = require("./unitPriceOffer");
133
133
  var EventNotification = require("./notification/event");
134
134
  var OrderNotification = require("./notification/order");
135
+ var PayActionNotification = require("./notification/payAction");
136
+ var RefundActionNotification = require("./notification/refundAction");
135
137
  var ReservationNotification = require("./notification/reservation");
136
138
  var AcceptCOAOfferTaskFactory = require("./task/acceptCOAOffer");
137
139
  var AccountMoneyTransferTaskFactory = require("./task/accountMoneyTransfer");
@@ -358,6 +360,8 @@ var notification;
358
360
  notification.order = OrderNotification;
359
361
  // tslint:disable-next-line:no-shadowed-variable
360
362
  notification.reservation = ReservationNotification;
363
+ notification.payAction = PayActionNotification;
364
+ notification.refundAction = RefundActionNotification;
361
365
  })(notification = exports.notification || (exports.notification = {}));
362
366
  exports.offer = OfferFactory;
363
367
  exports.offerCatalog = OfferCatalogFactory;
@@ -0,0 +1,8 @@
1
+ import { ActionType } from '../actionType';
2
+ import { IInvoice } from '../invoice';
3
+ export type IObject = Pick<IInvoice, 'paymentMethod' | 'paymentMethodId' | 'totalPaymentDue' | 'typeOf'>;
4
+ export interface IPayAction4inform {
5
+ id: string;
6
+ typeOf: ActionType.PayAction;
7
+ object: IObject[];
8
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,8 @@
1
+ import { ActionType } from '../actionType';
2
+ import { IInvoice } from '../invoice';
3
+ export type IObject = Pick<IInvoice, 'paymentMethod' | 'paymentMethodId' | 'totalPaymentDue' | 'typeOf'>;
4
+ export interface IRefundAction4inform {
5
+ id: string;
6
+ typeOf: ActionType.RefundAction;
7
+ object: IObject[];
8
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,13 +1,16 @@
1
- import { IAttributes as IInformActionAttributes, IObject, IRecipient, IRecipientDeprecated } from '../action/interact/inform';
1
+ import { IAttributes as IInformActionAttributes, IObject, IOrderAsAbout, IPlaceOrderAsAbout, IRecipient, IRecipientDeprecated } from '../action/interact/inform';
2
2
  import { IExtendId } from '../autoGenerated';
3
3
  import { IEntryPoint } from '../entryPoint';
4
+ import { IOrder4inform } from '../notification/order';
5
+ import { IPayAction4inform } from '../notification/payAction';
6
+ import { IRefundAction4inform } from '../notification/refundAction';
4
7
  import { IReservation4inform } from '../notification/reservation';
5
8
  import * as TaskFactory from '../task';
6
9
  import { TaskName } from '../taskName';
7
10
  export type IDeprecatedRecipient = Pick<IRecipientDeprecated, 'id' | 'name' | 'typeOf'> & {
8
11
  url?: never;
9
12
  };
10
- export type IPotentialInformAction = Pick<IInformActionAttributes<IObject>, 'object' | 'purpose' | 'about'> & {
13
+ export type IPotentialInformAnyResourceAction = Pick<IInformActionAttributes<IObject>, 'object' | 'about'> & {
11
14
  /**
12
15
  * 通知識別子(2024-10-24~)
13
16
  */
@@ -16,8 +19,29 @@ export type IPotentialInformAction = Pick<IInformActionAttributes<IObject>, 'obj
16
19
  target: IEntryPoint;
17
20
  id?: never;
18
21
  typeOf?: never;
22
+ purpose?: never;
19
23
  };
20
- export type IPotentialInformReservationAction = Pick<IInformActionAttributes<IObject>, 'object' | 'purpose' | 'about'> & {
24
+ export type IPotentialInformOrderAction = Pick<IInformActionAttributes<IObject>, 'object' | 'about'> & {
25
+ /**
26
+ * about required(2025-02-19~)
27
+ */
28
+ about?: IOrderAsAbout;
29
+ /**
30
+ * 通知識別子(2024-10-24~)
31
+ */
32
+ identifier?: string;
33
+ object: IOrder4inform;
34
+ recipient: IDeprecatedRecipient;
35
+ target: IEntryPoint;
36
+ id?: never;
37
+ typeOf?: never;
38
+ purpose?: never;
39
+ };
40
+ export type IPotentialInformReservationAction = Pick<IInformActionAttributes<IObject>, 'object' | 'about'> & {
41
+ /**
42
+ * about required(2025-02-19~)
43
+ */
44
+ about?: IOrderAsAbout | IPlaceOrderAsAbout;
21
45
  /**
22
46
  * 通知識別子(2024-10-24~)
23
47
  */
@@ -29,13 +53,12 @@ export type IPotentialInformReservationAction = Pick<IInformActionAttributes<IOb
29
53
  target: IEntryPoint;
30
54
  id?: never;
31
55
  typeOf?: never;
56
+ purpose?: never;
32
57
  };
33
58
  export type IPotentialInformActionWithId = Pick<IInformActionAttributes<IObject>, 'object' | 'purpose' | 'about'> & {
34
- /**
35
- * 通知識別子(2024-10-24~)
36
- */
37
- identifier?: string;
38
- recipient?: Pick<IDeprecatedRecipient, 'id' | 'name' | 'typeOf'>;
59
+ identifier?: never;
60
+ object: IPayAction4inform | IRefundAction4inform;
61
+ recipient?: never;
39
62
  target?: never;
40
63
  /**
41
64
  * potentialAction id
@@ -43,7 +66,7 @@ export type IPotentialInformActionWithId = Pick<IInformActionAttributes<IObject>
43
66
  id: string;
44
67
  typeOf: IInformActionAttributes<IObject>['typeOf'];
45
68
  };
46
- export type IData = IPotentialInformAction | IPotentialInformReservationAction | IPotentialInformActionWithId;
69
+ export type IData = IPotentialInformAnyResourceAction | IPotentialInformOrderAction | IPotentialInformReservationAction | IPotentialInformActionWithId;
47
70
  export interface IAttributes extends TaskFactory.IAttributes {
48
71
  name: TaskName.TriggerWebhook;
49
72
  data: IData;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chevre/factory",
3
- "version": "4.393.0-alpha.23",
3
+ "version": "4.393.0-alpha.24",
4
4
  "description": "Chevre Factory Library for Javascript",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",