@chevre/factory 4.380.0 → 4.381.0-alpha.1

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.
@@ -7,6 +7,7 @@ import { AssetTransactionType } from '../../../assetTransactionType';
7
7
  import { IOrderPaymentMethodIssuedThrough, ITotalPaymentDue } from '../../../order';
8
8
  import { PaymentStatusType } from '../../../paymentStatusType';
9
9
  import { IPropertyValue } from '../../../propertyValue';
10
+ import { IPermitAsServiceOutput } from '../../../service/paymentService';
10
11
  import { TransactionType } from '../../../transactionType';
11
12
  import * as AuthorizeActionFactory from '../../authorize';
12
13
  export type IAgent = ActionFactory.IParticipantAsWebApplication | ActionFactory.IParticipantAsPerson;
@@ -49,7 +50,7 @@ export interface IObjectIncludingPaymentMethodDetails {
49
50
  */
50
51
  paymentMethod: AvailablePaymentMethodType;
51
52
  /**
52
- * 決済ID
53
+ * 決済方法ID
53
54
  */
54
55
  paymentMethodId: string;
55
56
  typeOf: ResultType;
@@ -75,8 +76,13 @@ export interface IObjectIncludingPaymentMethodDetails {
75
76
  * (MovieTicket決済)
76
77
  */
77
78
  movieTickets?: IMovieTicket[];
79
+ /**
80
+ * メンバーシップチケット指定の場合
81
+ * 2024-08-13~
82
+ */
83
+ ticketToken?: string;
78
84
  }
79
- export type IObjectWithoutDetail = Pick<IObjectIncludingPaymentMethodDetails, 'additionalProperty' | 'amount' | 'issuedThrough' | 'paymentMethod' | 'description' | 'name' | 'creditCard' | 'method' | 'movieTickets' | 'fromLocation'> & {
85
+ export type IObjectWithoutDetail = Pick<IObjectIncludingPaymentMethodDetails, 'additionalProperty' | 'amount' | 'issuedThrough' | 'paymentMethod' | 'description' | 'name' | 'creditCard' | 'method' | 'movieTickets' | 'fromLocation' | 'ticketToken'> & {
80
86
  /**
81
87
  * 外部決済URL発行の場合に指定
82
88
  * CreditCardのみ対応
@@ -108,7 +114,7 @@ export interface IResultAsInvoice {
108
114
  */
109
115
  paymentMethodAsObject: IResultPaymentMethod;
110
116
  /**
111
- * 決済ID
117
+ * 決済方法ID
112
118
  */
113
119
  paymentMethodId: string;
114
120
  /**
@@ -131,7 +137,13 @@ export interface IResultAsInvoice {
131
137
  typeOf: ResultType;
132
138
  issuedThrough: IOrderPaymentMethodIssuedThrough;
133
139
  }
134
- export type IResult = IResultAsInvoice | IResultAsInvoice[];
140
+ export type IResultAsPermit = Pick<IPermitAsServiceOutput, 'typeOf' | 'issuedThrough'> & {
141
+ /**
142
+ * メンバーシップコード
143
+ */
144
+ identifier: string;
145
+ };
146
+ export type IResult = [IResultAsInvoice, IResultAsPermit?];
135
147
  export interface IPurpose {
136
148
  typeOf: TransactionType.PlaceOrder;
137
149
  id: string;
@@ -150,9 +162,6 @@ export interface IInstrumentAsAssetTransaction {
150
162
  identifier: ServiceIdentifier;
151
163
  }
152
164
  export type IInstrument = IInstrumentAsAssetTransaction | IInstrumentAsService;
153
- /**
154
- * 決済承認アクション属性
155
- */
156
165
  export interface IAttributes extends AuthorizeActionFactory.IAttributes<IObject, IResult> {
157
166
  typeOf: ActionType.AuthorizeAction;
158
167
  object: IObject;
@@ -53,6 +53,7 @@ export interface IAcceptedPointAward {
53
53
  };
54
54
  }
55
55
  export type IServiceOutput = Omit<IPermit, 'issuedThrough'> & {
56
+ identifier: string;
56
57
  issuedThrough?: IIssuedThroughAsProduct;
57
58
  };
58
59
  export interface IAcceptedItemOffered {
package/lib/order.d.ts CHANGED
@@ -111,6 +111,7 @@ export type IEventReservation = Pick<EventReservationFactory.IReservation, 'addi
111
111
  };
112
112
  export type IReservation = IBusReservation | IEventReservation;
113
113
  export type IPermit = Pick<IBasePermit, 'amount' | 'identifier' | 'name' | 'typeOf' | 'validFor'> & {
114
+ identifier: string;
114
115
  issuedThrough?: IIssuedThroughAsProduct;
115
116
  };
116
117
  export interface IMoneyTransferPendingTransaction {
@@ -9,6 +9,7 @@ import { IReservation as IEventReservation } from './reservation/event';
9
9
  import { ReservationType } from './reservationType';
10
10
  import * as WebAPIFactory from './service/webAPI';
11
11
  import { SortType } from './sortType';
12
+ import { TransactionType } from './transactionType';
12
13
  export type IBookingService = WebAPIFactory.IService<WebAPIFactory.Identifier>;
13
14
  export interface IBusReservationAsGood {
14
15
  typeOf: ReservationType.BusReservation;
@@ -53,6 +54,7 @@ export type IReservation = IBusReservationAsGood | IEventReservationAsGood;
53
54
  export type IReservationWithDetail = (IEventReservationAsGood & IEventReservation) | (IBusReservationAsGood & IBusReservation);
54
55
  export type IPermitIssuedThrough = Pick<PermitFactory.IIssuedThrough, 'id' | 'typeOf' | 'serviceType'>;
55
56
  export type IPermitAsGood = Pick<PermitFactory.IPermit, 'identifier' | 'typeOf' | 'name' | 'validFor'> & {
57
+ identifier: string;
56
58
  issuedThrough?: IPermitIssuedThrough;
57
59
  };
58
60
  /**
@@ -75,11 +77,18 @@ export interface IOwnerAsWebApplication {
75
77
  typeOf: CreativeWorkType.WebApplication;
76
78
  id: string;
77
79
  }
80
+ export interface IOwnerAsPlaceOrder {
81
+ typeOf: TransactionType.PlaceOrder;
82
+ /**
83
+ * 取引ID
84
+ */
85
+ id: string;
86
+ }
78
87
  /**
79
88
  * 所有者
80
89
  * 個人情報排除するように
81
90
  */
82
- export type IOwner = IOwnerAsOrganization | IOwnerAsPerson | IOwnerAsWebApplication;
91
+ export type IOwner = IOwnerAsPlaceOrder | IOwnerAsOrganization | IOwnerAsPerson | IOwnerAsWebApplication;
83
92
  export interface IAcquiredFrom {
84
93
  id: string;
85
94
  typeOf: OrganizationType.Corporation;
package/lib/permit.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { IAccount } from './account';
2
2
  import { IMonetaryAmount } from './monetaryAmount';
3
3
  import { IOrganization } from './organization';
4
- import { IProduct } from './product';
4
+ import { IProduct, ProductType } from './product';
5
5
  import { IProject } from './project';
6
6
  import { IPropertyValue } from './propertyValue';
7
7
  import { PaymentServiceType } from './service/paymentService';
@@ -9,9 +9,16 @@ export declare enum PermitType {
9
9
  Permit = "Permit"
10
10
  }
11
11
  export type IIssuedThroughAsPaymentService = Pick<IProduct, 'id' | 'serviceType'> & {
12
- typeOf: PaymentServiceType.CreditCard;
12
+ /**
13
+ * 決済サービスID
14
+ */
15
+ id: string;
16
+ typeOf: PaymentServiceType.CreditCard | PaymentServiceType.FaceToFace;
17
+ };
18
+ export type IIssuedThroughAsProduct = Pick<IProduct, 'id' | 'serviceType' | 'typeOf'> & {
19
+ id: string;
20
+ typeOf: ProductType.MembershipService | ProductType.PaymentCard;
13
21
  };
14
- export type IIssuedThroughAsProduct = Pick<IProduct, 'id' | 'serviceType' | 'typeOf'>;
15
22
  export type IIssuedThrough = IIssuedThroughAsPaymentService | IIssuedThroughAsProduct;
16
23
  export type IPaymentAccount = Pick<IAccount, 'accountNumber' | 'typeOf'>;
17
24
  export type IPaymentAccountWithDetail = Pick<IAccount, 'accountNumber' | 'availableBalance' | 'balance' | 'typeOf'>;
@@ -64,7 +64,7 @@ export interface IRefundParams {
64
64
  object: {
65
65
  paymentMethod: {
66
66
  /**
67
- * 返金対象決済ID
67
+ * 返金対象決済方法ID
68
68
  */
69
69
  paymentMethodId: string;
70
70
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chevre/factory",
3
- "version": "4.380.0",
3
+ "version": "4.381.0-alpha.1",
4
4
  "description": "Chevre Factory Library for Javascript",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",