Comparing version 3.1.3 to 3.1.4
@@ -7,6 +7,7 @@ /** | ||
import ResourceEntity from "../../ResourceEntity"; | ||
import ResourceFactory from "../../ResourceFactory"; | ||
/** | ||
* Помечает свойство сущности для синхронизации | ||
* */ | ||
export declare function fillable<T>(): (target: ResourceEntity<any>, propertyKey: string) => void; | ||
export declare function fillable<T extends ResourceEntity<ResourceFactory<T>>>(): (target: T, propertyKey: string) => void; | ||
/** | ||
@@ -13,0 +14,0 @@ * @returns массив полей сущности, которые синхронизируются с порталом |
@@ -162,3 +162,3 @@ /** | ||
* */ | ||
complexCreate(): Promise<void>; | ||
complexCreate(): Promise<boolean>; | ||
/** | ||
@@ -165,0 +165,0 @@ * Обновляет существующие сделки. Принцип работы метода аналогичен {@link create} |
@@ -163,2 +163,3 @@ "use strict"; | ||
return tslib_1.__awaiter(this, void 0, void 0, function* () { | ||
return false; | ||
}); | ||
@@ -165,0 +166,0 @@ } |
@@ -28,3 +28,3 @@ import { IResourceFactory } from "../interfaces/api"; | ||
* */ | ||
protected getEntityCriteria(criteriaData: any[]): JSONObject[]; | ||
protected getEntityCriteria<T extends ResourceEntity<ResourceFactory<T>>>(criteriaData: (JSONObject | T)[]): JSONObject[]; | ||
} |
@@ -11,6 +11,6 @@ import { IRequestOptions } from "../interfaces/common"; | ||
constructor(connection: Connection); | ||
make(method: string, url: string, data?: object, options?: IRequestOptions): Promise<import("../interfaces/common").IAPIResponse<any>>; | ||
get(url: string, data?: object, options?: IRequestOptions): Promise<import("../interfaces/common").IAPIResponse<any>>; | ||
post(url: string, data?: object, options?: IRequestOptions): Promise<import("../interfaces/common").IAPIResponse<any>>; | ||
patch(url: string, data?: object, options?: IRequestOptions): Promise<import("../interfaces/common").IAPIResponse<any>>; | ||
make<T>(method: string, url: string, data?: object, options?: IRequestOptions): Promise<import("../interfaces/common").IAPIResponse<T>>; | ||
get<T>(url: string, data?: object, options?: IRequestOptions): Promise<import("../interfaces/common").IAPIResponse<T>>; | ||
post<T>(url: string, data?: object, options?: IRequestOptions): Promise<import("../interfaces/common").IAPIResponse<T>>; | ||
patch<T>(url: string, data?: object, options?: IRequestOptions): Promise<import("../interfaces/common").IAPIResponse<T>>; | ||
} |
@@ -42,3 +42,3 @@ import EventEmitter from "./EventEmitter"; | ||
* */ | ||
makeRequest(method: string, url: string, data?: object, options?: IRequestOptions): Promise<import("../interfaces/common").IAPIResponse<any>>; | ||
makeRequest<T>(method: string, url: string, data?: object, options?: IRequestOptions): Promise<import("../interfaces/common").IAPIResponse<T>>; | ||
} |
@@ -98,3 +98,3 @@ "use strict"; | ||
const authOptions = this.environment.get('auth'); | ||
const port = 3000 || ((_a = authOptions.server) === null || _a === void 0 ? void 0 : _a.port); | ||
const port = ((_a = authOptions === null || authOptions === void 0 ? void 0 : authOptions.server) === null || _a === void 0 ? void 0 : _a.port) || 3000; | ||
const state = this.environment.get('auth.state'); | ||
@@ -101,0 +101,0 @@ const options = { |
@@ -102,3 +102,2 @@ "use strict"; | ||
const hostname = this.hostname; | ||
; | ||
const options = { | ||
@@ -121,3 +120,3 @@ hostname, | ||
onResponse(callback) { | ||
let buffer = []; | ||
const buffer = []; | ||
const onResponseData = (chunk) => buffer.push(chunk); | ||
@@ -124,0 +123,0 @@ const onResponseEnd = (response) => () => { |
@@ -38,3 +38,3 @@ import { IClientOptions } from "../interfaces/common"; | ||
* */ | ||
get<T>(path?: string, defaultValue?: any): T; | ||
get<T>(path?: string, defaultValue?: T): T; | ||
/** | ||
@@ -45,3 +45,3 @@ * Устанавливает новое значение настройки | ||
* */ | ||
set(path: string, value: any): this; | ||
set<T>(path: string, value: T): this; | ||
/** | ||
@@ -48,0 +48,0 @@ * Проверяет наличие настройки |
{ | ||
"name": "amocrm-js", | ||
"version": "3.1.3", | ||
"version": "3.1.4", | ||
"description": "JS Library for AmoCRM", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
@@ -47,2 +47,3 @@ # AmoCRM | ||
7. Расширенная документация и примеры использования | ||
8. Сократился объем библиотеки | ||
@@ -71,3 +72,3 @@ ## Установка | ||
```js | ||
import Client from 'amocrm-js' | ||
import { Client } from 'amocrm-js' | ||
``` | ||
@@ -527,4 +528,4 @@ | ||
Спасибо @amorev, @maxism, @shuraman69 за вклад в разработку этого проекта | ||
Спасибо @amorev, @maxism, @shuraman69, @korovenko-tatyana за вклад в разработку этого проекта | ||
Отдельная благодарность @dmitrytemlead за возможность протестировать библиотеку в стороннем проекте |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
383140
2453
529