bx-rest 0.0.18 → 0.0.20

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 (87) hide show
  1. package/consts/part-name-metods.d.ts +74 -0
  2. package/consts/time.d.ts +3 -0
  3. package/esm2020/bx-rest.mjs +2 -2
  4. package/esm2020/consts/part-name-metods.mjs +75 -0
  5. package/esm2020/consts/time.mjs +4 -0
  6. package/esm2020/functions/mapResult.mjs +7 -0
  7. package/esm2020/functions/serializeJavascript.mjs +200 -0
  8. package/esm2020/map/base.mjs +14 -0
  9. package/esm2020/map/lists/element.mjs +22 -0
  10. package/esm2020/public-api.mjs +5 -0
  11. package/esm2020/request/bx-rest.module.mjs +28 -0
  12. package/esm2020/request/lists/element.mjs +22 -0
  13. package/esm2020/request/lists.mjs +25 -0
  14. package/esm2020/request/user.mjs +204 -0
  15. package/esm2020/rest.mjs +41 -0
  16. package/esm2020/services/base.mjs +174 -0
  17. package/esm2020/services/http/HttpBX.mjs +128 -0
  18. package/esm2020/services/http/HttpData.mjs +124 -0
  19. package/esm2020/services/http/base/base.mjs +29 -0
  20. package/esm2020/services/http/base/http.mjs +28 -0
  21. package/esm2020/services/http/http.mjs +135 -0
  22. package/esm2020/services/http/sessionKey.mjs +180 -0
  23. package/esm2020/services/map/base.mjs +14 -0
  24. package/esm2020/services/map/rest/user.mjs +89 -0
  25. package/esm2020/services/snack-bar/snack-bar.service.mjs +42 -0
  26. package/esm2020/services/snack-bar/toast-message/toast-message.component.mjs +31 -0
  27. package/esm2020/services/vanilla/JSON.mjs +20 -0
  28. package/esm2020/services/vanilla/localStorage.mjs +35 -0
  29. package/esm2020/services/vanilla//321/201ookies.mjs +44 -0
  30. package/esm2020/store/auth.mjs +26 -0
  31. package/esm2020/store/users.mjs +67 -0
  32. package/esm2020/typification/auth/save.mjs +2 -0
  33. package/esm2020/typification/rest/api-lib.mjs +21 -0
  34. package/esm2020/typification/rest/base/YesNo.mjs +2 -0
  35. package/esm2020/typification/rest/base/httpAnswerBX.mjs +2 -0
  36. package/esm2020/typification/rest/batch/batchRequestParam.mjs +2 -0
  37. package/esm2020/typification/rest/lib.mjs +2 -0
  38. package/esm2020/typification/rest/lists/element/get.mjs +2 -0
  39. package/esm2020/typification/rest/settings.mjs +2 -0
  40. package/esm2020/typification/rest/support/param.mjs +2 -0
  41. package/esm2020/typification/rest/user/UserFilterSearch.mjs +2 -0
  42. package/esm2020/typification/rest/user/get.mjs +2 -0
  43. package/esm2020/typification/rest/user/user.mjs +2 -0
  44. package/fesm2015/bx-rest.mjs +260 -0
  45. package/fesm2015/bx-rest.mjs.map +1 -1
  46. package/fesm2020/bx-rest.mjs +257 -0
  47. package/fesm2020/bx-rest.mjs.map +1 -1
  48. package/functions/mapResult.d.ts +2 -0
  49. package/functions/serializeJavascript.d.ts +2 -0
  50. package/index.d.ts +1 -1
  51. package/map/base.d.ts +6 -0
  52. package/map/lists/element.d.ts +8 -0
  53. package/package.json +1 -1
  54. package/public-api.d.ts +1 -0
  55. package/request/bx-rest.module.d.ts +8 -0
  56. package/request/lists/element.d.ts +19 -0
  57. package/request/lists.d.ts +15 -0
  58. package/request/user.d.ts +51 -0
  59. package/rest.d.ts +14 -0
  60. package/services/base.d.ts +32 -0
  61. package/services/http/HttpBX.d.ts +26 -0
  62. package/services/http/HttpData.d.ts +13 -0
  63. package/services/http/base/base.d.ts +16 -0
  64. package/services/http/base/http.d.ts +7 -0
  65. package/services/http/http.d.ts +31 -0
  66. package/services/http/sessionKey.d.ts +34 -0
  67. package/services/map/base.d.ts +6 -0
  68. package/services/map/rest/user.d.ts +12 -0
  69. package/services/snack-bar/snack-bar.service.d.ts +12 -0
  70. package/services/snack-bar/toast-message/toast-message.component.d.ts +16 -0
  71. package/services/vanilla/JSON.d.ts +7 -0
  72. package/services/vanilla/localStorage.d.ts +10 -0
  73. package/services/vanilla//321/201ookies.d.ts +9 -0
  74. package/store/auth.d.ts +20 -0
  75. package/store/users.d.ts +34 -0
  76. package/typification/auth/save.d.ts +14 -0
  77. package/typification/rest/api-lib.d.ts +9 -0
  78. package/typification/rest/base/YesNo.d.ts +1 -0
  79. package/typification/rest/base/httpAnswerBX.d.ts +15 -0
  80. package/typification/rest/batch/batchRequestParam.d.ts +16 -0
  81. package/typification/rest/lib.d.ts +18 -0
  82. package/typification/rest/lists/element/get.d.ts +28 -0
  83. package/typification/rest/settings.d.ts +6 -0
  84. package/typification/rest/support/param.d.ts +5 -0
  85. package/typification/rest/user/UserFilterSearch.d.ts +43 -0
  86. package/typification/rest/user/get.d.ts +13 -0
  87. package/typification/rest/user/user.d.ts +62 -0
