bx-rest 0.4.2 → 0.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. package/esm2022/functions/mapResult.mjs +5 -2
  2. package/esm2022/map/rest.mjs +17 -0
  3. package/esm2022/map/task/elapseditem.mjs +5 -5
  4. package/esm2022/map/task.mjs +3 -3
  5. package/esm2022/map.mjs +1 -1
  6. package/esm2022/request/bizproc/activity.mjs +5 -5
  7. package/esm2022/request/bizproc/event.mjs +5 -5
  8. package/esm2022/request/bizproc/robot.mjs +5 -5
  9. package/esm2022/request/bizproc/task.mjs +5 -5
  10. package/esm2022/request/bizproc/workflow.mjs +5 -5
  11. package/esm2022/request/bizproc.mjs +6 -6
  12. package/esm2022/request/task/elapseditem.mjs +5 -5
  13. package/esm2022/request/task.mjs +6 -6
  14. package/esm2022/request/tasks/task.mjs +2 -2
  15. package/esm2022/request/user.mjs +3 -10
  16. package/esm2022/request-navvy/bizproc/workflow.mjs +10 -10
  17. package/esm2022/request-navvy/bizproc.mjs +10 -10
  18. package/esm2022/request-navvy/calendar/event.mjs +5 -5
  19. package/esm2022/request-navvy/calendar.mjs +3 -3
  20. package/esm2022/request-navvy/task/delegate/elapseditem.mjs +11 -11
  21. package/esm2022/request-navvy/task/elapseditem.mjs +13 -13
  22. package/esm2022/request-navvy/task/operation/elapseditem.mjs +14 -14
  23. package/esm2022/request-navvy/tasks/task.mjs +4 -29
  24. package/esm2022/request-navvy/user.mjs +12 -35
  25. package/esm2022/rest.mjs +38 -25
  26. package/esm2022/services/Navvy/NavvyAlternativePaginationNavigation.mjs +4 -3
  27. package/esm2022/services/Navvy/NavvyPagNav.mjs +4 -3
  28. package/esm2022/services/Navvy/NavvyPagNavTasks.mjs +4 -3
  29. package/esm2022/services/Navvy/NavvyPagNavWithUselessKey.mjs +3 -2
  30. package/esm2022/services/Navvy/NavvySimple.mjs +8 -4
  31. package/esm2022/services/Navvy/NavvySupport.mjs +1 -4
  32. package/esm2022/services/Navvy/extends/NavvyPagNavBase.mjs +3 -2
  33. package/esm2022/services/base.mjs +1 -3
  34. package/esm2022/services/http/HttpBX.mjs +6 -3
  35. package/esm2022/settings.mjs +2 -2
  36. package/esm2022/typification/rest/base/answer.mjs +1 -1
  37. package/esm2022/typification/rest/batch/batchRequestParam.mjs +1 -1
  38. package/esm2022/typification/rest/department/add.mjs +1 -1
  39. package/esm2022/typification/rest/department/del.mjs +1 -1
  40. package/esm2022/typification/rest/department/department.mjs +1 -1
  41. package/esm2022/typification/rest/department/get.mjs +1 -1
  42. package/esm2022/typification/rest/department/update.mjs +1 -1
  43. package/esm2022/typification/rest/profile.mjs +2 -0
  44. package/esm2022/typification/rest/tasks/base/fieldsName.mjs +1 -1
  45. package/fesm2022/bx-rest.mjs +882 -904
  46. package/fesm2022/bx-rest.mjs.map +1 -1
  47. package/functions/mapResult.d.ts +2 -1
  48. package/map/rest.d.ts +8 -0
  49. package/map/task/elapseditem.d.ts +3 -3
  50. package/map/task.d.ts +3 -3
  51. package/package.json +1 -1
  52. package/request/bizproc/activity.d.ts +3 -3
  53. package/request/bizproc/event.d.ts +3 -3
  54. package/request/bizproc/robot.d.ts +3 -3
  55. package/request/bizproc/task.d.ts +3 -3
  56. package/request/bizproc/workflow.d.ts +3 -3
  57. package/request/bizproc.d.ts +14 -14
  58. package/request/task/elapseditem.d.ts +3 -3
  59. package/request/task.d.ts +4 -4
  60. package/request/tasks/task.d.ts +2 -2
  61. package/request/user.d.ts +1 -1
  62. package/request-navvy/bizproc/workflow.d.ts +7 -7
  63. package/request-navvy/bizproc.d.ts +8 -8
  64. package/request-navvy/calendar/event.d.ts +3 -3
  65. package/request-navvy/calendar.d.ts +3 -3
  66. package/request-navvy/task/delegate/elapseditem.d.ts +9 -9
  67. package/request-navvy/task/elapseditem.d.ts +12 -12
  68. package/request-navvy/task/operation/elapseditem.d.ts +10 -10
  69. package/request-navvy/tasks/task.d.ts +3 -6
  70. package/request-navvy/user.d.ts +5 -8
  71. package/rest.d.ts +16 -6
  72. package/services/Navvy/NavvySimple.d.ts +0 -1
  73. package/services/Navvy/NavvySupport.d.ts +0 -2
  74. package/typification/rest/base/answer.d.ts +4 -1
  75. package/typification/rest/batch/batchRequestParam.d.ts +2 -3
  76. package/typification/rest/department/get.d.ts +4 -2
  77. package/typification/rest/profile.d.ts +16 -0
  78. package/typification/rest/tasks/base/fieldsName.d.ts +12 -0
