@chevre/factory 4.342.0 → 4.343.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.
@@ -0,0 +1,125 @@
1
+ {
2
+ "order": {
3
+ /**
4
+ * 注文日時
5
+ */
6
+ "orderDate": "2023-11-14T04:16:04.840Z",
7
+ /**
8
+ * 注文金額
9
+ */
10
+ "price": 2700,
11
+ /**
12
+ * 注文アイテム
13
+ */
14
+ "acceptedOffers": [
15
+ {
16
+ /**
17
+ * アイテム(予約)
18
+ */
19
+ "itemOffered": {
20
+ /**
21
+ * 追加特性
22
+ */
23
+ "additionalProperty": [],
24
+ /**
25
+ * イベント
26
+ */
27
+ "reservationFor": {
28
+ "doorTime": "2023-11-14T09:15:00.000Z",
29
+ "endDate": "2023-11-14T11:45:00.000Z",
30
+ "startDate": "2023-11-14T09:15:00.000Z"
31
+ },
32
+ /**
33
+ * 予約チケット
34
+ */
35
+ "reservedTicket": {
36
+ /**
37
+ * 指定座席
38
+ */
39
+ "ticketedSeat": {
40
+ "typeOf": "Seat",
41
+ "seatNumber": "B-1",
42
+ "seatRow": "",
43
+ "seatSection": "Default",
44
+ "seatingType": [
45
+ "Meal"
46
+ ]
47
+ }
48
+ }
49
+ },
50
+ /**
51
+ * 価格仕様
52
+ */
53
+ "priceSpecification": {
54
+ "priceComponent": [
55
+ {
56
+ "price": 1800,
57
+ "referenceQuantity": {
58
+ "typeOf": "QuantitativeValue",
59
+ "value": 1,
60
+ "unitCode": "C62"
61
+ },
62
+ /**
63
+ * 単価仕様
64
+ */
65
+ "typeOf": "UnitPriceSpecification"
66
+ },
67
+ {
68
+ "price": 500,
69
+ /**
70
+ * 区分加算料金
71
+ */
72
+ "typeOf": "CategoryCodeChargeSpecification",
73
+ /**
74
+ * 適用区分
75
+ */
76
+ "appliesToCategoryCode": [
77
+ {
78
+ "typeOf": "CategoryCode",
79
+ "codeValue": "Meal",
80
+ "inCodeSet": {
81
+ "typeOf": "CategoryCodeSet",
82
+ "identifier": "SeatingType"
83
+ }
84
+ }
85
+ ]
86
+ },
87
+ {
88
+ /**
89
+ * アドオン単価仕様
90
+ */
91
+ "typeOf": "UnitPriceSpecification",
92
+ "price": 400,
93
+ "referenceQuantity": {
94
+ "typeOf": "QuantitativeValue",
95
+ "value": 1,
96
+ "unitCode": "C62"
97
+ },
98
+ /**
99
+ * 適用アドオン
100
+ */
101
+ "appliesToAddOn": [
102
+ {
103
+ "typeOf": "Offer",
104
+ "id": "7k7bbepxp",
105
+ "identifier": "addOn-drink-m",
106
+ "itemOffered": {
107
+ "name": {
108
+ "ja": "ドリンク",
109
+ "en": "drinks"
110
+ },
111
+ /**
112
+ * アドオンプロダクトID
113
+ */
114
+ "productID": "drinks",
115
+ "typeOf": "Product"
116
+ }
117
+ }
118
+ ]
119
+ }
120
+ ]
121
+ }
122
+ }
123
+ ]
124
+ }
125
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "restockingFee": {
3
+ /**
4
+ * 返品手数料
5
+ */
6
+ "value": 1
7
+ }
8
+ }
@@ -60,7 +60,8 @@ export type IAcceptedOfferPriceSpecification = ITicketPriceSpecification & {
60
60
  /**
61
61
  * 受け入れられたチケットオファー
62
62
  */
63
- export type IAcceptedOffer4chevre = Pick<ITicketOffer, 'id' | 'identifier' | 'typeOf' | 'priceCurrency' | 'itemOffered' | 'additionalProperty'> & Pick<ReserveTransactionFactory.IAcceptedTicketOfferWithoutDetail, 'id' | 'addOn' | 'additionalProperty'> & {
63
+ export type IAcceptedOffer4chevre = Pick<ITicketOffer, 'acceptedPaymentMethod' | // add(2023-11-15~)
64
+ 'id' | 'identifier' | 'typeOf' | 'priceCurrency' | 'itemOffered' | 'additionalProperty'> & Pick<ReserveTransactionFactory.IAcceptedTicketOfferWithoutDetail, 'id' | 'addOn' | 'additionalProperty'> & {
64
65
  addOn?: ReserveTransactionFactory.IAcceptedAddOn[];
65
66
  itemOffered?: ReserveTransactionFactory.IAcceptedTicketOfferItemOffered;
66
67
  priceSpecification: IAcceptedOfferPriceSpecification;
@@ -0,0 +1,2 @@
1
+ import { ICategoryCode } from './categoryCode';
2
+ export type IBusinessEntityType = Pick<ICategoryCode, 'codeValue' | 'typeOf'>;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -12,6 +12,10 @@ export declare enum CategorySetIdentifier {
12
12
  * 通貨区分
13
13
  */
14
14
  CurrencyType = "CurrencyType",
15
+ /**
16
+ * カスタマータイプ
17
+ */
18
+ CustomerType = "CustomerType",
15
19
  /**
16
20
  * 配給区分
17
21
  */
@@ -11,6 +11,10 @@ var CategorySetIdentifier;
11
11
  * 通貨区分
12
12
  */
13
13
  CategorySetIdentifier["CurrencyType"] = "CurrencyType";
14
+ /**
15
+ * カスタマータイプ
16
+ */
17
+ CategorySetIdentifier["CustomerType"] = "CustomerType";
14
18
  /**
15
19
  * 配給区分
16
20
  */
package/lib/offer.d.ts CHANGED
@@ -79,8 +79,17 @@ export interface IAddOn {
79
79
  validFrom?: Date;
80
80
  validThrough?: Date;
81
81
  }
82
- export type IEligibleQuantity = Pick<IQuantitativeValue<UnitCode.C62>, 'maxValue' | 'typeOf' | 'unitCode' | 'value'>;
82
+ export type IEligibleQuantity = Pick<IQuantitativeValue<UnitCode.C62>, 'maxValue' | 'typeOf' | 'unitCode'>;
83
83
  export type IName = IMultilingualString;
84
+ /**
85
+ * 利用可能決済方法
86
+ */
87
+ export interface IAcceptedPaymentMethod {
88
+ /**
89
+ * 決済方法区分コード
90
+ */
91
+ identifier: string;
92
+ }
84
93
  /**
85
94
  * offer interface
86
95
  * An offer to transfer some rights to an item or to provide a service
@@ -95,6 +104,7 @@ export interface IOffer extends Pick<IThing, 'name' | 'description' | 'alternate
95
104
  /**
96
105
  * The payment method(s) accepted by seller for this offer.
97
106
  */
107
+ acceptedPaymentMethod?: IAcceptedPaymentMethod[];
98
108
  /**
99
109
  * An additional offer that can only be obtained in combination with the first base offer
100
110
  * (e.g. supplements and extensions that are available for a surcharge).
@@ -20,6 +20,10 @@ export interface IAccounting {
20
20
  */
21
21
  accountsReceivable?: number;
22
22
  }
23
+ /**
24
+ * 適用数量
25
+ * n以上n以下のアイテム数に適用する設定
26
+ */
23
27
  export type IEligibleQuantity = Pick<IQuantitativeValue<UnitCode>, 'maxValue' | 'minValue' | 'typeOf' | 'unitCode'>;
24
28
  export type IEligibleTransactionVolume = Pick<IPriceSpecification<PriceSpecificationType>, 'typeOf' | 'price' | 'priceCurrency' | 'valueAddedTaxIncluded'>;
25
29
  /**
package/lib/product.d.ts CHANGED
@@ -237,9 +237,9 @@ export type ITicketPriceSpecification = Omit<ICompoundPriceSpecification<ITicket
237
237
  export import IMinimizedTicketAddOn = UnitPriceOfferFactory.IAddOn4unitPriceOffer;
238
238
  /**
239
239
  * プロダクトオファー
240
- * strict definition(2023-02-24~)
241
240
  */
242
- export interface ITicketOffer extends Pick<IBaseOffer, 'name' | 'description' | 'alternateName' | 'color' | 'typeOf' | 'id' | 'availability' | 'availableAtOrFrom' | 'category' | 'eligibleMembershipType' | 'eligibleSeatingType' | 'eligibleMonetaryAmount' | 'eligibleSubReservation' | 'eligibleQuantity' | 'offeredThrough' | 'priceCurrency' | 'validFrom' | 'validThrough' | 'validRateLimit' | 'additionalProperty'> {
241
+ export interface ITicketOffer extends Pick<IBaseOffer, 'acceptedPaymentMethod' | // add(2023-11-15~)
242
+ 'name' | 'description' | 'alternateName' | 'color' | 'typeOf' | 'id' | 'availability' | 'availableAtOrFrom' | 'category' | 'eligibleMembershipType' | 'eligibleSeatingType' | 'eligibleMonetaryAmount' | 'eligibleSubReservation' | 'eligibleQuantity' | 'offeredThrough' | 'priceCurrency' | 'validFrom' | 'validThrough' | 'validRateLimit' | 'additionalProperty'> {
243
243
  addOn?: IMinimizedTicketAddOn[];
244
244
  identifier: string;
245
245
  name: IOfferName;
package/lib/seller.d.ts CHANGED
@@ -1,6 +1,7 @@
1
+ import { IBusinessEntityType } from './businessEntityType';
1
2
  import { IMerchantReturnPolicy, IRestockingFee } from './merchantReturnPolicy';
2
3
  import { IMultilingualString } from './multilingualString';
3
- import { IOffer } from './offer';
4
+ import { IAvailableAtOrFrom, IOffer } from './offer';
4
5
  import { IOrganization } from './organization';
5
6
  import { OrganizationType } from './organizationType';
6
7
  import { IProject } from './project';
@@ -22,12 +23,17 @@ export interface IPaymentAccepted {
22
23
  paymentMethodType: string;
23
24
  }
24
25
  export type IEligibleTransactionDuration = Pick<IQuantitativeValue<UnitCode.Sec>, 'maxValue' | 'typeOf' | 'unitCode'>;
25
- export type IMakesOffer = Pick<IOffer, 'typeOf' | 'availableAtOrFrom'> & {
26
+ export interface IMakesOffer extends Pick<IOffer, 'typeOf' | 'availableAtOrFrom'> {
27
+ availableAtOrFrom: IAvailableAtOrFrom[];
28
+ /**
29
+ * 適用カスタマータイプ
30
+ */
31
+ eligibleCustomerType?: IBusinessEntityType[];
26
32
  /**
27
33
  * 適用取引期間
28
34
  */
29
- eligibleTransactionDuration?: IEligibleTransactionDuration;
30
- };
35
+ eligibleTransactionDuration: IEligibleTransactionDuration;
36
+ }
31
37
  export interface ISeller extends Pick<IOrganization, 'typeOf' | 'id' | 'location' | 'telephone' | 'additionalProperty' | 'name' | 'url'> {
32
38
  project: Pick<IProject, 'id' | 'typeOf'>;
33
39
  /**
@@ -40,7 +46,7 @@ export interface ISeller extends Pick<IOrganization, 'typeOf' | 'id' | 'location
40
46
  hasMerchantReturnPolicy?: IHasMerchantReturnPolicy;
41
47
  name: IMultilingualString;
42
48
  /**
43
- * A pointer to products or services offered by the organization or person.
49
+ * 各アプリケーションに対するオファー
44
50
  */
45
51
  makesOffer?: IMakesOffer[];
46
52
  paymentAccepted?: IPaymentAccepted[];
@@ -71,7 +71,6 @@ export interface IObject {
71
71
  }
72
72
  export interface IStartParamsWithoutDetail {
73
73
  project: Pick<IProject, 'id' | 'typeOf'>;
74
- expiresInSeconds?: number;
75
74
  agent: IAgent;
76
75
  seller: {
77
76
  id: string;
@@ -40,7 +40,6 @@ export interface IItemOffered {
40
40
  }
41
41
  /**
42
42
  * 単価オファーの価格仕様
43
- * 最適化(Pickで表現)(2023-09-01~)
44
43
  */
45
44
  export type IUnitPriceOfferPriceSpecification = Pick<IUnitPriceSpecification, 'accounting' | 'appliesToMovieTicket' | 'eligibleQuantity' | 'eligibleTransactionVolume' | 'name' | 'price' | 'priceCurrency' | 'referenceQuantity' | 'typeOf' | 'valueAddedTaxIncluded'>;
46
45
  export type IAddOnItemOffered = Pick<IProduct, 'typeOf' | 'id' | 'name'>;
@@ -56,7 +55,7 @@ export type IAvailability = ItemAvailability.InStock | ItemAvailability.OutOfSto
56
55
  /**
57
56
  * 単価オファー
58
57
  */
59
- export interface IUnitPriceOffer extends Pick<IOffer, 'project' | 'typeOf' | 'priceCurrency' | 'id' | 'identifier' | 'name' | 'description' | 'alternateName' | 'availability' | 'availableAtOrFrom' | 'itemOffered' | 'priceSpecification' | 'additionalProperty' | 'color' | 'category' | 'eligibleSeatingType' | 'eligibleMembershipType' | 'eligibleMonetaryAmount' | 'eligibleSubReservation' | 'validFrom' | 'validThrough' | 'validRateLimit'> {
58
+ export interface IUnitPriceOffer extends Pick<IOffer, 'acceptedPaymentMethod' | 'project' | 'typeOf' | 'priceCurrency' | 'id' | 'identifier' | 'name' | 'description' | 'alternateName' | 'availability' | 'availableAtOrFrom' | 'itemOffered' | 'priceSpecification' | 'additionalProperty' | 'color' | 'category' | 'eligibleSeatingType' | 'eligibleMembershipType' | 'eligibleMonetaryAmount' | 'eligibleSubReservation' | 'validFrom' | 'validThrough' | 'validRateLimit'> {
60
59
  /**
61
60
  * The amount of time that is required between accepting the offer and the actual usage of the resource or service.
62
61
  * 事前予約要件(興行オファー承認日時とイベント開始日時の差)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chevre/factory",
3
- "version": "4.342.0",
3
+ "version": "4.343.0-alpha.1",
4
4
  "description": "Chevre Factory Library for Javascript",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",