@chevre/factory 4.329.0-alpha.0 → 4.329.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.
@@ -4,7 +4,7 @@ import * as RegisterServiceTransactionFactory from '../../../assetTransaction/re
4
4
  import { AssetTransactionType } from '../../../assetTransactionType';
5
5
  import { IOffer } from '../../../offer';
6
6
  import * as OrderFactory from '../../../order';
7
- import { IPermit } from '../../../permit';
7
+ import { IIssuedThroughAsProduct, IPermit } from '../../../permit';
8
8
  import { PriceCurrency } from '../../../priceCurrency';
9
9
  import { IProduct, IServiceOutput as IProductServiceOutput, ITicketPriceSpecification } from '../../../product';
10
10
  import { ISeller } from '../../../seller';
@@ -13,8 +13,11 @@ import * as AuthorizeActionFactory from '../../authorize';
13
13
  import { IPointAward } from '../../transfer/moneyTransfer';
14
14
  export declare type IAgent = ActionFactory.IParticipantAsSeller;
15
15
  export declare type IRecipient = ActionFactory.IParticipantAsWebApplication | ActionFactory.IParticipantAsPerson;
16
+ export declare type IPermitIssuedByProduct = Omit<IPermit, 'issuedThrough'> & {
17
+ issuedThrough?: IIssuedThroughAsProduct;
18
+ };
16
19
  export declare type IItemOffered = Pick<IProduct, 'typeOf' | 'id' | 'name'> & {
17
- serviceOutput: IProductServiceOutput & IPermit;
20
+ serviceOutput: IProductServiceOutput & IPermitIssuedByProduct;
18
21
  pointAward?: IPointAward;
19
22
  };
20
23
  export declare type IAcceptedOfferWithoutDetail = RegisterServiceTransactionFactory.IAcceptedOfferWithoutDetail;
@@ -4,7 +4,7 @@ import * as AssetTransactionFactory from '../assetTransaction';
4
4
  import { AssetTransactionType } from '../assetTransactionType';
5
5
  import { IExtendId } from '../autoGenerated';
6
6
  import { OfferType } from '../offerType';
7
- import { IPermit } from '../permit';
7
+ import { IIssuedThroughAsProduct, IPermit } from '../permit';
8
8
  import { IProduct } from '../product';
9
9
  export import IAgent = AssetTransactionFactory.IAgent;
10
10
  export declare type IStartParamsWithoutDetail = AssetTransactionFactory.IStartParams<AssetTransactionType.RegisterService, IAgent, undefined, IObjectWithoutDetail>;
@@ -52,7 +52,9 @@ export interface IAcceptedPointAward {
52
52
  };
53
53
  };
54
54
  }
55
- export declare type IServiceOutput = IPermit;
55
+ export declare type IServiceOutput = Omit<IPermit, 'issuedThrough'> & {
56
+ issuedThrough?: IIssuedThroughAsProduct;
57
+ };
56
58
  export interface IAcceptedItemOffered {
57
59
  id?: string;
58
60
  pointAward?: IAcceptedPointAward;
package/lib/order.d.ts CHANGED
@@ -11,7 +11,7 @@ import { IOffer } from './offer';
11
11
  import { OrderStatus } from './orderStatus';
12
12
  import { OrganizationType } from './organizationType';
13
13
  import { PaymentStatusType } from './paymentStatusType';
14
- import { IPermit as IBasePermit } from './permit';
14
+ import { IIssuedThroughAsProduct, IPermit as IBasePermit } from './permit';
15
15
  import { IPerson, IProfile } from './person';
16
16
  import { PersonType } from './personType';
17
17
  import { PlaceType } from './placeType';
@@ -136,7 +136,9 @@ export declare type IEventReservation = Pick<EventReservationFactory.IReservatio
136
136
  reservedTicket: IReservedTicket;
137
137
  };
138
138
  export declare type IReservation = IBusReservation | IEventReservation;
