@cinerino/sdk 10.21.0-alpha.3 → 10.21.0-alpha.31

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 (29) hide show
  1. package/example/playground/public/lib/bundle.js +1644 -1038
  2. package/example/src/cloud/transaction/processPlaceOrderByCreditCard3DS.ts +50 -3
  3. package/lib/abstract/chevreAdmin/advanceBookingRequirement.d.ts +19 -0
  4. package/lib/abstract/chevreAdmin/advanceBookingRequirement.js +149 -0
  5. package/lib/abstract/chevreAdmin/assetTransaction/cancelReservation.d.ts +0 -13
  6. package/lib/abstract/chevreAdmin/assetTransaction/cancelReservation.js +9 -70
  7. package/lib/abstract/chevreAdmin/assetTransaction/pay.d.ts +0 -5
  8. package/lib/abstract/chevreAdmin/assetTransaction/pay.js +32 -51
  9. package/lib/abstract/chevreAdmin/identity.d.ts +2 -2
  10. package/lib/abstract/chevreAdmin/identityProvider.d.ts +2 -30
  11. package/lib/abstract/chevreAdmin/identityProvider.js +2 -2
  12. package/lib/abstract/chevreAdmin/paymentService.d.ts +40 -8
  13. package/lib/abstract/chevreAdmin/paymentService.js +32 -0
  14. package/lib/abstract/chevreAdmin/paymentServiceChannel.d.ts +20 -0
  15. package/lib/abstract/chevreAdmin/{assetTransaction/refund.js → paymentServiceChannel.js} +41 -37
  16. package/lib/abstract/chevreAdmin/task.d.ts +2 -6
  17. package/lib/abstract/chevreAdmin/task.js +12 -13
  18. package/lib/abstract/chevreAdmin/webSite.d.ts +23 -0
  19. package/lib/abstract/chevreAdmin/webSite.js +138 -0
  20. package/lib/abstract/chevreAdmin.d.ts +27 -9
  21. package/lib/abstract/chevreAdmin.js +61 -20
  22. package/lib/abstract/chevrePay/payment/factory.d.ts +5 -5
  23. package/lib/bundle.js +1672 -1070
  24. package/package.json +2 -2
  25. package/example/src/chevre/assetTransaction/processCancelReservation.ts +0 -61
  26. package/example/src/chevre/assetTransaction/processPayMovieTicket.ts +0 -101
  27. package/example/src/chevre/assetTransaction/processPublishPaymentUrl.ts +0 -95
  28. package/example/src/chevre/assetTransaction/processRefundCreditCard.ts +0 -76
  29. package/lib/abstract/chevreAdmin/assetTransaction/refund.d.ts +0 -24
