@cinerino/sdk 10.22.0-alpha.2 → 11.0.0-alpha.0

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 (200) hide show
  1. package/example/playground/public/lib/bundle.js +8153 -6839
  2. package/lib/abstract/chevre/event.d.ts +1 -1
  3. package/lib/abstract/chevreAdmin/assetTransaction/cancelReservation.d.ts +0 -3
  4. package/lib/abstract/chevreAdmin/assetTransaction/cancelReservation.js +0 -12
  5. package/lib/abstract/chevreAdmin/authorization.d.ts +0 -4
  6. package/lib/abstract/chevreAdmin/authorization.js +0 -19
  7. package/lib/abstract/chevreAdmin/creativeWork.d.ts +1 -16
  8. package/lib/abstract/chevreAdmin/creativeWork.js +0 -89
  9. package/lib/abstract/chevreAdmin/customer.d.ts +1 -20
  10. package/lib/abstract/chevreAdmin/customer.js +0 -58
  11. package/lib/abstract/chevreAdmin/event.d.ts +0 -35
  12. package/lib/abstract/chevreAdmin/event.js +0 -82
  13. package/lib/abstract/chevreAdmin/eventSeries.d.ts +0 -60
  14. package/lib/abstract/chevreAdmin/eventSeries.js +0 -112
  15. package/lib/abstract/chevreAdmin/me.d.ts +0 -8
  16. package/lib/abstract/chevreAdmin/me.js +0 -18
  17. package/lib/abstract/chevreAdmin/member.d.ts +0 -14
  18. package/lib/abstract/chevreAdmin/member.js +0 -66
  19. package/lib/abstract/chevreAdmin/offer.d.ts +0 -12
  20. package/lib/abstract/chevreAdmin/offer.js +0 -39
  21. package/lib/abstract/chevreAdmin/offerCatalog.d.ts +0 -70
  22. package/lib/abstract/chevreAdmin/offerCatalog.js +0 -160
  23. package/lib/abstract/chevreAdmin/offerCatalogItem.d.ts +0 -40
  24. package/lib/abstract/chevreAdmin/offerCatalogItem.js +0 -98
  25. package/lib/abstract/chevreAdmin/order.d.ts +1 -79
  26. package/lib/abstract/chevreAdmin/order.js +0 -125
  27. package/lib/abstract/chevreAdmin/product.d.ts +0 -36
  28. package/lib/abstract/chevreAdmin/product.js +0 -129
  29. package/lib/abstract/chevreAdmin/reservation.d.ts +1 -10
  30. package/lib/abstract/chevreAdmin/reservation.js +0 -20
  31. package/lib/abstract/chevreAdmin.d.ts +0 -504
  32. package/lib/abstract/chevreAdmin.js +60 -1177
  33. package/lib/abstract/chevreConsole/authorization.d.ts +72 -0
  34. package/lib/abstract/chevreConsole/authorization.js +86 -0
  35. package/lib/abstract/chevreConsole/creativeWork.d.ts +22 -0
  36. package/lib/abstract/chevreConsole/creativeWork.js +156 -0
  37. package/lib/abstract/chevreConsole/customer.d.ts +31 -0
  38. package/lib/abstract/chevreConsole/customer.js +125 -0
  39. package/lib/abstract/chevreConsole/event.d.ts +43 -0
  40. package/lib/abstract/chevreConsole/event.js +149 -0
  41. package/lib/abstract/chevreConsole/eventSeries.d.ts +67 -0
  42. package/lib/abstract/chevreConsole/eventSeries.js +180 -0
  43. package/lib/abstract/chevreConsole/me.d.ts +28 -0
  44. package/lib/abstract/chevreConsole/me.js +124 -0
  45. package/lib/abstract/chevreConsole/member.d.ts +22 -0
  46. package/lib/abstract/chevreConsole/member.js +134 -0
  47. package/lib/abstract/chevreConsole/offer.d.ts +34 -0
  48. package/lib/abstract/chevreConsole/offer.js +125 -0
  49. package/lib/abstract/chevreConsole/offerCatalog.d.ts +77 -0
  50. package/lib/abstract/chevreConsole/offerCatalog.js +227 -0
  51. package/lib/abstract/chevreConsole/offerCatalogItem.d.ts +63 -0
  52. package/lib/abstract/chevreConsole/offerCatalogItem.js +181 -0
  53. package/lib/abstract/chevreConsole/order.d.ts +86 -0
  54. package/lib/abstract/chevreConsole/order.js +192 -0
  55. package/lib/abstract/chevreConsole/product.d.ts +45 -0
  56. package/lib/abstract/chevreConsole/product.js +196 -0
  57. package/lib/abstract/chevreConsole/reservation.d.ts +15 -0
  58. package/lib/abstract/chevreConsole/reservation.js +87 -0
  59. package/lib/abstract/chevreConsole.d.ts +634 -0
  60. package/lib/abstract/chevreConsole.js +1445 -0
  61. package/lib/abstract/cinerino/service/event.d.ts +1 -1
  62. package/lib/abstract/cloud/admin/order.d.ts +1 -1
  63. package/lib/abstract/cloud/admin/reservation.d.ts +1 -1
  64. package/lib/abstract/index.d.ts +3 -1
  65. package/lib/abstract/index.js +24 -1
  66. package/lib/bundle.js +8191 -6877
  67. package/lib/index.d.ts +2 -2
  68. package/lib/index.js +2 -1
  69. package/package.json +1 -1
  70. package/example/src/chevre/adminMovies.ts +0 -45
  71. package/example/src/chevre/adminProjectHasMerchantReturnPolicy.ts +0 -30
  72. package/example/src/chevre/adminSearchIssuers.ts +0 -32
  73. package/example/src/chevre/adminSearchSellers.ts +0 -32
  74. package/example/src/chevre/adminSearchTickets.ts +0 -32
  75. package/example/src/chevre/assetTransaction/processMoneyTransfer.ts +0 -74
  76. package/example/src/chevre/assetTransaction/processRegisterService.ts +0 -70
  77. package/example/src/chevre/assetTransaction/processReserve.ts +0 -193
  78. package/example/src/chevre/findPerson.ts +0 -33
  79. package/example/src/chevre/searchMessages.ts +0 -34
  80. package/example/src/chevre/searchTransactions.ts +0 -36
  81. /package/lib/abstract/{chevreAdmin → chevreConsole}/account.d.ts +0 -0
  82. /package/lib/abstract/{chevreAdmin → chevreConsole}/account.js +0 -0
  83. /package/lib/abstract/{chevreAdmin → chevreConsole}/accountTitle.d.ts +0 -0
  84. /package/lib/abstract/{chevreAdmin → chevreConsole}/accountTitle.js +0 -0
  85. /package/lib/abstract/{chevreAdmin → chevreConsole}/accountTransaction.d.ts +0 -0
  86. /package/lib/abstract/{chevreAdmin → chevreConsole}/accountTransaction.js +0 -0
  87. /package/lib/abstract/{chevreAdmin → chevreConsole}/accountingReport.d.ts +0 -0
  88. /package/lib/abstract/{chevreAdmin → chevreConsole}/accountingReport.js +0 -0
  89. /package/lib/abstract/{chevreAdmin → chevreConsole}/action.d.ts +0 -0
  90. /package/lib/abstract/{chevreAdmin → chevreConsole}/action.js +0 -0
  91. /package/lib/abstract/{chevreAdmin → chevreConsole}/additionalProperty.d.ts +0 -0
  92. /package/lib/abstract/{chevreAdmin → chevreConsole}/additionalProperty.js +0 -0
  93. /package/lib/abstract/{chevreAdmin → chevreConsole}/advanceBookingRequirement.d.ts +0 -0
  94. /package/lib/abstract/{chevreAdmin → chevreConsole}/advanceBookingRequirement.js +0 -0
  95. /package/lib/abstract/{chevreAdmin → chevreConsole}/aggregateOffer.d.ts +0 -0
  96. /package/lib/abstract/{chevreAdmin → chevreConsole}/aggregateOffer.js +0 -0
  97. /package/lib/abstract/{chevreAdmin → chevreConsole}/aggregateReservation.d.ts +0 -0
  98. /package/lib/abstract/{chevreAdmin → chevreConsole}/aggregateReservation.js +0 -0
  99. /package/lib/abstract/{chevreAdmin → chevreConsole}/aggregation.d.ts +0 -0
  100. /package/lib/abstract/{chevreAdmin → chevreConsole}/aggregation.js +0 -0
  101. /package/lib/abstract/{chevreAdmin → chevreConsole}/assetTransaction/moneyTransfer.d.ts +0 -0
  102. /package/lib/abstract/{chevreAdmin → chevreConsole}/assetTransaction/moneyTransfer.js +0 -0
  103. /package/lib/abstract/{chevreAdmin → chevreConsole}/assetTransaction/pay.d.ts +0 -0
  104. /package/lib/abstract/{chevreAdmin → chevreConsole}/assetTransaction/pay.js +0 -0
  105. /package/lib/abstract/{chevreAdmin → chevreConsole}/assetTransaction/registerService.d.ts +0 -0
  106. /package/lib/abstract/{chevreAdmin → chevreConsole}/assetTransaction/registerService.js +0 -0
  107. /package/lib/abstract/{chevreAdmin → chevreConsole}/assetTransaction/reserve.d.ts +0 -0
  108. /package/lib/abstract/{chevreAdmin → chevreConsole}/assetTransaction/reserve.js +0 -0
  109. /package/lib/abstract/{chevreAdmin → chevreConsole}/assetTransaction.d.ts +0 -0
  110. /package/lib/abstract/{chevreAdmin → chevreConsole}/assetTransaction.js +0 -0
  111. /package/lib/abstract/{chevreAdmin → chevreConsole}/categoryCode.d.ts +0 -0
  112. /package/lib/abstract/{chevreAdmin → chevreConsole}/categoryCode.js +0 -0
  113. /package/lib/abstract/{chevreAdmin → chevreConsole}/comment.d.ts +0 -0
  114. /package/lib/abstract/{chevreAdmin → chevreConsole}/comment.js +0 -0
  115. /package/lib/abstract/{chevreAdmin → chevreConsole}/customerType.d.ts +0 -0
  116. /package/lib/abstract/{chevreAdmin → chevreConsole}/customerType.js +0 -0
  117. /package/lib/abstract/{chevreAdmin → chevreConsole}/emailMessage.d.ts +0 -0
  118. /package/lib/abstract/{chevreAdmin → chevreConsole}/emailMessage.js +0 -0
  119. /package/lib/abstract/{chevreAdmin → chevreConsole}/event/factory.d.ts +0 -0
  120. /package/lib/abstract/{chevreAdmin → chevreConsole}/event/factory.js +0 -0
  121. /package/lib/abstract/{chevreAdmin → chevreConsole}/eventOffer.d.ts +0 -0
  122. /package/lib/abstract/{chevreAdmin → chevreConsole}/eventOffer.js +0 -0
  123. /package/lib/abstract/{chevreAdmin → chevreConsole}/hasMerchantReturnPolicy.d.ts +0 -0
  124. /package/lib/abstract/{chevreAdmin → chevreConsole}/hasMerchantReturnPolicy.js +0 -0
  125. /package/lib/abstract/{chevreAdmin → chevreConsole}/iam.d.ts +0 -0
  126. /package/lib/abstract/{chevreAdmin → chevreConsole}/iam.js +0 -0
  127. /package/lib/abstract/{chevreAdmin → chevreConsole}/identity.d.ts +0 -0
  128. /package/lib/abstract/{chevreAdmin → chevreConsole}/identity.js +0 -0
  129. /package/lib/abstract/{chevreAdmin → chevreConsole}/identityProvider.d.ts +0 -0
  130. /package/lib/abstract/{chevreAdmin → chevreConsole}/identityProvider.js +0 -0
  131. /package/lib/abstract/{chevreAdmin → chevreConsole}/issuer.d.ts +0 -0
  132. /package/lib/abstract/{chevreAdmin → chevreConsole}/issuer.js +0 -0
  133. /package/lib/abstract/{chevreAdmin → chevreConsole}/memberProgram.d.ts +0 -0
  134. /package/lib/abstract/{chevreAdmin → chevreConsole}/memberProgram.js +0 -0
  135. /package/lib/abstract/{chevreAdmin → chevreConsole}/merchantReturnPolicy.d.ts +0 -0
  136. /package/lib/abstract/{chevreAdmin → chevreConsole}/merchantReturnPolicy.js +0 -0
  137. /package/lib/abstract/{chevreAdmin → chevreConsole}/message.d.ts +0 -0
  138. /package/lib/abstract/{chevreAdmin → chevreConsole}/message.js +0 -0
  139. /package/lib/abstract/{chevreAdmin → chevreConsole}/offerItemCondition.d.ts +0 -0
  140. /package/lib/abstract/{chevreAdmin → chevreConsole}/offerItemCondition.js +0 -0
  141. /package/lib/abstract/{chevreAdmin → chevreConsole}/order/factory.d.ts +0 -0
  142. /package/lib/abstract/{chevreAdmin → chevreConsole}/order/factory.js +0 -0
  143. /package/lib/abstract/{chevreAdmin → chevreConsole}/ownershipInfo.d.ts +0 -0
  144. /package/lib/abstract/{chevreAdmin → chevreConsole}/ownershipInfo.js +0 -0
  145. /package/lib/abstract/{chevreAdmin → chevreConsole}/paymentService.d.ts +0 -0
  146. /package/lib/abstract/{chevreAdmin → chevreConsole}/paymentService.js +0 -0
  147. /package/lib/abstract/{chevreAdmin → chevreConsole}/paymentServiceChannel.d.ts +0 -0
  148. /package/lib/abstract/{chevreAdmin → chevreConsole}/paymentServiceChannel.js +0 -0
  149. /package/lib/abstract/{chevreAdmin → chevreConsole}/pendingReservation.d.ts +0 -0
  150. /package/lib/abstract/{chevreAdmin → chevreConsole}/pendingReservation.js +0 -0
  151. /package/lib/abstract/{chevreAdmin → chevreConsole}/permission.d.ts +0 -0
  152. /package/lib/abstract/{chevreAdmin → chevreConsole}/permission.js +0 -0
  153. /package/lib/abstract/{chevreAdmin → chevreConsole}/permit.d.ts +0 -0
  154. /package/lib/abstract/{chevreAdmin → chevreConsole}/permit.js +0 -0
  155. /package/lib/abstract/{chevreAdmin → chevreConsole}/person/ownershipInfo.d.ts +0 -0
  156. /package/lib/abstract/{chevreAdmin → chevreConsole}/person/ownershipInfo.js +0 -0
  157. /package/lib/abstract/{chevreAdmin → chevreConsole}/person.d.ts +0 -0
  158. /package/lib/abstract/{chevreAdmin → chevreConsole}/person.js +0 -0
  159. /package/lib/abstract/{chevreAdmin → chevreConsole}/place/hasPOS.d.ts +0 -0
  160. /package/lib/abstract/{chevreAdmin → chevreConsole}/place/hasPOS.js +0 -0
  161. /package/lib/abstract/{chevreAdmin → chevreConsole}/place.d.ts +0 -0
  162. /package/lib/abstract/{chevreAdmin → chevreConsole}/place.js +0 -0
  163. /package/lib/abstract/{chevreAdmin → chevreConsole}/priceSpecification.d.ts +0 -0
  164. /package/lib/abstract/{chevreAdmin → chevreConsole}/priceSpecification.js +0 -0
  165. /package/lib/abstract/{chevreAdmin → chevreConsole}/productModel.d.ts +0 -0
  166. /package/lib/abstract/{chevreAdmin → chevreConsole}/productModel.js +0 -0
  167. /package/lib/abstract/{chevreAdmin → chevreConsole}/project.d.ts +0 -0
  168. /package/lib/abstract/{chevreAdmin → chevreConsole}/project.js +0 -0
  169. /package/lib/abstract/{chevreAdmin → chevreConsole}/projectMakesOffer.d.ts +0 -0
  170. /package/lib/abstract/{chevreAdmin → chevreConsole}/projectMakesOffer.js +0 -0
  171. /package/lib/abstract/{chevreAdmin → chevreConsole}/reservation/factory.d.ts +0 -0
  172. /package/lib/abstract/{chevreAdmin → chevreConsole}/reservation/factory.js +0 -0
  173. /package/lib/abstract/{chevreAdmin → chevreConsole}/seller/factory.d.ts +0 -0
  174. /package/lib/abstract/{chevreAdmin → chevreConsole}/seller/factory.js +0 -0
  175. /package/lib/abstract/{chevreAdmin → chevreConsole}/seller.d.ts +0 -0
  176. /package/lib/abstract/{chevreAdmin → chevreConsole}/seller.js +0 -0
  177. /package/lib/abstract/{chevreAdmin → chevreConsole}/sellerReturnPolicy.d.ts +0 -0
  178. /package/lib/abstract/{chevreAdmin → chevreConsole}/sellerReturnPolicy.js +0 -0
  179. /package/lib/abstract/{chevreAdmin → chevreConsole}/task.d.ts +0 -0
  180. /package/lib/abstract/{chevreAdmin → chevreConsole}/task.js +0 -0
  181. /package/lib/abstract/{chevreAdmin → chevreConsole}/ticket.d.ts +0 -0
  182. /package/lib/abstract/{chevreAdmin → chevreConsole}/ticket.js +0 -0
  183. /package/lib/abstract/{chevreAdmin → chevreConsole}/token.d.ts +0 -0
  184. /package/lib/abstract/{chevreAdmin → chevreConsole}/token.js +0 -0
  185. /package/lib/abstract/{chevreAdmin → chevreConsole}/transaction/moneyTransfer.d.ts +0 -0
  186. /package/lib/abstract/{chevreAdmin → chevreConsole}/transaction/moneyTransfer.js +0 -0
  187. /package/lib/abstract/{chevreAdmin → chevreConsole}/transaction/placeOrder.d.ts +0 -0
  188. /package/lib/abstract/{chevreAdmin → chevreConsole}/transaction/placeOrder.js +0 -0
  189. /package/lib/abstract/{chevreAdmin → chevreConsole}/transaction/returnOrder.d.ts +0 -0
  190. /package/lib/abstract/{chevreAdmin → chevreConsole}/transaction/returnOrder.js +0 -0
  191. /package/lib/abstract/{chevreAdmin → chevreConsole}/transaction.d.ts +0 -0
  192. /package/lib/abstract/{chevreAdmin → chevreConsole}/transaction.js +0 -0
  193. /package/lib/abstract/{chevreAdmin → chevreConsole}/transactionNumber.d.ts +0 -0
  194. /package/lib/abstract/{chevreAdmin → chevreConsole}/transactionNumber.js +0 -0
  195. /package/lib/abstract/{chevreAdmin → chevreConsole}/trip.d.ts +0 -0
  196. /package/lib/abstract/{chevreAdmin → chevreConsole}/trip.js +0 -0
  197. /package/lib/abstract/{chevreAdmin → chevreConsole}/userPool.d.ts +0 -0
  198. /package/lib/abstract/{chevreAdmin → chevreConsole}/userPool.js +0 -0
  199. /package/lib/abstract/{chevreAdmin → chevreConsole}/webSite.d.ts +0 -0
  200. /package/lib/abstract/{chevreAdmin → chevreConsole}/webSite.js +0 -0
