@cinerino/sdk 10.17.0 → 10.18.0-alpha.1
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.
|
@@ -15471,6 +15471,22 @@ var ProductService = /** @class */ (function (_super) {
|
|
|
15471
15471
|
});
|
|
15472
15472
|
});
|
|
15473
15473
|
};
|
|
15474
|
+
ProductService.prototype.searchProductModels = function (params) {
|
|
15475
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
15476
|
+
var _this = this;
|
|
15477
|
+
return __generator(this, function (_a) {
|
|
15478
|
+
return [2 /*return*/, this.fetch({
|
|
15479
|
+
uri: '/productModels',
|
|
15480
|
+
method: 'GET',
|
|
15481
|
+
qs: params,
|
|
15482
|
+
expectedStatusCodes: [http_status_1.OK]
|
|
15483
|
+
})
|
|
15484
|
+
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
15485
|
+
return [2 /*return*/, response.json()];
|
|
15486
|
+
}); }); })];
|
|
15487
|
+
});
|
|
15488
|
+
});
|
|
15489
|
+
};
|
|
15474
15490
|
return ProductService;
|
|
15475
15491
|
}(service_1.Service));
|
|
15476
15492
|
exports.ProductService = ProductService;
|
|
@@ -27087,8 +27103,35 @@ arguments[4][68][0].apply(exports,arguments)
|
|
|
27087
27103
|
},{"dup":68}],285:[function(require,module,exports){
|
|
27088
27104
|
arguments[4][68][0].apply(exports,arguments)
|
|
27089
27105
|
},{"dup":68}],286:[function(require,module,exports){
|
|
27090
|
-
|
|
27091
|
-
|
|
27106
|
+
"use strict";
|
|
27107
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27108
|
+
// export interface ISchedule4ttts extends Pick<IEventWithSchedule, 'id' | 'offers' | 'project' | 'superEvent'> {
|
|
27109
|
+
// eventSchedule?: never;
|
|
27110
|
+
// duration: number;
|
|
27111
|
+
// noPerformanceTimes: string[];
|
|
27112
|
+
// /**
|
|
27113
|
+
// * 作成対象時間: 9,10,11など
|
|
27114
|
+
// */
|
|
27115
|
+
// hours: string[];
|
|
27116
|
+
// /**
|
|
27117
|
+
// * ['00', '15', '30', '45']
|
|
27118
|
+
// */
|
|
27119
|
+
// minutes: string[];
|
|
27120
|
+
// /**
|
|
27121
|
+
// * ['1', '2', '3', '4']
|
|
27122
|
+
// */
|
|
27123
|
+
// tours: string[];
|
|
27124
|
+
// /**
|
|
27125
|
+
// * 作成開始が今日から何日後か
|
|
27126
|
+
// */
|
|
27127
|
+
// // start: number;
|
|
27128
|
+
// /**
|
|
27129
|
+
// * 何日分作成するか
|
|
27130
|
+
// */
|
|
27131
|
+
// days: number;
|
|
27132
|
+
// }
|
|
27133
|
+
|
|
27134
|
+
},{}],287:[function(require,module,exports){
|
|
27092
27135
|
arguments[4][68][0].apply(exports,arguments)
|
|
27093
27136
|
},{"dup":68}],288:[function(require,module,exports){
|
|
27094
27137
|
"use strict";
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
// tslint:disable:no-implicit-dependencies no-console
|
|
2
|
+
import * as client from '../../../lib/index';
|
|
3
|
+
|
|
4
|
+
const PROJECT_ID = String(process.env.PROJECT_ID);
|
|
5
|
+
|
|
6
|
+
async function main() {
|
|
7
|
+
const authClient = await client.auth.ClientCredentials.createInstance({
|
|
8
|
+
domain: <string>process.env.CHEVRE_AUTHORIZE_SERVER_DOMAIN,
|
|
9
|
+
clientId: <string>process.env.CHEVRE_CLIENT_ID,
|
|
10
|
+
clientSecret: <string>process.env.CHEVRE_CLIENT_SECRET,
|
|
11
|
+
scopes: [],
|
|
12
|
+
state: ''
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
const chevre = await client.loadChevre({
|
|
16
|
+
endpoint: <string>process.env.CHEVRE_ENDPOINT,
|
|
17
|
+
auth: authClient
|
|
18
|
+
});
|
|
19
|
+
const productService = await chevre.createProductInstance({
|
|
20
|
+
project: { id: PROJECT_ID },
|
|
21
|
+
seller: { id: '' }
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
const result = await productService.searchProductModels({
|
|
25
|
+
page: 1,
|
|
26
|
+
limit: 10,
|
|
27
|
+
category: {
|
|
28
|
+
codeValue: ['Comfort', 'GoldClass', 'Meal', 'Premium', 'Standard', 'UpGrade', 'Wheelchair', 'x', 'x', 'x'],
|
|
29
|
+
inCodeSet: { identifier: client.factory.categoryCode.CategorySetIdentifier.SeatingType }
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
// tslint:disable-next-line:no-null-keyword
|
|
33
|
+
console.dir(result, { depth: null });
|
|
34
|
+
console.log(result.length, 'productModels returned');
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
main()
|
|
38
|
+
.then(() => {
|
|
39
|
+
console.log('success!');
|
|
40
|
+
})
|
|
41
|
+
.catch(console.error);
|
|
@@ -6,6 +6,17 @@ export declare type IProductWithoutCredentials = Pick<factory.product.IProduct,
|
|
|
6
6
|
export declare type IPaymentServiceWithoutCredentials = Omit<factory.service.paymentService.IService, 'availableChannel' | 'project'> & {
|
|
7
7
|
id: string;
|
|
8
8
|
};
|
|
9
|
+
declare type IPriceComponent = Pick<factory.place.seat.IPriceComponent, 'name' | 'price'>;
|
|
10
|
+
interface IPriceSpecification {
|
|
11
|
+
priceComponent?: IPriceComponent[];
|
|
12
|
+
}
|
|
13
|
+
export interface IProductModel {
|
|
14
|
+
typeOf: 'ProductModel';
|
|
15
|
+
category: Pick<factory.categoryCode.ICategoryCode, 'codeValue'>;
|
|
16
|
+
offers?: {
|
|
17
|
+
priceSpecification?: IPriceSpecification;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
9
20
|
/**
|
|
10
21
|
* プロダクトサービス
|
|
11
22
|
*/
|
|
@@ -41,4 +52,22 @@ export declare class ProductService extends Service {
|
|
|
41
52
|
id?: string;
|
|
42
53
|
};
|
|
43
54
|
}): Promise<factory.product.ITicketOffer[]>;
|
|
55
|
+
searchProductModels(params: {
|
|
56
|
+
/**
|
|
57
|
+
* max: 10
|
|
58
|
+
*/
|
|
59
|
+
limit: number;
|
|
60
|
+
page: number;
|
|
61
|
+
category: {
|
|
62
|
+
/**
|
|
63
|
+
* 区分コード複数指定
|
|
64
|
+
* max: 10
|
|
65
|
+
*/
|
|
66
|
+
codeValue: string[];
|
|
67
|
+
inCodeSet: {
|
|
68
|
+
identifier: factory.categoryCode.CategorySetIdentifier.SeatingType;
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
}): Promise<IProductModel[]>;
|
|
44
72
|
}
|
|
73
|
+
export {};
|
|
@@ -130,6 +130,22 @@ var ProductService = /** @class */ (function (_super) {
|
|
|
130
130
|
});
|
|
131
131
|
});
|
|
132
132
|
};
|
|
133
|
+
ProductService.prototype.searchProductModels = function (params) {
|
|
134
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
135
|
+
var _this = this;
|
|
136
|
+
return __generator(this, function (_a) {
|
|
137
|
+
return [2 /*return*/, this.fetch({
|
|
138
|
+
uri: '/productModels',
|
|
139
|
+
method: 'GET',
|
|
140
|
+
qs: params,
|
|
141
|
+
expectedStatusCodes: [http_status_1.OK]
|
|
142
|
+
})
|
|
143
|
+
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
144
|
+
return [2 /*return*/, response.json()];
|
|
145
|
+
}); }); })];
|
|
146
|
+
});
|
|
147
|
+
});
|
|
148
|
+
};
|
|
133
149
|
return ProductService;
|
|
134
150
|
}(service_1.Service));
|
|
135
151
|
exports.ProductService = ProductService;
|
package/lib/bundle.js
CHANGED
|
@@ -1380,6 +1380,22 @@ var ProductService = /** @class */ (function (_super) {
|
|
|
1380
1380
|
});
|
|
1381
1381
|
});
|
|
1382
1382
|
};
|
|
1383
|
+
ProductService.prototype.searchProductModels = function (params) {
|
|
1384
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1385
|
+
var _this = this;
|
|
1386
|
+
return __generator(this, function (_a) {
|
|
1387
|
+
return [2 /*return*/, this.fetch({
|
|
1388
|
+
uri: '/productModels',
|
|
1389
|
+
method: 'GET',
|
|
1390
|
+
qs: params,
|
|
1391
|
+
expectedStatusCodes: [http_status_1.OK]
|
|
1392
|
+
})
|
|
1393
|
+
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
1394
|
+
return [2 /*return*/, response.json()];
|
|
1395
|
+
}); }); })];
|
|
1396
|
+
});
|
|
1397
|
+
});
|
|
1398
|
+
};
|
|
1383
1399
|
return ProductService;
|
|
1384
1400
|
}(service_1.Service));
|
|
1385
1401
|
exports.ProductService = ProductService;
|
|
@@ -27087,8 +27103,35 @@ var ReservationType;
|
|
|
27087
27103
|
})(ReservationType = exports.ReservationType || (exports.ReservationType = {}));
|
|
27088
27104
|
|
|
27089
27105
|
},{}],286:[function(require,module,exports){
|
|
27090
|
-
|
|
27091
|
-
|
|
27106
|
+
"use strict";
|
|
27107
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27108
|
+
// export interface ISchedule4ttts extends Pick<IEventWithSchedule, 'id' | 'offers' | 'project' | 'superEvent'> {
|
|
27109
|
+
// eventSchedule?: never;
|
|
27110
|
+
// duration: number;
|
|
27111
|
+
// noPerformanceTimes: string[];
|
|
27112
|
+
// /**
|
|
27113
|
+
// * 作成対象時間: 9,10,11など
|
|
27114
|
+
// */
|
|
27115
|
+
// hours: string[];
|
|
27116
|
+
// /**
|
|
27117
|
+
// * ['00', '15', '30', '45']
|
|
27118
|
+
// */
|
|
27119
|
+
// minutes: string[];
|
|
27120
|
+
// /**
|
|
27121
|
+
// * ['1', '2', '3', '4']
|
|
27122
|
+
// */
|
|
27123
|
+
// tours: string[];
|
|
27124
|
+
// /**
|
|
27125
|
+
// * 作成開始が今日から何日後か
|
|
27126
|
+
// */
|
|
27127
|
+
// // start: number;
|
|
27128
|
+
// /**
|
|
27129
|
+
// * 何日分作成するか
|
|
27130
|
+
// */
|
|
27131
|
+
// days: number;
|
|
27132
|
+
// }
|
|
27133
|
+
|
|
27134
|
+
},{}],287:[function(require,module,exports){
|
|
27092
27135
|
arguments[4][78][0].apply(exports,arguments)
|
|
27093
27136
|
},{"dup":78}],288:[function(require,module,exports){
|
|
27094
27137
|
"use strict";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cinerino/sdk",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.18.0-alpha.1",
|
|
4
4
|
"description": "Cinerino SDK",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"browser": {
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
"watchify": "^3.11.1"
|
|
93
93
|
},
|
|
94
94
|
"dependencies": {
|
|
95
|
-
"@chevre/factory": "4.
|
|
95
|
+
"@chevre/factory": "4.390.0-alpha.1",
|
|
96
96
|
"debug": "3.2.7",
|
|
97
97
|
"http-status": "1.7.4",
|
|
98
98
|
"idtoken-verifier": "2.0.3",
|