Skip to content

Commit 3b5bbf9

Browse files
author
github-actions[bot]
committed
feat: Updated OpenAPI spec
1 parent 2525ab8 commit 3b5bbf9

10 files changed

Lines changed: 338 additions & 17 deletions
Lines changed: 150 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,150 @@
1+
2+
#nullable enable
3+
4+
namespace AI21
5+
{
6+
public partial class Ai21Api
7+
{
8+
partial void PrepareForwardParagonWebhookStudioV1ConnectorsParagonWebhookPostArguments(
9+
global::System.Net.Http.HttpClient httpClient);
10+
partial void PrepareForwardParagonWebhookStudioV1ConnectorsParagonWebhookPostRequest(
11+
global::System.Net.Http.HttpClient httpClient,
12+
global::System.Net.Http.HttpRequestMessage httpRequestMessage);
13+
partial void ProcessForwardParagonWebhookStudioV1ConnectorsParagonWebhookPostResponse(
14+
global::System.Net.Http.HttpClient httpClient,
15+
global::System.Net.Http.HttpResponseMessage httpResponseMessage);
16+
17+
partial void ProcessForwardParagonWebhookStudioV1ConnectorsParagonWebhookPostResponseContent(
18+
global::System.Net.Http.HttpClient httpClient,
19+
global::System.Net.Http.HttpResponseMessage httpResponseMessage,
20+
ref string content);
21+
22+
/// <summary>
23+
/// Forward Paragon Webhook
24+
/// </summary>
25+
/// <param name="cancellationToken">The token to cancel the operation with</param>
26+
/// <exception cref="global::AI21.ApiException"></exception>
27+
public async global::System.Threading.Tasks.Task<string> ForwardParagonWebhookStudioV1ConnectorsParagonWebhookPostAsync(
28+
global::System.Threading.CancellationToken cancellationToken = default)
29+
{
30+
PrepareArguments(
31+
client: HttpClient);
32+
PrepareForwardParagonWebhookStudioV1ConnectorsParagonWebhookPostArguments(
33+
httpClient: HttpClient);
34+
35+
var __pathBuilder = new global::AI21.PathBuilder(
36+
path: "/studio/v1/connectors/paragon/webhook",
37+
baseUri: HttpClient.BaseAddress);
38+
var __path = __pathBuilder.ToString();
39+
using var __httpRequest = new global::System.Net.Http.HttpRequestMessage(
40+
method: global::System.Net.Http.HttpMethod.Post,
41+
requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute));
42+
#if NET6_0_OR_GREATER
43+
__httpRequest.Version = global::System.Net.HttpVersion.Version11;
44+
__httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher;
45+
#endif
46+
47+
foreach (var __authorization in Authorizations)
48+
{
49+
if (__authorization.Type == "Http" ||
50+
__authorization.Type == "OAuth2")
51+
{
52+
__httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue(
53+
scheme: __authorization.Name,
54+
parameter: __authorization.Value);
55+
}
56+
else if (__authorization.Type == "ApiKey" &&
57+
__authorization.Location == "Header")
58+
{
59+
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
60+
}
61+
}
62+
63+
PrepareRequest(
64+
client: HttpClient,
65+
request: __httpRequest);
66+
PrepareForwardParagonWebhookStudioV1ConnectorsParagonWebhookPostRequest(
67+
httpClient: HttpClient,
68+
httpRequestMessage: __httpRequest);
69+
70+
using var __response = await HttpClient.SendAsync(
71+
request: __httpRequest,
72+
completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead,
73+
cancellationToken: cancellationToken).ConfigureAwait(false);
74+
75+
ProcessResponse(
76+
client: HttpClient,
77+
response: __response);
78+
ProcessForwardParagonWebhookStudioV1ConnectorsParagonWebhookPostResponse(
79+
httpClient: HttpClient,
80+
httpResponseMessage: __response);
81+
82+
if (ReadResponseAsString)
83+
{
84+
var __content = await __response.Content.ReadAsStringAsync(
85+
#if NET5_0_OR_GREATER
86+
cancellationToken
87+
#endif
88+
).ConfigureAwait(false);
89+
90+
ProcessResponseContent(
91+
client: HttpClient,
92+
response: __response,
93+
content: ref __content);
94+
ProcessForwardParagonWebhookStudioV1ConnectorsParagonWebhookPostResponseContent(
95+
httpClient: HttpClient,
96+
httpResponseMessage: __response,
97+
content: ref __content);
98+
99+
try
100+
{
101+
__response.EnsureSuccessStatusCode();
102+
103+
return __content;
104+
}
105+
catch (global::System.Exception __ex)
106+
{
107+
throw new global::AI21.ApiException(
108+
message: __content ?? __response.ReasonPhrase ?? string.Empty,
109+
innerException: __ex,
110+
statusCode: __response.StatusCode)
111+
{
112+
ResponseBody = __content,
113+
ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
114+
__response.Headers,
115+
h => h.Key,
116+
h => h.Value),
117+
};
118+
}
119+
}
120+
else
121+
{
122+
try
123+
{
124+
__response.EnsureSuccessStatusCode();
125+
126+
var __content = await __response.Content.ReadAsStringAsync(
127+
#if NET5_0_OR_GREATER
128+
cancellationToken
129+
#endif
130+
).ConfigureAwait(false);
131+
132+
return __content;
133+
}
134+
catch (global::System.Exception __ex)
135+
{
136+
throw new global::AI21.ApiException(
137+
message: __response.ReasonPhrase ?? string.Empty,
138+
innerException: __ex,
139+
statusCode: __response.StatusCode)
140+
{
141+
ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
142+
__response.Headers,
143+
h => h.Key,
144+
h => h.Value),
145+
};
146+
}
147+
}
148+
}
149+
}
150+
}

