bx-rest 0.4.1 → 0.4.4

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 (115) hide show
  1. package/esm2022/functions/mapResult.mjs +5 -2
  2. package/esm2022/map/app.mjs +17 -0
  3. package/esm2022/map/disk/base.mjs +19 -1
  4. package/esm2022/map/disk/folder.mjs +2 -2
  5. package/esm2022/map/disk/storage.mjs +4 -1
  6. package/esm2022/map/rest.mjs +17 -0
  7. package/esm2022/map/task/elapseditem.mjs +5 -5
  8. package/esm2022/map/task.mjs +3 -3
  9. package/esm2022/map.mjs +1 -1
  10. package/esm2022/request/app.mjs +23 -0
  11. package/esm2022/request/bizproc/activity.mjs +5 -5
  12. package/esm2022/request/bizproc/event.mjs +5 -5
  13. package/esm2022/request/bizproc/robot.mjs +5 -5
  14. package/esm2022/request/bizproc/task.mjs +5 -5
  15. package/esm2022/request/bizproc/workflow.mjs +5 -5
  16. package/esm2022/request/bizproc.mjs +6 -6
  17. package/esm2022/request/disk/folder.mjs +103 -22
  18. package/esm2022/request/disk/storage.mjs +2 -2
  19. package/esm2022/request/task/elapseditem.mjs +5 -5
  20. package/esm2022/request/task.mjs +6 -6
  21. package/esm2022/request/tasks/task.mjs +2 -2
  22. package/esm2022/request/user.mjs +3 -10
  23. package/esm2022/request-navvy/app.mjs +27 -0
  24. package/esm2022/request-navvy/bizproc/workflow.mjs +10 -10
  25. package/esm2022/request-navvy/bizproc.mjs +10 -10
  26. package/esm2022/request-navvy/calendar/event.mjs +5 -5
  27. package/esm2022/request-navvy/calendar.mjs +3 -3
  28. package/esm2022/request-navvy/disk/folder.mjs +95 -17
  29. package/esm2022/request-navvy/disk/operation.mjs +3 -3
  30. package/esm2022/request-navvy/disk/storage.mjs +2 -5
  31. package/esm2022/request-navvy/task/delegate/elapseditem.mjs +11 -11
  32. package/esm2022/request-navvy/task/elapseditem.mjs +13 -13
  33. package/esm2022/request-navvy/task/operation/elapseditem.mjs +14 -14
  34. package/esm2022/request-navvy/tasks/task.mjs +4 -29
  35. package/esm2022/request-navvy/user.mjs +12 -35
  36. package/esm2022/rest.mjs +41 -24
  37. package/esm2022/services/Navvy/NavvyAlternativePaginationNavigation.mjs +4 -3
  38. package/esm2022/services/Navvy/NavvyPagNav.mjs +4 -3
  39. package/esm2022/services/Navvy/NavvyPagNavTasks.mjs +4 -3
  40. package/esm2022/services/Navvy/NavvyPagNavWithUselessKey.mjs +3 -2
  41. package/esm2022/services/Navvy/NavvySimple.mjs +8 -4
  42. package/esm2022/services/Navvy/NavvySupport.mjs +1 -4
  43. package/esm2022/services/Navvy/extends/NavvyPagNavBase.mjs +3 -2
  44. package/esm2022/services/base.mjs +1 -3
  45. package/esm2022/services/http/HttpBX.mjs +6 -3
  46. package/esm2022/settings.mjs +2 -2
  47. package/esm2022/typification/rest/app/info.mjs +2 -0
  48. package/esm2022/typification/rest/base/answer.mjs +1 -1
  49. package/esm2022/typification/rest/batch/batchRequestParam.mjs +1 -1
  50. package/esm2022/typification/rest/department/add.mjs +1 -1
  51. package/esm2022/typification/rest/department/del.mjs +1 -1
  52. package/esm2022/typification/rest/department/department.mjs +1 -1
  53. package/esm2022/typification/rest/department/get.mjs +1 -1
  54. package/esm2022/typification/rest/department/update.mjs +1 -1
  55. package/esm2022/typification/rest/disk/folder/addSubFolder.mjs +2 -0
  56. package/esm2022/typification/rest/disk/folder/copyTo.mjs +2 -0
  57. package/esm2022/typification/rest/disk/folder/getFields.mjs +2 -0
  58. package/esm2022/typification/rest/disk/folder/moveTo.mjs +2 -0
  59. package/esm2022/typification/rest/disk/folder/rename.mjs +2 -0
  60. package/esm2022/typification/rest/disk/folder/uploadFile.mjs +2 -0
  61. package/esm2022/typification/rest/profile.mjs +2 -0
  62. package/esm2022/typification/rest/tasks/base/fieldsName.mjs +1 -1
  63. package/fesm2022/bx-rest.mjs +1115 -902
  64. package/fesm2022/bx-rest.mjs.map +1 -1
  65. package/functions/mapResult.d.ts +2 -1
  66. package/map/app.d.ts +8 -0
  67. package/map/disk/base.d.ts +1 -0
  68. package/map/disk/folder.d.ts +1 -1
  69. package/map/disk/storage.d.ts +2 -1
  70. package/map/rest.d.ts +8 -0
  71. package/map/task/elapseditem.d.ts +3 -3
  72. package/map/task.d.ts +3 -3
  73. package/package.json +1 -1
  74. package/request/app.d.ts +13 -0
  75. package/request/bizproc/activity.d.ts +3 -3
  76. package/request/bizproc/event.d.ts +3 -3
  77. package/request/bizproc/robot.d.ts +3 -3
  78. package/request/bizproc/task.d.ts +3 -3
  79. package/request/bizproc/workflow.d.ts +3 -3
  80. package/request/bizproc.d.ts +14 -14
  81. package/request/disk/folder.d.ts +85 -10
  82. package/request/disk/storage.d.ts +1 -1
  83. package/request/task/elapseditem.d.ts +3 -3
  84. package/request/task.d.ts +4 -4
  85. package/request/tasks/task.d.ts +2 -2
  86. package/request/user.d.ts +1 -1
  87. package/request-navvy/app.d.ts +16 -0
  88. package/request-navvy/bizproc/workflow.d.ts +7 -7
  89. package/request-navvy/bizproc.d.ts +8 -8
  90. package/request-navvy/calendar/event.d.ts +3 -3
  91. package/request-navvy/calendar.d.ts +3 -3
  92. package/request-navvy/disk/folder.d.ts +76 -1
  93. package/request-navvy/disk/interlayer/storage.d.ts +1 -1
  94. package/request-navvy/disk/operation.d.ts +2 -2
  95. package/request-navvy/disk/storage.d.ts +1 -1
  96. package/request-navvy/task/delegate/elapseditem.d.ts +9 -9
  97. package/request-navvy/task/elapseditem.d.ts +12 -12
  98. package/request-navvy/task/operation/elapseditem.d.ts +10 -10
  99. package/request-navvy/tasks/task.d.ts +3 -6
  100. package/request-navvy/user.d.ts +5 -8
  101. package/rest.d.ts +20 -6
  102. package/services/Navvy/NavvySimple.d.ts +0 -1
  103. package/services/Navvy/NavvySupport.d.ts +0 -2
  104. package/typification/rest/app/info.d.ts +17 -0
  105. package/typification/rest/base/answer.d.ts +4 -1
  106. package/typification/rest/batch/batchRequestParam.d.ts +2 -3
  107. package/typification/rest/department/get.d.ts +4 -2
  108. package/typification/rest/disk/folder/addSubFolder.d.ts +6 -0
  109. package/typification/rest/disk/folder/copyTo.d.ts +4 -0
  110. package/typification/rest/disk/folder/getFields.d.ts +9 -0
  111. package/typification/rest/disk/folder/moveTo.d.ts +4 -0
  112. package/typification/rest/disk/folder/rename.d.ts +4 -0
  113. package/typification/rest/disk/folder/uploadFile.d.ts +13 -0
  114. package/typification/rest/profile.d.ts +16 -0
  115. package/typification/rest/tasks/base/fieldsName.d.ts +12 -0
@@ -1,12 +1,12 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { InjectionToken, Injectable } from '@angular/core';
3
- import { Subscription, of, mergeMap, throwError, forkJoin, share, ReplaySubject, last, shareReplay, concat, from, concatMap, tap } from 'rxjs';
3
+ import { map, catchError, take, mergeMap as mergeMap$1 } from 'rxjs/operators';
4
+ import { throwError, ReplaySubject, last, shareReplay, mergeMap, concat, from, concatMap, tap, Subscription, of, forkJoin } from 'rxjs';
4
5
  import clone from 'just-clone';
5
6
  import { DateTime } from 'luxon';
6
7
  import * as i2 from '@angular/common/http';
7
8
  import { HttpParams, HttpHeaders } from '@angular/common/http';
8
9
  import flatten from 'just-flatten-it';
9
- import { map, catchError, take, mergeMap as mergeMap$1 } from 'rxjs/operators';
10
10
 
11
11
  class BX_REST_SETTINGS extends InjectionToken {
12
12
  constructor() {
@@ -16,7 +16,7 @@ class BX_REST_SETTINGS extends InjectionToken {
16
16
  key: 'auth'
17
17
  };
18
18
  this.urls = {
19
- home: 'b24.trace-studio.com'
19
+ home: ''
20
20
  };
21
21
  }
22
22
  }
