@cinerino/sdk 18.3.0-alpha.10 → 18.3.0-alpha.12
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/lib/abstract/chevre/event/factory.d.ts +1 -1
- package/lib/abstract/chevre/offer/factory.d.ts +17 -0
- package/lib/abstract/chevre/offer/factory.js +2 -0
- package/lib/abstract/chevre/offer.d.ts +11 -0
- package/lib/abstract/chevre/offer.js +23 -0
- package/lib/abstract/chevre.d.ts +9 -0
- package/lib/abstract/chevre.js +9 -0
- package/lib/abstract/chevreAdmin/offerCatalogItem.d.ts +1 -1
- package/lib/abstract/chevreConsole/offerCatalog.d.ts +2 -2
- package/lib/abstract/chevreConsole/offerCatalogItem.d.ts +1 -1
- package/lib/abstract/cloud/search/offer.d.ts +11 -0
- package/lib/abstract/cloud/search/offer.js +24 -0
- package/lib/abstract/cloud/search.d.ts +12 -0
- package/lib/abstract/cloud/search.js +15 -0
- package/lib/bundle.js +3 -3
- package/lib/bundle.js.map +4 -4
- package/package.json +2 -2
|
@@ -77,7 +77,7 @@ export interface IFindSubEventsParams {
|
|
|
77
77
|
/**
|
|
78
78
|
* イベントのサブカタログ検索結果
|
|
79
79
|
*/
|
|
80
|
-
export type ISearchOfferCatalogItemResult = Pick<factory.offerCatalog.IOfferCatalog, 'id' | 'name' | 'description' | '
|
|
80
|
+
export type ISearchOfferCatalogItemResult = Pick<factory.offerCatalog.IOfferCatalog, 'id' | 'name' | 'description' | 'relatedOffer'> & {
|
|
81
81
|
/**
|
|
82
82
|
* カタログ内インデックス
|
|
83
83
|
*/
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { factory } from '../../factory';
|
|
2
|
+
export interface IFindParams {
|
|
3
|
+
/**
|
|
4
|
+
* max: 20
|
|
5
|
+
* min: 1
|
|
6
|
+
*/
|
|
7
|
+
limit: number;
|
|
8
|
+
/**
|
|
9
|
+
* min: 1
|
|
10
|
+
*/
|
|
11
|
+
page: number;
|
|
12
|
+
/**
|
|
13
|
+
* IDリストを最大10件まで指定可能
|
|
14
|
+
*/
|
|
15
|
+
ids?: string[];
|
|
16
|
+
}
|
|
17
|
+
export type IUnitPriceOfferAsFindResult = Pick<factory.unitPriceOffer.IUnitPriceOffer, 'id' | 'identifier' | 'description' | 'name' | 'color' | 'additionalProperty'>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Service } from '../service';
|
|
2
|
+
import { IFindParams, IUnitPriceOfferAsFindResult } from './offer/factory';
|
|
3
|
+
/**
|
|
4
|
+
* 単価オファーサービス
|
|
5
|
+
*/
|
|
6
|
+
export declare class OfferService extends Service {
|
|
7
|
+
/**
|
|
8
|
+
* 単価オファー検索
|
|
9
|
+
*/
|
|
10
|
+
findUnitPriceOffers(params: IFindParams): Promise<IUnitPriceOfferAsFindResult[]>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OfferService = void 0;
|
|
4
|
+
const http_status_1 = require("http-status");
|
|
5
|
+
const service_1 = require("../service");
|
|
6
|
+
/**
|
|
7
|
+
* 単価オファーサービス
|
|
8
|
+
*/
|
|
9
|
+
class OfferService extends service_1.Service {
|
|
10
|
+
/**
|
|
11
|
+
* 単価オファー検索
|
|
12
|
+
*/
|
|
13
|
+
async findUnitPriceOffers(params) {
|
|
14
|
+
return this.fetch({
|
|
15
|
+
uri: '/offers',
|
|
16
|
+
method: 'GET',
|
|
17
|
+
qs: params,
|
|
18
|
+
expectedStatusCodes: [http_status_1.status.OK]
|
|
19
|
+
})
|
|
20
|
+
.then(async (response) => response.json());
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
exports.OfferService = OfferService;
|
package/lib/abstract/chevre.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import type { CreativeWorkService } from './chevre/creativeWork';
|
|
|
4
4
|
import type { EventService } from './chevre/event';
|
|
5
5
|
import type { EventOfferService } from './chevre/eventOffer';
|
|
6
6
|
import type { EventSeriesService } from './chevre/eventSeries';
|
|
7
|
+
import type { OfferService } from './chevre/offer';
|
|
7
8
|
import type { PlaceService } from './chevre/place';
|
|
8
9
|
import type { ProductService } from './chevre/product';
|
|
9
10
|
import type { SeatOfferService } from './chevre/seatOffer';
|
|
@@ -45,6 +46,13 @@ export declare namespace service {
|
|
|
45
46
|
namespace EventSeries {
|
|
46
47
|
let svc: typeof EventSeriesService | undefined;
|
|
47
48
|
}
|
|
49
|
+
/**
|
|
50
|
+
* 単価オファーサービス
|
|
51
|
+
*/
|
|
52
|
+
type Offer = OfferService;
|
|
53
|
+
namespace Offer {
|
|
54
|
+
let svc: typeof OfferService | undefined;
|
|
55
|
+
}
|
|
48
56
|
/**
|
|
49
57
|
* 施設サービス
|
|
50
58
|
*/
|
|
@@ -85,6 +93,7 @@ export declare class Chevre {
|
|
|
85
93
|
createEventInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<EventService>;
|
|
86
94
|
createEventOfferInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<EventOfferService>;
|
|
87
95
|
createEventSeriesInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<EventSeriesService>;
|
|
96
|
+
createOfferInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<OfferService>;
|
|
88
97
|
createPlaceInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<PlaceService>;
|
|
89
98
|
createProductInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<ProductService>;
|
|
90
99
|
createSeatOfferInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<SeatOfferService>;
|
package/lib/abstract/chevre.js
CHANGED
|
@@ -51,6 +51,9 @@ var service;
|
|
|
51
51
|
let EventSeries;
|
|
52
52
|
(function (EventSeries) {
|
|
53
53
|
})(EventSeries = service.EventSeries || (service.EventSeries = {}));
|
|
54
|
+
let Offer;
|
|
55
|
+
(function (Offer) {
|
|
56
|
+
})(Offer = service.Offer || (service.Offer = {}));
|
|
54
57
|
let Place;
|
|
55
58
|
(function (Place) {
|
|
56
59
|
})(Place = service.Place || (service.Place = {}));
|
|
@@ -102,6 +105,12 @@ class Chevre {
|
|
|
102
105
|
}
|
|
103
106
|
return new service.EventSeries.svc({ ...this.options, ...params, retryableStatusCodes: [] });
|
|
104
107
|
}
|
|
108
|
+
async createOfferInstance(params) {
|
|
109
|
+
if (service.Offer.svc === undefined) {
|
|
110
|
+
service.Offer.svc = (await Promise.resolve().then(() => __importStar(require('./chevre/offer.js')))).OfferService;
|
|
111
|
+
}
|
|
112
|
+
return new service.Offer.svc({ ...this.options, ...params, retryableStatusCodes: [] });
|
|
113
|
+
}
|
|
105
114
|
async createPlaceInstance(params) {
|
|
106
115
|
if (service.Place.svc === undefined) {
|
|
107
116
|
service.Place.svc = (await Promise.resolve().then(() => __importStar(require('./chevre/place.js')))).PlaceService;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { factory } from '../factory';
|
|
2
2
|
import { Service } from '../service';
|
|
3
|
-
type IOfferCatalogAsSearchResult = Pick<factory.offerCatalog.IOfferCatalog, 'id' | 'name' | 'description' | 'project' | 'typeOf' | 'identifier' | 'itemOffered' | '
|
|
3
|
+
type IOfferCatalogAsSearchResult = Pick<factory.offerCatalog.IOfferCatalog, 'id' | 'name' | 'description' | 'project' | 'typeOf' | 'identifier' | 'itemOffered' | 'relatedOffer'> & {
|
|
4
4
|
/**
|
|
5
5
|
* アイテム数
|
|
6
6
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { factory } from '../factory';
|
|
2
2
|
import { Service } from '../service';
|
|
3
|
-
type IOfferCatalogAsSearchResult = Pick<factory.offerCatalog.IOfferCatalog, 'id' | 'name' | 'description' | 'project' | 'typeOf' | 'identifier' | 'itemOffered'
|
|
3
|
+
type IOfferCatalogAsSearchResult = Pick<factory.offerCatalog.IOfferCatalog, 'id' | 'name' | 'description' | 'project' | 'typeOf' | 'identifier' | 'itemOffered'> & {
|
|
4
4
|
/**
|
|
5
5
|
* アイテム数
|
|
6
6
|
*/
|
|
@@ -13,7 +13,7 @@ type IOfferCatalogAsSearchResult = Pick<factory.offerCatalog.IOfferCatalog, 'id'
|
|
|
13
13
|
type IItemAsOffer = Pick<factory.unitPriceOffer.IUnitPriceOffer, 'id' | 'identifier' | 'name' | 'alternateName' | 'priceSpecification' | 'typeOf'> & {
|
|
14
14
|
sortIndex?: number;
|
|
15
15
|
};
|
|
16
|
-
type IItemAsOfferCatalog = Pick<factory.offerCatalog.IOfferCatalog, 'id' | 'name' | 'description' | 'typeOf' | 'identifier' | 'itemOffered' | '
|
|
16
|
+
type IItemAsOfferCatalog = Pick<factory.offerCatalog.IOfferCatalog, 'id' | 'name' | 'description' | 'typeOf' | 'identifier' | 'itemOffered' | 'relatedOffer'> & {
|
|
17
17
|
sortIndex?: number;
|
|
18
18
|
};
|
|
19
19
|
type IItemListElement = IItemAsOffer | IItemAsOfferCatalog;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { factory } from '../factory';
|
|
2
2
|
import { Service } from '../service';
|
|
3
|
-
type IOfferCatalogAsSearchResult = Pick<factory.offerCatalog.IOfferCatalog, 'id' | 'name' | 'description' | 'project' | 'typeOf' | 'identifier' | 'itemOffered' | '
|
|
3
|
+
type IOfferCatalogAsSearchResult = Pick<factory.offerCatalog.IOfferCatalog, 'id' | 'name' | 'description' | 'project' | 'typeOf' | 'identifier' | 'itemOffered' | 'relatedOffer'> & {
|
|
4
4
|
/**
|
|
5
5
|
* アイテム数
|
|
6
6
|
*/
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IFindParams, IUnitPriceOfferAsFindResult } from '../../chevre/offer/factory';
|
|
2
|
+
import { Service } from '../../service';
|
|
3
|
+
/**
|
|
4
|
+
* 単価オファーサービス
|
|
5
|
+
*/
|
|
6
|
+
export declare class OfferService extends Service {
|
|
7
|
+
/**
|
|
8
|
+
* 単価オファー検索
|
|
9
|
+
*/
|
|
10
|
+
findUnitPriceOffers(params: Pick<IFindParams, 'limit' | 'page' | 'ids'>): Promise<IUnitPriceOfferAsFindResult[]>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OfferService = void 0;
|
|
4
|
+
const http_status_1 = require("http-status");
|
|
5
|
+
const service_1 = require("../../service");
|
|
6
|
+
/**
|
|
7
|
+
* 単価オファーサービス
|
|
8
|
+
*/
|
|
9
|
+
class OfferService extends service_1.Service {
|
|
10
|
+
/**
|
|
11
|
+
* 単価オファー検索
|
|
12
|
+
*/
|
|
13
|
+
async findUnitPriceOffers(params) {
|
|
14
|
+
const { limit, page, ids } = params;
|
|
15
|
+
return this.fetch({
|
|
16
|
+
uri: '/offers',
|
|
17
|
+
method: 'GET',
|
|
18
|
+
qs: { limit, page, ids },
|
|
19
|
+
expectedStatusCodes: [http_status_1.status.OK]
|
|
20
|
+
})
|
|
21
|
+
.then(async (response) => response.json());
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
exports.OfferService = OfferService;
|
|
@@ -3,6 +3,7 @@ import type { CreativeWorkService } from './search/creativeWork';
|
|
|
3
3
|
import type { EventService } from './search/event';
|
|
4
4
|
import type { EventOfferService } from './search/eventOffer';
|
|
5
5
|
import type { EventSeriesService } from './search/eventSeries';
|
|
6
|
+
import type { OfferService } from './search/offer';
|
|
6
7
|
import type { PlaceService } from './search/place';
|
|
7
8
|
import type { ProductService } from './search/product';
|
|
8
9
|
import type { SeatOfferService } from './search/seatOffer';
|
|
@@ -38,6 +39,13 @@ export declare namespace service {
|
|
|
38
39
|
namespace EventOffer {
|
|
39
40
|
let svc: typeof EventOfferService | undefined;
|
|
40
41
|
}
|
|
42
|
+
/**
|
|
43
|
+
* 単価オファーサービス
|
|
44
|
+
*/
|
|
45
|
+
type Offer = OfferService;
|
|
46
|
+
namespace Offer {
|
|
47
|
+
let svc: typeof OfferService | undefined;
|
|
48
|
+
}
|
|
41
49
|
/**
|
|
42
50
|
* 施設サービス
|
|
43
51
|
*/
|
|
@@ -70,6 +78,10 @@ export declare class CloudSearch {
|
|
|
70
78
|
* コンテンツサービスインスタンス生成
|
|
71
79
|
*/
|
|
72
80
|
createCreativeWorkInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<CreativeWorkService>;
|
|
81
|
+
/**
|
|
82
|
+
* 単価オファーサービスインスタンス生成
|
|
83
|
+
*/
|
|
84
|
+
createOfferInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<OfferService>;
|
|
73
85
|
/**
|
|
74
86
|
* プロダクトサービスインスタンス生成
|
|
75
87
|
*/
|
|
@@ -52,6 +52,9 @@ var service;
|
|
|
52
52
|
let EventOffer;
|
|
53
53
|
(function (EventOffer) {
|
|
54
54
|
})(EventOffer = service.EventOffer || (service.EventOffer = {}));
|
|
55
|
+
let Offer;
|
|
56
|
+
(function (Offer) {
|
|
57
|
+
})(Offer = service.Offer || (service.Offer = {}));
|
|
55
58
|
let Place;
|
|
56
59
|
(function (Place) {
|
|
57
60
|
})(Place = service.Place || (service.Place = {}));
|
|
@@ -83,6 +86,18 @@ class CloudSearch {
|
|
|
83
86
|
retryableStatusCodes: defaultRetryableStatusCodes
|
|
84
87
|
});
|
|
85
88
|
}
|
|
89
|
+
/**
|
|
90
|
+
* 単価オファーサービスインスタンス生成
|
|
91
|
+
*/
|
|
92
|
+
async createOfferInstance(params) {
|
|
93
|
+
if (service.Offer.svc === undefined) {
|
|
94
|
+
service.Offer.svc = (await Promise.resolve().then(() => __importStar(require('./search/offer.js')))).OfferService;
|
|
95
|
+
}
|
|
96
|
+
return new service.Offer.svc({
|
|
97
|
+
...this.options, ...params,
|
|
98
|
+
retryableStatusCodes: defaultRetryableStatusCodes
|
|
99
|
+
});
|
|
100
|
+
}
|
|
86
101
|
/**
|
|
87
102
|
* プロダクトサービスインスタンス生成
|
|
88
103
|
*/
|