@cinerino/sdk 3.104.0-alpha.3 → 3.104.0-alpha.4

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.
Files changed (2) hide show
  1. package/lib/bundle.js +41 -1
  2. package/package.json +2 -2
package/lib/bundle.js CHANGED
@@ -7653,6 +7653,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
7653
7653
  Object.defineProperty(exports, "__esModule", { value: true });
7654
7654
  exports.OfferService = void 0;
7655
7655
  var http_status_1 = require("http-status");
7656
+ var factory = require("../factory");
7656
7657
  var service_1 = require("../service");
7657
7658
  /**
7658
7659
  * オファーサービス
@@ -7763,11 +7764,50 @@ var OfferService = /** @class */ (function (_super) {
7763
7764
  });
7764
7765
  });
7765
7766
  };
7767
+ /**
7768
+ * プロダクトオファー承認
7769
+ */
7770
+ OfferService.prototype.authorizeProduct = function (params) {
7771
+ return __awaiter(this, void 0, void 0, function () {
7772
+ var _this = this;
7773
+ return __generator(this, function (_a) {
7774
+ return [2 /*return*/, this.fetch({
7775
+ uri: "/offers/" + factory.product.ProductType.Product + "/authorize",
7776
+ method: 'POST',
7777
+ expectedStatusCodes: [http_status_1.CREATED],
7778
+ body: params
7779
+ })
7780
+ .then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
7781
+ return [2 /*return*/, response.json()];
7782
+ }); }); })];
7783
+ });
7784
+ });
7785
+ };
7786
+ /**
7787
+ * オファー承認取消
7788
+ */
7789
+ OfferService.prototype.voidAuthorization = function (params) {
7790
+ return __awaiter(this, void 0, void 0, function () {
7791
+ return __generator(this, function (_a) {
7792
+ switch (_a.label) {
7793
+ case 0: return [4 /*yield*/, this.fetch({
7794
+ uri: "/offers/" + params.object.itemOffered.typeOf + "/authorize/" + params.id + "/void",
7795
+ method: 'PUT',
7796
+ expectedStatusCodes: [http_status_1.NO_CONTENT],
7797
+ body: params
7798
+ })];
7799
+ case 1:
7800
+ _a.sent();
7801
+ return [2 /*return*/];
7802
+ }
7803
+ });
7804
+ });
7805
+ };
7766
7806
  return OfferService;
7767
7807
  }(service_1.Service));
7768
7808
  exports.OfferService = OfferService;
7769
7809
 
7770
- },{"../service":212,"http-status":275}],184:[function(require,module,exports){
7810
+ },{"../factory":205,"../service":212,"http-status":275}],184:[function(require,module,exports){
7771
7811
  "use strict";
7772
7812
  var __extends = (this && this.__extends) || (function () {
7773
7813
  var extendStatics = function (d, b) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cinerino/sdk",
3
- "version": "3.104.0-alpha.3",
3
+ "version": "3.104.0-alpha.4",
4
4
  "description": "Cinerino SDK",
5
5
  "main": "./lib/index.js",
6
6
  "browser": {
@@ -97,7 +97,7 @@
97
97
  "watchify": "^3.11.1"
98
98
  },
99
99
  "dependencies": {
100
- "@cinerino/api-abstract-client": "3.104.0-alpha.3",
100
+ "@cinerino/api-abstract-client": "3.104.0-alpha.4",
101
101
  "debug": "^3.2.6",
102
102
  "http-status": "^1.4.2",
103
103
  "idtoken-verifier": "^2.0.3",