bx-rest 0.1.5 → 0.1.7

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 (71) hide show
  1. package/consts/part-name-metods.d.ts +2 -0
  2. package/esm2020/consts/part-name-metods.mjs +3 -1
  3. package/esm2020/map/base.mjs +2 -2
  4. package/esm2020/map/calendar/event.mjs +54 -0
  5. package/esm2020/map/disk/base.mjs +2 -2
  6. package/esm2020/map/lists/element.mjs +2 -2
  7. package/esm2020/map/lists.mjs +2 -2
  8. package/esm2020/map/task.mjs +2 -2
  9. package/esm2020/map/user.mjs +2 -2
  10. package/esm2020/request/bizproc/workflow/template.mjs +4 -4
  11. package/esm2020/request/bizproc/workflow.mjs +4 -4
  12. package/esm2020/request/calendar/event.mjs +28 -0
  13. package/esm2020/request/calendar.mjs +52 -0
  14. package/esm2020/request/disk/file.mjs +4 -4
  15. package/esm2020/request/disk/folder.mjs +4 -4
  16. package/esm2020/request/disk/storage.mjs +4 -4
  17. package/esm2020/request/lists/element.mjs +4 -4
  18. package/esm2020/request/log/blogcomment.mjs +19 -0
  19. package/esm2020/request/log/blogpost.mjs +31 -0
  20. package/esm2020/request/log.mjs +19 -0
  21. package/esm2020/request/tasks/task.mjs +4 -4
  22. package/esm2020/request/user.mjs +5 -5
  23. package/esm2020/request-navvy/calendar/event.mjs +25 -0
  24. package/esm2020/request-navvy/calendar.mjs +52 -0
  25. package/esm2020/request-navvy/log/blogcomment.mjs +19 -0
  26. package/esm2020/request-navvy/log/blogpost.mjs +33 -0
  27. package/esm2020/request-navvy/log.mjs +19 -0
  28. package/esm2020/rest.mjs +23 -15
  29. package/esm2020/services/http/HttpBX.mjs +2 -2
  30. package/esm2020/services/http/sessionKey.mjs +1 -3
  31. package/esm2020/services/navvy.mjs +1 -1
  32. package/esm2020/typification/rest/calendar/base/type.mjs +2 -0
  33. package/esm2020/typification/rest/calendar/get/answer.mjs +2 -0
  34. package/esm2020/typification/rest/calendar/get/param.mjs +2 -0
  35. package/esm2020/typification/rest/log/blogpost/add.mjs +2 -0
  36. package/fesm2015/bx-rest.mjs +375 -92
  37. package/fesm2015/bx-rest.mjs.map +1 -1
  38. package/fesm2020/bx-rest.mjs +405 -92
  39. package/fesm2020/bx-rest.mjs.map +1 -1
  40. package/map/base.d.ts +1 -1
  41. package/map/calendar/event.d.ts +9 -0
  42. package/map/disk/base.d.ts +1 -1
  43. package/map/lists/element.d.ts +1 -1
  44. package/map/lists.d.ts +1 -1
  45. package/map/task.d.ts +1 -1
  46. package/map/user.d.ts +1 -1
  47. package/package.json +1 -1
  48. package/request/bizproc/workflow/template.d.ts +1 -1
  49. package/request/bizproc/workflow.d.ts +1 -1
  50. package/request/calendar/event.d.ts +18 -0
  51. package/request/calendar.d.ts +8 -0
  52. package/request/disk/file.d.ts +1 -1
  53. package/request/disk/folder.d.ts +1 -1
  54. package/request/disk/storage.d.ts +1 -1
  55. package/request/lists/element.d.ts +1 -1
  56. package/request/log/blogcomment.d.ts +8 -0
  57. package/request/log/blogpost.d.ts +17 -0
  58. package/request/log.d.ts +10 -0
  59. package/request/tasks/task.d.ts +1 -1
  60. package/request/user.d.ts +1 -1
  61. package/request-navvy/calendar/event.d.ts +14 -0
  62. package/request-navvy/calendar.d.ts +8 -0
  63. package/request-navvy/log/blogcomment.d.ts +8 -0
  64. package/request-navvy/log/blogpost.d.ts +19 -0
  65. package/request-navvy/log.d.ts +10 -0
  66. package/rest.d.ts +10 -2
  67. package/services/http/HttpBX.d.ts +1 -1
  68. package/typification/rest/calendar/base/type.d.ts +1 -0
  69. package/typification/rest/calendar/get/answer.d.ts +126 -0
  70. package/typification/rest/calendar/get/param.d.ts +8 -0
  71. package/typification/rest/log/blogpost/add.d.ts +12 -0