src/libs/AI21/Generated/AI21.Ai21Api.GetDataSourceStatusStudioV1ConnectorsConnectedUsersEntityIdDataSourcesDataSourceStatusGet.g.cs

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,14 @@ public partial class Ai21Api
88
partial void PrepareGetDataSourceStatusStudioV1ConnectorsConnectedUsersEntityIdDataSourcesDataSourceStatusGetArguments(
99
global::System.Net.Http.HttpClient httpClient,
1010
ref string entityId,
11-
ref string dataSource);
11+
ref string dataSource,
12+
ref string paragonToken);
1213
partial void PrepareGetDataSourceStatusStudioV1ConnectorsConnectedUsersEntityIdDataSourcesDataSourceStatusGetRequest(
1314
global::System.Net.Http.HttpClient httpClient,
1415
global::System.Net.Http.HttpRequestMessage httpRequestMessage,
1516
string entityId,
16-
string dataSource);
17+
string dataSource,
18+
string paragonToken);
1719
partial void ProcessGetDataSourceStatusStudioV1ConnectorsConnectedUsersEntityIdDataSourcesDataSourceStatusGetResponse(
1820
global::System.Net.Http.HttpClient httpClient,
1921
global::System.Net.Http.HttpResponseMessage httpResponseMessage);
@@ -28,23 +30,29 @@ partial void ProcessGetDataSourceStatusStudioV1ConnectorsConnectedUsersEntityIdD
2830
/// </summary>
2931
/// <param name="entityId"></param>
3032
/// <param name="dataSource"></param>
33+
/// <param name="paragonToken"></param>
3134
/// <param name="cancellationToken">The token to cancel the operation with</param>
3235
/// <exception cref="global::AI21.ApiException"></exception>
3336
public async global::System.Threading.Tasks.Task<global::AI21.ConnectorsStatus> GetDataSourceStatusStudioV1ConnectorsConnectedUsersEntityIdDataSourcesDataSourceStatusGetAsync(
3437
string entityId,
3538
string dataSource,
39+
string paragonToken,
3640
global::System.Threading.CancellationToken cancellationToken = default)
3741
{
3842
PrepareArguments(
3943
client: HttpClient);
4044
PrepareGetDataSourceStatusStudioV1ConnectorsConnectedUsersEntityIdDataSourcesDataSourceStatusGetArguments(
4145
httpClient: HttpClient,
4246
entityId: ref entityId,
43-
dataSource: ref dataSource);
47+
dataSource: ref dataSource,
48+
paragonToken: ref paragonToken);
4449

