bx-rest 0.1.1 → 0.1.5

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 (88) hide show
  1. package/consts/part-name-metods.d.ts +9 -0
  2. package/esm2020/consts/part-name-metods.mjs +10 -1
  3. package/esm2020/map/lists.mjs +2 -2
  4. package/esm2020/map/task.mjs +10 -1
  5. package/esm2020/public-api.mjs +2 -2
  6. package/esm2020/request/bizproc/activity.mjs +23 -0
  7. package/esm2020/request/bizproc/event.mjs +19 -0
  8. package/esm2020/request/bizproc/robot.mjs +22 -0
  9. package/esm2020/request/bizproc/task.mjs +20 -0
  10. package/esm2020/request/bizproc/workflow/instance.mjs +19 -0
  11. package/esm2020/request/bizproc/workflow/template.mjs +27 -0
  12. package/esm2020/request/bizproc/workflow.mjs +31 -0
  13. package/esm2020/request/bizproc.mjs +25 -0
  14. package/esm2020/request/lists/element.mjs +4 -3
  15. package/esm2020/request/lists.mjs +2 -2
  16. package/esm2020/request/tasks/task.mjs +34 -1
  17. package/esm2020/request/user.mjs +9 -6
  18. package/esm2020/request-navvy/bizproc/workflow.mjs +22 -0
  19. package/esm2020/request-navvy/bizproc.mjs +60 -0
  20. package/esm2020/request-navvy/disk/storage.mjs +7 -10
  21. package/esm2020/request-navvy/lists/element.mjs +6 -3
  22. package/esm2020/request-navvy/lists.mjs +2 -10
  23. package/esm2020/request-navvy/tasks/task.mjs +67 -19
  24. package/esm2020/request-navvy/user.mjs +7 -8
  25. package/esm2020/rest.mjs +21 -17
  26. package/esm2020/services/base.mjs +3 -3
  27. package/esm2020/services/http/HttpBX.mjs +34 -36
  28. package/esm2020/services/http/http.mjs +36 -38
  29. package/esm2020/services/http/sessionKey.mjs +128 -113
  30. package/esm2020/services/vanilla/sessionStorage.mjs +7 -7
  31. package/esm2020/settings.mjs +2 -2
  32. package/esm2020/typification/auth/save.mjs +1 -1
  33. package/esm2020/typification/rest/base/OrderOptions.mjs +2 -0
  34. package/esm2020/typification/rest/base/sort.mjs +2 -0
  35. package/esm2020/typification/rest/bizproc/base/filedEnum.mjs +2 -0
  36. package/esm2020/typification/rest/bizproc/workflow/start.mjs +2 -0
  37. package/esm2020/typification/rest/bizproc/workflow/template/list.mjs +2 -0
  38. package/esm2020/typification/rest/lists/element/add.mjs +2 -0
  39. package/esm2020/typification/rest/task/base/fieldsName.mjs +2 -0
  40. package/esm2020/typification/rest/tasks/task/add.mjs +2 -0
  41. package/esm2020/typification/rest/tasks/task/get.mjs +2 -0
  42. package/esm2020/typification/rest/tasks/task/list.mjs +2 -0
  43. package/esm2020/typification/rest/user/get.mjs +1 -1
  44. package/fesm2015/bx-rest.mjs +794 -490
  45. package/fesm2015/bx-rest.mjs.map +1 -1
  46. package/fesm2020/bx-rest.mjs +797 -488
  47. package/fesm2020/bx-rest.mjs.map +1 -1
  48. package/map/lists.d.ts +1 -1
  49. package/map/task.d.ts +4 -1
  50. package/package.json +1 -1
  51. package/public-api.d.ts +1 -1
  52. package/request/bizproc/activity.d.ts +12 -0
  53. package/request/bizproc/event.d.ts +8 -0
  54. package/request/bizproc/robot.d.ts +11 -0
  55. package/request/bizproc/task.d.ts +9 -0
  56. package/request/bizproc/workflow/instance.d.ts +8 -0
  57. package/request/bizproc/workflow/template.d.ts +16 -0
  58. package/request/bizproc/workflow.d.ts +20 -0
  59. package/request/bizproc.d.ts +16 -0
  60. package/request/lists/element.d.ts +2 -1
  61. package/request/lists.d.ts +1 -1
  62. package/request/tasks/task.d.ts +9 -1
  63. package/request-navvy/bizproc/workflow.d.ts +12 -0
  64. package/request-navvy/bizproc.d.ts +24 -0
  65. package/request-navvy/disk/storage.d.ts +1 -3
  66. package/request-navvy/lists/element.d.ts +3 -1
  67. package/request-navvy/lists.d.ts +1 -8
  68. package/request-navvy/tasks/task.d.ts +13 -3
  69. package/request-navvy/user.d.ts +1 -3
  70. package/rest.d.ts +13 -9
  71. package/services/http/sessionKey.d.ts +3 -23
  72. package/services/vanilla/sessionStorage.d.ts +5 -5
  73. package/settings.d.ts +1 -1
  74. package/typification/auth/save.d.ts +1 -1
  75. package/typification/rest/base/OrderOptions.d.ts +1 -0
  76. package/typification/rest/base/sort.d.ts +1 -0
  77. package/typification/rest/bizproc/base/filedEnum.d.ts +1 -0
  78. package/typification/rest/bizproc/workflow/start.d.ts +5 -0
  79. package/typification/rest/bizproc/workflow/template/list.d.ts +8 -0
  80. package/typification/rest/lists/element/add.d.ts +9 -0
  81. package/typification/rest/task/base/fieldsName.d.ts +1 -0
  82. package/typification/rest/{task/fieldsForSend.d.ts → tasks/task/add.d.ts} +1 -1
  83. package/typification/rest/tasks/task/get.d.ts +5 -0
  84. package/typification/rest/tasks/task/list.d.ts +65 -0
  85. package/typification/rest/user/get.d.ts +6 -1
  86. package/esm2020/store/auth.mjs +0 -26
  87. package/esm2020/typification/rest/task/fieldsForSend.mjs +0 -2
  88. package/store/auth.d.ts +0 -20
@@ -1,22 +1,19 @@
1
1
  import * as i0 from '@angular/core';
2
- import { NgModule, inject, Component, ViewEncapsulation, Inject, Injectable, Optional } from '@angular/core';
3
- import { Subscription, filter, take, of, mergeMap, throwError, forkJoin, tap } from 'rxjs';
4
- import { map, catchError, take as take$1, mergeMap as mergeMap$1 } from 'rxjs/operators';
2
+ import { NgModule, inject, Component, ViewEncapsulation, Inject, Injectable } from '@angular/core';
3
+ import { Subscription, of, mergeMap, throwError, forkJoin, tap } from 'rxjs';
5
4
  import clone from 'just-clone';
5
+ import { map, catchError, take, mergeMap as mergeMap$1 } from 'rxjs/operators';
6
6
  import * as i1$1 from '@angular/material/snack-bar';
7
7
  import { MatSnackBarRef, MAT_SNACK_BAR_DATA } from '@angular/material/snack-bar';
8
8
  import * as i2 from '@angular/material/icon';
9
9
  import { MatIconModule } from '@angular/material/icon';
10
10
  import * as i1 from '@angular/material/button';
11
11
  import { MatButtonModule } from '@angular/material/button';
12
- import * as i1$2 from '@ngrx/store';
13
- import { createAction, props, createReducer, on } from '@ngrx/store';
14
12
  import { DateTime } from 'luxon';
15
- import * as i2$1 from '@angular/router';
16
- import * as i1$3 from '@angular/common/http';
13
+ import * as i1$2 from '@angular/common/http';
17
14
  import { HttpParams } from '@angular/common/http';
18
15
 
19
- const REST_SETTINGS = {
16
+ const BX_REST_SETTINGS = {
20
17
  auth: {
21
18
  source: 'cookies',
22
19
  key: 'auth'
@@ -33,81 +30,6 @@ function BXRestMapResult(v) {
33
30
  return undefined;
34
31
  }
35
32
 
36
- const $get = 'get';
37
- const $add = 'add';
38
- const $set = 'set';
39
- const $event = 'event';
40
- const $update = 'update';
41
- const $user = 'user';
42
- const $task = 'task';
43
- const $calendar = 'calendar';
44
- const $meeting = 'meeting';
45
- const $list = 'list';
46
- const $search = 'search';
47
- const $accessibility = 'accessibility';
48
- const $delete = 'delete';
49
- const $nearest = 'nearest';
50
- const $params = 'params';
51
- const $status = 'status';
52
- const $resource = 'resource';
53
- const $booking = 'booking';
54
- const $section = 'section';
55
- const $settings = 'settings';
56
- const $tasks = 'tasks';
57
- const $elapseditem = 'elapseditem';
58
- const $getlist = 'getlist';
59
- const $approve = 'approve';
60
- const $complete = 'complete';
61
- const $counters = 'counters';
62
- const $deger = 'deger';
63
- const $delegate = 'delegate';
64
- const $disapprove = 'disapprove';
65
- const $favorite = 'favorite';
66
- const $files = 'files';
67
- const $file = 'file';
68
- const $attach = 'attach';
69
- const $field = 'field';
70
- const $getFields = 'get' + $field + 's';
71
- const $getaccess = 'getaccess';
72
- const $history = 'history';
73
- const $pause = 'pause';
74
- const $renew = 'renew';
75
- const $start = 'start';
76
- const $result = 'result';
77
- const $planner = 'planner';
78
- const $disk = 'disk';
79
- const $rename = 'rename';
80
- const $markdeleted = 'markdeleted';
81
- const $restore = 'restore';
82
- const $folder = 'folder';
83
- const $getchildren = 'getchildren';
84
- const $copyto = 'copyto';
85
- const $moveto = 'moveto';
86
- const $uploadfile = 'uploadfile';
87
- const $storage = 'storage';
88
- const $getTypes = 'getTypes';
89
- const $stages = 'stages';
90
- const $getmanifest = 'getmanifest';
91
- const $isactionallowed = 'isactionallowed';
92
- const $commentitem = 'commentitem';
93
- const $department = 'department';
94
- const $sonet_group = 'sonet_group';
95
- const $create = 'create';
96
- const $feature = 'feature';
97
- const $access = 'access';
98
- const $request = 'request';
99
- const $socialnetwork = 'socialnetwork';
100
- const $api = 'api';
101
- const $workgroup = 'workgroup';
102
- const $log = 'log';
103
- const $blogpost = 'blogpost';
104
- const $lists = 'lists';
105
- const $iblock = 'iblock';
106
- const $type = 'type';
107
- const $id = 'id';
108
- const $element = 'element';
109
- const $url = 'url';
110
-
111
33
  class BxRestModule {
112
34
  }
113
35
  BxRestModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BxRestModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
@@ -452,29 +374,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
452
374
  }]
453
375
  }] });