@@ -0,0 +1,19 @@
1
+ import iHttpAnswerBX from '../../typification/rest/base/httpAnswerBX';
2
+ import HttpBXServices from '../../services/http/HttpBX';
3
+ import BXRestListsElementMap from '../../map/lists/element';
4
+ import { iBXRestHttpListsElement, iBXRestParamListsElementGet } from '../../typification/rest/lists/element/get';
5
+ export declare class BXRestListsElement {
6
+ private http;
7
+ private mapResult;
8
+ url: {
9
+ add: string[];
10
+ delete: string[];
11
+ get: string[];
12
+ update: string[];
13
+ getFileUrl: string[];
14
+ };
15
+ constructor(http: HttpBXServices, mapResult: BXRestListsElementMap);
16
+ get(pram: iBXRestParamListsElementGet): import("rxjs").Observable<(iHttpAnswerBX<iBXRestHttpListsElement[]> & {
17
+ result: import("../../typification/rest/lists/element/get").iBXRestListsElement[];
18
+ }) | undefined>;
19
+ }
@@ -0,0 +1,15 @@
1
+ import { BXRestListsElement } from './lists/element';
2
+ import * as i0 from "@angular/core";
3
+ export default class BXRestLists {
4
+ element: BXRestListsElement;
5
+ url: {
6
+ add: string[];
7
+ delete: string[];
8
+ get: string[];
9
+ update: string[];
10
+ getIblockTypeId: string[];
11
+ };
12
+ constructor(element: BXRestListsElement);
13
+ static ɵfac: i0.ɵɵFactoryDeclaration<BXRestLists, never>;
14
+ static ɵprov: i0.ɵɵInjectableDeclaration<BXRestLists>;
15
+ }
@@ -0,0 +1,51 @@
1
+ import { Observable } from 'rxjs';
2
+ import { iBXGetParam } from '../typification/rest/user/get';
3
+ import HttpBXServices from '../services/http/HttpBX';
4
+ import UserFilterSearch from '../typification/rest/user/UserFilterSearch';
5
+ import { Store } from '@ngrx/store';
6
+ import { storeUsers } from '../store/users';
7
+ import { BitrixApiUserMapServices } from '../services/map/rest/user';
8
+ import SnackBarService from '../services/snack-bar/snack-bar.service';
9
+ import iHttpAnswerBX from '../typification/rest/base/httpAnswerBX';
10
+ import { iBXRestUser, iBXRestUserHttp, iBXRestUserHttpField } from '../typification/rest/user/user';
11
+ import * as i0 from "@angular/core";
12
+ export declare class BXRestUser {
13
+ private http;
14
+ private snackBar;
15
+ private store;
16
+ private userMap;
17
+ url: {
18
+ admin: string[];
19
+ get: string[];
20
+ current: string[];
21
+ update: string[];
22
+ search: string[];
23
+ access: string[];
24
+ fields: string[];
25
+ userfield: {
26
+ list: string[];
27
+ };
28
+ };
29
+ def: {
30
+ params: {
31
+ ACTIVE: 1;
32
+ start: 0;
33
+ };
34
+ };
35
+ user$: Observable<storeUsers>;
36
+ constructor(http: HttpBXServices, snackBar: SnackBarService, store: Store<{
37
+ users: storeUsers;
38
+ }>, userMap: BitrixApiUserMapServices);
39
+ admin(): Observable<iHttpAnswerBX<boolean> | undefined>;
40
+ get(params?: iBXGetParam): Observable<iHttpAnswerBX<iBXRestUserHttp[]> | undefined>;
41
+ current(update?: boolean): Observable<iBXRestUser | undefined>;
42
+ private getSelfHttp;
43
+ access(access: string[], textError?: string): Observable<iHttpAnswerBX<boolean> | undefined>;
44
+ private saveArrUser;
45
+ search(params: string | UserFilterSearch): Observable<iHttpAnswerBX<iBXRestUserHttp[]> | undefined>;
46
+ fields(): Observable<iHttpAnswerBX<iBXRestUserHttpField> | undefined>;
47
+ update(user: iBXRestUser, fieldUpdate: string[]): Observable<iHttpAnswerBX<iBXRestUserHttp[]> | undefined> | Observable<{}>;
48
+ private setDefParam;
49
+ static ɵfac: i0.ɵɵFactoryDeclaration<BXRestUser, never>;
50
+ static ɵprov: i0.ɵɵInjectableDeclaration<BXRestUser>;
51
+ }
package/rest.d.ts ADDED
@@ -0,0 +1,14 @@
1
+ import { BXRestUser } from './request/user';
2
+ import BXRestLists from './request/lists';
3
+ import * as i0 from "@angular/core";
4
+ declare class BXRestBase {
5
+ user: BXRestUser;
6
+ lists: BXRestLists;
7
+ constructor(user: BXRestUser, lists: BXRestLists);
8
+ }
9
+ declare const BXRest_base: typeof BXRestBase;
10
+ export declare class BXRest extends BXRest_base {
11
+ static ɵfac: i0.ɵɵFactoryDeclaration<BXRest, never>;
12
+ static ɵprov: i0.ɵɵInjectableDeclaration<BXRest>;
13
+ }
14
+ export {};
@@ -0,0 +1,32 @@
1
+ import { DateTimeOptions } from 'luxon/src/datetime';
2
+ import * as i0 from "@angular/core";
3
+ export declare class BaseServices {
4
+ toStr(val: any): string;
5
+ toNum(val: any): number;
6
+ toDate(val: number | string | Date, format?: string, opt?: DateTimeOptions): Date;
7
+ getBXStrTime(date: Date): string;
8
+ toISOStringWithTimezone(date: Date): string;
9
+ toBool(val: any): boolean;
10
+ toBXYorN(val: boolean): "N" | "Y";
11
+ typeof(val: any): "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function";
12
+ typeDefClass(val: object): undefined | null | 'date';
13
+ toJSON(val: object): string;
14
+ fromJSON<T>(val: string): T | undefined;
15
+ prepareBaseAddress(url: string, add?: string): string;
16
+ getHomeAddress(): string;
17
+ dateDiff(a: Date, b: Date): Date;
18
+ dateDiffInDays(a: Date, b: Date): number;
19
+ getBase64File(file: File): Promise<unknown>;
20
+ getBase64FileLikeStr(file: File): Promise<{
21
+ header: string;
22
+ val: string;
23
+ } | undefined>;
24
+ sumArray(numbers: number[]): number;
25
+ isItTheSameDate(date1: Date, date2: Date): boolean;
26
+ toUnix(date: Date): number;
27
+ arrSum(x: number[]): number;
28
+ getBaseUrlHttps(url: string, component?: boolean): string;
29
+ cropUrl(url: string): string;
30
+ static ɵfac: i0.ɵɵFactoryDeclaration<BaseServices, never>;
31
+ static ɵprov: i0.ɵɵInjectableDeclaration<BaseServices>;
32
+ }
@@ -0,0 +1,26 @@
1
+ import { Observable } from 'rxjs';
2
+ import { iHttpParamSettings } from '../../typification/rest/settings';
3
+ import BaseHttpServices from '../../services/http/http';
4
+ import { iBatchRequestAnswer, iBatchRequestParam, iBatchRequestParamArr, iBatchRequestParamHttp } from '../../typification/rest/batch/batchRequestParam';
5
+ import * as i0 from "@angular/core";
6
+ export default class HttpBXServices extends BaseHttpServices {
7
+ timeNowOnServer(): Observable<Date | undefined>;
8
+ /**
9
+ * Это пиздец а не метод
10
+ * @param param
11
+ */
12
+ branch<T, A>(param: iBatchRequestParamArr<T> | iBatchRequestParam<T>[]): Observable<iBatchRequestAnswer<A>[] | undefined>;
13
+ prepareBatch<T>(param: iBatchRequestParamArr<T> | iBatchRequestParam<T>[]): iBatchRequestParamHttp;
14
+ mapBranchResult<T>(res: iBatchRequestAnswer<T>[]): {
15
+ [key: string]: T;
16
+ [key: number]: T;
17
+ };
18
+ mapBranchResultWithoutKey<T>(res: iBatchRequestAnswer<T>[]): T[];
19
+ post<T>(name: string[], params?: any, textError?: string, settings?: iHttpParamSettings): Observable<T | undefined>;
20
+ get<T>(name: string[], params?: any, textError?: string, settings?: iHttpParamSettings): Observable<T | undefined>;
21
+ httpPost<T>(url: string, params?: any, textError?: string, settings?: iHttpParamSettings): Observable<T | undefined>;
22
+ httpGet<T>(url: string, params?: any, textError?: string, settings?: iHttpParamSettings): Observable<T | undefined>;
23
+ getNameMethod(arr: string[]): string;
24
+ static ɵfac: i0.ɵɵFactoryDeclaration<HttpBXServices, never>;
25
+ static ɵprov: i0.ɵɵInjectableDeclaration<HttpBXServices>;
26
+ }
@@ -0,0 +1,13 @@
1
+ import { BaseServices } from '../../services/base';
2
+ import { HttpParams } from '@angular/common/http';
3
+ import { iHttpParamSettings } from '../../typification/rest/settings';
4
+ import iHttpAnswerBX from '../../typification/rest/base/httpAnswerBX';
5
+ export declare class HttpData extends BaseServices {
6
+ defSettings: iHttpParamSettings;
7
+ getHttpParamsGet(// не так уж и сложно сделать сложенный HttpParams, да гугл?
8
+ obj: any, sendHttpParams?: HttpParams, thisArray?: boolean, nesting?: string[], _?: iHttpParamSettings): any;
9
+ getHttpParamsPost(obj: any, sendHttpParams?: FormData, thisArray?: boolean, nesting?: string[], settings?: iHttpParamSettings): any;
10
+ mapResult<T>(v: iHttpAnswerBX<T> | undefined): T | undefined;
11
+ sliceArrayIntoChunks(arr: any[], chunkSize: number): any[][];
12
+ removingMultipleSlashes(str: string): string;
13
+ }
@@ -0,0 +1,16 @@
1
+ import { iHttpParamSettings } from '../../../typification/rest/settings';
2
+ import { HttpClient } from '@angular/common/http';
3
+ import SnackBarService from '../../../services/snack-bar/snack-bar.service';
4
+ import { Observable } from 'rxjs';
5
+ import { HttpData } from '../../../services/http/HttpData';
6
+ import * as i0 from "@angular/core";
7
+ export declare abstract class BaseHttp extends HttpData {
8
+ http: HttpClient;
9
+ snackBar: SnackBarService;
10
+ protected constructor(http: HttpClient, snackBar: SnackBarService);
11
+ abstract httpGet<T>(url: string, params: any, textError: string, settings: iHttpParamSettings): Observable<T | undefined>;
12
+ abstract httpPost<T>(url: string, params: any, textError: string, settings: iHttpParamSettings): Observable<T | undefined>;
13
+ handleError<T>(result?: T, textError?: string): (error: Error) => Observable<T>;
14
+ static ɵfac: i0.ɵɵFactoryDeclaration<BaseHttp, never>;
15
+ static ɵprov: i0.ɵɵInjectableDeclaration<BaseHttp>;
16
+ }
@@ -0,0 +1,7 @@
1
+ import { Observable } from 'rxjs';
2
+ import { iHttpParamSettings } from '../../../typification/rest/settings';
3
+ import { BaseHttp } from '../../../services/http/base/base';
4
+ export declare class BaseHttpServices extends BaseHttp {
5
+ httpGet<T>(url: string, params?: {}, textError?: string, settings?: iHttpParamSettings): Observable<T | undefined>;
6
+ httpPost<T>(url: string, params?: any, textError?: string, settings?: iHttpParamSettings): Observable<T | undefined>;
7
+ }
@@ -0,0 +1,31 @@
1
+ import { Observable } from 'rxjs';
2
+ import { HttpClient } from '@angular/common/http';
3
+ import SnackBarService from '../../services/snack-bar/snack-bar.service';
4
+ import SessionKeyServices from '../../services/http/sessionKey';
5
+ import { iHttpParamSettings } from '../../typification/rest/settings';
6
+ import { iBatchRequestAnswer, iBatchRequestParam, iBatchRequestParamArr, iBatchRequestParamHttp } from '../../typification/rest/batch/batchRequestParam';
7
+ import { BaseHttpServices } from './base/http';
8
+ import * as i0 from "@angular/core";
9
+ export default class HttpServices extends BaseHttpServices {
10
+ session: SessionKeyServices;
11
+ constructor(http: HttpClient, snackBar: SnackBarService, session: SessionKeyServices);
12
+ timeNowOnServer(): Observable<Date | undefined>;
13
+ /**
14
+ * Это пиздец а не метод
15
+ * @param param
16
+ */
17
+ branch<T, A>(param: iBatchRequestParamArr<T> | iBatchRequestParam<T>[]): Observable<iBatchRequestAnswer<A>[] | undefined>;
18
+ prepareBatch<T>(param: iBatchRequestParamArr<T> | iBatchRequestParam<T>[]): iBatchRequestParamHttp;
19
+ mapBranchResult<T>(res: iBatchRequestAnswer<T>[]): {
20
+ [key: string]: T;
21
+ [key: number]: T;
22
+ };
23
+ mapBranchResultWithoutKey<T>(res: iBatchRequestAnswer<T>[]): T[];
24
+ post<T>(name: string[], params?: any, textError?: string, settings?: iHttpParamSettings): Observable<T | undefined>;
25
+ get<T>(name: string[], params?: any, textError?: string, settings?: iHttpParamSettings): Observable<T | undefined>;
26
+ httpPost<T>(url: string, params?: any, textError?: string, settings?: iHttpParamSettings): Observable<T | undefined>;
27
+ httpGet<T>(url: string, params?: any, textError?: string, settings?: iHttpParamSettings): Observable<T | undefined>;
28
+ getNameMethod(arr: string[]): string;
29
+ static ɵfac: i0.ɵɵFactoryDeclaration<HttpServices, never>;
30
+ static ɵprov: i0.ɵɵInjectableDeclaration<HttpServices>;
31
+ }
@@ -0,0 +1,34 @@
1
+ import { Store } from '@ngrx/store';
2
+ import saveApplicationAuth from '../../typification/auth/save';
3
+ import { Observable, Subscription } from 'rxjs';
4
+ import { ActivatedRoute } from '@angular/router';
5
+ import { BaseServices } from '../../services/base';
6
+ import { RestServices } from '../../typification/rest/api-lib';
7
+ import * as i0 from "@angular/core";
8
+ declare type IKeyAuth = 'sessid' | 'auth' | string;
9
+ export default class SessionKeyServices extends BaseServices {
10
+ store: Store<{
11
+ auth: saveApplicationAuth;
12
+ }>;
13
+ private route;
14
+ BxApiLib: RestServices;
15
+ authHave: boolean;
16
+ authData$: Observable<saveApplicationAuth>;
17
+ authData: saveApplicationAuth | undefined;
18
+ subscribe: {
19
+ authData: Subscription;
20
+ };
21
+ constructor(store: Store<{
22
+ auth: saveApplicationAuth;
23
+ }>, route: ActivatedRoute, BxApiLib: RestServices);
24
+ subscribeAll(): void;
25
+ getAuth(): string;
26
+ getKeyAuth(): IKeyAuth;
27
+ getSessid(): any;
28
+ setAuthParams<T>(params: any): boolean;
29
+ getAuthParams(): Observable<string | undefined>;
30
+ getBaseUrl(): Observable<string | undefined>;
31
+ static ɵfac: i0.ɵɵFactoryDeclaration<SessionKeyServices, never>;
32
+ static ɵprov: i0.ɵɵInjectableDeclaration<SessionKeyServices>;
33
+ }
34
+ export {};
@@ -0,0 +1,6 @@
1
+ import { BaseServices } from '../base';
2
+ import * as i0 from "@angular/core";
3
+ export default class BaseMapServices extends BaseServices {
4
+ static ɵfac: i0.ɵɵFactoryDeclaration<BaseMapServices, never>;
5
+ static ɵprov: i0.ɵɵInjectableDeclaration<BaseMapServices>;
6
+ }
@@ -0,0 +1,12 @@
1
+ import BaseMapServices from '../base';
2
+ import { iBXRestUser, iBXRestUserHttp } from '../../../typification/rest/user/user';
3
+ import * as i0 from "@angular/core";
4
+ export declare class BitrixApiUserMapServices extends BaseMapServices {
5
+ HttpToBX(user: iBXRestUserHttp): iBXRestUser;
6
+ BXtoHttp(user: iBXRestUser): iBXRestUserHttp;
7
+ getFIO(user: iBXRestUser): string;
8
+ getFI(user: iBXRestUser): string;
9
+ getFIOShort(user: iBXRestUser): string;
10
+ static ɵfac: i0.ɵɵFactoryDeclaration<BitrixApiUserMapServices, never>;
11
+ static ɵprov: i0.ɵɵInjectableDeclaration<BitrixApiUserMapServices>;
12
+ }
@@ -0,0 +1,12 @@
1
+ import { MatSnackBar } from '@angular/material/snack-bar';
2
+ import * as i0 from "@angular/core";
3
+ export default class SnackBarService {
4
+ private snackBar;
5
+ constructor(snackBar: MatSnackBar);
6
+ error(message: string, sec?: number): void;
7
+ warning(message: string, sec?: number): void;
8
+ success(message: string, sec?: number): void;
9
+ standardMessage(message: string, sec?: number, name?: string): void;
10
+ static ɵfac: i0.ɵɵFactoryDeclaration<SnackBarService, never>;
11
+ static ɵprov: i0.ɵɵInjectableDeclaration<SnackBarService>;
12
+ }
@@ -0,0 +1,16 @@
1
+ import { MatSnackBarRef } from '@angular/material/snack-bar';
2
+ import * as i0 from "@angular/core";
3
+ export declare class ToastMessageComponent {
4
+ data: {
5
+ message: string;
6
+ type: 'error' | 'warning' | 'success';
7
+ };
8
+ snackBarRef: MatSnackBarRef<any>;
9
+ constructor(data: {
10
+ message: string;
11
+ type: 'error' | 'warning' | 'success';
12
+ });
13
+ getClass(): string;
14
+ static ɵfac: i0.ɵɵFactoryDeclaration<ToastMessageComponent, never>;
15
+ static ɵcmp: i0.ɵɵComponentDeclaration<ToastMessageComponent, "app-view", never, {}, {}, never, never, true, never>;
16
+ }
@@ -0,0 +1,7 @@
1
+ import * as i0 from "@angular/core";
2
+ export default class JSONServices {
3
+ static deserialize(data: any): any;
4
+ static serialize(data: any): any;
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<JSONServices, never>;
6
+ static ɵprov: i0.ɵɵInjectableDeclaration<JSONServices>;
7
+ }
@@ -0,0 +1,10 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class LocalStorageServices {
3
+ static get(name: string): any;
4
+ static getObj<T>(name: string): T | null;
5
+ static set(name: string, value: string): void;
6
+ static setObj(name: string, value: any): void;
7
+ static del(name: string): void;
8
+ static ɵfac: i0.ɵɵFactoryDeclaration<LocalStorageServices, never>;
9
+ static ɵprov: i0.ɵɵInjectableDeclaration<LocalStorageServices>;
10
+ }
@@ -0,0 +1,9 @@
1
+ import * as i0 from "@angular/core";
2
+ export default class CookiesServices {
3
+ static get(name: string): string;
4
+ static set(name: string, value: string, age?: number): void;
5
+ static setObj(name: string, value: any, age?: number): void;
6
+ static getObj<T>(name: string): T | false;
7
+ static ɵfac: i0.ɵɵFactoryDeclaration<CookiesServices, never>;
8
+ static ɵprov: i0.ɵɵInjectableDeclaration<CookiesServices>;
9
+ }
@@ -0,0 +1,20 @@
1
+ import { Action } from '@ngrx/store';
2
+ import saveApplicationAuth from '../typification/auth/save';
3
+ export interface saveApplicationAuthPath {
4
+ access_token?: string;
5
+ client_endpoint?: string;
6
+ domain?: string;
7
+ expires?: number;
8
+ expires_in?: number;
9
+ member_id?: string;
10
+ refresh_token?: string;
11
+ scope?: string;
12
+ server_endpoint?: string;
13
+ status?: string;
14
+ user_id?: number;
15
+ type?: string;
16
+ }
17
+ export declare const save: import("@ngrx/store").ActionCreator<"[Auth Component] Save", (props: saveApplicationAuth | saveApplicationAuthPath) => (saveApplicationAuth | saveApplicationAuthPath) & import("@ngrx/store/src/models").TypedAction<"[Auth Component] Save">>;
18
+ export declare const saveAccessToken: import("@ngrx/store").ActionCreator<"[Auth Component] SaveAccessToken", (props: saveApplicationAuthPath) => saveApplicationAuthPath & import("@ngrx/store/src/models").TypedAction<"[Auth Component] SaveAccessToken">>;
19
+ export declare const initialState: saveApplicationAuth;
20
+ export declare function authReducer(state: saveApplicationAuth | undefined, action: Action): saveApplicationAuth;
@@ -0,0 +1,34 @@
1
+ import { Action } from '@ngrx/store';
2
+ import { iBXRestUser } from '../typification/rest/user/user';
3
+ export interface storeUsers {
4
+ load: {
5
+ all: boolean;
6
+ department: number[];
7
+ };
8
+ self: iBXRestUser | undefined;
9
+ data: iBXRestUser[];
10
+ }
11
+ export declare const save: import("@ngrx/store").ActionCreator<"[Users Component] Save", (props: iBXRestUser) => iBXRestUser & import("@ngrx/store/src/models").TypedAction<"[Users Component] Save">>;
12
+ export declare const saveArr: import("@ngrx/store").ActionCreator<"[Users Component] Save Arr", (props: {
13
+ arr: iBXRestUser[];
14
+ }) => {
15
+ arr: iBXRestUser[];
16
+ } & import("@ngrx/store/src/models").TypedAction<"[Users Component] Save Arr">>;
17
+ export declare const update: import("@ngrx/store").ActionCreator<"[Users Component] Update", (props: iBXRestUser) => iBXRestUser & import("@ngrx/store/src/models").TypedAction<"[Users Component] Update">>;
18
+ export declare const loadAll: import("@ngrx/store").ActionCreator<"[Users Component] loadAll", (props: {
19
+ load: true;
20
+ }) => {
21
+ load: true;
22
+ } & import("@ngrx/store/src/models").TypedAction<"[Users Component] loadAll">>;
23
+ export declare const saveSelf: import("@ngrx/store").ActionCreator<"[Users Component] saveSelf", (props: {
24
+ self: iBXRestUser;
25
+ }) => {
26
+ self: iBXRestUser;
27
+ } & import("@ngrx/store/src/models").TypedAction<"[Users Component] saveSelf">>;
28
+ export declare const saveIDLoadedDepartment: import("@ngrx/store").ActionCreator<"[Users Component] saveIDLoadedDepartment", (props: {
29
+ id: number[];
30
+ }) => {
31
+ id: number[];
32
+ } & import("@ngrx/store/src/models").TypedAction<"[Users Component] saveIDLoadedDepartment">>;
33
+ export declare const initialState: storeUsers;
34
+ export declare function usersReducer(state: storeUsers | undefined, action: Action): storeUsers;
@@ -0,0 +1,14 @@
1
+ export default interface saveApplicationAuth {
2
+ access_token: string;
3
+ client_endpoint: string;
4
+ domain: string;
5
+ expires: number;
6
+ expires_in: number;
7
+ member_id: string;
8
+ refresh_token: string;
9
+ scope: string;
10
+ server_endpoint: string;
11
+ status: string;
12
+ user_id: number;
13
+ state?: any;
14
+ }
@@ -0,0 +1,9 @@
1
+ import { iRestLib } from './lib';
2
+ import * as i0 from "@angular/core";
3
+ export declare class RestServices {
4
+ BX24: iRestLib | false;
5
+ constructor();
6
+ init(callBack: Function): any;
7
+ static ɵfac: i0.ɵɵFactoryDeclaration<RestServices, never>;
8
+ static ɵprov: i0.ɵɵInjectableDeclaration<RestServices>;
9
+ }
@@ -0,0 +1 @@
1
+ export declare type iBXRestYesNo = 'Y' | 'N';
@@ -0,0 +1,15 @@
1
+ export default interface iHttpAnswerBX<T> {
2
+ result?: T | undefined;
3
+ next?: number;
4
+ total?: number;
5
+ time?: {
6
+ start: number;
7
+ finish: number;
8
+ duration: number;
9
+ processing: number;
10
+ date_start: string;
11
+ date_finish: string;
12
+ };
13
+ error?: string;
14
+ error_description?: string;
15
+ }
@@ -0,0 +1,16 @@
1
+ import iHttpAnswerBX from '../../../typification/rest/base/httpAnswerBX';
2
+ export declare type keyBatch = string | number;
3
+ export interface iBatchRequestParam<T> {
4
+ name: string;
5
+ param: T;
6
+ }
7
+ export declare type iBatchRequestParamHttp = {
8
+ [key: keyBatch]: string;
9
+ };
10
+ export declare type iBatchRequestParamArr<T> = {
11
+ [key: keyBatch]: iBatchRequestParam<T>;
12
+ };
13
+ export interface iBatchRequestAnswer<T> extends iHttpAnswerBX<iHttpAnswerBX<{
14
+ [key: keyBatch]: T;
15
+ }>> {
16
+ }
@@ -0,0 +1,18 @@
1
+ export interface iRestLib {
2
+ init: Function;
3
+ getAuth: () => iRestLibGetAuth;
4
+ placement: {
5
+ info: () => {
6
+ options: any;
7
+ placement: string;
8
+ };
9
+ };
10
+ fitWindow: (func?: () => void) => void;
11
+ }
12
+ export interface iRestLibGetAuth {
13
+ access_token: string;
14
+ domain: string;
15
+ expires_in: number;
16
+ member_id: string;
17
+ refresh_token: string;
18
+ }
@@ -0,0 +1,28 @@
1
+ import { iBXRestYesNo } from '../../base/YesNo';
2
+ export interface iBXRestParamListsElementGet {
3
+ IBLOCK_TYPE_ID: 'lists' | 'bitrix_processes' | 'lists_socnet';
4
+ IBLOCK_ID: number;
5
+ SOCNET_GROUP_ID?: number;
6
+ ELEMENT_ID?: number;
7
+ FILTER?: {
8
+ [key: string]: any;
9
+ };
10
+ }
11
+ export interface iBXRestListsElement extends iBXRestBaseListsElement {
12
+ BP_PUBLISHED: boolean;
13
+ CREATED_BY: number;
14
+ IBLOCK_ID: number;
15
+ ID: number;
16
+ }
17
+ export interface iBXRestHttpListsElement extends iBXRestBaseListsElement {
18
+ BP_PUBLISHED: iBXRestYesNo;
19
+ CREATED_BY: string;
20
+ IBLOCK_ID: string;
21
+ ID: string;
22
+ }
23
+ export interface iBXRestBaseListsElement {
24
+ CODE: string | null;
25
+ IBLOCK_SECTION_ID: string | null;
26
+ NAME: string;
27
+ [key: string]: any;
28
+ }
@@ -0,0 +1,6 @@
1
+ export interface iHttpParamSettings {
2
+ timeZone: {
3
+ calc: boolean;
4
+ levelOut: boolean;
5
+ };
6
+ }
@@ -0,0 +1,5 @@
1
+ export interface iBXRestBaseParam {
2
+ start?: number;
3
+ }
4
+ export interface iBXRestBaseParamFactor<T extends iBXRestBaseParam> {
5
+ }
@@ -0,0 +1,43 @@
1
+ export default interface UserFilterSearch {
2
+ NAME?: string;
3
+ LAST_NAME?: string;
4
+ SECOND_NAME?: string;
5
+ WORK_POSITION?: string;
6
+ UF_DEPARTMENT_NAME?: string;
7
+ USER_TYPE?: 'employee' | 'extranet' | 'email';
8
+ FIND?: string;
9
+ ACTIVE?: boolean;
10
+ EMAIL?: string;
11
+ LAST_LOGIN?: string;
12
+ DATE_REGISTER?: string;
13
+ IS_ONLINE?: 'Y' | 'N';
14
+ PERSONAL_GENDER?: 'M' | 'F';
15
+ PERSONAL_PROFESSION?: string;
16
+ PERSONAL_WWW?: string;
17
+ PERSONAL_BIRTHDAY?: string;
18
+ PERSONAL_PHOTO?: string;
19
+ PERSONAL_ICQ?: string;
20
+ PERSONAL_PHONE?: string;
21
+ PERSONAL_FAX?: string;
22
+ PERSONAL_MOBILE?: string;
23
+ PERSONAL_PAGER?: string;
24
+ PERSONAL_STREET?: string;
25
+ PERSONAL_CITY?: string;
26
+ PERSONAL_STATE?: string;
27
+ PERSONAL_ZIP?: string;
28
+ PERSONAL_COUNTRY?: string;
29
+ TIME_ZONE_OFFSET?: string;
30
+ WORK_COMPANY?: string;
31
+ WORK_PHONE?: string;
32
+ UF_DEPARTMENT?: number[];
33
+ UF_INTERESTS?: string;
34
+ UF_SKILLS?: string;
35
+ UF_WEB_SITES?: string;
36
+ UF_XING?: string;
37
+ UF_LINKEDIN?: string;
38
+ UF_FACEBOOK?: string;
39
+ UF_TWITTER?: string;
40
+ UF_SKYPE?: string;
41
+ UF_DISTRICT?: string;
42
+ UF_PHONE_INNER?: string;
43
+ }
@@ -0,0 +1,13 @@
1
+ import { iBXRestYesNo } from '../base/YesNo';
2
+ import { iBXRestBaseParam } from '../support/param';
3
+ export interface iBXGetParam extends iBXRestBaseParam {
4
+ ID?: number[] | number;
5
+ PERSONAL_BIRTHDAY?: string | string[];
6
+ order?: 'ASC' | 'DESC';
7
+ UF_DEPARTMENT?: number[];
8
+ UF_PHONE_INNER?: string;
9
+ IS_ONLINE?: iBXRestYesNo;
10
+ NAME_SEARCH?: string;
11
+ USER_TYPE?: 'employee' | 'extranet' | 'email';
12
+ ACTIVE?: 2 | 1 | 0;
13
+ }