@cinerino/sdk 5.13.0-alpha.0 → 5.13.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.
@@ -1430,19 +1430,21 @@ var ReservationService = /** @class */ (function (_super) {
1430
1430
  });
1431
1431
  };
1432
1432
  /**
1433
- * 予約を使用する
1434
- * 注文コードから取得したトークンを利用して、予約に入場記録を追加します
1433
+ * 予約を使用する(入場する)
1435
1434
  */
1436
- ReservationService.prototype.useByToken = function (params) {
1435
+ ReservationService.prototype.useByTicket = function (params) {
1437
1436
  return __awaiter(this, void 0, void 0, function () {
1437
+ var instrument, location, object;
1438
1438
  return __generator(this, function (_a) {
1439
1439
  switch (_a.label) {
1440
- case 0: return [4 /*yield*/, this.fetch({
1441
- uri: '/reservations/use',
1442
- method: 'POST',
1443
- body: params,
1444
- expectedStatusCodes: [http_status_1.NO_CONTENT]
1445
- })];
1440
+ case 0:
1441
+ instrument = params.instrument, location = params.location, object = params.object;
1442
+ return [4 /*yield*/, this.fetch({
1443
+ uri: "/reservations/" + String(object === null || object === void 0 ? void 0 : object.id) + "/actions/use",
1444
+ method: 'POST',
1445
+ body: { instrument: instrument, location: location },
1446
+ expectedStatusCodes: [http_status_1.NO_CONTENT]
1447
+ })];
1446
1448
  case 1:
1447
1449
  _a.sent();
1448
1450
  return [2 /*return*/];
@@ -10721,6 +10723,29 @@ var ReservationService = /** @class */ (function (_super) {
10721
10723
  });
10722
10724
  });
10723
10725
  };
10726
+ /**
10727
+ * 予約を使用する(入場する)
10728
+ */
10729
+ ReservationService.prototype.useByTicket = function (params) {
10730
+ return __awaiter(this, void 0, void 0, function () {
10731
+ var instrument, location, object;
10732
+ return __generator(this, function (_a) {
10733
+ switch (_a.label) {
10734
+ case 0:
10735
+ instrument = params.instrument, location = params.location, object = params.object;
10736
+ return [4 /*yield*/, this.fetch({
10737
+ uri: "/reservations/" + String(object === null || object === void 0 ? void 0 : object.id) + "/actions/use",
10738
+ method: 'POST',
10739
+ body: { instrument: instrument, location: location },
10740
+ expectedStatusCodes: [http_status_1.NO_CONTENT]
10741
+ })];
10742
+ case 1:
10743
+ _a.sent();
10744
+ return [2 /*return*/];
10745
+ }
10746
+ });
10747
+ });
10748
+ };
10724
10749
  /**
10725
10750
  * 予約に対する使用アクション検索
10726
10751
  */
@@ -10750,33 +10775,6 @@ var ReservationService = /** @class */ (function (_super) {
10750
10775
  });
10751
10776
  });
10752
10777
  };
10753
- /**
10754
- * 予約を使用する(入場する)
10755
- */
10756
- ReservationService.prototype.use = function (params) {
10757
- return __awaiter(this, void 0, void 0, function () {
10758
- var _this = this;
10759
- return __generator(this, function (_a) {
10760
- return [2 /*return*/, this.fetch({
10761
- uri: "/reservations/eventReservation/screeningEvent/" + encodeURIComponent(String(params.object.id)) + "/attended",
10762
- method: 'PUT',
10763
- body: params,
10764
- expectedStatusCodes: [http_status_1.NO_CONTENT, http_status_1.OK]
10765
- })
10766
- .then(function (response) { return __awaiter(_this, void 0, void 0, function () {
10767
- return __generator(this, function (_a) {
10768
- if (response.status === http_status_1.OK) {
10769
- return [2 /*return*/, response.json()];
10770
- }
10771
- else {
10772
- return [2 /*return*/];
10773
- }
10774
- return [2 /*return*/];
10775
- });
10776
- }); })];
10777
- });
10778
- });
10779
- };
10780
10778
  return ReservationService;
10781
10779
  }(service_1.Service));
10782
10780
  exports.ReservationService = ReservationService;
@@ -1,6 +1,6 @@
1
1
  import { ITicket, IUseAction } from '../chevreAdmin/reservation/factory';
2
2
  import * as factory from '../factory';
3
- import { ISearchResult, Service } from '../service';
3
+ import { Service } from '../service';
4
4
  /**
5
5
  * 予約サービス
6
6
  */
