diff --git a/output/csharp/src/Seam.Test/Client/RequestTransportTests.cs b/output/csharp/src/Seam.Test/Client/RequestTransportTests.cs index 3811d605..d1f3528c 100644 --- a/output/csharp/src/Seam.Test/Client/RequestTransportTests.cs +++ b/output/csharp/src/Seam.Test/Client/RequestTransportTests.cs @@ -146,13 +146,13 @@ public void SendsDeleteParamsAsSearchParams() [Fact] public void SendsPostParamsAsAJsonBody() { - var seam = CreateClient("{\"device\":{}}"); + var seam = CreateClient("{}"); - seam.Devices.Get(deviceId: "device1"); + seam.ConnectedAccounts.Sync(connectedAccountId: "account1"); Assert.Equal("POST", _method); - Assert.Equal("/devices/get", _url); - Assert.Equal("{\"device_id\":\"device1\"}", _body); + Assert.Equal("/connected_accounts/sync", _url); + Assert.Equal("{\"connected_account_id\":\"account1\"}", _body); } [Fact] diff --git a/output/csharp/src/Seam/Api/AccessCodes.cs b/output/csharp/src/Seam/Api/AccessCodes.cs index 54b88040..102433ad 100644 --- a/output/csharp/src/Seam/Api/AccessCodes.cs +++ b/output/csharp/src/Seam/Api/AccessCodes.cs @@ -802,7 +802,7 @@ public void Delete(DeleteRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; - _seam.Post("/access_codes/delete", requestOptions); + _seam.Delete("/access_codes/delete", requestOptions); } /// @@ -820,7 +820,7 @@ public async Task DeleteAsync(DeleteRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; - await _seam.PostAsync("/access_codes/delete", requestOptions); + await _seam.DeleteAsync("/access_codes/delete", requestOptions); } /// @@ -916,7 +916,7 @@ public AccessCode GenerateCode(GenerateCodeRequest request) var requestOptions = new RequestOptions(); requestOptions.Data = request; return _seam - .Post("/access_codes/generate_code", requestOptions) + .Get("/access_codes/generate_code", requestOptions) .EnsureData("/access_codes/generate_code") .GeneratedCode; } @@ -937,7 +937,7 @@ public async Task GenerateCodeAsync(GenerateCodeRequest request) var requestOptions = new RequestOptions(); requestOptions.Data = request; return ( - await _seam.PostAsync( + await _seam.GetAsync( "/access_codes/generate_code", requestOptions ) @@ -1059,7 +1059,7 @@ public AccessCode Get(GetRequest request) var requestOptions = new RequestOptions(); requestOptions.Data = request; return _seam - .Post("/access_codes/get", requestOptions) + .Get("/access_codes/get", requestOptions) .EnsureData("/access_codes/get") .AccessCode; } @@ -1087,7 +1087,7 @@ public async Task GetAsync(GetRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; - return (await _seam.PostAsync("/access_codes/get", requestOptions)) + return (await _seam.GetAsync("/access_codes/get", requestOptions)) .EnsureData("/access_codes/get") .AccessCode; } @@ -1271,7 +1271,7 @@ public List List(ListRequest request) var requestOptions = new RequestOptions(); requestOptions.Data = request; return _seam - .Post("/access_codes/list", requestOptions) + .Get("/access_codes/list", requestOptions) .EnsureData("/access_codes/list") .AccessCodes; } @@ -1319,7 +1319,7 @@ public async Task> ListAsync(ListRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; - return (await _seam.PostAsync("/access_codes/list", requestOptions)) + return (await _seam.GetAsync("/access_codes/list", requestOptions)) .EnsureData("/access_codes/list") .AccessCodes; } @@ -1683,16 +1683,9 @@ public UpdateRequest( string? endsAt = default, bool? isExternalModificationAllowed = default, bool? isManaged = default, - bool? isOfflineAccessCode = default, - bool? isOneTimeUse = default, - UpdateRequest.MaxTimeRoundingEnum? maxTimeRounding = default, string? name = default, - bool? preferNativeScheduling = default, - float? preferredCodeLength = default, string? startsAt = default, - UpdateRequest.TypeEnum? type = default, - bool? useBackupAccessCodePool = default, - bool? useOfflineAccessCode = default + UpdateRequest.TypeEnum? type = default ) { AccessCodeId = accessCodeId; @@ -1703,38 +1696,9 @@ public UpdateRequest( EndsAt = endsAt; IsExternalModificationAllowed = isExternalModificationAllowed; IsManaged = isManaged; - IsOfflineAccessCode = isOfflineAccessCode; - IsOneTimeUse = isOneTimeUse; - MaxTimeRounding = maxTimeRounding; Name = name; - PreferNativeScheduling = preferNativeScheduling; - PreferredCodeLength = preferredCodeLength; StartsAt = startsAt; Type = type; - UseBackupAccessCodePool = useBackupAccessCodePool; - UseOfflineAccessCode = useOfflineAccessCode; - } - - /// - /// Maximum rounding adjustment. To create a daily-bound [offline access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes/offline-access-codes) for devices that support this feature, set this parameter to `1d`. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum MaxTimeRoundingEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "1hour")] - _1hour = 1, - - [EnumMember(Value = "1day")] - _1day = 2, - - [EnumMember(Value = "1h")] - _1h = 3, - - [EnumMember(Value = "1d")] - _1d = 4, } /// @@ -1810,28 +1774,6 @@ public enum TypeEnum [DataMember(Name = "is_managed", IsRequired = false, EmitDefaultValue = false)] public bool? IsManaged { get; set; } - /// - /// Indicates whether the access code is an [offline access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes/offline-access-codes). - /// - [DataMember( - Name = "is_offline_access_code", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? IsOfflineAccessCode { get; set; } - - /// - /// Indicates whether the [offline access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes/offline-access-codes) is a single-use access code. - /// - [DataMember(Name = "is_one_time_use", IsRequired = false, EmitDefaultValue = false)] - public bool? IsOneTimeUse { get; set; } - - /// - /// Maximum rounding adjustment. To create a daily-bound [offline access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes/offline-access-codes) for devices that support this feature, set this parameter to `1d`. - /// - [DataMember(Name = "max_time_rounding", IsRequired = false, EmitDefaultValue = false)] - public UpdateRequest.MaxTimeRoundingEnum? MaxTimeRounding { get; set; } - /// /// Name of the new access code. Enables administrators and users to identify the access code easily, especially when there are numerous access codes. /// @@ -1844,26 +1786,6 @@ public enum TypeEnum [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] public string? Name { get; set; } - /// - /// Indicates whether [native scheduling](https://docs.seam.co/low-level-apis/smart-locks/access-codes#native-scheduling) should be used for time-bound codes when supported by the provider. Default: `true`. - /// - [DataMember( - Name = "prefer_native_scheduling", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? PreferNativeScheduling { get; set; } - - /// - /// Preferred code length. Only applicable if you do not specify a `code`. If the affected device does not support the preferred code length, Seam reverts to using the shortest supported code length. - /// - [DataMember( - Name = "preferred_code_length", - IsRequired = false, - EmitDefaultValue = false - )] - public float? PreferredCodeLength { get; set; } - /// /// Date and time at which the validity of the new access code starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. /// @@ -1876,24 +1798,6 @@ public enum TypeEnum [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] public UpdateRequest.TypeEnum? Type { get; set; } - /// - /// Indicates whether to use a [backup access code pool](https://docs.seam.co/low-level-apis/smart-locks/access-codes/backup-access-codes) provided by Seam. If `true`, you can use [`/access_codes/pull_backup_access_code`](https://docs.seam.co/api/access_codes/pull_backup_access_code). - /// - [DataMember( - Name = "use_backup_access_code_pool", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? UseBackupAccessCodePool { get; set; } - - [Obsolete("Use `is_offline_access_code` instead.")] - [DataMember( - Name = "use_offline_access_code", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? UseOfflineAccessCode { get; set; } - public override string ToString() { JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); @@ -1940,16 +1844,9 @@ public void Update( string? endsAt = default, bool? isExternalModificationAllowed = default, bool? isManaged = default, - bool? isOfflineAccessCode = default, - bool? isOneTimeUse = default, - UpdateRequest.MaxTimeRoundingEnum? maxTimeRounding = default, string? name = default, - bool? preferNativeScheduling = default, - float? preferredCodeLength = default, string? startsAt = default, - UpdateRequest.TypeEnum? type = default, - bool? useBackupAccessCodePool = default, - bool? useOfflineAccessCode = default + UpdateRequest.TypeEnum? type = default ) { Update( @@ -1962,16 +1859,9 @@ public void Update( endsAt: endsAt, isExternalModificationAllowed: isExternalModificationAllowed, isManaged: isManaged, - isOfflineAccessCode: isOfflineAccessCode, - isOneTimeUse: isOneTimeUse, - maxTimeRounding: maxTimeRounding, name: name, - preferNativeScheduling: preferNativeScheduling, - preferredCodeLength: preferredCodeLength, startsAt: startsAt, - type: type, - useBackupAccessCodePool: useBackupAccessCodePool, - useOfflineAccessCode: useOfflineAccessCode + type: type ) ); } @@ -2002,16 +1892,9 @@ public async Task UpdateAsync( string? endsAt = default, bool? isExternalModificationAllowed = default, bool? isManaged = default, - bool? isOfflineAccessCode = default, - bool? isOneTimeUse = default, - UpdateRequest.MaxTimeRoundingEnum? maxTimeRounding = default, string? name = default, - bool? preferNativeScheduling = default, - float? preferredCodeLength = default, string? startsAt = default, - UpdateRequest.TypeEnum? type = default, - bool? useBackupAccessCodePool = default, - bool? useOfflineAccessCode = default + UpdateRequest.TypeEnum? type = default ) { await UpdateAsync( @@ -2024,16 +1907,9 @@ await UpdateAsync( endsAt: endsAt, isExternalModificationAllowed: isExternalModificationAllowed, isManaged: isManaged, - isOfflineAccessCode: isOfflineAccessCode, - isOneTimeUse: isOneTimeUse, - maxTimeRounding: maxTimeRounding, name: name, - preferNativeScheduling: preferNativeScheduling, - preferredCodeLength: preferredCodeLength, startsAt: startsAt, - type: type, - useBackupAccessCodePool: useBackupAccessCodePool, - useOfflineAccessCode: useOfflineAccessCode + type: type ) ); } diff --git a/output/csharp/src/Seam/Api/AccessGrants.cs b/output/csharp/src/Seam/Api/AccessGrants.cs index 574f0556..f3eb6a9b 100644 --- a/output/csharp/src/Seam/Api/AccessGrants.cs +++ b/output/csharp/src/Seam/Api/AccessGrants.cs @@ -563,7 +563,7 @@ public void Delete(DeleteRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; - _seam.Post("/access_grants/delete", requestOptions); + _seam.Delete("/access_grants/delete", requestOptions); } /// @@ -581,7 +581,7 @@ public async Task DeleteAsync(DeleteRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; - await _seam.PostAsync("/access_grants/delete", requestOptions); + await _seam.DeleteAsync("/access_grants/delete", requestOptions); } /// @@ -893,7 +893,7 @@ public Batch GetRelated(GetRelatedRequest request) var requestOptions = new RequestOptions(); requestOptions.Data = request; return _seam - .Post("/access_grants/get_related", requestOptions) + .Get("/access_grants/get_related", requestOptions) .EnsureData("/access_grants/get_related") .Batch; } @@ -926,7 +926,7 @@ public async Task GetRelatedAsync(GetRelatedRequest request) var requestOptions = new RequestOptions(); requestOptions.Data = request; return ( - await _seam.PostAsync( + await _seam.GetAsync( "/access_grants/get_related", requestOptions ) @@ -1138,7 +1138,7 @@ public List List(ListRequest request) var requestOptions = new RequestOptions(); requestOptions.Data = request; return _seam - .Post("/access_grants/list", requestOptions) + .Get("/access_grants/list", requestOptions) .EnsureData("/access_grants/list") .AccessGrants; } @@ -1188,7 +1188,7 @@ public async Task> ListAsync(ListRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; - return (await _seam.PostAsync("/access_grants/list", requestOptions)) + return (await _seam.GetAsync("/access_grants/list", requestOptions)) .EnsureData("/access_grants/list") .AccessGrants; } diff --git a/output/csharp/src/Seam/Api/AccessGroupsAcs.cs b/output/csharp/src/Seam/Api/AccessGroupsAcs.cs index 1e6c63a3..3b08fff4 100644 --- a/output/csharp/src/Seam/Api/AccessGroupsAcs.cs +++ b/output/csharp/src/Seam/Api/AccessGroupsAcs.cs @@ -179,7 +179,7 @@ public void Delete(DeleteRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; - _seam.Post("/acs/access_groups/delete", requestOptions); + _seam.Delete("/acs/access_groups/delete", requestOptions); } /// @@ -197,7 +197,7 @@ public async Task DeleteAsync(DeleteRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; - await _seam.PostAsync("/acs/access_groups/delete", requestOptions); + await _seam.DeleteAsync("/acs/access_groups/delete", requestOptions); } /// @@ -293,7 +293,7 @@ public AcsAccessGroup Get(GetRequest request) var requestOptions = new RequestOptions(); requestOptions.Data = request; return _seam - .Post("/acs/access_groups/get", requestOptions) + .Get("/acs/access_groups/get", requestOptions) .EnsureData("/acs/access_groups/get") .AcsAccessGroup; } @@ -313,7 +313,7 @@ public async Task GetAsync(GetRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; - return (await _seam.PostAsync("/acs/access_groups/get", requestOptions)) + return (await _seam.GetAsync("/acs/access_groups/get", requestOptions)) .EnsureData("/acs/access_groups/get") .AcsAccessGroup; } @@ -437,7 +437,7 @@ public List List(ListRequest request) var requestOptions = new RequestOptions(); requestOptions.Data = request; return _seam - .Post("/acs/access_groups/list", requestOptions) + .Get("/acs/access_groups/list", requestOptions) .EnsureData("/acs/access_groups/list") .AcsAccessGroups; } @@ -469,7 +469,7 @@ public async Task> ListAsync(ListRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; - return (await _seam.PostAsync("/acs/access_groups/list", requestOptions)) + return (await _seam.GetAsync("/acs/access_groups/list", requestOptions)) .EnsureData("/acs/access_groups/list") .AcsAccessGroups; } @@ -581,7 +581,7 @@ public List ListAccessibleEntrances(ListAccessibleEntrancesRequest var requestOptions = new RequestOptions(); requestOptions.Data = request; return _seam - .Post( + .Get( "/acs/access_groups/list_accessible_entrances", requestOptions ) @@ -609,7 +609,7 @@ ListAccessibleEntrancesRequest request var requestOptions = new RequestOptions(); requestOptions.Data = request; return ( - await _seam.PostAsync( + await _seam.GetAsync( "/acs/access_groups/list_accessible_entrances", requestOptions ) @@ -717,7 +717,7 @@ public List ListUsers(ListUsersRequest request) var requestOptions = new RequestOptions(); requestOptions.Data = request; return _seam - .Post("/acs/access_groups/list_users", requestOptions) + .Get("/acs/access_groups/list_users", requestOptions) .EnsureData("/acs/access_groups/list_users") .AcsUsers; } @@ -738,7 +738,7 @@ public async Task> ListUsersAsync(ListUsersRequest request) var requestOptions = new RequestOptions(); requestOptions.Data = request; return ( - await _seam.PostAsync( + await _seam.GetAsync( "/acs/access_groups/list_users", requestOptions ) @@ -820,7 +820,7 @@ public void RemoveUser(RemoveUserRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; - _seam.Post("/acs/access_groups/remove_user", requestOptions); + _seam.Delete("/acs/access_groups/remove_user", requestOptions); } /// @@ -848,7 +848,7 @@ public async Task RemoveUserAsync(RemoveUserRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; - await _seam.PostAsync("/acs/access_groups/remove_user", requestOptions); + await _seam.DeleteAsync("/acs/access_groups/remove_user", requestOptions); } /// diff --git a/output/csharp/src/Seam/Api/AccessMethods.cs b/output/csharp/src/Seam/Api/AccessMethods.cs index 73d7cf1e..6e3f949d 100644 --- a/output/csharp/src/Seam/Api/AccessMethods.cs +++ b/output/csharp/src/Seam/Api/AccessMethods.cs @@ -493,7 +493,7 @@ public AccessMethod Get(GetRequest request) var requestOptions = new RequestOptions(); requestOptions.Data = request; return _seam - .Post("/access_methods/get", requestOptions) + .Get("/access_methods/get", requestOptions) .EnsureData("/access_methods/get") .AccessMethod; } @@ -513,7 +513,7 @@ public async Task GetAsync(GetRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; - return (await _seam.PostAsync("/access_methods/get", requestOptions)) + return (await _seam.GetAsync("/access_methods/get", requestOptions)) .EnsureData("/access_methods/get") .AccessMethod; } @@ -685,7 +685,7 @@ public Batch GetRelated(GetRelatedRequest request) var requestOptions = new RequestOptions(); requestOptions.Data = request; return _seam - .Post("/access_methods/get_related", requestOptions) + .Get("/access_methods/get_related", requestOptions) .EnsureData("/access_methods/get_related") .Batch; } @@ -716,7 +716,7 @@ public async Task GetRelatedAsync(GetRelatedRequest request) var requestOptions = new RequestOptions(); requestOptions.Data = request; return ( - await _seam.PostAsync( + await _seam.GetAsync( "/access_methods/get_related", requestOptions ) @@ -760,6 +760,8 @@ public ListRequest( string? accessGrantKey = default, string? acsEntranceId = default, string? deviceId = default, + int? limit = default, + string? pageCursor = default, string? spaceId = default ) { @@ -768,11 +770,13 @@ public ListRequest( AccessGrantKey = accessGrantKey; AcsEntranceId = acsEntranceId; DeviceId = deviceId; + Limit = limit; + PageCursor = pageCursor; SpaceId = spaceId; } /// - /// ID of the access code for which you want to retrieve all access methods. + /// ID of the access code by which to filter the returned access methods. Must be combined with `access_grant_id`, `access_grant_key`, or `acs_entrance_id`. /// [DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] public string? AccessCodeId { get; set; } @@ -790,19 +794,31 @@ public ListRequest( public string? AccessGrantKey { get; set; } /// - /// ID of the entrance for which you want to retrieve all access methods. + /// ID of the entrance for which you want to retrieve all access methods that grant access to it. /// [DataMember(Name = "acs_entrance_id", IsRequired = false, EmitDefaultValue = false)] public string? AcsEntranceId { get; set; } /// - /// ID of the device for which you want to retrieve all access methods. + /// ID of the device by which to filter the returned access methods. Must be combined with `access_grant_id`, `access_grant_key`, or `acs_entrance_id`. /// [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] public string? DeviceId { get; set; } /// - /// ID of the space for which you want to retrieve all access methods. + /// Maximum number of records to return per page. + /// + [DataMember(Name = "limit", IsRequired = false, EmitDefaultValue = false)] + public int? Limit { get; set; } + + /// + /// Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`. + /// + [DataMember(Name = "page_cursor", IsRequired = false, EmitDefaultValue = false)] + public string? PageCursor { get; set; } + + /// + /// ID of the space by which to filter the returned access methods. Must be combined with `access_grant_id`, `access_grant_key`, or `acs_entrance_id`. /// [DataMember(Name = "space_id", IsRequired = false, EmitDefaultValue = false)] public string? SpaceId { get; set; } @@ -872,7 +888,7 @@ public List List(ListRequest request) var requestOptions = new RequestOptions(); requestOptions.Data = request; return _seam - .Post("/access_methods/list", requestOptions) + .Get("/access_methods/list", requestOptions) .EnsureData("/access_methods/list") .AccessMethods; } @@ -886,6 +902,8 @@ public List List( string? accessGrantKey = default, string? acsEntranceId = default, string? deviceId = default, + int? limit = default, + string? pageCursor = default, string? spaceId = default ) { @@ -896,6 +914,8 @@ public List List( accessGrantKey: accessGrantKey, acsEntranceId: acsEntranceId, deviceId: deviceId, + limit: limit, + pageCursor: pageCursor, spaceId: spaceId ) ); @@ -908,7 +928,7 @@ public async Task> ListAsync(ListRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; - return (await _seam.PostAsync("/access_methods/list", requestOptions)) + return (await _seam.GetAsync("/access_methods/list", requestOptions)) .EnsureData("/access_methods/list") .AccessMethods; } @@ -922,6 +942,8 @@ public async Task> ListAsync( string? accessGrantKey = default, string? acsEntranceId = default, string? deviceId = default, + int? limit = default, + string? pageCursor = default, string? spaceId = default ) { @@ -933,6 +955,8 @@ await ListAsync( accessGrantKey: accessGrantKey, acsEntranceId: acsEntranceId, deviceId: deviceId, + limit: limit, + pageCursor: pageCursor, spaceId: spaceId ) ) diff --git a/output/csharp/src/Seam/Api/ActionAttempts.cs b/output/csharp/src/Seam/Api/ActionAttempts.cs index 07b7dfde..166de3a8 100644 --- a/output/csharp/src/Seam/Api/ActionAttempts.cs +++ b/output/csharp/src/Seam/Api/ActionAttempts.cs @@ -103,7 +103,7 @@ public ActionAttempt Get(GetRequest request) var requestOptions = new RequestOptions(); requestOptions.Data = request; return _seam - .Post("/action_attempts/get", requestOptions) + .Get("/action_attempts/get", requestOptions) .EnsureData("/action_attempts/get") .ActionAttempt; } @@ -123,7 +123,7 @@ public async Task GetAsync(GetRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; - return (await _seam.PostAsync("/action_attempts/get", requestOptions)) + return (await _seam.GetAsync("/action_attempts/get", requestOptions)) .EnsureData("/action_attempts/get") .ActionAttempt; } @@ -247,7 +247,7 @@ public List List(ListRequest request) var requestOptions = new RequestOptions(); requestOptions.Data = request; return _seam - .Post("/action_attempts/list", requestOptions) + .Get("/action_attempts/list", requestOptions) .EnsureData("/action_attempts/list") .ActionAttempts; } @@ -279,7 +279,7 @@ public async Task> ListAsync(ListRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; - return (await _seam.PostAsync("/action_attempts/list", requestOptions)) + return (await _seam.GetAsync("/action_attempts/list", requestOptions)) .EnsureData("/action_attempts/list") .ActionAttempts; } diff --git a/output/csharp/src/Seam/Api/ClientSessions.cs b/output/csharp/src/Seam/Api/ClientSessions.cs index a275fe2a..d663b273 100644 --- a/output/csharp/src/Seam/Api/ClientSessions.cs +++ b/output/csharp/src/Seam/Api/ClientSessions.cs @@ -288,7 +288,7 @@ public void Delete(DeleteRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; - _seam.Post("/client_sessions/delete", requestOptions); + _seam.Delete("/client_sessions/delete", requestOptions); } /// @@ -306,7 +306,7 @@ public async Task DeleteAsync(DeleteRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; - await _seam.PostAsync("/client_sessions/delete", requestOptions); + await _seam.DeleteAsync("/client_sessions/delete", requestOptions); } /// @@ -412,7 +412,7 @@ public ClientSession Get(GetRequest request) var requestOptions = new RequestOptions(); requestOptions.Data = request; return _seam - .Post("/client_sessions/get", requestOptions) + .Get("/client_sessions/get", requestOptions) .EnsureData("/client_sessions/get") .ClientSession; } @@ -440,7 +440,7 @@ public async Task GetAsync(GetRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; - return (await _seam.PostAsync("/client_sessions/get", requestOptions)) + return (await _seam.GetAsync("/client_sessions/get", requestOptions)) .EnsureData("/client_sessions/get") .ClientSession; } @@ -853,7 +853,7 @@ public ListRequest( public string? ClientSessionId { get; set; } /// - /// ID of the [Connect Webview](https://docs.seam.co/core-concepts/connect-webviews) for which you want to retrieve client sessions. + /// ID of the [Connect Webview](https://docs.seam.co/core-concepts/connect-webviews) for which you want to retrieve client sessions. Specify `null` to retrieve client sessions that are not associated with a Connect Webview. /// [DataMember(Name = "connect_webview_id", IsRequired = false, EmitDefaultValue = false)] public string? ConnectWebviewId { get; set; } @@ -865,7 +865,7 @@ public ListRequest( public string? UserIdentifierKey { get; set; } /// - /// ID of the [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) for which you want to retrieve client sessions. + /// ID of the [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) for which you want to retrieve client sessions. Specify `null` to retrieve client sessions that are not associated with a user identity. /// [DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] public string? UserIdentityId { get; set; } @@ -945,7 +945,7 @@ public List List(ListRequest request) var requestOptions = new RequestOptions(); requestOptions.Data = request; return _seam - .Post("/client_sessions/list", requestOptions) + .Get("/client_sessions/list", requestOptions) .EnsureData("/client_sessions/list") .ClientSessions; } @@ -979,7 +979,7 @@ public async Task> ListAsync(ListRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; - return (await _seam.PostAsync("/client_sessions/list", requestOptions)) + return (await _seam.GetAsync("/client_sessions/list", requestOptions)) .EnsureData("/client_sessions/list") .ClientSessions; } diff --git a/output/csharp/src/Seam/Api/ConnectWebviews.cs b/output/csharp/src/Seam/Api/ConnectWebviews.cs index 3968500d..5498fb7b 100644 --- a/output/csharp/src/Seam/Api/ConnectWebviews.cs +++ b/output/csharp/src/Seam/Api/ConnectWebviews.cs @@ -239,50 +239,56 @@ public enum AcceptedProvidersEnum [EnumMember(Value = "ultraloq")] Ultraloq = 51, + [EnumMember(Value = "yacan")] + Yacan = 52, + [EnumMember(Value = "dusaw")] - Dusaw = 52, + Dusaw = 53, [EnumMember(Value = "sifely")] - Sifely = 53, + Sifely = 54, [EnumMember(Value = "thirty_three_lock")] - ThirtyThreeLock = 54, + ThirtyThreeLock = 55, [EnumMember(Value = "ring")] - Ring = 55, + Ring = 56, [EnumMember(Value = "ical")] - Ical = 56, + Ical = 57, [EnumMember(Value = "lodgify")] - Lodgify = 57, + Lodgify = 58, [EnumMember(Value = "hostaway")] - Hostaway = 58, + Hostaway = 59, [EnumMember(Value = "guesty")] - Guesty = 59, + Guesty = 60, [EnumMember(Value = "acuity_scheduling")] - AcuityScheduling = 60, + AcuityScheduling = 61, [EnumMember(Value = "omnitec")] - Omnitec = 61, + Omnitec = 62, [EnumMember(Value = "kisi")] - Kisi = 62, + Kisi = 63, + + [EnumMember(Value = "aqara")] + Aqara = 64, [EnumMember(Value = "yale_access")] - YaleAccess = 63, + YaleAccess = 65, [EnumMember(Value = "hid_cm")] - HidCm = 64, + HidCm = 66, [EnumMember(Value = "google_nest")] - GoogleNest = 65, + GoogleNest = 67, [EnumMember(Value = "slack")] - Slack = 66, + Slack = 68, } /// @@ -349,7 +355,7 @@ public enum ProviderCategoryEnum public bool? AutomaticallyManageNewDevices { get; set; } /// - /// Custom metadata that you want to associate with the Connect Webview. Supports up to 50 JSON key:value pairs. [Adding custom metadata to a Connect Webview](https://docs.seam.co/core-concepts/connect-webviews/attaching-custom-data-to-the-connect-webview) enables you to store custom information, like customer details or internal IDs from your application. The custom metadata is then transferred to any [connected accounts](https://docs.seam.co/core-concepts/connected-accounts) that were connected using the Connect Webview, making it easy to find and filter these resources in your [workspace](https://docs.seam.co/core-concepts/workspaces). You can also [filter Connect Webviews by custom metadata](https://docs.seam.co/core-concepts/connect-webviews/filtering-connect-webviews-by-custom-metadata). + /// Custom metadata that you want to associate with the Connect Webview. Supports up to 50 JSON key:value pairs, with key names up to 40 characters long that cannot contain a period (.). [Adding custom metadata to a Connect Webview](https://docs.seam.co/core-concepts/connect-webviews/attaching-custom-data-to-the-connect-webview) enables you to store custom information, like customer details or internal IDs from your application. The custom metadata is then transferred to any [connected accounts](https://docs.seam.co/core-concepts/connected-accounts) that were connected using the Connect Webview, making it easy to find and filter these resources in your [workspace](https://docs.seam.co/core-concepts/workspaces). You can also [filter Connect Webviews by custom metadata](https://docs.seam.co/core-concepts/connect-webviews/filtering-connect-webviews-by-custom-metadata). Set a key to `null` or to an empty string to remove that key from the custom metadata. /// [DataMember(Name = "custom_metadata", IsRequired = false, EmitDefaultValue = false)] public object? CustomMetadata { get; set; } @@ -621,7 +627,7 @@ public void Delete(DeleteRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; - _seam.Post("/connect_webviews/delete", requestOptions); + _seam.Delete("/connect_webviews/delete", requestOptions); } /// @@ -643,7 +649,7 @@ public async Task DeleteAsync(DeleteRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; - await _seam.PostAsync("/connect_webviews/delete", requestOptions); + await _seam.DeleteAsync("/connect_webviews/delete", requestOptions); } /// @@ -743,7 +749,7 @@ public ConnectWebview Get(GetRequest request) var requestOptions = new RequestOptions(); requestOptions.Data = request; return _seam - .Post("/connect_webviews/get", requestOptions) + .Get("/connect_webviews/get", requestOptions) .EnsureData("/connect_webviews/get") .ConnectWebview; } @@ -767,7 +773,7 @@ public async Task GetAsync(GetRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; - return (await _seam.PostAsync("/connect_webviews/get", requestOptions)) + return (await _seam.GetAsync("/connect_webviews/get", requestOptions)) .EnsureData("/connect_webviews/get") .ConnectWebview; } @@ -809,7 +815,7 @@ public ListRequest( } /// - /// Custom metadata pairs by which you want to [filter Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews/filtering-connect-webviews-by-custom-metadata). Returns Connect Webviews with `custom_metadata` that contains all of the provided key:value pairs. + /// Custom metadata pairs by which you want to [filter Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews/filtering-connect-webviews-by-custom-metadata). Returns Connect Webviews with `custom_metadata` that contains all of the provided key:value pairs. Key names cannot contain a period (.). Specify `null` to match a key that is unset. A key given an empty string is omitted from the filter. /// [DataMember(Name = "custom_metadata_has", IsRequired = false, EmitDefaultValue = false)] public object? CustomMetadataHas { get; set; } @@ -909,7 +915,7 @@ public List List(ListRequest request) var requestOptions = new RequestOptions(); requestOptions.Data = request; return _seam - .Post("/connect_webviews/list", requestOptions) + .Get("/connect_webviews/list", requestOptions) .EnsureData("/connect_webviews/list") .ConnectWebviews; } @@ -945,7 +951,7 @@ public async Task> ListAsync(ListRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; - return (await _seam.PostAsync("/connect_webviews/list", requestOptions)) + return (await _seam.GetAsync("/connect_webviews/list", requestOptions)) .EnsureData("/connect_webviews/list") .ConnectWebviews; } diff --git a/output/csharp/src/Seam/Api/ConnectedAccounts.cs b/output/csharp/src/Seam/Api/ConnectedAccounts.cs index 9d1badd5..ab35f5f4 100644 --- a/output/csharp/src/Seam/Api/ConnectedAccounts.cs +++ b/output/csharp/src/Seam/Api/ConnectedAccounts.cs @@ -69,7 +69,7 @@ public void Delete(DeleteRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; - _seam.Post("/connected_accounts/delete", requestOptions); + _seam.Delete("/connected_accounts/delete", requestOptions); } /// @@ -95,7 +95,7 @@ public async Task DeleteAsync(DeleteRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; - await _seam.PostAsync("/connected_accounts/delete", requestOptions); + await _seam.DeleteAsync("/connected_accounts/delete", requestOptions); } /// @@ -273,7 +273,7 @@ public ListRequest( } /// - /// Custom metadata pairs by which you want to filter connected accounts. Returns connected accounts with `custom_metadata` that contains all of the provided key:value pairs. + /// Custom metadata pairs by which you want to filter connected accounts. Returns connected accounts with `custom_metadata` that contains all of the provided key:value pairs. Key names cannot contain a period (.). Specify `null` to match a key that is unset. A key given an empty string is omitted from the filter. /// [DataMember(Name = "custom_metadata_has", IsRequired = false, EmitDefaultValue = false)] public object? CustomMetadataHas { get; set; } @@ -379,7 +379,7 @@ public List List(ListRequest request) var requestOptions = new RequestOptions(); requestOptions.Data = request; return _seam - .Post("/connected_accounts/list", requestOptions) + .Get("/connected_accounts/list", requestOptions) .EnsureData("/connected_accounts/list") .ConnectedAccounts; } @@ -417,7 +417,7 @@ public async Task> ListAsync(ListRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; - return (await _seam.PostAsync("/connected_accounts/list", requestOptions)) + return (await _seam.GetAsync("/connected_accounts/list", requestOptions)) .EnsureData("/connected_accounts/list") .ConnectedAccounts; } @@ -604,7 +604,7 @@ public enum AcceptedCapabilitiesEnum public string ConnectedAccountId { get; set; } /// - /// Custom metadata that you want to associate with the connected account. Entirely replaces the existing custom metadata object. If a new Connect Webview contains custom metadata and is used to reconnect a connected account, the custom metadata from the Connect Webview will entirely replace the entire custom metadata object on the connected account. Supports up to 50 JSON key:value pairs. [Adding custom metadata to a connected account](https://docs.seam.co/core-concepts/connected-accounts/adding-custom-metadata-to-a-connected-account) enables you to store custom information, like customer details or internal IDs from your application. Then, you can [filter connected accounts by the desired metadata](https://docs.seam.co/core-concepts/connected-accounts/filtering-connected-accounts-by-custom-metadata). + /// Custom metadata that you want to associate with the connected account. Entirely replaces the existing custom metadata object. If a new Connect Webview contains custom metadata and is used to reconnect a connected account, the custom metadata from the Connect Webview will entirely replace the entire custom metadata object on the connected account. Supports up to 50 JSON key:value pairs, with key names up to 40 characters long that cannot contain a period (.). [Adding custom metadata to a connected account](https://docs.seam.co/core-concepts/connected-accounts/adding-custom-metadata-to-a-connected-account) enables you to store custom information, like customer details or internal IDs from your application. Then, you can [filter connected accounts by the desired metadata](https://docs.seam.co/core-concepts/connected-accounts/filtering-connected-accounts-by-custom-metadata). Set a key to `null` or to an empty string to remove that key from the custom metadata. /// [DataMember(Name = "custom_metadata", IsRequired = false, EmitDefaultValue = false)] public object? CustomMetadata { get; set; } diff --git a/output/csharp/src/Seam/Api/CredentialsAcs.cs b/output/csharp/src/Seam/Api/CredentialsAcs.cs index 27fe9cda..5130261b 100644 --- a/output/csharp/src/Seam/Api/CredentialsAcs.cs +++ b/output/csharp/src/Seam/Api/CredentialsAcs.cs @@ -687,7 +687,7 @@ public void Delete(DeleteRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; - _seam.Post("/acs/credentials/delete", requestOptions); + _seam.Delete("/acs/credentials/delete", requestOptions); } /// @@ -705,7 +705,7 @@ public async Task DeleteAsync(DeleteRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; - await _seam.PostAsync("/acs/credentials/delete", requestOptions); + await _seam.DeleteAsync("/acs/credentials/delete", requestOptions); } /// @@ -801,7 +801,7 @@ public AcsCredential Get(GetRequest request) var requestOptions = new RequestOptions(); requestOptions.Data = request; return _seam - .Post("/acs/credentials/get", requestOptions) + .Get("/acs/credentials/get", requestOptions) .EnsureData("/acs/credentials/get") .AcsCredential; } @@ -821,7 +821,7 @@ public async Task GetAsync(GetRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; - return (await _seam.PostAsync("/acs/credentials/get", requestOptions)) + return (await _seam.GetAsync("/acs/credentials/get", requestOptions)) .EnsureData("/acs/credentials/get") .AcsCredential; } @@ -844,32 +844,26 @@ public class ListRequest protected ListRequest() { } public ListRequest( - string? acsUserId = default, string? acsSystemId = default, - string? userIdentityId = default, + string? acsUserId = default, string? createdBefore = default, bool? isMultiPhoneSyncCredential = default, float? limit = default, string? pageCursor = default, - string? search = default + string? search = default, + string? userIdentityId = default ) { - AcsUserId = acsUserId; AcsSystemId = acsSystemId; - UserIdentityId = userIdentityId; + AcsUserId = acsUserId; CreatedBefore = createdBefore; IsMultiPhoneSyncCredential = isMultiPhoneSyncCredential; Limit = limit; PageCursor = pageCursor; Search = search; + UserIdentityId = userIdentityId; } - /// - /// ID of the access system user for which you want to retrieve all credentials. - /// - [DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] - public string? AcsUserId { get; set; } - /// /// ID of the access system for which you want to retrieve all credentials. /// @@ -877,10 +871,10 @@ public ListRequest( public string? AcsSystemId { get; set; } /// - /// ID of the user identity for which you want to retrieve all credentials. + /// ID of the access system user for which you want to retrieve all credentials. /// - [DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] - public string? UserIdentityId { get; set; } + [DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] + public string? AcsUserId { get; set; } /// /// Date and time, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format, before which events to return were created. @@ -916,6 +910,12 @@ public ListRequest( [DataMember(Name = "search", IsRequired = false, EmitDefaultValue = false)] public string? Search { get; set; } + /// + /// ID of the user identity for which you want to retrieve all credentials. + /// + [DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] + public string? UserIdentityId { get; set; } + public override string ToString() { JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); @@ -990,26 +990,26 @@ public List List(ListRequest request) /// Returns a list of all [credentials](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). /// public List List( - string? acsUserId = default, string? acsSystemId = default, - string? userIdentityId = default, + string? acsUserId = default, string? createdBefore = default, bool? isMultiPhoneSyncCredential = default, float? limit = default, string? pageCursor = default, - string? search = default + string? search = default, + string? userIdentityId = default ) { return List( new ListRequest( - acsUserId: acsUserId, acsSystemId: acsSystemId, - userIdentityId: userIdentityId, + acsUserId: acsUserId, createdBefore: createdBefore, isMultiPhoneSyncCredential: isMultiPhoneSyncCredential, limit: limit, pageCursor: pageCursor, - search: search + search: search, + userIdentityId: userIdentityId ) ); } @@ -1030,27 +1030,27 @@ public async Task> ListAsync(ListRequest request) /// Returns a list of all [credentials](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). /// public async Task> ListAsync( - string? acsUserId = default, string? acsSystemId = default, - string? userIdentityId = default, + string? acsUserId = default, string? createdBefore = default, bool? isMultiPhoneSyncCredential = default, float? limit = default, string? pageCursor = default, - string? search = default + string? search = default, + string? userIdentityId = default ) { return ( await ListAsync( new ListRequest( - acsUserId: acsUserId, acsSystemId: acsSystemId, - userIdentityId: userIdentityId, + acsUserId: acsUserId, createdBefore: createdBefore, isMultiPhoneSyncCredential: isMultiPhoneSyncCredential, limit: limit, pageCursor: pageCursor, - search: search + search: search, + userIdentityId: userIdentityId ) ) ); @@ -1141,7 +1141,7 @@ public List ListAccessibleEntrances(ListAccessibleEntrancesRequest var requestOptions = new RequestOptions(); requestOptions.Data = request; return _seam - .Post( + .Get( "/acs/credentials/list_accessible_entrances", requestOptions ) @@ -1169,7 +1169,7 @@ ListAccessibleEntrancesRequest request var requestOptions = new RequestOptions(); requestOptions.Data = request; return ( - await _seam.PostAsync( + await _seam.GetAsync( "/acs/credentials/list_accessible_entrances", requestOptions ) diff --git a/output/csharp/src/Seam/Api/Customers.cs b/output/csharp/src/Seam/Api/Customers.cs index d4bbb2ea..755dfd09 100644 --- a/output/csharp/src/Seam/Api/Customers.cs +++ b/output/csharp/src/Seam/Api/Customers.cs @@ -31,23 +31,27 @@ public CreatePortalRequest( List? customerResourcesFilters = default, string? customizationProfileId = default, + CreatePortalRequestDeepLink? deepLink = default, bool? excludeLocalePicker = default, CreatePortalRequestFeatures? features = default, bool? isEmbedded = default, CreatePortalRequestLandingPage? landingPage = default, CreatePortalRequest.LocaleEnum? locale = default, CreatePortalRequest.NavigationModeEnum? navigationMode = default, + bool? readOnly = default, CreatePortalRequestCustomerData? customerData = default ) { CustomerResourcesFilters = customerResourcesFilters; CustomizationProfileId = customizationProfileId; + DeepLink = deepLink; ExcludeLocalePicker = excludeLocalePicker; Features = features; IsEmbedded = isEmbedded; LandingPage = landingPage; Locale = locale; NavigationMode = navigationMode; + ReadOnly = readOnly; CustomerData = customerData; } @@ -127,6 +131,12 @@ public enum NavigationModeEnum )] public string? CustomizationProfileId { get; set; } + /// + /// Deep link target resource for initial redirect. When set, the portal will navigate directly to the specified resource. + /// + [DataMember(Name = "deep_link", IsRequired = false, EmitDefaultValue = false)] + public CreatePortalRequestDeepLink? DeepLink { get; set; } + /// /// Whether to exclude the option to select a locale within the portal UI. /// @@ -164,6 +174,12 @@ public enum NavigationModeEnum [DataMember(Name = "navigation_mode", IsRequired = false, EmitDefaultValue = false)] public CreatePortalRequest.NavigationModeEnum? NavigationMode { get; set; } + /// + /// Whether the portal is read-only. When true, the customer can browse the portal but cannot perform any mutating action; write requests made with the portal's client session are rejected. + /// + [DataMember(Name = "read_only", IsRequired = false, EmitDefaultValue = false)] + public bool? ReadOnly { get; set; } + [DataMember(Name = "customer_data", IsRequired = false, EmitDefaultValue = false)] public CreatePortalRequestCustomerData? CustomerData { get; set; } @@ -196,7 +212,7 @@ protected CreatePortalRequestCustomerResourcesFilters() { } public CreatePortalRequestCustomerResourcesFilters( string? field = default, CreatePortalRequestCustomerResourcesFilters.OperationEnum? operation = default, - CreatePortalRequestCustomerResourcesFiltersValue? value = default + string? value = default ) { Field = field; @@ -233,7 +249,7 @@ public enum OperationEnum /// The value to compare against. /// [DataMember(Name = "value", IsRequired = false, EmitDefaultValue = false)] - public CreatePortalRequestCustomerResourcesFiltersValue? Value { get; set; } + public string? Value { get; set; } public override string ToString() { @@ -255,11 +271,47 @@ public override string ToString() } } - [DataContract(Name = "createPortalRequestCustomerResourcesFiltersValue_model")] - public class CreatePortalRequestCustomerResourcesFiltersValue + [DataContract(Name = "createPortalRequestDeepLink_model")] + public class CreatePortalRequestDeepLink { [JsonConstructorAttribute] - public CreatePortalRequestCustomerResourcesFiltersValue() { } + protected CreatePortalRequestDeepLink() { } + + public CreatePortalRequestDeepLink( + string? resourceKey = default, + CreatePortalRequestDeepLink.ResourceTypeEnum? resourceType = default, + string? resourceId = default + ) + { + ResourceKey = resourceKey; + ResourceType = resourceType; + ResourceId = resourceId; + } + + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum ResourceTypeEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "reservation")] + Reservation = 1, + + [EnumMember(Value = "space")] + Space = 2, + + [EnumMember(Value = "device")] + Device = 3, + } + + [DataMember(Name = "resource_key", IsRequired = false, EmitDefaultValue = false)] + public string? ResourceKey { get; set; } + + [DataMember(Name = "resource_type", IsRequired = false, EmitDefaultValue = false)] + public CreatePortalRequestDeepLink.ResourceTypeEnum? ResourceType { get; set; } + + [DataMember(Name = "resource_id", IsRequired = false, EmitDefaultValue = false)] + public string? ResourceId { get; set; } public override string ToString() { @@ -1770,7 +1822,7 @@ public CreatePortalRequestCustomerDataPropertyListings( } /// - /// Set key:value pairs. Accepts string or Boolean values. Adding custom metadata to a property listing enables you to store custom information, like customer details or internal IDs from your application. + /// Set key:value pairs. Accepts string or Boolean values. Adding custom metadata to a property listing enables you to store custom information, like customer details or internal IDs from your application. Set a key to `null` or to an empty string to remove that key from the custom metadata. /// [DataMember(Name = "custom_metadata", IsRequired = false, EmitDefaultValue = false)] public object? CustomMetadata { get; set; } @@ -1873,7 +1925,7 @@ public CreatePortalRequestCustomerDataReservations( public List? CommonAreaKeys { get; set; } /// - /// Set key:value pairs for filtering reservations by custom criteria. + /// Set key:value pairs for filtering reservations by custom criteria. Set a key to `null` or to an empty string to remove that key from the custom metadata. /// [DataMember(Name = "custom_metadata", IsRequired = false, EmitDefaultValue = false)] public object? CustomMetadata { get; set; } @@ -2803,12 +2855,14 @@ public CustomerPortal CreatePortal(CreatePortalRequest request) public CustomerPortal CreatePortal( List? customerResourcesFilters = default, string? customizationProfileId = default, + CreatePortalRequestDeepLink? deepLink = default, bool? excludeLocalePicker = default, CreatePortalRequestFeatures? features = default, bool? isEmbedded = default, CreatePortalRequestLandingPage? landingPage = default, CreatePortalRequest.LocaleEnum? locale = default, CreatePortalRequest.NavigationModeEnum? navigationMode = default, + bool? readOnly = default, CreatePortalRequestCustomerData? customerData = default ) { @@ -2816,12 +2870,14 @@ public CustomerPortal CreatePortal( new CreatePortalRequest( customerResourcesFilters: customerResourcesFilters, customizationProfileId: customizationProfileId, + deepLink: deepLink, excludeLocalePicker: excludeLocalePicker, features: features, isEmbedded: isEmbedded, landingPage: landingPage, locale: locale, navigationMode: navigationMode, + readOnly: readOnly, customerData: customerData ) ); @@ -2850,12 +2906,14 @@ await _seam.PostAsync( public async Task CreatePortalAsync( List? customerResourcesFilters = default, string? customizationProfileId = default, + CreatePortalRequestDeepLink? deepLink = default, bool? excludeLocalePicker = default, CreatePortalRequestFeatures? features = default, bool? isEmbedded = default, CreatePortalRequestLandingPage? landingPage = default, CreatePortalRequest.LocaleEnum? locale = default, CreatePortalRequest.NavigationModeEnum? navigationMode = default, + bool? readOnly = default, CreatePortalRequestCustomerData? customerData = default ) { @@ -2864,12 +2922,14 @@ await CreatePortalAsync( new CreatePortalRequest( customerResourcesFilters: customerResourcesFilters, customizationProfileId: customizationProfileId, + deepLink: deepLink, excludeLocalePicker: excludeLocalePicker, features: features, isEmbedded: isEmbedded, landingPage: landingPage, locale: locale, navigationMode: navigationMode, + readOnly: readOnly, customerData: customerData ) ) @@ -3074,7 +3134,7 @@ public void DeleteData(DeleteDataRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; - _seam.Post("/customers/delete_data", requestOptions); + _seam.Delete("/customers/delete_data", requestOptions); } /// @@ -3136,7 +3196,7 @@ public async Task DeleteDataAsync(DeleteDataRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; - await _seam.PostAsync("/customers/delete_data", requestOptions); + await _seam.DeleteAsync("/customers/delete_data", requestOptions); } /// @@ -4046,7 +4106,7 @@ public PushDataRequestPropertyListings( } /// - /// Set key:value pairs. Accepts string or Boolean values. Adding custom metadata to a property listing enables you to store custom information, like customer details or internal IDs from your application. + /// Set key:value pairs. Accepts string or Boolean values. Adding custom metadata to a property listing enables you to store custom information, like customer details or internal IDs from your application. Set a key to `null` or to an empty string to remove that key from the custom metadata. /// [DataMember(Name = "custom_metadata", IsRequired = false, EmitDefaultValue = false)] public object? CustomMetadata { get; set; } @@ -4149,7 +4209,7 @@ public PushDataRequestReservations( public List? CommonAreaKeys { get; set; } /// - /// Set key:value pairs for filtering reservations by custom criteria. + /// Set key:value pairs for filtering reservations by custom criteria. Set a key to `null` or to an empty string to remove that key from the custom metadata. /// [DataMember(Name = "custom_metadata", IsRequired = false, EmitDefaultValue = false)] public object? CustomMetadata { get; set; } diff --git a/output/csharp/src/Seam/Api/DailyProgramsThermostats.cs b/output/csharp/src/Seam/Api/DailyProgramsThermostats.cs index a9fc2946..a1752068 100644 --- a/output/csharp/src/Seam/Api/DailyProgramsThermostats.cs +++ b/output/csharp/src/Seam/Api/DailyProgramsThermostats.cs @@ -273,7 +273,7 @@ public void Delete(DeleteRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; - _seam.Post("/thermostats/daily_programs/delete", requestOptions); + _seam.Delete("/thermostats/daily_programs/delete", requestOptions); } /// @@ -291,7 +291,7 @@ public async Task DeleteAsync(DeleteRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; - await _seam.PostAsync("/thermostats/daily_programs/delete", requestOptions); + await _seam.DeleteAsync("/thermostats/daily_programs/delete", requestOptions); } /// diff --git a/output/csharp/src/Seam/Api/Devices.cs b/output/csharp/src/Seam/Api/Devices.cs index 65fb35c9..777ce42a 100644 --- a/output/csharp/src/Seam/Api/Devices.cs +++ b/output/csharp/src/Seam/Api/Devices.cs @@ -112,7 +112,7 @@ public Device Get(GetRequest request) var requestOptions = new RequestOptions(); requestOptions.Data = request; return _seam - .Post("/devices/get", requestOptions) + .Get("/devices/get", requestOptions) .EnsureData("/devices/get") .Device; } @@ -136,7 +136,7 @@ public async Task GetAsync(GetRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; - return (await _seam.PostAsync("/devices/get", requestOptions)) + return (await _seam.GetAsync("/devices/get", requestOptions)) .EnsureData("/devices/get") .Device; } @@ -284,50 +284,56 @@ public enum DeviceTypeEnum [EnumMember(Value = "ultraloq_lock")] UltraloqLock = 26, + [EnumMember(Value = "yacan_lock")] + YacanLock = 27, + [EnumMember(Value = "keyincode_lock")] - KeyincodeLock = 27, + KeyincodeLock = 28, [EnumMember(Value = "omnitec_lock")] - OmnitecLock = 28, + OmnitecLock = 29, [EnumMember(Value = "kisi_lock")] - KisiLock = 29, + KisiLock = 30, + + [EnumMember(Value = "aqara_lock")] + AqaraLock = 31, [EnumMember(Value = "keynest_key")] - KeynestKey = 30, + KeynestKey = 32, [EnumMember(Value = "noiseaware_activity_zone")] - NoiseawareActivityZone = 31, + NoiseawareActivityZone = 33, [EnumMember(Value = "minut_sensor")] - MinutSensor = 32, + MinutSensor = 34, [EnumMember(Value = "ecobee_thermostat")] - EcobeeThermostat = 33, + EcobeeThermostat = 35, [EnumMember(Value = "nest_thermostat")] - NestThermostat = 34, + NestThermostat = 36, [EnumMember(Value = "honeywell_resideo_thermostat")] - HoneywellResideoThermostat = 35, + HoneywellResideoThermostat = 37, [EnumMember(Value = "tado_thermostat")] - TadoThermostat = 36, + TadoThermostat = 38, [EnumMember(Value = "sensi_thermostat")] - SensiThermostat = 37, + SensiThermostat = 39, [EnumMember(Value = "smartthings_thermostat")] - SmartthingsThermostat = 38, + SmartthingsThermostat = 40, [EnumMember(Value = "ios_phone")] - IosPhone = 39, + IosPhone = 41, [EnumMember(Value = "android_phone")] - AndroidPhone = 40, + AndroidPhone = 42, [EnumMember(Value = "ring_camera")] - RingCamera = 41, + RingCamera = 43, } /// @@ -417,50 +423,56 @@ public enum DeviceTypesEnum [EnumMember(Value = "ultraloq_lock")] UltraloqLock = 26, + [EnumMember(Value = "yacan_lock")] + YacanLock = 27, + [EnumMember(Value = "keyincode_lock")] - KeyincodeLock = 27, + KeyincodeLock = 28, [EnumMember(Value = "omnitec_lock")] - OmnitecLock = 28, + OmnitecLock = 29, [EnumMember(Value = "kisi_lock")] - KisiLock = 29, + KisiLock = 30, + + [EnumMember(Value = "aqara_lock")] + AqaraLock = 31, [EnumMember(Value = "keynest_key")] - KeynestKey = 30, + KeynestKey = 32, [EnumMember(Value = "noiseaware_activity_zone")] - NoiseawareActivityZone = 31, + NoiseawareActivityZone = 33, [EnumMember(Value = "minut_sensor")] - MinutSensor = 32, + MinutSensor = 34, [EnumMember(Value = "ecobee_thermostat")] - EcobeeThermostat = 33, + EcobeeThermostat = 35, [EnumMember(Value = "nest_thermostat")] - NestThermostat = 34, + NestThermostat = 36, [EnumMember(Value = "honeywell_resideo_thermostat")] - HoneywellResideoThermostat = 35, + HoneywellResideoThermostat = 37, [EnumMember(Value = "tado_thermostat")] - TadoThermostat = 36, + TadoThermostat = 38, [EnumMember(Value = "sensi_thermostat")] - SensiThermostat = 37, + SensiThermostat = 39, [EnumMember(Value = "smartthings_thermostat")] - SmartthingsThermostat = 38, + SmartthingsThermostat = 40, [EnumMember(Value = "ios_phone")] - IosPhone = 39, + IosPhone = 41, [EnumMember(Value = "android_phone")] - AndroidPhone = 40, + AndroidPhone = 42, [EnumMember(Value = "ring_camera")] - RingCamera = 41, + RingCamera = 43, } /// @@ -562,65 +574,71 @@ public enum ManufacturerEnum [EnumMember(Value = "akiles")] Akiles = 30, + [EnumMember(Value = "aqara")] + Aqara = 31, + [EnumMember(Value = "ecobee")] - Ecobee = 31, + Ecobee = 32, [EnumMember(Value = "honeywell_resideo")] - HoneywellResideo = 32, + HoneywellResideo = 33, [EnumMember(Value = "keynest")] - Keynest = 33, + Keynest = 34, [EnumMember(Value = "korelock")] - Korelock = 34, + Korelock = 35, [EnumMember(Value = "minut")] - Minut = 35, + Minut = 36, [EnumMember(Value = "nest")] - Nest = 36, + Nest = 37, [EnumMember(Value = "noiseaware")] - Noiseaware = 37, + Noiseaware = 38, [EnumMember(Value = "sensi")] - Sensi = 38, + Sensi = 39, [EnumMember(Value = "smartthings")] - Smartthings = 39, + Smartthings = 40, [EnumMember(Value = "tado")] - Tado = 40, + Tado = 41, [EnumMember(Value = "ultraloq")] - Ultraloq = 41, + Ultraloq = 42, [EnumMember(Value = "ring")] - Ring = 42, + Ring = 43, [EnumMember(Value = "ical")] - Ical = 43, + Ical = 44, [EnumMember(Value = "lodgify")] - Lodgify = 44, + Lodgify = 45, [EnumMember(Value = "hostaway")] - Hostaway = 45, + Hostaway = 46, [EnumMember(Value = "guesty")] - Guesty = 46, + Guesty = 47, [EnumMember(Value = "acuity_scheduling")] - AcuityScheduling = 47, + AcuityScheduling = 48, [EnumMember(Value = "omnitec")] - Omnitec = 48, + Omnitec = 49, [EnumMember(Value = "kisi")] - Kisi = 49, + Kisi = 50, [EnumMember(Value = "slack")] - Slack = 50, + Slack = 51, + + [EnumMember(Value = "yacan")] + Yacan = 52, } /// @@ -656,7 +674,7 @@ public enum ManufacturerEnum public string? CreatedBefore { get; set; } /// - /// Set of key:value [custom metadata](https://docs.seam.co/core-concepts/devices/adding-custom-metadata-to-a-device) pairs for which you want to list devices. + /// Set of key:value [custom metadata](https://docs.seam.co/core-concepts/devices/adding-custom-metadata-to-a-device) pairs for which you want to list devices. Key names cannot contain a period (.). Specify `null` to match a key that is unset. A key given an empty string is omitted from the filter. /// [DataMember(Name = "custom_metadata_has", IsRequired = false, EmitDefaultValue = false)] public object? CustomMetadataHas { get; set; } @@ -794,7 +812,7 @@ public List List(ListRequest request) var requestOptions = new RequestOptions(); requestOptions.Data = request; return _seam - .Post("/devices/list", requestOptions) + .Get("/devices/list", requestOptions) .EnsureData("/devices/list") .Devices; } @@ -850,7 +868,7 @@ public async Task> ListAsync(ListRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; - return (await _seam.PostAsync("/devices/list", requestOptions)) + return (await _seam.GetAsync("/devices/list", requestOptions)) .EnsureData("/devices/list") .Devices; } @@ -1026,7 +1044,7 @@ public List ListDeviceProviders(ListDeviceProvidersRequest reque var requestOptions = new RequestOptions(); requestOptions.Data = request; return _seam - .Post("/devices/list_device_providers", requestOptions) + .Get("/devices/list_device_providers", requestOptions) .EnsureData("/devices/list_device_providers") .DeviceProviders; } @@ -1061,7 +1079,7 @@ ListDeviceProvidersRequest request var requestOptions = new RequestOptions(); requestOptions.Data = request; return ( - await _seam.PostAsync( + await _seam.GetAsync( "/devices/list_device_providers", requestOptions ) @@ -5279,7 +5297,7 @@ public UpdateRequest( public bool? BackupAccessCodePoolEnabled { get; set; } /// - /// Custom metadata that you want to associate with the device. Supports up to 50 JSON key:value pairs. [Adding custom metadata to a device](https://docs.seam.co/core-concepts/devices/adding-custom-metadata-to-a-device) enables you to store custom information, like customer details or internal IDs from your application. Then, you can [filter devices by the desired metadata](https://docs.seam.co/core-concepts/devices/filtering-devices-by-custom-metadata). + /// Custom metadata that you want to associate with the device. Supports up to 50 JSON key:value pairs, with key names up to 40 characters long that cannot contain a period (.). [Adding custom metadata to a device](https://docs.seam.co/core-concepts/devices/adding-custom-metadata-to-a-device) enables you to store custom information, like customer details or internal IDs from your application. Then, you can [filter devices by the desired metadata](https://docs.seam.co/core-concepts/devices/filtering-devices-by-custom-metadata). Set a key to `null` or to an empty string to remove that key from the custom metadata. /// [DataMember(Name = "custom_metadata", IsRequired = false, EmitDefaultValue = false)] public object? CustomMetadata { get; set; } diff --git a/output/csharp/src/Seam/Api/EncodersAcs.cs b/output/csharp/src/Seam/Api/EncodersAcs.cs index 73a71e08..59bfb74f 100644 --- a/output/csharp/src/Seam/Api/EncodersAcs.cs +++ b/output/csharp/src/Seam/Api/EncodersAcs.cs @@ -266,7 +266,7 @@ public AcsEncoder Get(GetRequest request) var requestOptions = new RequestOptions(); requestOptions.Data = request; return _seam - .Post("/acs/encoders/get", requestOptions) + .Get("/acs/encoders/get", requestOptions) .EnsureData("/acs/encoders/get") .AcsEncoder; } @@ -286,7 +286,7 @@ public async Task GetAsync(GetRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; - return (await _seam.PostAsync("/acs/encoders/get", requestOptions)) + return (await _seam.GetAsync("/acs/encoders/get", requestOptions)) .EnsureData("/acs/encoders/get") .AcsEncoder; } @@ -309,20 +309,26 @@ public class ListRequest protected ListRequest() { } public ListRequest( + List? acsEncoderIds = default, string? acsSystemId = default, List? acsSystemIds = default, - List? acsEncoderIds = default, float? limit = default, string? pageCursor = default ) { + AcsEncoderIds = acsEncoderIds; AcsSystemId = acsSystemId; AcsSystemIds = acsSystemIds; - AcsEncoderIds = acsEncoderIds; Limit = limit; PageCursor = pageCursor; } + /// + /// IDs of the encoders that you want to retrieve. + /// + [DataMember(Name = "acs_encoder_ids", IsRequired = false, EmitDefaultValue = false)] + public List? AcsEncoderIds { get; set; } + /// /// ID of the access system for which you want to retrieve all encoders. /// @@ -335,12 +341,6 @@ public ListRequest( [DataMember(Name = "acs_system_ids", IsRequired = false, EmitDefaultValue = false)] public List? AcsSystemIds { get; set; } - /// - /// IDs of the encoders that you want to retrieve. - /// - [DataMember(Name = "acs_encoder_ids", IsRequired = false, EmitDefaultValue = false)] - public List? AcsEncoderIds { get; set; } - /// /// Number of encoders to return. /// @@ -427,18 +427,18 @@ public List List(ListRequest request) /// Returns a list of all [encoders](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners). /// public List List( + List? acsEncoderIds = default, string? acsSystemId = default, List? acsSystemIds = default, - List? acsEncoderIds = default, float? limit = default, string? pageCursor = default ) { return List( new ListRequest( + acsEncoderIds: acsEncoderIds, acsSystemId: acsSystemId, acsSystemIds: acsSystemIds, - acsEncoderIds: acsEncoderIds, limit: limit, pageCursor: pageCursor ) @@ -461,9 +461,9 @@ public async Task> ListAsync(ListRequest request) /// Returns a list of all [encoders](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners). /// public async Task> ListAsync( + List? acsEncoderIds = default, string? acsSystemId = default, List? acsSystemIds = default, - List? acsEncoderIds = default, float? limit = default, string? pageCursor = default ) @@ -471,9 +471,9 @@ public async Task> ListAsync( return ( await ListAsync( new ListRequest( + acsEncoderIds: acsEncoderIds, acsSystemId: acsSystemId, acsSystemIds: acsSystemIds, - acsEncoderIds: acsEncoderIds, limit: limit, pageCursor: pageCursor ) diff --git a/output/csharp/src/Seam/Api/EntrancesAcs.cs b/output/csharp/src/Seam/Api/EntrancesAcs.cs index 4ac086e6..1f9bac64 100644 --- a/output/csharp/src/Seam/Api/EntrancesAcs.cs +++ b/output/csharp/src/Seam/Api/EntrancesAcs.cs @@ -103,7 +103,7 @@ public AcsEntrance Get(GetRequest request) var requestOptions = new RequestOptions(); requestOptions.Data = request; return _seam - .Post("/acs/entrances/get", requestOptions) + .Get("/acs/entrances/get", requestOptions) .EnsureData("/acs/entrances/get") .AcsEntrance; } @@ -123,7 +123,7 @@ public async Task GetAsync(GetRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; - return (await _seam.PostAsync("/acs/entrances/get", requestOptions)) + return (await _seam.GetAsync("/acs/entrances/get", requestOptions)) .EnsureData("/acs/entrances/get") .AcsEntrance; } @@ -260,6 +260,7 @@ public class ListRequest protected ListRequest() { } public ListRequest( + string? accessMethodId = default, string? acsCredentialId = default, List? acsEntranceIds = default, string? acsSystemId = default, @@ -272,6 +273,7 @@ public ListRequest( string? spaceId = default ) { + AccessMethodId = accessMethodId; AcsCredentialId = acsCredentialId; AcsEntranceIds = acsEntranceIds; AcsSystemId = acsSystemId; @@ -284,6 +286,12 @@ public ListRequest( SpaceId = spaceId; } + /// + /// ID of the access method for which you want to retrieve all entrances to which it grants access. + /// + [DataMember(Name = "access_method_id", IsRequired = false, EmitDefaultValue = false)] + public string? AccessMethodId { get; set; } + /// /// ID of the credential for which you want to retrieve all entrances. /// @@ -411,7 +419,7 @@ public List List(ListRequest request) var requestOptions = new RequestOptions(); requestOptions.Data = request; return _seam - .Post("/acs/entrances/list", requestOptions) + .Get("/acs/entrances/list", requestOptions) .EnsureData("/acs/entrances/list") .AcsEntrances; } @@ -420,6 +428,7 @@ public List List(ListRequest request) /// Returns a list of all [access system entrances](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details). /// public List List( + string? accessMethodId = default, string? acsCredentialId = default, List? acsEntranceIds = default, string? acsSystemId = default, @@ -434,6 +443,7 @@ public List List( { return List( new ListRequest( + accessMethodId: accessMethodId, acsCredentialId: acsCredentialId, acsEntranceIds: acsEntranceIds, acsSystemId: acsSystemId, @@ -455,7 +465,7 @@ public async Task> ListAsync(ListRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; - return (await _seam.PostAsync("/acs/entrances/list", requestOptions)) + return (await _seam.GetAsync("/acs/entrances/list", requestOptions)) .EnsureData("/acs/entrances/list") .AcsEntrances; } @@ -464,6 +474,7 @@ public async Task> ListAsync(ListRequest request) /// Returns a list of all [access system entrances](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details). /// public async Task> ListAsync( + string? accessMethodId = default, string? acsCredentialId = default, List? acsEntranceIds = default, string? acsSystemId = default, @@ -479,6 +490,7 @@ public async Task> ListAsync( return ( await ListAsync( new ListRequest( + accessMethodId: accessMethodId, acsCredentialId: acsCredentialId, acsEntranceIds: acsEntranceIds, acsSystemId: acsSystemId, @@ -604,7 +616,7 @@ ListCredentialsWithAccessRequest request var requestOptions = new RequestOptions(); requestOptions.Data = request; return _seam - .Post( + .Get( "/acs/entrances/list_credentials_with_access", requestOptions ) @@ -638,7 +650,7 @@ ListCredentialsWithAccessRequest request var requestOptions = new RequestOptions(); requestOptions.Data = request; return ( - await _seam.PostAsync( + await _seam.GetAsync( "/acs/entrances/list_credentials_with_access", requestOptions ) diff --git a/output/csharp/src/Seam/Api/Events.cs b/output/csharp/src/Seam/Api/Events.cs index d5c6f515..62333ff9 100644 --- a/output/csharp/src/Seam/Api/Events.cs +++ b/output/csharp/src/Seam/Api/Events.cs @@ -121,7 +121,7 @@ public Event Get(GetRequest request) var requestOptions = new RequestOptions(); requestOptions.Data = request; return _seam - .Post("/events/get", requestOptions) + .Get("/events/get", requestOptions) .EnsureData("/events/get") .Event; } @@ -145,7 +145,7 @@ public async Task GetAsync(GetRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; - return (await _seam.PostAsync("/events/get", requestOptions)) + return (await _seam.GetAsync("/events/get", requestOptions)) .EnsureData("/events/get") .Event; } @@ -189,7 +189,7 @@ public ListRequest( string? acsSystemId = default, List? acsSystemIds = default, string? acsUserId = default, - List? between = default, + List? between = default, string? connectWebviewId = default, string? connectedAccountId = default, string? customerKey = default, @@ -992,7 +992,7 @@ public enum EventTypesEnum /// Lower and upper timestamps to define an exclusive interval containing the events that you want to list. You must include `since` or `between`. /// [DataMember(Name = "between", IsRequired = false, EmitDefaultValue = false)] - public List? Between { get; set; } + public List? Between { get; set; } /// /// ID of the Connect Webview for which you want to list events. @@ -1102,32 +1102,6 @@ public override string ToString() } } - [DataContract(Name = "listRequestBetween_model")] - public class ListRequestBetween - { - [JsonConstructorAttribute] - public ListRequestBetween() { } - - 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 = "listResponse_response")] public class ListResponse { @@ -1173,7 +1147,7 @@ public List List(ListRequest request) var requestOptions = new RequestOptions(); requestOptions.Data = request; return _seam - .Post("/events/list", requestOptions) + .Get("/events/list", requestOptions) .EnsureData("/events/list") .Events; } @@ -1195,7 +1169,7 @@ public List List( string? acsSystemId = default, List? acsSystemIds = default, string? acsUserId = default, - List? between = default, + List? between = default, string? connectWebviewId = default, string? connectedAccountId = default, string? customerKey = default, @@ -1253,7 +1227,7 @@ public async Task> ListAsync(ListRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; - return (await _seam.PostAsync("/events/list", requestOptions)) + return (await _seam.GetAsync("/events/list", requestOptions)) .EnsureData("/events/list") .Events; } @@ -1275,7 +1249,7 @@ public async Task> ListAsync( string? acsSystemId = default, List? acsSystemIds = default, string? acsUserId = default, - List? between = default, + List? between = default, string? connectWebviewId = default, string? connectedAccountId = default, string? customerKey = default, diff --git a/output/csharp/src/Seam/Api/InstantKeys.cs b/output/csharp/src/Seam/Api/InstantKeys.cs index 8000208d..c64a564e 100644 --- a/output/csharp/src/Seam/Api/InstantKeys.cs +++ b/output/csharp/src/Seam/Api/InstantKeys.cs @@ -65,7 +65,7 @@ public void Delete(DeleteRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; - _seam.Post("/instant_keys/delete", requestOptions); + _seam.Delete("/instant_keys/delete", requestOptions); } /// @@ -83,7 +83,7 @@ public async Task DeleteAsync(DeleteRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; - await _seam.PostAsync("/instant_keys/delete", requestOptions); + await _seam.DeleteAsync("/instant_keys/delete", requestOptions); } /// @@ -186,7 +186,7 @@ public InstantKey Get(GetRequest request) var requestOptions = new RequestOptions(); requestOptions.Data = request; return _seam - .Post("/instant_keys/get", requestOptions) + .Get("/instant_keys/get", requestOptions) .EnsureData("/instant_keys/get") .InstantKey; } @@ -206,7 +206,7 @@ public async Task GetAsync(GetRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; - return (await _seam.PostAsync("/instant_keys/get", requestOptions)) + return (await _seam.GetAsync("/instant_keys/get", requestOptions)) .EnsureData("/instant_keys/get") .InstantKey; } @@ -311,7 +311,7 @@ public List List(ListRequest request) var requestOptions = new RequestOptions(); requestOptions.Data = request; return _seam - .Post("/instant_keys/list", requestOptions) + .Get("/instant_keys/list", requestOptions) .EnsureData("/instant_keys/list") .InstantKeys; } @@ -331,7 +331,7 @@ public async Task> ListAsync(ListRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; - return (await _seam.PostAsync("/instant_keys/list", requestOptions)) + return (await _seam.GetAsync("/instant_keys/list", requestOptions)) .EnsureData("/instant_keys/list") .InstantKeys; } diff --git a/output/csharp/src/Seam/Api/Locks.cs b/output/csharp/src/Seam/Api/Locks.cs index c4f33e8c..0b701d67 100644 --- a/output/csharp/src/Seam/Api/Locks.cs +++ b/output/csharp/src/Seam/Api/Locks.cs @@ -279,7 +279,7 @@ public Device Get(GetRequest request) var requestOptions = new RequestOptions(); requestOptions.Data = request; return _seam - .Post("/locks/get", requestOptions) + .Get("/locks/get", requestOptions) .EnsureData("/locks/get") .Device; } @@ -301,7 +301,7 @@ public async Task GetAsync(GetRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; - return (await _seam.PostAsync("/locks/get", requestOptions)) + return (await _seam.GetAsync("/locks/get", requestOptions)) .EnsureData("/locks/get") .Device; } @@ -327,38 +327,18 @@ protected ListRequest() { } public ListRequest( string? connectWebviewId = default, string? connectedAccountId = default, - List? connectedAccountIds = default, - string? createdBefore = default, - object? customMetadataHas = default, string? customerKey = default, - List? deviceIds = default, ListRequest.DeviceTypeEnum? deviceType = default, List? deviceTypes = default, - float? limit = default, - ListRequest.ManufacturerEnum? manufacturer = default, - string? pageCursor = default, - string? search = default, - string? spaceId = default, - string? unstableLocationId = default, - string? userIdentifierKey = default + ListRequest.ManufacturerEnum? manufacturer = default ) { ConnectWebviewId = connectWebviewId; ConnectedAccountId = connectedAccountId; - ConnectedAccountIds = connectedAccountIds; - CreatedBefore = createdBefore; - CustomMetadataHas = customMetadataHas; CustomerKey = customerKey; - DeviceIds = deviceIds; DeviceType = deviceType; DeviceTypes = deviceTypes; - Limit = limit; Manufacturer = manufacturer; - PageCursor = pageCursor; - Search = search; - SpaceId = spaceId; - UnstableLocationId = unstableLocationId; - UserIdentifierKey = userIdentifierKey; } /// @@ -448,14 +428,20 @@ public enum DeviceTypeEnum [EnumMember(Value = "ultraloq_lock")] UltraloqLock = 26, + [EnumMember(Value = "yacan_lock")] + YacanLock = 27, + [EnumMember(Value = "keyincode_lock")] - KeyincodeLock = 27, + KeyincodeLock = 28, [EnumMember(Value = "omnitec_lock")] - OmnitecLock = 28, + OmnitecLock = 29, [EnumMember(Value = "kisi_lock")] - KisiLock = 29, + KisiLock = 30, + + [EnumMember(Value = "aqara_lock")] + AqaraLock = 31, } /// @@ -545,14 +531,20 @@ public enum DeviceTypesEnum [EnumMember(Value = "ultraloq_lock")] UltraloqLock = 26, + [EnumMember(Value = "yacan_lock")] + YacanLock = 27, + [EnumMember(Value = "keyincode_lock")] - KeyincodeLock = 27, + KeyincodeLock = 28, [EnumMember(Value = "omnitec_lock")] - OmnitecLock = 28, + OmnitecLock = 29, [EnumMember(Value = "kisi_lock")] - KisiLock = 29, + KisiLock = 30, + + [EnumMember(Value = "aqara_lock")] + AqaraLock = 31, } /// @@ -642,20 +634,26 @@ public enum ManufacturerEnum [EnumMember(Value = "akiles")] Akiles = 26, + [EnumMember(Value = "aqara")] + Aqara = 27, + [EnumMember(Value = "korelock")] - Korelock = 27, + Korelock = 28, [EnumMember(Value = "smartthings")] - Smartthings = 28, + Smartthings = 29, [EnumMember(Value = "ultraloq")] - Ultraloq = 29, + Ultraloq = 30, [EnumMember(Value = "omnitec")] - Omnitec = 30, + Omnitec = 31, [EnumMember(Value = "kisi")] - Kisi = 31, + Kisi = 32, + + [EnumMember(Value = "yacan")] + Yacan = 33, } /// @@ -674,40 +672,12 @@ public enum ManufacturerEnum )] public string? ConnectedAccountId { get; set; } - /// - /// Array of IDs of the connected accounts for which you want to list devices. - /// - [DataMember( - Name = "connected_account_ids", - IsRequired = false, - EmitDefaultValue = false - )] - public List? ConnectedAccountIds { get; set; } - - /// - /// Timestamp by which to limit returned devices. Returns devices created before this timestamp. - /// - [DataMember(Name = "created_before", IsRequired = false, EmitDefaultValue = false)] - public string? CreatedBefore { get; set; } - - /// - /// Set of key:value [custom metadata](https://docs.seam.co/core-concepts/devices/adding-custom-metadata-to-a-device) pairs for which you want to list devices. - /// - [DataMember(Name = "custom_metadata_has", IsRequired = false, EmitDefaultValue = false)] - public object? CustomMetadataHas { get; set; } - /// /// Customer key for which you want to list devices. /// [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] public string? CustomerKey { get; set; } - /// - /// Array of device IDs for which you want to list devices. - /// - [DataMember(Name = "device_ids", IsRequired = false, EmitDefaultValue = false)] - public List? DeviceIds { get; set; } - /// /// Device type of the locks that you want to list. /// @@ -720,50 +690,12 @@ public enum ManufacturerEnum [DataMember(Name = "device_types", IsRequired = false, EmitDefaultValue = false)] public List? DeviceTypes { get; set; } - /// - /// Numerical limit on the number of devices to return. - /// - [DataMember(Name = "limit", IsRequired = false, EmitDefaultValue = false)] - public float? Limit { get; set; } - /// /// Manufacturer of the locks that you want to list. /// [DataMember(Name = "manufacturer", IsRequired = false, EmitDefaultValue = false)] public ListRequest.ManufacturerEnum? Manufacturer { get; set; } - /// - /// Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`. - /// - [DataMember(Name = "page_cursor", IsRequired = false, EmitDefaultValue = false)] - public string? PageCursor { get; set; } - - /// - /// String for which to search. Filters returned devices to include all records that satisfy a partial match using `device_id` (full or partial UUID prefix, minimum 4 characters), `connected_account_id`, `display_name`, `custom_metadata` or `location.location_name`. - /// - [DataMember(Name = "search", IsRequired = false, EmitDefaultValue = false)] - public string? Search { get; set; } - - /// - /// ID of the space for which you want to list devices. - /// - [DataMember(Name = "space_id", IsRequired = false, EmitDefaultValue = false)] - public string? SpaceId { get; set; } - - [Obsolete("Use `space_id`.")] - [DataMember( - Name = "unstable_location_id", - IsRequired = false, - EmitDefaultValue = false - )] - public string? UnstableLocationId { get; set; } - - /// - /// Your own internal user ID for the user for which you want to list devices. - /// - [DataMember(Name = "user_identifier_key", IsRequired = false, EmitDefaultValue = false)] - public string? UserIdentifierKey { get; set; } - public override string ToString() { JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); @@ -829,7 +761,7 @@ public List List(ListRequest request) var requestOptions = new RequestOptions(); requestOptions.Data = request; return _seam - .Post("/locks/list", requestOptions) + .Get("/locks/list", requestOptions) .EnsureData("/locks/list") .Devices; } @@ -840,40 +772,20 @@ public List List(ListRequest request) public List List( string? connectWebviewId = default, string? connectedAccountId = default, - List? connectedAccountIds = default, - string? createdBefore = default, - object? customMetadataHas = default, string? customerKey = default, - List? deviceIds = default, ListRequest.DeviceTypeEnum? deviceType = default, List? deviceTypes = default, - float? limit = default, - ListRequest.ManufacturerEnum? manufacturer = default, - string? pageCursor = default, - string? search = default, - string? spaceId = default, - string? unstableLocationId = default, - string? userIdentifierKey = default + ListRequest.ManufacturerEnum? manufacturer = default ) { return List( new ListRequest( connectWebviewId: connectWebviewId, connectedAccountId: connectedAccountId, - connectedAccountIds: connectedAccountIds, - createdBefore: createdBefore, - customMetadataHas: customMetadataHas, customerKey: customerKey, - deviceIds: deviceIds, deviceType: deviceType, deviceTypes: deviceTypes, - limit: limit, - manufacturer: manufacturer, - pageCursor: pageCursor, - search: search, - spaceId: spaceId, - unstableLocationId: unstableLocationId, - userIdentifierKey: userIdentifierKey + manufacturer: manufacturer ) ); } @@ -885,7 +797,7 @@ public async Task> ListAsync(ListRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; - return (await _seam.PostAsync("/locks/list", requestOptions)) + return (await _seam.GetAsync("/locks/list", requestOptions)) .EnsureData("/locks/list") .Devices; } @@ -896,20 +808,10 @@ public async Task> ListAsync(ListRequest request) public async Task> ListAsync( string? connectWebviewId = default, string? connectedAccountId = default, - List? connectedAccountIds = default, - string? createdBefore = default, - object? customMetadataHas = default, string? customerKey = default, - List? deviceIds = default, ListRequest.DeviceTypeEnum? deviceType = default, List? deviceTypes = default, - float? limit = default, - ListRequest.ManufacturerEnum? manufacturer = default, - string? pageCursor = default, - string? search = default, - string? spaceId = default, - string? unstableLocationId = default, - string? userIdentifierKey = default + ListRequest.ManufacturerEnum? manufacturer = default ) { return ( @@ -917,20 +819,10 @@ await ListAsync( new ListRequest( connectWebviewId: connectWebviewId, connectedAccountId: connectedAccountId, - connectedAccountIds: connectedAccountIds, - createdBefore: createdBefore, - customMetadataHas: customMetadataHas, customerKey: customerKey, - deviceIds: deviceIds, deviceType: deviceType, deviceTypes: deviceTypes, - limit: limit, - manufacturer: manufacturer, - pageCursor: pageCursor, - search: search, - spaceId: spaceId, - unstableLocationId: unstableLocationId, - userIdentifierKey: userIdentifierKey + manufacturer: manufacturer ) ) ); diff --git a/output/csharp/src/Seam/Api/NoiseSensors.cs b/output/csharp/src/Seam/Api/NoiseSensors.cs index 35d9bdb3..ce85bf8e 100644 --- a/output/csharp/src/Seam/Api/NoiseSensors.cs +++ b/output/csharp/src/Seam/Api/NoiseSensors.cs @@ -30,38 +30,18 @@ protected ListRequest() { } public ListRequest( string? connectWebviewId = default, string? connectedAccountId = default, - List? connectedAccountIds = default, - string? createdBefore = default, - object? customMetadataHas = default, string? customerKey = default, - List? deviceIds = default, ListRequest.DeviceTypeEnum? deviceType = default, List? deviceTypes = default, - float? limit = default, - ListRequest.ManufacturerEnum? manufacturer = default, - string? pageCursor = default, - string? search = default, - string? spaceId = default, - string? unstableLocationId = default, - string? userIdentifierKey = default + ListRequest.ManufacturerEnum? manufacturer = default ) { ConnectWebviewId = connectWebviewId; ConnectedAccountId = connectedAccountId; - ConnectedAccountIds = connectedAccountIds; - CreatedBefore = createdBefore; - CustomMetadataHas = customMetadataHas; CustomerKey = customerKey; - DeviceIds = deviceIds; DeviceType = deviceType; DeviceTypes = deviceTypes; - Limit = limit; Manufacturer = manufacturer; - PageCursor = pageCursor; - Search = search; - SpaceId = spaceId; - UnstableLocationId = unstableLocationId; - UserIdentifierKey = userIdentifierKey; } /// @@ -128,40 +108,12 @@ public enum ManufacturerEnum )] public string? ConnectedAccountId { get; set; } - /// - /// Array of IDs of the connected accounts for which you want to list devices. - /// - [DataMember( - Name = "connected_account_ids", - IsRequired = false, - EmitDefaultValue = false - )] - public List? ConnectedAccountIds { get; set; } - - /// - /// Timestamp by which to limit returned devices. Returns devices created before this timestamp. - /// - [DataMember(Name = "created_before", IsRequired = false, EmitDefaultValue = false)] - public string? CreatedBefore { get; set; } - - /// - /// Set of key:value [custom metadata](https://docs.seam.co/core-concepts/devices/adding-custom-metadata-to-a-device) pairs for which you want to list devices. - /// - [DataMember(Name = "custom_metadata_has", IsRequired = false, EmitDefaultValue = false)] - public object? CustomMetadataHas { get; set; } - /// /// Customer key for which you want to list devices. /// [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] public string? CustomerKey { get; set; } - /// - /// Array of device IDs for which you want to list devices. - /// - [DataMember(Name = "device_ids", IsRequired = false, EmitDefaultValue = false)] - public List? DeviceIds { get; set; } - /// /// Device type of the noise sensors that you want to list. /// @@ -174,50 +126,12 @@ public enum ManufacturerEnum [DataMember(Name = "device_types", IsRequired = false, EmitDefaultValue = false)] public List? DeviceTypes { get; set; } - /// - /// Numerical limit on the number of devices to return. - /// - [DataMember(Name = "limit", IsRequired = false, EmitDefaultValue = false)] - public float? Limit { get; set; } - /// /// Manufacturers of the noise sensors that you want to list. /// [DataMember(Name = "manufacturer", IsRequired = false, EmitDefaultValue = false)] public ListRequest.ManufacturerEnum? Manufacturer { get; set; } - /// - /// Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`. - /// - [DataMember(Name = "page_cursor", IsRequired = false, EmitDefaultValue = false)] - public string? PageCursor { get; set; } - - /// - /// String for which to search. Filters returned devices to include all records that satisfy a partial match using `device_id` (full or partial UUID prefix, minimum 4 characters), `connected_account_id`, `display_name`, `custom_metadata` or `location.location_name`. - /// - [DataMember(Name = "search", IsRequired = false, EmitDefaultValue = false)] - public string? Search { get; set; } - - /// - /// ID of the space for which you want to list devices. - /// - [DataMember(Name = "space_id", IsRequired = false, EmitDefaultValue = false)] - public string? SpaceId { get; set; } - - [Obsolete("Use `space_id`.")] - [DataMember( - Name = "unstable_location_id", - IsRequired = false, - EmitDefaultValue = false - )] - public string? UnstableLocationId { get; set; } - - /// - /// Your own internal user ID for the user for which you want to list devices. - /// - [DataMember(Name = "user_identifier_key", IsRequired = false, EmitDefaultValue = false)] - public string? UserIdentifierKey { get; set; } - public override string ToString() { JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); @@ -283,7 +197,7 @@ public List List(ListRequest request) var requestOptions = new RequestOptions(); requestOptions.Data = request; return _seam - .Post("/noise_sensors/list", requestOptions) + .Get("/noise_sensors/list", requestOptions) .EnsureData("/noise_sensors/list") .Devices; } @@ -294,40 +208,20 @@ public List List(ListRequest request) public List List( string? connectWebviewId = default, string? connectedAccountId = default, - List? connectedAccountIds = default, - string? createdBefore = default, - object? customMetadataHas = default, string? customerKey = default, - List? deviceIds = default, ListRequest.DeviceTypeEnum? deviceType = default, List? deviceTypes = default, - float? limit = default, - ListRequest.ManufacturerEnum? manufacturer = default, - string? pageCursor = default, - string? search = default, - string? spaceId = default, - string? unstableLocationId = default, - string? userIdentifierKey = default + ListRequest.ManufacturerEnum? manufacturer = default ) { return List( new ListRequest( connectWebviewId: connectWebviewId, connectedAccountId: connectedAccountId, - connectedAccountIds: connectedAccountIds, - createdBefore: createdBefore, - customMetadataHas: customMetadataHas, customerKey: customerKey, - deviceIds: deviceIds, deviceType: deviceType, deviceTypes: deviceTypes, - limit: limit, - manufacturer: manufacturer, - pageCursor: pageCursor, - search: search, - spaceId: spaceId, - unstableLocationId: unstableLocationId, - userIdentifierKey: userIdentifierKey + manufacturer: manufacturer ) ); } @@ -339,7 +233,7 @@ public async Task> ListAsync(ListRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; - return (await _seam.PostAsync("/noise_sensors/list", requestOptions)) + return (await _seam.GetAsync("/noise_sensors/list", requestOptions)) .EnsureData("/noise_sensors/list") .Devices; } @@ -350,20 +244,10 @@ public async Task> ListAsync(ListRequest request) public async Task> ListAsync( string? connectWebviewId = default, string? connectedAccountId = default, - List? connectedAccountIds = default, - string? createdBefore = default, - object? customMetadataHas = default, string? customerKey = default, - List? deviceIds = default, ListRequest.DeviceTypeEnum? deviceType = default, List? deviceTypes = default, - float? limit = default, - ListRequest.ManufacturerEnum? manufacturer = default, - string? pageCursor = default, - string? search = default, - string? spaceId = default, - string? unstableLocationId = default, - string? userIdentifierKey = default + ListRequest.ManufacturerEnum? manufacturer = default ) { return ( @@ -371,20 +255,10 @@ await ListAsync( new ListRequest( connectWebviewId: connectWebviewId, connectedAccountId: connectedAccountId, - connectedAccountIds: connectedAccountIds, - createdBefore: createdBefore, - customMetadataHas: customMetadataHas, customerKey: customerKey, - deviceIds: deviceIds, deviceType: deviceType, deviceTypes: deviceTypes, - limit: limit, - manufacturer: manufacturer, - pageCursor: pageCursor, - search: search, - spaceId: spaceId, - unstableLocationId: unstableLocationId, - userIdentifierKey: userIdentifierKey + manufacturer: manufacturer ) ) ); diff --git a/output/csharp/src/Seam/Api/NoiseThresholdsNoiseSensors.cs b/output/csharp/src/Seam/Api/NoiseThresholdsNoiseSensors.cs index d6ef41be..d84d23f3 100644 --- a/output/csharp/src/Seam/Api/NoiseThresholdsNoiseSensors.cs +++ b/output/csharp/src/Seam/Api/NoiseThresholdsNoiseSensors.cs @@ -275,7 +275,7 @@ public void Delete(DeleteRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; - _seam.Post("/noise_sensors/noise_thresholds/delete", requestOptions); + _seam.Delete("/noise_sensors/noise_thresholds/delete", requestOptions); } /// @@ -293,7 +293,10 @@ public async Task DeleteAsync(DeleteRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; - await _seam.PostAsync("/noise_sensors/noise_thresholds/delete", requestOptions); + await _seam.DeleteAsync( + "/noise_sensors/noise_thresholds/delete", + requestOptions + ); } /// @@ -391,7 +394,7 @@ public NoiseThreshold Get(GetRequest request) var requestOptions = new RequestOptions(); requestOptions.Data = request; return _seam - .Post("/noise_sensors/noise_thresholds/get", requestOptions) + .Get("/noise_sensors/noise_thresholds/get", requestOptions) .EnsureData("/noise_sensors/noise_thresholds/get") .NoiseThreshold; } @@ -412,7 +415,7 @@ public async Task GetAsync(GetRequest request) var requestOptions = new RequestOptions(); requestOptions.Data = request; return ( - await _seam.PostAsync( + await _seam.GetAsync( "/noise_sensors/noise_thresholds/get", requestOptions ) @@ -514,7 +517,7 @@ public List List(ListRequest request) var requestOptions = new RequestOptions(); requestOptions.Data = request; return _seam - .Post("/noise_sensors/noise_thresholds/list", requestOptions) + .Get("/noise_sensors/noise_thresholds/list", requestOptions) .EnsureData("/noise_sensors/noise_thresholds/list") .NoiseThresholds; } @@ -535,7 +538,7 @@ public async Task> ListAsync(ListRequest request) var requestOptions = new RequestOptions(); requestOptions.Data = request; return ( - await _seam.PostAsync( + await _seam.GetAsync( "/noise_sensors/noise_thresholds/list", requestOptions ) diff --git a/output/csharp/src/Seam/Api/Phones.cs b/output/csharp/src/Seam/Api/Phones.cs index bd328773..215784be 100644 --- a/output/csharp/src/Seam/Api/Phones.cs +++ b/output/csharp/src/Seam/Api/Phones.cs @@ -65,7 +65,7 @@ public void Deactivate(DeactivateRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; - _seam.Post("/phones/deactivate", requestOptions); + _seam.Delete("/phones/deactivate", requestOptions); } /// @@ -83,7 +83,7 @@ public async Task DeactivateAsync(DeactivateRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; - await _seam.PostAsync("/phones/deactivate", requestOptions); + await _seam.DeleteAsync("/phones/deactivate", requestOptions); } /// @@ -179,7 +179,7 @@ public Phone Get(GetRequest request) var requestOptions = new RequestOptions(); requestOptions.Data = request; return _seam - .Post("/phones/get", requestOptions) + .Get("/phones/get", requestOptions) .EnsureData("/phones/get") .Phone; } @@ -199,7 +199,7 @@ public async Task GetAsync(GetRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; - return (await _seam.PostAsync("/phones/get", requestOptions)) + return (await _seam.GetAsync("/phones/get", requestOptions)) .EnsureData("/phones/get") .Phone; } @@ -311,7 +311,7 @@ public List List(ListRequest request) var requestOptions = new RequestOptions(); requestOptions.Data = request; return _seam - .Post("/phones/list", requestOptions) + .Get("/phones/list", requestOptions) .EnsureData("/phones/list") .Phones; } @@ -339,7 +339,7 @@ public async Task> ListAsync(ListRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; - return (await _seam.PostAsync("/phones/list", requestOptions)) + return (await _seam.GetAsync("/phones/list", requestOptions)) .EnsureData("/phones/list") .Phones; } diff --git a/output/csharp/src/Seam/Api/SchedulesThermostats.cs b/output/csharp/src/Seam/Api/SchedulesThermostats.cs index d3555673..b16702ab 100644 --- a/output/csharp/src/Seam/Api/SchedulesThermostats.cs +++ b/output/csharp/src/Seam/Api/SchedulesThermostats.cs @@ -284,7 +284,7 @@ public void Delete(DeleteRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; - _seam.Post("/thermostats/schedules/delete", requestOptions); + _seam.Delete("/thermostats/schedules/delete", requestOptions); } /// @@ -302,7 +302,7 @@ public async Task DeleteAsync(DeleteRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; - await _seam.PostAsync("/thermostats/schedules/delete", requestOptions); + await _seam.DeleteAsync("/thermostats/schedules/delete", requestOptions); } /// @@ -402,7 +402,7 @@ public ThermostatSchedule Get(GetRequest request) var requestOptions = new RequestOptions(); requestOptions.Data = request; return _seam - .Post("/thermostats/schedules/get", requestOptions) + .Get("/thermostats/schedules/get", requestOptions) .EnsureData("/thermostats/schedules/get") .ThermostatSchedule; } @@ -422,9 +422,7 @@ public async Task GetAsync(GetRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; - return ( - await _seam.PostAsync("/thermostats/schedules/get", requestOptions) - ) + return (await _seam.GetAsync("/thermostats/schedules/get", requestOptions)) .EnsureData("/thermostats/schedules/get") .ThermostatSchedule; } @@ -533,7 +531,7 @@ public List List(ListRequest request) var requestOptions = new RequestOptions(); requestOptions.Data = request; return _seam - .Post("/thermostats/schedules/list", requestOptions) + .Get("/thermostats/schedules/list", requestOptions) .EnsureData("/thermostats/schedules/list") .ThermostatSchedules; } @@ -557,7 +555,7 @@ public async Task> ListAsync(ListRequest request) var requestOptions = new RequestOptions(); requestOptions.Data = request; return ( - await _seam.PostAsync("/thermostats/schedules/list", requestOptions) + await _seam.GetAsync("/thermostats/schedules/list", requestOptions) ) .EnsureData("/thermostats/schedules/list") .ThermostatSchedules; diff --git a/output/csharp/src/Seam/Api/Spaces.cs b/output/csharp/src/Seam/Api/Spaces.cs index 1e37aa0d..52ba4f79 100644 --- a/output/csharp/src/Seam/Api/Spaces.cs +++ b/output/csharp/src/Seam/Api/Spaces.cs @@ -627,7 +627,7 @@ public void Delete(DeleteRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; - _seam.Post("/spaces/delete", requestOptions); + _seam.Delete("/spaces/delete", requestOptions); } /// @@ -645,7 +645,7 @@ public async Task DeleteAsync(DeleteRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; - await _seam.PostAsync("/spaces/delete", requestOptions); + await _seam.DeleteAsync("/spaces/delete", requestOptions); } /// @@ -936,7 +936,7 @@ public Batch GetRelated(GetRelatedRequest request) var requestOptions = new RequestOptions(); requestOptions.Data = request; return _seam - .Post("/spaces/get_related", requestOptions) + .Get("/spaces/get_related", requestOptions) .EnsureData("/spaces/get_related") .Batch; } @@ -968,9 +968,7 @@ public async Task GetRelatedAsync(GetRelatedRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; - return ( - await _seam.PostAsync("/spaces/get_related", requestOptions) - ) + return (await _seam.GetAsync("/spaces/get_related", requestOptions)) .EnsureData("/spaces/get_related") .Batch; } @@ -1116,7 +1114,7 @@ public List List(ListRequest request) var requestOptions = new RequestOptions(); requestOptions.Data = request; return _seam - .Post("/spaces/list", requestOptions) + .Get("/spaces/list", requestOptions) .EnsureData("/spaces/list") .Spaces; } @@ -1150,7 +1148,7 @@ public async Task> ListAsync(ListRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; - return (await _seam.PostAsync("/spaces/list", requestOptions)) + return (await _seam.GetAsync("/spaces/list", requestOptions)) .EnsureData("/spaces/list") .Spaces; } @@ -1236,7 +1234,7 @@ public void RemoveAcsEntrances(RemoveAcsEntrancesRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; - _seam.Post("/spaces/remove_acs_entrances", requestOptions); + _seam.Delete("/spaces/remove_acs_entrances", requestOptions); } /// @@ -1259,7 +1257,7 @@ public async Task RemoveAcsEntrancesAsync(RemoveAcsEntrancesRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; - await _seam.PostAsync("/spaces/remove_acs_entrances", requestOptions); + await _seam.DeleteAsync("/spaces/remove_acs_entrances", requestOptions); } /// @@ -1332,7 +1330,7 @@ public void RemoveConnectedAccount(RemoveConnectedAccountRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; - _seam.Post("/spaces/remove_connected_account", requestOptions); + _seam.Delete("/spaces/remove_connected_account", requestOptions); } /// @@ -1358,7 +1356,7 @@ public async Task RemoveConnectedAccountAsync(RemoveConnectedAccountRequest requ { var requestOptions = new RequestOptions(); requestOptions.Data = request; - await _seam.PostAsync("/spaces/remove_connected_account", requestOptions); + await _seam.DeleteAsync("/spaces/remove_connected_account", requestOptions); } /// @@ -1431,7 +1429,7 @@ public void RemoveDevices(RemoveDevicesRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; - _seam.Post("/spaces/remove_devices", requestOptions); + _seam.Delete("/spaces/remove_devices", requestOptions); } /// @@ -1449,7 +1447,7 @@ public async Task RemoveDevicesAsync(RemoveDevicesRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; - await _seam.PostAsync("/spaces/remove_devices", requestOptions); + await _seam.DeleteAsync("/spaces/remove_devices", requestOptions); } /// diff --git a/output/csharp/src/Seam/Api/SystemsAcs.cs b/output/csharp/src/Seam/Api/SystemsAcs.cs index 51aa4bf6..4960c1fc 100644 --- a/output/csharp/src/Seam/Api/SystemsAcs.cs +++ b/output/csharp/src/Seam/Api/SystemsAcs.cs @@ -103,7 +103,7 @@ public AcsSystem Get(GetRequest request) var requestOptions = new RequestOptions(); requestOptions.Data = request; return _seam - .Post("/acs/systems/get", requestOptions) + .Get("/acs/systems/get", requestOptions) .EnsureData("/acs/systems/get") .AcsSystem; } @@ -123,7 +123,7 @@ public async Task GetAsync(GetRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; - return (await _seam.PostAsync("/acs/systems/get", requestOptions)) + return (await _seam.GetAsync("/acs/systems/get", requestOptions)) .EnsureData("/acs/systems/get") .AcsSystem; } @@ -245,7 +245,7 @@ public List List(ListRequest request) var requestOptions = new RequestOptions(); requestOptions.Data = request; return _seam - .Post("/acs/systems/list", requestOptions) + .Get("/acs/systems/list", requestOptions) .EnsureData("/acs/systems/list") .AcsSystems; } @@ -279,7 +279,7 @@ public async Task> ListAsync(ListRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; - return (await _seam.PostAsync("/acs/systems/list", requestOptions)) + return (await _seam.GetAsync("/acs/systems/list", requestOptions)) .EnsureData("/acs/systems/list") .AcsSystems; } @@ -397,7 +397,7 @@ ListCompatibleCredentialManagerAcsSystemsRequest request var requestOptions = new RequestOptions(); requestOptions.Data = request; return _seam - .Post( + .Get( "/acs/systems/list_compatible_credential_manager_acs_systems", requestOptions ) @@ -431,7 +431,7 @@ ListCompatibleCredentialManagerAcsSystemsRequest request var requestOptions = new RequestOptions(); requestOptions.Data = request; return ( - await _seam.PostAsync( + await _seam.GetAsync( "/acs/systems/list_compatible_credential_manager_acs_systems", requestOptions ) diff --git a/output/csharp/src/Seam/Api/Thermostats.cs b/output/csharp/src/Seam/Api/Thermostats.cs index 4e1d989b..272d61ad 100644 --- a/output/csharp/src/Seam/Api/Thermostats.cs +++ b/output/csharp/src/Seam/Api/Thermostats.cs @@ -783,7 +783,7 @@ public void DeleteClimatePreset(DeleteClimatePresetRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; - _seam.Post("/thermostats/delete_climate_preset", requestOptions); + _seam.Delete("/thermostats/delete_climate_preset", requestOptions); } /// @@ -809,7 +809,7 @@ public async Task DeleteClimatePresetAsync(DeleteClimatePresetRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; - await _seam.PostAsync("/thermostats/delete_climate_preset", requestOptions); + await _seam.DeleteAsync("/thermostats/delete_climate_preset", requestOptions); } /// @@ -1206,38 +1206,18 @@ protected ListRequest() { } public ListRequest( string? connectWebviewId = default, string? connectedAccountId = default, - List? connectedAccountIds = default, - string? createdBefore = default, - object? customMetadataHas = default, string? customerKey = default, - List? deviceIds = default, ListRequest.DeviceTypeEnum? deviceType = default, List? deviceTypes = default, - float? limit = default, - ListRequest.ManufacturerEnum? manufacturer = default, - string? pageCursor = default, - string? search = default, - string? spaceId = default, - string? unstableLocationId = default, - string? userIdentifierKey = default + ListRequest.ManufacturerEnum? manufacturer = default ) { ConnectWebviewId = connectWebviewId; ConnectedAccountId = connectedAccountId; - ConnectedAccountIds = connectedAccountIds; - CreatedBefore = createdBefore; - CustomMetadataHas = customMetadataHas; CustomerKey = customerKey; - DeviceIds = deviceIds; DeviceType = deviceType; DeviceTypes = deviceTypes; - Limit = limit; Manufacturer = manufacturer; - PageCursor = pageCursor; - Search = search; - SpaceId = spaceId; - UnstableLocationId = unstableLocationId; - UserIdentifierKey = userIdentifierKey; } /// @@ -1340,40 +1320,12 @@ public enum ManufacturerEnum )] public string? ConnectedAccountId { get; set; } - /// - /// Array of IDs of the connected accounts for which you want to list devices. - /// - [DataMember( - Name = "connected_account_ids", - IsRequired = false, - EmitDefaultValue = false - )] - public List? ConnectedAccountIds { get; set; } - - /// - /// Timestamp by which to limit returned devices. Returns devices created before this timestamp. - /// - [DataMember(Name = "created_before", IsRequired = false, EmitDefaultValue = false)] - public string? CreatedBefore { get; set; } - - /// - /// Set of key:value [custom metadata](https://docs.seam.co/core-concepts/devices/adding-custom-metadata-to-a-device) pairs for which you want to list devices. - /// - [DataMember(Name = "custom_metadata_has", IsRequired = false, EmitDefaultValue = false)] - public object? CustomMetadataHas { get; set; } - /// /// Customer key for which you want to list devices. /// [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] public string? CustomerKey { get; set; } - /// - /// Array of device IDs for which you want to list devices. - /// - [DataMember(Name = "device_ids", IsRequired = false, EmitDefaultValue = false)] - public List? DeviceIds { get; set; } - /// /// Device type by which you want to filter thermostat devices. /// @@ -1386,50 +1338,12 @@ public enum ManufacturerEnum [DataMember(Name = "device_types", IsRequired = false, EmitDefaultValue = false)] public List? DeviceTypes { get; set; } - /// - /// Numerical limit on the number of devices to return. - /// - [DataMember(Name = "limit", IsRequired = false, EmitDefaultValue = false)] - public float? Limit { get; set; } - /// /// Manufacturer by which you want to filter thermostat devices. /// [DataMember(Name = "manufacturer", IsRequired = false, EmitDefaultValue = false)] public ListRequest.ManufacturerEnum? Manufacturer { get; set; } - /// - /// Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`. - /// - [DataMember(Name = "page_cursor", IsRequired = false, EmitDefaultValue = false)] - public string? PageCursor { get; set; } - - /// - /// String for which to search. Filters returned devices to include all records that satisfy a partial match using `device_id` (full or partial UUID prefix, minimum 4 characters), `connected_account_id`, `display_name`, `custom_metadata` or `location.location_name`. - /// - [DataMember(Name = "search", IsRequired = false, EmitDefaultValue = false)] - public string? Search { get; set; } - - /// - /// ID of the space for which you want to list devices. - /// - [DataMember(Name = "space_id", IsRequired = false, EmitDefaultValue = false)] - public string? SpaceId { get; set; } - - [Obsolete("Use `space_id`.")] - [DataMember( - Name = "unstable_location_id", - IsRequired = false, - EmitDefaultValue = false - )] - public string? UnstableLocationId { get; set; } - - /// - /// Your own internal user ID for the user for which you want to list devices. - /// - [DataMember(Name = "user_identifier_key", IsRequired = false, EmitDefaultValue = false)] - public string? UserIdentifierKey { get; set; } - public override string ToString() { JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); @@ -1495,7 +1409,7 @@ public List List(ListRequest request) var requestOptions = new RequestOptions(); requestOptions.Data = request; return _seam - .Post("/thermostats/list", requestOptions) + .Get("/thermostats/list", requestOptions) .EnsureData("/thermostats/list") .Devices; } @@ -1506,40 +1420,20 @@ public List List(ListRequest request) public List List( string? connectWebviewId = default, string? connectedAccountId = default, - List? connectedAccountIds = default, - string? createdBefore = default, - object? customMetadataHas = default, string? customerKey = default, - List? deviceIds = default, ListRequest.DeviceTypeEnum? deviceType = default, List? deviceTypes = default, - float? limit = default, - ListRequest.ManufacturerEnum? manufacturer = default, - string? pageCursor = default, - string? search = default, - string? spaceId = default, - string? unstableLocationId = default, - string? userIdentifierKey = default + ListRequest.ManufacturerEnum? manufacturer = default ) { return List( new ListRequest( connectWebviewId: connectWebviewId, connectedAccountId: connectedAccountId, - connectedAccountIds: connectedAccountIds, - createdBefore: createdBefore, - customMetadataHas: customMetadataHas, customerKey: customerKey, - deviceIds: deviceIds, deviceType: deviceType, deviceTypes: deviceTypes, - limit: limit, - manufacturer: manufacturer, - pageCursor: pageCursor, - search: search, - spaceId: spaceId, - unstableLocationId: unstableLocationId, - userIdentifierKey: userIdentifierKey + manufacturer: manufacturer ) ); } @@ -1551,7 +1445,7 @@ public async Task> ListAsync(ListRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; - return (await _seam.PostAsync("/thermostats/list", requestOptions)) + return (await _seam.GetAsync("/thermostats/list", requestOptions)) .EnsureData("/thermostats/list") .Devices; } @@ -1562,20 +1456,10 @@ public async Task> ListAsync(ListRequest request) public async Task> ListAsync( string? connectWebviewId = default, string? connectedAccountId = default, - List? connectedAccountIds = default, - string? createdBefore = default, - object? customMetadataHas = default, string? customerKey = default, - List? deviceIds = default, ListRequest.DeviceTypeEnum? deviceType = default, List? deviceTypes = default, - float? limit = default, - ListRequest.ManufacturerEnum? manufacturer = default, - string? pageCursor = default, - string? search = default, - string? spaceId = default, - string? unstableLocationId = default, - string? userIdentifierKey = default + ListRequest.ManufacturerEnum? manufacturer = default ) { return ( @@ -1583,20 +1467,10 @@ await ListAsync( new ListRequest( connectWebviewId: connectWebviewId, connectedAccountId: connectedAccountId, - connectedAccountIds: connectedAccountIds, - createdBefore: createdBefore, - customMetadataHas: customMetadataHas, customerKey: customerKey, - deviceIds: deviceIds, deviceType: deviceType, deviceTypes: deviceTypes, - limit: limit, - manufacturer: manufacturer, - pageCursor: pageCursor, - search: search, - spaceId: spaceId, - unstableLocationId: unstableLocationId, - userIdentifierKey: userIdentifierKey + manufacturer: manufacturer ) ) ); diff --git a/output/csharp/src/Seam/Api/UnmanagedAccessCodes.cs b/output/csharp/src/Seam/Api/UnmanagedAccessCodes.cs index 2fb2a82d..c7b4a584 100644 --- a/output/csharp/src/Seam/Api/UnmanagedAccessCodes.cs +++ b/output/csharp/src/Seam/Api/UnmanagedAccessCodes.cs @@ -218,7 +218,7 @@ public void Delete(DeleteRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; - _seam.Post("/access_codes/unmanaged/delete", requestOptions); + _seam.Delete("/access_codes/unmanaged/delete", requestOptions); } /// @@ -236,7 +236,7 @@ public async Task DeleteAsync(DeleteRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; - await _seam.PostAsync("/access_codes/unmanaged/delete", requestOptions); + await _seam.DeleteAsync("/access_codes/unmanaged/delete", requestOptions); } /// @@ -352,7 +352,7 @@ public UnmanagedAccessCode Get(GetRequest request) var requestOptions = new RequestOptions(); requestOptions.Data = request; return _seam - .Post("/access_codes/unmanaged/get", requestOptions) + .Get("/access_codes/unmanaged/get", requestOptions) .EnsureData("/access_codes/unmanaged/get") .AccessCode; } @@ -381,7 +381,7 @@ public async Task GetAsync(GetRequest request) var requestOptions = new RequestOptions(); requestOptions.Data = request; return ( - await _seam.PostAsync("/access_codes/unmanaged/get", requestOptions) + await _seam.GetAsync("/access_codes/unmanaged/get", requestOptions) ) .EnsureData("/access_codes/unmanaged/get") .AccessCode; @@ -524,7 +524,7 @@ public List List(ListRequest request) var requestOptions = new RequestOptions(); requestOptions.Data = request; return _seam - .Post("/access_codes/unmanaged/list", requestOptions) + .Get("/access_codes/unmanaged/list", requestOptions) .EnsureData("/access_codes/unmanaged/list") .AccessCodes; } @@ -559,7 +559,7 @@ public async Task> ListAsync(ListRequest request) var requestOptions = new RequestOptions(); requestOptions.Data = request; return ( - await _seam.PostAsync("/access_codes/unmanaged/list", requestOptions) + await _seam.GetAsync("/access_codes/unmanaged/list", requestOptions) ) .EnsureData("/access_codes/unmanaged/list") .AccessCodes; diff --git a/output/csharp/src/Seam/Api/UnmanagedAccessGrants.cs b/output/csharp/src/Seam/Api/UnmanagedAccessGrants.cs index 226213d0..7a679ee8 100644 --- a/output/csharp/src/Seam/Api/UnmanagedAccessGrants.cs +++ b/output/csharp/src/Seam/Api/UnmanagedAccessGrants.cs @@ -64,7 +64,7 @@ public class GetResponse [JsonConstructorAttribute] protected GetResponse() { } - public GetResponse(AccessGrant accessGrant = default) + public GetResponse(UnmanagedAccessGrant accessGrant = default) { AccessGrant = accessGrant; } @@ -73,7 +73,7 @@ public GetResponse(AccessGrant accessGrant = default) /// OK /// [DataMember(Name = "access_grant", IsRequired = false, EmitDefaultValue = false)] - public AccessGrant AccessGrant { get; set; } + public UnmanagedAccessGrant AccessGrant { get; set; } public override string ToString() { @@ -98,12 +98,12 @@ public override string ToString() /// /// Get an unmanaged Access Grant (where is_managed = false). /// - public AccessGrant Get(GetRequest request) + public UnmanagedAccessGrant Get(GetRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; return _seam - .Post("/access_grants/unmanaged/get", requestOptions) + .Get("/access_grants/unmanaged/get", requestOptions) .EnsureData("/access_grants/unmanaged/get") .AccessGrant; } @@ -111,7 +111,7 @@ public AccessGrant Get(GetRequest request) /// /// Get an unmanaged Access Grant (where is_managed = false). /// - public AccessGrant Get(string accessGrantId = default) + public UnmanagedAccessGrant Get(string accessGrantId = default) { return Get(new GetRequest(accessGrantId: accessGrantId)); } @@ -119,12 +119,12 @@ public AccessGrant Get(string accessGrantId = default) /// /// Get an unmanaged Access Grant (where is_managed = false). /// - public async Task GetAsync(GetRequest request) + public async Task GetAsync(GetRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; return ( - await _seam.PostAsync("/access_grants/unmanaged/get", requestOptions) + await _seam.GetAsync("/access_grants/unmanaged/get", requestOptions) ) .EnsureData("/access_grants/unmanaged/get") .AccessGrant; @@ -133,7 +133,7 @@ await _seam.PostAsync("/access_grants/unmanaged/get", requestOption /// /// Get an unmanaged Access Grant (where is_managed = false). /// - public async Task GetAsync(string accessGrantId = default) + public async Task GetAsync(string accessGrantId = default) { return (await GetAsync(new GetRequest(accessGrantId: accessGrantId))); } @@ -226,7 +226,7 @@ public class ListResponse [JsonConstructorAttribute] protected ListResponse() { } - public ListResponse(List accessGrants = default) + public ListResponse(List accessGrants = default) { AccessGrants = accessGrants; } @@ -235,7 +235,7 @@ public ListResponse(List accessGrants = default) /// OK /// [DataMember(Name = "access_grants", IsRequired = false, EmitDefaultValue = false)] - public List AccessGrants { get; set; } + public List AccessGrants { get; set; } public override string ToString() { @@ -260,12 +260,12 @@ public override string ToString() /// /// Gets unmanaged Access Grants (where is_managed = false). /// - public List List(ListRequest request) + public List List(ListRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; return _seam - .Post("/access_grants/unmanaged/list", requestOptions) + .Get("/access_grants/unmanaged/list", requestOptions) .EnsureData("/access_grants/unmanaged/list") .AccessGrants; } @@ -273,7 +273,7 @@ public List List(ListRequest request) /// /// Gets unmanaged Access Grants (where is_managed = false). /// - public List List( + public List List( string? acsEntranceId = default, string? acsSystemId = default, float? limit = default, @@ -297,12 +297,12 @@ public List List( /// /// Gets unmanaged Access Grants (where is_managed = false). /// - public async Task> ListAsync(ListRequest request) + public async Task> ListAsync(ListRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; return ( - await _seam.PostAsync("/access_grants/unmanaged/list", requestOptions) + await _seam.GetAsync("/access_grants/unmanaged/list", requestOptions) ) .EnsureData("/access_grants/unmanaged/list") .AccessGrants; @@ -311,7 +311,7 @@ await _seam.PostAsync("/access_grants/unmanaged/list", requestOpti /// /// Gets unmanaged Access Grants (where is_managed = false). /// - public async Task> ListAsync( + public async Task> ListAsync( string? acsEntranceId = default, string? acsSystemId = default, float? limit = default, diff --git a/output/csharp/src/Seam/Api/UnmanagedAccessMethods.cs b/output/csharp/src/Seam/Api/UnmanagedAccessMethods.cs index c91704f5..df4a90c4 100644 --- a/output/csharp/src/Seam/Api/UnmanagedAccessMethods.cs +++ b/output/csharp/src/Seam/Api/UnmanagedAccessMethods.cs @@ -64,7 +64,7 @@ public class GetResponse [JsonConstructorAttribute] protected GetResponse() { } - public GetResponse(AccessMethod accessMethod = default) + public GetResponse(UnmanagedAccessMethod accessMethod = default) { AccessMethod = accessMethod; } @@ -73,7 +73,7 @@ public GetResponse(AccessMethod accessMethod = default) /// OK /// [DataMember(Name = "access_method", IsRequired = false, EmitDefaultValue = false)] - public AccessMethod AccessMethod { get; set; } + public UnmanagedAccessMethod AccessMethod { get; set; } public override string ToString() { @@ -98,12 +98,12 @@ public override string ToString() /// /// Gets an unmanaged access method (where is_managed = false). /// - public AccessMethod Get(GetRequest request) + public UnmanagedAccessMethod Get(GetRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; return _seam - .Post("/access_methods/unmanaged/get", requestOptions) + .Get("/access_methods/unmanaged/get", requestOptions) .EnsureData("/access_methods/unmanaged/get") .AccessMethod; } @@ -111,7 +111,7 @@ public AccessMethod Get(GetRequest request) /// /// Gets an unmanaged access method (where is_managed = false). /// - public AccessMethod Get(string accessMethodId = default) + public UnmanagedAccessMethod Get(string accessMethodId = default) { return Get(new GetRequest(accessMethodId: accessMethodId)); } @@ -119,12 +119,12 @@ public AccessMethod Get(string accessMethodId = default) /// /// Gets an unmanaged access method (where is_managed = false). /// - public async Task GetAsync(GetRequest request) + public async Task GetAsync(GetRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; return ( - await _seam.PostAsync("/access_methods/unmanaged/get", requestOptions) + await _seam.GetAsync("/access_methods/unmanaged/get", requestOptions) ) .EnsureData("/access_methods/unmanaged/get") .AccessMethod; @@ -133,7 +133,7 @@ await _seam.PostAsync("/access_methods/unmanaged/get", requestOptio /// /// Gets an unmanaged access method (where is_managed = false). /// - public async Task GetAsync(string accessMethodId = default) + public async Task GetAsync(string accessMethodId = default) { return (await GetAsync(new GetRequest(accessMethodId: accessMethodId))); } @@ -210,7 +210,7 @@ public class ListResponse [JsonConstructorAttribute] protected ListResponse() { } - public ListResponse(List accessMethods = default) + public ListResponse(List accessMethods = default) { AccessMethods = accessMethods; } @@ -219,7 +219,7 @@ public ListResponse(List accessMethods = default) /// OK /// [DataMember(Name = "access_methods", IsRequired = false, EmitDefaultValue = false)] - public List AccessMethods { get; set; } + public List AccessMethods { get; set; } public override string ToString() { @@ -244,12 +244,12 @@ public override string ToString() /// /// Lists all unmanaged access methods (where is_managed = false), usually filtered by Access Grant. /// - public List List(ListRequest request) + public List List(ListRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; return _seam - .Post("/access_methods/unmanaged/list", requestOptions) + .Get("/access_methods/unmanaged/list", requestOptions) .EnsureData("/access_methods/unmanaged/list") .AccessMethods; } @@ -257,7 +257,7 @@ public List List(ListRequest request) /// /// Lists all unmanaged access methods (where is_managed = false), usually filtered by Access Grant. /// - public List List( + public List List( string accessGrantId = default, string? acsEntranceId = default, string? deviceId = default, @@ -277,15 +277,12 @@ public List List( /// /// Lists all unmanaged access methods (where is_managed = false), usually filtered by Access Grant. /// - public async Task> ListAsync(ListRequest request) + public async Task> ListAsync(ListRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; return ( - await _seam.PostAsync( - "/access_methods/unmanaged/list", - requestOptions - ) + await _seam.GetAsync("/access_methods/unmanaged/list", requestOptions) ) .EnsureData("/access_methods/unmanaged/list") .AccessMethods; @@ -294,7 +291,7 @@ await _seam.PostAsync( /// /// Lists all unmanaged access methods (where is_managed = false), usually filtered by Access Grant. /// - public async Task> ListAsync( + public async Task> ListAsync( string accessGrantId = default, string? acsEntranceId = default, string? deviceId = default, diff --git a/output/csharp/src/Seam/Api/UnmanagedDevices.cs b/output/csharp/src/Seam/Api/UnmanagedDevices.cs index 18bead2f..c26528e4 100644 --- a/output/csharp/src/Seam/Api/UnmanagedDevices.cs +++ b/output/csharp/src/Seam/Api/UnmanagedDevices.cs @@ -114,7 +114,7 @@ public UnmanagedDevice Get(GetRequest request) var requestOptions = new RequestOptions(); requestOptions.Data = request; return _seam - .Post("/devices/unmanaged/get", requestOptions) + .Get("/devices/unmanaged/get", requestOptions) .EnsureData("/devices/unmanaged/get") .Device; } @@ -142,7 +142,7 @@ public async Task GetAsync(GetRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; - return (await _seam.PostAsync("/devices/unmanaged/get", requestOptions)) + return (await _seam.GetAsync("/devices/unmanaged/get", requestOptions)) .EnsureData("/devices/unmanaged/get") .Device; } @@ -176,7 +176,6 @@ public ListRequest( string? connectedAccountId = default, List? connectedAccountIds = default, string? createdBefore = default, - object? customMetadataHas = default, string? customerKey = default, List? deviceIds = default, ListRequest.DeviceTypeEnum? deviceType = default, @@ -184,17 +183,13 @@ public ListRequest( float? limit = default, ListRequest.ManufacturerEnum? manufacturer = default, string? pageCursor = default, - string? search = default, - string? spaceId = default, - string? unstableLocationId = default, - string? userIdentifierKey = default + string? search = default ) { ConnectWebviewId = connectWebviewId; ConnectedAccountId = connectedAccountId; ConnectedAccountIds = connectedAccountIds; CreatedBefore = createdBefore; - CustomMetadataHas = customMetadataHas; CustomerKey = customerKey; DeviceIds = deviceIds; DeviceType = deviceType; @@ -203,9 +198,6 @@ public ListRequest( Manufacturer = manufacturer; PageCursor = pageCursor; Search = search; - SpaceId = spaceId; - UnstableLocationId = unstableLocationId; - UserIdentifierKey = userIdentifierKey; } /// @@ -295,50 +287,56 @@ public enum DeviceTypeEnum [EnumMember(Value = "ultraloq_lock")] UltraloqLock = 26, + [EnumMember(Value = "yacan_lock")] + YacanLock = 27, + [EnumMember(Value = "keyincode_lock")] - KeyincodeLock = 27, + KeyincodeLock = 28, [EnumMember(Value = "omnitec_lock")] - OmnitecLock = 28, + OmnitecLock = 29, [EnumMember(Value = "kisi_lock")] - KisiLock = 29, + KisiLock = 30, + + [EnumMember(Value = "aqara_lock")] + AqaraLock = 31, [EnumMember(Value = "keynest_key")] - KeynestKey = 30, + KeynestKey = 32, [EnumMember(Value = "noiseaware_activity_zone")] - NoiseawareActivityZone = 31, + NoiseawareActivityZone = 33, [EnumMember(Value = "minut_sensor")] - MinutSensor = 32, + MinutSensor = 34, [EnumMember(Value = "ecobee_thermostat")] - EcobeeThermostat = 33, + EcobeeThermostat = 35, [EnumMember(Value = "nest_thermostat")] - NestThermostat = 34, + NestThermostat = 36, [EnumMember(Value = "honeywell_resideo_thermostat")] - HoneywellResideoThermostat = 35, + HoneywellResideoThermostat = 37, [EnumMember(Value = "tado_thermostat")] - TadoThermostat = 36, + TadoThermostat = 38, [EnumMember(Value = "sensi_thermostat")] - SensiThermostat = 37, + SensiThermostat = 39, [EnumMember(Value = "smartthings_thermostat")] - SmartthingsThermostat = 38, + SmartthingsThermostat = 40, [EnumMember(Value = "ios_phone")] - IosPhone = 39, + IosPhone = 41, [EnumMember(Value = "android_phone")] - AndroidPhone = 40, + AndroidPhone = 42, [EnumMember(Value = "ring_camera")] - RingCamera = 41, + RingCamera = 43, } /// @@ -428,50 +426,56 @@ public enum DeviceTypesEnum [EnumMember(Value = "ultraloq_lock")] UltraloqLock = 26, + [EnumMember(Value = "yacan_lock")] + YacanLock = 27, + [EnumMember(Value = "keyincode_lock")] - KeyincodeLock = 27, + KeyincodeLock = 28, [EnumMember(Value = "omnitec_lock")] - OmnitecLock = 28, + OmnitecLock = 29, [EnumMember(Value = "kisi_lock")] - KisiLock = 29, + KisiLock = 30, + + [EnumMember(Value = "aqara_lock")] + AqaraLock = 31, [EnumMember(Value = "keynest_key")] - KeynestKey = 30, + KeynestKey = 32, [EnumMember(Value = "noiseaware_activity_zone")] - NoiseawareActivityZone = 31, + NoiseawareActivityZone = 33, [EnumMember(Value = "minut_sensor")] - MinutSensor = 32, + MinutSensor = 34, [EnumMember(Value = "ecobee_thermostat")] - EcobeeThermostat = 33, + EcobeeThermostat = 35, [EnumMember(Value = "nest_thermostat")] - NestThermostat = 34, + NestThermostat = 36, [EnumMember(Value = "honeywell_resideo_thermostat")] - HoneywellResideoThermostat = 35, + HoneywellResideoThermostat = 37, [EnumMember(Value = "tado_thermostat")] - TadoThermostat = 36, + TadoThermostat = 38, [EnumMember(Value = "sensi_thermostat")] - SensiThermostat = 37, + SensiThermostat = 39, [EnumMember(Value = "smartthings_thermostat")] - SmartthingsThermostat = 38, + SmartthingsThermostat = 40, [EnumMember(Value = "ios_phone")] - IosPhone = 39, + IosPhone = 41, [EnumMember(Value = "android_phone")] - AndroidPhone = 40, + AndroidPhone = 42, [EnumMember(Value = "ring_camera")] - RingCamera = 41, + RingCamera = 43, } /// @@ -573,65 +577,71 @@ public enum ManufacturerEnum [EnumMember(Value = "akiles")] Akiles = 30, + [EnumMember(Value = "aqara")] + Aqara = 31, + [EnumMember(Value = "ecobee")] - Ecobee = 31, + Ecobee = 32, [EnumMember(Value = "honeywell_resideo")] - HoneywellResideo = 32, + HoneywellResideo = 33, [EnumMember(Value = "keynest")] - Keynest = 33, + Keynest = 34, [EnumMember(Value = "korelock")] - Korelock = 34, + Korelock = 35, [EnumMember(Value = "minut")] - Minut = 35, + Minut = 36, [EnumMember(Value = "nest")] - Nest = 36, + Nest = 37, [EnumMember(Value = "noiseaware")] - Noiseaware = 37, + Noiseaware = 38, [EnumMember(Value = "sensi")] - Sensi = 38, + Sensi = 39, [EnumMember(Value = "smartthings")] - Smartthings = 39, + Smartthings = 40, [EnumMember(Value = "tado")] - Tado = 40, + Tado = 41, [EnumMember(Value = "ultraloq")] - Ultraloq = 41, + Ultraloq = 42, [EnumMember(Value = "ring")] - Ring = 42, + Ring = 43, [EnumMember(Value = "ical")] - Ical = 43, + Ical = 44, [EnumMember(Value = "lodgify")] - Lodgify = 44, + Lodgify = 45, [EnumMember(Value = "hostaway")] - Hostaway = 45, + Hostaway = 46, [EnumMember(Value = "guesty")] - Guesty = 46, + Guesty = 47, [EnumMember(Value = "acuity_scheduling")] - AcuityScheduling = 47, + AcuityScheduling = 48, [EnumMember(Value = "omnitec")] - Omnitec = 48, + Omnitec = 49, [EnumMember(Value = "kisi")] - Kisi = 49, + Kisi = 50, [EnumMember(Value = "slack")] - Slack = 50, + Slack = 51, + + [EnumMember(Value = "yacan")] + Yacan = 52, } /// @@ -666,12 +676,6 @@ public enum ManufacturerEnum [DataMember(Name = "created_before", IsRequired = false, EmitDefaultValue = false)] public string? CreatedBefore { get; set; } - /// - /// Set of key:value [custom metadata](https://docs.seam.co/core-concepts/devices/adding-custom-metadata-to-a-device) pairs for which you want to list devices. - /// - [DataMember(Name = "custom_metadata_has", IsRequired = false, EmitDefaultValue = false)] - public object? CustomMetadataHas { get; set; } - /// /// Customer key for which you want to list devices. /// @@ -720,26 +724,6 @@ public enum ManufacturerEnum [DataMember(Name = "search", IsRequired = false, EmitDefaultValue = false)] public string? Search { get; set; } - /// - /// ID of the space for which you want to list devices. - /// - [DataMember(Name = "space_id", IsRequired = false, EmitDefaultValue = false)] - public string? SpaceId { get; set; } - - [Obsolete("Use `space_id`.")] - [DataMember( - Name = "unstable_location_id", - IsRequired = false, - EmitDefaultValue = false - )] - public string? UnstableLocationId { get; set; } - - /// - /// Your own internal user ID for the user for which you want to list devices. - /// - [DataMember(Name = "user_identifier_key", IsRequired = false, EmitDefaultValue = false)] - public string? UserIdentifierKey { get; set; } - public override string ToString() { JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); @@ -807,7 +791,7 @@ public List List(ListRequest request) var requestOptions = new RequestOptions(); requestOptions.Data = request; return _seam - .Post("/devices/unmanaged/list", requestOptions) + .Get("/devices/unmanaged/list", requestOptions) .EnsureData("/devices/unmanaged/list") .Devices; } @@ -822,7 +806,6 @@ public List List( string? connectedAccountId = default, List? connectedAccountIds = default, string? createdBefore = default, - object? customMetadataHas = default, string? customerKey = default, List? deviceIds = default, ListRequest.DeviceTypeEnum? deviceType = default, @@ -830,10 +813,7 @@ public List List( float? limit = default, ListRequest.ManufacturerEnum? manufacturer = default, string? pageCursor = default, - string? search = default, - string? spaceId = default, - string? unstableLocationId = default, - string? userIdentifierKey = default + string? search = default ) { return List( @@ -842,7 +822,6 @@ public List List( connectedAccountId: connectedAccountId, connectedAccountIds: connectedAccountIds, createdBefore: createdBefore, - customMetadataHas: customMetadataHas, customerKey: customerKey, deviceIds: deviceIds, deviceType: deviceType, @@ -850,10 +829,7 @@ public List List( limit: limit, manufacturer: manufacturer, pageCursor: pageCursor, - search: search, - spaceId: spaceId, - unstableLocationId: unstableLocationId, - userIdentifierKey: userIdentifierKey + search: search ) ); } @@ -867,7 +843,7 @@ public async Task> ListAsync(ListRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; - return (await _seam.PostAsync("/devices/unmanaged/list", requestOptions)) + return (await _seam.GetAsync("/devices/unmanaged/list", requestOptions)) .EnsureData("/devices/unmanaged/list") .Devices; } @@ -882,7 +858,6 @@ public async Task> ListAsync( string? connectedAccountId = default, List? connectedAccountIds = default, string? createdBefore = default, - object? customMetadataHas = default, string? customerKey = default, List? deviceIds = default, ListRequest.DeviceTypeEnum? deviceType = default, @@ -890,10 +865,7 @@ public async Task> ListAsync( float? limit = default, ListRequest.ManufacturerEnum? manufacturer = default, string? pageCursor = default, - string? search = default, - string? spaceId = default, - string? unstableLocationId = default, - string? userIdentifierKey = default + string? search = default ) { return ( @@ -903,7 +875,6 @@ await ListAsync( connectedAccountId: connectedAccountId, connectedAccountIds: connectedAccountIds, createdBefore: createdBefore, - customMetadataHas: customMetadataHas, customerKey: customerKey, deviceIds: deviceIds, deviceType: deviceType, @@ -911,10 +882,7 @@ await ListAsync( limit: limit, manufacturer: manufacturer, pageCursor: pageCursor, - search: search, - spaceId: spaceId, - unstableLocationId: unstableLocationId, - userIdentifierKey: userIdentifierKey + search: search ) ) ); @@ -941,7 +909,7 @@ public UpdateRequest( } /// - /// Custom metadata that you want to associate with the device. Supports up to 50 JSON key:value pairs. + /// Custom metadata that you want to associate with the device. Supports up to 50 JSON key:value pairs, with key names up to 40 characters long that cannot contain a period (.). Set a key to `null` or to an empty string to remove that key from the custom metadata. /// [DataMember(Name = "custom_metadata", IsRequired = false, EmitDefaultValue = false)] public object? CustomMetadata { get; set; } diff --git a/output/csharp/src/Seam/Api/UnmanagedUserIdentities.cs b/output/csharp/src/Seam/Api/UnmanagedUserIdentities.cs index 50705a65..d390dba2 100644 --- a/output/csharp/src/Seam/Api/UnmanagedUserIdentities.cs +++ b/output/csharp/src/Seam/Api/UnmanagedUserIdentities.cs @@ -64,7 +64,7 @@ public class GetResponse [JsonConstructorAttribute] protected GetResponse() { } - public GetResponse(UserIdentity userIdentity = default) + public GetResponse(UnmanagedUserIdentity userIdentity = default) { UserIdentity = userIdentity; } @@ -73,7 +73,7 @@ public GetResponse(UserIdentity userIdentity = default) /// OK /// [DataMember(Name = "user_identity", IsRequired = false, EmitDefaultValue = false)] - public UserIdentity UserIdentity { get; set; } + public UnmanagedUserIdentity UserIdentity { get; set; } public override string ToString() { @@ -98,12 +98,12 @@ public override string ToString() /// /// Returns a specified unmanaged [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) (where is_managed = false). /// - public UserIdentity Get(GetRequest request) + public UnmanagedUserIdentity Get(GetRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; return _seam - .Post("/user_identities/unmanaged/get", requestOptions) + .Get("/user_identities/unmanaged/get", requestOptions) .EnsureData("/user_identities/unmanaged/get") .UserIdentity; } @@ -111,7 +111,7 @@ public UserIdentity Get(GetRequest request) /// /// Returns a specified unmanaged [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) (where is_managed = false). /// - public UserIdentity Get(string userIdentityId = default) + public UnmanagedUserIdentity Get(string userIdentityId = default) { return Get(new GetRequest(userIdentityId: userIdentityId)); } @@ -119,12 +119,12 @@ public UserIdentity Get(string userIdentityId = default) /// /// Returns a specified unmanaged [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) (where is_managed = false). /// - public async Task GetAsync(GetRequest request) + public async Task GetAsync(GetRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; return ( - await _seam.PostAsync("/user_identities/unmanaged/get", requestOptions) + await _seam.GetAsync("/user_identities/unmanaged/get", requestOptions) ) .EnsureData("/user_identities/unmanaged/get") .UserIdentity; @@ -133,7 +133,7 @@ await _seam.PostAsync("/user_identities/unmanaged/get", requestOpti /// /// Returns a specified unmanaged [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) (where is_managed = false). /// - public async Task GetAsync(string userIdentityId = default) + public async Task GetAsync(string userIdentityId = default) { return (await GetAsync(new GetRequest(userIdentityId: userIdentityId))); } @@ -210,7 +210,7 @@ public class ListResponse [JsonConstructorAttribute] protected ListResponse() { } - public ListResponse(List userIdentities = default) + public ListResponse(List userIdentities = default) { UserIdentities = userIdentities; } @@ -219,7 +219,7 @@ public ListResponse(List userIdentities = default) /// OK /// [DataMember(Name = "user_identities", IsRequired = false, EmitDefaultValue = false)] - public List UserIdentities { get; set; } + public List UserIdentities { get; set; } public override string ToString() { @@ -244,12 +244,12 @@ public override string ToString() /// /// Returns a list of all unmanaged [user identities](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) (where is_managed = false). /// - public List List(ListRequest request) + public List List(ListRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; return _seam - .Post("/user_identities/unmanaged/list", requestOptions) + .Get("/user_identities/unmanaged/list", requestOptions) .EnsureData("/user_identities/unmanaged/list") .UserIdentities; } @@ -257,7 +257,7 @@ public List List(ListRequest request) /// /// Returns a list of all unmanaged [user identities](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) (where is_managed = false). /// - public List List( + public List List( string? createdBefore = default, int? limit = default, string? pageCursor = default, @@ -277,12 +277,12 @@ public List List( /// /// Returns a list of all unmanaged [user identities](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) (where is_managed = false). /// - public async Task> ListAsync(ListRequest request) + public async Task> ListAsync(ListRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; return ( - await _seam.PostAsync( + await _seam.GetAsync( "/user_identities/unmanaged/list", requestOptions ) @@ -294,7 +294,7 @@ await _seam.PostAsync( /// /// Returns a list of all unmanaged [user identities](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) (where is_managed = false). /// - public async Task> ListAsync( + public async Task> ListAsync( string? createdBefore = default, int? limit = default, string? pageCursor = default, diff --git a/output/csharp/src/Seam/Api/UserIdentities.cs b/output/csharp/src/Seam/Api/UserIdentities.cs index ce4c84e9..a2fe9465 100644 --- a/output/csharp/src/Seam/Api/UserIdentities.cs +++ b/output/csharp/src/Seam/Api/UserIdentities.cs @@ -379,7 +379,7 @@ public void Delete(DeleteRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; - _seam.Post("/user_identities/delete", requestOptions); + _seam.Delete("/user_identities/delete", requestOptions); } /// @@ -397,7 +397,7 @@ public async Task DeleteAsync(DeleteRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; - await _seam.PostAsync("/user_identities/delete", requestOptions); + await _seam.DeleteAsync("/user_identities/delete", requestOptions); } /// @@ -930,7 +930,7 @@ public List List(ListRequest request) var requestOptions = new RequestOptions(); requestOptions.Data = request; return _seam - .Post("/user_identities/list", requestOptions) + .Get("/user_identities/list", requestOptions) .EnsureData("/user_identities/list") .UserIdentities; } @@ -966,7 +966,7 @@ public async Task> ListAsync(ListRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; - return (await _seam.PostAsync("/user_identities/list", requestOptions)) + return (await _seam.GetAsync("/user_identities/list", requestOptions)) .EnsureData("/user_identities/list") .UserIdentities; } @@ -1082,7 +1082,7 @@ public List ListAccessibleDevices(ListAccessibleDevicesRequest request) var requestOptions = new RequestOptions(); requestOptions.Data = request; return _seam - .Post( + .Get( "/user_identities/list_accessible_devices", requestOptions ) @@ -1110,7 +1110,7 @@ ListAccessibleDevicesRequest request var requestOptions = new RequestOptions(); requestOptions.Data = request; return ( - await _seam.PostAsync( + await _seam.GetAsync( "/user_identities/list_accessible_devices", requestOptions ) @@ -1216,7 +1216,7 @@ public List ListAccessibleEntrances(ListAccessibleEntrancesRequest var requestOptions = new RequestOptions(); requestOptions.Data = request; return _seam - .Post( + .Get( "/user_identities/list_accessible_entrances", requestOptions ) @@ -1244,7 +1244,7 @@ ListAccessibleEntrancesRequest request var requestOptions = new RequestOptions(); requestOptions.Data = request; return ( - await _seam.PostAsync( + await _seam.GetAsync( "/user_identities/list_accessible_entrances", requestOptions ) @@ -1352,7 +1352,7 @@ public List ListAcsSystems(ListAcsSystemsRequest request) var requestOptions = new RequestOptions(); requestOptions.Data = request; return _seam - .Post("/user_identities/list_acs_systems", requestOptions) + .Get("/user_identities/list_acs_systems", requestOptions) .EnsureData("/user_identities/list_acs_systems") .AcsSystems; } @@ -1373,7 +1373,7 @@ public async Task> ListAcsSystemsAsync(ListAcsSystemsRequest req var requestOptions = new RequestOptions(); requestOptions.Data = request; return ( - await _seam.PostAsync( + await _seam.GetAsync( "/user_identities/list_acs_systems", requestOptions ) @@ -1477,7 +1477,7 @@ public List ListAcsUsers(ListAcsUsersRequest request) var requestOptions = new RequestOptions(); requestOptions.Data = request; return _seam - .Post("/user_identities/list_acs_users", requestOptions) + .Get("/user_identities/list_acs_users", requestOptions) .EnsureData("/user_identities/list_acs_users") .AcsUsers; } @@ -1498,7 +1498,7 @@ public async Task> ListAcsUsersAsync(ListAcsUsersRequest request) var requestOptions = new RequestOptions(); requestOptions.Data = request; return ( - await _seam.PostAsync( + await _seam.GetAsync( "/user_identities/list_acs_users", requestOptions ) @@ -1517,6 +1517,164 @@ await ListAcsUsersAsync(new ListAcsUsersRequest(userIdentityId: userIdentityId)) ); } + /// + /// Request parameters for Merge User Identities. + /// + [DataContract(Name = "mergeRequest_request")] + public class MergeRequest + { + [JsonConstructorAttribute] + protected MergeRequest() { } + + public MergeRequest( + List? mergedUserIdentityIds = default, + string? userIdentityId = default, + List? mergedUserIdentityKeys = default, + string? userIdentityKey = default + ) + { + MergedUserIdentityIds = mergedUserIdentityIds; + UserIdentityId = userIdentityId; + MergedUserIdentityKeys = mergedUserIdentityKeys; + UserIdentityKey = userIdentityKey; + } + + /// + /// IDs of the user identities to merge into the primary user identity. These user identities are deleted. + /// + [DataMember( + Name = "merged_user_identity_ids", + IsRequired = false, + EmitDefaultValue = false + )] + public List? MergedUserIdentityIds { get; set; } + + /// + /// ID of the primary user identity to keep. + /// + [DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] + public string? UserIdentityId { get; set; } + + /// + /// Keys of the user identities to merge into the primary user identity. These user identities are deleted. + /// + [DataMember( + Name = "merged_user_identity_keys", + IsRequired = false, + EmitDefaultValue = false + )] + public List? MergedUserIdentityKeys { get; set; } + + /// + /// Key of the primary user identity to keep. + /// + [DataMember(Name = "user_identity_key", IsRequired = false, EmitDefaultValue = false)] + public string? UserIdentityKey { 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(); + } + } + + /// + /// Merges one or more [user identities](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) into a primary user identity, for when the same person ended up with more than one user identity. + /// + /// The primary user identity takes on any email address or phone number it was missing from the user identities merged into it, and the merged user identities are then deleted. Their IDs and keys keep working: looking one up returns the primary user identity, and they are listed on it as `merged_user_identity_ids` and `merged_user_identity_keys`. + /// + /// Access grants, access system users, client sessions and other resources belonging to the merged user identities are moved to the primary user identity. + /// + /// Identify the user identities either by ID or by key, but not both in the same request. Repeating a merge that has already been applied makes no further changes. + /// + public void Merge(MergeRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + _seam.Post("/user_identities/merge", requestOptions); + } + + /// + /// Merges one or more [user identities](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) into a primary user identity, for when the same person ended up with more than one user identity. + /// + /// The primary user identity takes on any email address or phone number it was missing from the user identities merged into it, and the merged user identities are then deleted. Their IDs and keys keep working: looking one up returns the primary user identity, and they are listed on it as `merged_user_identity_ids` and `merged_user_identity_keys`. + /// + /// Access grants, access system users, client sessions and other resources belonging to the merged user identities are moved to the primary user identity. + /// + /// Identify the user identities either by ID or by key, but not both in the same request. Repeating a merge that has already been applied makes no further changes. + /// + public void Merge( + List? mergedUserIdentityIds = default, + string? userIdentityId = default, + List? mergedUserIdentityKeys = default, + string? userIdentityKey = default + ) + { + Merge( + new MergeRequest( + mergedUserIdentityIds: mergedUserIdentityIds, + userIdentityId: userIdentityId, + mergedUserIdentityKeys: mergedUserIdentityKeys, + userIdentityKey: userIdentityKey + ) + ); + } + + /// + /// Merges one or more [user identities](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) into a primary user identity, for when the same person ended up with more than one user identity. + /// + /// The primary user identity takes on any email address or phone number it was missing from the user identities merged into it, and the merged user identities are then deleted. Their IDs and keys keep working: looking one up returns the primary user identity, and they are listed on it as `merged_user_identity_ids` and `merged_user_identity_keys`. + /// + /// Access grants, access system users, client sessions and other resources belonging to the merged user identities are moved to the primary user identity. + /// + /// Identify the user identities either by ID or by key, but not both in the same request. Repeating a merge that has already been applied makes no further changes. + /// + public async Task MergeAsync(MergeRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + await _seam.PostAsync("/user_identities/merge", requestOptions); + } + + /// + /// Merges one or more [user identities](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) into a primary user identity, for when the same person ended up with more than one user identity. + /// + /// The primary user identity takes on any email address or phone number it was missing from the user identities merged into it, and the merged user identities are then deleted. Their IDs and keys keep working: looking one up returns the primary user identity, and they are listed on it as `merged_user_identity_ids` and `merged_user_identity_keys`. + /// + /// Access grants, access system users, client sessions and other resources belonging to the merged user identities are moved to the primary user identity. + /// + /// Identify the user identities either by ID or by key, but not both in the same request. Repeating a merge that has already been applied makes no further changes. + /// + public async Task MergeAsync( + List? mergedUserIdentityIds = default, + string? userIdentityId = default, + List? mergedUserIdentityKeys = default, + string? userIdentityKey = default + ) + { + await MergeAsync( + new MergeRequest( + mergedUserIdentityIds: mergedUserIdentityIds, + userIdentityId: userIdentityId, + mergedUserIdentityKeys: mergedUserIdentityKeys, + userIdentityKey: userIdentityKey + ) + ); + } + /// /// Request parameters for Remove an ACS User from a User Identity. /// @@ -1571,7 +1729,7 @@ public void RemoveAcsUser(RemoveAcsUserRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; - _seam.Post("/user_identities/remove_acs_user", requestOptions); + _seam.Delete("/user_identities/remove_acs_user", requestOptions); } /// @@ -1591,7 +1749,7 @@ public async Task RemoveAcsUserAsync(RemoveAcsUserRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; - await _seam.PostAsync("/user_identities/remove_acs_user", requestOptions); + await _seam.DeleteAsync("/user_identities/remove_acs_user", requestOptions); } /// @@ -1664,7 +1822,7 @@ public void RevokeAccessToDevice(RevokeAccessToDeviceRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; - _seam.Post("/user_identities/revoke_access_to_device", requestOptions); + _seam.Delete("/user_identities/revoke_access_to_device", requestOptions); } /// @@ -1684,7 +1842,7 @@ public async Task RevokeAccessToDeviceAsync(RevokeAccessToDeviceRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; - await _seam.PostAsync( + await _seam.DeleteAsync( "/user_identities/revoke_access_to_device", requestOptions ); diff --git a/output/csharp/src/Seam/Api/UsersAcs.cs b/output/csharp/src/Seam/Api/UsersAcs.cs index 5d410fb8..152d54ca 100644 --- a/output/csharp/src/Seam/Api/UsersAcs.cs +++ b/output/csharp/src/Seam/Api/UsersAcs.cs @@ -446,7 +446,7 @@ public void Delete(DeleteRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; - _seam.Post("/acs/users/delete", requestOptions); + _seam.Delete("/acs/users/delete", requestOptions); } /// @@ -474,7 +474,7 @@ public async Task DeleteAsync(DeleteRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; - await _seam.PostAsync("/acs/users/delete", requestOptions); + await _seam.DeleteAsync("/acs/users/delete", requestOptions); } /// @@ -598,7 +598,7 @@ public AcsUser Get(GetRequest request) var requestOptions = new RequestOptions(); requestOptions.Data = request; return _seam - .Post("/acs/users/get", requestOptions) + .Get("/acs/users/get", requestOptions) .EnsureData("/acs/users/get") .AcsUser; } @@ -628,7 +628,7 @@ public async Task GetAsync(GetRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; - return (await _seam.PostAsync("/acs/users/get", requestOptions)) + return (await _seam.GetAsync("/acs/users/get", requestOptions)) .EnsureData("/acs/users/get") .AcsUser; } @@ -714,7 +714,7 @@ public ListRequest( public string? Search { get; set; } /// - /// Email address of the user identity for which you want to retrieve all access system users. + /// Email address of the user identity for which you want to retrieve all access system users. Specify `null` to retrieve access system users whose user identity has no email address. /// [DataMember( Name = "user_identity_email_address", @@ -730,7 +730,7 @@ public ListRequest( public string? UserIdentityId { get; set; } /// - /// Phone number of the user identity for which you want to retrieve all access system users, in [E.164 format](https://www.itu.int/rec/T-REC-E.164/en) (for example, `+15555550100`). + /// Phone number of the user identity for which you want to retrieve all access system users, in [E.164 format](https://www.itu.int/rec/T-REC-E.164/en) (for example, `+15555550100`). Specify `null` to retrieve access system users whose user identity has no phone number. /// [DataMember( Name = "user_identity_phone_number", @@ -804,7 +804,7 @@ public List List(ListRequest request) var requestOptions = new RequestOptions(); requestOptions.Data = request; return _seam - .Post("/acs/users/list", requestOptions) + .Get("/acs/users/list", requestOptions) .EnsureData("/acs/users/list") .AcsUsers; } @@ -844,7 +844,7 @@ public async Task> ListAsync(ListRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; - return (await _seam.PostAsync("/acs/users/list", requestOptions)) + return (await _seam.GetAsync("/acs/users/list", requestOptions)) .EnsureData("/acs/users/list") .AcsUsers; } @@ -982,7 +982,7 @@ public List ListAccessibleEntrances(ListAccessibleEntrancesRequest var requestOptions = new RequestOptions(); requestOptions.Data = request; return _seam - .Post( + .Get( "/acs/users/list_accessible_entrances", requestOptions ) @@ -1018,7 +1018,7 @@ ListAccessibleEntrancesRequest request var requestOptions = new RequestOptions(); requestOptions.Data = request; return ( - await _seam.PostAsync( + await _seam.GetAsync( "/acs/users/list_accessible_entrances", requestOptions ) @@ -1112,7 +1112,7 @@ public void RemoveFromAccessGroup(RemoveFromAccessGroupRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; - _seam.Post("/acs/users/remove_from_access_group", requestOptions); + _seam.Delete("/acs/users/remove_from_access_group", requestOptions); } /// @@ -1140,7 +1140,7 @@ public async Task RemoveFromAccessGroupAsync(RemoveFromAccessGroupRequest reques { var requestOptions = new RequestOptions(); requestOptions.Data = request; - await _seam.PostAsync("/acs/users/remove_from_access_group", requestOptions); + await _seam.DeleteAsync("/acs/users/remove_from_access_group", requestOptions); } /// diff --git a/output/csharp/src/Seam/Api/Webhooks.cs b/output/csharp/src/Seam/Api/Webhooks.cs index 917c9730..7256e4e1 100644 --- a/output/csharp/src/Seam/Api/Webhooks.cs +++ b/output/csharp/src/Seam/Api/Webhooks.cs @@ -193,7 +193,7 @@ public void Delete(DeleteRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; - _seam.Post("/webhooks/delete", requestOptions); + _seam.Delete("/webhooks/delete", requestOptions); } /// @@ -211,7 +211,7 @@ public async Task DeleteAsync(DeleteRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; - await _seam.PostAsync("/webhooks/delete", requestOptions); + await _seam.DeleteAsync("/webhooks/delete", requestOptions); } /// @@ -307,7 +307,7 @@ public Webhook Get(GetRequest request) var requestOptions = new RequestOptions(); requestOptions.Data = request; return _seam - .Post("/webhooks/get", requestOptions) + .Get("/webhooks/get", requestOptions) .EnsureData("/webhooks/get") .Webhook; } @@ -327,7 +327,7 @@ public async Task GetAsync(GetRequest request) { var requestOptions = new RequestOptions(); requestOptions.Data = request; - return (await _seam.PostAsync("/webhooks/get", requestOptions)) + return (await _seam.GetAsync("/webhooks/get", requestOptions)) .EnsureData("/webhooks/get") .Webhook; } diff --git a/output/csharp/src/Seam/Model/AccessCode.cs b/output/csharp/src/Seam/Model/AccessCode.cs index dd34685c..c016906e 100644 --- a/output/csharp/src/Seam/Model/AccessCode.cs +++ b/output/csharp/src/Seam/Model/AccessCode.cs @@ -115,6 +115,10 @@ public AccessCode( typeof(AccessCodeErrorsDormakabaSitesDisconnected), "dormakaba_sites_disconnected" )] + [JsonSubtypes.KnownSubType( + typeof(AccessCodeErrorsInsufficientPermissions), + "insufficient_permissions" + )] [JsonSubtypes.KnownSubType( typeof(AccessCodeErrorsSaltoKsSubscriptionLimitExceeded), "salto_ks_subscription_limit_exceeded" @@ -124,8 +128,8 @@ public AccessCode( "account_disconnected" )] [JsonSubtypes.KnownSubType( - typeof(AccessCodeErrorsInsufficientPermissions), - "insufficient_permissions" + typeof(AccessCodeErrorsCodeConstraintsViolated), + "code_constraints_violated" )] [JsonSubtypes.KnownSubType( typeof(AccessCodeErrorsAccessCodeInactive), @@ -724,13 +728,13 @@ public override string ToString() } } - [DataContract(Name = "seamModel_accessCodeErrorsInsufficientPermissions_model")] - public class AccessCodeErrorsInsufficientPermissions : AccessCodeErrors + [DataContract(Name = "seamModel_accessCodeErrorsCodeConstraintsViolated_model")] + public class AccessCodeErrorsCodeConstraintsViolated : AccessCodeErrors { [JsonConstructorAttribute] - protected AccessCodeErrorsInsufficientPermissions() { } + protected AccessCodeErrorsCodeConstraintsViolated() { } - public AccessCodeErrorsInsufficientPermissions( + public AccessCodeErrorsCodeConstraintsViolated( string? createdAt = default, string errorCode = default, bool isAccessCodeError = default, @@ -750,7 +754,7 @@ public AccessCodeErrorsInsufficientPermissions( public string? CreatedAt { get; set; } [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "insufficient_permissions"; + public override string ErrorCode { get; } = "code_constraints_violated"; /// /// Indicates that this is an access code error. @@ -932,6 +936,78 @@ public override string ToString() } } + [DataContract(Name = "seamModel_accessCodeErrorsInsufficientPermissions_model")] + public class AccessCodeErrorsInsufficientPermissions : AccessCodeErrors + { + [JsonConstructorAttribute] + protected AccessCodeErrorsInsufficientPermissions() { } + + public AccessCodeErrorsInsufficientPermissions( + string createdAt = default, + string errorCode = default, + bool isConnectedAccountError = default, + bool isDeviceError = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + IsConnectedAccountError = isConnectedAccountError; + IsDeviceError = isDeviceError; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "insufficient_permissions"; + + /// + /// Indicates that the error is a [connected account](https://docs.seam.co/api/connected_accounts) error. + /// + [DataMember( + Name = "is_connected_account_error", + IsRequired = false, + EmitDefaultValue = false + )] + public bool IsConnectedAccountError { get; set; } + + /// + /// Indicates that the error is not a device error. + /// + [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] + public bool IsDeviceError { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { 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 = "seamModel_accessCodeErrorsDormakabaSitesDisconnected_model")] public class AccessCodeErrorsDormakabaSitesDisconnected : AccessCodeErrors { diff --git a/output/csharp/src/Seam/Model/AccessGrant.cs b/output/csharp/src/Seam/Model/AccessGrant.cs index a897045a..1e7409fb 100644 --- a/output/csharp/src/Seam/Model/AccessGrant.cs +++ b/output/csharp/src/Seam/Model/AccessGrant.cs @@ -25,6 +25,7 @@ public AccessGrant( string createdAt = default, string? customizationProfileId = default, string displayName = default, + string displayStatus = default, string? endsAt = default, List errors = default, string? instantKeyUrl = default, @@ -47,6 +48,7 @@ public AccessGrant( CreatedAt = createdAt; CustomizationProfileId = customizationProfileId; DisplayName = displayName; + DisplayStatus = displayStatus; EndsAt = endsAt; Errors = errors; InstantKeyUrl = instantKeyUrl; @@ -1227,6 +1229,12 @@ public override string ToString() [DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] public string DisplayName { get; set; } + /// + /// Human-readable sentence answering whether the user can currently get in, for example `Awaiting encoding` on an access method or `Upcoming` here. For display only. The wording is not stable and is not an enumeration — it may change at any time, so never compare against or branch on it. To make decisions, read `starts_at`, `ends_at`, `errors`, and the access methods' own fields. + /// + [DataMember(Name = "display_status", IsRequired = false, EmitDefaultValue = false)] + public string DisplayStatus { get; set; } + /// /// Date and time at which the Access Grant ends. /// diff --git a/output/csharp/src/Seam/Model/AccessMethod.cs b/output/csharp/src/Seam/Model/AccessMethod.cs index 4934a95f..f8635235 100644 --- a/output/csharp/src/Seam/Model/AccessMethod.cs +++ b/output/csharp/src/Seam/Model/AccessMethod.cs @@ -24,6 +24,7 @@ public AccessMethod( string createdAt = default, string? customizationProfileId = default, string displayName = default, + string displayStatus = default, List errors = default, string? instantKeyUrl = default, bool? isAssignmentRequired = default, @@ -44,6 +45,7 @@ public AccessMethod( CreatedAt = createdAt; CustomizationProfileId = customizationProfileId; DisplayName = displayName; + DisplayStatus = displayStatus; Errors = errors; InstantKeyUrl = instantKeyUrl; IsAssignmentRequired = isAssignmentRequired; @@ -1060,6 +1062,12 @@ public override string ToString() [DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] public string DisplayName { get; set; } + /// + /// Human-readable sentence describing where the access method sits in its relationship with the device or access system, for example `Awaiting encoding`. For display only. The wording is not stable and is not an enumeration — it may change at any time, so never compare against or branch on it. To make decisions, read `is_issued`, `errors`, and `pending_mutations`. + /// + [DataMember(Name = "display_status", IsRequired = false, EmitDefaultValue = false)] + public string DisplayStatus { get; set; } + /// /// Errors associated with the [access method](https://docs.seam.co/use-cases/granting-access/creating-an-access-grant). /// diff --git a/output/csharp/src/Seam/Model/AcsAccessGroup.cs b/output/csharp/src/Seam/Model/AcsAccessGroup.cs index 0feac3aa..3398e6e1 100644 --- a/output/csharp/src/Seam/Model/AcsAccessGroup.cs +++ b/output/csharp/src/Seam/Model/AcsAccessGroup.cs @@ -90,6 +90,9 @@ public enum AccessGroupTypeEnum [EnumMember(Value = "kisi_access_group")] KisiAccessGroup = 9, + + [EnumMember(Value = "akiles_member_group")] + AkilesMemberGroup = 10, } [JsonConverter(typeof(JsonSubtypes), "error_code")] @@ -248,6 +251,9 @@ public enum ExternalTypeEnum [EnumMember(Value = "kisi_access_group")] KisiAccessGroup = 9, + + [EnumMember(Value = "akiles_member_group")] + AkilesMemberGroup = 10, } [JsonConverter(typeof(JsonSubtypes), "mutation_code")] diff --git a/output/csharp/src/Seam/Model/AcsCredential.cs b/output/csharp/src/Seam/Model/AcsCredential.cs index f55c3edd..6d821eb1 100644 --- a/output/csharp/src/Seam/Model/AcsCredential.cs +++ b/output/csharp/src/Seam/Model/AcsCredential.cs @@ -29,6 +29,7 @@ public AcsCredential( string? acsCredentialPoolId = default, string acsSystemId = default, string? acsUserId = default, + AcsCredentialAkilesMetadata? akilesMetadata = default, AcsCredentialAssaAbloyVostioMetadata? assaAbloyVostioMetadata = default, string? cardNumber = default, string? code = default, @@ -59,6 +60,7 @@ public AcsCredential( AcsCredentialPoolId = acsCredentialPoolId; AcsSystemId = acsSystemId; AcsUserId = acsUserId; + AkilesMetadata = akilesMetadata; AssaAbloyVostioMetadata = assaAbloyVostioMetadata; CardNumber = cardNumber; Code = code; @@ -153,10 +155,17 @@ public enum ExternalTypeEnum [EnumMember(Value = "kisi_credential")] KisiCredential = 13, + + [EnumMember(Value = "akiles_credential")] + AkilesCredential = 14, } [JsonConverter(typeof(JsonSubtypes), "warning_code")] [JsonSubtypes.FallBackSubType(typeof(AcsCredentialWarningsUnrecognized))] + [JsonSubtypes.KnownSubType( + typeof(AcsCredentialWarningsRequestedCodeUnavailable), + "requested_code_unavailable" + )] [JsonSubtypes.KnownSubType( typeof(AcsCredentialWarningsNeedsToBeReissued), "needs_to_be_reissued" @@ -501,6 +510,74 @@ public override string ToString() } } + [DataContract(Name = "seamModel_acsCredentialWarningsRequestedCodeUnavailable_model")] + public class AcsCredentialWarningsRequestedCodeUnavailable : AcsCredentialWarnings + { + [JsonConstructorAttribute] + protected AcsCredentialWarningsRequestedCodeUnavailable() { } + + public AcsCredentialWarningsRequestedCodeUnavailable( + string createdAt = default, + string message = default, + string newCode = default, + string originalCode = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + NewCode = newCode; + OriginalCode = originalCode; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + /// + /// The PIN code that was assigned instead. + /// + [DataMember(Name = "new_code", IsRequired = false, EmitDefaultValue = false)] + public string NewCode { get; set; } + + /// + /// The originally requested PIN code that could not be used. + /// + [DataMember(Name = "original_code", IsRequired = false, EmitDefaultValue = false)] + public string OriginalCode { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "requested_code_unavailable"; + + 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 = "seamModel_acsCredentialWarningsUnrecognized_model")] public class AcsCredentialWarningsUnrecognized : AcsCredentialWarnings { @@ -583,6 +660,12 @@ public override string ToString() [DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] public string? AcsUserId { get; set; } + /// + /// Akiles-specific metadata for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). + /// + [DataMember(Name = "akiles_metadata", IsRequired = false, EmitDefaultValue = false)] + public AcsCredentialAkilesMetadata? AkilesMetadata { get; set; } + /// /// Vostio-specific metadata for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). /// @@ -765,6 +848,43 @@ public override string ToString() } } + [DataContract(Name = "seamModel_acsCredentialAkilesMetadata_model")] + public class AcsCredentialAkilesMetadata + { + [JsonConstructorAttribute] + protected AcsCredentialAkilesMetadata() { } + + public AcsCredentialAkilesMetadata(string? memberPinId = default) + { + MemberPinId = memberPinId; + } + + /// + /// ID of the Akiles member PIN. + /// + [DataMember(Name = "member_pin_id", IsRequired = false, EmitDefaultValue = false)] + public string? MemberPinId { 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 = "seamModel_acsCredentialAssaAbloyVostioMetadata_model")] public class AcsCredentialAssaAbloyVostioMetadata { diff --git a/output/csharp/src/Seam/Model/AcsEntrance.cs b/output/csharp/src/Seam/Model/AcsEntrance.cs index ffe02247..26ce81fd 100644 --- a/output/csharp/src/Seam/Model/AcsEntrance.cs +++ b/output/csharp/src/Seam/Model/AcsEntrance.cs @@ -22,6 +22,7 @@ protected AcsEntrance() { } public AcsEntrance( string acsEntranceId = default, string acsSystemId = default, + AcsEntranceAkilesMetadata? akilesMetadata = default, AcsEntranceAssaAbloyVostioMetadata? assaAbloyVostioMetadata = default, AcsEntranceAvigilonAltaMetadata? avigilonAltaMetadata = default, AcsEntranceBrivoMetadata? brivoMetadata = default, @@ -48,6 +49,7 @@ public AcsEntrance( { AcsEntranceId = acsEntranceId; AcsSystemId = acsSystemId; + AkilesMetadata = akilesMetadata; AssaAbloyVostioMetadata = assaAbloyVostioMetadata; AvigilonAltaMetadata = avigilonAltaMetadata; BrivoMetadata = brivoMetadata; @@ -430,6 +432,12 @@ public override string ToString() [DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] public string AcsSystemId { get; set; } + /// + /// Akiles-specific metadata associated with the [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details). + /// + [DataMember(Name = "akiles_metadata", IsRequired = false, EmitDefaultValue = false)] + public AcsEntranceAkilesMetadata? AkilesMetadata { get; set; } + /// /// ASSA ABLOY Vostio-specific metadata associated with the [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details). /// @@ -606,6 +614,113 @@ public override string ToString() } } + [DataContract(Name = "seamModel_acsEntranceAkilesMetadata_model")] + public class AcsEntranceAkilesMetadata + { + [JsonConstructorAttribute] + protected AcsEntranceAkilesMetadata() { } + + public AcsEntranceAkilesMetadata( + List? actions = default, + string? gadgetId = default, + string? siteId = default, + string? siteName = default + ) + { + Actions = actions; + GadgetId = gadgetId; + SiteId = siteId; + SiteName = siteName; + } + + /// + /// Actions the gadget exposes (for example, open). + /// + [DataMember(Name = "actions", IsRequired = false, EmitDefaultValue = false)] + public List? Actions { get; set; } + + /// + /// ID of the Akiles gadget. + /// + [DataMember(Name = "gadget_id", IsRequired = false, EmitDefaultValue = false)] + public string? GadgetId { get; set; } + + /// + /// ID of the Akiles site the gadget belongs to. + /// + [DataMember(Name = "site_id", IsRequired = false, EmitDefaultValue = false)] + public string? SiteId { get; set; } + + /// + /// Name of the Akiles site the gadget belongs to. + /// + [DataMember(Name = "site_name", IsRequired = false, EmitDefaultValue = false)] + public string? SiteName { 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 = "seamModel_acsEntranceAkilesMetadataActions_model")] + public class AcsEntranceAkilesMetadataActions + { + [JsonConstructorAttribute] + protected AcsEntranceAkilesMetadataActions() { } + + public AcsEntranceAkilesMetadataActions(string? id = default, string? name = default) + { + Id = id; + Name = name; + } + + /// + /// ID of the gadget action. + /// + [DataMember(Name = "id", IsRequired = false, EmitDefaultValue = false)] + public string? Id { get; set; } + + /// + /// Name of the gadget action. + /// + [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] + public string? Name { 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 = "seamModel_acsEntranceAssaAbloyVostioMetadata_model")] public class AcsEntranceAssaAbloyVostioMetadata { diff --git a/output/csharp/src/Seam/Model/AcsSystem.cs b/output/csharp/src/Seam/Model/AcsSystem.cs index 9dad8006..364eb5e0 100644 --- a/output/csharp/src/Seam/Model/AcsSystem.cs +++ b/output/csharp/src/Seam/Model/AcsSystem.cs @@ -84,6 +84,10 @@ public AcsSystem( typeof(AcsSystemErrorsAcsSystemDisconnected), "acs_system_disconnected" )] + [JsonSubtypes.KnownSubType( + typeof(AcsSystemErrorsInsufficientPermissions), + "insufficient_permissions" + )] [JsonSubtypes.KnownSubType( typeof(AcsSystemErrorsSaltoKsSubscriptionLimitExceeded), "salto_ks_subscription_limit_exceeded" @@ -327,6 +331,58 @@ public override string ToString() } } + [DataContract(Name = "seamModel_acsSystemErrorsInsufficientPermissions_model")] + public class AcsSystemErrorsInsufficientPermissions : AcsSystemErrors + { + [JsonConstructorAttribute] + protected AcsSystemErrorsInsufficientPermissions() { } + + public AcsSystemErrorsInsufficientPermissions( + string createdAt = default, + string errorCode = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "insufficient_permissions"; + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { 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 = "seamModel_acsSystemErrorsAcsSystemDisconnected_model")] public class AcsSystemErrorsAcsSystemDisconnected : AcsSystemErrors { @@ -643,6 +699,9 @@ public enum ExternalTypeEnum [EnumMember(Value = "kisi_organization")] KisiOrganization = 16, + + [EnumMember(Value = "akiles_organization")] + AkilesOrganization = 17, } [JsonConverter(typeof(SafeStringEnumConverter))] @@ -698,10 +757,17 @@ public enum SystemTypeEnum [EnumMember(Value = "kisi_organization")] KisiOrganization = 16, + + [EnumMember(Value = "akiles_organization")] + AkilesOrganization = 17, } [JsonConverter(typeof(JsonSubtypes), "warning_code")] [JsonSubtypes.FallBackSubType(typeof(AcsSystemWarningsUnrecognized))] + [JsonSubtypes.KnownSubType( + typeof(AcsSystemWarningsUnknownIssueWithAcsSystem), + "unknown_issue_with_acs_system" + )] [JsonSubtypes.KnownSubType(typeof(AcsSystemWarningsSetupRequired), "setup_required")] [JsonSubtypes.KnownSubType( typeof(AcsSystemWarningsTimeZoneDoesNotMatchLocation), @@ -891,6 +957,58 @@ public override string ToString() } } + [DataContract(Name = "seamModel_acsSystemWarningsUnknownIssueWithAcsSystem_model")] + public class AcsSystemWarningsUnknownIssueWithAcsSystem : AcsSystemWarnings + { + [JsonConstructorAttribute] + protected AcsSystemWarningsUnknownIssueWithAcsSystem() { } + + public AcsSystemWarningsUnknownIssueWithAcsSystem( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "unknown_issue_with_acs_system"; + + 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 = "seamModel_acsSystemWarningsUnrecognized_model")] public class AcsSystemWarningsUnrecognized : AcsSystemWarnings { diff --git a/output/csharp/src/Seam/Model/ActionAttempt.cs b/output/csharp/src/Seam/Model/ActionAttempt.cs index f22a6287..5387e6fb 100644 --- a/output/csharp/src/Seam/Model/ActionAttempt.cs +++ b/output/csharp/src/Seam/Model/ActionAttempt.cs @@ -553,7 +553,7 @@ protected ActionAttemptScanCredentialResult() { } public ActionAttemptScanCredentialResult( ActionAttemptScanCredentialResultAcsCredentialOnEncoder? acsCredentialOnEncoder = default, - ActionAttemptScanCredentialResultAcsCredentialOnSeam acsCredentialOnSeam = default, + ActionAttemptScanCredentialResultAcsCredentialOnSeam? acsCredentialOnSeam = default, List warnings = default ) { @@ -576,7 +576,7 @@ public ActionAttemptScanCredentialResult( /// Corresponding credential data as stored on Seam and the access system. /// [DataMember(Name = "acs_credential_on_seam", IsRequired = false, EmitDefaultValue = false)] - public ActionAttemptScanCredentialResultAcsCredentialOnSeam AcsCredentialOnSeam { get; set; } + public ActionAttemptScanCredentialResultAcsCredentialOnSeam? AcsCredentialOnSeam { get; set; } /// /// Warnings related to scanning the credential, such as mismatches between the credential data currently encoded on the card and the corresponding data stored on Seam and the access system. @@ -843,6 +843,8 @@ public ActionAttemptScanCredentialResultAcsCredentialOnSeam( string? acsCredentialPoolId = default, string acsSystemId = default, string? acsUserId = default, + ActionAttemptScanCredentialResultAcsCredentialOnSeamAkilesMetadata? akilesMetadata = + default, ActionAttemptScanCredentialResultAcsCredentialOnSeamAssaAbloyVostioMetadata? assaAbloyVostioMetadata = default, string? cardNumber = default, @@ -876,6 +878,7 @@ public ActionAttemptScanCredentialResultAcsCredentialOnSeam( AcsCredentialPoolId = acsCredentialPoolId; AcsSystemId = acsSystemId; AcsUserId = acsUserId; + AkilesMetadata = akilesMetadata; AssaAbloyVostioMetadata = assaAbloyVostioMetadata; CardNumber = cardNumber; Code = code; @@ -970,6 +973,9 @@ public enum ExternalTypeEnum [EnumMember(Value = "kisi_credential")] KisiCredential = 13, + + [EnumMember(Value = "akiles_credential")] + AkilesCredential = 14, } /// @@ -1002,6 +1008,12 @@ public enum ExternalTypeEnum [DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] public string? AcsUserId { get; set; } + /// + /// Akiles-specific metadata for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). + /// + [DataMember(Name = "akiles_metadata", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptScanCredentialResultAcsCredentialOnSeamAkilesMetadata? AkilesMetadata { get; set; } + /// /// Vostio-specific metadata for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). /// @@ -1181,6 +1193,47 @@ public override string ToString() } } + [DataContract( + Name = "seamModel_actionAttemptScanCredentialResultAcsCredentialOnSeamAkilesMetadata_model" + )] + public class ActionAttemptScanCredentialResultAcsCredentialOnSeamAkilesMetadata + { + [JsonConstructorAttribute] + protected ActionAttemptScanCredentialResultAcsCredentialOnSeamAkilesMetadata() { } + + public ActionAttemptScanCredentialResultAcsCredentialOnSeamAkilesMetadata( + string? memberPinId = default + ) + { + MemberPinId = memberPinId; + } + + /// + /// ID of the Akiles member PIN. + /// + [DataMember(Name = "member_pin_id", IsRequired = false, EmitDefaultValue = false)] + public string? MemberPinId { 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 = "seamModel_actionAttemptScanCredentialResultAcsCredentialOnSeamAssaAbloyVostioMetadata_model" )] @@ -1447,12 +1500,16 @@ public ActionAttemptScanCredentialResultAcsCredentialOnSeamWarnings( string createdAt = default, string message = default, ActionAttemptScanCredentialResultAcsCredentialOnSeamWarnings.WarningCodeEnum warningCode = - default + default, + string? newCode = default, + string? originalCode = default ) { CreatedAt = createdAt; Message = message; WarningCode = warningCode; + NewCode = newCode; + OriginalCode = originalCode; } /// @@ -1481,6 +1538,9 @@ public enum WarningCodeEnum [EnumMember(Value = "needs_to_be_reissued")] NeedsToBeReissued = 6, + + [EnumMember(Value = "requested_code_unavailable")] + RequestedCodeUnavailable = 7, } /// @@ -1501,6 +1561,18 @@ public enum WarningCodeEnum [DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] public ActionAttemptScanCredentialResultAcsCredentialOnSeamWarnings.WarningCodeEnum WarningCode { get; set; } + /// + /// The PIN code that was assigned instead. + /// + [DataMember(Name = "new_code", IsRequired = false, EmitDefaultValue = false)] + public string? NewCode { get; set; } + + /// + /// The originally requested PIN code that could not be used. + /// + [DataMember(Name = "original_code", IsRequired = false, EmitDefaultValue = false)] + public string? OriginalCode { get; set; } + public override string ToString() { JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); @@ -1764,6 +1836,7 @@ public ActionAttemptEncodeCredentialResult( string? acsCredentialPoolId = default, string acsSystemId = default, string? acsUserId = default, + ActionAttemptEncodeCredentialResultAkilesMetadata? akilesMetadata = default, ActionAttemptEncodeCredentialResultAssaAbloyVostioMetadata? assaAbloyVostioMetadata = default, string? cardNumber = default, @@ -1795,6 +1868,7 @@ public ActionAttemptEncodeCredentialResult( AcsCredentialPoolId = acsCredentialPoolId; AcsSystemId = acsSystemId; AcsUserId = acsUserId; + AkilesMetadata = akilesMetadata; AssaAbloyVostioMetadata = assaAbloyVostioMetadata; CardNumber = cardNumber; Code = code; @@ -1889,6 +1963,9 @@ public enum ExternalTypeEnum [EnumMember(Value = "kisi_credential")] KisiCredential = 13, + + [EnumMember(Value = "akiles_credential")] + AkilesCredential = 14, } /// @@ -1921,6 +1998,12 @@ public enum ExternalTypeEnum [DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] public string? AcsUserId { get; set; } + /// + /// Akiles-specific metadata for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). + /// + [DataMember(Name = "akiles_metadata", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptEncodeCredentialResultAkilesMetadata? AkilesMetadata { get; set; } + /// /// Vostio-specific metadata for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). /// @@ -2100,6 +2183,43 @@ public override string ToString() } } + [DataContract(Name = "seamModel_actionAttemptEncodeCredentialResultAkilesMetadata_model")] + public class ActionAttemptEncodeCredentialResultAkilesMetadata + { + [JsonConstructorAttribute] + protected ActionAttemptEncodeCredentialResultAkilesMetadata() { } + + public ActionAttemptEncodeCredentialResultAkilesMetadata(string? memberPinId = default) + { + MemberPinId = memberPinId; + } + + /// + /// ID of the Akiles member PIN. + /// + [DataMember(Name = "member_pin_id", IsRequired = false, EmitDefaultValue = false)] + public string? MemberPinId { 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 = "seamModel_actionAttemptEncodeCredentialResultAssaAbloyVostioMetadata_model" )] @@ -2359,12 +2479,16 @@ protected ActionAttemptEncodeCredentialResultWarnings() { } public ActionAttemptEncodeCredentialResultWarnings( string createdAt = default, string message = default, - ActionAttemptEncodeCredentialResultWarnings.WarningCodeEnum warningCode = default + ActionAttemptEncodeCredentialResultWarnings.WarningCodeEnum warningCode = default, + string? newCode = default, + string? originalCode = default ) { CreatedAt = createdAt; Message = message; WarningCode = warningCode; + NewCode = newCode; + OriginalCode = originalCode; } /// @@ -2393,6 +2517,9 @@ public enum WarningCodeEnum [EnumMember(Value = "needs_to_be_reissued")] NeedsToBeReissued = 6, + + [EnumMember(Value = "requested_code_unavailable")] + RequestedCodeUnavailable = 7, } /// @@ -2413,6 +2540,18 @@ public enum WarningCodeEnum [DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] public ActionAttemptEncodeCredentialResultWarnings.WarningCodeEnum WarningCode { get; set; } + /// + /// The PIN code that was assigned instead. + /// + [DataMember(Name = "new_code", IsRequired = false, EmitDefaultValue = false)] + public string? NewCode { get; set; } + + /// + /// The originally requested PIN code that could not be used. + /// + [DataMember(Name = "original_code", IsRequired = false, EmitDefaultValue = false)] + public string? OriginalCode { get; set; } + public override string ToString() { JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); @@ -2592,6 +2731,7 @@ public ActionAttemptScanToAssignCredentialResult( string? acsCredentialPoolId = default, string acsSystemId = default, string? acsUserId = default, + ActionAttemptScanToAssignCredentialResultAkilesMetadata? akilesMetadata = default, ActionAttemptScanToAssignCredentialResultAssaAbloyVostioMetadata? assaAbloyVostioMetadata = default, string? cardNumber = default, @@ -2624,6 +2764,7 @@ public ActionAttemptScanToAssignCredentialResult( AcsCredentialPoolId = acsCredentialPoolId; AcsSystemId = acsSystemId; AcsUserId = acsUserId; + AkilesMetadata = akilesMetadata; AssaAbloyVostioMetadata = assaAbloyVostioMetadata; CardNumber = cardNumber; Code = code; @@ -2718,6 +2859,9 @@ public enum ExternalTypeEnum [EnumMember(Value = "kisi_credential")] KisiCredential = 13, + + [EnumMember(Value = "akiles_credential")] + AkilesCredential = 14, } /// @@ -2750,6 +2894,12 @@ public enum ExternalTypeEnum [DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] public string? AcsUserId { get; set; } + /// + /// Akiles-specific metadata for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). + /// + [DataMember(Name = "akiles_metadata", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptScanToAssignCredentialResultAkilesMetadata? AkilesMetadata { get; set; } + /// /// Vostio-specific metadata for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). /// @@ -2932,6 +3082,45 @@ public override string ToString() } } + [DataContract(Name = "seamModel_actionAttemptScanToAssignCredentialResultAkilesMetadata_model")] + public class ActionAttemptScanToAssignCredentialResultAkilesMetadata + { + [JsonConstructorAttribute] + protected ActionAttemptScanToAssignCredentialResultAkilesMetadata() { } + + public ActionAttemptScanToAssignCredentialResultAkilesMetadata( + string? memberPinId = default + ) + { + MemberPinId = memberPinId; + } + + /// + /// ID of the Akiles member PIN. + /// + [DataMember(Name = "member_pin_id", IsRequired = false, EmitDefaultValue = false)] + public string? MemberPinId { 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 = "seamModel_actionAttemptScanToAssignCredentialResultAssaAbloyVostioMetadata_model" )] @@ -3193,12 +3382,16 @@ protected ActionAttemptScanToAssignCredentialResultWarnings() { } public ActionAttemptScanToAssignCredentialResultWarnings( string createdAt = default, string message = default, - ActionAttemptScanToAssignCredentialResultWarnings.WarningCodeEnum warningCode = default + ActionAttemptScanToAssignCredentialResultWarnings.WarningCodeEnum warningCode = default, + string? newCode = default, + string? originalCode = default ) { CreatedAt = createdAt; Message = message; WarningCode = warningCode; + NewCode = newCode; + OriginalCode = originalCode; } /// @@ -3227,6 +3420,9 @@ public enum WarningCodeEnum [EnumMember(Value = "needs_to_be_reissued")] NeedsToBeReissued = 6, + + [EnumMember(Value = "requested_code_unavailable")] + RequestedCodeUnavailable = 7, } /// @@ -3247,6 +3443,18 @@ public enum WarningCodeEnum [DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] public ActionAttemptScanToAssignCredentialResultWarnings.WarningCodeEnum WarningCode { get; set; } + /// + /// The PIN code that was assigned instead. + /// + [DataMember(Name = "new_code", IsRequired = false, EmitDefaultValue = false)] + public string? NewCode { get; set; } + + /// + /// The originally requested PIN code that could not be used. + /// + [DataMember(Name = "original_code", IsRequired = false, EmitDefaultValue = false)] + public string? OriginalCode { get; set; } + public override string ToString() { JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); @@ -3427,6 +3635,7 @@ public ActionAttemptAssignCredentialResult( string createdAt = default, string? customizationProfileId = default, string displayName = default, + string displayStatus = default, List errors = default, string? instantKeyUrl = default, bool? isAssignmentRequired = default, @@ -3447,6 +3656,7 @@ public ActionAttemptAssignCredentialResult( CreatedAt = createdAt; CustomizationProfileId = customizationProfileId; DisplayName = displayName; + DisplayStatus = displayStatus; Errors = errors; InstantKeyUrl = instantKeyUrl; IsAssignmentRequired = isAssignmentRequired; @@ -3523,6 +3733,12 @@ public enum ModeEnum [DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] public string DisplayName { get; set; } + /// + /// Human-readable sentence describing where the access method sits in its relationship with the device or access system, for example `Awaiting encoding`. For display only. The wording is not stable and is not an enumeration — it may change at any time, so never compare against or branch on it. To make decisions, read `is_issued`, `errors`, and `pending_mutations`. + /// + [DataMember(Name = "display_status", IsRequired = false, EmitDefaultValue = false)] + public string DisplayStatus { get; set; } + /// /// Errors associated with the [access method](https://docs.seam.co/use-cases/granting-access/creating-an-access-grant). /// @@ -5484,7 +5700,18 @@ public override string ToString() public class ActionAttemptCreateAccessCodeResult { [JsonConstructorAttribute] - public ActionAttemptCreateAccessCodeResult() { } + protected ActionAttemptCreateAccessCodeResult() { } + + public ActionAttemptCreateAccessCodeResult(object accessCode = default) + { + AccessCode = accessCode; + } + + /// + /// Created access code. + /// + [DataMember(Name = "access_code", IsRequired = false, EmitDefaultValue = false)] + public object AccessCode { get; set; } public override string ToString() { @@ -5786,7 +6013,18 @@ public override string ToString() public class ActionAttemptUpdateAccessCodeResult { [JsonConstructorAttribute] - public ActionAttemptUpdateAccessCodeResult() { } + protected ActionAttemptUpdateAccessCodeResult() { } + + public ActionAttemptUpdateAccessCodeResult(object? accessCode = default) + { + AccessCode = accessCode; + } + + /// + /// Updated access code. + /// + [DataMember(Name = "access_code", IsRequired = false, EmitDefaultValue = false)] + public object? AccessCode { get; set; } public override string ToString() { @@ -5940,7 +6178,18 @@ public override string ToString() public class ActionAttemptCreateNoiseThresholdResult { [JsonConstructorAttribute] - public ActionAttemptCreateNoiseThresholdResult() { } + protected ActionAttemptCreateNoiseThresholdResult() { } + + public ActionAttemptCreateNoiseThresholdResult(object noiseThreshold = default) + { + NoiseThreshold = noiseThreshold; + } + + /// + /// Created noise threshold. + /// + [DataMember(Name = "noise_threshold", IsRequired = false, EmitDefaultValue = false)] + public object NoiseThreshold { get; set; } public override string ToString() { @@ -6248,7 +6497,18 @@ public override string ToString() public class ActionAttemptUpdateNoiseThresholdResult { [JsonConstructorAttribute] - public ActionAttemptUpdateNoiseThresholdResult() { } + protected ActionAttemptUpdateNoiseThresholdResult() { } + + public ActionAttemptUpdateNoiseThresholdResult(object noiseThreshold = default) + { + NoiseThreshold = noiseThreshold; + } + + /// + /// Updated noise threshold. + /// + [DataMember(Name = "noise_threshold", IsRequired = false, EmitDefaultValue = false)] + public object NoiseThreshold { get; set; } public override string ToString() { diff --git a/output/csharp/src/Seam/Model/ConnectWebview.cs b/output/csharp/src/Seam/Model/ConnectWebview.cs index 5d21a89e..06bfd28f 100644 --- a/output/csharp/src/Seam/Model/ConnectWebview.cs +++ b/output/csharp/src/Seam/Model/ConnectWebview.cs @@ -186,7 +186,7 @@ public enum StatusEnum public string CreatedAt { get; set; } /// - /// Set of key:value pairs. Adding custom metadata to a resource, such as a [Connect Webview](https://docs.seam.co/core-concepts/connect-webviews/attaching-custom-data-to-the-connect-webview), [connected account](https://docs.seam.co/core-concepts/connected-accounts/adding-custom-metadata-to-a-connected-account), or [device](https://docs.seam.co/core-concepts/devices/adding-custom-metadata-to-a-device), enables you to store custom information, like customer details or internal IDs from your application. + /// Set of key:value pairs. Adding custom metadata to a resource, such as a [Connect Webview](https://docs.seam.co/core-concepts/connect-webviews/attaching-custom-data-to-the-connect-webview), [connected account](https://docs.seam.co/core-concepts/connected-accounts/adding-custom-metadata-to-a-connected-account), or [device](https://docs.seam.co/core-concepts/devices/adding-custom-metadata-to-a-device), enables you to store custom information, like customer details or internal IDs from your application. Keys set to `null` or to an empty string are omitted. /// [DataMember(Name = "custom_metadata", IsRequired = false, EmitDefaultValue = false)] public object CustomMetadata { get; set; } diff --git a/output/csharp/src/Seam/Model/ConnectedAccount.cs b/output/csharp/src/Seam/Model/ConnectedAccount.cs index c0cefa82..e73c53dd 100644 --- a/output/csharp/src/Seam/Model/ConnectedAccount.cs +++ b/output/csharp/src/Seam/Model/ConnectedAccount.cs @@ -1291,7 +1291,7 @@ public override string ToString() public string? CreatedAt { get; set; } /// - /// Set of key:value pairs. Adding custom metadata to a resource, such as a [Connect Webview](https://docs.seam.co/core-concepts/connect-webviews/attaching-custom-data-to-the-connect-webview), [connected account](https://docs.seam.co/core-concepts/connected-accounts/adding-custom-metadata-to-a-connected-account), or [device](https://docs.seam.co/core-concepts/devices/adding-custom-metadata-to-a-device), enables you to store custom information, like customer details or internal IDs from your application. + /// Set of key:value pairs. Adding custom metadata to a resource, such as a [Connect Webview](https://docs.seam.co/core-concepts/connect-webviews/attaching-custom-data-to-the-connect-webview), [connected account](https://docs.seam.co/core-concepts/connected-accounts/adding-custom-metadata-to-a-connected-account), or [device](https://docs.seam.co/core-concepts/devices/adding-custom-metadata-to-a-device), enables you to store custom information, like customer details or internal IDs from your application. Keys set to `null` or to an empty string are omitted. /// [DataMember(Name = "custom_metadata", IsRequired = false, EmitDefaultValue = false)] public object CustomMetadata { get; set; } diff --git a/output/csharp/src/Seam/Model/Device.cs b/output/csharp/src/Seam/Model/Device.cs index ae76ca67..63ed3a1d 100644 --- a/output/csharp/src/Seam/Model/Device.cs +++ b/output/csharp/src/Seam/Model/Device.cs @@ -213,50 +213,56 @@ public enum DeviceTypeEnum [EnumMember(Value = "ultraloq_lock")] UltraloqLock = 26, + [EnumMember(Value = "yacan_lock")] + YacanLock = 27, + [EnumMember(Value = "keyincode_lock")] - KeyincodeLock = 27, + KeyincodeLock = 28, [EnumMember(Value = "omnitec_lock")] - OmnitecLock = 28, + OmnitecLock = 29, [EnumMember(Value = "kisi_lock")] - KisiLock = 29, + KisiLock = 30, + + [EnumMember(Value = "aqara_lock")] + AqaraLock = 31, [EnumMember(Value = "keynest_key")] - KeynestKey = 30, + KeynestKey = 32, [EnumMember(Value = "noiseaware_activity_zone")] - NoiseawareActivityZone = 31, + NoiseawareActivityZone = 33, [EnumMember(Value = "minut_sensor")] - MinutSensor = 32, + MinutSensor = 34, [EnumMember(Value = "ecobee_thermostat")] - EcobeeThermostat = 33, + EcobeeThermostat = 35, [EnumMember(Value = "nest_thermostat")] - NestThermostat = 34, + NestThermostat = 36, [EnumMember(Value = "honeywell_resideo_thermostat")] - HoneywellResideoThermostat = 35, + HoneywellResideoThermostat = 37, [EnumMember(Value = "tado_thermostat")] - TadoThermostat = 36, + TadoThermostat = 38, [EnumMember(Value = "sensi_thermostat")] - SensiThermostat = 37, + SensiThermostat = 39, [EnumMember(Value = "smartthings_thermostat")] - SmartthingsThermostat = 38, + SmartthingsThermostat = 40, [EnumMember(Value = "ios_phone")] - IosPhone = 39, + IosPhone = 41, [EnumMember(Value = "android_phone")] - AndroidPhone = 40, + AndroidPhone = 42, [EnumMember(Value = "ring_camera")] - RingCamera = 41, + RingCamera = 43, } [JsonConverter(typeof(JsonSubtypes), "error_code")] @@ -290,6 +296,10 @@ public enum DeviceTypeEnum typeof(DeviceErrorsDormakabaSitesDisconnected), "dormakaba_sites_disconnected" )] + [JsonSubtypes.KnownSubType( + typeof(DeviceErrorsInsufficientPermissions), + "insufficient_permissions" + )] [JsonSubtypes.KnownSubType( typeof(DeviceErrorsSaltoKsSubscriptionLimitExceeded), "salto_ks_subscription_limit_exceeded" @@ -450,6 +460,78 @@ public override string ToString() } } + [DataContract(Name = "seamModel_deviceErrorsInsufficientPermissions_model")] + public class DeviceErrorsInsufficientPermissions : DeviceErrors + { + [JsonConstructorAttribute] + protected DeviceErrorsInsufficientPermissions() { } + + public DeviceErrorsInsufficientPermissions( + string createdAt = default, + string errorCode = default, + bool isConnectedAccountError = default, + bool isDeviceError = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + IsConnectedAccountError = isConnectedAccountError; + IsDeviceError = isDeviceError; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "insufficient_permissions"; + + /// + /// Indicates that the error is a [connected account](https://docs.seam.co/api/connected_accounts) error. + /// + [DataMember( + Name = "is_connected_account_error", + IsRequired = false, + EmitDefaultValue = false + )] + public bool IsConnectedAccountError { get; set; } + + /// + /// Indicates that the error is not a device error. + /// + [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] + public bool IsDeviceError { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { 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 = "seamModel_deviceErrorsDormakabaSitesDisconnected_model")] public class DeviceErrorsDormakabaSitesDisconnected : DeviceErrors { @@ -1188,10 +1270,6 @@ public override string ToString() [JsonConverter(typeof(JsonSubtypes), "warning_code")] [JsonSubtypes.FallBackSubType(typeof(DeviceWarningsUnrecognized))] - [JsonSubtypes.KnownSubType( - typeof(DeviceWarningsInsufficientPermissions), - "insufficient_permissions" - )] [JsonSubtypes.KnownSubType( typeof(DeviceWarningsMaxAccessCodesReached), "max_access_codes_reached" @@ -2725,58 +2803,6 @@ public override string ToString() } } - [DataContract(Name = "seamModel_deviceWarningsInsufficientPermissions_model")] - public class DeviceWarningsInsufficientPermissions : DeviceWarnings - { - [JsonConstructorAttribute] - protected DeviceWarningsInsufficientPermissions() { } - - public DeviceWarningsInsufficientPermissions( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "insufficient_permissions"; - - 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 = "seamModel_deviceWarningsUnrecognized_model")] public class DeviceWarningsUnrecognized : DeviceWarnings { @@ -3008,7 +3034,7 @@ public override string ToString() public string CreatedAt { get; set; } /// - /// Set of key:value pairs. Adding custom metadata to a resource, such as a [Connect Webview](https://docs.seam.co/core-concepts/connect-webviews/attaching-custom-data-to-the-connect-webview), [connected account](https://docs.seam.co/core-concepts/connected-accounts/adding-custom-metadata-to-a-connected-account), or [device](https://docs.seam.co/core-concepts/devices/adding-custom-metadata-to-a-device), enables you to store custom information, like customer details or internal IDs from your application. + /// Set of key:value pairs. Adding custom metadata to a resource, such as a [Connect Webview](https://docs.seam.co/core-concepts/connect-webviews/attaching-custom-data-to-the-connect-webview), [connected account](https://docs.seam.co/core-concepts/connected-accounts/adding-custom-metadata-to-a-connected-account), or [device](https://docs.seam.co/core-concepts/devices/adding-custom-metadata-to-a-device), enables you to store custom information, like customer details or internal IDs from your application. Keys set to `null` or to an empty string are omitted. /// [DataMember(Name = "custom_metadata", IsRequired = false, EmitDefaultValue = false)] public object CustomMetadata { get; set; } @@ -3237,11 +3263,13 @@ protected DeviceLocation() { } public DeviceLocation( string? locationName = default, + string? roomName = default, string? timeZone = default, string? timezone = default ) { LocationName = locationName; + RoomName = roomName; TimeZone = timeZone; Timezone = timezone; } @@ -3252,6 +3280,12 @@ public DeviceLocation( [DataMember(Name = "location_name", IsRequired = false, EmitDefaultValue = false)] public string? LocationName { get; set; } + /// + /// Name of the room within the device location, when the provider reports one. + /// + [DataMember(Name = "room_name", IsRequired = false, EmitDefaultValue = false)] + public string? RoomName { get; set; } + /// /// Time zone of the device location. /// @@ -3315,6 +3349,7 @@ public DeviceProperties( DevicePropertiesSaltoSpaceCredentialServiceMetadata? saltoSpaceCredentialServiceMetadata = default, DevicePropertiesAkilesMetadata? akilesMetadata = default, + DevicePropertiesAqaraMetadata? aqaraMetadata = default, DevicePropertiesAssaAbloyVostioMetadata? assaAbloyVostioMetadata = default, DevicePropertiesAugustMetadata? augustMetadata = default, DevicePropertiesAvigilonAltaMetadata? avigilonAltaMetadata = default, @@ -3351,6 +3386,7 @@ public DeviceProperties( DevicePropertiesUltraloqMetadata? ultraloqMetadata = default, DevicePropertiesVisionlineMetadata? visionlineMetadata = default, DevicePropertiesWyzeMetadata? wyzeMetadata = default, + DevicePropertiesYacanMetadata? yacanMetadata = default, float? autoLockDelaySeconds = default, bool? autoLockEnabled = default, bool? backupAccessCodePoolEnabled = default, @@ -3422,6 +3458,7 @@ public DeviceProperties( AssaAbloyCredentialServiceMetadata = assaAbloyCredentialServiceMetadata; SaltoSpaceCredentialServiceMetadata = saltoSpaceCredentialServiceMetadata; AkilesMetadata = akilesMetadata; + AqaraMetadata = aqaraMetadata; AssaAbloyVostioMetadata = assaAbloyVostioMetadata; AugustMetadata = augustMetadata; AvigilonAltaMetadata = avigilonAltaMetadata; @@ -3458,6 +3495,7 @@ public DeviceProperties( UltraloqMetadata = ultraloqMetadata; VisionlineMetadata = visionlineMetadata; WyzeMetadata = wyzeMetadata; + YacanMetadata = yacanMetadata; AutoLockDelaySeconds = autoLockDelaySeconds; AutoLockEnabled = autoLockEnabled; BackupAccessCodePoolEnabled = backupAccessCodePoolEnabled; @@ -3749,6 +3787,12 @@ public enum FanModeSettingEnum [DataMember(Name = "akiles_metadata", IsRequired = false, EmitDefaultValue = false)] public DevicePropertiesAkilesMetadata? AkilesMetadata { get; set; } + /// + /// Metadata for an Aqara device. + /// + [DataMember(Name = "aqara_metadata", IsRequired = false, EmitDefaultValue = false)] + public DevicePropertiesAqaraMetadata? AqaraMetadata { get; set; } + /// /// Metadata for an ASSA ABLOY Vostio system. /// @@ -3908,7 +3952,7 @@ public enum FanModeSettingEnum /// /// Metada for a Salto device. /// - [Obsolete("Use `salto_ks_metadata ` instead.")] + [Obsolete("Use `salto_ks_metadata` instead.")] [DataMember(Name = "salto_metadata", IsRequired = false, EmitDefaultValue = false)] public DevicePropertiesSaltoMetadata? SaltoMetadata { get; set; } @@ -3978,6 +4022,12 @@ public enum FanModeSettingEnum [DataMember(Name = "wyze_metadata", IsRequired = false, EmitDefaultValue = false)] public DevicePropertiesWyzeMetadata? WyzeMetadata { get; set; } + /// + /// Metadata for a Yacan device. + /// + [DataMember(Name = "yacan_metadata", IsRequired = false, EmitDefaultValue = false)] + public DevicePropertiesYacanMetadata? YacanMetadata { get; set; } + /// /// The delay in seconds before the lock automatically locks after being unlocked. /// @@ -4867,6 +4917,101 @@ public override string ToString() } } + [DataContract(Name = "seamModel_devicePropertiesAqaraMetadata_model")] + public class DevicePropertiesAqaraMetadata + { + [JsonConstructorAttribute] + protected DevicePropertiesAqaraMetadata() { } + + public DevicePropertiesAqaraMetadata( + string? deviceName = default, + string? did = default, + string? firmwareVersion = default, + string? model = default, + float? modelType = default, + string? parentDid = default, + string? positionId = default, + string? timeZone = default + ) + { + DeviceName = deviceName; + Did = did; + FirmwareVersion = firmwareVersion; + Model = model; + ModelType = modelType; + ParentDid = parentDid; + PositionId = positionId; + TimeZone = timeZone; + } + + /// + /// Device name for an Aqara device. + /// + [DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] + public string? DeviceName { get; set; } + + /// + /// Device ID (did) for an Aqara device. + /// + [DataMember(Name = "did", IsRequired = false, EmitDefaultValue = false)] + public string? Did { get; set; } + + /// + /// Firmware version for an Aqara device. + /// + [DataMember(Name = "firmware_version", IsRequired = false, EmitDefaultValue = false)] + public string? FirmwareVersion { get; set; } + + /// + /// Model identifier for an Aqara device. + /// + [DataMember(Name = "model", IsRequired = false, EmitDefaultValue = false)] + public string? Model { get; set; } + + /// + /// Model type for an Aqara device. + /// + [DataMember(Name = "model_type", IsRequired = false, EmitDefaultValue = false)] + public float? ModelType { get; set; } + + /// + /// Parent gateway device ID for an Aqara device. + /// + [DataMember(Name = "parent_did", IsRequired = false, EmitDefaultValue = false)] + public string? ParentDid { get; set; } + + /// + /// Position (room) ID for an Aqara device. + /// + [DataMember(Name = "position_id", IsRequired = false, EmitDefaultValue = false)] + public string? PositionId { get; set; } + + /// + /// Time zone reported for an Aqara device (e.g. GMT-07:00). + /// + [DataMember(Name = "time_zone", IsRequired = false, EmitDefaultValue = false)] + public string? TimeZone { 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 = "seamModel_devicePropertiesAssaAbloyVostioMetadata_model")] public class DevicePropertiesAssaAbloyVostioMetadata { @@ -5191,7 +5336,7 @@ public class DevicePropertiesDormakabaOracodeMetadata protected DevicePropertiesDormakabaOracodeMetadata() { } public DevicePropertiesDormakabaOracodeMetadata( - DevicePropertiesDormakabaOracodeMetadataDeviceId? deviceId = default, + string? deviceId = default, float? doorId = default, bool? doorIsWireless = default, string? doorName = default, @@ -5216,7 +5361,7 @@ public DevicePropertiesDormakabaOracodeMetadata( /// Device ID for a dormakaba Oracode device. /// [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public DevicePropertiesDormakabaOracodeMetadataDeviceId? DeviceId { get; set; } + public string? DeviceId { get; set; } /// /// Door ID for a dormakaba Oracode device. @@ -5281,32 +5426,6 @@ public override string ToString() } } - [DataContract(Name = "seamModel_devicePropertiesDormakabaOracodeMetadataDeviceId_model")] - public class DevicePropertiesDormakabaOracodeMetadataDeviceId - { - [JsonConstructorAttribute] - public DevicePropertiesDormakabaOracodeMetadataDeviceId() { } - - 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 = "seamModel_devicePropertiesDormakabaOracodeMetadataPredefinedTimeSlots_model" )] @@ -6612,13 +6731,17 @@ public DevicePropertiesNestMetadata( string? deviceCustomName = default, string? deviceName = default, string? displayName = default, - string? nestDeviceId = default + string? nestDeviceId = default, + string? nestStructureId = default, + string? structureName = default ) { DeviceCustomName = deviceCustomName; DeviceName = deviceName; DisplayName = displayName; NestDeviceId = nestDeviceId; + NestStructureId = nestStructureId; + StructureName = structureName; } /// @@ -6645,6 +6768,18 @@ public DevicePropertiesNestMetadata( [DataMember(Name = "nest_device_id", IsRequired = false, EmitDefaultValue = false)] public string? NestDeviceId { get; set; } + /// + /// ID of the Google Nest structure containing the device. + /// + [DataMember(Name = "nest_structure_id", IsRequired = false, EmitDefaultValue = false)] + public string? NestStructureId { get; set; } + + /// + /// Name of the Google Nest structure containing the device. The device owner sets this value. + /// + [DataMember(Name = "structure_name", IsRequired = false, EmitDefaultValue = false)] + public string? StructureName { get; set; } + public override string ToString() { JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); @@ -7295,12 +7430,18 @@ public DevicePropertiesSensiMetadata( string? deviceId = default, string? deviceName = default, bool? dualSetpointsNotSupported = default, + List? enforcedCoolingSetpointRangeCelsius = default, + List? enforcedHeatingSetpointRangeCelsius = default, + List? enforcedSetpointRangeCelsius = default, string? productType = default ) { DeviceId = deviceId; DeviceName = deviceName; DualSetpointsNotSupported = dualSetpointsNotSupported; + EnforcedCoolingSetpointRangeCelsius = enforcedCoolingSetpointRangeCelsius; + EnforcedHeatingSetpointRangeCelsius = enforcedHeatingSetpointRangeCelsius; + EnforcedSetpointRangeCelsius = enforcedSetpointRangeCelsius; ProductType = productType; } @@ -7326,6 +7467,36 @@ public DevicePropertiesSensiMetadata( )] public bool? DualSetpointsNotSupported { get; set; } + /// + /// Enforced cooling setpoint range in Celsius for a Sensi device, derived from an OutOfRange API error. + /// + [DataMember( + Name = "enforced_cooling_setpoint_range_celsius", + IsRequired = false, + EmitDefaultValue = false + )] + public List? EnforcedCoolingSetpointRangeCelsius { get; set; } + + /// + /// Enforced heating setpoint range in Celsius for a Sensi device, derived from an OutOfRange API error. + /// + [DataMember( + Name = "enforced_heating_setpoint_range_celsius", + IsRequired = false, + EmitDefaultValue = false + )] + public List? EnforcedHeatingSetpointRangeCelsius { get; set; } + + /// + /// Legacy combined enforced setpoint range in Celsius for a Sensi device, derived from an OutOfRange API error. Read as a fallback for the per-mode ranges below; no longer written. + /// + [DataMember( + Name = "enforced_setpoint_range_celsius", + IsRequired = false, + EmitDefaultValue = false + )] + public List? EnforcedSetpointRangeCelsius { get; set; } + /// /// Product type for a Sensi device. /// @@ -8013,6 +8184,69 @@ public override string ToString() } } + [DataContract(Name = "seamModel_devicePropertiesYacanMetadata_model")] + public class DevicePropertiesYacanMetadata + { + [JsonConstructorAttribute] + protected DevicePropertiesYacanMetadata() { } + + public DevicePropertiesYacanMetadata( + string? deviceId = default, + string? deviceName = default, + string? deviceType = default, + string? serialNumber = default + ) + { + DeviceId = deviceId; + DeviceName = deviceName; + DeviceType = deviceType; + SerialNumber = serialNumber; + } + + /// + /// Device ID for a Yacan device. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string? DeviceId { get; set; } + + /// + /// Device name for a Yacan device. + /// + [DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] + public string? DeviceName { get; set; } + + /// + /// Device type for a Yacan device. + /// + [DataMember(Name = "device_type", IsRequired = false, EmitDefaultValue = false)] + public string? DeviceType { get; set; } + + /// + /// Serial number for a Yacan device. + /// + [DataMember(Name = "serial_number", IsRequired = false, EmitDefaultValue = false)] + public string? SerialNumber { 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 = "seamModel_devicePropertiesCodeConstraints_model")] public class DevicePropertiesCodeConstraints { diff --git a/output/csharp/src/Seam/Model/DeviceProvider.cs b/output/csharp/src/Seam/Model/DeviceProvider.cs index 87913226..e4e9e674 100644 --- a/output/csharp/src/Seam/Model/DeviceProvider.cs +++ b/output/csharp/src/Seam/Model/DeviceProvider.cs @@ -231,38 +231,44 @@ public enum DeviceProviderNameEnum [EnumMember(Value = "ultraloq")] Ultraloq = 51, + [EnumMember(Value = "yacan")] + Yacan = 52, + [EnumMember(Value = "dusaw")] - Dusaw = 52, + Dusaw = 53, [EnumMember(Value = "sifely")] - Sifely = 53, + Sifely = 54, [EnumMember(Value = "thirty_three_lock")] - ThirtyThreeLock = 54, + ThirtyThreeLock = 55, [EnumMember(Value = "ring")] - Ring = 55, + Ring = 56, [EnumMember(Value = "ical")] - Ical = 56, + Ical = 57, [EnumMember(Value = "lodgify")] - Lodgify = 57, + Lodgify = 58, [EnumMember(Value = "hostaway")] - Hostaway = 58, + Hostaway = 59, [EnumMember(Value = "guesty")] - Guesty = 59, + Guesty = 60, [EnumMember(Value = "acuity_scheduling")] - AcuityScheduling = 60, + AcuityScheduling = 61, [EnumMember(Value = "omnitec")] - Omnitec = 61, + Omnitec = 62, [EnumMember(Value = "kisi")] - Kisi = 62, + Kisi = 63, + + [EnumMember(Value = "aqara")] + Aqara = 64, } /// diff --git a/output/csharp/src/Seam/Model/Event.cs b/output/csharp/src/Seam/Model/Event.cs index 623fcb13..3dd7034e 100644 --- a/output/csharp/src/Seam/Model/Event.cs +++ b/output/csharp/src/Seam/Model/Event.cs @@ -3083,6 +3083,9 @@ public override string ToString() /// /// There was an unusually long delay in removing an [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes) from a device. /// + [Obsolete( + "Seam no longer emits this event. Use `access_code.failed_to_remove_from_device` instead." + )] [DataContract(Name = "seamModel_eventAccessCodeDelayInRemovingFromDevice_model")] public class EventAccessCodeDelayInRemovingFromDevice : Event { @@ -9360,7 +9363,6 @@ protected EventConnectedAccountDeleted() { } public EventConnectedAccountDeleted( object? connectedAccountCustomMetadata = default, string connectedAccountId = default, - string? connectedAccountType = default, string createdAt = default, string? customerKey = default, string? eventDescription = default, @@ -9372,7 +9374,6 @@ public EventConnectedAccountDeleted( { ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; ConnectedAccountId = connectedAccountId; - ConnectedAccountType = connectedAccountType; CreatedAt = createdAt; CustomerKey = customerKey; EventDescription = eventDescription; @@ -9398,12 +9399,6 @@ public EventConnectedAccountDeleted( [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] public string ConnectedAccountId { get; set; } - /// - /// undocumented: Unreleased. - /// - [DataMember(Name = "connected_account_type", IsRequired = false, EmitDefaultValue = false)] - public string? ConnectedAccountType { get; set; } - /// /// Date and time at which the event was created. /// @@ -15281,9 +15276,6 @@ protected EventLockLocked() { } public EventLockLocked( string? accessCodeId = default, bool? accessCodeIsManaged = default, - string? acsEntranceId = default, - string? acsSystemId = default, - string? acsUserId = default, string? actionAttemptId = default, string? code = default, object? connectedAccountCustomMetadata = default, @@ -15299,15 +15291,11 @@ public EventLockLocked( bool? isViaNfc = default, EventLockLocked.MethodEnum method = default, string occurredAt = default, - string? userIdentityId = default, string workspaceId = default ) { AccessCodeId = accessCodeId; AccessCodeIsManaged = accessCodeIsManaged; - AcsEntranceId = acsEntranceId; - AcsSystemId = acsSystemId; - AcsUserId = acsUserId; ActionAttemptId = actionAttemptId; Code = code; ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; @@ -15323,7 +15311,6 @@ public EventLockLocked( IsViaNfc = isViaNfc; Method = method; OccurredAt = occurredAt; - UserIdentityId = userIdentityId; WorkspaceId = workspaceId; } @@ -15367,30 +15354,6 @@ public enum MethodEnum [DataMember(Name = "access_code_is_managed", IsRequired = false, EmitDefaultValue = false)] public bool? AccessCodeIsManaged { get; set; } - /// - /// undocumented: Unreleased. - /// --- - /// ID of the ACS entrance associated with the lock event. - /// - [DataMember(Name = "acs_entrance_id", IsRequired = false, EmitDefaultValue = false)] - public string? AcsEntranceId { get; set; } - - /// - /// undocumented: Unreleased. - /// --- - /// ID of the ACS system associated with the lock event. - /// - [DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] - public string? AcsSystemId { get; set; } - - /// - /// undocumented: Unreleased. - /// --- - /// ID of the ACS user associated with the lock event. - /// - [DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] - public string? AcsUserId { get; set; } - /// /// ID of the Seam action attempt that triggered this lock. Present only when the lock was initiated through Seam (via a `LOCK_DOOR` action attempt). /// @@ -15482,14 +15445,6 @@ public enum MethodEnum [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] public override string OccurredAt { get; set; } - /// - /// undocumented: Unreleased. - /// --- - /// ID of the user identity associated with the lock event. - /// - [DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] - public string? UserIdentityId { get; set; } - /// /// ID of the workspace associated with the event. /// @@ -15528,9 +15483,6 @@ protected EventLockUnlocked() { } public EventLockUnlocked( string? accessCodeId = default, bool? accessCodeIsManaged = default, - string? acsEntranceId = default, - string? acsSystemId = default, - string? acsUserId = default, string? actionAttemptId = default, string? code = default, object? connectedAccountCustomMetadata = default, @@ -15546,15 +15498,11 @@ public EventLockUnlocked( bool? isViaNfc = default, EventLockUnlocked.MethodEnum method = default, string occurredAt = default, - string? userIdentityId = default, string workspaceId = default ) { AccessCodeId = accessCodeId; AccessCodeIsManaged = accessCodeIsManaged; - AcsEntranceId = acsEntranceId; - AcsSystemId = acsSystemId; - AcsUserId = acsUserId; ActionAttemptId = actionAttemptId; Code = code; ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; @@ -15570,7 +15518,6 @@ public EventLockUnlocked( IsViaNfc = isViaNfc; Method = method; OccurredAt = occurredAt; - UserIdentityId = userIdentityId; WorkspaceId = workspaceId; } @@ -15614,30 +15561,6 @@ public enum MethodEnum [DataMember(Name = "access_code_is_managed", IsRequired = false, EmitDefaultValue = false)] public bool? AccessCodeIsManaged { get; set; } - /// - /// undocumented: Unreleased. - /// --- - /// ID of the ACS entrance associated with the unlock event. - /// - [DataMember(Name = "acs_entrance_id", IsRequired = false, EmitDefaultValue = false)] - public string? AcsEntranceId { get; set; } - - /// - /// undocumented: Unreleased. - /// --- - /// ID of the ACS system associated with the unlock event. - /// - [DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] - public string? AcsSystemId { get; set; } - - /// - /// undocumented: Unreleased. - /// --- - /// ID of the ACS user associated with the unlock event. - /// - [DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] - public string? AcsUserId { get; set; } - /// /// ID of the Seam action attempt that triggered this unlock. Present only when the unlock was initiated through Seam (via an `UNLOCK_DOOR` action attempt). /// @@ -15729,14 +15652,6 @@ public enum MethodEnum [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] public override string OccurredAt { get; set; } - /// - /// undocumented: Unreleased. - /// --- - /// ID of the user identity associated with the unlock event. - /// - [DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] - public string? UserIdentityId { get; set; } - /// /// ID of the workspace associated with the event. /// @@ -15774,9 +15689,6 @@ protected EventLockAccessDenied() { } public EventLockAccessDenied( string? accessCodeId = default, - string? acsEntranceId = default, - string? acsSystemId = default, - string? acsUserId = default, object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, @@ -15788,14 +15700,10 @@ public EventLockAccessDenied( string eventType = default, string occurredAt = default, EventLockAccessDeniedReason? reason = default, - string? userIdentityId = default, string workspaceId = default ) { AccessCodeId = accessCodeId; - AcsEntranceId = acsEntranceId; - AcsSystemId = acsSystemId; - AcsUserId = acsUserId; ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; ConnectedAccountId = connectedAccountId; CreatedAt = createdAt; @@ -15807,7 +15715,6 @@ public EventLockAccessDenied( EventType = eventType; OccurredAt = occurredAt; Reason = reason; - UserIdentityId = userIdentityId; WorkspaceId = workspaceId; } @@ -15817,30 +15724,6 @@ public EventLockAccessDenied( [DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] public string? AccessCodeId { get; set; } - /// - /// undocumented: Unreleased. - /// --- - /// ID of the ACS entrance associated with the access-denied event. - /// - [DataMember(Name = "acs_entrance_id", IsRequired = false, EmitDefaultValue = false)] - public string? AcsEntranceId { get; set; } - - /// - /// undocumented: Unreleased. - /// --- - /// ID of the ACS system associated with the access-denied event. - /// - [DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] - public string? AcsSystemId { get; set; } - - /// - /// undocumented: Unreleased. - /// --- - /// ID of the ACS user associated with the access-denied event. - /// - [DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] - public string? AcsUserId { get; set; } - /// /// Custom metadata of the connected account, present when connected_account_id is provided. /// @@ -15908,14 +15791,6 @@ public EventLockAccessDenied( [DataMember(Name = "reason", IsRequired = false, EmitDefaultValue = false)] public EventLockAccessDeniedReason? Reason { get; set; } - /// - /// undocumented: Unreleased. - /// --- - /// ID of the user identity associated with the access-denied event. - /// - [DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] - public string? UserIdentityId { get; set; } - /// /// ID of the workspace associated with the event. /// diff --git a/output/csharp/src/Seam/Model/UnmanagedAccessCode.cs b/output/csharp/src/Seam/Model/UnmanagedAccessCode.cs index 125982da..42bb6b2c 100644 --- a/output/csharp/src/Seam/Model/UnmanagedAccessCode.cs +++ b/output/csharp/src/Seam/Model/UnmanagedAccessCode.cs @@ -110,6 +110,10 @@ public UnmanagedAccessCode( typeof(UnmanagedAccessCodeErrorsDormakabaSitesDisconnected), "dormakaba_sites_disconnected" )] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedAccessCodeErrorsInsufficientPermissions), + "insufficient_permissions" + )] [JsonSubtypes.KnownSubType( typeof(UnmanagedAccessCodeErrorsSaltoKsSubscriptionLimitExceeded), "salto_ks_subscription_limit_exceeded" @@ -119,8 +123,8 @@ public UnmanagedAccessCode( "account_disconnected" )] [JsonSubtypes.KnownSubType( - typeof(UnmanagedAccessCodeErrorsInsufficientPermissions), - "insufficient_permissions" + typeof(UnmanagedAccessCodeErrorsCodeConstraintsViolated), + "code_constraints_violated" )] [JsonSubtypes.KnownSubType( typeof(UnmanagedAccessCodeErrorsAccessCodeInactive), @@ -728,13 +732,13 @@ public override string ToString() } } - [DataContract(Name = "seamModel_unmanagedAccessCodeErrorsInsufficientPermissions_model")] - public class UnmanagedAccessCodeErrorsInsufficientPermissions : UnmanagedAccessCodeErrors + [DataContract(Name = "seamModel_unmanagedAccessCodeErrorsCodeConstraintsViolated_model")] + public class UnmanagedAccessCodeErrorsCodeConstraintsViolated : UnmanagedAccessCodeErrors { [JsonConstructorAttribute] - protected UnmanagedAccessCodeErrorsInsufficientPermissions() { } + protected UnmanagedAccessCodeErrorsCodeConstraintsViolated() { } - public UnmanagedAccessCodeErrorsInsufficientPermissions( + public UnmanagedAccessCodeErrorsCodeConstraintsViolated( string? createdAt = default, string errorCode = default, bool isAccessCodeError = default, @@ -754,7 +758,7 @@ public UnmanagedAccessCodeErrorsInsufficientPermissions( public string? CreatedAt { get; set; } [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "insufficient_permissions"; + public override string ErrorCode { get; } = "code_constraints_violated"; /// /// Indicates that this is an access code error. @@ -939,6 +943,78 @@ public override string ToString() } } + [DataContract(Name = "seamModel_unmanagedAccessCodeErrorsInsufficientPermissions_model")] + public class UnmanagedAccessCodeErrorsInsufficientPermissions : UnmanagedAccessCodeErrors + { + [JsonConstructorAttribute] + protected UnmanagedAccessCodeErrorsInsufficientPermissions() { } + + public UnmanagedAccessCodeErrorsInsufficientPermissions( + string createdAt = default, + string errorCode = default, + bool isConnectedAccountError = default, + bool isDeviceError = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + IsConnectedAccountError = isConnectedAccountError; + IsDeviceError = isDeviceError; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "insufficient_permissions"; + + /// + /// Indicates that the error is a [connected account](https://docs.seam.co/api/connected_accounts) error. + /// + [DataMember( + Name = "is_connected_account_error", + IsRequired = false, + EmitDefaultValue = false + )] + public bool IsConnectedAccountError { get; set; } + + /// + /// Indicates that the error is not a device error. + /// + [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] + public bool IsDeviceError { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { 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 = "seamModel_unmanagedAccessCodeErrorsDormakabaSitesDisconnected_model")] public class UnmanagedAccessCodeErrorsDormakabaSitesDisconnected : UnmanagedAccessCodeErrors { diff --git a/output/csharp/src/Seam/Model/UnmanagedAccessGrant.cs b/output/csharp/src/Seam/Model/UnmanagedAccessGrant.cs new file mode 100644 index 00000000..beecf8f4 --- /dev/null +++ b/output/csharp/src/Seam/Model/UnmanagedAccessGrant.cs @@ -0,0 +1,1435 @@ +using System.Runtime.Serialization; +using System.Text; +using JsonSubTypes; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using Seam.Model; + +namespace Seam.Model +{ + /// + /// Represents an unmanaged Access Grant. Unmanaged Access Grants do not have client sessions, instant keys, customization profiles, or keys. + /// + [DataContract(Name = "seamModel_unmanagedAccessGrant_model")] + public class UnmanagedAccessGrant + { + [JsonConstructorAttribute] + protected UnmanagedAccessGrant() { } + + public UnmanagedAccessGrant( + string accessGrantId = default, + List accessMethodIds = default, + string createdAt = default, + string displayName = default, + string? endsAt = default, + List errors = default, + List locationIds = default, + string? name = default, + List pendingMutations = default, + List requestedAccessMethods = default, + string? reservationKey = default, + List spaceIds = default, + string startsAt = default, + string? userIdentityId = default, + List warnings = default, + string workspaceId = default + ) + { + AccessGrantId = accessGrantId; + AccessMethodIds = accessMethodIds; + CreatedAt = createdAt; + DisplayName = displayName; + EndsAt = endsAt; + Errors = errors; + LocationIds = locationIds; + Name = name; + PendingMutations = pendingMutations; + RequestedAccessMethods = requestedAccessMethods; + ReservationKey = reservationKey; + SpaceIds = spaceIds; + StartsAt = startsAt; + UserIdentityId = userIdentityId; + Warnings = warnings; + WorkspaceId = workspaceId; + } + + [JsonConverter(typeof(JsonSubtypes), "error_code")] + [JsonSubtypes.FallBackSubType(typeof(UnmanagedAccessGrantErrorsUnrecognized))] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedAccessGrantErrorsCannotCreateRequestedAccessMethods), + "cannot_create_requested_access_methods" + )] + public abstract class UnmanagedAccessGrantErrors + { + public abstract string ErrorCode { get; } + + public abstract string CreatedAt { get; set; } + + public abstract string Message { get; set; } + + public abstract override string ToString(); + } + + [DataContract( + Name = "seamModel_unmanagedAccessGrantErrorsCannotCreateRequestedAccessMethods_model" + )] + public class UnmanagedAccessGrantErrorsCannotCreateRequestedAccessMethods + : UnmanagedAccessGrantErrors + { + [JsonConstructorAttribute] + protected UnmanagedAccessGrantErrorsCannotCreateRequestedAccessMethods() { } + + public UnmanagedAccessGrantErrorsCannotCreateRequestedAccessMethods( + string createdAt = default, + string errorCode = default, + string message = default, + List? missingDeviceIds = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + Message = message; + MissingDeviceIds = missingDeviceIds; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "cannot_create_requested_access_methods"; + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + /// + /// IDs of the devices that did not receive an access code at grant creation. Use these to identify which specific devices failed when the message reports a partial failure. + /// + [DataMember(Name = "missing_device_ids", IsRequired = false, EmitDefaultValue = false)] + public List? MissingDeviceIds { 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 = "seamModel_unmanagedAccessGrantErrorsUnrecognized_model")] + public class UnmanagedAccessGrantErrorsUnrecognized : UnmanagedAccessGrantErrors + { + [JsonConstructorAttribute] + protected UnmanagedAccessGrantErrorsUnrecognized() { } + + public UnmanagedAccessGrantErrorsUnrecognized( + string errorCode = default, + string createdAt = default, + string message = default + ) + { + ErrorCode = errorCode; + CreatedAt = createdAt; + Message = message; + } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "unrecognized"; + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { 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(); + } + } + + [JsonConverter(typeof(JsonSubtypes), "mutation_code")] + [JsonSubtypes.FallBackSubType(typeof(UnmanagedAccessGrantPendingMutationsUnrecognized))] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedAccessGrantPendingMutationsUpdatingAccessTimes), + "updating_access_times" + )] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedAccessGrantPendingMutationsUpdatingSpaces), + "updating_spaces" + )] + public abstract class UnmanagedAccessGrantPendingMutations + { + public abstract string MutationCode { get; } + + public abstract string CreatedAt { get; set; } + + public abstract string Message { get; set; } + + public abstract override string ToString(); + } + + [DataContract(Name = "seamModel_unmanagedAccessGrantPendingMutationsUpdatingSpaces_model")] + public class UnmanagedAccessGrantPendingMutationsUpdatingSpaces + : UnmanagedAccessGrantPendingMutations + { + [JsonConstructorAttribute] + protected UnmanagedAccessGrantPendingMutationsUpdatingSpaces() { } + + public UnmanagedAccessGrantPendingMutationsUpdatingSpaces( + string createdAt = default, + UnmanagedAccessGrantPendingMutationsUpdatingSpacesFrom from = default, + string message = default, + string mutationCode = default, + UnmanagedAccessGrantPendingMutationsUpdatingSpacesTo to = default + ) + { + CreatedAt = createdAt; + From = from; + Message = message; + MutationCode = mutationCode; + To = to; + } + + /// + /// Date and time at which the mutation was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Previous location configuration. + /// + [DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] + public UnmanagedAccessGrantPendingMutationsUpdatingSpacesFrom From { get; set; } + + /// + /// Detailed description of the mutation. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] + public override string MutationCode { get; } = "updating_spaces"; + + /// + /// New location configuration. + /// + [DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] + public UnmanagedAccessGrantPendingMutationsUpdatingSpacesTo To { 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 = "seamModel_unmanagedAccessGrantPendingMutationsUpdatingSpacesFrom_model" + )] + public class UnmanagedAccessGrantPendingMutationsUpdatingSpacesFrom + { + [JsonConstructorAttribute] + protected UnmanagedAccessGrantPendingMutationsUpdatingSpacesFrom() { } + + public UnmanagedAccessGrantPendingMutationsUpdatingSpacesFrom( + List deviceIds = default + ) + { + DeviceIds = deviceIds; + } + + /// + /// Previous device IDs where access codes existed. + /// + [DataMember(Name = "device_ids", IsRequired = false, EmitDefaultValue = false)] + public List DeviceIds { 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 = "seamModel_unmanagedAccessGrantPendingMutationsUpdatingSpacesTo_model" + )] + public class UnmanagedAccessGrantPendingMutationsUpdatingSpacesTo + { + [JsonConstructorAttribute] + protected UnmanagedAccessGrantPendingMutationsUpdatingSpacesTo() { } + + public UnmanagedAccessGrantPendingMutationsUpdatingSpacesTo( + string? commonCodeKey = default, + List deviceIds = default + ) + { + CommonCodeKey = commonCodeKey; + DeviceIds = deviceIds; + } + + /// + /// Common code key to ensure PIN code reuse across devices. + /// + [DataMember(Name = "common_code_key", IsRequired = false, EmitDefaultValue = false)] + public string? CommonCodeKey { get; set; } + + /// + /// New device IDs where access codes should be created. + /// + [DataMember(Name = "device_ids", IsRequired = false, EmitDefaultValue = false)] + public List DeviceIds { 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 = "seamModel_unmanagedAccessGrantPendingMutationsUpdatingAccessTimes_model" + )] + public class UnmanagedAccessGrantPendingMutationsUpdatingAccessTimes + : UnmanagedAccessGrantPendingMutations + { + [JsonConstructorAttribute] + protected UnmanagedAccessGrantPendingMutationsUpdatingAccessTimes() { } + + public UnmanagedAccessGrantPendingMutationsUpdatingAccessTimes( + List accessMethodIds = default, + string createdAt = default, + UnmanagedAccessGrantPendingMutationsUpdatingAccessTimesFrom from = default, + string message = default, + string mutationCode = default, + UnmanagedAccessGrantPendingMutationsUpdatingAccessTimesTo to = default + ) + { + AccessMethodIds = accessMethodIds; + CreatedAt = createdAt; + From = from; + Message = message; + MutationCode = mutationCode; + To = to; + } + + /// + /// IDs of the access methods being updated. + /// + [DataMember(Name = "access_method_ids", IsRequired = false, EmitDefaultValue = false)] + public List AccessMethodIds { get; set; } + + /// + /// Date and time at which the mutation was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Previous access time configuration. + /// + [DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] + public UnmanagedAccessGrantPendingMutationsUpdatingAccessTimesFrom From { get; set; } + + /// + /// Detailed description of the mutation. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] + public override string MutationCode { get; } = "updating_access_times"; + + /// + /// New access time configuration. + /// + [DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] + public UnmanagedAccessGrantPendingMutationsUpdatingAccessTimesTo To { 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 = "seamModel_unmanagedAccessGrantPendingMutationsUpdatingAccessTimesFrom_model" + )] + public class UnmanagedAccessGrantPendingMutationsUpdatingAccessTimesFrom + { + [JsonConstructorAttribute] + protected UnmanagedAccessGrantPendingMutationsUpdatingAccessTimesFrom() { } + + public UnmanagedAccessGrantPendingMutationsUpdatingAccessTimesFrom( + string? endsAt = default, + string? startsAt = default + ) + { + EndsAt = endsAt; + StartsAt = startsAt; + } + + /// + /// Previous end time for access. + /// + [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] + public string? EndsAt { get; set; } + + /// + /// Previous start time for access. + /// + [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] + public string? StartsAt { 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 = "seamModel_unmanagedAccessGrantPendingMutationsUpdatingAccessTimesTo_model" + )] + public class UnmanagedAccessGrantPendingMutationsUpdatingAccessTimesTo + { + [JsonConstructorAttribute] + protected UnmanagedAccessGrantPendingMutationsUpdatingAccessTimesTo() { } + + public UnmanagedAccessGrantPendingMutationsUpdatingAccessTimesTo( + string? endsAt = default, + string? startsAt = default + ) + { + EndsAt = endsAt; + StartsAt = startsAt; + } + + /// + /// New end time for access. + /// + [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] + public string? EndsAt { get; set; } + + /// + /// New start time for access. + /// + [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] + public string? StartsAt { 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 = "seamModel_unmanagedAccessGrantPendingMutationsUnrecognized_model")] + public class UnmanagedAccessGrantPendingMutationsUnrecognized + : UnmanagedAccessGrantPendingMutations + { + [JsonConstructorAttribute] + protected UnmanagedAccessGrantPendingMutationsUnrecognized() { } + + public UnmanagedAccessGrantPendingMutationsUnrecognized( + string mutationCode = default, + string createdAt = default, + string message = default + ) + { + MutationCode = mutationCode; + CreatedAt = createdAt; + Message = message; + } + + [DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] + public override string MutationCode { get; } = "unrecognized"; + + /// + /// Date and time at which the mutation was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the mutation. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { 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(); + } + } + + [JsonConverter(typeof(JsonSubtypes), "warning_code")] + [JsonSubtypes.FallBackSubType(typeof(UnmanagedAccessGrantWarningsUnrecognized))] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedAccessGrantWarningsDeviceTimeConstraintsViolated), + "device_time_constraints_violated" + )] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedAccessGrantWarningsDeviceDoesNotSupportAccessCodes), + "device_does_not_support_access_codes" + )] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedAccessGrantWarningsRequestedCodeUnavailable), + "requested_code_unavailable" + )] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedAccessGrantWarningsUpdatingAccessTimes), + "updating_access_times" + )] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedAccessGrantWarningsOverprovisionedAccess), + "overprovisioned_access" + )] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedAccessGrantWarningsUnderprovisionedAccess), + "underprovisioned_access" + )] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedAccessGrantWarningsBeingDeleted), + "being_deleted" + )] + public abstract class UnmanagedAccessGrantWarnings + { + public abstract string WarningCode { get; } + + public abstract string CreatedAt { get; set; } + + public abstract string Message { get; set; } + + public abstract override string ToString(); + } + + [DataContract(Name = "seamModel_unmanagedAccessGrantWarningsBeingDeleted_model")] + public class UnmanagedAccessGrantWarningsBeingDeleted : UnmanagedAccessGrantWarnings + { + [JsonConstructorAttribute] + protected UnmanagedAccessGrantWarningsBeingDeleted() { } + + public UnmanagedAccessGrantWarningsBeingDeleted( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "being_deleted"; + + 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 = "seamModel_unmanagedAccessGrantWarningsUnderprovisionedAccess_model")] + public class UnmanagedAccessGrantWarningsUnderprovisionedAccess + : UnmanagedAccessGrantWarnings + { + [JsonConstructorAttribute] + protected UnmanagedAccessGrantWarningsUnderprovisionedAccess() { } + + public UnmanagedAccessGrantWarningsUnderprovisionedAccess( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "underprovisioned_access"; + + 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 = "seamModel_unmanagedAccessGrantWarningsOverprovisionedAccess_model")] + public class UnmanagedAccessGrantWarningsOverprovisionedAccess + : UnmanagedAccessGrantWarnings + { + [JsonConstructorAttribute] + protected UnmanagedAccessGrantWarningsOverprovisionedAccess() { } + + public UnmanagedAccessGrantWarningsOverprovisionedAccess( + string createdAt = default, + List? failedDevices = + default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + FailedDevices = failedDevices; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Devices whose access codes could not be revoked during reconciliation. Present when the provider does not support revoking an offline access code (e.g. Dormakaba oracode with exhausted override budget). + /// + [DataMember(Name = "failed_devices", IsRequired = false, EmitDefaultValue = false)] + public List? FailedDevices { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "overprovisioned_access"; + + 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 = "seamModel_unmanagedAccessGrantWarningsOverprovisionedAccessFailedDevices_model" + )] + public class UnmanagedAccessGrantWarningsOverprovisionedAccessFailedDevices + { + [JsonConstructorAttribute] + protected UnmanagedAccessGrantWarningsOverprovisionedAccessFailedDevices() { } + + public UnmanagedAccessGrantWarningsOverprovisionedAccessFailedDevices( + string deviceId = default, + string errorCode = default, + string message = default + ) + { + DeviceId = deviceId; + ErrorCode = errorCode; + Message = message; + } + + /// + /// Device whose access code could not be revoked. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// Reason the access code could not be revoked (e.g. `offline_access_code_not_revocable`). + /// + [DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] + public string ErrorCode { get; set; } + + /// + /// Human-readable description of why revocation failed. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { 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 = "seamModel_unmanagedAccessGrantWarningsUpdatingAccessTimes_model")] + public class UnmanagedAccessGrantWarningsUpdatingAccessTimes : UnmanagedAccessGrantWarnings + { + [JsonConstructorAttribute] + protected UnmanagedAccessGrantWarningsUpdatingAccessTimes() { } + + public UnmanagedAccessGrantWarningsUpdatingAccessTimes( + List accessMethodIds = default, + string createdAt = default, + string message = default, + string warningCode = default + ) + { + AccessMethodIds = accessMethodIds; + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// IDs of the access methods being updated. + /// + [DataMember(Name = "access_method_ids", IsRequired = false, EmitDefaultValue = false)] + public List AccessMethodIds { get; set; } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "updating_access_times"; + + 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 = "seamModel_unmanagedAccessGrantWarningsRequestedCodeUnavailable_model" + )] + public class UnmanagedAccessGrantWarningsRequestedCodeUnavailable + : UnmanagedAccessGrantWarnings + { + [JsonConstructorAttribute] + protected UnmanagedAccessGrantWarningsRequestedCodeUnavailable() { } + + public UnmanagedAccessGrantWarningsRequestedCodeUnavailable( + string createdAt = default, + string deviceId = default, + string message = default, + string newCode = default, + string originalCode = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + DeviceId = deviceId; + Message = message; + NewCode = newCode; + OriginalCode = originalCode; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// ID of the device where the requested code was unavailable. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + /// + /// The new PIN code that was assigned instead. + /// + [DataMember(Name = "new_code", IsRequired = false, EmitDefaultValue = false)] + public string NewCode { get; set; } + + /// + /// The originally requested PIN code that was unavailable. + /// + [DataMember(Name = "original_code", IsRequired = false, EmitDefaultValue = false)] + public string OriginalCode { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "requested_code_unavailable"; + + 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 = "seamModel_unmanagedAccessGrantWarningsDeviceDoesNotSupportAccessCodes_model" + )] + public class UnmanagedAccessGrantWarningsDeviceDoesNotSupportAccessCodes + : UnmanagedAccessGrantWarnings + { + [JsonConstructorAttribute] + protected UnmanagedAccessGrantWarningsDeviceDoesNotSupportAccessCodes() { } + + public UnmanagedAccessGrantWarningsDeviceDoesNotSupportAccessCodes( + string createdAt = default, + string deviceId = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + DeviceId = deviceId; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// ID of the device that does not support access codes. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "device_does_not_support_access_codes"; + + 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 = "seamModel_unmanagedAccessGrantWarningsDeviceTimeConstraintsViolated_model" + )] + public class UnmanagedAccessGrantWarningsDeviceTimeConstraintsViolated + : UnmanagedAccessGrantWarnings + { + [JsonConstructorAttribute] + protected UnmanagedAccessGrantWarningsDeviceTimeConstraintsViolated() { } + + public UnmanagedAccessGrantWarningsDeviceTimeConstraintsViolated( + string createdAt = default, + string deviceId = default, + string message = default, + UnmanagedAccessGrantWarningsDeviceTimeConstraintsViolated.ReasonEnum reason = + default, + string warningCode = default + ) + { + CreatedAt = createdAt; + DeviceId = deviceId; + Message = message; + Reason = reason; + WarningCode = warningCode; + } + + /// + /// Specific reason why the grant's times are not programmable on the device. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum ReasonEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "duration_exceeds_max")] + DurationExceedsMax = 1, + + [EnumMember(Value = "times_do_not_match_slots")] + TimesDoNotMatchSlots = 2, + + [EnumMember(Value = "ongoing_not_supported")] + OngoingNotSupported = 3, + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// ID of the device whose time constraints the access grant violates. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + /// + /// Specific reason why the grant's times are not programmable on the device. + /// + [DataMember(Name = "reason", IsRequired = false, EmitDefaultValue = false)] + public UnmanagedAccessGrantWarningsDeviceTimeConstraintsViolated.ReasonEnum Reason { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "device_time_constraints_violated"; + + 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 = "seamModel_unmanagedAccessGrantWarningsUnrecognized_model")] + public class UnmanagedAccessGrantWarningsUnrecognized : UnmanagedAccessGrantWarnings + { + [JsonConstructorAttribute] + protected UnmanagedAccessGrantWarningsUnrecognized() { } + + public UnmanagedAccessGrantWarningsUnrecognized( + string warningCode = default, + string createdAt = default, + string message = default + ) + { + WarningCode = warningCode; + CreatedAt = createdAt; + Message = message; + } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "unrecognized"; + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { 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(); + } + } + + /// + /// ID of the Access Grant. + /// + [DataMember(Name = "access_grant_id", IsRequired = false, EmitDefaultValue = false)] + public string AccessGrantId { get; set; } + + /// + /// IDs of the access methods created for the Access Grant. + /// + [DataMember(Name = "access_method_ids", IsRequired = false, EmitDefaultValue = false)] + public List AccessMethodIds { get; set; } + + /// + /// Date and time at which the Access Grant was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// Display name of the Access Grant. + /// + [DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] + public string DisplayName { get; set; } + + /// + /// Date and time at which the Access Grant ends. + /// + [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] + public string? EndsAt { get; set; } + + /// + /// Errors associated with the [access grant](https://docs.seam.co/use-cases/granting-access). + /// + [DataMember(Name = "errors", IsRequired = false, EmitDefaultValue = false)] + public List Errors { get; set; } + + [Obsolete("Use `space_ids`.")] + [DataMember(Name = "location_ids", IsRequired = false, EmitDefaultValue = false)] + public List LocationIds { get; set; } + + /// + /// Name of the Access Grant. If not provided, the display name will be computed. + /// + [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] + public string? Name { get; set; } + + /// + /// List of pending mutations for the access grant. This shows updates that are in progress. + /// + [DataMember(Name = "pending_mutations", IsRequired = false, EmitDefaultValue = false)] + public List PendingMutations { get; set; } + + /// + /// Access methods that the user requested for the Access Grant. + /// + [DataMember( + Name = "requested_access_methods", + IsRequired = false, + EmitDefaultValue = false + )] + public List RequestedAccessMethods { get; set; } + + /// + /// Reservation key for the access grant. + /// + [DataMember(Name = "reservation_key", IsRequired = false, EmitDefaultValue = false)] + public string? ReservationKey { get; set; } + + /// + /// IDs of the spaces to which the Access Grant gives access. + /// + [DataMember(Name = "space_ids", IsRequired = false, EmitDefaultValue = false)] + public List SpaceIds { get; set; } + + /// + /// Date and time at which the Access Grant starts. + /// + [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] + public string StartsAt { get; set; } + + /// + /// ID of user identity to which the Access Grant gives access. + /// + [DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] + public string? UserIdentityId { get; set; } + + /// + /// Warnings associated with the [access grant](https://docs.seam.co/use-cases/granting-access). + /// + [DataMember(Name = "warnings", IsRequired = false, EmitDefaultValue = false)] + public List Warnings { get; set; } + + /// + /// ID of the Seam workspace associated with the Access Grant. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public string WorkspaceId { 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 = "seamModel_unmanagedAccessGrantRequestedAccessMethods_model")] + public class UnmanagedAccessGrantRequestedAccessMethods + { + [JsonConstructorAttribute] + protected UnmanagedAccessGrantRequestedAccessMethods() { } + + public UnmanagedAccessGrantRequestedAccessMethods( + string? code = default, + List createdAccessMethodIds = default, + string createdAt = default, + string displayName = default, + int? instantKeyMaxUseCount = default, + UnmanagedAccessGrantRequestedAccessMethods.ModeEnum mode = default + ) + { + Code = code; + CreatedAccessMethodIds = createdAccessMethodIds; + CreatedAt = createdAt; + DisplayName = displayName; + InstantKeyMaxUseCount = instantKeyMaxUseCount; + Mode = mode; + } + + /// + /// Access method mode. Supported values: `code`, `card`, `mobile_key`, `cloud_key`. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum ModeEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "code")] + Code = 1, + + [EnumMember(Value = "card")] + Card = 2, + + [EnumMember(Value = "mobile_key")] + MobileKey = 3, + + [EnumMember(Value = "cloud_key")] + CloudKey = 4, + } + + /// + /// Specific PIN code to use for this access method. Only applicable when mode is 'code'. + /// + [DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] + public string? Code { get; set; } + + /// + /// IDs of the access methods created for the requested access method. + /// + [DataMember( + Name = "created_access_method_ids", + IsRequired = false, + EmitDefaultValue = false + )] + public List CreatedAccessMethodIds { get; set; } + + /// + /// Date and time at which the requested access method was added to the Access Grant. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// Display name of the access method. + /// + [DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] + public string DisplayName { get; set; } + + /// + /// Maximum number of times the instant key can be used. Only applicable when mode is 'mobile_key'. Defaults to 1 if not specified. + /// + [DataMember( + Name = "instant_key_max_use_count", + IsRequired = false, + EmitDefaultValue = false + )] + public int? InstantKeyMaxUseCount { get; set; } + + /// + /// Access method mode. Supported values: `code`, `card`, `mobile_key`, `cloud_key`. + /// + [DataMember(Name = "mode", IsRequired = false, EmitDefaultValue = false)] + public UnmanagedAccessGrantRequestedAccessMethods.ModeEnum Mode { 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/Model/UnmanagedAccessMethod.cs b/output/csharp/src/Seam/Model/UnmanagedAccessMethod.cs new file mode 100644 index 00000000..e8336f90 --- /dev/null +++ b/output/csharp/src/Seam/Model/UnmanagedAccessMethod.cs @@ -0,0 +1,1169 @@ +using System.Runtime.Serialization; +using System.Text; +using JsonSubTypes; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using Seam.Model; + +namespace Seam.Model +{ + /// + /// Represents an unmanaged access method. Unmanaged access methods do not have client sessions, instant keys, customization profiles, or keys. + /// + [DataContract(Name = "seamModel_unmanagedAccessMethod_model")] + public class UnmanagedAccessMethod + { + [JsonConstructorAttribute] + protected UnmanagedAccessMethod() { } + + public UnmanagedAccessMethod( + string accessMethodId = default, + string? code = default, + string createdAt = default, + string displayName = default, + string displayStatus = default, + List errors = default, + bool? isAssignmentRequired = default, + bool? isEncodingRequired = default, + bool isIssued = default, + bool? isReadyForAssignment = default, + bool? isReadyForEncoding = default, + string? issuedAt = default, + UnmanagedAccessMethod.ModeEnum mode = default, + List pendingMutations = default, + List warnings = default, + string workspaceId = default + ) + { + AccessMethodId = accessMethodId; + Code = code; + CreatedAt = createdAt; + DisplayName = displayName; + DisplayStatus = displayStatus; + Errors = errors; + IsAssignmentRequired = isAssignmentRequired; + IsEncodingRequired = isEncodingRequired; + IsIssued = isIssued; + IsReadyForAssignment = isReadyForAssignment; + IsReadyForEncoding = isReadyForEncoding; + IssuedAt = issuedAt; + Mode = mode; + PendingMutations = pendingMutations; + Warnings = warnings; + WorkspaceId = workspaceId; + } + + [JsonConverter(typeof(JsonSubtypes), "error_code")] + [JsonSubtypes.FallBackSubType(typeof(UnmanagedAccessMethodErrorsUnrecognized))] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedAccessMethodErrorsFailedToIssue), + "failed_to_issue" + )] + public abstract class UnmanagedAccessMethodErrors + { + public abstract string ErrorCode { get; } + + public abstract string CreatedAt { get; set; } + + public abstract string Message { get; set; } + + public abstract override string ToString(); + } + + [DataContract(Name = "seamModel_unmanagedAccessMethodErrorsFailedToIssue_model")] + public class UnmanagedAccessMethodErrorsFailedToIssue : UnmanagedAccessMethodErrors + { + [JsonConstructorAttribute] + protected UnmanagedAccessMethodErrorsFailedToIssue() { } + + public UnmanagedAccessMethodErrorsFailedToIssue( + string createdAt = default, + string errorCode = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "failed_to_issue"; + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { 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 = "seamModel_unmanagedAccessMethodErrorsUnrecognized_model")] + public class UnmanagedAccessMethodErrorsUnrecognized : UnmanagedAccessMethodErrors + { + [JsonConstructorAttribute] + protected UnmanagedAccessMethodErrorsUnrecognized() { } + + public UnmanagedAccessMethodErrorsUnrecognized( + string errorCode = default, + string createdAt = default, + string message = default + ) + { + ErrorCode = errorCode; + CreatedAt = createdAt; + Message = message; + } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "unrecognized"; + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { 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(); + } + } + + /// + /// Access method mode. Supported values: `code`, `card`, `mobile_key`, `cloud_key`. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum ModeEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "code")] + Code = 1, + + [EnumMember(Value = "card")] + Card = 2, + + [EnumMember(Value = "mobile_key")] + MobileKey = 3, + + [EnumMember(Value = "cloud_key")] + CloudKey = 4, + } + + [JsonConverter(typeof(JsonSubtypes), "mutation_code")] + [JsonSubtypes.FallBackSubType(typeof(UnmanagedAccessMethodPendingMutationsUnrecognized))] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedAccessMethodPendingMutationsUpdatingAccessTimes), + "updating_access_times" + )] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedAccessMethodPendingMutationsRevokingAccess), + "revoking_access" + )] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedAccessMethodPendingMutationsProvisioningAccess), + "provisioning_access" + )] + public abstract class UnmanagedAccessMethodPendingMutations + { + public abstract string MutationCode { get; } + + public abstract string CreatedAt { get; set; } + + public abstract string Message { get; set; } + + public abstract override string ToString(); + } + + [DataContract( + Name = "seamModel_unmanagedAccessMethodPendingMutationsProvisioningAccess_model" + )] + public class UnmanagedAccessMethodPendingMutationsProvisioningAccess + : UnmanagedAccessMethodPendingMutations + { + [JsonConstructorAttribute] + protected UnmanagedAccessMethodPendingMutationsProvisioningAccess() { } + + public UnmanagedAccessMethodPendingMutationsProvisioningAccess( + string createdAt = default, + UnmanagedAccessMethodPendingMutationsProvisioningAccessFrom from = default, + string message = default, + string mutationCode = default, + UnmanagedAccessMethodPendingMutationsProvisioningAccessTo to = default + ) + { + CreatedAt = createdAt; + From = from; + Message = message; + MutationCode = mutationCode; + To = to; + } + + /// + /// Date and time at which the mutation was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Previous device configuration. + /// + [DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] + public UnmanagedAccessMethodPendingMutationsProvisioningAccessFrom From { get; set; } + + /// + /// Detailed description of the mutation. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] + public override string MutationCode { get; } = "provisioning_access"; + + /// + /// New device configuration. + /// + [DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] + public UnmanagedAccessMethodPendingMutationsProvisioningAccessTo To { 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 = "seamModel_unmanagedAccessMethodPendingMutationsProvisioningAccessFrom_model" + )] + public class UnmanagedAccessMethodPendingMutationsProvisioningAccessFrom + { + [JsonConstructorAttribute] + protected UnmanagedAccessMethodPendingMutationsProvisioningAccessFrom() { } + + public UnmanagedAccessMethodPendingMutationsProvisioningAccessFrom( + List deviceIds = default + ) + { + DeviceIds = deviceIds; + } + + /// + /// Previous device IDs where access was provisioned. + /// + [DataMember(Name = "device_ids", IsRequired = false, EmitDefaultValue = false)] + public List DeviceIds { 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 = "seamModel_unmanagedAccessMethodPendingMutationsProvisioningAccessTo_model" + )] + public class UnmanagedAccessMethodPendingMutationsProvisioningAccessTo + { + [JsonConstructorAttribute] + protected UnmanagedAccessMethodPendingMutationsProvisioningAccessTo() { } + + public UnmanagedAccessMethodPendingMutationsProvisioningAccessTo( + List deviceIds = default + ) + { + DeviceIds = deviceIds; + } + + /// + /// New device IDs where access is being provisioned. + /// + [DataMember(Name = "device_ids", IsRequired = false, EmitDefaultValue = false)] + public List DeviceIds { 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 = "seamModel_unmanagedAccessMethodPendingMutationsRevokingAccess_model")] + public class UnmanagedAccessMethodPendingMutationsRevokingAccess + : UnmanagedAccessMethodPendingMutations + { + [JsonConstructorAttribute] + protected UnmanagedAccessMethodPendingMutationsRevokingAccess() { } + + public UnmanagedAccessMethodPendingMutationsRevokingAccess( + string createdAt = default, + UnmanagedAccessMethodPendingMutationsRevokingAccessFrom from = default, + string message = default, + string mutationCode = default, + UnmanagedAccessMethodPendingMutationsRevokingAccessTo to = default + ) + { + CreatedAt = createdAt; + From = from; + Message = message; + MutationCode = mutationCode; + To = to; + } + + /// + /// Date and time at which the mutation was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Previous device configuration. + /// + [DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] + public UnmanagedAccessMethodPendingMutationsRevokingAccessFrom From { get; set; } + + /// + /// Detailed description of the mutation. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] + public override string MutationCode { get; } = "revoking_access"; + + /// + /// New device configuration. + /// + [DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] + public UnmanagedAccessMethodPendingMutationsRevokingAccessTo To { 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 = "seamModel_unmanagedAccessMethodPendingMutationsRevokingAccessFrom_model" + )] + public class UnmanagedAccessMethodPendingMutationsRevokingAccessFrom + { + [JsonConstructorAttribute] + protected UnmanagedAccessMethodPendingMutationsRevokingAccessFrom() { } + + public UnmanagedAccessMethodPendingMutationsRevokingAccessFrom( + List deviceIds = default + ) + { + DeviceIds = deviceIds; + } + + /// + /// Previous device IDs where access existed. + /// + [DataMember(Name = "device_ids", IsRequired = false, EmitDefaultValue = false)] + public List DeviceIds { 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 = "seamModel_unmanagedAccessMethodPendingMutationsRevokingAccessTo_model" + )] + public class UnmanagedAccessMethodPendingMutationsRevokingAccessTo + { + [JsonConstructorAttribute] + protected UnmanagedAccessMethodPendingMutationsRevokingAccessTo() { } + + public UnmanagedAccessMethodPendingMutationsRevokingAccessTo( + List deviceIds = default + ) + { + DeviceIds = deviceIds; + } + + /// + /// New device IDs where access should remain. + /// + [DataMember(Name = "device_ids", IsRequired = false, EmitDefaultValue = false)] + public List DeviceIds { 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 = "seamModel_unmanagedAccessMethodPendingMutationsUpdatingAccessTimes_model" + )] + public class UnmanagedAccessMethodPendingMutationsUpdatingAccessTimes + : UnmanagedAccessMethodPendingMutations + { + [JsonConstructorAttribute] + protected UnmanagedAccessMethodPendingMutationsUpdatingAccessTimes() { } + + public UnmanagedAccessMethodPendingMutationsUpdatingAccessTimes( + string createdAt = default, + UnmanagedAccessMethodPendingMutationsUpdatingAccessTimesFrom from = default, + string message = default, + string mutationCode = default, + UnmanagedAccessMethodPendingMutationsUpdatingAccessTimesTo to = default + ) + { + CreatedAt = createdAt; + From = from; + Message = message; + MutationCode = mutationCode; + To = to; + } + + /// + /// Date and time at which the mutation was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Previous access time configuration. + /// + [DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] + public UnmanagedAccessMethodPendingMutationsUpdatingAccessTimesFrom From { get; set; } + + /// + /// Detailed description of the mutation. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] + public override string MutationCode { get; } = "updating_access_times"; + + /// + /// New access time configuration. + /// + [DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] + public UnmanagedAccessMethodPendingMutationsUpdatingAccessTimesTo To { 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 = "seamModel_unmanagedAccessMethodPendingMutationsUpdatingAccessTimesFrom_model" + )] + public class UnmanagedAccessMethodPendingMutationsUpdatingAccessTimesFrom + { + [JsonConstructorAttribute] + protected UnmanagedAccessMethodPendingMutationsUpdatingAccessTimesFrom() { } + + public UnmanagedAccessMethodPendingMutationsUpdatingAccessTimesFrom( + string? endsAt = default, + string? startsAt = default + ) + { + EndsAt = endsAt; + StartsAt = startsAt; + } + + /// + /// Previous end time for access. + /// + [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] + public string? EndsAt { get; set; } + + /// + /// Previous start time for access. + /// + [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] + public string? StartsAt { 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 = "seamModel_unmanagedAccessMethodPendingMutationsUpdatingAccessTimesTo_model" + )] + public class UnmanagedAccessMethodPendingMutationsUpdatingAccessTimesTo + { + [JsonConstructorAttribute] + protected UnmanagedAccessMethodPendingMutationsUpdatingAccessTimesTo() { } + + public UnmanagedAccessMethodPendingMutationsUpdatingAccessTimesTo( + string? endsAt = default, + string? startsAt = default + ) + { + EndsAt = endsAt; + StartsAt = startsAt; + } + + /// + /// New end time for access. + /// + [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] + public string? EndsAt { get; set; } + + /// + /// New start time for access. + /// + [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] + public string? StartsAt { 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 = "seamModel_unmanagedAccessMethodPendingMutationsUnrecognized_model")] + public class UnmanagedAccessMethodPendingMutationsUnrecognized + : UnmanagedAccessMethodPendingMutations + { + [JsonConstructorAttribute] + protected UnmanagedAccessMethodPendingMutationsUnrecognized() { } + + public UnmanagedAccessMethodPendingMutationsUnrecognized( + string mutationCode = default, + string createdAt = default, + string message = default + ) + { + MutationCode = mutationCode; + CreatedAt = createdAt; + Message = message; + } + + [DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] + public override string MutationCode { get; } = "unrecognized"; + + /// + /// Date and time at which the mutation was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the mutation. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { 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(); + } + } + + [JsonConverter(typeof(JsonSubtypes), "warning_code")] + [JsonSubtypes.FallBackSubType(typeof(UnmanagedAccessMethodWarningsUnrecognized))] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedAccessMethodWarningsDelayInIssuing), + "delay_in_issuing" + )] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedAccessMethodWarningsPulledBackupAccessCode), + "pulled_backup_access_code" + )] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedAccessMethodWarningsUpdatingAccessTimes), + "updating_access_times" + )] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedAccessMethodWarningsBeingDeleted), + "being_deleted" + )] + public abstract class UnmanagedAccessMethodWarnings + { + public abstract string WarningCode { get; } + + public abstract string CreatedAt { get; set; } + + public abstract string Message { get; set; } + + public abstract override string ToString(); + } + + [DataContract(Name = "seamModel_unmanagedAccessMethodWarningsBeingDeleted_model")] + public class UnmanagedAccessMethodWarningsBeingDeleted : UnmanagedAccessMethodWarnings + { + [JsonConstructorAttribute] + protected UnmanagedAccessMethodWarningsBeingDeleted() { } + + public UnmanagedAccessMethodWarningsBeingDeleted( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "being_deleted"; + + 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 = "seamModel_unmanagedAccessMethodWarningsUpdatingAccessTimes_model")] + public class UnmanagedAccessMethodWarningsUpdatingAccessTimes + : UnmanagedAccessMethodWarnings + { + [JsonConstructorAttribute] + protected UnmanagedAccessMethodWarningsUpdatingAccessTimes() { } + + public UnmanagedAccessMethodWarningsUpdatingAccessTimes( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "updating_access_times"; + + 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 = "seamModel_unmanagedAccessMethodWarningsPulledBackupAccessCode_model")] + public class UnmanagedAccessMethodWarningsPulledBackupAccessCode + : UnmanagedAccessMethodWarnings + { + [JsonConstructorAttribute] + protected UnmanagedAccessMethodWarningsPulledBackupAccessCode() { } + + public UnmanagedAccessMethodWarningsPulledBackupAccessCode( + string createdAt = default, + string message = default, + string? originalAccessMethodId = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + OriginalAccessMethodId = originalAccessMethodId; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + /// + /// ID of the original access method from which this backup access method was split, if applicable. + /// + [DataMember( + Name = "original_access_method_id", + IsRequired = false, + EmitDefaultValue = false + )] + public string? OriginalAccessMethodId { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "pulled_backup_access_code"; + + 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 = "seamModel_unmanagedAccessMethodWarningsDelayInIssuing_model")] + public class UnmanagedAccessMethodWarningsDelayInIssuing : UnmanagedAccessMethodWarnings + { + [JsonConstructorAttribute] + protected UnmanagedAccessMethodWarningsDelayInIssuing() { } + + public UnmanagedAccessMethodWarningsDelayInIssuing( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "delay_in_issuing"; + + 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 = "seamModel_unmanagedAccessMethodWarningsUnrecognized_model")] + public class UnmanagedAccessMethodWarningsUnrecognized : UnmanagedAccessMethodWarnings + { + [JsonConstructorAttribute] + protected UnmanagedAccessMethodWarningsUnrecognized() { } + + public UnmanagedAccessMethodWarningsUnrecognized( + string warningCode = default, + string createdAt = default, + string message = default + ) + { + WarningCode = warningCode; + CreatedAt = createdAt; + Message = message; + } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "unrecognized"; + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { 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(); + } + } + + /// + /// ID of the access method. + /// + [DataMember(Name = "access_method_id", IsRequired = false, EmitDefaultValue = false)] + public string AccessMethodId { get; set; } + + /// + /// The actual PIN code for code access methods. + /// + [DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] + public string? Code { get; set; } + + /// + /// Date and time at which the access method was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// Display name of the access method. + /// + [DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] + public string DisplayName { get; set; } + + /// + /// Human-readable sentence describing where the access method sits in its relationship with the device or access system, for example `Awaiting encoding`. For display only. The wording is not stable and is not an enumeration — it may change at any time, so never compare against or branch on it. To make decisions, read `is_issued`, `errors`, and `pending_mutations`. + /// + [DataMember(Name = "display_status", IsRequired = false, EmitDefaultValue = false)] + public string DisplayStatus { get; set; } + + /// + /// Errors associated with the [access method](https://docs.seam.co/use-cases/granting-access/creating-an-access-grant). + /// + [DataMember(Name = "errors", IsRequired = false, EmitDefaultValue = false)] + public List Errors { get; set; } + + /// + /// Indicates whether an existing card credential must be assigned to this access method before it can be issued. Only applies to card-mode access methods on systems that support credential assignment. + /// + [DataMember(Name = "is_assignment_required", IsRequired = false, EmitDefaultValue = false)] + public bool? IsAssignmentRequired { get; set; } + + /// + /// Indicates whether encoding with an card encoder is required to issue or reissue the plastic card associated with the access method. + /// + [DataMember(Name = "is_encoding_required", IsRequired = false, EmitDefaultValue = false)] + public bool? IsEncodingRequired { get; set; } + + /// + /// Indicates whether the access method has been issued. + /// + [DataMember(Name = "is_issued", IsRequired = false, EmitDefaultValue = false)] + public bool IsIssued { get; set; } + + /// + /// Indicates whether the access method is ready for card assignment. This is true when the access method is in card mode, has not yet been issued, and the system supports credential assignment. + /// + [DataMember(Name = "is_ready_for_assignment", IsRequired = false, EmitDefaultValue = false)] + public bool? IsReadyForAssignment { get; set; } + + /// + /// Indicates whether the access method is ready to be encoded. This is true when the credential has been created and the card has not yet been issued. + /// + [DataMember(Name = "is_ready_for_encoding", IsRequired = false, EmitDefaultValue = false)] + public bool? IsReadyForEncoding { get; set; } + + /// + /// Date and time at which the access method was issued. + /// + [DataMember(Name = "issued_at", IsRequired = false, EmitDefaultValue = false)] + public string? IssuedAt { get; set; } + + /// + /// Access method mode. Supported values: `code`, `card`, `mobile_key`, `cloud_key`. + /// + [DataMember(Name = "mode", IsRequired = false, EmitDefaultValue = false)] + public UnmanagedAccessMethod.ModeEnum Mode { get; set; } + + /// + /// Pending mutations for the [access method](https://docs.seam.co/use-cases/granting-access/creating-an-access-grant). Indicates operations that are in progress. + /// + [DataMember(Name = "pending_mutations", IsRequired = false, EmitDefaultValue = false)] + public List PendingMutations { get; set; } + + /// + /// Warnings associated with the [access method](https://docs.seam.co/use-cases/granting-access/creating-an-access-grant). + /// + [DataMember(Name = "warnings", IsRequired = false, EmitDefaultValue = false)] + public List Warnings { get; set; } + + /// + /// ID of the Seam workspace associated with the access method. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public string WorkspaceId { 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/Model/UnmanagedDevice.cs b/output/csharp/src/Seam/Model/UnmanagedDevice.cs index 4f37e104..6b8d7f64 100644 --- a/output/csharp/src/Seam/Model/UnmanagedDevice.cs +++ b/output/csharp/src/Seam/Model/UnmanagedDevice.cs @@ -203,50 +203,56 @@ public enum DeviceTypeEnum [EnumMember(Value = "ultraloq_lock")] UltraloqLock = 26, + [EnumMember(Value = "yacan_lock")] + YacanLock = 27, + [EnumMember(Value = "keyincode_lock")] - KeyincodeLock = 27, + KeyincodeLock = 28, [EnumMember(Value = "omnitec_lock")] - OmnitecLock = 28, + OmnitecLock = 29, [EnumMember(Value = "kisi_lock")] - KisiLock = 29, + KisiLock = 30, + + [EnumMember(Value = "aqara_lock")] + AqaraLock = 31, [EnumMember(Value = "keynest_key")] - KeynestKey = 30, + KeynestKey = 32, [EnumMember(Value = "noiseaware_activity_zone")] - NoiseawareActivityZone = 31, + NoiseawareActivityZone = 33, [EnumMember(Value = "minut_sensor")] - MinutSensor = 32, + MinutSensor = 34, [EnumMember(Value = "ecobee_thermostat")] - EcobeeThermostat = 33, + EcobeeThermostat = 35, [EnumMember(Value = "nest_thermostat")] - NestThermostat = 34, + NestThermostat = 36, [EnumMember(Value = "honeywell_resideo_thermostat")] - HoneywellResideoThermostat = 35, + HoneywellResideoThermostat = 37, [EnumMember(Value = "tado_thermostat")] - TadoThermostat = 36, + TadoThermostat = 38, [EnumMember(Value = "sensi_thermostat")] - SensiThermostat = 37, + SensiThermostat = 39, [EnumMember(Value = "smartthings_thermostat")] - SmartthingsThermostat = 38, + SmartthingsThermostat = 40, [EnumMember(Value = "ios_phone")] - IosPhone = 39, + IosPhone = 41, [EnumMember(Value = "android_phone")] - AndroidPhone = 40, + AndroidPhone = 42, [EnumMember(Value = "ring_camera")] - RingCamera = 41, + RingCamera = 43, } [JsonConverter(typeof(JsonSubtypes), "error_code")] @@ -289,6 +295,10 @@ public enum DeviceTypeEnum typeof(UnmanagedDeviceErrorsDormakabaSitesDisconnected), "dormakaba_sites_disconnected" )] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedDeviceErrorsInsufficientPermissions), + "insufficient_permissions" + )] [JsonSubtypes.KnownSubType( typeof(UnmanagedDeviceErrorsSaltoKsSubscriptionLimitExceeded), "salto_ks_subscription_limit_exceeded" @@ -454,6 +464,78 @@ public override string ToString() } } + [DataContract(Name = "seamModel_unmanagedDeviceErrorsInsufficientPermissions_model")] + public class UnmanagedDeviceErrorsInsufficientPermissions : UnmanagedDeviceErrors + { + [JsonConstructorAttribute] + protected UnmanagedDeviceErrorsInsufficientPermissions() { } + + public UnmanagedDeviceErrorsInsufficientPermissions( + string createdAt = default, + string errorCode = default, + bool isConnectedAccountError = default, + bool isDeviceError = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + IsConnectedAccountError = isConnectedAccountError; + IsDeviceError = isDeviceError; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "insufficient_permissions"; + + /// + /// Indicates that the error is a [connected account](https://docs.seam.co/api/connected_accounts) error. + /// + [DataMember( + Name = "is_connected_account_error", + IsRequired = false, + EmitDefaultValue = false + )] + public bool IsConnectedAccountError { get; set; } + + /// + /// Indicates that the error is not a device error. + /// + [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] + public bool IsDeviceError { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { 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 = "seamModel_unmanagedDeviceErrorsDormakabaSitesDisconnected_model")] public class UnmanagedDeviceErrorsDormakabaSitesDisconnected : UnmanagedDeviceErrors { @@ -1192,10 +1274,6 @@ public override string ToString() [JsonConverter(typeof(JsonSubtypes), "warning_code")] [JsonSubtypes.FallBackSubType(typeof(UnmanagedDeviceWarningsUnrecognized))] - [JsonSubtypes.KnownSubType( - typeof(UnmanagedDeviceWarningsInsufficientPermissions), - "insufficient_permissions" - )] [JsonSubtypes.KnownSubType( typeof(UnmanagedDeviceWarningsMaxAccessCodesReached), "max_access_codes_reached" @@ -2755,58 +2833,6 @@ public override string ToString() } } - [DataContract(Name = "seamModel_unmanagedDeviceWarningsInsufficientPermissions_model")] - public class UnmanagedDeviceWarningsInsufficientPermissions : UnmanagedDeviceWarnings - { - [JsonConstructorAttribute] - protected UnmanagedDeviceWarningsInsufficientPermissions() { } - - public UnmanagedDeviceWarningsInsufficientPermissions( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "insufficient_permissions"; - - 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 = "seamModel_unmanagedDeviceWarningsUnrecognized_model")] public class UnmanagedDeviceWarningsUnrecognized : UnmanagedDeviceWarnings { @@ -3038,7 +3064,7 @@ public override string ToString() public string CreatedAt { get; set; } /// - /// Set of key:value pairs. Adding custom metadata to a resource, such as a [Connect Webview](https://docs.seam.co/core-concepts/connect-webviews/attaching-custom-data-to-the-connect-webview), [connected account](https://docs.seam.co/core-concepts/connected-accounts/adding-custom-metadata-to-a-connected-account), or [device](https://docs.seam.co/core-concepts/devices/adding-custom-metadata-to-a-device), enables you to store custom information, like customer details or internal IDs from your application. + /// Set of key:value pairs. Adding custom metadata to a resource, such as a [Connect Webview](https://docs.seam.co/core-concepts/connect-webviews/attaching-custom-data-to-the-connect-webview), [connected account](https://docs.seam.co/core-concepts/connected-accounts/adding-custom-metadata-to-a-connected-account), or [device](https://docs.seam.co/core-concepts/devices/adding-custom-metadata-to-a-device), enables you to store custom information, like customer details or internal IDs from your application. Keys set to `null` or to an empty string are omitted. /// [DataMember(Name = "custom_metadata", IsRequired = false, EmitDefaultValue = false)] public object CustomMetadata { get; set; } @@ -3119,11 +3145,13 @@ protected UnmanagedDeviceLocation() { } public UnmanagedDeviceLocation( string? locationName = default, + string? roomName = default, string? timeZone = default, string? timezone = default ) { LocationName = locationName; + RoomName = roomName; TimeZone = timeZone; Timezone = timezone; } @@ -3134,6 +3162,12 @@ public UnmanagedDeviceLocation( [DataMember(Name = "location_name", IsRequired = false, EmitDefaultValue = false)] public string? LocationName { get; set; } + /// + /// Name of the room within the device location, when the provider reports one. + /// + [DataMember(Name = "room_name", IsRequired = false, EmitDefaultValue = false)] + public string? RoomName { get; set; } + /// /// Time zone of the device location. /// diff --git a/output/csharp/src/Seam/Model/UnmanagedUserIdentity.cs b/output/csharp/src/Seam/Model/UnmanagedUserIdentity.cs new file mode 100644 index 00000000..4bada5ab --- /dev/null +++ b/output/csharp/src/Seam/Model/UnmanagedUserIdentity.cs @@ -0,0 +1,486 @@ +using System.Runtime.Serialization; +using System.Text; +using JsonSubTypes; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using Seam.Model; + +namespace Seam.Model +{ + /// + /// Represents an unmanaged user identity. Unmanaged user identities do not have keys. + /// + [DataContract(Name = "seamModel_unmanagedUserIdentity_model")] + public class UnmanagedUserIdentity + { + [JsonConstructorAttribute] + protected UnmanagedUserIdentity() { } + + public UnmanagedUserIdentity( + List acsUserIds = default, + string createdAt = default, + string displayName = default, + string? emailAddress = default, + List errors = default, + string? fullName = default, + List mergedUserIdentityIds = default, + List mergedUserIdentityKeys = default, + string? phoneNumber = default, + string userIdentityId = default, + List warnings = default, + string workspaceId = default + ) + { + AcsUserIds = acsUserIds; + CreatedAt = createdAt; + DisplayName = displayName; + EmailAddress = emailAddress; + Errors = errors; + FullName = fullName; + MergedUserIdentityIds = mergedUserIdentityIds; + MergedUserIdentityKeys = mergedUserIdentityKeys; + PhoneNumber = phoneNumber; + UserIdentityId = userIdentityId; + Warnings = warnings; + WorkspaceId = workspaceId; + } + + [JsonConverter(typeof(JsonSubtypes), "error_code")] + [JsonSubtypes.FallBackSubType(typeof(UnmanagedUserIdentityErrorsUnrecognized))] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedUserIdentityErrorsIssueWithAcsUser), + "issue_with_acs_user" + )] + public abstract class UnmanagedUserIdentityErrors + { + public abstract string ErrorCode { get; } + + public abstract string AcsSystemId { get; set; } + + public abstract string AcsUserId { get; set; } + + public abstract string CreatedAt { get; set; } + + public abstract string Message { get; set; } + + public abstract override string ToString(); + } + + [DataContract(Name = "seamModel_unmanagedUserIdentityErrorsIssueWithAcsUser_model")] + public class UnmanagedUserIdentityErrorsIssueWithAcsUser : UnmanagedUserIdentityErrors + { + [JsonConstructorAttribute] + protected UnmanagedUserIdentityErrorsIssueWithAcsUser() { } + + public UnmanagedUserIdentityErrorsIssueWithAcsUser( + string acsSystemId = default, + string acsUserId = default, + string createdAt = default, + string errorCode = default, + string message = default + ) + { + AcsSystemId = acsSystemId; + AcsUserId = acsUserId; + CreatedAt = createdAt; + ErrorCode = errorCode; + Message = message; + } + + /// + /// ID of the access system that the user identity is associated with. + /// + [DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] + public override string AcsSystemId { get; set; } + + /// + /// ID of the access system user that has an issue. + /// + [DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] + public override string AcsUserId { get; set; } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "issue_with_acs_user"; + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { 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 = "seamModel_unmanagedUserIdentityErrorsUnrecognized_model")] + public class UnmanagedUserIdentityErrorsUnrecognized : UnmanagedUserIdentityErrors + { + [JsonConstructorAttribute] + protected UnmanagedUserIdentityErrorsUnrecognized() { } + + public UnmanagedUserIdentityErrorsUnrecognized( + string errorCode = default, + string acsSystemId = default, + string acsUserId = default, + string createdAt = default, + string message = default + ) + { + ErrorCode = errorCode; + AcsSystemId = acsSystemId; + AcsUserId = acsUserId; + CreatedAt = createdAt; + Message = message; + } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "unrecognized"; + + /// + /// ID of the access system that the user identity is associated with. + /// + [DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] + public override string AcsSystemId { get; set; } + + /// + /// ID of the access system user that has an issue. + /// + [DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] + public override string AcsUserId { get; set; } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { 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(); + } + } + + [JsonConverter(typeof(JsonSubtypes), "warning_code")] + [JsonSubtypes.FallBackSubType(typeof(UnmanagedUserIdentityWarningsUnrecognized))] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedUserIdentityWarningsAcsUserProfileDoesNotMatchUserIdentity), + "acs_user_profile_does_not_match_user_identity" + )] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedUserIdentityWarningsBeingDeleted), + "being_deleted" + )] + public abstract class UnmanagedUserIdentityWarnings + { + public abstract string WarningCode { get; } + + public abstract string CreatedAt { get; set; } + + public abstract string Message { get; set; } + + public abstract override string ToString(); + } + + [DataContract(Name = "seamModel_unmanagedUserIdentityWarningsBeingDeleted_model")] + public class UnmanagedUserIdentityWarningsBeingDeleted : UnmanagedUserIdentityWarnings + { + [JsonConstructorAttribute] + protected UnmanagedUserIdentityWarningsBeingDeleted() { } + + public UnmanagedUserIdentityWarningsBeingDeleted( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "being_deleted"; + + 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 = "seamModel_unmanagedUserIdentityWarningsAcsUserProfileDoesNotMatchUserIdentity_model" + )] + public class UnmanagedUserIdentityWarningsAcsUserProfileDoesNotMatchUserIdentity + : UnmanagedUserIdentityWarnings + { + [JsonConstructorAttribute] + protected UnmanagedUserIdentityWarningsAcsUserProfileDoesNotMatchUserIdentity() { } + + public UnmanagedUserIdentityWarningsAcsUserProfileDoesNotMatchUserIdentity( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = + "acs_user_profile_does_not_match_user_identity"; + + 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 = "seamModel_unmanagedUserIdentityWarningsUnrecognized_model")] + public class UnmanagedUserIdentityWarningsUnrecognized : UnmanagedUserIdentityWarnings + { + [JsonConstructorAttribute] + protected UnmanagedUserIdentityWarningsUnrecognized() { } + + public UnmanagedUserIdentityWarningsUnrecognized( + string warningCode = default, + string createdAt = default, + string message = default + ) + { + WarningCode = warningCode; + CreatedAt = createdAt; + Message = message; + } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "unrecognized"; + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { 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(); + } + } + + /// + /// Array of access system user IDs associated with the user identity. + /// + [DataMember(Name = "acs_user_ids", IsRequired = false, EmitDefaultValue = false)] + public List AcsUserIds { get; set; } + + /// + /// Date and time at which the user identity was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// Display name for the user identity. + /// + [DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] + public string DisplayName { get; set; } + + /// + /// Unique email address for the user identity. + /// + [DataMember(Name = "email_address", IsRequired = false, EmitDefaultValue = false)] + public string? EmailAddress { get; set; } + + /// + /// Array of errors associated with the user identity. Each error object within the array contains fields like "error_code" and "message." "error_code" is a string that uniquely identifies the type of error, enabling quick recognition and categorization of the issue. "message" provides a more detailed description of the error, offering insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "errors", IsRequired = false, EmitDefaultValue = false)] + public List Errors { get; set; } + + /// + /// Full name of the user associated with the user identity. + /// + [DataMember(Name = "full_name", IsRequired = false, EmitDefaultValue = false)] + public string? FullName { get; set; } + + /// + /// IDs that other user identities used to have before they were merged into this user identity. Looking up any of them returns this user identity. + /// + [DataMember( + Name = "merged_user_identity_ids", + IsRequired = false, + EmitDefaultValue = false + )] + public List MergedUserIdentityIds { get; set; } + + /// + /// Keys that other user identities used to have before they were merged into this user identity. Looking up any of them returns this user identity. + /// + [DataMember( + Name = "merged_user_identity_keys", + IsRequired = false, + EmitDefaultValue = false + )] + public List MergedUserIdentityKeys { get; set; } + + /// + /// Unique phone number for the user identity in [E.164 format](https://www.itu.int/rec/T-REC-E.164/en) (for example, +15555550100). + /// + [DataMember(Name = "phone_number", IsRequired = false, EmitDefaultValue = false)] + public string? PhoneNumber { get; set; } + + /// + /// ID of the user identity. + /// + [DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] + public string UserIdentityId { get; set; } + + /// + /// Array of warnings associated with the user identity. Each warning object within the array contains two fields: "warning_code" and "message." "warning_code" is a string that uniquely identifies the type of warning, enabling quick recognition and categorization of the issue. "message" provides a more detailed description of the warning, offering insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "warnings", IsRequired = false, EmitDefaultValue = false)] + public List Warnings { get; set; } + + /// + /// ID of the workspace that contains the user identity. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public string WorkspaceId { 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/Model/UserIdentity.cs b/output/csharp/src/Seam/Model/UserIdentity.cs index a575615a..7a28e98c 100644 --- a/output/csharp/src/Seam/Model/UserIdentity.cs +++ b/output/csharp/src/Seam/Model/UserIdentity.cs @@ -24,6 +24,8 @@ public UserIdentity( string? emailAddress = default, List errors = default, string? fullName = default, + List mergedUserIdentityIds = default, + List mergedUserIdentityKeys = default, string? phoneNumber = default, string userIdentityId = default, string? userIdentityKey = default, @@ -37,6 +39,8 @@ public UserIdentity( EmailAddress = emailAddress; Errors = errors; FullName = fullName; + MergedUserIdentityIds = mergedUserIdentityIds; + MergedUserIdentityKeys = mergedUserIdentityKeys; PhoneNumber = phoneNumber; UserIdentityId = userIdentityId; UserIdentityKey = userIdentityKey; @@ -415,6 +419,26 @@ public override string ToString() [DataMember(Name = "full_name", IsRequired = false, EmitDefaultValue = false)] public string? FullName { get; set; } + /// + /// IDs that other user identities used to have before they were merged into this user identity. Looking up any of them returns this user identity. + /// + [DataMember( + Name = "merged_user_identity_ids", + IsRequired = false, + EmitDefaultValue = false + )] + public List MergedUserIdentityIds { get; set; } + + /// + /// Keys that other user identities used to have before they were merged into this user identity. Looking up any of them returns this user identity. + /// + [DataMember( + Name = "merged_user_identity_keys", + IsRequired = false, + EmitDefaultValue = false + )] + public List MergedUserIdentityKeys { get; set; } + /// /// Unique phone number for the user identity in [E.164 format](https://www.itu.int/rec/T-REC-E.164/en) (for example, +15555550100). /// diff --git a/package-lock.json b/package-lock.json index 65c23a84..ce1e0462 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,9 +9,9 @@ "version": "1.2.0", "license": "MIT", "devDependencies": { - "@seamapi/blueprint": "^1.0.0", + "@seamapi/blueprint": "^1.8.0", "@seamapi/smith": "^1.1.0", - "@seamapi/types": "1.975.0", + "@seamapi/types": "^1.1026.0", "change-case": "^5.4.4", "execa": "^10.0.1", "prettier": "^3.0.0" @@ -790,9 +790,9 @@ "license": "MIT" }, "node_modules/@seamapi/blueprint": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@seamapi/blueprint/-/blueprint-1.0.0.tgz", - "integrity": "sha512-tQLylewWRJL1PWNxt9fXH/NWKIY0oA4NaQnRtRul0Dewy5yFqQy1fdi5IRPa7G3v+D9rrEiCwVA/omWrfrPZ+Q==", + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/@seamapi/blueprint/-/blueprint-1.8.0.tgz", + "integrity": "sha512-NUghBmYaKreBeBxwPIB2O9hjIFZtEjVj73tAsuKdJR8t4BxlKK1I0XDQXxo3ZsH2QezNlbdo9/0MoX/33VXuhQ==", "dev": true, "license": "MIT", "dependencies": { @@ -800,8 +800,8 @@ "zod": "^3.23.8" }, "engines": { - "node": ">=22.11.0", - "npm": ">=10.9.4" + "node": ">=22.12.0", + "npm": ">=10.0.0" } }, "node_modules/@seamapi/smith": { @@ -838,14 +838,14 @@ } }, "node_modules/@seamapi/types": { - "version": "1.975.0", - "resolved": "https://registry.npmjs.org/@seamapi/types/-/types-1.975.0.tgz", - "integrity": "sha512-u9oMHzPIE1yN8IlKrn6t96zGWc0+YdTr3nb5zW2NpyaSpoiE6lbJ1JTqobp4f8lJmytKUfkDoXJMt+d2lxUlDQ==", + "version": "1.1026.0", + "resolved": "https://registry.npmjs.org/@seamapi/types/-/types-1.1026.0.tgz", + "integrity": "sha512-T+5bduHJYGGnuNaKFefw1vbHY77pHGPQeJjonW810BX8Fio/j4TCBkrs41yHSQAbQ1j58DfObHctexrjyPWfiA==", "dev": true, "license": "MIT", "engines": { - "node": ">=22.11.0", - "npm": ">=10.9.4" + "node": ">=22.12.0", + "npm": ">=10.0.0" }, "peerDependencies": { "zod": "^3.24.0" diff --git a/package.json b/package.json index 3627577e..cd36bd99 100644 --- a/package.json +++ b/package.json @@ -31,9 +31,9 @@ } }, "devDependencies": { - "@seamapi/blueprint": "^1.0.0", + "@seamapi/blueprint": "^1.8.0", "@seamapi/smith": "^1.1.0", - "@seamapi/types": "1.975.0", + "@seamapi/types": "^1.1026.0", "change-case": "^5.4.4", "execa": "^10.0.1", "prettier": "^3.0.0"