454
376
 
455
- const save = createAction('[Auth Component] Save', props());
456
- const saveAccessToken = createAction('[Auth Component] SaveAccessToken', props());
457
- const initialState = {
458
- access_token: '',
459
- client_endpoint: '',
460
- domain: '',
461
- expires: 0,
462
- expires_in: 0,
463
- member_id: '',
464
- refresh_token: '',
465
- scope: '',
466
- server_endpoint: '',
467
- status: '',
468
- user_id: 0
469
- };
470
- const _authReducer = createReducer(initialState, on(saveAccessToken, (s, data) => {
471
- let copy = clone(s);
472
- return Object.assign(copy, data);
473
- }));
474
- function authReducer(state = initialState, action) {
475
- return _authReducer(state, action);
476
- }
477
-
478
377
  const time = {
479
378
  oneDayMilliseconds: 1000 * 60 * 60 * 24
480
379
  };
@@ -576,7 +475,7 @@ class BaseServices {
576
475
  }
577
476
  getHomeAddress() {
578
477
  // return this.prepareBaseAddress(environment.urls.home)
579
- return this.prepareBaseAddress(REST_SETTINGS.urls.home);
478
+ return this.prepareBaseAddress(BX_REST_SETTINGS.urls.home);
580
479
  }
581
480
  dateDiff(a, b) {
582
481
  return new Date(a.valueOf() - b.valueOf());
@@ -680,6 +579,27 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
680
579
  }]
681
580
  }] });
682
581
 
582
+ class SessionStorage {
583
+ static setItem(name, value) {
584
+ sessionStorage.setItem(name, JSON.stringify(value));
585
+ }
586
+ static getItem(name) {
587
+ const res = sessionStorage.getItem(name);
588
+ if (res) {
589
+ return JSON.parse(res);
590
+ }
591
+ return undefined;
592
+ }
593
+ }
594
+ SessionStorage.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SessionStorage, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
595
+ SessionStorage.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SessionStorage, providedIn: 'root' });
596
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SessionStorage, decorators: [{
597
+ type: Injectable,
598
+ args: [{
599
+ providedIn: 'root'
600
+ }]
601
+ }] });
602
+
683
603
  class RestServices {
684
604
  constructor() {
685
605
  this.BX24 = false;
@@ -700,114 +620,136 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
700
620
  }], ctorParameters: function () { return []; } });
701
621
 
702
622
  class SessionKeyServices extends BaseServices {
703
- constructor(store, route, BxApiLib, REST_SETTINGS) {
623
+ constructor(
624
+ // private route: ActivatedRoute,
625
+ BxApiLib) {
704
626
  super();
705
- this.store = store;
706
- this.route = route;
707
627
  this.BxApiLib = BxApiLib;
708
628
  this.authHave = false;
709
629
  this.subscribe = {
710
630
  authData: new Subscription()
711
631
  };
712
- this.REST_SETTINGS = REST_SETTINGS;
713
- this.authData$ = this.store.select('auth');
714
- this.authData$.subscribe(authData => {
715
- if ((authData && !authData.access_token.length) || !authData) {
716
- // получаем токен по собственным каналом (в битриксе приложение trace:apps.trace)
717
- window.addEventListener('message', (event) => {
718
- if (event.origin !== window.origin) { // проверяем что это не наше сообщение (с текущего приложения)
719
- if (event.data && event.data.param) {
720
- if (typeof event.data.param === 'string') {
721
- event.data.param = JSON.parse(event.data.param);
722
- }
723
- let save = {};
724
- if (event.data.param.access_token) {
725
- let param = event.data.param;
726
- save.access_token = event.data.param.access_token;
727
- save = {
728
- access_token: (param.access_token) ? param.access_token : undefined,
729
- client_endpoint: (param.client_endpoint) ? param.client_endpoint : undefined,
730
- domain: (param.domain) ? param.domain : undefined,
731
- expires: (param.expires) ? param.expires : undefined,
732
- expires_in: (param.expires_in) ? param.expires_in : undefined,
733
- member_id: (param.member_id) ? param.member_id : undefined,
734
- refresh_token: (param.refresh_token) ? param.refresh_token : undefined,
735
- scope: (param.scope) ? param.scope : undefined,
736
- server_endpoint: (param.server_endpoint) ? param.server_endpoint : undefined,
737
- status: (param.status) ? param.status : undefined,
738
- user_id: (param.user_id) ? param.user_id : undefined,
739
- type: (param.type) ? param.type : undefined,
740
- };
741
- }
632
+ let authData = SessionStorage.getItem(this.constructor.name);
633
+ if ((authData && !authData.access_token.length) || !authData) {
634
+ // получаем токен по собственным каналом (в битриксе приложение trace:apps.trace)
635
+ window.addEventListener('message', (event) => {
636
+ if (event.origin !== window.origin) { // проверяем что это не наше сообщение (с текущего приложения)
637
+ if (event.data && event.data.param) {
638
+ if (typeof event.data.param === 'string') {
639
+ event.data.param = JSON.parse(event.data.param);
640
+ }
641
+ if (event.data.param.access_token) {
642
+ let param = event.data.param;
643
+ let save = {
644
+ access_token: (param.access_token) ? param.access_token : undefined,
645
+ client_endpoint: (param.client_endpoint) ? param.client_endpoint : undefined,
646
+ domain: (param.domain) ? param.domain : undefined,
647
+ expires: (param.expires) ? param.expires : undefined,
648
+ expires_in: (param.expires_in) ? param.expires_in : undefined,
649
+ member_id: (param.member_id) ? param.member_id : undefined,
650
+ refresh_token: (param.refresh_token) ? param.refresh_token : undefined,
651
+ scope: (param.scope) ? param.scope : undefined,
652
+ server_endpoint: (param.server_endpoint) ? param.server_endpoint : undefined,
653
+ status: (param.status) ? param.status : undefined,
654
+ user_id: (param.user_id) ? param.user_id : undefined,
655
+ type: (param.type) ? param.type : undefined,
656
+ };
742
657
  if (Object.keys(save).length && save.access_token) {
743
- this.store.dispatch(saveAccessToken(save));
658
+ SessionStorage.setItem(this.constructor.name, save);
744
659
  this.subscribeAll();
745
660
  }
746
661
  }
747
662
  }
748
- });
749
- this.subscribe.authData = this.route.queryParamMap
750
- .pipe(filter(param => param.has('AUTH_ID')
751
- || param.has('access_token')
752
- || param.has('REFRESH_ID')
753
- || param.has('DOMAIN')))
754
- .subscribe((param) => {
755
- let save = {};
756
- if (param.has('AUTH_ID') && !authData.access_token.length) {
757
- const get = param.get('AUTH_ID');
758
- if (get) {
759
- CookiesServices.set('auth', get); // потом убрать
760
- save.access_token = get;
761
- }
762
- }
763
- if (param.has('access_token') && !authData.access_token.length) {
764
- const get = param.get('access_token');
765
- if (get) {
766
- CookiesServices.set('auth', get); // потом убрать
767
- save.access_token = get;
768
- }
769
- }
770
- if (param.has('REFRESH_ID') && !authData.refresh_token.length) {
771
- const get = param.get('REFRESH_ID');
772
- if (get) {
773
- save.refresh_token = get;
774
- }
775
- }
776
- if (param.has('DOMAIN') && !authData.domain.length) {
777
- const get = param.get('DOMAIN');
778
- if (get) {
779
- save.domain = get;
780
- }
781
- }
782
- if (Object.keys(save).length && save.access_token) {
783
- this.store.dispatch(saveAccessToken(save));
784
- this.subscribeAll();
785
- }
786
- else {
787
- // если битрикс не шлёт нужные мне параметры на прямую
788
- // просим их мне отдать так как описано это в документации
789
- let f = () => {
790
- if (this.BxApiLib.BX24) {
791
- const initDate = this.BxApiLib.BX24.getAuth();
792
- this.store.dispatch(saveAccessToken(initDate));
793
- }
794
- };
795
- this.BxApiLib.init(f);
663
+ }
664
+ });
665
+ /*
666
+ this.subscribe.authData = this.route.queryParamMap
667
+ .pipe(
668
+ filter(param =>
669
+ param.has('AUTH_ID')
670
+ || param.has('access_token')
671
+ || param.has('REFRESH_ID')
672
+ || param.has('DOMAIN')
673
+ )
674
+ )
675
+ .subscribe((param: ParamMap) => {
676
+ if(!save) {
677
+ let save = {
678
+ access_token: undefined,
679
+ client_endpoint: (param.client_endpoint) ? param.client_endpoint : undefined,
680
+ domain: (param.domain) ? param.domain : undefined,
681
+ expires: (param.expires) ? param.expires : undefined,
682
+ expires_in: (param.expires_in) ? param.expires_in : undefined,
683
+ member_id: (param.member_id) ? param.member_id : undefined,
684
+ refresh_token: (param.refresh_token) ? param.refresh_token : undefined,
685
+ scope: (param.scope) ? param.scope : undefined,
686
+ server_endpoint: (param.server_endpoint) ? param.server_endpoint : undefined,
687
+ status: (param.status) ? param.status : undefined,
688
+ user_id: (param.user_id) ? param.user_id : undefined,
689
+ type: (param.type) ? param.type : undefined,
690
+ }
691
+ }
692
+
693
+ if (param.has('AUTH_ID') && !authData?.access_token.length) {
694
+ const get = param.get('AUTH_ID')
695
+ if (get) {
696
+ Cookies.set('auth', get) //TODO: потом убрать
697
+ save.access_token = get
698
+ }
699
+ }
700
+
701
+ if (param.has('access_token') && !authData.access_token.length) {
702
+ const get = param.get('access_token')
703
+ if (get) {
704
+ Cookies.set('auth', get) // TODO: потом убрать
705
+ save.access_token = get
706
+ }
707
+ }
708
+
709
+ if (param.has('REFRESH_ID') && !authData.refresh_token.length) {
710
+ const get = param.get('REFRESH_ID')
711
+ if (get) {
712
+ save.refresh_token = get
713
+ }
714
+ }
715
+
716
+ if (param.has('DOMAIN') && !authData.domain.length) {
717
+ const get = param.get('DOMAIN')
718
+ if (get) {
719
+ save.domain = get
720
+ }
721
+ }
722
+ if (Object.keys(save).length && save.access_token) {
723
+ SessionStorage.setItem(this.constructor.name, save)
724
+ this.subscribeAll()
725
+ } else {
726
+ // если битрикс не шлёт нужные мне параметры на прямую
727
+ // просим их мне отдать так как описано это в документации
728
+ let f = () => {
729
+ if (this.BxApiLib.BX24) {
730
+ const initDate = this.BxApiLib.BX24.getAuth()
731
+ SessionStorage.setItem(this.constructor.name, save)
796
732
  }
797
- });
798
- }
799
- else if (this.getAuth().length) {
800
- this.authHave = true;
801
- }
802
- this.authData = authData;
803
- });
733
+ }
734
+
735
+ this.BxApiLib.init(f)
736
+ }
737
+
738
+ })
739
+ */
740
+ }
741
+ else if (this.getAuth().length) {
742
+ this.authHave = true;
743
+ }
744
+ this.authData = authData;
804
745
  }
805
746
  subscribeAll() {
806
747
  this.subscribe.authData.unsubscribe();
807
748
  }
808
749
  getAuth() {
809
- switch (REST_SETTINGS.auth.key) {
750
+ switch (BX_REST_SETTINGS.auth.key) {
810
751
  case 'auth':
752
+ console.log('Cookies.get(\'auth\')', CookiesServices.get('auth'));
811
753
  return CookiesServices.get('auth');
812
754
  default:
813
755
  if (window.BX && window.BX.bitrix_sessid()) {
@@ -823,8 +765,8 @@ class SessionKeyServices extends BaseServices {
823
765
  }
824
766
  }
825
767
  getKeyAuth() {
826
- if (REST_SETTINGS.auth.key.length) {
827
- return REST_SETTINGS.auth.key;
768
+ if (BX_REST_SETTINGS.auth.key.length) {
769
+ return BX_REST_SETTINGS.auth.key;
828
770
  }
829
771
  else {
830
772
  if (window.BX && window.BX.bitrix_sessid()
@@ -859,34 +801,30 @@ class SessionKeyServices extends BaseServices {
859
801
  return false;
860
802
  }
861
803
  getAuthParams() {
862
- switch (REST_SETTINGS.auth.source) {
804
+ console.log('BX_REST_SETTINGS', BX_REST_SETTINGS);
805
+ switch (BX_REST_SETTINGS.auth.source) {
863
806
  case 'cookies':
864
- return of(this.getAuth());
807
+ return this.getAuth();
865
808
  default:
866
- return this.authData$.pipe(take(1), map(v => (v) ? v.access_token : undefined));
809
+ return (this.authData) ? this.authData.access_token : undefined;
867
810
  }
868
811
  }
869
812
  getBaseUrl() {
870
- return of(this.prepareBaseAddress(this.REST_SETTINGS.urls.home, 'rest'));
813
+ return of(this.prepareBaseAddress(BX_REST_SETTINGS.urls.home, 'rest'));
871
814
  // return this.authData$.pipe( // TODO: разобраться позже
872
815
  // take(1),
873
816
  // map(v => (v && v.domain) ? this.prepareBaseAddress(v.domain) : undefined)
874
817
  // )
875
818
  }
876
819
  }
877
- SessionKeyServices.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SessionKeyServices, deps: [{ token: i1$2.Store }, { token: i2$1.ActivatedRoute }, { token: RestServices }, { token: REST_SETTINGS, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
820
+ SessionKeyServices.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SessionKeyServices, deps: [{ token: RestServices }], target: i0.ɵɵFactoryTarget.Injectable });
878
821
  SessionKeyServices.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SessionKeyServices, providedIn: 'root' });
879
822
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SessionKeyServices, decorators: [{
880
823
  type: Injectable,
881
824
  args: [{
882
825
  providedIn: 'root'
883
826
  }]
884
- }], ctorParameters: function () { return [{ type: i1$2.Store }, { type: i2$1.ActivatedRoute }, { type: RestServices }, { type: undefined, decorators: [{
885
- type: Optional
886
- }, {
887
- type: Inject,
888
- args: [REST_SETTINGS]
889
- }] }]; } });
827
+ }], ctorParameters: function () { return [{ type: RestServices }]; } });
890
828
 
891
829
  class HttpData extends BaseServices {
892
830
  constructor() {
@@ -1017,14 +955,14 @@ class BaseHttp extends HttpData {
1017
955
  };
1018
956
  }
1019
957
  }
1020
- BaseHttp.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BaseHttp, deps: [{ token: i1$3.HttpClient }, { token: SnackBarService }], target: i0.ɵɵFactoryTarget.Injectable });
958
+ BaseHttp.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BaseHttp, deps: [{ token: i1$2.HttpClient }, { token: SnackBarService }], target: i0.ɵɵFactoryTarget.Injectable });
1021
959
  BaseHttp.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BaseHttp, providedIn: 'root' });
1022
960
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BaseHttp, decorators: [{
1023
961
  type: Injectable,
1024
962
  args: [{
1025
963
  providedIn: 'root'
1026
964
  }]
1027
- }], ctorParameters: function () { return [{ type: i1$3.HttpClient }, { type: SnackBarService }]; } });
965
+ }], ctorParameters: function () { return [{ type: i1$2.HttpClient }, { type: SnackBarService }]; } });
1028
966
 
