Skip to content

Commit

Permalink
feat(connector): enhance GET: /api/administration/connectors/missing-…
Browse files Browse the repository at this point in the history
…sd-document endpoint

Refs: #1181
  • Loading branch information
Phil91 committed Jan 14, 2025
1 parent 5875ad8 commit 2556bc5
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
8 changes: 7 additions & 1 deletion docs/api/administration-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6805,13 +6805,19 @@ components:
connectorId:
type: string
format: uuid
type:
$ref: '#/components/schemas/ConnectorTypeId'
name:
type: string
companyId:
type: string
format: uuid
companyName:
hostCompanyName:
type: string
skippedDate:
type: string
format: date-time
nullable: true
additionalProperties: false
ConnectorMissingSdDocumentDataResponse:
type: object
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,4 @@ public record ConnectorOfferSubscription(Guid AssignedOfferSubscriptionIds, Offe

public record TechnicalUserData(Guid Id, string Name, string? ClientId, string Description);

public record ConnectorMissingSdDocumentData(Guid ConnectorId, string Name, Guid CompanyId, string CompanyName);
public record ConnectorMissingSdDocumentData(Guid ConnectorId, ConnectorTypeId Type, string Name, Guid CompanyId, string HostCompanyName, DateTimeOffset? SkippedDate);
Original file line number Diff line number Diff line change
Expand Up @@ -218,9 +218,11 @@ public void DeleteConnectorAssignedSubscriptions(Guid connectorId, IEnumerable<G
connector => connector.OrderByDescending(c => c.Name),
con => new ConnectorMissingSdDocumentData(
con.Id,
con.TypeId,
con.Name,
con.HostId ?? con.ProviderId,
con.HostId != null ? con.Host!.Name : con.Provider!.Name)
con.HostId != null ? con.Host!.Name : con.Provider!.Name,
con.SdSkippedDate)
).SingleOrDefaultAsync();

public IAsyncEnumerable<Guid> GetConnectorIdsWithMissingSelfDescription() =>
Expand Down

0 comments on commit 2556bc5

Please sign in to comment.