@cinerino/sdk 10.9.0-alpha.2 → 10.9.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.
@@ -5049,14 +5049,17 @@ var EventService = /** @class */ (function (_super) {
5049
5049
  /**
5050
5050
  * イベント取得
5051
5051
  */
5052
- EventService.prototype.findById = function (params) {
5052
+ EventService.prototype.findEventById = function (params) {
5053
5053
  return __awaiter(this, void 0, void 0, function () {
5054
+ var id, typeOf;
5054
5055
  var _this = this;
5055
5056
  return __generator(this, function (_a) {
5057
+ id = params.id, typeOf = params.typeOf;
5056
5058
  return [2 /*return*/, this.fetch({
5057
- uri: "/events/" + encodeURIComponent(String(params.id)),
5059
+ uri: "/events/" + encodeURIComponent(String(id)),
5058
5060
  method: 'GET',
5059
- expectedStatusCodes: [http_status_1.OK]
5061
+ expectedStatusCodes: [http_status_1.OK],
5062
+ qs: { typeOf: typeOf }
5060
5063
  })
5061
5064
  .then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
5062
5065
  return [2 /*return*/, response.json()];
@@ -14692,6 +14695,7 @@ var __rest = (this && this.__rest) || function (s, e) {
14692
14695
  Object.defineProperty(exports, "__esModule", { value: true });
14693
14696
  exports.EventService = void 0;
14694
14697
  var http_status_1 = require("http-status");
14698
+ var factory = require("../factory");
14695
14699
  var service_1 = require("../service");
14696
14700
  /**
14697
14701
  * イベントサービス
@@ -14753,12 +14757,22 @@ var EventService = /** @class */ (function (_super) {
14753
14757
  */
14754
14758
  EventService.prototype.findById = function (params) {
14755
14759
  return __awaiter(this, void 0, void 0, function () {
14760
+ var id, typeOf;
14756
14761
  var _this = this;
14757
14762
  return __generator(this, function (_a) {
14763
+ id = params.id, typeOf = params.typeOf;
14764
+ if (![
14765
+ factory.eventType.Event,
14766
+ factory.eventType.ScreeningEvent,
14767
+ factory.eventType.ScreeningEventSeries
14768
+ ].includes(typeOf)) {
14769
+ throw new factory.errors.Argument('typeOf', 'invalid event type');
14770
+ }
14758
14771
  return [2 /*return*/, this.fetch({
14759
- uri: "/events/" + encodeURIComponent(String(params.id)),
14772
+ uri: "/events/" + encodeURIComponent(String(id)),
14760
14773
  method: 'GET',
14761
- expectedStatusCodes: [http_status_1.OK]
14774
+ expectedStatusCodes: [http_status_1.OK],
14775
+ qs: { typeOf: typeOf }
14762
14776
  })
14763
14777
  .then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
14764
14778
  return [2 /*return*/, response.json()];
@@ -14875,7 +14889,7 @@ var EventService = /** @class */ (function (_super) {
14875
14889
  }(service_1.Service));
14876
14890
  exports.EventService = EventService;
14877
14891
 
14878
- },{"../service":139,"http-status":372}],90:[function(require,module,exports){
14892
+ },{"../factory":134,"../service":139,"http-status":372}],90:[function(require,module,exports){
14879
14893
  "use strict";
14880
14894
  var __extends = (this && this.__extends) || (function () {
14881
14895
  var extendStatics = function (d, b) {
@@ -16090,6 +16104,7 @@ var __rest = (this && this.__rest) || function (s, e) {
16090
16104
  Object.defineProperty(exports, "__esModule", { value: true });
16091
16105
  exports.EventService = void 0;
16092
16106
  var http_status_1 = require("http-status");
16107
+ var factory = require("../../factory");
16093
16108
  var service_1 = require("../../service");
16094
16109
  /**
16095
16110
  * イベントサービス
@@ -16151,12 +16166,22 @@ var EventService = /** @class */ (function (_super) {
16151
16166
  */
16152
16167
  EventService.prototype.findById = function (params) {
16153
16168
  return __awaiter(this, void 0, void 0, function () {
16169
+ var id, typeOf;
16154
16170
  var _this = this;
16155
16171
  return __generator(this, function (_a) {
16172
+ id = params.id, typeOf = params.typeOf;
16173
+ if (![
16174
+ factory.eventType.Event,
16175
+ factory.eventType.ScreeningEvent,
16176
+ factory.eventType.ScreeningEventSeries
16177
+ ].includes(typeOf)) {
16178
+ throw new factory.errors.Argument('typeOf', 'invalid event type');
16179
+ }
16156
16180
  return [2 /*return*/, this.fetch({
16157
- uri: "/events/" + params.id,
16181
+ uri: "/events/" + encodeURIComponent(String(id)),
16158
16182
  method: 'GET',
16159
- expectedStatusCodes: [http_status_1.OK]
16183
+ expectedStatusCodes: [http_status_1.OK],
16184
+ qs: { typeOf: typeOf }
16160
16185
  })
16161
16186
  .then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
16162
16187
  return [2 /*return*/, response.json()];
@@ -16307,7 +16332,7 @@ var EventService = /** @class */ (function (_super) {
16307
16332
  }(service_1.Service));
16308
16333
  exports.EventService = EventService;
16309
16334
 
16310
- },{"../../service":139,"http-status":372}],100:[function(require,module,exports){
16335
+ },{"../../factory":134,"../../service":139,"http-status":372}],100:[function(require,module,exports){
16311
16336
  "use strict";
16312
16337
  var __extends = (this && this.__extends) || (function () {
16313
16338
  var extendStatics = function (d, b) {
@@ -30,6 +30,7 @@ export declare class EventService extends Service {
30
30
  */
31
31
  findById<T extends factory.eventType>(params: {
32
32
  id: string;
33
+ typeOf: T;
33
34
  }): Promise<ISearchedEvent<T>>;
34
35
  /**
35
36
  * 興行オファー検索
@@ -64,6 +64,7 @@ var __rest = (this && this.__rest) || function (s, e) {
64
64
  Object.defineProperty(exports, "__esModule", { value: true });
65
65
  exports.EventService = void 0;
66
66
  var http_status_1 = require("http-status");
67
+ var factory = require("../factory");
67
68
  var service_1 = require("../service");
68
69
  /**
69
70
  * イベントサービス
@@ -125,12 +126,22 @@ var EventService = /** @class */ (function (_super) {
125
126
  */
126
127
  EventService.prototype.findById = function (params) {
127
128
  return __awaiter(this, void 0, void 0, function () {
129
+ var id, typeOf;
128
130
  var _this = this;
129
131
  return __generator(this, function (_a) {
132
+ id = params.id, typeOf = params.typeOf;
133
+ if (![
134
+ factory.eventType.Event,
135
+ factory.eventType.ScreeningEvent,
136
+ factory.eventType.ScreeningEventSeries
137
+ ].includes(typeOf)) {
138
+ throw new factory.errors.Argument('typeOf', 'invalid event type');
139
+ }
130
140
  return [2 /*return*/, this.fetch({
131
- uri: "/events/" + encodeURIComponent(String(params.id)),
141
+ uri: "/events/" + encodeURIComponent(String(id)),
132
142
  method: 'GET',
133
- expectedStatusCodes: [http_status_1.OK]
143
+ expectedStatusCodes: [http_status_1.OK],
144
+ qs: { typeOf: typeOf }
134
145
  })
135
146
  .then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
136
147
  return [2 /*return*/, response.json()];
@@ -40,8 +40,9 @@ export declare class EventService extends Service {
40
40
  /**
41
41
  * イベント取得
42
42
  */
43
- findById<T extends factory.eventType>(params: {
43
+ findEventById<T extends factory.eventType.Event | factory.eventType.ScreeningEvent>(params: {
44
44
  id: string;
45
+ typeOf: T;
45
46
  }): Promise<ISearchedEvent<T>>;
46
47
  /**
47
48
  * イベント更新
@@ -146,14 +146,17 @@ var EventService = /** @class */ (function (_super) {
146
146
  /**
147
147
  * イベント取得
148
148
  */
149
- EventService.prototype.findById = function (params) {
149
+ EventService.prototype.findEventById = function (params) {
150
150
  return __awaiter(this, void 0, void 0, function () {
151
+ var id, typeOf;
151
152
  var _this = this;
152
153
  return __generator(this, function (_a) {
154
+ id = params.id, typeOf = params.typeOf;
153
155
  return [2 /*return*/, this.fetch({
154
- uri: "/events/" + encodeURIComponent(String(params.id)),
156
+ uri: "/events/" + encodeURIComponent(String(id)),
155
157
  method: 'GET',
156
- expectedStatusCodes: [http_status_1.OK]
158
+ expectedStatusCodes: [http_status_1.OK],
159
+ qs: { typeOf: typeOf }
157
160
  })
158
161
  .then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
159
162
  return [2 /*return*/, response.json()];
@@ -116,6 +116,11 @@ export declare class EventService extends Service {
116
116
  */
117
117
  findById<T extends factory.eventType>(params: {
118
118
  id: string;
119
+ /**
120
+ * イベントタイプ
121
+ * 興行イベント or 施設コンテンツ
122
+ */
123
+ typeOf: T;
119
124
  }): Promise<ISearchedEvent<T>>;
120
125
  /**
121
126
  * イベントに対する座席検索
@@ -75,6 +75,7 @@ var __rest = (this && this.__rest) || function (s, e) {
75
75
  Object.defineProperty(exports, "__esModule", { value: true });
76
76
  exports.EventService = void 0;
77
77
  var http_status_1 = require("http-status");
78
+ var factory = require("../../factory");
78
79
  var service_1 = require("../../service");
79
80
  /**
80
81
  * イベントサービス
@@ -136,12 +137,22 @@ var EventService = /** @class */ (function (_super) {
136
137
  */
137
138
  EventService.prototype.findById = function (params) {
138
139
  return __awaiter(this, void 0, void 0, function () {
140
+ var id, typeOf;
139
141
  var _this = this;
140
142
  return __generator(this, function (_a) {
143
+ id = params.id, typeOf = params.typeOf;
144
+ if (![
145
+ factory.eventType.Event,
146
+ factory.eventType.ScreeningEvent,
147
+ factory.eventType.ScreeningEventSeries
148
+ ].includes(typeOf)) {
149
+ throw new factory.errors.Argument('typeOf', 'invalid event type');
150
+ }
141
151
  return [2 /*return*/, this.fetch({
142
- uri: "/events/" + params.id,
152
+ uri: "/events/" + encodeURIComponent(String(id)),
143
153
  method: 'GET',
144
- expectedStatusCodes: [http_status_1.OK]
154
+ expectedStatusCodes: [http_status_1.OK],
155
+ qs: { typeOf: typeOf }
145
156
  })
146
157
  .then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
147
158
  return [2 /*return*/, response.json()];
package/lib/bundle.js CHANGED
@@ -621,6 +621,7 @@ var __rest = (this && this.__rest) || function (s, e) {
621
621
  Object.defineProperty(exports, "__esModule", { value: true });
622
622
  exports.EventService = void 0;
623
623
  var http_status_1 = require("http-status");
624
+ var factory = require("../factory");
624
625
  var service_1 = require("../service");
625
626
  /**
626
627
  * イベントサービス
@@ -682,12 +683,22 @@ var EventService = /** @class */ (function (_super) {
682
683
  */
683
684
  EventService.prototype.findById = function (params) {
684
685
  return __awaiter(this, void 0, void 0, function () {
686
+ var id, typeOf;
685
687
  var _this = this;
686
688
  return __generator(this, function (_a) {
689
+ id = params.id, typeOf = params.typeOf;
690
+ if (![
691
+ factory.eventType.Event,
692
+ factory.eventType.ScreeningEvent,
693
+ factory.eventType.ScreeningEventSeries
694
+ ].includes(typeOf)) {
695
+ throw new factory.errors.Argument('typeOf', 'invalid event type');
696
+ }
687
697
  return [2 /*return*/, this.fetch({
688
- uri: "/events/" + encodeURIComponent(String(params.id)),
698
+ uri: "/events/" + encodeURIComponent(String(id)),
689
699
  method: 'GET',
690
- expectedStatusCodes: [http_status_1.OK]
700
+ expectedStatusCodes: [http_status_1.OK],
701
+ qs: { typeOf: typeOf }
691
702
  })
692
703
  .then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
693
704
  return [2 /*return*/, response.json()];
@@ -804,7 +815,7 @@ var EventService = /** @class */ (function (_super) {
804
815
  }(service_1.Service));
805
816
  exports.EventService = EventService;
806
817
 
807
- },{"../service":139,"http-status":372}],8:[function(require,module,exports){
818
+ },{"../factory":134,"../service":139,"http-status":372}],8:[function(require,module,exports){
808
819
  "use strict";
809
820
  var __extends = (this && this.__extends) || (function () {
810
821
  var extendStatics = function (d, b) {
@@ -6258,14 +6269,17 @@ var EventService = /** @class */ (function (_super) {
6258
6269
  /**
6259
6270
  * イベント取得
6260
6271
  */
6261
- EventService.prototype.findById = function (params) {
6272
+ EventService.prototype.findEventById = function (params) {
6262
6273
  return __awaiter(this, void 0, void 0, function () {
6274
+ var id, typeOf;
6263
6275
  var _this = this;
6264
6276
  return __generator(this, function (_a) {
6277
+ id = params.id, typeOf = params.typeOf;
6265
6278
  return [2 /*return*/, this.fetch({
6266
- uri: "/events/" + encodeURIComponent(String(params.id)),
6279
+ uri: "/events/" + encodeURIComponent(String(id)),
6267
6280
  method: 'GET',
6268
- expectedStatusCodes: [http_status_1.OK]
6281
+ expectedStatusCodes: [http_status_1.OK],
6282
+ qs: { typeOf: typeOf }
6269
6283
  })
6270
6284
  .then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
6271
6285
  return [2 /*return*/, response.json()];
@@ -16090,6 +16104,7 @@ var __rest = (this && this.__rest) || function (s, e) {
16090
16104
  Object.defineProperty(exports, "__esModule", { value: true });
16091
16105
  exports.EventService = void 0;
16092
16106
  var http_status_1 = require("http-status");
16107
+ var factory = require("../../factory");
16093
16108
  var service_1 = require("../../service");
16094
16109
  /**
16095
16110
  * イベントサービス
@@ -16151,12 +16166,22 @@ var EventService = /** @class */ (function (_super) {
16151
16166
  */
16152
16167
  EventService.prototype.findById = function (params) {
16153
16168
  return __awaiter(this, void 0, void 0, function () {
16169
+ var id, typeOf;
16154
16170
  var _this = this;
16155
16171
  return __generator(this, function (_a) {
16172
+ id = params.id, typeOf = params.typeOf;
16173
+ if (![
16174
+ factory.eventType.Event,
16175
+ factory.eventType.ScreeningEvent,
16176
+ factory.eventType.ScreeningEventSeries
16177
+ ].includes(typeOf)) {
16178
+ throw new factory.errors.Argument('typeOf', 'invalid event type');
16179
+ }
16156
16180
  return [2 /*return*/, this.fetch({
16157
- uri: "/events/" + params.id,
16181
+ uri: "/events/" + encodeURIComponent(String(id)),
16158
16182
  method: 'GET',
16159
- expectedStatusCodes: [http_status_1.OK]
16183
+ expectedStatusCodes: [http_status_1.OK],
16184
+ qs: { typeOf: typeOf }
16160
16185
  })
16161
16186
  .then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
16162
16187
  return [2 /*return*/, response.json()];
@@ -16307,7 +16332,7 @@ var EventService = /** @class */ (function (_super) {
16307
16332
  }(service_1.Service));
16308
16333
  exports.EventService = EventService;
16309
16334
 
16310
- },{"../../service":139,"http-status":372}],100:[function(require,module,exports){
16335
+ },{"../../factory":134,"../../service":139,"http-status":372}],100:[function(require,module,exports){
16311
16336
  "use strict";
16312
16337
  var __extends = (this && this.__extends) || (function () {
16313
16338
  var extendStatics = function (d, b) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cinerino/sdk",
3
- "version": "10.9.0-alpha.2",
3
+ "version": "10.9.0",
4
4
  "description": "Cinerino SDK",
5
5
  "main": "./lib/index.js",
6
6
  "browser": {
@@ -92,7 +92,7 @@
92
92
  "watchify": "^3.11.1"
93
93
  },
94
94
  "dependencies": {
95
- "@chevre/factory": "4.383.0-alpha.2",
95
+ "@chevre/factory": "4.383.0",
96
96
  "debug": "3.2.7",
97
97
  "http-status": "1.7.4",
98
98
  "idtoken-verifier": "2.0.3",