1029
967
  class BaseHttpServices extends BaseHttp {
1030
968
  httpGet(url, params = {}, settings = this.defSettings) {
@@ -1043,56 +981,54 @@ class HttpServices extends BaseHttpServices {
1043
981
  this.session = session;
1044
982
  }
1045
983
  httpPost(url, params = {}, settings = this.defSettings) {
1046
- return this.session.getAuthParams().pipe(mergeMap(auth => {
1047
- if (auth) {
1048
- const paramsClone = clone(params);
1049
- paramsClone[this.session.getKeyAuth()] = auth;
1050
- return this.session.getBaseUrl().pipe(mergeMap(v => {
1051
- if (v) {
1052
- return this.http.post(this.prepareBaseAddress(v) + url, this.getHttpParamsPost(paramsClone, new FormData(), false, [], settings));
1053
- }
1054
- return throwError(() => 'get base url error');
1055
- }));
1056
- }
1057
- else {
1058
- this.snackBar.error('Error: Auth not get');
1059
- return throwError(() => 'auth not get');
1060
- }
1061
- }));
984
+ let auth = this.session.getAuthParams();
985
+ if (auth) {
986
+ const paramsClone = clone(params);
987
+ paramsClone[this.session.getKeyAuth()] = auth;
988
+ return this.session.getBaseUrl().pipe(mergeMap(v => {
989
+ if (v) {
990
+ return this.http.post(this.prepareBaseAddress(v) + url, this.getHttpParamsPost(paramsClone, new FormData(), false, [], settings));
991
+ }
992
+ return throwError(() => 'get base url error');
993
+ }));
994
+ }
995
+ else {
996
+ this.snackBar.error('Error: Auth not get');
997
+ return throwError(() => 'auth not get');
998
+ }
1062
999
  }
1063
1000
  httpGet(url, params = {}, settings = this.defSettings) {
1064
- return this.session.getAuthParams().pipe(mergeMap(auth => {
1065
- if (auth) {
1066
- if (params === null) {
1067
- params = {};
1068
- }
1069
- const paramsClone = clone(params);
1070
- paramsClone[this.session.getKeyAuth()] = auth;
1071
- let options = {
1072
- params: this.getHttpParamsGet(paramsClone)
1073
- };
1074
- return this.session.getBaseUrl().pipe(mergeMap(v => {
1075
- if (v) {
1076
- return this.http.get(this.prepareBaseAddress(v) + url, options);
1077
- }
1078
- return throwError(() => 'get base url error');
1079
- }));
1080
- }
1081
- else {
1082
- this.snackBar.error('Error: Auth not get');
1083
- return throwError(() => 'auth not get');
1001
+ let auth = this.session.getAuthParams();
1002
+ if (auth) {
1003
+ if (params === null) {
1004
+ params = {};
1084
1005
  }
1085
- }));
1006
+ const paramsClone = clone(params);
1007
+ paramsClone[this.session.getKeyAuth()] = auth;
1008
+ let options = {
1009
+ params: this.getHttpParamsGet(paramsClone)
1010
+ };
1011
+ return this.session.getBaseUrl().pipe(mergeMap(v => {
1012
+ if (v) {
1013
+ return this.http.get(this.prepareBaseAddress(v) + url, options);
1014
+ }
1015
+ return throwError(() => 'get base url error');
1016
+ }));
1017
+ }
1018
+ else {
1019
+ this.snackBar.error('Error: Auth not get');
1020
+ return throwError(() => 'auth not get');
1021
+ }
1086
1022
  }
1087
1023
  }
1088
- HttpServices.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: HttpServices, deps: [{ token: i1$3.HttpClient }, { token: SnackBarService }, { token: SessionKeyServices }], target: i0.ɵɵFactoryTarget.Injectable });
1024
+ HttpServices.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: HttpServices, deps: [{ token: i1$2.HttpClient }, { token: SnackBarService }, { token: SessionKeyServices }], target: i0.ɵɵFactoryTarget.Injectable });
1089
1025
  HttpServices.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: HttpServices, providedIn: 'root' });
1090
1026
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: HttpServices, decorators: [{
1091
1027
  type: Injectable,
1092
1028
  args: [{
1093
1029
  providedIn: 'root'
1094
1030
  }]
1095
- }], ctorParameters: function () { return [{ type: i1$3.HttpClient }, { type: SnackBarService }, { type: SessionKeyServices }]; } });
1031
+ }], ctorParameters: function () { return [{ type: i1$2.HttpClient }, { type: SnackBarService }, { type: SessionKeyServices }]; } });
1096
1032
 
1097
1033
  // type TransformFunction<T, R> = (input: T) => R;
