@c-rex/interfaces 0.0.1

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.
@@ -0,0 +1,133 @@
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 };
@@ -0,0 +1,133 @@
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 ADDED
@@ -0,0 +1,19 @@
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
@@ -0,0 +1 @@
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 ADDED
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
package/package.json ADDED
@@ -0,0 +1,28 @@
1
+ {
2
+ "name": "@c-rex/interfaces",
3
+ "version": "0.0.1",
4
+ "main": "dist/index.js",
5
+ "module": "dist/index.mjs",
6
+ "types": "dist/index.d.ts",
7
+ "files": ["dist"],
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "import": "./dist/index.mjs",
12
+ "require": "./dist/index.js",
13
+ "default": "./dist/index.js"
14
+ },
15
+ "./package.json": "./package.json"
16
+ },
17
+ "scripts": {
18
+ "dev": "tsup src/index.ts --format cjs,esm --dts --watch",
19
+ "build": "tsup src/index.ts --format cjs,esm --dts"
20
+ },
21
+ "devDependencies": {
22
+ "@c-rex/typescript-config": "*",
23
+ "typescript": "latest"
24
+ },
25
+ "dependencies": {
26
+ "@c-rex/types": "*"
27
+ }
28
+ }