diff --git a/output/csharp/src/Seam/Api/UserIdentities.cs b/output/csharp/src/Seam/Api/UserIdentities.cs index 2f6c40e..121b51b 100644 --- a/output/csharp/src/Seam/Api/UserIdentities.cs +++ b/output/csharp/src/Seam/Api/UserIdentities.cs @@ -290,11 +290,18 @@ public class GenerateInstantKeyRequest [JsonConstructorAttribute] protected GenerateInstantKeyRequest() { } - public GenerateInstantKeyRequest(string userIdentityId = default) + public GenerateInstantKeyRequest( + float? maxUseCount = default, + string userIdentityId = default + ) { + MaxUseCount = maxUseCount; UserIdentityId = userIdentityId; } + [DataMember(Name = "max_use_count", IsRequired = false, EmitDefaultValue = false)] + public float? MaxUseCount { get; set; } + [DataMember(Name = "user_identity_id", IsRequired = true, EmitDefaultValue = false)] public string UserIdentityId { get; set; } @@ -364,10 +371,16 @@ public InstantKey GenerateInstantKey(GenerateInstantKeyRequest request) .Data.InstantKey; } - public InstantKey GenerateInstantKey(string userIdentityId = default) + public InstantKey GenerateInstantKey( + float? maxUseCount = default, + string userIdentityId = default + ) { return GenerateInstantKey( - new GenerateInstantKeyRequest(userIdentityId: userIdentityId) + new GenerateInstantKeyRequest( + maxUseCount: maxUseCount, + userIdentityId: userIdentityId + ) ); } @@ -385,11 +398,17 @@ await _seam.PostAsync( .InstantKey; } - public async Task GenerateInstantKeyAsync(string userIdentityId = default) + public async Task GenerateInstantKeyAsync( + float? maxUseCount = default, + string userIdentityId = default + ) { return ( await GenerateInstantKeyAsync( - new GenerateInstantKeyRequest(userIdentityId: userIdentityId) + new GenerateInstantKeyRequest( + maxUseCount: maxUseCount, + userIdentityId: userIdentityId + ) ) ); } diff --git a/output/csharp/src/Seam/Api/Workspaces.cs b/output/csharp/src/Seam/Api/Workspaces.cs index d044465..ce1e6d0 100644 --- a/output/csharp/src/Seam/Api/Workspaces.cs +++ b/output/csharp/src/Seam/Api/Workspaces.cs @@ -27,6 +27,7 @@ protected CreateRequest() { } public CreateRequest( string? companyName = default, string? connectPartnerName = default, + CreateRequestConnectWebviewCustomization? connectWebviewCustomization = default, bool? isSandbox = default, string name = default, CreateRequest.WebviewLogoShapeEnum? webviewLogoShape = default, @@ -37,6 +38,7 @@ public CreateRequest( { CompanyName = companyName; ConnectPartnerName = connectPartnerName; + ConnectWebviewCustomization = connectWebviewCustomization; IsSandbox = isSandbox; Name = name; WebviewLogoShape = webviewLogoShape; @@ -68,6 +70,13 @@ public enum WebviewLogoShapeEnum )] public string? ConnectPartnerName { get; set; } + [DataMember( + Name = "connect_webview_customization", + IsRequired = false, + EmitDefaultValue = false + )] + public CreateRequestConnectWebviewCustomization? ConnectWebviewCustomization { get; set; } + [DataMember(Name = "is_sandbox", IsRequired = false, EmitDefaultValue = false)] public bool? IsSandbox { get; set; } @@ -118,6 +127,78 @@ public override string ToString() } } + [DataContract(Name = "createRequestConnectWebviewCustomization_model")] + public class CreateRequestConnectWebviewCustomization + { + [JsonConstructorAttribute] + protected CreateRequestConnectWebviewCustomization() { } + + public CreateRequestConnectWebviewCustomization( + CreateRequestConnectWebviewCustomization.LogoShapeEnum? logoShape = default, + string? primaryButtonColor = default, + string? primaryButtonTextColor = default, + string? successMessage = default + ) + { + LogoShape = logoShape; + PrimaryButtonColor = primaryButtonColor; + PrimaryButtonTextColor = primaryButtonTextColor; + SuccessMessage = successMessage; + } + + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum LogoShapeEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "circle")] + Circle = 1, + + [EnumMember(Value = "square")] + Square = 2, + } + + [DataMember(Name = "logo_shape", IsRequired = false, EmitDefaultValue = false)] + public CreateRequestConnectWebviewCustomization.LogoShapeEnum? LogoShape { get; set; } + + [DataMember( + Name = "primary_button_color", + IsRequired = false, + EmitDefaultValue = false + )] + public string? PrimaryButtonColor { get; set; } + + [DataMember( + Name = "primary_button_text_color", + IsRequired = false, + EmitDefaultValue = false + )] + public string? PrimaryButtonTextColor { get; set; } + + [DataMember(Name = "success_message", IsRequired = false, EmitDefaultValue = false)] + public string? SuccessMessage { 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 = "createResponse_response")] public class CreateResponse { @@ -162,6 +243,7 @@ public Workspace Create(CreateRequest request) public Workspace Create( string? companyName = default, string? connectPartnerName = default, + CreateRequestConnectWebviewCustomization? connectWebviewCustomization = default, bool? isSandbox = default, string name = default, CreateRequest.WebviewLogoShapeEnum? webviewLogoShape = default, @@ -174,6 +256,7 @@ public Workspace Create( new CreateRequest( companyName: companyName, connectPartnerName: connectPartnerName, + connectWebviewCustomization: connectWebviewCustomization, isSandbox: isSandbox, name: name, webviewLogoShape: webviewLogoShape, @@ -196,6 +279,7 @@ public async Task CreateAsync(CreateRequest request) public async Task CreateAsync( string? companyName = default, string? connectPartnerName = default, + CreateRequestConnectWebviewCustomization? connectWebviewCustomization = default, bool? isSandbox = default, string name = default, CreateRequest.WebviewLogoShapeEnum? webviewLogoShape = default, @@ -209,6 +293,7 @@ await CreateAsync( new CreateRequest( companyName: companyName, connectPartnerName: connectPartnerName, + connectWebviewCustomization: connectWebviewCustomization, isSandbox: isSandbox, name: name, webviewLogoShape: webviewLogoShape, diff --git a/output/csharp/src/Seam/Model/Workspace.cs b/output/csharp/src/Seam/Model/Workspace.cs index cf9445b..2f0d800 100644 --- a/output/csharp/src/Seam/Model/Workspace.cs +++ b/output/csharp/src/Seam/Model/Workspace.cs @@ -17,6 +17,7 @@ protected Workspace() { } public Workspace( string companyName = default, string? connectPartnerName = default, + WorkspaceConnectWebviewCustomization connectWebviewCustomization = default, bool isSandbox = default, bool isSuspended = default, string name = default, @@ -25,6 +26,7 @@ public Workspace( { CompanyName = companyName; ConnectPartnerName = connectPartnerName; + ConnectWebviewCustomization = connectWebviewCustomization; IsSandbox = isSandbox; IsSuspended = isSuspended; Name = name; @@ -37,6 +39,13 @@ public Workspace( [DataMember(Name = "connect_partner_name", IsRequired = false, EmitDefaultValue = false)] public string? ConnectPartnerName { get; set; } + [DataMember( + Name = "connect_webview_customization", + IsRequired = true, + EmitDefaultValue = false + )] + public WorkspaceConnectWebviewCustomization ConnectWebviewCustomization { get; set; } + [DataMember(Name = "is_sandbox", IsRequired = true, EmitDefaultValue = false)] public bool IsSandbox { get; set; } @@ -68,4 +77,77 @@ public override string ToString() return stringWriter.ToString(); } } + + [DataContract(Name = "seamModel_workspaceConnectWebviewCustomization_model")] + public class WorkspaceConnectWebviewCustomization + { + [JsonConstructorAttribute] + protected WorkspaceConnectWebviewCustomization() { } + + public WorkspaceConnectWebviewCustomization( + string? inviterLogoUrl = default, + WorkspaceConnectWebviewCustomization.LogoShapeEnum? logoShape = default, + string? primaryButtonColor = default, + string? primaryButtonTextColor = default, + string? successMessage = default + ) + { + InviterLogoUrl = inviterLogoUrl; + LogoShape = logoShape; + PrimaryButtonColor = primaryButtonColor; + PrimaryButtonTextColor = primaryButtonTextColor; + SuccessMessage = successMessage; + } + + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum LogoShapeEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "circle")] + Circle = 1, + + [EnumMember(Value = "square")] + Square = 2, + } + + [DataMember(Name = "inviter_logo_url", IsRequired = false, EmitDefaultValue = false)] + public string? InviterLogoUrl { get; set; } + + [DataMember(Name = "logo_shape", IsRequired = false, EmitDefaultValue = false)] + public WorkspaceConnectWebviewCustomization.LogoShapeEnum? LogoShape { get; set; } + + [DataMember(Name = "primary_button_color", IsRequired = false, EmitDefaultValue = false)] + public string? PrimaryButtonColor { get; set; } + + [DataMember( + Name = "primary_button_text_color", + IsRequired = false, + EmitDefaultValue = false + )] + public string? PrimaryButtonTextColor { get; set; } + + [DataMember(Name = "success_message", IsRequired = false, EmitDefaultValue = false)] + public string? SuccessMessage { 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(); + } + } } diff --git a/output/csharp/src/Seam/Seam.csproj b/output/csharp/src/Seam/Seam.csproj index bac2b02..0eb6feb 100644 --- a/output/csharp/src/Seam/Seam.csproj +++ b/output/csharp/src/Seam/Seam.csproj @@ -7,7 +7,7 @@ Seam - 0.53.0 + 0.54.0 Seam diff --git a/package-lock.json b/package-lock.json index c3a746d..5a9fd26 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,7 @@ "license": "SEE LICENSE IN LICENSE.txt", "devDependencies": { "@seamapi/nextlove-sdk-generator": "^1.17.4", - "@seamapi/types": "^1.385.0", + "@seamapi/types": "^1.386.0", "@types/node": "^18.19.11", "ava": "^5.0.1", "axios": "^1.5.0", @@ -1220,9 +1220,9 @@ } }, "node_modules/@seamapi/types": { - "version": "1.385.0", - "resolved": "https://registry.npmjs.org/@seamapi/types/-/types-1.385.0.tgz", - "integrity": "sha512-XafuAs5nzVAMtN1UHTUgUK6BeyiuNR3ZAel3yWPtfEI42hyI+U/KpNHg+Poh2mzRxNq1vdwEf0WWLdEcaJ8Zgg==", + "version": "1.386.0", + "resolved": "https://registry.npmjs.org/@seamapi/types/-/types-1.386.0.tgz", + "integrity": "sha512-K3nG7nWbYVOZTv7ZgP6mFssC08tVCQ95Cg52GSj9AMwsfW8sFl4jZl9JZlpVjlo07/CI1t22ZpSRkJWD408COA==", "dev": true, "license": "MIT", "engines": { diff --git a/package.json b/package.json index c19eff6..456644c 100644 --- a/package.json +++ b/package.json @@ -59,7 +59,7 @@ }, "devDependencies": { "@seamapi/nextlove-sdk-generator": "^1.17.4", - "@seamapi/types": "^1.385.0", + "@seamapi/types": "^1.386.0", "@types/node": "^18.19.11", "ava": "^5.0.1", "axios": "^1.5.0",