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

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.
@@ -0,0 +1,20 @@
1
+ import * as factory from '../factory';
2
+ import { Service } from '../service';
3
+ declare type IServiceChannel = Pick<factory.serviceChannel.IServiceChannel, 'credentials' | 'id' | 'providesService' | 'serviceUrl' | 'typeOf' | 'verified'>;
4
+ declare type ISavingChannel = Pick<factory.serviceChannel.IServiceChannel, 'credentials' | 'providesService' | 'serviceUrl'>;
5
+ /**
6
+ * 決済サービスチャネルサービス
7
+ */
8
+ export declare class PaymentServiceChannelService extends Service {
9
+ create(params: ISavingChannel): Promise<{
10
+ id: string;
11
+ }>;
12
+ projectFields(params: Omit<factory.serviceChannel.ISearchConditions, 'project'>): Promise<IServiceChannel[]>;
13
+ vefiry(params: ISavingChannel & {
14
+ id: string;
15
+ }): Promise<void>;
16
+ deleteById(params: {
17
+ id: string;
18
+ }): Promise<void>;
19
+ }
20
+ 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.PaymentServiceChannelService = void 0;
66
+ var http_status_1 = require("http-status");
67
+ var service_1 = require("../service");
68
+ /**
69
+ * 決済サービスチャネルサービス
70
+ */
71
+ var PaymentServiceChannelService = /** @class */ (function (_super) {
72
+ __extends(PaymentServiceChannelService, _super);
73
+ function PaymentServiceChannelService() {
74
+ return _super !== null && _super.apply(this, arguments) || this;
75
+ }
76
+ PaymentServiceChannelService.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: '/paymentServiceChannels',
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
+ PaymentServiceChannelService.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: '/paymentServiceChannels',
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
+ PaymentServiceChannelService.prototype.vefiry = 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: "/paymentServiceChannels/" + encodeURIComponent(String(id)) + "/verify",
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
+ PaymentServiceChannelService.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: "/paymentServiceChannels/" + 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 PaymentServiceChannelService;
148
+ }(service_1.Service));
149
+ exports.PaymentServiceChannelService = PaymentServiceChannelService;
@@ -42,6 +42,7 @@ import type { OfferItemConditionService } from './chevreAdmin/offerItemCondition
42
42
  import type { OrderService } from './chevreAdmin/order';
43
43
  import type { OwnershipInfoService } from './chevreAdmin/ownershipInfo';
44
44
  import type { PaymentProductService } from './chevreAdmin/paymentService';
45
+ import type { PaymentServiceChannelService } from './chevreAdmin/paymentServiceChannel';
45
46
  import type { PermissionService } from './chevreAdmin/permission';
46
47
  import type { PermitService } from './chevreAdmin/permit';
47
48
  import type { PersonService } from './chevreAdmin/person';
@@ -291,6 +292,13 @@ export declare namespace service {
291
292
  namespace PaymentProduct {
292
293
  let svc: typeof PaymentProductService | undefined;
293
294
  }
295
+ /**
296
+ * 決済サービスチャネルサービス
297
+ */
298
+ type PaymentServiceChannel = PaymentServiceChannelService;
299
+ namespace PaymentServiceChannel {
300
+ let svc: typeof PaymentServiceChannelService | undefined;
301
+ }
294
302
  /**
295
303
  * 権限サービス
296
304
  */
@@ -579,6 +587,7 @@ export declare class ChevreAdmin {
579
587
  createOrderInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<OrderService>;
580
588
  createOwnershipInfoInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<OwnershipInfoService>;
581
589
  createPaymentProductInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<PaymentProductService>;
590
+ createPaymentServiceChannelInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<PaymentServiceChannelService>;
582
591
  createPermissionInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<PermissionService>;
583
592
  createPermitInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<PermitService>;
584
593
  createPersonInstance(params: Pick<IOptions, 'project'>): Promise<PersonService>;
@@ -146,6 +146,9 @@ var service;
146
146
  var PaymentProduct;
147
147
  (function (PaymentProduct) {
148
148
  })(PaymentProduct = service.PaymentProduct || (service.PaymentProduct = {}));
149
+ var PaymentServiceChannel;
150
+ (function (PaymentServiceChannel) {
151
+ })(PaymentServiceChannel = service.PaymentServiceChannel || (service.PaymentServiceChannel = {}));
149
152
  var Permission;
150
153
  (function (Permission) {
151
154
  })(Permission = service.Permission || (service.Permission = {}));
@@ -816,6 +819,23 @@ var ChevreAdmin = /** @class */ (function () {
816
819
  });
817
820
  });
818
821
  };
822
+ ChevreAdmin.prototype.createPaymentServiceChannelInstance = function (params) {
823
+ return __awaiter(this, void 0, void 0, function () {
824
+ var _a;
825
+ return __generator(this, function (_b) {
826
+ switch (_b.label) {
827
+ case 0:
828
+ if (!(service.PaymentServiceChannel.svc === undefined)) return [3 /*break*/, 2];
829
+ _a = service.PaymentServiceChannel;
830
+ return [4 /*yield*/, Promise.resolve().then(function () { return require('./chevreAdmin/paymentServiceChannel'); })];
831
+ case 1:
832
+ _a.svc = (_b.sent()).PaymentServiceChannelService;
833
+ _b.label = 2;
834
+ case 2: return [2 /*return*/, new service.PaymentServiceChannel.svc(__assign(__assign(__assign({}, this.options), params), { retryableStatusCodes: [] }))];
835
+ }
836
+ });
837
+ });
838
+ };
819
839
  ChevreAdmin.prototype.createPermissionInstance = function (params) {
820
840
  return __awaiter(this, void 0, void 0, function () {
821
841
  var _a;