From 519ed5a07a250cf32423b6b08223f384ceb610e9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 12 Feb 2025 23:42:00 +0000 Subject: [PATCH 1/2] feat(deps-dev): bump @seamapi/types in the seam group Bumps the seam group with 1 update: [@seamapi/types](https://github.com/seamapi/types). Updates `@seamapi/types` from 1.347.0 to 1.351.1 - [Release notes](https://github.com/seamapi/types/releases) - [Changelog](https://github.com/seamapi/types/blob/main/.releaserc.json) - [Commits](https://github.com/seamapi/types/compare/v1.347.0...v1.351.1) --- updated-dependencies: - dependency-name: "@seamapi/types" dependency-type: direct:development update-type: version-update:semver-minor dependency-group: seam ... Signed-off-by: dependabot[bot] --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index e4aeced..1322116 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.15.8", - "@seamapi/types": "^1.347.0", + "@seamapi/types": "^1.351.1", "@types/node": "^18.19.11", "ava": "^5.0.1", "axios": "^1.5.0", @@ -1220,9 +1220,9 @@ } }, "node_modules/@seamapi/types": { - "version": "1.347.0", - "resolved": "https://registry.npmjs.org/@seamapi/types/-/types-1.347.0.tgz", - "integrity": "sha512-qRak3gcB7rs1YdhnULXHcLjE+vvLa4MwNTgasqJsaNLhyzZ7GfK3gAEp8/CRXmsWKiTqnXoRutWLXYZPBntJ3g==", + "version": "1.351.1", + "resolved": "https://registry.npmjs.org/@seamapi/types/-/types-1.351.1.tgz", + "integrity": "sha512-zqgGhSUs1EpNAxSAuDPq0jQNifMJua+lX5jviFtC7RSxjqGIP47oBtW76OxFHOnJK9FyIk4vYE583ioBzIPzOg==", "dev": true, "license": "MIT", "engines": { diff --git a/package.json b/package.json index 1f966e8..a4a7153 100644 --- a/package.json +++ b/package.json @@ -59,7 +59,7 @@ }, "devDependencies": { "@seamapi/nextlove-sdk-generator": "^1.15.8", - "@seamapi/types": "^1.347.0", + "@seamapi/types": "^1.351.1", "@types/node": "^18.19.11", "ava": "^5.0.1", "axios": "^1.5.0", From 878cdd6d6333e9f817dcfc790f2c818451e971f6 Mon Sep 17 00:00:00 2001 From: Seam Bot Date: Wed, 12 Feb 2025 23:42:43 +0000 Subject: [PATCH 2/2] ci: Generate code --- output/csharp/src/Seam/Api/Phones.cs | 92 ++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) diff --git a/output/csharp/src/Seam/Api/Phones.cs b/output/csharp/src/Seam/Api/Phones.cs index 87671a5..ac55866 100644 --- a/output/csharp/src/Seam/Api/Phones.cs +++ b/output/csharp/src/Seam/Api/Phones.cs @@ -76,6 +76,98 @@ public async Task DeactivateAsync(string deviceId = default) await DeactivateAsync(new DeactivateRequest(deviceId: deviceId)); } + [DataContract(Name = "getRequest_request")] + public class GetRequest + { + [JsonConstructorAttribute] + protected GetRequest() { } + + public GetRequest(string deviceId = default) + { + DeviceId = deviceId; + } + + [DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] + public string DeviceId { 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 = "getResponse_response")] + public class GetResponse + { + [JsonConstructorAttribute] + protected GetResponse() { } + + public GetResponse(Phone phone = default) + { + Phone = phone; + } + + [DataMember(Name = "phone", IsRequired = false, EmitDefaultValue = false)] + public Phone Phone { 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 Phone Get(GetRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam.Post("/phones/get", requestOptions).Data.Phone; + } + + public Phone Get(string deviceId = default) + { + return Get(new GetRequest(deviceId: deviceId)); + } + + public async Task GetAsync(GetRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return (await _seam.PostAsync("/phones/get", requestOptions)).Data.Phone; + } + + public async Task GetAsync(string deviceId = default) + { + return (await GetAsync(new GetRequest(deviceId: deviceId))); + } + [DataContract(Name = "listRequest_request")] public class ListRequest {