Skip to content

Commit

Permalink
feat: add seam/types, update SDK
Browse files Browse the repository at this point in the history
* update

* format
  • Loading branch information
mxsdev authored Jan 31, 2024
1 parent b64430f commit 45eb299
Show file tree
Hide file tree
Showing 17 changed files with 1,211 additions and 68 deletions.
45 changes: 38 additions & 7 deletions output/csharp/src/Seam/Api/ConnectWebviews.cs
Original file line number Diff line number Diff line change
Expand Up @@ -160,11 +160,17 @@ public enum AcceptedProvidersEnum
[EnumMember(Value = "assa_abloy_credential_service")]
AssaAbloyCredentialService = 32,

[EnumMember(Value = "seam_bridge")]
SeamBridge = 33,

[EnumMember(Value = "yale_access")]
YaleAccess = 33,
YaleAccess = 34,

[EnumMember(Value = "hid_cm")]
HidCm = 34
HidCm = 35,

[EnumMember(Value = "google_nest")]
GoogleNest = 36
}

[JsonConverter(typeof(StringEnumConverter))]
Expand Down Expand Up @@ -448,14 +454,21 @@ public class ListRequest
[JsonConstructorAttribute]
protected ListRequest() { }

public ListRequest(string? userIdentifierKey = default)
public ListRequest(
string? userIdentifierKey = default,
object? customMetadataHas = default
)
{
UserIdentifierKey = userIdentifierKey;
CustomMetadataHas = customMetadataHas;
}

[DataMember(Name = "user_identifier_key", IsRequired = false, EmitDefaultValue = false)]
public string? UserIdentifierKey { get; set; }

[DataMember(Name = "custom_metadata_has", IsRequired = false, EmitDefaultValue = false)]
public object? CustomMetadataHas { get; set; }

public override string ToString()
{
JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null);
Expand Down Expand Up @@ -519,9 +532,17 @@ public List<ConnectWebview> List(ListRequest request)
.Data.ConnectWebviews;
}

public List<ConnectWebview> List(string? userIdentifierKey = default)
public List<ConnectWebview> List(
string? userIdentifierKey = default,
object? customMetadataHas = default
)
{
return List(new ListRequest(userIdentifierKey: userIdentifierKey));
return List(
new ListRequest(
userIdentifierKey: userIdentifierKey,
customMetadataHas: customMetadataHas
)
);
}

public async Task<List<ConnectWebview>> ListAsync(ListRequest request)
Expand All @@ -533,9 +554,19 @@ public async Task<List<ConnectWebview>> ListAsync(ListRequest request)
.ConnectWebviews;
}