@@ -48,7 +48,8 @@ async function main() {
48
48
  // 新しい決済サービス
49
49
  const paymentService = await (await client.loadCloudPay({
50
50
  endpoint: <string>process.env.API_PAY_ENDPOINT,
51
- auth: await auth()
51
+ auth: await auth(),
52
+ disableAutoRetry: true
52
53
  })).createPaymentInstance({
53
54
  project,
54
55
  seller: { id: '' }
@@ -128,6 +129,25 @@ async function main() {
128
129
  })({ paymentService });
129
130
  console.log('paymentUrl published.', paymentMethodId, paymentUrl);
130
131
 
132
+ try {
133
+ const publishPaymentUrlAsyncForciblySecondResult = await publishPaymentUrlAsyncForcibly({
134
+ object: {
135
+ amount,
136
+ paymentMethod: paymentMethodType,
137
+ method: '1',
138
+ creditCard: {
139
+ ...creditCard,
140
+ retUrl: String(process.env.SECURE_TRAN_RET_URL) // callbackを指定すると3DSとして処理される
141
+ },
142
+ issuedThrough: { id: paymentServiceId }
143
+ },
144
+ purpose: { id: transaction.id, typeOf: client.factory.transactionType.PlaceOrder }
145
+ })({ paymentService });
146
+ console.log('paymentUrl published.', publishPaymentUrlAsyncForciblySecondResult);
147
+ } catch (error) {
148
+ console.error('publishPaymentUrlAsyncForciblySecond:', error);
149
+ }
150
+
131
151
  // wait callback...
132
152
  await new Promise<void>((resolve, reject) => {
133
153
  const rl = readline.createInterface({
@@ -135,8 +155,14 @@ async function main() {
135
155
  output: process.stdout
136
156
  });
137
157
 
138
- rl.question('callback received?:\n', async () => {
158
+ rl.question('callback received? y or n:\n', async (answer) => {
139
159
  try {
160
+ if (answer !== 'y') {
161
+ reject(new Error('answer is no'));
162
+
163
+ return;
164
+ }
165
+
140
166
  console.log('authorizing credit card payment...');
141
167
  const creditCardPaymentAuth = await authorizeCreditCardAsyncForcibly({
142
168
  object: {
@@ -154,6 +180,7 @@ async function main() {
154
180
 
155
181
  // tslint:disable-next-line:no-magic-numbers
156
182
  await wait(3000);
183
+ // throw new Error('unexpected error');
157
184
 
158
185
  console.log('setting customer profile...');
159
186
  await placeOrderService.setProfile({
@@ -409,7 +436,27 @@ function authorizeCreditCardAsyncForcibly(params: {
409
436
  paymentService: client.cloudPay.service.Payment;
410
437
  }): Promise<{ id: string }> => {
411
438
  // 決済承認タスク作成
412
- const authorizeTask = await repos.paymentService.authorizeCreditCardAsync(params);
439
+ const authorizeTask = await new Promise<{ id: string }>((resolve, reject) => {
440
+ repos.paymentService.authorizeCreditCardAsync(params)
441
+ .then(async (task) => {
442
+ console.log('waiting resolve authorizeCreditCardAsync...');
443
+ await wait(5000);
444
+
445
+ resolve(task);
446
+ })
447
+ .catch(reject);
448
+ // 再度承認してみる
449
+ // repos.paymentService.authorizeCreditCardAsync(params)
450
+ // .then(async (task) => {
451
+ // console.log('authorizeCreditCardAsync:', task);
452
+ // })
453
+ // .catch((authorizeCreditCardAsyncError) => {
454
+ // // 同paymentMethodIdでは承認できないはず
455
+ // console.error('authorizeCreditCardAsync:', authorizeCreditCardAsyncError);
456
+ // });
457
+
458
+ });
459
+
413
460
  const giveUpPayment = moment()
414
461
  .add(USE_FORCE_AUTHORIZE_PAYMENT_ASYNC_GIVE_UP_SECONDS, 'seconds');
415
462
  let result: { id: string } | undefined;
@@ -0,0 +1,19 @@
1
+ import * as factory from '../factory';
2
+ import { Service } from '../service';
3
+ declare type ISavingRequirement = Pick<factory.advanceBookingRequirement.IAdvanceBookingRequirement, 'identifier' | 'description' | 'maxValue' | 'minValue' | 'valueReference'>;
4
+ /**
5
+ * 事前予約要件サービス
6
+ */
7
+ export declare class AdvanceBookingRequirementService extends Service {
8
+ create(params: ISavingRequirement): Promise<{
9
+ id: string;
10
+ }>;
11
+ projectFields(params: Omit<factory.advanceBookingRequirement.ISearchConditions, 'project'>): Promise<Pick<factory.advanceBookingRequirement.IAdvanceBookingRequirement, 'description' | 'id' | 'identifier' | 'maxValue' | 'minValue' | 'typeOf' | 'unitCode' | 'valueReference'>[]>;
12
+ updateById(params: ISavingRequirement & {
13
+ id: string;
14
+ }): Promise<void>;
15
+ deleteById(params: {
16
+ id: string;
17
+ }): Promise<void>;
18
+ }
19
+ export {};
@@ -0,0 +1,149 @@
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
17
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
18
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
19
+ return new (P || (P = Promise))(function (resolve, reject) {
20
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
21
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
22
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
23
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
24
+ });
25
+ };
26
+ var __generator = (this && this.__generator) || function (thisArg, body) {
27
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
28
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
29
+ function verb(n) { return function (v) { return step([n, v]); }; }
30
+ function step(op) {
31
+ if (f) throw new TypeError("Generator is already executing.");
32
+ while (_) try {
33
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
34
+ if (y = 0, t) op = [op[0] & 2, t.value];
35
+ switch (op[0]) {
36
+ case 0: case 1: t = op; break;
37
+ case 4: _.label++; return { value: op[1], done: false };
38
+ case 5: _.label++; y = op[1]; op = [0]; continue;
39
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
40
+ default:
41
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
42
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
43
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
44
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
45
+ if (t[2]) _.ops.pop();
46
+ _.trys.pop(); continue;
47
+ }
48
+ op = body.call(thisArg, _);
49
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
50
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
51
+ }
52
+ };
53
+ var __rest = (this && this.__rest) || function (s, e) {
54
+ var t = {};
55
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
56
+ t[p] = s[p];
57
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
58
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
59
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
60
+ t[p[i]] = s[p[i]];
61
+ }
62
+ return t;
63
+ };
64
+ Object.defineProperty(exports, "__esModule", { value: true });
65
+ exports.AdvanceBookingRequirementService = void 0;
66
+ var http_status_1 = require("http-status");
67
+ var service_1 = require("../service");
68
+ /**
69
+ * 事前予約要件サービス
70
+ */
71
+ var AdvanceBookingRequirementService = /** @class */ (function (_super) {
72
+ __extends(AdvanceBookingRequirementService, _super);
73
+ function AdvanceBookingRequirementService() {
74
+ return _super !== null && _super.apply(this, arguments) || this;
75
+ }
76
+ AdvanceBookingRequirementService.prototype.create = function (params) {
77
+ return __awaiter(this, void 0, void 0, function () {
78
+ var _this = this;
79
+ return __generator(this, function (_a) {
80
+ return [2 /*return*/, this.fetch({
81
+ uri: '/advanceBookingRequirements',
82
+ method: 'POST',
83
+ body: params,
84
+ expectedStatusCodes: [http_status_1.CREATED]
85
+ })
86
+ .then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
87
+ return [2 /*return*/, response.json()];
88
+ }); }); })];
89
+ });
90
+ });
91
+ };
92
+ AdvanceBookingRequirementService.prototype.projectFields = function (params) {
93
+ return __awaiter(this, void 0, void 0, function () {
94
+ var _this = this;
95
+ return __generator(this, function (_a) {
96
+ return [2 /*return*/, this.fetch({
97
+ uri: '/advanceBookingRequirements',
98
+ method: 'GET',
99
+ qs: params,
100
+ expectedStatusCodes: [http_status_1.OK]
101
+ })
102
+ .then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
103
+ return [2 /*return*/, response.json()];
104
+ }); }); })];
105
+ });
106
+ });
107
+ };
108
+ AdvanceBookingRequirementService.prototype.updateById = function (params) {
109
+ return __awaiter(this, void 0, void 0, function () {
110
+ var id, body;
111
+ return __generator(this, function (_a) {
112
+ switch (_a.label) {
113
+ case 0:
114
+ id = params.id, body = __rest(params, ["id"]);
115
+ return [4 /*yield*/, this.fetch({
116
+ uri: "/advanceBookingRequirements/" + encodeURIComponent(String(id)),
117
+ method: 'PUT',
118
+ body: body,
119
+ expectedStatusCodes: [http_status_1.NO_CONTENT]
120
+ })];
121
+ case 1:
122
+ _a.sent();
123
+ return [2 /*return*/];
124
+ }
125
+ });
126
+ });
127
+ };
128
+ AdvanceBookingRequirementService.prototype.deleteById = function (params) {
129
+ return __awaiter(this, void 0, void 0, function () {
130
+ var id;
131
+ return __generator(this, function (_a) {
132
+ switch (_a.label) {
133
+ case 0:
134
+ id = params.id;
135
+ return [4 /*yield*/, this.fetch({
136
+ uri: "/advanceBookingRequirements/" + encodeURIComponent(String(id)),
137
+ method: 'DELETE',
138
+ expectedStatusCodes: [http_status_1.NO_CONTENT]
139
+ })];
140
+ case 1:
141
+ _a.sent();
142
+ return [2 /*return*/];
143
+ }
144
+ });
145
+ });
146
+ };
147
+ return AdvanceBookingRequirementService;
148
+ }(service_1.Service));
149
+ exports.AdvanceBookingRequirementService = AdvanceBookingRequirementService;
@@ -12,22 +12,9 @@ export declare class CancelReservationAssetTransactionService extends Service {
12
12
  /**
13
13
  * 取引を開始する
14
14
  */
15
- start(params: IStartParams): Promise<{
16
- id: string;
17
- }>;
18
15
  /**
19
16
  * 取引開始&確定
20
17
  */
21
18
  startAndConfirm(params: Omit<IStartParams, 'expires'>): Promise<void>;
22
- /**
23
- * 取引確定
24
- */
25
- confirm(params: factory.assetTransaction.cancelReservation.IConfirmParams): Promise<void>;
26
- /**
27
- * 取引中止
28
- */
29
- cancel(params: {
30
- id: string;
31
- }): Promise<void>;
32
19
  }
33
20
  export {};
@@ -50,17 +50,6 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
50
50
  if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
51
51
  }
52
52
  };
53
- var __rest = (this && this.__rest) || function (s, e) {
54
- var t = {};
55
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
56
- t[p] = s[p];
57
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
58
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
59
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
60
- t[p[i]] = s[p[i]];
61
- }
62
- return t;
63
- };
64
53
  Object.defineProperty(exports, "__esModule", { value: true });
65
54
  exports.CancelReservationAssetTransactionService = void 0;
66
55
  var http_status_1 = require("http-status");
@@ -76,22 +65,15 @@ var CancelReservationAssetTransactionService = /** @class */ (function (_super)
76
65
  /**
77
66
  * 取引を開始する
78
67
  */
79
- CancelReservationAssetTransactionService.prototype.start = function (params) {
80
- return __awaiter(this, void 0, void 0, function () {
81
- var _this = this;
82
- return __generator(this, function (_a) {
83
- return [2 /*return*/, this.fetch({
84
- uri: '/assetTransactions/cancelReservation/start',
85
- method: 'POST',
86
- body: params,
87
- expectedStatusCodes: [http_status_1.OK]
88
- })
89
- .then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
90
- return [2 /*return*/, response.json()];
91
- }); }); })];
92
- });
93
- });
94
- };
68
+ // public async start(params: IStartParams): Promise<{ id: string }> {
69
+ // return this.fetch({
70
+ // uri: '/assetTransactions/cancelReservation/start',
71
+ // method: 'POST',
72
+ // body: params,
73
+ // expectedStatusCodes: [OK]
74
+ // })
75
+ // .then(async (response) => response.json());
76
+ // }
95
77
  /**
96
78
  * 取引開始&確定
97
79
  */
