Removed specs on Gireve/Hubject in settings + updated i18n
MODIFY
src/assets/server/rest/v1/docs/e-mobility-oas.json
src/assets/server/rest/v1/docs/e-mobility-oas.json
"type": {
"type": "string",
"enum": [
- "gireve"
+ "ocpi"
+ ]
+ },
+ "active": {
+ "type": "boolean"
+ }
+ }
+ },
+ "oicp": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "enum": [
+ "oicp"
]
},
"active": {

MODIFY
src/server/rest/v1/service/TenantService.ts
src/server/rest/v1/service/TenantService.ts
@@ -61,7 +61,7 @@ export default class TenantService {
// Remove collection
await TenantStorage.deleteTenantDB(tenant.id);
// Log
- Logging.logSecurityInfo({
+ await Logging.logSecurityInfo({
tenantID: req.user.tenantID, user: req.user,
module: MODULE_NAME, method: 'handleDeleteTenant',
message: `Tenant '${tenant.name}' has been deleted successfully`,
@@ -306,7 +306,7 @@ export default class TenantService {
}
).catch(() => { });
// Log
- Logging.logSecurityInfo({
+ await Logging.logSecurityInfo({
tenantID: req.user.tenantID, user: req.user,
module: MODULE_NAME, method: 'handleCreateTenant',
message: `Tenant '${filteredRequest.name}' has been created successfully`,
@@ -368,7 +368,7 @@ export default class TenantService {
// Update with components
await TenantService.updateSettingsWithComponents(filteredRequest, req);
// Log
- Logging.logSecurityInfo({
+ await Logging.logSecurityInfo({
tenantID: req.user.tenantID, user: req.user,
module: MODULE_NAME, method: 'handleUpdateTenant',
message: `Tenant '${filteredRequest.name}' has been updated successfully`,

MODIFY
src/server/rest/v1/service/security/SettingSecurity.ts
src/server/rest/v1/service/security/SettingSecurity.ts
@@ -65,7 +65,7 @@ export default class SettingSecurity {
timezone: sanitize(request.content.sac.timezone)
};
break;
- case RoamingSettingsType.GIREVE:
+ case RoamingSettingsType.OCPI:
settings.content.ocpi = {} as OcpiSetting;
if (Utils.objectHasProperty(request.content.ocpi, 'businessDetails')) {
settings.content.ocpi.businessDetails = {
@@ -99,7 +99,7 @@ export default class SettingSecurity {
settings.content.ocpi.currency = request.content.ocpi.currency;
}
break;
- case RoamingSettingsType.HUBJECT:
+ case RoamingSettingsType.OICP:
settings.content.oicp = {} as OicpSetting;
if (request.content.oicp.businessDetails) {
settings.content.oicp.businessDetails = {

MODIFY
src/types/Setting.ts
src/types/Setting.ts
@@ -87,8 +87,8 @@ export interface ConvergentChargingPricingSetting extends PricingSetting {
}
export enum RoamingSettingsType {
- GIREVE = 'gireve',
- HUBJECT = 'hubject'
+ OCPI = 'ocpi',
+ OICP = 'oicp',
}
export interface RoamingSettings extends Setting {
@@ -117,8 +117,7 @@ export interface RoamingIdentifier {
partyID: string;
}
-export interface OcpiIdentifier extends RoamingIdentifier {
-}
+export type OcpiIdentifier = RoamingIdentifier;
// Should be renamed. Certificate and Key are bundled with OperatorID / ProviderID at this moment.
// Because the roles CPO and EMSP probably need different certificates to call the Hubject Backend

MODIFY
src/utils/Utils.ts
src/utils/Utils.ts
@@ -1275,7 +1275,7 @@ export default class Utils {
if (!currentSettingContent || currentSettingContent.type !== activeComponent.type) {
// Only Gireve
return {
- 'type': RoamingSettingsType.GIREVE,
+ 'type': RoamingSettingsType.OCPI,
'ocpi': {}
} as SettingDBContent;
}
@@ -1285,7 +1285,7 @@ export default class Utils {
if (!currentSettingContent || currentSettingContent.type !== activeComponent.type) {
// Only Hubject
return {
- 'type': RoamingSettingsType.HUBJECT,
+ 'type': RoamingSettingsType.OICP,
'oicp': {}
} as SettingDBContent;
}

MODIFY
test/api/ComponentActivationTenantTest.ts
test/api/ComponentActivationTenantTest.ts
@@ -87,7 +87,7 @@ describe('Tenant Settings test', function() {
email: testData.credentials.email,
subdomain: ContextDefinition.TENANT_CONTEXTS.TENANT_WITH_NO_COMPONENTS,
components: {
- ocpi: { active: true, type: RoamingSettingsType.GIREVE },
+ ocpi: { active: true, type: RoamingSettingsType.OCPI },
organization: { active: false, type: null },
pricing: { active: false, type: null },
refund: { active: false, type: null },
@@ -104,7 +104,7 @@ describe('Tenant Settings test', function() {
testData.connectUser();
const settings = await testData.centralService.settingApi.readAll({});
expect(settings.data.count).to.equal(3);
- expect(settings.data.result[1]).to.be.validatedSetting(TenantComponents.OCPI, RoamingSettingsType.GIREVE);
+ expect(settings.data.result[1]).to.be.validatedSetting(TenantComponents.OCPI, RoamingSettingsType.OCPI);
});
it('Pricing/Simple : Check that the setting has been created in the tenant after activation', async function() {

MODIFY
test/api/context/ContextDefinition.ts
test/api/context/ContextDefinition.ts
@@ -114,7 +114,7 @@ export default class ContextDefinition {
asset: {},
ocpi: {
content: {
- type: RoamingSettingsType.GIREVE,
+ type: RoamingSettingsType.OCPI,
ocpi: {
currency: 'EUR',
cpo: {
@@ -244,7 +244,7 @@ export default class ContextDefinition {
componentSettings: {
ocpi: {
content: {
- type: RoamingSettingsType.GIREVE,
+ type: RoamingSettingsType.OCPI,
ocpi: {
cpo: {
countryCode: 'FR',

Removed specs on Gireve/Hubject in settings + updated i18n