mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-03 03:52:52 +00:00
Compare commits
26 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f97e199bb9 | ||
|
|
abda5cf0ca | ||
|
|
9658f05d31 | ||
|
|
e92bf6f7c7 | ||
|
|
ca8c4d1c05 | ||
|
|
443cb748fb | ||
|
|
5561b36a34 | ||
|
|
49b55db66f | ||
|
|
01f92baa98 | ||
|
|
ce5856cd86 | ||
|
|
a821bcae83 | ||
|
|
149f3ffff1 | ||
|
|
9ca7870183 | ||
|
|
87ee92b19b | ||
|
|
44e61bf336 | ||
|
|
fba63db137 | ||
|
|
8a5251c2e6 | ||
|
|
bde71c7e3a | ||
|
|
fec33715ad | ||
|
|
6dcca89257 | ||
|
|
3a65d4ba2f | ||
|
|
88f579e09b | ||
|
|
be2bfb4017 | ||
|
|
bad15dc872 | ||
|
|
8b090af3ed | ||
|
|
747497699d |
60
CHANGELOG.md
60
CHANGELOG.md
@@ -1,3 +1,63 @@
|
||||
# [0.30.0](https://gitlab.com/openstapps/core/compare/v0.29.0...v0.30.0) (2019-11-08)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* add aggregatable tag for type field ([443cb74](https://gitlab.com/openstapps/core/commit/443cb74))
|
||||
* add new field sequenceIndex to message ([01f92ba](https://gitlab.com/openstapps/core/commit/01f92ba))
|
||||
|
||||
|
||||
|
||||
# [0.29.0](https://gitlab.com/openstapps/core/compare/v0.28.0...v0.29.0) (2019-09-17)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* add mappingIgnoredTags property to SCBackend ([149f3ff](https://gitlab.com/openstapps/core/commit/149f3ff))
|
||||
|
||||
|
||||
|
||||
# [0.28.0](https://gitlab.com/openstapps/core/compare/v0.27.0...v0.28.0) (2019-09-10)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* add onlyOnType field for SCFacet ([fba63db](https://gitlab.com/openstapps/core/commit/fba63db))
|
||||
|
||||
|
||||
|
||||
# [0.27.0](https://gitlab.com/openstapps/core/compare/v0.26.0...v0.27.0) (2019-09-03)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* add [@filterable](https://gitlab.com/filterable) tags ([fec3371](https://gitlab.com/openstapps/core/commit/fec3371))
|
||||
|
||||
|
||||
|
||||
# [0.26.0](https://gitlab.com/openstapps/core/compare/v0.25.0...v0.26.0) (2019-08-19)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* complete german translations ([bad15dc](https://gitlab.com/openstapps/core/commit/bad15dc))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* add pluginRequestTimeout field to backend config ([88f579e](https://gitlab.com/openstapps/core/commit/88f579e))
|
||||
|
||||
|
||||
|
||||
# [0.25.0](https://gitlab.com/openstapps/core/compare/v0.24.0...v0.25.0) (2019-07-25)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* correct package job ([d4a8ef6](https://gitlab.com/openstapps/core/commit/d4a8ef6))
|
||||
|
||||
|
||||
|
||||
# [0.24.0](https://gitlab.com/openstapps/core/compare/v0.23.1...v0.24.0) (2019-07-23)
|
||||
|
||||
|
||||
|
||||
@@ -28,6 +28,33 @@ The [core tools](https://openstapps.gitlab.io/core-tools) are more or less not d
|
||||
|
||||
App and connectors should be updated regularly to new releases of the core but not as important like API and backend. Since the app is just a view for the data stored in the backend it is not necessary to be up to date with the newest core immediately and the connectors are developed independently by every school and up to their responsibility.
|
||||
|
||||
## Adding new Types
|
||||
|
||||
Adding new types requires changes at multiple locations for it to work correctly
|
||||
|
||||
### Required changes
|
||||
* Add your SCThing and SCThingWithoutReferences to `src/things/your-thing-name.ts` and make them extend `SCThingWithoutReferences` and `SCThing` respectively
|
||||
* Add your SCThingMeta to `src/things/your-thing-name.ts` and make it extend `SCThingMeta`
|
||||
* Add your SCThingMeta to `SCClasses` in `src/meta.ts`
|
||||
* Add your SCThing to `SCThingsWithoutDiff` in `src/meta.ts`
|
||||
* Add your SCThingWithoutReferences to `SCAssociatedThingWithoutReferences` in `src/meta.ts`
|
||||
* Add your SCThing to `SCAssociatedThing` in `src/meta.ts`
|
||||
* Add your SCThing to the `SCThingType` enum in `src/things/abstract/thing.ts`
|
||||
* Add an example file for your SCThing in `test/resources/YourThingName.json`
|
||||
* Add the following lines for your SCThing in `test/type.spec.ts`:
|
||||
```typescript
|
||||
/**
|
||||
* Types of properties of SCYourThingName
|
||||
*/
|
||||
type SCYourThingNamePropertyTypes = PropertyTypesNested<SCYourThingName>;
|
||||
assert<NotHas<SCYourThingNamePropertyTypes, SCThingWithoutReferences>>(false);
|
||||
assert<Has<SCYourThingNamePropertyTypes, SCThingWithoutReferences>>(true);
|
||||
assert<NotHas<SCYourThingNamePropertyTypes, SCThing>>(true);
|
||||
assert<Has<SCYourThingNamePropertyTypes, SCThing>>(false);
|
||||
assert<Extends<SCYourThingNameWithoutReferences, SCThing>>(false);
|
||||
assert<Extends<SCYourThingName, SCThing>>(true);
|
||||
```
|
||||
|
||||
## Additional coding style
|
||||
|
||||
### Extract inline type definitions
|
||||
|
||||
@@ -37,13 +37,14 @@ External dependencies can not be covered by the annotations. Documentation about
|
||||
|
||||
| annotation | description | parameters |
|
||||
|-------------------|-------------------------------------------|---------------|
|
||||
| `@aggregatable` | used for generating of aggregations of the field if the core schema is used to put data into a database/key-value store | |
|
||||
| `@aggregatable` | used for generating of aggregations of the field if the core schema is used to put data into a database/key-value store | whether the property is being used on the top type or across all types: `global` |
|
||||
| `@float` | number field is interpreted as float | |
|
||||
| `@indexable` | marks the type as indexable if the core schema is used to put data into a database/key-value store| |
|
||||
| `@integer` | number field is interpreted as integer | |
|
||||
| `@keyword` | string field is interpreted as keyword | |
|
||||
| `@sortable` | field is sortable if the core schema is used to put data into a database/key-value store | sort method to be used: ducet, price, distance |
|
||||
| `@sortable` | field is sortable if the core schema is used to put data into a database/key-value store | sort method to be used: `ducet`, `price`, `distance` |
|
||||
| `@text` | string field is interpreted as text | |
|
||||
| `@validatable` | marks the type as validatable if the core schema is used to put data into a database/key-value store | |
|
||||
| `@filterable` | non-object/nested field is filterable if the core schema is used to put data into a database/key-value store | |
|
||||
|
||||
|
||||
|
||||
167
package-lock.json
generated
167
package-lock.json
generated
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@openstapps/core",
|
||||
"version": "0.25.0",
|
||||
"version": "0.31.0",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
@@ -280,6 +280,37 @@
|
||||
"source-map-support": "^0.5.6",
|
||||
"yn": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"typedoc": {
|
||||
"version": "0.14.2",
|
||||
"resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.14.2.tgz",
|
||||
"integrity": "sha512-aEbgJXV8/KqaVhcedT7xG6d2r+mOvB5ep3eIz1KuB5sc4fDYXcepEEMdU7XSqLFO5hVPu0nllHi1QxX2h/QlpQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@types/fs-extra": "^5.0.3",
|
||||
"@types/handlebars": "^4.0.38",
|
||||
"@types/highlight.js": "^9.12.3",
|
||||
"@types/lodash": "^4.14.110",
|
||||
"@types/marked": "^0.4.0",
|
||||
"@types/minimatch": "3.0.3",
|
||||
"@types/shelljs": "^0.8.0",
|
||||
"fs-extra": "^7.0.0",
|
||||
"handlebars": "^4.0.6",
|
||||
"highlight.js": "^9.13.1",
|
||||
"lodash": "^4.17.10",
|
||||
"marked": "^0.4.0",
|
||||
"minimatch": "^3.0.0",
|
||||
"progress": "^2.0.0",
|
||||
"shelljs": "^0.8.2",
|
||||
"typedoc-default-themes": "^0.5.0",
|
||||
"typescript": "3.2.x"
|
||||
}
|
||||
},
|
||||
"typescript": {
|
||||
"version": "3.2.4",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.2.4.tgz",
|
||||
"integrity": "sha512-0RNDbSdEokBeEAkgNbxJ+BLwSManFy9TeXz8uW+48j/xhEXv1ePME60olyzw2XzUqUBNAYFeJadIqAgNqIACwg==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -388,9 +419,9 @@
|
||||
"integrity": "sha512-MhCUjojzDhVLnZnxwPwa+rETFRDQ0ffjxYdrqOP6TBO2O0/Z64PV5tNeYApo4bc4y4frbWOrRwv/eEkXlI13Rw=="
|
||||
},
|
||||
"@types/lodash": {
|
||||
"version": "4.14.129",
|
||||
"resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.129.tgz",
|
||||
"integrity": "sha512-oYaV0eSlnOacOr7i4X1FFdH8ttSlb57gu3I9MuStIv2CYkISEY84dNHYsC3bF6sNH7qYcu1BtVrCtQ8Q4KPTfQ==",
|
||||
"version": "4.14.136",
|
||||
"resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.136.tgz",
|
||||
"integrity": "sha512-0GJhzBdvsW2RUccNHOBkabI8HZVdOXmXbXhuKlDEd5Vv12P7oAVGfomGp3Ne21o5D/qu1WmthlNKFaoZJJeErA==",
|
||||
"dev": true
|
||||
},
|
||||
"@types/marked": {
|
||||
@@ -418,9 +449,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"@types/node": {
|
||||
"version": "10.14.13",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-10.14.13.tgz",
|
||||
"integrity": "sha512-yN/FNNW1UYsRR1wwAoyOwqvDuLDtVXnaJTZ898XIw/Q5cCaeVAlVwvsmXLX5PuiScBYwZsZU4JYSHB3TvfdwvQ=="
|
||||
"version": "10.14.14",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-10.14.14.tgz",
|
||||
"integrity": "sha512-xXD08vZsvpv4xptQXj1+ky22f7ZoKu5ZNI/4l+/BXG3X+XaeZsmaFbbTKuhSE3NjjvRuZFxFf9sQBMXIcZNFMQ=="
|
||||
},
|
||||
"@types/nodemailer": {
|
||||
"version": "6.2.0",
|
||||
@@ -789,22 +820,22 @@
|
||||
"dev": true
|
||||
},
|
||||
"conventional-changelog": {
|
||||
"version": "3.1.8",
|
||||
"resolved": "https://registry.npmjs.org/conventional-changelog/-/conventional-changelog-3.1.8.tgz",
|
||||
"integrity": "sha512-fb3/DOLLrQdNqN0yYn/lT6HcNsAa9A+VTDBqlZBMQcEPPIeJIMI+DBs3yu+eiYOLi22w9oShq3nn/zN6qm1Hmw==",
|
||||
"version": "3.1.10",
|
||||
"resolved": "https://registry.npmjs.org/conventional-changelog/-/conventional-changelog-3.1.10.tgz",
|
||||
"integrity": "sha512-6RDj31hL39HUkpqvPjRlOxAwJRwur8O2qu9m6R0FBNDGwCJyy4SYH9NfyshozxYSeklrauKRf3oSbyoEZVzu9Q==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"conventional-changelog-angular": "^5.0.3",
|
||||
"conventional-changelog-atom": "^2.0.1",
|
||||
"conventional-changelog-codemirror": "^2.0.1",
|
||||
"conventional-changelog-conventionalcommits": "^3.0.2",
|
||||
"conventional-changelog-core": "^3.2.2",
|
||||
"conventional-changelog-conventionalcommits": "^4.1.0",
|
||||
"conventional-changelog-core": "^4.0.0",
|
||||
"conventional-changelog-ember": "^2.0.2",
|
||||
"conventional-changelog-eslint": "^3.0.2",
|
||||
"conventional-changelog-express": "^2.0.1",
|
||||
"conventional-changelog-jquery": "^3.0.4",
|
||||
"conventional-changelog-jshint": "^2.0.1",
|
||||
"conventional-changelog-preset-loader": "^2.1.1"
|
||||
"conventional-changelog-preset-loader": "^2.2.0"
|
||||
}
|
||||
},
|
||||
"conventional-changelog-angular": {
|
||||
@@ -827,14 +858,14 @@
|
||||
}
|
||||
},
|
||||
"conventional-changelog-cli": {
|
||||
"version": "2.0.21",
|
||||
"resolved": "https://registry.npmjs.org/conventional-changelog-cli/-/conventional-changelog-cli-2.0.21.tgz",
|
||||
"integrity": "sha512-gMT1XvSVmo9Np1WUXz8Mvt3K+OtzR+Xu13z0jq/3qsXBbLuYc2/oaUXVr68r3fYOL8E9dN2uvX7Hc7RkeWvRVA==",
|
||||
"version": "2.0.23",
|
||||
"resolved": "https://registry.npmjs.org/conventional-changelog-cli/-/conventional-changelog-cli-2.0.23.tgz",
|
||||
"integrity": "sha512-a/jDZHEUpSHQMAqeDrmrFhz9CKHBKhBGpJyc38BCfNjFA1RKchpq/Qqbo1BZwRLWrW/PX7IGsUicTyhniqUH9g==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"add-stream": "^1.0.0",
|
||||
"conventional-changelog": "^3.1.8",
|
||||
"lodash": "^4.2.1",
|
||||
"conventional-changelog": "^3.1.10",
|
||||
"lodash": "^4.14.14",
|
||||
"meow": "^4.0.0",
|
||||
"tempfile": "^1.1.1"
|
||||
}
|
||||
@@ -849,9 +880,9 @@
|
||||
}
|
||||
},
|
||||
"conventional-changelog-conventionalcommits": {
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/conventional-changelog-conventionalcommits/-/conventional-changelog-conventionalcommits-3.0.2.tgz",
|
||||
"integrity": "sha512-w1+fQSDnm/7+sPKIYC5nfRVYDszt+6HdWizrigSqWFVIiiBVzkHGeqDLMSHc+Qq9qssHVAxAak5206epZyK87A==",
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/conventional-changelog-conventionalcommits/-/conventional-changelog-conventionalcommits-4.1.0.tgz",
|
||||
"integrity": "sha512-J3xolGrH8PTxpCqueHOuZtv3Cp73SQOWiBQzlsaugZAZ+hZgcJBonmC+1bQbfGs2neC2S18p2L1Gx+nTEglJTQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"compare-func": "^1.3.1",
|
||||
@@ -859,18 +890,18 @@
|
||||
}
|
||||
},
|
||||
"conventional-changelog-core": {
|
||||
"version": "3.2.2",
|
||||
"resolved": "https://registry.npmjs.org/conventional-changelog-core/-/conventional-changelog-core-3.2.2.tgz",
|
||||
"integrity": "sha512-cssjAKajxaOX5LNAJLB+UOcoWjAIBvXtDMedv/58G+YEmAXMNfC16mmPl0JDOuVJVfIqM0nqQiZ8UCm8IXbE0g==",
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/conventional-changelog-core/-/conventional-changelog-core-4.0.0.tgz",
|
||||
"integrity": "sha512-+bZMeBUdjKxfyX2w6EST9U7zb85wxrGS3IV4H7SqPya44osNQbm3P+vyqfLs6s57FkoEamC93ioDEiguVLWmSQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"conventional-changelog-writer": "^4.0.5",
|
||||
"conventional-commits-parser": "^3.0.2",
|
||||
"conventional-changelog-writer": "^4.0.7",
|
||||
"conventional-commits-parser": "^3.0.3",
|
||||
"dateformat": "^3.0.0",
|
||||
"get-pkg-repo": "^1.0.0",
|
||||
"git-raw-commits": "2.0.0",
|
||||
"git-remote-origin-url": "^2.0.0",
|
||||
"git-semver-tags": "^2.0.2",
|
||||
"git-semver-tags": "^3.0.0",
|
||||
"lodash": "^4.2.1",
|
||||
"normalize-package-data": "^2.3.5",
|
||||
"q": "^1.5.1",
|
||||
@@ -926,21 +957,21 @@
|
||||
}
|
||||
},
|
||||
"conventional-changelog-preset-loader": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/conventional-changelog-preset-loader/-/conventional-changelog-preset-loader-2.1.1.tgz",
|
||||
"integrity": "sha512-K4avzGMLm5Xw0Ek/6eE3vdOXkqnpf9ydb68XYmCc16cJ99XMMbc2oaNMuPwAsxVK6CC1yA4/I90EhmWNj0Q6HA==",
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/conventional-changelog-preset-loader/-/conventional-changelog-preset-loader-2.2.0.tgz",
|
||||
"integrity": "sha512-zXB+5vF7D5Y3Cb/rJfSyCCvFphCVmF8mFqOdncX3BmjZwAtGAPfYrBcT225udilCKvBbHgyzgxqz2GWDB5xShQ==",
|
||||
"dev": true
|
||||
},
|
||||
"conventional-changelog-writer": {
|
||||
"version": "4.0.6",
|
||||
"resolved": "https://registry.npmjs.org/conventional-changelog-writer/-/conventional-changelog-writer-4.0.6.tgz",
|
||||
"integrity": "sha512-ou/sbrplJMM6KQpR5rKFYNVQYesFjN7WpNGdudQSWNi6X+RgyFUcSv871YBYkrUYV9EX8ijMohYVzn9RUb+4ag==",
|
||||
"version": "4.0.7",
|
||||
"resolved": "https://registry.npmjs.org/conventional-changelog-writer/-/conventional-changelog-writer-4.0.7.tgz",
|
||||
"integrity": "sha512-p/wzs9eYaxhFbrmX/mCJNwJuvvHR+j4Fd0SQa2xyAhYed6KBiZ780LvoqUUvsayP4R1DtC27czalGUhKV2oabw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"compare-func": "^1.3.1",
|
||||
"conventional-commits-filter": "^2.0.2",
|
||||
"dateformat": "^3.0.0",
|
||||
"handlebars": "^4.1.0",
|
||||
"handlebars": "^4.1.2",
|
||||
"json-stringify-safe": "^5.0.1",
|
||||
"lodash": "^4.2.1",
|
||||
"meow": "^4.0.0",
|
||||
@@ -1706,21 +1737,13 @@
|
||||
}
|
||||
},
|
||||
"git-semver-tags": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/git-semver-tags/-/git-semver-tags-2.0.2.tgz",
|
||||
"integrity": "sha512-34lMF7Yo1xEmsK2EkbArdoU79umpvm0MfzaDkSNYSJqtM5QLAVTPWgpiXSVI5o/O9EvZPSrP4Zvnec/CqhSd5w==",
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/git-semver-tags/-/git-semver-tags-3.0.0.tgz",
|
||||
"integrity": "sha512-T4C/gJ9k2Bnxz+PubtcyiMtUUKrC+Nh9Q4zaECcnmVMwJgPhrNyP/Rf+YpdRqsJbCV/+kYrCH24Xg+IeAmbOPg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"meow": "^4.0.0",
|
||||
"semver": "^5.5.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"semver": {
|
||||
"version": "5.7.0",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz",
|
||||
"integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==",
|
||||
"dev": true
|
||||
}
|
||||
"semver": "^6.0.0"
|
||||
}
|
||||
},
|
||||
"gitconfiglocal": {
|
||||
@@ -1853,9 +1876,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"highlight.js": {
|
||||
"version": "9.15.6",
|
||||
"resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-9.15.6.tgz",
|
||||
"integrity": "sha512-zozTAWM1D6sozHo8kqhfYgsac+B+q0PmsjXeyDrYIHHcBN0zTVT66+s2GW1GZv7DbyaROdLXKdabwS/WqPyIdQ==",
|
||||
"version": "9.15.9",
|
||||
"resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-9.15.9.tgz",
|
||||
"integrity": "sha512-M0zZvfLr5p0keDMCAhNBp03XJbKBxUx5AfyfufMdFMEP4N/Xj6dh0IqC75ys7BAzceR34NgcvXjupRVaHBPPVQ==",
|
||||
"dev": true
|
||||
},
|
||||
"hosted-git-info": {
|
||||
@@ -2300,22 +2323,22 @@
|
||||
"dev": true
|
||||
},
|
||||
"lodash.template": {
|
||||
"version": "4.4.0",
|
||||
"resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-4.4.0.tgz",
|
||||
"integrity": "sha1-5zoDhcg1VZF0bgILmWecaQ5o+6A=",
|
||||
"version": "4.5.0",
|
||||
"resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-4.5.0.tgz",
|
||||
"integrity": "sha512-84vYFxIkmidUiFxidA/KjjH9pAycqW+h980j7Fuz5qxRtO9pgB7MDFTdys1N7A5mcucRiDyEq4fusljItR1T/A==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"lodash._reinterpolate": "~3.0.0",
|
||||
"lodash._reinterpolate": "^3.0.0",
|
||||
"lodash.templatesettings": "^4.0.0"
|
||||
}
|
||||
},
|
||||
"lodash.templatesettings": {
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-4.1.0.tgz",
|
||||
"integrity": "sha1-K01OlbpEDZFf8IvImeRVNmZxMxY=",
|
||||
"version": "4.2.0",
|
||||
"resolved": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-4.2.0.tgz",
|
||||
"integrity": "sha512-stgLz+i3Aa9mZgnjr/O+v9ruKZsPsndy7qPZOchbqk2cnTU1ZaldKK+v7m54WoKIyxiuMZTKT2H81F8BeAc3ZQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"lodash._reinterpolate": "~3.0.0"
|
||||
"lodash._reinterpolate": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"log-symbols": {
|
||||
@@ -3230,9 +3253,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"process-nextick-args": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz",
|
||||
"integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==",
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
|
||||
"integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==",
|
||||
"dev": true
|
||||
},
|
||||
"progress": {
|
||||
@@ -3297,9 +3320,9 @@
|
||||
}
|
||||
},
|
||||
"readable-stream": {
|
||||
"version": "3.3.0",
|
||||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.3.0.tgz",
|
||||
"integrity": "sha512-EsI+s3k3XsW+fU8fQACLN59ky34AZ14LoeVZpYwmZvldCFo0r0gnelwF2TcMjLor/BTL5aDJVBMkss0dthToPw==",
|
||||
"version": "3.4.0",
|
||||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.4.0.tgz",
|
||||
"integrity": "sha512-jItXPLmrSR8jmTRmRWJXCnGJsfy85mB3Wd/uINMXA65yrnFo0cPClFIUWzo2najVNSl+mx7/4W8ttlLWJe99pQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"inherits": "^2.0.3",
|
||||
@@ -3452,9 +3475,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"source-map-support": {
|
||||
"version": "0.5.12",
|
||||
"resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.12.tgz",
|
||||
"integrity": "sha512-4h2Pbvyy15EE02G+JOZpUCmqWJuqrs+sEkzewTm++BPi7Hvn/HwcqLAcNxYAyI0x13CpPPn+kMjl+hplXMHITQ==",
|
||||
"version": "0.5.13",
|
||||
"resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz",
|
||||
"integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"buffer-from": "^1.0.0",
|
||||
@@ -3867,9 +3890,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"tsutils": {
|
||||
"version": "3.14.1",
|
||||
"resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.14.1.tgz",
|
||||
"integrity": "sha512-kiuZzD1uUA5DxGj/uxbde+ymp6VVdAxdzOIlAFbYKrPyla8/uiJ9JLBm1QsPhOm4Muj0/+cWEDP99yoCUcSl6Q==",
|
||||
"version": "3.15.0",
|
||||
"resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.15.0.tgz",
|
||||
"integrity": "sha512-or184xKZ6fLE1SrDcvsOs3Wkfb1JgizdKs5Fiag3cp/m9k7C7GWd4E7gs3K5LHAePaIP7K62C20ZZI3JQx8iBQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"tslib": "^1.8.1"
|
||||
@@ -4101,9 +4124,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"xtend": {
|
||||
"version": "4.0.1",
|
||||
"resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz",
|
||||
"integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=",
|
||||
"version": "4.0.2",
|
||||
"resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",
|
||||
"integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==",
|
||||
"dev": true
|
||||
},
|
||||
"y18n": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@openstapps/core",
|
||||
"version": "0.25.0",
|
||||
"version": "0.31.0",
|
||||
"description": "StAppsCore - Generalized model of data",
|
||||
"keywords": [
|
||||
"Model",
|
||||
@@ -44,7 +44,7 @@
|
||||
"dependencies": {
|
||||
"@types/geojson": "1.0.6",
|
||||
"@types/json-patch": "0.0.30",
|
||||
"@types/node": "10.14.13",
|
||||
"@types/node": "10.14.14",
|
||||
"fast-clone": "1.5.13",
|
||||
"http-status-codes": "1.3.2",
|
||||
"json-patch": "0.7.0",
|
||||
@@ -61,12 +61,12 @@
|
||||
"chai": "4.2.0",
|
||||
"commander": "2.20.0",
|
||||
"conditional-type-checks": "1.0.1",
|
||||
"conventional-changelog-cli": "2.0.21",
|
||||
"conventional-changelog-cli": "2.0.23",
|
||||
"mocha": "6.2.0",
|
||||
"mocha-typescript": "1.1.17",
|
||||
"nyc": "14.1.1",
|
||||
"rimraf": "2.6.3",
|
||||
"source-map-support": "0.5.12",
|
||||
"source-map-support": "0.5.13",
|
||||
"ts-node": "8.3.0",
|
||||
"tslint": "5.18.0",
|
||||
"typedoc": "0.14.2",
|
||||
|
||||
@@ -22,6 +22,13 @@ import {SCMonitoringConfiguration} from './monitoring';
|
||||
* A backend configuration
|
||||
*/
|
||||
export interface SCBackendConfiguration {
|
||||
/**
|
||||
* The maximum amount of time (milliseconds) an external program can take to provide a response to the backend
|
||||
*
|
||||
* This can be used for example for Plugins.
|
||||
*/
|
||||
externalRequestTimeout: number;
|
||||
|
||||
/**
|
||||
* A list of hidden SC types
|
||||
*
|
||||
@@ -30,6 +37,13 @@ export interface SCBackendConfiguration {
|
||||
*/
|
||||
hiddenTypes: SCThingType[];
|
||||
|
||||
/**
|
||||
* A list of tags that will be ignored by the mapping generator
|
||||
*
|
||||
* The ignored tags should mainly be tags that are irrelevant to the mapping. The tags should include the '@'.
|
||||
*/
|
||||
mappingIgnoredTags: string[];
|
||||
|
||||
/**
|
||||
* Maximum number of queries, that can be used in MultiSearchRoute
|
||||
*/
|
||||
|
||||
@@ -18,11 +18,15 @@
|
||||
export interface SCLanguage {
|
||||
/**
|
||||
* The two letter ISO 639-1 Code of the Language
|
||||
*
|
||||
* @filterable
|
||||
*/
|
||||
code: SCLanguageCode;
|
||||
|
||||
/**
|
||||
* The Fulltext name of the Language
|
||||
*
|
||||
* @filterable
|
||||
*/
|
||||
name: SCLanguageName;
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {SCThingsField} from '../../meta';
|
||||
import {SCThingType} from '../../things/abstract/thing';
|
||||
|
||||
/**
|
||||
* A search facet
|
||||
@@ -27,6 +28,11 @@ export interface SCFacet {
|
||||
* Field of the aggregation
|
||||
*/
|
||||
field: SCThingsField;
|
||||
|
||||
/**
|
||||
* Type of the aggregation
|
||||
*/
|
||||
onlyOnType?: SCThingType;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -29,6 +29,7 @@ export interface SCAcademicDegreeWithoutReferences
|
||||
* The achievable academic degree with academic field specification
|
||||
* (eg. Master of Science)
|
||||
*
|
||||
* @filterable
|
||||
* @keyword
|
||||
*/
|
||||
academicDegreewithField: string;
|
||||
@@ -37,6 +38,7 @@ export interface SCAcademicDegreeWithoutReferences
|
||||
* The achievable academic degree with academic field specification
|
||||
* shorted (eg. M.Sc.).
|
||||
*
|
||||
* @filterable
|
||||
* @keyword
|
||||
*/
|
||||
academicDegreewithFieldShort: string;
|
||||
|
||||
@@ -25,27 +25,36 @@ export interface SCAcademicTermWithoutReferences
|
||||
* Short name of the academic term, using the given pattern
|
||||
*
|
||||
* @aggregatable
|
||||
* @filterable
|
||||
* @keyword
|
||||
*/
|
||||
acronym: string;
|
||||
|
||||
/**
|
||||
* End date of the academic term
|
||||
*
|
||||
* @filterable
|
||||
*/
|
||||
endDate: SCISO8601Date;
|
||||
|
||||
/**
|
||||
* End date of lectures in the academic term
|
||||
*
|
||||
* @filterable
|
||||
*/
|
||||
eventsEndDate?: SCISO8601Date;
|
||||
|
||||
/**
|
||||
* Start date of lectures in the academic term
|
||||
*
|
||||
* @filterable
|
||||
*/
|
||||
eventsStartDate?: SCISO8601Date;
|
||||
|
||||
/**
|
||||
* Start date of the academic term
|
||||
*
|
||||
* @filterable
|
||||
*/
|
||||
startDate: SCISO8601Date;
|
||||
}
|
||||
|
||||
@@ -32,6 +32,8 @@ export interface SCCreativeWorkWithoutReferences
|
||||
extends SCThingWithoutReferences, SCThingThatCanBeOfferedWithoutReferences {
|
||||
/**
|
||||
* Date the creative work was published
|
||||
*
|
||||
* @filterable
|
||||
*/
|
||||
datePublished?: SCISO8601Date;
|
||||
|
||||
@@ -44,6 +46,7 @@ export interface SCCreativeWorkWithoutReferences
|
||||
* Keywords of the creative work
|
||||
*
|
||||
* @aggregatable
|
||||
* @filterable
|
||||
* @keyword
|
||||
*/
|
||||
keywords?: string[];
|
||||
|
||||
@@ -40,31 +40,43 @@ export interface SCGeoInformation {
|
||||
export interface SCPostalAddress {
|
||||
/**
|
||||
* Country of the address
|
||||
*
|
||||
* @filterable
|
||||
*/
|
||||
addressCountry: string;
|
||||
|
||||
/**
|
||||
* City of the address
|
||||
*
|
||||
* @filterable
|
||||
*/
|
||||
addressLocality: string;
|
||||
|
||||
/**
|
||||
* State of the address
|
||||
*
|
||||
* @filterable
|
||||
*/
|
||||
addressRegion?: string;
|
||||
|
||||
/**
|
||||
* Zip code of the address
|
||||
*
|
||||
* @filterable
|
||||
*/
|
||||
postalCode: string;
|
||||
|
||||
/**
|
||||
* Optional post box number
|
||||
*
|
||||
* @filterable
|
||||
*/
|
||||
postOfficeBoxNumber?: string;
|
||||
|
||||
/**
|
||||
* Street of the address - with house number!
|
||||
*
|
||||
* @filterable
|
||||
*/
|
||||
streetAddress: string;
|
||||
}
|
||||
|
||||
@@ -30,6 +30,8 @@ export interface SCThingThatAcceptsPaymentsWithoutReferences
|
||||
extends SCThingWithoutReferences {
|
||||
/**
|
||||
* Accepted payments of the place
|
||||
*
|
||||
* @filterable
|
||||
*/
|
||||
paymentsAccepted?: SCThingThatAcceptsPaymentsAcceptedPayments[];
|
||||
}
|
||||
|
||||
@@ -29,6 +29,7 @@ export interface SCThingWithCategoriesWithoutReferences<T, U extends SCThingWith
|
||||
*
|
||||
* @sortable ducet
|
||||
* @aggregatable
|
||||
* @filterable
|
||||
*/
|
||||
categories: T[];
|
||||
|
||||
@@ -61,10 +62,6 @@ export interface SCThingWithCategories<T, U extends SCThingWithCategoriesSpecifi
|
||||
*/
|
||||
export interface SCThingWithCategoriesTranslatableProperties
|
||||
extends SCThingTranslatableProperties {
|
||||
/**
|
||||
* translations of the categories of a thing with categories
|
||||
*/
|
||||
categories?: string[];
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -55,6 +55,7 @@ export interface SCThingWithoutReferences {
|
||||
/**
|
||||
* Alternate names of the thing
|
||||
*
|
||||
* @filterable
|
||||
* @keyword
|
||||
*/
|
||||
alternateNames?: string[];
|
||||
@@ -74,6 +75,7 @@ export interface SCThingWithoutReferences {
|
||||
/**
|
||||
* Name of the thing
|
||||
*
|
||||
* @filterable
|
||||
* @minLength 1
|
||||
* @sortable ducet
|
||||
* @text
|
||||
@@ -89,7 +91,8 @@ export interface SCThingWithoutReferences {
|
||||
* Type of the thing
|
||||
*
|
||||
* @sortable ducet
|
||||
* @aggregatable
|
||||
* @filterable
|
||||
* @aggregatable global
|
||||
*/
|
||||
type: SCThingType;
|
||||
/**
|
||||
|
||||
@@ -33,6 +33,7 @@ export interface SCAcademicEventWithoutReferences
|
||||
* Majors of the academic event that this event belongs to
|
||||
*
|
||||
* @aggregatable
|
||||
* @filterable
|
||||
* @keyword
|
||||
*/
|
||||
majors?: string[];
|
||||
@@ -40,6 +41,7 @@ export interface SCAcademicEventWithoutReferences
|
||||
/**
|
||||
* Original unmapped category from the source of the academic event
|
||||
*
|
||||
* @filterable
|
||||
* @keyword
|
||||
*/
|
||||
originalCategory?: string;
|
||||
@@ -92,6 +94,7 @@ export type SCAcademicEventCategories =
|
||||
| 'course'
|
||||
| 'practicum introduction'
|
||||
| 'excursion'
|
||||
| 'exercise'
|
||||
| 'special';
|
||||
|
||||
/**
|
||||
@@ -152,7 +155,8 @@ export class SCAcademicEventMeta
|
||||
'colloquium': 'Kolloquium',
|
||||
'course': 'Kurs',
|
||||
'excursion': 'Exkursion',
|
||||
'integrated course': '',
|
||||
'exercise': 'Übung',
|
||||
'integrated course': 'Integrierter Kurs',
|
||||
'introductory class': 'Einführungsveranstaltung',
|
||||
'lecture': 'Vorlesung',
|
||||
'oral exam': 'mündliche Prüfung',
|
||||
|
||||
@@ -31,6 +31,7 @@ export interface SCBookWithoutReferences
|
||||
/**
|
||||
* Edition of a book
|
||||
*
|
||||
* @filterable
|
||||
* @keyword
|
||||
*/
|
||||
bookEdition?: string;
|
||||
@@ -38,6 +39,7 @@ export interface SCBookWithoutReferences
|
||||
/**
|
||||
* ISBN of a book
|
||||
*
|
||||
* @filterable
|
||||
* @keyword
|
||||
*/
|
||||
isbn: string;
|
||||
|
||||
@@ -46,12 +46,14 @@ export interface SCBuildingWithoutReferences
|
||||
*
|
||||
* @sortable ducet
|
||||
* @aggregatable
|
||||
* @filterable
|
||||
*/
|
||||
categories: SCBuildingCategories[];
|
||||
|
||||
/**
|
||||
* List of floor names of the place
|
||||
*
|
||||
* @filterable
|
||||
* @keyword
|
||||
*/
|
||||
floors?: string[];
|
||||
|
||||
@@ -39,6 +39,7 @@ export interface SCCourseOfStudiesWithoutReferences
|
||||
/**
|
||||
* Actual major of the course of studies (eg. physics)
|
||||
*
|
||||
* @filterable
|
||||
* @keyword
|
||||
*/
|
||||
major: string;
|
||||
|
||||
@@ -47,6 +47,8 @@ export interface SCDateSeriesWithoutReferences
|
||||
extends SCThingThatCanBeOfferedWithoutReferences {
|
||||
/**
|
||||
* Dates of the date series that are initially planned to be held
|
||||
*
|
||||
* @filterable
|
||||
*/
|
||||
dates: SCISO8601Date[];
|
||||
|
||||
|
||||
@@ -38,6 +38,7 @@ export interface SCDishWithoutReferences
|
||||
/**
|
||||
* Additives of the dish
|
||||
*
|
||||
* @filterable
|
||||
* @keyword
|
||||
*/
|
||||
additives?: string[];
|
||||
@@ -47,6 +48,7 @@ export interface SCDishWithoutReferences
|
||||
*
|
||||
* @sortable ducet
|
||||
* @aggregatable
|
||||
* @filterable
|
||||
*/
|
||||
categories: SCDishCategories[];
|
||||
|
||||
@@ -118,6 +120,7 @@ export interface SCDishCharacteristic {
|
||||
/**
|
||||
* Name of the characteristic
|
||||
*
|
||||
* @filterable
|
||||
* @text
|
||||
*/
|
||||
name: string;
|
||||
|
||||
@@ -36,11 +36,15 @@ export interface SCMessageWithoutReferences
|
||||
|
||||
/**
|
||||
* Roles for which the message is intended
|
||||
*
|
||||
* @filterable
|
||||
*/
|
||||
audiences: SCMessageAudience[];
|
||||
|
||||
/**
|
||||
* When the message was created
|
||||
*
|
||||
* @filterable
|
||||
*/
|
||||
dateCreated?: SCISO8601Date;
|
||||
|
||||
@@ -51,6 +55,11 @@ export interface SCMessageWithoutReferences
|
||||
*/
|
||||
messageBody: string;
|
||||
|
||||
/**
|
||||
* An index for applying a custom sorting of multiple messages
|
||||
*/
|
||||
sequenceIndex?: number;
|
||||
|
||||
/**
|
||||
* Translated fields of a message
|
||||
*/
|
||||
@@ -119,6 +128,7 @@ export class SCMessageMeta
|
||||
audiences: 'Zielgruppen',
|
||||
dateCreated: 'Erstellungsdatum',
|
||||
messageBody: 'Nachrichteninhalt',
|
||||
sequenceIndex: 'Sequenzindex',
|
||||
},
|
||||
en: {
|
||||
...SCCreativeWorkMeta.getInstance<SCCreativeWorkMeta>().fieldTranslations
|
||||
@@ -127,6 +137,7 @@ export class SCMessageMeta
|
||||
audiences: 'audiences',
|
||||
dateCreated: 'date created',
|
||||
messageBody: 'message body',
|
||||
sequenceIndex: 'sequence index',
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
@@ -28,12 +28,15 @@ export interface SCPersonWithoutReferences
|
||||
/**
|
||||
* Additional first names of the person.
|
||||
*
|
||||
* @filterable
|
||||
* @keyword
|
||||
*/
|
||||
additionalName?: string;
|
||||
|
||||
/**
|
||||
* The birth date of the person.
|
||||
*
|
||||
* @filterable
|
||||
*/
|
||||
birthDate?: SCISO8601Date;
|
||||
|
||||
@@ -42,6 +45,7 @@ export interface SCPersonWithoutReferences
|
||||
*
|
||||
* @TJS-format email
|
||||
*
|
||||
* @filterable
|
||||
* @keyword
|
||||
*/
|
||||
email?: string;
|
||||
@@ -49,6 +53,7 @@ export interface SCPersonWithoutReferences
|
||||
/**
|
||||
* The family name of the person.
|
||||
*
|
||||
* @filterable
|
||||
* @keyword
|
||||
*/
|
||||
familyName: string;
|
||||
@@ -56,18 +61,22 @@ export interface SCPersonWithoutReferences
|
||||
/**
|
||||
* The private fax number of the person.
|
||||
*
|
||||
* @filterable
|
||||
* @keyword
|
||||
*/
|
||||
faxNumber?: string;
|
||||
|
||||
/**
|
||||
* The gender of the person.
|
||||
*
|
||||
* @filterable
|
||||
*/
|
||||
gender?: SCPersonGender;
|
||||
|
||||
/**
|
||||
* The first name of the person.
|
||||
*
|
||||
* @filterable
|
||||
* @keyword
|
||||
*/
|
||||
givenName: string;
|
||||
@@ -75,6 +84,7 @@ export interface SCPersonWithoutReferences
|
||||
/**
|
||||
* Honorific prefix of the person.
|
||||
*
|
||||
* @filterable
|
||||
* @keyword
|
||||
*/
|
||||
honorificPrefix?: string;
|
||||
@@ -82,6 +92,7 @@ export interface SCPersonWithoutReferences
|
||||
/**
|
||||
* Honorific suffix of the person.
|
||||
*
|
||||
* @filterable
|
||||
* @keyword
|
||||
*/
|
||||
honorificSuffix?: string;
|
||||
@@ -89,6 +100,7 @@ export interface SCPersonWithoutReferences
|
||||
/**
|
||||
* Titles of jobs that the person has.
|
||||
*
|
||||
* @filterable
|
||||
* @keyword
|
||||
*/
|
||||
jobTitles?: string[];
|
||||
@@ -96,6 +108,7 @@ export interface SCPersonWithoutReferences
|
||||
/**
|
||||
* The complete name of the person combining all the parts of the name into one.
|
||||
*
|
||||
* @filterable
|
||||
* @text
|
||||
*/
|
||||
name: string;
|
||||
|
||||
@@ -58,6 +58,7 @@ export interface SCRoomWithoutReferences
|
||||
/**
|
||||
* The name of the floor in which the room is in.
|
||||
*
|
||||
* @filterable
|
||||
* @text
|
||||
*/
|
||||
floorName?: string;
|
||||
|
||||
@@ -28,6 +28,7 @@ export interface SCSemesterWithoutReferences
|
||||
/**
|
||||
* The short name of the semester, using the given pattern.
|
||||
*
|
||||
* @filterable
|
||||
* @pattern ^(WS|SS) [0-9]{4}(/[0-9]{2})?$
|
||||
* @keyword
|
||||
*/
|
||||
|
||||
@@ -47,6 +47,7 @@ export interface SCStudyModuleWithoutReferences
|
||||
/**
|
||||
* Majors that this study module is meant for
|
||||
*
|
||||
* @filterable
|
||||
* @keyword
|
||||
*/
|
||||
majors: string[];
|
||||
|
||||
@@ -35,6 +35,8 @@ export interface SCToDoWithoutReferences
|
||||
|
||||
/**
|
||||
* A date when the "to do" is due
|
||||
*
|
||||
* @filterable
|
||||
*/
|
||||
dueDate?: SCISO8601Date;
|
||||
|
||||
|
||||
@@ -68,6 +68,8 @@ export interface SCVideoSource {
|
||||
|
||||
/**
|
||||
* MIME-Type of the source File
|
||||
*
|
||||
* @filterable
|
||||
*/
|
||||
mimeType: SCVideoMimeType;
|
||||
|
||||
@@ -101,6 +103,8 @@ export interface SCVideoTrack {
|
||||
|
||||
/**
|
||||
* Content Type of the Track File
|
||||
*
|
||||
* @filterable
|
||||
*/
|
||||
type: SCVideoTrackTypes;
|
||||
|
||||
|
||||
@@ -146,8 +146,8 @@ export class SCThingTranslator {
|
||||
* Applies known field value translations of the given SCThings meta class to an instance
|
||||
* Translated values overwrite current values inplace (destructive)
|
||||
*
|
||||
* @param language The language the thing is translated to
|
||||
* @param thing The thing that will be translated
|
||||
* @param instance The thing / object that will be translated
|
||||
* @param language The language the thing / object is translated to
|
||||
* @returns The thing with translated meta field values
|
||||
*/
|
||||
private replaceAvailableMetaFieldValueTranslations(instance: any,
|
||||
@@ -159,13 +159,18 @@ export class SCThingTranslator {
|
||||
if (typeof metaClass.fieldValueTranslations[language] !== 'undefined') {
|
||||
Object.keys(metaClass.fieldValueTranslations[language])
|
||||
.forEach((key) => {
|
||||
if (metaClass.fieldValueTranslations[language][key] instanceof Object) {
|
||||
if (metaClass.fieldValueTranslations[language][key] instanceof Object
|
||||
&& (instance as any)[key] instanceof Object) {
|
||||
// Assigns known translations of subproperties to property in given language (e.g. categories)
|
||||
Object.keys((instance as any)[key])
|
||||
.forEach((subKey) => {
|
||||
(instance as any)[key][subKey] =
|
||||
metaClass.fieldValueTranslations[language][key][(instance as any)[key][subKey]];
|
||||
});
|
||||
} else if (metaClass.fieldValueTranslations[language][key] instanceof Object
|
||||
&& typeof (instance as any)[key] === 'string') {
|
||||
// Assigns known translations of enum to property in given language (e.g. SCSettingInputType)
|
||||
(instance as any)[key] = metaClass.fieldValueTranslations[language][key][(instance as any)[key]];
|
||||
} else {
|
||||
// Assigns property to known translation of fieldValueTranslations in given language
|
||||
(instance as any)[key] = metaClass.fieldValueTranslations[language][key];
|
||||
@@ -213,8 +218,8 @@ export class SCThingTranslator {
|
||||
* All the values will be set to the known translations of the property/key name
|
||||
* @example
|
||||
* const translatedMetaDish = translator.translatedPropertyNames<SCCourseOfStudies>(SCThingType.CourseOfStudies);
|
||||
* @param language The language the object is translated to
|
||||
* @param thingType Type of the thing
|
||||
* @param thing The thing whose property names will be translated
|
||||
* @param language The language all property names will be translated to
|
||||
* @returns An object with the properties of the SCThingType where the values are the known property tranlations
|
||||
*/
|
||||
public translatedPropertyNames<T extends SCThing>(thing: T,
|
||||
@@ -228,8 +233,8 @@ export class SCThingTranslator {
|
||||
* Recursively translates the given object in-place
|
||||
* Translated values overwrite current values (destructive)
|
||||
*
|
||||
* @param language The language the thing is translated to
|
||||
* @param thing The thing that will be translated
|
||||
* @param instance The thing / object that will be translated
|
||||
* @param language The language the thing / object is translated to
|
||||
* @returns The thing translated
|
||||
*/
|
||||
public translateWholeThingDestructively(instance: any,
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
"audiences": [
|
||||
"students"
|
||||
],
|
||||
"sequenceIndex": 1010,
|
||||
"origin": {
|
||||
"indexed": "2018-09-11T12:30:00Z",
|
||||
"name": "Dummy",
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
"audiences": [
|
||||
"students"
|
||||
],
|
||||
"sequenceIndex": 1020,
|
||||
"origin": {
|
||||
"indexed": "2018-09-11T12:30:00Z",
|
||||
"name": "Dummy",
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
"audiences": [
|
||||
"students"
|
||||
],
|
||||
"sequenceIndex": 1001,
|
||||
"origin": {
|
||||
"indexed": "2018-09-11T12:30:00Z",
|
||||
"name": "Dummy",
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
"audiences": [
|
||||
"students"
|
||||
],
|
||||
"sequenceIndex": 1004,
|
||||
"origin": {
|
||||
"indexed": "2018-09-11T12:30:00Z",
|
||||
"name": "foo",
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
"type": "organization",
|
||||
"uid": "4806ef14-b631-5c20-91d1-3c627decca5a"
|
||||
}],
|
||||
"sequenceIndex": 1005,
|
||||
"origin": {
|
||||
"indexed": "2018-09-11T12:30:00Z",
|
||||
"name": "Dummy",
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
},
|
||||
"translations": {
|
||||
"de": {
|
||||
"categories": ["Benutzer"],
|
||||
"description": "Die Sprache in der die App angezeigt wird.",
|
||||
"name": "Sprache",
|
||||
"values": [
|
||||
@@ -25,9 +24,6 @@
|
||||
]
|
||||
},
|
||||
"en": {
|
||||
"categories": [
|
||||
"User"
|
||||
],
|
||||
"description": "The language this app is going to use.",
|
||||
"name": "Language",
|
||||
"values": [
|
||||
|
||||
@@ -18,6 +18,7 @@ import {slow, suite, test, timeout} from 'mocha-typescript';
|
||||
import {SCThingOriginType, SCThingType} from '../src/things/abstract/thing';
|
||||
import {SCBuildingWithoutReferences} from '../src/things/building';
|
||||
import {SCDish, SCDishMeta} from '../src/things/dish';
|
||||
import {SCSetting, SCSettingInputType} from '../src/things/setting';
|
||||
import {SCThingTranslator} from '../src/translator';
|
||||
|
||||
const building: SCBuildingWithoutReferences = {
|
||||
@@ -86,6 +87,23 @@ const dish: SCDish = {
|
||||
uid: '540862f3-ea30-5b8f-8678-56b4dc217140',
|
||||
};
|
||||
|
||||
const setting: SCSetting = {
|
||||
categories: ['profile'],
|
||||
defaultValue: 'student',
|
||||
description: 'base-description',
|
||||
inputType: SCSettingInputType.SingleChoice,
|
||||
name: 'group',
|
||||
order: 1,
|
||||
origin: {
|
||||
indexed: '2018-11-11T14:30:00Z',
|
||||
name: 'Dummy',
|
||||
type: SCThingOriginType.Remote,
|
||||
},
|
||||
type: SCThingType.Setting,
|
||||
uid: '2c97aa36-4aa2-43de-bc5d-a2b2cb3a530e',
|
||||
values: ['student', 'employee', true, 42],
|
||||
};
|
||||
|
||||
const translator = new SCThingTranslator('de');
|
||||
// tslint:disable-next-line:no-eval
|
||||
const languageNonExistant = eval("'jp'");
|
||||
@@ -95,6 +113,10 @@ const translatorWithFallback = new SCThingTranslator(languageNonExistant);
|
||||
// tslint:disable:member-ordering TranslationSpecInplace
|
||||
@suite(timeout(10000), slow(5000))
|
||||
export class TranslationSpecInplace {
|
||||
@test
|
||||
public directEnumSingleValue () {
|
||||
expect(translator.translate(setting).inputType()).to.equal('einfache Auswahl');
|
||||
}
|
||||
|
||||
@test
|
||||
public directStringLiteralType() {
|
||||
|
||||
Reference in New Issue
Block a user