1098
1034
  class HttpBXServices extends HttpServices {
@@ -1152,44 +1088,42 @@ class HttpBXServices extends HttpServices {
1152
1088
  return this.httpGet(this.getNameMethod(name), params, settings);
1153
1089
  }
1154
1090
  httpPost(url, params = {}, settings = this.defSettings) {
1155
- return this.session.getAuthParams().pipe(mergeMap(auth => {
1156
- if (auth) {
1157
- const paramsClone = clone(params);
1158
- paramsClone[this.session.getKeyAuth()] = auth;
1159
- return this.session.getBaseUrl().pipe(mergeMap(v => {
1160
- if (v) {
1161
- return this.http.post(this.prepareBaseAddress(v) + url, this.getHttpParamsPost(paramsClone, new FormData(), false, [], settings));
1162
- }
1163
- return throwError(() => 'get base url error');
1164
- }));
1165
- }
1166
- else {
1167
- return throwError(() => 'auth not get');
1168
- }
1169
- }));
1091
+ let auth = this.session.getAuthParams();
1092
+ if (auth) {
1093
+ const paramsClone = clone(params);
1094
+ paramsClone[this.session.getKeyAuth()] = auth;
1095
+ return this.session.getBaseUrl().pipe(mergeMap(v => {
1096
+ if (v) {
1097
+ return this.http.post(this.prepareBaseAddress(v) + url, this.getHttpParamsPost(paramsClone, new FormData(), false, [], settings));
1098
+ }
1099
+ return throwError(() => 'get base url error');
1100
+ }));
1101
+ }
1102
+ else {
1103
+ return throwError(() => 'auth not get');
1104
+ }
1170
1105
  }
1171
1106
  httpGet(url, params = {}, settings = this.defSettings) {
1172
- return this.session.getAuthParams().pipe(mergeMap(auth => {
1173
- if (auth) {
1174
- if (params === null) {
1175
- params = {};
1176
- }
1177
- const paramsClone = clone(params);
1178
- paramsClone[this.session.getKeyAuth()] = auth;
1179
- let options = {
1180
- params: this.getHttpParamsGet(paramsClone)
1181
- };
1182
- return this.session.getBaseUrl().pipe(mergeMap(v => {
1183
- if (v) {
1184
- return this.http.get(this.prepareBaseAddress(v) + url, options);
1185
- }
1186
- return throwError(() => 'get base url error');
1187
- }));
1107
+ let auth = this.session.getAuthParams();
1108
+ if (auth) {
1109
+ if (params === null) {
1110
+ params = {};
1188
1111
  }
1189
- else {
1190
- return throwError(() => 'auth not get');
1191
- }
1192
- }));
1112
+ const paramsClone = clone(params);
1113
+ paramsClone[this.session.getKeyAuth()] = auth;
1114
+ let options = {
1115
+ params: this.getHttpParamsGet(paramsClone)
1116
+ };
1117
+ return this.session.getBaseUrl().pipe(mergeMap(v => {
1118
+ if (v) {
1119
+ return this.http.get(this.prepareBaseAddress(v) + url, options);
1120
+ }
1121
+ return throwError(() => 'get base url error');
1122
+ }));
1123
+ }
1124
+ else {
1125
+ return throwError(() => 'auth not get');
1126
+ }
1193
1127
  }
1194
1128
  getNameMethod(arr) {
1195
1129
  return arr.join('.');
@@ -1204,157 +1138,100 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
1204
1138
  }]
1205
1139
  }] });
1206
1140
 
1207
- class BXRestListsElement {
1208
- constructor(http) {
1209
- this.http = http;
1210
- this.url = {
1211
- add: [$lists, $element, $add],
1212
- delete: [$lists, $element, $delete],
1213
- get: [$lists, $element, $get],
1214
- update: [$lists, $element, $update],
1215
- getFileUrl: [$lists, $element, $get, $file, $url] // Метод возвращает путь к файлу
1216
- };
1217
- }
1218
- get(pram) {
1219
- return this.http.post(this.url.get, pram);
1220
- }
1221
- customPipe() {
1222
- }
1223
- }
1224
- BXRestListsElement.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestListsElement, deps: [{ token: HttpBXServices }], target: i0.ɵɵFactoryTarget.Injectable });
1225
- BXRestListsElement.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestListsElement, providedIn: 'root' });
1226
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestListsElement, decorators: [{
1227
- type: Injectable,
1228
- args: [{
1229
- providedIn: 'root'
1230
- }]
1231
- }], ctorParameters: function () { return [{ type: HttpBXServices }]; } });
1232
-
1233
- class BXRestLists {
1234
- constructor(element) {
1235
- this.element = element;
1236
- this.url = {
1237
- add: [$lists, $add],
1238
- delete: [$lists, $delete],
1239
- get: [$lists, $get],
1240
- update: [$lists, $update],
1241
- getIblockTypeId: [$lists, $get, $iblock, $type, $id], // Метод возвращает id типа инфоблока
1242
- };
1243
- }
1244
- }
1245
- BXRestLists.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestLists, deps: [{ token: BXRestListsElement }], target: i0.ɵɵFactoryTarget.Injectable });
1246
- BXRestLists.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestLists, providedIn: 'root' });
1247
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestLists, decorators: [{
1248
- type: Injectable,
1249
- args: [{
1250
- providedIn: 'root'
1251
- }]
1252
- }], ctorParameters: function () { return [{ type: BXRestListsElement }]; } });
1253
-
1254
- class BaseMapServices extends BaseServices {
1255
- }
1256
- BaseMapServices.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BaseMapServices, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
1257
- BaseMapServices.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BaseMapServices, providedIn: 'root' });
1258
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BaseMapServices, decorators: [{
1259
- type: Injectable,
1260
- args: [{
1261
- providedIn: 'root'
1262
- }]
1263
- }] });
1264
-
1265
- class BXRestMapListsElement extends BaseMapServices {
1266
- get(items) {
1267
- return items.map(item => Object.assign(item, {
1268
- BP_PUBLISHED: item.BP_PUBLISHED === 'Y',
1269
- CREATED_BY: this.toNum(item.CREATED_BY),
1270
- IBLOCK_ID: this.toNum(item.IBLOCK_ID),
1271
- ID: this.toNum(item.ID)
1272
- }));
1273
- }
1274
- }
1275
- BXRestMapListsElement.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestMapListsElement, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
1276
- BXRestMapListsElement.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestMapListsElement, providedIn: 'root' });
1277
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestMapListsElement, decorators: [{
1278
- type: Injectable,
1279
- args: [{
1280
- providedIn: 'root'
1281
- }]
1282
- }] });
1283
-
1284
- class BXRestMapLists extends BaseMapServices {
1285
- constructor(element) {
1286
- super();
1287
- this.element = element;
1288
- }
1289
- }
1290
- BXRestMapLists.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestMapLists, deps: [{ token: BXRestMapListsElement }], target: i0.ɵɵFactoryTarget.Injectable });
1291
- BXRestMapLists.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestMapLists, providedIn: 'root' });
1292
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestMapLists, decorators: [{
1293
- type: Injectable,
1294
- args: [{
1295
- providedIn: 'root'
1296
- }]
1297
- }], ctorParameters: function () { return [{ type: BXRestMapListsElement }]; } });
1298
-
1299
- class Navvy {
1300
- constructor(snackBar) {
1301
- this.snackBar = snackBar;
1302
- }
1303
- mapAndSnackBarError(request, errorText) {
1304
- return request.pipe(map(v => BXRestMapResult(v)), catchError(err => {
1305
- this.snackBar.error(errorText);
1306
- return throwError(() => err);
1307
- }));
1308
- }
1309
- }
1310
- Navvy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: Navvy, deps: [{ token: SnackBarService }], target: i0.ɵɵFactoryTarget.Injectable });
1311
- Navvy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: Navvy, providedIn: 'root' });
1312
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: Navvy, decorators: [{
1313
- type: Injectable,
1314
- args: [{
1315
- providedIn: 'root'
1316
- }]
1317
- }], ctorParameters: function () { return [{ type: SnackBarService }]; } });
1318
-
1319
- class BXRestNavvyListsElement {
1320
- constructor(BXRestListsElement, BXRestMap, Navvy) {
1321
- this.BXRestListsElement = BXRestListsElement;
1322
- this.BXRestMap = BXRestMap;
1323
- this.Navvy = Navvy;
1324
- }
1325
- get(pram) {
1326
- return this.Navvy.mapAndSnackBarError(this.BXRestListsElement.get(pram), 'Не удалось получить элемент списка').pipe(map(v => (v) ? this.BXRestMap.get(v) : undefined));
1327
- }
1328
- }
1329
- BXRestNavvyListsElement.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestNavvyListsElement, deps: [{ token: BXRestListsElement }, { token: BXRestMapListsElement }, { token: Navvy }], target: i0.ɵɵFactoryTarget.Injectable });
1330
- BXRestNavvyListsElement.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestNavvyListsElement, providedIn: 'root' });
1331
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestNavvyListsElement, decorators: [{
1332
- type: Injectable,
1333
- args: [{
1334
- providedIn: 'root'
1335
- }]
1336
- }], ctorParameters: function () { return [{ type: BXRestListsElement }, { type: BXRestMapListsElement }, { type: Navvy }]; } });
1141
+ const $get = 'get';
1142
+ const $add = 'add';
1143
+ const $set = 'set';
1144
+ const $event = 'event';
1145
+ const $update = 'update';
1146
+ const $user = 'user';
1147
+ const $task = 'task';
1148
+ const $calendar = 'calendar';
1149
+ const $meeting = 'meeting';
1150
+ const $list = 'list';
1151
+ const $search = 'search';
1152
+ const $accessibility = 'accessibility';
1153
+ const $delete = 'delete';
1154
+ const $nearest = 'nearest';
1155
+ const $params = 'params';
1156
+ const $status = 'status';
1157
+ const $resource = 'resource';
1158
+ const $booking = 'booking';
1159
+ const $section = 'section';
1160
+ const $settings = 'settings';
1161
+ const $tasks = 'tasks';
1162
+ const $elapseditem = 'elapseditem';
1163
+ const $getlist = 'getlist';
1164
+ const $approve = 'approve';
1165
+ const $complete = 'complete';
1166
+ const $counters = 'counters';
1167
+ const $deger = 'deger';
1168
+ const $delegate = 'delegate';
1169
+ const $disapprove = 'disapprove';
1170
+ const $favorite = 'favorite';
1171
+ const $files = 'files';
1172
+ const $file = 'file';
1173
+ const $attach = 'attach';
1174
+ const $field = 'field';
1175
+ const $getFields = 'get' + $field + 's';
1176
+ const $getaccess = 'getaccess';
1177
+ const $history = 'history';
1178
+ const $pause = 'pause';
1179
+ const $renew = 'renew';
1180
+ const $start = 'start';
1181
+ const $result = 'result';
1182
+ const $planner = 'planner';
1183
+ const $disk = 'disk';
1184
+ const $rename = 'rename';
1185
+ const $markdeleted = 'markdeleted';
1186
+ const $restore = 'restore';
1187
+ const $folder = 'folder';
1188
+ const $getchildren = 'getchildren';
1189
+ const $copyto = 'copyto';
1190
+ const $moveto = 'moveto';
1191
+ const $uploadfile = 'uploadfile';
1192
+ const $storage = 'storage';
1193
+ const $getTypes = 'getTypes';
1194
+ const $stages = 'stages';
1195
+ const $getmanifest = 'getmanifest';
1196
+ const $isactionallowed = 'isactionallowed';
1197
+ const $commentitem = 'commentitem';
1198
+ const $department = 'department';
1199
+ const $sonet_group = 'sonet_group';
1200
+ const $create = 'create';
1201
+ const $feature = 'feature';
1202
+ const $access = 'access';
1203
+ const $request = 'request';
1204
+ const $socialnetwork = 'socialnetwork';
1205
+ const $api = 'api';
1206
+ const $workgroup = 'workgroup';
1207
+ const $log = 'log';
1208
+ const $blogpost = 'blogpost';
1209
+ const $lists = 'lists';
1210
+ const $iblock = 'iblock';
1211
+ const $type = 'type';
1212
+ const $id = 'id';
1213
+ const $element = 'element';
1214
+ const $url = 'url';
1215
+ const $bizproc = 'bizproc';
1216
+ const $workflow = 'workflow';
1217
+ const $instances = 'instances';
1218
+ const $terminate = '$terminate';
1219
+ const $kill = 'kill';
1220
+ const $template = 'template';
1221
+ const $activity = 'activity';
1222
+ const $robot = 'robot';
1223
+ const $send = 'send';
1337
1224
 
