bx-rest 0.0.5 → 0.0.7
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/README.md +24 -0
- package/bx-rest.service.d.ts +6 -0
- package/consts/time.d.ts +3 -0
- package/esm2020/bx-rest.mjs +5 -0
- package/esm2020/bx-rest.service.mjs +14 -0
- package/esm2020/consts/time.mjs +4 -0
- package/esm2020/public-api.mjs +7 -0
- package/esm2020/rest/bx-rest.module.mjs +28 -0
- package/esm2020/services/base.mjs +174 -0
- package/fesm2015/bx-rest.mjs +225 -0
- package/fesm2015/bx-rest.mjs.map +1 -0
- package/fesm2020/bx-rest.mjs +222 -0
- package/fesm2020/bx-rest.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/package.json +40 -138
- package/public-api.d.ts +3 -0
- package/rest/bx-rest.module.d.ts +8 -0
- package/services/base.d.ts +32 -0
- package/LICENSE +0 -21
- package/src/consts/part-name-metods.ts +0 -11
- package/src/consts/time.ts +0 -3
- package/src/functions/isDate.ts +0 -8
- package/src/functions/isEqual.ts +0 -17
- package/src/functions/isValidDate.ts +0 -9
- package/src/functions/serializeJavascript.ts +0 -229
- package/src/index.d.ts +0 -19
- package/src/index.ts +0 -3
- package/src/rest/user/user.ts +0 -342
- package/src/services/base.ts +0 -187
- package/src/services/http/HttpBX.ts +0 -176
- package/src/services/http/HttpData.ts +0 -142
- package/src/services/http/base/HttpData.ts +0 -141
- package/src/services/http/base/base.ts +0 -40
- package/src/services/http/base/http.ts +0 -67
- package/src/services/http/http.ts +0 -182
- package/src/services/http/sessionKey.ts +0 -205
- package/src/services/map/base.ts +0 -8
- package/src/services/map/rest/user.ts +0 -82
- package/src/services/snack-bar/snack-bar.service.ts +0 -40
- package/src/services/snack-bar/toast-message/toast-message.component.html +0 -13
- package/src/services/snack-bar/toast-message/toast-message.component.scss +0 -53
- package/src/services/snack-bar/toast-message/toast-message.component.ts +0 -26
- package/src/services/vanilla/JSON.ts +0 -15
- package/src/services/vanilla/iframe.ts +0 -57
- package/src/services/vanilla/localStorage.ts +0 -42
- package/src/services/vanilla//321/201ookies.ts +0 -43
- package/src/store/auth.ts +0 -46
- package/src/store/users.ts +0 -88
- package/src/tsconfig.base.json +0 -6
- package/src/tsconfig.cjs.json +0 -10
- package/src/tsconfig.cjs.spec.json +0 -10
- package/src/tsconfig.esm.json +0 -9
- package/src/tsconfig.esm5.json +0 -11
- package/src/tsconfig.esm5.rollup.json +0 -8
- package/src/tsconfig.types.json +0 -14
- package/src/tsconfig.types.spec.json +0 -7
- package/src/typification/auth/OAuthBXParam.ts +0 -6
- package/src/typification/auth/application.ts +0 -8
- package/src/typification/auth/save.ts +0 -14
- package/src/typification/auth/urlData.ts +0 -4
- package/src/typification/rest/api-lib.ts +0 -18
- package/src/typification/rest/base/ApiPaginationBX.ts +0 -3
- package/src/typification/rest/base/OrderOptions.ts +0 -3
- package/src/typification/rest/base/YesNo.ts +0 -1
- package/src/typification/rest/base/fieldBXType.ts +0 -1
- package/src/typification/rest/base/filterGenerator.ts +0 -3
- package/src/typification/rest/base/httpAnswerBX.ts +0 -15
- package/src/typification/rest/batch/batchRequestParam.ts +0 -14
- package/src/typification/rest/lib.ts +0 -19
- package/src/typification/rest/settings.ts +0 -7
- package/src/typification/rest/support/param.ts +0 -8
- package/src/typification/rest/user/CustomUserFieldInfo.ts +0 -70
- package/src/typification/rest/user/UserFilterSearch.ts +0 -43
- package/src/typification/rest/user/get.ts +0 -17
- package/src/typification/rest/user/user.ts +0 -68
- package/src/typification/rest/user/userFilter.ts +0 -17
- package/tsconfig.json +0 -24
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { Injectable } from '@angular/core'
|
|
2
|
-
import serialize from 'bx-rest/src/functions/serializeJavascript'
|
|
3
|
-
|
|
4
|
-
@Injectable({
|
|
5
|
-
providedIn: 'root'
|
|
6
|
-
})
|
|
7
|
-
export default class JSONServices {
|
|
8
|
-
static deserialize(data: any) {
|
|
9
|
-
return eval('(' + data + ')')
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
static serialize(data: any ) {
|
|
13
|
-
return serialize(data)
|
|
14
|
-
}
|
|
15
|
-
}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { Injectable } from '@angular/core'
|
|
2
|
-
import SessionKeyServices from 'bx-rest/src/services/http/sessionKey'
|
|
3
|
-
import { map, mergeMap, of } from 'rxjs'
|
|
4
|
-
import SnackBarService from 'bx-rest/src/services/snack-bar/snack-bar.service'
|
|
5
|
-
|
|
6
|
-
@Injectable({
|
|
7
|
-
providedIn: 'root'
|
|
8
|
-
})
|
|
9
|
-
export default class IFrameVanillaJS {
|
|
10
|
-
parent = window.parent
|
|
11
|
-
|
|
12
|
-
constructor(
|
|
13
|
-
private session: SessionKeyServices,
|
|
14
|
-
private snackBar: SnackBarService
|
|
15
|
-
) {
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
sendMessage(message: any, targetOrigin = '') {
|
|
19
|
-
return this.session.authData$.pipe(
|
|
20
|
-
mergeMap(
|
|
21
|
-
v => {
|
|
22
|
-
if(v){
|
|
23
|
-
if (message && !message.id){
|
|
24
|
-
message.id = v.access_token
|
|
25
|
-
}
|
|
26
|
-
if (this.parent && this.parent['postMessage']) {
|
|
27
|
-
if (targetOrigin.length) {
|
|
28
|
-
this.parent.postMessage(message, targetOrigin)
|
|
29
|
-
return of(true)
|
|
30
|
-
} else {
|
|
31
|
-
return this.session.getBaseUrl().pipe(
|
|
32
|
-
map(v => {
|
|
33
|
-
if (v) {
|
|
34
|
-
this.parent.postMessage(message, v)
|
|
35
|
-
return true
|
|
36
|
-
}
|
|
37
|
-
this.snackBar.error('Не удалось получить адрес родителя для фрейма')
|
|
38
|
-
return false
|
|
39
|
-
})
|
|
40
|
-
)
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
this.snackBar.error('Не удалось получить адрес родителя для фрейма')
|
|
44
|
-
return of(false)
|
|
45
|
-
}
|
|
46
|
-
this.snackBar.error('Не удалось получить авторизационные данные')
|
|
47
|
-
return of(false)
|
|
48
|
-
}
|
|
49
|
-
)
|
|
50
|
-
)
|
|
51
|
-
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
getMassage(func: Function){
|
|
55
|
-
window.addEventListener('message', func())
|
|
56
|
-
}
|
|
57
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { Injectable } from '@angular/core'
|
|
2
|
-
import JSON from 'bx-rest/src/services/vanilla/JSON'
|
|
3
|
-
|
|
4
|
-
@Injectable({
|
|
5
|
-
providedIn: 'root'
|
|
6
|
-
})
|
|
7
|
-
export class LocalStorageServices {
|
|
8
|
-
|
|
9
|
-
static get(name: string): any {
|
|
10
|
-
return localStorage.getItem(name)
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
static getObj<T>(name: string): T | null {
|
|
14
|
-
return JSON.deserialize(localStorage.getItem(name))
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
static set(name: string, value: string): void {
|
|
18
|
-
localStorage.setItem(name, value)
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
static setObj(name: string, value: any): void {
|
|
22
|
-
let get = this.get(name)
|
|
23
|
-
if(get && typeof get === 'object'){
|
|
24
|
-
localStorage.setItem(
|
|
25
|
-
name,
|
|
26
|
-
JSON.serialize(
|
|
27
|
-
Object.assign(
|
|
28
|
-
get,
|
|
29
|
-
value
|
|
30
|
-
)
|
|
31
|
-
)
|
|
32
|
-
)
|
|
33
|
-
} else {
|
|
34
|
-
localStorage.setItem(name, JSON.serialize(value))
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
static del(name: string): void {
|
|
39
|
-
localStorage.removeItem(name)
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { Injectable } from '@angular/core'
|
|
2
|
-
import JSON from 'bx-rest/src/services/vanilla/JSON'
|
|
3
|
-
|
|
4
|
-
@Injectable({
|
|
5
|
-
providedIn: 'root'
|
|
6
|
-
})
|
|
7
|
-
export default class CookiesServices {
|
|
8
|
-
|
|
9
|
-
static get(name: string): string {
|
|
10
|
-
const results = document.cookie.match('(^|;) ?' + name + '=([^;]*)(;|$)');
|
|
11
|
-
if (results)
|
|
12
|
-
return results[2]
|
|
13
|
-
else
|
|
14
|
-
return ''
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
static set(name: string, value: string, age: number = 0) {
|
|
18
|
-
let string = name + '=' + value + ';'
|
|
19
|
-
if(age) {
|
|
20
|
-
string += ' max-age=' + age
|
|
21
|
-
}
|
|
22
|
-
string += '; SameSite=None; Secure'
|
|
23
|
-
document.cookie = string
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
static setObj(name: string, value: any, age: number = 0) {
|
|
27
|
-
let string = name + '=' + JSON.serialize(value) + ';'
|
|
28
|
-
if(age) {
|
|
29
|
-
string += ' max-age=' + age
|
|
30
|
-
}
|
|
31
|
-
string += '; SameSite=None; Secure'
|
|
32
|
-
document.cookie = string
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
static getObj<T>(name: string): T | false {
|
|
36
|
-
const results = document.cookie.match('(^|;) ?' + name + '=([^;]*)(;|$)');
|
|
37
|
-
if (results) {
|
|
38
|
-
return JSON.deserialize(results[2])
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
return false
|
|
42
|
-
}
|
|
43
|
-
}
|
package/src/store/auth.ts
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { Action, createReducer, on, props } from '@ngrx/store'
|
|
2
|
-
import { createAction } from '@ngrx/store'
|
|
3
|
-
import saveApplicationAuth from 'bx-rest/src/typification/auth/save'
|
|
4
|
-
import clone from 'just-clone'
|
|
5
|
-
export interface saveApplicationAuthPath {
|
|
6
|
-
access_token?: string, // основной авторизационный токен, требуемый для доступа к REST API
|
|
7
|
-
client_endpoint?: string, // адрес REST-интерфейса портала
|
|
8
|
-
domain?: string,
|
|
9
|
-
expires?: number,
|
|
10
|
-
expires_in?: number,
|
|
11
|
-
member_id?: string,
|
|
12
|
-
refresh_token?: string, // дополнительный авторизационный токен, служащий для продления сохраненной авторизации
|
|
13
|
-
scope?: string,
|
|
14
|
-
server_endpoint?: string, // адрес REST-интерфейса сервера
|
|
15
|
-
status?: string, // статус приложения на портале
|
|
16
|
-
user_id?: number
|
|
17
|
-
type?: string
|
|
18
|
-
}
|
|
19
|
-
export const save = createAction('[Auth Component] Save', props<saveApplicationAuth | saveApplicationAuthPath>())
|
|
20
|
-
export const saveAccessToken = createAction('[Auth Component] SaveAccessToken', props<saveApplicationAuthPath>())
|
|
21
|
-
|
|
22
|
-
export const initialState: saveApplicationAuth = {
|
|
23
|
-
access_token: '',
|
|
24
|
-
client_endpoint: '',
|
|
25
|
-
domain: '',
|
|
26
|
-
expires: 0,
|
|
27
|
-
expires_in: 0,
|
|
28
|
-
member_id: '',
|
|
29
|
-
refresh_token: '',
|
|
30
|
-
scope: '',
|
|
31
|
-
server_endpoint: '',
|
|
32
|
-
status: '',
|
|
33
|
-
user_id: 0
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
const _authReducer = createReducer(
|
|
37
|
-
initialState,
|
|
38
|
-
on(saveAccessToken, (s, data) => {
|
|
39
|
-
let copy = clone(s)
|
|
40
|
-
return Object.assign(copy, data)
|
|
41
|
-
}),
|
|
42
|
-
);
|
|
43
|
-
|
|
44
|
-
export function authReducer(state = initialState, action: Action) {
|
|
45
|
-
return _authReducer(state, action);
|
|
46
|
-
}
|
package/src/store/users.ts
DELETED
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
import { Action, createReducer, on, props } from '@ngrx/store'
|
|
2
|
-
import { createAction } from '@ngrx/store'
|
|
3
|
-
import clone from 'just-clone'
|
|
4
|
-
import { iBXRestUser } from 'bx-rest/src/typification/rest/user/user'
|
|
5
|
-
|
|
6
|
-
export interface storeUsers {
|
|
7
|
-
load: {
|
|
8
|
-
all: boolean,
|
|
9
|
-
department: number[]
|
|
10
|
-
}
|
|
11
|
-
self: iBXRestUser | undefined
|
|
12
|
-
data: iBXRestUser []
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export const save = createAction('[Users Component] Save', props<iBXRestUser >())
|
|
16
|
-
export const saveArr = createAction('[Users Component] Save Arr', props<{ arr: iBXRestUser [] }>())
|
|
17
|
-
export const update = createAction('[Users Component] Update', props<iBXRestUser >())
|
|
18
|
-
export const loadAll = createAction('[Users Component] loadAll', props<{ load: true }>())
|
|
19
|
-
export const saveSelf = createAction('[Users Component] saveSelf', props<{ self: iBXRestUser }>())
|
|
20
|
-
export const saveIDLoadedDepartment = createAction('[Users Component] saveIDLoadedDepartment', props<{id: number[]}>())
|
|
21
|
-
|
|
22
|
-
export const initialState: storeUsers = {
|
|
23
|
-
load: {
|
|
24
|
-
all: false,
|
|
25
|
-
department: []
|
|
26
|
-
},
|
|
27
|
-
self: undefined,
|
|
28
|
-
data: []
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
const _usersReducer = createReducer(
|
|
32
|
-
initialState,
|
|
33
|
-
on(saveIDLoadedDepartment, (s, data) => {
|
|
34
|
-
let copy = clone(s)
|
|
35
|
-
copy.load.department = [...copy.load.department, ...data.id]
|
|
36
|
-
return copy
|
|
37
|
-
}),
|
|
38
|
-
on(save, (s, data) => {
|
|
39
|
-
const find = s.data.find(v => v.ID === data.ID)
|
|
40
|
-
if (!find) {
|
|
41
|
-
const copy = clone(s)
|
|
42
|
-
copy.data.push(data)
|
|
43
|
-
return copy
|
|
44
|
-
}
|
|
45
|
-
return s
|
|
46
|
-
}),
|
|
47
|
-
on(saveArr, (s, data) => {
|
|
48
|
-
const copy = clone(s)
|
|
49
|
-
if(copy.data && copy.data.length) {
|
|
50
|
-
for (const user of data.arr) {
|
|
51
|
-
const find = copy.data.find(v => v.ID === user.ID)
|
|
52
|
-
if (!find) {
|
|
53
|
-
copy.data.push(user)
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
} else {
|
|
57
|
-
copy.data = [...data.arr]
|
|
58
|
-
}
|
|
59
|
-
return copy
|
|
60
|
-
}),
|
|
61
|
-
on(update, (s, data) => {
|
|
62
|
-
const copy = clone(s)
|
|
63
|
-
let find = copy.data.findIndex(v => v.ID === data.ID)
|
|
64
|
-
if (find !== -1) {
|
|
65
|
-
const copy = clone(s)
|
|
66
|
-
copy.data.splice(find, 1, data);
|
|
67
|
-
// copy.data.push(data)
|
|
68
|
-
return copy
|
|
69
|
-
}
|
|
70
|
-
return s
|
|
71
|
-
}),
|
|
72
|
-
on(loadAll, (s, data) => {
|
|
73
|
-
if (data.load !== s.load.all) {
|
|
74
|
-
const copy = clone(s)
|
|
75
|
-
copy.load.all = data.load
|
|
76
|
-
return copy
|
|
77
|
-
}
|
|
78
|
-
return s
|
|
79
|
-
}),
|
|
80
|
-
on(saveSelf, (s, data) => {
|
|
81
|
-
return { ...s, self: data.self}
|
|
82
|
-
})
|
|
83
|
-
)
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
export function usersReducer(state = initialState, action: Action) {
|
|
87
|
-
return _usersReducer(state, action)
|
|
88
|
-
}
|
package/src/tsconfig.base.json
DELETED
package/src/tsconfig.cjs.json
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "./tsconfig.cjs.json",
|
|
3
|
-
/**
|
|
4
|
-
* this is pseudo config for test case's relative path resolution to `../src`, runs
|
|
5
|
-
* cjs config once more instead of manual copying to utilize incremental build.
|
|
6
|
-
*/
|
|
7
|
-
"compilerOptions": {
|
|
8
|
-
"outDir": "../dist/src"
|
|
9
|
-
}
|
|
10
|
-
}
|
package/src/tsconfig.esm.json
DELETED
package/src/tsconfig.esm5.json
DELETED
package/src/tsconfig.types.json
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "./tsconfig.esm.json",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"composite": true,
|
|
5
|
-
"module": "es2015",
|
|
6
|
-
"target": "esnext",
|
|
7
|
-
"removeComments": false,
|
|
8
|
-
"declaration": true,
|
|
9
|
-
"declarationMap": true,
|
|
10
|
-
"declarationDir": "../dist/types",
|
|
11
|
-
// "emitDeclarationOnly": true
|
|
12
|
-
},
|
|
13
|
-
"exclude": ["./internal/umd.ts"]
|
|
14
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export default interface saveApplicationAuth {
|
|
2
|
-
access_token: string, // основной авторизационный токен, требуемый для доступа к REST API
|
|
3
|
-
client_endpoint: string, // адрес REST-интерфейса портала
|
|
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, // адрес REST-интерфейса сервера
|
|
11
|
-
status: string, // статус приложения на портале
|
|
12
|
-
user_id: number,
|
|
13
|
-
state?: any
|
|
14
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Injectable } from '@angular/core'
|
|
2
|
-
import { iRestLib } from 'bx-rest/src/typification/rest/lib'
|
|
3
|
-
|
|
4
|
-
@Injectable({
|
|
5
|
-
providedIn: 'root'
|
|
6
|
-
})
|
|
7
|
-
export class RestServices {
|
|
8
|
-
BX24: iRestLib | false = false
|
|
9
|
-
|
|
10
|
-
constructor() {
|
|
11
|
-
// @ts-ignore
|
|
12
|
-
this.BX24 = (window.BX24) ? window.BX24 : false
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
init(callBack: Function) {
|
|
16
|
-
return (this.BX24) ? this.BX24.init(callBack) : false
|
|
17
|
-
}
|
|
18
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type iBXRestYesNo = 'Y' | 'N' // wtf BX?
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type iFieldBXType = 'text' | 'link' | 'datetime' | 'list' | 'phone' | 'timezone' | 'userField' | 'multilist'
|
|
@@ -1,15 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import iHttpAnswerBX from 'bx-rest/src/typification/rest/base/httpAnswerBX'
|
|
2
|
-
|
|
3
|
-
export type keyBatch = string | number
|
|
4
|
-
|
|
5
|
-
export interface iBatchRequestParam <T>{
|
|
6
|
-
name: string,
|
|
7
|
-
param: T
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export type iBatchRequestParamHttp = {[key:keyBatch]: string}
|
|
11
|
-
|
|
12
|
-
export type iBatchRequestParamArr<T> = {[key:keyBatch]: iBatchRequestParam <T>}
|
|
13
|
-
|
|
14
|
-
export interface iBatchRequestAnswer<T> extends iHttpAnswerBX<iHttpAnswerBX<{[key:keyBatch]: T}>>{}
|
|
@@ -1,19 +0,0 @@
|
|
|
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
|
-
|
|
13
|
-
export interface iRestLibGetAuth {
|
|
14
|
-
access_token: string,
|
|
15
|
-
domain: string,
|
|
16
|
-
expires_in: number
|
|
17
|
-
member_id: string
|
|
18
|
-
refresh_token: string
|
|
19
|
-
}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { iBXRestUserKey } from 'bx-rest/src/typification/rest/user/user'
|
|
2
|
-
import { iBXRestYesNo } from 'bx-rest/src/typification/rest/base/YesNo'
|
|
3
|
-
|
|
4
|
-
export interface iCustomUserFieldInfo {
|
|
5
|
-
ID: string,
|
|
6
|
-
ENTITY_ID: "USER",
|
|
7
|
-
FIELD_NAME: iBXRestUserKey,
|
|
8
|
-
USER_TYPE_ID: iCustomUserFieldInfoType,
|
|
9
|
-
XML_ID: string | null,
|
|
10
|
-
SORT: string,
|
|
11
|
-
MULTIPLE: iBXRestYesNo,
|
|
12
|
-
MANDATORY: iBXRestYesNo,
|
|
13
|
-
SHOW_FILTER: 'E' | 'N', // ??? это что вообще?
|
|
14
|
-
SHOW_IN_LIST: iBXRestYesNo,
|
|
15
|
-
EDIT_IN_LIST: iBXRestYesNo,
|
|
16
|
-
IS_SEARCHABLE: iBXRestYesNo,
|
|
17
|
-
SETTINGS:
|
|
18
|
-
iCustomUserFieldInfoSETTINGSTypeString
|
|
19
|
-
| iCustomUserFieldInfoSETTINGSTypeFile
|
|
20
|
-
| iCustomUserFieldInfoSETTINGSTypeEnumeration
|
|
21
|
-
| iCustomUserFieldInfoSETTINGSTypeDatetime
|
|
22
|
-
LIST?: iCustomUserFieldInfoSETTINGSTypeEnumerationLIST[],
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export interface iCustomUserFieldInfoSETTINGSTypeString {
|
|
26
|
-
SIZE: number,
|
|
27
|
-
ROWS: number,
|
|
28
|
-
REGEXP: string | null,
|
|
29
|
-
MIN_LENGTH: number,
|
|
30
|
-
MAX_LENGTH: number,
|
|
31
|
-
DEFAULT_VALUE: string | null
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export interface iCustomUserFieldInfoSETTINGSTypeFile {
|
|
35
|
-
SIZE: number,
|
|
36
|
-
LIST_WIDTH: number,
|
|
37
|
-
LIST_HEIGHT: number,
|
|
38
|
-
MAX_SHOW_SIZE: number,
|
|
39
|
-
MAX_ALLOWED_SIZE: number,
|
|
40
|
-
EXTENSIONS: any[], // TODO: Позже описать
|
|
41
|
-
TARGET_BLANK: iBXRestYesNo
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export interface iCustomUserFieldInfoSETTINGSTypeEnumeration {
|
|
45
|
-
DISPLAY: 'UI' | 'DIALOG',
|
|
46
|
-
LIST_HEIGHT: number,
|
|
47
|
-
CAPTION_NO_VALUE: string,
|
|
48
|
-
SHOW_NO_VALUE: iBXRestYesNo
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
export interface iCustomUserFieldInfoSETTINGSTypeEnumerationLIST{
|
|
52
|
-
ID: string,
|
|
53
|
-
SORT: string,
|
|
54
|
-
VALUE: string,
|
|
55
|
-
DEF: iBXRestYesNo
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
export interface iCustomUserFieldInfoSETTINGSTypeDatetime {
|
|
59
|
-
DEFAULT_VALUE: {
|
|
60
|
-
TYPE: 'NONE',
|
|
61
|
-
VALUE: string
|
|
62
|
-
},
|
|
63
|
-
"USE_SECOND": iBXRestYesNo,
|
|
64
|
-
"USE_TIMEZONE": iBXRestYesNo
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
export type iCustomUserFieldInfoType = 'string' | 'file' | 'enumeration' | 'datetime'
|
|
69
|
-
|
|
70
|
-
|
|
@@ -1,43 +0,0 @@
|
|
|
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', // wtf BX?
|
|
14
|
-
PERSONAL_GENDER?: 'M' | 'F', // wtf BX? Where is others 48 gender?
|
|
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
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { iBXRestYesNo } from '../base/YesNo'
|
|
2
|
-
import { iBXRestBaseParam } from '../support/param'
|
|
3
|
-
|
|
4
|
-
export interface iBXGetParam extends iBXRestBaseParam {
|
|
5
|
-
ID?: number[] | number, // по ID
|
|
6
|
-
PERSONAL_BIRTHDAY?: string | string[]
|
|
7
|
-
order?: 'ASC' | 'DESC', // сортировка
|
|
8
|
-
UF_DEPARTMENT?: number[], // принадлежность к структуре компании
|
|
9
|
-
UF_PHONE_INNER?: string, // внутренний телефонный номер
|
|
10
|
-
IS_ONLINE?: iBXRestYesNo, // позволяет показать только авторизованных или нет пользователей
|
|
11
|
-
NAME_SEARCH?: string, // быстрый поиск по персональным данным
|
|
12
|
-
USER_TYPE?: 'employee' | 'extranet' | 'email', // Тип пользователя. Может принимать следующие значения:
|
|
13
|
-
// employee - сотрудник,
|
|
14
|
-
// extranet - пользователь экстранета,
|
|
15
|
-
// email - почтовый пользователь
|
|
16
|
-
ACTIVE?: 2 | 1 | 0 // при значении 1 исключает из запроса уволенных пользователей. 2 - если нужны и те и те
|
|
17
|
-
}
|