@cinerino/sdk 3.33.0-alpha.0 → 3.33.0-alpha.4

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.
package/CHANGELOG.md CHANGED
@@ -8,6 +8,9 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/).
8
8
 
9
9
  ### Added
10
10
 
11
+ - Cinerinoにオファー検索を追加
12
+ - Chevreに会員所有権削除を追加
13
+
11
14
  ### Changed
12
15
 
13
16
  - update @chevre/factory
@@ -0,0 +1,37 @@
1
+ // tslint:disable:no-console
2
+ /**
3
+ * オファー検索
4
+ */
5
+ // tslint:disable-next-line:no-implicit-dependencies
6
+ // import * as moment from 'moment';
7
+ import * as client from '../../lib/index';
8
+ import * as auth from './auth/authAsAdmin';
9
+
10
+ async function main() {
11
+ const authClient = await auth.login();
12
+ await authClient.refreshAccessToken();
13
+ const loginTicket = authClient.verifyIdToken({});
14
+ console.log('username is', loginTicket.getUsername());
15
+
16
+ const offerService = new client.service.Offer({
17
+ endpoint: <string>process.env.API_ENDPOINT,
18
+ auth: authClient,
19
+ project: { id: 'cinerino' }
20
+ });
21
+
22
+ const { data } = await offerService.search({
23
+ limit: 10,
24
+ page: 1,
25
+ id: {
26
+ $in: []
27
+ }
28
+ });
29
+ console.log(data);
30
+ console.log(data.length, 'offers returned');
31
+ }
32
+
33
+ main()
34
+ .then(() => {
35
+ console.log('success!');
36
+ })
37
+ .catch(console.error);
@@ -221,53 +221,6 @@ async function main() {
221
221
  potentialActions: {
222
222
  sendOrder: {
223
223
  potentialActions: {
224
- confirmReservation: authorizeSeatReservationResults.map((result) => {
225
- return {
226
- object: {
227
- typeOf: result.responseBody.typeOf,
228
- id: result.responseBody.id,
229
- object: {
230
- reservations: (Array.isArray(result.responseBody.object.subReservation))
231
- ? result.responseBody.object.subReservation.map((r) => {
232
- return {
233
- additionalTicketText: 'Custom Additional Ticket Text',
234
- id: r.id,
235
- reservedTicket: {
236
- issuedBy: {
237
- typeOf: seller.typeOf,
238
- name: String((<client.factory.multilingualString>seller.name).ja)
239
- },
240
- ticketToken: 'Custom Ticket Token'
241
- },
242
- underName: {
243
- typeOf: transaction.agent.typeOf,
244
- id: transaction.agent.id,
245
- name: 'Custom Name',
246
- familyName: 'Custom Family Name',
247
- givenName: 'Custom Given Name',
248
- email: 'custom@example.com',
249
- telephone: '+819012345678',
250
- identifier: [
251
- { name: 'transaction', value: transaction.id },
252
- { name: 'customName', value: 'Custom NameValue' }
253
- ]
254
- }
255
- };
256
- })
257
- : []
258
- },
259
- potentialActions: {
260
- reserve: {
261
- potentialActions: {
262
- informReservation: [
263
- // { recipient: { url: informUrl } }
264
- ]
265
- }
266
- }
267
- }
268
- }
269
- };
270
- }),
271
224
  sendEmailMessage: [
272
225
  {
273
226
  object: email
@@ -212,17 +212,6 @@ async function main() {
212
212
  potentialActions: {
213
213
  sendOrder: {
214
214
  potentialActions: {
215
- confirmReservation: authorizeSeatReservationResults.map((result) => {
216
- return {
217
- object: {
218
- typeOf: result.responseBody.typeOf,
219
- id: result.responseBody.id,
220
- object: {
221
- reservations: []
222
- }
223
- }
224
- };
225
- }),
226
215
  sendEmailMessage: [
227
216
  {
228
217
  object: email
@@ -228,17 +228,6 @@ async function main() {
228
228
  potentialActions: {
229
229
  sendOrder: {
230
230
  potentialActions: {
231
- confirmReservation: authorizeSeatReservationResults.map((result) => {
232
- return {
233
- object: {
234
- typeOf: result.responseBody.typeOf,
235
- id: result.responseBody.id,
236
- object: {
237
- reservations: []
238
- }
239
- }
240
- };
241
- }),
242
231
  sendEmailMessage: [
243
232
  {
244
233
  object: email
package/lib/bundle.js CHANGED
@@ -3794,7 +3794,7 @@ var service;
3794
3794
  }(authorization_1.AuthorizationService));
3795
3795
  service.Authorization = Authorization;
3796
3796
  /**
3797
- * カテゴリーコード`サービス
3797
+ * 区分サービス
3798
3798
  */
3799
3799
  var CategoryCode = /** @class */ (function (_super) {
3800
3800
  __extends(CategoryCode, _super);
@@ -6176,7 +6176,7 @@ exports.CategoryCodeService = void 0;
6176
6176
  var http_status_1 = require("http-status");
6177
6177
  var service_1 = require("../service");
6178
6178
  /**
6179
- * カテゴリーコードサービス
6179
+ * 区分サービス
6180
6180
  */
6181
6181
  var CategoryCodeService = /** @class */ (function (_super) {
6182
6182
  __extends(CategoryCodeService, _super);
@@ -8553,6 +8553,26 @@ var PersonOwnershipInfoService = /** @class */ (function (_super) {
8553
8553
  });
8554
8554
  });
8555
8555
  };
8556
+ /**
8557
+ * 会員所有権削除
8558
+ */
8559
+ PersonOwnershipInfoService.prototype.deleteOwnershipInfoById = function (params) {
8560
+ return __awaiter(this, void 0, void 0, function () {
8561
+ return __generator(this, function (_a) {
8562
+ switch (_a.label) {
8563
+ case 0: return [4 /*yield*/, this.fetch({
8564
+ uri: "/people/" + String(params.id) + "/ownershipInfos/" + String(params.ownershipInfoId),
8565
+ method: 'DELETE',
8566
+ expectedStatusCodes: [http_status_1.NO_CONTENT],
8567
+ qs: { iss: params.iss }
8568
+ })];
8569
+ case 1:
8570
+ _a.sent();
8571
+ return [2 /*return*/];
8572
+ }
8573
+ });
8574
+ });
8575
+ };
8556
8576
  return PersonOwnershipInfoService;
8557
8577
  }(service_1.Service));
8558
8578
  exports.PersonOwnershipInfoService = PersonOwnershipInfoService;
@@ -10581,7 +10601,7 @@ var service;
10581
10601
  }(action_1.ActionService));
10582
10602
  service.Action = Action;
10583
10603
  /**
10584
- * カテゴリーコードサービス
10604
+ * 区分サービス
10585
10605
  */
10586
10606
  var CategoryCode = /** @class */ (function (_super) {
10587
10607
  __extends(CategoryCode, _super);
@@ -11725,7 +11745,7 @@ exports.CategoryCodeService = void 0;
11725
11745
  var http_status_1 = require("http-status");
11726
11746
  var service_1 = require("../service");
11727
11747
  /**
11728
- * カテゴリーコードサービス
11748
+ * 区分サービス
11729
11749
  */
11730
11750
  var CategoryCodeService = /** @class */ (function (_super) {
11731
11751
  __extends(CategoryCodeService, _super);
@@ -11830,7 +11850,7 @@ var CreativeWorkService = /** @class */ (function (_super) {
11830
11850
  return _super !== null && _super.apply(this, arguments) || this;
11831
11851
  }
11832
11852
  /**
11833
- * 映画作品検索
11853
+ * コンテンツ検索
11834
11854
  */
11835
11855
  CreativeWorkService.prototype.searchMovies = function (params) {
11836
11856
  return __awaiter(this, void 0, void 0, function () {
@@ -12528,6 +12548,36 @@ var OfferService = /** @class */ (function (_super) {
12528
12548
  function OfferService() {
12529
12549
  return _super !== null && _super.apply(this, arguments) || this;
12530
12550
  }
12551
+ /**
12552
+ * オファー検索
12553
+ */
12554
+ OfferService.prototype.search = function (
12555
+ // params: factory.offer.ISearchConditions
12556
+ params) {
12557
+ return __awaiter(this, void 0, void 0, function () {
12558
+ var _this = this;
12559
+ return __generator(this, function (_a) {
12560
+ return [2 /*return*/, this.fetch({
12561
+ uri: '/offers',
12562
+ method: 'GET',
12563
+ qs: params,
12564
+ expectedStatusCodes: [http_status_1.OK]
12565
+ })
12566
+ .then(function (response) { return __awaiter(_this, void 0, void 0, function () {
12567
+ var _a;
12568
+ return __generator(this, function (_b) {
12569
+ switch (_b.label) {
12570
+ case 0:
12571
+ _a = {};
12572
+ return [4 /*yield*/, response.json()];
12573
+ case 1: return [2 /*return*/, (_a.data = _b.sent(),
12574
+ _a)];
12575
+ }
12576
+ });
12577
+ }); })];
12578
+ });
12579
+ });
12580
+ };
12531
12581
  /**
12532
12582
  * 入金オファー承認
12533
12583
  */
@@ -12839,25 +12889,6 @@ var OrderService = /** @class */ (function (_super) {
12839
12889
  });
12840
12890
  });
12841
12891
  };
12842
- /**
12843
- * ストリーミングダウンロード
12844
- */
12845
- OrderService.prototype.download = function (params) {
12846
- return __awaiter(this, void 0, void 0, function () {
12847
- var _this = this;
12848
- return __generator(this, function (_a) {
12849
- return [2 /*return*/, this.fetch({
12850
- uri: "/orders/download",
12851
- method: 'GET',
12852
- qs: params,
12853
- expectedStatusCodes: [http_status_1.OK]
12854
- })
12855
- .then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
12856
- return [2 /*return*/, response.body];
12857
- }); }); })];
12858
- });
12859
- });
12860
- };
12861
12892
  return OrderService;
12862
12893
  }(service_1.Service));
12863
12894
  exports.OrderService = OrderService;
@@ -12959,30 +12990,20 @@ var OwnershipInfoService = /** @class */ (function (_super) {
12959
12990
  * 所有権検証アクションを検索する
12960
12991
  * 所有権に対して発行されたトークンを認証しようとしたアクションを検索します
12961
12992
  */
12962
- OwnershipInfoService.prototype.searchCheckTokenActions = function (params) {
12963
- return __awaiter(this, void 0, void 0, function () {
12964
- var _this = this;
12965
- return __generator(this, function (_a) {
12966
- return [2 /*return*/, this.fetch({
12967
- uri: "/ownershipInfos/" + params.id + "/actions/checkToken",
12968
- method: 'GET',
12969
- expectedStatusCodes: [http_status_1.OK]
12970
- })
12971
- .then(function (response) { return __awaiter(_this, void 0, void 0, function () {
12972
- var _a;
12973
- return __generator(this, function (_b) {
12974
- switch (_b.label) {
12975
- case 0:
12976
- _a = {};
12977
- return [4 /*yield*/, response.json()];
12978
- case 1: return [2 /*return*/, (_a.data = _b.sent(),
12979
- _a)];
12980
- }
12981
- });
12982
- }); })];
12983
- });
12984
- });
12985
- };
12993
+ // public async searchCheckTokenActions(params: {
12994
+ // id: string;
12995
+ // }): Promise<ISearchResult<factory.action.IAction<factory.action.IAttributes<factory.actionType, any, any>>[]>> {
12996
+ // return this.fetch({
12997
+ // uri: `/ownershipInfos/${params.id}/actions/checkToken`,
12998
+ // method: 'GET',
12999
+ // expectedStatusCodes: [OK]
13000
+ // })
13001
+ // .then(async (response) => {
13002
+ // return {
13003
+ // data: await response.json()
13004
+ // };
13005
+ // });
13006
+ // }
12986
13007
  /**
12987
13008
  * 登録日と劇場で会員数をカウント(sskts専用)
12988
13009
  */
@@ -13915,7 +13936,7 @@ var PlaceService = /** @class */ (function (_super) {
13915
13936
  return _super !== null && _super.apply(this, arguments) || this;
13916
13937
  }
13917
13938
  /**
13918
- * 劇場検索
13939
+ * 施設検索
13919
13940
  */
13920
13941
  PlaceService.prototype.searchMovieTheaters = function (params) {
13921
13942
  return __awaiter(this, void 0, void 0, function () {
@@ -13943,7 +13964,7 @@ var PlaceService = /** @class */ (function (_super) {
13943
13964
  });
13944
13965
  };
13945
13966
  /**
13946
- * スクリーン検索
13967
+ * ルーム検索
13947
13968
  */
13948
13969
  PlaceService.prototype.searchScreeningRooms = function (params) {
13949
13970
  return __awaiter(this, void 0, void 0, function () {
@@ -14389,22 +14410,17 @@ var ReservationService = /** @class */ (function (_super) {
14389
14410
  /**
14390
14411
  * ストリーミングダウンロード
14391
14412
  */
14392
- ReservationService.prototype.download = function (params) {
14393
- return __awaiter(this, void 0, void 0, function () {
14394
- var _this = this;
14395
- return __generator(this, function (_a) {
14396
- return [2 /*return*/, this.fetch({
14397
- uri: '/reservations/download',
14398
- method: 'GET',
14399
- qs: params,
14400
- expectedStatusCodes: [http_status_1.OK]
14401
- })
14402
- .then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
14403
- return [2 /*return*/, response.body];
14404
- }); }); })];
14405
- });
14406
- });
14407
- };
14413
+ // public async download<T extends factory.reservationType>(params: factory.reservation.ISearchConditions<T> & {
14414
+ // format: any;
14415
+ // }): Promise<NodeJS.ReadableStream | ReadableStream> {
14416
+ // return this.fetch({
14417
+ // uri: '/reservations/download',
14418
+ // method: 'GET',
14419
+ // qs: params,
14420
+ // expectedStatusCodes: [OK]
14421
+ // })
14422
+ // .then(async (response) => <NodeJS.ReadableStream | ReadableStream>response.body);
14423
+ // }
14408
14424
  /**
14409
14425
  * 予約を使用する
14410
14426
  * 注文コードから取得したトークンを利用して、予約に入場記録を追加します
@@ -15100,6 +15116,20 @@ var PlaceOrderTransactionService = /** @class */ (function (_super) {
15100
15116
  var _this = _super !== null && _super.apply(this, arguments) || this;
15101
15117
  _this.typeOf = factory.transactionType.PlaceOrder;
15102
15118
  return _this;
15119
+ /**
15120
+ * ストリーミングダウンロード
15121
+ */
15122
+ // public async stream(params: factory.transaction.ISearchConditions<factory.transactionType.PlaceOrder> & {
15123
+ // format: factory.encodingFormat.Application | factory.encodingFormat.Text;
15124
+ // }): Promise<NodeJS.ReadableStream | ReadableStream> {
15125
+ // return this.fetch({
15126
+ // uri: `/transactions/${this.typeOf}/report`,
15127
+ // method: 'GET',
15128
+ // qs: params,
15129
+ // expectedStatusCodes: [OK]
15130
+ // })
15131
+ // .then(async (response) => <NodeJS.ReadableStream | ReadableStream>response.body);
15132
+ // }
15103
15133
  }
15104
15134
  /**
15105
15135
  * 取引を開始する
@@ -15323,25 +15353,6 @@ var PlaceOrderTransactionService = /** @class */ (function (_super) {
15323
15353
  });
15324
15354
  });
15325
15355
  };
15326
- /**
15327
- * ストリーミングダウンロード
15328
- */
15329
- PlaceOrderTransactionService.prototype.stream = function (params) {
15330
- return __awaiter(this, void 0, void 0, function () {
15331
- var _this = this;
15332
- return __generator(this, function (_a) {
15333
- return [2 /*return*/, this.fetch({
15334
- uri: "/transactions/" + this.typeOf + "/report",
15335
- method: 'GET',
15336
- qs: params,
15337
- expectedStatusCodes: [http_status_1.OK]
15338
- })
15339
- .then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
15340
- return [2 /*return*/, response.body];
15341
- }); }); })];
15342
- });
15343
- });
15344
- };
15345
15356
  return PlaceOrderTransactionService;
15346
15357
  }(service_1.Service));
15347
15358
  exports.PlaceOrderTransactionService = PlaceOrderTransactionService;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cinerino/sdk",
3
- "version": "3.33.0-alpha.0",
3
+ "version": "3.33.0-alpha.4",
4
4
  "description": "Cinerino SDK",
5
5
  "main": "./lib/index.js",
6
6
  "browser": {
@@ -97,7 +97,7 @@
97
97
  "watchify": "^3.11.1"
98
98
  },
99
99
  "dependencies": {
100
- "@cinerino/api-abstract-client": "3.33.0-alpha.0",
100
+ "@cinerino/api-abstract-client": "3.33.0-alpha.4",
101
101
  "debug": "^3.2.6",
102
102
  "http-status": "^1.4.2",
103
103
  "idtoken-verifier": "^2.0.3",