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

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.
@@ -3368,11 +3368,11 @@ var TaskName;
3368
3368
  /**
3369
3369
  * 決済
3370
3370
  */
3371
- TaskName["ConfirmPay"] = "confirmPay";
3371
+ // ConfirmPay = 'confirmPay',
3372
3372
  /**
3373
3373
  * 返金
3374
3374
  */
3375
- TaskName["ConfirmRefund"] = "confirmRefund";
3375
+ // ConfirmRefund = 'confirmRefund',
3376
3376
  /**
3377
3377
  * サービス登録
3378
3378
  */
@@ -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) {
@@ -4,7 +4,7 @@ import * as client from '../../../lib/index';
4
4
  // import { auth } from '../auth/clientCredentials';
5
5
  import * as auth from '../auth/auth';
6
6
 
7
- const project = { id: 'cinerino' };
7
+ const project = { id: process.env.PROJECT_ID };
8
8
 
9
9
  const profile = {
10
10
  email: <string>process.env.TEST_PROFILE_EMAIL,
package/lib/bundle.js CHANGED
@@ -3410,11 +3410,11 @@ var TaskName;
3410
3410
  /**
3411
3411
  * 決済
3412
3412
  */
3413
- TaskName["ConfirmPay"] = "confirmPay";
3413
+ // ConfirmPay = 'confirmPay',
3414
3414
  /**
3415
3415
  * 返金
3416
3416
  */
3417
- TaskName["ConfirmRefund"] = "confirmRefund";
3417
+ // ConfirmRefund = 'confirmRefund',
3418
3418
  /**
3419
3419
  * サービス登録
3420
3420
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cinerino/sdk",
3
- "version": "3.104.0-alpha.4",
3
+ "version": "3.104.0-alpha.5",
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.4",
100
+ "@cinerino/api-abstract-client": "3.104.0-alpha.5",
101
101
  "debug": "^3.2.6",
102
102
  "http-status": "^1.4.2",
103
103
  "idtoken-verifier": "^2.0.3",