@c-rex/interfaces 0.0.4 → 0.0.6
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/package.json +8 -11
- package/src/common.ts +42 -0
- package/src/config.ts +30 -0
- package/src/directoryNodes.ts +8 -0
- package/src/documentTypes.ts +7 -0
- package/src/index.ts +6 -0
- package/src/informationUnits.ts +64 -0
- package/src/treeOfContent.ts +7 -0
- package/dist/index.d.mts +0 -133
- package/dist/index.d.ts +0 -133
- package/dist/index.js +0 -19
- package/dist/index.js.map +0 -1
- package/dist/index.mjs +0 -1
- package/dist/index.mjs.map +0 -1
package/package.json
CHANGED
|
@@ -1,27 +1,24 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@c-rex/interfaces",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"main": "dist/index.js",
|
|
5
|
-
"module": "dist/index.mjs",
|
|
6
|
-
"types": "dist/index.d.ts",
|
|
3
|
+
"version": "0.0.6",
|
|
7
4
|
"files": [
|
|
8
|
-
"
|
|
5
|
+
"src"
|
|
9
6
|
],
|
|
10
7
|
"publishConfig": {
|
|
11
8
|
"access": "public"
|
|
12
9
|
},
|
|
13
10
|
"exports": {
|
|
14
11
|
".": {
|
|
15
|
-
"types": "./
|
|
16
|
-
"import": "./
|
|
17
|
-
"require": "./
|
|
18
|
-
"default": "./
|
|
12
|
+
"types": "./src/index.ts",
|
|
13
|
+
"import": "./src/index.ts",
|
|
14
|
+
"require": "./src/index.ts",
|
|
15
|
+
"default": "./src/index.ts"
|
|
19
16
|
},
|
|
20
17
|
"./package.json": "./package.json"
|
|
21
18
|
},
|
|
22
19
|
"scripts": {
|
|
23
|
-
"dev": "
|
|
24
|
-
"build": "
|
|
20
|
+
"dev": "echo 'Nothing to build — using raw TypeScript files'",
|
|
21
|
+
"build": "echo 'No build needed'"
|
|
25
22
|
},
|
|
26
23
|
"devDependencies": {
|
|
27
24
|
"@c-rex/typescript-config": "*",
|
package/src/common.ts
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export interface DefaultPageInfo {
|
|
2
|
+
pageNumber: number;
|
|
3
|
+
pageSize: number;
|
|
4
|
+
pageCount: number;
|
|
5
|
+
|
|
6
|
+
totalItemCount: number;
|
|
7
|
+
firstItemOnPage: number;
|
|
8
|
+
lastItemOnPage: number;
|
|
9
|
+
|
|
10
|
+
hasPreviousPage: boolean;
|
|
11
|
+
hasNextPage: boolean;
|
|
12
|
+
|
|
13
|
+
isFirstPage: boolean;
|
|
14
|
+
isLastPage: boolean;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface idShortID {
|
|
18
|
+
id: string;
|
|
19
|
+
shortId: string;
|
|
20
|
+
}
|
|
21
|
+
export interface Labels {
|
|
22
|
+
language: string;
|
|
23
|
+
value: string;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface DefaultLinksRequest {
|
|
27
|
+
rel: string;
|
|
28
|
+
href: string;
|
|
29
|
+
method: string;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export interface DefaultRequest<T> {
|
|
33
|
+
items: T[];
|
|
34
|
+
links: DefaultLinksRequest[];
|
|
35
|
+
pageInfo: DefaultPageInfo;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export interface Filters {
|
|
39
|
+
key: string;
|
|
40
|
+
value: string;
|
|
41
|
+
operator?: string;
|
|
42
|
+
}
|
package/src/config.ts
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
//import { ResultViewType } from "@/types";
|
|
2
|
+
import { Filters } from "./common";
|
|
3
|
+
import { LogCategoriesType, LogLevelType } from "@c-rex/types";
|
|
4
|
+
|
|
5
|
+
export interface logInfo {
|
|
6
|
+
silent: boolean;
|
|
7
|
+
minimumLevel: LogLevelType;
|
|
8
|
+
categoriesLevel: LogCategoriesType[];
|
|
9
|
+
url: string;
|
|
10
|
+
app: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface ConfigInterface {
|
|
14
|
+
projectName: string;
|
|
15
|
+
baseUrl: string;
|
|
16
|
+
search: {
|
|
17
|
+
//filterViewStyle: FilterViewStyle;
|
|
18
|
+
fields: string[];
|
|
19
|
+
tags: string[];
|
|
20
|
+
restrict?: Filters[];
|
|
21
|
+
filter?: Filters[];
|
|
22
|
+
sparqlWhere?: string;
|
|
23
|
+
};
|
|
24
|
+
//resultViewStyle: ResultViewType;
|
|
25
|
+
logs: {
|
|
26
|
+
console: logInfo; // dont consider categories on it
|
|
27
|
+
graylog: logInfo;
|
|
28
|
+
matomo: logInfo;
|
|
29
|
+
};
|
|
30
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { idShortID } from "./common";
|
|
2
|
+
import { informationUnitsDirectories } from "./informationUnits";
|
|
3
|
+
|
|
4
|
+
export interface DirectoryNodes extends informationUnitsDirectories {
|
|
5
|
+
childNodes: informationUnitsDirectories[];
|
|
6
|
+
parents: idShortID[];
|
|
7
|
+
informationUnits: idShortID[];
|
|
8
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { DirectoryNodes } from "./directoryNodes";
|
|
2
|
+
import {
|
|
3
|
+
DefaultLinksRequest,
|
|
4
|
+
DefaultPageInfo,
|
|
5
|
+
idShortID,
|
|
6
|
+
Labels,
|
|
7
|
+
} from "./common";
|
|
8
|
+
|
|
9
|
+
interface informationUnitsClass extends idShortID {
|
|
10
|
+
labels: Labels[];
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface informationUnitsDirectories extends idShortID {
|
|
14
|
+
labels: Labels[];
|
|
15
|
+
links: DefaultLinksRequest[];
|
|
16
|
+
class: informationUnitsClass;
|
|
17
|
+
childNodes?: informationUnitsClass[];
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface informationUnitsRenditions
|
|
21
|
+
extends informationUnitsDirectories {
|
|
22
|
+
source: string;
|
|
23
|
+
format: string;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface informationUnitsItems extends idShortID {
|
|
27
|
+
directories: informationUnitsDirectories[];
|
|
28
|
+
identities: informationUnitsDirectories[];
|
|
29
|
+
class: informationUnitsClass;
|
|
30
|
+
labels: Labels[];
|
|
31
|
+
titles: Labels[];
|
|
32
|
+
links: DefaultLinksRequest[];
|
|
33
|
+
renditions: informationUnitsRenditions[];
|
|
34
|
+
iirdsVersion: {
|
|
35
|
+
value: string;
|
|
36
|
+
};
|
|
37
|
+
revision: string;
|
|
38
|
+
score: number;
|
|
39
|
+
directoryNodes: DirectoryNodes[];
|
|
40
|
+
languages: string[];
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export interface informationUnitsResponse extends idShortID {
|
|
44
|
+
languages: string[];
|
|
45
|
+
labels: Labels[];
|
|
46
|
+
titles: Labels[];
|
|
47
|
+
files: {
|
|
48
|
+
format: string;
|
|
49
|
+
type: string;
|
|
50
|
+
link: string;
|
|
51
|
+
}[];
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export interface informationUnits {
|
|
55
|
+
items: informationUnitsItems[];
|
|
56
|
+
pageInfo: DefaultPageInfo;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export interface AutocompleteSuggestion {
|
|
60
|
+
suggestions: {
|
|
61
|
+
type: string;
|
|
62
|
+
value: string;
|
|
63
|
+
}[];
|
|
64
|
+
}
|
package/dist/index.d.mts
DELETED
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
import { LogLevelType, LogCategoriesType } from '@c-rex/types';
|
|
2
|
-
|
|
3
|
-
interface DefaultPageInfo {
|
|
4
|
-
pageNumber: number;
|
|
5
|
-
pageSize: number;
|
|
6
|
-
pageCount: number;
|
|
7
|
-
totalItemCount: number;
|
|
8
|
-
firstItemOnPage: number;
|
|
9
|
-
lastItemOnPage: number;
|
|
10
|
-
hasPreviousPage: boolean;
|
|
11
|
-
hasNextPage: boolean;
|
|
12
|
-
isFirstPage: boolean;
|
|
13
|
-
isLastPage: boolean;
|
|
14
|
-
}
|
|
15
|
-
interface idShortID {
|
|
16
|
-
id: string;
|
|
17
|
-
shortId: string;
|
|
18
|
-
}
|
|
19
|
-
interface Labels {
|
|
20
|
-
language: string;
|
|
21
|
-
value: string;
|
|
22
|
-
}
|
|
23
|
-
interface DefaultLinksRequest {
|
|
24
|
-
rel: string;
|
|
25
|
-
href: string;
|
|
26
|
-
method: string;
|
|
27
|
-
}
|
|
28
|
-
interface DefaultRequest<T> {
|
|
29
|
-
items: T[];
|
|
30
|
-
links: DefaultLinksRequest[];
|
|
31
|
-
pageInfo: DefaultPageInfo;
|
|
32
|
-
}
|
|
33
|
-
interface Filters {
|
|
34
|
-
key: string;
|
|
35
|
-
value: string;
|
|
36
|
-
operator?: string;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
interface logInfo {
|
|
40
|
-
silent: boolean;
|
|
41
|
-
minimumLevel: LogLevelType;
|
|
42
|
-
categoriesLevel: LogCategoriesType[];
|
|
43
|
-
url: string;
|
|
44
|
-
app: string;
|
|
45
|
-
}
|
|
46
|
-
interface ConfigInterface {
|
|
47
|
-
projectName: string;
|
|
48
|
-
baseUrl: string;
|
|
49
|
-
search: {
|
|
50
|
-
fields: string[];
|
|
51
|
-
tags: string[];
|
|
52
|
-
restrict?: Filters[];
|
|
53
|
-
filter?: Filters[];
|
|
54
|
-
sparqlWhere?: string;
|
|
55
|
-
};
|
|
56
|
-
logs: {
|
|
57
|
-
console: logInfo;
|
|
58
|
-
graylog: logInfo;
|
|
59
|
-
matomo: logInfo;
|
|
60
|
-
};
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
interface informationUnitsClass extends idShortID {
|
|
64
|
-
labels: Labels[];
|
|
65
|
-
}
|
|
66
|
-
interface informationUnitsDirectories extends idShortID {
|
|
67
|
-
labels: Labels[];
|
|
68
|
-
links: DefaultLinksRequest[];
|
|
69
|
-
class: informationUnitsClass;
|
|
70
|
-
childNodes?: informationUnitsClass[];
|
|
71
|
-
}
|
|
72
|
-
interface informationUnitsRenditions extends informationUnitsDirectories {
|
|
73
|
-
source: string;
|
|
74
|
-
format: string;
|
|
75
|
-
}
|
|
76
|
-
interface informationUnitsItems extends idShortID {
|
|
77
|
-
directories: informationUnitsDirectories[];
|
|
78
|
-
identities: informationUnitsDirectories[];
|
|
79
|
-
class: informationUnitsClass;
|
|
80
|
-
labels: Labels[];
|
|
81
|
-
titles: Labels[];
|
|
82
|
-
links: DefaultLinksRequest[];
|
|
83
|
-
renditions: informationUnitsRenditions[];
|
|
84
|
-
iirdsVersion: {
|
|
85
|
-
value: string;
|
|
86
|
-
};
|
|
87
|
-
revision: string;
|
|
88
|
-
score: number;
|
|
89
|
-
directoryNodes: DirectoryNodes[];
|
|
90
|
-
languages: string[];
|
|
91
|
-
}
|
|
92
|
-
interface informationUnitsResponse extends idShortID {
|
|
93
|
-
languages: string[];
|
|
94
|
-
labels: Labels[];
|
|
95
|
-
titles: Labels[];
|
|
96
|
-
files: {
|
|
97
|
-
format: string;
|
|
98
|
-
type: string;
|
|
99
|
-
link: string;
|
|
100
|
-
}[];
|
|
101
|
-
}
|
|
102
|
-
interface informationUnits {
|
|
103
|
-
items: informationUnitsItems[];
|
|
104
|
-
pageInfo: DefaultPageInfo;
|
|
105
|
-
}
|
|
106
|
-
interface AutocompleteSuggestion {
|
|
107
|
-
suggestions: {
|
|
108
|
-
type: string;
|
|
109
|
-
value: string;
|
|
110
|
-
}[];
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
interface DirectoryNodes extends informationUnitsDirectories {
|
|
114
|
-
childNodes: informationUnitsDirectories[];
|
|
115
|
-
parents: idShortID[];
|
|
116
|
-
informationUnits: idShortID[];
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
interface DocumentTypesItem extends idShortID {
|
|
120
|
-
labels: Labels[];
|
|
121
|
-
links: DefaultLinksRequest[];
|
|
122
|
-
score: number;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
interface TreeOfContent {
|
|
126
|
-
label: string;
|
|
127
|
-
id: string;
|
|
128
|
-
link: string;
|
|
129
|
-
active: boolean;
|
|
130
|
-
children: TreeOfContent[];
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
export type { AutocompleteSuggestion, ConfigInterface, DefaultLinksRequest, DefaultPageInfo, DefaultRequest, DirectoryNodes, DocumentTypesItem, Filters, Labels, TreeOfContent, idShortID, informationUnits, informationUnitsDirectories, informationUnitsItems, informationUnitsRenditions, informationUnitsResponse, logInfo };
|
package/dist/index.d.ts
DELETED
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
import { LogLevelType, LogCategoriesType } from '@c-rex/types';
|
|
2
|
-
|
|
3
|
-
interface DefaultPageInfo {
|
|
4
|
-
pageNumber: number;
|
|
5
|
-
pageSize: number;
|
|
6
|
-
pageCount: number;
|
|
7
|
-
totalItemCount: number;
|
|
8
|
-
firstItemOnPage: number;
|
|
9
|
-
lastItemOnPage: number;
|
|
10
|
-
hasPreviousPage: boolean;
|
|
11
|
-
hasNextPage: boolean;
|
|
12
|
-
isFirstPage: boolean;
|
|
13
|
-
isLastPage: boolean;
|
|
14
|
-
}
|
|
15
|
-
interface idShortID {
|
|
16
|
-
id: string;
|
|
17
|
-
shortId: string;
|
|
18
|
-
}
|
|
19
|
-
interface Labels {
|
|
20
|
-
language: string;
|
|
21
|
-
value: string;
|
|
22
|
-
}
|
|
23
|
-
interface DefaultLinksRequest {
|
|
24
|
-
rel: string;
|
|
25
|
-
href: string;
|
|
26
|
-
method: string;
|
|
27
|
-
}
|
|
28
|
-
interface DefaultRequest<T> {
|
|
29
|
-
items: T[];
|
|
30
|
-
links: DefaultLinksRequest[];
|
|
31
|
-
pageInfo: DefaultPageInfo;
|
|
32
|
-
}
|
|
33
|
-
interface Filters {
|
|
34
|
-
key: string;
|
|
35
|
-
value: string;
|
|
36
|
-
operator?: string;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
interface logInfo {
|
|
40
|
-
silent: boolean;
|
|
41
|
-
minimumLevel: LogLevelType;
|
|
42
|
-
categoriesLevel: LogCategoriesType[];
|
|
43
|
-
url: string;
|
|
44
|
-
app: string;
|
|
45
|
-
}
|
|
46
|
-
interface ConfigInterface {
|
|
47
|
-
projectName: string;
|
|
48
|
-
baseUrl: string;
|
|
49
|
-
search: {
|
|
50
|
-
fields: string[];
|
|
51
|
-
tags: string[];
|
|
52
|
-
restrict?: Filters[];
|
|
53
|
-
filter?: Filters[];
|
|
54
|
-
sparqlWhere?: string;
|
|
55
|
-
};
|
|
56
|
-
logs: {
|
|
57
|
-
console: logInfo;
|
|
58
|
-
graylog: logInfo;
|
|
59
|
-
matomo: logInfo;
|
|
60
|
-
};
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
interface informationUnitsClass extends idShortID {
|
|
64
|
-
labels: Labels[];
|
|
65
|
-
}
|
|
66
|
-
interface informationUnitsDirectories extends idShortID {
|
|
67
|
-
labels: Labels[];
|
|
68
|
-
links: DefaultLinksRequest[];
|
|
69
|
-
class: informationUnitsClass;
|
|
70
|
-
childNodes?: informationUnitsClass[];
|
|
71
|
-
}
|
|
72
|
-
interface informationUnitsRenditions extends informationUnitsDirectories {
|
|
73
|
-
source: string;
|
|
74
|
-
format: string;
|
|
75
|
-
}
|
|
76
|
-
interface informationUnitsItems extends idShortID {
|
|
77
|
-
directories: informationUnitsDirectories[];
|
|
78
|
-
identities: informationUnitsDirectories[];
|
|
79
|
-
class: informationUnitsClass;
|
|
80
|
-
labels: Labels[];
|
|
81
|
-
titles: Labels[];
|
|
82
|
-
links: DefaultLinksRequest[];
|
|
83
|
-
renditions: informationUnitsRenditions[];
|
|
84
|
-
iirdsVersion: {
|
|
85
|
-
value: string;
|
|
86
|
-
};
|
|
87
|
-
revision: string;
|
|
88
|
-
score: number;
|
|
89
|
-
directoryNodes: DirectoryNodes[];
|
|
90
|
-
languages: string[];
|
|
91
|
-
}
|
|
92
|
-
interface informationUnitsResponse extends idShortID {
|
|
93
|
-
languages: string[];
|
|
94
|
-
labels: Labels[];
|
|
95
|
-
titles: Labels[];
|
|
96
|
-
files: {
|
|
97
|
-
format: string;
|
|
98
|
-
type: string;
|
|
99
|
-
link: string;
|
|
100
|
-
}[];
|
|
101
|
-
}
|
|
102
|
-
interface informationUnits {
|
|
103
|
-
items: informationUnitsItems[];
|
|
104
|
-
pageInfo: DefaultPageInfo;
|
|
105
|
-
}
|
|
106
|
-
interface AutocompleteSuggestion {
|
|
107
|
-
suggestions: {
|
|
108
|
-
type: string;
|
|
109
|
-
value: string;
|
|
110
|
-
}[];
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
interface DirectoryNodes extends informationUnitsDirectories {
|
|
114
|
-
childNodes: informationUnitsDirectories[];
|
|
115
|
-
parents: idShortID[];
|
|
116
|
-
informationUnits: idShortID[];
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
interface DocumentTypesItem extends idShortID {
|
|
120
|
-
labels: Labels[];
|
|
121
|
-
links: DefaultLinksRequest[];
|
|
122
|
-
score: number;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
interface TreeOfContent {
|
|
126
|
-
label: string;
|
|
127
|
-
id: string;
|
|
128
|
-
link: string;
|
|
129
|
-
active: boolean;
|
|
130
|
-
children: TreeOfContent[];
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
export type { AutocompleteSuggestion, ConfigInterface, DefaultLinksRequest, DefaultPageInfo, DefaultRequest, DirectoryNodes, DocumentTypesItem, Filters, Labels, TreeOfContent, idShortID, informationUnits, informationUnitsDirectories, informationUnitsItems, informationUnitsRenditions, informationUnitsResponse, logInfo };
|
package/dist/index.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __copyProps = (to, from, except, desc) => {
|
|
7
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
-
for (let key of __getOwnPropNames(from))
|
|
9
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
-
}
|
|
12
|
-
return to;
|
|
13
|
-
};
|
|
14
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
-
|
|
16
|
-
// src/index.ts
|
|
17
|
-
var index_exports = {};
|
|
18
|
-
module.exports = __toCommonJS(index_exports);
|
|
19
|
-
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export * from './common'\nexport * from './config'\nexport * from './directoryNodes'\nexport * from './documentTypes'\nexport * from './informationUnits'\nexport * from './treeOfContent'"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
package/dist/index.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=index.mjs.map
|
package/dist/index.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|