@cinerino/sdk 10.21.0-alpha.4 → 10.21.0-alpha.41

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 (42) hide show
  1. package/example/playground/public/lib/bundle.js +1824 -890
  2. package/example/src/chevre/searchProjects.ts +17 -1
  3. package/example/src/cloud/transaction/processPlaceOrderByCreditCard3DS.ts +50 -3
  4. package/example/src/cloud/transaction/processPlaceOrderUsingMemberProgramTier.ts +517 -0
  5. package/lib/abstract/chevre/event.d.ts +3 -0
  6. package/lib/abstract/chevreAdmin/advanceBookingRequirement.d.ts +19 -0
  7. package/lib/abstract/chevreAdmin/advanceBookingRequirement.js +149 -0
  8. package/lib/abstract/chevreAdmin/assetTransaction/cancelReservation.d.ts +0 -13
  9. package/lib/abstract/chevreAdmin/assetTransaction/cancelReservation.js +9 -70
  10. package/lib/abstract/chevreAdmin/assetTransaction/pay.d.ts +0 -5
  11. package/lib/abstract/chevreAdmin/assetTransaction/pay.js +32 -51
  12. package/lib/abstract/chevreAdmin/eventOffer.d.ts +32 -0
  13. package/lib/abstract/chevreAdmin/eventOffer.js +169 -0
  14. package/lib/abstract/chevreAdmin/identity.d.ts +2 -2
  15. package/lib/abstract/chevreAdmin/identityProvider.d.ts +2 -30
  16. package/lib/abstract/chevreAdmin/identityProvider.js +2 -2
  17. package/lib/abstract/chevreAdmin/issuer.d.ts +12 -2
  18. package/lib/abstract/chevreAdmin/memberProgram.d.ts +38 -2
  19. package/lib/abstract/chevreAdmin/memberProgram.js +31 -4
  20. package/lib/abstract/chevreAdmin/offerCatalog.d.ts +8 -3
  21. package/lib/abstract/chevreAdmin/offerCatalogItem.d.ts +4 -3
  22. package/lib/abstract/chevreAdmin/paymentService.d.ts +29 -9
  23. package/lib/abstract/chevreAdmin/paymentService.js +16 -0
  24. package/lib/abstract/chevreAdmin/paymentServiceChannel.d.ts +20 -0
  25. package/lib/abstract/chevreAdmin/{assetTransaction/refund.js → paymentServiceChannel.js} +41 -37
  26. package/lib/abstract/chevreAdmin/pendingReservation.d.ts +58 -0
  27. package/lib/abstract/chevreAdmin/pendingReservation.js +104 -0
  28. package/lib/abstract/chevreAdmin/task.d.ts +2 -6
  29. package/lib/abstract/chevreAdmin/task.js +12 -13
  30. package/lib/abstract/chevreAdmin/webSite.d.ts +23 -0
  31. package/lib/abstract/chevreAdmin/webSite.js +138 -0
  32. package/lib/abstract/chevreAdmin.d.ts +45 -9
  33. package/lib/abstract/chevreAdmin.js +101 -20
  34. package/lib/abstract/chevrePay/payment/factory.d.ts +5 -5
  35. package/lib/abstract/cinerino/service/event.d.ts +3 -0
  36. package/lib/bundle.js +1825 -891
  37. package/package.json +2 -2
  38. package/example/src/chevre/assetTransaction/processCancelReservation.ts +0 -61
  39. package/example/src/chevre/assetTransaction/processPayMovieTicket.ts +0 -101
  40. package/example/src/chevre/assetTransaction/processPublishPaymentUrl.ts +0 -95
  41. package/example/src/chevre/assetTransaction/processRefundCreditCard.ts +0 -76
  42. package/lib/abstract/chevreAdmin/assetTransaction/refund.d.ts +0 -24
@@ -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
  */
@@ -0,0 +1,32 @@
1
+ import * as factory from '../factory';
2
+ import { Service } from '../service';
3
+ declare type IDocType = factory.eventOffer.IEventOfferForMemberTier;
4
+ declare type ISearchConditions = factory.eventOffer.ISearchConditions;
5
+ declare type ISavingOffer = Pick<IDocType, 'availableAtOrFrom' | 'identifier' | 'itemOffered' | 'typeOf' | 'validForMemberTier' | 'validFrom' | 'validThrough'>;
6
+ declare type IDocWithId = IDocType & {
7
+ id: string;
8
+ };
9
+ /**
10
+ * イベントオファーサービス
11
+ */
12
+ export declare class EventOfferService extends Service {
13
+ create(params: ISavingOffer): Promise<{
14
+ id: string;
15
+ }>;
16
+ projectFields(params: Omit<ISearchConditions, 'project'>): Promise<IDocWithId[]>;
17
+ updateById(params: ISavingOffer & {
18
+ id: string;
19
+ }): Promise<void>;
20
+ deleteById(params: {
21
+ id: string;
22
+ }): Promise<void>;
23
+ /**
24
+ * 有効なメンバーティアトークンを発行する(開発使用目的)
25
+ */
26
+ publichMemberTierToken(params: {
27
+ id: string;
28
+ }): Promise<{
29
+ token: string;
30
+ }>;
31
+ }
32
+ export {};
@@ -0,0 +1,169 @@
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.EventOfferService = void 0;
66
+ var http_status_1 = require("http-status");
67
+ var service_1 = require("../service");
68
+ /**
69
+ * イベントオファーサービス
70
+ */
71
+ var EventOfferService = /** @class */ (function (_super) {
72
+ __extends(EventOfferService, _super);
73
+ function EventOfferService() {
74
+ return _super !== null && _super.apply(this, arguments) || this;
75
+ }
76
+ EventOfferService.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: '/eventOffers',
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
+ EventOfferService.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: '/eventOffers',
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
+ EventOfferService.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: "/eventOffers/" + 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
+ EventOfferService.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: "/eventOffers/" + 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
+ /**
148
+ * 有効なメンバーティアトークンを発行する(開発使用目的)
149
+ */
150
+ EventOfferService.prototype.publichMemberTierToken = function (params) {
151
+ return __awaiter(this, void 0, void 0, function () {
152
+ var id;
153
+ var _this = this;
154
+ return __generator(this, function (_a) {
155
+ id = params.id;
156
+ return [2 /*return*/, this.fetch({
157
+ uri: "/eventOffers/" + encodeURIComponent(String(id)) + "/tokens",
158
+ method: 'POST',
159
+ expectedStatusCodes: [http_status_1.CREATED]
160
+ })
161
+ .then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
162
+ return [2 /*return*/, response.json()];
163
+ }); }); })];
164
+ });
165
+ });
166
+ };
167
+ return EventOfferService;
168
+ }(service_1.Service));
169
+ exports.EventOfferService = EventOfferService;
@@ -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: {