1338
- class BXRestNavvyLists {
1339
- constructor(element) {
1340
- this.element = element;
1341
- this.url = {
1342
- add: [$lists, $add],
1343
- delete: [$lists, $delete],
1344
- get: [$lists, $get],
1345
- update: [$lists, $update],
1346
- getIblockTypeId: [$lists, $get, $iblock, $type, $id], // Метод возвращает id типа инфоблока
1347
- };
1348
- }
1225
+ class BaseMapServices extends BaseServices {
1349
1226
  }
1350
- BXRestNavvyLists.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestNavvyLists, deps: [{ token: BXRestNavvyListsElement }], target: i0.ɵɵFactoryTarget.Injectable });
1351
- BXRestNavvyLists.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestNavvyLists, providedIn: 'root' });
1352
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestNavvyLists, decorators: [{
1227
+ BaseMapServices.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BaseMapServices, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
1228
+ BaseMapServices.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BaseMapServices, providedIn: 'root' });
1229
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BaseMapServices, decorators: [{
1353
1230
  type: Injectable,
1354
1231
  args: [{
1355
1232
  providedIn: 'root'
1356
1233
  }]
1357
- }], ctorParameters: function () { return [{ type: BXRestNavvyListsElement }]; } });
1234
+ }] });
1358
1235
 
1359
1236
  class BXRestUserMap extends BaseMapServices {
1360
1237
  current(user) {
@@ -1511,17 +1388,20 @@ class BXRestUser {
1511
1388
  return this.http.get(this.url.fields);
1512
1389
  }
1513
1390
  setDefParam(params) {
1391
+ if (!params.FILTER) {
1392
+ params.FILTER = {};
1393
+ }
1514
1394
  if (!params.hasOwnProperty('ACTIVE')) {
1515
- params.ACTIVE = this.def.params.ACTIVE;
1395
+ params.FILTER.ACTIVE = this.def.params.ACTIVE;
1516
1396
  }
1517
- if (params.ACTIVE && params.ACTIVE === 2) {
1518
- delete params.ACTIVE;
1397
+ if (params.FILTER.ACTIVE && params.FILTER.ACTIVE === 2) {
1398
+ delete params.FILTER.ACTIVE;
1519
1399
  }
1520
1400
  if (!params.hasOwnProperty('start')) {
1521
1401
  params.start = this.def.params.start;
1522
1402
  }
1523
- if (params.UF_DEPARTMENT && !params.UF_DEPARTMENT.length) {
1524
- delete params.UF_DEPARTMENT;
1403
+ if (params.FILTER.UF_DEPARTMENT && !params.FILTER.UF_DEPARTMENT.length) {
1404
+ delete params.FILTER.UF_DEPARTMENT;
1525
1405
  }
1526
1406
  }
1527
1407
  }
@@ -1534,6 +1414,55 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
1534
1414
  }]
1535
1415
  }], ctorParameters: function () { return [{ type: HttpBXServices }, { type: BXRestUserMap }]; } });
1536
1416
 
1417
+ class BXRestListsElement {
1418
+ constructor(http) {
1419
+ this.http = http;
1420
+ this.url = {
1421
+ add: [$lists, $element, $add],
1422
+ delete: [$lists, $element, $delete],
1423
+ get: [$lists, $element, $get],
1424
+ update: [$lists, $element, $update],
1425
+ getFileUrl: [$lists, $element, $get, $file, $url] // Метод возвращает путь к файлу // TODO: Реализовать
1426
+ };
1427
+ }
1428
+ get(pram) {
1429
+ return this.http.post(this.url.get, pram);
1430
+ }
1431
+ add(param) {
1432
+ return this.http.post(this.url.add, param);
1433
+ }
1434
+ }
1435
+ BXRestListsElement.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestListsElement, deps: [{ token: HttpBXServices }], target: i0.ɵɵFactoryTarget.Injectable });
1436
+ BXRestListsElement.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestListsElement, providedIn: 'root' });
1437
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestListsElement, decorators: [{
1438
+ type: Injectable,
1439
+ args: [{
1440
+ providedIn: 'root'
1441
+ }]
1442
+ }], ctorParameters: function () { return [{ type: HttpBXServices }]; } });
1443
+
1444
+ class BXRestLists {
1445
+ constructor(element) {
1446
+ this.element = element;
1447
+ this.url = {
1448
+ add: [$lists, $add],
1449
+ delete: [$lists, $delete],
1450
+ get: [$lists, $get],
1451
+ update: [$lists, $update],
1452
+ getIblockTypeId: [$lists, $get, $iblock, $type, $id], // Метод возвращает id типа инфоблока
1453
+ };
1454
+ }
1455
+ }
1456
+ BXRestLists.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestLists, deps: [{ token: BXRestListsElement }], target: i0.ɵɵFactoryTarget.Injectable });
1457
+ BXRestLists.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestLists, providedIn: 'root' });
1458
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestLists, decorators: [{
1459
+ type: Injectable,
1460
+ args: [{
1461
+ providedIn: 'root'
1462
+ }]
1463
+ }], ctorParameters: function () { return [{ type: BXRestListsElement }]; } });
1464
+
1465
+ // import { AnswerApiTaskBX } from '../../typification/rest/task/answers/task';
1537
1466
  class BXRestTasksTask {
1538
1467
  constructor(http) {
1539
1468
  this.http = http;
@@ -1581,6 +1510,38 @@ class BXRestTasksTask {
1581
1510
  add(param) {
1582
1511
  return this.http.post(this.url.add, param);
1583
1512
  }
1513
+ /*
1514
+ update(taskId: number, updateFields: iBXRestTaskFieldsName[], task: iBXRestTask) {
1515
+ let sendTask: Record<string, any> = {}
1516
+ let taskTS: Record<string, any> = task
1517
+ if (updateFields.length) {
1518
+ for (let updateField of updateFields) {
1519
+ if (taskTS[camelCase(updateField)]) {
1520
+ sendTask[updateField] = taskTS[camelCase(updateField)]
1521
+ }
1522
+ }
1523
+ if (Object.values(sendTask).length) {
1524
+ return this.http.post(
1525
+ this.url.update,
1526
+ {taskId: taskId, fields: sendTask},
1527
+ 'error to update task')
1528
+ } else {
1529
+ this.snackBar.error('not valid send data task')
1530
+ console.error('not valid send data task', sendTask, task)
1531
+ return of(undefined)
1532
+ }
1533
+ }
1534
+
1535
+ this.snackBar.warning('not have field for update')
1536
+ return of(undefined)
1537
+ }
1538
+ */
1539
+ get(requestArray) {
1540
+ return this.http.post(this.url.get, requestArray);
1541
+ }
1542
+ list(param = {}) {
1543
+ return this.http.post(this.url.list, param);
1544
+ }
1584
1545
  }
1585
1546
  BXRestTasksTask.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestTasksTask, deps: [{ token: HttpBXServices }], target: i0.ɵɵFactoryTarget.Injectable });
1586
1547
  BXRestTasksTask.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestTasksTask, providedIn: 'root' });
@@ -1696,33 +1657,185 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
1696
1657
  }]
1697
1658
  }], ctorParameters: function () { return [{ type: BXRestDiskFile }, { type: BXRestDiskFolder }]; } });
1698
1659
 
