Comparing version 3.0.0 to 3.0.1
@@ -69,2 +69,6 @@ "use strict"; | ||
case 4: | ||
if (tokenExists) { | ||
this.connected = true; | ||
return [2 /*return*/, this.connected]; | ||
} | ||
if (!hasCode && !tokenExists) { | ||
@@ -71,0 +75,0 @@ throw new Error('NO_TOKEN_AND_CODE'); |
{ | ||
"name": "amocrm-js", | ||
"version": "3.0.0", | ||
"version": "3.0.1", | ||
"description": "JS Library for AmoCRM", | ||
@@ -5,0 +5,0 @@ "main": "dist/Client.js", |
@@ -59,7 +59,2 @@ # AmoCRM | ||
```js | ||
/* | ||
const Client = | ||
*/ | ||
const client = new Client({ | ||
@@ -162,3 +157,3 @@ // логин пользователя в портале, где адрес портала domain.amocrm.ru | ||
```js | ||
const result = await client.request.make( 'GET', '/api/v4/account' ); | ||
const result = await client.request.make('GET', '/api/v4/account'); | ||
// возвращает тело ответа | ||
@@ -356,3 +351,3 @@ console.log(result.data); | ||
client.connection.on('change', () => { | ||
console.error('Произошла ошибка соединения'); | ||
console.error('Токен обновлён'); | ||
}) | ||
@@ -407,2 +402,3 @@ ``` | ||
- client.connect -> client.connection.connect | ||
- client.request(method, path, params, options) -> client.request.make(method, path, params, options) | ||
- client.connection.getAuthUrl() -> client.auth.getUrl() | ||
@@ -409,0 +405,0 @@ - client.connection.setState(state) -> client.environment.set('auth.state', state) |
@@ -66,2 +66,6 @@ import EventEmitter from "./EventEmitter"; | ||
} | ||
if (tokenExists) { | ||
this.connected = true; | ||
return this.connected; | ||
} | ||
if (!hasCode && !tokenExists) { | ||
@@ -68,0 +72,0 @@ throw new Error('NO_TOKEN_AND_CODE'); |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
130700
89
2258
2
440