@cinerino/sdk 3.130.0 → 3.131.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,37 @@
1
+ // tslint:disable:no-implicit-dependencies no-console
2
+ import * as client from '../../../lib/index';
3
+ import * as auth from '../auth/authAsAdmin';
4
+
5
+ const PROJECT_ID = process.env.PROJECT_ID;
6
+
7
+ async function main() {
8
+ const authClient = await auth.login();
9
+ await authClient.refreshAccessToken();
10
+ const loginTicket = authClient.verifyIdToken({});
11
+ console.log('username is', loginTicket.getUsername());
12
+
13
+ const eventService = new client.chevre.service.Event({
14
+ endpoint: <string>process.env.CHEVRE_ENDPOINT,
15
+ auth: authClient,
16
+ project: { id: PROJECT_ID }
17
+ });
18
+
19
+ const offers = await eventService.searchTicketOffers({
20
+ // limit: 2,
21
+ // page: 9,
22
+ id: 'al6aff83o',
23
+ // availableAt?: {
24
+ // id?: string;
25
+ // };
26
+ // onlyValid?: boolean;
27
+ seller: { id: '59d20831e53ebc2b4e774466' }
28
+ });
29
+ console.log(offers.map((offer) => offer.identifier));
30
+ console.log(offers.length, 'offers returned');
31
+ }
32
+
33
+ main()
34
+ .then(() => {
35
+ console.log('success!');
36
+ })
37
+ .catch(console.error);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cinerino/sdk",
3
- "version": "3.130.0",
3
+ "version": "3.131.0",
4
4
  "description": "Cinerino SDK",
5
5
  "main": "./lib/index.js",
6
6
  "browser": {
@@ -97,7 +97,7 @@
97
97
  "watchify": "^3.11.1"
98
98
  },
99
99
  "dependencies": {
100
- "@cinerino/api-abstract-client": "3.130.0",
100
+ "@cinerino/api-abstract-client": "3.131.0",
101
101
  "debug": "^3.2.6",
102
102
  "http-status": "^1.4.2",
103
103
  "idtoken-verifier": "^2.0.3",