@chevre/factory 6.0.0-alpha.1 → 6.0.0-alpha.3

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.
Files changed (84) hide show
  1. package/lib/account/transactionType.js +1 -1
  2. package/lib/account.js +2 -2
  3. package/lib/accountType.js +1 -1
  4. package/lib/action/accept/coaOffer.js +1 -1
  5. package/lib/action/authorize/offer/any.d.ts +76 -0
  6. package/lib/action/authorize/offer/any.js +8 -0
  7. package/lib/action/authorize/offer/eventService.d.ts +5 -71
  8. package/lib/action/authorize/offer/eventService.js +2 -4
  9. package/lib/action/authorize/offer/product.d.ts +8 -19
  10. package/lib/action/authorize/offer/product.js +3 -0
  11. package/lib/action/authorize/paymentMethod/any.js +2 -2
  12. package/lib/action/transfer/give/pointAward.js +1 -1
  13. package/lib/action/update/delete.js +1 -1
  14. package/lib/actionStatusType.js +1 -1
  15. package/lib/actionType.js +1 -1
  16. package/lib/aggregation.js +1 -1
  17. package/lib/assetTransactionType.js +1 -1
  18. package/lib/categoryCode.js +1 -1
  19. package/lib/certificationStatusEnumeration.js +1 -1
  20. package/lib/creativeWork/message/email.js +1 -1
  21. package/lib/creativeWork/noteDigitalDocument.js +2 -2
  22. package/lib/creativeWorkType.js +1 -1
  23. package/lib/encodingFormat.js +10 -10
  24. package/lib/error/alreadyInUse.js +1 -3
  25. package/lib/error/argument.js +1 -3
  26. package/lib/error/argumentNull.js +1 -3
  27. package/lib/error/chevre.js +1 -3
  28. package/lib/error/forbidden.js +1 -3
  29. package/lib/error/gatewayTimeout.js +1 -3
  30. package/lib/error/internal.js +1 -3
  31. package/lib/error/notFound.js +1 -3
  32. package/lib/error/notImplemented.js +1 -3
  33. package/lib/error/rateLimitExceeded.js +1 -3
  34. package/lib/error/serviceUnavailable.js +1 -3
  35. package/lib/error/unauthorized.js +1 -3
  36. package/lib/error/unknown.js +1 -3
  37. package/lib/errorCode.js +1 -1
  38. package/lib/event/anyEvent.d.ts +2 -2
  39. package/lib/eventStatusType.js +1 -1
  40. package/lib/eventType.js +1 -1
  41. package/lib/index.d.ts +4 -8
  42. package/lib/index.js +30 -58
  43. package/lib/itemAvailability.js +1 -1
  44. package/lib/merchantReturnPolicy.js +3 -3
  45. package/lib/movieTicketType.js +1 -1
  46. package/lib/offerItemCondition.js +1 -1
  47. package/lib/offerType.js +1 -1
  48. package/lib/order.js +1 -1
  49. package/lib/orderStatus.js +1 -1
  50. package/lib/organizationType.js +1 -1
  51. package/lib/ownershipInfo.d.ts +7 -20
  52. package/lib/paymentStatusType.js +1 -1
  53. package/lib/permit.js +1 -1
  54. package/lib/personType.js +1 -1
  55. package/lib/place/seat.d.ts +1 -3
  56. package/lib/placeType.js +1 -1
  57. package/lib/priceCurrency.js +1 -1
  58. package/lib/priceSpecificationType.js +1 -1
  59. package/lib/product.js +1 -1
  60. package/lib/programMembership.js +1 -1
  61. package/lib/propertyValue.js +1 -1
  62. package/lib/quantitativeValue.js +1 -1
  63. package/lib/recipe.js +2 -2
  64. package/lib/reservationStatusType.js +1 -1
  65. package/lib/reservationType.js +1 -1
  66. package/lib/role/organizationRole.js +1 -1
  67. package/lib/role.js +1 -1
  68. package/lib/service/paymentService.js +1 -1
  69. package/lib/service/webAPI.js +1 -1
  70. package/lib/sortType.js +1 -1
  71. package/lib/taskName.js +1 -1
  72. package/lib/taskStatus.js +1 -1
  73. package/lib/transaction/returnOrder.js +1 -1
  74. package/lib/transactionStatusType.js +1 -1
  75. package/lib/transactionType.js +1 -1
  76. package/lib/tripType.js +1 -1
  77. package/lib/unitCode.js +1 -1
  78. package/package.json +15 -18
  79. package/example/customReturnPolicyRequest.json +0 -125
  80. package/example/customReturnPolicyResponse.json +0 -17
  81. package/example/informPayAction.json +0 -126
  82. package/example/informPersonAction.json +0 -517
  83. package/example/informRefundAction.json +0 -16
  84. package/example/testErrorInstance.js +0 -9
