@cinerino/sdk 12.13.0-alpha.7 → 12.13.0-alpha.8
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,32 @@
|
|
|
1
|
+
import * as factory from '../factory';
|
|
2
|
+
import { Service } from '../service';
|
|
3
|
+
export interface IFindParams {
|
|
4
|
+
movieTheaterCode: string;
|
|
5
|
+
roomCode: string;
|
|
6
|
+
sectionCode: string;
|
|
7
|
+
/**
|
|
8
|
+
* max: 20
|
|
9
|
+
*/
|
|
10
|
+
limit: number;
|
|
11
|
+
page: number;
|
|
12
|
+
branchCode?: string;
|
|
13
|
+
branchCodeContains?: string;
|
|
14
|
+
nameContains?: string;
|
|
15
|
+
seatingType?: string;
|
|
16
|
+
/**
|
|
17
|
+
* 追加特性名称
|
|
18
|
+
*/
|
|
19
|
+
additionalPropertyName?: string;
|
|
20
|
+
}
|
|
21
|
+
export declare type ISeatAsFindResult = Pick<factory.place.seat.IPlace, 'additionalProperty' | 'branchCode' | 'name' | 'seatingType' | 'maximumAttendeeCapacity'> & {
|
|
22
|
+
typeOf?: never;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* 座席サービス
|
|
26
|
+
*/
|
|
27
|
+
export declare class SeatService extends Service {
|
|
28
|
+
/**
|
|
29
|
+
* 座席検索
|
|
30
|
+
*/
|
|
31
|
+
findSeats(params: IFindParams): Promise<ISeatAsFindResult[]>;
|
|
32
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
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.SeatService = void 0;
|
|
55
|
+
var http_status_1 = require("http-status");
|
|
56
|
+
var service_1 = require("../service");
|
|
57
|
+
var BASE_URI = '/seats';
|
|
58
|
+
/**
|
|
59
|
+
* 座席サービス
|
|
60
|
+
*/
|
|
61
|
+
var SeatService = /** @class */ (function (_super) {
|
|
62
|
+
__extends(SeatService, _super);
|
|
63
|
+
function SeatService() {
|
|
64
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* 座席検索
|
|
68
|
+
*/
|
|
69
|
+
SeatService.prototype.findSeats = 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
|
+
})
|
|
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
|
+
return SeatService;
|
|
86
|
+
}(service_1.Service));
|
|
87
|
+
exports.SeatService = SeatService;
|
|
@@ -19,6 +19,7 @@ import type { PaymentMethodService } from './chevreAdmin/paymentMethod';
|
|
|
19
19
|
import type { ProductService } from './chevreAdmin/product';
|
|
20
20
|
import type { ProductOfferService } from './chevreAdmin/productOffer';
|
|
21
21
|
import type { ReservationService } from './chevreAdmin/reservation';
|
|
22
|
+
import type { SeatService } from './chevreAdmin/seat';
|
|
22
23
|
import type { SellerService } from './chevreAdmin/seller';
|
|
23
24
|
export declare namespace service {
|
|
24
25
|
type IUnset = IUnsetOnService;
|
|
@@ -134,6 +135,13 @@ export declare namespace service {
|
|
|
134
135
|
namespace Reservation {
|
|
135
136
|
let svc: typeof ReservationService | undefined;
|
|
136
137
|
}
|
|
138
|
+
/**
|
|
139
|
+
* 座席サービス
|
|
140
|
+
*/
|
|
141
|
+
type Seat = SeatService;
|
|
142
|
+
namespace Seat {
|
|
143
|
+
let svc: typeof SeatService | undefined;
|
|
144
|
+
}
|
|
137
145
|
/**
|
|
138
146
|
* 販売者サービス
|
|
139
147
|
*/
|
|
@@ -194,6 +202,7 @@ export declare class ChevreAdmin {
|
|
|
194
202
|
createProductInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<ProductService>;
|
|
195
203
|
createProductOfferInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<ProductOfferService>;
|
|
196
204
|
createReservationInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<ReservationService>;
|
|
205
|
+
createSeatInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<SeatService>;
|
|
197
206
|
createSellerInstance(params: Pick<IOptions, 'project'>): Promise<SellerService>;
|
|
198
207
|
createOfferInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<OfferService>;
|
|
199
208
|
createOfferCatalogInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<OfferCatalogService>;
|
|
@@ -98,6 +98,9 @@ var service;
|
|
|
98
98
|
var Reservation;
|
|
99
99
|
(function (Reservation) {
|
|
100
100
|
})(Reservation = service.Reservation || (service.Reservation = {}));
|
|
101
|
+
var Seat;
|
|
102
|
+
(function (Seat) {
|
|
103
|
+
})(Seat = service.Seat || (service.Seat = {}));
|
|
101
104
|
var Seller;
|
|
102
105
|
(function (Seller) {
|
|
103
106
|
})(Seller = service.Seller || (service.Seller = {}));
|
|
@@ -396,6 +399,23 @@ var ChevreAdmin = /** @class */ (function () {
|
|
|
396
399
|
});
|
|
397
400
|
});
|
|
398
401
|
};
|
|
402
|
+
ChevreAdmin.prototype.createSeatInstance = function (params) {
|
|
403
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
404
|
+
var _a;
|
|
405
|
+
return __generator(this, function (_b) {
|
|
406
|
+
switch (_b.label) {
|
|
407
|
+
case 0:
|
|
408
|
+
if (!(service.Seat.svc === undefined)) return [3 /*break*/, 2];
|
|
409
|
+
_a = service.Seat;
|
|
410
|
+
return [4 /*yield*/, Promise.resolve().then(function () { return require('./chevreAdmin/seat'); })];
|
|
411
|
+
case 1:
|
|
412
|
+
_a.svc = (_b.sent()).SeatService;
|
|
413
|
+
_b.label = 2;
|
|
414
|
+
case 2: return [2 /*return*/, new service.Seat.svc(__assign(__assign(__assign({}, this.options), params), { retryableStatusCodes: [] }))];
|
|
415
|
+
}
|
|
416
|
+
});
|
|
417
|
+
});
|
|
418
|
+
};
|
|
399
419
|
ChevreAdmin.prototype.createSellerInstance = function (params) {
|
|
400
420
|
return __awaiter(this, void 0, void 0, function () {
|
|
401
421
|
var _a;
|