bx-rest 0.2.3 → 0.2.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 (54) hide show
  1. package/README.md +97 -97
  2. package/consts/part-name-metods.d.ts +1 -1
  3. package/esm2022/consts/part-name-metods.mjs +2 -2
  4. package/esm2022/functions/serializeJavascript.mjs +1 -1
  5. package/esm2022/map/tasks/task.mjs +1 -1
  6. package/esm2022/public-api.mjs +1 -1
  7. package/esm2022/request/bx-rest.module.mjs +1 -1
  8. package/esm2022/request/tasks/task.mjs +15 -4
  9. package/esm2022/request/tasks.mjs +1 -1
  10. package/esm2022/request/user.mjs +1 -1
  11. package/esm2022/request-navvy/tasks/task.mjs +2 -2
  12. package/esm2022/request-navvy/tasks.mjs +1 -1
  13. package/esm2022/request-navvy/user.mjs +1 -1
  14. package/esm2022/services/Navvy/NavvyPagNavTasks.mjs +42 -0
  15. package/esm2022/services/http/HttpBX.mjs +1 -1
  16. package/esm2022/services/http/sessionKey.mjs +1 -1
  17. package/esm2022/services/navvy.mjs +5 -1
  18. package/esm2022/services/snack-bar/snack-bar.service.mjs +1 -1
  19. package/esm2022/services/snack-bar/toast-message/toast-message.component.mjs +3 -3
  20. package/esm2022/services/vanilla/JSON.mjs +1 -1
  21. package/esm2022/services/vanilla/localStorage.mjs +1 -1
  22. package/esm2022/services/vanilla//321/201ookies.mjs +1 -1
  23. package/esm2022/typification/auth/save.mjs +1 -1
  24. package/esm2022/typification/rest/base/YesNo.mjs +1 -1
  25. package/esm2022/typification/rest/base/answer.mjs +1 -1
  26. package/esm2022/typification/rest/base/filterGenerator.mjs +1 -1
  27. package/esm2022/typification/rest/base/sort.mjs +1 -1
  28. package/esm2022/typification/rest/lists/element/get.mjs +1 -1
  29. package/esm2022/typification/rest/task/base/fieldsName.mjs +1 -1
  30. package/esm2022/typification/rest/task/elapseditem/get.mjs +1 -1
  31. package/esm2022/typification/rest/task/elapseditem/item.mjs +1 -1
  32. package/esm2022/typification/rest/task/task.mjs +1 -1
  33. package/esm2022/typification/rest/tasks/task/approve.mjs +2 -0
  34. package/esm2022/typification/rest/tasks/task/complete.mjs +2 -0
  35. package/esm2022/typification/rest/tasks/task/defer.mjs +2 -0
  36. package/esm2022/typification/rest/tasks/task/list.mjs +1 -1
  37. package/esm2022/typification/rest/user/get.mjs +1 -1
  38. package/esm2022/typification/rest/user/search.mjs +1 -1
  39. package/esm2022/typification/rest/user/user.mjs +1 -1
  40. package/fesm2022/bx-rest.mjs +58 -6
  41. package/fesm2022/bx-rest.mjs.map +1 -1
  42. package/map/tasks/task.d.ts +2 -3
  43. package/package.json +1 -1
  44. package/request/tasks/task.d.ts +15 -5
  45. package/request-navvy/tasks/task.d.ts +1 -3
  46. package/services/Navvy/NavvyPagNavTasks.d.ts +10 -0
  47. package/services/navvy.d.ts +6 -0
  48. package/typification/rest/base/filterGenerator.d.ts +4 -4
  49. package/typification/rest/lists/element/get.d.ts +2 -2
  50. package/typification/rest/task/elapseditem/get.d.ts +2 -2
  51. package/typification/rest/tasks/task/approve.d.ts +141 -0
  52. package/typification/rest/tasks/task/complete.d.ts +3 -0
  53. package/typification/rest/tasks/task/defer.d.ts +3 -0
  54. package/typification/rest/tasks/task/list.d.ts +8 -3