1699
- class SessionStorageServices {
1700
- setItem(name, value) {
1701
- sessionStorage.setItem(name, JSON.stringify(value));
1660
+ class BXRestBizprocWorkflowInstance {
1661
+ constructor() {
1662
+ this.url = {
1663
+ list: [$bizproc, $workflow, $instances, $list], // Возвращает список запущенных бизнес-процессов. Алиас bizproc.workflow.instances
1664
+ };
1702
1665
  }
1703
- getItem(name) {
1704
- const res = sessionStorage.getItem(name);
1705
- if (res) {
1706
- return JSON.parse(res);
1707
- }
1708
- return undefined;
1666
+ }
1667
+ BXRestBizprocWorkflowInstance.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestBizprocWorkflowInstance, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1668
+ BXRestBizprocWorkflowInstance.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestBizprocWorkflowInstance, providedIn: 'root' });
1669
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestBizprocWorkflowInstance, decorators: [{
1670
+ type: Injectable,
1671
+ args: [{
1672
+ providedIn: 'root'
1673
+ }]
1674
+ }] });
1675
+
1676
+ class BXRestBizprocWorkflowTemplate {
1677
+ constructor(http) {
1678
+ this.http = http;
1679
+ this.url = {
1680
+ add: [$bizproc, $workflow, $template, $add],
1681
+ delete: [$bizproc, $workflow, $template, $delete],
1682
+ update: [$bizproc, $workflow, $template, $update],
1683
+ list: [$bizproc, $workflow, $template, $list] // Возвращает список шаблонов Бизнес-процессов, установленных на сайте
1684
+ };
1685
+ }
1686
+ list(param = { select: [], filter: {} }) {
1687
+ return this.http.post(this.url.list, param);
1688
+ }
1689
+ }
1690
+ BXRestBizprocWorkflowTemplate.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestBizprocWorkflowTemplate, deps: [{ token: HttpBXServices }], target: i0.ɵɵFactoryTarget.Injectable });
1691
+ BXRestBizprocWorkflowTemplate.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestBizprocWorkflowTemplate, providedIn: 'root' });
1692
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestBizprocWorkflowTemplate, decorators: [{
1693
+ type: Injectable,
1694
+ args: [{
1695
+ providedIn: 'root'
1696
+ }]
1697
+ }], ctorParameters: function () { return [{ type: HttpBXServices }]; } });
1698
+
1699
+ class BXRestBizprocWorkflow {
1700
+ constructor(instances, template, http) {
1701
+ this.instances = instances;
1702
+ this.template = template;
1703
+ this.http = http;
1704
+ this.url = {
1705
+ instances: [$bizproc, $workflow, $instances],
1706
+ terminate: [$bizproc, $workflow, $terminate],
1707
+ start: [$bizproc, $workflow, $start],
1708
+ kill: [$bizproc, $workflow, $kill], // Удаляет запущенный бизнес-процесс // TODO: реализовать
1709
+ };
1710
+ }
1711
+ start(param) {
1712
+ return this.http.post(this.url.start, param);
1713
+ }
1714
+ }
1715
+ BXRestBizprocWorkflow.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestBizprocWorkflow, deps: [{ token: BXRestBizprocWorkflowInstance }, { token: BXRestBizprocWorkflowTemplate }, { token: HttpBXServices }], target: i0.ɵɵFactoryTarget.Injectable });
1716
+ BXRestBizprocWorkflow.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestBizprocWorkflow, providedIn: 'root' });
1717
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestBizprocWorkflow, decorators: [{
1718
+ type: Injectable,
1719
+ args: [{
1720
+ providedIn: 'root'
1721
+ }]
1722
+ }], ctorParameters: function () { return [{ type: BXRestBizprocWorkflowInstance }, { type: BXRestBizprocWorkflowTemplate }, { type: HttpBXServices }]; } });
1723
+
1724
+ class BXRestBizprocActivity {
1725
+ constructor() {
1726
+ this.url = {
1727
+ add: [$bizproc, $activity, $add],
1728
+ delete: [$bizproc, $activity, $delete],
1729
+ list: [$bizproc, $activity, $list],
1730
+ update: [$bizproc, $activity, $update],
1731
+ log: [$bizproc, $activity, $log] // Записывает информацию в лог бизнес-процесса
1732
+ };
1733
+ }
1734
+ }
1735
+ BXRestBizprocActivity.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestBizprocActivity, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1736
+ BXRestBizprocActivity.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestBizprocActivity, providedIn: 'root' });
1737
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestBizprocActivity, decorators: [{
1738
+ type: Injectable,
1739
+ args: [{
1740
+ providedIn: 'root'
1741
+ }]
1742
+ }] });
1743
+
1744
+ class BXRestBizprocTask {
1745
+ constructor() {
1746
+ this.url = {
1747
+ complete: [$bizproc, $task, $complete],
1748
+ list: [$bizproc, $task, $list], // Возвращает список заданий бизнес-процессов
1749
+ };
1750
+ }
1751
+ }
1752
+ BXRestBizprocTask.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestBizprocTask, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1753
+ BXRestBizprocTask.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestBizprocTask, providedIn: 'root' });
1754
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestBizprocTask, decorators: [{
1755
+ type: Injectable,
1756
+ args: [{
1757
+ providedIn: 'root'
1758
+ }]
1759
+ }] });
1760
+
1761
+ class BXRestBizprocRobot {
1762
+ constructor() {
1763
+ this.url = {
1764
+ add: [$bizproc, $robot, $add],
1765
+ delete: [$bizproc, $robot, $delete],
1766
+ list: [$bizproc, $robot, $list],
1767
+ update: [$bizproc, $robot, $update] // Обновляет поля робота
1768
+ };
1709
1769
  }
1710
1770
  }
1711
- SessionStorageServices.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SessionStorageServices, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1712
- SessionStorageServices.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SessionStorageServices, providedIn: 'root' });
1713
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SessionStorageServices, decorators: [{
1771
+ BXRestBizprocRobot.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestBizprocRobot, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1772
+ BXRestBizprocRobot.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestBizprocRobot, providedIn: 'root' });
1773
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestBizprocRobot, decorators: [{
1714
1774
  type: Injectable,
1715
1775
  args: [{
1716
1776
  providedIn: 'root'
1717
1777
  }]
1718
1778
  }] });
1719
1779
 
1780
+ class BXRestBizprocEvent {
1781
+ constructor() {
1782
+ this.url = {
1783
+ send: [$bizproc, $event, $send], // Возвращает действию выходные параметры, заданные в описании действия
1784
+ };
1785
+ }
1786
+ }
1787
+ BXRestBizprocEvent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestBizprocEvent, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1788
+ BXRestBizprocEvent.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestBizprocEvent, providedIn: 'root' });
1789
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestBizprocEvent, decorators: [{
1790
+ type: Injectable,
1791
+ args: [{
1792
+ providedIn: 'root'
1793
+ }]
1794
+ }] });
1795
+
1796
+ class BXRestBizproc {
1797
+ constructor(workflow, activity, task, robot, event) {
1798
+ this.workflow = workflow;
1799
+ this.activity = activity;
1800
+ this.task = task;
1801
+ this.robot = robot;
1802
+ this.event = event;
1803
+ }
1804
+ }
1805
+ BXRestBizproc.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestBizproc, deps: [{ token: BXRestBizprocWorkflow }, { token: BXRestBizprocActivity }, { token: BXRestBizprocTask }, { token: BXRestBizprocRobot }, { token: BXRestBizprocEvent }], target: i0.ɵɵFactoryTarget.Injectable });
1806
+ BXRestBizproc.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestBizproc, providedIn: 'root' });
1807
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestBizproc, decorators: [{
1808
+ type: Injectable,
1809
+ args: [{
1810
+ providedIn: 'root'
1811
+ }]
1812
+ }], ctorParameters: function () { return [{ type: BXRestBizprocWorkflow }, { type: BXRestBizprocActivity }, { type: BXRestBizprocTask }, { type: BXRestBizprocRobot }, { type: BXRestBizprocEvent }]; } });
1813
+
1814
+ class Navvy {
1815
+ constructor(snackBar) {
1816
+ this.snackBar = snackBar;
1817
+ }
1818
+ mapAndSnackBarError(request, errorText) {
1819
+ return request.pipe(map(v => BXRestMapResult(v)), catchError(err => {
1820
+ this.snackBar.error(errorText);
1821
+ return throwError(() => err);
1822
+ }));
1823
+ }
1824
+ }
1825
+ Navvy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: Navvy, deps: [{ token: SnackBarService }], target: i0.ɵɵFactoryTarget.Injectable });
1826
+ Navvy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: Navvy, providedIn: 'root' });
1827
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: Navvy, decorators: [{
1828
+ type: Injectable,
1829
+ args: [{
1830
+ providedIn: 'root'
1831
+ }]
1832
+ }], ctorParameters: function () { return [{ type: SnackBarService }]; } });
1833
+
1720
1834
  class BXRestNavvyUser {
1721
- constructor(BXRestUser, BXRestUserMap, Navvy, SessionStorage) {
1835
+ constructor(BXRestUser, BXRestUserMap, Navvy) {
1722
1836
  this.BXRestUser = BXRestUser;
1723
1837
  this.BXRestUserMap = BXRestUserMap;
1724
1838
  this.Navvy = Navvy;
1725
- this.SessionStorage = SessionStorage;
1726
1839
  }
1727
1840
  get(params = {}) {
1728
1841
  return this.Navvy.mapAndSnackBarError(this.BXRestUser.get(params), 'Не удалось получить пользователей');
@@ -1732,7 +1845,7 @@ class BXRestNavvyUser {
1732
1845
  return this.self();
1733
1846
  }
1734
1847
  else {
1735
- let self = this.SessionStorage.getItem(this.constructor.name + this.self.name);
1848
+ let self = SessionStorage.getItem(this.constructor.name + this.self.name);
1736
1849
  if (self) {
1737
1850
  return of(self);
1738
1851
  }
@@ -1751,7 +1864,7 @@ class BXRestNavvyUser {
1751
1864
  return undefined;
1752
1865
  }), tap(v => {
1753
1866
  if (v) {
1754
- this.SessionStorage.setItem(this.constructor.name + this.self.name, v);
1867
+ SessionStorage.setItem(this.constructor.name + this.self.name, v);
1755
1868
  }
1756
1869
  }));
1757
1870
  }
@@ -1765,16 +1878,80 @@ class BXRestNavvyUser {
1765
1878
  return this.Navvy.mapAndSnackBarError(this.BXRestUser.fields(), 'Не удалось поля');
1766
1879
  }
1767
1880
  }
1768
- BXRestNavvyUser.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestNavvyUser, deps: [{ token: BXRestUser }, { token: BXRestUserMap }, { token: Navvy }, { token: SessionStorageServices }], target: i0.ɵɵFactoryTarget.Injectable });
1881
+ BXRestNavvyUser.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestNavvyUser, deps: [{ token: BXRestUser }, { token: BXRestUserMap }, { token: Navvy }], target: i0.ɵɵFactoryTarget.Injectable });
1769
1882
  BXRestNavvyUser.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestNavvyUser, providedIn: 'root' });
1770
1883
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestNavvyUser, decorators: [{
1771
1884
  type: Injectable,
1772
1885
  args: [{
1773
1886
  providedIn: 'root'
1774
1887
  }]
1775
- }], ctorParameters: function () { return [{ type: BXRestUser }, { type: BXRestUserMap }, { type: Navvy }, { type: SessionStorageServices }]; } });
1888
+ }], ctorParameters: function () { return [{ type: BXRestUser }, { type: BXRestUserMap }, { type: Navvy }]; } });
1889
+
1890
+ class BXRestMapListsElement extends BaseMapServices {
1891
+ get(items) {
1892
+ return items.map(item => Object.assign(item, {
1893
+ BP_PUBLISHED: item.BP_PUBLISHED === 'Y',
1894
+ CREATED_BY: this.toNum(item.CREATED_BY),
1895
+ IBLOCK_ID: this.toNum(item.IBLOCK_ID),
1896
+ ID: this.toNum(item.ID)
1897
+ }));
1898
+ }
1899
+ }
1900
+ BXRestMapListsElement.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestMapListsElement, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
1901
+ BXRestMapListsElement.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestMapListsElement, providedIn: 'root' });
1902
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestMapListsElement, decorators: [{
1903
+ type: Injectable,
1904
+ args: [{
1905
+ providedIn: 'root'
1906
+ }]
1907
+ }] });
1908
+
1909
+ class BXRestNavvyListsElement {
1910
+ constructor(BXRestListsElement, BXRestMap, Navvy) {
1911
+ this.BXRestListsElement = BXRestListsElement;
1912
+ this.BXRestMap = BXRestMap;
1913
+ this.Navvy = Navvy;
1914
+ }
1915
+ get(param) {
1916
+ return this.Navvy.mapAndSnackBarError(this.BXRestListsElement.get(param), 'Не удалось получить элемент списка').pipe(map(v => (v) ? this.BXRestMap.get(v) : undefined));
1917
+ }
1918
+ add(param) {
1919
+ return this.Navvy.mapAndSnackBarError(this.BXRestListsElement.add(param), 'Не удалось получить элемент списка');
1920
+ }
1921
+ }
1922
+ BXRestNavvyListsElement.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestNavvyListsElement, deps: [{ token: BXRestListsElement }, { token: BXRestMapListsElement }, { token: Navvy }], target: i0.ɵɵFactoryTarget.Injectable });
1923
+ BXRestNavvyListsElement.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestNavvyListsElement, providedIn: 'root' });
1924
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestNavvyListsElement, decorators: [{
1925
+ type: Injectable,
1926
+ args: [{
1927
+ providedIn: 'root'
1928
+ }]
1929
+ }], ctorParameters: function () { return [{ type: BXRestListsElement }, { type: BXRestMapListsElement }, { type: Navvy }]; } });
1930
+
1931
+ class BXRestNavvyLists {
1932
+ constructor(element) {
1933
+ this.element = element;
1934
+ }
1935
+ }
1936
+ BXRestNavvyLists.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestNavvyLists, deps: [{ token: BXRestNavvyListsElement }], target: i0.ɵɵFactoryTarget.Injectable });
1937
+ BXRestNavvyLists.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestNavvyLists, providedIn: 'root' });
1938
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestNavvyLists, decorators: [{
1939
+ type: Injectable,
1940
+ args: [{
1941
+ providedIn: 'root'
1942
+ }]
1943
+ }], ctorParameters: function () { return [{ type: BXRestNavvyListsElement }]; } });
1776
1944
 