@@ -36,356 +36,628 @@ export const BX_REST_SETTINGS: iRestSettings = {
36
36
  */
37
37
 
38
38
  function BXRestMapResult(v) {
39
- if (v && (v.result || typeof v.result === 'boolean')) {
39
+ if (v && (instanceOfiBXRestAnswerSuccess(v))) {
40
40
  return v.result;
41
41
  }
42
42
  return undefined;
43
+ }
44
+ function instanceOfiBXRestAnswerSuccess(object) {
45
+ return 'result' in object;
43
46
  }
44
47
 
45
- const $get = 'get';
46
- const $add = 'add';
47
- const $set = 'set';
48
- const $event = 'event';
49
- const $update = 'update';
50
- const $user = 'user';
51
- const $task = 'task';
52
- const $calendar = 'calendar';
53
- const $meeting = 'meeting';
54
- const $list = 'list';
55
- const $search = 'search';
56
- const $accessibility = 'accessibility';
57
- const $delete = 'delete';
58
- const $nearest = 'nearest';
59
- const $params = 'params';
60
- const $status = 'status';
61
- const $resource = 'resource';
62
- const $booking = 'booking';
63
- const $section = 'section';
64
- const $settings = 'settings';
65
- const $tasks = 'tasks';
66
- const $elapseditem = 'elapseditem';
67
- const $getlist = 'getlist';
68
- const $approve = 'approve';
69
- const $complete = 'complete';
70
- const $counters = 'counters';
71
- const $defer = 'defer';
72
- const $delegate = 'delegate';
73
- const $disapprove = 'disapprove';
74
- const $favorite = 'favorite';
75
- const $files = 'files';
76
- const $file = 'file';
77
- const $attach = 'attach';
78
- const $field = 'field';
79
- const $getFields = 'get' + $field + 's';
80
- const $getaccess = 'getaccess';
81
- const $history = 'history';
82
- const $pause = 'pause';
83
- const $renew = 'renew';
84
- const $start = 'start';
85
- const $result = 'result';
86
- const $planner = 'planner';
87
- const $disk = 'disk';
88
- const $rename = 'rename';
89
- const $markdeleted = 'markdeleted';
90
- const $restore = 'restore';
91
- const $folder = 'folder';
92
- const $getchildren = 'getchildren';
93
- const $copyto = 'copyto';
94
- const $moveto = 'moveto';
95
- const $uploadfile = 'uploadfile';
96
- const $storage = 'storage';
97
- const $getTypes = 'getTypes';
98
- const $stages = 'stages';
99
- const $getmanifest = 'getmanifest';
100
- const $isactionallowed = 'isactionallowed';
101
- const $commentitem = 'commentitem';
102
- const $department = 'department';
103
- const $sonet_group = 'sonet_group';
104
- const $create = 'create';
105
- const $feature = 'feature';
106
- const $access = 'access';
107
- const $request = 'request';
108
- const $socialnetwork = 'socialnetwork';
109
- const $api = 'api';
110
- const $workgroup = 'workgroup';
111
- const $log = 'log';
112
- const $blogpost = 'blogpost';
113
- const $lists = 'lists';
114
- const $iblock = 'iblock';
115
- const $type = 'type';
116
- const $id = 'id';
117
- const $element = 'element';
118
- const $url = 'url';
119
- const $bizproc = 'bizproc';
120
- const $workflow = 'workflow';
121
- const $instances = 'instances';
122
- const $terminate = '$terminate';
123
- const $kill = 'kill';
124
- const $template = 'template';
125
- const $activity = 'activity';
126
- const $robot = 'robot';
127
- const $send = 'send';
128
- const $share = 'share';
129
- const $blogcomment = 'blogcomment';
130
- const $server = 'server';
131
- const $time = 'time';
132
- const $chat = 'chat';
133
- const $message = 'message';
134
- const $im = 'im';
135
- const $updateTitle = 'updateTitle';
136
- const $updateColor = 'updateColor';
137
- const $updateAvatar = 'updateAvatar';
138
- const $setOwner = 'setOwner';
139
- const $mute = 'mute';
140
-
141
- var partNameMethods$1 = /*#__PURE__*/Object.freeze({
142
- __proto__: null,
143
- $access: $access,
144
- $accessibility: $accessibility,
145
- $activity: $activity,
146
- $add: $add,
147
- $api: $api,
148
- $approve: $approve,
149
- $attach: $attach,
150
- $bizproc: $bizproc,
151
- $blogcomment: $blogcomment,
152
- $blogpost: $blogpost,
153
- $booking: $booking,
154
- $calendar: $calendar,
155
- $chat: $chat,
156
- $commentitem: $commentitem,
157
- $complete: $complete,
158
- $copyto: $copyto,
159
- $counters: $counters,
160
- $create: $create,
161
- $defer: $defer,
162
- $delegate: $delegate,
163
- $delete: $delete,
164
- $department: $department,
165
- $disapprove: $disapprove,
166
- $disk: $disk,
167
- $elapseditem: $elapseditem,
168
- $element: $element,
169
- $event: $event,
170
- $favorite: $favorite,
171
- $feature: $feature,
172
- $field: $field,
173
- $file: $file,
174
- $files: $files,
175
- $folder: $folder,
176
- $get: $get,
177
- $getFields: $getFields,
178
- $getTypes: $getTypes,
179
- $getaccess: $getaccess,
180
- $getchildren: $getchildren,
181
- $getlist: $getlist,
182
- $getmanifest: $getmanifest,
183
- $history: $history,
184
- $iblock: $iblock,
185
- $id: $id,
186
- $im: $im,
187
- $instances: $instances,
188
- $isactionallowed: $isactionallowed,
189
- $kill: $kill,
190
- $list: $list,
191
- $lists: $lists,
192
- $log: $log,
193
- $markdeleted: $markdeleted,
194
- $meeting: $meeting,
195
- $message: $message,
196
- $moveto: $moveto,
197
- $mute: $mute,
198
- $nearest: $nearest,
199
- $params: $params,
200
- $pause: $pause,
201
- $planner: $planner,
202
- $rename: $rename,
203
- $renew: $renew,
204
- $request: $request,
205
- $resource: $resource,
206
- $restore: $restore,
207
- $result: $result,
208
- $robot: $robot,
209
- $search: $search,
210
- $section: $section,
211
- $send: $send,
212
- $server: $server,
213
- $set: $set,
214
- $setOwner: $setOwner,
215
- $settings: $settings,
216
- $share: $share,
217
- $socialnetwork: $socialnetwork,
218
- $sonet_group: $sonet_group,
219
- $stages: $stages,
220
- $start: $start,
221
- $status: $status,
222
- $storage: $storage,
223
- $task: $task,
224
- $tasks: $tasks,
225
- $template: $template,
226
- $terminate: $terminate,
227
- $time: $time,
228
- $type: $type,
229
- $update: $update,
230
- $updateAvatar: $updateAvatar,
231
- $updateColor: $updateColor,
232
- $updateTitle: $updateTitle,
233
- $uploadfile: $uploadfile,
234
- $url: $url,
235
- $user: $user,
236
- $workflow: $workflow,
237
- $workgroup: $workgroup
238
- });
239
-
240
- class CookiesServices {
241
- static get(name) {
242
- const results = document.cookie.match('(^|;) ?' + name + '=([^;]*)(;|$)');
243
- if (results)
244
- return results[2];
245
- else
246
- return '';
48
+ class NavvySupport {
49
+ constructor(requestClass, mapClass) {
50
+ this.requestClass = requestClass;
51
+ this.mapClass = mapClass;
52
+ this.pageSize = 50; // больше всё равно не дас
247
53
  }
248
- static set(name, value, age = 0) {
249
- let string = name + '=' + value + ';';
250
- if (age) {
251
- string += ' max-age=' + age;
252
- }
253
- string += '; SameSite=None; Secure';
254
- document.cookie = string;
54
+ mapAndError(request) {
55
+ return request.pipe(map(v => BXRestMapResult(v)), catchError(err => {
56
+ // this.snackBar.error(errorText)
57
+ return throwError(() => err);
58
+ }));
255
59
  }
256
- static setObj(name, value, age = 0) {
257
- let string = name + '=' + JSON.stringify(value) + ';';
258
- if (age) {
259
- string += ' max-age=' + age;
260
- }
261
- string += '; SameSite=None; Secure';
262
- document.cookie = string;
60
+ }
61
+
62
+ class NavvySimple extends NavvySupport {
63
+ constructor(requestClass, mapClass, func, map = undefined
64
+ // private snackBar: SnackBarService,
65
+ ) {
66
+ super(requestClass, mapClass);
67
+ this.func = func;
68
+ this.map = map;
263
69
  }
264
- static getObj(name) {
265
- const results = document.cookie.match('(^|;) ?' + name + '=([^;]*)(;|$)');
266
- if (results) {
267
- return JSON.parse(results[2]);
268
- }
269
- return false;
70
+ resultVanilla() {
71
+ return this.func;
270
72
  }
271
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: CookiesServices, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
272
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: CookiesServices, providedIn: 'root' }); }
273
- }
274
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: CookiesServices, decorators: [{
275
- type: Injectable,
276
- args: [{
277
- providedIn: 'root'
278
- }]
279
- }] });
280
-
281
- const time = {
282
- oneDayMilliseconds: 1000 * 60 * 60 * 24
283
- };
73
+ // TODO: del after 09.04.2024
74
+ // mapForVanilla() {
75
+ // return this.func.pipe(
76
+ // map(v => (v && instanceOfiBXRestAnswerSuccess(v) && this.map)
77
+ // ? Object.assign(v,{result: this.map.call(this.mapClass, v.result)}) : v)
78
+ // ) as ReturnTypeNavvy<Observable<iBXRestAnswer<T | undefined>>, Observable<iBXRestAnswer<R | undefined>>>
79
+ // }
80
+ result() {
81
+ return this.mapAndError(this.func).pipe(map(v => (v && this.map) ? this.map.call(this.mapClass, v) : v));
82
+ }
83
+ }
284
84
 
285
- class BaseServices {
286
- constructor(BX_REST_SETTINGS) {
287
- this.BX_REST_SETTINGS = BX_REST_SETTINGS;
85
+ class NavvyPagNavBase extends NavvySupport {
86
+ constructor(requestClass, mapClass, func, param, map = undefined) {
87
+ super(requestClass, mapClass);
88
+ this.func = func;
89
+ this.param = param;
90
+ this.map = map;
91
+ // load: number = 0
92
+ this.load$ = new ReplaySubject(1);
93
+ this.load$.next(0.001);
288
94
  }
289
- toStr(val) {
290
- return (val) ? String(val) : '';
95
+ resultVanilla() {
96
+ return this.func.call(this.requestClass, this.param);
291
97
  }
292
- toNum(val) {
293
- return (val && Number(val)) ? Number(val) : 0;
98
+ mapForVanilla() {
99
+ return this.mapForVanillaEnd(this.func, this.param);
294
100
  }
295
- toDate(val, format, opt) {
296
- if (val instanceof Date) {
297
- return val;
298
- }
299
- else if (typeof val == 'string') {
300
- if (format) {
301
- if (opt) {
302
- return DateTime.fromFormat(val, format, opt).toJSDate();
303
- }
304
- return DateTime.fromFormat(val, format).toJSDate();
305
- }
306
- else {
307
- return new Date(val);
308
- }
309
- }
310
- else if (typeof val == 'number') {
311
- return new Date(val);
312
- }
313
- console.error('Wrong date format', val, format);
314
- throw 'Wrong date format';
101
+ mapForVanillaEnd(func, param) {
102
+ return func.call(this.requestClass, param).pipe(map(v => (v && instanceOfiBXRestAnswerSuccess(v) && this.map) ? Object.assign(v, { result: this.map.call(this.mapClass, v.result) }) : v));
315
103
  }
316
- getBXStrTime(date) {
317
- return this.toISOStringWithTimezone(date);
104
+ result() {
105
+ return this.resultEnd(this.func, this.param);
318
106
  }
319
- toISOStringWithTimezone(date) {
320
- const tzOffset = -date.getTimezoneOffset();
321
- const diff = tzOffset >= 0 ? '+' : '-';
322
- const pad = (n) => `${Math.floor(Math.abs(n))}`.padStart(2, '0');
323
- return date.getFullYear() +
324
- '-' + pad(date.getMonth() + 1) +
325
- '-' + pad(date.getDate()) +
326
- 'T' + pad(date.getHours()) +
327
- ':' + pad(date.getMinutes()) +
328
- ':' + pad(date.getSeconds()) +
329
- diff + pad(tzOffset / 60) +
330
- ':' + pad(tzOffset % 60);
107
+ resultEnd(func, param) {
108
+ return this.mapAndError(func.call(this.requestClass, param)).pipe(map(v => (v && this.map) ? this.map.call(this.mapClass, v) : v));
331
109
  }
332
- ;
333
- toBool(val) {
334
- switch (typeof val) {
335
- case 'string':
336
- val = val.toLowerCase();
337
- if (val === 'n' || val === 'y') { // битриксовые понятия о bool
338
- return val === 'y';
339
- }
340
- else if (val === 'true' || val === 'false') { // битриксовые понятия о bool
341
- return val === 'true';
342
- }
343
- else {
344
- return false;
345
- }
346
- default:
347
- return Boolean(val);
348
- }
110
+ }
111
+
112
+ /**
113
+ * Класс-прослойка-обработчик для методов работающих на альтернативной постраничной навигации тика как методы по
114
+ * затраченному времени на задачи https://dev.1c-bitrix.ru/rest_help/tasks/task/elapseditem/index.php
115
+ *
116
+ * не завершенный класс, работаем от частного к общему
117
+ */
118
+ class NavvyAlterPagNav extends NavvyPagNavBase {
119
+ resultAll() {
120
+ let save = [];
121
+ return this.resultAllEnd()
122
+ .pipe(map(v => {
123
+ if (v) {
124
+ save.push(...v);
125
+ }
126
+ return save;
127
+ }), last(), shareReplay(1));
349
128
  }
350
- toBXYorN(val) {
351
- return (val) ? 'Y' : 'N';
129
+ resultAllEnd() {
130
+ // return this.mapForVanillaEnd(this.func, this.param)
131
+ return this.resultVanilla().pipe(mergeMap(items => {
132
+ if (items && instanceOfiBXRestAnswerSuccess(items)) {
133
+ if (items.total && items.next) {
134
+ let requests = [];
135
+ for (let i = items.next; i < items.total; i = i + this.pageSize) {
136
+ let paramClone = clone(this.param);
137
+ paramClone.PARAMS = {
138
+ NAV_PARAMS: {
139
+ nPageSize: this.pageSize,
140
+ iNumPage: i / this.pageSize + 1
141
+ }
142
+ };
143
+ requests.push(paramClone);
144
+ }
145
+ return concat(this.mapResultForGetAll(items), from(requests).pipe(concatMap(param => this.resultEnd(this.func, param).pipe(tap(_ => {
146
+ if (param && param.PARAMS && items.total) {
147
+ this.load$.next((param.PARAMS.NAV_PARAMS.iNumPage * this.pageSize + this.pageSize) / items.total);
148
+ }
149
+ })))));
150
+ }
151
+ }
152
+ return this.mapResultForGetAll(items);
153
+ }), catchError(err => {
154
+ // this.snackBar.error("Проблемы с поточным получение затреканого времени")
155
+ console.error(err);
156
+ return throwError(() => err);
157
+ }));
352
158
  }
353
- typeof(val) {
354
- return typeof val;
159
+ mapResultForGetAll(items) {
160
+ return (instanceOfiBXRestAnswerSuccess(items)) ? from([items.result]).pipe(map(v => (v && this.map) ? this.map.call(this.mapClass, v) : v)) : from([]);
355
161
  }
356
- typeDefClass(val) {
357
- if (val) {
358
- if (val instanceof Date) {
359
- return 'date';
162
+ }
163
+
164
+ // TODO: реализовать загрузку всего в очереди
165
+ class NavvyPagNav extends NavvyPagNavBase {
166
+ resultAll() {
167
+ let save = [];
168
+ return this.resultAllEnd()
169
+ .pipe(map(v => {
170
+ if (v) {
171
+ save.push(...v);
360
172
  }
361
- return undefined;
362
- }
363
- else {
364
- return null;
365
- }
173
+ return save;
174
+ }), last(), shareReplay(1));
366
175
  }
367
- toJSON(val) {
368
- return JSON.stringify(val);
176
+ resultAllEnd() {
177
+ // return this.mapForVanillaEnd(this.func, this.param)
178
+ return this.resultVanilla().pipe(mergeMap(items => {
179
+ if (items && instanceOfiBXRestAnswerSuccess(items)) {
180
+ if (items.total && items.next) {
181
+ let requests = [];
182
+ for (let i = items.next; i < items.total; i = i + this.pageSize) {
183
+ let paramClone = clone(this.param);
184
+ paramClone.start = i;
185
+ requests.push(paramClone);
186
+ }
187
+ return concat(this.mapResultForGetAll(items), from(requests).pipe(concatMap(param => this.resultEnd(this.func, param))));
188
+ }
189
+ }
190
+ return this.mapResultForGetAll(items);
191
+ }), catchError(err => {
192
+ // this.snackBar.error("Проблемы с поточным получение затреканого времени")
193
+ console.error(err);
194
+ return throwError(() => err);
195
+ }));
369
196
  }
370
- fromJSON(val) {
371
- return JSON.parse(val);
197
+ mapResultForGetAll(items) {
198
+ return (instanceOfiBXRestAnswerSuccess(items)) ? from([items.result]).pipe(map(v => (v && this.map) ? this.map.call(this.mapClass, v) : v)) : from([]);
372
199
  }
373
- prepareBaseAddress(url, add = '') {
374
- if (url.search('https://') !== 0 && url.search('http://')) {
375
- url = 'https://' + url;
376
- }
377
- if (url.lastIndexOf('/') !== (url.length - 1)) {
378
- url = url + '/';
379
- }
380
- url = url + add;
381
- return url;
200
+ }
201
+
202
+ class NavvyPagNavWithUselessKey extends NavvyPagNavBase {
203
+ resultAll() {
204
+ let save = [];
205
+ return this.resultAllEnd()
206
+ .pipe(map(v => {
207
+ if (v) {
208
+ save.push(...v);
209
+ }
210
+ return save;
211
+ }), last());
382
212
  }
383
- getHomeAddress() {
384
- // return this.prepareBaseAddress(environment.urls.home)
385
- return this.prepareBaseAddress(this.BX_REST_SETTINGS.urls.home);
213
+ resultAllEnd() {
214
+ return this.mapForVanillaEnd(this.func, this.param).pipe(mergeMap(items => {
215
+ if (items && instanceOfiBXRestAnswerSuccess(items)) {
216
+ if (items.total && items.next) {
217
+ let requests = [];
218
+ for (let i = 0; i < items.total; i = i + this.pageSize) {
219
+ let paramClone = clone(this.param);
220
+ paramClone.start = i;
221
+ requests.push(paramClone);
222
+ }
223
+ /*
224
+ return from(requests.map(param => this.resultEnd(this.func, param))).pipe(
225
+ // toArray(),
226
+ mergeMap(v => {
227
+ return v
228
+ })
229
+ )
230
+ */
231
+ return from(requests).pipe(concatMap(param => this.resultEnd(this.func, param)));
232
+ /*
233
+ return this.getAllTaskElapsedItem(func, param).pipe(
234
+ map(vEnd => {
235
+ if (vEnd && vEnd.result && items.result) {
236
+ return merge(clone(vEnd), {result: [...items.result, ...vEnd.result]})
237
+ }
238
+ return items
239
+ })
240
+ )
241
+ */
242
+ }
243
+ }
244
+ return from([1]).pipe(concatMap(_ => this.resultEnd(this.func, this.param)));
245
+ // return from([BXRestMapResult(items)])
246
+ // as ReturnType<Observable<T | undefined>, Observable<R | undefined>>
247
+ }), catchError(err => {
248
+ // this.snackBar.error("Проблемы с поточным получение затреканого времени")
249
+ console.error(err);
250
+ return throwError(() => err);
251
+ }));
386
252
  }
387
- dateDiff(a, b) {
388
- return new Date(a.valueOf() - b.valueOf());
253
+ }
254
+
255
+ // TODO: реализовать загрузку всего в очереди
256
+ class NavvyPagNavTasks extends NavvyPagNavBase {
257
+ resultAll() {
258
+ let save = [];
259
+ return this.resultAllEnd()
260
+ .pipe(map(v => {
261
+ if (v) {
262
+ save.push(...v);
263
+ }
264
+ return save;
265
+ }), last(), shareReplay(1));
266
+ }
267
+ resultAllEnd() {
268
+ // return this.mapForVanillaEnd(this.func, this.param)
269
+ return this.resultVanilla().pipe(mergeMap(items => {
270
+ if (items && instanceOfiBXRestAnswerSuccess(items)) {
271
+ if (items.total && items.next) {
272
+ let requests = [];
273
+ for (let i = items.next; i < items.total; i = i + this.pageSize) {
274
+ let paramClone = clone(this.param);
275
+ paramClone.start = i;
276
+ requests.push(paramClone);
277
+ }
278
+ return concat(this.mapResultForGetAll(items), from(requests).pipe(concatMap(param => this.resultEnd(this.func, param))));
279
+ }
280
+ }
281
+ return this.mapResultForGetAll(items);
282
+ }), catchError(err => {
283
+ // this.snackBar.error("Проблемы с поточным получение затреканого времени")
284
+ console.error(err);
285
+ return throwError(() => err);
286
+ }));
287
+ }
288
+ mapResultForGetAll(items) {
289
+ return (instanceOfiBXRestAnswerSuccess(items)) ? from([items.result]).pipe(map(v => (v && this.map) ? this.map.call(this.mapClass, v) : v)) : from([]);
290
+ }
291
+ }
292
+
293
+ class Navvy {
294
+ constructor(requestClass, mapClass) {
295
+ this.requestClass = requestClass;
296
+ this.mapClass = mapClass;
297
+ }
298
+ simple(func, map = undefined) {
299
+ return new NavvySimple(this.requestClass, this.mapClass, func.call(this.requestClass), map);
300
+ }
301
+ simpleWithArg(func, arg, map = undefined) {
302
+ return new NavvySimple(this.requestClass, this.mapClass, func.call(this.requestClass, arg), map);
303
+ }
304
+ PagNav(func, arg, map = undefined) {
305
+ return new NavvyPagNav(this.requestClass, this.mapClass, func, arg, map);
306
+ }
307
+ PagNavTasks(func, arg, map = undefined) {
308
+ return new NavvyPagNavTasks(this.requestClass, this.mapClass, func, arg, map);
309
+ }
310
+ PagNavWithUselessKey(func, arg, map = undefined) {
311
+ return new NavvyPagNavWithUselessKey(this.requestClass, this.mapClass, func, arg, map);
312
+ }
313
+ alterPagNav(func, arg, map = undefined) {
314
+ return new NavvyAlterPagNav(this.requestClass, this.mapClass, func, arg, map);
315
+ }
316
+ }
317
+
318
+ const $get = 'get';
319
+ const $add = 'add';
320
+ const $set = 'set';
321
+ const $event = 'event';
322
+ const $update = 'update';
323
+ const $user = 'user';
324
+ const $task = 'task';
325
+ const $calendar = 'calendar';
326
+ const $meeting = 'meeting';
327
+ const $list = 'list';
328
+ const $search = 'search';
329
+ const $accessibility = 'accessibility';
330
+ const $delete = 'delete';
331
+ const $nearest = 'nearest';
332
+ const $params = 'params';
333
+ const $status = 'status';
334
+ const $resource = 'resource';
335
+ const $booking = 'booking';
336
+ const $section = 'section';
337
+ const $settings = 'settings';
338
+ const $tasks = 'tasks';
339
+ const $elapseditem = 'elapseditem';
340
+ const $getlist = 'getlist';
341
+ const $approve = 'approve';
342
+ const $complete = 'complete';
343
+ const $counters = 'counters';
344
+ const $defer = 'defer';
345
+ const $delegate = 'delegate';
346
+ const $disapprove = 'disapprove';
347
+ const $favorite = 'favorite';
348
+ const $files = 'files';
349
+ const $file = 'file';
350
+ const $attach = 'attach';
351
+ const $field = 'field';
352
+ const $getFields = 'get' + $field + 's';
353
+ const $getaccess = 'getaccess';
354
+ const $history = 'history';
355
+ const $pause = 'pause';
356
+ const $renew = 'renew';
357
+ const $start = 'start';
358
+ const $result = 'result';
359
+ const $planner = 'planner';
360
+ const $disk = 'disk';
361
+ const $rename = 'rename';
362
+ const $markdeleted = 'markdeleted';
363
+ const $restore = 'restore';
364
+ const $folder = 'folder';
365
+ const $getchildren = 'getchildren';
366
+ const $copyto = 'copyto';
367
+ const $moveto = 'moveto';
368
+ const $uploadfile = 'uploadfile';
369
+ const $storage = 'storage';
370
+ const $getTypes = 'getTypes';
371
+ const $stages = 'stages';
372
+ const $getmanifest = 'getmanifest';
373
+ const $isactionallowed = 'isactionallowed';
374
+ const $commentitem = 'commentitem';
375
+ const $department = 'department';
376
+ const $sonet_group = 'sonet_group';
377
+ const $create = 'create';
378
+ const $feature = 'feature';
379
+ const $access = 'access';
380
+ const $request = 'request';
381
+ const $socialnetwork = 'socialnetwork';
382
+ const $api = 'api';
383
+ const $workgroup = 'workgroup';
384
+ const $log = 'log';
385
+ const $blogpost = 'blogpost';
386
+ const $lists = 'lists';
387
+ const $iblock = 'iblock';
388
+ const $type = 'type';
389
+ const $id = 'id';
390
+ const $element = 'element';
391
+ const $url = 'url';
392
+ const $bizproc = 'bizproc';
393
+ const $workflow = 'workflow';
394
+ const $instances = 'instances';
395
+ const $terminate = '$terminate';
396
+ const $kill = 'kill';
397
+ const $template = 'template';
398
+ const $activity = 'activity';
399
+ const $robot = 'robot';
400
+ const $send = 'send';
401
+ const $share = 'share';
402
+ const $blogcomment = 'blogcomment';
403
+ const $server = 'server';
404
+ const $time = 'time';
405
+ const $chat = 'chat';
406
+ const $message = 'message';
407
+ const $im = 'im';
408
+ const $updateTitle = 'updateTitle';
409
+ const $updateColor = 'updateColor';
410
+ const $updateAvatar = 'updateAvatar';
411
+ const $setOwner = 'setOwner';
412
+ const $mute = 'mute';
413
+
414
+ var partNameMethods$1 = /*#__PURE__*/Object.freeze({
415
+ __proto__: null,
416
+ $access: $access,
417
+ $accessibility: $accessibility,
418
+ $activity: $activity,
419
+ $add: $add,
420
+ $api: $api,
421
+ $approve: $approve,
422
+ $attach: $attach,
423
+ $bizproc: $bizproc,
424
+ $blogcomment: $blogcomment,
425
+ $blogpost: $blogpost,
426
+ $booking: $booking,
427
+ $calendar: $calendar,
428
+ $chat: $chat,
429
+ $commentitem: $commentitem,
430
+ $complete: $complete,
431
+ $copyto: $copyto,
432
+ $counters: $counters,
433
+ $create: $create,
434
+ $defer: $defer,
435
+ $delegate: $delegate,
436
+ $delete: $delete,
437
+ $department: $department,
438
+ $disapprove: $disapprove,
439
+ $disk: $disk,
440
+ $elapseditem: $elapseditem,
441
+ $element: $element,
442
+ $event: $event,
443
+ $favorite: $favorite,
444
+ $feature: $feature,
445
+ $field: $field,
446
+ $file: $file,
447
+ $files: $files,
448
+ $folder: $folder,
449
+ $get: $get,
450
+ $getFields: $getFields,
451
+ $getTypes: $getTypes,
452
+ $getaccess: $getaccess,
453
+ $getchildren: $getchildren,
454
+ $getlist: $getlist,
455
+ $getmanifest: $getmanifest,
456
+ $history: $history,
457
+ $iblock: $iblock,
458
+ $id: $id,
459
+ $im: $im,
460
+ $instances: $instances,
461
+ $isactionallowed: $isactionallowed,
462
+ $kill: $kill,
463
+ $list: $list,
464
+ $lists: $lists,
465
+ $log: $log,
466
+ $markdeleted: $markdeleted,
467
+ $meeting: $meeting,
468
+ $message: $message,
469
+ $moveto: $moveto,
470
+ $mute: $mute,
471
+ $nearest: $nearest,
472
+ $params: $params,
473
+ $pause: $pause,
474
+ $planner: $planner,
475
+ $rename: $rename,
476
+ $renew: $renew,
477
+ $request: $request,
478
+ $resource: $resource,
479
+ $restore: $restore,
480
+ $result: $result,
481
+ $robot: $robot,
482
+ $search: $search,
483
+ $section: $section,
484
+ $send: $send,
485
+ $server: $server,
486
+ $set: $set,
487
+ $setOwner: $setOwner,
488
+ $settings: $settings,
489
+ $share: $share,
490
+ $socialnetwork: $socialnetwork,
491
+ $sonet_group: $sonet_group,
492
+ $stages: $stages,
493
+ $start: $start,
494
+ $status: $status,
495
+ $storage: $storage,
496
+ $task: $task,
497
+ $tasks: $tasks,
498
+ $template: $template,
499
+ $terminate: $terminate,
500
+ $time: $time,
501
+ $type: $type,
502
+ $update: $update,
503
+ $updateAvatar: $updateAvatar,
504
+ $updateColor: $updateColor,
505
+ $updateTitle: $updateTitle,
506
+ $uploadfile: $uploadfile,
507
+ $url: $url,
508
+ $user: $user,
509
+ $workflow: $workflow,
510
+ $workgroup: $workgroup
511
+ });
512
+
513
+ class CookiesServices {
514
+ static get(name) {
515
+ const results = document.cookie.match('(^|;) ?' + name + '=([^;]*)(;|$)');
516
+ if (results)
517
+ return results[2];
518
+ else
519
+ return '';
520
+ }
521
+ static set(name, value, age = 0) {
522
+ let string = name + '=' + value + ';';
523
+ if (age) {
524
+ string += ' max-age=' + age;
525
+ }
526
+ string += '; SameSite=None; Secure';
527
+ document.cookie = string;
528
+ }
529
+ static setObj(name, value, age = 0) {
530
+ let string = name + '=' + JSON.stringify(value) + ';';
531
+ if (age) {
532
+ string += ' max-age=' + age;
533
+ }
534
+ string += '; SameSite=None; Secure';
535
+ document.cookie = string;
536
+ }
537
+ static getObj(name) {
538
+ const results = document.cookie.match('(^|;) ?' + name + '=([^;]*)(;|$)');
539
+ if (results) {
540
+ return JSON.parse(results[2]);
541
+ }
542
+ return false;
543
+ }
544
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: CookiesServices, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
545
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: CookiesServices, providedIn: 'root' }); }
546
+ }
547
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: CookiesServices, decorators: [{
548
+ type: Injectable,
549
+ args: [{
550
+ providedIn: 'root'
551
+ }]
552
+ }] });
553
+
554
+ const time = {
555
+ oneDayMilliseconds: 1000 * 60 * 60 * 24
556
+ };
557
+
558
+ class BaseServices {
559
+ constructor(BX_REST_SETTINGS) {
560
+ this.BX_REST_SETTINGS = BX_REST_SETTINGS;
561
+ }
562
+ toStr(val) {
563
+ return (val) ? String(val) : '';
564
+ }
565
+ toNum(val) {
566
+ return (val && Number(val)) ? Number(val) : 0;
567
+ }
568
+ toDate(val, format, opt) {
569
+ if (val instanceof Date) {
570
+ return val;
571
+ }
572
+ else if (typeof val == 'string') {
573
+ if (format) {
574
+ if (opt) {
575
+ return DateTime.fromFormat(val, format, opt).toJSDate();
576
+ }
577
+ return DateTime.fromFormat(val, format).toJSDate();
578
+ }
579
+ else {
580
+ return new Date(val);
581
+ }
582
+ }
583
+ else if (typeof val == 'number') {
584
+ return new Date(val);
585
+ }
586
+ console.error('Wrong date format', val, format);
587
+ throw 'Wrong date format';
588
+ }
589
+ getBXStrTime(date) {
590
+ return this.toISOStringWithTimezone(date);
591
+ }
592
+ toISOStringWithTimezone(date) {
593
+ const tzOffset = -date.getTimezoneOffset();
594
+ const diff = tzOffset >= 0 ? '+' : '-';
595
+ const pad = (n) => `${Math.floor(Math.abs(n))}`.padStart(2, '0');
596
+ return date.getFullYear() +
597
+ '-' + pad(date.getMonth() + 1) +
598
+ '-' + pad(date.getDate()) +
599
+ 'T' + pad(date.getHours()) +
600
+ ':' + pad(date.getMinutes()) +
601
+ ':' + pad(date.getSeconds()) +
602
+ diff + pad(tzOffset / 60) +
603
+ ':' + pad(tzOffset % 60);
604
+ }
605
+ ;
606
+ toBool(val) {
607
+ switch (typeof val) {
608
+ case 'string':
609
+ val = val.toLowerCase();
610
+ if (val === 'n' || val === 'y') { // битриксовые понятия о bool
611
+ return val === 'y';
612
+ }
613
+ else if (val === 'true' || val === 'false') { // битриксовые понятия о bool
614
+ return val === 'true';
615
+ }
616
+ else {
617
+ return false;
618
+ }
619
+ default:
620
+ return Boolean(val);
621
+ }
622
+ }
623
+ toBXYorN(val) {
624
+ return (val) ? 'Y' : 'N';
625
+ }
626
+ typeof(val) {
627
+ return typeof val;
628
+ }
629
+ typeDefClass(val) {
630
+ if (val) {
631
+ if (val instanceof Date) {
632
+ return 'date';
633
+ }
634
+ return undefined;
635
+ }
636
+ else {
637
+ return null;
638
+ }
639
+ }
640
+ toJSON(val) {
641
+ return JSON.stringify(val);
642
+ }
643
+ fromJSON(val) {
644
+ return JSON.parse(val);
645
+ }
646
+ prepareBaseAddress(url, add = '') {
647
+ if (url.search('https://') !== 0 && url.search('http://')) {
648
+ url = 'https://' + url;
649
+ }
650
+ if (url.lastIndexOf('/') !== (url.length - 1)) {
651
+ url = url + '/';
652
+ }
653
+ url = url + add;
654
+ return url;
655
+ }
656
+ getHomeAddress() {
657
+ return this.prepareBaseAddress(this.BX_REST_SETTINGS.urls.home);
658
+ }
659
+ dateDiff(a, b) {
660
+ return new Date(a.valueOf() - b.valueOf());
389
661
  }
390
662
  dateDiffInDays(a, b) {
391
663
  return Math.floor(this.dateDiff(a, b).valueOf() / time.oneDayMilliseconds);
@@ -966,10 +1238,12 @@ class HttpBXServices extends HttpServices {
966
1238
  return res;
967
1239
  }
968
1240
  mapBranchResult(res) {
969
- return Object.assign([], ...res.map(i => (i.result && i.result.result) ? i.result.result : undefined));
1241
+ return Object.assign([], ...res.map(i => (instanceOfiBXRestAnswerSuccess(i) && instanceOfiBXRestAnswerSuccess(i.result)) ? i.result.result : undefined));
970
1242
  }
971
1243
  mapBranchResultWithoutKey(res) {
972
- return flatten(Object.assign([], ...res.map(i => (i.result && i.result.result) ? i.result.result : undefined)));
1244
+ return flatten(Object.assign([], ...res.map(i => (instanceOfiBXRestAnswerSuccess(i) && instanceOfiBXRestAnswerSuccess(i.result))
1245
+ ? i.result.result
1246
+ : undefined)));
973
1247
  }
974
1248
  /**
975
1249
  * Основной метод для запросов
@@ -1087,14 +1361,8 @@ class BXRestUser {
1087
1361
  get(params = {}) {
1088
1362
  return this.http.post(this.url.get, params);
1089
1363
  }
1090
- current(update = false) {
1091
- let request = this.http.post(this.url.current, {});
1092
- if (update) {
1093
- return request;
1094
- }
1095
- else {
1096
- return request.pipe(share());
1097
- }
1364
+ current() {
1365
+ return this.http.post(this.url.current, {});
1098
1366
  }
1099
1367
  update(user) {
1100
1368
  return this.http.post(this.url.update, user);
@@ -1197,7 +1465,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImpo
1197
1465
  }]
1198
1466
  }], ctorParameters: function () { return [{ type: BXRestListsElement }, { type: BXRestListsField }, { type: HttpBXServices }]; } });
1199
1467
 
1200
- class BXRestTaskElapseditem {
1468
+ class BXRestTaskElapsedItem {
1201
1469
  constructor(http) {
1202
1470
  this.http = http;
1203
1471
  this.url = {
@@ -1245,10 +1513,10 @@ class BXRestTaskElapseditem {
1245
1513
  isActionAllowed(param) {
1246
1514
  return this.http.post(this.url.isactionallowed, param);
1247
1515
  }
1248
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestTaskElapseditem, deps: [{ token: HttpBXServices }], target: i0.ɵɵFactoryTarget.Injectable }); }
1249
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestTaskElapseditem, providedIn: 'root' }); }
1516
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestTaskElapsedItem, deps: [{ token: HttpBXServices }], target: i0.ɵɵFactoryTarget.Injectable }); }
1517
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestTaskElapsedItem, providedIn: 'root' }); }
1250
1518
  }
1251
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestTaskElapseditem, decorators: [{
1519
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestTaskElapsedItem, decorators: [{
1252
1520
  type: Injectable,
1253
1521
  args: [{
1254
1522
  providedIn: 'root'
@@ -1311,12 +1579,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImpo
1311
1579
  }], ctorParameters: function () { return [{ type: HttpBXServices }]; } });
1312
1580
 
1313
1581
  class BXRestTask {
1314
- constructor(elapseditem, commentitem, planner) {
1315
- this.elapseditem = elapseditem;
1316
- this.commentitem = commentitem;
1582
+ constructor(elapsedItem, commentItem, planner) {
1583
+ this.elapsedItem = elapsedItem;
1584
+ this.commentItem = commentItem;
1317
1585
  this.planner = planner;
1318
1586
  }
1319
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestTask, deps: [{ token: BXRestTaskElapseditem }, { token: BXRestTaskCommentItem }, { token: BXRestTaskPlanner }], target: i0.ɵɵFactoryTarget.Injectable }); }
1587
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestTask, deps: [{ token: BXRestTaskElapsedItem }, { token: BXRestTaskCommentItem }, { token: BXRestTaskPlanner }], target: i0.ɵɵFactoryTarget.Injectable }); }
1320
1588
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestTask, providedIn: 'root' }); }
1321
1589
  }
1322
1590
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestTask, decorators: [{
@@ -1324,7 +1592,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImpo
1324
1592
  args: [{
1325
1593
  providedIn: 'root'
1326
1594
  }]
1327
- }], ctorParameters: function () { return [{ type: BXRestTaskElapseditem }, { type: BXRestTaskCommentItem }, { type: BXRestTaskPlanner }]; } });
1595
+ }], ctorParameters: function () { return [{ type: BXRestTaskElapsedItem }, { type: BXRestTaskCommentItem }, { type: BXRestTaskPlanner }]; } });
1328
1596
 
1329
1597
  class BXRestTasksTaskResult {
1330
1598
  constructor(http) {
@@ -1508,7 +1776,7 @@ class BXRestTasksTask {
1508
1776
  getFields() {
1509
1777
  return this.http.post(this.url.getFields);
1510
1778
  }
1511
- getaccess(param) {
1779
+ getAccess(param) {
1512
1780
  return this.http.post(this.url.getaccess, param);
1513
1781
  }
1514
1782
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestTasksTask, deps: [{ token: BXRestTasksTaskResult }, { token: HttpBXServices }], target: i0.ɵɵFactoryTarget.Injectable }); }
@@ -1573,33 +1841,114 @@ class BXRestDiskFolder {
1573
1841
  constructor(http) {
1574
1842
  this.http = http;
1575
1843
  this.url = {
1576
- getfields: [$disk, $folder, $getFields],
1844
+ getFields: [$disk, $folder, $getFields],
1577
1845
  get: [$disk, $folder, $get],
1578
- getchildren: [$disk, $folder, $getchildren],
1579
- addsubfolder: [$disk, $folder, 'addsubfolder'],
1580
- copyto: [$disk, $folder, $copyto],
1581
- moveto: [$disk, $folder, $moveto],
1846
+ getChildren: [$disk, $folder, $getchildren],
1847
+ addSubFolder: [$disk, $folder, 'addsubfolder'],
1848
+ copyTo: [$disk, $folder, $copyto],
1849
+ moveTo: [$disk, $folder, $moveto],
1582
1850
  rename: [$disk, $folder, $rename],
1583
- deletetree: [$disk, $folder, 'deletetree'],
1584
- markdeleted: [$disk, $folder, $markdeleted],
1851
+ deleteTree: [$disk, $folder, 'deletetree'],
1852
+ markDeleted: [$disk, $folder, $markdeleted],
1585
1853
  restore: [$disk, $folder, $restore],
1586
- uploadfile: [$disk, $folder, $uploadfile],
1587
- getExternalLink: [$disk, $folder, 'getExternalLink'] // Метод возвращает публичную ссылку
1854
+ uploadFile: [$disk, $folder, $uploadfile],
1855
+ getExternalLink: [$disk, $folder, 'getExternalLink']
1588
1856
  };
1589
1857
  }
1590
- uploadfile(id, fileContent) {
1591
- return this.http.post(this.url.uploadfile, {
1592
- id: id,
1593
- fileContent: fileContent,
1594
- data: {
1595
- NAME: fileContent[0]
1596
- } // Обязательное поле NAME - имя нового файла
1597
- // generateUniqueName Необязательный, по умолчанию false. При указании true, для загружаемого файла будет уникализировано имя, добавлением суффикса (1), (2) и т.п.
1598
- // rights Необязательный, по умолчанию пустой массив. Массив прав доступа на загружаемый файл.
1599
- });
1858
+ /**
1859
+ * Возвращает папку по идентификатору
1860
+ *
1861
+ * @param id
1862
+ */
1863
+ get(id) {
1864
+ return this.http.post(this.url.get, { id: id });
1865
+ }
1866
+ /**
1867
+ * Создает дочернюю папку
1868
+ *
1869
+ * @param param
1870
+ */
1871
+ addSubFolder(param) {
1872
+ return this.http.post(this.url.addSubFolder, param);
1600
1873
  }
1601
- getchildren(id) {
1602
- return this.http.post(this.url.getchildren, { id: id });
1874
+ /**
1875
+ * Копирует папку в указанную папку
1876
+ *
1877
+ * @param param
1878
+ */
1879
+ copyTo(param) {
1880
+ return this.http.post(this.url.copyTo, param);
1881
+ }
1882
+ /**
1883
+ * Перемещает папку в указанную папку
1884
+ *
1885
+ * @param param
1886
+ */
1887
+ moveTo(param) {
1888
+ return this.http.post(this.url.moveTo, param);
1889
+ }
1890
+ /**
1891
+ * Переименовывает папку
1892
+ *
1893
+ * @param param
1894
+ */
1895
+ rename(param) {
1896
+ return this.http.post(this.url.rename, param);
1897
+ }
1898
+ /**
1899
+ * Уничтожает папку и всё её дочерние элементы навсегда
1900
+ * В ответе 'result': true - успешное уничтожение папки
1901
+ *
1902
+ * @param id
1903
+ */
1904
+ deleteTree(id) {
1905
+ return this.http.post(this.url.deleteTree, { id: id });
1906
+ }
1907
+ /**
1908
+ * Перемещает папку в корзину
1909
+ *
1910
+ * @param id
1911
+ */
1912
+ markDeleted(id) {
1913
+ return this.http.post(this.url.markDeleted, { id: id });
1914
+ }
1915
+ /**
1916
+ * Восстанавливает папку из корзины
1917
+ *
1918
+ * @param id
1919
+ */
1920
+ restore(id) {
1921
+ return this.http.post(this.url.restore, { id: id });
1922
+ }
1923
+ /**
1924
+ * Метод возвращает публичную ссылку
1925
+ *
1926
+ * @param id
1927
+ */
1928
+ getExternalLink(id) {
1929
+ return this.http.post(this.url.restore, { id: id });
1930
+ }
1931
+ /**
1932
+ * Возвращает описание полей папки
1933
+ */
1934
+ getFields() {
1935
+ return this.http.post(this.url.getFields);
1936
+ }
1937
+ /**
1938
+ * Загружает новый файл в указанную папку
1939
+ *
1940
+ * @param param
1941
+ */
1942
+ uploadFile(param) {
1943
+ return this.http.post(this.url.uploadFile, param);
1944
+ }
1945
+ /**
1946
+ * Возвращает список файлов и папок, которые находятся непосредственно в папке
1947
+ *
1948
+ * @param id
1949
+ */
1950
+ getChildren(id) {
1951
+ return this.http.post(this.url.getChildren, { id: id });
1603
1952
  }
1604
1953
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestDiskFolder, deps: [{ token: HttpBXServices }], target: i0.ɵɵFactoryTarget.Injectable }); }
1605
1954
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestDiskFolder, providedIn: 'root' }); }
@@ -1686,7 +2035,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImpo
1686
2035
  }]
1687
2036
  }], ctorParameters: function () { return [{ type: HttpBXServices }]; } });
1688
2037
 
1689
- class BXRestBizprocWorkflow {
2038
+ class BXRestBizProcWorkflow {
1690
2039
  constructor(instances, template, http) {
1691
2040
  this.instances = instances;
1692
2041
  this.template = template;
@@ -1701,17 +2050,17 @@ class BXRestBizprocWorkflow {
1701
2050
  start(param) {
1702
2051
  return this.http.post(this.url.start, param);
1703
2052
  }
1704
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestBizprocWorkflow, deps: [{ token: BXRestBizprocWorkflowInstance }, { token: BXRestBizprocWorkflowTemplate }, { token: HttpBXServices }], target: i0.ɵɵFactoryTarget.Injectable }); }
1705
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestBizprocWorkflow, providedIn: 'root' }); }
2053
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestBizProcWorkflow, deps: [{ token: BXRestBizprocWorkflowInstance }, { token: BXRestBizprocWorkflowTemplate }, { token: HttpBXServices }], target: i0.ɵɵFactoryTarget.Injectable }); }
2054
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestBizProcWorkflow, providedIn: 'root' }); }
1706
2055
  }
