@chevre/factory 4.381.0-alpha.0 → 4.381.0-alpha.2

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.
@@ -4,6 +4,8 @@ import * as AssetTransactionFactory from '../assetTransaction';
4
4
  import { AssetTransactionType } from '../assetTransactionType';
5
5
  import { IExtendId } from '../autoGenerated';
6
6
  import { IOrder } from '../order';
7
+ import { PermitType } from '../permit';
8
+ import { ProductType } from '../product';
7
9
  import { IPropertyValue } from '../propertyValue';
8
10
  import * as ReservationFactory from '../reservation';
9
11
  import { IIssuedThrough as IBusReservationIssuedThrough, IReservation as IBusReservation, IReservationFor as IBusReservationReservationFor } from '../reservation/busReservation';
@@ -11,6 +13,7 @@ import { IIssuedThrough as IEventReservationIssuedThrough, IReservation as IEven
11
13
  import { IReservation as IReservationPackage } from '../reservation/reservationPackage';
12
14
  import { ReservationStatusType } from '../reservationStatusType';
13
15
  import { ReservationType } from '../reservationType';
16
+ import { PaymentServiceType } from '../service/paymentService';
14
17
  import { IUnitPriceOffer } from '../unitPriceOffer';
15
18
  export import IAgent = AssetTransactionFactory.IAgent;
16
19
  export type IStartParamsWithoutDetail = AssetTransactionFactory.IStartParams<AssetTransactionType.Reserve, IAgent, undefined, IObjectWithoutDetail>;
@@ -18,7 +21,7 @@ export type IStartParamsWithoutDetail = AssetTransactionFactory.IStartParams<Ass
18
21
  * 取引開始パラメータ
19
22
  */
20
23
  export type IStartParams = AssetTransactionFactory.IStartParams<AssetTransactionType.Reserve, IAgent, undefined, IObject>;
21
- export interface IAcceptedProgramMembershipUsedAsObject {
24
+ export interface IProgramMembershipUsedAsPermit {
22
25
  accessCode?: string;
23
26
  /**
24
27
  * メンバーシップコード
@@ -29,16 +32,25 @@ export interface IAcceptedProgramMembershipUsedAsObject {
29
32
  * メンバーシップ発行サービスID
30
33
  */
31
34
  id: string;
35
+ typeOf: ProductType.MembershipService | PaymentServiceType.CreditCard | PaymentServiceType.FaceToFace;
32
36
  };
37
+ typeOf: PermitType.Permit;
38
+ }
39
+ /**
40
+ * チケット化された適用メンバーシップ
41
+ */
42
+ export interface IProgramMembershipUsedAsTicket {
43
+ ticketToken: string;
44
+ typeOf: 'Ticket';
33
45
  }
34
46
  /**
35
47
  * トークン化された適用メンバーシップ
36
48
  */
37
- export type ITokenizedAcceptedProgramMembershipUsed = string;
49
+ export type ITokenizedProgramMembershipUsed = string;
38
50
  /**
39
51
  * 適用メンバーシップ
40
52
  */
41
- export type IAcceptedProgramMembershipUsed = IAcceptedProgramMembershipUsedAsObject | ITokenizedAcceptedProgramMembershipUsed;
53
+ export type IAcceptedProgramMembershipUsed = IProgramMembershipUsedAsPermit | IProgramMembershipUsedAsTicket | ITokenizedProgramMembershipUsed;
42
54
  export type IAcceptedSubReservation = ISubReservation4eventReservation;
43
55
  export interface IAcceptedPointAward {
44
56
  typeOf: ActionType.MoneyTransfer;
@@ -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;
@@ -76,11 +77,18 @@ export interface IOwnerAsWebApplication {
76
77
  typeOf: CreativeWorkType.WebApplication;
77
78
  id: string;
78
79
  }
80
+ export interface IOwnerAsPlaceOrder {
81
+ typeOf: TransactionType.PlaceOrder;
82
+ /**
83
+ * 取引ID
84
+ */
85
+ id: string;
86
+ }
79
87
  /**
80
88
  * 所有者
81
89
  * 個人情報排除するように
82
90
  */
83
- export type IOwner = IOwnerAsOrganization | IOwnerAsPerson | IOwnerAsWebApplication;
91
+ export type IOwner = IOwnerAsPlaceOrder | IOwnerAsOrganization | IOwnerAsPerson | IOwnerAsWebApplication;
84
92
  export interface IAcquiredFrom {
85
93
  id: string;
86
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
+ /**
13
+ * 決済サービスID
14
+ */
15
+ id: string;
12
16
  typeOf: PaymentServiceType.CreditCard | PaymentServiceType.FaceToFace;
13
17
  };
14
- export type IIssuedThroughAsProduct = Pick<IProduct, 'id' | 'serviceType' | 'typeOf'>;
18
+ export type IIssuedThroughAsProduct = Pick<IProduct, 'id' | 'serviceType' | 'typeOf'> & {
19
+ id: string;
20
+ typeOf: ProductType.MembershipService | ProductType.PaymentCard;
21
+ };
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'>;
@@ -18,6 +18,7 @@ import { IProject } from './project';
18
18
  import { IPropertyValue } from './propertyValue';
19
19
  import { ReservationStatusType } from './reservationStatusType';
20
20
  import { ReservationType } from './reservationType';
21
+ import { PaymentServiceType } from './service/paymentService';
21
22
  import { SortType } from './sortType';
22
23
  export type TicketType = 'Ticket';
23
24
  export interface ITicketType {
@@ -162,7 +163,30 @@ export interface IBroker {
162
163
  identifier?: IPropertyValue<string>[];
163
164
  name?: string;
164
165
  }
165
- export type IProgramMembershipUsed = Pick<IPermit, 'identifier' | 'issuedThrough' | 'project' | 'typeOf'>;
166
+ export type IProgramMembershipUsedIssuedThroughFaceToFace = Pick<IPermit, 'typeOf'> & {
167
+ identifier: string;
168
+ issuedThrough: {
169
+ id: string;
170
+ typeOf: PaymentServiceType.FaceToFace;
171
+ };
172
+ };
173
+ export type IProgramMembershipUsedIssuedThroughCreditCard = Pick<IPermit, 'typeOf'> & {
174
+ identifier: string;
175
+ issuedThrough: {
176
+ id: string;
177
+ serviceType: Pick<IServiceType, 'codeValue' | 'inCodeSet' | 'typeOf'>;
178
+ typeOf: PaymentServiceType.CreditCard;
179
+ };
180
+ };
181
+ export type IProgramMembershipUsedIssuedThroughMembershipService = Pick<IPermit, 'typeOf'> & {
182
+ identifier: string;
183
+ issuedThrough: {
184
+ id: string;
185
+ serviceType: Pick<IServiceType, 'codeValue' | 'inCodeSet' | 'typeOf'>;
186
+ typeOf: ProductType.MembershipService;
187
+ };
188
+ };
189
+ export type IProgramMembershipUsed = IProgramMembershipUsedIssuedThroughFaceToFace | IProgramMembershipUsedIssuedThroughCreditCard | IProgramMembershipUsedIssuedThroughMembershipService;
166
190
  export type IServiceTypeOfIssuedThrough = Pick<IServiceType, 'codeValue' | 'inCodeSet' | 'typeOf'>;
167
191
  export type IServiceLocationContainedInPlace = Pick<MovieTheaterFactory.IPlace, 'typeOf' | 'id' | 'branchCode'> & {
168
192
  name?: IMultilingualString;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chevre/factory",
3
- "version": "4.381.0-alpha.0",
3
+ "version": "4.381.0-alpha.2",
4
4
  "description": "Chevre Factory Library for Javascript",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",