@@ -33,42 +33,16 @@ export declare class ReservationService extends Service {
33
33
  };
34
34
  }): Promise<void>;
35
35
  /**
36
- * 予約を使用する
37
- * 注文コードから取得したトークンを利用して、予約に入場記録を追加します
38
- * @deprecated
39
- */
40
- useByToken(params: {
41
- object: {
42
- /**
43
- * 予約ID
44
- */
45
- id: string;
46
- };
47
- instrument: {
48
- /**
49
- * トークン
50
- * service.Token.getToken() にて取得したトークンを使用します
51
- */
52
- token: string;
53
- };
54
- location?: {
55
- /**
56
- * 入場ゲートコード
57
- */
58
- identifier?: string;
59
- };
60
- }): Promise<void>;
61
- /**
62
- * 予約に対する入場アクションを検索する
36
+ * 予約に対する使用アクション検索
63
37
  */
64
38
  searchUseActions(params: {
65
39
  object: {
66
40
  /**
67
41
  * 予約ID
68
42
  */
69
- id?: string;
43
+ id: string;
70
44
  };
71
- }): Promise<ISearchResult<IUseAction[]>>;
45
+ }): Promise<IUseAction[]>;
72
46
  /**
73
47
  * 予約取消
74
48
  * 再定義(2023-08-01~)
@@ -115,29 +115,7 @@ var ReservationService = /** @class */ (function (_super) {
115
115
  });
116
116
  };
117
117
  /**
118
- * 予約を使用する
119
- * 注文コードから取得したトークンを利用して、予約に入場記録を追加します
120
- * @deprecated
121
- */
122
- ReservationService.prototype.useByToken = function (params) {
123
- return __awaiter(this, void 0, void 0, function () {
124
- return __generator(this, function (_a) {
125
- switch (_a.label) {
126
- case 0: return [4 /*yield*/, this.fetch({
127
- uri: '/reservations/use',
128
- method: 'POST',
129
- body: params,
130
- expectedStatusCodes: [http_status_1.NO_CONTENT]
131
- })];
132
- case 1:
133
- _a.sent();
134
- return [2 /*return*/];
135
- }
136
- });
137
- });
138
- };
139
- /**
140
- * 予約に対する入場アクションを検索する
118
+ * 予約に対する使用アクション検索
141
119
  */
142
120
  ReservationService.prototype.searchUseActions = function (params) {
143
121
  return __awaiter(this, void 0, void 0, function () {
@@ -146,21 +124,12 @@ var ReservationService = /** @class */ (function (_super) {
146
124
  return [2 /*return*/, this.fetch({
147
125
  uri: "/reservations/" + String(params.object.id) + "/actions/use",
148
126
  method: 'GET',
149
- qs: params,
127
+ // qs: params,
150
128
  expectedStatusCodes: [http_status_1.OK]
151
129
  })
152
- .then(function (response) { return __awaiter(_this, void 0, void 0, function () {
153
- var _a;
154
- return __generator(this, function (_b) {
155
- switch (_b.label) {
156
- case 0:
157
- _a = {};
158
- return [4 /*yield*/, response.json()];
159
- case 1: return [2 /*return*/, (_a.data = _b.sent(),
160
- _a)];
161
- }
162
- });
163
- }); })];
130
+ .then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
131
+ return [2 /*return*/, response.json()];
132
+ }); }); })];
164
133
  });
165
134
  });
166
135
  };
@@ -3,9 +3,7 @@ import * as factory from '../../factory';
3
3
  * 予約使用アクション
4
4
  */
5
5
  export interface IUseAction {
6
- actionStatus: factory.actionStatusType;
7
6
  id: string;
8
- project: factory.project.IProject;
9
7
  startDate: Date;
10
8
  typeOf: factory.actionType.UseAction;
11
9
  location?: factory.action.consume.use.reservation.ILocation;
@@ -61,25 +61,6 @@ export declare class ReservationService extends Service {
61
61
  };
62
62
  startFrom?: Date;
63
63
  startThrough?: Date;
64
- } & {
65
- $projection?: {
66
- [key in keyof IUseAction]?: 0;
67
- };
68
- }): Promise<ISearchResult<IUseAction[]>>;
69
- /**
70
- * 予約を使用する(入場する)
71
- * @deprecated
72
- */
73
- use(params: {
74
- instrument?: {
75
- token?: string;
76
- };
77
- location?: {
78
- identifier?: string;
79
- };
80
- object: {
81
- id: string;
82
- };
83
- }): Promise<void | IUseActionResult>;
64
+ }): Promise<IUseAction[]>;
84
65
  }
