@cinerino/sdk 10.21.0-alpha.30 → 10.21.0-alpha.31

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,19 @@
1
+ import * as factory from '../factory';
2
+ import { Service } from '../service';
3
+ declare type ISavingRequirement = Pick<factory.advanceBookingRequirement.IAdvanceBookingRequirement, 'identifier' | 'description' | 'maxValue' | 'minValue' | 'valueReference'>;
4
+ /**
5
+ * 事前予約要件サービス
6
+ */
7
+ export declare class AdvanceBookingRequirementService extends Service {
8
+ create(params: ISavingRequirement): Promise<{
9
+ id: string;
10
+ }>;
11
+ projectFields(params: Omit<factory.advanceBookingRequirement.ISearchConditions, 'project'>): Promise<Pick<factory.advanceBookingRequirement.IAdvanceBookingRequirement, 'description' | 'id' | 'identifier' | 'maxValue' | 'minValue' | 'typeOf' | 'unitCode' | 'valueReference'>[]>;
12
+ updateById(params: ISavingRequirement & {
13
+ id: string;
14
+ }): Promise<void>;
15
+ deleteById(params: {
16
+ id: string;
17
+ }): Promise<void>;
18
+ }
19
+ export {};
@@ -0,0 +1,149 @@
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
+ 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
+ };
64
+ Object.defineProperty(exports, "__esModule", { value: true });
65
+ exports.AdvanceBookingRequirementService = void 0;
66
+ var http_status_1 = require("http-status");
67
+ var service_1 = require("../service");
68
+ /**
69
+ * 事前予約要件サービス
70
+ */
71
+ var AdvanceBookingRequirementService = /** @class */ (function (_super) {
72
+ __extends(AdvanceBookingRequirementService, _super);
73
+ function AdvanceBookingRequirementService() {
74
+ return _super !== null && _super.apply(this, arguments) || this;
75
+ }
76
+ AdvanceBookingRequirementService.prototype.create = function (params) {
77
+ return __awaiter(this, void 0, void 0, function () {
78
+ var _this = this;
79
+ return __generator(this, function (_a) {
80
+ return [2 /*return*/, this.fetch({
81
+ uri: '/advanceBookingRequirements',
82
+ method: 'POST',
83
+ body: params,
84
+ expectedStatusCodes: [http_status_1.CREATED]
85
+ })
86
+ .then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
87
+ return [2 /*return*/, response.json()];
88
+ }); }); })];
89
+ });
90
+ });
91
+ };
92
+ AdvanceBookingRequirementService.prototype.projectFields = function (params) {
93
+ return __awaiter(this, void 0, void 0, function () {
94
+ var _this = this;
95
+ return __generator(this, function (_a) {
96
+ return [2 /*return*/, this.fetch({
97
+ uri: '/advanceBookingRequirements',
98
+ method: 'GET',
99
+ qs: params,
100
+ expectedStatusCodes: [http_status_1.OK]
101
+ })
102
+ .then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
103
+ return [2 /*return*/, response.json()];
104
+ }); }); })];
105
+ });
106
+ });
107
+ };
108
+ AdvanceBookingRequirementService.prototype.updateById = function (params) {
109
+ return __awaiter(this, void 0, void 0, function () {
110
+ var id, body;
111
+ return __generator(this, function (_a) {
112
+ switch (_a.label) {
113
+ case 0:
114
+ id = params.id, body = __rest(params, ["id"]);
115
+ return [4 /*yield*/, this.fetch({
116
+ uri: "/advanceBookingRequirements/" + encodeURIComponent(String(id)),
117
+ method: 'PUT',
118
+ body: body,
119
+ expectedStatusCodes: [http_status_1.NO_CONTENT]
120
+ })];
121
+ case 1:
122
+ _a.sent();
123
+ return [2 /*return*/];
124
+ }
125
+ });
126
+ });
127
+ };
128
+ AdvanceBookingRequirementService.prototype.deleteById = function (params) {
129
+ return __awaiter(this, void 0, void 0, function () {
130
+ var id;
131
+ return __generator(this, function (_a) {
132
+ switch (_a.label) {
133
+ case 0:
134
+ id = params.id;
135
+ return [4 /*yield*/, this.fetch({
136
+ uri: "/advanceBookingRequirements/" + encodeURIComponent(String(id)),
137
+ method: 'DELETE',
138
+ expectedStatusCodes: [http_status_1.NO_CONTENT]
139
+ })];
140
+ case 1:
141
+ _a.sent();
142
+ return [2 /*return*/];
143
+ }
144
+ });
145
+ });
146
+ };
147
+ return AdvanceBookingRequirementService;
148
+ }(service_1.Service));
149
+ exports.AdvanceBookingRequirementService = AdvanceBookingRequirementService;
@@ -5,6 +5,7 @@ import type { AccountTitleService } from './chevreAdmin/accountTitle';
5
5
  import type { AccountTransactionService } from './chevreAdmin/accountTransaction';
