Compare commits

...

9 Commits

Author SHA1 Message Date
Rainer Killinger
852e0f5373 0.60.0 2022-01-21 12:29:52 +01:00
Rainer Killinger
26dd531d24 refactor: split up SCUserConfiguration type 2022-01-21 12:22:13 +01:00
Rainer Killinger
52bdf93356 docs: update changelog 2022-01-20 14:20:17 +01:00
Rainer Killinger
7509610145 0.59.0 2022-01-20 14:20:15 +01:00
Rainer Killinger
972cdf392d refactor: make config auth provides be optional 2022-01-20 14:18:50 +01:00
Rainer Killinger
4f758f7d0c docs: update changelog 2022-01-18 15:13:06 +01:00
Rainer Killinger
980e899807 0.58.0 2022-01-18 15:13:04 +01:00
Rainer Killinger
d1c5bb9595 refactor: use SCMap for feature configurations 2022-01-18 15:12:05 +01:00
Rainer Killinger
dc9c0f528f docs: update changelog 2022-01-18 11:06:18 +01:00
7 changed files with 53 additions and 25 deletions

View File

@@ -1,3 +1,20 @@
# [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)

2
package-lock.json generated
View File

@@ -1,6 +1,6 @@
{
"name": "@openstapps/core",
"version": "0.57.0",
"version": "0.60.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

@@ -1,6 +1,6 @@
{
"name": "@openstapps/core",
"version": "0.57.0",
"version": "0.60.0",
"description": "StAppsCore - Generalized model of data",
"keywords": [
"Model",

View File

@@ -13,7 +13,7 @@
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
import {SCUserConfiguration} from './user';
import {SCUserConfigurationMap} from './user';
/**
* Supported authorization provider types
@@ -78,7 +78,7 @@ export interface SCAuthorizationProviderEndpoints {
authorization: string;
/**
* An authorization provider endpoints configuration
* URL to end current session
*/
endSession?: string;
@@ -87,7 +87,7 @@ export interface SCAuthorizationProviderEndpoints {
*
* @see https://www.npmjs.com/package/jsonpath
*/
mapping: { [key in keyof SCUserConfiguration]: string; };
mapping: SCUserConfigurationMap;
/**
* URL to revoke a token

View File

@@ -13,18 +13,19 @@
* 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?: Map<string, SCFeatureConfigurationExtern>;
extern?: SCMap<SCFeatureConfigurationExtern>;
/**
* Map of plugins registered with the backend mapped by their name.
*/
plugins?: Map<string, SCFeatureConfigurationPlugin>;
plugins?: SCMap<SCFeatureConfigurationPlugin>;
}

View File

@@ -31,7 +31,7 @@ export interface SCConfigFile {
/**
* Configuration for the supported authorization providers
*/
auth: { [key in SCAuthorizationProviderType]: SCAuthorizationProvider; };
auth: { [key in SCAuthorizationProviderType]?: SCAuthorizationProvider; };
/**
* Configuration for the backend that is visible to clients

View File

@@ -15,40 +15,50 @@
import {SCAcademicPriceGroup} from '../things/abstract/thing-that-can-be-offered';
/**
* 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 interface SCUserConfiguration {
/**
* User's e-mail
*/
email?: string;
/**
* User's family name
*/
familyName?: string;
/**
* User's given name
*/
givenName?: string;
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;
/**
* Role assigned to the user
*/
role: keyof SCAcademicPriceGroup;
}
/**
* 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;
/**
* Student ID given to the user
*/