@cinerino/sdk 12.6.0-alpha.5 → 12.6.0

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.
@@ -30,15 +30,3 @@ export declare type ISeatAsEventOffer = Pick<factory.place.seat.IPlaceWithOffer,
30
30
  branchCode?: string;
31
31
  };
32
32
  };
33
- export declare type ISellerMakesOffer = Pick<factory.event.screeningEvent.ISellerMakesOffer, 'availabilityEnds' | 'availabilityStarts' | 'validFrom' | 'validThrough'> & {
34
- itemOffered: {
35
- serviceOutput: {
36
- reservationFor: {
37
- /**
38
- * イベントID
39
- */
40
- id: string;
41
- };
42
- };
43
- };
44
- };
@@ -1,2 +1,15 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ // export type ISellerMakesOffer =
4
+ // Pick<factory.event.screeningEvent.ISellerMakesOffer, 'availabilityEnds' | 'availabilityStarts' | 'validFrom' | 'validThrough'> & {
5
+ // itemOffered: {
6
+ // serviceOutput: {
7
+ // reservationFor: {
8
+ // /**
9
+ // * イベントID
10
+ // */
11
+ // id: string;
12
+ // };
13
+ // };
14
+ // };
15
+ // };
@@ -1,6 +1,6 @@
1
1
  import type { ISearchWithReservationForIdResult } from '../chevreConsole/aggregateReservation';
2
2
  import * as factory from '../factory';
3
- import { ISearchOfferCatalogItemAvailabilityResult, ISearchOfferCatalogItemResult, ISeatAsEventOffer, ISellerMakesOffer } from './event/factory';
3
+ import { ISearchOfferCatalogItemAvailabilityResult, ISearchOfferCatalogItemResult, ISeatAsEventOffer } from './event/factory';
4
4
  import { Service } from '../service';
5
5
  declare type IKeyOfProjection = keyof factory.event.screeningEvent.IEvent;
6
6
  declare type IProjection = {
@@ -31,33 +31,6 @@ export declare class EventService extends Service {
31
31
  aggregateOffer?: 1;
32
32
  };
33
33
  }): Promise<ISearchWithReservationForIdResult[]>;
34
- /**
35
- * クライアントの販売設定検索
36
- */
37
- searchSellerMakesOffer(params: {
38
- /**
39
- * min:1
40
- * max:50
41
- */
42
- limit: number;
43
- /**
44
- * min:1
45
- */
46
- page: number;
47
- availableAtOrFrom: {
48
- /**
49
- * クライアントID(指定必須)
50
- */
51
- id: {
52
- $eq: string;
53
- };
54
- };
55
- /**
56
- * イベントID
57
- * max:50
58
- */
59
- eventIds: string[];
60
- }): Promise<ISellerMakesOffer[]>;
61
34
  /**
62
35
  * イベント取得
63
36
  */
@@ -112,25 +112,6 @@ var EventService = /** @class */ (function (_super) {
112
112
  });
113
113
  });
114
114
  };
115
- /**
116
- * クライアントの販売設定検索
117
- */
118
- EventService.prototype.searchSellerMakesOffer = function (params) {
119
- return __awaiter(this, void 0, void 0, function () {
120
- var _this = this;
121
- return __generator(this, function (_a) {
122
- return [2 /*return*/, this.fetch({
123
- uri: '/events/sellerMakesOffer',
124
- method: 'GET',
125
- qs: params,
126
- expectedStatusCodes: [http_status_1.OK]
127
- })
128
- .then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
129
- return [2 /*return*/, response.json()];
130
- }); }); })];
131
- });
132
- });
133
- };
134
115
  /**
135
116
  * イベント取得
136
117
  */
@@ -18,9 +18,21 @@ export declare type IUpdateParamsByIdentifier = Pick<factory.event.screeningEven
18
18
  superEvent?: never;
19
19
  };
20
20
  export interface IUpdateEventSellerMakesOfferParamsByIdentifier {
21
+ /**
22
+ * イベント識別子
23
+ */
21
24
  identifier: string;
22
25
  offers: {
23
- seller: Pick<factory.event.screeningEvent.ISeller4create, 'makesOffer'>;
26
+ seller: {
27
+ makesOffer: (factory.event.screeningEvent.ISellerMakesOffer4create & {
28
+ /**
29
+ * アプリケーションオファーコード
30
+ * イベント内でユニーク必須
31
+ * 8-32文字の^[0-9a-zA-Z]+$
32
+ */
33
+ identifier: string;
34
+ })[];
35
+ };
24
36
  };
25
37
  location?: never;
26
38
  superEvent?: never;
@@ -1,4 +1,4 @@
1
- import { ISearchOfferCatalogItemAvailabilityResult, ISearchOfferCatalogItemResult, ISeatAsEventOffer, ISellerMakesOffer as ISearchSellerMakesOfferResult } from '../../chevre/event/factory';
1
+ import { ISearchOfferCatalogItemAvailabilityResult, ISearchOfferCatalogItemResult, ISeatAsEventOffer } from '../../chevre/event/factory';
2
2
  import type { ISearchWithReservationForIdResult } from '../../chevreConsole/aggregateReservation';
3
3
  import * as factory from '../../factory';
4
4
  import { IAdditionalOptions, IOptions, ISearchResult, Service } from '../../service';
@@ -151,33 +151,6 @@ export declare class EventService extends Service {
151
151
  aggregateOffer?: 1;
152
152
  };
153
153
  }): Promise<ISearchWithReservationForIdResult[]>;
