Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Logging;
using Newtonsoft.Json.Linq;
using OneGround.ZGW.Autorisaties.Contracts.v1.Responses;
using OneGround.ZGW.Autorisaties.Contracts.v1._1.Responses;
using OneGround.ZGW.Common.Constants;
using OneGround.ZGW.Common.Extensions;
using OneGround.ZGW.Common.ServiceAgent;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public async Task<AuthorizedApplication> ResolveAsync(string clientId, string co
return new AuthorizedApplication
{
Label = application.Label,
AlleenIsGereedVoorPublicatie = application.AlleenIsGereedVoorPublicatie,
HasAllAuthorizations = application.HeeftAlleAutorisaties,
Authorizations = application
.Autorisaties.Where(a => a.Component.Equals(component, StringComparison.OrdinalIgnoreCase))
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.Threading.Tasks;
using System.Threading.Tasks;
using Newtonsoft.Json.Linq;
using OneGround.ZGW.Autorisaties.Contracts.v1.Responses;
using OneGround.ZGW.Autorisaties.Contracts.v1._1.Responses;
using OneGround.ZGW.Common.ServiceAgent;

namespace OneGround.ZGW.Autorisaties.ServiceAgent;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore;
Expand Down Expand Up @@ -31,6 +31,7 @@ public async Task<AuthorizedApplication> ResolveAsync(string clientId, string co
{
Label = applicatie.Label,
HasAllAuthorizations = applicatie.HeeftAlleAutorisaties,
AlleenIsGereedVoorPublicatie = applicatie.AlleenIsGereedVoorPublicatie,
Authorizations = applicatie
.Autorisaties.Where(a => a.Component.ToString().Equals(component, StringComparison.OrdinalIgnoreCase))
.Where(a => a.Scopes.Any(s => scopes.Contains(s)))
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;

namespace OneGround.ZGW.Common.Web.Authorization;

Expand All @@ -23,4 +23,9 @@ public class AuthorizedApplication
/// Gets rsin value which application is authorized for.
/// </summary>
public string Rsin { get; set; }

/// <summary>
/// Flag indicating 'Only Ready for publication'.
/// </summary>
public bool AlleenIsGereedVoorPublicatie { get; set; }
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
using System.Collections.Generic;
using Newtonsoft.Json;

namespace OneGround.ZGW.Documenten.Contracts.v1._7;

public class EnkelvoudigInformatieObjectDto
{
[JsonProperty(PropertyName = "identificatie")]
public string Identificatie { get; set; }

[JsonProperty(PropertyName = "bronorganisatie")]
public string Bronorganisatie { get; set; }

[JsonProperty(PropertyName = "creatiedatum")]
public string CreatieDatum { get; set; }

[JsonProperty(PropertyName = "titel")]
public string Titel { get; set; }

[JsonProperty(PropertyName = "vertrouwelijkheidaanduiding")]
public string Vertrouwelijkheidaanduiding { get; set; }

[JsonProperty(PropertyName = "isGereedVoorPublicatie")]
public bool? IsGereedVoorPublicatie { get; set; }

[JsonProperty(PropertyName = "tonenAanInitiator")]
public bool TonenAanInitiator { get; set; }

[JsonProperty(PropertyName = "auteur")]
public string Auteur { get; set; }

[JsonProperty(PropertyName = "status")]
public string Status { get; set; }

[JsonProperty(PropertyName = "formaat")]
public string Formaat { get; set; } = string.Empty; // Note: null is not allowed. When not specified it will use empty string now

[JsonProperty(PropertyName = "taal")]
public string Taal { get; set; }

[JsonProperty(PropertyName = "bestandsnaam")]
public string Bestandsnaam { get; set; }

[JsonProperty(PropertyName = "bestandsomvang")]
public long Bestandsomvang { get; set; }

[JsonProperty(PropertyName = "inhoud")]
public string Inhoud { get; set; }

[JsonProperty(PropertyName = "link")]
public string Link { get; set; }

[JsonProperty(PropertyName = "beschrijving")]
public string Beschrijving { get; set; }

[JsonProperty(PropertyName = "ontvangstdatum")]
public string OntvangstDatum { get; set; }

[JsonProperty(PropertyName = "verzenddatum")]
public string VerzendDatum { get; set; }

[JsonProperty(PropertyName = "indicatieGebruiksrecht")]
public bool? IndicatieGebruiksrecht { get; set; }

[JsonProperty(PropertyName = "ondertekening")]
public OndertekeningDto Ondertekening { get; set; }

[JsonProperty(PropertyName = "integriteit")]
public IntegriteitDto Integriteit { get; set; }

[JsonProperty(PropertyName = "informatieobjecttype")]
public string InformatieObjectType { get; set; }

[JsonProperty(PropertyName = "verschijningsvorm")]
public string Verschijningsvorm { get; set; }

[JsonProperty(PropertyName = "inhoudIsVervallen")]
public bool InhoudIsVervallen { get; set; }

[JsonProperty("trefwoorden")]
public List<string> Trefwoorden { get; set; } = [];
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
namespace OneGround.ZGW.Documenten.Contracts.v1._7;

public interface IDocumentenCommonSearchableFields
{
/// <summary>
/// Het RSIN van de Niet-natuurlijk persoon zijnde de organisatie die het informatieobject heeft gecreëerd of heeft ontvangen en als eerste in een samenwerkingsketen heeft vastgelegd.
/// </summary>
public string Bronorganisatie { get; set; }

/// <summary>
/// Een binnen een gegeven context ondubbelzinnige referentie naar het INFORMATIEOBJECT.
/// </summary>
public string Identificatie { get; set; }

/// <summary>
/// Een lijst van trefwoorden gescheiden door comma's. Example: trefwoorden=bouwtekening,vergunning,aanvraag
/// </summary>
public string Trefwoorden { get; set; }

/// <summary>
/// URL-referentie naar het gerelateerde OBJECT (in deze of andere API).
/// </summary>
public string ObjectInformatieObjecten_Object { get; set; }

/// <summary>
/// Enum: "besluit" "zaak" "verzoek" - Het type van het gerelateerde OBJECT.
/// </summary>
public string ObjectInformatieObjecten_ObjectType { get; set; }
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
using Microsoft.AspNetCore.Mvc;
using OneGround.ZGW.Common.Contracts;

namespace OneGround.ZGW.Documenten.Contracts.v1._7.Queries;

public class GetAllEnkelvoudigInformatieObjectenQueryParameters : QueryParameters, IDocumentenCommonSearchableFields, IExpandParameter
{
/// <summary>
/// Het RSIN van de Niet-natuurlijk persoon zijnde de organisatie die het informatieobject heeft gecreëerd of heeft ontvangen en als eerste in een samenwerkingsketen heeft vastgelegd.
/// </summary>
[FromQuery(Name = "bronorganisatie")]
public string Bronorganisatie { get; set; }

/// <summary>
/// Een binnen een gegeven context ondubbelzinnige referentie naar het INFORMATIEOBJECT.
/// </summary>
[FromQuery(Name = "identificatie")]
public string Identificatie { get; set; }

/// <summary>
/// Een lijst van trefwoorden gescheiden door comma's. Example: trefwoorden=bouwtekening,vergunning,aanvraag
/// </summary>
[FromQuery(Name = "trefwoorden")]
public string Trefwoorden { get; set; }

/// <summary>
/// URL-referentie naar het gerelateerde OBJECT (in deze of andere API).
/// </summary>
[FromQuery(Name = "objectinformatieobjecten_object")]
public string ObjectInformatieObjecten_Object { get; set; }

/// <summary>
/// Enum: "besluit" "zaak" "verzoek" - Het type van het gerelateerde OBJECT.
/// </summary>
[FromQuery(Name = "objectinformatieobjecten_objectType")]
public string ObjectInformatieObjecten_ObjectType { get; set; }

/// <summary>
/// Expand het respons met sub-types.
/// </summary>
[FromQuery(Name = "expand")]
public string Expand { get; set; }
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
namespace OneGround.ZGW.Documenten.Contracts.v1._7.Requests;

public class EnkelvoudigInformatieObjectBaseRequestDto : EnkelvoudigInformatieObjectDto { }
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
namespace OneGround.ZGW.Documenten.Contracts.v1._7.Requests;

public class EnkelvoudigInformatieObjectCreateRequestDto : EnkelvoudigInformatieObjectBaseRequestDto { }
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
using Newtonsoft.Json;
using OneGround.ZGW.Common.Contracts;

namespace OneGround.ZGW.Documenten.Contracts.v1._7.Requests;

public class EnkelvoudigInformatieObjectSearchRequestDto : IDocumentenCommonSearchableFields, IExpandParameter
{
[JsonProperty("bronorganisatie")]
public string Bronorganisatie { get; set; }

[JsonProperty("identificatie")]
public string Identificatie { get; set; }

[JsonProperty("trefwoorden")]
public string Trefwoorden { get; set; }

[JsonProperty("objectinformatieobjecten_object")]
public string ObjectInformatieObjecten_Object { get; set; }

[JsonProperty("objectinformatieobjecten_objectType")]
public string ObjectInformatieObjecten_ObjectType { get; set; }

[JsonProperty("uuid_In")]
public string[] Uuid_In { get; set; }

[JsonProperty("expand")]
public string Expand { get; set; }
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
using Newtonsoft.Json;

namespace OneGround.ZGW.Documenten.Contracts.v1._7.Requests;

public class EnkelvoudigInformatieObjectUpdateRequestDto : EnkelvoudigInformatieObjectBaseRequestDto
{
[JsonProperty(PropertyName = "lock")]
public string Lock { get; set; }
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
using Newtonsoft.Json;

namespace OneGround.ZGW.Documenten.Contracts.v1._7.Responses;

public class EnkelvoudigInformatieObjectCreateResponseDto : EnkelvoudigInformatieObjectResponseDto
{
[JsonProperty(PropertyName = "lock", Order = 99)]
public string Lock { get; set; }
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using Newtonsoft.Json;
using OneGround.ZGW.Common.Contracts.v1._5;

namespace OneGround.ZGW.Documenten.Contracts.v1._7.Responses;

public class EnkelvoudigInformatieObjectGetResponseDto : EnkelvoudigInformatieObjectResponseDto { }

public class EnkelvoudigInformatieObjectGetResponseExpandedDto : EnkelvoudigInformatieObjectGetResponseDto, IExpandResponseDto
{
[JsonProperty(PropertyName = "_expand")]
public object Expand { get; set; }
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
using System.Collections.Generic;
using Newtonsoft.Json;

namespace OneGround.ZGW.Documenten.Contracts.v1._7.Responses;

public class EnkelvoudigInformatieObjectResponseDto : EnkelvoudigInformatieObjectDto
{
[JsonProperty(PropertyName = "url", Order = -1)]
public string Url { get; set; }

[JsonProperty(PropertyName = "versie", Order = 70)]
public int Versie { get; set; }

[JsonProperty(PropertyName = "beginRegistratie", Order = 71)]
public string BeginRegistratie { get; set; }

[JsonProperty(PropertyName = "locked", Order = 72)]
public bool Locked { get; set; }

[JsonProperty("bestandsdelen", Order = 73)]
public List<_1.Responses.BestandsDeelResponseDto> BestandsDelen { get; set; } = [];
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
using Newtonsoft.Json;

namespace OneGround.ZGW.Documenten.Contracts.v1._7.Responses;

public class EnkelvoudigInformatieObjectUpdateResponseDto : EnkelvoudigInformatieObjectResponseDto
{
[JsonProperty(PropertyName = "lock", Order = 99)]
public string Lock { get; set; }
}
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,12 @@ public class EnkelvoudigInformatieObjectVersie : OwnedEntity, IAuditableEntity,
[Column("inhoud_is_vervallen")]
public bool InhoudIsVervallen { get; set; }

[Column("is_gereed_voor_publicatie")]
public bool? IsGereedVoorPublicatie { get; set; }

[Column("tonen_aan_initiator")]
public bool TonenAanInitiator { get; set; }

[Column("enkelvoudiginformatieobject_id")]
public Guid EnkelvoudigInformatieObjectId { get; set; }

Expand Down
Loading
Loading