1707
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestBizprocWorkflow, decorators: [{
2056
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestBizProcWorkflow, decorators: [{
1708
2057
  type: Injectable,
1709
2058
  args: [{
1710
2059
  providedIn: 'root'
1711
2060
  }]
1712
2061
  }], ctorParameters: function () { return [{ type: BXRestBizprocWorkflowInstance }, { type: BXRestBizprocWorkflowTemplate }, { type: HttpBXServices }]; } });
1713
2062
 
1714
- class BXRestBizprocActivity {
2063
+ class BXRestBizProcActivity {
1715
2064
  constructor() {
1716
2065
  this.url = {
1717
2066
  add: [$bizproc, $activity, $add],
@@ -1721,34 +2070,34 @@ class BXRestBizprocActivity {
1721
2070
  log: [$bizproc, $activity, $log] // Записывает информацию в лог бизнес-процесса
1722
2071
  };
1723
2072
  }
1724
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestBizprocActivity, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1725
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestBizprocActivity, providedIn: 'root' }); }
2073
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestBizProcActivity, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
2074
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestBizProcActivity, providedIn: 'root' }); }
1726
2075
  }
1727
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestBizprocActivity, decorators: [{
2076
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestBizProcActivity, decorators: [{
1728
2077
  type: Injectable,
1729
2078
  args: [{
1730
2079
  providedIn: 'root'
1731
2080
  }]
1732
2081
  }] });
