@cinerino/sdk 10.12.0 → 10.13.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.
- package/example/playground/public/lib/bundle.js +14 -34
- package/example/src/chevre/adminProducts.ts +8 -8
- package/example/src/chevre/assetTransaction/processReserve.ts +3 -3
- package/example/src/chevre/searchEvents.ts +2 -2
- package/lib/abstract/chevre/event.d.ts +4 -4
- package/lib/abstract/chevre/event.js +13 -33
- package/lib/bundle.js +14 -34
- package/package.json +2 -2
|
@@ -14577,17 +14577,6 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
14577
14577
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
14578
14578
|
};
|
|
14579
14579
|
})();
|
|
14580
|
-
var __assign = (this && this.__assign) || function () {
|
|
14581
|
-
__assign = Object.assign || function(t) {
|
|
14582
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
14583
|
-
s = arguments[i];
|
|
14584
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
14585
|
-
t[p] = s[p];
|
|
14586
|
-
}
|
|
14587
|
-
return t;
|
|
14588
|
-
};
|
|
14589
|
-
return __assign.apply(this, arguments);
|
|
14590
|
-
};
|
|
14591
14580
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
14592
14581
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
14593
14582
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -14638,6 +14627,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
14638
14627
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14639
14628
|
exports.EventService = void 0;
|
|
14640
14629
|
var http_status_1 = require("http-status");
|
|
14630
|
+
var factory = require("../factory");
|
|
14641
14631
|
var service_1 = require("../service");
|
|
14642
14632
|
/**
|
|
14643
14633
|
* イベントサービス
|
|
@@ -14650,7 +14640,7 @@ var EventService = /** @class */ (function (_super) {
|
|
|
14650
14640
|
/**
|
|
14651
14641
|
* イベント検索
|
|
14652
14642
|
*/
|
|
14653
|
-
EventService.prototype.
|
|
14643
|
+
EventService.prototype.projectFields = function (params) {
|
|
14654
14644
|
return __awaiter(this, void 0, void 0, function () {
|
|
14655
14645
|
var _this = this;
|
|
14656
14646
|
return __generator(this, function (_a) {
|
|
@@ -14660,18 +14650,9 @@ var EventService = /** @class */ (function (_super) {
|
|
|
14660
14650
|
qs: params,
|
|
14661
14651
|
expectedStatusCodes: [http_status_1.OK]
|
|
14662
14652
|
})
|
|
14663
|
-
.then(function (response) { return __awaiter(_this, void 0, void 0, function () {
|
|
14664
|
-
|
|
14665
|
-
|
|
14666
|
-
switch (_b.label) {
|
|
14667
|
-
case 0:
|
|
14668
|
-
_a = {};
|
|
14669
|
-
return [4 /*yield*/, response.json()];
|
|
14670
|
-
case 1: return [2 /*return*/, (_a.data = _b.sent(),
|
|
14671
|
-
_a)];
|
|
14672
|
-
}
|
|
14673
|
-
});
|
|
14674
|
-
}); })];
|
|
14653
|
+
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
14654
|
+
return [2 /*return*/, response.json()];
|
|
14655
|
+
}); }); })];
|
|
14675
14656
|
});
|
|
14676
14657
|
});
|
|
14677
14658
|
};
|
|
@@ -14703,19 +14684,18 @@ var EventService = /** @class */ (function (_super) {
|
|
|
14703
14684
|
var _this = this;
|
|
14704
14685
|
return __generator(this, function (_a) {
|
|
14705
14686
|
id = params.id, typeOf = params.typeOf;
|
|
14706
|
-
|
|
14707
|
-
|
|
14708
|
-
|
|
14709
|
-
|
|
14710
|
-
|
|
14711
|
-
|
|
14712
|
-
|
|
14713
|
-
// }
|
|
14687
|
+
if (![
|
|
14688
|
+
factory.eventType.Event,
|
|
14689
|
+
factory.eventType.ScreeningEvent,
|
|
14690
|
+
factory.eventType.ScreeningEventSeries
|
|
14691
|
+
].includes(typeOf)) {
|
|
14692
|
+
throw new factory.errors.Argument('typeOf', 'invalid event type');
|
|
14693
|
+
}
|
|
14714
14694
|
return [2 /*return*/, this.fetch({
|
|
14715
14695
|
uri: "/events/" + encodeURIComponent(String(id)),
|
|
14716
14696
|
method: 'GET',
|
|
14717
14697
|
expectedStatusCodes: [http_status_1.OK],
|
|
14718
|
-
qs:
|
|
14698
|
+
qs: { typeOf: typeOf }
|
|
14719
14699
|
})
|
|
14720
14700
|
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
14721
14701
|
return [2 /*return*/, response.json()];
|
|
@@ -14854,7 +14834,7 @@ var EventService = /** @class */ (function (_super) {
|
|
|
14854
14834
|
}(service_1.Service));
|
|
14855
14835
|
exports.EventService = EventService;
|
|
14856
14836
|
|
|
14857
|
-
},{"../service":137,"http-status":370}],90:[function(require,module,exports){
|
|
14837
|
+
},{"../factory":132,"../service":137,"http-status":370}],90:[function(require,module,exports){
|
|
14858
14838
|
"use strict";
|
|
14859
14839
|
var __extends = (this && this.__extends) || (function () {
|
|
14860
14840
|
var extendStatics = function (d, b) {
|
|
@@ -22,20 +22,20 @@ async function main() {
|
|
|
22
22
|
await productService.upsertByProductId([
|
|
23
23
|
{
|
|
24
24
|
typeOf: factory.product.ProductType.EventService,
|
|
25
|
-
productID: '
|
|
25
|
+
productID: '2024100201EventService',
|
|
26
26
|
name: {
|
|
27
|
-
en: '
|
|
28
|
-
ja: '
|
|
29
|
-
},
|
|
30
|
-
hasOfferCatalog: {
|
|
31
|
-
identifier: '0001NEW'
|
|
27
|
+
en: '2024100201EventService',
|
|
28
|
+
ja: '2024100201EventService'
|
|
32
29
|
},
|
|
30
|
+
hasOfferCatalog: [
|
|
31
|
+
{ identifier: '0001NEW' }
|
|
32
|
+
],
|
|
33
33
|
serviceType: {
|
|
34
34
|
codeValue: '0001'
|
|
35
35
|
},
|
|
36
36
|
description: {
|
|
37
|
-
en: '
|
|
38
|
-
ja: '
|
|
37
|
+
en: 'xxxx',
|
|
38
|
+
ja: 'xxxx'
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
]);
|
|
@@ -30,15 +30,15 @@ async function main() {
|
|
|
30
30
|
});
|
|
31
31
|
|
|
32
32
|
console.log('searching events...');
|
|
33
|
-
const events = await eventService.
|
|
33
|
+
const events = await eventService.projectFields({
|
|
34
34
|
typeOf: client.factory.eventType.ScreeningEvent,
|
|
35
35
|
inSessionFrom: new Date(),
|
|
36
36
|
inSessionThrough: moment()
|
|
37
37
|
.add(1, 'month')
|
|
38
38
|
.toDate()
|
|
39
39
|
});
|
|
40
|
-
console.log(events.
|
|
41
|
-
const selectedEvent = events
|
|
40
|
+
console.log(events.length, 'events found');
|
|
41
|
+
const selectedEvent = events[0];
|
|
42
42
|
// const selectedEvent = { id: '7iri100jqrrpxy1' };
|
|
43
43
|
|
|
44
44
|
console.log('searching ticket types...');
|
|
@@ -49,7 +49,7 @@ async function main() {
|
|
|
49
49
|
diff = process.hrtime(startTime);
|
|
50
50
|
console.log(`creating service instance took ${diff[0]} seconds and ${diff[1]} nanoseconds.`);
|
|
51
51
|
|
|
52
|
-
const result = await eventService.
|
|
52
|
+
const result = await eventService.projectFields<client.factory.eventType.ScreeningEvent>({
|
|
53
53
|
page: 1,
|
|
54
54
|
limit: 100,
|
|
55
55
|
typeOf: client.factory.eventType.ScreeningEvent,
|
|
@@ -67,7 +67,7 @@ async function main() {
|
|
|
67
67
|
}
|
|
68
68
|
});
|
|
69
69
|
// console.log(result.data);
|
|
70
|
-
console.log(result.
|
|
70
|
+
console.log(result.length, 'events returned');
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
main()
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ISearchWithReservationForIdResult } from '../chevreAdmin/aggregateReservation';
|
|
2
2
|
import * as factory from '../factory';
|
|
3
3
|
import { ISearchedEvent, ISearchOfferCatalogItemAvailabilityResult, ISearchOfferCatalogItemResult, ISeatAsEventOffer } from './event/factory';
|
|
4
|
-
import {
|
|
4
|
+
import { Service } from '../service';
|
|
5
5
|
declare type IKeyOfProjection<T extends factory.eventType> = keyof factory.event.IEvent<T> | '_id';
|
|
6
6
|
declare type IProjection<T extends factory.eventType> = {
|
|
7
7
|
[key in IKeyOfProjection<T>]?: 0;
|
|
@@ -13,10 +13,10 @@ export declare class EventService extends Service {
|
|
|
13
13
|
/**
|
|
14
14
|
* イベント検索
|
|
15
15
|
*/
|
|
16
|
-
|
|
16
|
+
projectFields<T extends factory.eventType>(params: Omit<factory.event.ISearchConditions<T>, 'project' | 'organizer'> & {
|
|
17
17
|
typeOf: T;
|
|
18
18
|
$projection?: IProjection<T>;
|
|
19
|
-
}): Promise<
|
|
19
|
+
}): Promise<ISearchedEvent<T>[]>;
|
|
20
20
|
/**
|
|
21
21
|
* イベント集計検索
|
|
22
22
|
*/
|
|
@@ -31,7 +31,7 @@ export declare class EventService extends Service {
|
|
|
31
31
|
*/
|
|
32
32
|
findById<T extends factory.eventType>(params: {
|
|
33
33
|
id: string;
|
|
34
|
-
typeOf
|
|
34
|
+
typeOf: T;
|
|
35
35
|
}): Promise<ISearchedEvent<T>>;
|
|
36
36
|
/**
|
|
37
37
|
* 興行オファー検索
|
|
@@ -14,17 +14,6 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
14
14
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
15
|
};
|
|
16
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
17
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
29
18
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
30
19
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -75,6 +64,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
75
64
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
76
65
|
exports.EventService = void 0;
|
|
77
66
|
var http_status_1 = require("http-status");
|
|
67
|
+
var factory = require("../factory");
|
|
78
68
|
var service_1 = require("../service");
|
|
79
69
|
/**
|
|
80
70
|
* イベントサービス
|
|
@@ -87,7 +77,7 @@ var EventService = /** @class */ (function (_super) {
|
|
|
87
77
|
/**
|
|
88
78
|
* イベント検索
|
|
89
79
|
*/
|
|
90
|
-
EventService.prototype.
|
|
80
|
+
EventService.prototype.projectFields = function (params) {
|
|
91
81
|
return __awaiter(this, void 0, void 0, function () {
|
|
92
82
|
var _this = this;
|
|
93
83
|
return __generator(this, function (_a) {
|
|
@@ -97,18 +87,9 @@ var EventService = /** @class */ (function (_super) {
|
|
|
97
87
|
qs: params,
|
|
98
88
|
expectedStatusCodes: [http_status_1.OK]
|
|
99
89
|
})
|
|
100
|
-
.then(function (response) { return __awaiter(_this, void 0, void 0, function () {
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
switch (_b.label) {
|
|
104
|
-
case 0:
|
|
105
|
-
_a = {};
|
|
106
|
-
return [4 /*yield*/, response.json()];
|
|
107
|
-
case 1: return [2 /*return*/, (_a.data = _b.sent(),
|
|
108
|
-
_a)];
|
|
109
|
-
}
|
|
110
|
-
});
|
|
111
|
-
}); })];
|
|
90
|
+
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
91
|
+
return [2 /*return*/, response.json()];
|
|
92
|
+
}); }); })];
|
|
112
93
|
});
|
|
113
94
|
});
|
|
114
95
|
};
|
|
@@ -140,19 +121,18 @@ var EventService = /** @class */ (function (_super) {
|
|
|
140
121
|
var _this = this;
|
|
141
122
|
return __generator(this, function (_a) {
|
|
142
123
|
id = params.id, typeOf = params.typeOf;
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
// }
|
|
124
|
+
if (![
|
|
125
|
+
factory.eventType.Event,
|
|
126
|
+
factory.eventType.ScreeningEvent,
|
|
127
|
+
factory.eventType.ScreeningEventSeries
|
|
128
|
+
].includes(typeOf)) {
|
|
129
|
+
throw new factory.errors.Argument('typeOf', 'invalid event type');
|
|
130
|
+
}
|
|
151
131
|
return [2 /*return*/, this.fetch({
|
|
152
132
|
uri: "/events/" + encodeURIComponent(String(id)),
|
|
153
133
|
method: 'GET',
|
|
154
134
|
expectedStatusCodes: [http_status_1.OK],
|
|
155
|
-
qs:
|
|
135
|
+
qs: { typeOf: typeOf }
|
|
156
136
|
})
|
|
157
137
|
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
158
138
|
return [2 /*return*/, response.json()];
|
package/lib/bundle.js
CHANGED
|
@@ -571,17 +571,6 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
571
571
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
572
572
|
};
|
|
573
573
|
})();
|
|
574
|
-
var __assign = (this && this.__assign) || function () {
|
|
575
|
-
__assign = Object.assign || function(t) {
|
|
576
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
577
|
-
s = arguments[i];
|
|
578
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
579
|
-
t[p] = s[p];
|
|
580
|
-
}
|
|
581
|
-
return t;
|
|
582
|
-
};
|
|
583
|
-
return __assign.apply(this, arguments);
|
|
584
|
-
};
|
|
585
574
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
586
575
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
587
576
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -632,6 +621,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
632
621
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
633
622
|
exports.EventService = void 0;
|
|
634
623
|
var http_status_1 = require("http-status");
|
|
624
|
+
var factory = require("../factory");
|
|
635
625
|
var service_1 = require("../service");
|
|
636
626
|
/**
|
|
637
627
|
* イベントサービス
|
|
@@ -644,7 +634,7 @@ var EventService = /** @class */ (function (_super) {
|
|
|
644
634
|
/**
|
|
645
635
|
* イベント検索
|
|
646
636
|
*/
|
|
647
|
-
EventService.prototype.
|
|
637
|
+
EventService.prototype.projectFields = function (params) {
|
|
648
638
|
return __awaiter(this, void 0, void 0, function () {
|
|
649
639
|
var _this = this;
|
|
650
640
|
return __generator(this, function (_a) {
|
|
@@ -654,18 +644,9 @@ var EventService = /** @class */ (function (_super) {
|
|
|
654
644
|
qs: params,
|
|
655
645
|
expectedStatusCodes: [http_status_1.OK]
|
|
656
646
|
})
|
|
657
|
-
.then(function (response) { return __awaiter(_this, void 0, void 0, function () {
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
switch (_b.label) {
|
|
661
|
-
case 0:
|
|
662
|
-
_a = {};
|
|
663
|
-
return [4 /*yield*/, response.json()];
|
|
664
|
-
case 1: return [2 /*return*/, (_a.data = _b.sent(),
|
|
665
|
-
_a)];
|
|
666
|
-
}
|
|
667
|
-
});
|
|
668
|
-
}); })];
|
|
647
|
+
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
648
|
+
return [2 /*return*/, response.json()];
|
|
649
|
+
}); }); })];
|
|
669
650
|
});
|
|
670
651
|
});
|
|
671
652
|
};
|
|
@@ -697,19 +678,18 @@ var EventService = /** @class */ (function (_super) {
|
|
|
697
678
|
var _this = this;
|
|
698
679
|
return __generator(this, function (_a) {
|
|
699
680
|
id = params.id, typeOf = params.typeOf;
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
// }
|
|
681
|
+
if (![
|
|
682
|
+
factory.eventType.Event,
|
|
683
|
+
factory.eventType.ScreeningEvent,
|
|
684
|
+
factory.eventType.ScreeningEventSeries
|
|
685
|
+
].includes(typeOf)) {
|
|
686
|
+
throw new factory.errors.Argument('typeOf', 'invalid event type');
|
|
687
|
+
}
|
|
708
688
|
return [2 /*return*/, this.fetch({
|
|
709
689
|
uri: "/events/" + encodeURIComponent(String(id)),
|
|
710
690
|
method: 'GET',
|
|
711
691
|
expectedStatusCodes: [http_status_1.OK],
|
|
712
|
-
qs:
|
|
692
|
+
qs: { typeOf: typeOf }
|
|
713
693
|
})
|
|
714
694
|
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
715
695
|
return [2 /*return*/, response.json()];
|
|
@@ -848,7 +828,7 @@ var EventService = /** @class */ (function (_super) {
|
|
|
848
828
|
}(service_1.Service));
|
|
849
829
|
exports.EventService = EventService;
|
|
850
830
|
|
|
851
|
-
},{"../service":137,"http-status":370}],8:[function(require,module,exports){
|
|
831
|
+
},{"../factory":132,"../service":137,"http-status":370}],8:[function(require,module,exports){
|
|
852
832
|
"use strict";
|
|
853
833
|
var __extends = (this && this.__extends) || (function () {
|
|
854
834
|
var extendStatics = function (d, b) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cinerino/sdk",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.13.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.386.0-alpha.
|
|
95
|
+
"@chevre/factory": "4.386.0-alpha.3",
|
|
96
96
|
"debug": "3.2.7",
|
|
97
97
|
"http-status": "1.7.4",
|
|
98
98
|
"idtoken-verifier": "2.0.3",
|