@cinerino/sdk 3.93.0 → 3.94.0

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.
@@ -13546,9 +13546,9 @@ var OrderService = /** @class */ (function (_super) {
13546
13546
  return _super !== null && _super.apply(this, arguments) || this;
13547
13547
  }
13548
13548
  /**
13549
- * 注文を作成する
13550
- * 確定した注文取引に対して、同期的に注文データを作成します。
13551
- * すでに注文が作成済の場合、何もしません。
13549
+ * 注文作成
13550
+ * 確定した注文取引に対して、同期的に注文データを作成
13551
+ * すでに注文が作成済の場合、何もしない
13552
13552
  */
13553
13553
  OrderService.prototype.placeOrder = function (params) {
13554
13554
  return __awaiter(this, void 0, void 0, function () {
@@ -2,11 +2,11 @@
2
2
  /**
3
3
  * 確認番号で注文検索 & コード発行 & 管理者によるコードチェックサンプル
4
4
  */
5
- import * as decode from 'jwt-decode';
5
+ // import * as decode from 'jwt-decode';
6
6
 
7
7
  import * as client from '../../lib/index';
8
8
  // import * as auth from './auth';
9
- import * as authAsAdmin from './auth/authAsAdmin';
9
+ // import * as authAsAdmin from './auth/authAsAdmin';
10
10
 
11
11
  const project = { id: 'cinerino' };
12
12
 
@@ -40,7 +40,7 @@ async function main() {
40
40
  });
41
41
  console.log(orders.length, 'orders found');
42
42
 
43
- let order = orders[0];
43
+ const order = orders[0];
44
44
  const { code } = await orderService.authorize({
45
45
  object: {
46
46
  orderNumber: order.orderNumber,
@@ -55,49 +55,49 @@ async function main() {
55
55
  console.log('QR code published.', code);
56
56
  // ここまでエンドユーザー
57
57
 
58
- const orderItem = order.acceptedOffers?.shift()?.itemOffered;
59
- // 注文アイテムが予約の場合
60
- if (orderItem?.typeOf === client.factory.reservationType.EventReservation) {
61
- const reservationId = orderItem.id;
58
+ // const orderItem = order.acceptedOffers?.shift()?.itemOffered;
59
+ // // 注文アイテムが予約の場合
60
+ // if (orderItem?.typeOf === client.factory.reservationType.EventReservation) {
61
+ // const reservationId = orderItem.id;
62
62
 
63
- // ここから管理者ユーザー
64
- const adminAuthClient = await authAsAdmin.login();
63
+ // // ここから管理者ユーザー
64
+ // const adminAuthClient = await authAsAdmin.login();
65
65
 
66
- const tokenService = new client.service.Token({
67
- endpoint: <string>process.env.API_ENDPOINT,
68
- auth: adminAuthClient,
69
- project: project
70
- });
71
- const reservationService = new client.service.Reservation({
72
- endpoint: <string>process.env.API_ENDPOINT,
73
- auth: adminAuthClient,
74
- project: project
75
- });
66
+ // const tokenService = new client.service.Token({
67
+ // endpoint: <string>process.env.API_ENDPOINT,
68
+ // auth: adminAuthClient,
69
+ // project: project
70
+ // });
71
+ // const reservationService = new client.service.Reservation({
72
+ // endpoint: <string>process.env.API_ENDPOINT,
73
+ // auth: adminAuthClient,
74
+ // project: project
75
+ // });
76
76
 
77
- // 受け取ったコードをトークンに変換
78
- console.log('getting token by code...');
79
- const { token } = await tokenService.getToken({ code });
80
- // tslint:disable-next-line:no-magic-numbers
81
- console.log('token created.', token.substr(0, 10), '................', token.substr(-10));
82
- // トークン(jsonwebtoken)をデコード(デコード結果は注文)
83
- const payload = decode<client.factory.order.IOrder>(token);
84
- order = payload;
85
- console.log('token decoded. order is', order.typeOf, order.orderNumber);
77
+ // // 受け取ったコードをトークンに変換
78
+ // console.log('getting token by code...');
79
+ // const { token } = await tokenService.getToken({ code });
80
+ // // tslint:disable-next-line:no-magic-numbers
81
+ // console.log('token created.', token.substr(0, 10), '................', token.substr(-10));
82
+ // // トークン(jsonwebtoken)をデコード(デコード結果は注文)
83
+ // const payload = decode<client.factory.order.IOrder>(token);
84
+ // order = payload;
85
+ // console.log('token decoded. order is', order.typeOf, order.orderNumber);
86
86
 
87
- // 入場
88
- console.log('checking token...');
89
- await reservationService.useByToken({
90
- object: { id: reservationId },
91
- instrument: { token: token }
92
- });
93
- console.log('token is valid');
87
+ // // 入場
88
+ // console.log('checking token...');
89
+ // await reservationService.useByToken({
90
+ // object: { id: reservationId },
91
+ // instrument: { token: token }
92
+ // });
93
+ // console.log('token is valid');
94
94
 
95
- // 入場履歴を検索
96
- console.log('searching actions...');
97
- const searchUseActionsResult = await reservationService.searchUseActions({ object: { id: reservationId } });
98
- console.log(searchUseActionsResult.data.length, 'actions returned');
99
- // ここまで管理者ユーザー
100
- }
95
+ // // 入場履歴を検索
96
+ // console.log('searching actions...');
97
+ // const searchUseActionsResult = await reservationService.searchUseActions({ object: { id: reservationId } });
98
+ // console.log(searchUseActionsResult.data.length, 'actions returned');
99
+ // // ここまで管理者ユーザー
100
+ // }
101
101
  }
102
102
 
103
103
  main()
package/lib/bundle.js CHANGED
@@ -13546,9 +13546,9 @@ var OrderService = /** @class */ (function (_super) {
13546
13546
  return _super !== null && _super.apply(this, arguments) || this;
13547
13547
  }
13548
13548
  /**
13549
- * 注文を作成する
13550
- * 確定した注文取引に対して、同期的に注文データを作成します。
13551
- * すでに注文が作成済の場合、何もしません。
13549
+ * 注文作成
13550
+ * 確定した注文取引に対して、同期的に注文データを作成
13551
+ * すでに注文が作成済の場合、何もしない
13552
13552
  */
13553
13553
  OrderService.prototype.placeOrder = function (params) {
13554
13554
  return __awaiter(this, void 0, void 0, function () {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cinerino/sdk",
3
- "version": "3.93.0",
3
+ "version": "3.94.0",
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.93.0",
100
+ "@cinerino/api-abstract-client": "3.94.0",
101
101
  "debug": "^3.2.6",
102
102
  "http-status": "^1.4.2",
103
103
  "idtoken-verifier": "^2.0.3",