Skip to content

Commit b5d457a

Browse files
feat(deps-dev): bump @seamapi/types from 1.410.1 to 1.413.0 in the seam group (#208)
* feat(deps-dev): bump @seamapi/types in the seam group Bumps the seam group with 1 update: [@seamapi/types](https://github.com/seamapi/types). Updates `@seamapi/types` from 1.410.1 to 1.413.0 - [Release notes](https://github.com/seamapi/types/releases) - [Changelog](https://github.com/seamapi/types/blob/main/.releaserc.json) - [Commits](seamapi/types@v1.410.1...v1.413.0) --- updated-dependencies: - dependency-name: "@seamapi/types" dependency-version: 1.413.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: seam ... Signed-off-by: dependabot[bot] <support@github.com> * ci: Generate code --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Seam Bot <seambot@getseam.com>
1 parent 390d463 commit b5d457a

14 files changed

Lines changed: 1292 additions & 6 deletions

output/csharp/src/Seam/Api/AccessGrants.cs

Lines changed: 583 additions & 0 deletions
Large diffs are not rendered by default.

output/csharp/src/Seam/Api/AccessMethods.cs

Lines changed: 190 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,196 @@ public async Task DeleteAsync(string accessMethodId = default)
7575
{
7676
await DeleteAsync(new DeleteRequest(accessMethodId: accessMethodId));
7777
}
78+
79+
[DataContract(Name = "getRequest_request")]
80+
public class GetRequest
81+
{
82+
[JsonConstructorAttribute]
83+
protected GetRequest() { }
84+
85+
public GetRequest(string accessMethodId = default)
86+
{
87+
AccessMethodId = accessMethodId;
88+
}
89+
90+
[DataMember(Name = "access_method_id", IsRequired = true, EmitDefaultValue = false)]
91+
public string AccessMethodId { get; set; }
92+
93+
public override string ToString()
94+
{
95+
JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null);
96+
97+
StringWriter stringWriter = new StringWriter(
98+
new StringBuilder(256),
99+
System.Globalization.CultureInfo.InvariantCulture
100+
);
101+
using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter))
102+
{
103+
jsonTextWriter.IndentChar = ' ';
104+
jsonTextWriter.Indentation = 2;
105+
jsonTextWriter.Formatting = Formatting.Indented;
106+
jsonSerializer.Serialize(jsonTextWriter, this, null);
107+
}
108+
109+
return stringWriter.ToString();
110+
}
111+
}
112+
113+
[DataContract(Name = "getResponse_response")]
114+
public class GetResponse
115+
{
116+
[JsonConstructorAttribute]
117+
protected GetResponse() { }
118+
119+
public GetResponse(AccessMethod accessMethod = default)
120+
{
121+
AccessMethod = accessMethod;
122+
}
123+
124+
[DataMember(Name = "access_method", IsRequired = false, EmitDefaultValue = false)]
125+
public AccessMethod AccessMethod { get; set; }
126+
127+
public override string ToString()
128+
{
129+
JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null);
130+
131+
StringWriter stringWriter = new StringWriter(
132+
new StringBuilder(256),
133+
System.Globalization.CultureInfo.InvariantCulture
134+
);
135+
using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter))
136+
{
137+
jsonTextWriter.IndentChar = ' ';
138+
jsonTextWriter.Indentation = 2;
139+
jsonTextWriter.Formatting = Formatting.Indented;
140+
jsonSerializer.Serialize(jsonTextWriter, this, null);
141+
}
142+
143+
return stringWriter.ToString();
144+
}
145+
}
146+
147+
public AccessMethod Get(GetRequest request)
148+
{
149+
var requestOptions = new RequestOptions();
150+
requestOptions.Data = request;
151+
return _seam.Post<GetResponse>("/access_methods/get", requestOptions).Data.AccessMethod;
152+
}
153+
154+
public AccessMethod Get(string accessMethodId = default)
155+
{
156+
return Get(new GetRequest(accessMethodId: accessMethodId));
157+
}
158+
159+
public async Task<AccessMethod> GetAsync(GetRequest request)
160+
{
161+
var requestOptions = new RequestOptions();
162+
requestOptions.Data = request;
163+
return (await _seam.PostAsync<GetResponse>("/access_methods/get", requestOptions))
164+
.Data
165+
.AccessMethod;
166+
}
167+
168+
public async Task<AccessMethod> GetAsync(string accessMethodId = default)
169+
{
170+
return (await GetAsync(new GetRequest(accessMethodId: accessMethodId)));
171+
}
172+
173+
[DataContract(Name = "listRequest_request")]
174+
public class ListRequest
175+
{
176+
[JsonConstructorAttribute]
177+
protected ListRequest() { }
178+
179+
public ListRequest(string accessGrantId = default)
180+
{
181+
AccessGrantId = accessGrantId;
182+
}
183+
184+
[DataMember(Name = "access_grant_id", IsRequired = true, EmitDefaultValue = false)]
185+
public string AccessGrantId { get; set; }
186+
187+
public override string ToString()
188+
{
189+
JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null);
190+
191+
StringWriter stringWriter = new StringWriter(
192+
new StringBuilder(256),
193+
System.Globalization.CultureInfo.InvariantCulture
194+
);
195+
using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter))
196+
{
197+
jsonTextWriter.IndentChar = ' ';
198+
jsonTextWriter.Indentation = 2;
199+
jsonTextWriter.Formatting = Formatting.Indented;
200+
jsonSerializer.Serialize(jsonTextWriter, this, null);
201+
}
202+
203+
return stringWriter.ToString();
204+
}
205+
}
206+
207+
[DataContract(Name = "listResponse_response")]
208+
public class ListResponse
209+
{
210+
[JsonConstructorAttribute]
211+
protected ListResponse() { }
212+
213+
public ListResponse(List<AccessMethod> accessMethods = default)
214+
{
215+
AccessMethods = accessMethods;
216+
}
217+
218+
[DataMember(Name = "access_methods", IsRequired = false, EmitDefaultValue = false)]
219+
public List<AccessMethod> AccessMethods { get; set; }
220+
221+
public override string ToString()
222+
{
223+
JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null);
224+
225+
StringWriter stringWriter = new StringWriter(
226+
new StringBuilder(256),
227+
System.Globalization.CultureInfo.InvariantCulture
228+
);
229+
using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter))
230+
{
231+
jsonTextWriter.IndentChar = ' ';
232+
jsonTextWriter.Indentation = 2;
233+
jsonTextWriter.Formatting = Formatting.Indented;
234+
jsonSerializer.Serialize(jsonTextWriter, this, null);
235+
}
236+
237+
return stringWriter.ToString();
238+
}
239+
}
240+
241+
public List<AccessMethod> List(ListRequest request)
242+
{
243+
var requestOptions = new RequestOptions();
244+
requestOptions.Data = request;
245+
return _seam
246+
.Post<ListResponse>("/access_methods/list", requestOptions)
247+
.Data.AccessMethods;
248+
}
249+
250+
public List<AccessMethod> List(string accessGrantId = default)
251+
{
252+
return List(new ListRequest(accessGrantId: accessGrantId));
253+
}
254+
255+
public async Task<List<AccessMethod>> ListAsync(ListRequest request)
256+
{
257+
var requestOptions = new RequestOptions();
258+
requestOptions.Data = request;
259+
return (await _seam.PostAsync<ListResponse>("/access_methods/list", requestOptions))
260+
.Data
261+
.AccessMethods;
262+
}
263+
264+
public async Task<List<AccessMethod>> ListAsync(string accessGrantId = default)
265+
{
266+
return (await ListAsync(new ListRequest(accessGrantId: accessGrantId)));
267+
}
78268
}
79269
}
80270

