@cinerino/sdk 5.13.0-alpha.1 → 5.13.0-alpha.2

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.
@@ -1,6 +1,6 @@
1
1
  import { ITicket, IUseAction } from '../chevreAdmin/reservation/factory';
2
2
  import * as factory from '../factory';
3
- import { ISearchResult, Service } from '../service';
3
+ import { Service } from '../service';
4
4
  /**
5
5
  * 予約サービス
6
6
  */
@@ -33,16 +33,16 @@ export declare class ReservationService extends Service {
33
33
  };
34
34
  }): Promise<void>;
35
35
  /**
36
- * 予約に対する入場アクションを検索する
36
+ * 予約に対する使用アクション検索
37
37
  */
38
38
  searchUseActions(params: {
39
39
  object: {
40
40
  /**
41
41
  * 予約ID
42
42
  */
43
- id?: string;
43
+ id: string;
44
44
  };
45
- }): Promise<ISearchResult<IUseAction[]>>;
45
+ }): Promise<IUseAction[]>;
46
46
  /**
47
47
  * 予約取消
48
48
  * 再定義(2023-08-01~)
@@ -115,7 +115,7 @@ var ReservationService = /** @class */ (function (_super) {
115
115
  });
116
116
  };
117
117
  /**
118
- * 予約に対する入場アクションを検索する
118
+ * 予約に対する使用アクション検索
119
119
  */
120
120
  ReservationService.prototype.searchUseActions = function (params) {
121
121
  return __awaiter(this, void 0, void 0, function () {
@@ -124,21 +124,12 @@ var ReservationService = /** @class */ (function (_super) {
124
124
  return [2 /*return*/, this.fetch({
125
125
  uri: "/reservations/" + String(params.object.id) + "/actions/use",
126
126
  method: 'GET',
127
- qs: params,
127
+ // qs: params,
128
128
  expectedStatusCodes: [http_status_1.OK]
129
129
  })
130
- .then(function (response) { return __awaiter(_this, void 0, void 0, function () {
131
- var _a;
132
- return __generator(this, function (_b) {
133
- switch (_b.label) {
134
- case 0:
135
- _a = {};
136
- return [4 /*yield*/, response.json()];
137
- case 1: return [2 /*return*/, (_a.data = _b.sent(),
138
- _a)];
139
- }
140
- });
141
- }); })];
130
+ .then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
131
+ return [2 /*return*/, response.json()];
132
+ }); }); })];
142
133
  });
143
134
  });
144
135
  };
@@ -3,9 +3,7 @@ import * as factory from '../../factory';
3
3
  * 予約使用アクション
4
4
  */
5
5
  export interface IUseAction {
6
- actionStatus: factory.actionStatusType;
7
6
  id: string;
8
- project: factory.project.IProject;
9
7
  startDate: Date;
10
8
  typeOf: factory.actionType.UseAction;
11
9
  location?: factory.action.consume.use.reservation.ILocation;
@@ -61,10 +61,6 @@ export declare class ReservationService extends Service {
61
61
  };
62
62
  startFrom?: Date;
63
63
  startThrough?: Date;
64
- } & {
65
- $projection?: {
66
- [key in keyof IUseAction]?: 0;
67
- };
68
- }): Promise<ISearchResult<IUseAction[]>>;
64
+ }): Promise<IUseAction[]>;
69
65
  }
70
66
  export {};
@@ -50,6 +50,17 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
50
50
  if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
51
51
  }
52
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
+ };
53
64
  Object.defineProperty(exports, "__esModule", { value: true });
54
65
  exports.ReservationService = void 0;
55
66
  var http_status_1 = require("http-status");
@@ -136,29 +147,28 @@ var ReservationService = /** @class */ (function (_super) {
136
147
  /**
137
148
  * 予約に対する使用アクション検索
138
149
  */
139
- ReservationService.prototype.searchUseActions = function (params) {
150
+ ReservationService.prototype.searchUseActions = function (params
151
+ // & {
152
+ // $projection?: {
153
+ // [key in keyof IUseAction]?: 0;
154
+ // };
155
+ // }
156
+ ) {
140
157
  var _a;
141
158
  return __awaiter(this, void 0, void 0, function () {
159
+ var object, queryParams;
142
160
  var _this = this;
143
161
  return __generator(this, function (_b) {
162
+ object = params.object, queryParams = __rest(params, ["object"]);
144
163
  return [2 /*return*/, this.fetch({
145
164
  uri: "/reservations/" + String((_a = params.object) === null || _a === void 0 ? void 0 : _a.id) + "/actions/use",
146
165
  method: 'GET',
147
- qs: params,
166
+ qs: queryParams,
148
167
  expectedStatusCodes: [http_status_1.OK]
149
168
  })
150
- .then(function (response) { return __awaiter(_this, void 0, void 0, function () {
151
- var _a;
152
- return __generator(this, function (_b) {
153
- switch (_b.label) {
154
- case 0:
155
- _a = {};
156
- return [4 /*yield*/, response.json()];
157
- case 1: return [2 /*return*/, (_a.data = _b.sent(),
158
- _a)];
159
- }
160
- });
161
- }); })];
169
+ .then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
170
+ return [2 /*return*/, response.json()];
171
+ }); }); })];
162
172
  });
