-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added explicit nullability to GqlModels (#144)
* Added explicit nullability to GqlModels * data and alignment * ModelsWithVersions * Models * active user * Invites and active user fixes * Invite changes * Subscriptions * Fixed subscription tests * corrected nullability of projectinput * removed unused mutation responses * format --------- Co-authored-by: Alan Rynne <[email protected]>
- Loading branch information
Showing
36 changed files
with
486 additions
and
421 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation"> | ||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=QL/@EntryIndexedValue">QL</s:String></wpf:ResourceDictionary> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
namespace Speckle.Sdk.Api.GraphQL.Inputs; | ||
|
||
public sealed record UserUpdateInput( | ||
string? avatar = null, | ||
string? bio = null, | ||
string? company = null, | ||
string? name = null | ||
); |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,17 +1,39 @@ | ||
namespace Speckle.Sdk.Api.GraphQL.Models; | ||
using Speckle.Newtonsoft.Json; | ||
|
||
namespace Speckle.Sdk.Api.GraphQL.Models; | ||
|
||
public class ResourceCollection<T> | ||
{ | ||
[property: JsonProperty(Required = Required.Always)] | ||
public int totalCount { get; init; } | ||
|
||
[property: JsonProperty(Required = Required.Always)] | ||
public List<T> items { get; init; } | ||
|
||
[property: JsonProperty(Required = Required.AllowNull)] | ||
public string? cursor { get; init; } | ||
} | ||
|
||
public sealed class CommentReplyAuthorCollection : ResourceCollection<LimitedUser> { } | ||
public sealed class CommentReplyAuthorCollection | ||
{ | ||
[property: JsonProperty(Required = Required.Always)] | ||
public int totalCount { get; init; } | ||
|
||
[property: JsonProperty(Required = Required.Always)] | ||
public List<LimitedUser> items { get; init; } | ||
} | ||
|
||
public sealed class UserSearchResultCollection | ||
{ | ||
[property: JsonProperty(Required = Required.Always)] | ||
public List<LimitedUser> items { get; init; } | ||
|
||
[property: JsonProperty(Required = Required.AllowNull)] | ||
public string? cursor { get; init; } | ||
} | ||
|
||
public sealed class ProjectCommentCollection : ResourceCollection<Comment> | ||
{ | ||
[property: JsonProperty(Required = Required.Always)] | ||
public int totalArchivedCount { get; init; } | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,18 @@ | ||
#nullable disable | ||
namespace Speckle.Sdk.Api.GraphQL.Models; | ||
namespace Speckle.Sdk.Api.GraphQL.Models; | ||
|
||
public sealed class Model | ||
public class Model | ||
{ | ||
public LimitedUser author { get; init; } | ||
public List<ModelsTreeItem> childrenTree { get; init; } | ||
public ResourceCollection<Comment> commentThreads { get; init; } | ||
public DateTime createdAt { get; init; } | ||
public string description { get; init; } | ||
public string? description { get; init; } | ||
public string displayName { get; init; } | ||
public string id { get; init; } | ||
public string name { get; init; } | ||
public List<FileUpload> pendingImportedVersions { get; init; } | ||
public Uri previewUrl { get; init; } | ||
public Uri? previewUrl { get; init; } | ||
public DateTime updatedAt { get; init; } | ||
} | ||
|
||
public sealed class ModelWithVersions : Model | ||
{ | ||
public ResourceCollection<Version> versions { get; init; } | ||
public Version version { get; init; } | ||
} |
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 |
---|---|---|
@@ -1,14 +1,12 @@ | ||
#nullable disable | ||
|
||
namespace Speckle.Sdk.Api.GraphQL.Models; | ||
namespace Speckle.Sdk.Api.GraphQL.Models; | ||
|
||
public sealed class ModelsTreeItem | ||
{ | ||
public List<ModelsTreeItem> children { get; init; } | ||
public string fullName { get; init; } | ||
public bool hasChildren { get; init; } | ||
public string id { get; init; } | ||
public Model model { get; init; } | ||
public Model? model { get; init; } | ||
public string name { get; init; } | ||
public DateTime updatedAt { get; init; } | ||
} |
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 |
---|---|---|
@@ -1,30 +1,28 @@ | ||
#nullable disable | ||
using Speckle.Sdk.Api.GraphQL.Enums; | ||
using Speckle.Sdk.Api.GraphQL.Enums; | ||
|
||
namespace Speckle.Sdk.Api.GraphQL.Models; | ||
|
||
public sealed class Project | ||
public class Project | ||
{ | ||
public bool AllowPublicComments { get; init; } | ||
public ProjectCommentCollection commentThreads { get; init; } | ||
public bool allowPublicComments { get; init; } | ||
public DateTime createdAt { get; init; } | ||
public string description { get; init; } | ||
public string? description { get; init; } | ||
public string id { get; init; } | ||
public List<PendingStreamCollaborator> invitedTeam { get; init; } | ||
public ResourceCollection<Model> models { get; init; } | ||
public string name { get; init; } | ||
public List<FileUpload> pendingImportedModels { get; init; } | ||
public string role { get; init; } | ||
public string? role { get; init; } | ||
public List<string> sourceApps { get; init; } | ||
public List<ProjectCollaborator> team { get; init; } | ||
public DateTime updatedAt { get; init; } | ||
public ProjectVisibility visibility { get; init; } | ||
public string? workspaceId { get; init; } | ||
} | ||
|
||
public List<ViewerResourceGroup> viewerResources { get; init; } | ||
public ResourceCollection<Version> versions { get; init; } | ||
public Model model { get; init; } | ||
public List<ModelsTreeItem> modelChildrenTree { get; init; } | ||
public ResourceCollection<ModelsTreeItem> modelsTree { get; init; } | ||
public sealed class ProjectWithModels : Project | ||
{ | ||
public ResourceCollection<Model> models { get; init; } | ||
} | ||
|
||
public string workspaceId { get; init; } | ||
public sealed class ProjectWithTeam : Project | ||
{ | ||
public List<PendingStreamCollaborator> invitedTeam { get; init; } | ||
public List<ProjectCollaborator> team { get; init; } | ||
} |
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 |
---|---|---|
@@ -1,9 +1,8 @@ | ||
#nullable disable | ||
|
||
namespace Speckle.Sdk.Api.GraphQL.Models; | ||
namespace Speckle.Sdk.Api.GraphQL.Models; | ||
|
||
public sealed class ProjectCollaborator | ||
{ | ||
public string id { get; init; } | ||
public string role { get; init; } | ||
public LimitedUser user { get; init; } | ||
} |
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
44 changes: 0 additions & 44 deletions
44
src/Speckle.Sdk/Api/GraphQL/Models/Responses/MutationResponses.cs
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.