85
66
  export {};
@@ -50,6 +50,17 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
50
50
  if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
51
51
  }
52
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
+ };
53
64
  Object.defineProperty(exports, "__esModule", { value: true });
54
65
  exports.ReservationService = void 0;
55
66
  var http_status_1 = require("http-status");
@@ -136,57 +147,28 @@ var ReservationService = /** @class */ (function (_super) {
136
147
  /**
137
148
  * 予約に対する使用アクション検索
138
149
  */
139
- ReservationService.prototype.searchUseActions = function (params) {
150
+ ReservationService.prototype.searchUseActions = function (params
151
+ // & {
152
+ // $projection?: {
153
+ // [key in keyof IUseAction]?: 0;
154
+ // };
155
+ // }
156
+ ) {
140
157
  var _a;
141
158
  return __awaiter(this, void 0, void 0, function () {
159
+ var object, queryParams;
142
160
  var _this = this;
143
161
  return __generator(this, function (_b) {
162
+ object = params.object, queryParams = __rest(params, ["object"]);
144
163
  return [2 /*return*/, this.fetch({
145
164
  uri: "/reservations/" + String((_a = params.object) === null || _a === void 0 ? void 0 : _a.id) + "/actions/use",
146
165
  method: 'GET',
147
- qs: params,
166
+ qs: queryParams,
148
167
  expectedStatusCodes: [http_status_1.OK]
149
168
  })
150
- .then(function (response) { return __awaiter(_this, void 0, void 0, function () {
151
- var _a;
152
- return __generator(this, function (_b) {
153
- switch (_b.label) {
154
- case 0:
155
- _a = {};
156
- return [4 /*yield*/, response.json()];
157
- case 1: return [2 /*return*/, (_a.data = _b.sent(),
158
- _a)];
159
- }
160
- });
161
- }); })];
162
- });
163
- });
164
- };
165
- /**
166
- * 予約を使用する(入場する)
167
- * @deprecated
168
- */
169
- ReservationService.prototype.use = function (params) {
170
- return __awaiter(this, void 0, void 0, function () {
171
- var _this = this;
172
- return __generator(this, function (_a) {
173
- return [2 /*return*/, this.fetch({
174
- uri: "/reservations/eventReservation/screeningEvent/" + encodeURIComponent(String(params.object.id)) + "/attended",
175
- method: 'PUT',
176
- body: params,
177
- expectedStatusCodes: [http_status_1.NO_CONTENT, http_status_1.OK]
178
- })
179
- .then(function (response) { return __awaiter(_this, void 0, void 0, function () {
180
- return __generator(this, function (_a) {
181
- if (response.status === http_status_1.OK) {
182
- return [2 /*return*/, response.json()];
183
- }
184
- else {
185
- return [2 /*return*/];
186
- }
187
- return [2 /*return*/];
188
- });
189
- }); })];
169
+ .then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
170
+ return [2 /*return*/, response.json()];
171
+ }); }); })];
190
172
  });
191
173
  });
192
174
  };
package/lib/bundle.js CHANGED
@@ -1453,29 +1453,7 @@ var ReservationService = /** @class */ (function (_super) {
1453
1453
  });
1454
1454
  };
1455
1455
  /**
1456
- * 予約を使用する
1457
- * 注文コードから取得したトークンを利用して、予約に入場記録を追加します
1458
- * @deprecated
1459
- */
1460
- ReservationService.prototype.useByToken = function (params) {
1461
- return __awaiter(this, void 0, void 0, function () {
1462
- return __generator(this, function (_a) {
1463
- switch (_a.label) {
1464
- case 0: return [4 /*yield*/, this.fetch({
1465
- uri: '/reservations/use',
1466
- method: 'POST',
1467
- body: params,
1468
- expectedStatusCodes: [http_status_1.NO_CONTENT]
1469
- })];
1470
- case 1:
1471
- _a.sent();
1472
- return [2 /*return*/];
1473
- }
1474
- });
1475
- });
1476
- };
1477
- /**
1478
- * 予約に対する入場アクションを検索する
1456
+ * 予約に対する使用アクション検索
1479
1457
  */
