bx-rest 1.0.0 → 1.1.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/CHANGELOG.md +32 -0
- package/esm2022/services/http/HttpBX.mjs +28 -2
- package/esm2022/services/http/sessionKey.mjs +5 -5
- package/esm2022/settings.mjs +15 -3
- package/esm2022/typification/rest/batch/batchRequestParam.mjs +1 -1
- package/esm2022/typification/rest/support/param.mjs +1 -1
- package/esm2022/typification/rest/task/access/getaccess.mjs +1 -1
- package/esm2022/typification/rest/task/commentitem/commentitem.mjs +1 -1
- package/esm2022/typification/rest/tasks/task.mjs +1 -1
- package/fesm2022/bx-rest.mjs +45 -7
- package/fesm2022/bx-rest.mjs.map +1 -1
- package/map/tasks/task.d.ts +1 -3
- package/package.json +2 -1
- package/services/http/HttpBX.d.ts +2 -1
- package/settings.d.ts +7 -0
- package/typification/rest/batch/batchRequestParam.d.ts +3 -9
- package/typification/rest/support/param.d.ts +0 -2
- package/typification/rest/task/access/getaccess.d.ts +1 -3
- package/typification/rest/task/commentitem/commentitem.d.ts +1 -3
- package/typification/rest/tasks/task.d.ts +5 -9
package/map/tasks/task.d.ts
CHANGED
|
@@ -6,9 +6,7 @@ import { iBXRestHttpTask, iBXRestTask } from '../../typification/rest/tasks/task
|
|
|
6
6
|
import { iBXRestTaskFieldsName } from '../../typification/rest/tasks/base/fields-name';
|
|
7
7
|
export declare class BXRestMapTasksTask {
|
|
8
8
|
readonly result: typeof BXRestMapTasksTaskResult;
|
|
9
|
-
static getAccess(v: iBXRestTaskGetAccess | undefined):
|
|
10
|
-
[key: number]: import("../../typification/rest/task/access/getaccess").iBXRestTaskGetAccessItem;
|
|
11
|
-
} | undefined;
|
|
9
|
+
static getAccess(v: iBXRestTaskGetAccess | undefined): Record<number, import("../../typification/rest/task/access/getaccess").iBXRestTaskGetAccessItem> | undefined;
|
|
12
10
|
static add(item: {
|
|
13
11
|
task: iBXRestTasksTaskGetHttpDefault;
|
|
14
12
|
} | undefined): iBXRestTask | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bx-rest",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "Bitrix24 REST API client and TypeScript SDK for Angular, Vue and browser apps",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"bitrix",
|
|
@@ -48,6 +48,7 @@
|
|
|
48
48
|
"README.md",
|
|
49
49
|
"README.en.md",
|
|
50
50
|
"LICENSE",
|
|
51
|
+
"CHANGELOG.md",
|
|
51
52
|
"*.d.ts",
|
|
52
53
|
"consts",
|
|
53
54
|
"esm2022",
|
|
@@ -4,7 +4,7 @@ import { iBatchRequestAnswer, iBatchRequestParam, iBatchRequestParamArr, iBatchR
|
|
|
4
4
|
import { iBXRestAnswer } from '../../typification/rest/base/answer';
|
|
5
5
|
export declare class HttpBXServices extends HttpServices {
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
7
|
+
* Не считайте этот метод образцом/финальным API.
|
|
8
8
|
* TODO: Удалить данный метод после реализации его в разделе Navvy
|
|
9
9
|
* @param param
|
|
10
10
|
*/
|
|
@@ -27,6 +27,7 @@ export declare class HttpBXServices extends HttpServices {
|
|
|
27
27
|
*/
|
|
28
28
|
get<T>(name: string[], params?: any): Observable<iBXRestAnswer<T> | undefined>;
|
|
29
29
|
httpPost<T>(url: string, params?: any): Observable<T | undefined>;
|
|
30
|
+
httpGet<T>(url: string, params?: any): Observable<T | undefined>;
|
|
30
31
|
serializeBitrixParams(params: unknown): string;
|
|
31
32
|
getNameMethod(arr: string[]): string;
|
|
32
33
|
}
|
package/settings.d.ts
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import { iBXRestSettings } from './typification/settings';
|
|
2
2
|
export declare const DEFAULT_BX_REST_SETTINGS: iBXRestSettings;
|
|
3
3
|
export declare const BXRestSettings: {
|
|
4
|
+
value: iBXRestSettings;
|
|
5
|
+
/**
|
|
6
|
+
* @deprecated Переименовано в `BXRestSettings.value` — имя `date` не
|
|
7
|
+
* отражало содержимое (настройки auth/urls, а не дату) и сбивало с толку
|
|
8
|
+
* в публичном API. Геттер/сеттер оставлен только для обратной совместимости
|
|
9
|
+
* с кодом, написанным против API до 1.0.
|
|
10
|
+
*/
|
|
4
11
|
date: iBXRestSettings;
|
|
5
12
|
update(newSettings: Partial<iBXRestSettings>): void;
|
|
6
13
|
};
|
|
@@ -4,12 +4,6 @@ export interface iBatchRequestParam<T> {
|
|
|
4
4
|
name: string;
|
|
5
5
|
param: T;
|
|
6
6
|
}
|
|
7
|
-
export type iBatchRequestParamHttp =
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
export type iBatchRequestParamArr<T> = {
|
|
11
|
-
[key: keyBatch]: iBatchRequestParam<T>;
|
|
12
|
-
};
|
|
13
|
-
export type iBatchRequestAnswer<T> = iBXRestAnswer<iBXRestAnswer<{
|
|
14
|
-
[key: keyBatch]: T;
|
|
15
|
-
}>>;
|
|
7
|
+
export type iBatchRequestParamHttp = Record<keyBatch, string>;
|
|
8
|
+
export type iBatchRequestParamArr<T> = Record<keyBatch, iBatchRequestParam<T>>;
|
|
9
|
+
export type iBatchRequestAnswer<T> = iBXRestAnswer<iBXRestAnswer<Record<keyBatch, T>>>;
|
|
@@ -6,9 +6,7 @@ export interface iBXRestParamTaskGetAccess {
|
|
|
6
6
|
users?: number[];
|
|
7
7
|
}
|
|
8
8
|
export interface iBXRestTaskGetAccess {
|
|
9
|
-
allowedActions:
|
|
10
|
-
[key: number]: iBXRestTaskGetAccessItem;
|
|
11
|
-
};
|
|
9
|
+
allowedActions: Record<number, iBXRestTaskGetAccessItem>;
|
|
12
10
|
}
|
|
13
11
|
export interface iBXRestTaskGetAccessItem {
|
|
14
12
|
ACCEPT: boolean;
|
|
@@ -5,9 +5,7 @@ export interface iBXRestTaskComment extends iBXRestTaskCommentBase {
|
|
|
5
5
|
POST_DATE: Date;
|
|
6
6
|
}
|
|
7
7
|
export interface iBXRestTaskCommentHtml extends iBXRestTaskCommentBase {
|
|
8
|
-
ATTACHED_OBJECTS?:
|
|
9
|
-
[key: number]: iCommentTaskFileHtml;
|
|
10
|
-
};
|
|
8
|
+
ATTACHED_OBJECTS?: Record<number, iCommentTaskFileHtml>;
|
|
11
9
|
AUTHOR_ID: string;
|
|
12
10
|
ID: string;
|
|
13
11
|
POST_DATE: string;
|
|
@@ -68,9 +68,7 @@ export interface iBXRestHttpTask extends iBXRestBaseTask {
|
|
|
68
68
|
additionalData: any[];
|
|
69
69
|
creator: iBXRestHttpTaskPeople;
|
|
70
70
|
responsible: iBXRestHttpTaskPeople;
|
|
71
|
-
accomplicesData:
|
|
72
|
-
[key: number]: iBXRestHttpTaskPeople;
|
|
73
|
-
};
|
|
71
|
+
accomplicesData: Record<number, iBXRestHttpTaskPeople>;
|
|
74
72
|
allowTimeTracking: iBXRestYesNo;
|
|
75
73
|
tags: iBXRestTaskHttpTag;
|
|
76
74
|
}
|
|
@@ -78,12 +76,10 @@ export interface iBXRestTaskTag {
|
|
|
78
76
|
id: number;
|
|
79
77
|
title: string;
|
|
80
78
|
}
|
|
81
|
-
export
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
};
|
|
86
|
-
}
|
|
79
|
+
export type iBXRestTaskHttpTag = Record<string, {
|
|
80
|
+
id: string;
|
|
81
|
+
title: string;
|
|
82
|
+
}>;
|
|
87
83
|
export interface iBXRestHttpTaskGroupHttp {
|
|
88
84
|
id: string;
|
|
89
85
|
name: string;
|