@@ -30,6 +30,92 @@ function BXRestMapResult(v) {
30
30
  return undefined;
31
31
  }
32
32
 
33
+ const $get = 'get';
34
+ const $add = 'add';
35
+ const $set = 'set';
36
+ const $event = 'event';
37
+ const $update = 'update';
38
+ const $user = 'user';
39
+ const $task = 'task';
40
+ const $calendar = 'calendar';
41
+ const $meeting = 'meeting';
42
+ const $list = 'list';
43
+ const $search = 'search';
44
+ const $accessibility = 'accessibility';
45
+ const $delete = 'delete';
46
+ const $nearest = 'nearest';
47
+ const $params = 'params';
48
+ const $status = 'status';
49
+ const $resource = 'resource';
50
+ const $booking = 'booking';
51
+ const $section = 'section';
52
+ const $settings = 'settings';
53
+ const $tasks = 'tasks';
54
+ const $elapseditem = 'elapseditem';
55
+ const $getlist = 'getlist';
56
+ const $approve = 'approve';
57
+ const $complete = 'complete';
58
+ const $counters = 'counters';
59
+ const $deger = 'deger';
60
+ const $delegate = 'delegate';
61
+ const $disapprove = 'disapprove';
62
+ const $favorite = 'favorite';
63
+ const $files = 'files';
64
+ const $file = 'file';
65
+ const $attach = 'attach';
66
+ const $field = 'field';
67
+ const $getFields = 'get' + $field + 's';
68
+ const $getaccess = 'getaccess';
69
+ const $history = 'history';
70
+ const $pause = 'pause';
71
+ const $renew = 'renew';
72
+ const $start = 'start';
73
+ const $result = 'result';
74
+ const $planner = 'planner';
75
+ const $disk = 'disk';
76
+ const $rename = 'rename';
77
+ const $markdeleted = 'markdeleted';
78
+ const $restore = 'restore';
79
+ const $folder = 'folder';
80
+ const $getchildren = 'getchildren';
81
+ const $copyto = 'copyto';
82
+ const $moveto = 'moveto';
83
+ const $uploadfile = 'uploadfile';
84
+ const $storage = 'storage';
85
+ const $getTypes = 'getTypes';
86
+ const $stages = 'stages';
87
+ const $getmanifest = 'getmanifest';
88
+ const $isactionallowed = 'isactionallowed';
89
+ const $commentitem = 'commentitem';
90
+ const $department = 'department';
91
+ const $sonet_group = 'sonet_group';
92
+ const $create = 'create';
93
+ const $feature = 'feature';
94
+ const $access = 'access';
95
+ const $request = 'request';
96
+ const $socialnetwork = 'socialnetwork';
97
+ const $api = 'api';
98
+ const $workgroup = 'workgroup';
99
+ const $log = 'log';
100
+ const $blogpost = 'blogpost';
101
+ const $lists = 'lists';
102
+ const $iblock = 'iblock';
103
+ const $type = 'type';
104
+ const $id = 'id';
105
+ const $element = 'element';
106
+ const $url = 'url';
107
+ const $bizproc = 'bizproc';
108
+ const $workflow = 'workflow';
109
+ const $instances = 'instances';
110
+ const $terminate = '$terminate';
111
+ const $kill = 'kill';
112
+ const $template = 'template';
113
+ const $activity = 'activity';
114
+ const $robot = 'robot';
115
+ const $send = 'send';
116
+ const $share = 'share';
117
+ const $blogcomment = 'blogcomment';
118
+
33
119
  class BxRestModule {
34
120
  }
35
121
  BxRestModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BxRestModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
@@ -749,7 +835,6 @@ class SessionKeyServices extends BaseServices {
749
835
  getAuth() {
750
836
  switch (BX_REST_SETTINGS.auth.key) {
751
837
  case 'auth':
752
- console.log('Cookies.get(\'auth\')', CookiesServices.get('auth'));
753
838
  return CookiesServices.get('auth');
754
839
  default:
755
840
  if (window.BX && window.BX.bitrix_sessid()) {
@@ -801,7 +886,6 @@ class SessionKeyServices extends BaseServices {
801
886
  return false;
802
887
  }
803
888
  getAuthParams() {
804
- console.log('BX_REST_SETTINGS', BX_REST_SETTINGS);
805
889
  switch (BX_REST_SETTINGS.auth.source) {
806
890
  case 'cookies':
807
891
  return this.getAuth();
@@ -1138,90 +1222,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
1138
1222
  }]
1139
1223
  }] });
