mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-21 17:12:43 +00:00
Compare commits
45 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ead47aca19 | ||
|
|
f9c2414000 | ||
|
|
523de51160 | ||
|
|
d912c03eb0 | ||
|
|
a638f5447b | ||
|
|
cecf95aa46 | ||
|
|
6fd8c5adf3 | ||
|
|
db24b41d99 | ||
|
|
b1fcd22ab2 | ||
|
|
268588fb6f | ||
|
|
d3048a12d8 | ||
|
|
e14993114f | ||
|
|
4237f6ad60 | ||
|
|
e7c1000bc4 | ||
|
|
e0adb2332e | ||
|
|
e5696b23e7 | ||
|
|
659d0974f7 | ||
|
|
e8304eeeb4 | ||
|
|
dca9d26c66 | ||
|
|
852e0f5373 | ||
|
|
26dd531d24 | ||
|
|
52bdf93356 | ||
|
|
7509610145 | ||
|
|
972cdf392d | ||
|
|
4f758f7d0c | ||
|
|
980e899807 | ||
|
|
d1c5bb9595 | ||
|
|
dc9c0f528f | ||
|
|
66d64e0858 | ||
|
|
06339786c2 | ||
|
|
8ed68481fa | ||
|
|
e26042957c | ||
|
|
7553620a5d | ||
|
|
322c001e70 | ||
|
|
830e249ac4 | ||
|
|
8c9df3ea9a | ||
|
|
f85768d32e | ||
|
|
580ace368f | ||
|
|
522be6643a | ||
|
|
8784309ddb | ||
|
|
3d8f996690 | ||
|
|
36a4bfcbbc | ||
|
|
db347bf324 | ||
|
|
7a2e0f20d1 | ||
|
|
b2d18da82a |
72
CHANGELOG.md
72
CHANGELOG.md
@@ -1,3 +1,75 @@
|
|||||||
|
# [0.65.0](https://gitlab.com/openstapps/core/compare/v0.64.0...v0.65.0) (2022-04-04)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [0.64.0](https://gitlab.com/openstapps/core/compare/v0.63.0...v0.64.0) (2022-03-21)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [0.63.0](https://gitlab.com/openstapps/core/compare/v0.62.0...v0.63.0) (2022-01-24)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* add auth object to index route ([e149931](https://gitlab.com/openstapps/core/commit/e14993114f0ec370775010eee4ad0d302a0beebb))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [0.62.0](https://gitlab.com/openstapps/core/compare/v0.61.0...v0.62.0) (2022-01-21)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* add missing lastPublished to SCCreativeWork ([e0adb23](https://gitlab.com/openstapps/core/commit/e0adb2332ec24ce388c4c008b51b7aa941948532))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [0.61.0](https://gitlab.com/openstapps/core/compare/v0.60.0...v0.61.0) (2022-01-21)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [0.60.0](https://gitlab.com/openstapps/core/compare/v0.59.0...v0.60.0) (2022-01-21)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [0.59.0](https://gitlab.com/openstapps/core/compare/v0.58.0...v0.59.0) (2022-01-20)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [0.58.0](https://gitlab.com/openstapps/core/compare/v0.57.0...v0.58.0) (2022-01-18)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [0.57.0](https://gitlab.com/openstapps/core/compare/v0.56.0...v0.57.0) (2022-01-18)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* extend config to describe auth providers ([7553620](https://gitlab.com/openstapps/core/commit/7553620a5d330ebfb66461afeab700e36bd37165))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [0.56.0](https://gitlab.com/openstapps/core/compare/v0.55.0...v0.56.0) (2021-12-17)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [0.55.0](https://gitlab.com/openstapps/core/compare/v0.54.0...v0.55.0) (2021-12-15)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [0.54.0](https://gitlab.com/openstapps/core/compare/v0.53.0...v0.54.0) (2021-11-17)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* add SCAssessment ([7a2e0f2](https://gitlab.com/openstapps/core/commit/7a2e0f20d1c64ab1deb7ab30bfb4bab4daaabd6d))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [0.53.0](https://gitlab.com/openstapps/core/compare/v0.52.0...v0.53.0) (2021-10-19)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# [0.52.0](https://gitlab.com/openstapps/core/compare/v0.51.0...v0.52.0) (2021-09-28)
|
# [0.52.0](https://gitlab.com/openstapps/core/compare/v0.51.0...v0.52.0) (2021-09-28)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
3163
package-lock.json
generated
3163
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
46
package.json
46
package.json
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@openstapps/core",
|
"name": "@openstapps/core",
|
||||||
"version": "0.53.0",
|
"version": "0.65.1",
|
||||||
"description": "StAppsCore - Generalized model of data",
|
"description": "StAppsCore - Generalized model of data",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"Model",
|
"Model",
|
||||||
@@ -18,7 +18,7 @@
|
|||||||
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0 && git add CHANGELOG.md && git commit -m 'docs: update changelog'",
|
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0 && git add CHANGELOG.md && git commit -m 'docs: update changelog'",
|
||||||
"check-configuration": "openstapps-configuration",
|
"check-configuration": "openstapps-configuration",
|
||||||
"compile": "rimraf lib && tsc",
|
"compile": "rimraf lib && tsc",
|
||||||
"documentation": "typedoc --name \"@openstapps/core\" --includeVersion --out docs --readme README.md --listInvalidSymbolLinks src",
|
"documentation": "typedoc --name \"@openstapps/core\" --includeVersion --out docs --readme README.md --listInvalidSymbolLinks --entryPointStrategy expand src",
|
||||||
"pack": "openstapps-core-tools pack",
|
"pack": "openstapps-core-tools pack",
|
||||||
"postversion": "npm run changelog",
|
"postversion": "npm run changelog",
|
||||||
"prepublishOnly": "npm ci && npm run build",
|
"prepublishOnly": "npm ci && npm run build",
|
||||||
@@ -45,39 +45,39 @@
|
|||||||
"Wieland Schöbl"
|
"Wieland Schöbl"
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@openstapps/core-tools": "0.25.0",
|
"@openstapps/core-tools": "0.30.0",
|
||||||
"@types/geojson": "1.0.6",
|
"@types/geojson": "1.0.6",
|
||||||
"@types/json-patch": "0.0.30",
|
"@types/json-patch": "0.0.30",
|
||||||
"@types/json-schema": "7.0.9",
|
"@types/json-schema": "7.0.11",
|
||||||
"@types/node": "14.17.9",
|
"@types/node": "14.18.3",
|
||||||
"fast-clone": "1.5.13",
|
|
||||||
"fast-deep-equal": "3.1.3",
|
"fast-deep-equal": "3.1.3",
|
||||||
"http-status-codes": "2.1.4",
|
"http-status-codes": "2.2.0",
|
||||||
"json-patch": "0.7.0",
|
"json-patch": "0.7.0",
|
||||||
"json-schema": "0.3.0",
|
"json-schema": "0.4.0",
|
||||||
|
"rfdc": "1.3.0",
|
||||||
"ts-optchain": "0.1.8"
|
"ts-optchain": "0.1.8"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@openstapps/configuration": "0.27.0",
|
"@openstapps/configuration": "0.29.0",
|
||||||
"@openstapps/es-mapping-generator": "0.0.3",
|
"@openstapps/es-mapping-generator": "0.0.4",
|
||||||
"@openstapps/logger": "0.7.0",
|
"@openstapps/logger": "0.8.0",
|
||||||
"@testdeck/mocha": "0.1.2",
|
"@testdeck/mocha": "0.2.0",
|
||||||
"@types/lodash": "4.14.172",
|
"@types/chai": "4.3.0",
|
||||||
"@types/chai": "4.2.21",
|
"@types/lodash": "4.14.181",
|
||||||
"@types/rimraf": "3.0.1",
|
"@types/mocha": "9.1.0",
|
||||||
"@types/mocha": "8.2.3",
|
"@types/rimraf": "3.0.2",
|
||||||
"chai": "4.3.4",
|
"chai": "4.3.6",
|
||||||
"conditional-type-checks": "1.0.5",
|
"conditional-type-checks": "1.0.5",
|
||||||
"conventional-changelog-cli": "2.1.1",
|
"conventional-changelog-cli": "2.2.2",
|
||||||
"lodash": "4.17.21",
|
"lodash": "4.17.21",
|
||||||
"mocha": "8.4.0",
|
"mocha": "9.2.2",
|
||||||
"nyc": "15.1.0",
|
"nyc": "15.1.0",
|
||||||
"rimraf": "3.0.2",
|
"rimraf": "3.0.2",
|
||||||
"source-map-support": "0.5.19",
|
"source-map-support": "0.5.21",
|
||||||
"surge": "0.23.0",
|
"surge": "0.23.1",
|
||||||
"ts-node": "9.1.1",
|
"ts-node": "10.7.0",
|
||||||
"tslint": "6.1.3",
|
"tslint": "6.1.3",
|
||||||
"typedoc": "0.21.6",
|
"typedoc": "0.22.13",
|
||||||
"typescript": "4.3.5"
|
"typescript": "4.3.5"
|
||||||
},
|
},
|
||||||
"nyc": {
|
"nyc": {
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ import {Polygon} from 'geojson';
|
|||||||
import {SCTranslations} from '../general/i18n';
|
import {SCTranslations} from '../general/i18n';
|
||||||
import {SCMap} from '../general/map';
|
import {SCMap} from '../general/map';
|
||||||
import {SCLanguageSetting, SCSetting, SCUserGroupSetting} from '../things/setting';
|
import {SCLanguageSetting, SCSetting, SCUserGroupSetting} from '../things/setting';
|
||||||
|
import {SCFeatureConfiguration} from './feature';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An app configuration menu item
|
* An app configuration menu item
|
||||||
@@ -94,9 +95,9 @@ export interface SCAppConfiguration {
|
|||||||
campusPolygon: Polygon;
|
campusPolygon: Polygon;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A list of features to en- or disable
|
* Maps of enabled features (plugins and external services)
|
||||||
*/
|
*/
|
||||||
features: SCAppConfigurationFeature;
|
features: SCFeatureConfiguration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A URL where images are available
|
* A URL where images are available
|
||||||
@@ -135,16 +136,6 @@ export interface SCAppConfiguration {
|
|||||||
url?: string;
|
url?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Map of features
|
|
||||||
*/
|
|
||||||
export interface SCAppConfigurationFeature {
|
|
||||||
/**
|
|
||||||
* Whether or not widgets are enabled
|
|
||||||
*/
|
|
||||||
widgets: boolean;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* URLs of published apps
|
* URLs of published apps
|
||||||
*/
|
*/
|
||||||
|
|||||||
96
src/config/authorization.ts
Normal file
96
src/config/authorization.ts
Normal file
@@ -0,0 +1,96 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2021 StApps
|
||||||
|
* This program is free software: you can redistribute it and/or modify it
|
||||||
|
* under the terms of the GNU General Public License as published by the Free
|
||||||
|
* Software Foundation, version 3.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||||
|
* more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along with
|
||||||
|
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import {SCUserConfigurationMap} from './user';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Supported authorization provider types
|
||||||
|
*
|
||||||
|
* @see https://datatracker.ietf.org/doc/html/rfc6749#section-1.3.1
|
||||||
|
* @see https://github.com/gbv/paia
|
||||||
|
*/
|
||||||
|
export type SCAuthorizationProviderType = 'default' | 'paia' ;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* An authorization provider complete configuration
|
||||||
|
*/
|
||||||
|
export interface SCAuthorizationProvider {
|
||||||
|
/**
|
||||||
|
* An authorization provider client configuration
|
||||||
|
*/
|
||||||
|
client: SCAuthorizationProviderClient;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* An authorization provider endpoints configuration
|
||||||
|
*/
|
||||||
|
endpoints: SCAuthorizationProviderEndpoints;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* An authorization provider client configuration
|
||||||
|
*/
|
||||||
|
export interface SCAuthorizationProviderClient {
|
||||||
|
/**
|
||||||
|
* Client ID
|
||||||
|
*/
|
||||||
|
clientId: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Scopes to request
|
||||||
|
*/
|
||||||
|
scopes: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Main url to reach authorization provider
|
||||||
|
*/
|
||||||
|
url: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* An authorization provider endpoints configuration
|
||||||
|
*/
|
||||||
|
export interface SCAuthorizationProviderEndpoints {
|
||||||
|
/**
|
||||||
|
* URL to start authentication flow
|
||||||
|
*/
|
||||||
|
authorization: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* URL to end current session
|
||||||
|
*/
|
||||||
|
endSession?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Mapping of how to create SCUser from userinfo endpoint response (using JSONPath syntax)
|
||||||
|
*
|
||||||
|
* @see https://www.npmjs.com/package/jsonpath
|
||||||
|
*/
|
||||||
|
mapping: SCUserConfigurationMap;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* URL to revoke a token
|
||||||
|
*/
|
||||||
|
revoke?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* URL to get access Token
|
||||||
|
*/
|
||||||
|
token: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* URL to general user info endpoint
|
||||||
|
*/
|
||||||
|
userinfo: string;
|
||||||
|
}
|
||||||
49
src/config/feature.ts
Normal file
49
src/config/feature.ts
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2021 StApps
|
||||||
|
* This program is free software: you can redistribute it and/or modify it
|
||||||
|
* under the terms of the GNU General Public License as published by the Free
|
||||||
|
* Software Foundation, version 3.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||||
|
* more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along with
|
||||||
|
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import {SCMap} from '../general/map';
|
||||||
|
import {SCAuthorizationProviderType} from './authorization';
|
||||||
|
|
||||||
|
export interface SCFeatureConfiguration {
|
||||||
|
/**
|
||||||
|
* Map of extern services mapped by their name (statically)
|
||||||
|
*/
|
||||||
|
extern?: SCMap<SCFeatureConfigurationExtern>;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Map of plugins registered with the backend mapped by their name.
|
||||||
|
*/
|
||||||
|
plugins?: SCMap<SCFeatureConfigurationPlugin>;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
export interface SCFeatureConfigurationPlugin {
|
||||||
|
/**
|
||||||
|
* URL path registered with the backend
|
||||||
|
*/
|
||||||
|
urlPath: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface SCFeatureConfigurationExtern {
|
||||||
|
/**
|
||||||
|
* Key of authorization provider available in SCConfigFile
|
||||||
|
*/
|
||||||
|
authProvider?: SCAuthorizationProviderType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* URL of extern service
|
||||||
|
*/
|
||||||
|
url: string;
|
||||||
|
}
|
||||||
@@ -14,6 +14,7 @@
|
|||||||
*/
|
*/
|
||||||
import {SCLicensePlate} from '../general/namespaces';
|
import {SCLicensePlate} from '../general/namespaces';
|
||||||
import {SCAppConfiguration} from './app';
|
import {SCAppConfiguration} from './app';
|
||||||
|
import {SCAuthorizationProvider, SCAuthorizationProviderType} from './authorization';
|
||||||
import {SCBackendConfiguration, SCBackendInternalConfiguration} from './backend';
|
import {SCBackendConfiguration, SCBackendInternalConfiguration} from './backend';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -27,6 +28,11 @@ export interface SCConfigFile {
|
|||||||
*/
|
*/
|
||||||
app: SCAppConfiguration;
|
app: SCAppConfiguration;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Configuration for the supported authorization providers
|
||||||
|
*/
|
||||||
|
auth: { [key in SCAuthorizationProviderType]?: SCAuthorizationProvider; };
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Configuration for the backend that is visible to clients
|
* Configuration for the backend that is visible to clients
|
||||||
*/
|
*/
|
||||||
|
|||||||
64
src/config/user.ts
Normal file
64
src/config/user.ts
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2021 StApps
|
||||||
|
* This program is free software: you can redistribute it and/or modify it
|
||||||
|
* under the terms of the GNU General Public License as published by the Free
|
||||||
|
* Software Foundation, version 3.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||||
|
* more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along with
|
||||||
|
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* User configuration keys mapped to string type while including their requiredness
|
||||||
|
*/
|
||||||
|
export type SCUserConfigurationMap = { [K in keyof SCUserConfigurationOptional]?: string } & { [K in keyof SCUserConfigurationRequired]: string };
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A user configuration
|
||||||
|
*/
|
||||||
|
export type SCUserConfiguration = SCUserConfigurationRequired & SCUserConfigurationOptional;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A user configurations required properties
|
||||||
|
*/
|
||||||
|
interface SCUserConfigurationRequired {
|
||||||
|
/**
|
||||||
|
* ID given to the user
|
||||||
|
*/
|
||||||
|
id: string;
|
||||||
|
/**
|
||||||
|
* The complete name of the user combining all the parts of the name into one
|
||||||
|
*/
|
||||||
|
name: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A user configurations optional properties
|
||||||
|
*/
|
||||||
|
interface SCUserConfigurationOptional {
|
||||||
|
/**
|
||||||
|
* User's e-mail
|
||||||
|
*/
|
||||||
|
email?: string;
|
||||||
|
/**
|
||||||
|
* User's family name
|
||||||
|
*/
|
||||||
|
familyName?: string;
|
||||||
|
/**
|
||||||
|
* User's given name
|
||||||
|
*/
|
||||||
|
givenName?: string;
|
||||||
|
/**
|
||||||
|
* Role assigned to the user
|
||||||
|
*/
|
||||||
|
role?: string;
|
||||||
|
/**
|
||||||
|
* Student ID given to the user
|
||||||
|
*/
|
||||||
|
studentId?: string;
|
||||||
|
}
|
||||||
@@ -16,7 +16,7 @@
|
|||||||
/**
|
/**
|
||||||
* An ISO8601 date
|
* An ISO8601 date
|
||||||
*
|
*
|
||||||
* @pattern ^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24\:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$
|
* @pattern ^(-?(?:[1-9][0-9]*)?[0-9]{4})-(1[0-2]|0[1-9])-(3[01]|0[1-9]|[12][0-9])(T(2[0-3]|[01][0-9]):([0-5][0-9]):([0-5][0-9])([\.,][0-9]{0,7})?(Z|[+-](?:2[0-3]|[01][0-9])(:?[0-5][0-9])?)?)?$
|
||||||
* @see https://gist.github.com/philipashlock/8830168
|
* @see https://gist.github.com/philipashlock/8830168
|
||||||
*
|
*
|
||||||
* @date
|
* @date
|
||||||
@@ -37,6 +37,6 @@ export type SCISO8601Duration = string;
|
|||||||
/**
|
/**
|
||||||
* An ISO8601 time
|
* An ISO8601 time
|
||||||
*
|
*
|
||||||
* @pattern \d{2}:\d{2}(:\d{2})?
|
* @pattern ^(2[0-3]|[01][0-9]):?([0-5][0-9]):?([0-5][0-9])$
|
||||||
*/
|
*/
|
||||||
export type SCISO8601Time = string;
|
export type SCISO8601Time = string;
|
||||||
|
|||||||
17
src/meta.ts
17
src/meta.ts
@@ -15,11 +15,12 @@
|
|||||||
import {SCThingType} from './things/abstract/thing';
|
import {SCThingType} from './things/abstract/thing';
|
||||||
import {SCAcademicEvent, SCAcademicEventMeta, SCAcademicEventWithoutReferences} from './things/academic-event';
|
import {SCAcademicEvent, SCAcademicEventMeta, SCAcademicEventWithoutReferences} from './things/academic-event';
|
||||||
import {SCArticle, SCArticleMeta, SCArticleWithoutReferences} from './things/article';
|
import {SCArticle, SCArticleMeta, SCArticleWithoutReferences} from './things/article';
|
||||||
|
import {SCAssessment, SCAssessmentMeta, SCAssessmentWithoutReferences} from './things/assessment';
|
||||||
import {SCBook, SCBookMeta, SCBookWithoutReferences} from './things/book';
|
import {SCBook, SCBookMeta, SCBookWithoutReferences} from './things/book';
|
||||||
import {SCBuilding, SCBuildingMeta, SCBuildingWithoutReferences} from './things/building';
|
import {SCBuilding, SCBuildingMeta, SCBuildingWithoutReferences} from './things/building';
|
||||||
import {SCCatalog, SCCatalogMeta, SCCatalogWithoutReferences} from './things/catalog';
|
import {SCCatalog, SCCatalogMeta, SCCatalogWithoutReferences} from './things/catalog';
|
||||||
import {SCContactPoint, SCContactPointMeta, SCContactPointWithoutReferences} from './things/contact-point';
|
import {SCContactPoint, SCContactPointMeta, SCContactPointWithoutReferences} from './things/contact-point';
|
||||||
import {SCCourseOfStudies, SCCourseOfStudiesMeta, SCCourseOfStudiesWithoutReferences} from './things/course-of-studies';
|
import {SCCourseOfStudy, SCCourseOfStudyMeta, SCCourseOfStudyWithoutReferences} from './things/course-of-study';
|
||||||
import {SCDateSeries, SCDateSeriesMeta, SCDateSeriesWithoutReferences} from './things/date-series';
|
import {SCDateSeries, SCDateSeriesMeta, SCDateSeriesWithoutReferences} from './things/date-series';
|
||||||
import {SCDiff, SCDiffMeta, SCDiffWithoutReferences} from './things/diff';
|
import {SCDiff, SCDiffMeta, SCDiffWithoutReferences} from './things/diff';
|
||||||
import {SCDish, SCDishMeta, SCDishWithoutReferences} from './things/dish';
|
import {SCDish, SCDishMeta, SCDishWithoutReferences} from './things/dish';
|
||||||
@@ -51,13 +52,14 @@ import {SCVideo, SCVideoMeta, SCVideoWithoutReferences} from './things/video';
|
|||||||
*/
|
*/
|
||||||
export const SCClasses: { [K in SCThingType]: object } = {
|
export const SCClasses: { [K in SCThingType]: object } = {
|
||||||
/* tslint:enable */
|
/* tslint:enable */
|
||||||
|
'assessment': SCAssessmentMeta,
|
||||||
'academic event': SCAcademicEventMeta,
|
'academic event': SCAcademicEventMeta,
|
||||||
'article': SCArticleMeta,
|
'article': SCArticleMeta,
|
||||||
'book': SCBookMeta,
|
'book': SCBookMeta,
|
||||||
'building': SCBuildingMeta,
|
'building': SCBuildingMeta,
|
||||||
'catalog': SCCatalogMeta,
|
'catalog': SCCatalogMeta,
|
||||||
'contact point': SCContactPointMeta,
|
'contact point': SCContactPointMeta,
|
||||||
'course of studies': SCCourseOfStudiesMeta,
|
'course of study': SCCourseOfStudyMeta,
|
||||||
'date series': SCDateSeriesMeta,
|
'date series': SCDateSeriesMeta,
|
||||||
'diff': SCDiffMeta,
|
'diff': SCDiffMeta,
|
||||||
'dish': SCDishMeta,
|
'dish': SCDishMeta,
|
||||||
@@ -81,13 +83,14 @@ export const SCClasses: { [K in SCThingType]: object } = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export type SCIndexableThings =
|
export type SCIndexableThings =
|
||||||
SCAcademicEvent
|
SCAssessment
|
||||||
|
| SCAcademicEvent
|
||||||
| SCArticle
|
| SCArticle
|
||||||
| SCBook
|
| SCBook
|
||||||
| SCBuilding
|
| SCBuilding
|
||||||
| SCCatalog
|
| SCCatalog
|
||||||
| SCContactPoint
|
| SCContactPoint
|
||||||
| SCCourseOfStudies
|
| SCCourseOfStudy
|
||||||
| SCDateSeries
|
| SCDateSeries
|
||||||
| SCDish
|
| SCDish
|
||||||
| SCFloor
|
| SCFloor
|
||||||
@@ -122,13 +125,14 @@ export type SCThingsField = keyof SCThings | string;
|
|||||||
* Thing without references for a thing
|
* Thing without references for a thing
|
||||||
*/
|
*/
|
||||||
export type SCAssociatedThingWithoutReferences<THING extends SCThings> =
|
export type SCAssociatedThingWithoutReferences<THING extends SCThings> =
|
||||||
|
THING extends SCAssessment ? SCAssessmentWithoutReferences :
|
||||||
THING extends SCAcademicEvent ? SCAcademicEventWithoutReferences :
|
THING extends SCAcademicEvent ? SCAcademicEventWithoutReferences :
|
||||||
THING extends SCArticle ? SCArticleWithoutReferences :
|
THING extends SCArticle ? SCArticleWithoutReferences :
|
||||||
THING extends SCBook ? SCBookWithoutReferences :
|
THING extends SCBook ? SCBookWithoutReferences :
|
||||||
THING extends SCBuilding ? SCBuildingWithoutReferences :
|
THING extends SCBuilding ? SCBuildingWithoutReferences :
|
||||||
THING extends SCCatalog ? SCCatalogWithoutReferences :
|
THING extends SCCatalog ? SCCatalogWithoutReferences :
|
||||||
THING extends SCContactPoint ? SCContactPointWithoutReferences :
|
THING extends SCContactPoint ? SCContactPointWithoutReferences :
|
||||||
THING extends SCCourseOfStudies ? SCCourseOfStudiesWithoutReferences :
|
THING extends SCCourseOfStudy ? SCCourseOfStudyWithoutReferences :
|
||||||
THING extends SCDateSeries ? SCDateSeriesWithoutReferences :
|
THING extends SCDateSeries ? SCDateSeriesWithoutReferences :
|
||||||
THING extends SCDiff ? SCDiffWithoutReferences :
|
THING extends SCDiff ? SCDiffWithoutReferences :
|
||||||
THING extends SCDish ? SCDishWithoutReferences :
|
THING extends SCDish ? SCDishWithoutReferences :
|
||||||
@@ -155,13 +159,14 @@ export type SCAssociatedThingWithoutReferences<THING extends SCThings> =
|
|||||||
* Thing for a thing without references
|
* Thing for a thing without references
|
||||||
*/
|
*/
|
||||||
export type SCAssociatedThing<THING extends SCThings> =
|
export type SCAssociatedThing<THING extends SCThings> =
|
||||||
|
THING extends SCAssessmentWithoutReferences ? SCAssessment :
|
||||||
THING extends SCAcademicEventWithoutReferences ? SCAcademicEvent :
|
THING extends SCAcademicEventWithoutReferences ? SCAcademicEvent :
|
||||||
THING extends SCArticleWithoutReferences ? SCArticle :
|
THING extends SCArticleWithoutReferences ? SCArticle :
|
||||||
THING extends SCBookWithoutReferences ? SCBook :
|
THING extends SCBookWithoutReferences ? SCBook :
|
||||||
THING extends SCBuildingWithoutReferences ? SCBuilding :
|
THING extends SCBuildingWithoutReferences ? SCBuilding :
|
||||||
THING extends SCCatalogWithoutReferences ? SCCatalog :
|
THING extends SCCatalogWithoutReferences ? SCCatalog :
|
||||||
THING extends SCContactPointWithoutReferences ? SCContactPoint :
|
THING extends SCContactPointWithoutReferences ? SCContactPoint :
|
||||||
THING extends SCCourseOfStudiesWithoutReferences ? SCCourseOfStudies :
|
THING extends SCCourseOfStudyWithoutReferences ? SCCourseOfStudy :
|
||||||
THING extends SCDateSeriesWithoutReferences ? SCDateSeries :
|
THING extends SCDateSeriesWithoutReferences ? SCDateSeries :
|
||||||
THING extends SCDiffWithoutReferences ? SCDiff :
|
THING extends SCDiffWithoutReferences ? SCDiff :
|
||||||
THING extends SCDishWithoutReferences ? SCDish :
|
THING extends SCDishWithoutReferences ? SCDish :
|
||||||
|
|||||||
@@ -78,9 +78,9 @@ export interface SCRoute {
|
|||||||
statusCodeSuccess: number;
|
statusCodeSuccess: number;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* URL fragment of the route
|
* URL path of the route
|
||||||
*/
|
*/
|
||||||
urlFragment: string;
|
urlPath: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -112,16 +112,16 @@ export abstract class SCAbstractRoute implements SCRoute {
|
|||||||
*/
|
*/
|
||||||
statusCodeSuccess = 200;
|
statusCodeSuccess = 200;
|
||||||
/**
|
/**
|
||||||
* @see SCRoute.urlFragment
|
* @see SCRoute.urlPath
|
||||||
*/
|
*/
|
||||||
urlFragment = '/';
|
urlPath = '/';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get "compiled" URL fragment
|
* Get "compiled" URL path
|
||||||
*
|
*
|
||||||
* @param parameters Parameters to compile URL fragment with
|
* @param parameters Parameters to compile URL path with
|
||||||
*/
|
*/
|
||||||
public getUrlFragment(parameters: SCMap<string> = {}): string {
|
public getUrlPath(parameters: SCMap<string> = {}): string {
|
||||||
let obligatoryParameters: string[] = [];
|
let obligatoryParameters: string[] = [];
|
||||||
|
|
||||||
if (typeof this.obligatoryParameters === 'object') {
|
if (typeof this.obligatoryParameters === 'object') {
|
||||||
@@ -132,7 +132,7 @@ export abstract class SCAbstractRoute implements SCRoute {
|
|||||||
throw new Error('Extraneous parameters provided.');
|
throw new Error('Extraneous parameters provided.');
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.urlFragment
|
return this.urlPath
|
||||||
.split('/')
|
.split('/')
|
||||||
.map((part) => {
|
.map((part) => {
|
||||||
if (part.indexOf(':') !== 0) {
|
if (part.indexOf(':') !== 0) {
|
||||||
|
|||||||
@@ -89,6 +89,6 @@ export class SCBookAvailabilityRoute extends SCAbstractRoute {
|
|||||||
this.requestBodyName = 'SCBookAvailabilityRequest';
|
this.requestBodyName = 'SCBookAvailabilityRequest';
|
||||||
this.responseBodyName = 'SCBookAvailabilityResponse';
|
this.responseBodyName = 'SCBookAvailabilityResponse';
|
||||||
this.statusCodeSuccess = StatusCodes.OK;
|
this.statusCodeSuccess = StatusCodes.OK;
|
||||||
this.urlFragment = '/bookAvailability';
|
this.urlPath = '/bookAvailability';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -60,6 +60,6 @@ export class SCBulkAddRoute extends SCAbstractRoute {
|
|||||||
this.requestBodyName = 'SCBulkAddRequest';
|
this.requestBodyName = 'SCBulkAddRequest';
|
||||||
this.responseBodyName = 'SCBulkAddResponse';
|
this.responseBodyName = 'SCBulkAddResponse';
|
||||||
this.statusCodeSuccess = StatusCodes.CREATED;
|
this.statusCodeSuccess = StatusCodes.CREATED;
|
||||||
this.urlFragment = '/bulk/:UID';
|
this.urlPath = '/bulk/:UID';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -60,6 +60,6 @@ export class SCBulkDoneRoute extends SCAbstractRoute {
|
|||||||
this.requestBodyName = 'SCBulkDoneRequest';
|
this.requestBodyName = 'SCBulkDoneRequest';
|
||||||
this.responseBodyName = 'SCBulkDoneResponse';
|
this.responseBodyName = 'SCBulkDoneResponse';
|
||||||
this.statusCodeSuccess = StatusCodes.NO_CONTENT;
|
this.statusCodeSuccess = StatusCodes.NO_CONTENT;
|
||||||
this.urlFragment = '/bulk/:UID/done';
|
this.urlPath = '/bulk/:UID/done';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -99,6 +99,6 @@ export class SCBulkRoute extends SCAbstractRoute {
|
|||||||
this.requestBodyName = 'SCBulkRequest';
|
this.requestBodyName = 'SCBulkRequest';
|
||||||
this.responseBodyName = 'SCBulkResponse';
|
this.responseBodyName = 'SCBulkResponse';
|
||||||
this.statusCodeSuccess = StatusCodes.OK;
|
this.statusCodeSuccess = StatusCodes.OK;
|
||||||
this.urlFragment = '/bulk';
|
this.urlPath = '/bulk';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ export class SCFeedbackRoute extends SCAbstractRoute {
|
|||||||
this.requestBodyName = 'SCFeedbackRequest';
|
this.requestBodyName = 'SCFeedbackRequest';
|
||||||
this.responseBodyName = 'SCFeedbackResponse';
|
this.responseBodyName = 'SCFeedbackResponse';
|
||||||
this.statusCodeSuccess = StatusCodes.OK;
|
this.statusCodeSuccess = StatusCodes.OK;
|
||||||
this.urlFragment = '/feedback';
|
this.urlPath = '/feedback';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
*/
|
*/
|
||||||
import {StatusCodes} from 'http-status-codes';
|
import {StatusCodes} from 'http-status-codes';
|
||||||
import {SCAppConfiguration} from '../../config/app';
|
import {SCAppConfiguration} from '../../config/app';
|
||||||
|
import {SCAuthorizationProvider, SCAuthorizationProviderType} from '../../config/authorization';
|
||||||
import {SCBackendConfiguration} from '../../config/backend';
|
import {SCBackendConfiguration} from '../../config/backend';
|
||||||
import {SCInternalServerErrorResponse} from '../errors/internal-server-error';
|
import {SCInternalServerErrorResponse} from '../errors/internal-server-error';
|
||||||
import {SCMethodNotAllowedErrorResponse} from '../errors/method-not-allowed';
|
import {SCMethodNotAllowedErrorResponse} from '../errors/method-not-allowed';
|
||||||
@@ -42,6 +43,11 @@ export interface SCIndexResponse {
|
|||||||
*/
|
*/
|
||||||
app: SCAppConfiguration;
|
app: SCAppConfiguration;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @see SCAuthorizationProvider
|
||||||
|
*/
|
||||||
|
auth: { [key in SCAuthorizationProviderType]?: SCAuthorizationProvider; };
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see SCBackendConfiguration
|
* @see SCBackendConfiguration
|
||||||
*/
|
*/
|
||||||
@@ -66,6 +72,6 @@ export class SCIndexRoute extends SCAbstractRoute {
|
|||||||
this.requestBodyName = 'SCIndexRequest';
|
this.requestBodyName = 'SCIndexRequest';
|
||||||
this.responseBodyName = 'SCIndexResponse';
|
this.responseBodyName = 'SCIndexResponse';
|
||||||
this.statusCodeSuccess = StatusCodes.OK;
|
this.statusCodeSuccess = StatusCodes.OK;
|
||||||
this.urlFragment = '/';
|
this.urlPath = '/';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -123,6 +123,6 @@ export class SCPluginRegisterRoute extends SCAbstractRoute {
|
|||||||
this.requestBodyName = 'SCPluginRegisterRequest';
|
this.requestBodyName = 'SCPluginRegisterRequest';
|
||||||
this.responseBodyName = 'SCPluginRegisterResponse';
|
this.responseBodyName = 'SCPluginRegisterResponse';
|
||||||
this.statusCodeSuccess = StatusCodes.OK;
|
this.statusCodeSuccess = StatusCodes.OK;
|
||||||
this.urlFragment = '/plugin/register';
|
this.urlPath = '/plugin/register';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -64,6 +64,6 @@ export class SCMultiSearchRoute extends SCAbstractRoute {
|
|||||||
this.requestBodyName = 'SCMultiSearchRequest';
|
this.requestBodyName = 'SCMultiSearchRequest';
|
||||||
this.responseBodyName = 'SCMultiSearchResponse';
|
this.responseBodyName = 'SCMultiSearchResponse';
|
||||||
this.statusCodeSuccess = StatusCodes.OK;
|
this.statusCodeSuccess = StatusCodes.OK;
|
||||||
this.urlFragment = '/search/multi';
|
this.urlPath = '/search/multi';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -57,6 +57,6 @@ export class SCSearchRoute extends SCAbstractRoute {
|
|||||||
this.requestBodyName = 'SCSearchRequest';
|
this.requestBodyName = 'SCSearchRequest';
|
||||||
this.responseBodyName = 'SCSearchResponse';
|
this.responseBodyName = 'SCSearchResponse';
|
||||||
this.statusCodeSuccess = StatusCodes.OK;
|
this.statusCodeSuccess = StatusCodes.OK;
|
||||||
this.urlFragment = '/search';
|
this.urlPath = '/search';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -61,6 +61,6 @@ export class SCThingUpdateRoute extends SCAbstractRoute {
|
|||||||
this.requestBodyName = 'SCThingUpdateRequest';
|
this.requestBodyName = 'SCThingUpdateRequest';
|
||||||
this.responseBodyName = 'SCThingUpdateResponse';
|
this.responseBodyName = 'SCThingUpdateResponse';
|
||||||
this.statusCodeSuccess = StatusCodes.OK;
|
this.statusCodeSuccess = StatusCodes.OK;
|
||||||
this.urlFragment = '/:TYPE/:UID';
|
this.urlPath = '/:TYPE/:UID';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,26 +22,25 @@ export interface SCAcademicDegreeWithoutReferences
|
|||||||
extends SCThingWithoutReferences {
|
extends SCThingWithoutReferences {
|
||||||
/**
|
/**
|
||||||
* The achievable academic degree
|
* The achievable academic degree
|
||||||
|
*
|
||||||
|
* @filterable
|
||||||
|
* @sortable ducet
|
||||||
*/
|
*/
|
||||||
academicDegree: SCGermanAcademicDegree;
|
academicDegree: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The achievable academic degree with academic field specification
|
* The achievable academic degree with academic field specification
|
||||||
* (eg. Master of Science)
|
* (eg. Master of Science)
|
||||||
*
|
*
|
||||||
* @filterable
|
|
||||||
* @keyword
|
|
||||||
*/
|
*/
|
||||||
academicDegreewithField: string;
|
academicDegreewithField?: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The achievable academic degree with academic field specification
|
* The achievable academic degree with academic field specification
|
||||||
* shorted (eg. M.Sc.).
|
* shorted (eg. M.Sc.).
|
||||||
*
|
*
|
||||||
* @filterable
|
|
||||||
* @keyword
|
|
||||||
*/
|
*/
|
||||||
academicDegreewithFieldShort: string;
|
academicDegreewithFieldShort?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -63,9 +62,9 @@ export class SCAcademicDegreeMeta
|
|||||||
fieldTranslations = {
|
fieldTranslations = {
|
||||||
de: {
|
de: {
|
||||||
...SCThingMeta.getInstance<SCThingMeta>().fieldTranslations.de,
|
...SCThingMeta.getInstance<SCThingMeta>().fieldTranslations.de,
|
||||||
academicDegree: 'Hochschulgrad',
|
academicDegree: 'Abschlussgrad',
|
||||||
academicDegreewithField: 'Abschlussbezeichnungen',
|
academicDegreewithField: 'Abschlussbezeichnung',
|
||||||
academicDegreewithFieldShort: 'Abschlussbezeichnungen (kurz)',
|
academicDegreewithFieldShort: 'Abschlussbezeichnung (kurz)',
|
||||||
},
|
},
|
||||||
en: {
|
en: {
|
||||||
...SCThingMeta.getInstance<SCThingMeta>().fieldTranslations.en,
|
...SCThingMeta.getInstance<SCThingMeta>().fieldTranslations.en,
|
||||||
@@ -81,32 +80,9 @@ export class SCAcademicDegreeMeta
|
|||||||
fieldValueTranslations = {
|
fieldValueTranslations = {
|
||||||
de: {
|
de: {
|
||||||
...SCThingMeta.getInstance<SCThingMeta>().fieldValueTranslations.de,
|
...SCThingMeta.getInstance<SCThingMeta>().fieldValueTranslations.de,
|
||||||
academicDegree: {
|
|
||||||
'bachelor': 'Bachelor',
|
|
||||||
'diploma': 'Diplom',
|
|
||||||
'doctor': 'Doktor',
|
|
||||||
'licentiate': 'Lizenziat',
|
|
||||||
'magister': 'Magister',
|
|
||||||
'master': 'Master',
|
|
||||||
'masterstudent': 'Meisterschüler',
|
|
||||||
'state examination': 'Staatsexamen',
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
en: {
|
en: {
|
||||||
...SCThingMeta.getInstance<SCThingMeta>().fieldValueTranslations.en,
|
...SCThingMeta.getInstance<SCThingMeta>().fieldValueTranslations.en,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Types of (german) academic degrees
|
|
||||||
*/
|
|
||||||
export type SCGermanAcademicDegree =
|
|
||||||
'bachelor'
|
|
||||||
| 'diploma'
|
|
||||||
| 'doctor'
|
|
||||||
| 'licentiate'
|
|
||||||
| 'magister'
|
|
||||||
| 'master'
|
|
||||||
| 'master pupil'
|
|
||||||
| 'state examination' ;
|
|
||||||
|
|||||||
@@ -71,6 +71,13 @@ export interface SCCreativeWorkWithoutReferences
|
|||||||
*/
|
*/
|
||||||
keywords?: string[];
|
keywords?: string[];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Date (in text form) the creative work was most recently
|
||||||
|
*
|
||||||
|
* @keyword
|
||||||
|
*/
|
||||||
|
lastPublished?: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Translated fields of the creative work
|
* Translated fields of the creative work
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -107,7 +107,7 @@ export interface SCThingThatCanBeOfferedOffer<T extends SCPriceGroup>
|
|||||||
/**
|
/**
|
||||||
* List of prices that are distinct for specific groups
|
* List of prices that are distinct for specific groups
|
||||||
*/
|
*/
|
||||||
prices: T;
|
prices?: T;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Provider of an offer
|
* Provider of an offer
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ import {SCPersonWithoutReferences} from '../person';
|
|||||||
* Types a thing can be
|
* Types a thing can be
|
||||||
*/
|
*/
|
||||||
export enum SCThingType {
|
export enum SCThingType {
|
||||||
|
Assessment = 'assessment',
|
||||||
AcademicEvent = 'academic event',
|
AcademicEvent = 'academic event',
|
||||||
Article = 'article',
|
Article = 'article',
|
||||||
Book = 'book',
|
Book = 'book',
|
||||||
@@ -30,7 +31,7 @@ export enum SCThingType {
|
|||||||
Building = 'building',
|
Building = 'building',
|
||||||
Catalog = 'catalog',
|
Catalog = 'catalog',
|
||||||
ContactPoint = 'contact point',
|
ContactPoint = 'contact point',
|
||||||
CourseOfStudies = 'course of studies',
|
CourseOfStudy = 'course of study',
|
||||||
DateSeries = 'date series',
|
DateSeries = 'date series',
|
||||||
Diff = 'diff',
|
Diff = 'diff',
|
||||||
Dish = 'dish',
|
Dish = 'dish',
|
||||||
|
|||||||
162
src/things/assessment.ts
Normal file
162
src/things/assessment.ts
Normal file
@@ -0,0 +1,162 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2019-2021 StApps
|
||||||
|
* This program is free software: you can redistribute it and/or modify it
|
||||||
|
* under the terms of the GNU General Public License as published by the Free
|
||||||
|
* Software Foundation, version 3.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||||
|
* more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along with
|
||||||
|
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import {SCMetaTranslations, SCTranslations} from '../general/i18n';
|
||||||
|
import {SCISO8601Date} from '../general/time';
|
||||||
|
import {SCThing, SCThingMeta, SCThingType} from './abstract/thing';
|
||||||
|
import {SCThingWithCategories, SCThingWithCategoriesSpecificValues, SCThingWithCategoriesTranslatableProperties, SCThingWithCategoriesWithoutReferences, SCThingWithCategoriesWithoutReferencesMeta} from './abstract/thing-with-categories';
|
||||||
|
import {SCCourseOfStudyWithoutReferences} from './course-of-study';
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Categories of assessments
|
||||||
|
*/
|
||||||
|
export type SCAssessmentCategories = 'university assessment';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* An assessment without references
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export interface SCAssessmentWithoutReferences
|
||||||
|
extends SCThingWithCategoriesWithoutReferences<SCAssessmentCategories, SCThingWithCategoriesSpecificValues> {
|
||||||
|
/**
|
||||||
|
* Number of attempts
|
||||||
|
*
|
||||||
|
* @integer
|
||||||
|
*/
|
||||||
|
attempt?: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Date assessment was taken or graded
|
||||||
|
*/
|
||||||
|
date?: SCISO8601Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ECTS (credit-points)
|
||||||
|
*
|
||||||
|
* @float
|
||||||
|
*/
|
||||||
|
ects?: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Grade
|
||||||
|
*/
|
||||||
|
grade: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Current status
|
||||||
|
*/
|
||||||
|
status?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Translated fields of an assessment
|
||||||
|
*/
|
||||||
|
translations?: SCTranslations<SCAssessmentTranslatableProperties>;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Type of an assessment
|
||||||
|
*/
|
||||||
|
type: SCThingType.Assessment;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* An assessment
|
||||||
|
*
|
||||||
|
* @validatable
|
||||||
|
*/
|
||||||
|
export interface SCAssessment
|
||||||
|
extends SCAssessmentWithoutReferences, SCThing,
|
||||||
|
SCThingWithCategories<SCAssessmentCategories, SCThingWithCategoriesSpecificValues> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Course of study the assessment was taken for
|
||||||
|
*/
|
||||||
|
courseOfStudy?: SCCourseOfStudyWithoutReferences;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* An array of assessments from the 'level 0' (root) assessment to the direct parent
|
||||||
|
*/
|
||||||
|
superAssessments?: SCAssessmentWithoutReferences[];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Translated fields of an assessment
|
||||||
|
*/
|
||||||
|
translations?: SCTranslations<SCAssessmentTranslatableProperties>;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Type of an assessment
|
||||||
|
*/
|
||||||
|
type: SCThingType.Assessment;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface SCAssessmentTranslatableProperties
|
||||||
|
extends SCThingWithCategoriesTranslatableProperties {
|
||||||
|
/**
|
||||||
|
* @see SCAssessmentWithoutReferences.status
|
||||||
|
*/
|
||||||
|
status?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Study module meta data
|
||||||
|
*/
|
||||||
|
export class SCAssessmentMeta
|
||||||
|
extends SCThingMeta
|
||||||
|
implements SCMetaTranslations<SCAssessment> {
|
||||||
|
/**
|
||||||
|
* Translations of fields
|
||||||
|
*/
|
||||||
|
fieldTranslations = {
|
||||||
|
de: {
|
||||||
|
...SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCAssessmentCategories,
|
||||||
|
SCThingWithCategoriesSpecificValues>().fieldTranslations.de,
|
||||||
|
attempt: 'Versuch',
|
||||||
|
courseOfStudy: 'Studiengang',
|
||||||
|
date: 'Datum',
|
||||||
|
ects: 'ECTS-Punkte',
|
||||||
|
grade: 'Note',
|
||||||
|
status: 'Status',
|
||||||
|
superAssessments: 'übergeordnete Prüfungen',
|
||||||
|
},
|
||||||
|
en: {
|
||||||
|
...SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCAssessmentCategories,
|
||||||
|
SCThingWithCategoriesSpecificValues>().fieldTranslations.en,
|
||||||
|
attempt: 'attempt',
|
||||||
|
courseOfStudy: 'course of study',
|
||||||
|
date: 'date',
|
||||||
|
ects: 'ECTS points',
|
||||||
|
grade: 'grade',
|
||||||
|
status: 'status',
|
||||||
|
superAssessments: 'parent assessments',
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Translations of values of fields
|
||||||
|
*/
|
||||||
|
fieldValueTranslations = {
|
||||||
|
de: {
|
||||||
|
...SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCAssessmentCategories,
|
||||||
|
SCThingWithCategoriesSpecificValues>().fieldValueTranslations.de,
|
||||||
|
type: 'Prüfung',
|
||||||
|
},
|
||||||
|
en: {
|
||||||
|
...SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCAssessmentCategories,
|
||||||
|
SCThingWithCategoriesSpecificValues>().fieldValueTranslations.en,
|
||||||
|
type: SCThingType.Assessment,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -26,94 +26,90 @@ import {SCDateSeriesWithoutReferences} from './date-series';
|
|||||||
import {SCOrganizationWithoutReferences} from './organization';
|
import {SCOrganizationWithoutReferences} from './organization';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A course of studies without references
|
* A course of study without references
|
||||||
*/
|
*/
|
||||||
export interface SCCourseOfStudiesWithoutReferences
|
export interface SCCourseOfStudyWithoutReferences
|
||||||
extends SCAcademicDegreeWithoutReferences, SCThingThatCanBeOfferedWithoutReferences {
|
extends SCAcademicDegreeWithoutReferences, SCThingThatCanBeOfferedWithoutReferences {
|
||||||
/**
|
/**
|
||||||
* The main language in which the course of studies
|
* The main language in which the course of study
|
||||||
* is beeing offered
|
* is beeing offered
|
||||||
*/
|
*/
|
||||||
mainLanguage: SCLanguage;
|
mainLanguage?: SCLanguage;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Actual major of the course of studies (eg. physics)
|
* The modes the course of study is offered in
|
||||||
*
|
*
|
||||||
* @filterable
|
* @filterable
|
||||||
* @keyword
|
|
||||||
*/
|
*/
|
||||||
major: string;
|
mode?: SCCourseOfStudyMode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The modes the course of studies is offered in
|
* The time modes the course of study is offered in
|
||||||
|
*
|
||||||
|
* @filterable
|
||||||
*/
|
*/
|
||||||
mode: SCCourseOfStudiesMode;
|
timeMode?: SCCourseOfStudyTimeMode;
|
||||||
|
|
||||||
/**
|
|
||||||
* The time modes the course of studies is offered in
|
|
||||||
*/
|
|
||||||
timeMode: SCCourseOfStudiesTimeMode;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Translated fields of a dish
|
* Translated fields of a dish
|
||||||
*/
|
*/
|
||||||
translations?: SCTranslations<SCCourseOfStudiesTranslatableProperties>;
|
translations?: SCTranslations<SCCourseOfStudyTranslatableProperties>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Type of the course of studies
|
* Type of the course of study
|
||||||
*/
|
*/
|
||||||
type: SCThingType.CourseOfStudies;
|
type: SCThingType.CourseOfStudy;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A course of studies
|
* A course of study
|
||||||
*
|
*
|
||||||
* @validatable
|
* @validatable
|
||||||
* @indexable
|
* @indexable
|
||||||
*/
|
*/
|
||||||
export interface SCCourseOfStudies
|
export interface SCCourseOfStudy
|
||||||
extends SCCourseOfStudiesWithoutReferences, SCThingThatCanBeOffered<SCAcademicPriceGroup>, SCAcademicDegree {
|
extends SCCourseOfStudyWithoutReferences, SCThingThatCanBeOffered<SCAcademicPriceGroup>, SCAcademicDegree {
|
||||||
/**
|
/**
|
||||||
* The department that manages the course of studies
|
* The department that manages the course of study
|
||||||
*/
|
*/
|
||||||
department: SCOrganizationWithoutReferences;
|
department?: SCOrganizationWithoutReferences;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The secretary that administers requests and
|
* The secretary that administers requests and
|
||||||
* questions concerning the course of studies
|
* questions concerning the course of study
|
||||||
*/
|
*/
|
||||||
secretary: SCOrganizationWithoutReferences;
|
secretary?: SCOrganizationWithoutReferences;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Dates at which the course of studies is planned to start
|
* Dates at which the course of study is planned to start
|
||||||
*/
|
*/
|
||||||
startDates?: SCDateSeriesWithoutReferences[];
|
startDates?: SCDateSeriesWithoutReferences[];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Translated fields of a course of studies
|
* Translated fields of a course of study
|
||||||
*/
|
*/
|
||||||
translations?: SCTranslations<SCCourseOfStudiesTranslatableProperties>;
|
translations?: SCTranslations<SCCourseOfStudyTranslatableProperties>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Type of the course of studies
|
* Type of the course of study
|
||||||
*/
|
*/
|
||||||
type: SCThingType.CourseOfStudies;
|
type: SCThingType.CourseOfStudy;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Translatable properties of a course of studies
|
* Translatable properties of a course of study
|
||||||
*/
|
*/
|
||||||
export interface SCCourseOfStudiesTranslatableProperties
|
export interface SCCourseOfStudyTranslatableProperties
|
||||||
extends SCThingThatCanBeOfferedTranslatableProperties {
|
extends SCThingThatCanBeOfferedTranslatableProperties {
|
||||||
// noop
|
// noop
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Meta information about a course of studies
|
* Meta information about a course of study
|
||||||
*/
|
*/
|
||||||
export class SCCourseOfStudiesMeta
|
export class SCCourseOfStudyMeta
|
||||||
extends SCThingMeta
|
extends SCThingMeta
|
||||||
implements SCMetaTranslations<SCCourseOfStudies> {
|
implements SCMetaTranslations<SCCourseOfStudy> {
|
||||||
/**
|
/**
|
||||||
* Translations of fields
|
* Translations of fields
|
||||||
*/
|
*/
|
||||||
@@ -125,7 +121,6 @@ export class SCCourseOfStudiesMeta
|
|||||||
.fieldTranslations.de,
|
.fieldTranslations.de,
|
||||||
department: 'Fachbereich',
|
department: 'Fachbereich',
|
||||||
mainLanguage: 'Unterrichtssprache',
|
mainLanguage: 'Unterrichtssprache',
|
||||||
major: 'Studienfach',
|
|
||||||
mode: 'Studiengangsart',
|
mode: 'Studiengangsart',
|
||||||
secretary: 'Sekretariat',
|
secretary: 'Sekretariat',
|
||||||
startDates: 'Startdatum',
|
startDates: 'Startdatum',
|
||||||
@@ -138,7 +133,6 @@ export class SCCourseOfStudiesMeta
|
|||||||
.fieldTranslations.de,
|
.fieldTranslations.de,
|
||||||
department: 'department',
|
department: 'department',
|
||||||
mainLanguage: 'main language',
|
mainLanguage: 'main language',
|
||||||
major: 'major',
|
|
||||||
mode: 'mode',
|
mode: 'mode',
|
||||||
secretary: 'secretary',
|
secretary: 'secretary',
|
||||||
startDates: 'start dates',
|
startDates: 'start dates',
|
||||||
@@ -167,30 +161,30 @@ export class SCCourseOfStudiesMeta
|
|||||||
en: {
|
en: {
|
||||||
...SCAcademicDegreeMeta.getInstance().fieldValueTranslations.en,
|
...SCAcademicDegreeMeta.getInstance().fieldValueTranslations.en,
|
||||||
modes: {
|
modes: {
|
||||||
combination: 'combination course of studies',
|
combination: 'combination course of study',
|
||||||
'double-degree': 'double degree course of studies',
|
'double-degree': 'double degree course of study',
|
||||||
dual: 'dual course of studies',
|
dual: 'dual course of study',
|
||||||
standard: 'course of studies',
|
standard: 'course of study',
|
||||||
},
|
},
|
||||||
timeMode: {
|
timeMode: {
|
||||||
fulltime: 'full-time',
|
fulltime: 'full-time',
|
||||||
parttime: 'part-time',
|
parttime: 'part-time',
|
||||||
},
|
},
|
||||||
type: SCThingType.CourseOfStudies,
|
type: SCThingType.CourseOfStudy,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Types of (german) course of studies modes
|
* Types of (german) course of study modes
|
||||||
*/
|
*/
|
||||||
export type SCCourseOfStudiesMode = 'combination'
|
export type SCCourseOfStudyMode = 'combination'
|
||||||
| 'dual'
|
| 'dual'
|
||||||
| 'double-degree'
|
| 'double-degree'
|
||||||
| 'standard' ;
|
| 'standard' ;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Types of (german) course of studies time modes
|
* Types of (german) course of study time modes
|
||||||
*/
|
*/
|
||||||
export type SCCourseOfStudiesTimeMode = 'fulltime'
|
export type SCCourseOfStudyTimeMode = 'fulltime'
|
||||||
| 'parttime' ;
|
| 'parttime' ;
|
||||||
@@ -12,8 +12,8 @@
|
|||||||
* You should have received a copy of the GNU General Public License along with
|
* You should have received a copy of the GNU General Public License along with
|
||||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
import clone = require('fast-clone');
|
|
||||||
import equal = require('fast-deep-equal/es6');
|
import equal = require('fast-deep-equal/es6');
|
||||||
|
import clone = require('rfdc');
|
||||||
import {Defined, TSOCType} from 'ts-optchain';
|
import {Defined, TSOCType} from 'ts-optchain';
|
||||||
import {SCLanguageCode} from './general/i18n';
|
import {SCLanguageCode} from './general/i18n';
|
||||||
import {isThing} from './guards';
|
import {isThing} from './guards';
|
||||||
@@ -234,7 +234,7 @@ export class SCThingTranslator {
|
|||||||
return cachedInstance as T;
|
return cachedInstance as T;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const translatedInstance = this.translateThingInPlaceDestructively(clone(thing));
|
const translatedInstance = this.translateThingInPlaceDestructively(clone()(thing));
|
||||||
delete translatedInstance.translations;
|
delete translatedInstance.translations;
|
||||||
this.cache.putObject(translatedInstance);
|
this.cache.putObject(translatedInstance);
|
||||||
this.sourceCache.putObject(thing);
|
this.sourceCache.putObject(thing);
|
||||||
@@ -267,7 +267,7 @@ export class SCThingTranslator {
|
|||||||
return this.deeptranslate((objTranslatedFromCache as any)[key]);
|
return this.deeptranslate((objTranslatedFromCache as any)[key]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const objTranslated = this.translateThingInPlaceDestructively(clone(obj));
|
const objTranslated = this.translateThingInPlaceDestructively(clone()(obj));
|
||||||
this.cache.putObject(objTranslated);
|
this.cache.putObject(objTranslated);
|
||||||
this.sourceCache.putObject(thing);
|
this.sourceCache.putObject(thing);
|
||||||
|
|
||||||
@@ -281,7 +281,7 @@ export class SCThingTranslator {
|
|||||||
* Given a SCThingType this function returns an object with the same basic structure as the corresponding SCThing
|
* Given a SCThingType this function returns an object with the same basic structure as the corresponding SCThing
|
||||||
* All the values will be set to the known translations of the property/key name
|
* All the values will be set to the known translations of the property/key name
|
||||||
* @example
|
* @example
|
||||||
* const translatedMetaDish = translator.translatedPropertyNames<SCCourseOfStudies>(SCThingType.CourseOfStudies);
|
* const translatedMetaDish = translator.translatedPropertyNames<SCCourseOfStudy>(SCThingType.CourseOfStudy);
|
||||||
* @param type The type whose property names will be translated
|
* @param type The type whose property names will be translated
|
||||||
* @returns An object with the properties of the SCThingType where the values are the known property tranlations
|
* @returns An object with the properties of the SCThingType where the values are the known property tranlations
|
||||||
*/
|
*/
|
||||||
|
|||||||
36
test/resources/Assessment.1.json
Normal file
36
test/resources/Assessment.1.json
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
{
|
||||||
|
"errorNames": [],
|
||||||
|
"instance": {
|
||||||
|
"attempt": 1,
|
||||||
|
"date": "2020-04-01",
|
||||||
|
"ects": 20,
|
||||||
|
"grade": "N/A",
|
||||||
|
"status": "ongoing",
|
||||||
|
"uid": "681a59a1-23c2-5d78-861a-8c86a3abf404",
|
||||||
|
"name": "Introductory courses extreme math",
|
||||||
|
"categories": [
|
||||||
|
"university assessment"
|
||||||
|
],
|
||||||
|
"courseOfStudy": {
|
||||||
|
"academicDegree": "bachelor",
|
||||||
|
"academicDegreewithField": "Bachelor of Arts",
|
||||||
|
"academicDegreewithFieldShort": "B.A.",
|
||||||
|
"mainLanguage": {
|
||||||
|
"code": "de",
|
||||||
|
"name": "german"
|
||||||
|
},
|
||||||
|
"mode": "dual",
|
||||||
|
"name": "Astroturfing",
|
||||||
|
"timeMode": "parttime",
|
||||||
|
"type": "course of study",
|
||||||
|
"uid": "4c6f0a18-343d-5175-9fb1-62d28545c2aa"
|
||||||
|
},
|
||||||
|
"origin": {
|
||||||
|
"indexed": "2020-04-11T12:30:00Z",
|
||||||
|
"name": "Dummy",
|
||||||
|
"type": "remote"
|
||||||
|
},
|
||||||
|
"type": "assessment"
|
||||||
|
},
|
||||||
|
"schema": "SCAssessment"
|
||||||
|
}
|
||||||
51
test/resources/Assessment.2.json
Normal file
51
test/resources/Assessment.2.json
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
{
|
||||||
|
"errorNames": [],
|
||||||
|
"instance": {
|
||||||
|
"attempt": 1,
|
||||||
|
"date": "2020-04-01",
|
||||||
|
"ects": 6,
|
||||||
|
"grade": "very much 1.0",
|
||||||
|
"status": "passed",
|
||||||
|
"uid": "681a59a1-23c2-5d78-861a-8c86a3abf303",
|
||||||
|
"name": "Mathe 9001",
|
||||||
|
"categories": [
|
||||||
|
"university assessment"
|
||||||
|
],
|
||||||
|
"superAssessments": [
|
||||||
|
{
|
||||||
|
"attempt": 1,
|
||||||
|
"date": "2020-04-01",
|
||||||
|
"ects": 20,
|
||||||
|
"grade": "N/A",
|
||||||
|
"status": "ongoing",
|
||||||
|
"uid": "681a59a1-23c2-5d78-861a-8c86a3abf404",
|
||||||
|
"name": "Introductory courses extreme math",
|
||||||
|
"categories": [
|
||||||
|
"university assessment"
|
||||||
|
],
|
||||||
|
"type": "assessment"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"courseOfStudy": {
|
||||||
|
"academicDegree": "bachelor",
|
||||||
|
"academicDegreewithField": "Bachelor of Arts",
|
||||||
|
"academicDegreewithFieldShort": "B.A.",
|
||||||
|
"mainLanguage": {
|
||||||
|
"code": "de",
|
||||||
|
"name": "german"
|
||||||
|
},
|
||||||
|
"mode": "dual",
|
||||||
|
"name": "Astroturfing",
|
||||||
|
"timeMode": "parttime",
|
||||||
|
"type": "course of study",
|
||||||
|
"uid": "4c6f0a18-343d-5175-9fb1-62d28545c2aa"
|
||||||
|
},
|
||||||
|
"origin": {
|
||||||
|
"indexed": "2020-04-11T12:30:00Z",
|
||||||
|
"name": "Dummy",
|
||||||
|
"type": "remote"
|
||||||
|
},
|
||||||
|
"type": "assessment"
|
||||||
|
},
|
||||||
|
"schema": "SCAssessment"
|
||||||
|
}
|
||||||
@@ -16,13 +16,13 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"firstPublished": "2008",
|
"firstPublished": "2008",
|
||||||
"sameAs": "https://hds2test.hebis.de/ubffm/Record/HEB198305427",
|
"sameAs": "https://ubffm.hds.hebis.de/Record/HEB198305427",
|
||||||
"origin": {
|
"origin": {
|
||||||
"indexed": "2018-09-11T12:30:00Z",
|
"indexed": "2018-09-11T12:30:00Z",
|
||||||
"name": "HeBIS HDS",
|
"name": "HeBIS HDS",
|
||||||
"originalId": "HEB198305427",
|
"originalId": "HEB198305427",
|
||||||
"type": "remote",
|
"type": "remote",
|
||||||
"url": "https://hds2.hebis.de/ubffm/"
|
"url": "https://ubffm.hds.hebis.de"
|
||||||
},
|
},
|
||||||
"isPartOf": {
|
"isPartOf": {
|
||||||
"uid": "bc5e5399-a24c-5c01-9c1b-0c8b83272087",
|
"uid": "bc5e5399-a24c-5c01-9c1b-0c8b83272087",
|
||||||
|
|||||||
@@ -16,13 +16,13 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"firstPublished": "2002",
|
"firstPublished": "2002",
|
||||||
"sameAs": "https://hds2test.hebis.de/ubffm/Record/HEB107025590",
|
"sameAs": "https://ubffm.hds.hebis.de/Record/HEB107025590",
|
||||||
"origin": {
|
"origin": {
|
||||||
"indexed": "2018-09-11T12:30:00Z",
|
"indexed": "2018-09-11T12:30:00Z",
|
||||||
"name": "HeBIS HDS",
|
"name": "HeBIS HDS",
|
||||||
"originalId": "HEB107025590",
|
"originalId": "HEB107025590",
|
||||||
"type": "remote",
|
"type": "remote",
|
||||||
"url": "https://hds2.hebis.de/ubffm/"
|
"url": "https://ubffm.hds.hebis.de"
|
||||||
},
|
},
|
||||||
"isPartOf": {
|
"isPartOf": {
|
||||||
"uid": "f84c1851-042e-542f-ba7a-158b32dfb82f",
|
"uid": "f84c1851-042e-542f-ba7a-158b32dfb82f",
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"firstPublished": "[ca. 1991]",
|
"firstPublished": "[ca. 1991]",
|
||||||
|
"lastPublished": "2000 Q1",
|
||||||
"publications": [
|
"publications": [
|
||||||
{
|
{
|
||||||
"uid": "603a6574-8910-588a-9e83-cd26e6988c74",
|
"uid": "603a6574-8910-588a-9e83-cd26e6988c74",
|
||||||
@@ -27,13 +28,13 @@
|
|||||||
"name": "VDI"
|
"name": "VDI"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"sameAs": "https://hds2test.hebis.de/ubffm/Record/HEB022992618",
|
"sameAs": "https://ubffm.hds.hebis.de/Record/HEB022992618",
|
||||||
"origin": {
|
"origin": {
|
||||||
"indexed": "2018-09-11T12:30:00Z",
|
"indexed": "2018-09-11T12:30:00Z",
|
||||||
"name": "HeBIS HDS",
|
"name": "HeBIS HDS",
|
||||||
"originalId": "HEB022992618",
|
"originalId": "HEB022992618",
|
||||||
"type": "remote",
|
"type": "remote",
|
||||||
"url": "https://hds2.hebis.de/ubffm/"
|
"url": "https://ubffm.hds.hebis.de"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"schema": "SCBook"
|
"schema": "SCBook"
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
"name": "Belles Lettres"
|
"name": "Belles Lettres"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"sameAs": "https://hds2test.hebis.de/ubffm/Record/HEB102248788",
|
"sameAs": "https://ubffm.hds.hebis.de/Record/HEB102248788",
|
||||||
"ISBNs": [
|
"ISBNs": [
|
||||||
"2251760385"
|
"2251760385"
|
||||||
],
|
],
|
||||||
@@ -36,7 +36,7 @@
|
|||||||
"name": "HeBIS HDS",
|
"name": "HeBIS HDS",
|
||||||
"originalId": "HEB102248788",
|
"originalId": "HEB102248788",
|
||||||
"type": "remote",
|
"type": "remote",
|
||||||
"url": "https://hds2.hebis.de/ubffm/"
|
"url": "https://ubffm.hds.hebis.de"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"schema": "SCBook"
|
"schema": "SCBook"
|
||||||
|
|||||||
@@ -13,9 +13,8 @@
|
|||||||
"code": "de",
|
"code": "de",
|
||||||
"name": "german"
|
"name": "german"
|
||||||
},
|
},
|
||||||
"major": "Astroturfing",
|
|
||||||
"mode": "dual",
|
"mode": "dual",
|
||||||
"name": "Astroturfing Bachelor",
|
"name": "Astroturfing",
|
||||||
"origin": {
|
"origin": {
|
||||||
"indexed": "2018-09-11T12:30:00Z",
|
"indexed": "2018-09-11T12:30:00Z",
|
||||||
"name": "Dummy",
|
"name": "Dummy",
|
||||||
@@ -27,8 +26,8 @@
|
|||||||
"uid": "b0f878fd-8fda-53b8-b065-a8d854c3d0d2"
|
"uid": "b0f878fd-8fda-53b8-b065-a8d854c3d0d2"
|
||||||
},
|
},
|
||||||
"timeMode": "parttime",
|
"timeMode": "parttime",
|
||||||
"type": "course of studies",
|
"type": "course of study",
|
||||||
"uid": "4c6f0a18-343d-5175-9fb1-62d28545c2aa"
|
"uid": "4c6f0a18-343d-5175-9fb1-62d28545c2aa"
|
||||||
},
|
},
|
||||||
"schema": "SCCourseOfStudies"
|
"schema": "SCCourseOfStudy"
|
||||||
}
|
}
|
||||||
@@ -5,13 +5,16 @@
|
|||||||
"instance": {
|
"instance": {
|
||||||
"type": "message",
|
"type": "message",
|
||||||
"invalid-non-existing-key-in-schema": 1,
|
"invalid-non-existing-key-in-schema": 1,
|
||||||
"uid": "4706ef24-b631-5c20-91d1-3c627decca5a",
|
"uid": "4706ef24-b631-5c20-91d1-3c627deccf5a",
|
||||||
"image": "https://backend/res/img/message_small.png",
|
"image": "https://backend/res/img/message_small.png",
|
||||||
"name": "Lösung für das Problem des Zurücksetzens der StApps-App gefunden",
|
"name": "Lösung für das Problem des Zurücksetzens der StApps-App gefunden",
|
||||||
"messageBody": "Wie bereits berichtet, klagten User über das Löschen ihres Stundenplans beim Update von Version 0.8.0 auf 0.8.1. Wir haben eine Lösung für das Problem gefunden und testen diese ausführlich bis zum Ende dieser Woche. Wenn alles glatt verläuft, dann kommt am Wochenende die fehlerbereinige Version 0.8.2 heraus.\n\n*(25.Okt 2016)*",
|
"messageBody": "Wie bereits berichtet, klagten User über das Löschen ihres Stundenplans beim Update von Version 0.8.0 auf 0.8.1. Wir haben eine Lösung für das Problem gefunden und testen diese ausführlich bis zum Ende dieser Woche. Wenn alles glatt verläuft, dann kommt am Wochenende die fehlerbereinige Version 0.8.2 heraus.\n\n*(25.Okt 2016)*",
|
||||||
"audiences": [
|
"audiences": [
|
||||||
"students"
|
"students"
|
||||||
],
|
],
|
||||||
|
"categories": [
|
||||||
|
"news"
|
||||||
|
],
|
||||||
"audienceOrganizations": [{
|
"audienceOrganizations": [{
|
||||||
"name": "TU Berlin",
|
"name": "TU Berlin",
|
||||||
"type": "organization",
|
"type": "organization",
|
||||||
|
|||||||
28
test/resources/indexable/Message.4.json
Normal file
28
test/resources/indexable/Message.4.json
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
{
|
||||||
|
"errorNames": [
|
||||||
|
"required"
|
||||||
|
],
|
||||||
|
"instance": {
|
||||||
|
"type": "message",
|
||||||
|
"invalid-non-existing-key-in-schema": 1,
|
||||||
|
"uid": "4706ef24-b631-5c20-91d1-3c627deccfff",
|
||||||
|
"image": "https://backend/res/img/message_small.png",
|
||||||
|
"name": "Lösung für das Problem des Zurücksetzens der StApps-App gefunden",
|
||||||
|
"messageBody": "Wie bereits berichtet, klagten User über das Löschen ihres Stundenplans beim Update von Version 0.8.0 auf 0.8.1. Wir haben eine Lösung für das Problem gefunden und testen diese ausführlich bis zum Ende dieser Woche. Wenn alles glatt verläuft, dann kommt am Wochenende die fehlerbereinige Version 0.8.2 heraus.\n\n*(25.Okt 2016)*",
|
||||||
|
"audiences": [
|
||||||
|
"students"
|
||||||
|
],
|
||||||
|
"audienceOrganizations": [{
|
||||||
|
"name": "TU Berlin",
|
||||||
|
"type": "organization",
|
||||||
|
"uid": "4806ef14-b631-5c20-91d1-3c627decca5a"
|
||||||
|
}],
|
||||||
|
"sequenceIndex": 1005,
|
||||||
|
"origin": {
|
||||||
|
"indexed": "2018-09-11T12:30:00Z",
|
||||||
|
"name": "Dummy",
|
||||||
|
"type": "remote"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"schema": "SCMessage"
|
||||||
|
}
|
||||||
@@ -22,13 +22,13 @@
|
|||||||
"ISSNs": [
|
"ISSNs": [
|
||||||
"0024-6085"
|
"0024-6085"
|
||||||
],
|
],
|
||||||
"sameAs": "https://hds2test.hebis.de/ubffm/Record/HEB046847146",
|
"sameAs": "https://ubffm.hds.hebis.de/Record/HEB046847146",
|
||||||
"origin": {
|
"origin": {
|
||||||
"indexed": "2018-09-11T12:30:00Z",
|
"indexed": "2018-09-11T12:30:00Z",
|
||||||
"name": "HeBIS HDS",
|
"name": "HeBIS HDS",
|
||||||
"originalId": "HEB046847146",
|
"originalId": "HEB046847146",
|
||||||
"type": "remote",
|
"type": "remote",
|
||||||
"url": "https://hds2.hebis.de/ubffm/"
|
"url": "https://ubffm.hds.hebis.de"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"schema": "SCPeriodical"
|
"schema": "SCPeriodical"
|
||||||
|
|||||||
@@ -19,13 +19,13 @@
|
|||||||
"name": "Frankfurter Allg. Zeitung"
|
"name": "Frankfurter Allg. Zeitung"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"sameAs": "https://hds2test.hebis.de/ubffm/Record/HEB048624853",
|
"sameAs": "https://ubffm.hds.hebis.de/Record/HEB048624853",
|
||||||
"origin": {
|
"origin": {
|
||||||
"indexed": "2018-09-11T12:30:00Z",
|
"indexed": "2018-09-11T12:30:00Z",
|
||||||
"name": "HeBIS HDS",
|
"name": "HeBIS HDS",
|
||||||
"originalId": "HEB048624853",
|
"originalId": "HEB048624853",
|
||||||
"type": "remote",
|
"type": "remote",
|
||||||
"url": "https://hds2.hebis.de/ubffm/"
|
"url": "https://ubffm.hds.hebis.de"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"schema": "SCPeriodical"
|
"schema": "SCPeriodical"
|
||||||
|
|||||||
@@ -21,26 +21,26 @@ import {SCThingUpdateRoute} from '../src/protocol/routes/thing-update';
|
|||||||
@suite(timeout(10000), slow(5000))
|
@suite(timeout(10000), slow(5000))
|
||||||
export class RoutesSpec {
|
export class RoutesSpec {
|
||||||
@test
|
@test
|
||||||
public bulkAddRouteUrlFragment() {
|
public bulkAddRouteUrlPath() {
|
||||||
const bulkAddRoute = new SCBulkAddRoute();
|
const bulkAddRoute = new SCBulkAddRoute();
|
||||||
|
|
||||||
expect(bulkAddRoute.getUrlFragment({
|
expect(bulkAddRoute.getUrlPath({
|
||||||
UID: '540862f3-ea30-5b8f-8678-56b4dc217140',
|
UID: '540862f3-ea30-5b8f-8678-56b4dc217140',
|
||||||
})).to.equal('/bulk/540862f3-ea30-5b8f-8678-56b4dc217140');
|
})).to.equal('/bulk/540862f3-ea30-5b8f-8678-56b4dc217140');
|
||||||
}
|
}
|
||||||
|
|
||||||
@test
|
@test
|
||||||
public bulkRouteUrlFragment() {
|
public bulkRouteUrlPath() {
|
||||||
const bulkRoute = new SCBulkRoute();
|
const bulkRoute = new SCBulkRoute();
|
||||||
|
|
||||||
expect(bulkRoute.getUrlFragment()).to.equal('/bulk');
|
expect(bulkRoute.getUrlPath()).to.equal('/bulk');
|
||||||
}
|
}
|
||||||
|
|
||||||
@test
|
@test
|
||||||
public thingUpdateRouteUrlFragment() {
|
public thingUpdateRouteUrlPath() {
|
||||||
const thingUpdateRoute = new SCThingUpdateRoute();
|
const thingUpdateRoute = new SCThingUpdateRoute();
|
||||||
|
|
||||||
expect(thingUpdateRoute.getUrlFragment({
|
expect(thingUpdateRoute.getUrlPath({
|
||||||
TYPE: 'dish',
|
TYPE: 'dish',
|
||||||
UID: '540862f3-ea30-5b8f-8678-56b4dc217140',
|
UID: '540862f3-ea30-5b8f-8678-56b4dc217140',
|
||||||
})).to.equal('/dish/540862f3-ea30-5b8f-8678-56b4dc217140');
|
})).to.equal('/dish/540862f3-ea30-5b8f-8678-56b4dc217140');
|
||||||
@@ -51,7 +51,7 @@ export class RoutesSpec {
|
|||||||
const thingUpdateRoute = new SCThingUpdateRoute();
|
const thingUpdateRoute = new SCThingUpdateRoute();
|
||||||
|
|
||||||
const fn = () => {
|
const fn = () => {
|
||||||
thingUpdateRoute.getUrlFragment({
|
thingUpdateRoute.getUrlPath({
|
||||||
FOO: 'bar',
|
FOO: 'bar',
|
||||||
TYPE: 'dish',
|
TYPE: 'dish',
|
||||||
UID: '540862f3-ea30-5b8f-8678-56b4dc217140',
|
UID: '540862f3-ea30-5b8f-8678-56b4dc217140',
|
||||||
@@ -66,7 +66,7 @@ export class RoutesSpec {
|
|||||||
const thingUpdateRoute = new SCThingUpdateRoute();
|
const thingUpdateRoute = new SCThingUpdateRoute();
|
||||||
|
|
||||||
const fn = () => {
|
const fn = () => {
|
||||||
thingUpdateRoute.getUrlFragment({
|
thingUpdateRoute.getUrlPath({
|
||||||
TYPO: 'dish',
|
TYPO: 'dish',
|
||||||
UID: '540862f3-ea30-5b8f-8678-56b4dc217140',
|
UID: '540862f3-ea30-5b8f-8678-56b4dc217140',
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
import {expect} from 'chai';
|
import {expect} from 'chai';
|
||||||
import clone = require('fast-clone');
|
import clone from 'rfdc';
|
||||||
import {slow, suite, test, timeout} from '@testdeck/mocha';
|
import {slow, suite, test, timeout} from '@testdeck/mocha';
|
||||||
import {SCThingOriginType, SCThingType, SCThingRemoteOrigin} from '../src/things/abstract/thing';
|
import {SCThingOriginType, SCThingType, SCThingRemoteOrigin} from '../src/things/abstract/thing';
|
||||||
import {SCBuildingWithoutReferences} from '../src/things/building';
|
import {SCBuildingWithoutReferences} from '../src/things/building';
|
||||||
@@ -264,7 +264,7 @@ export class TranslationSpecInplace {
|
|||||||
@test
|
@test
|
||||||
public reaccessWithChangedSourceOmitsLRUCache() {
|
public reaccessWithChangedSourceOmitsLRUCache() {
|
||||||
const translatorDE = new SCThingTranslator('de');
|
const translatorDE = new SCThingTranslator('de');
|
||||||
const dishCopy = clone(dish);
|
const dishCopy = clone()(dish);
|
||||||
const translatedDish = translatorDE.translatedAccess(dish);
|
const translatedDish = translatorDE.translatedAccess(dish);
|
||||||
const distructivelyTranslatedDish = translatorDE.translate(dish);
|
const distructivelyTranslatedDish = translatorDE.translate(dish);
|
||||||
|
|
||||||
@@ -330,7 +330,7 @@ export class MetaTranslationSpec {
|
|||||||
|
|
||||||
@test
|
@test
|
||||||
public thingWithoutMetaClass() {
|
public thingWithoutMetaClass() {
|
||||||
const dishCopy = clone(dish);
|
const dishCopy = clone()(dish);
|
||||||
const typeNonExistant = eval("(x) => x + 'typeNonExistant';");
|
const typeNonExistant = eval("(x) => x + 'typeNonExistant';");
|
||||||
// this will assign a non existant SCThingType to dishCopy
|
// this will assign a non existant SCThingType to dishCopy
|
||||||
dishCopy.type = typeNonExistant();
|
dishCopy.type = typeNonExistant();
|
||||||
|
|||||||
@@ -16,11 +16,12 @@ import {assert, Has, IsAny, IsNever, NotHas} from 'conditional-type-checks';
|
|||||||
import {SCThing, SCThingWithoutReferences} from '../src/things/abstract/thing';
|
import {SCThing, SCThingWithoutReferences} from '../src/things/abstract/thing';
|
||||||
import {SCAcademicEvent, SCAcademicEventWithoutReferences} from '../src/things/academic-event';
|
import {SCAcademicEvent, SCAcademicEventWithoutReferences} from '../src/things/academic-event';
|
||||||
import {SCArticle, SCArticleWithoutReferences} from '../src/things/article';
|
import {SCArticle, SCArticleWithoutReferences} from '../src/things/article';
|
||||||
|
import {SCAssessment, SCAssessmentWithoutReferences} from '../src/things/assessment';
|
||||||
import {SCBook, SCBookWithoutReferences} from '../src/things/book';
|
import {SCBook, SCBookWithoutReferences} from '../src/things/book';
|
||||||
import {SCBuilding, SCBuildingWithoutReferences} from '../src/things/building';
|
import {SCBuilding, SCBuildingWithoutReferences} from '../src/things/building';
|
||||||
import {SCCatalog, SCCatalogWithoutReferences} from '../src/things/catalog';
|
import {SCCatalog, SCCatalogWithoutReferences} from '../src/things/catalog';
|
||||||
import {SCContactPoint, SCContactPointWithoutReferences} from '../src/things/contact-point';
|
import {SCContactPoint, SCContactPointWithoutReferences} from '../src/things/contact-point';
|
||||||
import {SCCourseOfStudies, SCCourseOfStudiesWithoutReferences} from '../src/things/course-of-studies';
|
import {SCCourseOfStudy, SCCourseOfStudyWithoutReferences} from '../src/things/course-of-study';
|
||||||
import {SCDateSeries, SCDateSeriesWithoutReferences} from '../src/things/date-series';
|
import {SCDateSeries, SCDateSeriesWithoutReferences} from '../src/things/date-series';
|
||||||
import {SCDiff, SCDiffWithoutReferences} from '../src/things/diff';
|
import {SCDiff, SCDiffWithoutReferences} from '../src/things/diff';
|
||||||
import {SCDish, SCDishWithoutReferences} from '../src/things/dish';
|
import {SCDish, SCDishWithoutReferences} from '../src/things/dish';
|
||||||
@@ -107,6 +108,17 @@ assert<Has<SCArticlePropertyTypes, SCThing>>(false);
|
|||||||
assert<Extends<SCArticleWithoutReferences, SCThing>>(false);
|
assert<Extends<SCArticleWithoutReferences, SCThing>>(false);
|
||||||
assert<Extends<SCArticle, SCThing>>(true);
|
assert<Extends<SCArticle, SCThing>>(true);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Types of properties of SCAssessment
|
||||||
|
*/
|
||||||
|
type SCAssessmentPropertyTypes = PropertyTypesNested<SCAssessment>;
|
||||||
|
assert<NotHas<SCAssessmentPropertyTypes, SCThingWithoutReferences>>(false);
|
||||||
|
assert<Has<SCAssessmentPropertyTypes, SCThingWithoutReferences>>(true);
|
||||||
|
assert<NotHas<SCAssessmentPropertyTypes, SCThing>>(true);
|
||||||
|
assert<Has<SCAssessmentPropertyTypes, SCThing>>(false);
|
||||||
|
assert<Extends<SCAssessmentWithoutReferences, SCThing>>(false);
|
||||||
|
assert<Extends<SCAssessment, SCThing>>(true);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Types of properties of SCBook
|
* Types of properties of SCBook
|
||||||
*/
|
*/
|
||||||
@@ -152,15 +164,15 @@ assert<Extends<SCCatalogWithoutReferences, SCThing>>(false);
|
|||||||
assert<Extends<SCCatalog, SCThing>>(true);
|
assert<Extends<SCCatalog, SCThing>>(true);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Types of properties of SCCourseOfStudies
|
* Types of properties of SCCourseOfStudy
|
||||||
*/
|
*/
|
||||||
type SCCourseOfStudiesPropertyTypes = PropertyTypesNested<SCCourseOfStudies>;
|
type SCCourseOfStudyPropertyTypes = PropertyTypesNested<SCCourseOfStudy>;
|
||||||
assert<NotHas<SCCourseOfStudiesPropertyTypes, SCThingWithoutReferences>>(false);
|
assert<NotHas<SCCourseOfStudyPropertyTypes, SCThingWithoutReferences>>(false);
|
||||||
assert<Has<SCCourseOfStudiesPropertyTypes, SCThingWithoutReferences>>(true);
|
assert<Has<SCCourseOfStudyPropertyTypes, SCThingWithoutReferences>>(true);
|
||||||
assert<NotHas<SCCourseOfStudiesPropertyTypes, SCThing>>(true);
|
assert<NotHas<SCCourseOfStudyPropertyTypes, SCThing>>(true);
|
||||||
assert<Has<SCCourseOfStudiesPropertyTypes, SCThing>>(false);
|
assert<Has<SCCourseOfStudyPropertyTypes, SCThing>>(false);
|
||||||
assert<Extends<SCCourseOfStudiesWithoutReferences, SCThing>>(false);
|
assert<Extends<SCCourseOfStudyWithoutReferences, SCThing>>(false);
|
||||||
assert<Extends<SCCourseOfStudies, SCThing>>(true);
|
assert<Extends<SCCourseOfStudy, SCThing>>(true);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Types of properties of SCDateSeries
|
* Types of properties of SCDateSeries
|
||||||
|
|||||||
Reference in New Issue
Block a user