@@ -49,9 +49,7 @@ export interface IPlaceWithOffer extends IPlace {
49
49
  offers?: IOffer[];
50
50
  }
51
51
  export type IKeyOfProjection = 'typeOf' | 'branchCode' | 'name' | 'seatingType' | 'additionalProperty' | 'containedInPlace.containedInPlace' | 'containedInPlace.typeOf' | 'containedInPlace.branchCode' | 'containedInPlace.name';
52
- export type IProjection = {
53
- [key in IKeyOfProjection]?: 0;
54
- };
52
+ export type IProjection = Partial<Record<IKeyOfProjection, 0>>;
55
53
  export interface ISearchConditions {
56
54
  $projection?: IProjection;
57
55
  limit?: number;
package/lib/placeType.js CHANGED
@@ -14,4 +14,4 @@ var PlaceType;
14
14
  PlaceType["ScreeningRoom"] = "ScreeningRoom";
15
15
  PlaceType["ScreeningRoomSection"] = "ScreeningRoomSection";
16
16
  PlaceType["Seat"] = "Seat";
17
- })(PlaceType = exports.PlaceType || (exports.PlaceType = {}));
17
+ })(PlaceType || (exports.PlaceType = PlaceType = {}));
@@ -9,4 +9,4 @@ exports.PriceCurrency = void 0;
9
9
  var PriceCurrency;
10
10
  (function (PriceCurrency) {
11
11
  PriceCurrency["JPY"] = "JPY";
12
- })(PriceCurrency = exports.PriceCurrency || (exports.PriceCurrency = {}));
12
+ })(PriceCurrency || (exports.PriceCurrency = PriceCurrency = {}));
@@ -26,4 +26,4 @@ var PriceSpecificationType;
26
26
  * 単価仕様
27
27
  */
28
28
  PriceSpecificationType["UnitPriceSpecification"] = "UnitPriceSpecification";
29
- })(PriceSpecificationType = exports.PriceSpecificationType || (exports.PriceSpecificationType = {}));
29
+ })(PriceSpecificationType || (exports.PriceSpecificationType = PriceSpecificationType = {}));
package/lib/product.js CHANGED
@@ -26,4 +26,4 @@ var ProductType;
26
26
  * 旅客サービス
27
27
  */
28
28
  ProductType["Transportation"] = "Transportation";
29
- })(ProductType = exports.ProductType || (exports.ProductType = {}));
29
+ })(ProductType || (exports.ProductType = ProductType = {}));
@@ -4,4 +4,4 @@ exports.ProgramMembershipType = void 0;
4
4
  var ProgramMembershipType;
5
5
  (function (ProgramMembershipType) {
6
6
  ProgramMembershipType["ProgramMembership"] = "ProgramMembership";
7
- })(ProgramMembershipType = exports.ProgramMembershipType || (exports.ProgramMembershipType = {}));
7
+ })(ProgramMembershipType || (exports.ProgramMembershipType = ProgramMembershipType = {}));
@@ -4,4 +4,4 @@ exports.PropertyValueType = void 0;
4
4
  var PropertyValueType;
5
5
  (function (PropertyValueType) {
6
6
  PropertyValueType["LocationFeatureSpecification"] = "LocationFeatureSpecification";
7
- })(PropertyValueType = exports.PropertyValueType || (exports.PropertyValueType = {}));
7
+ })(PropertyValueType || (exports.PropertyValueType = PropertyValueType = {}));
@@ -4,4 +4,4 @@ exports.StringValue = void 0;
4
4
  var StringValue;
5
5
  (function (StringValue) {
6
6
  StringValue["Infinity"] = "Infinity";
7
- })(StringValue = exports.StringValue || (exports.StringValue = {}));
7
+ })(StringValue || (exports.StringValue = StringValue = {}));
package/lib/recipe.js CHANGED
@@ -16,7 +16,7 @@ var RecipeCategory;
16
16
  RecipeCategory["authorizeInvoice"] = "authorizeInvoice";
