Skip to content

Commit b846afe

Browse files
feat(api): manual updates
1 parent a513e8b commit b846afe

3 files changed

Lines changed: 10 additions & 10 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 7
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase%2Fstagehand-6a22863a7da4fa45f904657a4cb8fc1a28e236925f03dc94fca25fd8271ca6db.yml
3-
openapi_spec_hash: d5c6108942ad79f39ea4ff1bee9b7996
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase%2Fstagehand-3607b588cab78536eb7de9f6acffe8ddda1d34aebe5910c2147421aa6c16bf22.yml
3+
openapi_spec_hash: fb507e8d38b4978a5717fbb144197868
44
config_hash: 2f1ec44e7e07906e07bdc6e075763da9

src/Stagehand.Tests/Models/Sessions/SessionExtractResponseTest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public void ExtractionValidation_Works()
1414
}
1515

1616
[Fact]
17-
public void JsonElementsValidation_Works()
17+
public void customValidation_Works()
1818
{
1919
SessionExtractResponse value = new(
2020
new Dictionary<string, JsonElement>()
@@ -36,7 +36,7 @@ public void ExtractionSerializationRoundtrip_Works()
3636
}
3737

3838
[Fact]
39-
public void JsonElementsSerializationRoundtrip_Works()
39+
public void customSerializationRoundtrip_Works()
4040
{
4141
SessionExtractResponse value = new(
4242
new Dictionary<string, JsonElement>()

src/Stagehand/Models/Sessions/SessionExtractResponse.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,14 +73,14 @@ public bool TryPickExtraction([NotNullWhen(true)] out Extraction? value)
7373
///
7474
/// <example>
7575
/// <code>
76-
/// if (instance.TryPickJsonElements(out var value)) {
76+
/// if (instance.TryPickCustom(out var value)) {
7777
/// // `value` is of type `IReadOnlyDictionary<string, JsonElement>`
7878
/// Console.WriteLine(value);
7979
/// }
8080
/// </code>
8181
/// </example>
8282
/// </summary>
83-
public bool TryPickJsonElements(
83+
public bool TryPickCustom(
8484
[NotNullWhen(true)] out IReadOnlyDictionary<string, JsonElement>? value
8585
)
8686
{
@@ -110,7 +110,7 @@ public bool TryPickJsonElements(
110110
/// </summary>
111111
public void Switch(
112112
System::Action<Extraction> extraction,
113-
System::Action<IReadOnlyDictionary<string, JsonElement>> jsonElements
113+
System::Action<IReadOnlyDictionary<string, JsonElement>> custom
114114
)
115115
{
116116
switch (this.Value)
@@ -119,7 +119,7 @@ public void Switch(
119119
extraction(value);
120120
break;
121121
case Dictionary<string, JsonElement> value:
122-
jsonElements(value);
122+
custom(value);
123123
break;
124124
default:
125125
throw new StagehandInvalidDataException(
@@ -151,13 +151,13 @@ public void Switch(
151151
/// </summary>
152152
public T Match<T>(
153153
System::Func<Extraction, T> extraction,
154-
System::Func<IReadOnlyDictionary<string, JsonElement>, T> jsonElements
154+
System::Func<IReadOnlyDictionary<string, JsonElement>, T> custom
155155
)
156156
{
157157
return this.Value switch
158158
{
159159
Extraction value => extraction(value),
160-
IReadOnlyDictionary<string, JsonElement> value => jsonElements(value),
160+
IReadOnlyDictionary<string, JsonElement> value => custom(value),
161161
_ => throw new StagehandInvalidDataException(
162162
"Data did not match any variant of SessionExtractResponse"
163163
),

0 commit comments

Comments
 (0)