6
6
  import type { ActionService } from './chevreAdmin/action';
7
7
  import type { AdditionalPropertyService } from './chevreAdmin/additionalProperty';
8
+ import type { AdvanceBookingRequirementService } from './chevreAdmin/advanceBookingRequirement';
8
9
  import type { AggregateOfferService } from './chevreAdmin/aggregateOffer';
9
10
  import type { AggregateReservationService } from './chevreAdmin/aggregateReservation';
10
11
  import type { AggregationService } from './chevreAdmin/aggregation';
@@ -110,6 +111,13 @@ export declare namespace service {
110
111
  namespace AdditionalProperty {
111
112
  let svc: typeof AdditionalPropertyService | undefined;
112
113
  }
114
+ /**
115
+ * 事前予約要件サービス
116
+ */
117
+ type AdvanceBookingRequirement = AdvanceBookingRequirementService;
118
+ namespace AdvanceBookingRequirement {
119
+ let svc: typeof AdvanceBookingRequirementService | undefined;
120
+ }
113
121
  /**
114
122
  * 集計オファーサービス
115
123
  */
@@ -561,6 +569,7 @@ export declare class ChevreAdmin {
561
569
  createAccountTransactionInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<AccountTransactionService>;
562
570
  createActionInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<ActionService>;
563
571
  createAdditionalPropertyInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<AdditionalPropertyService>;
572
+ createAdvanceBookingRequirementInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<AdvanceBookingRequirementService>;
564
573
  createAggregateOfferInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<AggregateOfferService>;
565
574
  createAggregateReservationInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<AggregateReservationService>;
566
575
  createAggregationInstance(): Promise<AggregationService>;
@@ -68,6 +68,9 @@ var service;
68
68
  var AdditionalProperty;
69
69
  (function (AdditionalProperty) {
70
70
  })(AdditionalProperty = service.AdditionalProperty || (service.AdditionalProperty = {}));
71
+ var AdvanceBookingRequirement;
72
+ (function (AdvanceBookingRequirement) {
73
+ })(AdvanceBookingRequirement = service.AdvanceBookingRequirement || (service.AdvanceBookingRequirement = {}));
71
74
  var AggregateOffer;
72
75
  (function (AggregateOffer) {
73
76
  })(AggregateOffer = service.AggregateOffer || (service.AggregateOffer = {}));
@@ -377,6 +380,24 @@ var ChevreAdmin = /** @class */ (function () {
377
380
  });
378
381
  });
379
382
  };
383
+ ChevreAdmin.prototype.createAdvanceBookingRequirementInstance = function (params) {
384
+ return __awaiter(this, void 0, void 0, function () {
385
+ var _a;
386
+ return __generator(this, function (_b) {
387
+ switch (_b.label) {
388
+ case 0:
389
+ if (!(service.AdvanceBookingRequirement.svc === undefined)) return [3 /*break*/, 2];
390
+ _a = service.AdvanceBookingRequirement;
391
+ return [4 /*yield*/, Promise.resolve().then(function () { return require('./chevreAdmin/advanceBookingRequirement'); })];
392
+ case 1:
393
+ _a.svc =
394
+ (_b.sent()).AdvanceBookingRequirementService;
395
+ _b.label = 2;
396
+ case 2: return [2 /*return*/, new service.AdvanceBookingRequirement.svc(__assign(__assign(__assign({}, this.options), params), { retryableStatusCodes: [] }))];
397
+ }
398
+ });
399
+ });
400
+ };
380
401
  ChevreAdmin.prototype.createAggregateOfferInstance = function (params) {
381
402
  return __awaiter(this, void 0, void 0, function () {
382
403
  var _a;