bx-rest 0.6.0 → 0.6.1

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.
Files changed (43) hide show
  1. package/README.md +2 -2
  2. package/esm2022/map/calendar/event.mjs +5 -5
  3. package/esm2022/map/calendar/section.mjs +17 -0
  4. package/esm2022/request-navvy/calendar/event.mjs +21 -18
  5. package/esm2022/request-navvy/calendar/section.mjs +51 -0
  6. package/esm2022/request-navvy/calendar.mjs +3 -7
  7. package/esm2022/request-navvy/department.mjs +2 -2
  8. package/esm2022/request-navvy/lists/element.mjs +2 -2
  9. package/esm2022/request-navvy/lists/field.mjs +2 -2
  10. package/esm2022/request-navvy/lists.mjs +2 -2
  11. package/esm2022/request-navvy/log/blogpost.mjs +2 -2
  12. package/esm2022/request-navvy/task/delegate/elapseditem.mjs +3 -3
  13. package/esm2022/request-navvy/task/item/userfield.mjs +2 -2
  14. package/esm2022/request-navvy/tasks/task/result.mjs +2 -2
  15. package/esm2022/request-navvy/tasks/task.mjs +2 -2
  16. package/esm2022/request-navvy/user.mjs +3 -3
  17. package/esm2022/services/navvy/navvy-alternative-pagination-navigation.mjs +25 -24
  18. package/esm2022/services/navvy/navvy-pag-nav-tasks.mjs +19 -15
  19. package/esm2022/services/navvy/navvy-pag-nav-with-useless-key.mjs +5 -4
  20. package/esm2022/services/navvy/navvy-pag.mjs +16 -15
  21. package/esm2022/services/navvy/navvy-support.mjs +1 -1
  22. package/esm2022/services/navvy.mjs +4 -4
  23. package/esm2022/typification/rest/batch.mjs +1 -1
  24. package/esm2022/typification/rest/calendar/get/answer.mjs +1 -1
  25. package/esm2022/typification/rest/calendar/section/add.mjs +2 -0
  26. package/esm2022/typification/rest/calendar/section/delete.mjs +2 -0
  27. package/esm2022/typification/rest/calendar/section/get.mjs +2 -0
  28. package/esm2022/typification/rest/calendar/section/update.mjs +2 -0
  29. package/fesm2022/bx-rest.mjs +160 -91
  30. package/fesm2022/bx-rest.mjs.map +1 -1
  31. package/map/calendar/section.d.ts +5 -0
  32. package/package.json +2 -2
  33. package/request-navvy/calendar/event.d.ts +3 -0
  34. package/request-navvy/calendar/section.d.ts +24 -0
  35. package/request-navvy/calendar.d.ts +2 -0
  36. package/services/navvy/navvy-support.d.ts +2 -2
  37. package/services/navvy.d.ts +3 -3
  38. package/typification/rest/batch.d.ts +1 -1
  39. package/typification/rest/calendar/get/answer.d.ts +1 -1
  40. package/typification/rest/calendar/section/add.d.ts +10 -0
  41. package/typification/rest/calendar/section/delete.d.ts +6 -0
  42. package/typification/rest/calendar/section/get.d.ts +50 -0
  43. package/typification/rest/calendar/section/update.d.ts +10 -0