154
- /**
155
- * クライアントの販売設定検索
156
- */
157
- searchSellerMakesOffer(params: {
158
- /**
159
- * min:1
160
- * max:50
161
- */
162
- limit: number;
163
- /**
164
- * min:1
165
- */
166
- page: number;
167
- availableAtOrFrom: {
168
- /**
169
- * クライアントID(指定必須)
170
- */
171
- id: {
172
- $eq: string;
173
- };
174
- };
175
- /**
176
- * イベントID
177
- * max:50
178
- */
179
- eventIds: string[];
180
- }): Promise<ISearchSellerMakesOfferResult[]>;
181
154
  /**
182
155
  * イベント取得
183
156
  * alias of search
@@ -180,25 +180,6 @@ var EventService = /** @class */ (function (_super) {
180
180
  });
181
181
  });
182
182
  };
183
- /**
184
- * クライアントの販売設定検索
185
- */
186
- EventService.prototype.searchSellerMakesOffer = function (params) {
187
- return __awaiter(this, void 0, void 0, function () {
188
- var _this = this;
189
- return __generator(this, function (_a) {
190
- return [2 /*return*/, this.fetch({
191
- uri: '/events/sellerMakesOffer',
192
- method: 'GET',
193
- qs: params,
194
- expectedStatusCodes: [http_status_1.OK]
195
- })
196
- .then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
197
- return [2 /*return*/, response.json()];
198
- }); }); })];
199
- });
200
- });
201
- };
202
183
  /**
203
184
  * イベント取得
204
185
  * alias of search
package/lib/bundle.js CHANGED
@@ -749,25 +749,6 @@ var EventService = /** @class */ (function (_super) {
749
749
  });
750
750
  });
751
751
  };
752
- /**
753
- * クライアントの販売設定検索
754
- */
755
- EventService.prototype.searchSellerMakesOffer = function (params) {
756
- return __awaiter(this, void 0, void 0, function () {
757
- var _this = this;
758
- return __generator(this, function (_a) {
759
- return [2 /*return*/, this.fetch({
760
- uri: '/events/sellerMakesOffer',
761
- method: 'GET',
762
- qs: params,
763
- expectedStatusCodes: [http_status_1.OK]
764
- })
765
- .then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
766
- return [2 /*return*/, response.json()];
767
- }); }); })];
768
- });
769
- });
770
- };
771
752
  /**
772
753
  * イベント取得
773
754
  */
@@ -20128,25 +20109,6 @@ var EventService = /** @class */ (function (_super) {
20128
20109
  });
20129
20110
  });
20130
20111
  };
20131
- /**
20132
- * クライアントの販売設定検索
20133
- */
20134
- EventService.prototype.searchSellerMakesOffer = function (params) {
20135
- return __awaiter(this, void 0, void 0, function () {
20136
- var _this = this;
20137
- return __generator(this, function (_a) {
20138
- return [2 /*return*/, this.fetch({
20139
- uri: '/events/sellerMakesOffer',
20140
- method: 'GET',
20141
- qs: params,
20142
- expectedStatusCodes: [http_status_1.OK]
20143
- })
20144
- .then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
20145
- return [2 /*return*/, response.json()];
20146
- }); }); })];
20147
- });
20148
- });
20149
- };
20150
20112
  /**
20151
20113
  * イベント取得
20152
20114
  * alias of search
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cinerino/sdk",
3
- "version": "12.6.0-alpha.5",
3
+ "version": "12.6.0",
4
4
  "description": "Cinerino SDK",
5
5
  "main": "./lib/index.js",
6
6
  "browser": {
@@ -1,43 +0,0 @@
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 eventService = await chevre.createEventInstance({
20
- project: { id: PROJECT_ID },
21
- seller: { id: '' }
22
- });
23
-
24
- const result = await eventService.searchSellerMakesOffer({
25
- page: 1,
26
- limit: 50,
27
- availableAtOrFrom: { id: { $eq: '51qbjcfr72h62m06vtv5kkhgje' } },
28
- eventIds: [
29
- 'bm0f0cadv', 'xx',
30
- // tslint:disable-next-line:no-magic-numbers prefer-array-literal
31
- ...[...Array(48)].map(() => 'xxxxxxxxxxxxxxxxxxx')
32
- ]
33
- });
34
- // tslint:disable-next-line:no-null-keyword
35
- console.dir(result, { depth: null });
36
- console.log(result.length, 'offers returned');
37
- }
38
-
39
- main()
40
- .then(() => {
41
- console.log('success!');
42
- })
43
- .catch(console.error);