Skip to content

Commit 483b0ad

Browse files
razor-xandrii-balitskyiseambot
authored
Update @seamapi/types to v1.302.2 (#34)
* Update @seamapi/types to v1.302.2 * Update @seamapi/nextlove-sdk-generator * Run npm run generate in generate workflow * Fix npm package source * Bump generator to 1.14.13 * Bump generator to 1.14.14 * ci: Generate code * Fix type error * Bump generator to 1.14.15, generate, fix action attempt test * Bump generator to 1.14.16 to fix json serialization * ci: Generate code * Bump generator to 1.14.16 to fix action attempt enum * ci: Generate code --------- Co-authored-by: Andrii Balitskyi <10balian10@gmail.com> Co-authored-by: Seam Bot <seambot@getseam.com>
1 parent 16d37ac commit 483b0ad

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+14742
-4486
lines changed

.github/workflows/generate.yml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
---
22
name: Generate
33

4-
on: {}
4+
on:
5+
push:
6+
branches-ignore:
7+
- main
8+
workflow_dispatch: {}
59

610
jobs:
711
commit:
@@ -10,12 +14,12 @@ jobs:
1014
timeout-minutes: 30
1115
steps:
1216
- name: Checkout
13-
uses: actions/checkout@v3
17+
uses: actions/checkout@v4
1418
with:
1519
ref: ${{ github.head_ref }}
1620
token: ${{ secrets.GH_TOKEN }}
1721
- name: Import GPG key
18-
uses: crazy-max/ghaction-import-gpg@v5
22+
uses: crazy-max/ghaction-import-gpg@v6
1923
with:
2024
git_user_signingkey: true
2125
git_commit_gpgsign: true
@@ -28,11 +32,11 @@ jobs:
2832
with:
2933
install_dependencies: 'false'
3034
- name: Normalize package-lock.json
31-
run: npm install --ignore-scripts
32-
env:
33-
NODE_AUTH_TOKEN: ${{ secrets.GH_TOKEN }}
35+
run: npm install
36+
- name: Generate code
37+
run: npm run generate
3438
- name: Commit
35-
uses: stefanzweifel/git-auto-commit-action@v4
39+
uses: stefanzweifel/git-auto-commit-action@v5
3640
with:
3741
commit_message: 'ci: Generate code'
3842
commit_user_name: ${{ secrets.GIT_USER_NAME }}

.npmrc

Lines changed: 0 additions & 1 deletion
This file was deleted.

output/csharp/src/Seam.Test/Client/SeamTests.cs

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
namespace Seam.Test;
22

3-
using Seam.Model;
43
using Seam.Client;
4+
using Seam.Model;
55

66
public class UnitTest1 : SeamConnectTest
77
{
88
[Fact]
99
public void TestGetDeviceList()
1010
{
11-
var device = seam.Devices
12-
.List()
11+
var device = seam
12+
.Devices.List()
1313
.First(d => d.DeviceType == Device.DeviceTypeEnum.AugustLock);
1414

1515
Assert.NotNull(device);
@@ -19,8 +19,8 @@ public void TestGetDeviceList()
1919
[Fact]
2020
public async void TestGetDeviceListAsync()
2121
{
22-
var device = (await seam.Devices.ListAsync()).First(
23-
d => d.DeviceType == Device.DeviceTypeEnum.AugustLock
22+
var device = (await seam.Devices.ListAsync()).First(d =>
23+
d.DeviceType == Device.DeviceTypeEnum.AugustLock
2424
);
2525

2626
Assert.NotNull(device);
@@ -30,8 +30,8 @@ public async void TestGetDeviceListAsync()
3030
[Fact]
3131
public void TestCreateAccessCode()
3232
{
33-
var device = seam.Devices
34-
.List()
33+
var device = seam
34+
.Devices.List()
3535
.First(d => d.DeviceType == Device.DeviceTypeEnum.AugustLock);
3636

3737
var access_code = seam.AccessCodes.Create(deviceId: device.DeviceId, code: "1234");
@@ -43,8 +43,8 @@ public void TestCreateAccessCode()
4343
[Fact]
4444
public async void TestCreateAccessCodeAsync()
4545
{
46-
var device = seam.Devices
47-
.List()
46+
var device = seam
47+
.Devices.List()
4848
.First(d => d.DeviceType == Device.DeviceTypeEnum.AugustLock);
4949

5050
var access_code = await seam.AccessCodes.CreateAsync(
@@ -59,27 +59,27 @@ public async void TestCreateAccessCodeAsync()
5959
[Fact]
6060
public void TestLockDoor()
6161
{
62-
var device = seam.Devices
63-
.List()
62+
var device = seam
63+
.Devices.List()
6464
.First(d => d.DeviceType == Device.DeviceTypeEnum.AugustLock);
6565

6666
var action_attempt = seam.Locks.LockDoor(deviceId: device.DeviceId);
6767

68-
Assert.IsType<ActionAttemptPending>(action_attempt);
69-
Assert.Equal("LOCK_DOOR", (action_attempt as ActionAttemptPending)!.ActionType);
68+
Assert.IsType<ActionAttemptLockDoor>(action_attempt);
69+
Assert.Equal("LOCK_DOOR", (action_attempt as ActionAttemptLockDoor)!.ActionType);
7070
}
7171

7272
[Fact]
7373
public async void TestLockDoorAsync()
7474
{
75-
var device = seam.Devices
76-
.List()
75+
var device = seam
76+
.Devices.List()
7777
.First(d => d.DeviceType == Device.DeviceTypeEnum.AugustLock);
7878

7979
var action_attempt = await seam.Locks.LockDoorAsync(deviceId: device.DeviceId);
8080

81-
Assert.IsType<ActionAttemptPending>(action_attempt);
82-
Assert.Equal("LOCK_DOOR", (action_attempt as ActionAttemptPending)!.ActionType);
81+
Assert.IsType<ActionAttemptLockDoor>(action_attempt);
82+
Assert.Equal("LOCK_DOOR", (action_attempt as ActionAttemptLockDoor)!.ActionType);
8383
}
8484

8585
[Fact]
@@ -91,16 +91,16 @@ public void Test()
9191
[Fact]
9292
public void TestDelete()
9393
{
94-
var device = seam.Devices
95-
.List()
94+
var device = seam
95+
.Devices.List()
9696
.First(d => d.DeviceType == Device.DeviceTypeEnum.AugustLock);
9797

9898
Assert.NotNull(device);
9999

100100
seam.Devices.Delete(deviceId: device.DeviceId);
101101

102-
var device2 = seam.Devices
103-
.List()
102+
var device2 = seam
103+
.Devices.List()
104104
.First(d => d.DeviceType == Device.DeviceTypeEnum.AugustLock);
105105

106106
Assert.NotEqual(device.DeviceId, device2.DeviceId);
@@ -109,16 +109,16 @@ public void TestDelete()
109109
[Fact]
110110
public async void TestDeleteAsync()
111111
{
112-
var device = (await seam.Devices.ListAsync()).First(
113-
d => d.DeviceType == Device.DeviceTypeEnum.AugustLock
112+
var device = (await seam.Devices.ListAsync()).First(d =>
113+
d.DeviceType == Device.DeviceTypeEnum.AugustLock
114114
);
115115

116116
Assert.NotNull(device);
117117

118118
await seam.Devices.DeleteAsync(deviceId: device.DeviceId);
119119

120-
var device2 = (await seam.Devices.ListAsync()).First(
121-
d => d.DeviceType == Device.DeviceTypeEnum.AugustLock
120+
var device2 = (await seam.Devices.ListAsync()).First(d =>
121+
d.DeviceType == Device.DeviceTypeEnum.AugustLock
122122
);
123123

124124
Assert.NotEqual(device.DeviceId, device2.DeviceId);

0 commit comments

Comments
 (0)