1733
2082
 
1734
- class BXRestBizprocTask {
2083
+ class BXRestBizProcTask {
1735
2084
  constructor() {
1736
2085
  this.url = {
1737
2086
  complete: [$bizproc, $task, $complete],
1738
2087
  list: [$bizproc, $task, $list], // Возвращает список заданий бизнес-процессов
1739
2088
  };
1740
2089
  }
1741
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestBizprocTask, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1742
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestBizprocTask, providedIn: 'root' }); }
2090
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestBizProcTask, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
2091
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestBizProcTask, providedIn: 'root' }); }
1743
2092
  }
1744
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestBizprocTask, decorators: [{
2093
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestBizProcTask, decorators: [{
1745
2094
  type: Injectable,
1746
2095
  args: [{
1747
2096
  providedIn: 'root'
1748
2097
  }]
1749
2098
  }] });
1750
2099
 
1751
- class BXRestBizprocRobot {
2100
+ class BXRestBizProcRobot {
1752
2101
  constructor() {
1753
2102
  this.url = {
1754
2103
  add: [$bizproc, $robot, $add],
@@ -1757,33 +2106,33 @@ class BXRestBizprocRobot {
1757
2106
  update: [$bizproc, $robot, $update] // Обновляет поля робота
1758
2107
  };
1759
2108
  }
1760
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestBizprocRobot, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1761
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestBizprocRobot, providedIn: 'root' }); }
2109
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestBizProcRobot, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
2110
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestBizProcRobot, providedIn: 'root' }); }
1762
2111
  }
1763
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestBizprocRobot, decorators: [{
2112
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestBizProcRobot, decorators: [{
1764
2113
  type: Injectable,
1765
2114
  args: [{
1766
2115
  providedIn: 'root'
1767
2116
  }]
1768
2117
  }] });
1769
2118
 
1770
- class BXRestBizprocEvent {
2119
+ class BXRestBizProcEvent {
1771
2120
  constructor() {
1772
2121
  this.url = {
1773
2122
  send: [$bizproc, $event, $send], // Возвращает действию выходные параметры, заданные в описании действия
1774
2123
  };
1775
2124
  }
1776
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestBizprocEvent, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1777
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestBizprocEvent, providedIn: 'root' }); }
2125
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestBizProcEvent, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
2126
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestBizProcEvent, providedIn: 'root' }); }
1778
2127
  }
1779
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestBizprocEvent, decorators: [{
2128
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestBizProcEvent, decorators: [{
1780
2129
  type: Injectable,
1781
2130
  args: [{
1782
2131
  providedIn: 'root'
1783
2132
  }]
1784
2133
  }] });
1785
2134
 
1786
- class BXRestBizproc {
2135
+ class BXRestBizProc {
1787
2136
  constructor(workflow, activity, task, robot, event) {
1788
2137
  this.workflow = workflow;
1789
2138
  this.activity = activity;
@@ -1791,15 +2140,15 @@ class BXRestBizproc {
1791
2140
  this.robot = robot;
1792
2141
  this.event = event;
1793
2142
  }
1794
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestBizproc, deps: [{ token: BXRestBizprocWorkflow }, { token: BXRestBizprocActivity }, { token: BXRestBizprocTask }, { token: BXRestBizprocRobot }, { token: BXRestBizprocEvent }], target: i0.ɵɵFactoryTarget.Injectable }); }
1795
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestBizproc, providedIn: 'root' }); }
2143
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestBizProc, deps: [{ token: BXRestBizProcWorkflow }, { token: BXRestBizProcActivity }, { token: BXRestBizProcTask }, { token: BXRestBizProcRobot }, { token: BXRestBizProcEvent }], target: i0.ɵɵFactoryTarget.Injectable }); }
2144
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestBizProc, providedIn: 'root' }); }
1796
2145
  }
1797
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestBizproc, decorators: [{
2146
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestBizProc, decorators: [{
1798
2147
  type: Injectable,
1799
2148
  args: [{
1800
2149
  providedIn: 'root'
1801
2150
  }]
1802
- }], ctorParameters: function () { return [{ type: BXRestBizprocWorkflow }, { type: BXRestBizprocActivity }, { type: BXRestBizprocTask }, { type: BXRestBizprocRobot }, { type: BXRestBizprocEvent }]; } });
2151
+ }], ctorParameters: function () { return [{ type: BXRestBizProcWorkflow }, { type: BXRestBizProcActivity }, { type: BXRestBizProcTask }, { type: BXRestBizProcRobot }, { type: BXRestBizProcEvent }]; } });
1803
2152
 
1804
2153
  class BXRestLogBlogPost {
1805
2154
  constructor(http) {
@@ -1969,385 +2318,136 @@ class BXRestSonetGroup {
1969
2318
  // {
1970
2319
  // order: select,
1971
2320
  // filter: filter
1972
- // }
1973
- // )
1974
- // }
1975
- get(param = {}) {
1976
- return this.http.post(this.url.get, param);
1977
- }
1978
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestSonetGroup, deps: [{ token: HttpBXServices }], target: i0.ɵɵFactoryTarget.Injectable }); }
1979
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestSonetGroup, providedIn: 'root' }); }
1980
- }
1981
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestSonetGroup, decorators: [{
1982
- type: Injectable,
1983
- args: [{
1984
- providedIn: 'root'
1985
- }]
1986
- }], ctorParameters: function () { return [{ type: HttpBXServices }]; } });
1987
-
1988
- class BXRestServer {
1989
- constructor(http) {
1990
- this.http = http;
1991
- this.url = {
1992
- time: [$server, $time]
1993
- };
1994
- }
1995
- time() {
1996
- return this.http.post(this.url.time);
1997
- }
1998
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestServer, deps: [{ token: HttpBXServices }], target: i0.ɵɵFactoryTarget.Injectable }); }
1999
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestServer, providedIn: 'root' }); }
2000
- }
2001
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestServer, decorators: [{
2002
- type: Injectable,
2003
- args: [{
2004
- providedIn: 'root'
2005
- }]
2006
- }], ctorParameters: function () { return [{ type: HttpBXServices }]; } });
2007
-
2008
- class BXRestDepartment {
2009
- constructor(http) {
2010
- this.http = http;
2011
- this.url = {
2012
- get: [$department, $get],
2013
- del: [$department, $delete],
2014
- add: [$department, $add],
2015
- update: [$department, $update]
2016
- };
2017
- }
2321
+ // }
2322
+ // )
2323
+ // }
2018
2324
  get(param = {}) {
2019
2325
  return this.http.post(this.url.get, param);
2020
2326
  }
2021
- add(param) {
2022
- return this.http.post(this.url.add, param);
2023
- }
2024
- del(param) {
2025
- return this.http.post(this.url.del, param);
2026
- }
2027
- update(param) {
2028
- return this.http.post(this.url.update, param);
2029
- }
2030
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestDepartment, deps: [{ token: HttpBXServices }], target: i0.ɵɵFactoryTarget.Injectable }); }
2031
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestDepartment, providedIn: 'root' }); }
2327
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestSonetGroup, deps: [{ token: HttpBXServices }], target: i0.ɵɵFactoryTarget.Injectable }); }
2328
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestSonetGroup, providedIn: 'root' }); }
2032
2329
  }
2033
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestDepartment, decorators: [{
2330
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestSonetGroup, decorators: [{
2034
2331
  type: Injectable,
2035
2332
  args: [{
2036
2333
  providedIn: 'root'
2037
2334
  }]
2038
2335
  }], ctorParameters: function () { return [{ type: HttpBXServices }]; } });
2039
2336
 