17
17
  RecipeCategory["authorizeInvoice3ds"] = "authorizeInvoice3ds";
18
18
  RecipeCategory["sendEmailMessage"] = "sendEmailMessage";
19
- })(RecipeCategory = exports.RecipeCategory || (exports.RecipeCategory = {}));
19
+ })(RecipeCategory || (exports.RecipeCategory = RecipeCategory = {}));
20
20
  var StepIdentifier;
21
21
  (function (StepIdentifier) {
22
22
  StepIdentifier["entryTran"] = "entryTran";
@@ -33,4 +33,4 @@ var StepIdentifier;
33
33
  StepIdentifier["delReserve"] = "delReserve";
34
34
  StepIdentifier["delTmpReserve"] = "delTmpReserve";
35
35
  StepIdentifier["sendMultiple"] = "sendMultiple";
36
- })(StepIdentifier = exports.StepIdentifier || (exports.StepIdentifier = {}));
36
+ })(StepIdentifier || (exports.StepIdentifier = StepIdentifier = {}));
@@ -22,4 +22,4 @@ var ReservationStatusType;
22
22
  * The status of a reservation when a request has been sent, but not confirmed.
23
23
  */
24
24
  ReservationStatusType["ReservationPending"] = "ReservationPending";
25
- })(ReservationStatusType = exports.ReservationStatusType || (exports.ReservationStatusType = {}));
25
+ })(ReservationStatusType || (exports.ReservationStatusType = ReservationStatusType = {}));
@@ -9,4 +9,4 @@ var ReservationType;
9
9
  // BusReservation = 'BusReservation',
10
10
  ReservationType["EventReservation"] = "EventReservation";
11
11
  ReservationType["ReservationPackage"] = "ReservationPackage";
12
- })(ReservationType = exports.ReservationType || (exports.ReservationType = {}));
12
+ })(ReservationType || (exports.ReservationType = ReservationType = {}));
@@ -57,4 +57,4 @@ var RoleName;
57
57
  * adminapisの在庫管理ロール
58
58
  */
59
59
  RoleName["AdminInventoryManager"] = "admin.inventoryManager";
60
- })(RoleName = exports.RoleName || (exports.RoleName = {}));
60
+ })(RoleName || (exports.RoleName = RoleName = {}));
package/lib/role.js CHANGED
@@ -4,4 +4,4 @@ exports.RoleType = void 0;
4
4
  var RoleType;
5
5
  (function (RoleType) {
6
6
  RoleType["OrganizationRole"] = "OrganizationRole";
7
- })(RoleType = exports.RoleType || (exports.RoleType = {}));
7
+ })(RoleType || (exports.RoleType = RoleType = {}));
@@ -7,4 +7,4 @@ var PaymentServiceType;
7
7
  PaymentServiceType["FaceToFace"] = "FaceToFace";
8
8
  PaymentServiceType["MovieTicket"] = "MovieTicket";
9
9
  PaymentServiceType["PaymentCard"] = "PaymentCard";
10
- })(PaymentServiceType = exports.PaymentServiceType || (exports.PaymentServiceType = {}));
10
+ })(PaymentServiceType || (exports.PaymentServiceType = PaymentServiceType = {}));
@@ -5,4 +5,4 @@ var Identifier;
5
5
  (function (Identifier) {
6
6
  Identifier["COA"] = "COA";
7
7
  Identifier["Chevre"] = "Chevre";
8
- })(Identifier = exports.Identifier || (exports.Identifier = {}));
8
+ })(Identifier || (exports.Identifier = Identifier = {}));
package/lib/sortType.js CHANGED
@@ -8,4 +8,4 @@ var SortType;
8
8
  (function (SortType) {
9
9
  SortType[SortType["Ascending"] = 1] = "Ascending";
10
10
  SortType[SortType["Descending"] = -1] = "Descending";
11
- })(SortType = exports.SortType || (exports.SortType = {}));
11
+ })(SortType || (exports.SortType = SortType = {}));
package/lib/taskName.js CHANGED
@@ -131,4 +131,4 @@ var TaskName;
131
131
  * 予約中止
132
132
  */
133
133
  TaskName["VoidReserveTransaction"] = "voidReserveTransaction";
134
- })(TaskName = exports.TaskName || (exports.TaskName = {}));
134
+ })(TaskName || (exports.TaskName = TaskName = {}));
package/lib/taskStatus.js CHANGED
@@ -27,4 +27,4 @@ var TaskStatus;
27
27
  * 2025-03-01~