public async Task<List<ConnectWebview>> ListAsync(string? userIdentifierKey = default)
public async Task<List<ConnectWebview>> ListAsync(
string? userIdentifierKey = default,
object? customMetadataHas = default
)
{
return (await ListAsync(new ListRequest(userIdentifierKey: userIdentifierKey)));
return (
await ListAsync(
new ListRequest(
userIdentifierKey: userIdentifierKey,
customMetadataHas: customMetadataHas
)
)
);
}
}
}
Expand Down
37 changes: 27 additions & 10 deletions output/csharp/src/Seam/Api/ConnectedAccounts.cs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,15 @@ await GetAsync(new GetRequest(connectedAccountId: connectedAccountId, email: ema
public class ListRequest
{
[JsonConstructorAttribute]
public ListRequest() { }
protected ListRequest() { }

public ListRequest(object? customMetadataHas = default)
{
CustomMetadataHas = customMetadataHas;
}

[DataMember(Name = "custom_metadata_has", IsRequired = false, EmitDefaultValue = false)]
public object? CustomMetadataHas { get; set; }

public override string ToString()
{
Expand Down Expand Up @@ -196,9 +204,9 @@ public List<ConnectedAccount> List(ListRequest request)
.Data.ConnectedAccounts;
}

public List<ConnectedAccount> List()
public List<ConnectedAccount> List(object? customMetadataHas = default)
{
return List(new ListRequest());
return List(new ListRequest(customMetadataHas: customMetadataHas));
}

public async Task<List<ConnectedAccount>> ListAsync(ListRequest request)
Expand All @@ -210,9 +218,9 @@ public async Task<List<ConnectedAccount>> ListAsync(ListRequest request)
.ConnectedAccounts;
}

public async Task<List<ConnectedAccount>> ListAsync()
public async Task<List<ConnectedAccount>> ListAsync(object? customMetadataHas = default)
{
return (await ListAsync(new ListRequest()));
return (await ListAsync(new ListRequest(customMetadataHas: customMetadataHas)));
}

[DataContract(Name = "updateRequest_request")]
Expand All @@ -223,11 +231,13 @@ protected UpdateRequest() { }

public UpdateRequest(
string connectedAccountId = default,
bool? automaticallyManageNewDevices = default
bool? automaticallyManageNewDevices = default,
object? customMetadata = default
)
{
ConnectedAccountId = connectedAccountId;
AutomaticallyManageNewDevices = automaticallyManageNewDevices;
CustomMetadata = customMetadata;
}

[DataMember(Name = "connected_account_id", IsRequired = true, EmitDefaultValue = false)]
Expand All @@ -240,6 +250,9 @@ public UpdateRequest(
)]
public bool? AutomaticallyManageNewDevices { get; set; }

[DataMember(Name = "custom_metadata", IsRequired = false, EmitDefaultValue = false)]
public object? CustomMetadata { get; set; }

public override string ToString()
{
JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null);
Expand Down Expand Up @@ -305,13 +318,15 @@ public ConnectedAccount Update(UpdateRequest request)

public ConnectedAccount Update(
string connectedAccountId = default,
bool? automaticallyManageNewDevices = default
bool? automaticallyManageNewDevices = default,
object? customMetadata = default
)
{
return Update(
new UpdateRequest(
connectedAccountId: connectedAccountId,
automaticallyManageNewDevices: automaticallyManageNewDevices
automaticallyManageNewDevices: automaticallyManageNewDevices,
customMetadata: customMetadata
)
);
}
Expand All @@ -329,14 +344,16 @@ await _seam.PostAsync<UpdateResponse>("/connected_accounts/update", requestOptio

public async Task<ConnectedAccount> UpdateAsync(
string connectedAccountId = default,
bool? automaticallyManageNewDevices = default
bool? automaticallyManageNewDevices = default,
object? customMetadata = default
)
{
return (
await UpdateAsync(
new UpdateRequest(
connectedAccountId: connectedAccountId,
automaticallyManageNewDevices: automaticallyManageNewDevices
automaticallyManageNewDevices: automaticallyManageNewDevices,
customMetadata: customMetadata
)
)
);
Expand Down
19 changes: 14 additions & 5 deletions output/csharp/src/Seam/Api/Devices.cs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,8 @@ public ListRequest(
List<string>? deviceIds = default,
float? limit = default,
string? createdBefore = default,
string? userIdentifierKey = default
string? userIdentifierKey = default,
object? customMetadataHas = default
)
{
ConnectedAccountId = connectedAccountId;
Expand All @@ -143,6 +144,7 @@ public ListRequest(
Limit = limit;
CreatedBefore = createdBefore;
UserIdentifierKey = userIdentifierKey;
CustomMetadataHas = customMetadataHas;
}

[JsonConverter(typeof(StringEnumConverter))]
Expand Down Expand Up @@ -477,6 +479,9 @@ public enum ManufacturerEnum
[DataMember(Name = "user_identifier_key", IsRequired = false, EmitDefaultValue = false)]
public string? UserIdentifierKey { get; set; }

[DataMember(Name = "custom_metadata_has", IsRequired = false, EmitDefaultValue = false)]
public object? CustomMetadataHas { get; set; }

public override string ToString()
{
JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null);
Expand Down Expand Up @@ -548,7 +553,8 @@ public List<Device> List(
List<string>? deviceIds = default,
float? limit = default,
string? createdBefore = default,
string? userIdentifierKey = default
string? userIdentifierKey = default,
object? customMetadataHas = default
)
{
return List(
Expand All @@ -562,7 +568,8 @@ public List<Device> List(
deviceIds: deviceIds,
limit: limit,
createdBefore: createdBefore,
userIdentifierKey: userIdentifierKey
userIdentifierKey: userIdentifierKey,
customMetadataHas: customMetadataHas
)
);
}
Expand All @@ -586,7 +593,8 @@ public async Task<List<Device>> ListAsync(
List<string>? deviceIds = default,
float? limit = default,
string? createdBefore = default,
string? userIdentifierKey = default
string? userIdentifierKey = default,
object? customMetadataHas = default
)
{
return (
Expand All @@ -601,7 +609,8 @@ await ListAsync(
deviceIds: deviceIds,
limit: limit,
createdBefore: createdBefore,
userIdentifierKey: userIdentifierKey
userIdentifierKey: userIdentifierKey,
customMetadataHas: customMetadataHas
)
)
);
Expand Down
19 changes: 14 additions & 5 deletions output/csharp/src/Seam/Api/Locks.cs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,8 @@ public ListRequest(
List<string>? deviceIds = default,
float? limit = default,
string? createdBefore = default,
string? userIdentifierKey = default
string? userIdentifierKey = default,
object? customMetadataHas = default
)
{
ConnectedAccountId = connectedAccountId;
Expand All @@ -143,6 +144,7 @@ public ListRequest(
Limit = limit;
CreatedBefore = createdBefore;
UserIdentifierKey = userIdentifierKey;
CustomMetadataHas = customMetadataHas;
}

[JsonConverter(typeof(StringEnumConverter))]
Expand Down Expand Up @@ -477,6 +479,9 @@ public enum ManufacturerEnum
[DataMember(Name = "user_identifier_key", IsRequired = false, EmitDefaultValue = false)]
public string? UserIdentifierKey { get; set; }

[DataMember(Name = "custom_metadata_has", IsRequired = false, EmitDefaultValue = false)]
public object? CustomMetadataHas { get; set; }

public override string ToString()
{
JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null);
Expand Down Expand Up @@ -548,7 +553,8 @@ public List<Device> List(
List<string>? deviceIds = default,
float? limit = default,
string? createdBefore = default,
string? userIdentifierKey = default
string? userIdentifierKey = default,
object? customMetadataHas = default
)
{
return List(
Expand All @@ -562,7 +568,8 @@ public List<Device> List(
deviceIds: deviceIds,
limit: limit,
createdBefore: createdBefore,
userIdentifierKey: userIdentifierKey
userIdentifierKey: userIdentifierKey,
customMetadataHas: customMetadataHas
)
);
}
Expand All @@ -586,7 +593,8 @@ public async Task<List<Device>> ListAsync(
List<string>? deviceIds = default,
float? limit = default,
string? createdBefore = default,
string? userIdentifierKey = default
string? userIdentifierKey = default,
object? customMetadataHas = default
)
{
return (
Expand All @@ -601,7 +609,8 @@ await ListAsync(
deviceIds: deviceIds,
limit: limit,
createdBefore: createdBefore,
userIdentifierKey: userIdentifierKey
userIdentifierKey: userIdentifierKey,
customMetadataHas: customMetadataHas
)
)
);
Expand Down
Loading

0 comments on commit 45eb299

Please sign in to comment.