@cinerino/sdk 12.5.0-alpha.1 → 12.5.0-alpha.11
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/chevre/admin/adminCreateNotesIfNotExistByIdentifier.ts +1 -1
- package/example/src/chevre/admin/findProductHasOfferCatalog.ts +35 -0
- package/example/src/chevre/admin/findProducts.ts +48 -0
- package/example/src/chevre/default/findPublicNotes.ts +39 -0
- package/example/src/chevre/default/searchEvents.ts +1 -1
- package/example/src/cloud/admin/adminProductOffersByIdentifier.ts +4 -3
- package/example/src/cloud/transaction/processPlaceOrder4ttts.ts +1 -1
- package/example/src/cloud/transaction/processPlaceOrderByCreditCard3DS.ts +10 -6
- package/example/src/cloud/transaction/processPlaceOrderCOAEventByCreditCard.ts +1 -1
- package/example/src/cloud/transaction/processPlaceOrderCOAEventByMovieTicket.ts +1 -1
- package/example/src/cloud/transaction/processPlaceOrderUsingMemberProgramTier.ts +1 -1
- package/lib/abstract/chevre/event.d.ts +11 -11
- package/lib/abstract/chevre/event.js +0 -1
- package/lib/abstract/chevre/eventSeries.d.ts +3 -3
- package/lib/abstract/chevre/note.d.ts +32 -0
- package/lib/abstract/chevre/note.js +87 -0
- package/lib/abstract/chevre/seller/factory.d.ts +0 -3
- package/lib/abstract/chevre/seller/factory.js +6 -0
- package/lib/abstract/chevre.d.ts +9 -0
- package/lib/abstract/chevre.js +20 -0
- package/lib/abstract/chevreAdmin/event.d.ts +5 -5
- package/lib/abstract/chevreAdmin/eventSeries.d.ts +1 -1
- package/lib/abstract/chevreAdmin/note.d.ts +4 -4
- package/lib/abstract/chevreAdmin/note.js +0 -17
- package/lib/abstract/chevreAdmin/product.d.ts +94 -2
- package/lib/abstract/chevreAdmin/product.js +45 -1
- package/lib/abstract/chevreAsset/order/factory.d.ts +4 -0
- package/lib/abstract/chevreConsole/aggregateReservation.d.ts +2 -2
- package/lib/abstract/chevreConsole/event/factory.d.ts +2 -2
- package/lib/abstract/chevreConsole/event.d.ts +14 -29
- package/lib/abstract/chevreConsole/event.js +0 -53
- package/lib/abstract/chevreConsole/eventSeries.d.ts +6 -6
- package/lib/abstract/chevreConsole/product.d.ts +23 -11
- package/lib/abstract/chevreConsole/product.js +13 -19
- package/lib/abstract/chevreConsole/seller/factory.d.ts +0 -3
- package/lib/abstract/chevreConsole/seller/factory.js +6 -0
- package/lib/abstract/chevreConsole/seller.d.ts +1 -39
- package/lib/abstract/chevreConsole/seller.js +64 -79
- package/lib/abstract/cinerino/service/event.d.ts +21 -24
- package/lib/abstract/cinerino/service/event.js +2 -2
- package/lib/abstract/cloud/admin/event.d.ts +2 -2
- package/lib/bundle.js +1030 -796
- package/package.json +2 -2
|
@@ -1,13 +1,105 @@
|
|
|
1
1
|
import * as factory from '../factory';
|
|
2
2
|
import { Service } from '../service';
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
declare type IProductAsFindResult = Pick<factory.product.IProduct, 'description' | 'id' | 'name' | 'productID' | 'serviceOutput' | 'serviceType' | 'typeOf'> & {
|
|
4
|
+
/**
|
|
5
|
+
* プロダクトID
|
|
6
|
+
*/
|
|
7
|
+
id: string;
|
|
8
|
+
project?: never;
|
|
9
|
+
hasOfferCatalog?: never;
|
|
10
|
+
additionalProperty?: never;
|
|
11
|
+
};
|
|
12
|
+
export interface IFindParams {
|
|
13
|
+
/**
|
|
14
|
+
* max: 20
|
|
15
|
+
*/
|
|
16
|
+
limit: number;
|
|
17
|
+
/**
|
|
18
|
+
* min: 1
|
|
19
|
+
*/
|
|
20
|
+
page: number;
|
|
21
|
+
sortByProductID?: factory.sortType;
|
|
22
|
+
id?: string;
|
|
23
|
+
ids?: string[];
|
|
24
|
+
typeOf?: factory.product.ProductType;
|
|
25
|
+
typeOfs?: factory.product.ProductType[];
|
|
26
|
+
/**
|
|
27
|
+
* カタログID
|
|
28
|
+
*/
|
|
29
|
+
hasOfferCatalogId?: string;
|
|
30
|
+
/**
|
|
31
|
+
* 名称部分一致
|
|
32
|
+
*/
|
|
33
|
+
nameRegex?: string;
|
|
34
|
+
/**
|
|
35
|
+
* プロダクトコード完全一致
|
|
36
|
+
*/
|
|
37
|
+
productID?: string;
|
|
38
|
+
/**
|
|
39
|
+
* プロダクトコード部分一致
|
|
40
|
+
*/
|
|
41
|
+
productIDRegex?: string;
|
|
42
|
+
/**
|
|
43
|
+
* 興行区分コード
|
|
44
|
+
*/
|
|
45
|
+
serviceTypeCodeValue?: string;
|
|
46
|
+
/**
|
|
47
|
+
* ペイメントカードの場合、通貨区分
|
|
48
|
+
*/
|
|
49
|
+
serviceOutputAmountCurrency?: string;
|
|
50
|
+
additionalPropertyName?: string;
|
|
51
|
+
}
|
|
52
|
+
interface IFindProductHasOfferCatalogParams {
|
|
53
|
+
/**
|
|
54
|
+
* max: 20
|
|
55
|
+
*/
|
|
56
|
+
limit: number;
|
|
57
|
+
/**
|
|
58
|
+
* min: 1
|
|
59
|
+
*/
|
|
60
|
+
page: number;
|
|
61
|
+
/**
|
|
62
|
+
* プロダクトIDリスト
|
|
63
|
+
*/
|
|
64
|
+
itemOfferedIds?: string[];
|
|
65
|
+
}
|
|
66
|
+
interface IOfferCatalogAsFindResult {
|
|
67
|
+
/**
|
|
68
|
+
* カタログID
|
|
69
|
+
*/
|
|
70
|
+
id: string;
|
|
71
|
+
/**
|
|
72
|
+
* 対象オファー
|
|
73
|
+
*/
|
|
74
|
+
aggregateElement: {
|
|
75
|
+
itemOffered: {
|
|
76
|
+
/**
|
|
77
|
+
* プロダクトID
|
|
78
|
+
*/
|
|
79
|
+
id: string;
|
|
80
|
+
typeOf: factory.product.ProductType;
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
}
|
|
5
84
|
/**
|
|
6
85
|
* プロダクトサービス
|
|
7
86
|
*/
|
|
8
87
|
export declare class ProductService extends Service {
|
|
9
88
|
/**
|
|
10
89
|
* プロダクトコードによる冪等置換
|
|
90
|
+
* 在庫管理ロールが必要
|
|
11
91
|
*/
|
|
12
92
|
upsertByProductId(params: factory.product.ICreateParams[]): Promise<void>;
|
|
93
|
+
/**
|
|
94
|
+
* プロダクト検索
|
|
95
|
+
* 公開属性のみ
|
|
96
|
+
* 管理者のプロダクト読取権限で使用可能
|
|
97
|
+
* 2025-10-14~
|
|
98
|
+
*/
|
|
99
|
+
findProducts(params: IFindParams): Promise<IProductAsFindResult[]>;
|
|
100
|
+
/**
|
|
101
|
+
* プロダクトオファーカタログ検索
|
|
102
|
+
*/
|
|
103
|
+
findProductHasOfferCatalog(params: IFindProductHasOfferCatalogParams): Promise<IOfferCatalogAsFindResult[]>;
|
|
13
104
|
}
|
|
105
|
+
export {};
|
|
@@ -54,6 +54,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
54
54
|
exports.ProductService = void 0;
|
|
55
55
|
var http_status_1 = require("http-status");
|
|
56
56
|
var service_1 = require("../service");
|
|
57
|
+
var BASE_URI = '/products';
|
|
58
|
+
var BASE_URI_HAS_OFFER_CATALOG = '/productHasOfferCatalog';
|
|
57
59
|
/**
|
|
58
60
|
* プロダクトサービス
|
|
59
61
|
*/
|
|
@@ -64,13 +66,14 @@ var ProductService = /** @class */ (function (_super) {
|
|
|
64
66
|
}
|
|
65
67
|
/**
|
|
66
68
|
* プロダクトコードによる冪等置換
|
|
69
|
+
* 在庫管理ロールが必要
|
|
67
70
|
*/
|
|
68
71
|
ProductService.prototype.upsertByProductId = function (params) {
|
|
69
72
|
return __awaiter(this, void 0, void 0, function () {
|
|
70
73
|
return __generator(this, function (_a) {
|
|
71
74
|
switch (_a.label) {
|
|
72
75
|
case 0: return [4 /*yield*/, this.fetch({
|
|
73
|
-
uri:
|
|
76
|
+
uri: BASE_URI,
|
|
74
77
|
method: 'PUT',
|
|
75
78
|
body: params,
|
|
76
79
|
expectedStatusCodes: [http_status_1.NO_CONTENT]
|
|
@@ -82,6 +85,47 @@ var ProductService = /** @class */ (function (_super) {
|
|
|
82
85
|
});
|
|
83
86
|
});
|
|
84
87
|
};
|
|
88
|
+
/**
|
|
89
|
+
* プロダクト検索
|
|
90
|
+
* 公開属性のみ
|
|
91
|
+
* 管理者のプロダクト読取権限で使用可能
|
|
92
|
+
* 2025-10-14~
|
|
93
|
+
*/
|
|
94
|
+
ProductService.prototype.findProducts = function (params) {
|
|
95
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
96
|
+
var _this = this;
|
|
97
|
+
return __generator(this, function (_a) {
|
|
98
|
+
return [2 /*return*/, this.fetch({
|
|
99
|
+
uri: BASE_URI,
|
|
100
|
+
method: 'GET',
|
|
101
|
+
qs: params,
|
|
102
|
+
expectedStatusCodes: [http_status_1.OK]
|
|
103
|
+
})
|
|
104
|
+
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
105
|
+
return [2 /*return*/, response.json()];
|
|
106
|
+
}); }); })];
|
|
107
|
+
});
|
|
108
|
+
});
|
|
109
|
+
};
|
|
110
|
+
/**
|
|
111
|
+
* プロダクトオファーカタログ検索
|
|
112
|
+
*/
|
|
113
|
+
ProductService.prototype.findProductHasOfferCatalog = function (params) {
|
|
114
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
115
|
+
var _this = this;
|
|
116
|
+
return __generator(this, function (_a) {
|
|
117
|
+
return [2 /*return*/, this.fetch({
|
|
118
|
+
uri: BASE_URI_HAS_OFFER_CATALOG,
|
|
119
|
+
method: 'GET',
|
|
120
|
+
qs: params,
|
|
121
|
+
expectedStatusCodes: [http_status_1.OK]
|
|
122
|
+
})
|
|
123
|
+
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
124
|
+
return [2 /*return*/, response.json()];
|
|
125
|
+
}); }); })];
|
|
126
|
+
});
|
|
127
|
+
});
|
|
128
|
+
};
|
|
85
129
|
return ProductService;
|
|
86
130
|
}(service_1.Service));
|
|
87
131
|
exports.ProductService = ProductService;
|
|
@@ -22,5 +22,9 @@ export declare type IAcceptedOffer = factory.order.IAcceptedOffer<factory.order.
|
|
|
22
22
|
export declare type IOrderAsFindByConfirmationNumberResult = Pick<factory.order.IOrder, 'confirmationNumber' | 'dateReturned' | 'orderDate' | 'orderNumber' | 'orderStatus' | 'orderedItem' | 'paymentMethods' | 'price' | 'priceCurrency' | 'seller' | 'project' | 'typeOf'> & {
|
|
23
23
|
customer: {
|
|
24
24
|
id: string;
|
|
25
|
+
/**
|
|
26
|
+
* @deprecated legacyプロジェクトでのみ含まれるケースがある
|
|
27
|
+
*/
|
|
28
|
+
telephone?: string;
|
|
25
29
|
};
|
|
26
30
|
};
|
|
@@ -39,8 +39,8 @@ export interface IAggregateReservation {
|
|
|
39
39
|
typeOf: factory.eventType;
|
|
40
40
|
startDate: Date;
|
|
41
41
|
};
|
|
42
|
-
aggregateEntranceGate?: factory.event.
|
|
43
|
-
aggregateOffer?: factory.event.
|
|
42
|
+
aggregateEntranceGate?: factory.event.screeningEvent.IAggregateEntranceGate;
|
|
43
|
+
aggregateOffer?: factory.event.screeningEvent.IAggregateOffer;
|
|
44
44
|
}
|
|
45
45
|
export declare type ISearchWithReservationForIdResult = Pick<IAggregateReservation, 'aggregateEntranceGate' | 'aggregateOffer'> & {
|
|
46
46
|
/**
|
|
@@ -4,7 +4,7 @@ declare type IAdminSearchEventOffers = (Pick<factory.event.screeningEvent.IOffer
|
|
|
4
4
|
}) | (Pick<factory.event.screeningEvent.IOffer4COA, 'eligibleQuantity' | 'itemOffered' | 'offeredThrough' | 'typeOf' | 'unacceptedPaymentMethod'> & {
|
|
5
5
|
seller: Pick<factory.event.screeningEvent.ISeller4COA, 'id' | 'typeOf'>;
|
|
6
6
|
});
|
|
7
|
-
export declare type IAdminSearchedEvent
|
|
7
|
+
export declare type IAdminSearchedEvent = Omit<factory.event.screeningEvent.IEvent, 'workPerformed' | 'aggregateEntranceGate' | 'aggregateOffer' | 'offers'> & {
|
|
8
8
|
offers: IAdminSearchEventOffers;
|
|
9
|
-
}
|
|
9
|
+
};
|
|
10
10
|
export {};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import * as factory from '../factory';
|
|
2
2
|
import { IAdminSearchedEvent } from './event/factory';
|
|
3
3
|
import { Service } from '../service';
|
|
4
|
-
declare type IKeyOfProjection
|
|
5
|
-
declare type IProjection
|
|
6
|
-
[key in IKeyOfProjection
|
|
4
|
+
declare type IKeyOfProjection = keyof factory.event.screeningEvent.IEvent | '_id';
|
|
5
|
+
declare type IProjection = {
|
|
6
|
+
[key in IKeyOfProjection]?: 0;
|
|
7
7
|
};
|
|
8
|
-
declare type IUnset
|
|
9
|
-
[key in keyof factory.event.IEvent
|
|
8
|
+
declare type IUnset = {
|
|
9
|
+
[key in keyof factory.event.screeningEvent.IEvent]?: 1;
|
|
10
10
|
};
|
|
11
11
|
/**
|
|
12
12
|
* イベントサービス
|
|
@@ -15,47 +15,32 @@ export declare class EventService extends Service {
|
|
|
15
15
|
/**
|
|
16
16
|
* 興行イベント複数作成
|
|
17
17
|
*/
|
|
18
|
-
createScreeningEvents(params: factory.event.ICreateParams
|
|
18
|
+
createScreeningEvents(params: factory.event.screeningEvent.ICreateParams[], options: {
|
|
19
19
|
superEventId: string;
|
|
20
20
|
locationBranchCode: string;
|
|
21
21
|
hasTicketedSeat: boolean;
|
|
22
22
|
}): Promise<void>;
|
|
23
|
-
/**
|
|
24
|
-
* イベント複数作成
|
|
25
|
-
*/
|
|
26
|
-
createAnyEvents(params: factory.event.ICreateParams<factory.eventType.Event>[], options: {
|
|
27
|
-
locationBranchCode: string;
|
|
28
|
-
}): Promise<void>;
|
|
29
23
|
/**
|
|
30
24
|
* イベント検索
|
|
31
25
|
*/
|
|
32
|
-
projectFields
|
|
33
|
-
typeOf:
|
|
34
|
-
$projection?: IProjection
|
|
35
|
-
}): Promise<IAdminSearchedEvent
|
|
26
|
+
projectFields(params: Omit<factory.event.screeningEvent.ISearchConditions, 'project' | 'organizer'> & {
|
|
27
|
+
typeOf: factory.eventType.ScreeningEvent;
|
|
28
|
+
$projection?: IProjection;
|
|
29
|
+
}): Promise<IAdminSearchedEvent[]>;
|
|
36
30
|
/**
|
|
37
31
|
* イベント取得
|
|
38
32
|
*/
|
|
39
|
-
findEventById
|
|
33
|
+
findEventById(params: {
|
|
40
34
|
id: string;
|
|
41
|
-
typeOf:
|
|
42
|
-
}): Promise<factory.event.IEvent
|
|
35
|
+
typeOf: factory.eventType.ScreeningEvent;
|
|
36
|
+
}): Promise<factory.event.screeningEvent.IEvent>;
|
|
43
37
|
/**
|
|
44
38
|
* 興行イベント更新
|
|
45
39
|
*/
|
|
46
40
|
updateScreeningEventById(params: {
|
|
47
41
|
id: string;
|
|
48
42
|
attributes: factory.event.screeningEvent.IUpdateParams & {
|
|
49
|
-
$unset?: IUnset
|
|
50
|
-
};
|
|
51
|
-
}): Promise<void>;
|
|
52
|
-
/**
|
|
53
|
-
* イベント更新
|
|
54
|
-
*/
|
|
55
|
-
updateAnyEventById(params: {
|
|
56
|
-
id: string;
|
|
57
|
-
attributes: factory.event.IUpdateParams<factory.eventType.Event> & {
|
|
58
|
-
$unset?: IUnset<factory.eventType.Event>;
|
|
43
|
+
$unset?: IUnset;
|
|
59
44
|
};
|
|
60
45
|
}): Promise<void>;
|
|
61
46
|
}
|
|
@@ -95,36 +95,6 @@ var EventService = /** @class */ (function (_super) {
|
|
|
95
95
|
});
|
|
96
96
|
});
|
|
97
97
|
};
|
|
98
|
-
/**
|
|
99
|
-
* イベント複数作成
|
|
100
|
-
*/
|
|
101
|
-
EventService.prototype.createAnyEvents = function (params,
|
|
102
|
-
// add options(2025-08-26~)
|
|
103
|
-
options) {
|
|
104
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
105
|
-
var locationBranchCode;
|
|
106
|
-
return __generator(this, function (_a) {
|
|
107
|
-
switch (_a.label) {
|
|
108
|
-
case 0:
|
|
109
|
-
locationBranchCode = options.locationBranchCode;
|
|
110
|
-
return [4 /*yield*/, this.fetch({
|
|
111
|
-
uri: '/events',
|
|
112
|
-
method: 'POST',
|
|
113
|
-
body: params,
|
|
114
|
-
qs: {
|
|
115
|
-
expectsNoContent: '1',
|
|
116
|
-
typeOf: factory.eventType.Event,
|
|
117
|
-
locationBranchCode: locationBranchCode
|
|
118
|
-
},
|
|
119
|
-
expectedStatusCodes: [http_status_1.NO_CONTENT]
|
|
120
|
-
})];
|
|
121
|
-
case 1:
|
|
122
|
-
_a.sent();
|
|
123
|
-
return [2 /*return*/];
|
|
124
|
-
}
|
|
125
|
-
});
|
|
126
|
-
});
|
|
127
|
-
};
|
|
128
98
|
/**
|
|
129
99
|
* イベント検索
|
|
130
100
|
*/
|
|
@@ -188,29 +158,6 @@ var EventService = /** @class */ (function (_super) {
|
|
|
188
158
|
});
|
|
189
159
|
});
|
|
190
160
|
};
|
|
191
|
-
/**
|
|
192
|
-
* イベント更新
|
|
193
|
-
*/
|
|
194
|
-
EventService.prototype.updateAnyEventById = function (params) {
|
|
195
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
196
|
-
return __generator(this, function (_a) {
|
|
197
|
-
switch (_a.label) {
|
|
198
|
-
case 0: return [4 /*yield*/, this.fetch({
|
|
199
|
-
uri: "/events/" + encodeURIComponent(String(params.id)),
|
|
200
|
-
method: 'PUT',
|
|
201
|
-
body: params.attributes,
|
|
202
|
-
qs: {
|
|
203
|
-
typeOf: factory.eventType.Event
|
|
204
|
-
},
|
|
205
|
-
expectedStatusCodes: [http_status_1.NO_CONTENT]
|
|
206
|
-
})];
|
|
207
|
-
case 1:
|
|
208
|
-
_a.sent();
|
|
209
|
-
return [2 /*return*/];
|
|
210
|
-
}
|
|
211
|
-
});
|
|
212
|
-
});
|
|
213
|
-
};
|
|
214
161
|
return EventService;
|
|
215
162
|
}(service_1.Service));
|
|
216
163
|
exports.EventService = EventService;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as factory from '../factory';
|
|
2
2
|
import { Service } from '../service';
|
|
3
|
-
declare type IKeyOfProjection = keyof factory.
|
|
3
|
+
declare type IKeyOfProjection = keyof factory.eventSeries.IEvent;
|
|
4
4
|
declare type IProjection = {
|
|
5
5
|
[key in IKeyOfProjection]?: 0;
|
|
6
6
|
};
|
|
@@ -11,12 +11,12 @@ export declare class EventSeriesService extends Service {
|
|
|
11
11
|
/**
|
|
12
12
|
* 施設コンテンツ検索
|
|
13
13
|
*/
|
|
14
|
-
projectFields(params: Omit<factory.
|
|
14
|
+
projectFields(params: Omit<factory.eventSeries.ISearchConditions, 'project' | 'organizer'> & {
|
|
15
15
|
typeOf: factory.eventType.ScreeningEventSeries;
|
|
16
16
|
$projection?: IProjection;
|
|
17
|
-
}): Promise<factory.
|
|
17
|
+
}): Promise<factory.eventSeries.IEvent[]>;
|
|
18
18
|
createIfNotExistByWorkPerformed(params: {
|
|
19
|
-
attributes: factory.
|
|
19
|
+
attributes: factory.eventSeries.ICreateParams[];
|
|
20
20
|
qs: {
|
|
21
21
|
/**
|
|
22
22
|
* 全施設に作成するかどうか
|
|
@@ -27,7 +27,7 @@ export declare class EventSeriesService extends Service {
|
|
|
27
27
|
/**
|
|
28
28
|
* 施設コンテンツ作成
|
|
29
29
|
*/
|
|
30
|
-
create(params: factory.
|
|
30
|
+
create(params: factory.eventSeries.ICreateParams[]): Promise<{
|
|
31
31
|
id: string;
|
|
32
32
|
}>;
|
|
33
33
|
aggregateMaxVersion(params: {
|
|
@@ -49,7 +49,7 @@ export declare class EventSeriesService extends Service {
|
|
|
49
49
|
*/
|
|
50
50
|
updateById(params: {
|
|
51
51
|
id: string;
|
|
52
|
-
attributes: factory.
|
|
52
|
+
attributes: factory.eventSeries.ICreateParams & {};
|
|
53
53
|
qs: {
|
|
54
54
|
/**
|
|
55
55
|
* 関連リソースへの同期有無(2023-07-28~)
|
|
@@ -1,11 +1,25 @@
|
|
|
1
1
|
import * as factory from '../factory';
|
|
2
2
|
import { Service } from '../service';
|
|
3
|
-
export declare type IProductWithoutCredentials =
|
|
4
|
-
export declare type
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
export declare type IProductWithoutCredentials = Pick<factory.product.IProduct, 'additionalProperty' | 'description' | 'hasOfferCatalog' | 'id' | 'name' | 'productID' | 'serviceOutput' | 'serviceType' | 'typeOf'>;
|
|
4
|
+
export declare type IProductAsFindResult = IProductWithoutCredentials & {
|
|
5
|
+
id: string;
|
|
6
|
+
project?: never;
|
|
7
|
+
};
|
|
8
|
+
export declare type IProductAsFindByIdResult = factory.product.IProduct & {
|
|
9
|
+
id: string;
|
|
10
|
+
};
|
|
11
|
+
declare type IFindKeyOfProjection = 'typeOf' | 'additionalProperty' | 'description' | 'hasOfferCatalog' | 'name' | 'productID' | 'serviceOutput' | 'serviceType';
|
|
12
|
+
declare type IFindProjection = {
|
|
13
|
+
[key in IFindKeyOfProjection]?: 1;
|
|
14
|
+
};
|
|
15
|
+
declare type IKeyOfProjection = keyof factory.product.IProduct;
|
|
16
|
+
declare type IFindByIdProjection = {
|
|
7
17
|
[key in IKeyOfProjection]?: 1;
|
|
8
18
|
};
|
|
19
|
+
export declare type IFindParams = Pick<factory.product.ISearchConditions, 'additionalPropertyMatch' | 'hasOfferCatalog' | 'id' | 'limit' | 'name' | 'page' | 'productID' | 'serviceOutput' | 'serviceType' | 'sort' | 'typeOf'> & {
|
|
20
|
+
$projection?: IFindProjection;
|
|
21
|
+
offers?: never;
|
|
22
|
+
};
|
|
9
23
|
/**
|
|
10
24
|
* プロダクトサービス
|
|
11
25
|
*/
|
|
@@ -24,17 +38,15 @@ export declare class ProductService extends Service {
|
|
|
24
38
|
}>;
|
|
25
39
|
/**
|
|
26
40
|
* プロダクト検索
|
|
41
|
+
* 公開属性のみ
|
|
42
|
+
* @deprecated use admin service
|
|
27
43
|
*/
|
|
28
|
-
|
|
29
|
-
$projection?: IProjection;
|
|
30
|
-
}): Promise<{
|
|
31
|
-
data: IProductWithoutCredentials[];
|
|
32
|
-
}>;
|
|
44
|
+
findProductsLegacy(params: IFindParams): Promise<IProductAsFindResult[]>;
|
|
33
45
|
findProductById(params: {
|
|
34
46
|
id: string;
|
|
35
47
|
} & {
|
|
36
|
-
$projection?:
|
|
37
|
-
}): Promise<
|
|
48
|
+
$projection?: IFindByIdProjection;
|
|
49
|
+
}): Promise<IProductAsFindByIdResult>;
|
|
38
50
|
updateProduct(params: factory.product.ICreateParams & {
|
|
39
51
|
id: string;
|
|
40
52
|
}): Promise<void>;
|
|
@@ -65,6 +65,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
65
65
|
exports.ProductService = void 0;
|
|
66
66
|
var http_status_1 = require("http-status");
|
|
67
67
|
var service_1 = require("../service");
|
|
68
|
+
var BASE_URI = '/products';
|
|
68
69
|
/**
|
|
69
70
|
* プロダクトサービス
|
|
70
71
|
*/
|
|
@@ -81,7 +82,7 @@ var ProductService = /** @class */ (function (_super) {
|
|
|
81
82
|
var _this = this;
|
|
82
83
|
return __generator(this, function (_a) {
|
|
83
84
|
return [2 /*return*/, this.fetch({
|
|
84
|
-
uri:
|
|
85
|
+
uri: BASE_URI,
|
|
85
86
|
method: 'POST',
|
|
86
87
|
body: params,
|
|
87
88
|
expectedStatusCodes: [http_status_1.CREATED]
|
|
@@ -100,7 +101,7 @@ var ProductService = /** @class */ (function (_super) {
|
|
|
100
101
|
var _this = this;
|
|
101
102
|
return __generator(this, function (_a) {
|
|
102
103
|
return [2 /*return*/, this.fetch({
|
|
103
|
-
uri:
|
|
104
|
+
uri: BASE_URI,
|
|
104
105
|
method: 'POST',
|
|
105
106
|
body: params,
|
|
106
107
|
qs: { createIfNotExist: true },
|
|
@@ -114,29 +115,22 @@ var ProductService = /** @class */ (function (_super) {
|
|
|
114
115
|
};
|
|
115
116
|
/**
|
|
116
117
|
* プロダクト検索
|
|
118
|
+
* 公開属性のみ
|
|
119
|
+
* @deprecated use admin service
|
|
117
120
|
*/
|
|
118
|
-
ProductService.prototype.
|
|
121
|
+
ProductService.prototype.findProductsLegacy = function (params) {
|
|
119
122
|
return __awaiter(this, void 0, void 0, function () {
|
|
120
123
|
var _this = this;
|
|
121
124
|
return __generator(this, function (_a) {
|
|
122
125
|
return [2 /*return*/, this.fetch({
|
|
123
|
-
uri:
|
|
126
|
+
uri: BASE_URI,
|
|
124
127
|
method: 'GET',
|
|
125
128
|
qs: params,
|
|
126
129
|
expectedStatusCodes: [http_status_1.OK]
|
|
127
130
|
})
|
|
128
|
-
.then(function (response) { return __awaiter(_this, void 0, void 0, function () {
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
switch (_b.label) {
|
|
132
|
-
case 0:
|
|
133
|
-
_a = {};
|
|
134
|
-
return [4 /*yield*/, response.json()];
|
|
135
|
-
case 1: return [2 /*return*/, (_a.data = _b.sent(),
|
|
136
|
-
_a)];
|
|
137
|
-
}
|
|
138
|
-
});
|
|
139
|
-
}); })];
|
|
131
|
+
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
132
|
+
return [2 /*return*/, response.json()];
|
|
133
|
+
}); }); })];
|
|
140
134
|
});
|
|
141
135
|
});
|
|
142
136
|
};
|
|
@@ -147,7 +141,7 @@ var ProductService = /** @class */ (function (_super) {
|
|
|
147
141
|
return __generator(this, function (_a) {
|
|
148
142
|
id = params.id, query = __rest(params, ["id"]);
|
|
149
143
|
return [2 /*return*/, this.fetch({
|
|
150
|
-
uri: "/
|
|
144
|
+
uri: BASE_URI + "/" + encodeURIComponent(String(id)),
|
|
151
145
|
method: 'GET',
|
|
152
146
|
expectedStatusCodes: [http_status_1.OK],
|
|
153
147
|
qs: query
|
|
@@ -163,7 +157,7 @@ var ProductService = /** @class */ (function (_super) {
|
|
|
163
157
|
return __generator(this, function (_a) {
|
|
164
158
|
switch (_a.label) {
|
|
165
159
|
case 0: return [4 /*yield*/, this.fetch({
|
|
166
|
-
uri: "/
|
|
160
|
+
uri: BASE_URI + "/" + encodeURIComponent(String(params.id)),
|
|
167
161
|
method: 'PUT',
|
|
168
162
|
body: params,
|
|
169
163
|
expectedStatusCodes: [http_status_1.NO_CONTENT]
|
|
@@ -180,7 +174,7 @@ var ProductService = /** @class */ (function (_super) {
|
|
|
180
174
|
return __generator(this, function (_a) {
|
|
181
175
|
switch (_a.label) {
|
|
182
176
|
case 0: return [4 /*yield*/, this.fetch({
|
|
183
|
-
uri: "/
|
|
177
|
+
uri: BASE_URI + "/" + encodeURIComponent(String(params.id)),
|
|
184
178
|
method: 'DELETE',
|
|
185
179
|
expectedStatusCodes: [http_status_1.NO_CONTENT]
|
|
186
180
|
})];
|
|
@@ -9,6 +9,3 @@ export declare type IProvidePaymentService = Pick<factory.service.paymentService
|
|
|
9
9
|
provider: Pick<factory.service.paymentService.IProvider, 'id' | 'credentials'>;
|
|
10
10
|
};
|
|
11
11
|
export declare type IPaymentAccepted = Pick<factory.categoryCode.ICategoryCode, 'codeValue' | 'additionalProperty' | 'color' | 'image' | 'name'>;
|
|
12
|
-
export declare type IMakesProductOffer = Pick<factory.product.IOffer, 'availabilityEnds' | 'availabilityStarts' | 'seller' | 'validFrom' | 'validThrough'> & {
|
|
13
|
-
itemOffered: Pick<factory.product.IProduct, 'id' | 'name' | 'typeOf'>;
|
|
14
|
-
};
|
|
@@ -1,2 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
// export type IMakesProductOffer = Pick<
|
|
4
|
+
// factory.product.IOffer,
|
|
5
|
+
// 'availabilityEnds' | 'availabilityStarts' | 'seller' | 'validFrom' | 'validThrough'
|
|
6
|
+
// > & {
|
|
7
|
+
// itemOffered: Pick<factory.product.IProduct, 'id' | 'name' | 'typeOf'>;
|
|
8
|
+
// };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as factory from '../factory';
|
|
2
2
|
import { IOptions, ISearchResult, IUnset, Service } from '../service';
|
|
3
|
-
import {
|
|
3
|
+
import { IPaymentAccepted, IProvidePaymentService } from './seller/factory';
|
|
4
4
|
declare type IKeyOfProjection = keyof factory.seller.ISeller;
|
|
5
5
|
declare type IProjection = {
|
|
6
6
|
[key in IKeyOfProjection]?: 1;
|
|
@@ -111,44 +111,6 @@ export declare class SellerService extends Service<IOptions> {
|
|
|
111
111
|
id: string;
|
|
112
112
|
provider: Pick<factory.service.paymentService.IProvider, 'id'>;
|
|
113
113
|
}): Promise<void>;
|
|
114
|
-
searchMakesProductOffer(params: {
|
|
115
|
-
seller: {
|
|
116
|
-
/**
|
|
117
|
-
* 販売者ID
|
|
118
|
-
*/
|
|
119
|
-
id: string;
|
|
120
|
-
};
|
|
121
|
-
/**
|
|
122
|
-
* 検索条件
|
|
123
|
-
*/
|
|
124
|
-
qs: {
|
|
125
|
-
limit?: number;
|
|
126
|
-
page?: number;
|
|
127
|
-
itemOffered?: {
|
|
128
|
-
id?: {
|
|
129
|
-
$eq?: string;
|
|
130
|
-
};
|
|
131
|
-
};
|
|
132
|
-
};
|
|
133
|
-
}): Promise<ISearchResult<IMakesProductOffer[]>>;
|
|
134
|
-
createMakesProductOffer(params: Pick<factory.product.IOffer, 'availabilityEnds' | 'availabilityStarts' | 'seller' | 'validFrom' | 'validThrough'> & {
|
|
135
|
-
itemOffered: {
|
|
136
|
-
id: string;
|
|
137
|
-
};
|
|
138
|
-
}): Promise<void>;
|
|
139
|
-
updateMakesProductOffer(params: Pick<factory.product.IOffer, 'availabilityEnds' | 'availabilityStarts' | 'seller' | 'validFrom' | 'validThrough'> & {
|
|
140
|
-
itemOffered: {
|
|
141
|
-
id: string;
|
|
142
|
-
};
|
|
143
|
-
}): Promise<void>;
|
|
144
|
-
deleteMakesProductOffer(params: {
|
|
145
|
-
itemOffered: {
|
|
146
|
-
id: string;
|
|
147
|
-
};
|
|
148
|
-
seller: {
|
|
149
|
-
id: string;
|
|
150
|
-
};
|
|
151
|
-
}): Promise<void>;
|
|
152
114
|
/**
|
|
153
115
|
* IAMメンバー作成
|
|
154
116
|
*/
|