2040
- class BXRestImChat {
2337
+ class BXRestServer {
2041
2338
  constructor(http) {
2042
2339
  this.http = http;
2043
2340
  this.url = {
2044
- add: [$im, $chat, $add],
2045
- // list: [$im, $chat, $user, $list],
2046
- // add: [$im, $chat, $user, $add],
2047
- // delete: [$im, $chat, $user, $delete],
2048
- updateTitle: [$im, $chat, $updateTitle],
2049
- updateColor: [$im, $chat, $updateColor],
2050
- updateAvatar: [$im, $chat, $updateAvatar],
2051
- setOwner: [$im, $chat, $setOwner],
2052
- get: [$im, $chat, $get],
2053
- mute: [$im, $chat, $mute],
2341
+ time: [$server, $time]
2054
2342
  };
2055
2343
  }
2056
- add(param) {
2057
- return this.http.post(this.url.add, param);
2058
- }
2059
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestImChat, deps: [{ token: HttpBXServices }], target: i0.ɵɵFactoryTarget.Injectable }); }
2060
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestImChat, providedIn: 'root' }); }
2061
- }
2062
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestImChat, decorators: [{
2063
- type: Injectable,
2064
- args: [{
2065
- providedIn: 'root'
2066
- }]
2067
- }], ctorParameters: function () { return [{ type: HttpBXServices }]; } });
2068
-
2069
- class BXRestIm {
2070
- constructor(chat) {
2071
- this.chat = chat;
2072
- }
2073
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestIm, deps: [{ token: BXRestImChat }], target: i0.ɵɵFactoryTarget.Injectable }); }
2074
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestIm, providedIn: 'root' }); }
2075
- }
2076
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestIm, decorators: [{
2077
- type: Injectable,
2078
- args: [{
2079
- providedIn: 'root'
2080
- }]
2081
- }], ctorParameters: function () { return [{ type: BXRestImChat }]; } });
2082
-
2083
- class NavvySupport {
2084
- constructor(requestClass, mapClass) {
2085
- this.requestClass = requestClass;
2086
- this.mapClass = mapClass;
2087
- this.pageSize = 50; // больше всё равно не дас
2088
- }
2089
- mapAndError(request) {
2090
- return request.pipe(map(v => BXRestMapResult(v)), catchError(err => {
2091
- // this.snackBar.error(errorText)
2092
- return throwError(() => err);
2093
- }));
2094
- }
2095
- mapResult(param, map) {
2096
- return (param && param.result) ? Object.assign(param, { result: map(param.result) }) : undefined;
2097
- }
2098
- }
2099
-
2100
- class NavvySimple extends NavvySupport {
2101
- constructor(requestClass, mapClass, func, map = undefined
2102
- // private snackBar: SnackBarService,
2103
- ) {
2104
- super(requestClass, mapClass);
2105
- this.func = func;
2106
- this.map = map;
2107
- }
2108
- resultVanilla() {
2109
- return this.func;
2110
- }
2111
- mapForVanilla() {
2112
- return this.func.pipe(map(v => (v && v.result && this.map) ? Object.assign(v, { result: this.map.call(this.mapClass, v.result) }) : v));
2113
- }
2114
- result() {
2115
- return this.mapAndError(this.func).pipe(map(v => (v && this.map) ? this.map.call(this.mapClass, v) : v));
2116
- }
2117
- }
2118
-
2119
- class NavvyPagNavBase extends NavvySupport {
2120
- constructor(requestClass, mapClass, func, param, map = undefined) {
2121
- super(requestClass, mapClass);
2122
- this.func = func;
2123
- this.param = param;
2124
- this.map = map;
2125
- // load: number = 0
2126
- this.load$ = new ReplaySubject(1);
2127
- this.load$.next(0.001);
2128
- }
2129
- resultVanilla() {
2130
- return this.func.call(this.requestClass, this.param);
2131
- }
2132
- mapForVanilla() {
2133
- return this.mapForVanillaEnd(this.func, this.param);
2134
- }
2135
- mapForVanillaEnd(func, param) {
2136
- return func.call(this.requestClass, param).pipe(map(v => (v && v.result && this.map) ? Object.assign(v, { result: this.map.call(this.mapClass, v.result) }) : v));
2137
- }
2138
- result() {
2139
- return this.resultEnd(this.func, this.param);
2140
- }
2141
- resultEnd(func, param) {
2142
- return this.mapAndError(func.call(this.requestClass, param)).pipe(map(v => (v && this.map) ? this.map.call(this.mapClass, v) : v));
2143
- }
2144
- }
2145
-
2146
- /**
2147
- * Класс-прослойка-обработчик для методов работающих на альтернативной постраничной навигации тика как методы по
2148
- * затраченному времени на задачи https://dev.1c-bitrix.ru/rest_help/tasks/task/elapseditem/index.php
2149
- *
2150
- * не завершенный класс, работаем от частного к общему
2151
- */
2152
- class NavvyAlterPagNav extends NavvyPagNavBase {
2153
- resultAll() {
2154
- let save = [];
2155
- return this.resultAllEnd()
2156
- .pipe(map(v => {
2157
- if (v) {
2158
- save.push(...v);
2159
- }
2160
- return save;
2161
- }), last(), shareReplay(1));
2162
- }
2163
- resultAllEnd() {
2164
- // return this.mapForVanillaEnd(this.func, this.param)
2165
- return this.resultVanilla().pipe(mergeMap(items => {
2166
- if (items && items.result) {
2167
- if (items.total && items.next) {
2168
- let requests = [];
2169
- for (let i = items.next; i < items.total; i = i + this.pageSize) {
2170
- let paramClone = clone(this.param);
2171
- paramClone.PARAMS = {
2172
- NAV_PARAMS: {
2173
- nPageSize: this.pageSize,
2174
- iNumPage: i / this.pageSize + 1
2175
- }
2176
- };
2177
- requests.push(paramClone);
2178
- }
2179
- return concat(this.mapResultForGetAll(items), from(requests).pipe(concatMap(param => this.resultEnd(this.func, param).pipe(tap(_ => {
2180
- if (param && param.PARAMS && items.total) {
2181
- this.load$.next((param.PARAMS.NAV_PARAMS.iNumPage * this.pageSize + this.pageSize) / items.total);
2182
- }
2183
- })))));
2184
- }
2185
- }
2186
- return this.mapResultForGetAll(items);
2187
- }), catchError(err => {
2188
- // this.snackBar.error("Проблемы с поточным получение затреканого времени")
2189
- console.error(err);
2190
- return throwError(() => err);
2191
- }));
2192
- }
2193
- mapResultForGetAll(items) {
2194
- return (items?.result) ? from([items.result]).pipe(map(v => (v && this.map) ? this.map.call(this.mapClass, v) : v)) : from([]);
2195
- }
2196
- }
2197
-
2198
- // TODO: реализовать загрузку всего в очереди
2199
- class NavvyPagNav extends NavvyPagNavBase {
2200
- resultAll() {
2201
- let save = [];
2202
- return this.resultAllEnd()
2203
- .pipe(map(v => {
2204
- if (v) {
2205
- save.push(...v);
2206
- }
2207
- return save;
2208
- }), last(), shareReplay(1));
2209
- }
2210
- resultAllEnd() {
2211
- // return this.mapForVanillaEnd(this.func, this.param)
2212
- return this.resultVanilla().pipe(mergeMap(items => {
2213
- if (items && items.result) {
2214
- if (items.total && items.next) {
2215
- let requests = [];
2216
- for (let i = items.next; i < items.total; i = i + this.pageSize) {
2217
- let paramClone = clone(this.param);
2218
- paramClone.start = i;
2219
- requests.push(paramClone);
2220
- }
2221
- return concat(this.mapResultForGetAll(items), from(requests).pipe(concatMap(param => this.resultEnd(this.func, param))));
2222
- }
2223
- }
2224
- return this.mapResultForGetAll(items);
2225
- }), catchError(err => {
2226
- // this.snackBar.error("Проблемы с поточным получение затреканого времени")
2227
- console.error(err);
2228
- return throwError(() => err);
2229
- }));
2230
- }
2231
- mapResultForGetAll(items) {
2232
- return (items?.result) ? from([items.result]).pipe(map(v => (v && this.map) ? this.map.call(this.mapClass, v) : v)) : from([]);
2233
- }
2234
- }
2235
-
2236
- class NavvyPagNavWithUselessKey extends NavvyPagNavBase {
2237
- resultAll() {
2238
- let save = [];
2239
- return this.resultAllEnd()
2240
- .pipe(map(v => {
2241
- if (v) {
2242
- save.push(...v);
2243
- }
2244
- return save;
2245
- }), last());
2246
- }
2247
- resultAllEnd() {
2248
- return this.mapForVanillaEnd(this.func, this.param).pipe(mergeMap(items => {
2249
- if (items && items.result) {
2250
- if (items.total && items.next) {
2251
- let requests = [];
2252
- for (let i = 0; i < items.total; i = i + this.pageSize) {
2253
- let paramClone = clone(this.param);
2254
- paramClone.start = i;
2255
- requests.push(paramClone);
2256
- }
2257
- /*
2258
- return from(requests.map(param => this.resultEnd(this.func, param))).pipe(
2259
- // toArray(),
2260
- mergeMap(v => {
2261
- return v
2262
- })
2263
- )
2264
- */
2265
- return from(requests).pipe(concatMap(param => this.resultEnd(this.func, param)));
2266
- /*
2267
- return this.getAllTaskElapsedItem(func, param).pipe(
2268
- map(vEnd => {
2269
- if (vEnd && vEnd.result && items.result) {
2270
- return merge(clone(vEnd), {result: [...items.result, ...vEnd.result]})
2271
- }
2272
- return items
2273
- })
2274
- )
2275
- */
2276
- }
2277
- }
2278
- return from([1]).pipe(concatMap(_ => this.resultEnd(this.func, this.param)));
2279
- // return from([BXRestMapResult(items)])
2280
- // as ReturnType<Observable<T | undefined>, Observable<R | undefined>>
2281
- }), catchError(err => {
2282
- // this.snackBar.error("Проблемы с поточным получение затреканого времени")
2283
- console.error(err);
2284
- return throwError(() => err);
2285
- }));
2344
+ time() {
2345
+ return this.http.post(this.url.time);
2286
2346
  }
2287
- }
2347
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestServer, deps: [{ token: HttpBXServices }], target: i0.ɵɵFactoryTarget.Injectable }); }
2348
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestServer, providedIn: 'root' }); }
2349
+ }
2350
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestServer, decorators: [{
2351
+ type: Injectable,
2352
+ args: [{
2353
+ providedIn: 'root'
2354
+ }]
2355
+ }], ctorParameters: function () { return [{ type: HttpBXServices }]; } });
2288
2356
 
2289
- // TODO: реализовать загрузку всего в очереди
2290
- class NavvyPagNavTasks extends NavvyPagNavBase {
2291
- resultAll() {
2292
- let save = [];
2293
- return this.resultAllEnd()
2294
- .pipe(map(v => {
2295
- if (v) {
2296
- save.push(...v);
2297
- }
2298
- return save;
2299
- }), last(), shareReplay(1));
2357
+ class BXRestDepartment {
2358
+ constructor(http) {
2359
+ this.http = http;
2360
+ this.url = {
2361
+ get: [$department, $get],
2362
+ del: [$department, $delete],
2363
+ add: [$department, $add],
2364
+ update: [$department, $update]
2365
+ };
2300
2366
  }
2301
- resultAllEnd() {
2302
- // return this.mapForVanillaEnd(this.func, this.param)
2303
- return this.resultVanilla().pipe(mergeMap(items => {
2304
- if (items && items.result) {
2305
- if (items.total && items.next) {
2306
- let requests = [];
2307
- for (let i = items.next; i < items.total; i = i + this.pageSize) {
2308
- let paramClone = clone(this.param);
2309
- paramClone.start = i;
2310
- requests.push(paramClone);
2311
- }
2312
- return concat(this.mapResultForGetAll(items), from(requests).pipe(concatMap(param => this.resultEnd(this.func, param))));
2313
- }
2314
- }
2315
- return this.mapResultForGetAll(items);
2316
- }), catchError(err => {
2317
- // this.snackBar.error("Проблемы с поточным получение затреканого времени")
2318
- console.error(err);
2319
- return throwError(() => err);
2320
- }));
2367
+ get(param = {}) {
2368
+ return this.http.post(this.url.get, param);
2321
2369
  }
2322
- mapResultForGetAll(items) {
2323
- return (items?.result) ? from([items.result]).pipe(map(v => (v && this.map) ? this.map.call(this.mapClass, v) : v)) : from([]);
2370
+ add(param) {
2371
+ return this.http.post(this.url.add, param);
2324
2372
  }
2325
- }
2326
-
2327
- class Navvy {
2328
- constructor(requestClass, mapClass) {
2329
- this.requestClass = requestClass;
2330
- this.mapClass = mapClass;
2373
+ del(param) {
2374
+ return this.http.post(this.url.del, param);
2331
2375
  }
2332
- simple(func, map = undefined) {
2333
- return new NavvySimple(this.requestClass, this.mapClass, func.call(this.requestClass), map);
2376
+ update(param) {
2377
+ return this.http.post(this.url.update, param);
2334
2378
  }
2335
- simpleWithArg(func, arg, map = undefined) {
2336
- return new NavvySimple(this.requestClass, this.mapClass, func.call(this.requestClass, arg), map);
2379
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestDepartment, deps: [{ token: HttpBXServices }], target: i0.ɵɵFactoryTarget.Injectable }); }
2380
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestDepartment, providedIn: 'root' }); }
2381
+ }
2382
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestDepartment, decorators: [{
2383
+ type: Injectable,
2384
+ args: [{
2385
+ providedIn: 'root'
2386
+ }]
2387
+ }], ctorParameters: function () { return [{ type: HttpBXServices }]; } });
2388
+
2389
+ class BXRestImChat {
2390
+ constructor(http) {
2391
+ this.http = http;
2392
+ this.url = {
2393
+ add: [$im, $chat, $add],
2394
+ // list: [$im, $chat, $user, $list],
2395
+ // add: [$im, $chat, $user, $add],
2396
+ // delete: [$im, $chat, $user, $delete],
2397
+ updateTitle: [$im, $chat, $updateTitle],
2398
+ updateColor: [$im, $chat, $updateColor],
2399
+ updateAvatar: [$im, $chat, $updateAvatar],
2400
+ setOwner: [$im, $chat, $setOwner],
2401
+ get: [$im, $chat, $get],
2402
+ mute: [$im, $chat, $mute],
2403
+ };
2337
2404
  }
2338
- PagNav(func, arg, map = undefined) {
2339
- return new NavvyPagNav(this.requestClass, this.mapClass, func, arg, map);
2405
+ add(param) {
2406
+ return this.http.post(this.url.add, param);
2340
2407
  }
2341
- PagNavTasks(func, arg, map = undefined) {
2342
- return new NavvyPagNavTasks(this.requestClass, this.mapClass, func, arg, map);
2408
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestImChat, deps: [{ token: HttpBXServices }], target: i0.ɵɵFactoryTarget.Injectable }); }
2409
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestImChat, providedIn: 'root' }); }
2410
+ }
2411
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestImChat, decorators: [{
2412
+ type: Injectable,
2413
+ args: [{
2414
+ providedIn: 'root'
2415
+ }]
2416
+ }], ctorParameters: function () { return [{ type: HttpBXServices }]; } });
2417
+
2418
+ class BXRestIm {
2419
+ constructor(chat) {
2420
+ this.chat = chat;
2343
2421
  }
2344
- PagNavWithUselessKey(func, arg, map = undefined) {
2345
- return new NavvyPagNavWithUselessKey(this.requestClass, this.mapClass, func, arg, map);
2422
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestIm, deps: [{ token: BXRestImChat }], target: i0.ɵɵFactoryTarget.Injectable }); }
2423
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestIm, providedIn: 'root' }); }
2424
+ }
2425
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestIm, decorators: [{
2426
+ type: Injectable,
2427
+ args: [{
2428
+ providedIn: 'root'
2429
+ }]
2430
+ }], ctorParameters: function () { return [{ type: BXRestImChat }]; } });
2431
+
2432
+ class BXRestApp {
2433
+ constructor(http) {
2434
+ this.http = http;
2346
2435
  }
2347
- alterPagNav(func, arg, map = undefined) {
2348
- return new NavvyAlterPagNav(this.requestClass, this.mapClass, func, arg, map);
2436
+ /**
2437
+ * Показ информации о приложении. Метод поддерживает безопасный вызов
2438
+ */
2439
+ info() {
2440
+ return this.http.post(['app', 'info']);
2349
2441
  }
2350
- }
2442
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestApp, deps: [{ token: HttpBXServices }], target: i0.ɵɵFactoryTarget.Injectable }); }
2443
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestApp, providedIn: 'root' }); }
2444
+ }
2445
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestApp, decorators: [{
2446
+ type: Injectable,
2447
+ args: [{
2448
+ providedIn: 'root'
2449
+ }]
2450
+ }], ctorParameters: function () { return [{ type: HttpBXServices }]; } });
2351
2451
 