@@ -0,0 +1,181 @@
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
17
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
18
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
19
+ return new (P || (P = Promise))(function (resolve, reject) {
20
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
21
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
22
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
23
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
24
+ });
25
+ };
26
+ var __generator = (this && this.__generator) || function (thisArg, body) {
27
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
28
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
29
+ function verb(n) { return function (v) { return step([n, v]); }; }
30
+ function step(op) {
31
+ if (f) throw new TypeError("Generator is already executing.");
32
+ while (_) try {
33
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
34
+ if (y = 0, t) op = [op[0] & 2, t.value];
35
+ switch (op[0]) {
36
+ case 0: case 1: t = op; break;
37
+ case 4: _.label++; return { value: op[1], done: false };
38
+ case 5: _.label++; y = op[1]; op = [0]; continue;
39
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
40
+ default:
41
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
42
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
43
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
44
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
45
+ if (t[2]) _.ops.pop();
46
+ _.trys.pop(); continue;
47
+ }
48
+ op = body.call(thisArg, _);
49
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
50
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
51
+ }
52
+ };
53
+ var __rest = (this && this.__rest) || function (s, e) {
54
+ var t = {};
55
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
56
+ t[p] = s[p];
57
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
58
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
59
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
60
+ t[p[i]] = s[p[i]];
61
+ }
62
+ return t;
63
+ };
64
+ Object.defineProperty(exports, "__esModule", { value: true });
65
+ exports.OfferCatalogItemService = void 0;
66
+ var http_status_1 = require("http-status");
67
+ var service_1 = require("../service");
68
+ /**
69
+ * サブカタログサービス
70
+ */
71
+ var OfferCatalogItemService = /** @class */ (function (_super) {
72
+ __extends(OfferCatalogItemService, _super);
73
+ function OfferCatalogItemService() {
74
+ return _super !== null && _super.apply(this, arguments) || this;
75
+ }
76
+ OfferCatalogItemService.prototype.create = function (params) {
77
+ return __awaiter(this, void 0, void 0, function () {
78
+ var _this = this;
79
+ return __generator(this, function (_a) {
80
+ return [2 /*return*/, this.fetch({
81
+ uri: '/offerCatalogItems',
82
+ method: 'POST',
83
+ body: params,
84
+ expectedStatusCodes: [http_status_1.CREATED]
85
+ })
86
+ .then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
87
+ return [2 /*return*/, response.json()];
88
+ }); }); })];
89
+ });
90
+ });
91
+ };
92
+ OfferCatalogItemService.prototype.search = function (params) {
93
+ return __awaiter(this, void 0, void 0, function () {
94
+ var _this = this;
95
+ return __generator(this, function (_a) {
96
+ return [2 /*return*/, this.fetch({
97
+ uri: '/offerCatalogItems',
98
+ method: 'GET',
99
+ qs: params,
100
+ expectedStatusCodes: [http_status_1.OK]
101
+ })
102
+ .then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
103
+ return [2 /*return*/, response.json()];
104
+ }); }); })];
105
+ });
106
+ });
107
+ };
108
+ OfferCatalogItemService.prototype.update = function (params) {
109
+ return __awaiter(this, void 0, void 0, function () {
110
+ return __generator(this, function (_a) {
111
+ switch (_a.label) {
112
+ case 0: return [4 /*yield*/, this.fetch({
113
+ uri: "/offerCatalogItems/" + encodeURIComponent(String(params.id)),
114
+ method: 'PUT',
115
+ body: params,
116
+ expectedStatusCodes: [http_status_1.NO_CONTENT]
117
+ })];
118
+ case 1:
119
+ _a.sent();
120
+ return [2 /*return*/];
121
+ }
122
+ });
123
+ });
124
+ };
125
+ /**
126
+ * サブカタログ複数編集
127
+ */
128
+ OfferCatalogItemService.prototype.updateMany = function (params) {
129
+ return __awaiter(this, void 0, void 0, function () {
130
+ return __generator(this, function (_a) {
131
+ switch (_a.label) {
132
+ case 0: return [4 /*yield*/, this.fetch({
133
+ uri: "/offerCatalogItems",
134
+ method: 'PATCH',
135
+ body: params,
136
+ expectedStatusCodes: [http_status_1.NO_CONTENT]
137
+ })];
138
+ case 1:
139
+ _a.sent();
140
+ return [2 /*return*/];
141
+ }
142
+ });
143
+ });
144
+ };
145
+ OfferCatalogItemService.prototype.deleteById = function (params) {
146
+ return __awaiter(this, void 0, void 0, function () {
147
+ return __generator(this, function (_a) {
148
+ switch (_a.label) {
149
+ case 0: return [4 /*yield*/, this.fetch({
150
+ uri: "/offerCatalogItems/" + encodeURIComponent(String(params.id)),
151
+ method: 'DELETE',
152
+ expectedStatusCodes: [http_status_1.NO_CONTENT]
153
+ })];
154
+ case 1:
155
+ _a.sent();
156
+ return [2 /*return*/];
157
+ }
158
+ });
159
+ });
160
+ };
161
+ OfferCatalogItemService.prototype.searchItemListElement = function (params) {
162
+ return __awaiter(this, void 0, void 0, function () {
163
+ var id, query;
164
+ var _this = this;
165
+ return __generator(this, function (_a) {
166
+ id = params.id, query = __rest(params, ["id"]);
167
+ return [2 /*return*/, this.fetch({
168
+ uri: "/offerCatalogItems/" + encodeURIComponent(String(id)) + "/itemListElement",
169
+ method: 'GET',
170
+ qs: query,
171
+ expectedStatusCodes: [http_status_1.OK]
172
+ })
173
+ .then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
174
+ return [2 /*return*/, response.json()];
175
+ }); }); })];
176
+ });
177
+ });
178
+ };
179
+ return OfferCatalogItemService;
180
+ }(service_1.Service));
181
+ exports.OfferCatalogItemService = OfferCatalogItemService;
@@ -0,0 +1,86 @@
1
+ import * as factory from '../factory';
2
+ import { Service } from '../service';
3
+ import { IExternalOrder } from './order/factory';
4
+ /**
5
+ * 注文サービス
6
+ */
7
+ export declare class OrderService extends Service {
8
+ /**
9
+ * 取引なしに作成する
10
+ */
11
+ createWithoutTransaction(params: IExternalOrder): Promise<IExternalOrder>;
12
+ /**
13
+ * 決済取引確定
14
+ */
15
+ confirmPayTransaction(params: {
16
+ object: {
17
+ transactionNumber: string;
18
+ object: {
19
+ paymentMethod: {
20
+ identifier: string;
21
+ };
22
+ };
23
+ };
24
+ purpose: {
25
+ /**
26
+ * 確認番号
27
+ */
28
+ confirmationNumber: string;
29
+ /**
30
+ * 注文番号
31
+ */
32
+ orderNumber: string;
33
+ };
34
+ }): Promise<void>;
35
+ /**
36
+ * 決済取引中止
37
+ */
38
+ voidPayTransaction(params: {
39
+ object: {
40
+ transactionNumber: string;
41
+ };
42
+ purpose: {
43
+ /**
44
+ * 確認番号
45
+ */
46
+ confirmationNumber: string;
47
+ /**
48
+ * 注文番号
49
+ */
50
+ orderNumber: string;
51
+ };
52
+ }): Promise<void>;
53
+ /**
54
+ * 注文を処理する
55
+ */
56
+ processOrder(params: {
57
+ object: {
58
+ /**
59
+ * 確認番号
60
+ */
61
+ confirmationNumber: string;
62
+ /**
63
+ * 注文番号
64
+ */
65
+ orderNumber: string;
66
+ };
67
+ }): Promise<void>;
68
+ /**
69
+ * 返品
70
+ */
71
+ returnOrder(params: {
72
+ orderNumber: string;
73
+ dateReturned: Date;
74
+ returner: factory.order.IReturner;
75
+ }): Promise<void>;
76
+ /**
77
+ * 注文に対するアクションを検索する
78
+ */
79
+ searchActionsByOrderNumber(params: {
80
+ /**
81
+ * 注文番号
82
+ */
83
+ orderNumber: string;
84
+ sort: factory.action.ISortOrder;
85
+ }): Promise<factory.action.IAction<factory.action.IAttributes<factory.actionType, any, any>>[]>;
86
+ }
@@ -0,0 +1,192 @@
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
17
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
18
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
19
+ return new (P || (P = Promise))(function (resolve, reject) {
20
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
21
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
22
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
23
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
24
+ });
25
+ };
26
+ var __generator = (this && this.__generator) || function (thisArg, body) {
27
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
28
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
29
+ function verb(n) { return function (v) { return step([n, v]); }; }
30
+ function step(op) {
31
+ if (f) throw new TypeError("Generator is already executing.");
32
+ while (_) try {
33
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
34
+ if (y = 0, t) op = [op[0] & 2, t.value];
35
+ switch (op[0]) {
36
+ case 0: case 1: t = op; break;
37
+ case 4: _.label++; return { value: op[1], done: false };
38
+ case 5: _.label++; y = op[1]; op = [0]; continue;
39
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
40
+ default:
41
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
42
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
43
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
44
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
45
+ if (t[2]) _.ops.pop();
46
+ _.trys.pop(); continue;
47
+ }
48
+ op = body.call(thisArg, _);
49
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
50
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
51
+ }
52
+ };
53
+ Object.defineProperty(exports, "__esModule", { value: true });
54
+ exports.OrderService = void 0;
55
+ var http_status_1 = require("http-status");
56
+ var factory = require("../factory");
57
+ var service_1 = require("../service");
58
+ /**
59
+ * 注文サービス
60
+ */
61
+ var OrderService = /** @class */ (function (_super) {
62
+ __extends(OrderService, _super);
63
+ function OrderService() {
64
+ return _super !== null && _super.apply(this, arguments) || this;
65
+ }
66
+ /**
67
+ * 取引なしに作成する
68
+ */
69
+ OrderService.prototype.createWithoutTransaction = function (params) {
70
+ return __awaiter(this, void 0, void 0, function () {
71
+ var _this = this;
72
+ return __generator(this, function (_a) {
73
+ return [2 /*return*/, this.fetch({
74
+ uri: "/orders",
75
+ method: 'POST',
76
+ body: params,
77
+ expectedStatusCodes: [http_status_1.CREATED]
78
+ })
79
+ .then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
80
+ return [2 /*return*/, response.json()];
81
+ }); }); })];
82
+ });
83
+ });
84
+ };
85
+ /**
86
+ * 決済取引確定
87
+ */
88
+ OrderService.prototype.confirmPayTransaction = function (params) {
89
+ return __awaiter(this, void 0, void 0, function () {
90
+ return __generator(this, function (_a) {
91
+ switch (_a.label) {
92
+ case 0: return [4 /*yield*/, this.fetch({
93
+ uri: "/orders/" + params.purpose.orderNumber + "/confirmPayTransaction",
94
+ method: 'PUT',
95
+ body: params,
96
+ expectedStatusCodes: [http_status_1.NO_CONTENT]
97
+ })];
98
+ case 1:
99
+ _a.sent();
100
+ return [2 /*return*/];
101
+ }
102
+ });
103
+ });
104
+ };
105
+ /**
106
+ * 決済取引中止
107
+ */
108
+ OrderService.prototype.voidPayTransaction = function (params) {
109
+ return __awaiter(this, void 0, void 0, function () {
110
+ return __generator(this, function (_a) {
111
+ switch (_a.label) {
112
+ case 0: return [4 /*yield*/, this.fetch({
113
+ uri: "/orders/" + params.purpose.orderNumber + "/voidPayTransaction",
114
+ method: 'PUT',
115
+ body: params,
116
+ expectedStatusCodes: [http_status_1.NO_CONTENT]
117
+ })];
118
+ case 1:
119
+ _a.sent();
120
+ return [2 /*return*/];
121
+ }
122
+ });
123
+ });
124
+ };
125
+ /**
126
+ * 注文を処理する
127
+ */
128
+ OrderService.prototype.processOrder = function (params) {
129
+ return __awaiter(this, void 0, void 0, function () {
130
+ var _a, confirmationNumber, orderNumber;
131
+ return __generator(this, function (_b) {
132
+ switch (_b.label) {
133
+ case 0:
134
+ _a = params.object, confirmationNumber = _a.confirmationNumber, orderNumber = _a.orderNumber;
135
+ return [4 /*yield*/, this.fetch({
136
+ uri: "/orders/" + orderNumber + "/processOrder",
137
+ method: 'POST',
138
+ body: { confirmationNumber: confirmationNumber },
139
+ expectedStatusCodes: [http_status_1.NO_CONTENT]
140
+ })];
141
+ case 1:
142
+ _b.sent();
143
+ return [2 /*return*/];
144
+ }
145
+ });
146
+ });
147
+ };
148
+ /**
149
+ * 返品
150
+ */
151
+ OrderService.prototype.returnOrder = function (params) {
152
+ return __awaiter(this, void 0, void 0, function () {
153
+ var dateReturned, orderNumber, returner;
154
+ return __generator(this, function (_a) {
155
+ switch (_a.label) {
156
+ case 0:
157
+ dateReturned = params.dateReturned, orderNumber = params.orderNumber, returner = params.returner;
158
+ return [4 /*yield*/, this.fetch({
159
+ uri: "/orders/" + orderNumber + "/" + factory.orderStatus.OrderReturned,
160
+ method: 'PUT',
161
+ body: { dateReturned: dateReturned, returner: returner },
162
+ expectedStatusCodes: [http_status_1.NO_CONTENT]
163
+ })];
164
+ case 1:
165
+ _a.sent();
166
+ return [2 /*return*/];
167
+ }
168
+ });
169
+ });
170
+ };
171
+ /**
172
+ * 注文に対するアクションを検索する
173
+ */
174
+ OrderService.prototype.searchActionsByOrderNumber = function (params) {
175
+ return __awaiter(this, void 0, void 0, function () {
176
+ var _this = this;
177
+ return __generator(this, function (_a) {
178
+ return [2 /*return*/, this.fetch({
179
+ uri: "/orders/" + params.orderNumber + "/actions",
180
+ method: 'GET',
181
+ qs: params,
182
+ expectedStatusCodes: [http_status_1.OK]
183
+ })
184
+ .then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
185
+ return [2 /*return*/, response.json()];
186
+ }); }); })];
187
+ });
188
+ });
189
+ };
190
+ return OrderService;
191
+ }(service_1.Service));
192
+ exports.OrderService = OrderService;
@@ -0,0 +1,45 @@
1
+ import * as factory from '../factory';
2
+ import { Service } from '../service';
3
+ export declare type IProductWithoutCredentials = Omit<factory.product.IProduct, 'availableChannel'>;
4
+ export declare type ISearchProductsResult = IProductWithoutCredentials;
5
+ declare type IKeyOfProjection = keyof factory.product.IProduct | '_id';
6
+ declare type IProjection = {
7
+ [key in IKeyOfProjection]?: 1;
8
+ };
9
+ /**
10
+ * プロダクトサービス
11
+ */
12
+ export declare class ProductService extends Service {
13
+ /**
14
+ * プロダクト作成
15
+ */
16
+ createProduct(params: factory.product.ICreateParams): Promise<{
17
+ id: string;
18
+ }>;
19
+ /**
20
+ * プロダクトタイプでなければ作成
21
+ */
22
+ createIfNotExist(params: factory.product.ICreateParams): Promise<{
23
+ id: string;
24
+ }>;
25
+ /**
26
+ * プロダクト検索
27
+ */
28
+ searchProducts(params: Omit<factory.product.ISearchConditions, 'project'> & {
29
+ $projection?: IProjection;
30
+ }): Promise<{
31
+ data: IProductWithoutCredentials[];
32
+ }>;
33
+ findProductById(params: {
34
+ id: string;
35
+ } & {
36
+ $projection?: IProjection;
37
+ }): Promise<factory.product.IProduct>;
38
+ updateProduct(params: factory.product.ICreateParams & {
39
+ id: string;
40
+ }): Promise<void>;
41
+ deleteProductById(params: {
42
+ id: string;
43
+ }): Promise<void>;
44
+ }
45
+ export {};