1140
1224
 
1141
- const $get = 'get';
1142
- const $add = 'add';
1143
- const $set = 'set';
1144
- const $event = 'event';
1145
- const $update = 'update';
1146
- const $user = 'user';
1147
- const $task = 'task';
1148
- const $calendar = 'calendar';
1149
- const $meeting = 'meeting';
1150
- const $list = 'list';
1151
- const $search = 'search';
1152
- const $accessibility = 'accessibility';
1153
- const $delete = 'delete';
1154
- const $nearest = 'nearest';
1155
- const $params = 'params';
1156
- const $status = 'status';
1157
- const $resource = 'resource';
1158
- const $booking = 'booking';
1159
- const $section = 'section';
1160
- const $settings = 'settings';
1161
- const $tasks = 'tasks';
1162
- const $elapseditem = 'elapseditem';
1163
- const $getlist = 'getlist';
1164
- const $approve = 'approve';
1165
- const $complete = 'complete';
1166
- const $counters = 'counters';
1167
- const $deger = 'deger';
1168
- const $delegate = 'delegate';
1169
- const $disapprove = 'disapprove';
1170
- const $favorite = 'favorite';
1171
- const $files = 'files';
1172
- const $file = 'file';
1173
- const $attach = 'attach';
1174
- const $field = 'field';
1175
- const $getFields = 'get' + $field + 's';
1176
- const $getaccess = 'getaccess';
1177
- const $history = 'history';
1178
- const $pause = 'pause';
1179
- const $renew = 'renew';
1180
- const $start = 'start';
1181
- const $result = 'result';
1182
- const $planner = 'planner';
1183
- const $disk = 'disk';
1184
- const $rename = 'rename';
1185
- const $markdeleted = 'markdeleted';
1186
- const $restore = 'restore';
1187
- const $folder = 'folder';
1188
- const $getchildren = 'getchildren';
1189
- const $copyto = 'copyto';
1190
- const $moveto = 'moveto';
1191
- const $uploadfile = 'uploadfile';
1192
- const $storage = 'storage';
1193
- const $getTypes = 'getTypes';
1194
- const $stages = 'stages';
1195
- const $getmanifest = 'getmanifest';
1196
- const $isactionallowed = 'isactionallowed';
1197
- const $commentitem = 'commentitem';
1198
- const $department = 'department';
1199
- const $sonet_group = 'sonet_group';
1200
- const $create = 'create';
1201
- const $feature = 'feature';
1202
- const $access = 'access';
1203
- const $request = 'request';
1204
- const $socialnetwork = 'socialnetwork';
1205
- const $api = 'api';
1206
- const $workgroup = 'workgroup';
1207
- const $log = 'log';
1208
- const $blogpost = 'blogpost';
1209
- const $lists = 'lists';
1210
- const $iblock = 'iblock';
1211
- const $type = 'type';
1212
- const $id = 'id';
1213
- const $element = 'element';
1214
- const $url = 'url';
1215
- const $bizproc = 'bizproc';
1216
- const $workflow = 'workflow';
1217
- const $instances = 'instances';
1218
- const $terminate = '$terminate';
1219
- const $kill = 'kill';
1220
- const $template = 'template';
1221
- const $activity = 'activity';
1222
- const $robot = 'robot';
1223
- const $send = 'send';
1224
-
1225
1225
  class BaseMapServices extends BaseServices {
1226
1226
  }
1227
1227
  BaseMapServices.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BaseMapServices, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
@@ -1811,6 +1811,137 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
1811
1811
  }]
1812
1812
  }], ctorParameters: function () { return [{ type: BXRestBizprocWorkflow }, { type: BXRestBizprocActivity }, { type: BXRestBizprocTask }, { type: BXRestBizprocRobot }, { type: BXRestBizprocEvent }]; } });
1813
1813
 
