@chevre/factory 4.377.0-alpha.2 → 4.377.0-alpha.4

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.
@@ -1,19 +1,28 @@
1
1
  import * as ActionFactory from '../../action';
2
2
  import { ActionType } from '../../actionType';
3
+ import { AssetTransactionType } from '../../assetTransactionType';
3
4
  export type IAgent = ActionFactory.IParticipantAsProject;
4
5
  export type IRecipient = ActionFactory.IParticipant;
5
6
  export type IObject = any;
6
- export type IPurpose = any;
7
- export type IResult = any;
8
- export interface IPotentialActions {
7
+ export interface IPayTransactionAsPurpose {
8
+ id: string;
9
+ typeOf: AssetTransactionType.Pay;
9
10
  }
10
- export interface IAttributes<TObject, TResult> extends ActionFactory.IAttributes<ActionType.InformAction, TObject, TResult> {
11
+ export interface IRefundTransactionAsPurpose {
12
+ id: string;
13
+ typeOf: AssetTransactionType.Refund;
14
+ }
15
+ export type IPurpose = IPayTransactionAsPurpose | IRefundTransactionAsPurpose;
16
+ export interface IResult {
17
+ statusCode?: number;
18
+ useFetchAPI?: boolean;
19
+ }
20
+ export interface IAttributes<TObject> extends Pick<ActionFactory.IAttributes<ActionType.InformAction, TObject, IResult>, 'agent' | 'object' | 'project' | 'purpose' | 'recipient' | 'result' | 'typeOf'> {
11
21
  agent: IAgent;
12
22
  recipient: IRecipient;
13
- potentialActions?: IPotentialActions;
14
23
  purpose?: IPurpose;
15
24
  }
16
25
  /**
17
26
  * 通知アクション
18
27
  */
19
- export type IAction<TAttributes extends IAttributes<IObject, IResult>> = ActionFactory.IAction<TAttributes>;
28
+ export type IAction<TAttributes extends IAttributes<IObject>> = ActionFactory.IAction<TAttributes>;
@@ -92,7 +92,7 @@ export interface IPaymentService {
92
92
  serviceOutput?: IPaymentServiceOutput;
93
93
  }
94
94
  export type IObject = IPaymentService[];
95
- export type IInformPayment = IInformActionAttributes<{}, undefined>;
95
+ export type IInformPayment = Pick<IInformActionAttributes<{}>, 'recipient' | 'purpose'>;
96
96
  export interface IPotentialActions {
97
97
  add2report: boolean;
98
98
  informPayment?: IInformPayment[];
@@ -29,7 +29,7 @@ export interface IResult {
29
29
  transactionNumber: string;
30
30
  };
31
31
  }
32
- export type IInformPayment = IInformActionAttributes<{}, undefined>;
32
+ export type IInformPayment = Pick<IInformActionAttributes<{}>, 'recipient' | 'purpose'>;
33
33
  export interface IPotentialActions {
34
34
  add2report: boolean;
35
35
  informPayment?: IInformPayment[];
@@ -199,9 +199,6 @@ export interface IAcceptedTicketOfferWithoutDetail {
199
199
  export interface IAcceptedOffer4object {
200
200
  id: string;
201
201
  itemOffered: IAcceptedTicketOfferItemOffered4object;
202
- priceSpecification?: {
203
- appliesToMovieTicket?: IAcceptedAppliesToMovieTicket;
204
- };
205
202
  }
206
203
  export type IOrderAsReservePurpose = Pick<IOrder, 'confirmationNumber' | 'orderNumber' | 'typeOf'>;
207
204
  export interface IPotentialActionsParams {
@@ -231,25 +228,17 @@ export interface IObjectWithoutDetail {
231
228
  };
232
229
  }
233
230
  export type IReservationFor = IBusReservationReservationFor | IEventReservationReservationFor;
234
- export type IOmittedReservationProperty = 'reservationFor' | 'broker' | 'issuedThrough' | 'provider' | 'reservationStatus' | 'project' | 'reservationNumber' | 'bookingTime' | 'modifiedTime' | 'underName' | 'checkedIn' | 'attended';
235
- export type IObjectSubReservation = Omit<IBusReservation, IOmittedReservationProperty> | Omit<IEventReservation, IOmittedReservationProperty>;
231
+ export type IBusReservationAsSubReservation = Pick<IBusReservation, 'additionalProperty' | 'additionalTicketText' | 'id' | 'numSeats' | 'price' | 'priceCurrency' | 'programMembershipUsed' | 'reservedTicket' | 'subReservation' | 'typeOf'>;
232
+ export type IEventReservationAsSubReservation = Pick<IEventReservation, 'additionalProperty' | 'additionalTicketText' | 'id' | 'numSeats' | 'price' | 'priceCurrency' | 'programMembershipUsed' | 'reservedTicket' | 'subReservation' | 'typeOf'>;
233
+ export type IObjectSubReservation = IBusReservationAsSubReservation | IEventReservationAsSubReservation;
236
234
  export type IIssuedThrough = IBusReservationIssuedThrough | IEventReservationIssuedThrough;
237
- /**
238
- * 取引対象物
239
- */
240
235
  export interface IObject extends Pick<IReservationPackage, 'broker' | 'provider' | 'reservationStatus' | 'underName' | 'typeOf'> {
241
236
  acceptedOffer?: IAcceptedOffer4object[];
242
237
  issuedThrough?: IIssuedThrough;
243
238
  reservationFor?: IReservationFor;
244
- /**
245
- * 予約番号
246
- */
247
239
  reservationNumber: string;
248
240
  reservationStatus: ReservationStatusType.ReservationPending;
249
241
  subReservation?: IObjectSubReservation[];
250
- /**
251
- * trueで固定(2023-07-19~)
252
- */
253
242
  disablePendingReservations: true;
254
243
  useHoldStockByTransactionNumber?: boolean;
255
244
  }
@@ -1,13 +1,14 @@
1
- import { IAttributes as IInformActionAttributes } from '../action/interact/inform';
1
+ import { IAttributes as IInformActionAttributes, IObject } from '../action/interact/inform';
2
2
  import { IExtendId } from '../autoGenerated';
3
3
  import * as TaskFactory from '../task';
4
4
  import { TaskName } from '../taskName';
5
- export type IData = IInformActionAttributes<any, any>;
5
+ export type IPotentialInformAction = Pick<IInformActionAttributes<IObject>, 'object' | 'purpose' | 'recipient'>;
6
+ export type IData = IPotentialInformAction;
6
7
  export interface IAttributes extends TaskFactory.IAttributes {
7
8
  name: TaskName.TriggerWebhook;
8
9
  data: IData;
9
10
  }
10
11
  /**
11
- * ウェブフックタスクインターフェース
12
+ * 通知タスク
12
13
  */
13
14
  export type ITask = IExtendId<IAttributes>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chevre/factory",
3
- "version": "4.377.0-alpha.2",
3
+ "version": "4.377.0-alpha.4",
4
4
  "description": "Chevre Factory Library for Javascript",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",