@cinerino/sdk 3.156.0 → 3.157.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,18 @@
1
+ import * as factory from '../factory';
2
+ import { IUnset, Service } from '../service';
3
+ /**
4
+ * アイテムコンディションサービス
5
+ */
6
+ export declare class OfferItemConditionService extends Service {
7
+ create(params: factory.offerItemCondition.IOfferItemCondition): Promise<factory.offerItemCondition.IOfferItemCondition>;
8
+ search(params: factory.offerItemCondition.ISearchConditions): Promise<{
9
+ data: factory.offerItemCondition.IOfferItemCondition[];
10
+ }>;
11
+ findById(params: {
12
+ id: string;
13
+ }): Promise<factory.offerItemCondition.IOfferItemCondition>;
14
+ update(params: factory.offerItemCondition.IOfferItemCondition & IUnset): Promise<void>;
15
+ deleteById(params: {
16
+ id: string;
17
+ }): Promise<void>;
18
+ }
@@ -0,0 +1,156 @@
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.OfferItemConditionService = void 0;
55
+ var http_status_1 = require("http-status");
56
+ var service_1 = require("../service");
57
+ /**
58
+ * アイテムコンディションサービス
59
+ */
60
+ var OfferItemConditionService = /** @class */ (function (_super) {
61
+ __extends(OfferItemConditionService, _super);
62
+ function OfferItemConditionService() {
63
+ return _super !== null && _super.apply(this, arguments) || this;
64
+ }
65
+ OfferItemConditionService.prototype.create = function (params) {
66
+ return __awaiter(this, void 0, void 0, function () {
67
+ var _this = this;
68
+ return __generator(this, function (_a) {
69
+ return [2 /*return*/, this.fetch({
70
+ uri: '/offerItemConditions',
71
+ method: 'POST',
72
+ body: params,
73
+ expectedStatusCodes: [http_status_1.CREATED]
74
+ })
75
+ .then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
76
+ return [2 /*return*/, response.json()];
77
+ }); }); })];
78
+ });
79
+ });
80
+ };
81
+ OfferItemConditionService.prototype.search = function (params) {
82
+ return __awaiter(this, void 0, void 0, function () {
83
+ var _this = this;
84
+ return __generator(this, function (_a) {
85
+ return [2 /*return*/, this.fetch({
86
+ uri: '/offerItemConditions',
87
+ method: 'GET',
88
+ qs: params,
89
+ expectedStatusCodes: [http_status_1.OK]
90
+ })
91
+ .then(function (response) { return __awaiter(_this, void 0, void 0, function () {
92
+ var _a;
93
+ return __generator(this, function (_b) {
94
+ switch (_b.label) {
95
+ case 0:
96
+ _a = {};
97
+ return [4 /*yield*/, response.json()];
98
+ case 1: return [2 /*return*/, (_a.data = _b.sent(),
99
+ _a)];
100
+ }
101
+ });
102
+ }); })];
103
+ });
104
+ });
105
+ };
106
+ OfferItemConditionService.prototype.findById = function (params) {
107
+ return __awaiter(this, void 0, void 0, function () {
108
+ var _this = this;
109
+ return __generator(this, function (_a) {
110
+ return [2 /*return*/, this.fetch({
111
+ uri: "/offerItemConditions/" + encodeURIComponent(String(params.id)),
112
+ method: 'GET',
113
+ expectedStatusCodes: [http_status_1.OK]
114
+ })
115
+ .then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
116
+ return [2 /*return*/, response.json()];
117
+ }); }); })];
118
+ });
119
+ });
120
+ };
121
+ OfferItemConditionService.prototype.update = function (params) {
122
+ return __awaiter(this, void 0, void 0, function () {
123
+ return __generator(this, function (_a) {
124
+ switch (_a.label) {
125
+ case 0: return [4 /*yield*/, this.fetch({
126
+ uri: "/offerItemConditions/" + encodeURIComponent(String(params.id)),
127
+ method: 'PUT',
128
+ body: params,
129
+ expectedStatusCodes: [http_status_1.NO_CONTENT]
130
+ })];
131
+ case 1:
132
+ _a.sent();
133
+ return [2 /*return*/];
134
+ }
135
+ });
136
+ });
137
+ };
138
+ OfferItemConditionService.prototype.deleteById = function (params) {
139
+ return __awaiter(this, void 0, void 0, function () {
140
+ return __generator(this, function (_a) {
141
+ switch (_a.label) {
142
+ case 0: return [4 /*yield*/, this.fetch({
143
+ uri: "/offerItemConditions/" + encodeURIComponent(String(params.id)),
144
+ method: 'DELETE',
145
+ expectedStatusCodes: [http_status_1.NO_CONTENT]
146
+ })];
147
+ case 1:
148
+ _a.sent();
149
+ return [2 /*return*/];
150
+ }
151
+ });
152
+ });
153
+ };
154
+ return OfferItemConditionService;
155
+ }(service_1.Service));
156
+ exports.OfferItemConditionService = OfferItemConditionService;
@@ -30,6 +30,7 @@ import { MeService } from './chevre/me';
30
30
  import { MerchantReturnPolicyService } from './chevre/merchantReturnPolicy';
31
31
  import { OfferService } from './chevre/offer';
32
32
  import { OfferCatalogService } from './chevre/offerCatalog';
33
+ import { OfferItemConditionService } from './chevre/offerItemCondition';
33
34
  import { OrderService } from './chevre/order';
34
35
  import { OrderNumberService } from './chevre/orderNumber';
35
36
  import { OwnershipInfoService } from './chevre/ownershipInfo';
@@ -216,6 +217,11 @@ export declare namespace service {
216
217
  */
217
218
  class OfferCatalog extends OfferCatalogService {
218
219
  }
220
+ /**
221
+ * アイテムコンディションサービス
222
+ */
223
+ class OfferItemCondition extends OfferItemConditionService {
224
+ }
219
225
  /**
220
226
  * 販売者サービス
221
227
  */
@@ -48,6 +48,7 @@ var me_1 = require("./chevre/me");
48
48
  var merchantReturnPolicy_1 = require("./chevre/merchantReturnPolicy");
49
49
  var offer_1 = require("./chevre/offer");
50
50
  var offerCatalog_1 = require("./chevre/offerCatalog");
51
+ var offerItemCondition_1 = require("./chevre/offerItemCondition");
51
52
  var order_1 = require("./chevre/order");
52
53
  var orderNumber_1 = require("./chevre/orderNumber");
53
54
  var ownershipInfo_1 = require("./chevre/ownershipInfo");
@@ -428,6 +429,17 @@ var service;
428
429
  return OfferCatalog;
429
430
  }(offerCatalog_1.OfferCatalogService));
430
431
  service.OfferCatalog = OfferCatalog;
432
+ /**
433
+ * アイテムコンディションサービス
434
+ */
435
+ var OfferItemCondition = /** @class */ (function (_super) {
436
+ __extends(OfferItemCondition, _super);
437
+ function OfferItemCondition() {
438
+ return _super !== null && _super.apply(this, arguments) || this;
439
+ }
440
+ return OfferItemCondition;
441
+ }(offerItemCondition_1.OfferItemConditionService));
442
+ service.OfferItemCondition = OfferItemCondition;
431
443
  /**
432
444
  * 販売者サービス
433
445
  */