bx-rest 0.3.5 → 0.4.0
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.
- package/esm2022/map/lists.mjs +7 -6
- package/esm2022/map/tasks/task.mjs +7 -6
- package/esm2022/map/user.mjs +6 -5
- package/esm2022/services/base.mjs +8 -5
- package/esm2022/services/http/HttpBX.mjs +1 -1
- package/esm2022/services/http/base/base.mjs +7 -6
- package/esm2022/services/http/http.mjs +7 -6
- package/esm2022/services/http/sessionKey.mjs +18 -19
- package/esm2022/settings.mjs +27 -9
- package/esm2022/typification/settings.mjs +1 -1
- package/fesm2022/bx-rest.mjs +164 -146
- package/fesm2022/bx-rest.mjs.map +1 -1
- package/map/lists.d.ts +2 -1
- package/map/tasks/task.d.ts +2 -1
- package/map/user.d.ts +2 -1
- package/package.json +1 -1
- package/services/base.d.ts +3 -0
- package/services/http/base/base.d.ts +2 -1
- package/services/http/http.d.ts +2 -1
- package/services/http/sessionKey.d.ts +3 -1
- package/settings.d.ts +10 -1
- package/typification/settings.d.ts +2 -2
package/map/lists.d.ts
CHANGED
|
@@ -2,11 +2,12 @@ import { BaseMapServices } from './base';
|
|
|
2
2
|
import { iBXRestListItem, iBXRestListItemHttp } from '../typification/rest/lists/get';
|
|
3
3
|
import BXRestMapListsElement from './lists/element';
|
|
4
4
|
import { BXRestMapListsField } from './lists/field';
|
|
5
|
+
import { BX_REST_SETTINGS } from '../settings';
|
|
5
6
|
import * as i0 from "@angular/core";
|
|
6
7
|
export declare class BXRestMapLists extends BaseMapServices {
|
|
7
8
|
element: BXRestMapListsElement;
|
|
8
9
|
field: BXRestMapListsField;
|
|
9
|
-
constructor(element: BXRestMapListsElement, field: BXRestMapListsField);
|
|
10
|
+
constructor(BX_REST_SETTINGS: BX_REST_SETTINGS, element: BXRestMapListsElement, field: BXRestMapListsField);
|
|
10
11
|
get(value: iBXRestListItemHttp[] | undefined): iBXRestListItem[] | undefined;
|
|
11
12
|
protected iBXRestListItemHttpToiBXRestListItem(itemLists: iBXRestListItemHttp): iBXRestListItem;
|
|
12
13
|
static ɵfac: i0.ɵɵFactoryDeclaration<BXRestMapLists, never>;
|
package/map/tasks/task.d.ts
CHANGED
|
@@ -5,10 +5,11 @@ import { iBXRestTasksTaskGetHttp, iBXRestTasksTaskGetHttpDefault } from '../../t
|
|
|
5
5
|
import { BXRestMapTasksTaskResult } from './task/result';
|
|
6
6
|
import { iBXRestTask } from '../../typification/rest/tasks/task';
|
|
7
7
|
import { iBXRestTaskFieldsName } from '../../typification/rest/tasks/base/fieldsName';
|
|
8
|
+
import { BX_REST_SETTINGS } from '../../settings';
|
|
8
9
|
import * as i0 from "@angular/core";
|
|
9
10
|
export declare class BXRestMapTasksTask extends BaseMapServices {
|
|
10
11
|
result: BXRestMapTasksTaskResult;
|
|
11
|
-
constructor(result: BXRestMapTasksTaskResult);
|
|
12
|
+
constructor(BX_REST_SETTINGS: BX_REST_SETTINGS, result: BXRestMapTasksTaskResult);
|
|
12
13
|
getaccess(v: iBXRestTaskGetAccess | undefined): {
|
|
13
14
|
[key: number]: import("../../typification/rest/task/access/getaccess").iBXRestTaskGetAccessItem;
|
|
14
15
|
} | undefined;
|
package/map/user.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { BaseMapServices } from './base';
|
|
2
2
|
import { iBXRestUser, iBXRestUserHttp } from '../typification/rest/user/user';
|
|
3
|
+
import { BX_REST_SETTINGS } from '../settings';
|
|
3
4
|
import * as i0 from "@angular/core";
|
|
4
5
|
export declare class BXRestMapUser extends BaseMapServices {
|
|
5
|
-
constructor();
|
|
6
|
+
constructor(BX_REST_SETTINGS: BX_REST_SETTINGS);
|
|
6
7
|
get(v: iBXRestUserHttp[] | undefined): iBXRestUser[] | undefined;
|
|
7
8
|
current(v: iBXRestUserHttp): iBXRestUser;
|
|
8
9
|
private userHttpToTrace;
|
package/package.json
CHANGED
package/services/base.d.ts
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { DateTimeOptions } from 'luxon/src/datetime';
|
|
2
|
+
import { BX_REST_SETTINGS } from '../settings';
|
|
2
3
|
import * as i0 from "@angular/core";
|
|
3
4
|
export declare class BaseServices {
|
|
5
|
+
BX_REST_SETTINGS: BX_REST_SETTINGS;
|
|
6
|
+
constructor(BX_REST_SETTINGS: BX_REST_SETTINGS);
|
|
4
7
|
toStr(val: any): string;
|
|
5
8
|
toNum(val: any): number;
|
|
6
9
|
toDate(val: number | string | Date, format?: string, opt?: DateTimeOptions): Date;
|
|
@@ -2,10 +2,11 @@ import { iHttpParamSettings } from '../../../typification/rest/settings';
|
|
|
2
2
|
import { HttpClient } from '@angular/common/http';
|
|
3
3
|
import { Observable } from 'rxjs';
|
|
4
4
|
import { HttpData } from '../HttpData';
|
|
5
|
+
import { BX_REST_SETTINGS } from '../../../settings';
|
|
5
6
|
import * as i0 from "@angular/core";
|
|
6
7
|
export declare abstract class BaseHttp extends HttpData {
|
|
7
8
|
http: HttpClient;
|
|
8
|
-
protected constructor(http: HttpClient);
|
|
9
|
+
protected constructor(BX_REST_SETTINGS: BX_REST_SETTINGS, http: HttpClient);
|
|
9
10
|
abstract httpGet<T>(url: string, params: any, settings: iHttpParamSettings): Observable<T | undefined>;
|
|
10
11
|
abstract httpPost<T>(url: string, params: any, settings: iHttpParamSettings): Observable<T | undefined>;
|
|
11
12
|
handleError<T>(result?: T): (error: Error) => Observable<T>;
|
package/services/http/http.d.ts
CHANGED
|
@@ -3,10 +3,11 @@ import { HttpClient } from '@angular/common/http';
|
|
|
3
3
|
import SessionKeyServices from '../../services/http/sessionKey';
|
|
4
4
|
import { iHttpParamSettings } from '../../typification/rest/settings';
|
|
5
5
|
import { BaseHttpServices } from './base/http';
|
|
6
|
+
import { BX_REST_SETTINGS } from '../../settings';
|
|
6
7
|
import * as i0 from "@angular/core";
|
|
7
8
|
export declare class HttpServices extends BaseHttpServices {
|
|
8
9
|
session: SessionKeyServices;
|
|
9
|
-
constructor(http: HttpClient, session: SessionKeyServices);
|
|
10
|
+
constructor(BX_REST_SETTINGS: BX_REST_SETTINGS, http: HttpClient, session: SessionKeyServices);
|
|
10
11
|
httpPost<T>(url: string, params?: any, settings?: iHttpParamSettings): Observable<T | undefined>;
|
|
11
12
|
httpGet<T>(url: string, params?: any, settings?: iHttpParamSettings): Observable<T | undefined>;
|
|
12
13
|
static ɵfac: i0.ɵɵFactoryDeclaration<HttpServices, never>;
|
|
@@ -2,16 +2,18 @@ import saveApplicationAuth from '../../typification/auth/save';
|
|
|
2
2
|
import { Observable, Subscription } from 'rxjs';
|
|
3
3
|
import { BaseServices } from '../base';
|
|
4
4
|
import { RestServices } from '../../typification/rest/api-lib';
|
|
5
|
+
import { BX_REST_SETTINGS } from '../../settings';
|
|
5
6
|
import * as i0 from "@angular/core";
|
|
6
7
|
type IKeyAuth = 'sessid' | 'auth' | string;
|
|
7
8
|
export default class SessionKeyServices extends BaseServices {
|
|
9
|
+
BX_REST_SETTINGS: BX_REST_SETTINGS;
|
|
8
10
|
BxApiLib: RestServices;
|
|
9
11
|
authHave: boolean;
|
|
10
12
|
authData: saveApplicationAuth | undefined;
|
|
11
13
|
subscribe: {
|
|
12
14
|
authData: Subscription;
|
|
13
15
|
};
|
|
14
|
-
constructor(BxApiLib: RestServices);
|
|
16
|
+
constructor(BX_REST_SETTINGS: BX_REST_SETTINGS, BxApiLib: RestServices);
|
|
15
17
|
subscribeAll(): void;
|
|
16
18
|
getAuth(): string;
|
|
17
19
|
getKeyAuth(): IKeyAuth;
|
package/settings.d.ts
CHANGED
|
@@ -1,2 +1,11 @@
|
|
|
1
1
|
import { iRestSettings } from './typification/settings';
|
|
2
|
-
|
|
2
|
+
import { InjectionToken } from '@angular/core';
|
|
3
|
+
export declare class BX_REST_SETTINGS extends InjectionToken<iRestSettings> {
|
|
4
|
+
auth: {
|
|
5
|
+
source: string;
|
|
6
|
+
key: string;
|
|
7
|
+
};
|
|
8
|
+
urls: {
|
|
9
|
+
home: string;
|
|
10
|
+
};
|
|
11
|
+
}
|