@cinerino/sdk 11.0.0-alpha.2 → 11.0.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/src/cloud/adminSearchSellers.ts +32 -0
- package/example/src/st/sampleRequestByApigee.ts +63 -0
- package/lib/abstract/chevreAdmin/seller.d.ts +20 -0
- package/lib/abstract/chevreAdmin/seller.js +86 -0
- package/lib/abstract/chevreAdmin.d.ts +9 -0
- package/lib/abstract/chevreAdmin.js +20 -0
- package/lib/abstract/cloud/admin/seller.d.ts +11 -0
- package/lib/abstract/cloud/admin/seller.js +98 -0
- package/lib/abstract/cloud/admin.d.ts +9 -0
- package/lib/abstract/cloud/admin.js +20 -0
- package/lib/bundle.js +836 -608
- package/package.json +1 -1
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// tslint:disable:no-implicit-dependencies no-console no-magic-numbers
|
|
2
|
+
import { loadCloudAdmin } from '../../../lib/';
|
|
3
|
+
import * as auth from '../auth/authAsAdmin';
|
|
4
|
+
|
|
5
|
+
const project = { id: String(process.env.PROJECT_ID) };
|
|
6
|
+
|
|
7
|
+
async function main() {
|
|
8
|
+
const authClient = await auth.login();
|
|
9
|
+
await authClient.refreshAccessToken();
|
|
10
|
+
const loginTicket = authClient.verifyIdToken({});
|
|
11
|
+
console.log('username is', loginTicket.getUsername());
|
|
12
|
+
|
|
13
|
+
const sellerService = await (await loadCloudAdmin({
|
|
14
|
+
endpoint: <string>process.env.API_ADMIN_ENDPOINT,
|
|
15
|
+
auth: authClient
|
|
16
|
+
})).createSellerInstance({
|
|
17
|
+
project
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
const sellers = await sellerService.search({
|
|
21
|
+
limit: 3,
|
|
22
|
+
page: 1
|
|
23
|
+
});
|
|
24
|
+
console.log(sellers);
|
|
25
|
+
console.log(sellers.length, 'sellers found');
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
main()
|
|
29
|
+
.then(() => {
|
|
30
|
+
console.log('main processed.');
|
|
31
|
+
})
|
|
32
|
+
.catch(console.error);
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
|
|
2
|
+
// tslint:disable:no-console
|
|
3
|
+
async function getToken() {
|
|
4
|
+
try {
|
|
5
|
+
const response = await fetch(
|
|
6
|
+
`https://${process.env.ST_AUTHORIZE_SERVER_DOMAIN}/oauth2/token`,
|
|
7
|
+
{
|
|
8
|
+
method: 'POST',
|
|
9
|
+
headers: {
|
|
10
|
+
'Content-Type': 'application/x-www-form-urlencoded'
|
|
11
|
+
},
|
|
12
|
+
body: new URLSearchParams({
|
|
13
|
+
grant_type: 'client_credentials',
|
|
14
|
+
client_id: String(process.env.ST_CLIENT_ID),
|
|
15
|
+
client_secret: String(process.env.ST_CLIENT_SECRET)
|
|
16
|
+
}).toString()
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
if (!response.ok) {
|
|
20
|
+
console.log(await response.json());
|
|
21
|
+
throw new Error('Network response was not ok');
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const data = await response.json();
|
|
25
|
+
console.log(data);
|
|
26
|
+
|
|
27
|
+
return data;
|
|
28
|
+
} catch (error) {
|
|
29
|
+
console.error('Error fetching token:', error);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
async function fetchData(params: {
|
|
33
|
+
access_token: string;
|
|
34
|
+
// scope: string;
|
|
35
|
+
// expires_in: number;
|
|
36
|
+
// token_type: 'Bearer';
|
|
37
|
+
}) {
|
|
38
|
+
try {
|
|
39
|
+
const { access_token } = params;
|
|
40
|
+
const response = await fetch(
|
|
41
|
+
`${process.env.ST_API_ENDPOINT}/events/ScreeningEvent?limit=1`,
|
|
42
|
+
{
|
|
43
|
+
method: 'GET',
|
|
44
|
+
headers: {
|
|
45
|
+
authorization: `Bearer ${access_token}`
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
if (!response.ok) {
|
|
49
|
+
throw new Error(await response.text());
|
|
50
|
+
}
|
|
51
|
+
const data = await response.json();
|
|
52
|
+
console.log(data);
|
|
53
|
+
} catch (error) {
|
|
54
|
+
console.error('Error fetching data:', error);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
async function main() {
|
|
58
|
+
const token = await getToken();
|
|
59
|
+
await fetchData(token);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
main()
|
|
63
|
+
.catch(console.error);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as factory from '../factory';
|
|
2
|
+
import { IOptions, Service } from '../service';
|
|
3
|
+
declare type IKeyOfProjection = keyof Omit<factory.seller.ISeller, 'makesOffer' | 'paymentAccepted'>;
|
|
4
|
+
declare type IProjection = {
|
|
5
|
+
[key in IKeyOfProjection]?: 0;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* 販売者サービス
|
|
9
|
+
*/
|
|
10
|
+
export declare class SellerService extends Service<IOptions> {
|
|
11
|
+
/**
|
|
12
|
+
* 販売者検索
|
|
13
|
+
*/
|
|
14
|
+
search(params: Omit<factory.seller.ISearchConditions, 'project' | 'id'> & {
|
|
15
|
+
limit: number;
|
|
16
|
+
page: number;
|
|
17
|
+
$projection: IProjection;
|
|
18
|
+
}): Promise<Pick<factory.seller.ISeller, 'additionalProperty' | 'branchCode' | 'id' | 'name' | 'project' | 'telephone' | 'typeOf' | 'url'>[]>;
|
|
19
|
+
}
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,86 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
54
|
+
exports.SellerService = void 0;
|
|
55
|
+
var http_status_1 = require("http-status");
|
|
56
|
+
var service_1 = require("../service");
|
|
57
|
+
/**
|
|
58
|
+
* 販売者サービス
|
|
59
|
+
*/
|
|
60
|
+
var SellerService = /** @class */ (function (_super) {
|
|
61
|
+
__extends(SellerService, _super);
|
|
62
|
+
function SellerService() {
|
|
63
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* 販売者検索
|
|
67
|
+
*/
|
|
68
|
+
SellerService.prototype.search = function (params) {
|
|
69
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
70
|
+
var _this = this;
|
|
71
|
+
return __generator(this, function (_a) {
|
|
72
|
+
return [2 /*return*/, this.fetch({
|
|
73
|
+
uri: '/sellers',
|
|
74
|
+
method: 'GET',
|
|
75
|
+
qs: params,
|
|
76
|
+
expectedStatusCodes: [http_status_1.OK]
|
|
77
|
+
})
|
|
78
|
+
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
79
|
+
return [2 /*return*/, response.json()];
|
|
80
|
+
}); }); })];
|
|
81
|
+
});
|
|
82
|
+
});
|
|
83
|
+
};
|
|
84
|
+
return SellerService;
|
|
85
|
+
}(service_1.Service));
|
|
86
|
+
exports.SellerService = SellerService;
|
|
@@ -14,6 +14,7 @@ import type { OfferCatalogItemService } from './chevreAdmin/offerCatalogItem';
|
|
|
14
14
|
import type { OrderService } from './chevreAdmin/order';
|
|
15
15
|
import type { ProductService } from './chevreAdmin/product';
|
|
16
16
|
import type { ReservationService } from './chevreAdmin/reservation';
|
|
17
|
+
import type { SellerService } from './chevreAdmin/seller';
|
|
17
18
|
export declare namespace service {
|
|
18
19
|
type IUnset = IUnsetOnService;
|
|
19
20
|
/**
|
|
@@ -93,6 +94,13 @@ export declare namespace service {
|
|
|
93
94
|
namespace Reservation {
|
|
94
95
|
let svc: typeof ReservationService | undefined;
|
|
95
96
|
}
|
|
97
|
+
/**
|
|
98
|
+
* 販売者サービス
|
|
99
|
+
*/
|
|
100
|
+
type Seller = SellerService;
|
|
101
|
+
namespace Seller {
|
|
102
|
+
let svc: typeof SellerService | undefined;
|
|
103
|
+
}
|
|
96
104
|
/**
|
|
97
105
|
* オファーサービス
|
|
98
106
|
*/
|
|
@@ -141,6 +149,7 @@ export declare class ChevreAdmin {
|
|
|
141
149
|
createOrderInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<OrderService>;
|
|
142
150
|
createProductInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<ProductService>;
|
|
143
151
|
createReservationInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<ReservationService>;
|
|
152
|
+
createSellerInstance(params: Pick<IOptions, 'project'>): Promise<SellerService>;
|
|
144
153
|
createOfferInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<OfferService>;
|
|
145
154
|
createOfferCatalogInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<OfferCatalogService>;
|
|
146
155
|
createOfferCatalogItemInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<OfferCatalogItemService>;
|
|
@@ -83,6 +83,9 @@ var service;
|
|
|
83
83
|
var Reservation;
|
|
84
84
|
(function (Reservation) {
|
|
85
85
|
})(Reservation = service.Reservation || (service.Reservation = {}));
|
|
86
|
+
var Seller;
|
|
87
|
+
(function (Seller) {
|
|
88
|
+
})(Seller = service.Seller || (service.Seller = {}));
|
|
86
89
|
var Offer;
|
|
87
90
|
(function (Offer) {
|
|
88
91
|
})(Offer = service.Offer || (service.Offer = {}));
|
|
@@ -293,6 +296,23 @@ var ChevreAdmin = /** @class */ (function () {
|
|
|
293
296
|
});
|
|
294
297
|
});
|
|
295
298
|
};
|
|
299
|
+
ChevreAdmin.prototype.createSellerInstance = function (params) {
|
|
300
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
301
|
+
var _a;
|
|
302
|
+
return __generator(this, function (_b) {
|
|
303
|
+
switch (_b.label) {
|
|
304
|
+
case 0:
|
|
305
|
+
if (!(service.Seller.svc === undefined)) return [3 /*break*/, 2];
|
|
306
|
+
_a = service.Seller;
|
|
307
|
+
return [4 /*yield*/, Promise.resolve().then(function () { return require('./chevreAdmin/seller'); })];
|
|
308
|
+
case 1:
|
|
309
|
+
_a.svc = (_b.sent()).SellerService;
|
|
310
|
+
_b.label = 2;
|
|
311
|
+
case 2: return [2 /*return*/, new service.Seller.svc(__assign(__assign(__assign({}, this.options), params), { retryableStatusCodes: [] }))];
|
|
312
|
+
}
|
|
313
|
+
});
|
|
314
|
+
});
|
|
315
|
+
};
|
|
296
316
|
ChevreAdmin.prototype.createOfferInstance = function (params) {
|
|
297
317
|
return __awaiter(this, void 0, void 0, function () {
|
|
298
318
|
var _a;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as factory from '../../factory';
|
|
2
|
+
import { IOptions, Service } from '../../service';
|
|
3
|
+
/**
|
|
4
|
+
* 販売者サービス
|
|
5
|
+
*/
|
|
6
|
+
export declare class SellerService extends Service<IOptions> {
|
|
7
|
+
search(params: Omit<factory.seller.ISearchConditions, 'project' | 'id'> & {
|
|
8
|
+
limit: number;
|
|
9
|
+
page: number;
|
|
10
|
+
}): Promise<Pick<factory.seller.ISeller, 'additionalProperty' | 'branchCode' | 'id' | 'name' | 'telephone' | 'typeOf' | 'url'>[]>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
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 __assign = (this && this.__assign) || function () {
|
|
18
|
+
__assign = Object.assign || function(t) {
|
|
19
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
20
|
+
s = arguments[i];
|
|
21
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
22
|
+
t[p] = s[p];
|
|
23
|
+
}
|
|
24
|
+
return t;
|
|
25
|
+
};
|
|
26
|
+
return __assign.apply(this, arguments);
|
|
27
|
+
};
|
|
28
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
29
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
30
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
31
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
32
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
33
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
34
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
35
|
+
});
|
|
36
|
+
};
|
|
37
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
38
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
39
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
40
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
41
|
+
function step(op) {
|
|
42
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
43
|
+
while (_) try {
|
|
44
|
+
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;
|
|
45
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
46
|
+
switch (op[0]) {
|
|
47
|
+
case 0: case 1: t = op; break;
|
|
48
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
49
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
50
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
51
|
+
default:
|
|
52
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
53
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
54
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
55
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
56
|
+
if (t[2]) _.ops.pop();
|
|
57
|
+
_.trys.pop(); continue;
|
|
58
|
+
}
|
|
59
|
+
op = body.call(thisArg, _);
|
|
60
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
61
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
65
|
+
exports.SellerService = void 0;
|
|
66
|
+
var index_1 = require("../../index");
|
|
67
|
+
var service_1 = require("../../service");
|
|
68
|
+
/**
|
|
69
|
+
* 販売者サービス
|
|
70
|
+
*/
|
|
71
|
+
var SellerService = /** @class */ (function (_super) {
|
|
72
|
+
__extends(SellerService, _super);
|
|
73
|
+
function SellerService() {
|
|
74
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
75
|
+
}
|
|
76
|
+
SellerService.prototype.search = function (params) {
|
|
77
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
78
|
+
var _a, auth, endpoint, project, chevreAdmin, sellerService;
|
|
79
|
+
return __generator(this, function (_b) {
|
|
80
|
+
switch (_b.label) {
|
|
81
|
+
case 0:
|
|
82
|
+
_a = this.options, auth = _a.auth, endpoint = _a.endpoint, project = _a.project;
|
|
83
|
+
return [4 /*yield*/, index_1.loadChevreAdmin({ auth: auth, endpoint: endpoint })];
|
|
84
|
+
case 1:
|
|
85
|
+
chevreAdmin = _b.sent();
|
|
86
|
+
return [4 /*yield*/, chevreAdmin.createSellerInstance({
|
|
87
|
+
project: project
|
|
88
|
+
})];
|
|
89
|
+
case 2:
|
|
90
|
+
sellerService = _b.sent();
|
|
91
|
+
return [2 /*return*/, sellerService.search(__assign(__assign({}, params), { $projection: {} }))];
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
});
|
|
95
|
+
};
|
|
96
|
+
return SellerService;
|
|
97
|
+
}(service_1.Service));
|
|
98
|
+
exports.SellerService = SellerService;
|
|
@@ -12,6 +12,7 @@ import type { OfferCatalogItemService } from './admin/offerCatalogItem';
|
|
|
12
12
|
import type { OrderService } from './admin/order';
|
|
13
13
|
import type { ProductService } from './admin/product';
|
|
14
14
|
import type { ReservationService } from './admin/reservation';
|
|
15
|
+
import type { SellerService } from './admin/seller';
|
|
15
16
|
export declare namespace service {
|
|
16
17
|
type IUnset = IUnsetOnService;
|
|
17
18
|
/**
|
|
@@ -105,6 +106,13 @@ export declare namespace service {
|
|
|
105
106
|
namespace Reservation {
|
|
106
107
|
let svc: typeof ReservationService | undefined;
|
|
107
108
|
}
|
|
109
|
+
/**
|
|
110
|
+
* 販売者サービス
|
|
111
|
+
*/
|
|
112
|
+
type Seller = SellerService;
|
|
113
|
+
namespace Seller {
|
|
114
|
+
let svc: typeof SellerService | undefined;
|
|
115
|
+
}
|
|
108
116
|
}
|
|
109
117
|
/**
|
|
110
118
|
* 管理サービス
|
|
@@ -125,4 +133,5 @@ export declare class CloudAdmin {
|
|
|
125
133
|
createOrderInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<OrderService>;
|
|
126
134
|
createProductInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<ProductService>;
|
|
127
135
|
createReservationInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<ReservationService>;
|
|
136
|
+
createSellerInstance(params: Pick<IOptions, 'project'>): Promise<SellerService>;
|
|
128
137
|
}
|
|
@@ -89,6 +89,9 @@ var service;
|
|
|
89
89
|
var Reservation;
|
|
90
90
|
(function (Reservation) {
|
|
91
91
|
})(Reservation = service.Reservation || (service.Reservation = {}));
|
|
92
|
+
var Seller;
|
|
93
|
+
(function (Seller) {
|
|
94
|
+
})(Seller = service.Seller || (service.Seller = {}));
|
|
92
95
|
})(service = exports.service || (exports.service = {}));
|
|
93
96
|
var defaultRetryableStatusCodes = [];
|
|
94
97
|
/**
|
|
@@ -326,6 +329,23 @@ var CloudAdmin = /** @class */ (function () {
|
|
|
326
329
|
});
|
|
327
330
|
});
|
|
328
331
|
};
|
|
332
|
+
CloudAdmin.prototype.createSellerInstance = function (params) {
|
|
333
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
334
|
+
var _a;
|
|
335
|
+
return __generator(this, function (_b) {
|
|
336
|
+
switch (_b.label) {
|
|
337
|
+
case 0:
|
|
338
|
+
if (!(service.Seller.svc === undefined)) return [3 /*break*/, 2];
|
|
339
|
+
_a = service.Seller;
|
|
340
|
+
return [4 /*yield*/, Promise.resolve().then(function () { return require('./admin/seller'); })];
|
|
341
|
+
case 1:
|
|
342
|
+
_a.svc = (_b.sent()).SellerService;
|
|
343
|
+
_b.label = 2;
|
|
344
|
+
case 2: return [2 /*return*/, new service.Seller.svc(__assign(__assign(__assign({}, this.options), params), { retryableStatusCodes: defaultRetryableStatusCodes }))];
|
|
345
|
+
}
|
|
346
|
+
});
|
|
347
|
+
});
|
|
348
|
+
};
|
|
329
349
|
return CloudAdmin;
|
|
330
350
|
}());
|
|
331
351
|
exports.CloudAdmin = CloudAdmin;
|