1814
+ class BXRestLogBlogPost {
1815
+ constructor(http) {
1816
+ this.http = http;
1817
+ this.url = {
1818
+ add: [$log, $blogpost, $add],
1819
+ // getusers: {
1820
+ // important: 'log.blogpost.getusers.important' // Отдает массив ID пользователей, прочитавших Важное сообщение
1821
+ // },
1822
+ get: [$log, $blogpost, $get],
1823
+ delete: [$log, $blogpost, $delete],
1824
+ share: [$log, $blogpost, $share],
1825
+ update: [$log, $blogpost, $update], // Изменяет сообщение Живой Ленты
1826
+ };
1827
+ }
1828
+ add(param) {
1829
+ return this.http.post(this.url.add, param);
1830
+ }
1831
+ }
1832
+ BXRestLogBlogPost.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestLogBlogPost, deps: [{ token: HttpBXServices }], target: i0.ɵɵFactoryTarget.Injectable });
1833
+ BXRestLogBlogPost.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestLogBlogPost, providedIn: 'root' });
1834
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestLogBlogPost, decorators: [{
1835
+ type: Injectable,
1836
+ args: [{
1837
+ providedIn: 'root'
1838
+ }]
1839
+ }], ctorParameters: function () { return [{ type: HttpBXServices }]; } });
1840
+
1841
+ class BXRestLogBlogComment {
1842
+ constructor() {
1843
+ this.url = {
1844
+ add: [$log, $blogcomment, $add], // Добавляет комментарий к сообщению Живой ленты
1845
+ };
1846
+ }
1847
+ }
1848
+ BXRestLogBlogComment.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestLogBlogComment, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1849
+ BXRestLogBlogComment.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestLogBlogComment, providedIn: 'root' });
1850
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestLogBlogComment, decorators: [{
1851
+ type: Injectable,
1852
+ args: [{
1853
+ providedIn: 'root'
1854
+ }]
1855
+ }] });
1856
+
1857
+ class BXRestLog {
1858
+ constructor(blogPost, blogComment) {
1859
+ this.blogPost = blogPost;
1860
+ this.blogComment = blogComment;
1861
+ }
1862
+ }
1863
+ BXRestLog.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestLog, deps: [{ token: BXRestLogBlogPost }, { token: BXRestLogBlogComment }], target: i0.ɵɵFactoryTarget.Injectable });
1864
+ BXRestLog.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestLog, providedIn: 'root' });
1865
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestLog, decorators: [{
1866
+ type: Injectable,
1867
+ args: [{
1868
+ providedIn: 'root'
1869
+ }]
1870
+ }], ctorParameters: function () { return [{ type: BXRestLogBlogPost }, { type: BXRestLogBlogComment }]; } });
1871
+
1872
+ class BXRestCalendarEvent {
1873
+ constructor(http) {
1874
+ this.http = http;
1875
+ this.url = {
1876
+ add: [$calendar, $event, $add],
1877
+ delete: [$calendar, $event, $delete],
1878
+ get: [$calendar, $event, $get],
1879
+ getNearest: [$calendar, $event, $get, $nearest],
1880
+ update: [$calendar, $event, $get, $update], // Редактирует существующее событие
1881
+ };
1882
+ }
1883
+ get(param) {
1884
+ return this.http.post(this.url.get, param);
1885
+ }
1886
+ }
1887
+ BXRestCalendarEvent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestCalendarEvent, deps: [{ token: HttpBXServices }], target: i0.ɵɵFactoryTarget.Injectable });
1888
+ BXRestCalendarEvent.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestCalendarEvent, providedIn: 'root' });
1889
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestCalendarEvent, decorators: [{
1890
+ type: Injectable,
1891
+ args: [{
1892
+ providedIn: 'root'
1893
+ }]
1894
+ }], ctorParameters: function () { return [{ type: HttpBXServices }]; } });
1895
+
1896
+ class BXRestCalendar {
1897
+ // TODO: эту дичь расформировать потом по классам
1898
+ /*
1899
+ url = {
1900
+ accessibility: {get: getNameMethod([$calendar, $accessibility, $get])}, // Возвращает занятость пользователей из списка.
1901
+ meeting: {
1902
+ params: {
1903
+ set: getNameMethod([$calendar, $meeting, $params, $set]), // Устанавливает параметры события для текущего пользователя
1904
+ },
1905
+ status: {
1906
+ get: getNameMethod([$calendar, $meeting, $status, $get]), // Возвращает статус участия текущего пользователя в событии
1907
+ set: getNameMethod([$calendar, $meeting, $status, $set]), // Устанавливает статус участия в событии для текущего пользователя
1908
+ },
1909
+ },
1910
+ resource: {
1911
+ list: getNameMethod([$calendar, $resource, $list]), // Возвращает список (массив) всех ресурсов
1912
+ add: getNameMethod([$calendar, $resource, $add]), // Добавляет новый ресурс
1913
+ update: getNameMethod([$calendar, $resource, $update]), // Изменяет ресурс
1914
+ delete: getNameMethod([$calendar, $resource, $delete]), // Удаляет ресурс
1915
+ booking: {
1916
+ list: getNameMethod([$calendar, $resource, $booking, $list]), // Предоставляет возможность выбрать бронирования ресурсов
1917
+ }
1918
+ },
1919
+ section: {
1920
+ add: getNameMethod([$calendar, $section, $add]), // Добавляет новый календарь
1921
+ delete: getNameMethod([$calendar, $section, $delete]), // Удаляет календарь
1922
+ get: getNameMethod([$calendar, $section, $get]), // Возвращает список календарей
1923
+ update: getNameMethod([$calendar, $section, $update]) //Обновляет календарь
1924
+ },
1925
+ settings: {
1926
+ get: getNameMethod([$calendar, $settings, $get]), // Возвращает основные настройки календаря
1927
+ set: getNameMethod([$calendar, $user, $settings, $set]), // Сохраняет пользовательские настройки календаря
1928
+ },
1929
+ getbyid: getNameMethod([$calendar, $event, 'getbyid']), // Возвращает событие календаря по идентификатору
1930
+ }
1931
+ */
1932
+ constructor(event) {
1933
+ this.event = event;
1934
+ }
1935
+ }
1936
+ BXRestCalendar.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestCalendar, deps: [{ token: BXRestCalendarEvent }], target: i0.ɵɵFactoryTarget.Injectable });
1937
+ BXRestCalendar.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestCalendar, providedIn: 'root' });
1938
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestCalendar, decorators: [{
1939
+ type: Injectable,
1940
+ args: [{
1941
+ providedIn: 'root'
1942
+ }]
1943
+ }], ctorParameters: function () { return [{ type: BXRestCalendarEvent }]; } });
1944
+
1814
1945
  class Navvy {
1815
1946
  constructor(snackBar) {
1816
1947
  this.snackBar = snackBar;
@@ -2598,6 +2729,184 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
2598
2729
  }]
