@cinerino/sdk 3.166.0 → 3.167.0-alpha.1

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,16 @@
1
+ import * as factory from '../factory';
2
+ import { ISearchResult, Service } from '../service';
3
+ export interface IProjectionSearchConditions {
4
+ $projection?: {
5
+ [key in keyof factory.unitPriceOffer.IUnitPriceOffer]?: 0 | 1;
6
+ };
7
+ }
8
+ /**
9
+ * 集計オファーサービス
10
+ */
11
+ export declare class AggregateOfferService extends Service {
12
+ /**
13
+ * オファー検索
14
+ */
15
+ search(params: Omit<factory.unitPriceOffer.ISearchConditions, 'project'> & IProjectionSearchConditions): Promise<ISearchResult<factory.aggregateOffer.IAggregateOffer[]>>;
16
+ }
@@ -0,0 +1,95 @@
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.AggregateOfferService = void 0;
55
+ var http_status_1 = require("http-status");
56
+ var service_1 = require("../service");
57
+ /**
58
+ * 集計オファーサービス
59
+ */
60
+ var AggregateOfferService = /** @class */ (function (_super) {
61
+ __extends(AggregateOfferService, _super);
62
+ function AggregateOfferService() {
63
+ return _super !== null && _super.apply(this, arguments) || this;
64
+ }
65
+ /**
66
+ * オファー検索
67
+ */
68
+ AggregateOfferService.prototype.search = function (params) {
69
+ return __awaiter(this, void 0, void 0, function () {
70
+ var _this = this;
71
+ return __generator(this, function (_a) {
72
+ return [2 /*return*/, this.fetch({
73
+ uri: '/aggregateOffers',
74
+ method: 'GET',
75
+ qs: params,
76
+ expectedStatusCodes: [http_status_1.OK]
77
+ })
78
+ .then(function (response) { return __awaiter(_this, void 0, void 0, function () {
79
+ var _a;
80
+ return __generator(this, function (_b) {
81
+ switch (_b.label) {
82
+ case 0:
83
+ _a = {};
84
+ return [4 /*yield*/, response.json()];
85
+ case 1: return [2 /*return*/, (_a.data = _b.sent(),
86
+ _a)];
87
+ }
88
+ });
89
+ }); })];
90
+ });
91
+ });
92
+ };
93
+ return AggregateOfferService;
94
+ }(service_1.Service));
95
+ exports.AggregateOfferService = AggregateOfferService;
@@ -56,5 +56,6 @@ export declare class OfferCatalogService extends Service {
56
56
  id: string;
57
57
  limit?: number;
58
58
  page?: number;
59
+ useOffersAsPrimary?: boolean;
59
60
  }): Promise<ISearchResult<IItemListElement[]>>;
60
61
  }
@@ -9,6 +9,7 @@ import { AccountTitleService } from './chevre/accountTitle';
9
9
  import { AccountTransactionService } from './chevre/accountTransaction';
10
10
  import { ActionService } from './chevre/action';
11
11
  import { AdditionalPropertyService } from './chevre/additionalProperty';
12
+ import { AggregateOfferService } from './chevre/aggregateOffer';
12
13
  import { AggregationService } from './chevre/aggregation';
13
14
  import { AssetTransactionService } from './chevre/assetTransaction';
14
15
  import { CancelReservationAssetTransactionService } from './chevre/assetTransaction/cancelReservation';
@@ -86,6 +87,11 @@ export declare namespace service {
86
87
  */
87
88
  class AdditionalProperty extends AdditionalPropertyService {
88
89
  }
90
+ /**
91
+ * 集計オファーサービス
92
+ */
93
+ class AggregateOffer extends AggregateOfferService {
94
+ }
89
95
  /**
90
96
  * 集計サービス
91
97
  */
@@ -27,6 +27,7 @@ var accountTitle_1 = require("./chevre/accountTitle");
27
27
  var accountTransaction_1 = require("./chevre/accountTransaction");
28
28
  var action_1 = require("./chevre/action");
29
29
  var additionalProperty_1 = require("./chevre/additionalProperty");
30
+ var aggregateOffer_1 = require("./chevre/aggregateOffer");
30
31
  var aggregation_1 = require("./chevre/aggregation");
31
32
  var assetTransaction_1 = require("./chevre/assetTransaction");
32
33
  var cancelReservation_1 = require("./chevre/assetTransaction/cancelReservation");
@@ -140,6 +141,17 @@ var service;
140
141
  return AdditionalProperty;
141
142
  }(additionalProperty_1.AdditionalPropertyService));
142
143
  service.AdditionalProperty = AdditionalProperty;
144
+ /**
145
+ * 集計オファーサービス
146
+ */
147
+ var AggregateOffer = /** @class */ (function (_super) {
148
+ __extends(AggregateOffer, _super);
149
+ function AggregateOffer() {
150
+ return _super !== null && _super.apply(this, arguments) || this;
151
+ }
152
+ return AggregateOffer;
153
+ }(aggregateOffer_1.AggregateOfferService));
154
+ service.AggregateOffer = AggregateOffer;
143
155
  /**
144
156
  * 集計サービス
145
157
  */