1777
1945
  class BXRestTaskMap extends BaseMapServices {
1946
+ add(item) {
1947
+ return this.TaskBXHttpToTaskBX(item);
1948
+ }
1949
+ get(item) {
1950
+ return this.TaskBXHttpToTaskBX(item);
1951
+ }
1952
+ list(item) {
1953
+ return item.map(i => this.TaskBXHttpToTaskBX(i));
1954
+ }
1778
1955
  TaskBXHttpToTaskBX(item) {
1779
1956
  let result = {};
1780
1957
  if (item.id) {
@@ -1891,23 +2068,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
1891
2068
  // next: number
1892
2069
  // }
1893
2070
  class BXRestNavvyTasksTask {
1894
- // pageSize = 50
1895
- // nowLoad$ = new ReplaySubject<TimeProcess>(1)
1896
- // def: { select: iBXRestTaskFieldsName[] } = {
1897
- // select: ['ID', 'PARENT_ID', 'TITLE', 'DESCRIPTION', 'MARK', 'PRIORITY', 'STATUS', 'MULTITASK',
1898
- // 'GROUP_ID', 'STAGE_ID', 'CREATED_BY', 'CREATED_DATE', 'RESPONSIBLE_ID', 'ACCOMPLICES', 'AUDITORS',
1899
- // 'CHANGED_BY', 'CHANGED_DATE', 'STATUS_CHANGED_DATE', 'CLOSED_BY', 'CLOSED_DATE', 'DATE_START', 'VIEWED_DATE',
1900
- // 'DEADLINE', 'START_DATE_PLAN', 'END_DATE_PLAN', 'FORKED_BY_TEMPLATE_ID', 'TIME_ESTIMATE', 'TIME_SPENT_IN_LOGS',
1901
- // 'TAGS', 'ALLOW_TIME_TRACKING'
1902
- // ]
1903
- // }
1904
2071
  // storeTask$: Observable<iStoreTask>
1905
- constructor(BXRestTasks, snackBar,
2072
+ constructor(BXRestTasksTask, snackBar,
1906
2073
  // private store: Store<{ tasks: IStoreTask }>,
1907
- taskMap) {
1908
- this.BXRestTasks = BXRestTasks;
2074
+ taskMap,
2075
+ // private taskResultMap: BitrixApiTaskResultMapServices
2076
+ Navvy) {
2077
+ this.BXRestTasksTask = BXRestTasksTask;
1909
2078
  this.snackBar = snackBar;
1910
2079
  this.taskMap = taskMap;
2080
+ this.Navvy = Navvy;
2081
+ // pageSize = 50
2082
+ // nowLoad$ = new ReplaySubject<TimeProcess>(1)
2083
+ this.def = {
2084
+ select: ['ID', 'PARENT_ID', 'TITLE', 'DESCRIPTION', 'MARK', 'PRIORITY', 'STATUS', 'MULTITASK',
2085
+ 'GROUP_ID', 'STAGE_ID', 'CREATED_BY', 'CREATED_DATE', 'RESPONSIBLE_ID', 'ACCOMPLICES', 'AUDITORS',
2086
+ 'CHANGED_BY', 'CHANGED_DATE', 'STATUS_CHANGED_DATE', 'CLOSED_BY', 'CLOSED_DATE', 'DATE_START', 'VIEWED_DATE',
2087
+ 'DEADLINE', 'START_DATE_PLAN', 'END_DATE_PLAN', 'FORKED_BY_TEMPLATE_ID', 'TIME_ESTIMATE', 'TIME_SPENT_IN_LOGS',
2088
+ 'TAGS', 'ALLOW_TIME_TRACKING'
2089
+ ]
2090
+ };
1911
2091
  // this.storeTask$ = this.store.select('tasks')
1912
2092
  // this.nowLoad$.next({
1913
2093
  // total: 0,
@@ -1915,9 +2095,9 @@ class BXRestNavvyTasksTask {
1915
2095
  // })
1916
2096
  }
1917
2097
  add(param) {
1918
- return this.BXRestTasks.add(param).pipe(map(v => {
1919
- if (v && v.result && v.result.task) {
1920
- return this.taskMap.TaskBXHttpToTaskBX(v.result.task);
2098
+ return this.Navvy.mapAndSnackBarError(this.BXRestTasksTask.add(param), 'Не удалось получить задачу').pipe(map(v => {
2099
+ if (v && v.task) {
2100
+ return this.taskMap.add(v.task);
1921
2101
  }
1922
2102
  return undefined;
1923
2103
  }));
@@ -1934,15 +2114,57 @@ class BXRestNavvyTasksTask {
1934
2114
  // }
1935
2115
  // ))
1936
2116
  }
2117
+ /*
2118
+ update(taskId: number, updateFields: iBXRestTaskFieldsName[], task: iBXRestTask) {
2119
+ let sendTask: Record<string, any> = {}
2120
+ let taskTS: Record<string, any> = task
2121
+ if (updateFields.length) {
2122
+ for (let updateField of updateFields) {
2123
+ if (taskTS[camelCase(updateField)]) {
2124
+ sendTask[updateField] = taskTS[camelCase(updateField)]
2125
+ }
2126
+ }
2127
+ if (Object.values(sendTask).length) {
2128
+ return this.http.post(
2129
+ this.url.update,
2130
+ {taskId: taskId, fields: sendTask},
2131
+ 'error to update task')
2132
+ } else {
2133
+ this.snackBar.error('not valid send data task')
2134
+ console.error('not valid send data task', sendTask, task)
2135
+ return of(undefined)
2136
+ }
2137
+ }
2138
+
2139
+ this.snackBar.warning('not have field for update')
2140
+ return of(undefined)
2141
+ }
2142
+ */
2143
+ get(requestArray) {
2144
+ if (!requestArray.select) {
2145
+ requestArray.select = this.def.select;
2146
+ }
2147
+ return this.Navvy.mapAndSnackBarError(this.BXRestTasksTask.get(requestArray), 'Не удалось получить задачу').pipe(map(v => (v && v.task) ? v.task : undefined), map(v => (v) ? this.taskMap.get(v) : undefined));
2148
+ }
2149
+ list(param = {}) {
2150
+ if (!param.select) {
2151
+ param.select = this.def.select;
2152
+ }
2153
+ return this.Navvy.mapAndSnackBarError(this.BXRestTasksTask.list(param), 'Не удалось получить задачи').pipe(map(v => (v && v.tasks) ? v.tasks : undefined), map(v => (v) ? this.taskMap.list(v) : undefined), tap(v => {
2154
+ if (v) {
2155
+ SessionStorage.setItem(this.constructor.name + this.list.name, v);
2156
+ }
2157
+ }));
2158
+ }
1937
2159
  }
1938
- BXRestNavvyTasksTask.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestNavvyTasksTask, deps: [{ token: BXRestTasksTask }, { token: SnackBarService }, { token: BXRestTaskMap }], target: i0.ɵɵFactoryTarget.Injectable });
2160
+ BXRestNavvyTasksTask.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestNavvyTasksTask, deps: [{ token: BXRestTasksTask }, { token: SnackBarService }, { token: BXRestTaskMap }, { token: Navvy }], target: i0.ɵɵFactoryTarget.Injectable });
1939
2161
  BXRestNavvyTasksTask.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestNavvyTasksTask, providedIn: 'root' });
1940
2162
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestNavvyTasksTask, decorators: [{
1941
2163
  type: Injectable,
1942
2164
  args: [{
1943
2165
  providedIn: 'root'
1944
2166
  }]
1945
- }], ctorParameters: function () { return [{ type: BXRestTasksTask }, { type: SnackBarService }, { type: BXRestTaskMap }]; } });
2167
+ }], ctorParameters: function () { return [{ type: BXRestTasksTask }, { type: SnackBarService }, { type: BXRestTaskMap }, { type: Navvy }]; } });
1946
2168
 
1947
2169
  class BXRestNavvyTasks {
1948
2170
  constructor(task) {
@@ -2155,24 +2377,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
2155
2377
 
2156
2378
  class BXRestNavvyDiskStorage {
2157
2379
  // BXDiskFolder$ = new Observable<BXDiskFolderStore>()
2158
- constructor(BXRestDiskStorage, BXRestMapDiskStorage, Navvy, SessionStorage
2159
- // private store: Store<{ BXDiskFolder: BXDiskFolderStore }>,
2160
- ) {
2380
+ constructor(BXRestDiskStorage, BXRestMapDiskStorage, Navvy) {
2161
2381
  this.BXRestDiskStorage = BXRestDiskStorage;
2162
2382
  this.BXRestMapDiskStorage = BXRestMapDiskStorage;
2163
2383
  this.Navvy = Navvy;
2164
- this.SessionStorage = SessionStorage;
2165
2384
  // this.BXDiskFolder$ = this.store.select('BXDiskFolder')
2166
2385
  }
2167
2386
  getforapp() {
2168
- let res = this.SessionStorage.getItem(this.constructor.name + this.getforapp.name);
2387
+ let res = SessionStorage.getItem(this.constructor.name + this.getforapp.name);
2169
2388
  if (res) {
2170
2389
  return of(res);
2171
2390
  }
2172
2391
  else {
2173
2392
  return this.Navvy.mapAndSnackBarError(this.BXRestDiskStorage.getforapp(), 'get root app folder').pipe(tap(v => {
2174
2393
  if (v) {
2175
- this.SessionStorage.setItem(this.constructor.name + this.getforapp.name, v);
2394
+ SessionStorage.setItem(this.constructor.name + this.getforapp.name, v);
2176
2395
  }
2177
2396
  }));
2178
2397
  }
@@ -2194,14 +2413,14 @@ class BXRestNavvyDiskStorage {
2194
2413
  return this.BXRestDiskStorage.uploadfile(param);
2195
2414
  }
2196
2415
  }
2197
- BXRestNavvyDiskStorage.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestNavvyDiskStorage, deps: [{ token: BXRestDiskStorage }, { token: BXRestMapDiskStorage }, { token: Navvy }, { token: SessionStorageServices }], target: i0.ɵɵFactoryTarget.Injectable });
2416
+ BXRestNavvyDiskStorage.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestNavvyDiskStorage, deps: [{ token: BXRestDiskStorage }, { token: BXRestMapDiskStorage }, { token: Navvy }], target: i0.ɵɵFactoryTarget.Injectable });
2198
2417
  BXRestNavvyDiskStorage.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestNavvyDiskStorage, providedIn: 'root' });