139
- export declare type IPermit = Pick<IBasePermit, 'amount' | 'identifier' | 'issuedThrough' | 'name' | 'typeOf' | 'validFor'>;
139
+ export declare type IPermit = Pick<IBasePermit, 'amount' | 'identifier' | 'name' | 'typeOf' | 'validFor'> & {
140
+ issuedThrough?: IIssuedThroughAsProduct;
141
+ };
140
142
  export interface IMoneyTransferPendingTransaction {
141
143
  typeOf: AssetTransactionType.MoneyTransfer;
142
144
  /**
package/lib/permit.d.ts CHANGED
@@ -4,10 +4,15 @@ import { IOrganization } from './organization';
4
4
  import { IProduct } from './product';
5
5
  import { IProject } from './project';
6
6
  import { IPropertyValue } from './propertyValue';
7
+ import { PaymentServiceType } from './service/paymentService';
7
8
  export declare enum PermitType {
8
9
  Permit = "Permit"
9
10
  }
10
- export declare type IIssuedThrough = Pick<IProduct, 'id' | 'serviceType' | 'typeOf'>;
11
+ export declare type IIssuedThroughAsPaymentService = Pick<IProduct, 'id' | 'serviceType'> & {
12
+ typeOf: PaymentServiceType.CreditCard;
13
+ };
14
+ export declare type IIssuedThroughAsProduct = Pick<IProduct, 'id' | 'serviceType' | 'typeOf'>;
15
+ export declare type IIssuedThrough = IIssuedThroughAsPaymentService | IIssuedThroughAsProduct;
11
16
  export declare type IPaymentAccount = Pick<IAccount, 'accountNumber' | 'typeOf'>;
12
17
  export declare type IPaymentAccountWithDetail = Pick<IAccount, 'accountNumber' | 'availableBalance' | 'balance' | 'typeOf'>;
13
18
  export declare type IAmount = Pick<IMonetaryAmount, 'typeOf' | 'currency' | 'value'>;
@@ -166,7 +166,7 @@ export interface IBroker {
166
166
  identifier?: IPropertyValue<string>[];
167
167
  name?: string;
168
168
  }
169
- export declare type IProgramMembershipUsed = IPermit;
169
+ export declare type IProgramMembershipUsed = Pick<IPermit, 'identifier' | 'issuedThrough' | 'project' | 'typeOf'>;
170
170
  export declare type IServiceTypeOfIssuedThrough = Pick<IServiceType, 'codeValue' | 'inCodeSet' | 'typeOf'>;
171
171
  export declare type IServiceLocationContainedInPlace = Pick<MovieTheaterFactory.IPlaceWithoutScreeningRoom, 'typeOf' | 'id' | 'branchCode'> & {
172
172
  name?: IMultilingualString;
@@ -1,4 +1,5 @@
1
1
  import { IInvoice } from '../invoice';
2
+ import { IIssuedThrough, IPermit } from '../permit';
2
3
  import { IAvailableChannel as IProductAvailableChannel, IServiceType } from '../product';
3
4
  import { IOnPaymentStatusChanged, IProject } from '../project';
4
5
  import { IPropertyValue } from '../propertyValue';
@@ -70,13 +71,26 @@ export interface IPaymentMethodAsServiceOutput {
70
71
  currency: string;
71
72
  };
72
73
  }
74
+ /**
75
+ * 出力されるインボイス
76
+ */
73
77
  export interface IInvoiceAsServiceOutput extends Pick<IInvoice, 'paymentStatus' | 'typeOf'> {
74
78
  /**
75
79
  * 発行される決済方法
76
80
  */
77
81
  paymentMethod?: IPaymentMethodAsServiceOutput;
78
82
  }
79
- export declare type IServiceOutput = IInvoiceAsServiceOutput;
83
+ /**
84
+ * 出力されるメンバーシップ
85
+ */
86
+ export declare type IPermitAsServiceOutput = Pick<IPermit, 'typeOf'> & {
87
+ /**
88
+ * メンバーシップサービス
89
+ * メンバーシップ区分が含まれる
90
+ */
91
+ issuedThrough: Pick<IIssuedThrough, 'serviceType'>;
92
+ };
93
+ export declare type IServiceOutput = IInvoiceAsServiceOutput | IPermitAsServiceOutput;
80
94
  /**
81
95
  * 決済サービス
82
96
  * {@link https://schema.org/Service}
@@ -86,19 +100,24 @@ export interface IService extends Pick<IThing, 'name' | 'description'> {
86
100
  typeOf: PaymentServiceType;
87
101
  id?: string;
88
102
  availableChannel?: IAvailableChannel;
103
+ /**
104
+ * The product identifier, such as ISBN.
105
+ * プロジェクト内でユニークな想定
106
+ */
89
107
  productID: string;
90
108
  /**
91
109
  * 決済サービス提供者(決済サービスを利用する販売者)
92
110
  */
93
111
  provider?: IProvider[];
94
112
  /**
95
- * 提供元のカード情報
113
+ * The tangible thing generated by the service, e.g. a passport, permit, etc.
114
+ * (InvoiceやPermit)
96
115
  */
97
- serviceOutput?: IServiceOutput;
116
+ serviceOutput?: IServiceOutput | IServiceOutput[];
98
117
  /**
99
118
  * The type of service being offered, e.g. veterans' benefits, emergency relief, etc.
100
119
  * 決済サービスの場合、serviceType.codeValueが決済方法区分
101
120
  */
102
- serviceType?: IServiceType;
121
+ serviceType: IServiceType;
103
122
  additionalProperty?: IPropertyValue<string>[];
104
123
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chevre/factory",
3
- "version": "4.329.0-alpha.0",
3
+ "version": "4.329.0-alpha.1",
4
4
  "description": "Chevre Factory Library for Javascript",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",