@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);
|
|
@@ -89,7 +89,8 @@ export declare class EventService extends Service {
|
|
|
89
89
|
*/
|
|
90
90
|
searchSeats(params: {
|
|
91
91
|
id: string;
|
|
92
|
-
|
|
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
|
*/
|