bx-rest 0.0.31 → 0.0.33
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/esm2020/request/lists/element.mjs +4 -6
- package/esm2020/request/user.mjs +19 -20
- package/esm2020/rest.mjs +4 -38
- package/esm2020/services/http/HttpBX.mjs +24 -6
- package/esm2020/services/http/http.mjs +1 -7
- package/fesm2015/bx-rest.mjs +52 -76
- package/fesm2015/bx-rest.mjs.map +1 -1
- package/fesm2020/bx-rest.mjs +52 -76
- package/fesm2020/bx-rest.mjs.map +1 -1
- package/package.json +1 -1
- package/request/lists/element.d.ts +3 -3
- package/request/user.d.ts +6 -6
- package/rest.d.ts +1 -7
- package/services/http/HttpBX.d.ts +7 -2
- package/services/http/http.d.ts +0 -2
package/package.json
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import iHttpAnswerBX from '../../typification/rest/base/httpAnswerBX';
|
|
2
1
|
import HttpBXServices from '../../services/http/HttpBX';
|
|
3
2
|
import BXRestListsElementMap from '../../map/lists/element';
|
|
4
|
-
import {
|
|
3
|
+
import { iBXRestListsElement, iBXRestParamListsElementGet } from '../../typification/rest/lists/element/get';
|
|
5
4
|
import * as i0 from "@angular/core";
|
|
6
5
|
export declare class BXRestListsElement {
|
|
7
6
|
private http;
|
|
@@ -14,7 +13,8 @@ export declare class BXRestListsElement {
|
|
|
14
13
|
getFileUrl: string[];
|
|
15
14
|
};
|
|
16
15
|
constructor(http: HttpBXServices, mapResult: BXRestListsElementMap);
|
|
17
|
-
get(pram: iBXRestParamListsElementGet): import("rxjs").Observable<
|
|
16
|
+
get(pram: iBXRestParamListsElementGet): import("rxjs").Observable<import("../../typification/rest/base/httpAnswerBX").default<iBXRestListsElement[]> | undefined>;
|
|
17
|
+
customPipe(): void;
|
|
18
18
|
static ɵfac: i0.ɵɵFactoryDeclaration<BXRestListsElement, never>;
|
|
19
19
|
static ɵprov: i0.ɵɵInjectableDeclaration<BXRestListsElement>;
|
|
20
20
|
}
|
package/request/user.d.ts
CHANGED
|
@@ -36,14 +36,14 @@ export declare class BXRestUser {
|
|
|
36
36
|
constructor(http: HttpBXServices, snackBar: SnackBarService, store: Store<{
|
|
37
37
|
users: storeUsers;
|
|
38
38
|
}>, userMap: BitrixApiUserMapServices);
|
|
39
|
-
admin(): Observable<iHttpAnswerBX<boolean> | undefined>;
|
|
40
|
-
get(params?: iBXGetParam): Observable<iHttpAnswerBX<
|
|
41
|
-
current(update?: boolean): Observable<iBXRestUser | undefined>;
|
|
39
|
+
admin(): Observable<typeof import("../functions/mapResult").mapResult | iHttpAnswerBX<boolean> | undefined>;
|
|
40
|
+
get(params?: iBXGetParam): Observable<iHttpAnswerBX<iBXRestUser[]> | undefined>;
|
|
41
|
+
current(update?: boolean): Observable<typeof import("../functions/mapResult").mapResult | iBXRestUser | iHttpAnswerBX<iBXRestUserHttp> | iHttpAnswerBX<iBXRestUser> | undefined>;
|
|
42
42
|
private getSelfHttp;
|
|
43
|
-
access(access: string[], textError?: string): Observable<iHttpAnswerBX<boolean> | undefined>;
|
|
43
|
+
access(access: string[], textError?: string): Observable<typeof import("../functions/mapResult").mapResult | iHttpAnswerBX<iHttpAnswerBX<boolean> | undefined> | undefined>;
|
|
44
44
|
private saveArrUser;
|
|
45
|
-
search(params: string | UserFilterSearch): Observable<iHttpAnswerBX<iBXRestUserHttp[]
|
|
46
|
-
fields(): Observable<iHttpAnswerBX<iBXRestUserHttpField
|
|
45
|
+
search(params: string | UserFilterSearch): Observable<typeof import("../functions/mapResult").mapResult | iHttpAnswerBX<iHttpAnswerBX<iBXRestUserHttp[]>> | undefined>;
|
|
46
|
+
fields(): Observable<typeof import("../functions/mapResult").mapResult | iHttpAnswerBX<iHttpAnswerBX<iBXRestUserHttpField>> | undefined>;
|
|
47
47
|
update(user: iBXRestUser, fieldUpdate: string[]): Observable<iHttpAnswerBX<iBXRestUserHttp[]> | undefined> | Observable<{}>;
|
|
48
48
|
private setDefParam;
|
|
49
49
|
static ɵfac: i0.ɵɵFactoryDeclaration<BXRestUser, never>;
|
package/rest.d.ts
CHANGED
|
@@ -1,16 +1,10 @@
|
|
|
1
1
|
import { BXRestUser } from './request/user';
|
|
2
2
|
import BXRestLists from './request/lists';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class
|
|
4
|
+
export declare class BXRest {
|
|
5
5
|
user: BXRestUser;
|
|
6
6
|
lists: BXRestLists;
|
|
7
7
|
constructor(user: BXRestUser, lists: BXRestLists);
|
|
8
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<BXRestBase, never>;
|
|
9
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<BXRestBase>;
|
|
10
|
-
}
|
|
11
|
-
declare const BXRest_base: typeof BXRestBase;
|
|
12
|
-
export declare class BXRest extends BXRest_base {
|
|
13
8
|
static ɵfac: i0.ɵɵFactoryDeclaration<BXRest, never>;
|
|
14
9
|
static ɵprov: i0.ɵɵInjectableDeclaration<BXRest>;
|
|
15
10
|
}
|
|
16
|
-
export {};
|
|
@@ -2,7 +2,10 @@ import { Observable } from 'rxjs';
|
|
|
2
2
|
import { iHttpParamSettings } from '../../typification/rest/settings';
|
|
3
3
|
import BaseHttpServices from '../../services/http/http';
|
|
4
4
|
import { iBatchRequestAnswer, iBatchRequestParam, iBatchRequestParamArr, iBatchRequestParamHttp } from '../../typification/rest/batch/batchRequestParam';
|
|
5
|
+
import { mapResult } from '../../functions/mapResult';
|
|
6
|
+
import iHttpAnswerBX from '../../typification/rest/base/httpAnswerBX';
|
|
5
7
|
import * as i0 from "@angular/core";
|
|
8
|
+
declare type TransformFunction<T, R> = (input: T) => R;
|
|
6
9
|
export default class HttpBXServices extends BaseHttpServices {
|
|
7
10
|
timeNowOnServer(): Observable<Date | undefined>;
|
|
8
11
|
/**
|
|
@@ -16,11 +19,13 @@ export default class HttpBXServices extends BaseHttpServices {
|
|
|
16
19
|
[key: number]: T;
|
|
17
20
|
};
|
|
18
21
|
mapBranchResultWithoutKey<T>(res: iBatchRequestAnswer<T>[]): T[];
|
|
19
|
-
post<T>(name: string[], params
|
|
20
|
-
|
|
22
|
+
post<T>(name: string[], params: any, textError: string, mapHttp?: undefined, settings?: iHttpParamSettings): Observable<iHttpAnswerBX<T> | undefined>;
|
|
23
|
+
post<T, R>(name: string[], params: any, textError: string, mapHttp: TransformFunction<T, R>, settings?: iHttpParamSettings): Observable<iHttpAnswerBX<R> | undefined>;
|
|
24
|
+
get<T, R = T>(name: string[], params?: any, textError?: string, mapHttp?: TransformFunction<T, R>, settings?: iHttpParamSettings): Observable<typeof mapResult | iHttpAnswerBX<T> | iHttpAnswerBX<R> | undefined>;
|
|
21
25
|
httpPost<T>(url: string, params?: any, textError?: string, settings?: iHttpParamSettings): Observable<T | undefined>;
|
|
22
26
|
httpGet<T>(url: string, params?: any, textError?: string, settings?: iHttpParamSettings): Observable<T | undefined>;
|
|
23
27
|
getNameMethod(arr: string[]): string;
|
|
24
28
|
static ɵfac: i0.ɵɵFactoryDeclaration<HttpBXServices, never>;
|
|
25
29
|
static ɵprov: i0.ɵɵInjectableDeclaration<HttpBXServices>;
|
|
26
30
|
}
|
|
31
|
+
export {};
|
package/services/http/http.d.ts
CHANGED
|
@@ -21,8 +21,6 @@ export default class HttpServices extends BaseHttpServices {
|
|
|
21
21
|
[key: number]: T;
|
|
22
22
|
};
|
|
23
23
|
mapBranchResultWithoutKey<T>(res: iBatchRequestAnswer<T>[]): T[];
|
|
24
|
-
post<T>(name: string[], params?: any, textError?: string, settings?: iHttpParamSettings): Observable<T | undefined>;
|
|
25
|
-
get<T>(name: string[], params?: any, textError?: string, settings?: iHttpParamSettings): Observable<T | undefined>;
|
|
26
24
|
httpPost<T>(url: string, params?: any, textError?: string, settings?: iHttpParamSettings): Observable<T | undefined>;
|
|
27
25
|
httpGet<T>(url: string, params?: any, textError?: string, settings?: iHttpParamSettings): Observable<T | undefined>;
|
|
28
26
|
getNameMethod(arr: string[]): string;
|