@cinerino/sdk 10.14.0 → 10.15.0-alpha.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.
@@ -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
+
20
+ const eventService = await chevre.createEventInstance({
21
+ project: { id: PROJECT_ID },
22
+ seller: { id: '' }
23
+ });
24
+
25
+ const result = await eventService.searchSeats({
26
+ id: 'bm2bfj55r',
27
+ page: 1,
28
+ limit: 1,
29
+ branchCode: { $eq: 'B-2' },
30
+ excludePriceSpecification: true
31
+ });
32
+ // tslint:disable-next-line:no-null-keyword
33
+ console.dir(result, { depth: null });
34
+ console.log(result.length, 'events returned');
35
+ }
36
+
37
+ main()
38
+ .then(() => {
39
+ console.log('success!');
40
+ })
41
+ .catch(console.error);
@@ -26,9 +26,10 @@ async function main() {
26
26
  en: 'xxx',
27
27
  ja: 'xxx'
28
28
  },
29
- hasOfferCatalog: {
29
+ // 複数hasOfferCatalogの場合array
30
+ hasOfferCatalog: [{
30
31
  identifier: '0001NEW'
31
- },
32
+ }],
32
33
  serviceType: {
33
34
  codeValue: '0001'
34
35
  },
@@ -89,7 +89,8 @@ export declare class EventService extends Service {
89
89
  */
90
90
  searchSeats(params: {
91
91
  id: string;
92
- } & Omit<factory.place.seat.ISearchConditions, 'project' | '$projection'>): Promise<ISeatAsEventOffer[]>;
92
+ excludePriceSpecification?: boolean;
93
+ } & Pick<factory.place.seat.ISearchConditions, 'additionalProperty' | 'branchCode' | 'containedInPlace' | 'limit' | 'name' | 'page' | 'parentOrganization' | 'seatingType' | 'sort'>): Promise<ISeatAsEventOffer[]>;
93
94
  /**
94
95
  * オファーで利用可能な適用決済カード条件を検索する
95
96
  */
@@ -181,6 +181,7 @@ export declare class EventService extends Service {
181
181
  };
182
182
  limit: number;
183
183
  page: number;
184
+ excludePriceSpecification?: boolean;
184
185
  }): Promise<ISearchResult<ISeatAsEventOffer[]>>;
185
186
  /**
186
187
  * 興行オファー検索
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cinerino/sdk",
3
- "version": "10.14.0",
3
+ "version": "10.15.0-alpha.0",
4
4
  "description": "Cinerino SDK",
5
5
  "main": "./lib/index.js",
6
6
  "browser": {