4550
var __pathBuilder = new global::AI21.PathBuilder(
4651
path: $"/studio/v1/connectors/connected-users/{entityId}/data-sources/{dataSource}/status",
4752
baseUri: HttpClient.BaseAddress);
53+
__pathBuilder
54+
.AddRequiredParameter("paragon_token", paragonToken)
55+
;
4856
var __path = __pathBuilder.ToString();
4957
using var __httpRequest = new global::System.Net.Http.HttpRequestMessage(
5058
method: global::System.Net.Http.HttpMethod.Get,
@@ -77,7 +85,8 @@ partial void ProcessGetDataSourceStatusStudioV1ConnectorsConnectedUsersEntityIdD
7785
httpClient: HttpClient,
7886
httpRequestMessage: __httpRequest,
7987
entityId: entityId,
80-
dataSource: dataSource);
88+
dataSource: dataSource,
89+
paragonToken: paragonToken);
8190

8291
using var __response = await HttpClient.SendAsync(
8392
request: __httpRequest,

src/libs/AI21/Generated/AI21.Ai21Api.RunSyncStudioV1ConnectorsConnectedUsersDataSourcesSyncsPost.g.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,7 @@ partial void ProcessRunSyncStudioV1ConnectorsConnectedUsersDataSourcesSyncsPostR
203203
/// </summary>
204204
/// <param name="token"></param>
205205
/// <param name="dataSource"></param>
206+
/// <param name="organizationId"></param>
206207
/// <param name="pipeline"></param>
207208
/// <param name="configuration"></param>
208209
/// <param name="configurationName"></param>
@@ -211,15 +212,17 @@ partial void ProcessRunSyncStudioV1ConnectorsConnectedUsersDataSourcesSyncsPostR
211212
public async global::System.Threading.Tasks.Task<string> RunSyncStudioV1ConnectorsConnectedUsersDataSourcesSyncsPostAsync(
212213
string token,
213214
string dataSource,
214-
string configurationName,
215-
string? pipeline = default,
215+
string organizationId,
216+
string pipeline,
216217
object? configuration = default,
218+
string? configurationName = default,
217219
global::System.Threading.CancellationToken cancellationToken = default)
218220
{
219221
var __request = new global::AI21.ConnectorsSyncParams
220222
{
221223
Token = token,
222224
DataSource = dataSource,
225+
OrganizationId = organizationId,
223226
Pipeline = pipeline,
224227
Configuration = configuration,
225228
ConfigurationName = configurationName,
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#nullable enable
2+
3+
namespace AI21
4+
{
5+
public partial interface IAi21Api
6+
{
7+
/// <summary>
8+
/// Forward Paragon Webhook
9+
/// </summary>
10+
/// <param name="cancellationToken">The token to cancel the operation with</param>
11+
/// <exception cref="global::AI21.ApiException"></exception>
12+
global::System.Threading.Tasks.Task<string> ForwardParagonWebhookStudioV1ConnectorsParagonWebhookPostAsync(
13+
global::System.Threading.CancellationToken cancellationToken = default);
14+
}
15+
}

src/libs/AI21/Generated/AI21.IAi21Api.GetDataSourceStatusStudioV1ConnectorsConnectedUsersEntityIdDataSourcesDataSourceStatusGet.g.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,13 @@ public partial interface IAi21Api
99
/// </summary>
1010
/// <param name="entityId"></param>
1111
/// <param name="dataSource"></param>
12+
/// <param name="paragonToken"></param>
1213
/// <param name="cancellationToken">The token to cancel the operation with</param>
1314
/// <exception cref="global::AI21.ApiException"></exception>
1415
global::System.Threading.Tasks.Task<global::AI21.ConnectorsStatus> GetDataSourceStatusStudioV1ConnectorsConnectedUsersEntityIdDataSourcesDataSourceStatusGetAsync(
1516
string entityId,
1617
string dataSource,
18+
string paragonToken,
1719
global::System.Threading.CancellationToken cancellationToken = default);
1820
}
1921
}

src/libs/AI21/Generated/AI21.IAi21Api.RunSyncStudioV1ConnectorsConnectedUsersDataSourcesSyncsPost.g.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ public partial interface IAi21Api
1919
/// </summary>
2020
/// <param name="token"></param>
2121
/// <param name="dataSource"></param>
22+
/// <param name="organizationId"></param>
2223
/// <param name="pipeline"></param>
2324
/// <param name="configuration"></param>
2425
/// <param name="configurationName"></param>
@@ -27,9 +28,10 @@ public partial interface IAi21Api
2728
global::System.Threading.Tasks.Task<string> RunSyncStudioV1ConnectorsConnectedUsersDataSourcesSyncsPostAsync(
2829
string token,
2930
string dataSource,
30-
string configurationName,
31-
string? pipeline = default,
31+
string organizationId,
32+
string pipeline,
3233
object? configuration = default,
34+
string? configurationName = default,
3335
global::System.Threading.CancellationToken cancellationToken = default);
3436
}
3537
}

