@cinerino/sdk 11.0.0-alpha.5 → 11.0.0-alpha.7

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cinerino/sdk",
3
- "version": "11.0.0-alpha.5",
3
+ "version": "11.0.0-alpha.7",
4
4
  "description": "Cinerino SDK",
5
5
  "main": "./lib/index.js",
6
6
  "browser": {
@@ -92,7 +92,7 @@
92
92
  "watchify": "^3.11.1"
93
93
  },
94
94
  "dependencies": {
95
- "@chevre/factory": "4.395.0-alpha.3",
95
+ "@chevre/factory": "4.395.0-alpha.5",
96
96
  "debug": "3.2.7",
97
97
  "http-status": "1.7.4",
98
98
  "idtoken-verifier": "2.0.3",
@@ -1,49 +0,0 @@
1
- // tslint:disable:no-console no-implicit-dependencies no-magic-numbers
2
- import * as httpStatus from 'http-status';
3
-
4
- import * as client from '../../../lib/index';
5
-
6
- const eventId = '220406001001010900';
7
-
8
- // tslint:disable-next-line:max-func-body-length
9
- async function main() {
10
- const auth = await client.auth.ClientCredentials.createInstance({
11
- domain: <string>process.env.ST_AUTHORIZE_SERVER_DOMAIN,
12
- clientId: <string>process.env.ST_CLIENT_ID,
13
- clientSecret: <string>process.env.ST_CLIENT_SECRET,
14
- scopes: [],
15
- state: 'teststate'
16
- });
17
-
18
- const sellerService = new (await client.loadService()).Seller({
19
- endpoint: <string>process.env.ST_API_ENDPOINT,
20
- auth: auth,
21
- project: { id: '' }
22
- });
23
-
24
- console.log('座席を検索しています...');
25
- const searchResult = await sellerService.fetch({
26
- uri: `/events/ScreeningEvent/${eventId}/seats`,
27
- method: 'GET',
28
- qs: {
29
- limit: 10
30
- },
31
- expectedStatusCodes: [httpStatus.OK]
32
- })
33
- .then(async (response) => {
34
- return {
35
- data: await response.json()
36
- };
37
- });
38
- console.log(searchResult.data);
39
- console.log(searchResult.data.length);
40
- console.log(searchResult.data[0]?.offers);
41
- }
42
-
43
- main()
44
- .then(() => {
45
- console.log('main processed.');
46
- })
47
- .catch((err) => {
48
- console.error(err);
49
- });