2352
2452
  class BaseMapServices extends BaseServices {
2353
2453
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BaseMapServices, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
@@ -2490,15 +2590,17 @@ class BXRestNavvyUser {
2490
2590
  this.setDefParam(copyParams);
2491
2591
  return this.Navvy.PagNav(this.BXRestUser.get, copyParams, this.BXRestUserMap.get);
2492
2592
  }
2493
- current(update = false) {
2494
- const navvy = new Navvy(this, this.BXRestUserMap);
2495
- return navvy.simpleWithArg(this.self, update, this.BXRestUserMap.current);
2496
- // TODO: разобраться зачем код выше вместо кода ниже и написать коммент
2497
- // return this.Navvy.simpleWithArg(
2498
- // this.self,
2499
- // update,
2500
- // this.BXRestUserMap.current
2501
- // )
2593
+ current() {
2594
+ return this.Navvy.simple(this.BXRestUser.current, this.BXRestUserMap.current);
2595
+ // TODO: подумать о сохранении данных (на будущее, пример код ниже)
2596
+ /*
2597
+ const navvy = new Navvy(this, this.BXRestUserMap)
2598
+ return navvy.simpleWithArg(
2599
+ this.self,
2600
+ update,
2601
+ this.BXRestUserMap.current
2602
+ )
2603
+ */
2502
2604
  }
2503
2605
  /*
2504
2606
  update(user: iBXRestUser, fieldUpdate: string[]) {
@@ -2540,28 +2642,6 @@ class BXRestNavvyUser {
2540
2642
  fields() {
2541
2643
  return this.Navvy.simple(this.BXRestUser.fields);
2542
2644
  }
2543
- self(update = false) {
2544
- if (update) {
2545
- return this.BXRestUser.current(update);
2546
- }
2547
- else {
2548
- let self = SessionStorage.getItem(this.constructor.name + this.self.name);
2549
- if (self) {
2550
- return of(self);
2551
- }
2552
- return this.BXRestUser.current(update)
2553
- .pipe(map(v => {
2554
- if (v) {
2555
- return v;
2556
- }
2557
- return undefined;
2558
- }), shareReplay(1), tap(v => {
2559
- if (v) {
2560
- SessionStorage.setItem(this.constructor.name + this.self.name, v);
2561
- }
2562
- }));
2563
- }
2564
- }
2565
2645
  // getAll(params: iBXGetParam = {}): Observable<iBXRestUser [] | undefined> {
2566
2646
  // if (!Object.keys(params).length) {
2567
2647
  // params = clone(this.def.params)
@@ -2858,7 +2938,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImpo
2858
2938
  }]
2859
2939
  }] });
2860
2940
 
2861
- class BXRestMapTaskElapseditem extends BaseMapServices {
2941
+ class BXRestMapTaskElapsedItem extends BaseMapServices {
2862
2942
  update(p) {
2863
2943
  return (p == null);
2864
2944
  }
@@ -2878,21 +2958,21 @@ class BXRestMapTaskElapseditem extends BaseMapServices {
2878
2958
  DATE_STOP: this.toDate(item.DATE_STOP),
2879
2959
  });
2880
2960
  }
2881
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestMapTaskElapseditem, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
2882
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestMapTaskElapseditem, providedIn: 'root' }); }
2961
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestMapTaskElapsedItem, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
2962
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestMapTaskElapsedItem, providedIn: 'root' }); }
2883
2963
  }
2884
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestMapTaskElapseditem, decorators: [{
2964
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestMapTaskElapsedItem, decorators: [{
2885
2965
  type: Injectable,
2886
2966
  args: [{
2887
2967
  providedIn: 'root'
2888
2968
  }]
2889
2969
  }] });
2890
2970
 
2891
- class BXRestNavvyDelegateElapseditem {
2892
- constructor(BXRestElapseditem, BXRestMapElapseditem) {
2893
- this.BXRestElapseditem = BXRestElapseditem;
2894
- this.BXRestMapElapseditem = BXRestMapElapseditem;
2895
- this.Navvy = new Navvy(this.BXRestElapseditem, this.BXRestMapElapseditem);
2971
+ class BXRestNavvyDelegateElapsedItem {
2972
+ constructor(BXRestElapsedItem, BXRestMapElapsedItem) {
2973
+ this.BXRestElapsedItem = BXRestElapsedItem;
2974
+ this.BXRestMapElapsedItem = BXRestMapElapsedItem;
2975
+ this.Navvy = new Navvy(this.BXRestElapsedItem, this.BXRestMapElapsedItem);
2896
2976
  }
2897
2977
  getList(param = {}) {
2898
2978
  if (param) {
@@ -2908,17 +2988,17 @@ class BXRestNavvyDelegateElapseditem {
2908
2988
  };
2909
2989
  }
2910
2990
  }
2911
- return this.Navvy.alterPagNav(this.BXRestElapseditem.getList, param, this.BXRestMapElapseditem.getList);
2991
+ return this.Navvy.alterPagNav(this.BXRestElapsedItem.getList, param, this.BXRestMapElapsedItem.getList);
2912
2992
  }
2913
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestNavvyDelegateElapseditem, deps: [{ token: BXRestTaskElapseditem }, { token: BXRestMapTaskElapseditem }], target: i0.ɵɵFactoryTarget.Injectable }); }
2914
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestNavvyDelegateElapseditem, providedIn: 'root' }); }
2993
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestNavvyDelegateElapsedItem, deps: [{ token: BXRestTaskElapsedItem }, { token: BXRestMapTaskElapsedItem }], target: i0.ɵɵFactoryTarget.Injectable }); }
2994
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestNavvyDelegateElapsedItem, providedIn: 'root' }); }
2915
2995
  }
2916
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestNavvyDelegateElapseditem, decorators: [{
2996
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestNavvyDelegateElapsedItem, decorators: [{
2917
2997
  type: Injectable,
2918
2998
  args: [{
2919
2999
  providedIn: 'root'
2920
3000
  }]
2921
- }], ctorParameters: function () { return [{ type: BXRestTaskElapseditem }, { type: BXRestMapTaskElapseditem }]; } });
3001
+ }], ctorParameters: function () { return [{ type: BXRestTaskElapsedItem }, { type: BXRestMapTaskElapsedItem }]; } });
2922
3002
 
2923
3003
  // import { iTaskResult, iTaskResultHttp } from '@/lib/typification/bitrix/api/rest/task/result/result'
2924
3004
  class BXRestMapTasksTaskResult extends BaseMapServices {
@@ -3099,31 +3179,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImpo
3099
3179
  }]
3100
3180
  }], ctorParameters: function () { return [{ type: BX_REST_SETTINGS }, { type: BXRestMapTasksTaskResult }]; } });
3101
3181
 
3102
- // export interface TimeProcess {
3103
- // total: number,
3104
- // next: number
3105
- // }
3106
3182
  class BXRestNavvyTasksTask {
3107
3183
  constructor(result, BXRestTasksTask, BXRestMapTasksTask) {
3108
3184
  this.result = result;
3109
3185
  this.BXRestTasksTask = BXRestTasksTask;
3110
3186
  this.BXRestMapTasksTask = BXRestMapTasksTask;
3111
- // pageSize = 50
3112
- // nowLoad$ = new ReplaySubject<TimeProcess>(1)
3113
- this.def = {
3114
- select: ['ID', 'PARENT_ID', 'TITLE', 'DESCRIPTION', 'MARK', 'PRIORITY', 'STATUS', 'MULTITASK',
3115
- 'GROUP_ID', 'STAGE_ID', 'CREATED_BY', 'CREATED_DATE', 'RESPONSIBLE_ID', 'ACCOMPLICES', 'AUDITORS',
3116
- 'CHANGED_BY', 'CHANGED_DATE', 'STATUS_CHANGED_DATE', 'CLOSED_BY', 'CLOSED_DATE', 'DATE_START', 'VIEWED_DATE',
3117
- 'DEADLINE', 'START_DATE_PLAN', 'END_DATE_PLAN', 'FORKED_BY_TEMPLATE_ID', 'TIME_ESTIMATE', 'TIME_SPENT_IN_LOGS',
3118
- 'TAGS', 'ALLOW_TIME_TRACKING'
3119
- ]
3120
- };
3121
3187
  this.Navvy = new Navvy(this.BXRestTasksTask, this.BXRestMapTasksTask);
3122
- // this.storeTask$ = this.store.select('tasks')
3123
- // this.nowLoad$.next({
3124
- // total: 0,
3125
- // next: 0
3126
- // })
3127
3188
  }
3128
3189
  add(param) {
3129
3190
  return this.Navvy.simpleWithArg(this.BXRestTasksTask.add, param, this.BXRestMapTasksTask.add);
@@ -3155,16 +3216,10 @@ class BXRestNavvyTasksTask {
3155
3216
  }
3156
3217
  */
3157
3218
  get(param) {
3158
- if (!param.select) {
3159
- param.select = this.def.select;
3160
- }
3161
3219
  return this.Navvy.simpleWithArg(this.BXRestTasksTask.get, param, this.BXRestMapTasksTask.get);
3162
3220
  }
3163
3221
  list(param = {}) {
3164
- if (!param.select) {
3165
- param.select = this.def.select;
3166
- }
3167
- return this.Navvy.PagNavTasks(this.BXRestTasksTask.list, param, this.BXRestMapTasksTask.list);
3222
+ return this.Navvy.PagNavTasks((this.BXRestTasksTask.list), param, this.BXRestMapTasksTask.list);
3168
3223
  }
3169
3224
  /*
3170
3225
  listArray(requestArray: RequestApiTaskListBX = {}) {
@@ -3231,8 +3286,8 @@ class BXRestNavvyTasksTask {
3231
3286
  getFields() {
3232
3287
  return this.Navvy.simple(this.BXRestTasksTask.getFields);
3233
3288
  }
3234
- getaccess(param) {
3235
- return this.Navvy.simpleWithArg(this.BXRestTasksTask.getaccess, param, this.BXRestMapTasksTask.getaccess);
3289
+ getAccess(param) {
3290
+ return this.Navvy.simpleWithArg(this.BXRestTasksTask.getAccess, param, this.BXRestMapTasksTask.getaccess);
3236
3291
  }
3237
3292
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestNavvyTasksTask, deps: [{ token: BXRestNavvyTasksTaskResult }, { token: BXRestTasksTask }, { token: BXRestMapTasksTask }], target: i0.ɵɵFactoryTarget.Injectable }); }
3238
3293
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestNavvyTasksTask, providedIn: 'root' }); }
@@ -3258,11 +3313,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImpo
3258
3313
  }]
3259
3314
  }], ctorParameters: function () { return [{ type: BXRestNavvyTasksTask }]; } });
3260
3315
 
3261
- class BXRestNavvyOperationElapseditem {
3262
- constructor(http, delegate, BXRestMapElapseditem, BXRestNavvyUser, BXRestNavvyTasks) {
3316
+ class BXRestNavvyOperationElapsedItem {
3317
+ constructor(http, delegate, BXRestMapElapsedItem, BXRestNavvyUser, BXRestNavvyTasks) {
3263
3318
  this.http = http;
3264
3319
  this.delegate = delegate;
3265
- this.BXRestMapElapseditem = BXRestMapElapseditem;
3320
+ this.BXRestMapElapsedItem = BXRestMapElapsedItem;
3266
3321
  this.BXRestNavvyUser = BXRestNavvyUser;
3267
3322
  this.BXRestNavvyTasks = BXRestNavvyTasks;
3268
3323
  }
@@ -3289,14 +3344,14 @@ class BXRestNavvyOperationElapseditem {
3289
3344
  };
3290
3345
  })).pipe(map(v => {
3291
3346
  if (v && v.length) {
3292
- return this.http.mapBranchResultWithoutKey(v).map(i => this.BXRestMapElapseditem.getList(i)).filter((i) => i !== undefined).flat();
3347
+ return this.http.mapBranchResultWithoutKey(v).map(i => this.BXRestMapElapsedItem.getList(i)).filter((i) => i !== undefined).flat();
3293
3348
  }
3294
3349
  return undefined;
3295
3350
  }));
3296
3351
  }
3297
- checkPermissionAddElapsedtimeToTaskArr(tasks) {
3352
+ checkPermissionAddElapsedTimeToTaskArr(tasks) {
3298
3353
  let request = Object.assign({}, ...tasks.map(i => {
3299
- return { [i]: this.checkPermissionAddElapsedtimeToTask(i) };
3354
+ return { [i]: this.checkPermissionAddElapsedTimeToTask(i) };
3300
3355
  }));
3301
3356
  return forkJoin(request)
3302
3357
  .pipe(take(1), mergeMap(v => {
@@ -3333,7 +3388,7 @@ class BXRestNavvyOperationElapseditem {
3333
3388
  return of(forForeach);
3334
3389
  }));
3335
3390
  }
3336
- checkPermissionAddElapsedtimeToTask(idTask) {
3391
+ checkPermissionAddElapsedTimeToTask(idTask) {
3337
3392
  let permission = Permission.get();
3338
3393
  if (permission?.tasks?.length) {
3339
3394
  let findTask = permission.tasks.find(i => i.id === idTask);
@@ -3342,7 +3397,7 @@ class BXRestNavvyOperationElapseditem {
3342
3397
  }
3343
3398
  return this.BXRestNavvyUser.current().result().pipe(mergeMap(self => {
3344
3399
  if (self) {
3345
- return this.BXRestNavvyTasks.task.getaccess({
3400
+ return this.BXRestNavvyTasks.task.getAccess({
3346
3401
  id: idTask,
3347
3402
  users: [self.ID]
3348
3403
  }).result().pipe(tap(v => {
@@ -3369,7 +3424,7 @@ class BXRestNavvyOperationElapseditem {
3369
3424
  }
3370
3425
  return this.BXRestNavvyUser.current().result().pipe(mergeMap(self => {
3371
3426
  if (self) {
3372
- return this.BXRestNavvyTasks.task.getaccess({
3427
+ return this.BXRestNavvyTasks.task.getAccess({
3373
3428
  id: idTask,
3374
3429
  users: [self.ID]
3375
3430
  }).result().pipe(tap(v => {
@@ -3387,23 +3442,23 @@ class BXRestNavvyOperationElapseditem {
3387
3442
  }
3388
3443
  return of(undefined);
3389
3444
  }
3390
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestNavvyOperationElapseditem, deps: [{ token: HttpBXServices }, { token: BXRestNavvyDelegateElapseditem }, { token: BXRestMapTaskElapseditem }, { token: BXRestNavvyUser }, { token: BXRestNavvyTasks }], target: i0.ɵɵFactoryTarget.Injectable }); }
3391
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestNavvyOperationElapseditem, providedIn: 'root' }); }
3445
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestNavvyOperationElapsedItem, deps: [{ token: HttpBXServices }, { token: BXRestNavvyDelegateElapsedItem }, { token: BXRestMapTaskElapsedItem }, { token: BXRestNavvyUser }, { token: BXRestNavvyTasks }], target: i0.ɵɵFactoryTarget.Injectable }); }
3446
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestNavvyOperationElapsedItem, providedIn: 'root' }); }
3392
3447
  }
3393
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestNavvyOperationElapseditem, decorators: [{
3448
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestNavvyOperationElapsedItem, decorators: [{
3394
3449
  type: Injectable,
3395
3450
  args: [{
3396
3451
  providedIn: 'root'
3397
3452
  }]
3398
- }], ctorParameters: function () { return [{ type: HttpBXServices }, { type: BXRestNavvyDelegateElapseditem }, { type: BXRestMapTaskElapseditem }, { type: BXRestNavvyUser }, { type: BXRestNavvyTasks }]; } });
3453
+ }], ctorParameters: function () { return [{ type: HttpBXServices }, { type: BXRestNavvyDelegateElapsedItem }, { type: BXRestMapTaskElapsedItem }, { type: BXRestNavvyUser }, { type: BXRestNavvyTasks }]; } });
3399
3454
 
3400
3455
  class BXRestNavvyElapseditem {
3401
- constructor(BXRestElapseditem, BXRestMapElapseditem, delegate, operation) {
3402
- this.BXRestElapseditem = BXRestElapseditem;
3403
- this.BXRestMapElapseditem = BXRestMapElapseditem;
3456
+ constructor(BXRestElapsedItem, BXRestMapElapsedItem, delegate, operation) {
3457
+ this.BXRestElapsedItem = BXRestElapsedItem;
3458
+ this.BXRestMapElapsedItem = BXRestMapElapsedItem;
3404
3459
  this.delegate = delegate;
3405
3460
  this.operation = operation;
3406
- this.Navvy = new Navvy(this.BXRestElapseditem, this.BXRestMapElapseditem);
3461
+ this.Navvy = new Navvy(this.BXRestElapsedItem, this.BXRestMapElapsedItem);
3407
3462
  }
3408
3463
  /*
3409
3464
  call(methodName: string, ...args: any[]){
@@ -3419,9 +3474,9 @@ class BXRestNavvyElapseditem {
3419
3474
  add(param) {
3420
3475
  return this.operation.checkPermissionReadTask(param.TASKID).pipe(mergeMap(allowedReadTask => {
3421
3476
  if (allowedReadTask) {
3422
- return this.operation.checkPermissionAddElapsedtimeToTask(param.TASKID).pipe(mergeMap(allowed => {
3477
+ return this.operation.checkPermissionAddElapsedTimeToTask(param.TASKID).pipe(mergeMap(allowed => {
3423
3478
  if (allowed) {
3424
- return this.BXRestElapseditem.add(param);
3479
+ return this.BXRestElapsedItem.add(param);
3425
3480
  }
3426
3481
  else {
3427
3482
  return throwError(() => new Error('Отсутствуют права добавление записи затраченного времени'));
@@ -3443,7 +3498,7 @@ class BXRestNavvyElapseditem {
3443
3498
  if (allowedReadTask) {
3444
3499
  return this.isAllowedModify(param.TASKID, param.ITEMID).pipe(mergeMap(allowed => {
3445
3500
  if (allowed) {
3446
- return this.BXRestElapseditem.update(param);
3501
+ return this.BXRestElapsedItem.update(param);
3447
3502
  }
3448
3503
  else {
3449
3504
  return throwError(() => new Error('Отсутствуют права на изменение записи затраченного времени'));
@@ -3453,7 +3508,7 @@ class BXRestNavvyElapseditem {
3453
3508
  else {
3454
3509
  return throwError(() => new Error('Отсутствуют права на чтение задачи'));
3455
3510
  }
3456
- })), this.BXRestMapElapseditem.update);
3511
+ })), this.BXRestMapElapsedItem.update);
3457
3512
  }
3458
3513
  /*
3459
3514
  getAll(
@@ -3561,7 +3616,7 @@ class BXRestNavvyElapseditem {
3561
3616
  isActionAllowed(param) {
3562
3617
  return this.Navvy.simple(() => this.operation.checkPermissionReadTask(param.TASKID).pipe(mergeMap(canRead => {
3563
3618
  if (canRead) {
3564
- return this.BXRestElapseditem.isActionAllowed(param);
3619
+ return this.BXRestElapsedItem.isActionAllowed(param);
3565
3620
  }
3566
3621
  return throwError(() => new Error('Отсутствуют права на чтение задачи'));
3567
3622
  })));
@@ -3571,7 +3626,7 @@ class BXRestNavvyElapseditem {
3571
3626
  if (allowedReadTask) {
3572
3627
  return this.isAllowedRemove(param.TASKID, param.ITEMID).pipe(mergeMap(allowed => {
3573
3628
  if (allowed) {
3574
- return this.BXRestElapseditem.del(param);
3629
+ return this.BXRestElapsedItem.del(param);
3575
3630
  }
3576
3631
  else {
3577
3632
  return throwError(() => new Error('Отсутствуют права на удаление записи затраченного времени'));
@@ -3583,7 +3638,7 @@ class BXRestNavvyElapseditem {
3583
3638
  }
3584
3639
  })), v => (v === null));
3585
3640
  }
3586
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestNavvyElapseditem, deps: [{ token: BXRestTaskElapseditem }, { token: BXRestMapTaskElapseditem }, { token: BXRestNavvyDelegateElapseditem }, { token: BXRestNavvyOperationElapseditem }], target: i0.ɵɵFactoryTarget.Injectable }); }
3641
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestNavvyElapseditem, deps: [{ token: BXRestTaskElapsedItem }, { token: BXRestMapTaskElapsedItem }, { token: BXRestNavvyDelegateElapsedItem }, { token: BXRestNavvyOperationElapsedItem }], target: i0.ɵɵFactoryTarget.Injectable }); }
3587
3642
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestNavvyElapseditem, providedIn: 'root' }); }
3588
3643
  }
3589
3644
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestNavvyElapseditem, decorators: [{
@@ -3591,7 +3646,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImpo
3591
3646
  args: [{
3592
3647
  providedIn: 'root'
3593
3648
  }]
3594
- }], ctorParameters: function () { return [{ type: BXRestTaskElapseditem }, { type: BXRestMapTaskElapseditem }, { type: BXRestNavvyDelegateElapseditem }, { type: BXRestNavvyOperationElapseditem }]; } });
3649
+ }], ctorParameters: function () { return [{ type: BXRestTaskElapsedItem }, { type: BXRestMapTaskElapsedItem }, { type: BXRestNavvyDelegateElapsedItem }, { type: BXRestNavvyOperationElapsedItem }]; } });
3595
3650
 
3596
3651
  class BXRestMapTaskCommentItem extends BaseMapServices {
3597
3652
  getlist(value) {
@@ -3783,6 +3838,24 @@ class BXRestMapDiskBase extends BaseMapServices {
3783
3838
  instanceOfiFolder(object) {
3784
3839
  return object && object.TYPE && object.TYPE === 'folder';
3785
3840
  }
3841
+ FolderHttpToFolder(value) {
3842
+ return {
3843
+ ...value,
3844
+ ...{
3845
+ CREATED_BY: this.toNum(value.CREATED_BY),
3846
+ CREATE_TIME: this.toDate(value.CREATE_TIME),
3847
+ DELETED_BY: this.toNum(value.DELETED_BY),
3848
+ DELETED_TYPE: this.toNum(value.DELETED_TYPE),
3849
+ DELETE_TIME: this.toDate(value.CREATE_TIME),
3850
+ ID: this.toNum(value.ID),
3851
+ PARENT_ID: this.toNum(value.PARENT_ID),
3852
+ REAL_OBJECT_ID: this.toNum(value.REAL_OBJECT_ID),
3853
+ STORAGE_ID: this.toNum(value.STORAGE_ID),
3854
+ UPDATED_BY: this.toNum(value.UPDATED_BY),
3855
+ UPDATE_TIME: this.toDate(value.CREATE_TIME)
3856
+ }
3857
+ };
3858
+ }
3786
3859
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestMapDiskBase, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
3787
3860
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestMapDiskBase, providedIn: 'root' }); }
3788
3861
  }
@@ -3794,7 +3867,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImpo
3794
3867
  }] });
3795
3868
 
3796
3869
  class BXRestMapDiskFolder extends BXRestMapDiskBase {
3797
- getContent(arr) {
3870
+ getChildren(arr) {
3798
3871
  return (arr) ? this.separationFoldersAndFiles(arr) : { file: [], folder: [] };
3799
3872
  }
3800
3873
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestMapDiskFolder, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
@@ -3813,22 +3886,100 @@ class BXRestNavvyDiskFolder {
3813
3886
  this.BXRestMapDiskFolder = BXRestMapDiskFolder;
3814
3887
  this.Navvy = new Navvy(this.BXRestDiskFolder, this.BXRestMapDiskFolder);
3815
3888
  }
3816
- // uploadfile(id: number, fileContent: string[]) {
3817
- // return this.httpPost(
3818
- // this.url.uploadfile,
3819
- // {
3820
- // id: id, // Идентификатор папки. В текущем API загружать файл по пути к папке невозможно. Необходимо обязательно вычислить ID папки
3821
- // fileContent: fileContent, // Аналогично 'DETAIL_PICTURE' в примере Обработка файлов (['имя файла', 'содержимое в base64'])
3822
- // data: {
3823
- // NAME: fileContent[0]
3824
- // } // Обязательное поле NAME - имя нового файла
3825
- // // generateUniqueName Необязательный, по умолчанию false. При указании true, для загружаемого файла будет уникализировано имя, добавлением суффикса (1), (2) и т.п.
3826
- // // rights Необязательный, по умолчанию пустой массив. Массив прав доступа на загружаемый файл.
3827
- // }
3828
- // )
3829
- // }
3830
- getchildren(id) {
3831
- return this.Navvy.simpleWithArg(this.BXRestDiskFolder.getchildren, id, this.BXRestMapDiskFolder.getContent);
3889
+ /**
3890
+ * Возвращает папку по идентификатору
3891
+ *
3892
+ * @param id
3893
+ */
3894
+ get(id) {
3895
+ return this.Navvy.simpleWithArg(this.BXRestDiskFolder.get, id, this.BXRestMapDiskFolder.FolderHttpToFolder);
3896
+ }
3897
+ /**
3898
+ * Создает дочернюю папку
3899
+ *
3900
+ * @param param
3901
+ */
3902
+ addSubFolder(param) {
3903
+ return this.Navvy.simpleWithArg(this.BXRestDiskFolder.addSubFolder, param, this.BXRestMapDiskFolder.FolderHttpToFolder);
3904
+ }
3905
+ /**
3906
+ * Копирует папку в указанную папку
3907
+ *
3908
+ * @param param
3909
+ */
3910
+ copyTo(param) {
3911
+ return this.Navvy.simpleWithArg(this.BXRestDiskFolder.copyTo, param, this.BXRestMapDiskFolder.FolderHttpToFolder);
3912
+ }
3913
+ /**
3914
+ * Перемещает папку в указанную папку
3915
+ *
3916
+ * @param param
3917
+ */
3918
+ moveTo(param) {
3919
+ return this.Navvy.simpleWithArg(this.BXRestDiskFolder.moveTo, param, this.BXRestMapDiskFolder.FolderHttpToFolder);
3920
+ }
3921
+ /**
3922
+ * Переименовывает папку
3923
+ *
3924
+ * @param param
3925
+ */
3926
+ rename(param) {
3927
+ return this.Navvy.simpleWithArg(this.BXRestDiskFolder.rename, param, this.BXRestMapDiskFolder.FolderHttpToFolder);
3928
+ }
3929
+ /**
3930
+ * Уничтожает папку и всё её дочерние элементы навсегда
3931
+ * В ответе 'result': true - успешное уничтожение папки
3932
+ *
3933
+ * @param id
3934
+ */
3935
+ deleteTree(id) {
3936
+ return this.Navvy.simpleWithArg(this.BXRestDiskFolder.deleteTree, id);
3937
+ }
3938
+ /**
3939
+ * Перемещает папку в корзину
3940
+ *
3941
+ * @param id
3942
+ */
3943
+ markDeleted(id) {
3944
+ return this.Navvy.simpleWithArg(this.BXRestDiskFolder.markDeleted, id, this.BXRestMapDiskFolder.FolderHttpToFolder);
3945
+ }
3946
+ /**
3947
+ * Восстанавливает папку из корзины
3948
+ *
3949
+ * @param id
3950
+ */
3951
+ restore(id) {
3952
+ return this.Navvy.simpleWithArg(this.BXRestDiskFolder.restore, id, this.BXRestMapDiskFolder.FolderHttpToFolder);
3953
+ }
3954
+ /**
3955
+ * Метод возвращает публичную ссылку
3956
+ *
3957
+ * @param id
3958
+ */
3959
+ getExternalLink(id) {
3960
+ return this.Navvy.simpleWithArg(this.BXRestDiskFolder.getExternalLink, id);
3961
+ }
3962
+ /**
3963
+ * Возвращает описание полей папки
3964
+ */
3965
+ getFields() {
3966
+ return this.Navvy.simple(this.BXRestDiskFolder.getFields);
3967
+ }
3968
+ /**
3969
+ * Загружает новый файл в указанную папку
3970
+ *
3971
+ * @param param
3972
+ */
3973
+ uploadFile(param) {
3974
+ return this.Navvy.simpleWithArg(this.BXRestDiskFolder.uploadFile, param, this.BXRestMapDiskFolder.FolderHttpToFolder);
3975
+ }
3976
+ /**
3977
+ * Возвращает список файлов и папок, которые находятся непосредственно в папке
3978
+ *
3979
+ * @param id
3980
+ */
3981
+ getChildren(id) {
3982
+ return this.Navvy.simpleWithArg(this.BXRestDiskFolder.getChildren, id, this.BXRestMapDiskFolder.getChildren);
3832
3983
  }
3833
3984
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestNavvyDiskFolder, deps: [{ token: BXRestDiskFolder }, { token: BXRestMapDiskFolder }], target: i0.ɵɵFactoryTarget.Injectable }); }
3834
3985
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestNavvyDiskFolder, providedIn: 'root' }); }
@@ -3883,6 +4034,9 @@ class BXRestMapDiskStorage extends BXRestMapDiskBase {
3883
4034
  getchildren(arr) {
3884
4035
  return (arr) ? this.separationFoldersAndFiles(arr) : { file: [], folder: [] };
3885
4036
  }
4037
+ addfolder(value) {
4038
+ return this.FolderHttpToFolder(value);
4039
+ }
3886
4040
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestMapDiskStorage, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
3887
4041
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestMapDiskStorage, providedIn: 'root' }); }
3888
4042
  }
