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): add new delete logic
Refs: #79
- Loading branch information
Showing
44 changed files
with
1,450 additions
and
361 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
42 changes: 42 additions & 0 deletions
42
src/clients/Dim.Clients/Api/Div/Models/CustomerWalletsResponse.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,42 @@ | ||
/******************************************************************************** | ||
* 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 CustomerWalletsResponse( | ||
[property: JsonPropertyName("count")] int Count, | ||
[property: JsonPropertyName("data")] IEnumerable<CustomerWallet> Data | ||
); | ||
|
||
public record CustomerWallet( | ||
[property: JsonPropertyName("id")] Guid Id, | ||
[property: JsonPropertyName("meteringId")] Guid MeteringId, | ||
[property: JsonPropertyName("customerName")] string CustomerName, | ||
[property: JsonPropertyName("customerId")] string CustomerId, | ||
[property: JsonPropertyName("subscriptionUrl")] string SubscriptionUrl, | ||
[property: JsonPropertyName("serviceKeys")] IEnumerable<CustomerServiceKey> ServiceKeys | ||
); | ||
|
||
public record CustomerServiceKey( | ||
[property: JsonPropertyName("id")] Guid Id, | ||
[property: JsonPropertyName("name")] string Name | ||
); |
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.DbAccess/Repositories/ITechnicalUserRepository.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 @@ | ||
/******************************************************************************** | ||
* 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.DbAccess.Models; | ||
using Dim.Entities.Entities; | ||
|
||
namespace Dim.DbAccess.Repositories; | ||
|
||
public interface ITechnicalUserRepository | ||
{ | ||
void CreateTenantTechnicalUser(Guid tenantId, string technicalUserName, Guid externalId, Guid processId); | ||
void AttachAndModifyTechnicalUser(Guid technicalUserId, Action<TechnicalUser>? initialize, Action<TechnicalUser> modify); | ||
Task<(bool Exists, Guid TechnicalUserId)> GetTenantDataForTechnicalUserProcessId(Guid processId); | ||
Task<(Guid ExternalId, WalletData WalletData)> GetTechnicalUserCallbackData(Guid technicalUserId); | ||
Task<(bool Exists, Guid TechnicalUserId, Guid ProcessId)> GetTechnicalUserForBpn(string bpn, string technicalUserName); | ||
void RemoveTechnicalUser(Guid technicalUserId); | ||
Task<(Guid? WalletId, string TechnicalUserName)> GetTechnicalUserNameAndWalletId(Guid technicalUserId); | ||
Task<Guid?> GetOperationIdForTechnicalUser(Guid technicalUserId); | ||
Task<(Guid? OperationId, Guid ExternalId)> GetOperationAndExternalIdForTechnicalUser(Guid technicalUserId); | ||
Task<(Guid? ServiceKeyId, Guid? WalletId)> GetServiceKeyAndWalletId(Guid technicalUserId); | ||
Task<ProcessData?> GetTechnicalUserProcess(string bpn, string companyName, string technicalUserName); | ||
Task<(Guid? WalletId, string TechnicalUserName)> GetWalletIdAndNameForTechnicalUser(Guid technicalUserId); | ||
} |
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
Oops, something went wrong.