@cinerino/sdk 12.8.0 → 12.9.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,89 @@
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.EventOfferService = void 0;
55
+ var http_status_1 = require("http-status");
56
+ var service_1 = require("../../service");
57
+ var BASE_URI = '/eventOffers';
58
+ /**
59
+ * イベントオファーサービス
60
+ */
61
+ var EventOfferService = /** @class */ (function (_super) {
62
+ __extends(EventOfferService, _super);
63
+ function EventOfferService() {
64
+ return _super !== null && _super.apply(this, arguments) || this;
65
+ }
66
+ /**
67
+ * イベントオファーを検索する
68
+ */
69
+ EventOfferService.prototype.findEventOffers = function (params) {
70
+ return __awaiter(this, void 0, void 0, function () {
71
+ var limit, page, availableAtOrFromIdentifier, itemOfferedId, itemOfferedIds;
72
+ var _this = this;
73
+ return __generator(this, function (_a) {
74
+ limit = params.limit, page = params.page, availableAtOrFromIdentifier = params.availableAtOrFromIdentifier, itemOfferedId = params.itemOfferedId, itemOfferedIds = params.itemOfferedIds;
75
+ return [2 /*return*/, this.fetch({
76
+ uri: BASE_URI,
77
+ method: 'GET',
78
+ qs: { limit: limit, page: page, availableAtOrFromIdentifier: availableAtOrFromIdentifier, itemOfferedId: itemOfferedId, itemOfferedIds: itemOfferedIds },
79
+ expectedStatusCodes: [http_status_1.OK]
80
+ })
81
+ .then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
82
+ return [2 /*return*/, response.json()];
83
+ }); }); })];
84
+ });
85
+ });
86
+ };
87
+ return EventOfferService;
88
+ }(service_1.Service));
89
+ exports.EventOfferService = EventOfferService;
@@ -1,5 +1,6 @@
1
1
  import { IAdditionalOptions, IOptions } from '../service';
2
2
  import type { CreativeWorkService } from './search/creativeWork';
3
+ import type { EventOfferService } from './search/eventOffer';
3
4
  import type { PaymentProductService } from './search/paymentService';
4
5
  import type { ProductService } from './search/product';
5
6
  import type { ProductOfferService } from './search/productOffer';
@@ -14,6 +15,13 @@ export declare namespace service {
14
15
  namespace CreativeWork {
15
16
  let svc: typeof CreativeWorkService | undefined;
16
17
  }
18
+ /**
19
+ * イベントオファーサービス
20
+ */
21
+ type EventOffer = EventOfferService;
22
+ namespace EventOffer {
23
+ let svc: typeof EventOfferService | undefined;
24
+ }
17
25
  /**
18
26
  * 決済商品サービス
19
27
  */
@@ -46,6 +54,10 @@ export declare class CloudSearch {
46
54
  * コンテンツサービスインスタンス生成
47
55
  */
48
56
  createCreativeWorkInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<CreativeWorkService>;
57
+ /**
58
+ * イベントオファーサービスインスタンス生成
59
+ */
60
+ createEventOfferInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<EventOfferService>;
49
61
  /**
50
62
  * 決済商品サービスインスタンス生成
51
63
  */
@@ -58,6 +58,9 @@ var service;
58
58
  var CreativeWork;
59
59
  (function (CreativeWork) {
60
60
  })(CreativeWork = service.CreativeWork || (service.CreativeWork = {}));
61
+ var EventOffer;
62
+ (function (EventOffer) {
63
+ })(EventOffer = service.EventOffer || (service.EventOffer = {}));
61
64
  var PaymentProduct;
62
65
  (function (PaymentProduct) {
63
66
  })(PaymentProduct = service.PaymentProduct || (service.PaymentProduct = {}));
@@ -96,6 +99,26 @@ var CloudSearch = /** @class */ (function () {
96
99
  });
97
100
  });
98
101
  };
102
+ /**
103
+ * イベントオファーサービスインスタンス生成
104
+ */
105
+ CloudSearch.prototype.createEventOfferInstance = function (params) {
106
+ return __awaiter(this, void 0, void 0, function () {
107
+ var _a;
108
+ return __generator(this, function (_b) {
109
+ switch (_b.label) {
110
+ case 0:
111
+ if (!(service.EventOffer.svc === undefined)) return [3 /*break*/, 2];
112
+ _a = service.EventOffer;
113
+ return [4 /*yield*/, Promise.resolve().then(function () { return require('./search/eventOffer'); })];
114
+ case 1:
115
+ _a.svc = (_b.sent()).EventOfferService;
116
+ _b.label = 2;
117
+ case 2: return [2 /*return*/, new service.EventOffer.svc(__assign(__assign(__assign({}, this.options), params), { retryableStatusCodes: defaultRetryableStatusCodes }))];
118
+ }
119
+ });
120
+ });
121
+ };
99
122
  /**
100
123
  * 決済商品サービスインスタンス生成
101
124
  */