1480
1458
  ReservationService.prototype.searchUseActions = function (params) {
1481
1459
  return __awaiter(this, void 0, void 0, function () {
@@ -1484,21 +1462,12 @@ var ReservationService = /** @class */ (function (_super) {
1484
1462
  return [2 /*return*/, this.fetch({
1485
1463
  uri: "/reservations/" + String(params.object.id) + "/actions/use",
1486
1464
  method: 'GET',
1487
- qs: params,
1465
+ // qs: params,
1488
1466
  expectedStatusCodes: [http_status_1.OK]
1489
1467
  })
1490
- .then(function (response) { return __awaiter(_this, void 0, void 0, function () {
1491
- var _a;
1492
- return __generator(this, function (_b) {
1493
- switch (_b.label) {
1494
- case 0:
1495
- _a = {};
1496
- return [4 /*yield*/, response.json()];
1497
- case 1: return [2 /*return*/, (_a.data = _b.sent(),
1498
- _a)];
1499
- }
1500
- });
1501
- }); })];
1468
+ .then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
1469
+ return [2 /*return*/, response.json()];
1470
+ }); }); })];
1502
1471
  });
1503
1472
  });
1504
1473
  };
@@ -12686,6 +12655,17 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
12686
12655
  if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
12687
12656
  }
12688
12657
  };
12658
+ var __rest = (this && this.__rest) || function (s, e) {
12659
+ var t = {};
12660
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
12661
+ t[p] = s[p];
12662
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
12663
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
12664
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
12665
+ t[p[i]] = s[p[i]];
12666
+ }
12667
+ return t;
12668
+ };
12689
12669
  Object.defineProperty(exports, "__esModule", { value: true });
12690
12670
  exports.ReservationService = void 0;
12691
12671
  var http_status_1 = require("http-status");
@@ -12772,57 +12752,28 @@ var ReservationService = /** @class */ (function (_super) {
12772
12752
  /**
12773
12753
  * 予約に対する使用アクション検索
12774
12754
  */
12775
- ReservationService.prototype.searchUseActions = function (params) {
12755
+ ReservationService.prototype.searchUseActions = function (params
12756
+ // & {
12757
+ // $projection?: {
12758
+ // [key in keyof IUseAction]?: 0;
12759
+ // };
12760
+ // }
12761
+ ) {
12776
12762
  var _a;
12777
12763
  return __awaiter(this, void 0, void 0, function () {
12764
+ var object, queryParams;
12778
12765
  var _this = this;
12779
12766
  return __generator(this, function (_b) {
12767
+ object = params.object, queryParams = __rest(params, ["object"]);
12780
12768
  return [2 /*return*/, this.fetch({
12781
12769
  uri: "/reservations/" + String((_a = params.object) === null || _a === void 0 ? void 0 : _a.id) + "/actions/use",
12782
12770
  method: 'GET',
12783
- qs: params,
12771
+ qs: queryParams,
12784
12772
  expectedStatusCodes: [http_status_1.OK]
12785
12773
  })
12786
- .then(function (response) { return __awaiter(_this, void 0, void 0, function () {
12787
- var _a;
12788
- return __generator(this, function (_b) {
12789
- switch (_b.label) {
12790
- case 0:
12791
- _a = {};
12792
- return [4 /*yield*/, response.json()];
12793
- case 1: return [2 /*return*/, (_a.data = _b.sent(),
12794
- _a)];
12795
- }
12796
- });
12797
- }); })];
12798
- });
12799
- });
12800
- };
12801
- /**
12802
- * 予約を使用する(入場する)
12803
- * @deprecated
12804
- */
12805
- ReservationService.prototype.use = function (params) {
12806
- return __awaiter(this, void 0, void 0, function () {
12807
- var _this = this;
12808
- return __generator(this, function (_a) {
12809
- return [2 /*return*/, this.fetch({
12810
- uri: "/reservations/eventReservation/screeningEvent/" + encodeURIComponent(String(params.object.id)) + "/attended",
12811
- method: 'PUT',
12812
- body: params,
12813
- expectedStatusCodes: [http_status_1.NO_CONTENT, http_status_1.OK]
12814
- })
12815
- .then(function (response) { return __awaiter(_this, void 0, void 0, function () {
12816
- return __generator(this, function (_a) {
12817
- if (response.status === http_status_1.OK) {
12818
- return [2 /*return*/, response.json()];
12819
- }
12820
- else {
12821
- return [2 /*return*/];
12822
- }
12823
- return [2 /*return*/];
12824
- });
12825
- }); })];
12774
+ .then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
12775
+ return [2 /*return*/, response.json()];
12776
+ }); }); })];
12826
12777
  });
12827
12778
  });
12828
12779
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cinerino/sdk",
3
- "version": "5.13.0-alpha.0",
3
+ "version": "5.13.0-alpha.2",
4
4
  "description": "Cinerino SDK",
5
5
  "main": "./lib/index.js",
6
6
  "browser": {