@@ -3917,7 +4071,7 @@ class BXRestDiskStorage {
3917
4071
  getchildren(param) {
3918
4072
  return this.http.post(this.url.getchildren, param);
3919
4073
  }
3920
- // TODO: разобраться что возвращает и что вставлять
4074
+ // TODO: Сделать нормальное описание параметров
3921
4075
  addfolder(param) {
3922
4076
  return this.http.post(this.url.addfolder, param);
3923
4077
  }
@@ -3994,10 +4148,8 @@ class BXRestNavvyDiskStorage {
3994
4148
  this.BXRestNavvyInterlayerDiskStorage = BXRestNavvyInterlayerDiskStorage;
3995
4149
  this.BXRestMapDiskStorage = BXRestMapDiskStorage;
3996
4150
  this.Navvy = new Navvy(this.BXRestNavvyInterlayerDiskStorage, this.BXRestMapDiskStorage);
3997
- // this.BXDiskFolder$ = this.store.select('BXDiskFolder')
3998
4151
  }
3999
4152
  getforapp() {
4000
- // console.log('this.getforappEnd', this.getforappEnd)
4001
4153
  return this.Navvy.simple(this.BXRestNavvyInterlayerDiskStorage.getforapp);
4002
4154
  }
4003
4155
  /*
@@ -4021,9 +4173,8 @@ class BXRestNavvyDiskStorage {
4021
4173
  getchildren(param) {
4022
4174
  return this.Navvy.simpleWithArg(this.BXRestNavvyInterlayerDiskStorage.getchildren, param, this.BXRestMapDiskStorage.getchildren);
4023
4175
  }
4024
- // TODO: разобраться что возвращает и что вставлять
4025
4176
  addfolder(param) {
4026
- return this.Navvy.simpleWithArg(this.BXRestNavvyInterlayerDiskStorage.addfolder, param);
4177
+ return this.Navvy.simpleWithArg(this.BXRestNavvyInterlayerDiskStorage.addfolder, param, this.BXRestMapDiskStorage.addfolder);
4027
4178
  }
4028
4179
  uploadfile(param) {
4029
4180
  return this.Navvy.simpleWithArg(this.BXRestNavvyInterlayerDiskStorage.uploadfile, param);
@@ -4063,7 +4214,7 @@ class BXRestNavvyDiskOperation {
4063
4214
  getOfCreateRootContentFolderApp(folderName) {
4064
4215
  return this.getOfCreateRootFolderApp(folderName).pipe(mergeMap$1(v => {
4065
4216
  if (v) {
4066
- return this.folder.getchildren(v.ID).mapForVanilla();
4217
+ return this.folder.getChildren(v.ID).result();
4067
4218
  }
4068
4219
  return of(undefined);
4069
4220
  }));
@@ -4096,7 +4247,7 @@ class BXRestNavvyDiskOperation {
4096
4247
  if (v.folder.length) {
4097
4248
  let find = v.folder.find(i => i.NAME === folderName);
4098
4249
  if (find) {
4099
- return of({ result: find });
4250
+ return of(find);
4100
4251
  }
4101
4252
  }
4102
4253
  }
@@ -4178,25 +4329,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImpo
4178
4329
  }]
4179
4330
  }], ctorParameters: function () { return [{ type: BXRestNavvyDiskOperation }, { type: BXRestNavvyDiskFile }, { type: BXRestNavvyDiskFolder }, { type: BXRestNavvyDiskAttachedObject }]; } });
4180
4331
 
4181
- class BXRestNavvyBizprocWorkflow {
4182
- constructor(BXRestBizprocWorkflow) {
4183
- this.BXRestBizprocWorkflow = BXRestBizprocWorkflow;
4184
- this.Navvy = new Navvy(this.BXRestBizprocWorkflow, undefined);
4332
+ class BXRestNavvyBXRestBizProcWorkflow {
4333
+ constructor(BXRestBizProcWorkflow) {
4334
+ this.BXRestBizProcWorkflow = BXRestBizProcWorkflow;
4335
+ this.Navvy = new Navvy(this.BXRestBizProcWorkflow, undefined);
4185
4336
  }
4186
4337
  start(param) {
4187
- return this.Navvy.simpleWithArg(this.BXRestBizprocWorkflow.start, param);
4338
+ return this.Navvy.simpleWithArg(this.BXRestBizProcWorkflow.start, param);
4188
4339
  }
4189
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestNavvyBizprocWorkflow, deps: [{ token: BXRestBizprocWorkflow }], target: i0.ɵɵFactoryTarget.Injectable }); }
4190
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestNavvyBizprocWorkflow, providedIn: 'root' }); }
4340
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestNavvyBXRestBizProcWorkflow, deps: [{ token: BXRestBizProcWorkflow }], target: i0.ɵɵFactoryTarget.Injectable }); }
4341
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestNavvyBXRestBizProcWorkflow, providedIn: 'root' }); }
4191
4342
  }
4192
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestNavvyBizprocWorkflow, decorators: [{
4343
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestNavvyBXRestBizProcWorkflow, decorators: [{
4193
4344
  type: Injectable,
4194
4345
  args: [{
4195
4346
  providedIn: 'root'
4196
4347
  }]
4197
- }], ctorParameters: function () { return [{ type: BXRestBizprocWorkflow }]; } });
4348
+ }], ctorParameters: function () { return [{ type: BXRestBizProcWorkflow }]; } });
4198
4349
 
4199
- class BXRestNavvyBizproc {
4350
+ class BXRestNavvyBizProc {
4200
4351
  constructor(workflow, BXRestNavvyLists) {
4201
4352
  this.workflow = workflow;
4202
4353
  this.BXRestNavvyLists = BXRestNavvyLists;
@@ -4207,10 +4358,10 @@ class BXRestNavvyBizproc {
4207
4358
  *
4208
4359
  * @param id
4209
4360
  * @param parametersElement
4210
- * @param parametersBizproc
4361
+ * @param parametersBizProc
4211
4362
  * @param templateIDs
4212
4363
  */
4213
- startProcFormNewsFeed(id, parametersElement, parametersBizproc, templateIDs) {
4364
+ startProcFormNewsFeed(id, parametersElement, parametersBizProc, templateIDs) {
4214
4365
  return this.BXRestNavvyLists.element.add({
4215
4366
  IBLOCK_TYPE_ID: 'bitrix_processes',
4216
4367
  IBLOCK_ID: id,
@@ -4224,13 +4375,13 @@ class BXRestNavvyBizproc {
4224
4375
  }
4225
4376
  }).result().pipe(mergeMap(v => {
4226
4377
  if (v) {
4227
- if (Object.keys(parametersBizproc).length) {
4378
+ if (Object.keys(parametersBizProc).length) {
4228
4379
  let reques = [];
4229
4380
  for (let templateID of templateIDs) {
4230
4381
  reques.push(this.workflow.start({
4231
4382
  TEMPLATE_ID: templateID,
4232
4383
  DOCUMENT_ID: ['lists', 'BizprocDocument', String(v)],
4233
- PARAMETERS: parametersBizproc
4384
+ PARAMETERS: parametersBizProc
4234
4385
  }).result());
4235
4386
  }
4236
4387
  return forkJoin(reques);
@@ -4242,15 +4393,15 @@ class BXRestNavvyBizproc {
4242
4393
  return throwError(() => new Error('Не удалось запустить бизнес процесс'));
4243
4394
  }));
4244
4395
  }
4245
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestNavvyBizproc, deps: [{ token: BXRestNavvyBizprocWorkflow }, { token: BXRestNavvyLists }], target: i0.ɵɵFactoryTarget.Injectable }); }
4246
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestNavvyBizproc, providedIn: 'root' }); }
4396
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestNavvyBizProc, deps: [{ token: BXRestNavvyBXRestBizProcWorkflow }, { token: BXRestNavvyLists }], target: i0.ɵɵFactoryTarget.Injectable }); }
4397
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestNavvyBizProc, providedIn: 'root' }); }
4247
4398
  }
