@cinerino/sdk 5.1.0 → 5.2.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.
@@ -31,7 +31,7 @@ export declare class OfferCatalogService extends Service {
31
31
  */
32
32
  update(params: factory.offerCatalog.IOfferCatalog): Promise<void>;
33
33
  /**
34
- * オファーカタログ複数更新
34
+ * オファーカタログ複数編集
35
35
  */
36
36
  updateMany(params: {
37
37
  id: {
@@ -64,4 +64,7 @@ export declare class OfferCatalogService extends Service {
64
64
  page?: number;
65
65
  }): Promise<ISearchResult<IItemListElement[]>>;
66
66
  sync2aggregateOffers(): Promise<void>;
67
+ convert2offerCatalogItems(params: {
68
+ id: string;
69
+ }): Promise<Pick<ICreateResult, 'id'>>;
67
70
  }
@@ -141,7 +141,7 @@ var OfferCatalogService = /** @class */ (function (_super) {
141
141
  });
142
142
  };
143
143
  /**
144
- * オファーカタログ複数更新
144
+ * オファーカタログ複数編集
145
145
  */
146
146
  OfferCatalogService.prototype.updateMany = function (params) {
147
147
  return __awaiter(this, void 0, void 0, function () {
@@ -222,6 +222,21 @@ var OfferCatalogService = /** @class */ (function (_super) {
222
222
  });
223
223
  });
224
224
  };
225
+ OfferCatalogService.prototype.convert2offerCatalogItems = function (params) {
226
+ return __awaiter(this, void 0, void 0, function () {
227
+ var _this = this;
228
+ return __generator(this, function (_a) {
229
+ return [2 /*return*/, this.fetch({
230
+ uri: "/offerCatalogs/" + encodeURIComponent(String(params.id)) + "/convert2offerCatalogItems",
231
+ method: 'PUT',
232
+ expectedStatusCodes: [http_status_1.CREATED, http_status_1.OK]
233
+ })
234
+ .then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
235
+ return [2 /*return*/, response.json()];
236
+ }); }); })];
237
+ });
238
+ });
239
+ };
225
240
  return OfferCatalogService;
226
241
  }(service_1.Service));
227
242
  exports.OfferCatalogService = OfferCatalogService;
@@ -21,6 +21,28 @@ export declare class OfferCatalogItemService extends Service {
21
21
  create(params: factory.offerCatalog.IOfferCatalog): Promise<ICreateResult>;
22
22
  search(params: Omit<factory.offerCatalog.ISearchConditions, 'project'>): Promise<ISearchResult<IOfferCatalogAsSearchResult[]>>;
23
23
  update(params: factory.offerCatalog.IOfferCatalog): Promise<void>;
24
+ /**
25
+ * サブカタログ複数編集
26
+ */
27
+ updateMany(params: {
28
+ id: {
29
+ $in: string[];
30
+ };
31
+ $push: {
32
+ itemListElement: {
33
+ $each: factory.offerCatalog.IItemListElement[];
34
+ };
35
+ };
36
+ $pull: {
37
+ itemListElement: {
38
+ $elemMatch: {
39
+ id: {
40
+ $in: string[];
41
+ };
42
+ };
43
+ };
44
+ };
45
+ }): Promise<void>;
24
46
  deleteById(params: {
25
47
  id: string;
26
48
  }): Promise<void>;
@@ -131,6 +131,26 @@ var OfferCatalogItemService = /** @class */ (function (_super) {
131
131
  });
132
132
  });
133
133
  };
134
+ /**
135
+ * サブカタログ複数編集
136
+ */
137
+ OfferCatalogItemService.prototype.updateMany = function (params) {
138
+ return __awaiter(this, void 0, void 0, function () {
139
+ return __generator(this, function (_a) {
140
+ switch (_a.label) {
141
+ case 0: return [4 /*yield*/, this.fetch({
142
+ uri: "/offerCatalogItems",
143
+ method: 'PATCH',
144
+ body: params,
145
+ expectedStatusCodes: [http_status_1.NO_CONTENT]
146
+ })];
147
+ case 1:
148
+ _a.sent();
149
+ return [2 /*return*/];
150
+ }
151
+ });
152
+ });
153
+ };
134
154
  OfferCatalogItemService.prototype.deleteById = function (params) {
135
155
  return __awaiter(this, void 0, void 0, function () {
136
156
  return __generator(this, function (_a) {
package/lib/bundle.js CHANGED
@@ -7934,7 +7934,7 @@ var OfferCatalogService = /** @class */ (function (_super) {
7934
7934
  });
7935
7935
  };
7936
7936
  /**
7937
- * オファーカタログ複数更新
7937
+ * オファーカタログ複数編集
7938
7938
  */
7939
7939
  OfferCatalogService.prototype.updateMany = function (params) {
7940
7940
  return __awaiter(this, void 0, void 0, function () {
@@ -8015,6 +8015,21 @@ var OfferCatalogService = /** @class */ (function (_super) {
8015
8015
  });
8016
8016
  });
8017
8017
  };
8018
+ OfferCatalogService.prototype.convert2offerCatalogItems = function (params) {
8019
+ return __awaiter(this, void 0, void 0, function () {
8020
+ var _this = this;
8021
+ return __generator(this, function (_a) {
8022
+ return [2 /*return*/, this.fetch({
8023
+ uri: "/offerCatalogs/" + encodeURIComponent(String(params.id)) + "/convert2offerCatalogItems",
8024
+ method: 'PUT',
8025
+ expectedStatusCodes: [http_status_1.CREATED, http_status_1.OK]
8026
+ })
8027
+ .then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
8028
+ return [2 /*return*/, response.json()];
8029
+ }); }); })];
8030
+ });
8031
+ });
8032
+ };
8018
8033
  return OfferCatalogService;
8019
8034
  }(service_1.Service));
8020
8035
  exports.OfferCatalogService = OfferCatalogService;
@@ -8153,6 +8168,26 @@ var OfferCatalogItemService = /** @class */ (function (_super) {
8153
8168
  });
8154
8169
  });
8155
8170
  };
8171
+ /**
8172
+ * サブカタログ複数編集
8173
+ */
8174
+ OfferCatalogItemService.prototype.updateMany = function (params) {
8175
+ return __awaiter(this, void 0, void 0, function () {
8176
+ return __generator(this, function (_a) {
8177
+ switch (_a.label) {
8178
+ case 0: return [4 /*yield*/, this.fetch({
8179
+ uri: "/offerCatalogItems",
8180
+ method: 'PATCH',
8181
+ body: params,
8182
+ expectedStatusCodes: [http_status_1.NO_CONTENT]
8183
+ })];
8184
+ case 1:
8185
+ _a.sent();
8186
+ return [2 /*return*/];
8187
+ }
8188
+ });
8189
+ });
8190
+ };
8156
8191
  OfferCatalogItemService.prototype.deleteById = function (params) {
8157
8192
  return __awaiter(this, void 0, void 0, function () {
8158
8193
  return __generator(this, function (_a) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cinerino/sdk",
3
- "version": "5.1.0",
3
+ "version": "5.2.0-alpha.1",
4
4
  "description": "Cinerino SDK",
5
5
  "main": "./lib/index.js",
6
6
  "browser": {