2199
2418
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestNavvyDiskStorage, decorators: [{
2200
2419
  type: Injectable,
2201
2420
  args: [{
2202
2421
  providedIn: 'root'
2203
2422
  }]
2204
- }], ctorParameters: function () { return [{ type: BXRestDiskStorage }, { type: BXRestMapDiskStorage }, { type: Navvy }, { type: SessionStorageServices }]; } });
2423
+ }], ctorParameters: function () { return [{ type: BXRestDiskStorage }, { type: BXRestMapDiskStorage }, { type: Navvy }]; } });
2205
2424
 
2206
2425
  class BXRestNavvyDiskOperation {
2207
2426
  constructor(folder, disk, storage) {
@@ -2211,7 +2430,7 @@ class BXRestNavvyDiskOperation {
2211
2430
  }
2212
2431
  // данные файла в base64
2213
2432
  loadFileInAppFolder(file) {
2214
- return this.storage.getforapp().pipe(take$1(1), mergeMap$1(infoFolder => {
2433
+ return this.storage.getforapp().pipe(take(1), mergeMap$1(infoFolder => {
2215
2434
  if (infoFolder) {
2216
2435
  return this.storage.uploadfile({
2217
2436
  id: infoFolder.ID,
@@ -2306,38 +2525,128 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
2306
2525
  }]
2307
2526
  }], ctorParameters: function () { return [{ type: BXRestNavvyDiskFile }, { type: BXRestDiskNavvyFolder }, { type: BXRestNavvyDiskOperation }]; } });
2308
2527
 
2528
+ class BXRestNavvyBizprocWorkflow {
2529
+ constructor(BXRestBizprocWorkflow, Navvy) {
2530
+ this.BXRestBizprocWorkflow = BXRestBizprocWorkflow;
2531
+ this.Navvy = Navvy;
2532
+ }
2533
+ start(param) {
2534
+ return this.Navvy.mapAndSnackBarError(this.BXRestBizprocWorkflow.start(param), 'Не удалось запустить бизнес процесс');
2535
+ }
2536
+ }
2537
+ BXRestNavvyBizprocWorkflow.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestNavvyBizprocWorkflow, deps: [{ token: BXRestBizprocWorkflow }, { token: Navvy }], target: i0.ɵɵFactoryTarget.Injectable });
2538
+ BXRestNavvyBizprocWorkflow.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestNavvyBizprocWorkflow, providedIn: 'root' });
2539
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestNavvyBizprocWorkflow, decorators: [{
2540
+ type: Injectable,
2541
+ args: [{
2542
+ providedIn: 'root'
2543
+ }]
2544
+ }], ctorParameters: function () { return [{ type: BXRestBizprocWorkflow }, { type: Navvy }]; } });
2545
+
2546
+ class BXRestNavvyBizproc {
2547
+ constructor(workflow, BXRestNavvyLists) {
2548
+ this.workflow = workflow;
2549
+ this.BXRestNavvyLists = BXRestNavvyLists;
2550
+ }
2551
+ /**
2552
+ * Метод по запуску бизнес процессов из ленты
2553
+ *
2554
+ * @param id
2555
+ * @param parametersElement
2556
+ * @param parametersBizproc
2557
+ * @param templateIDs
2558
+ */
2559
+ startProcFormNewsFeed(id, parametersElement, parametersBizproc, templateIDs) {
2560
+ return this.BXRestNavvyLists.element.add({
2561
+ IBLOCK_TYPE_ID: 'bitrix_processes',
2562
+ IBLOCK_ID: id,
2563
+ ELEMENT_CODE: 'trace_studio_' + Date.now() + '_' + Math.random(),
2564
+ // тут должно быть уникально значение (генерация уникальных значений на фронте лол),
2565
+ // как ещё уникальнее сделать я просто не знаю
2566
+ // это поле обязательно без него не работает
2567
+ FIELDS: {
2568
+ NAME: parametersElement['NAME'],
2569
+ ...parametersElement
2570
+ }
2571
+ }).pipe(mergeMap(v => {
2572
+ if (v) {
2573
+ if (Object.keys(parametersBizproc).length) {
2574
+ let reques = [];
2575
+ for (let templateID of templateIDs) {
2576
+ reques.push(this.workflow.start({
2577
+ TEMPLATE_ID: templateID,
2578
+ DOCUMENT_ID: ['lists', 'BizprocDocument', String(v)],
2579
+ PARAMETERS: parametersBizproc
2580
+ }));
2581
+ }
2582
+ return forkJoin(reques);
2583
+ }
2584
+ else {
2585
+ return of(true);
2586
+ }
2587
+ }
2588
+ return of(false);
2589
+ }));
2590
+ }
2591
+ }
2592
+ BXRestNavvyBizproc.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestNavvyBizproc, deps: [{ token: BXRestNavvyBizprocWorkflow }, { token: BXRestNavvyLists }], target: i0.ɵɵFactoryTarget.Injectable });
2593
+ BXRestNavvyBizproc.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestNavvyBizproc, providedIn: 'root' });
2594
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestNavvyBizproc, decorators: [{
2595
+ type: Injectable,
2596
+ args: [{
2597
+ providedIn: 'root'
2598
+ }]
2599
+ }], ctorParameters: function () { return [{ type: BXRestNavvyBizprocWorkflow }, { type: BXRestNavvyLists }]; } });
2600
+
2601
+ class BXRestMapLists extends BaseMapServices {
2602
+ constructor(element) {
2603
+ super();
2604
+ this.element = element;
2605
+ }
2606
+ }
2607
+ BXRestMapLists.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestMapLists, deps: [{ token: BXRestMapListsElement }], target: i0.ɵɵFactoryTarget.Injectable });
2608
+ BXRestMapLists.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestMapLists, providedIn: 'root' });
2609
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestMapLists, decorators: [{
2610
+ type: Injectable,
2611
+ args: [{
2612
+ providedIn: 'root'
2613
+ }]
2614
+ }], ctorParameters: function () { return [{ type: BXRestMapListsElement }]; } });
2615
+
2309
2616
  class BXRest {
2310
- constructor(user, lists, tasks, disk) {
2617
+ constructor(user, lists, tasks, disk, bizproc) {
2311
2618
  this.user = user;
2312
2619
  this.lists = lists;
2313
2620
  this.tasks = tasks;
2314
2621
  this.disk = disk;
2622
+ this.bizproc = bizproc;
2315
2623
  }
2316
2624
  }
2317
- BXRest.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRest, deps: [{ token: BXRestUser }, { token: BXRestLists }, { token: BXRestTasks }, { token: BXRestDisk }], target: i0.ɵɵFactoryTarget.Injectable });
2625
+ BXRest.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRest, deps: [{ token: BXRestUser }, { token: BXRestLists }, { token: BXRestTasks }, { token: BXRestDisk }, { token: BXRestBizproc }], target: i0.ɵɵFactoryTarget.Injectable });
2318
2626
  BXRest.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRest, providedIn: 'root' });
2319
2627
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRest, decorators: [{
2320
2628
  type: Injectable,
2321
2629
  args: [{
2322
2630
  providedIn: 'root'
2323
2631
  }]
2324
- }], ctorParameters: function () { return [{ type: BXRestUser }, { type: BXRestLists }, { type: BXRestTasks }, { type: BXRestDisk }]; } });
2632
+ }], ctorParameters: function () { return [{ type: BXRestUser }, { type: BXRestLists }, { type: BXRestTasks }, { type: BXRestDisk }, { type: BXRestBizproc }]; } });
2325
2633
  class BXRestNavvy {
2326
- constructor(user, lists, tasks, disk) {
2634
+ constructor(user, lists, tasks, disk, bizproc) {
2327
2635
  this.user = user;
2328
2636
  this.lists = lists;
2329
2637
  this.tasks = tasks;
2330
2638
  this.disk = disk;
2639
+ this.bizproc = bizproc;
2331
2640
  }
2332
2641
  }
2333
- BXRestNavvy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestNavvy, deps: [{ token: BXRestNavvyUser }, { token: BXRestNavvyLists }, { token: BXRestNavvyTasks }, { token: BXRestNavvyDisk }], target: i0.ɵɵFactoryTarget.Injectable });
2642
+ BXRestNavvy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestNavvy, deps: [{ token: BXRestNavvyUser }, { token: BXRestNavvyLists }, { token: BXRestNavvyTasks }, { token: BXRestNavvyDisk }, { token: BXRestNavvyBizproc }], target: i0.ɵɵFactoryTarget.Injectable });
2334
2643
  BXRestNavvy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestNavvy, providedIn: 'root' });
2335
2644
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestNavvy, decorators: [{
2336
2645
  type: Injectable,
2337
2646
  args: [{
2338
2647
  providedIn: 'root'
2339
2648
  }]
2340
- }], ctorParameters: function () { return [{ type: BXRestNavvyUser }, { type: BXRestNavvyLists }, { type: BXRestNavvyTasks }, { type: BXRestNavvyDisk }]; } });
2649
+ }], ctorParameters: function () { return [{ type: BXRestNavvyUser }, { type: BXRestNavvyLists }, { type: BXRestNavvyTasks }, { type: BXRestNavvyDisk }, { type: BXRestNavvyBizproc }]; } });
2341
2650
  class BXRestMap {
2342
2651
  constructor(lists) {
2343
2652
  this.lists = lists;
@@ -2360,5 +2669,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
2360
2669
  * Generated bundle index. Do not edit.
2361
2670
  */
2362
2671
 
2363
- export { BXRest, BXRestMap, BXRestMapResult, BXRestNavvy, REST_SETTINGS };
2672
+ export { BXRest, BXRestMap, BXRestMapResult, BXRestNavvy, BX_REST_SETTINGS };
2364
2673
  //# sourceMappingURL=bx-rest.mjs.map