28
28
  */
29
29
  TaskStatus["Expired"] = "Expired";
30
- })(TaskStatus = exports.TaskStatus || (exports.TaskStatus = {}));
30
+ })(TaskStatus || (exports.TaskStatus = TaskStatus = {}));
@@ -14,4 +14,4 @@ var Reason;
14
14
  * 販売者都合での返品
15
15
  */
16
16
  Reason["Seller"] = "Seller";
17
- })(Reason = exports.Reason || (exports.Reason = {}));
17
+ })(Reason || (exports.Reason = Reason = {}));
@@ -10,4 +10,4 @@ var TransactionStatusType;
10
10
  TransactionStatusType["Canceled"] = "Canceled";
11
11
  TransactionStatusType["Confirmed"] = "Confirmed";
12
12
  TransactionStatusType["Expired"] = "Expired";
13
- })(TransactionStatusType = exports.TransactionStatusType || (exports.TransactionStatusType = {}));
13
+ })(TransactionStatusType || (exports.TransactionStatusType = TransactionStatusType = {}));
@@ -14,4 +14,4 @@ var TransactionType;
14
14
  * 注文返品取引
15
15
  */
16
16
  TransactionType["ReturnOrder"] = "ReturnOrder";
17
- })(TransactionType = exports.TransactionType || (exports.TransactionType = {}));
17
+ })(TransactionType || (exports.TransactionType = TransactionType = {}));
package/lib/tripType.js CHANGED
@@ -8,4 +8,4 @@ var TripType;
8
8
  (function (TripType) {
9
9
  TripType["BusTrip"] = "BusTrip";
10
10
  TripType["Trip"] = "Trip";
11
- })(TripType = exports.TripType || (exports.TripType = {}));
11
+ })(TripType || (exports.TripType = TripType = {}));
package/lib/unitCode.js CHANGED
@@ -22,4 +22,4 @@ var UnitCode;
22
22
  * 秒
23
23
  */
24
24
  UnitCode["Sec"] = "SEC";