@@ -0,0 +1,5 @@
1
+ import { iBXRestCalendarSectionGet, iBXRestCalendarSectionGetHttp } from '../../typification/rest/calendar/section/get';
2
+ export declare class BXRestMapCalendarSection {
3
+ static get(item: iBXRestCalendarSectionGetHttp[] | undefined): iBXRestCalendarSectionGet[] | undefined;
4
+ static CalendarSectionGetHttpToCalendarSectionGetHttp(item: iBXRestCalendarSectionGetHttp): iBXRestCalendarSectionGet;
5
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bx-rest",
3
- "version": "0.6.0",
4
- "description": "bitrix rest api",
3
+ "version": "0.6.1",
4
+ "description": "bitrix rest api on angular, vue or typescript",
5
5
  "keywords": [
6
6
  "bitrix",
7
7
  "bitrix24",
@@ -2,5 +2,8 @@ import { iBXRestCalendarEventGetParam } from '../../typification/rest/calendar/g
2
2
  export declare class BXRestNavvyRestCalendarEvent {
3
3
  private url;
4
4
  private readonly Navvy;
5
+ /**
6
+ * Возвращает список событий календаря, всегда весь список, паганации в методе нет да и не нужна
7
+ */
5
8
  get(param: iBXRestCalendarEventGetParam): import("../../services/navvy/navvy-simple").NavvySimple<import("../../typification/rest/calendar/get/answer").iBXRestCalendarEventGetAnswerHttp[], import("../../typification/rest/calendar/get/answer").iBXRestCalendarEventGetAnswer[], iBXRestCalendarEventGetParam | undefined>;
6
9
  }
@@ -0,0 +1,24 @@
1
+ import { iBXRestCalendarSectionGetParam } from '../../typification/rest/calendar/section/get';
2
+ import { iBXRestCalendarSectionAddParam } from '../../typification/rest/calendar/section/add';
3
+ import { iBXRestCalendarSectionDeleteParam } from '../../typification/rest/calendar/section/delete';
4
+ import { iBXRestCalendarSectionUpdateParam } from '../../typification/rest/calendar/section/update';
5
+ export declare class BXRestNavvyRestCalendarSection {
6
+ private url;
7
+ private readonly Navvy;
8
+ /**
9
+ * Возвращает описание разделов, всегда весь список, паганации в методе нет да и не нужна
10
+ */
11
+ get(param: iBXRestCalendarSectionGetParam): import("../../services/navvy/navvy-simple").NavvySimple<import("../../typification/rest/calendar/section/get").iBXRestCalendarSectionGetHttp[], import("../../typification/rest/calendar/section/get").iBXRestCalendarSectionGet[], iBXRestCalendarSectionGetParam | undefined>;
12
+ /**
13
+ * Добавляет новый раздел
14
+ */
15
+ add(param: iBXRestCalendarSectionAddParam): import("../../services/navvy/navvy-simple").NavvySimple<number, number, iBXRestCalendarSectionAddParam | undefined>;
16
+ /**
17
+ * Удаляет раздел
18
+ */
19
+ delete(param: iBXRestCalendarSectionDeleteParam): import("../../services/navvy/navvy-simple").NavvySimple<string | boolean, string | boolean, iBXRestCalendarSectionDeleteParam | undefined>;
20
+ /**
21
+ * Редактирует существующее разделы
22
+ */
23
+ update(param: iBXRestCalendarSectionUpdateParam): import("../../services/navvy/navvy-simple").NavvySimple<number, number, iBXRestCalendarSectionUpdateParam | undefined>;
24
+ }
@@ -1,4 +1,6 @@
1
1
  import { BXRestNavvyRestCalendarEvent } from './calendar/event';
2
+ import { BXRestNavvyRestCalendarSection } from './calendar/section';
2
3
  export declare class BXRestNavvyCalendar {
3
4
  readonly event: BXRestNavvyRestCalendarEvent;
5
+ readonly section: BXRestNavvyRestCalendarSection;
4
6
  }
@@ -6,6 +6,6 @@ export declare abstract class NavvySupport<C, T, R> {
6
6
  pageSize: number;
7
7
  protected constructor(requestClass: C);
8
8
  mapAndError<T>(request: Observable<iBXRestAnswer<T> | undefined>): Observable<T | undefined>;
9
- abstract resultVanilla(): Observable<iBXRestAnswer<T> | undefined>;
10
- abstract result(): ReturnTypeNavvy<Observable<T | undefined>, Observable<R | undefined>>;
9
+ abstract resVanilla(): Observable<iBXRestAnswer<T> | undefined>;
10
+ abstract res(): ReturnTypeNavvy<Observable<T | undefined>, Observable<R | undefined>>;
11
11
  }
@@ -14,10 +14,10 @@ export declare class Navvy {
14
14
  * @param map
15
15
  * @constructor
16
16
  */
17
- PagNav<T, R, A extends iBXRestPagination>(url: string[], arg: A, map?: (param: T[] | undefined) => R[] | undefined): NavvyPag<T, R, A>;
18
- PagNavTasks<T, R, A extends iBXRestPagination>(url: string[], arg: A, map?: (param: {
17
+ pagNav<T, R, A extends iBXRestPagination>(url: string[], arg: A, map?: (param: T[] | undefined) => R[] | undefined): NavvyPag<T, R, A>;
18
+ pagNavTasks<T, R, A extends iBXRestPagination>(url: string[], arg: A, map?: (param: {
19
19
  tasks: T[] | undefined;
20
20
  } | undefined) => R[] | undefined): NavvyPagNavTasks<T, R, A>;
21
- PagNavWithUselessKey<T, R, A extends iBXRestPagination>(url: string[], arg: A, map?: (param: Record<string, T> | undefined) => R[] | undefined): NavvyPagNavWithUselessKey<T, R, A>;
21
+ pagNavWithUselessKey<T, R, A extends iBXRestPagination>(url: string[], arg: A, map?: (param: Record<string, T> | undefined) => R[] | undefined): NavvyPagNavWithUselessKey<T, R, A>;
22
22
  alterPagNav<T, R, A extends iBXRestAlternativePagination>(url: string[], arg: A, map?: (param: T[] | undefined) => R[] | undefined): NavvyAlterPagNav<T, R, A>;
23
23
  }
@@ -10,7 +10,7 @@ export interface iBXRestParamBatch {
10
10
  */
11
11
  cmd: Record<number | string, string> | string[];
12
12
  }
13
- export type iBXRestNavvyParamBatchCMD = Record<string, ReturnType<Navvy['simple'] | Navvy['PagNav'] | Navvy['PagNavTasks']>>;
13
+ export type iBXRestNavvyParamBatchCMD = Record<string, ReturnType<Navvy['simple'] | Navvy['pagNav'] | Navvy['pagNavTasks']>>;
14
14
  export interface iBXRestBatch<T> {
15
15
  result: {
16
16
  [K in keyof T]: T[K];
@@ -55,7 +55,7 @@ export interface iBXRestCalendarEventGetAnswerHttp extends iBXRestCalendarEventG
55
55
  OWNER_ID: string;
56
56
  PARENT_ID: string;
57
57
  RECURRENCE_ID: string;
58
- RRULE: "" | iBXRestCalendarEventGetAnswerRuleHttp;
58
+ RRULE: string | iBXRestCalendarEventGetAnswerRuleHttp;
59
59
  SECTION_ID: string;
60
60
  SECT_ID: string;
61
61
  TIMESTAMP_X: string;
@@ -0,0 +1,10 @@
1
+ import { iBXRestCalendarType } from '../base/type';
2
+ export interface iBXRestCalendarSectionAddParam {
3
+ type: iBXRestCalendarType;
4
+ ownerId?: number;
5
+ name: string;
6
+ description: string;
7
+ color?: string;
8
+ text_color?: string;
9
+ access: string[];
10
+ }
@@ -0,0 +1,6 @@
1
+ import { iBXRestCalendarType } from '../base/type';
2
+ export interface iBXRestCalendarSectionDeleteParam {
3
+ type: iBXRestCalendarType;
4
+ ownerId: number;
5
+ id: number;
6
+ }
@@ -0,0 +1,50 @@
1
+ import { iBXRestCalendarType } from '../base/type';
2
+ export interface iBXRestCalendarSectionGetParam {
3
+ type: iBXRestCalendarType;
4
+ ownerId?: number;
5
+ }
6
+ interface CalendarExport {
7
+ ALLOW: boolean;
8
+ LINK: string;
9
+ }
10
+ type CalendarAccess = Record<string, number>;
11
+ interface CalendarPermissions {
12
+ view_time: boolean;
13
+ view_title: boolean;
14
+ view_full: boolean;
15
+ add: boolean;
16
+ edit: boolean;
17
+ edit_section: boolean;
18
+ access: boolean;
19
+ }
20
+ export interface iBXRestCalendarSectionGet extends iBXRestCalendarSectionGetBase {
21
+ ID: number;
22
+ OWNER_ID: number;
23
+ CREATED_BY: number;
24
+ DATE_CREATE: Date;
25
+ TIMESTAMP_X: Date;
26
+ }
27
+ export interface iBXRestCalendarSectionGetHttp extends iBXRestCalendarSectionGetBase {
28
+ ID: string;
29
+ OWNER_ID: string;
30
+ CREATED_BY: string;
31
+ DATE_CREATE: string;
32
+ TIMESTAMP_X: string;
33
+ }
34
+ interface iBXRestCalendarSectionGetBase {
35
+ NAME: string;
36
+ GAPI_CALENDAR_ID: string | null;
37
+ DESCRIPTION: string;
38
+ COLOR: string;
39
+ TEXT_COLOR: null;
40
+ EXPORT: CalendarExport;
41
+ CAL_TYPE: iBXRestCalendarType;
42
+ CAL_DAV_CON: null;
43
+ SYNC_TOKEN: null;
44
+ PAGE_TOKEN: null;
45
+ EXTERNAL_TYPE: string;
46
+ ACCESS: CalendarAccess;
47
+ IS_COLLAB: boolean;
48
+ PERM: CalendarPermissions;
49
+ }
50
+ export {};
@@ -0,0 +1,10 @@
1
+ import { iBXRestCalendarType } from '../base/type';
2
+ export interface iBXRestCalendarSectionUpdateParam {
3
+ type: iBXRestCalendarType;
4
+ ownerId?: number;
5
+ name: string;
6
+ description: string;
7
+ color?: string;
8
+ text_color?: string;
9
+ access: string[];
10
+ }