@@ -112,49 +94,6 @@ var CancelReservationAssetTransactionService = /** @class */ (function (_super)
112
94
  });
113
95
  });
114
96
  };
115
- /**
116
- * 取引確定
117
- */
118
- CancelReservationAssetTransactionService.prototype.confirm = function (params) {
119
- return __awaiter(this, void 0, void 0, function () {
120
- var id, body;
121
- return __generator(this, function (_a) {
122
- switch (_a.label) {
123
- case 0:
124
- id = params.id, body = __rest(params, ["id"]);
125
- return [4 /*yield*/, this.fetch({
126
- uri: "/assetTransactions/cancelReservation/" + encodeURIComponent(String(id)) + "/confirm",
127
- method: 'PUT',
128
- expectedStatusCodes: [http_status_1.NO_CONTENT],
129
- body: body
130
- })];
131
- case 1:
132
- _a.sent();
133
- return [2 /*return*/];
134
- }
135
- });
136
- });
137
- };
138
- /**
139
- * 取引中止
140
- */
141
- CancelReservationAssetTransactionService.prototype.cancel = function (params) {
142
- return __awaiter(this, void 0, void 0, function () {
143
- return __generator(this, function (_a) {
144
- switch (_a.label) {
145
- case 0: return [4 /*yield*/, this.fetch({
146
- uri: "/assetTransactions/cancelReservation/" + encodeURIComponent(String(params.id)) + "/cancel",
147
- method: 'PUT',
148
- expectedStatusCodes: [http_status_1.NO_CONTENT]
149
- // body: params
150
- })];
151
- case 1:
152
- _a.sent();
153
- return [2 /*return*/];
154
- }
155
- });
156
- });
157
- };
158
97
  return CancelReservationAssetTransactionService;