25
- })(UnitCode = exports.UnitCode || (exports.UnitCode = {}));
25
+ })(UnitCode || (exports.UnitCode = UnitCode = {}));
package/package.json CHANGED
@@ -1,12 +1,10 @@
1
1
  {
2
2
  "name": "@chevre/factory",
3
- "version": "6.0.0-alpha.1",
3
+ "version": "6.0.0-alpha.3",
4
4
  "description": "Chevre Factory Library for Javascript",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",
7
7
  "files": [
8
- "doc/",
9
- "example/",
10
8
  "lib/"
11
9
  ],
12
10
  "directories": {
@@ -17,18 +15,17 @@
17
15
  },
18
16
  "scripts": {
19
17
  "build": "tsc",
20
- "check": "npm run tslint",
18
+ "check:all": "npm run clean && npm run build && npm test",
21
19
  "clean": "rimraf ./lib \"npm-debug.log*\" ./doc ./coverage ./.nyc_output",
22
20
  "doc": "echo \"implementing...\" && exit 0",
23
- "mocha": "mocha",
24
- "nyc": "nyc mocha \"src/**/*.spec.ts\"",
25
- "coverage": "npm run nyc && nyc report --reporter=text-lcov | coveralls",
26
- "test": "npm run check && npm run coverage",
27
- "tslint": "tslint --project tsconfig.json -c tslint.json --exclude \"**/*.spec.ts\" \"src/**/*.ts\"",
28
- "preversion": "npm run clean && npm run build && npm test && npm run doc",
21
+ "eslint": "eslint \"src/**/*.ts\"",
22
+ "coverage": "vitest run --coverage",
23
+ "test": "npm run eslint && npm run coverage",
24
+ "preversion": "npm run check:all",
29
25
  "version": "git add -A",
26
+ "vitest": "vitest",
30
27
  "postversion": "git push origin --tags",
31
- "prepublishOnly": "npm run clean && npm run build && npm test && npm run doc"
28
+ "prepublishOnly": "npm run clean && npm run build"
32
29
  },
33
30
  "author": {
34
31
  "name": "Motionpicture co.,ltd."
@@ -41,16 +38,16 @@
41
38
  ],
42
39
  "license": "UNLICENSED",
43
40
  "devDependencies": {
44
- "@types/mocha": "^5.2.7",
41
+ "@eslint/js": "10.0.1",
45
42
  "@types/node": "22.19.7",
43
+ "@vitest/coverage-v8": "4.1.0",
44
+ "@vitest/ui": "4.1.0",
46
45
  "coveralls": "3.1.1",
47
- "mocha": "^5.2.0",
48
- "nyc": "15.1.0",
46
+ "eslint": "9.39.4",
49
47
  "rimraf": "^2.6.3",
50
- "ts-node": "10.9.1",
51
- "tslint": "6.1.3",
52
- "tslint-microsoft-contrib": "6.2.0",
53
- "typescript": "5.0.4"
48
+ "typescript": "5.6.3",
49
+ "typescript-eslint": "8.57.0",
50
+ "vitest": "4.1.0"
54
51
  },
55
52
  "dependencies": {
56
53
  "@aws-sdk/client-cognito-identity-provider": "3.438.0",
@@ -1,125 +0,0 @@
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
- }
@@ -1,17 +0,0 @@
1
- {
2
- /**
3
- * アイテムコンディション
4
- *
5
- * 未定義: 使用済予約の有無に関わらず返品可能
6
- * NewCondition: 使用済予約が存在しない場合のみ返品可能
7
- *
8
- * NewCondition以外の値は不適切な返品ポリシーとして扱われます
9
- */
10
- "itemCondition": "NewCondition",
11
- "restockingFee": {
12
- /**
13
- * 返品手数料
14
- */
15
- "value": 1
16
- }
17
- }
@@ -1,126 +0,0 @@
1
- {
2
- "data": {
3
- "object": [
4
- {
5
- "paymentMethod": {
6
- /**
7
- * 決済カードリスト
8
- */
9
- "serviceOutput": [
10
- {
11
- /**
12
- * 購入番号
13
- */
14
- "identifier": "2127021398",
15
- "amount": {
16
- /**
17
- * 決済カード計上金額
18
- * 認証レスポンスに値が存在する場合のみ含まれます
19
- */
20
- "value": 1200
21
- },
22
- "serviceOutput": {
23
- /**
24
- * 予約の価格仕様
25
- */
26
- "priceSpecification": {
27
- "priceComponent": [
28
- {
29
- /**
30
- * 価格仕様タイプ
31
- */
32
- "typeOf": "UnitPriceSpecification",
33
- /**
34
- * 価格
35
- */
36
- "price": 0,
37
- /**
38
- * 単価基準数量
39
- */
40
- "referenceQuantity": {
41
- "typeOf": "QuantitativeValue",
42
- "value": 1,
43
- "unitCode": "C62"
44
- },
45
- "accounting": {
46
- /**
47
- * 売上金額
48
- */
49
- "accountsReceivable": 1400
50
- }
51
- },
52
- {
53
- /**
54
- * 価格仕様タイプ
55
- */
56
- "typeOf": "MovieTicketTypeChargeSpecification",
57
- /**
58
- * 価格
59
- */
60
- "price": 0,
61
- "appliesToMovieTicket": {
62
- "serviceOutput": {
63
- /**
64
- * 適用決済方法区分
65
- */
66
- "typeOf": "MGTicket"
67
- }
68
- }
69
- },
70
- {
71
- /**
72
- * 価格仕様タイプ
73
- */
74
- "typeOf": "CategoryCodeChargeSpecification",
75
- /**
76
- * 価格
77
- */
78
- "price": 0
79
- },
80
- {
81
- /**
82
- * 価格仕様タイプ
83
- */
84
- "typeOf": "UnitPriceSpecification",
85
- /**
86
- * 価格
87
- */
88
- "price": 300,
89
- /**
90
- * 単価基準数量
91
- */
92
- "referenceQuantity": {
93
- "typeOf": "QuantitativeValue",
94
- "value": 1,
95
- "unitCode": "C62"
96
- },
97
- /**
98
- * 適用アドオンオファー
99
- */
100
- "appliesToAddOn": []
101
- }
102
- ]
103
- },
104
- /**
105
- * 予約番号
106
- */
107
- "reservationNumber": "12345",
108
- "reservedTicket": {
109
- /**
110
- * チケットトークン(COAの場合のみ)
111
- */
112
- "ticketToken": "xxxxx"
113
- }
114
- }
115
- }
116
- ]
117
- },
118
- /**
119
- * 決済方法ID
120
- */
121
- "paymentMethodId": "648829745997954"
122
- }
123
- ],
124
- "typeOf": "PayAction"
125
- }
126
- }