2599
2730
  }], ctorParameters: function () { return [{ type: BXRestNavvyBizprocWorkflow }, { type: BXRestNavvyLists }]; } });
2600
2731
 
2732
+ class BXRestNavvyLogBlogPost {
2733
+ constructor(BXRestLogBlogPost, Navvy) {
2734
+ this.BXRestLogBlogPost = BXRestLogBlogPost;
2735
+ this.Navvy = Navvy;
2736
+ this.url = {
2737
+ add: [$log, $blogpost, $add],
2738
+ // getusers: {
2739
+ // important: 'log.blogpost.getusers.important' // Отдает массив ID пользователей, прочитавших Важное сообщение
2740
+ // },
2741
+ get: [$log, $blogpost, $get],
2742
+ delete: [$log, $blogpost, $delete],
2743
+ share: [$log, $blogpost, $share],
2744
+ update: [$log, $blogpost, $update], // Изменяет сообщение Живой Ленты
2745
+ };
2746
+ }
2747
+ add(param) {
2748
+ return this.Navvy.mapAndSnackBarError(this.BXRestLogBlogPost.add(param), 'При добавлении поста');
2749
+ }
2750
+ }
2751
+ BXRestNavvyLogBlogPost.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestNavvyLogBlogPost, deps: [{ token: BXRestLogBlogPost }, { token: Navvy }], target: i0.ɵɵFactoryTarget.Injectable });
2752
+ BXRestNavvyLogBlogPost.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestNavvyLogBlogPost, providedIn: 'root' });
2753
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestNavvyLogBlogPost, decorators: [{
2754
+ type: Injectable,
2755
+ args: [{
2756
+ providedIn: 'root'
2757
+ }]
2758
+ }], ctorParameters: function () { return [{ type: BXRestLogBlogPost }, { type: Navvy }]; } });
2759
+
2760
+ class BXRestNavvyLogBlogComment {
2761
+ constructor() {
2762
+ this.url = {
2763
+ add: [$log, $blogcomment, $add], // Добавляет комментарий к сообщению Живой ленты
2764
+ };
2765
+ }
2766
+ }
2767
+ BXRestNavvyLogBlogComment.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestNavvyLogBlogComment, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2768
+ BXRestNavvyLogBlogComment.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestNavvyLogBlogComment, providedIn: 'root' });
2769
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestNavvyLogBlogComment, decorators: [{
2770
+ type: Injectable,
2771
+ args: [{
2772
+ providedIn: 'root'
2773
+ }]
2774
+ }] });
2775
+
2776
+ class BXRestNavvyLog {
2777
+ constructor(blogPost, blogComment) {
2778
+ this.blogPost = blogPost;
2779
+ this.blogComment = blogComment;
2780
+ }
2781
+ }
2782
+ BXRestNavvyLog.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestNavvyLog, deps: [{ token: BXRestNavvyLogBlogPost }, { token: BXRestNavvyLogBlogComment }], target: i0.ɵɵFactoryTarget.Injectable });
2783
+ BXRestNavvyLog.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestNavvyLog, providedIn: 'root' });
2784
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestNavvyLog, decorators: [{
2785
+ type: Injectable,
2786
+ args: [{
2787
+ providedIn: 'root'
2788
+ }]
2789
+ }], ctorParameters: function () { return [{ type: BXRestNavvyLogBlogPost }, { type: BXRestNavvyLogBlogComment }]; } });
2790
+
2791
+ class BXRestMapCalendarEvent extends BaseMapServices {
2792
+ get(item) {
2793
+ return (item) ? item.map(i => this.CalendarEventGetAnswerHttpToCalendarEventGetAnswer(i)) : undefined;
2794
+ }
2795
+ CalendarEventGetAnswerHttpToCalendarEventGetAnswer(item) {
2796
+ return {
2797
+ ...item,
2798
+ ID: this.toNum(item.ID),
2799
+ MEETING_HOST: this.toNum(item.MEETING_HOST),
2800
+ OWNER_ID: this.toNum(item.OWNER_ID),
2801
+ PARENT_ID: this.toNum(item.PARENT_ID),
2802
+ RECURRENCE_ID: this.toNum(item.RECURRENCE_ID),
2803
+ SECT_ID: this.toNum(item.SECT_ID),
2804
+ SECTION_ID: this.toNum(item.SECTION_ID),
2805
+ TZ_OFFSET_FROM: this.toNum(item.TZ_OFFSET_FROM),
2806
+ TZ_OFFSET_TO: this.toNum(item.TZ_OFFSET_TO),
2807
+ VERSION: this.toNum(item.VERSION),
2808
+ DATE_CREATE: this.toDate(item.DATE_CREATE, 'dd.MM.yyyy HH:mm:ss', { zone: item.TZ_FROM }),
2809
+ DATE_FROM: this.toDate(item.DATE_FROM, 'dd.MM.yyyy HH:mm:ss', { zone: item.TZ_FROM }),
2810
+ ORIGINAL_DATE_FROM: (item.ORIGINAL_DATE_FROM)
2811
+ ? this.toDate(item.ORIGINAL_DATE_FROM, 'dd.MM.yyyy HH:mm:ss')
2812
+ : null,
2813
+ DATE_TO: this.toDate(item.DATE_TO, 'dd.MM.yyyy HH:mm:ss', { zone: item.TZ_TO }),
2814
+ TIMESTAMP_X: this.toDate(item.TIMESTAMP_X, 'dd.MM.yyyy HH:mm:ss', { zone: item.TZ_FROM }),
2815
+ DATE_FROM_TS_UTC: this.toNum(item.DATE_FROM_TS_UTC),
2816
+ DATE_TO_TS_UTC: this.toNum(item.DATE_TO_TS_UTC),
2817
+ DELETED: item.DELETED === 'Y',
2818
+ DT_LENGTH: this.toNum(item.DT_LENGTH),
2819
+ DT_SKIP_TIME: item.DT_SKIP_TIME === 'Y',
2820
+ MEETING_STATUS: item.MEETING_STATUS === 'Y',
2821
+ EXDATE: item.EXDATE.split(';').map(dateStr => this.toDate(dateStr, 'dd.MM.yyyy')),
2822
+ RRULE: (item.RRULE && typeof item.RRULE !== 'string') ? {
2823
+ ...item.RRULE,
2824
+ UNTIL: this.toDate(item.RRULE.UNTIL, 'dd.MM.yyyy'),
2825
+ '~UNTIL': this.toDate(item.RRULE['~UNTIL'], 'dd.MM.yyyy')
2826
+ } : null,
2827
+ ATTENDEE_LIST: (item.ATTENDEE_LIST) ? item.ATTENDEE_LIST.map(i => {
2828
+ return { id: i.id, entryId: this.toNum(i.entryId), status: i.status };
2829
+ }) : []
2830
+ };
2831
+ }
2832
+ }
2833
+ BXRestMapCalendarEvent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestMapCalendarEvent, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
2834
+ BXRestMapCalendarEvent.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestMapCalendarEvent, providedIn: 'root' });
2835
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestMapCalendarEvent, decorators: [{
2836
+ type: Injectable,
2837
+ args: [{
2838
+ providedIn: 'root'
2839
+ }]
2840
+ }] });
2841
+
2842
+ class BXRestRestCalendarEvent {
2843
+ constructor(BXRestCalendarEvent, Navvy, eventMap) {
2844
+ this.BXRestCalendarEvent = BXRestCalendarEvent;
2845
+ this.Navvy = Navvy;
2846
+ this.eventMap = eventMap;
2847
+ }
2848
+ get(param) {
2849
+ return this.Navvy.mapAndSnackBarError(this.BXRestCalendarEvent.get(param), 'Не удалось получить информацию о событии из календаря').pipe(map(v => this.eventMap.get(v)));
2850
+ }
2851
+ }
2852
+ BXRestRestCalendarEvent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestRestCalendarEvent, deps: [{ token: BXRestCalendarEvent }, { token: Navvy }, { token: BXRestMapCalendarEvent }], target: i0.ɵɵFactoryTarget.Injectable });
2853
+ BXRestRestCalendarEvent.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestRestCalendarEvent, providedIn: 'root' });
2854
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestRestCalendarEvent, decorators: [{
2855
+ type: Injectable,
2856
+ args: [{
2857
+ providedIn: 'root'
2858
+ }]
2859
+ }], ctorParameters: function () { return [{ type: BXRestCalendarEvent }, { type: Navvy }, { type: BXRestMapCalendarEvent }]; } });
2860
+
2861
+ class BXRestNavvyCalendar {
2862
+ // TODO: эту дичь расформировать потом по классам
2863
+ /*
2864
+ url = {
2865
+ accessibility: {get: getNameMethod([$calendar, $accessibility, $get])}, // Возвращает занятость пользователей из списка.
2866
+ meeting: {
2867
+ params: {
2868
+ set: getNameMethod([$calendar, $meeting, $params, $set]), // Устанавливает параметры события для текущего пользователя
2869
+ },
2870
+ status: {
2871
+ get: getNameMethod([$calendar, $meeting, $status, $get]), // Возвращает статус участия текущего пользователя в событии
2872
+ set: getNameMethod([$calendar, $meeting, $status, $set]), // Устанавливает статус участия в событии для текущего пользователя
2873
+ },
2874
+ },
2875
+ resource: {
2876
+ list: getNameMethod([$calendar, $resource, $list]), // Возвращает список (массив) всех ресурсов
2877
+ add: getNameMethod([$calendar, $resource, $add]), // Добавляет новый ресурс
2878
+ update: getNameMethod([$calendar, $resource, $update]), // Изменяет ресурс
2879
+ delete: getNameMethod([$calendar, $resource, $delete]), // Удаляет ресурс
2880
+ booking: {
2881
+ list: getNameMethod([$calendar, $resource, $booking, $list]), // Предоставляет возможность выбрать бронирования ресурсов
2882
+ }
2883
+ },
2884
+ section: {
2885
+ add: getNameMethod([$calendar, $section, $add]), // Добавляет новый календарь
2886
+ delete: getNameMethod([$calendar, $section, $delete]), // Удаляет календарь
2887
+ get: getNameMethod([$calendar, $section, $get]), // Возвращает список календарей
2888
+ update: getNameMethod([$calendar, $section, $update]) //Обновляет календарь
2889
+ },
2890
+ settings: {
2891
+ get: getNameMethod([$calendar, $settings, $get]), // Возвращает основные настройки календаря
2892
+ set: getNameMethod([$calendar, $user, $settings, $set]), // Сохраняет пользовательские настройки календаря
2893
+ },
2894
+ getbyid: getNameMethod([$calendar, $event, 'getbyid']), // Возвращает событие календаря по идентификатору
2895
+ }
2896
+ */
2897
+ constructor(event) {
2898
+ this.event = event;
2899
+ }
2900
+ }
2901
+ BXRestNavvyCalendar.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestNavvyCalendar, deps: [{ token: BXRestRestCalendarEvent }], target: i0.ɵɵFactoryTarget.Injectable });
2902
+ BXRestNavvyCalendar.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestNavvyCalendar, providedIn: 'root' });
2903
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestNavvyCalendar, decorators: [{
2904
+ type: Injectable,
2905
+ args: [{
2906
+ providedIn: 'root'
2907
+ }]
2908
+ }], ctorParameters: function () { return [{ type: BXRestRestCalendarEvent }]; } });
2909
+
2601
2910
  class BXRestMapLists extends BaseMapServices {
2602
2911
  constructor(element) {
2603
2912
  super();
@@ -2614,39 +2923,43 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
2614
2923
  }], ctorParameters: function () { return [{ type: BXRestMapListsElement }]; } });
