@cinerino/sdk 12.6.0-alpha.5 → 12.7.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.
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.7.0-alpha.0",
4
4
  "description": "Cinerino SDK",
5
5
  "main": "./lib/index.js",
6
6
  "browser": {
@@ -93,7 +93,7 @@
93
93
  "watchify": "^3.11.1"
94
94
  },
95
95
  "dependencies": {
96
- "@chevre/factory": "5.1.0",
96
+ "@chevre/factory": "5.2.0-alpha.3",
97
97
  "debug": "3.2.7",
98
98
  "http-status": "1.7.4",
99
99
  "idtoken-verifier": "2.0.3",
@@ -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);