Skip to content

Commit 67c8ac7

Browse files
Update Connect Swagger (#1669)
Co-authored-by: fundthmcalculus <[email protected]> Co-authored-by: mewmba <[email protected]>
1 parent 08131cd commit 67c8ac7

24 files changed

+341
-520
lines changed

connect/dart/README.md

+6-7
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,13 @@ import 'package:TrinsicConnect/api.dart';
4848
//defaultApiClient.getAuthentication<HttpBearerAuth>('Bearer').setAccessToken(yourTokenGeneratorFunction);
4949
5050
final api_instance = SessionApi();
51-
final trinsicAuthorization = trinsicAuthorization_example; // String | Bearer token. Can be left empty on anonymous endpoints
5251
final sessionId = sessionId_example; // String |
5352
5453
try {
55-
final result = api_instance.cancelSession(trinsicAuthorization, sessionId);
54+
final result = api_instance.cancelSessionAsync(sessionId);
5655
print(result);
5756
} catch (e) {
58-
print('Exception when calling SessionApi->cancelSession: $e\n');
57+
print('Exception when calling SessionApi->cancelSessionAsync: $e\n');
5958
}
6059
6160
```
@@ -66,10 +65,10 @@ All URIs are relative to *https://connect-api.trinsic.id*
6665

6766
Class | Method | HTTP request | Description
6867
------------ | ------------- | ------------- | -------------
69-
*SessionApi* | [**cancelSession**](doc//SessionApi.md#cancelsession) | **POST** /v1/sessions/cancel |
70-
*SessionApi* | [**createSession**](doc//SessionApi.md#createsession) | **POST** /v1/sessions |
71-
*SessionApi* | [**getSession**](doc//SessionApi.md#getsession) | **GET** /v1/sessions/get |
72-
*SessionApi* | [**listSessions**](doc//SessionApi.md#listsessions) | **POST** /v1/sessions/list |
68+
*SessionApi* | [**cancelSessionAsync**](doc//SessionApi.md#cancelsessionasync) | **POST** /v1/sessions/cancel |
69+
*SessionApi* | [**createSessionAsync**](doc//SessionApi.md#createsessionasync) | **POST** /v1/sessions/create |
70+
*SessionApi* | [**getSessionAsync**](doc//SessionApi.md#getsessionasync) | **GET** /v1/sessions/get |
71+
*SessionApi* | [**listSessionsAsync**](doc//SessionApi.md#listsessionsasync) | **POST** /v1/sessions/list |
7372

7473

7574
## Documentation For Models

connect/dart/doc/ListSessionsResponseV1.md

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ import 'package:TrinsicConnect/api.dart';
88
## Properties
99
Name | Type | Description | Notes
1010
------------ | ------------- | ------------- | -------------
11+
**total** | **int** | | [optional]
12+
**more** | **bool** | | [optional]
1113
**sessions** | [**List<Session>**](Session.md) | | [optional] [default to const []]
1214

1315
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

connect/dart/doc/SessionApi.md

+20-28
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ All URIs are relative to *https://connect-api.trinsic.id*
99

1010
Method | HTTP request | Description
1111
------------- | ------------- | -------------
12-
[**cancelSession**](SessionApi.md#cancelsession) | **POST** /v1/sessions/cancel |
13-
[**createSession**](SessionApi.md#createsession) | **POST** /v1/sessions |
14-
[**getSession**](SessionApi.md#getsession) | **GET** /v1/sessions/get |
15-
[**listSessions**](SessionApi.md#listsessions) | **POST** /v1/sessions/list |
12+
[**cancelSessionAsync**](SessionApi.md#cancelsessionasync) | **POST** /v1/sessions/cancel |
13+
[**createSessionAsync**](SessionApi.md#createsessionasync) | **POST** /v1/sessions/create |
14+
[**getSessionAsync**](SessionApi.md#getsessionasync) | **GET** /v1/sessions/get |
15+
[**listSessionsAsync**](SessionApi.md#listsessionsasync) | **POST** /v1/sessions/list |
1616

1717

18-
# **cancelSession**
19-
> CancelSessionResponse cancelSession(trinsicAuthorization, sessionId)
18+
# **cancelSessionAsync**
19+
> CancelSessionResponse cancelSessionAsync(sessionId)
2020
2121

2222

@@ -31,22 +31,20 @@ import 'package:TrinsicConnect/api.dart';
3131
//defaultApiClient.getAuthentication<HttpBearerAuth>('Bearer').setAccessToken(yourTokenGeneratorFunction);
3232
3333
final api_instance = SessionApi();
34-
final trinsicAuthorization = trinsicAuthorization_example; // String | Bearer token. Can be left empty on anonymous endpoints
3534
final sessionId = sessionId_example; // String |
3635
3736
try {
38-
final result = api_instance.cancelSession(trinsicAuthorization, sessionId);
37+
final result = api_instance.cancelSessionAsync(sessionId);
3938
print(result);
4039
} catch (e) {
41-
print('Exception when calling SessionApi->cancelSession: $e\n');
40+
print('Exception when calling SessionApi->cancelSessionAsync: $e\n');
4241
}
4342
```
4443

4544
### Parameters
4645

4746
Name | Type | Description | Notes
4847
------------- | ------------- | ------------- | -------------
49-
**trinsicAuthorization** | **String**| Bearer token. Can be left empty on anonymous endpoints | [default to 'Bearer ']
5048
**sessionId** | **String**| | [optional]
5149

5250
### Return type
@@ -64,8 +62,8 @@ Name | Type | Description | Notes
6462

6563
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
6664

67-
# **createSession**
68-
> CreateSessionResponse createSession(trinsicAuthorization, createSessionRequest)
65+
# **createSessionAsync**
66+
> CreateSessionResponse createSessionAsync(createSessionRequest)
6967
7068

7169

@@ -80,22 +78,20 @@ import 'package:TrinsicConnect/api.dart';
8078
//defaultApiClient.getAuthentication<HttpBearerAuth>('Bearer').setAccessToken(yourTokenGeneratorFunction);
8179
8280
final api_instance = SessionApi();
83-
final trinsicAuthorization = trinsicAuthorization_example; // String | Bearer token. Can be left empty on anonymous endpoints
8481
final createSessionRequest = CreateSessionRequest(); // CreateSessionRequest |
8582
8683
try {
87-
final result = api_instance.createSession(trinsicAuthorization, createSessionRequest);
84+
final result = api_instance.createSessionAsync(createSessionRequest);
8885
print(result);
8986
} catch (e) {
90-
print('Exception when calling SessionApi->createSession: $e\n');
87+
print('Exception when calling SessionApi->createSessionAsync: $e\n');
9188
}
9289
```
9390

9491
### Parameters
9592

9693
Name | Type | Description | Notes
9794
------------- | ------------- | ------------- | -------------
98-
**trinsicAuthorization** | **String**| Bearer token. Can be left empty on anonymous endpoints | [default to 'Bearer ']
9995
**createSessionRequest** | [**CreateSessionRequest**](CreateSessionRequest.md)| | [optional]
10096

10197
### Return type
@@ -113,8 +109,8 @@ Name | Type | Description | Notes
113109

114110
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
115111

116-
# **getSession**
117-
> GetSessionResponseV1 getSession(trinsicAuthorization, sessionId)
112+
# **getSessionAsync**
113+
> GetSessionResponseV1 getSessionAsync(sessionId)
118114
119115

120116

@@ -129,22 +125,20 @@ import 'package:TrinsicConnect/api.dart';
129125
//defaultApiClient.getAuthentication<HttpBearerAuth>('Bearer').setAccessToken(yourTokenGeneratorFunction);
130126
131127
final api_instance = SessionApi();
132-
final trinsicAuthorization = trinsicAuthorization_example; // String | Bearer token. Can be left empty on anonymous endpoints
133128
final sessionId = sessionId_example; // String |
134129
135130
try {
136-
final result = api_instance.getSession(trinsicAuthorization, sessionId);
131+
final result = api_instance.getSessionAsync(sessionId);
137132
print(result);
138133
} catch (e) {
139-
print('Exception when calling SessionApi->getSession: $e\n');
134+
print('Exception when calling SessionApi->getSessionAsync: $e\n');
140135
}
141136
```
142137

143138
### Parameters
144139

145140
Name | Type | Description | Notes
146141
------------- | ------------- | ------------- | -------------
147-
**trinsicAuthorization** | **String**| Bearer token. Can be left empty on anonymous endpoints | [default to 'Bearer ']
148142
**sessionId** | **String**| | [optional]
149143

150144
### Return type
@@ -162,8 +156,8 @@ Name | Type | Description | Notes
162156

163157
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
164158

165-
# **listSessions**
166-
> ListSessionsResponseV1 listSessions(trinsicAuthorization, listSessionsRequest)
159+
# **listSessionsAsync**
160+
> ListSessionsResponseV1 listSessionsAsync(listSessionsRequest)
167161
168162

169163

@@ -178,22 +172,20 @@ import 'package:TrinsicConnect/api.dart';
178172
//defaultApiClient.getAuthentication<HttpBearerAuth>('Bearer').setAccessToken(yourTokenGeneratorFunction);
179173
180174
final api_instance = SessionApi();
181-
final trinsicAuthorization = trinsicAuthorization_example; // String | Bearer token. Can be left empty on anonymous endpoints
182175
final listSessionsRequest = ListSessionsRequest(); // ListSessionsRequest |
183176
184177
try {
185-
final result = api_instance.listSessions(trinsicAuthorization, listSessionsRequest);
178+
final result = api_instance.listSessionsAsync(listSessionsRequest);
186179
print(result);
187180
} catch (e) {
188-
print('Exception when calling SessionApi->listSessions: $e\n');
181+
print('Exception when calling SessionApi->listSessionsAsync: $e\n');
189182
}
190183
```
191184

192185
### Parameters
193186

194187
Name | Type | Description | Notes
195188
------------- | ------------- | ------------- | -------------
196-
**trinsicAuthorization** | **String**| Bearer token. Can be left empty on anonymous endpoints | [default to 'Bearer ']
197189
**listSessionsRequest** | [**ListSessionsRequest**](ListSessionsRequest.md)| | [optional]
198190

199191
### Return type

connect/dart/lib/api/session_api.dart

+14-62
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,8 @@ class SessionApi {
1919
/// Performs an HTTP 'POST /v1/sessions/cancel' operation and returns the [Response].
2020
/// Parameters:
2121
///
22-
/// * [String] trinsicAuthorization (required):
23-
/// Bearer token. Can be left empty on anonymous endpoints
24-
///
2522
/// * [String] sessionId:
26-
Future<Response> cancelSessionWithHttpInfo(
27-
String trinsicAuthorization, {
23+
Future<Response> cancelSessionAsyncWithHttpInfo({
2824
String? sessionId,
2925
}) async {
3026
// ignore: prefer_const_declarations
@@ -41,9 +37,6 @@ class SessionApi {
4137
queryParams.addAll(_queryParams('', 'sessionId', sessionId));
4238
}
4339

44-
headerParams[r'TrinsicAuthorization'] =
45-
parameterToString(trinsicAuthorization);
46-
4740
const contentTypes = <String>[];
4841

4942
return apiClient.invokeAPI(
@@ -59,16 +52,11 @@ class SessionApi {
5952

6053
/// Parameters:
6154
///
62-
/// * [String] trinsicAuthorization (required):
63-
/// Bearer token. Can be left empty on anonymous endpoints
64-
///
6555
/// * [String] sessionId:
66-
Future<CancelSessionResponse?> cancelSession(
67-
String trinsicAuthorization, {
56+
Future<CancelSessionResponse?> cancelSessionAsync({
6857
String? sessionId,
6958
}) async {
70-
final response = await cancelSessionWithHttpInfo(
71-
trinsicAuthorization,
59+
final response = await cancelSessionAsyncWithHttpInfo(
7260
sessionId: sessionId,
7361
);
7462
if (response.statusCode >= HttpStatus.badRequest) {
@@ -87,19 +75,15 @@ class SessionApi {
8775
return null;
8876
}
8977

90-
/// Performs an HTTP 'POST /v1/sessions' operation and returns the [Response].
78+
/// Performs an HTTP 'POST /v1/sessions/create' operation and returns the [Response].
9179
/// Parameters:
9280
///
93-
/// * [String] trinsicAuthorization (required):
94-
/// Bearer token. Can be left empty on anonymous endpoints
95-
///
9681
/// * [CreateSessionRequest] createSessionRequest:
97-
Future<Response> createSessionWithHttpInfo(
98-
String trinsicAuthorization, {
82+
Future<Response> createSessionAsyncWithHttpInfo({
9983
CreateSessionRequest? createSessionRequest,
10084
}) async {
10185
// ignore: prefer_const_declarations
102-
final path = r'/v1/sessions';
86+
final path = r'/v1/sessions/create';
10387

10488
// ignore: prefer_final_locals
10589
Object? postBody = createSessionRequest;
@@ -108,9 +92,6 @@ class SessionApi {
10892
final headerParams = <String, String>{};
10993
final formParams = <String, String>{};
11094

111-
headerParams[r'TrinsicAuthorization'] =
112-
parameterToString(trinsicAuthorization);
113-
11495
const contentTypes = <String>[
11596
'application/json',
11697
'text/json',
@@ -130,16 +111,11 @@ class SessionApi {
130111

131112
/// Parameters:
132113
///
133-
/// * [String] trinsicAuthorization (required):
134-
/// Bearer token. Can be left empty on anonymous endpoints
135-
///
136114
/// * [CreateSessionRequest] createSessionRequest:
137-
Future<CreateSessionResponse?> createSession(
138-
String trinsicAuthorization, {
115+
Future<CreateSessionResponse?> createSessionAsync({
139116
CreateSessionRequest? createSessionRequest,
140117
}) async {
141-
final response = await createSessionWithHttpInfo(
142-
trinsicAuthorization,
118+
final response = await createSessionAsyncWithHttpInfo(
143119
createSessionRequest: createSessionRequest,
144120
);
145121
if (response.statusCode >= HttpStatus.badRequest) {
@@ -161,12 +137,8 @@ class SessionApi {
161137
/// Performs an HTTP 'GET /v1/sessions/get' operation and returns the [Response].
162138
/// Parameters:
163139
///
164-
/// * [String] trinsicAuthorization (required):
165-
/// Bearer token. Can be left empty on anonymous endpoints
166-
///
167140
/// * [String] sessionId:
168-
Future<Response> getSessionWithHttpInfo(
169-
String trinsicAuthorization, {
141+
Future<Response> getSessionAsyncWithHttpInfo({
170142
String? sessionId,
171143
}) async {
172144
// ignore: prefer_const_declarations
@@ -183,9 +155,6 @@ class SessionApi {
183155
queryParams.addAll(_queryParams('', 'sessionId', sessionId));
184156
}
185157

186-
headerParams[r'TrinsicAuthorization'] =
187-
parameterToString(trinsicAuthorization);
188-
189158
const contentTypes = <String>[];
190159

191160
return apiClient.invokeAPI(
@@ -201,16 +170,11 @@ class SessionApi {
201170

202171
/// Parameters:
203172
///
204-
/// * [String] trinsicAuthorization (required):
205-
/// Bearer token. Can be left empty on anonymous endpoints
206-
///
207173
/// * [String] sessionId:
208-
Future<GetSessionResponseV1?> getSession(
209-
String trinsicAuthorization, {
174+
Future<GetSessionResponseV1?> getSessionAsync({
210175
String? sessionId,
211176
}) async {
212-
final response = await getSessionWithHttpInfo(
213-
trinsicAuthorization,
177+
final response = await getSessionAsyncWithHttpInfo(
214178
sessionId: sessionId,
215179
);
216180
if (response.statusCode >= HttpStatus.badRequest) {
@@ -232,12 +196,8 @@ class SessionApi {
232196
/// Performs an HTTP 'POST /v1/sessions/list' operation and returns the [Response].
233197
/// Parameters:
234198
///
235-
/// * [String] trinsicAuthorization (required):
236-
/// Bearer token. Can be left empty on anonymous endpoints
237-
///
238199
/// * [ListSessionsRequest] listSessionsRequest:
239-
Future<Response> listSessionsWithHttpInfo(
240-
String trinsicAuthorization, {
200+
Future<Response> listSessionsAsyncWithHttpInfo({
241201
ListSessionsRequest? listSessionsRequest,
242202
}) async {
243203
// ignore: prefer_const_declarations
@@ -250,9 +210,6 @@ class SessionApi {
250210
final headerParams = <String, String>{};
251211
final formParams = <String, String>{};
252212

253-
headerParams[r'TrinsicAuthorization'] =
254-
parameterToString(trinsicAuthorization);
255-
256213
const contentTypes = <String>[
257214
'application/json',
258215
'text/json',
@@ -272,16 +229,11 @@ class SessionApi {
272229

273230
/// Parameters:
274231
///
275-
/// * [String] trinsicAuthorization (required):
276-
/// Bearer token. Can be left empty on anonymous endpoints
277-
///
278232
/// * [ListSessionsRequest] listSessionsRequest:
279-
Future<ListSessionsResponseV1?> listSessions(
280-
String trinsicAuthorization, {
233+
Future<ListSessionsResponseV1?> listSessionsAsync({
281234
ListSessionsRequest? listSessionsRequest,
282235
}) async {
283-
final response = await listSessionsWithHttpInfo(
284-
trinsicAuthorization,
236+
final response = await listSessionsAsyncWithHttpInfo(
285237
listSessionsRequest: listSessionsRequest,
286238
);
287239
if (response.statusCode >= HttpStatus.badRequest) {

0 commit comments

Comments
 (0)