@cinerino/sdk 10.21.0-alpha.37 → 10.21.0-alpha.39

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,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.EventOfferService = void 0;
66
+ var http_status_1 = require("http-status");
67
+ var service_1 = require("../service");
68
+ /**
69
+ * イベントオファーサービス
70
+ */
71
+ var EventOfferService = /** @class */ (function (_super) {
72
+ __extends(EventOfferService, _super);
73
+ function EventOfferService() {
74
+ return _super !== null && _super.apply(this, arguments) || this;
75
+ }
76
+ EventOfferService.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: '/eventOffers',
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
+ EventOfferService.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: '/eventOffers',
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
+ EventOfferService.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: "/eventOffers/" + 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
+ EventOfferService.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: "/eventOffers/" + 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 EventOfferService;
148
+ }(service_1.Service));
149
+ exports.EventOfferService = EventOfferService;
@@ -23,6 +23,7 @@ import type { CustomerService } from './chevreAdmin/customer';
23
23
  import type { CustomerTypeService } from './chevreAdmin/customerType';
24
24
  import type { EmailMessageService } from './chevreAdmin/emailMessage';
25
25
  import type { EventService } from './chevreAdmin/event';
26
+ import type { EventOfferService } from './chevreAdmin/eventOffer';
26
27
  import type { EventSeriesService } from './chevreAdmin/eventSeries';
27
28
  import type { HasMerchantReturnPolicyService } from './chevreAdmin/hasMerchantReturnPolicy';
28
29
  import type { IAMService } from './chevreAdmin/iam';
@@ -196,6 +197,13 @@ export declare namespace service {
196
197
  namespace Event {
197
198
  let svc: typeof EventService | undefined;
198
199
  }
200
+ /**
201
+ * イベントオファーサービス
202
+ */
203
+ type EventOffer = EventOfferService;
204
+ namespace EventOffer {
205
+ let svc: typeof EventOfferService | undefined;
206
+ }
199
207
  /**
200
208
  * 施設コンテンツサービス
201
209
  */
@@ -589,6 +597,7 @@ export declare class ChevreAdmin {
589
597
  createCustomerTypeInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<CustomerTypeService>;
590
598
  createEmailMessageInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<EmailMessageService>;
591
599
  createEventInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<EventService>;
600
+ createEventOfferInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<EventOfferService>;
592
601
  createEventSeriesInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<EventSeriesService>;
593
602
  createHasMerchantReturnPolicyInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<HasMerchantReturnPolicyService>;
594
603
  createIAMInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<IAMService>;
@@ -104,6 +104,9 @@ var service;
104
104
  var Event;
105
105
  (function (Event) {
106
106
  })(Event = service.Event || (service.Event = {}));
107
+ var EventOffer;
108
+ (function (EventOffer) {
109
+ })(EventOffer = service.EventOffer || (service.EventOffer = {}));
107
110
  var EventSeries;
108
111
  (function (EventSeries) {
109
112
  })(EventSeries = service.EventSeries || (service.EventSeries = {}));
@@ -588,6 +591,23 @@ var ChevreAdmin = /** @class */ (function () {
588
591
  });
589
592
  });
590
593
  };
594
+ ChevreAdmin.prototype.createEventOfferInstance = function (params) {
595
+ return __awaiter(this, void 0, void 0, function () {
596
+ var _a;
597
+ return __generator(this, function (_b) {
598
+ switch (_b.label) {
599
+ case 0:
600
+ if (!(service.EventOffer.svc === undefined)) return [3 /*break*/, 2];
601
+ _a = service.EventOffer;
602
+ return [4 /*yield*/, Promise.resolve().then(function () { return require('./chevreAdmin/eventOffer'); })];
603
+ case 1:
604
+ _a.svc = (_b.sent()).EventOfferService;
605
+ _b.label = 2;
606
+ case 2: return [2 /*return*/, new service.EventOffer.svc(__assign(__assign(__assign({}, this.options), params), { retryableStatusCodes: [] }))];
607
+ }
608
+ });
609
+ });
610
+ };
591
611
  ChevreAdmin.prototype.createEventSeriesInstance = function (params) {
592
612
  return __awaiter(this, void 0, void 0, function () {
593
613
  var _a;