@cinerino/sdk 3.40.0-alpha.3 → 3.40.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.
package/CHANGELOG.md CHANGED
@@ -13,6 +13,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/).
13
13
  - Chevreにマイ所有権検索を追加
14
14
  - Chevreにマイ所有権削除を追加
15
15
  - Chevreに会員(自分)削除を追加
16
+ - Chevreにマイ注文検索を追加
17
+ - Chevreにマイクレジットカード管理を追加
16
18
 
17
19
  ### Changed
18
20
 
@@ -8415,6 +8415,36 @@ var PersonService = /** @class */ (function (_super) {
8415
8415
  });
8416
8416
  });
8417
8417
  };
8418
+ /**
8419
+ * 注文を検索する
8420
+ */
8421
+ PersonService.prototype.searchOrders = function (params) {
8422
+ return __awaiter(this, void 0, void 0, function () {
8423
+ var id;
8424
+ var _this = this;
8425
+ return __generator(this, function (_a) {
8426
+ id = (typeof params.id === 'string') ? params.id : 'me';
8427
+ return [2 /*return*/, this.fetch({
8428
+ uri: "/people/" + id + "/orders",
8429
+ method: 'GET',
8430
+ qs: params,
8431
+ expectedStatusCodes: [http_status_1.OK]
8432
+ })
8433
+ .then(function (response) { return __awaiter(_this, void 0, void 0, function () {
8434
+ var _a;
8435
+ return __generator(this, function (_b) {
8436
+ switch (_b.label) {
8437
+ case 0:
8438
+ _a = {};
8439
+ return [4 /*yield*/, response.json()];
8440
+ case 1: return [2 /*return*/, (_a.data = _b.sent(),
8441
+ _a)];
8442
+ }
8443
+ });
8444
+ }); })];
8445
+ });
8446
+ });
8447
+ };
8418
8448
  /**
8419
8449
  * 会員検索
8420
8450
  */