163
173
  });
164
174
  };
package/lib/bundle.js CHANGED
@@ -1453,7 +1453,7 @@ var ReservationService = /** @class */ (function (_super) {
1453
1453
  });
1454
1454
  };
1455
1455
  /**
1456
- * 予約に対する入場アクションを検索する
1456
+ * 予約に対する使用アクション検索
1457
1457
  */
1458
1458
  ReservationService.prototype.searchUseActions = function (params) {
1459
1459
  return __awaiter(this, void 0, void 0, function () {
@@ -1462,21 +1462,12 @@ var ReservationService = /** @class */ (function (_super) {
1462
1462
  return [2 /*return*/, this.fetch({
1463
1463
  uri: "/reservations/" + String(params.object.id) + "/actions/use",
1464
1464
  method: 'GET',
1465
- qs: params,
1465
+ // qs: params,
1466
1466
  expectedStatusCodes: [http_status_1.OK]
1467
1467
  })
1468
- .then(function (response) { return __awaiter(_this, void 0, void 0, function () {
1469
- var _a;
1470
- return __generator(this, function (_b) {
1471
- switch (_b.label) {
1472
- case 0:
1473
- _a = {};
1474
- return [4 /*yield*/, response.json()];
1475
- case 1: return [2 /*return*/, (_a.data = _b.sent(),
1476
- _a)];
1477
- }
1478
- });
1479
- }); })];
1468
+ .then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
1469
+ return [2 /*return*/, response.json()];
1470
+ }); }); })];
1480
1471
  });
1481
1472
  });
1482
1473
  };
@@ -12664,6 +12655,17 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
12664
12655
  if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
12665
12656
  }
12666
12657
  };
12658
+ var __rest = (this && this.__rest) || function (s, e) {
12659
+ var t = {};
12660
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
12661
+ t[p] = s[p];
12662
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
12663
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
12664
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
12665
+ t[p[i]] = s[p[i]];
12666
+ }
12667
+ return t;
12668
+ };
12667
12669
  Object.defineProperty(exports, "__esModule", { value: true });
12668
12670
  exports.ReservationService = void 0;
12669
12671
  var http_status_1 = require("http-status");
@@ -12750,29 +12752,28 @@ var ReservationService = /** @class */ (function (_super) {
12750
12752
  /**
12751
12753
  * 予約に対する使用アクション検索
12752
12754
  */
12753
- ReservationService.prototype.searchUseActions = function (params) {
12755
+ ReservationService.prototype.searchUseActions = function (params
12756
+ // & {
12757
+ // $projection?: {
12758
+ // [key in keyof IUseAction]?: 0;
12759
+ // };
12760
+ // }
12761
+ ) {
12754
12762
  var _a;
12755
12763
  return __awaiter(this, void 0, void 0, function () {
12764
+ var object, queryParams;
12756
12765
  var _this = this;
12757
12766
  return __generator(this, function (_b) {
12767
+ object = params.object, queryParams = __rest(params, ["object"]);
12758
12768
  return [2 /*return*/, this.fetch({
12759
12769
  uri: "/reservations/" + String((_a = params.object) === null || _a === void 0 ? void 0 : _a.id) + "/actions/use",
12760
12770
  method: 'GET',
12761
- qs: params,
12771
+ qs: queryParams,
12762
12772
  expectedStatusCodes: [http_status_1.OK]
12763
12773
  })
12764
- .then(function (response) { return __awaiter(_this, void 0, void 0, function () {
12765
- var _a;
12766
- return __generator(this, function (_b) {
12767
- switch (_b.label) {
12768
- case 0:
12769
- _a = {};
12770
- return [4 /*yield*/, response.json()];
12771
- case 1: return [2 /*return*/, (_a.data = _b.sent(),
12772
- _a)];
12773
- }
12774
- });
12775
- }); })];
12774
+ .then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
12775
+ return [2 /*return*/, response.json()];
12776
+ }); }); })];
12776
12777
  });
12777
12778
  });
12778
12779
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cinerino/sdk",
3
- "version": "5.13.0-alpha.1",
3
+ "version": "5.13.0-alpha.2",
4
4
  "description": "Cinerino SDK",
5
5
  "main": "./lib/index.js",
6
6
  "browser": {