159
98
  }(service_1.Service));
160
99
  exports.CancelReservationAssetTransactionService = CancelReservationAssetTransactionService;
@@ -18,17 +18,12 @@ export declare class PayAssetTransactionService extends Service {
18
18
  /**
19
19
  * 決済ロケーション無効化
20
20
  */
21
- invalidatePaymentUrl(params: factory.task.refund.IData): Promise<void>;
22
21
  /**
23
22
  * 決済ロケーション発行
24
23
  */
25
- publishPaymentUrl(params: factory.assetTransaction.pay.IStartParamsWithoutDetail): Promise<IPublishPaymentUrlResult>;
26
24
  /**
27
25
  * 取引開始
28
26
  */
29
- start(params: factory.assetTransaction.pay.IStartParamsWithoutDetail): Promise<{
30
- id: string;
31
- }>;
32
27
  /**
33
28
  * 取引確定
34
29
  */
@@ -96,63 +96,44 @@ var PayAssetTransactionService = /** @class */ (function (_super) {
96
96
  /**
97
97
  * 決済ロケーション無効化
98
98
  */
99
- PayAssetTransactionService.prototype.invalidatePaymentUrl = function (params
100
- // params: factory.assetTransaction.refund.IStartParamsWithoutDetail
101
- ) {
102
- return __awaiter(this, void 0, void 0, function () {
103
- return __generator(this, function (_a) {
104
- switch (_a.label) {
105
- case 0: return [4 /*yield*/, this.fetch({
106
- uri: "/assetTransactions/" + factory.assetTransactionType.Pay + "/invalidatePaymentUrl",
107
- method: 'PUT',
108
- body: params,
109
- expectedStatusCodes: [http_status_1.NO_CONTENT]
110
- })];
111
- case 1:
112
- _a.sent();
113
- return [2 /*return*/];
114
- }
115
- });
116
- });
117
- };
99
+ // public async invalidatePaymentUrl(
100
+ // params: factory.task.refund.IData
101
+ // ): Promise<void> {
102
+ // await this.fetch({
103
+ // uri: `/assetTransactions/${factory.assetTransactionType.Pay}/invalidatePaymentUrl`,
104
+ // method: 'PUT',
105
+ // body: params,
106
+ // expectedStatusCodes: [NO_CONTENT]
107
+ // });
108
+ // }
118
109
  /**
119
110
  * 決済ロケーション発行
120
111
  */
121
- PayAssetTransactionService.prototype.publishPaymentUrl = function (params) {
122
- return __awaiter(this, void 0, void 0, function () {
123
- var _this = this;
124
- return __generator(this, function (_a) {
125
- return [2 /*return*/, this.fetch({
126
- uri: "/assetTransactions/" + factory.assetTransactionType.Pay + "/publishPaymentUrl",
127
- method: 'POST',
128
- body: params,
129
- expectedStatusCodes: [http_status_1.OK]
130
- })
131
- .then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
132
- return [2 /*return*/, response.json()];
133
- }); }); })];
134
- });
135
- });
136
- };
112
+ // public async publishPaymentUrl(
113
+ // params: factory.assetTransaction.pay.IStartParamsWithoutDetail
114
+ // ): Promise<IPublishPaymentUrlResult> {
115
+ // return this.fetch({
116
+ // uri: `/assetTransactions/${factory.assetTransactionType.Pay}/publishPaymentUrl`,
117
+ // method: 'POST',
118
+ // body: params,
119
+ // expectedStatusCodes: [OK]
120
+ // })
121
+ // .then(async (response) => response.json());
122
+ // }
137
123
  /**
138
124
  * 取引開始
139
125
  */