4248
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestNavvyBizproc, decorators: [{
4399
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestNavvyBizProc, decorators: [{
4249
4400
  type: Injectable,
4250
4401
  args: [{
4251
4402
  providedIn: 'root'
4252
4403
  }]
4253
- }], ctorParameters: function () { return [{ type: BXRestNavvyBizprocWorkflow }, { type: BXRestNavvyLists }]; } });
4404
+ }], ctorParameters: function () { return [{ type: BXRestNavvyBXRestBizProcWorkflow }, { type: BXRestNavvyLists }]; } });
4254
4405
 
4255
4406
  class BXRestNavvyLogBlogPost {
4256
4407
  constructor(BXRestLogBlogPost) {
@@ -4365,7 +4516,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImpo
4365
4516
  }]
4366
4517
  }] });
4367
4518
 
4368
- class BXRestRestCalendarEvent {
4519
+ class BXRestNavvyRestCalendarEvent {
4369
4520
  constructor(BXRestCalendarEvent, eventMap) {
4370
4521
  this.BXRestCalendarEvent = BXRestCalendarEvent;
4371
4522
  this.eventMap = eventMap;
@@ -4374,10 +4525,10 @@ class BXRestRestCalendarEvent {
4374
4525
  get(param) {
4375
4526
  return this.Navvy.simpleWithArg(this.BXRestCalendarEvent.get, param, this.eventMap.get);
4376
4527
  }
4377
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestRestCalendarEvent, deps: [{ token: BXRestCalendarEvent }, { token: BXRestMapCalendarEvent }], target: i0.ɵɵFactoryTarget.Injectable }); }
4378
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestRestCalendarEvent, providedIn: 'root' }); }
4528
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestNavvyRestCalendarEvent, deps: [{ token: BXRestCalendarEvent }, { token: BXRestMapCalendarEvent }], target: i0.ɵɵFactoryTarget.Injectable }); }
4529
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestNavvyRestCalendarEvent, providedIn: 'root' }); }
4379
4530
  }
4380
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestRestCalendarEvent, decorators: [{
4531
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestNavvyRestCalendarEvent, decorators: [{
4381
4532
  type: Injectable,
4382
4533
  args: [{
4383
4534
  providedIn: 'root'
@@ -4423,7 +4574,7 @@ class BXRestNavvyCalendar {
4423
4574
  constructor(event) {
4424
4575
  this.event = event;
4425
4576
  }
4426
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestNavvyCalendar, deps: [{ token: BXRestRestCalendarEvent }], target: i0.ɵɵFactoryTarget.Injectable }); }
4577
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestNavvyCalendar, deps: [{ token: BXRestNavvyRestCalendarEvent }], target: i0.ɵɵFactoryTarget.Injectable }); }
4427
4578
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestNavvyCalendar, providedIn: 'root' }); }
4428
4579
  }
4429
4580
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestNavvyCalendar, decorators: [{
@@ -4431,7 +4582,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImpo
4431
4582
  args: [{
4432
4583
  providedIn: 'root'
4433
4584
  }]
4434
- }], ctorParameters: function () { return [{ type: BXRestRestCalendarEvent }]; } });
4585
+ }], ctorParameters: function () { return [{ type: BXRestNavvyRestCalendarEvent }]; } });
4435
4586
 
4436
4587
  class BXRestMapSonetGroup extends BaseMapServices {
4437
4588
  get(items) {
@@ -4609,22 +4760,77 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImpo
4609
4760
  }]
4610
4761
  }], ctorParameters: function () { return [{ type: BXRestNavvyImChat }]; } });
4611
4762
 
4763
+ class BXRestMapApp extends BaseMapServices {
4764
+ info(value) {
4765
+ return { ...value, ...{ ID: this.toNum(value.ID), PAYMENT_EXPIRED: value.PAYMENT_EXPIRED === 'Y' } };
4766
+ }
4767
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestMapApp, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
4768
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestMapApp, providedIn: 'root' }); }
4769
+ }
4770
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestMapApp, decorators: [{
4771
+ type: Injectable,
4772
+ args: [{
4773
+ providedIn: 'root'
4774
+ }]
4775
+ }] });
4776
+
4777
+ class BXRestNavvyApp {
4778
+ constructor(BXRestApp, BXRestMapApp) {
4779
+ this.BXRestApp = BXRestApp;
4780
+ this.BXRestMapApp = BXRestMapApp;
4781
+ this.Navvy = new Navvy(this.BXRestApp, this.BXRestMapApp);
4782
+ }
4783
+ /**
4784
+ * Показ информации о приложении. Метод поддерживает безопасный вызов
4785
+ */
4786
+ info() {
4787
+ return this.Navvy.simple(this.BXRestApp.info, this.BXRestMapApp.info);
4788
+ }
4789
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestNavvyApp, deps: [{ token: BXRestApp }, { token: BXRestMapApp }], target: i0.ɵɵFactoryTarget.Injectable }); }
4790
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestNavvyApp, providedIn: 'root' }); }
4791
+ }
4792
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestNavvyApp, decorators: [{
4793
+ type: Injectable,
4794
+ args: [{
4795
+ providedIn: 'root'
4796
+ }]
4797
+ }], ctorParameters: function () { return [{ type: BXRestApp }, { type: BXRestMapApp }]; } });
4798
+
4799
+ class BXRestMaps extends BaseMapServices {
4800
+ profile(user) {
4801
+ return (user) ? { ...user, ...{ ID: this.toNum(user.ID) } } : undefined;
4802
+ }
4803
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestMaps, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
4804
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestMaps, providedIn: 'root' }); }
4805
+ }
4806
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestMaps, decorators: [{
4807
+ type: Injectable,
4808
+ args: [{
4809
+ providedIn: 'root'
4810
+ }]
4811
+ }] });
4812
+
4612
4813
  class BXRest {
4613
- constructor(user, lists, task, tasks, disk, bizproc, log, calendar, sonet_group, server, department, im) {
4814
+ constructor(user, lists, task, tasks, disk, bizProc, log, calendar, sonet_group, server, department, im, app, http) {
4614
4815
  this.user = user;
4615
4816
  this.lists = lists;
4616
4817
  this.task = task;
4617
4818
  this.tasks = tasks;
4618
4819
  this.disk = disk;
4619
- this.bizproc = bizproc;
4820
+ this.bizProc = bizProc;
4620
4821
  this.log = log;
4621
4822
  this.calendar = calendar;
4622
4823
  this.sonet_group = sonet_group;
4623
4824
  this.server = server;
4624
4825
  this.department = department;
4625
4826
  this.im = im;
4827
+ this.app = app;
4828
+ this.http = http;
4829
+ }
4830
+ profile() {
4831
+ return this.http.post(['profile']);
4626
4832
  }
4627
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRest, deps: [{ token: BXRestUser }, { token: BXRestLists }, { token: BXRestTask }, { token: BXRestTasks }, { token: BXRestDisk }, { token: BXRestBizproc }, { token: BXRestLog }, { token: BXRestCalendar }, { token: BXRestSonetGroup }, { token: BXRestServer }, { token: BXRestDepartment }, { token: BXRestIm }], target: i0.ɵɵFactoryTarget.Injectable }); }
4833
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRest, deps: [{ token: BXRestUser }, { token: BXRestLists }, { token: BXRestTask }, { token: BXRestTasks }, { token: BXRestDisk }, { token: BXRestBizProc }, { token: BXRestLog }, { token: BXRestCalendar }, { token: BXRestSonetGroup }, { token: BXRestServer }, { token: BXRestDepartment }, { token: BXRestIm }, { token: BXRestApp }, { token: HttpBXServices }], target: i0.ɵɵFactoryTarget.Injectable }); }
4628
4834
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRest, providedIn: 'root' }); }
4629
4835
  }
4630
4836
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRest, decorators: [{
@@ -4632,23 +4838,30 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImpo
4632
4838
  args: [{
4633
4839
  providedIn: 'root'
4634
4840
  }]
4635
- }], ctorParameters: function () { return [{ type: BXRestUser }, { type: BXRestLists }, { type: BXRestTask }, { type: BXRestTasks }, { type: BXRestDisk }, { type: BXRestBizproc }, { type: BXRestLog }, { type: BXRestCalendar }, { type: BXRestSonetGroup }, { type: BXRestServer }, { type: BXRestDepartment }, { type: BXRestIm }]; } });
4841
+ }], ctorParameters: function () { return [{ type: BXRestUser }, { type: BXRestLists }, { type: BXRestTask }, { type: BXRestTasks }, { type: BXRestDisk }, { type: BXRestBizProc }, { type: BXRestLog }, { type: BXRestCalendar }, { type: BXRestSonetGroup }, { type: BXRestServer }, { type: BXRestDepartment }, { type: BXRestIm }, { type: BXRestApp }, { type: HttpBXServices }]; } });
4636
4842
  class BXRestNavvy {
4637
- constructor(user, lists, task, tasks, disk, bizproc, log, calendar, sonet_group, server, department, im) {
4843
+ constructor(user, lists, task, tasks, disk, bizProc, log, calendar, sonet_group, server, department, im, app, BXRest, BXRestMap) {
4638
4844
  this.user = user;
4639
4845
  this.lists = lists;
4640
4846
  this.task = task;
4641
4847
  this.tasks = tasks;
4642
4848
  this.disk = disk;
4643
- this.bizproc = bizproc;
4849
+ this.bizProc = bizProc;
4644
4850
  this.log = log;
4645
4851
  this.calendar = calendar;
4646
4852
  this.sonet_group = sonet_group;
4647
4853
  this.server = server;
4648
4854
  this.department = department;
4649
4855
  this.im = im;
4856
+ this.app = app;
4857
+ this.BXRest = BXRest;
4858
+ this.BXRestMap = BXRestMap;
4859
+ this.Navvy = new Navvy(this.BXRest, this.BXRestMap);
4860
+ }
4861
+ profile() {
4862
+ return this.Navvy.simple(this.BXRest.profile, this.BXRestMap.profile);
4650
4863
  }
4651
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestNavvy, deps: [{ token: BXRestNavvyUser }, { token: BXRestNavvyLists }, { token: BXRestNavvyTask }, { token: BXRestNavvyTasks }, { token: BXRestNavvyDisk }, { token: BXRestNavvyBizproc }, { token: BXRestNavvyLog }, { token: BXRestNavvyCalendar }, { token: BXRestNavvySonetGroup }, { token: BXRestNavvyServer }, { token: BXRestNavvyDepartment }, { token: BXRestNavvyIm }], target: i0.ɵɵFactoryTarget.Injectable }); }
4864
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestNavvy, deps: [{ token: BXRestNavvyUser }, { token: BXRestNavvyLists }, { token: BXRestNavvyTask }, { token: BXRestNavvyTasks }, { token: BXRestNavvyDisk }, { token: BXRestNavvyBizProc }, { token: BXRestNavvyLog }, { token: BXRestNavvyCalendar }, { token: BXRestNavvySonetGroup }, { token: BXRestNavvyServer }, { token: BXRestNavvyDepartment }, { token: BXRestNavvyIm }, { token: BXRestNavvyApp }, { token: BXRest }, { token: BXRestMaps }], target: i0.ɵɵFactoryTarget.Injectable }); }
4652
4865
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestNavvy, providedIn: 'root' }); }
4653
4866
  }
4654
4867
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestNavvy, decorators: [{
@@ -4656,7 +4869,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImpo
4656
4869
  args: [{
4657
4870
  providedIn: 'root'
4658
4871
  }]
4659
- }], ctorParameters: function () { return [{ type: BXRestNavvyUser }, { type: BXRestNavvyLists }, { type: BXRestNavvyTask }, { type: BXRestNavvyTasks }, { type: BXRestNavvyDisk }, { type: BXRestNavvyBizproc }, { type: BXRestNavvyLog }, { type: BXRestNavvyCalendar }, { type: BXRestNavvySonetGroup }, { type: BXRestNavvyServer }, { type: BXRestNavvyDepartment }, { type: BXRestNavvyIm }]; } });
4872
+ }], ctorParameters: function () { return [{ type: BXRestNavvyUser }, { type: BXRestNavvyLists }, { type: BXRestNavvyTask }, { type: BXRestNavvyTasks }, { type: BXRestNavvyDisk }, { type: BXRestNavvyBizProc }, { type: BXRestNavvyLog }, { type: BXRestNavvyCalendar }, { type: BXRestNavvySonetGroup }, { type: BXRestNavvyServer }, { type: BXRestNavvyDepartment }, { type: BXRestNavvyIm }, { type: BXRestNavvyApp }, { type: BXRest }, { type: BXRestMaps }]; } });
4660
4873
  class BXRestMap {
4661
4874
  constructor(lists) {
4662
4875
  this.lists = lists;
@@ -4802,7 +5015,7 @@ class BXRestMapTask {
4802
5015
  this.elapsedItem = elapsedItem;
4803
5016
  this.stages = stages;
4804
5017
  }
4805
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestMapTask, deps: [{ token: BXRestMapTaskCommentItem }, { token: BXRestMapTaskElapseditem }, { token: BXRestMapTaskStage }], target: i0.ɵɵFactoryTarget.Injectable }); }
5018
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestMapTask, deps: [{ token: BXRestMapTaskCommentItem }, { token: BXRestMapTaskElapsedItem }, { token: BXRestMapTaskStage }], target: i0.ɵɵFactoryTarget.Injectable }); }
4806
5019
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestMapTask, providedIn: 'root' }); }
4807
5020
  }
4808
5021
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestMapTask, decorators: [{
@@ -4810,7 +5023,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImpo
4810
5023
  args: [{
4811
5024
  providedIn: 'root'
4812
5025
  }]
4813
- }], ctorParameters: function () { return [{ type: BXRestMapTaskCommentItem }, { type: BXRestMapTaskElapseditem }, { type: BXRestMapTaskStage }]; } });
5026
+ }], ctorParameters: function () { return [{ type: BXRestMapTaskCommentItem }, { type: BXRestMapTaskElapsedItem }, { type: BXRestMapTaskStage }]; } });
4814
5027
 
4815
5028
  class BXRestMapTasks {
4816
5029
  constructor(task) {