Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
1817900
Updated management API endpoint and model for data type references to…
AndyButland Apr 1, 2025
d53b446
Refactoring.
AndyButland Apr 1, 2025
4ac1631
Update src/Umbraco.Core/Constants-ReferenceTypes.cs
AndyButland Apr 1, 2025
a07feb4
Fixed typos.
AndyButland Apr 1, 2025
522acd8
Merge branch 'v15/task/align-data-type-reference-endpoint-and-model' …
AndyButland Apr 1, 2025
09e2f7f
generate server models
madsrasmussen Apr 1, 2025
43c0d39
add extension slot
madsrasmussen Apr 1, 2025
77b30d7
register data type reference info app
madsrasmussen Apr 1, 2025
ba8a7b8
add reference data mappers
madsrasmussen Apr 1, 2025
56e0e64
Added id to tracked reference content type response.
AndyButland Apr 2, 2025
8963db3
Updated OpenApi.json.
AndyButland Apr 2, 2025
ad20cac
Added missing updates.
AndyButland Apr 2, 2025
d393a13
Merge branch 'v15/task/align-data-type-reference-endpoint-and-model' …
madsrasmussen Apr 2, 2025
7518ab4
generate new models
madsrasmussen Apr 2, 2025
2421063
update models
madsrasmussen Apr 2, 2025
9743ca4
register ref item
madsrasmussen Apr 2, 2025
9a65fdc
remove debugger
madsrasmussen Apr 2, 2025
2476186
render types
madsrasmussen Apr 2, 2025
d6a0ef3
register member type property type ref
madsrasmussen Apr 2, 2025
bd910b8
register media type property type ref
madsrasmussen Apr 2, 2025
2007ee5
Renamed model and constants from code review feedback.
AndyButland Apr 2, 2025
7174a39
register reference workspace info app kind
madsrasmussen Apr 2, 2025
62b59d5
use kind for document references
madsrasmussen Apr 2, 2025
a7ed4e9
use kind for media references
madsrasmussen Apr 2, 2025
cdd7007
use kind for member references
madsrasmussen Apr 2, 2025
5c8b5a7
use deleteWithRelation kind when deleting data types
madsrasmussen Apr 2, 2025
e3ef161
Merge branch 'v15/task/align-data-type-reference-endpoint-and-model' …
madsrasmussen Apr 2, 2025
51f3296
fix manifest types
madsrasmussen Apr 2, 2025
14d5a39
fix types
madsrasmussen Apr 2, 2025
66e96b4
Update types.gen.ts
madsrasmussen Apr 2, 2025
e5c636e
update code to fit new server models
madsrasmussen Apr 2, 2025
657d1ba
Merge branch 'v15/dev' into v15/task/data-type-references-ui
nielslyngsoe Apr 4, 2025
bb1a336
Merge branch 'v15/dev' into v15/task/data-type-references-ui
madsrasmussen Apr 7, 2025
a0101f7
Merge branch 'v15/dev' into v15/task/data-type-references-ui
AndyButland Apr 7, 2025
6adf767
Updated OpenApi.json.
AndyButland Apr 7, 2025
f0abd29
generate server models
madsrasmussen Apr 7, 2025
19dc86f
Revert "generate server models"
madsrasmussen Apr 7, 2025
1567177
generate new sdk
madsrasmussen Apr 7, 2025
2c2389d
Update types.gen.ts
madsrasmussen Apr 7, 2025
703b0e7
fix mock data
madsrasmussen Apr 7, 2025
fbb3569
fix mock data
madsrasmussen Apr 7, 2025
6acda3b
fix missing const exports
madsrasmussen Apr 7, 2025
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
230 changes: 115 additions & 115 deletions src/Umbraco.Cms.Api.Management/OpenApi.json
Original file line number Diff line number Diff line change
Expand Up @@ -37996,7 +37996,42 @@
},
"additionalProperties": false
},
"DocumentTypePropertyReferenceResponseModel": {
"DocumentTypePropertyTypeContainerResponseModel": {
"required": [
"id",
"sortOrder",
"type"
],
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"parent": {
"oneOf": [
{
"$ref": "#/components/schemas/ReferenceByIdModel"
}
],
"nullable": true
},
"name": {
"type": "string",
"nullable": true
},
"type": {
"minLength": 1,
"type": "string"
},
"sortOrder": {
"type": "integer",
"format": "int32"
}
},
"additionalProperties": false
},
"DocumentTypePropertyTypeReferenceResponseModel": {
"required": [
"$type",
"documentType",
Expand Down Expand Up @@ -38031,45 +38066,10 @@
"discriminator": {
"propertyName": "$type",
"mapping": {
"DocumentTypePropertyReferenceResponseModel": "#/components/schemas/DocumentTypePropertyReferenceResponseModel"
"DocumentTypePropertyTypeReferenceResponseModel": "#/components/schemas/DocumentTypePropertyTypeReferenceResponseModel"
}
}
},
"DocumentTypePropertyTypeContainerResponseModel": {
"required": [
"id",
"sortOrder",
"type"
],
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"parent": {
"oneOf": [
{
"$ref": "#/components/schemas/ReferenceByIdModel"
}
],
"nullable": true
},
"name": {
"type": "string",
"nullable": true
},
"type": {
"minLength": 1,
"type": "string"
},
"sortOrder": {
"type": "integer",
"format": "int32"
}
},
"additionalProperties": false
},
"DocumentTypePropertyTypeResponseModel": {
"required": [
"alias",
Expand Down Expand Up @@ -40099,7 +40099,42 @@
},
"additionalProperties": false
},
"MediaTypePropertyReferenceResponseModel": {
"MediaTypePropertyTypeContainerResponseModel": {
"required": [
"id",
"sortOrder",
"type"
],
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"parent": {
"oneOf": [
{
"$ref": "#/components/schemas/ReferenceByIdModel"
}
],
"nullable": true
},
"name": {
"type": "string",
"nullable": true
},
"type": {
"minLength": 1,
"type": "string"
},
"sortOrder": {
"type": "integer",
"format": "int32"
}
},
"additionalProperties": false
},
"MediaTypePropertyTypeReferenceResponseModel": {
"required": [
"$type",
"id",
Expand Down Expand Up @@ -40134,45 +40169,10 @@
"discriminator": {
"propertyName": "$type",
"mapping": {
"MediaTypePropertyReferenceResponseModel": "#/components/schemas/MediaTypePropertyReferenceResponseModel"
"MediaTypePropertyTypeReferenceResponseModel": "#/components/schemas/MediaTypePropertyTypeReferenceResponseModel"
}
}
},
"MediaTypePropertyTypeContainerResponseModel": {
"required": [
"id",
"sortOrder",
"type"
],
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"parent": {
"oneOf": [
{
"$ref": "#/components/schemas/ReferenceByIdModel"
}
],
"nullable": true
},
"name": {
"type": "string",
"nullable": true
},
"type": {
"minLength": 1,
"type": "string"
},
"sortOrder": {
"type": "integer",
"format": "int32"
}
},
"additionalProperties": false
},
"MediaTypePropertyTypeResponseModel": {
"required": [
"alias",
Expand Down Expand Up @@ -40916,7 +40916,42 @@
},
"additionalProperties": false
},
"MemberTypePropertyReferenceResponseModel": {
"MemberTypePropertyTypeContainerResponseModel": {
"required": [
"id",
"sortOrder",
"type"
],
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"parent": {
"oneOf": [
{
"$ref": "#/components/schemas/ReferenceByIdModel"
}
],
"nullable": true
},
"name": {
"type": "string",
"nullable": true
},
"type": {
"minLength": 1,
"type": "string"
},
"sortOrder": {
"type": "integer",
"format": "int32"
}
},
"additionalProperties": false
},
"MemberTypePropertyTypeReferenceResponseModel": {
"required": [
"$type",
"id",
Expand Down Expand Up @@ -40951,45 +40986,10 @@
"discriminator": {
"propertyName": "$type",
"mapping": {
"MemberTypePropertyReferenceResponseModel": "#/components/schemas/MemberTypePropertyReferenceResponseModel"
"MemberTypePropertyTypeReferenceResponseModel": "#/components/schemas/MemberTypePropertyTypeReferenceResponseModel"
}
}
},
"MemberTypePropertyTypeContainerResponseModel": {
"required": [
"id",
"sortOrder",
"type"
],
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"parent": {
"oneOf": [
{
"$ref": "#/components/schemas/ReferenceByIdModel"
}
],
"nullable": true
},
"name": {
"type": "string",
"nullable": true
},
"type": {
"minLength": 1,
"type": "string"
},
"sortOrder": {
"type": "integer",
"format": "int32"
}
},
"additionalProperties": false
},
"MemberTypePropertyTypeResponseModel": {
"required": [
"alias",
Expand Down Expand Up @@ -42163,19 +42163,19 @@
"$ref": "#/components/schemas/DocumentReferenceResponseModel"
},
{
"$ref": "#/components/schemas/DocumentTypePropertyReferenceResponseModel"
"$ref": "#/components/schemas/DocumentTypePropertyTypeReferenceResponseModel"
},
{
"$ref": "#/components/schemas/MediaReferenceResponseModel"
},
{
"$ref": "#/components/schemas/MediaTypePropertyReferenceResponseModel"
"$ref": "#/components/schemas/MediaTypePropertyTypeReferenceResponseModel"
},
{
"$ref": "#/components/schemas/MemberReferenceResponseModel"
},
{
"$ref": "#/components/schemas/MemberTypePropertyReferenceResponseModel"
"$ref": "#/components/schemas/MemberTypePropertyTypeReferenceResponseModel"
}
]
}
Expand Down Expand Up @@ -47248,4 +47248,4 @@
}
}
}
}
}
12 changes: 6 additions & 6 deletions src/Umbraco.Core/Services/DataTypeService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public DataTypeService(
public Attempt<OperationResult<OperationResultType, EntityContainer>?> CreateContainer(int parentId, Guid key, string name, int userId = Constants.Security.SuperUserId)
{
EventMessages evtMsgs = EventMessagesFactory.Get();
using (ScopeProvider.CreateCoreScope(autoComplete:true))
using (ScopeProvider.CreateCoreScope(autoComplete: true))
{
try
{
Expand Down Expand Up @@ -161,7 +161,7 @@ public IEnumerable<EntityContainer> GetContainers(int[] containerIds)
public Attempt<OperationResult?> SaveContainer(EntityContainer container, int userId = Constants.Security.SuperUserId)
{
EventMessages evtMsgs = EventMessagesFactory.Get();
using (ScopeProvider.CreateCoreScope(autoComplete:true))
using (ScopeProvider.CreateCoreScope(autoComplete: true))
{
var isNew = container.Id == 0;
Guid? parentKey = isNew && container.ParentId > 0 ? _dataTypeContainerRepository.Get(container.ParentId)?.Key : null;
Expand All @@ -187,7 +187,7 @@ public IEnumerable<EntityContainer> GetContainers(int[] containerIds)
public Attempt<OperationResult?> DeleteContainer(int containerId, int userId = Constants.Security.SuperUserId)
{
EventMessages evtMsgs = EventMessagesFactory.Get();
using (ScopeProvider.CreateCoreScope(autoComplete:true))
using (ScopeProvider.CreateCoreScope(autoComplete: true))
{
EntityContainer? container = _dataTypeContainerRepository.Get(containerId);
if (container == null)
Expand All @@ -212,7 +212,7 @@ public IEnumerable<EntityContainer> GetContainers(int[] containerIds)
public Attempt<OperationResult<OperationResultType, EntityContainer>?> RenameContainer(int id, string name, int userId = Constants.Security.SuperUserId)
{
EventMessages evtMsgs = EventMessagesFactory.Get();
using (ScopeProvider.CreateCoreScope(autoComplete:true))
using (ScopeProvider.CreateCoreScope(autoComplete: true))
{
try
{
Expand Down Expand Up @@ -511,7 +511,7 @@ public async Task<Attempt<IDataType, DataTypeOperationStatus>> MoveAsync(IDataTy
DataTypeOperationStatus.Success => OperationResult.Attempt.Succeed(MoveOperationStatusType.Success, evtMsgs, result.Result),
DataTypeOperationStatus.CancelledByNotification => OperationResult.Attempt.Fail(MoveOperationStatusType.FailedCancelledByEvent, evtMsgs, result.Result),
DataTypeOperationStatus.ParentNotFound => OperationResult.Attempt.Fail(MoveOperationStatusType.FailedParentNotFound, evtMsgs, result.Result),
_ => OperationResult.Attempt.Fail(MoveOperationStatusType.FailedNotAllowedByPath, evtMsgs, result.Result, new InvalidOperationException($"Invalid operation status: {result.Status}")),
_ => OperationResult.Attempt.Fail(MoveOperationStatusType.FailedNotAllowedByPath, evtMsgs, result.Result, new InvalidOperationException($"Invalid operation status: {result.Status}")),
};
}

Expand Down Expand Up @@ -724,7 +724,7 @@ public IReadOnlyDictionary<Udi, IEnumerable<string>> GetReferences(int id)
/// <inheritdoc />
public async Task<Attempt<IReadOnlyDictionary<Udi, IEnumerable<string>>, DataTypeOperationStatus>> GetReferencesAsync(Guid id)
{
using ICoreScope scope = ScopeProvider.CreateCoreScope(autoComplete:true);
using ICoreScope scope = ScopeProvider.CreateCoreScope(autoComplete: true);
IDataType? dataType = GetDataTypeFromRepository(id);
if (dataType == null)
{
Expand Down

Large diffs are not rendered by default.

Loading
Loading