@cinerino/sdk 12.13.0-alpha.21 → 12.13.0-alpha.23

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.
@@ -0,0 +1,52 @@
1
+ // tslint:disable:no-console
2
+ // tslint:disable-next-line:no-implicit-dependencies
3
+ import * as client from '../../../../lib/index';
4
+ import * as auth from '../../auth/authAsAdmin';
5
+ // import { auth } from '../../auth/clientCredentials';
6
+
7
+ const PROJECT_ID = String(process.env.PROJECT_ID);
8
+ const SELLER_ID = '59d20831e53ebc2b4e774466';
9
+ // const SELLER_ID = 'x';
10
+
11
+ // tslint:disable-next-line:max-func-body-length
12
+ async function main() {
13
+ const authClient = await auth.login();
14
+ await authClient.refreshAccessToken();
15
+ const loginTicket = authClient.verifyIdToken({});
16
+ console.log('username is', loginTicket.getUsername());
17
+
18
+ const seatService = await (await client.loadChevreAdmin({
19
+ endpoint: <string>process.env.CHEVRE_ENDPOINT,
20
+ auth: authClient
21
+ // auth: await auth()
22
+ })).createSeatInstance({
23
+ project: { id: PROJECT_ID },
24
+ seller: { id: SELLER_ID }
25
+ });
26
+
27
+ const result = await seatService.deleteSeatsByBranchCode(
28
+ [
29
+ { branchCode: '10' },
30
+ { branchCode: '20' },
31
+ { branchCode: 'A-4' },
32
+ { branchCode: 'xxx' },
33
+ { branchCode: 'xxx' },
34
+ { branchCode: 'xxx' },
35
+ { branchCode: 'xxx' },
36
+ { branchCode: 'xxx' }
37
+ ],
38
+ {
39
+ movieTheaterId: '5bfb841d5a78d7948369979a',
40
+ movieTheaterCode: '',
41
+ roomCode: '10',
42
+ sectionCode: 'Default02'
43
+ }
44
+ );
45
+ console.log(result);
46
+ }
47
+
48
+ main()
49
+ .then(() => {
50
+ console.log('success!');
51
+ })
52
+ .catch(console.error);
@@ -1,9 +1,15 @@
1
1
  import * as factory from '../factory';
2
2
  import { Service } from '../service';