140
- PayAssetTransactionService.prototype.start = function (params) {
141
- return __awaiter(this, void 0, void 0, function () {
142
- var _this = this;
143
- return __generator(this, function (_a) {
144
- return [2 /*return*/, this.fetch({
145
- uri: "/assetTransactions/" + factory.assetTransactionType.Pay + "/start",
146
- method: 'POST',
147
- body: params,
148
- expectedStatusCodes: [http_status_1.OK]
149
- })
150
- .then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
151
- return [2 /*return*/, response.json()];
152
- }); }); })];
153
- });
154
- });
155
- };
126
+ // public async start(
127
+ // params: factory.assetTransaction.pay.IStartParamsWithoutDetail
128
+ // ): Promise<{ id: string }> {
129
+ // return this.fetch({
130
+ // uri: `/assetTransactions/${factory.assetTransactionType.Pay}/start`,
131
+ // method: 'POST',
132
+ // body: params,
133
+ // expectedStatusCodes: [OK]
134
+ // })
135
+ // .then(async (response) => response.json());
136
+ // }
156
137
  /**
157
138
  * 取引確定
158
139
  */
@@ -1,6 +1,6 @@
1
1
  import * as factory from '../factory';
2
2
  import { Service } from '../service';
3
- declare type IIdentity = factory.creativeWork.certification.ICertification;
3
+ declare type IIdentity = factory.creativeWork.certification.webApplication.ICertification;
4
4
  interface ISavingIdentity {
5
5
  clientId: string;
6
6
  clientSecret: string;
@@ -13,7 +13,7 @@ export declare class IdentityService extends Service {
13
13
  create(params: ISavingIdentity): Promise<{
14
14
  id: string;
15
15
  }>;
16
- projectFields(params: Omit<factory.creativeWork.certification.ISearchConditions, 'project'>): Promise<IIdentity[]>;
16
+ projectFields(params: Omit<factory.creativeWork.certification.webApplication.ISearchConditions, 'project'>): Promise<IIdentity[]>;
17
17
  deleteById(params: {
18
18
  id: string;
19
19
  }): Promise<void>;
@@ -1,33 +1,5 @@
1
1
  import * as factory from '../factory';
2
2
  import { Service } from '../service';
3
- export interface ISearchConditions {
4
- limit?: number;
5
- page?: number;
6
- sort?: {
7
- identifier?: factory.sortType;
8
- };
9
- project?: {
10
- id?: {
11
- $eq?: string;
12
- };
13
- };
14
- id?: {
15
- $eq?: string;
16
- $in?: string[];
17
- };
18
- identifier?: {
19
- $eq?: string;
20
- $regex?: string;
21
- };
22
- verified?: boolean;
23
- }
24
- interface IIdentityProvider {
25
- id: string;
26
- identifier: string;
27
- project: Pick<factory.project.IProject, 'id' | 'typeOf'>;
28
- typeOf: factory.organizationType.Organization;
29
- verified: boolean;
30
- }
31
3
  interface ISavingIdentityProvider {
32
4
  clientId: string;
33
5
  clientSecret: string;
@@ -40,8 +12,8 @@ export declare class IdentityProviderService extends Service {
40
12
  create(params: ISavingIdentityProvider): Promise<{
41
13
  id: string;
42
14
  }>;
43
- projectFields(params: Omit<ISearchConditions, 'project'>): Promise<IIdentityProvider[]>;
44
- vefiry(params: ISavingIdentityProvider & {
15
+ projectFields(params: Omit<factory.identityProvider.ISearchConditions, 'project'>): Promise<factory.identityProvider.IIdentityProvider[]>;
16
+ updateById(params: ISavingIdentityProvider & {
45
17
  id: string;
46
18
  }): Promise<void>;
47
19
  deleteById(params: {
@@ -105,7 +105,7 @@ var IdentityProviderService = /** @class */ (function (_super) {
105
105
  });
106
106
  });
107
107
  };
108
- IdentityProviderService.prototype.vefiry = function (params) {
108
+ IdentityProviderService.prototype.updateById = function (params) {
109
109
  return __awaiter(this, void 0, void 0, function () {
110
110
  var id, body;
111
111
  return __generator(this, function (_a) {
@@ -113,7 +113,7 @@ var IdentityProviderService = /** @class */ (function (_super) {
113
113
  case 0:
114
114
  id = params.id, body = __rest(params, ["id"]);
115
115
  return [4 /*yield*/, this.fetch({
116
- uri: "/identityProviders/" + encodeURIComponent(String(id)) + "/verify",
116
+ uri: "/identityProviders/" + encodeURIComponent(String(id)),
117
117
  method: 'PUT',
118
118
  body: body,
119
119
  expectedStatusCodes: [http_status_1.NO_CONTENT]
@@ -1,11 +1,17 @@
1
1
  import * as factory from '../factory';
2
2
  import { Service } from '../service';
3
- export declare type IPaymentServiceWithoutCredentials = Omit<factory.service.paymentService.IService, 'availableChannel'> & {
3
+ declare type ISavingAvailableChannel = Pick<factory.service.paymentService.IAvailableChannel, 'totalPaymentDue' | 'typeOf'> & {
4
+ serviceUrl: string;
5
+ };
6
+ declare type ISavingPaymentService = Pick<factory.service.paymentService.IService, 'additionalProperty' | 'description' | 'name' | 'productID' | 'project' | 'serviceOutput' | 'serviceType' | 'typeOf' | 'potentialAction'> & {
7
+ availableChannel: ISavingAvailableChannel;
8
+ };
9
+ export declare type IPaymentServiceWithoutCredentials = Omit<factory.service.paymentService.IService, 'availableChannel' | 'potentialAction'> & {
4
10
  id: string;
5
11
  };
6
- declare type IKeyOfProjection = keyof factory.service.paymentService.IService;
12
+ declare type IKeyOfProjection = Exclude<keyof factory.service.paymentService.IService, 'id' | 'availableChannel' | 'potentialAction'>;
7
13
  declare type IProjection = {
8
- [key in IKeyOfProjection]?: 0 | 1;
14
+ [key in IKeyOfProjection]?: 1;
9
15
  };
10
16
  /**
11
17
  * 決済商品サービス
@@ -14,7 +20,7 @@ export declare class PaymentProductService extends Service {
14
20
  /**
15
21
  * 決済サービス作成
16
22
  */
17
- createPaymentService(params: factory.service.paymentService.IService): Promise<{
23
+ createPaymentService(params: ISavingPaymentService): Promise<{
18
24
  id: string;
19
25
  }>;
20
26
  /**
@@ -25,14 +31,40 @@ export declare class PaymentProductService extends Service {
25
31
  }): Promise<IPaymentServiceWithoutCredentials[]>;
26
32
  findPaymentServiceById(params: {
27
33
  id: string;
28
- } & {
29
- $projection?: IProjection;
30
- }): Promise<factory.service.paymentService.IService>;
31
- updatePaymentService(params: factory.service.paymentService.IService & {
34
+ }): Promise<Omit<factory.service.paymentService.IService, 'availableChannel' | 'typeOf'> & {
35
+ typeOf: factory.service.paymentService.PaymentServiceType.CreditCard | factory.service.paymentService.PaymentServiceType.MovieTicket;
36
+ availableChannel: Omit<factory.service.paymentService.IAvailableChannel, 'serviceUrl'>;
37
+ id: string;
38
+ }>;
39
+ updatePaymentService(params: ISavingPaymentService & {
32
40
  id: string;
33
41
  }): Promise<void>;
34
42
  deletePaymentServiceById(params: {
35
43
  id: string;
36
44
  }): Promise<void>;
45
+ searchAvailableChannels(params: {
46
+ limit?: number;
47
+ page?: number;
48
+ providesService: {
49
+ typeOf: {
50
+ $eq: factory.service.paymentService.PaymentServiceType.CreditCard | factory.service.paymentService.PaymentServiceType.MovieTicket;
51
+ };
52
+ };
53
+ serviceUrl?: {
54
+ $regex?: string;
55
+ };
56
+ id?: {
57
+ $eq?: string;
58
+ };
59
+ }): Promise<(Pick<factory.serviceChannel.IServiceChannel, 'serviceUrl'> & {
60
+ id: string;
61
+ })[]>;
62
+ searchPotentialActions(params: {
63
+ limit?: number;
64
+ page?: number;
65
+ id?: {
66
+ $eq?: string;
67
+ };
68
+ }): Promise<Pick<factory.potentialAction.IPotentialAction, 'id' | 'identifier' | 'target' | 'typeOf' | 'recipient'>[]>;
37
69
  }
38
70
  export {};