bx-rest 0.9.10 → 0.10.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/consts/part-name-methods.d.ts +1 -0
- package/esm2022/consts/part-name-methods.mjs +2 -1
- package/esm2022/functions/serializeBitrixParams.mjs +25 -0
- package/esm2022/map/crm/automatedsolution.mjs +11 -0
- package/esm2022/map/crm/index.mjs +2 -1
- package/esm2022/request-navvy/crm/automatedsolution.mjs +73 -0
- package/esm2022/request-navvy/crm.mjs +4 -1
- package/esm2022/services/http/HttpBX.mjs +5 -45
- package/esm2022/services/navvy/navvy-alternative-pagination-navigation.mjs +3 -3
- package/esm2022/services/navvy/navvy-pag-nav-result-key.mjs +77 -0
- package/esm2022/services/navvy/navvy-pag-nav-tasks.mjs +3 -3
- package/esm2022/services/navvy/navvy-pag-nav-with-useless-key.mjs +3 -3
- package/esm2022/services/navvy/navvy-pag.mjs +3 -3
- package/esm2022/services/navvy.mjs +6 -1
- package/esm2022/typification/rest/crm/automatedsolution/add.mjs +2 -0
- package/esm2022/typification/rest/crm/automatedsolution/automatedsolution.mjs +2 -0
- package/esm2022/typification/rest/crm/automatedsolution/delete.mjs +2 -0
- package/esm2022/typification/rest/crm/automatedsolution/get.mjs +2 -0
- package/esm2022/typification/rest/crm/automatedsolution/index.mjs +7 -0
- package/esm2022/typification/rest/crm/automatedsolution/list.mjs +2 -0
- package/esm2022/typification/rest/crm/automatedsolution/update.mjs +2 -0
- package/esm2022/typification/rest/crm/index.mjs +2 -1
- package/fesm2022/bx-rest.mjs +190 -48
- package/fesm2022/bx-rest.mjs.map +1 -1
- package/functions/serializeBitrixParams.d.ts +5 -0
- package/map/crm/automatedsolution.d.ts +7 -0
- package/map/crm/index.d.ts +1 -0
- package/package.json +2 -2
- package/request-navvy/crm/automatedsolution.d.ts +56 -0
- package/request-navvy/crm.d.ts +3 -0
- package/services/http/HttpBX.d.ts +1 -1
- package/services/navvy/navvy-pag-nav-result-key.d.ts +13 -0
- package/services/navvy.d.ts +3 -0
- package/typification/rest/crm/automatedsolution/add.d.ts +8 -0
- package/typification/rest/crm/automatedsolution/automatedsolution.d.ts +23 -0
- package/typification/rest/crm/automatedsolution/delete.d.ts +4 -0
- package/typification/rest/crm/automatedsolution/get.d.ts +4 -0
- package/typification/rest/crm/automatedsolution/index.d.ts +6 -0
- package/typification/rest/crm/automatedsolution/list.d.ts +7 -0
- package/typification/rest/crm/automatedsolution/update.d.ts +10 -0
- package/typification/rest/crm/index.d.ts +1 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { iBXRestCrmAutomatedSolution, iBXRestCrmAutomatedSolutionListResult, iBXRestCrmAutomatedSolutionResult } from '../../typification/rest/crm';
|
|
2
|
+
export declare class BXRestMapCrmAutomatedSolution {
|
|
3
|
+
/** Возвращает цифровое рабочее место из контейнера REST-ответа. */
|
|
4
|
+
static get(v: iBXRestCrmAutomatedSolutionResult | undefined): iBXRestCrmAutomatedSolution | undefined;
|
|
5
|
+
/** Возвращает список цифровых рабочих мест из контейнера REST-ответа. */
|
|
6
|
+
static list(v: iBXRestCrmAutomatedSolutionListResult | undefined): iBXRestCrmAutomatedSolution[] | undefined;
|
|
7
|
+
}
|
package/map/crm/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bx-rest",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0",
|
|
4
4
|
"description": "Bitrix24 REST API client and TypeScript SDK for Angular, Vue and browser apps",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"bitrix",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"just-flatten-it": "^5.2.0",
|
|
36
36
|
"just-values": "^2.2.0",
|
|
37
37
|
"luxon": "^3.4.4",
|
|
38
|
-
"qs": "^
|
|
38
|
+
"qs-esm": "^8.0.1",
|
|
39
39
|
"rxjs": "^7.8.1",
|
|
40
40
|
"snake-camel-types": "^1.0.1",
|
|
41
41
|
"ts-case-convert": "^2.1.0",
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { iBXRestCrmAutomatedSolution, iBXRestCrmAutomatedSolutionFields, iBXRestCrmAutomatedSolutionResult, iBXRestParamCrmAutomatedSolutionAdd, iBXRestParamCrmAutomatedSolutionDelete, iBXRestParamCrmAutomatedSolutionGet, iBXRestParamCrmAutomatedSolutionList, iBXRestParamCrmAutomatedSolutionUpdate } from '../../typification/rest/crm';
|
|
2
|
+
export declare class BXRestNavvyCrmAutomatedSolution {
|
|
3
|
+
url: {
|
|
4
|
+
/** Создает новое цифровое рабочее место. */
|
|
5
|
+
add: string[];
|
|
6
|
+
/** Возвращает цифровое рабочее место по идентификатору. */
|
|
7
|
+
get: string[];
|
|
8
|
+
/** Возвращает список цифровых рабочих мест. */
|
|
9
|
+
list: string[];
|
|
10
|
+
/** Обновляет существующее цифровое рабочее место. */
|
|
11
|
+
update: string[];
|
|
12
|
+
/** Удаляет цифровое рабочее место. */
|
|
13
|
+
delete: string[];
|
|
14
|
+
/** Возвращает описание полей цифрового рабочего места. */
|
|
15
|
+
fields: string[];
|
|
16
|
+
};
|
|
17
|
+
private Navvy;
|
|
18
|
+
/**
|
|
19
|
+
* Создает новое цифровое рабочее место.
|
|
20
|
+
*
|
|
21
|
+
* @see https://apidocs.bitrix24.ru/api-reference/crm/automated-solution/crm-automated-solution-add.html
|
|
22
|
+
*/
|
|
23
|
+
add(param: iBXRestParamCrmAutomatedSolutionAdd): import("../../services/navvy").NavvySimple<iBXRestCrmAutomatedSolutionResult, iBXRestCrmAutomatedSolution, iBXRestParamCrmAutomatedSolutionAdd | undefined>;
|
|
24
|
+
/**
|
|
25
|
+
* Возвращает цифровое рабочее место по идентификатору.
|
|
26
|
+
*
|
|
27
|
+
* @see https://apidocs.bitrix24.ru/api-reference/crm/automated-solution/crm-automated-solution-get.html
|
|
28
|
+
*/
|
|
29
|
+
get(param: iBXRestParamCrmAutomatedSolutionGet): import("../../services/navvy").NavvySimple<iBXRestCrmAutomatedSolutionResult, iBXRestCrmAutomatedSolution, iBXRestParamCrmAutomatedSolutionGet | undefined>;
|
|
30
|
+
/**
|
|
31
|
+
* Возвращает список цифровых рабочих мест.
|
|
32
|
+
*
|
|
33
|
+
* @see https://apidocs.bitrix24.ru/api-reference/crm/automated-solution/crm-automated-solution-list.html
|
|
34
|
+
*/
|
|
35
|
+
list(param?: iBXRestParamCrmAutomatedSolutionList): import("../../services/navvy").NavvyPagNavResultKey<iBXRestCrmAutomatedSolution, iBXRestCrmAutomatedSolution, iBXRestParamCrmAutomatedSolutionList, "automatedSolutions">;
|
|
36
|
+
/**
|
|
37
|
+
* Обновляет существующее цифровое рабочее место.
|
|
38
|
+
* При передаче `typeIds` список привязанных смарт-процессов перезаписывается целиком.
|
|
39
|
+
*
|
|
40
|
+
* @see https://apidocs.bitrix24.ru/api-reference/crm/automated-solution/crm-automated-solution-update.html
|
|
41
|
+
*/
|
|
42
|
+
update(param: iBXRestParamCrmAutomatedSolutionUpdate): import("../../services/navvy").NavvySimple<iBXRestCrmAutomatedSolutionResult, iBXRestCrmAutomatedSolution, iBXRestParamCrmAutomatedSolutionUpdate | undefined>;
|
|
43
|
+
/**
|
|
44
|
+
* Удаляет цифровое рабочее место.
|
|
45
|
+
* Удаление возможно только если к рабочему месту не привязаны смарт-процессы.
|
|
46
|
+
*
|
|
47
|
+
* @see https://apidocs.bitrix24.ru/api-reference/crm/automated-solution/crm-automated-solution-delete.html
|
|
48
|
+
*/
|
|
49
|
+
delete(param: iBXRestParamCrmAutomatedSolutionDelete): import("../../services/navvy").NavvySimple<null, null, iBXRestParamCrmAutomatedSolutionDelete | undefined>;
|
|
50
|
+
/**
|
|
51
|
+
* Возвращает описание полей цифрового рабочего места.
|
|
52
|
+
*
|
|
53
|
+
* @see https://apidocs.bitrix24.ru/api-reference/crm/automated-solution/crm-automated-solution-fields.html
|
|
54
|
+
*/
|
|
55
|
+
fields(): import("../../services/navvy").NavvySimple<iBXRestCrmAutomatedSolutionFields, iBXRestCrmAutomatedSolutionFields, undefined>;
|
|
56
|
+
}
|
package/request-navvy/crm.d.ts
CHANGED
|
@@ -6,7 +6,10 @@ import { BXRestNavvyCrmQuote } from './crm/quote/index';
|
|
|
6
6
|
import { BXRestNavvyCrmEnum } from './crm/enum/index';
|
|
7
7
|
import { BXRestNavvyCrmMultifield } from './crm/multifield';
|
|
8
8
|
import { BXRestNavvyCrmAutomation } from './crm/automation/index';
|
|
9
|
+
import { BXRestNavvyCrmAutomatedSolution } from './crm/automatedsolution';
|
|
9
10
|
export declare class BXRestNavvyCrm {
|
|
11
|
+
/** Цифровые рабочие места (`crm.automatedsolution.*`). */
|
|
12
|
+
readonly automatedSolution: BXRestNavvyCrmAutomatedSolution;
|
|
10
13
|
/** Автоматизация CRM (`crm.automation.*`). */
|
|
11
14
|
readonly automation: BXRestNavvyCrmAutomation;
|
|
12
15
|
/** Перечисления CRM (`crm.enum.*`). */
|
|
@@ -27,7 +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
|
-
serializeBitrixParams(
|
|
30
|
+
serializeBitrixParams(params: unknown): string;
|
|
31
31
|
httpGet<T>(url: string, params?: any): Observable<T | undefined>;
|
|
32
32
|
getNameMethod(arr: string[]): string;
|
|
33
33
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { iBXRestPagination } from '../../typification/rest/base/api-pagination-bx';
|
|
2
|
+
import { ReturnTypeNavvy } from './navvy-support';
|
|
3
|
+
import { NavvyPagBase } from './extends/navvy-pag-base';
|
|
4
|
+
type KeyedResult<K extends string, T> = Record<K, T[] | undefined>;
|
|
5
|
+
export declare class NavvyPagNavResultKey<T, R, P extends iBXRestPagination, K extends string> extends NavvyPagBase<KeyedResult<K, T>, R[], P> {
|
|
6
|
+
private readonly key;
|
|
7
|
+
save: ReturnTypeNavvy<T, R>[];
|
|
8
|
+
constructor(url: string[], param: P, key: K, map?: (param: KeyedResult<K, T> | undefined) => R[] | undefined);
|
|
9
|
+
resAll(): import("rxjs").Observable<ReturnTypeNavvy<T, R>[]>;
|
|
10
|
+
private resultAllEnd;
|
|
11
|
+
private mapResForGetAll;
|
|
12
|
+
}
|
|
13
|
+
export {};
|
package/services/navvy.d.ts
CHANGED
|
@@ -4,10 +4,12 @@ import { iBXRestAlternativePagination, iBXRestPagination } from '../typification
|
|
|
4
4
|
import { NavvyPagNavWithUselessKey } from './navvy/navvy-pag-nav-with-useless-key';
|
|
5
5
|
import { NavvyPagNavTasks } from './navvy/navvy-pag-nav-tasks';
|
|
6
6
|
import { NavvyPag } from './navvy/navvy-pag';
|
|
7
|
+
import { NavvyPagNavResultKey } from './navvy/navvy-pag-nav-result-key';
|
|
7
8
|
export * from './navvy/navvy-simple';
|
|
8
9
|
export * from './navvy/navvy-alternative-pagination-navigation';
|
|
9
10
|
export * from './navvy/navvy-pag-nav-with-useless-key';
|
|
10
11
|
export * from './navvy/navvy-pag-nav-tasks';
|
|
12
|
+
export * from './navvy/navvy-pag-nav-result-key';
|
|
11
13
|
export * from './navvy/navvy-pag';
|
|
12
14
|
export * from './navvy/navvy-support';
|
|
13
15
|
export declare class Navvy {
|
|
@@ -24,6 +26,7 @@ export declare class Navvy {
|
|
|
24
26
|
pagNavTasks<T, R, A extends iBXRestPagination>(url: string[], arg: A, map?: (param: {
|
|
25
27
|
tasks: T[] | undefined;
|
|
26
28
|
} | undefined) => R[] | undefined): NavvyPagNavTasks<T, R, A>;
|
|
29
|
+
pagNavResultKey<T, R, A extends iBXRestPagination, K extends string>(url: string[], arg: A, key: K, map?: (param: Record<K, T[] | undefined> | undefined) => R[] | undefined): NavvyPagNavResultKey<T, R, A, K>;
|
|
27
30
|
pagNavWithUselessKey<T, R, A extends iBXRestPagination>(url: string[], arg: A, map?: (param: Record<string, T> | undefined) => R[] | undefined): NavvyPagNavWithUselessKey<T, R, A>;
|
|
28
31
|
alterPagNav<T, R, A extends iBXRestAlternativePagination>(url: string[], arg: A, map?: (param: T[] | undefined) => R[] | undefined): NavvyAlterPagNav<T, R, A>;
|
|
29
32
|
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { iBXRestCrmFieldDescription } from '../enum';
|
|
2
|
+
/** Цифровое рабочее место CRM. */
|
|
3
|
+
export interface iBXRestCrmAutomatedSolution {
|
|
4
|
+
/** Уникальный идентификатор цифрового рабочего места. */
|
|
5
|
+
id: number;
|
|
6
|
+
/** Название цифрового рабочего места. */
|
|
7
|
+
title: string;
|
|
8
|
+
/** Идентификаторы смарт-процессов, привязанных к рабочему месту. */
|
|
9
|
+
typeIds: number[];
|
|
10
|
+
}
|
|
11
|
+
/** Контейнер ответа методов `crm.automatedsolution.add`, `get` и `update`. */
|
|
12
|
+
export interface iBXRestCrmAutomatedSolutionResult {
|
|
13
|
+
automatedSolution: iBXRestCrmAutomatedSolution;
|
|
14
|
+
}
|
|
15
|
+
/** Контейнер ответа метода `crm.automatedsolution.list`. */
|
|
16
|
+
export interface iBXRestCrmAutomatedSolutionListResult {
|
|
17
|
+
automatedSolutions?: iBXRestCrmAutomatedSolution[];
|
|
18
|
+
}
|
|
19
|
+
/** Описание полей цифрового рабочего места. */
|
|
20
|
+
export type iBXRestCrmAutomatedSolutionFields = Record<string, iBXRestCrmFieldDescription & {
|
|
21
|
+
/** Верхний регистр имени поля в REST API. */
|
|
22
|
+
upperName: string;
|
|
23
|
+
}>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { iBXRestPagination } from '../../base/api-pagination-bx';
|
|
2
|
+
export interface iBXRestParamCrmAutomatedSolutionList extends iBXRestPagination {
|
|
3
|
+
/** Сортировка по полям `id` и `title`. */
|
|
4
|
+
order?: Record<string, 'ASC' | 'DESC' | 'asc' | 'desc'>;
|
|
5
|
+
/** Фильтр по полям `id` и `title`, включая REST-префиксы операторов. */
|
|
6
|
+
filter?: Record<string, any>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface iBXRestParamCrmAutomatedSolutionUpdate {
|
|
2
|
+
/** Идентификатор цифрового рабочего места. */
|
|
3
|
+
id: number | string;
|
|
4
|
+
fields: {
|
|
5
|
+
/** Название цифрового рабочего места. */
|
|
6
|
+
title?: string;
|
|
7
|
+
/** Полный список идентификаторов смарт-процессов, которые должны быть привязаны к рабочему месту. */
|
|
8
|
+
typeIds?: number[];
|
|
9
|
+
};
|
|
10
|
+
}
|