generated from SAP/repository-template
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(technicalUser): adjust service account to new provisioning api
Refs: #79
- Loading branch information
Showing
37 changed files
with
884 additions
and
152 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
src/clients/Dim.Clients/Api/Div/Models/ServiceKeyOperationCreationRequest.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/******************************************************************************** | ||
* Copyright (c) 2024 BMW Group AG | ||
* Copyright 2024 SAP SE or an SAP affiliate company and ssi-dim-middle-layer contributors. | ||
* | ||
* See the NOTICE file(s) distributed with this work for additional | ||
* information regarding copyright ownership. | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Apache License, Version 2.0 which is available at | ||
* https://www.apache.org/licenses/LICENSE-2.0. | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
* License for the specific language governing permissions and limitations | ||
* under the License. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
********************************************************************************/ | ||
|
||
using System.Text.Json.Serialization; | ||
|
||
namespace Dim.Clients.Api.Div.Models; | ||
|
||
public record ServiceKeyOperationCreationRequest( | ||
[property: JsonPropertyName("entity")] string Entity, | ||
[property: JsonPropertyName("action")] string Action, | ||
[property: JsonPropertyName("payload")] ServiceKeyPayloadData Payload | ||
); | ||
|
||
public record ServiceKeyPayloadData( | ||
[property: JsonPropertyName("customerWalletId")] Guid CustomerWalletId, | ||
[property: JsonPropertyName("divWalletServiceName")] string ServiceKeyName | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/******************************************************************************** | ||
* Copyright (c) 2024 BMW Group AG | ||
* Copyright 2024 SAP SE or an SAP affiliate company and ssi-dim-middle-layer contributors. | ||
* | ||
* See the NOTICE file(s) distributed with this work for additional | ||
* information regarding copyright ownership. | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Apache License, Version 2.0 which is available at | ||
* https://www.apache.org/licenses/LICENSE-2.0. | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
* License for the specific language governing permissions and limitations | ||
* under the License. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
********************************************************************************/ | ||
|
||
using Dim.Entities.Enums; | ||
|
||
namespace Dim.DbAccess.Models; | ||
|
||
public record ProcessData( | ||
Guid ProcessId, | ||
IEnumerable<ProcessStepData> ProcessStepData | ||
); | ||
|
||
public record ProcessStepData( | ||
ProcessStepTypeId ProcessStepTypeId, | ||
ProcessStepStatusId ProcessStepStatusId | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
src/database/Dim.Entities/Extensions/ProcessStepTypeIdExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
using Dim.Entities.Enums; | ||
|
||
namespace Dim.Entities.Extensions; | ||
|
||
public static class ProcessStepTypeIdExtensions | ||
{ | ||
public static ProcessStepTypeId GetRetriggerStep(this ProcessStepTypeId processStepTypeId, ProcessTypeId processTypeId) => | ||
processStepTypeId switch | ||
{ | ||
ProcessStepTypeId.CREATE_WALLET when processTypeId is ProcessTypeId.SETUP_DIM => ProcessStepTypeId.RETRIGGER_CREATE_WALLET, | ||
ProcessStepTypeId.CHECK_OPERATION when processTypeId is ProcessTypeId.SETUP_DIM => ProcessStepTypeId.RETRIGGER_CHECK_OPERATION, | ||
ProcessStepTypeId.GET_COMPANY when processTypeId is ProcessTypeId.SETUP_DIM => ProcessStepTypeId.RETRIGGER_GET_COMPANY, | ||
ProcessStepTypeId.GET_DID_DOCUMENT when processTypeId is ProcessTypeId.SETUP_DIM => ProcessStepTypeId.RETRIGGER_GET_DID_DOCUMENT, | ||
ProcessStepTypeId.CREATE_STATUS_LIST when processTypeId is ProcessTypeId.SETUP_DIM => ProcessStepTypeId.RETRIGGER_CREATE_STATUS_LIST, | ||
ProcessStepTypeId.SEND_CALLBACK when processTypeId is ProcessTypeId.SETUP_DIM => ProcessStepTypeId.RETRIGGER_SEND_CALLBACK, | ||
ProcessStepTypeId.CREATE_TECHNICAL_USER when processTypeId is ProcessTypeId.TECHNICAL_USER => ProcessStepTypeId.RETRIGGER_CREATE_TECHNICAL_USER, | ||
ProcessStepTypeId.GET_TECHNICAL_USER_DATA when processTypeId is ProcessTypeId.TECHNICAL_USER => ProcessStepTypeId.RETRIGGER_GET_TECHNICAL_USER_DATA, | ||
ProcessStepTypeId.SEND_TECHNICAL_USER_CREATION_CALLBACK when processTypeId is ProcessTypeId.TECHNICAL_USER => ProcessStepTypeId.RETRIGGER_SEND_TECHNICAL_USER_CREATION_CALLBACK, | ||
ProcessStepTypeId.DELETE_TECHNICAL_USER when processTypeId is ProcessTypeId.TECHNICAL_USER => ProcessStepTypeId.RETRIGGER_DELETE_TECHNICAL_USER, | ||
ProcessStepTypeId.SEND_TECHNICAL_USER_DELETION_CALLBACK when processTypeId is ProcessTypeId.TECHNICAL_USER => ProcessStepTypeId.RETRIGGER_SEND_TECHNICAL_USER_DELETION_CALLBACK, | ||
_ => throw new ArgumentOutOfRangeException(nameof(processStepTypeId), processStepTypeId, null) | ||
}; | ||
|
||
public static ProcessStepTypeId GetStepForRetrigger(this ProcessStepTypeId processStepTypeId, ProcessTypeId processTypeId) => | ||
processStepTypeId switch | ||
{ | ||
ProcessStepTypeId.RETRIGGER_CREATE_WALLET when processTypeId is ProcessTypeId.SETUP_DIM => ProcessStepTypeId.CREATE_WALLET, | ||
ProcessStepTypeId.RETRIGGER_CHECK_OPERATION when processTypeId is ProcessTypeId.SETUP_DIM => ProcessStepTypeId.CHECK_OPERATION, | ||
ProcessStepTypeId.RETRIGGER_GET_COMPANY when processTypeId is ProcessTypeId.SETUP_DIM => ProcessStepTypeId.GET_COMPANY, | ||
ProcessStepTypeId.RETRIGGER_GET_DID_DOCUMENT when processTypeId is ProcessTypeId.SETUP_DIM => ProcessStepTypeId.GET_DID_DOCUMENT, | ||
ProcessStepTypeId.RETRIGGER_CREATE_STATUS_LIST when processTypeId is ProcessTypeId.SETUP_DIM => ProcessStepTypeId.CREATE_STATUS_LIST, | ||
ProcessStepTypeId.RETRIGGER_SEND_CALLBACK when processTypeId is ProcessTypeId.SETUP_DIM => ProcessStepTypeId.SEND_CALLBACK, | ||
ProcessStepTypeId.RETRIGGER_CREATE_TECHNICAL_USER when processTypeId is ProcessTypeId.TECHNICAL_USER => ProcessStepTypeId.CREATE_TECHNICAL_USER, | ||
ProcessStepTypeId.RETRIGGER_GET_TECHNICAL_USER_DATA when processTypeId is ProcessTypeId.TECHNICAL_USER => ProcessStepTypeId.GET_TECHNICAL_USER_DATA, | ||
ProcessStepTypeId.RETRIGGER_SEND_TECHNICAL_USER_CREATION_CALLBACK when processTypeId is ProcessTypeId.TECHNICAL_USER => ProcessStepTypeId.SEND_TECHNICAL_USER_CREATION_CALLBACK, | ||
ProcessStepTypeId.RETRIGGER_DELETE_TECHNICAL_USER when processTypeId is ProcessTypeId.TECHNICAL_USER => ProcessStepTypeId.DELETE_TECHNICAL_USER, | ||
ProcessStepTypeId.RETRIGGER_SEND_TECHNICAL_USER_DELETION_CALLBACK when processTypeId is ProcessTypeId.TECHNICAL_USER => ProcessStepTypeId.SEND_TECHNICAL_USER_DELETION_CALLBACK, | ||
_ => throw new ArgumentOutOfRangeException(nameof(processStepTypeId), processStepTypeId, null) | ||
}; | ||
} |
Oops, something went wrong.