@@ -1,4 +1,5 @@
1
- export interface iBXRestAnswer<T> {
1
+ export type iBXRestAnswer<T> = iBXRestAnswerSuccess<T> | iBXRestAnswerError;
2
+ export interface iBXRestAnswerSuccess<T> {
2
3
  result?: T | undefined;
3
4
  next?: number;
4
5
  total?: number;
@@ -10,6 +11,8 @@ export interface iBXRestAnswer<T> {
10
11
  date_start: string;
11
12
  date_finish: string;
12
13
  };
14
+ }
15
+ export interface iBXRestAnswerError {
13
16
  error?: string;
14
17
  error_description?: string;
15
18
  }
@@ -10,7 +10,6 @@ export type iBatchRequestParamHttp = {
10
10
  export type iBatchRequestParamArr<T> = {
11
11
  [key: keyBatch]: iBatchRequestParam<T>;
12
12
  };
13
- export interface iBatchRequestAnswer<T> extends iBXRestAnswer<iBXRestAnswer<{
13
+ export type iBatchRequestAnswer<T> = iBXRestAnswer<iBXRestAnswer<{
14
14
  [key: keyBatch]: T;
15
- }>> {
16
- }
15
+ }>>;
@@ -1,8 +1,10 @@
1
- export interface iBXRestParamDepartmentGet {
1
+ import { iBXRestPagination } from '../base/ApiPaginationBX';
2
+ import { iBXRestParamSort } from '../base/sort';
3
+ export interface iBXRestParamDepartmentGet extends iBXRestPagination {
2
4
  ID?: number | number[];
3
5
  NAME?: string;
4
6
  SORT?: number;
5
7
  PARENT?: number;
6
8
  UF_HEAD?: number;
7
- start?: number;
9
+ ORDER?: iBXRestParamSort;
8
10
  }
@@ -0,0 +1,16 @@
1
+ export interface iBXRestProfileHttp extends iBXRestProfileBase {
2
+ ID: string;
3
+ }
4
+ export interface iBXRestProfile extends iBXRestProfileBase {
5
+ ID: number;
6
+ }
7
+ interface iBXRestProfileBase {
8
+ ADMIN: boolean;
9
+ LAST_NAME: string;
10
+ NAME: string;
11
+ PERSONAL_GENDER: 'M' | 'F' | '';
12
+ PERSONAL_PHOTO: string;
13
+ TIME_ZONE: number | null;
14
+ TIME_ZONE_OFFSET: string;
15
+ }
16
+ export {};
@@ -1,7 +1,19 @@
1
1
  import { iBXRestHttpTask, iBXRestTask } from '../task';
2
2
  import { CamelToSnake } from 'snake-camel-types';
3
+ /**
4
+ * Причины таких странных мувов можно найти тут
5
+ * https://dev.1c-bitrix.ru/rest_help/tasks/task/tasks/tasks_task_list.php
6
+ *
7
+ * в разеделе select и после него глянуть на ответ
8
+ */
3
9
  type UppercaseKeys<T extends CamelToSnake<iBXRestHttpTask | iBXRestTask>> = {
4
10
  [K in keyof T as Uppercase<K & string>]: T[K];
5
11
  };
12
+ /**
13
+ * Причины таких странных мувов можно найти тут
14
+ * https://dev.1c-bitrix.ru/rest_help/tasks/task/tasks/tasks_task_list.php
15
+ *
16
+ * в разеделе select и после него глянуть на ответ
17
+ */
6
18
  export type iBXRestTaskFieldsName = keyof UppercaseKeys<CamelToSnake<iBXRestHttpTask | iBXRestTask>>;
7
19
  export {};