@ngdux/data-model-common 1.4.0 → 3.0.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/{esm2020 → esm2022}/index.mjs +8 -8
- package/{esm2020 → esm2022}/lib/models/error.dto.mjs +1 -1
- package/{esm2020 → esm2022}/lib/models/filtering-options.model.mjs +19 -19
- package/{esm2020 → esm2022}/lib/models/form-service.model.mjs +1 -1
- package/{esm2020 → esm2022}/lib/models/list-service.model.mjs +2 -2
- package/{esm2020 → esm2022}/lib/models/paging-options.model.mjs +3 -3
- package/{esm2020 → esm2022}/lib/models/request-options.model.mjs +16 -16
- package/{esm2020 → esm2022}/lib/models/request-state.model.mjs +7 -7
- package/{esm2020 → esm2022}/lib/models/sorting-options.model.mjs +8 -8
- package/{esm2020 → esm2022}/ngdux-data-model-common.mjs +4 -4
- package/{esm2020 → esm2022}/test/index.mjs +3 -3
- package/esm2022/test/lib/common.fixture.mjs +204 -0
- package/{esm2020 → esm2022}/test/lib/error.fixture.mjs +9 -9
- package/{esm2020 → esm2022}/test/ngdux-data-model-common-test.mjs +4 -4
- package/{fesm2015 → fesm2022}/ngdux-data-model-common-test.mjs +212 -208
- package/fesm2022/ngdux-data-model-common-test.mjs.map +1 -0
- package/{fesm2020 → fesm2022}/ngdux-data-model-common.mjs +46 -46
- package/fesm2022/ngdux-data-model-common.mjs.map +1 -0
- package/index.d.ts +8 -8
- package/lib/models/error.dto.d.ts +11 -11
- package/lib/models/filtering-options.model.d.ts +34 -34
- package/lib/models/form-service.model.d.ts +20 -20
- package/lib/models/list-service.model.d.ts +16 -24
- package/lib/models/paging-options.model.d.ts +11 -11
- package/lib/models/request-options.model.d.ts +16 -16
- package/lib/models/request-state.model.d.ts +6 -6
- package/lib/models/sorting-options.model.d.ts +14 -19
- package/package.json +10 -66
- package/test/index.d.ts +3 -3
- package/test/lib/common.fixture.d.ts +67 -66
- package/test/lib/error.fixture.d.ts +2 -2
- package/esm2020/test/lib/common.fixture.mjs +0 -201
- package/fesm2015/ngdux-data-model-common-test.mjs.map +0 -1
- package/fesm2015/ngdux-data-model-common.mjs +0 -60
- package/fesm2015/ngdux-data-model-common.mjs.map +0 -1
- package/fesm2020/ngdux-data-model-common-test.mjs +0 -280
- package/fesm2020/ngdux-data-model-common-test.mjs.map +0 -1
- package/fesm2020/ngdux-data-model-common.mjs.map +0 -1
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
export declare enum FilteringLogic {
|
|
2
|
-
AND = "and",
|
|
3
|
-
OR = "or"
|
|
4
|
-
}
|
|
5
|
-
export declare const DEFAULT_FILTERING_LOGIC = FilteringLogic.AND;
|
|
6
|
-
export declare enum FilteringOperator {
|
|
7
|
-
Equal = "eq",
|
|
8
|
-
NotEqual = "neq",
|
|
9
|
-
LessThan = "lt",
|
|
10
|
-
LessThanOrEqual = "lte",
|
|
11
|
-
GreaterThan = "gt",
|
|
12
|
-
GreaterThanOrEqual = "gte",
|
|
13
|
-
StartsWith = "startswith",
|
|
14
|
-
EndsWith = "endswith",
|
|
15
|
-
Contains = "contains"
|
|
16
|
-
}
|
|
17
|
-
export declare const DEFAULT_FILTERING_OPERATOR = FilteringOperator.Equal;
|
|
18
|
-
/**
|
|
19
|
-
* Defines the filter criterion for a single resource field.
|
|
20
|
-
* Field, filter value and operator are required.
|
|
21
|
-
*/
|
|
22
|
-
export interface FilteringField {
|
|
23
|
-
field: string;
|
|
24
|
-
value: string;
|
|
25
|
-
operator: FilteringOperator;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* The options required to filter resources by one or multiple fields.
|
|
29
|
-
* Defines which fields to filter the resources by.
|
|
30
|
-
*/
|
|
31
|
-
export interface FilteringOptions {
|
|
32
|
-
filters: Array<FilteringField | FilteringOptions>;
|
|
33
|
-
logic: FilteringLogic;
|
|
34
|
-
}
|
|
1
|
+
export declare enum FilteringLogic {
|
|
2
|
+
AND = "and",
|
|
3
|
+
OR = "or"
|
|
4
|
+
}
|
|
5
|
+
export declare const DEFAULT_FILTERING_LOGIC = FilteringLogic.AND;
|
|
6
|
+
export declare enum FilteringOperator {
|
|
7
|
+
Equal = "eq",
|
|
8
|
+
NotEqual = "neq",
|
|
9
|
+
LessThan = "lt",
|
|
10
|
+
LessThanOrEqual = "lte",
|
|
11
|
+
GreaterThan = "gt",
|
|
12
|
+
GreaterThanOrEqual = "gte",
|
|
13
|
+
StartsWith = "startswith",
|
|
14
|
+
EndsWith = "endswith",
|
|
15
|
+
Contains = "contains"
|
|
16
|
+
}
|
|
17
|
+
export declare const DEFAULT_FILTERING_OPERATOR = FilteringOperator.Equal;
|
|
18
|
+
/**
|
|
19
|
+
* Defines the filter criterion for a single resource field.
|
|
20
|
+
* Field, filter value and operator are required.
|
|
21
|
+
*/
|
|
22
|
+
export interface FilteringField {
|
|
23
|
+
field: string;
|
|
24
|
+
value: string;
|
|
25
|
+
operator: FilteringOperator;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* The options required to filter resources by one or multiple fields.
|
|
29
|
+
* Defines which fields to filter the resources by.
|
|
30
|
+
*/
|
|
31
|
+
export interface FilteringOptions {
|
|
32
|
+
filters: Array<FilteringField | FilteringOptions>;
|
|
33
|
+
logic: FilteringLogic;
|
|
34
|
+
}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { ValidationErrors } from '@angular/forms';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
export interface FieldError {
|
|
4
|
-
errors: ValidationErrors;
|
|
5
|
-
fieldName: string;
|
|
6
|
-
fieldIndex?: number;
|
|
7
|
-
}
|
|
8
|
-
export interface FieldErrors {
|
|
9
|
-
[key: string]: FieldError[] | FieldErrors;
|
|
10
|
-
}
|
|
11
|
-
export interface FormService<DTO, CREATE_DTO = DTO> {
|
|
12
|
-
loadResource(id: string): Observable<DTO>;
|
|
13
|
-
saveResource?(resource: DTO): Observable<DTO>;
|
|
14
|
-
deleteResource?(id: string): Observable<DTO>;
|
|
15
|
-
createResource?(resource: CREATE_DTO): Observable<DTO>;
|
|
16
|
-
}
|
|
17
|
-
export interface FormNotificationService<ERROR> {
|
|
18
|
-
onFormErrors: (errors: ERROR) => void;
|
|
19
|
-
onFormDelete: (id: string) => void;
|
|
20
|
-
}
|
|
1
|
+
import { ValidationErrors } from '@angular/forms';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
export interface FieldError {
|
|
4
|
+
errors: ValidationErrors;
|
|
5
|
+
fieldName: string;
|
|
6
|
+
fieldIndex?: number;
|
|
7
|
+
}
|
|
8
|
+
export interface FieldErrors {
|
|
9
|
+
[key: string]: FieldError[] | FieldErrors;
|
|
10
|
+
}
|
|
11
|
+
export interface FormService<DTO, CREATE_DTO = DTO> {
|
|
12
|
+
loadResource(id: string): Observable<DTO>;
|
|
13
|
+
saveResource?(resource: DTO): Observable<DTO>;
|
|
14
|
+
deleteResource?(id: string): Observable<DTO>;
|
|
15
|
+
createResource?(resource: CREATE_DTO): Observable<DTO>;
|
|
16
|
+
}
|
|
17
|
+
export interface FormNotificationService<ERROR> {
|
|
18
|
+
onFormErrors: (errors: ERROR) => void;
|
|
19
|
+
onFormDelete: (id: string) => void;
|
|
20
|
+
}
|
|
@@ -1,24 +1,16 @@
|
|
|
1
|
-
import { Observable } from 'rxjs';
|
|
2
|
-
import { ErrorDto } from './error.dto';
|
|
3
|
-
import { RequestOptions } from './request-options.model';
|
|
4
|
-
export interface BulkOperationSuccess {
|
|
5
|
-
index: number;
|
|
6
|
-
response: unknown;
|
|
7
|
-
}
|
|
8
|
-
export interface ListService<T, S = T, Params = Record<string, string>> {
|
|
9
|
-
loadResources(options: RequestOptions<Params>): Observable<S[]>;
|
|
10
|
-
deleteResources?(resourceIds: string[]): Observable<Array<T | ErrorDto>>;
|
|
11
|
-
patchResources?(resourceIds: string[], resource: Partial<T>): Observable<Array<T | ErrorDto>>;
|
|
12
|
-
}
|
|
13
|
-
export interface ListNotificationService<E> {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
*/
|
|
18
|
-
openConfirmationDialog?: (data: {
|
|
19
|
-
message: string;
|
|
20
|
-
title: string;
|
|
21
|
-
}) => Observable<boolean>;
|
|
22
|
-
onListErrors: (errors: E) => void;
|
|
23
|
-
onListDelete: (ids: string[]) => void;
|
|
24
|
-
}
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import { ErrorDto } from './error.dto';
|
|
3
|
+
import { RequestOptions } from './request-options.model';
|
|
4
|
+
export interface BulkOperationSuccess {
|
|
5
|
+
index: number;
|
|
6
|
+
response: unknown;
|
|
7
|
+
}
|
|
8
|
+
export interface ListService<T, S = T, Params = Record<string, string>> {
|
|
9
|
+
loadResources(options: RequestOptions<Params>): Observable<S[]>;
|
|
10
|
+
deleteResources?(resourceIds: string[]): Observable<Array<T | ErrorDto>>;
|
|
11
|
+
patchResources?(resourceIds: string[], resource: Partial<T>): Observable<Array<T | ErrorDto>>;
|
|
12
|
+
}
|
|
13
|
+
export interface ListNotificationService<E> {
|
|
14
|
+
onListErrors: (errors: E) => void;
|
|
15
|
+
onListDelete: (ids: string[]) => void;
|
|
16
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export declare const DEFAULT_PAGE = 1;
|
|
2
|
-
export declare const DEFAULT_PAGE_SIZE = 10;
|
|
3
|
-
export declare const DEFAULT_STORED_PAGES = 3;
|
|
4
|
-
/**
|
|
5
|
-
* The options required to make a resource request for paged resources.
|
|
6
|
-
* This defines which page and how many resources per page to return.
|
|
7
|
-
*/
|
|
8
|
-
export interface PagingOptions {
|
|
9
|
-
page: number;
|
|
10
|
-
pageSize: number;
|
|
11
|
-
}
|
|
1
|
+
export declare const DEFAULT_PAGE = 1;
|
|
2
|
+
export declare const DEFAULT_PAGE_SIZE = 10;
|
|
3
|
+
export declare const DEFAULT_STORED_PAGES = 3;
|
|
4
|
+
/**
|
|
5
|
+
* The options required to make a resource request for paged resources.
|
|
6
|
+
* This defines which page and how many resources per page to return.
|
|
7
|
+
*/
|
|
8
|
+
export interface PagingOptions {
|
|
9
|
+
page: number;
|
|
10
|
+
pageSize: number;
|
|
11
|
+
}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { FilteringOptions } from './filtering-options.model';
|
|
2
|
-
import { PagingOptions } from './paging-options.model';
|
|
3
|
-
import { SortingField
|
|
4
|
-
export interface RequestOptions<Params = Record<string, string>> {
|
|
5
|
-
requestParameters?: Params;
|
|
6
|
-
pagingOptions: PagingOptions;
|
|
7
|
-
sortingOptions:
|
|
8
|
-
filteringOptions: FilteringOptions;
|
|
9
|
-
}
|
|
10
|
-
export interface QueryOptionsDto {
|
|
11
|
-
filter?: FilteringOptions;
|
|
12
|
-
sort?: SortingField[];
|
|
13
|
-
page?: number;
|
|
14
|
-
pageSize?: number;
|
|
15
|
-
}
|
|
16
|
-
export declare function getDefaultRequestOptions<Params = Record<string, string>>(): RequestOptions<Params>;
|
|
1
|
+
import { FilteringOptions } from './filtering-options.model';
|
|
2
|
+
import { PagingOptions } from './paging-options.model';
|
|
3
|
+
import { SortingField } from './sorting-options.model';
|
|
4
|
+
export interface RequestOptions<Params = Record<string, string>> {
|
|
5
|
+
requestParameters?: Params;
|
|
6
|
+
pagingOptions: PagingOptions;
|
|
7
|
+
sortingOptions: SortingField[];
|
|
8
|
+
filteringOptions: FilteringOptions;
|
|
9
|
+
}
|
|
10
|
+
export interface QueryOptionsDto {
|
|
11
|
+
filter?: FilteringOptions;
|
|
12
|
+
sort?: SortingField[];
|
|
13
|
+
page?: number;
|
|
14
|
+
pageSize?: number;
|
|
15
|
+
}
|
|
16
|
+
export declare function getDefaultRequestOptions<Params = Record<string, string>>(): RequestOptions<Params>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export declare enum RequestState {
|
|
2
|
-
IDLE = "IDLE",
|
|
3
|
-
IN_PROGRESS = "IN_PROGRESS",
|
|
4
|
-
FAILURE = "FAILURE",
|
|
5
|
-
SUCCESS = "SUCCESS"
|
|
6
|
-
}
|
|
1
|
+
export declare enum RequestState {
|
|
2
|
+
IDLE = "IDLE",
|
|
3
|
+
IN_PROGRESS = "IN_PROGRESS",
|
|
4
|
+
FAILURE = "FAILURE",
|
|
5
|
+
SUCCESS = "SUCCESS"
|
|
6
|
+
}
|
|
@@ -1,19 +1,14 @@
|
|
|
1
|
-
export declare enum SortingDirection {
|
|
2
|
-
ASCENDING = "asc",
|
|
3
|
-
DESCENDING = "desc",
|
|
4
|
-
NONE = ""
|
|
5
|
-
}
|
|
6
|
-
export declare const DEFAULT_SORTING_ORDER = SortingDirection.ASCENDING;
|
|
7
|
-
/**
|
|
8
|
-
* Defines the sorting criterion for a single resource field.
|
|
9
|
-
* Name and sorting order are required.
|
|
10
|
-
*/
|
|
11
|
-
export interface SortingField {
|
|
12
|
-
field: string;
|
|
13
|
-
direction: SortingDirection;
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* The options required to sort resources by one or multiple fields.
|
|
17
|
-
* Defines which fields to sort the resources by.
|
|
18
|
-
*/
|
|
19
|
-
export type SortingOptions = Record<string, SortingField>;
|
|
1
|
+
export declare enum SortingDirection {
|
|
2
|
+
ASCENDING = "asc",
|
|
3
|
+
DESCENDING = "desc",
|
|
4
|
+
NONE = ""
|
|
5
|
+
}
|
|
6
|
+
export declare const DEFAULT_SORTING_ORDER = SortingDirection.ASCENDING;
|
|
7
|
+
/**
|
|
8
|
+
* Defines the sorting criterion for a single resource field.
|
|
9
|
+
* Name and sorting order are required.
|
|
10
|
+
*/
|
|
11
|
+
export interface SortingField {
|
|
12
|
+
field: string;
|
|
13
|
+
direction: SortingDirection;
|
|
14
|
+
}
|
package/package.json
CHANGED
|
@@ -1,63 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ngdux/data-model-common",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"peerDependencies": {
|
|
5
|
-
"@angular/forms": "
|
|
6
|
-
"rxjs": "
|
|
5
|
+
"@angular/forms": "",
|
|
6
|
+
"rxjs": ""
|
|
7
7
|
},
|
|
8
|
-
"
|
|
9
|
-
"name": "@ngdux/data-model-common",
|
|
10
|
-
"version": "1.3.2",
|
|
11
|
-
"peerDependencies": {
|
|
12
|
-
"@angular/forms": "^15.0.0",
|
|
13
|
-
"rxjs": "^7.0.0"
|
|
14
|
-
},
|
|
15
|
-
"default": {
|
|
16
|
-
"name": "@ngdux/data-model-common",
|
|
17
|
-
"version": "1.3.1",
|
|
18
|
-
"peerDependencies": {
|
|
19
|
-
"@angular/forms": "^15.0.0",
|
|
20
|
-
"rxjs": "^7.0.0"
|
|
21
|
-
},
|
|
22
|
-
"default": {
|
|
23
|
-
"name": "@ngdux/data-model-common",
|
|
24
|
-
"version": "1.3.0",
|
|
25
|
-
"peerDependencies": {
|
|
26
|
-
"@angular/forms": "^15.0.0",
|
|
27
|
-
"rxjs": "^7.0.0"
|
|
28
|
-
},
|
|
29
|
-
"default": {
|
|
30
|
-
"name": "@ngdux/data-model-common",
|
|
31
|
-
"version": "1.2.1",
|
|
32
|
-
"peerDependencies": {
|
|
33
|
-
"@angular/forms": "^15.0.0",
|
|
34
|
-
"rxjs": "^7.0.0"
|
|
35
|
-
},
|
|
36
|
-
"default": {
|
|
37
|
-
"name": "@ngdux/data-model-common",
|
|
38
|
-
"version": "1.2.0",
|
|
39
|
-
"default": {
|
|
40
|
-
"name": "@ngdux/data-model-common",
|
|
41
|
-
"version": "1.1.1",
|
|
42
|
-
"default": {
|
|
43
|
-
"name": "@ngdux/data-model-common",
|
|
44
|
-
"version": "1.1.0"
|
|
45
|
-
}
|
|
46
|
-
},
|
|
47
|
-
"peerDependencies": {
|
|
48
|
-
"@angular/forms": "^15.0.0",
|
|
49
|
-
"rxjs": "^7.0.0"
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
},
|
|
56
|
-
"module": "fesm2015/ngdux-data-model-common.mjs",
|
|
57
|
-
"es2020": "fesm2020/ngdux-data-model-common.mjs",
|
|
58
|
-
"esm2020": "esm2020/ngdux-data-model-common.mjs",
|
|
59
|
-
"fesm2020": "fesm2020/ngdux-data-model-common.mjs",
|
|
60
|
-
"fesm2015": "fesm2015/ngdux-data-model-common.mjs",
|
|
8
|
+
"module": "fesm2022/ngdux-data-model-common.mjs",
|
|
61
9
|
"typings": "index.d.ts",
|
|
62
10
|
"exports": {
|
|
63
11
|
"./package.json": {
|
|
@@ -65,19 +13,15 @@
|
|
|
65
13
|
},
|
|
66
14
|
".": {
|
|
67
15
|
"types": "./index.d.ts",
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
"node": "./fesm2015/ngdux-data-model-common.mjs",
|
|
72
|
-
"default": "./fesm2020/ngdux-data-model-common.mjs"
|
|
16
|
+
"esm2022": "./esm2022/ngdux-data-model-common.mjs",
|
|
17
|
+
"esm": "./esm2022/ngdux-data-model-common.mjs",
|
|
18
|
+
"default": "./fesm2022/ngdux-data-model-common.mjs"
|
|
73
19
|
},
|
|
74
20
|
"./test": {
|
|
75
21
|
"types": "./test/index.d.ts",
|
|
76
|
-
"
|
|
77
|
-
"
|
|
78
|
-
"
|
|
79
|
-
"node": "./fesm2015/ngdux-data-model-common-test.mjs",
|
|
80
|
-
"default": "./fesm2020/ngdux-data-model-common-test.mjs"
|
|
22
|
+
"esm2022": "./esm2022/test/ngdux-data-model-common-test.mjs",
|
|
23
|
+
"esm": "./esm2022/test/ngdux-data-model-common-test.mjs",
|
|
24
|
+
"default": "./fesm2022/ngdux-data-model-common-test.mjs"
|
|
81
25
|
}
|
|
82
26
|
},
|
|
83
27
|
"sideEffects": false,
|
package/test/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import * as commonFixture from './lib/common.fixture';
|
|
2
|
-
import * as errorFixture from './lib/error.fixture';
|
|
3
|
-
export { commonFixture, errorFixture };
|
|
1
|
+
import * as commonFixture from './lib/common.fixture';
|
|
2
|
+
import * as errorFixture from './lib/error.fixture';
|
|
3
|
+
export { commonFixture, errorFixture };
|
|
@@ -1,66 +1,67 @@
|
|
|
1
|
-
import { Casing } from '@faker-js/faker';
|
|
2
|
-
export type RemoveReadonly<T> = {
|
|
3
|
-
-readonly [P in keyof T]: T[P];
|
|
4
|
-
};
|
|
5
|
-
export declare const DEFAULT_RESOURCE_COLLECTION_SIZE = 50;
|
|
6
|
-
export declare function getBoolean(): boolean;
|
|
7
|
-
export declare function getPositiveNumber(): number;
|
|
8
|
-
export declare function getNumberInRange(from: number, to: number): number;
|
|
9
|
-
export declare function getWord(): string;
|
|
10
|
-
export declare function getUniqueWord(): string;
|
|
11
|
-
export declare function getFirstName(): string;
|
|
12
|
-
export declare function getLastName(): string;
|
|
13
|
-
export declare function getJobTitle(): string;
|
|
14
|
-
export declare function getPhoneNumber(): string;
|
|
15
|
-
export declare function getAvatar(): string;
|
|
16
|
-
export declare function getLogo(): string;
|
|
17
|
-
export declare function getColor(): string;
|
|
18
|
-
export declare function
|
|
19
|
-
export declare function
|
|
20
|
-
export declare function
|
|
21
|
-
export declare function
|
|
22
|
-
export declare function
|
|
23
|
-
export declare function
|
|
24
|
-
export declare function
|
|
25
|
-
export declare function
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
* @param
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
export declare function
|
|
36
|
-
export declare function
|
|
37
|
-
export declare function
|
|
38
|
-
export declare function
|
|
39
|
-
export declare function
|
|
40
|
-
export declare function
|
|
41
|
-
export declare function
|
|
42
|
-
export declare function
|
|
43
|
-
export declare function
|
|
44
|
-
export declare function
|
|
45
|
-
export declare function
|
|
46
|
-
export declare function
|
|
47
|
-
export declare function
|
|
48
|
-
export declare function
|
|
49
|
-
export declare function
|
|
50
|
-
export declare function
|
|
51
|
-
export declare function
|
|
52
|
-
export declare function
|
|
53
|
-
export declare function
|
|
54
|
-
export declare function
|
|
55
|
-
export declare function
|
|
56
|
-
export declare function
|
|
57
|
-
export declare function
|
|
58
|
-
export declare function
|
|
59
|
-
export declare function
|
|
60
|
-
export declare function
|
|
61
|
-
export declare function
|
|
62
|
-
export declare function
|
|
63
|
-
export declare function
|
|
64
|
-
export declare function
|
|
65
|
-
export declare function
|
|
66
|
-
export declare function
|
|
1
|
+
import { Casing } from '@faker-js/faker';
|
|
2
|
+
export type RemoveReadonly<T> = {
|
|
3
|
+
-readonly [P in keyof T]: T[P];
|
|
4
|
+
};
|
|
5
|
+
export declare const DEFAULT_RESOURCE_COLLECTION_SIZE = 50;
|
|
6
|
+
export declare function getBoolean(): boolean;
|
|
7
|
+
export declare function getPositiveNumber(): number;
|
|
8
|
+
export declare function getNumberInRange(from: number, to: number): number;
|
|
9
|
+
export declare function getWord(): string;
|
|
10
|
+
export declare function getUniqueWord(): string;
|
|
11
|
+
export declare function getFirstName(): string;
|
|
12
|
+
export declare function getLastName(): string;
|
|
13
|
+
export declare function getJobTitle(): string;
|
|
14
|
+
export declare function getPhoneNumber(): string;
|
|
15
|
+
export declare function getAvatar(): string;
|
|
16
|
+
export declare function getLogo(): string;
|
|
17
|
+
export declare function getColor(): string;
|
|
18
|
+
export declare function getHexColor(): string;
|
|
19
|
+
export declare function getFont(): string;
|
|
20
|
+
export declare function getGoogleFont(): string;
|
|
21
|
+
export declare function getEmail(firstName?: string, lastName?: string): string;
|
|
22
|
+
export declare function getElementFromArray<T>(array: T[]): T;
|
|
23
|
+
export declare function getElementsFromArray<T>(array: T[], nbOfElements?: number): T[];
|
|
24
|
+
export declare function getElementFromEnum<T>(enumeration: Record<string, T>): T;
|
|
25
|
+
export declare function getElementsFromEnum<T>(enumeration: Record<string, T>, nbOfElements?: number): T[];
|
|
26
|
+
export declare function getEnumValue<T extends Record<keyof T, string>>(enumObj: T): T[keyof T];
|
|
27
|
+
/**
|
|
28
|
+
* Return a random object key or path.
|
|
29
|
+
* Ex.:
|
|
30
|
+
* object = { a: { b: { c: 3 }}}
|
|
31
|
+
* return 'a.b.c'
|
|
32
|
+
* @param object any object
|
|
33
|
+
* @param path string
|
|
34
|
+
*/
|
|
35
|
+
export declare function getLatitude(): number;
|
|
36
|
+
export declare function getLongitude(): number;
|
|
37
|
+
export declare function getStreetName(): string;
|
|
38
|
+
export declare function getZipCode(): string;
|
|
39
|
+
export declare function getCity(): string;
|
|
40
|
+
export declare function getCountryCode(): string;
|
|
41
|
+
export declare function getUrl(): string;
|
|
42
|
+
export declare function getDomainName(): string;
|
|
43
|
+
export declare function getCompanyName(): string;
|
|
44
|
+
export declare function getSemverVersion(): string;
|
|
45
|
+
export declare function getLocale(): string;
|
|
46
|
+
export declare function getYear(): number;
|
|
47
|
+
export declare function getIso8601Date(): string;
|
|
48
|
+
export declare function getFutureIso8601Date(): string;
|
|
49
|
+
export declare function getTime(): string;
|
|
50
|
+
export declare function getRecentDate(days?: number, refDate?: Date): Date;
|
|
51
|
+
export declare function getSoonDate(days?: number, refDate?: Date): Date;
|
|
52
|
+
export declare function getFewDaysAgoDate(nbOfDays?: number): Date;
|
|
53
|
+
export declare function getInNextDaysDate(nbOfDays?: number): Date;
|
|
54
|
+
export declare function getUuid(): string;
|
|
55
|
+
export declare function getAlpha(count: number, casing?: Casing): string;
|
|
56
|
+
export declare function getAlphaNumeric(nOfCharacters?: number): string;
|
|
57
|
+
export declare function getCurrencyCode(): string;
|
|
58
|
+
export declare function getFinanceAmount(): number;
|
|
59
|
+
export declare function getSentence(): string;
|
|
60
|
+
export declare function getParagraph(): string;
|
|
61
|
+
export declare function getTag(): string;
|
|
62
|
+
export declare function getTags(n?: number): string[];
|
|
63
|
+
export declare function getVehicleName(): string;
|
|
64
|
+
export declare function getVehicleManufacturer(): string;
|
|
65
|
+
export declare function getVehicleVin(): string;
|
|
66
|
+
export declare function getVehicleColor(): string;
|
|
67
|
+
export declare function getVehicleModel(): string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ErrorDto } from '@ngdux/data-model-common';
|
|
2
|
-
export declare function createErrorDto(): ErrorDto;
|
|
1
|
+
import { ErrorDto } from '@ngdux/data-model-common';
|
|
2
|
+
export declare function createErrorDto(): ErrorDto;
|