output/csharp/src/Seam/Api/ClientSessions.cs

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ public CreateRequest(
3131
string? customerKey = default,
3232
string? expiresAt = default,
3333
string? userIdentifierKey = default,
34+
string? userIdentityId = default,
3435
List<string>? userIdentityIds = default
3536
)
3637
{
@@ -40,6 +41,7 @@ public CreateRequest(
4041
CustomerKey = customerKey;
4142
ExpiresAt = expiresAt;
4243
UserIdentifierKey = userIdentifierKey;
44+
UserIdentityId = userIdentityId;
4345
UserIdentityIds = userIdentityIds;
4446
}
4547

@@ -65,6 +67,9 @@ public CreateRequest(
6567
[DataMember(Name = "user_identifier_key", IsRequired = false, EmitDefaultValue = false)]
6668
public string? UserIdentifierKey { get; set; }
6769

70+
[DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)]
71+
public string? UserIdentityId { get; set; }
72+
6873
[DataMember(Name = "user_identity_ids", IsRequired = false, EmitDefaultValue = false)]
6974
public List<string>? UserIdentityIds { get; set; }
7075

@@ -138,6 +143,7 @@ public ClientSession Create(
138143
string? customerKey = default,
139144
string? expiresAt = default,
140145
string? userIdentifierKey = default,
146+
string? userIdentityId = default,
141147
List<string>? userIdentityIds = default
142148
)
143149
{
@@ -149,6 +155,7 @@ public ClientSession Create(
149155
customerKey: customerKey,
150156
expiresAt: expiresAt,
151157
userIdentifierKey: userIdentifierKey,
158+
userIdentityId: userIdentityId,
152159
userIdentityIds: userIdentityIds
153160
)
154161
);
@@ -172,6 +179,7 @@ public async Task<ClientSession> CreateAsync(
172179
string? customerKey = default,
173180
string? expiresAt = default,
174181
string? userIdentifierKey = default,
182+
string? userIdentityId = default,
175183
List<string>? userIdentityIds = default
176184
)
177185
{
@@ -184,6 +192,7 @@ await CreateAsync(
184192
customerKey: customerKey,
185193
expiresAt: expiresAt,
186194
userIdentifierKey: userIdentifierKey,
195+
userIdentityId: userIdentityId,
187196
userIdentityIds: userIdentityIds
188197
)
189198
)
@@ -380,13 +389,15 @@ public GetOrCreateRequest(
380389
List<string>? connectedAccountIds = default,
381390
string? expiresAt = default,
382391
string? userIdentifierKey = default,
392+
string? userIdentityId = default,
383393
List<string>? userIdentityIds = default
384394
)
385395
{
386396
ConnectWebviewIds = connectWebviewIds;
387397
ConnectedAccountIds = connectedAccountIds;
388398
ExpiresAt = expiresAt;
389399
UserIdentifierKey = userIdentifierKey;
400+
UserIdentityId = userIdentityId;
390401
UserIdentityIds = userIdentityIds;
391402
}
392403

@@ -406,6 +417,9 @@ public GetOrCreateRequest(
406417
[DataMember(Name = "user_identifier_key", IsRequired = false, EmitDefaultValue = false)]
407418
public string? UserIdentifierKey { get; set; }
408419

420+
[DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)]
421+
public string? UserIdentityId { get; set; }
422+
409423
[DataMember(Name = "user_identity_ids", IsRequired = false, EmitDefaultValue = false)]
410424
public List<string>? UserIdentityIds { get; set; }
411425

@@ -477,6 +491,7 @@ public ClientSession GetOrCreate(
477491
List<string>? connectedAccountIds = default,
478492
string? expiresAt = default,
479493
string? userIdentifierKey = default,
494+
string? userIdentityId = default,
480495
List<string>? userIdentityIds = default
481496
)
482497
{
@@ -486,6 +501,7 @@ public ClientSession GetOrCreate(
486501
connectedAccountIds: connectedAccountIds,
487502
expiresAt: expiresAt,
488503
userIdentifierKey: userIdentifierKey,
504+
userIdentityId: userIdentityId,
489505
userIdentityIds: userIdentityIds
490506
)
491507
);
@@ -510,6 +526,7 @@ public async Task<ClientSession> GetOrCreateAsync(
510526
List<string>? connectedAccountIds = default,
511527
string? expiresAt = default,
512528
string? userIdentifierKey = default,
529+
string? userIdentityId = default,
513530
List<string>? userIdentityIds = default
514531
)
515532
{
@@ -520,6 +537,7 @@ await GetOrCreateAsync(
520537
connectedAccountIds: connectedAccountIds,
521538
expiresAt: expiresAt,
522539
userIdentifierKey: userIdentifierKey,
540+
userIdentityId: userIdentityId,
523541
userIdentityIds: userIdentityIds
524542
)
525543
)
@@ -537,13 +555,15 @@ public GrantAccessRequest(
537555
List<string>? connectWebviewIds = default,
538556
List<string>? connectedAccountIds = default,
539557
string? userIdentifierKey = default,
558+
string? userIdentityId = default,
540559
List<string>? userIdentityIds = default
541560
)
542561
{
543562
ClientSessionId = clientSessionId;
544563
ConnectWebviewIds = connectWebviewIds;
545564
ConnectedAccountIds = connectedAccountIds;
546565
UserIdentifierKey = userIdentifierKey;
566+
UserIdentityId = userIdentityId;
547567
UserIdentityIds = userIdentityIds;
548568
}
549569

@@ -563,6 +583,9 @@ public GrantAccessRequest(
563583
[DataMember(Name = "user_identifier_key", IsRequired = false, EmitDefaultValue = false)]
564584
public string? UserIdentifierKey { get; set; }
565585

586+
[DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)]
587+
public string? UserIdentityId { get; set; }
588+
566589
[DataMember(Name = "user_identity_ids", IsRequired = false, EmitDefaultValue = false)]
567590
public List<string>? UserIdentityIds { get; set; }
568591

@@ -598,6 +621,7 @@ public void GrantAccess(
598621
List<string>? connectWebviewIds = default,
599622
List<string>? connectedAccountIds = default,
600623
string? userIdentifierKey = default,
624+
string? userIdentityId = default,
601625
List<string>? userIdentityIds = default
602626
)
603627
{
@@ -607,6 +631,7 @@ public void GrantAccess(
607631
connectWebviewIds: connectWebviewIds,
608632
connectedAccountIds: connectedAccountIds,
609633
userIdentifierKey: userIdentifierKey,
634+
userIdentityId: userIdentityId,
610635
userIdentityIds: userIdentityIds
611636
)
612637
);
@@ -624,6 +649,7 @@ public async Task GrantAccessAsync(
624649
List<string>? connectWebviewIds = default,
625650
List<string>? connectedAccountIds = default,
626651
string? userIdentifierKey = default,
652+
string? userIdentityId = default,
627653
List<string>? userIdentityIds = default
628654
)
629655
{
@@ -633,6 +659,7 @@ await GrantAccessAsync(
633659
connectWebviewIds: connectWebviewIds,
634660
connectedAccountIds: connectedAccountIds,
635661
userIdentifierKey: userIdentifierKey,
662+
userIdentityId: userIdentityId,
636663
userIdentityIds: userIdentityIds
637664
)
638665
);

0 commit comments

Comments
 (0)