@@ -8562,10 +8592,12 @@ var PersonOwnershipInfoService = /** @class */ (function (_super) {
8562
8592
  */
8563
8593
  PersonOwnershipInfoService.prototype.addCreditCard = function (params) {
8564
8594
  return __awaiter(this, void 0, void 0, function () {
8595
+ var id;
8565
8596
  var _this = this;
8566
8597
  return __generator(this, function (_a) {
8598
+ id = (typeof params.id === 'string') ? params.id : 'me';
8567
8599
  return [2 /*return*/, this.fetch({
8568
- uri: "/people/" + String(params.id) + "/paymentMethod/creditCards",
8600
+ uri: "/people/" + id + "/paymentMethod/creditCards",
8569
8601
  method: 'POST',
8570
8602
  body: params.creditCard,
8571
8603
  expectedStatusCodes: [http_status_1.CREATED],
@@ -8582,10 +8614,12 @@ var PersonOwnershipInfoService = /** @class */ (function (_super) {
8582
8614
  */
8583
8615
  PersonOwnershipInfoService.prototype.searchCreditCards = function (params) {
8584
8616
  return __awaiter(this, void 0, void 0, function () {
8617
+ var id;
8585
8618
  var _this = this;
8586
8619
  return __generator(this, function (_a) {
8620
+ id = (typeof params.id === 'string') ? params.id : 'me';
8587
8621
  return [2 /*return*/, this.fetch({
8588
- uri: "/people/" + String(params.id) + "/paymentMethod/creditCards",
8622
+ uri: "/people/" + id + "/paymentMethod/creditCards",
8589
8623
  method: 'GET',
8590
8624
  qs: { iss: params.iss },
8591
8625
  expectedStatusCodes: [http_status_1.OK]
@@ -8601,14 +8635,17 @@ var PersonOwnershipInfoService = /** @class */ (function (_super) {
8601
8635
  */
8602
8636
  PersonOwnershipInfoService.prototype.deleteCreditCard = function (params) {
8603
8637
  return __awaiter(this, void 0, void 0, function () {
8638
+ var id;
8604
8639
  return __generator(this, function (_a) {
8605
8640
  switch (_a.label) {
8606
- case 0: return [4 /*yield*/, this.fetch({
8607
- uri: "/people/" + String(params.id) + "/paymentMethod/creditCards/" + String(params.cardSeq),
8608
- method: 'DELETE',
8609
- expectedStatusCodes: [http_status_1.NO_CONTENT],
8610
- qs: { iss: params.iss }
8611
- })];
8641
+ case 0:
8642
+ id = (typeof params.id === 'string') ? params.id : 'me';
8643
+ return [4 /*yield*/, this.fetch({
8644
+ uri: "/people/" + id + "/paymentMethod/creditCards/" + String(params.cardSeq),
8645
+ method: 'DELETE',
8646
+ expectedStatusCodes: [http_status_1.NO_CONTENT],
8647
+ qs: { iss: params.iss }
8648
+ })];
8612
8649
  case 1:
8613
8650
  _a.sent();
8614
8651
  return [2 /*return*/];
package/lib/bundle.js CHANGED
@@ -8415,6 +8415,36 @@ var PersonService = /** @class */ (function (_super) {
8415
8415
  });
8416
8416
  });
8417
8417
  };
8418
+ /**
8419
+ * 注文を検索する
8420
+ */
8421
+ PersonService.prototype.searchOrders = function (params) {
8422
+ return __awaiter(this, void 0, void 0, function () {
8423
+ var id;
8424
+ var _this = this;
8425
+ return __generator(this, function (_a) {
8426
+ id = (typeof params.id === 'string') ? params.id : 'me';
8427
+ return [2 /*return*/, this.fetch({
8428
+ uri: "/people/" + id + "/orders",
8429
+ method: 'GET',
8430
+ qs: params,
8431
+ expectedStatusCodes: [http_status_1.OK]
8432
+ })
8433
+ .then(function (response) { return __awaiter(_this, void 0, void 0, function () {
8434
+ var _a;
8435
+ return __generator(this, function (_b) {
8436
+ switch (_b.label) {
8437
+ case 0:
8438
+ _a = {};
8439
+ return [4 /*yield*/, response.json()];
8440
+ case 1: return [2 /*return*/, (_a.data = _b.sent(),
8441
+ _a)];
8442
+ }
8443
+ });
8444
+ }); })];
8445
+ });
8446
+ });
8447
+ };
8418
8448
  /**
8419
8449
  * 会員検索
8420
8450
  */
@@ -8562,10 +8592,12 @@ var PersonOwnershipInfoService = /** @class */ (function (_super) {
8562
8592
  */
8563
8593
  PersonOwnershipInfoService.prototype.addCreditCard = function (params) {
8564
8594
  return __awaiter(this, void 0, void 0, function () {
8595
+ var id;
8565
8596
  var _this = this;
8566
8597
  return __generator(this, function (_a) {
8598
+ id = (typeof params.id === 'string') ? params.id : 'me';
8567
8599
  return [2 /*return*/, this.fetch({
8568
- uri: "/people/" + String(params.id) + "/paymentMethod/creditCards",
8600
+ uri: "/people/" + id + "/paymentMethod/creditCards",
8569
8601
  method: 'POST',
8570
8602
  body: params.creditCard,
8571
8603
  expectedStatusCodes: [http_status_1.CREATED],
@@ -8582,10 +8614,12 @@ var PersonOwnershipInfoService = /** @class */ (function (_super) {
8582
8614
  */
8583
8615
  PersonOwnershipInfoService.prototype.searchCreditCards = function (params) {
8584
8616
  return __awaiter(this, void 0, void 0, function () {
8617
+ var id;
8585
8618
  var _this = this;
8586
8619
  return __generator(this, function (_a) {
8620
+ id = (typeof params.id === 'string') ? params.id : 'me';
8587
8621
  return [2 /*return*/, this.fetch({
8588
- uri: "/people/" + String(params.id) + "/paymentMethod/creditCards",
8622
+ uri: "/people/" + id + "/paymentMethod/creditCards",
8589
8623
  method: 'GET',
8590
8624
  qs: { iss: params.iss },
8591
8625
  expectedStatusCodes: [http_status_1.OK]
@@ -8601,14 +8635,17 @@ var PersonOwnershipInfoService = /** @class */ (function (_super) {
8601
8635
  */
8602
8636
  PersonOwnershipInfoService.prototype.deleteCreditCard = function (params) {
8603
8637
  return __awaiter(this, void 0, void 0, function () {
8638
+ var id;
8604
8639
  return __generator(this, function (_a) {
8605
8640
  switch (_a.label) {
8606
- case 0: return [4 /*yield*/, this.fetch({
8607
- uri: "/people/" + String(params.id) + "/paymentMethod/creditCards/" + String(params.cardSeq),
8608
- method: 'DELETE',
8609
- expectedStatusCodes: [http_status_1.NO_CONTENT],
8610
- qs: { iss: params.iss }
8611
- })];
8641
+ case 0:
8642
+ id = (typeof params.id === 'string') ? params.id : 'me';
8643
+ return [4 /*yield*/, this.fetch({
8644
+ uri: "/people/" + id + "/paymentMethod/creditCards/" + String(params.cardSeq),
8645
+ method: 'DELETE',
8646
+ expectedStatusCodes: [http_status_1.NO_CONTENT],
8647
+ qs: { iss: params.iss }
8648
+ })];
8612
8649
  case 1:
8613
8650
  _a.sent();
8614
8651
  return [2 /*return*/];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cinerino/sdk",
3
- "version": "3.40.0-alpha.3",
3
+ "version": "3.40.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.40.0-alpha.3",
100
+ "@cinerino/api-abstract-client": "3.40.0-alpha.4",
101
101
  "debug": "^3.2.6",
102
102
  "http-status": "^1.4.2",
103
103
  "idtoken-verifier": "^2.0.3",