diff --git a/output/csharp/src/Seam/Api/AccessGrants.cs b/output/csharp/src/Seam/Api/AccessGrants.cs index b67917b..16073ec 100644 --- a/output/csharp/src/Seam/Api/AccessGrants.cs +++ b/output/csharp/src/Seam/Api/AccessGrants.cs @@ -574,6 +574,197 @@ await GetAsync( ); } + [DataContract(Name = "getRelatedRequest_request")] + public class GetRelatedRequest + { + [JsonConstructorAttribute] + protected GetRelatedRequest() { } + + public GetRelatedRequest( + List accessGrantIds = default, + List? exclude = default, + List? include = default + ) + { + AccessGrantIds = accessGrantIds; + Exclude = exclude; + Include = include; + } + + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum ExcludeEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "spaces")] + Spaces = 1, + + [EnumMember(Value = "devices")] + Devices = 2, + + [EnumMember(Value = "acs_entrances")] + AcsEntrances = 3, + + [EnumMember(Value = "connected_accounts")] + ConnectedAccounts = 4, + + [EnumMember(Value = "acs_systems")] + AcsSystems = 5, + + [EnumMember(Value = "user_identity")] + UserIdentity = 6, + + [EnumMember(Value = "acs_access_groups")] + AcsAccessGroups = 7, + } + + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum IncludeEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "spaces")] + Spaces = 1, + + [EnumMember(Value = "devices")] + Devices = 2, + + [EnumMember(Value = "acs_entrances")] + AcsEntrances = 3, + + [EnumMember(Value = "connected_accounts")] + ConnectedAccounts = 4, + + [EnumMember(Value = "acs_systems")] + AcsSystems = 5, + + [EnumMember(Value = "user_identity")] + UserIdentity = 6, + + [EnumMember(Value = "acs_access_groups")] + AcsAccessGroups = 7, + } + + [DataMember(Name = "access_grant_ids", IsRequired = true, EmitDefaultValue = false)] + public List AccessGrantIds { get; set; } + + [DataMember(Name = "exclude", IsRequired = false, EmitDefaultValue = false)] + public List? Exclude { get; set; } + + [DataMember(Name = "include", IsRequired = false, EmitDefaultValue = false)] + public List? Include { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "getRelatedResponse_response")] + public class GetRelatedResponse + { + [JsonConstructorAttribute] + protected GetRelatedResponse() { } + + public GetRelatedResponse(Batch batch = default) + { + Batch = batch; + } + + [DataMember(Name = "batch", IsRequired = false, EmitDefaultValue = false)] + public Batch Batch { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + public Batch GetRelated(GetRelatedRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Post("/access_grants/get_related", requestOptions) + .Data.Batch; + } + + public Batch GetRelated( + List accessGrantIds = default, + List? exclude = default, + List? include = default + ) + { + return GetRelated( + new GetRelatedRequest( + accessGrantIds: accessGrantIds, + exclude: exclude, + include: include + ) + ); + } + + public async Task GetRelatedAsync(GetRelatedRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return ( + await _seam.PostAsync( + "/access_grants/get_related", + requestOptions + ) + ) + .Data + .Batch; + } + + public async Task GetRelatedAsync( + List accessGrantIds = default, + List? exclude = default, + List? include = default + ) + { + return ( + await GetRelatedAsync( + new GetRelatedRequest( + accessGrantIds: accessGrantIds, + exclude: exclude, + include: include + ) + ) + ); + } + [DataContract(Name = "listRequest_request")] public class ListRequest { diff --git a/output/csharp/src/Seam/Api/AccessMethods.cs b/output/csharp/src/Seam/Api/AccessMethods.cs index 91d356c..6777971 100644 --- a/output/csharp/src/Seam/Api/AccessMethods.cs +++ b/output/csharp/src/Seam/Api/AccessMethods.cs @@ -279,6 +279,197 @@ public async Task GetAsync(string accessMethodId = default) return (await GetAsync(new GetRequest(accessMethodId: accessMethodId))); } + [DataContract(Name = "getRelatedRequest_request")] + public class GetRelatedRequest + { + [JsonConstructorAttribute] + protected GetRelatedRequest() { } + + public GetRelatedRequest( + List accessMethodIds = default, + List? exclude = default, + List? include = default + ) + { + AccessMethodIds = accessMethodIds; + Exclude = exclude; + Include = include; + } + + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum ExcludeEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "spaces")] + Spaces = 1, + + [EnumMember(Value = "devices")] + Devices = 2, + + [EnumMember(Value = "acs_entrances")] + AcsEntrances = 3, + + [EnumMember(Value = "access_grants")] + AccessGrants = 4, + + [EnumMember(Value = "access_methods")] + AccessMethods = 5, + + [EnumMember(Value = "instant_keys")] + InstantKeys = 6, + + [EnumMember(Value = "client_sessions")] + ClientSessions = 7, + } + + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum IncludeEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "spaces")] + Spaces = 1, + + [EnumMember(Value = "devices")] + Devices = 2, + + [EnumMember(Value = "acs_entrances")] + AcsEntrances = 3, + + [EnumMember(Value = "access_grants")] + AccessGrants = 4, + + [EnumMember(Value = "access_methods")] + AccessMethods = 5, + + [EnumMember(Value = "instant_keys")] + InstantKeys = 6, + + [EnumMember(Value = "client_sessions")] + ClientSessions = 7, + } + + [DataMember(Name = "access_method_ids", IsRequired = true, EmitDefaultValue = false)] + public List AccessMethodIds { get; set; } + + [DataMember(Name = "exclude", IsRequired = false, EmitDefaultValue = false)] + public List? Exclude { get; set; } + + [DataMember(Name = "include", IsRequired = false, EmitDefaultValue = false)] + public List? Include { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "getRelatedResponse_response")] + public class GetRelatedResponse + { + [JsonConstructorAttribute] + protected GetRelatedResponse() { } + + public GetRelatedResponse(Batch batch = default) + { + Batch = batch; + } + + [DataMember(Name = "batch", IsRequired = false, EmitDefaultValue = false)] + public Batch Batch { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + public Batch GetRelated(GetRelatedRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Post("/access_methods/get_related", requestOptions) + .Data.Batch; + } + + public Batch GetRelated( + List accessMethodIds = default, + List? exclude = default, + List? include = default + ) + { + return GetRelated( + new GetRelatedRequest( + accessMethodIds: accessMethodIds, + exclude: exclude, + include: include + ) + ); + } + + public async Task GetRelatedAsync(GetRelatedRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return ( + await _seam.PostAsync( + "/access_methods/get_related", + requestOptions + ) + ) + .Data + .Batch; + } + + public async Task GetRelatedAsync( + List accessMethodIds = default, + List? exclude = default, + List? include = default + ) + { + return ( + await GetRelatedAsync( + new GetRelatedRequest( + accessMethodIds: accessMethodIds, + exclude: exclude, + include: include + ) + ) + ); + } + [DataContract(Name = "listRequest_request")] public class ListRequest { diff --git a/output/csharp/src/Seam/Api/Spaces.cs b/output/csharp/src/Seam/Api/Spaces.cs index f3ff3d3..f2dabb7 100644 --- a/output/csharp/src/Seam/Api/Spaces.cs +++ b/output/csharp/src/Seam/Api/Spaces.cs @@ -446,6 +446,189 @@ public async Task GetAsync(string? spaceId = default, string? spaceKey = return (await GetAsync(new GetRequest(spaceId: spaceId, spaceKey: spaceKey))); } + [DataContract(Name = "getRelatedRequest_request")] + public class GetRelatedRequest + { + [JsonConstructorAttribute] + protected GetRelatedRequest() { } + + public GetRelatedRequest( + List? exclude = default, + List? include = default, + List? spaceIds = default, + List? spaceKeys = default + ) + { + Exclude = exclude; + Include = include; + SpaceIds = spaceIds; + SpaceKeys = spaceKeys; + } + + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum ExcludeEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "spaces")] + Spaces = 1, + + [EnumMember(Value = "devices")] + Devices = 2, + + [EnumMember(Value = "acs_entrances")] + AcsEntrances = 3, + + [EnumMember(Value = "connected_accounts")] + ConnectedAccounts = 4, + + [EnumMember(Value = "acs_systems")] + AcsSystems = 5, + } + + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum IncludeEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "spaces")] + Spaces = 1, + + [EnumMember(Value = "devices")] + Devices = 2, + + [EnumMember(Value = "acs_entrances")] + AcsEntrances = 3, + + [EnumMember(Value = "connected_accounts")] + ConnectedAccounts = 4, + + [EnumMember(Value = "acs_systems")] + AcsSystems = 5, + } + + [DataMember(Name = "exclude", IsRequired = false, EmitDefaultValue = false)] + public List? Exclude { get; set; } + + [DataMember(Name = "include", IsRequired = false, EmitDefaultValue = false)] + public List? Include { get; set; } + + [DataMember(Name = "space_ids", IsRequired = false, EmitDefaultValue = false)] + public List? SpaceIds { get; set; } + + [DataMember(Name = "space_keys", IsRequired = false, EmitDefaultValue = false)] + public List? SpaceKeys { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "getRelatedResponse_response")] + public class GetRelatedResponse + { + [JsonConstructorAttribute] + protected GetRelatedResponse() { } + + public GetRelatedResponse(Batch batch = default) + { + Batch = batch; + } + + [DataMember(Name = "batch", IsRequired = false, EmitDefaultValue = false)] + public Batch Batch { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + public Batch GetRelated(GetRelatedRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam.Post("/spaces/get_related", requestOptions).Data.Batch; + } + + public Batch GetRelated( + List? exclude = default, + List? include = default, + List? spaceIds = default, + List? spaceKeys = default + ) + { + return GetRelated( + new GetRelatedRequest( + exclude: exclude, + include: include, + spaceIds: spaceIds, + spaceKeys: spaceKeys + ) + ); + } + + public async Task GetRelatedAsync(GetRelatedRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return ( + await _seam.PostAsync("/spaces/get_related", requestOptions) + ) + .Data + .Batch; + } + + public async Task GetRelatedAsync( + List? exclude = default, + List? include = default, + List? spaceIds = default, + List? spaceKeys = default + ) + { + return ( + await GetRelatedAsync( + new GetRelatedRequest( + exclude: exclude, + include: include, + spaceIds: spaceIds, + spaceKeys: spaceKeys + ) + ) + ); + } + [DataContract(Name = "listRequest_request")] public class ListRequest { diff --git a/output/csharp/src/Seam/Seam.csproj b/output/csharp/src/Seam/Seam.csproj index 9bd6d53..9330d4a 100644 --- a/output/csharp/src/Seam/Seam.csproj +++ b/output/csharp/src/Seam/Seam.csproj @@ -7,7 +7,7 @@ Seam - 0.94.1 + 0.95.0 Seam diff --git a/package-lock.json b/package-lock.json index 1cd05a2..b5906b5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "0.95.0", "license": "SEE LICENSE IN LICENSE.txt", "devDependencies": { - "@seamapi/nextlove-sdk-generator": "^1.19.1", + "@seamapi/nextlove-sdk-generator": "^1.19.6", "@seamapi/types": "1.575.0", "@types/node": "^18.19.11", "ava": "^5.0.1", @@ -754,9 +754,9 @@ } }, "node_modules/@seamapi/nextlove-sdk-generator": { - "version": "1.19.1", - "resolved": "https://registry.npmjs.org/@seamapi/nextlove-sdk-generator/-/nextlove-sdk-generator-1.19.1.tgz", - "integrity": "sha512-6uh6LBthvJ8y4uAOC54NZLixtOacY/+K+rEK2O94TnWdr/GFfCT+x2vMxt7sp2D73+EV7yYjvmDM5AIiKH10lQ==", + "version": "1.19.6", + "resolved": "https://registry.npmjs.org/@seamapi/nextlove-sdk-generator/-/nextlove-sdk-generator-1.19.6.tgz", + "integrity": "sha512-K5IvO2VX1LUJ+BUnFVJ88yvTYQNCzKrzWMKSgp4eg/S4/y1xU0uR8cucgcqcwcLLS2Qre/KGuyN9SU6uuZo8wA==", "dev": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index a94e8a5..2cb21da 100644 --- a/package.json +++ b/package.json @@ -58,7 +58,7 @@ "npm": ">= 8.1.0" }, "devDependencies": { - "@seamapi/nextlove-sdk-generator": "^1.19.1", + "@seamapi/nextlove-sdk-generator": "^1.19.6", "@seamapi/types": "1.575.0", "@types/node": "^18.19.11", "ava": "^5.0.1",