@cinerino/sdk 5.5.0-alpha.1 → 5.5.0-alpha.3
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/example/playground/public/lib/bundle.js +809 -466
- package/lib/abstract/chevre/product.d.ts +2 -3
- package/lib/abstract/chevre/seller/factory.d.ts +0 -3
- package/lib/abstract/chevreAdmin/paymentService.d.ts +44 -0
- package/lib/abstract/chevreAdmin/paymentService.js +176 -0
- package/lib/abstract/chevreAdmin/product.d.ts +9 -35
- package/lib/abstract/chevreAdmin/product.js +0 -98
- package/lib/abstract/chevreAdmin/seller/factory.d.ts +1 -1
- package/lib/abstract/chevreAdmin.d.ts +9 -0
- package/lib/abstract/chevreAdmin.js +20 -0
- package/lib/bundle.js +477 -377
- package/package.json +2 -2
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import * as factory from '../factory';
|
|
2
2
|
import { Service } from '../service';
|
|
3
|
-
export declare type
|
|
4
|
-
export declare type
|
|
5
|
-
export declare type IPaymentServiceWithoutCredentials = Omit<factory.service.paymentService.IService, 'availableChannel' | 'provider' | 'project'>;
|
|
3
|
+
export declare type IProductWithoutCredentials = Omit<factory.product.IProduct, 'availableChannel' | 'project'>;
|
|
4
|
+
export declare type IPaymentServiceWithoutCredentials = Omit<factory.service.paymentService.IService, 'availableChannel' | 'project'>;
|
|
6
5
|
export declare type ISearchProductsResult = IProductWithoutCredentials | IPaymentServiceWithoutCredentials;
|
|
7
6
|
declare type IKeyOfProjection = keyof factory.product.IProduct | keyof factory.service.paymentService.IService | '_id';
|
|
8
7
|
declare type IProjection = {
|
|
@@ -5,9 +5,6 @@ export declare type IPaymentServiceByProvider = Pick<factory.service.paymentServ
|
|
|
5
5
|
credentials?: IReadableProviderCredentials;
|
|
6
6
|
};
|
|
7
7
|
};
|
|
8
|
-
export declare type IProvidePaymentService = Pick<factory.service.paymentService.IService, 'id' | 'name' | 'typeOf'> & {
|
|
9
|
-
provider: Pick<factory.service.paymentService.IProvider, 'id' | 'name' | 'credentials'>;
|
|
10
|
-
};
|
|
11
8
|
export declare type ISearchPaymentServiceConditions = Pick<factory.product.ISearchConditions, 'limit' | 'page' | 'sort' | 'typeOf'>;
|
|
12
9
|
export declare type IPaymentAccepted = Pick<factory.categoryCode.ICategoryCode, 'codeValue' | 'additionalProperty' | 'color' | 'image' | 'name'>;
|
|
13
10
|
export declare type IMakesProductOffer = Pick<factory.product.IOffer, 'availabilityEnds' | 'availabilityStarts' | 'seller' | 'validFrom' | 'validThrough'> & {
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import * as factory from '../factory';
|
|
2
|
+
import { Service } from '../service';
|
|
3
|
+
export declare type IPaymentServiceWithoutCredentials = Omit<factory.service.paymentService.IService, 'availableChannel'>;
|
|
4
|
+
export declare type ISearchProductsResult = IPaymentServiceWithoutCredentials;
|
|
5
|
+
declare type IKeyOfProjection = keyof factory.service.paymentService.IService | '_id';
|
|
6
|
+
declare type IProjection = {
|
|
7
|
+
[key in IKeyOfProjection]?: 0 | 1;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* 決済商品サービス
|
|
11
|
+
*/
|
|
12
|
+
export declare class PaymentProductService extends Service {
|
|
13
|
+
/**
|
|
14
|
+
* 決済サービス作成
|
|
15
|
+
*/
|
|
16
|
+
createPaymentService(params: Omit<factory.service.paymentService.IService, 'provider'>): Promise<{
|
|
17
|
+
id: string;
|
|
18
|
+
}>;
|
|
19
|
+
/**
|
|
20
|
+
* 決済サービス検索
|
|
21
|
+
*/
|
|
22
|
+
searchPaymentServices(params: Omit<factory.product.ISearchConditions, 'project'> & {
|
|
23
|
+
typeOf?: {
|
|
24
|
+
$eq?: factory.service.paymentService.PaymentServiceType;
|
|
25
|
+
$in?: factory.service.paymentService.PaymentServiceType[];
|
|
26
|
+
};
|
|
27
|
+
} & {
|
|
28
|
+
$projection?: IProjection;
|
|
29
|
+
}): Promise<{
|
|
30
|
+
data: IPaymentServiceWithoutCredentials[];
|
|
31
|
+
}>;
|
|
32
|
+
findPaymentServiceById(params: {
|
|
33
|
+
id: string;
|
|
34
|
+
} & {
|
|
35
|
+
$projection?: IProjection;
|
|
36
|
+
}): Promise<Omit<factory.service.paymentService.IService, 'provider'>>;
|
|
37
|
+
updatePaymentService(params: Omit<factory.service.paymentService.IService, 'provider'> & {
|
|
38
|
+
id: string;
|
|
39
|
+
}): Promise<void>;
|
|
40
|
+
deletePaymentServiceById(params: {
|
|
41
|
+
id: string;
|
|
42
|
+
}): Promise<void>;
|
|
43
|
+
}
|
|
44
|
+
export {};
|
|
@@ -0,0 +1,176 @@
|
|
|
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.PaymentProductService = void 0;
|
|
66
|
+
var http_status_1 = require("http-status");
|
|
67
|
+
var service_1 = require("../service");
|
|
68
|
+
/**
|
|
69
|
+
* 決済商品サービス
|
|
70
|
+
*/
|
|
71
|
+
var PaymentProductService = /** @class */ (function (_super) {
|
|
72
|
+
__extends(PaymentProductService, _super);
|
|
73
|
+
function PaymentProductService() {
|
|
74
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* 決済サービス作成
|
|
78
|
+
*/
|
|
79
|
+
PaymentProductService.prototype.createPaymentService = 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: '/paymentServices',
|
|
85
|
+
method: 'POST',
|
|
86
|
+
body: params,
|
|
87
|
+
expectedStatusCodes: [http_status_1.CREATED]
|
|
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
|
+
};
|
|
95
|
+
/**
|
|
96
|
+
* 決済サービス検索
|
|
97
|
+
*/
|
|
98
|
+
PaymentProductService.prototype.searchPaymentServices = function (params) {
|
|
99
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
100
|
+
var _this = this;
|
|
101
|
+
return __generator(this, function (_a) {
|
|
102
|
+
return [2 /*return*/, this.fetch({
|
|
103
|
+
uri: '/paymentServices',
|
|
104
|
+
method: 'GET',
|
|
105
|
+
qs: params,
|
|
106
|
+
expectedStatusCodes: [http_status_1.OK]
|
|
107
|
+
})
|
|
108
|
+
.then(function (response) { return __awaiter(_this, void 0, void 0, function () {
|
|
109
|
+
var _a;
|
|
110
|
+
return __generator(this, function (_b) {
|
|
111
|
+
switch (_b.label) {
|
|
112
|
+
case 0:
|
|
113
|
+
_a = {};
|
|
114
|
+
return [4 /*yield*/, response.json()];
|
|
115
|
+
case 1: return [2 /*return*/, (_a.data = _b.sent(),
|
|
116
|
+
_a)];
|
|
117
|
+
}
|
|
118
|
+
});
|
|
119
|
+
}); })];
|
|
120
|
+
});
|
|
121
|
+
});
|
|
122
|
+
};
|
|
123
|
+
PaymentProductService.prototype.findPaymentServiceById = function (params) {
|
|
124
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
125
|
+
var id, query;
|
|
126
|
+
var _this = this;
|
|
127
|
+
return __generator(this, function (_a) {
|
|
128
|
+
id = params.id, query = __rest(params, ["id"]);
|
|
129
|
+
return [2 /*return*/, this.fetch({
|
|
130
|
+
uri: "/paymentServices/" + encodeURIComponent(String(id)),
|
|
131
|
+
method: 'GET',
|
|
132
|
+
expectedStatusCodes: [http_status_1.OK],
|
|
133
|
+
qs: query
|
|
134
|
+
})
|
|
135
|
+
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
136
|
+
return [2 /*return*/, response.json()];
|
|
137
|
+
}); }); })];
|
|
138
|
+
});
|
|
139
|
+
});
|
|
140
|
+
};
|
|
141
|
+
PaymentProductService.prototype.updatePaymentService = 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: "/paymentServices/" + encodeURIComponent(String(params.id)),
|
|
147
|
+
method: 'PUT',
|
|
148
|
+
body: params,
|
|
149
|
+
expectedStatusCodes: [http_status_1.NO_CONTENT]
|
|
150
|
+
})];
|
|
151
|
+
case 1:
|
|
152
|
+
_a.sent();
|
|
153
|
+
return [2 /*return*/];
|
|
154
|
+
}
|
|
155
|
+
});
|
|
156
|
+
});
|
|
157
|
+
};
|
|
158
|
+
PaymentProductService.prototype.deletePaymentServiceById = function (params) {
|
|
159
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
160
|
+
return __generator(this, function (_a) {
|
|
161
|
+
switch (_a.label) {
|
|
162
|
+
case 0: return [4 /*yield*/, this.fetch({
|
|
163
|
+
uri: "/paymentServices/" + encodeURIComponent(String(params.id)),
|
|
164
|
+
method: 'DELETE',
|
|
165
|
+
expectedStatusCodes: [http_status_1.NO_CONTENT]
|
|
166
|
+
})];
|
|
167
|
+
case 1:
|
|
168
|
+
_a.sent();
|
|
169
|
+
return [2 /*return*/];
|
|
170
|
+
}
|
|
171
|
+
});
|
|
172
|
+
});
|
|
173
|
+
};
|
|
174
|
+
return PaymentProductService;
|
|
175
|
+
}(service_1.Service));
|
|
176
|
+
exports.PaymentProductService = PaymentProductService;
|
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
import * as factory from '../factory';
|
|
2
2
|
import { Service } from '../service';
|
|
3
|
-
export declare type IProductWithoutCredentials = Omit<factory.product.IProduct, 'availableChannel'
|
|
4
|
-
export declare type
|
|
5
|
-
|
|
6
|
-
declare type IKeyOfProjection = keyof factory.product.IProduct | keyof factory.service.paymentService.IService | '_id';
|
|
3
|
+
export declare type IProductWithoutCredentials = Omit<factory.product.IProduct, 'availableChannel'>;
|
|
4
|
+
export declare type ISearchProductsResult = IProductWithoutCredentials;
|
|
5
|
+
declare type IKeyOfProjection = keyof factory.product.IProduct | '_id';
|
|
7
6
|
declare type IProjection = {
|
|
8
7
|
[key in IKeyOfProjection]?: 0 | 1;
|
|
9
8
|
};
|
|
10
|
-
interface IProjectionSearchConditions {
|
|
11
|
-
$projection?: IProjection;
|
|
12
|
-
}
|
|
13
9
|
/**
|
|
14
10
|
* プロダクトサービス
|
|
15
11
|
*/
|
|
@@ -20,12 +16,6 @@ export declare class ProductService extends Service {
|
|
|
20
16
|
createProduct(params: factory.product.ICreateParams): Promise<{
|
|
21
17
|
id: string;
|
|
22
18
|
}>;
|
|
23
|
-
/**
|
|
24
|
-
* 決済サービス作成
|
|
25
|
-
*/
|
|
26
|
-
createPaymentService(params: Omit<factory.service.paymentService.IService, 'provider'>): Promise<{
|
|
27
|
-
id: string;
|
|
28
|
-
}>;
|
|
29
19
|
/**
|
|
30
20
|
* プロダクトタイプでなければ作成
|
|
31
21
|
*/
|
|
@@ -40,37 +30,21 @@ export declare class ProductService extends Service {
|
|
|
40
30
|
$eq?: factory.product.ProductType;
|
|
41
31
|
$in?: factory.product.ProductType[];
|
|
42
32
|
};
|
|
43
|
-
} &
|
|
33
|
+
} & {
|
|
34
|
+
$projection?: IProjection;
|
|
35
|
+
}): Promise<{
|
|
44
36
|
data: IProductWithoutCredentials[];
|
|
45
37
|
}>;
|
|
46
|
-
/**
|
|
47
|
-
* 決済サービス検索
|
|
48
|
-
*/
|
|
49
|
-
searchPaymentServices(params: Omit<factory.product.ISearchConditions, 'project'> & {
|
|
50
|
-
typeOf?: {
|
|
51
|
-
$eq?: factory.service.paymentService.PaymentServiceType;
|
|
52
|
-
$in?: factory.service.paymentService.PaymentServiceType[];
|
|
53
|
-
};
|
|
54
|
-
} & IProjectionSearchConditions): Promise<{
|
|
55
|
-
data: IPaymentServiceWithoutCredentials[];
|
|
56
|
-
}>;
|
|
57
38
|
findProductById(params: {
|
|
58
39
|
id: string;
|
|
59
|
-
} &
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
} & IProjectionSearchConditions): Promise<Omit<factory.service.paymentService.IService, 'provider'>>;
|
|
40
|
+
} & {
|
|
41
|
+
$projection?: IProjection;
|
|
42
|
+
}): Promise<factory.product.IProduct>;
|
|
63
43
|
updateProduct(params: factory.product.ICreateParams & {
|
|
64
44
|
id: string;
|
|
65
45
|
}): Promise<void>;
|
|
66
|
-
updatePaymentService(params: Omit<factory.service.paymentService.IService, 'provider'> & {
|
|
67
|
-
id: string;
|
|
68
|
-
}): Promise<void>;
|
|
69
46
|
deleteProductById(params: {
|
|
70
47
|
id: string;
|
|
71
48
|
}): Promise<void>;
|
|
72
|
-
deletePaymentServiceById(params: {
|
|
73
|
-
id: string;
|
|
74
|
-
}): Promise<void>;
|
|
75
49
|
}
|
|
76
50
|
export {};
|
|
@@ -92,25 +92,6 @@ var ProductService = /** @class */ (function (_super) {
|
|
|
92
92
|
});
|
|
93
93
|
});
|
|
94
94
|
};
|
|
95
|
-
/**
|
|
96
|
-
* 決済サービス作成
|
|
97
|
-
*/
|
|
98
|
-
ProductService.prototype.createPaymentService = function (params) {
|
|
99
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
100
|
-
var _this = this;
|
|
101
|
-
return __generator(this, function (_a) {
|
|
102
|
-
return [2 /*return*/, this.fetch({
|
|
103
|
-
uri: '/paymentServices',
|
|
104
|
-
method: 'POST',
|
|
105
|
-
body: params,
|
|
106
|
-
expectedStatusCodes: [http_status_1.CREATED]
|
|
107
|
-
})
|
|
108
|
-
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
109
|
-
return [2 /*return*/, response.json()];
|
|
110
|
-
}); }); })];
|
|
111
|
-
});
|
|
112
|
-
});
|
|
113
|
-
};
|
|
114
95
|
/**
|
|
115
96
|
* プロダクトタイプでなければ作成
|
|
116
97
|
*/
|
|
@@ -159,34 +140,6 @@ var ProductService = /** @class */ (function (_super) {
|
|
|
159
140
|
});
|
|
160
141
|
});
|
|
161
142
|
};
|
|
162
|
-
/**
|
|
163
|
-
* 決済サービス検索
|
|
164
|
-
*/
|
|
165
|
-
ProductService.prototype.searchPaymentServices = function (params) {
|
|
166
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
167
|
-
var _this = this;
|
|
168
|
-
return __generator(this, function (_a) {
|
|
169
|
-
return [2 /*return*/, this.fetch({
|
|
170
|
-
uri: '/paymentServices',
|
|
171
|
-
method: 'GET',
|
|
172
|
-
qs: params,
|
|
173
|
-
expectedStatusCodes: [http_status_1.OK]
|
|
174
|
-
})
|
|
175
|
-
.then(function (response) { return __awaiter(_this, void 0, void 0, function () {
|
|
176
|
-
var _a;
|
|
177
|
-
return __generator(this, function (_b) {
|
|
178
|
-
switch (_b.label) {
|
|
179
|
-
case 0:
|
|
180
|
-
_a = {};
|
|
181
|
-
return [4 /*yield*/, response.json()];
|
|
182
|
-
case 1: return [2 /*return*/, (_a.data = _b.sent(),
|
|
183
|
-
_a)];
|
|
184
|
-
}
|
|
185
|
-
});
|
|
186
|
-
}); })];
|
|
187
|
-
});
|
|
188
|
-
});
|
|
189
|
-
};
|
|
190
143
|
ProductService.prototype.findProductById = function (params) {
|
|
191
144
|
return __awaiter(this, void 0, void 0, function () {
|
|
192
145
|
var id, query;
|
|
@@ -205,24 +158,6 @@ var ProductService = /** @class */ (function (_super) {
|
|
|
205
158
|
});
|
|
206
159
|
});
|
|
207
160
|
};
|
|
208
|
-
ProductService.prototype.findPaymentServiceById = function (params) {
|
|
209
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
210
|
-
var id, query;
|
|
211
|
-
var _this = this;
|
|
212
|
-
return __generator(this, function (_a) {
|
|
213
|
-
id = params.id, query = __rest(params, ["id"]);
|
|
214
|
-
return [2 /*return*/, this.fetch({
|
|
215
|
-
uri: "/paymentServices/" + encodeURIComponent(String(id)),
|
|
216
|
-
method: 'GET',
|
|
217
|
-
expectedStatusCodes: [http_status_1.OK],
|
|
218
|
-
qs: query
|
|
219
|
-
})
|
|
220
|
-
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
221
|
-
return [2 /*return*/, response.json()];
|
|
222
|
-
}); }); })];
|
|
223
|
-
});
|
|
224
|
-
});
|
|
225
|
-
};
|
|
226
161
|
ProductService.prototype.updateProduct = function (params) {
|
|
227
162
|
return __awaiter(this, void 0, void 0, function () {
|
|
228
163
|
return __generator(this, function (_a) {
|
|
@@ -240,23 +175,6 @@ var ProductService = /** @class */ (function (_super) {
|
|
|
240
175
|
});
|
|
241
176
|
});
|
|
242
177
|
};
|
|
243
|
-
ProductService.prototype.updatePaymentService = function (params) {
|
|
244
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
245
|
-
return __generator(this, function (_a) {
|
|
246
|
-
switch (_a.label) {
|
|
247
|
-
case 0: return [4 /*yield*/, this.fetch({
|
|
248
|
-
uri: "/paymentServices/" + encodeURIComponent(String(params.id)),
|
|
249
|
-
method: 'PUT',
|
|
250
|
-
body: params,
|
|
251
|
-
expectedStatusCodes: [http_status_1.NO_CONTENT]
|
|
252
|
-
})];
|
|
253
|
-
case 1:
|
|
254
|
-
_a.sent();
|
|
255
|
-
return [2 /*return*/];
|
|
256
|
-
}
|
|
257
|
-
});
|
|
258
|
-
});
|
|
259
|
-
};
|
|
260
178
|
ProductService.prototype.deleteProductById = function (params) {
|
|
261
179
|
return __awaiter(this, void 0, void 0, function () {
|
|
262
180
|
return __generator(this, function (_a) {
|
|
@@ -273,22 +191,6 @@ var ProductService = /** @class */ (function (_super) {
|
|
|
273
191
|
});
|
|
274
192
|
});
|
|
275
193
|
};
|
|
276
|
-
ProductService.prototype.deletePaymentServiceById = function (params) {
|
|
277
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
278
|
-
return __generator(this, function (_a) {
|
|
279
|
-
switch (_a.label) {
|
|
280
|
-
case 0: return [4 /*yield*/, this.fetch({
|
|
281
|
-
uri: "/paymentServices/" + encodeURIComponent(String(params.id)),
|
|
282
|
-
method: 'DELETE',
|
|
283
|
-
expectedStatusCodes: [http_status_1.NO_CONTENT]
|
|
284
|
-
})];
|
|
285
|
-
case 1:
|
|
286
|
-
_a.sent();
|
|
287
|
-
return [2 /*return*/];
|
|
288
|
-
}
|
|
289
|
-
});
|
|
290
|
-
});
|
|
291
|
-
};
|
|
292
194
|
return ProductService;
|
|
293
195
|
}(service_1.Service));
|
|
294
196
|
exports.ProductService = ProductService;
|
|
@@ -6,7 +6,7 @@ export declare type IPaymentServiceByProvider = Pick<factory.service.paymentServ
|
|
|
6
6
|
};
|
|
7
7
|
};
|
|
8
8
|
export declare type IProvidePaymentService = Pick<factory.service.paymentService.IService, 'id' | 'name' | 'typeOf'> & {
|
|
9
|
-
provider: Pick<factory.service.paymentService.IProvider, 'id' | '
|
|
9
|
+
provider: Pick<factory.service.paymentService.IProvider, 'id' | 'credentials'>;
|
|
10
10
|
};
|
|
11
11
|
export declare type ISearchPaymentServiceConditions = Pick<factory.product.ISearchConditions, 'limit' | 'page' | 'sort' | 'typeOf'>;
|
|
12
12
|
export declare type IPaymentAccepted = Pick<factory.categoryCode.ICategoryCode, 'codeValue' | 'additionalProperty' | 'color' | 'image' | 'name'>;
|
|
@@ -30,6 +30,7 @@ import type { OfferCatalogItemService } from './chevreAdmin/offerCatalogItem';
|
|
|
30
30
|
import type { OfferItemConditionService } from './chevreAdmin/offerItemCondition';
|
|
31
31
|
import type { OrderService } from './chevreAdmin/order';
|
|
32
32
|
import type { OwnershipInfoService } from './chevreAdmin/ownershipInfo';
|
|
33
|
+
import type { PaymentProductService } from './chevreAdmin/paymentService';
|
|
33
34
|
import type { PermissionService } from './chevreAdmin/permission';
|
|
34
35
|
import type { PermitService } from './chevreAdmin/permit';
|
|
35
36
|
import type { PersonService } from './chevreAdmin/person';
|
|
@@ -191,6 +192,13 @@ export declare namespace service {
|
|
|
191
192
|
namespace OwnershipInfo {
|
|
192
193
|
let svc: typeof OwnershipInfoService | undefined;
|
|
193
194
|
}
|
|
195
|
+
/**
|
|
196
|
+
* 決済サービス
|
|
197
|
+
*/
|
|
198
|
+
type PaymentProduct = PaymentProductService;
|
|
199
|
+
namespace PaymentProduct {
|
|
200
|
+
let svc: typeof PaymentProductService | undefined;
|
|
201
|
+
}
|
|
194
202
|
/**
|
|
195
203
|
* 権限サービス
|
|
196
204
|
*/
|
|
@@ -439,6 +447,7 @@ export declare class ChevreAdmin {
|
|
|
439
447
|
createMerchantReturnPolicyInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<MerchantReturnPolicyService>;
|
|
440
448
|
createOrderInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<OrderService>;
|
|
441
449
|
createOwnershipInfoInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<OwnershipInfoService>;
|
|
450
|
+
createPaymentProductInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<PaymentProductService>;
|
|
442
451
|
createPermissionInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<PermissionService>;
|
|
443
452
|
createPermitInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<PermitService>;
|
|
444
453
|
createPersonInstance(params: Pick<IOptions, 'project'>): Promise<PersonService>;
|
|
@@ -110,6 +110,9 @@ var service;
|
|
|
110
110
|
var OwnershipInfo;
|
|
111
111
|
(function (OwnershipInfo) {
|
|
112
112
|
})(OwnershipInfo = service.OwnershipInfo || (service.OwnershipInfo = {}));
|
|
113
|
+
var PaymentProduct;
|
|
114
|
+
(function (PaymentProduct) {
|
|
115
|
+
})(PaymentProduct = service.PaymentProduct || (service.PaymentProduct = {}));
|
|
113
116
|
var Permission;
|
|
114
117
|
(function (Permission) {
|
|
115
118
|
})(Permission = service.Permission || (service.Permission = {}));
|
|
@@ -564,6 +567,23 @@ var ChevreAdmin = /** @class */ (function () {
|
|
|
564
567
|
});
|
|
565
568
|
});
|
|
566
569
|
};
|
|
570
|
+
ChevreAdmin.prototype.createPaymentProductInstance = function (params) {
|
|
571
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
572
|
+
var _a;
|
|
573
|
+
return __generator(this, function (_b) {
|
|
574
|
+
switch (_b.label) {
|
|
575
|
+
case 0:
|
|
576
|
+
if (!(service.PaymentProduct.svc === undefined)) return [3 /*break*/, 2];
|
|
577
|
+
_a = service.PaymentProduct;
|
|
578
|
+
return [4 /*yield*/, Promise.resolve().then(function () { return require('./chevreAdmin/paymentService'); })];
|
|
579
|
+
case 1:
|
|
580
|
+
_a.svc = (_b.sent()).PaymentProductService;
|
|
581
|
+
_b.label = 2;
|
|
582
|
+
case 2: return [2 /*return*/, new service.PaymentProduct.svc(__assign(__assign({}, this.options), params))];
|
|
583
|
+
}
|
|
584
|
+
});
|
|
585
|
+
});
|
|
586
|
+
};
|
|
567
587
|
ChevreAdmin.prototype.createPermissionInstance = function (params) {
|
|
568
588
|
return __awaiter(this, void 0, void 0, function () {
|
|
569
589
|
var _a;
|