src/libs/AI21/Generated/AI21.Models.ConnectorsSyncParams.g.cs

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,19 @@ public sealed partial class ConnectorsSyncParams
2222
[global::System.Text.Json.Serialization.JsonRequired]
2323
public required string DataSource { get; set; }
2424

25+
/// <summary>
26+
///
27+
/// </summary>
28+
[global::System.Text.Json.Serialization.JsonPropertyName("organization_id")]
29+
[global::System.Text.Json.Serialization.JsonRequired]
30+
public required string OrganizationId { get; set; }
31+
2532
/// <summary>
2633
///
2734
/// </summary>
2835
[global::System.Text.Json.Serialization.JsonPropertyName("pipeline")]
29-
public string? Pipeline { get; set; }
36+
[global::System.Text.Json.Serialization.JsonRequired]
37+
public required string Pipeline { get; set; }
3038

3139
/// <summary>
3240
///
@@ -38,8 +46,7 @@ public sealed partial class ConnectorsSyncParams
3846
///
3947
/// </summary>
4048
[global::System.Text.Json.Serialization.JsonPropertyName("configuration_name")]
41-
[global::System.Text.Json.Serialization.JsonRequired]
42-
public required string ConfigurationName { get; set; }
49+
public string? ConfigurationName { get; set; }
4350

4451
/// <summary>
4552
/// Additional properties that are not explicitly defined in the schema
@@ -52,6 +59,7 @@ public sealed partial class ConnectorsSyncParams
5259
/// </summary>
5360
/// <param name="token"></param>
5461
/// <param name="dataSource"></param>
62+
/// <param name="organizationId"></param>
5563
/// <param name="pipeline"></param>
5664
/// <param name="configuration"></param>
5765
/// <param name="configurationName"></param>
@@ -61,15 +69,17 @@ public sealed partial class ConnectorsSyncParams
6169
public ConnectorsSyncParams(
6270
string token,
6371
string dataSource,
64-
string configurationName,
65-
string? pipeline,
66-
object? configuration)
72+
string organizationId,
73+
string pipeline,
74+
object? configuration,
75+
string? configurationName)
6776
{
6877
this.Token = token ?? throw new global::System.ArgumentNullException(nameof(token));
6978
this.DataSource = dataSource ?? throw new global::System.ArgumentNullException(nameof(dataSource));
70-
this.ConfigurationName = configurationName ?? throw new global::System.ArgumentNullException(nameof(configurationName));
71-
this.Pipeline = pipeline;
79+
this.OrganizationId = organizationId ?? throw new global::System.ArgumentNullException(nameof(organizationId));
80+
this.Pipeline = pipeline ?? throw new global::System.ArgumentNullException(nameof(pipeline));
7281
this.Configuration = configuration;
82+
this.ConfigurationName = configurationName;
7383
}
7484

7585
/// <summary>

0 commit comments

Comments
 (0)