2615
2924
 
2616
2925
  class BXRest {
2617
- constructor(user, lists, tasks, disk, bizproc) {
2926
+ constructor(user, lists, tasks, disk, bizproc, log, calendar) {
2618
2927
  this.user = user;
2619
2928
  this.lists = lists;
2620
2929
  this.tasks = tasks;
2621
2930
  this.disk = disk;
2622
2931
  this.bizproc = bizproc;
2932
+ this.log = log;
2933
+ this.calendar = calendar;
2623
2934
  }
2624
2935
  }
2625
- BXRest.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRest, deps: [{ token: BXRestUser }, { token: BXRestLists }, { token: BXRestTasks }, { token: BXRestDisk }, { token: BXRestBizproc }], target: i0.ɵɵFactoryTarget.Injectable });
2936
+ BXRest.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRest, deps: [{ token: BXRestUser }, { token: BXRestLists }, { token: BXRestTasks }, { token: BXRestDisk }, { token: BXRestBizproc }, { token: BXRestLog }, { token: BXRestCalendar }], target: i0.ɵɵFactoryTarget.Injectable });
2626
2937
  BXRest.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRest, providedIn: 'root' });
2627
2938
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRest, decorators: [{
2628
2939
  type: Injectable,
2629
2940
  args: [{
2630
2941
  providedIn: 'root'
2631
2942
  }]
2632
- }], ctorParameters: function () { return [{ type: BXRestUser }, { type: BXRestLists }, { type: BXRestTasks }, { type: BXRestDisk }, { type: BXRestBizproc }]; } });
2943
+ }], ctorParameters: function () { return [{ type: BXRestUser }, { type: BXRestLists }, { type: BXRestTasks }, { type: BXRestDisk }, { type: BXRestBizproc }, { type: BXRestLog }, { type: BXRestCalendar }]; } });
2633
2944
  class BXRestNavvy {
2634
- constructor(user, lists, tasks, disk, bizproc) {
2945
+ constructor(user, lists, tasks, disk, bizproc, log, calendar) {
2635
2946
  this.user = user;
2636
2947
  this.lists = lists;
2637
2948
  this.tasks = tasks;
2638
2949
  this.disk = disk;
2639
2950
  this.bizproc = bizproc;
2951
+ this.log = log;
2952
+ this.calendar = calendar;
2640
2953
  }
2641
2954
  }
2642
- BXRestNavvy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestNavvy, deps: [{ token: BXRestNavvyUser }, { token: BXRestNavvyLists }, { token: BXRestNavvyTasks }, { token: BXRestNavvyDisk }, { token: BXRestNavvyBizproc }], target: i0.ɵɵFactoryTarget.Injectable });
2955
+ BXRestNavvy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestNavvy, deps: [{ token: BXRestNavvyUser }, { token: BXRestNavvyLists }, { token: BXRestNavvyTasks }, { token: BXRestNavvyDisk }, { token: BXRestNavvyBizproc }, { token: BXRestNavvyLog }, { token: BXRestNavvyCalendar }], target: i0.ɵɵFactoryTarget.Injectable });
2643
2956
  BXRestNavvy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestNavvy, providedIn: 'root' });
2644
2957
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestNavvy, decorators: [{
2645
2958
  type: Injectable,
2646
2959
  args: [{
2647
2960
  providedIn: 'root'
2648
2961
  }]
2649
- }], ctorParameters: function () { return [{ type: BXRestNavvyUser }, { type: BXRestNavvyLists }, { type: BXRestNavvyTasks }, { type: BXRestNavvyDisk }, { type: BXRestNavvyBizproc }]; } });
2962
+ }], ctorParameters: function () { return [{ type: BXRestNavvyUser }, { type: BXRestNavvyLists }, { type: BXRestNavvyTasks }, { type: BXRestNavvyDisk }, { type: BXRestNavvyBizproc }, { type: BXRestNavvyLog }, { type: BXRestNavvyCalendar }]; } });
2650
2963
  class BXRestMap {
2651
2964
  constructor(lists) {
2652
2965
  this.lists = lists;