@@ -1,6 +1,7 @@
1
1
  import { iBXRestTaskGetAccess } from '../../typification/rest/task/access/getaccess';
2
2
  import { iBXRestHttpTask, iBXRestTask } from '../../typification/rest/task/task';
3
3
  import { BaseMapServices } from '../base';
4
+ import { iBXRestParamTasksListHttp } from '../../typification/rest/tasks/task/list';
4
5
  import * as i0 from "@angular/core";
5
6
  export declare class BXRestMapTasksTask extends BaseMapServices {
6
7
  getaccess(v: iBXRestTaskGetAccess | undefined): {
@@ -12,9 +13,7 @@ export declare class BXRestMapTasksTask extends BaseMapServices {
12
13
  get(item: {
13
14
  task: iBXRestHttpTask | undefined;
14
15
  } | undefined): iBXRestTask | undefined;
15
- list(item: {
16
- tasks: iBXRestHttpTask[] | undefined;
17
- } | undefined): iBXRestTask[] | undefined;
16
+ list(item: iBXRestParamTasksListHttp | undefined): iBXRestTask[] | undefined;
18
17
  private TaskBXHttpToTaskBX;
19
18
  static ɵfac: i0.ɵɵFactoryDeclaration<BXRestMapTasksTask, never>;
20
19
  static ɵprov: i0.ɵɵInjectableDeclaration<BXRestMapTasksTask>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bx-rest",
3
- "version": "0.2.3",
3
+ "version": "0.2.5",
4
4
  "description": "bitrix rest api",
5
5
  "keywords": [
6
6
  "bitrxi",
@@ -2,8 +2,11 @@ import { HttpBXServices } from '../../services/http/HttpBX';
2
2
  import { iBXRestHttpTask } from '../../typification/rest/task/task';
3
3
  import { iBXRestParamTaskAdd } from '../../typification/rest/tasks/task/add';
4
4
  import iBXRestParamTaskGet from '../../typification/rest/tasks/task/get';
5
- import { iBXRestParamTasksList } from '../../typification/rest/tasks/task/list';
5
+ import { iBXRestParamTasksList, iBXRestParamTasksListHttp } from '../../typification/rest/tasks/task/list';
6
6
  import { iBXRestParamTaskGetAccess, iBXRestTaskGetAccess } from '../../typification/rest/task/access/getaccess';
7
+ import { iBXRestTasksTaskApproveHttp } from '../../typification/rest/tasks/task/approve';
8
+ import { iBXRestTasksTaskCompleteHttp } from '../../typification/rest/tasks/task/complete';
9
+ import { iBXRestTasksTaskDeferHttp } from '../../typification/rest/tasks/task/defer';
7
10
  import * as i0 from "@angular/core";
8
11
  export declare class BXRestTasksTask {
9
12
  private http;
@@ -14,7 +17,7 @@ export declare class BXRestTasksTask {
14
17
  counters: {
15
18
  get: string[];
16
19
  };
17
- deger: string[];
20
+ defer: string[];
18
21
  delegate: string[];
19
22
  delete: string[];
20
23
  disapprove: string[];
@@ -53,12 +56,19 @@ export declare class BXRestTasksTask {
53
56
  }): import("rxjs").Observable<import("../../typification/rest/base/answer").iBXRestAnswer<{
54
57
  task: iBXRestHttpTask;
55
58
  }> | undefined>;
59
+ approve(id: number): import("rxjs").Observable<import("../../typification/rest/base/answer").iBXRestAnswer<{
60
+ task: iBXRestTasksTaskApproveHttp;
61
+ }> | undefined>;
62
+ complete(id: number): import("rxjs").Observable<import("../../typification/rest/base/answer").iBXRestAnswer<{
63
+ task: iBXRestTasksTaskCompleteHttp;
64
+ }> | undefined>;
65
+ defer(id: number): import("rxjs").Observable<import("../../typification/rest/base/answer").iBXRestAnswer<{
66
+ task: iBXRestTasksTaskDeferHttp;
67
+ }> | undefined>;
56
68
  get(requestArray: iBXRestParamTaskGet): import("rxjs").Observable<import("../../typification/rest/base/answer").iBXRestAnswer<{
57
69
  task: iBXRestHttpTask | undefined;
58
70
  }> | undefined>;
59
- list(param?: iBXRestParamTasksList): import("rxjs").Observable<import("../../typification/rest/base/answer").iBXRestAnswer<{
60
- tasks: iBXRestHttpTask[] | undefined;
61
- }> | undefined>;
71
+ list(param: iBXRestParamTasksList): import("rxjs").Observable<import("../../typification/rest/base/answer").iBXRestAnswer<iBXRestParamTasksListHttp> | undefined>;
62
72
  getaccess(param: iBXRestParamTaskGetAccess): import("rxjs").Observable<import("../../typification/rest/base/answer").iBXRestAnswer<iBXRestTaskGetAccess> | undefined>;
63
73
  static ɵfac: i0.ɵɵFactoryDeclaration<BXRestTasksTask, never>;
64
74
  static ɵprov: i0.ɵɵInjectableDeclaration<BXRestTasksTask>;
@@ -23,9 +23,7 @@ export declare class BXRestNavvyTasksTask {
23
23
  get(param: iBXRestParamTaskGet): import("../../services/Navvy/NavvySimple").NavvySimple<BXRestTasksTask, BXRestMapTasksTask, {
24
24
  task: import("../../typification/rest/task/task").iBXRestHttpTask | undefined;
25
25
  }, import("../../typification/rest/task/task").iBXRestTask | undefined>;
26
- list(param?: iBXRestParamTasksList): import("../../services/Navvy/NavvySimple").NavvySimple<BXRestTasksTask, BXRestMapTasksTask, {
27
- tasks: import("../../typification/rest/task/task").iBXRestHttpTask[] | undefined;
28
- }, import("../../typification/rest/task/task").iBXRestTask[] | undefined>;
26
+ list(param?: iBXRestParamTasksList): import("../../services/Navvy/NavvyPagNavTasks").NavvyPagNavTasks<BXRestTasksTask, BXRestMapTasksTask, import("../../typification/rest/task/task").iBXRestHttpTask, import("../../typification/rest/task/task").iBXRestTask, iBXRestParamTasksList>;
29
27
  getaccess(param: iBXRestParamTaskGetAccess): import("../../services/Navvy/NavvySimple").NavvySimple<BXRestTasksTask, BXRestMapTasksTask, import("../../typification/rest/task/access/getaccess").iBXRestTaskGetAccess, {
30
28
  [key: number]: import("../../typification/rest/task/access/getaccess").iBXRestTaskGetAccessItem;
31
29
  } | undefined>;
@@ -0,0 +1,10 @@
1
+ import { iBXRestPagination } from '../../typification/rest/base/ApiPaginationBX';
2
+ import { NavvyPagNavBase } from './extends/NavvyPagNavBase';
3
+ import { ReturnTypeNavvy } from './NavvySupport';
4
+ export declare class NavvyPagNavTasks<C, M, T, R, P extends iBXRestPagination> extends NavvyPagNavBase<C, M, {
5
+ tasks: T[] | undefined;
6
+ }, R[], P> {
7
+ resultAll(): import("rxjs").Observable<ReturnTypeNavvy<T, R>[]>;
8
+ private resultAllEnd;
9
+ private mapResultForGetAll;
10
+ }
@@ -5,6 +5,7 @@ import { NavvyAlterPagNav } from './Navvy/NavvyAlternativePaginationNavigation';
5
5
  import { NavvyPagNav } from './Navvy/NavvyPagNav';
6
6
  import { iBXRestAlternativePagination, iBXRestPagination } from '../typification/rest/base/ApiPaginationBX';
7
7
  import { NavvyPagNavWithUselessKey } from './Navvy/NavvyPagNavWithUselessKey';
8
+ import { NavvyPagNavTasks } from './Navvy/NavvyPagNavTasks';
8
9
  export declare class Navvy<C, M> {
9
10
  protected requestClass: C;
10
11
  protected mapClass: M;
@@ -12,6 +13,11 @@ export declare class Navvy<C, M> {
12
13
  simple<T, R>(func: () => Observable<iBXRestAnswer<T> | undefined>, testError?: string, map?: ((param: T) => R) | undefined): NavvySimple<C, M, T, R>;
13
14
  simpleWithArg<T, R, A>(func: (param: A) => Observable<iBXRestAnswer<T> | undefined>, arg: A, testError?: string, map?: ((param: T) => R) | undefined): NavvySimple<C, M, T, R>;
14
15
  PagNav<T, R, A extends iBXRestPagination>(func: (param: A) => Observable<iBXRestAnswer<T[]> | undefined>, arg: A, testError?: string, map?: ((param: T[] | undefined) => R[] | undefined) | undefined): NavvyPagNav<C, M, T, R, A>;
16
+ PagNavTasks<T, R, A extends iBXRestPagination>(func: (param: A) => Observable<iBXRestAnswer<{
17
+ tasks: T[] | undefined;
18
+ }> | undefined>, arg: A, testError?: string, map?: ((param: {
19
+ tasks: T[] | undefined;
20
+ } | undefined) => R[] | undefined) | undefined): NavvyPagNavTasks<C, M, T, R, A>;
15
21
  PagNavWithUselessKey<T, R, A extends iBXRestPagination>(func: (param: A) => Observable<iBXRestAnswer<{
16
22
  [key: string]: T;
17
23
  }> | undefined>, arg: A, testError?: string, map?: ((param: {
@@ -1,5 +1,5 @@
1
- export type BXRestFilterGenerator<Type> = {
2
- [Property in keyof Type as `${BXRestFilterGeneratorKey<Property & string>}`]?: Type[Property];
1
+ export type iBXRestFilterGenerator<Type> = {
2
+ [Property in keyof Type as `${iBXRestFilterGeneratorKey<Property & string>}`]?: Type[Property];
3
3
  };
4
- export type BXRestFilterGeneratorKey<T extends string> = `${BXRestFilterKeys}${T}`;
5
- export type BXRestFilterKeys = '' | '<' | '>' | '!' | '<=' | '>=';
4
+ export type iBXRestFilterGeneratorKey<T extends string> = `${iBXRestFilterKeys}${T}`;
5
+ export type iBXRestFilterKeys = '' | '<' | '>' | '!' | '<=' | '>=';
@@ -1,5 +1,5 @@
1
1
  import { iBXRestYesNo } from '../../base/YesNo';
2
- import { BXRestFilterKeys } from '../../base/filterGenerator';
2
+ import { iBXRestFilterKeys } from '../../base/filterGenerator';
3
3
  import { iBXRestPagination } from '../../base/ApiPaginationBX';
4
4
  export interface iBXRestParamListsElementGet extends iBXRestPagination {
5
5
  IBLOCK_TYPE_ID: 'lists' | 'bitrix_processes' | 'lists_socnet';
@@ -27,7 +27,7 @@ export interface iBXRestBaseListsElement {
27
27
  CODE: string | null;
28
28
  IBLOCK_SECTION_ID: string | null;
29
29
  NAME: string;
30
- [key: `${BXRestFilterKeys}PROPERTY_${string}`]: {
30
+ [key: `${iBXRestFilterKeys}PROPERTY_${string}`]: {
31
31
  [key: string]: string | iBXRestParamListsElementGetHtml;
32
32
  };
33
33
  }
@@ -1,5 +1,5 @@
1
1
  import { iBXRestParamSort } from '../../base/sort';
2
- import { BXRestFilterGenerator } from '../../base/filterGenerator';
2
+ import { iBXRestFilterGenerator } from '../../base/filterGenerator';
3
3
  import { iBXRestAlternativePagination } from '../../base/ApiPaginationBX';
4
4
  export interface iBXRestParamElapseditemGet extends iBXRestAlternativePagination {
5
5
  TASKID?: number;
@@ -12,7 +12,7 @@ export interface iBXRestParamElapseditemGet extends iBXRestAlternativePagination
12
12
  DATE_START?: iBXRestParamSort;
13
13
  DATE_STOP?: iBXRestParamSort;
14
14
  };
15
- FILTER?: BXRestFilterGenerator<iBXRestParamElapseditemGetFilter>;
15
+ FILTER?: iBXRestFilterGenerator<iBXRestParamElapseditemGetFilter>;
16
16
  SELECT?: string[];
17
17
  }
18
18
  interface iBXRestParamElapseditemGetFilter {
@@ -0,0 +1,141 @@
1
+ export interface iBXRestTasksTaskApproveHttp {
2
+ id: string;
3
+ parentId: string | null;
4
+ title: string;
5
+ description: string;
6
+ mark: null;
7
+ priority: string;
8
+ multitask: string;
9
+ notViewed: string;
10
+ replicate: string;
11
+ stageId: string;
12
+ createdBy: string;
13
+ createdDate: string;
14
+ responsibleId: string;
15
+ changedBy: string;
16
+ changedDate: string;
17
+ statusChangedBy: string;
18
+ closedBy: string;
19
+ closedDate: string;
20
+ activityDate: string;
21
+ dateStart: string | null;
22
+ deadline: string | null;
23
+ startDatePlan: string | null;
24
+ endDatePlan: string | null;
25
+ guid: string;
26
+ xmlId: string | null;
27
+ commentsCount: string;
28
+ serviceCommentsCount: string;
29
+ allowChangeDeadline: string;
30
+ allowTimeTracking: string;
31
+ taskControl: string;
32
+ addInReport: string;
33
+ forkedByTemplateId: string | null;
34
+ timeEstimate: string;
35
+ timeSpentInLogs: string;
36
+ matchWorkTime: string;
37
+ forumTopicId: string;
38
+ forumId: string;
39
+ siteId: string;
40
+ subordinate: string;
41
+ exchangeModified: string | null;
42
+ exchangeId: string | null;
43
+ outlookVersion: string;
44
+ viewedDate: string;
45
+ sorting: string;
46
+ durationFact: string;
47
+ isMuted: string;
48
+ isPinned: string;
49
+ isPinnedInGroup: string;
50
+ descriptionInBbcode: string;
51
+ status: string;
52
+ statusChangedDate: string;
53
+ durationPlan: string;
54
+ durationType: string;
55
+ favorite: string;
56
+ groupId: string;
57
+ auditors: any[];
58
+ accomplices: any[];
59
+ checklist: any[];
60
+ group: BXRestTasksTaskApproveGroup;
61
+ creator: BXRestTasksTaskApproveCreator;
62
+ responsible: BXRestTasksTaskApproveResponsible;
63
+ accomplicesData: any[];
64
+ auditorsData: any[];
65
+ newCommentsCount: number;
66
+ action: BXRestTasksTaskApproveAction;
67
+ checkListTree: BXRestTasksTaskApproveCheckListTree;
68
+ checkListCanAdd: boolean;
69
+ }
70
+ interface BXRestTasksTaskApproveGroup {
71
+ id: string;
72
+ name: string;
73
+ opened: boolean;
74
+ membersCount: number;
75
+ image: string;
76
+ additionalData: any[];
77
+ }
78
+ interface BXRestTasksTaskApproveCreator {
79
+ id: string;
80
+ name: string;
81
+ link: string;
82
+ icon: string;
83
+ workPosition: string;
84
+ }
85
+ interface BXRestTasksTaskApproveResponsible {
86
+ id: string;
87
+ name: string;
88
+ link: string;
89
+ icon: string;
90
+ workPosition: string;
91
+ }
92
+ interface BXRestTasksTaskApproveAction {
93
+ accept: boolean;
94
+ decline: boolean;
95
+ complete: boolean;
96
+ approve: boolean;
97
+ disapprove: boolean;
98
+ start: boolean;
99
+ pause: boolean;
100
+ delegate: boolean;
101
+ remove: boolean;
102
+ edit: boolean;
103
+ defer: boolean;
104
+ renew: boolean;
105
+ create: boolean;
106
+ changeDeadline: boolean;
107
+ checklistAddItems: boolean;
108
+ addFavorite: boolean;
109
+ deleteFavorite: boolean;
110
+ rate: boolean;
111
+ "edit.originator": boolean;
112
+ "checklist.reorder": boolean;
113
+ "elapsedtime.add": boolean;
114
+ "dayplan.timer.toggle": boolean;
115
+ "edit.plan": boolean;
116
+ "checklist.add": boolean;
117
+ "favorite.add": boolean;
118
+ }
119
+ interface BXRestTasksTaskApproveCheckListTree {
120
+ nodeId: number;
121
+ fields: BXRestTasksTaskApproveFields;
122
+ action: any[];
123
+ descendants: any[];
124
+ }
125
+ interface BXRestTasksTaskApproveFields {
126
+ id: string | null;
127
+ copiedId: string | null;
128
+ entityId: string | null;
129
+ userId: number;
130
+ createdBy: string | null;
131
+ parentId: string | null;
132
+ title: string;
133
+ sortIndex: string | null;
134
+ displaySortIndex: string | null;
135
+ isComplete: boolean;
136
+ isImportant: boolean;
137
+ completedCount: number;
138
+ members: any[];
139
+ attachments: any[];
140
+ }
141
+ export {};
@@ -0,0 +1,3 @@
1
+ import { iBXRestTasksTaskApproveHttp } from './approve';
2
+ export interface iBXRestTasksTaskCompleteHttp extends iBXRestTasksTaskApproveHttp {
3
+ }
@@ -0,0 +1,3 @@
1
+ import { iBXRestTasksTaskApproveHttp } from './approve';
2
+ export interface iBXRestTasksTaskDeferHttp extends iBXRestTasksTaskApproveHttp {
3
+ }
@@ -1,11 +1,16 @@
1
1
  import { iBXRestParamSort } from '../../base/sort';
2
2
  import { iBXRestYesNo } from '../../base/YesNo';
3
3
  import { iBXRestTaskFieldsName } from '../../task/base/fieldsName';
4
- import { BXRestFilterGenerator } from '../../base/filterGenerator';
5
- export interface iBXRestParamTasksList {
4
+ import { iBXRestFilterGenerator } from '../../base/filterGenerator';
5
+ import { iBXRestPagination } from '../../base/ApiPaginationBX';
6
+ import { iBXRestHttpTask } from '../../task/task';
7
+ export interface iBXRestParamTasksListHttp {
8
+ tasks: iBXRestHttpTask[] | undefined;
9
+ }
10
+ export interface iBXRestParamTasksList extends iBXRestPagination {
6
11
  order?: iBXRestParamTaskListOrder;
7
12
  filter?: iBXRestParamTaskListFilter;
8
- select?: BXRestFilterGenerator<iBXRestTaskFieldsName[]>;
13
+ select?: iBXRestFilterGenerator<iBXRestTaskFieldsName>[];
9
14
  }
10
15
  export interface iBXRestParamTaskListOrder {
11
16
  ID?: iBXRestParamSort;