3
- export interface IFindParams {
3
+ interface IFixSectionQuery {
4
+ /**
5
+ * 施設ID必須化(2026-01-08~)
6
+ */
7
+ movieTheaterId: string;
4
8
  movieTheaterCode: string;
5
9
  roomCode: string;
6
10
  sectionCode: string;
11
+ }
12
+ export interface IFindParams extends IFixSectionQuery {
7
13
  /**
8
14
  * max: 20
9
15
  */
@@ -23,11 +29,6 @@ export declare type ISeatAsFindResult = Pick<factory.place.seat.IPlace, 'additio
23
29
  };
24
30
  export declare type ICreatingSeat = Pick<factory.place.seat.IPlace, 'additionalProperty' | 'branchCode' | 'maximumAttendeeCapacity' | 'name' | 'seatingType'>;
25
31
  export declare type IDeletingSeat = Pick<factory.place.seat.IPlace, 'branchCode'>;
26
- interface IFixSectionQuery {
27
- movieTheaterCode: string;
28
- roomCode: string;
29
- sectionCode: string;
30
- }
31
32
  /**
32
33
  * 座席サービス
33
34
  */
@@ -74,7 +74,8 @@ var SeatService = /** @class */ (function (_super) {
74
74
  uri: BASE_URI,
75
75
  method: 'GET',
76
76
  qs: params,
77
- expectedStatusCodes: [http_status_1.OK]
77
+ expectedStatusCodes: [http_status_1.OK],
78
+ stringifyOptions: { arrayFormat: 'repeat' }
78
79
  })
79
80
  .then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
80
81
  return [2 /*return*/, response.json()];
@@ -91,17 +92,18 @@ var SeatService = /** @class */ (function (_super) {
91
92
  */
92
93
  params, options) {
93
94
  return __awaiter(this, void 0, void 0, function () {
94
- var movieTheaterCode, roomCode, sectionCode;
95
+ var movieTheaterId, movieTheaterCode, roomCode, sectionCode;
95
96
  return __generator(this, function (_a) {
96
97
  switch (_a.label) {
97
98
  case 0:
98
- movieTheaterCode = options.movieTheaterCode, roomCode = options.roomCode, sectionCode = options.sectionCode;
99
+ movieTheaterId = options.movieTheaterId, movieTheaterCode = options.movieTheaterCode, roomCode = options.roomCode, sectionCode = options.sectionCode;
99
100
  return [4 /*yield*/, this.fetch({
100
101
  uri: BASE_URI,
101
102
  method: 'PUT',
102
103
  body: params,
103
- qs: { movieTheaterCode: movieTheaterCode, roomCode: roomCode, sectionCode: sectionCode },
104
- expectedStatusCodes: [http_status_1.NO_CONTENT]
104
+ qs: { movieTheaterId: movieTheaterId, movieTheaterCode: movieTheaterCode, roomCode: roomCode, sectionCode: sectionCode },
105
+ expectedStatusCodes: [http_status_1.NO_CONTENT],
106
+ stringifyOptions: { arrayFormat: 'repeat' }
105
107
  })];
106
108
  case 1:
107
109
  _a.sent();
@@ -119,17 +121,24 @@ var SeatService = /** @class */ (function (_super) {
119
121
  */
120
122
  params, options) {
121
123
  return __awaiter(this, void 0, void 0, function () {
122
- var movieTheaterCode, roomCode, sectionCode;
124
+ var movieTheaterId, movieTheaterCode, roomCode, sectionCode;
123
125
  return __generator(this, function (_a) {
124
126
  switch (_a.label) {
125
127
  case 0:
126
- movieTheaterCode = options.movieTheaterCode, roomCode = options.roomCode, sectionCode = options.sectionCode;
128
+ movieTheaterId = options.movieTheaterId, movieTheaterCode = options.movieTheaterCode, roomCode = options.roomCode, sectionCode = options.sectionCode;
127
129
  return [4 /*yield*/, this.fetch({
128
130
  uri: BASE_URI,
129
131
  method: 'DELETE',
130
132
  body: params,
131
- qs: { movieTheaterCode: movieTheaterCode, roomCode: roomCode, sectionCode: sectionCode },
132
- expectedStatusCodes: [http_status_1.NO_CONTENT]
133
+ qs: {
134
+ movieTheaterId: movieTheaterId, movieTheaterCode: movieTheaterCode, roomCode: roomCode, sectionCode: sectionCode,
135
+ branchCodes: params.map(function (_a) {
136
+ var branchCode = _a.branchCode;
137
+ return branchCode;
138
+ })
139
+ },
140
+ expectedStatusCodes: [http_status_1.NO_CONTENT],
141
+ stringifyOptions: { arrayFormat: 'repeat' }
133
142
  })];
134
143
  case 1:
135
144
  _a.sent();
@@ -0,0 +1,31 @@
1
+ import * as factory from '../factory';
2
+ import { Service } from '../service';
3
+ interface IFixRoomQuery {
4
+ movieTheaterId: string;
5
+ roomCode: string;
6
+ }
7
+ export interface IFindParams extends IFixRoomQuery {
8
+ /**
9
+ * max: 20
10
+ */
11
+ limit: number;
12
+ page: number;
13
+ branchCode?: string;
14
+ branchCodeContains?: string;
15
+ nameContains?: string;
16
+ /**
17
+ * 追加特性名称
18
+ */
19
+ additionalPropertyName?: string;
20
+ }
21
+ export declare type ISeatSectionAsFindResult = Pick<factory.place.screeningRoomSection.IPlace, 'additionalProperty' | 'branchCode' | 'name'>;
22
+ /**
23
+ * 座席セクションサービス
24
+ */
25
+ export declare class SeatSectionService extends Service {
26
+ /**
27
+ * 座席セクション検索
28
+ */
29
+ findSeatSections(params: IFindParams): Promise<ISeatSectionAsFindResult[]>;
30
+ }
31
+ export {};
@@ -0,0 +1,88 @@
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.SeatSectionService = void 0;
55
+ var http_status_1 = require("http-status");
56
+ var service_1 = require("../service");
57
+ var BASE_URI = '/seatSections';
58
+ /**
59
+ * 座席セクションサービス
60
+ */
61
+ var SeatSectionService = /** @class */ (function (_super) {
62
+ __extends(SeatSectionService, _super);
63
+ function SeatSectionService() {
64
+ return _super !== null && _super.apply(this, arguments) || this;
65
+ }
66
+ /**
67
+ * 座席セクション検索
68
+ */
69
+ SeatSectionService.prototype.findSeatSections = 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: BASE_URI,
75
+ method: 'GET',
76
+ qs: params,
77
+ expectedStatusCodes: [http_status_1.OK],
78
+ stringifyOptions: { arrayFormat: 'repeat' }
79
+ })
80
+ .then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
81
+ return [2 /*return*/, response.json()];
82
+ }); }); })];
83
+ });
84
+ });
85
+ };
86
+ return SeatSectionService;
87
+ }(service_1.Service));
88
+ exports.SeatSectionService = SeatSectionService;
@@ -22,6 +22,7 @@ import type { ProductOfferService } from './chevreAdmin/productOffer';
22
22
  import type { ReservationService } from './chevreAdmin/reservation';
23
23
  import type { RoomService } from './chevreAdmin/room';
24
24
  import type { SeatService } from './chevreAdmin/seat';
25
+ import type { SeatSectionService } from './chevreAdmin/seatSection';
25
26
  import type { SellerService } from './chevreAdmin/seller';
26
27
  export declare namespace service {
27
28
  type IUnset = IUnsetOnService;
@@ -158,6 +159,13 @@ export declare namespace service {
158
159
  namespace Seat {
159
160
  let svc: typeof SeatService | undefined;
160
161
  }
162
+ /**
163
+ * 座席セクションサービス
164
+ */
165
+ type SeatSection = SeatSectionService;
166
+ namespace SeatSection {
167
+ let svc: typeof SeatSectionService | undefined;
168
+ }
161
169
  /**
162
170
  * 販売者サービス
163
171
  */
@@ -226,7 +234,14 @@ export declare class ChevreAdmin {
226
234
  * 販売者指定必須
227
235
  */
228
236
  createRoomInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<RoomService>;
237
+ /**
238
+ * 販売者指定必須
239
+ */
229
240
  createSeatInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<SeatService>;
241
+ /**
242
+ * 販売者指定必須
243
+ */
244
+ createSeatSectionInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<SeatSectionService>;
230
245
  createSellerInstance(params: Pick<IOptions, 'project'>): Promise<SellerService>;
231
246
  createOfferInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<OfferService>;
232
247
  createOfferCatalogInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<OfferCatalogService>;
@@ -107,6 +107,9 @@ var service;
107
107
  var Seat;
108
108
  (function (Seat) {
109
109
  })(Seat = service.Seat || (service.Seat = {}));
110
+ var SeatSection;
111
+ (function (SeatSection) {
112
+ })(SeatSection = service.SeatSection || (service.SeatSection = {}));
110
113
  var Seller;
111
114
  (function (Seller) {
112
115
  })(Seller = service.Seller || (service.Seller = {}));
@@ -445,6 +448,9 @@ var ChevreAdmin = /** @class */ (function () {
445
448
  });
446
449
  });
447
450
  };
451
+ /**
452
+ * 販売者指定必須
453
+ */
448
454
  ChevreAdmin.prototype.createSeatInstance = function (params) {
449
455
  return __awaiter(this, void 0, void 0, function () {
450
456
  var _a;
@@ -462,6 +468,26 @@ var ChevreAdmin = /** @class */ (function () {
462
468
  });
463
469
  });
464
470
  };
471
+ /**
472
+ * 販売者指定必須
473
+ */
474
+ ChevreAdmin.prototype.createSeatSectionInstance = function (params) {
475
+ return __awaiter(this, void 0, void 0, function () {
476
+ var _a;
477
+ return __generator(this, function (_b) {
478
+ switch (_b.label) {
479
+ case 0:
480
+ if (!(service.SeatSection.svc === undefined)) return [3 /*break*/, 2];
481
+ _a = service.SeatSection;
482
+ return [4 /*yield*/, Promise.resolve().then(function () { return require('./chevreAdmin/seatSection'); })];
483
+ case 1:
484
+ _a.svc = (_b.sent()).SeatSectionService;
485
+ _b.label = 2;
486
+ case 2: return [2 /*return*/, new service.SeatSection.svc(__assign(__assign(__assign({}, this.options), params), { retryableStatusCodes: [] }))];
487
+ }
488
+ });
489
+ });
490
+ };
465
491
  ChevreAdmin.prototype.createSellerInstance = function (params) {
466
492
  return __awaiter(this, void 0, void 0, function () {
467
493
  var _a;
@@ -39,10 +39,9 @@ export interface IAggregateReservation {
39
39
  typeOf: factory.eventType;
40
40
  startDate: Date;
41
41
  };
42
- aggregateEntranceGate?: factory.event.screeningEvent.IAggregateEntranceGate;
43
42
  aggregateOffer?: factory.event.screeningEvent.IAggregateOffer;
44
43
  }
45
- export declare type ISearchWithReservationForIdResult = Pick<IAggregateReservation, 'aggregateEntranceGate' | 'aggregateOffer'> & {
44
+ export declare type ISearchWithReservationForIdResult = Pick<IAggregateReservation, 'aggregateOffer'> & {
46
45
  /**
47
46
  * イベントID
48
47
  */