Well, generator made some bad decissions

This commit is contained in:
Andrew 2023-04-24 19:02:04 +07:00
parent f076ae3790
commit 68cdcf45e7

View file

@ -25,7 +25,6 @@ import 'package:tuuli_api/src/model/table_items_response.dart';
import 'package:tuuli_api/src/model/user_update_definition.dart'; import 'package:tuuli_api/src/model/user_update_definition.dart';
class DefaultApi { class DefaultApi {
final Dio _dio; final Dio _dio;
final Serializers _serializers; final Serializers _serializers;
@ -33,12 +32,12 @@ class DefaultApi {
const DefaultApi(this._dio, this._serializers); const DefaultApi(this._dio, this._serializers);
/// Create Item /// Create Item
/// ///
/// ///
/// Parameters: /// Parameters:
/// * [tableName] /// * [tableName]
/// * [body] /// * [body]
/// * [accessToken] /// * [accessToken]
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
/// * [headers] - Can be used to add additional headers to the request /// * [headers] - Can be used to add additional headers to the request
/// * [extras] - Can be used to add flags to the request /// * [extras] - Can be used to add flags to the request
@ -48,9 +47,9 @@ class DefaultApi {
/// ///
/// Returns a [Future] containing a [Response] with a [OkResponse] as data /// Returns a [Future] containing a [Response] with a [OkResponse] as data
/// Throws [DioError] if API call or serialization fails /// Throws [DioError] if API call or serialization fails
Future<Response<OkResponse>> createItemItemsTableNamePost({ Future<Response<OkResponse>> createItemItemsTableNamePost({
required String tableName, required String tableName,
required JsonObject body, required Map<String, dynamic> body,
String? accessToken, String? accessToken,
CancelToken? cancelToken, CancelToken? cancelToken,
Map<String, dynamic>? headers, Map<String, dynamic>? headers,
@ -59,7 +58,8 @@ class DefaultApi {
ProgressCallback? onSendProgress, ProgressCallback? onSendProgress,
ProgressCallback? onReceiveProgress, ProgressCallback? onReceiveProgress,
}) async { }) async {
final _path = r'/items/{tableName}/+'.replaceAll('{' r'tableName' '}', tableName.toString()); final _path = r'/items/{tableName}/+'
.replaceAll('{' r'tableName' '}', tableName.toString());
final _options = Options( final _options = Options(
method: r'POST', method: r'POST',
headers: <String, dynamic>{ headers: <String, dynamic>{
@ -78,10 +78,9 @@ class DefaultApi {
try { try {
_bodyData = body; _bodyData = body;
} catch (error, stackTrace) {
} catch(error, stackTrace) {
throw DioError( throw DioError(
requestOptions: _options.compose( requestOptions: _options.compose(
_dio.options, _dio.options,
_path, _path,
), ),
@ -108,7 +107,6 @@ class DefaultApi {
_response.data!, _response.data!,
specifiedType: _responseType, specifiedType: _responseType,
) as OkResponse; ) as OkResponse;
} catch (error, stackTrace) { } catch (error, stackTrace) {
throw DioError( throw DioError(
requestOptions: _response.requestOptions, requestOptions: _response.requestOptions,
@ -135,9 +133,9 @@ class DefaultApi {
/// Parameter &#x60;columns&#x60; should be a list of strings Each string should be in a following format: &#x60;column_name:column_type[:column_options]&#x60; Where *column_type* should be one of the following: - serial - str - bool - datetime - float - int - int:asset - int:user Also *column_options* can be one of the following: - unique - default Example: &#x60;&#x60;&#x60;json [ \&quot;id:serial:primary\&quot;, \&quot;name:str:unique\&quot;, \&quot;description:str\&quot;, \&quot;is_active:bool\&quot;, \&quot;price:float\&quot;, \&quot;quantity:int\&quot;, \&quot;creator_id:int:user\&quot;, \&quot;asset_id:int:asset\&quot; ] &#x60;&#x60;&#x60; Notes: 1. you cannot use *unique* and *default* at the same time 2. in current implementation you cannot use *default*, because there is no way to specify default value /// Parameter &#x60;columns&#x60; should be a list of strings Each string should be in a following format: &#x60;column_name:column_type[:column_options]&#x60; Where *column_type* should be one of the following: - serial - str - bool - datetime - float - int - int:asset - int:user Also *column_options* can be one of the following: - unique - default Example: &#x60;&#x60;&#x60;json [ \&quot;id:serial:primary\&quot;, \&quot;name:str:unique\&quot;, \&quot;description:str\&quot;, \&quot;is_active:bool\&quot;, \&quot;price:float\&quot;, \&quot;quantity:int\&quot;, \&quot;creator_id:int:user\&quot;, \&quot;asset_id:int:asset\&quot; ] &#x60;&#x60;&#x60; Notes: 1. you cannot use *unique* and *default* at the same time 2. in current implementation you cannot use *default*, because there is no way to specify default value
/// ///
/// Parameters: /// Parameters:
/// * [tableName] /// * [tableName]
/// * [requestBody] /// * [requestBody]
/// * [accessToken] /// * [accessToken]
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
/// * [headers] - Can be used to add additional headers to the request /// * [headers] - Can be used to add additional headers to the request
/// * [extras] - Can be used to add flags to the request /// * [extras] - Can be used to add flags to the request
@ -147,7 +145,7 @@ class DefaultApi {
/// ///
/// Returns a [Future] containing a [Response] with a [OkResponse] as data /// Returns a [Future] containing a [Response] with a [OkResponse] as data
/// Throws [DioError] if API call or serialization fails /// Throws [DioError] if API call or serialization fails
Future<Response<OkResponse>> createTableApiCreateTableTableNamePost({ Future<Response<OkResponse>> createTableApiCreateTableTableNamePost({
required String tableName, required String tableName,
required BuiltList<String> requestBody, required BuiltList<String> requestBody,
String? accessToken, String? accessToken,
@ -158,7 +156,8 @@ class DefaultApi {
ProgressCallback? onSendProgress, ProgressCallback? onSendProgress,
ProgressCallback? onReceiveProgress, ProgressCallback? onReceiveProgress,
}) async { }) async {
final _path = r'/api/createTable/{tableName}'.replaceAll('{' r'tableName' '}', tableName.toString()); final _path = r'/api/createTable/{tableName}'
.replaceAll('{' r'tableName' '}', tableName.toString());
final _options = Options( final _options = Options(
method: r'POST', method: r'POST',
headers: <String, dynamic>{ headers: <String, dynamic>{
@ -178,10 +177,9 @@ class DefaultApi {
try { try {
const _type = FullType(BuiltList, [FullType(String)]); const _type = FullType(BuiltList, [FullType(String)]);
_bodyData = _serializers.serialize(requestBody, specifiedType: _type); _bodyData = _serializers.serialize(requestBody, specifiedType: _type);
} catch (error, stackTrace) {
} catch(error, stackTrace) {
throw DioError( throw DioError(
requestOptions: _options.compose( requestOptions: _options.compose(
_dio.options, _dio.options,
_path, _path,
), ),
@ -208,7 +206,6 @@ class DefaultApi {
_response.data!, _response.data!,
specifiedType: _responseType, specifiedType: _responseType,
) as OkResponse; ) as OkResponse;
} catch (error, stackTrace) { } catch (error, stackTrace) {
throw DioError( throw DioError(
requestOptions: _response.requestOptions, requestOptions: _response.requestOptions,
@ -232,11 +229,11 @@ class DefaultApi {
} }
/// Create User /// Create User
/// ///
/// ///
/// Parameters: /// Parameters:
/// * [createUserDefinition] /// * [createUserDefinition]
/// * [accessToken] /// * [accessToken]
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
/// * [headers] - Can be used to add additional headers to the request /// * [headers] - Can be used to add additional headers to the request
/// * [extras] - Can be used to add flags to the request /// * [extras] - Can be used to add flags to the request
@ -246,7 +243,7 @@ class DefaultApi {
/// ///
/// Returns a [Future] containing a [Response] with a [OkResponse] as data /// Returns a [Future] containing a [Response] with a [OkResponse] as data
/// Throws [DioError] if API call or serialization fails /// Throws [DioError] if API call or serialization fails
Future<Response<OkResponse>> createUserApiUsersPost({ Future<Response<OkResponse>> createUserApiUsersPost({
required CreateUserDefinition createUserDefinition, required CreateUserDefinition createUserDefinition,
String? accessToken, String? accessToken,
CancelToken? cancelToken, CancelToken? cancelToken,
@ -275,11 +272,11 @@ class DefaultApi {
try { try {
const _type = FullType(CreateUserDefinition); const _type = FullType(CreateUserDefinition);
_bodyData = _serializers.serialize(createUserDefinition, specifiedType: _type); _bodyData =
_serializers.serialize(createUserDefinition, specifiedType: _type);
} catch(error, stackTrace) { } catch (error, stackTrace) {
throw DioError( throw DioError(
requestOptions: _options.compose( requestOptions: _options.compose(
_dio.options, _dio.options,
_path, _path,
), ),
@ -306,7 +303,6 @@ class DefaultApi {
_response.data!, _response.data!,
specifiedType: _responseType, specifiedType: _responseType,
) as OkResponse; ) as OkResponse;
} catch (error, stackTrace) { } catch (error, stackTrace) {
throw DioError( throw DioError(
requestOptions: _response.requestOptions, requestOptions: _response.requestOptions,
@ -330,12 +326,12 @@ class DefaultApi {
} }
/// Delete Item From Table /// Delete Item From Table
/// ///
/// ///
/// Parameters: /// Parameters:
/// * [tableName] /// * [tableName]
/// * [columnConditionCompat] /// * [columnConditionCompat]
/// * [accessToken] /// * [accessToken]
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
/// * [headers] - Can be used to add additional headers to the request /// * [headers] - Can be used to add additional headers to the request
/// * [extras] - Can be used to add flags to the request /// * [extras] - Can be used to add flags to the request
@ -345,7 +341,7 @@ class DefaultApi {
/// ///
/// Returns a [Future] containing a [Response] with a [OkResponse] as data /// Returns a [Future] containing a [Response] with a [OkResponse] as data
/// Throws [DioError] if API call or serialization fails /// Throws [DioError] if API call or serialization fails
Future<Response<OkResponse>> deleteItemFromTableItemsTableNamePost({ Future<Response<OkResponse>> deleteItemFromTableItemsTableNamePost({
required String tableName, required String tableName,
required BuiltList<ColumnConditionCompat> columnConditionCompat, required BuiltList<ColumnConditionCompat> columnConditionCompat,
String? accessToken, String? accessToken,
@ -356,7 +352,8 @@ class DefaultApi {
ProgressCallback? onSendProgress, ProgressCallback? onSendProgress,
ProgressCallback? onReceiveProgress, ProgressCallback? onReceiveProgress,
}) async { }) async {
final _path = r'/items/{tableName}/-'.replaceAll('{' r'tableName' '}', tableName.toString()); final _path = r'/items/{tableName}/-'
.replaceAll('{' r'tableName' '}', tableName.toString());
final _options = Options( final _options = Options(
method: r'POST', method: r'POST',
headers: <String, dynamic>{ headers: <String, dynamic>{
@ -375,11 +372,11 @@ class DefaultApi {
try { try {
const _type = FullType(BuiltList, [FullType(ColumnConditionCompat)]); const _type = FullType(BuiltList, [FullType(ColumnConditionCompat)]);
_bodyData = _serializers.serialize(columnConditionCompat, specifiedType: _type); _bodyData =
_serializers.serialize(columnConditionCompat, specifiedType: _type);
} catch(error, stackTrace) { } catch (error, stackTrace) {
throw DioError( throw DioError(
requestOptions: _options.compose( requestOptions: _options.compose(
_dio.options, _dio.options,
_path, _path,
), ),
@ -406,7 +403,6 @@ class DefaultApi {
_response.data!, _response.data!,
specifiedType: _responseType, specifiedType: _responseType,
) as OkResponse; ) as OkResponse;
} catch (error, stackTrace) { } catch (error, stackTrace) {
throw DioError( throw DioError(
requestOptions: _response.requestOptions, requestOptions: _response.requestOptions,
@ -430,11 +426,11 @@ class DefaultApi {
} }
/// Drop Table /// Drop Table
/// ///
/// ///
/// Parameters: /// Parameters:
/// * [tableName] /// * [tableName]
/// * [accessToken] /// * [accessToken]
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
/// * [headers] - Can be used to add additional headers to the request /// * [headers] - Can be used to add additional headers to the request
/// * [extras] - Can be used to add flags to the request /// * [extras] - Can be used to add flags to the request
@ -444,7 +440,7 @@ class DefaultApi {
/// ///
/// Returns a [Future] containing a [Response] with a [OkResponse] as data /// Returns a [Future] containing a [Response] with a [OkResponse] as data
/// Throws [DioError] if API call or serialization fails /// Throws [DioError] if API call or serialization fails
Future<Response<OkResponse>> dropTableApiDropTableTableNamePost({ Future<Response<OkResponse>> dropTableApiDropTableTableNamePost({
required String tableName, required String tableName,
String? accessToken, String? accessToken,
CancelToken? cancelToken, CancelToken? cancelToken,
@ -454,7 +450,8 @@ class DefaultApi {
ProgressCallback? onSendProgress, ProgressCallback? onSendProgress,
ProgressCallback? onReceiveProgress, ProgressCallback? onReceiveProgress,
}) async { }) async {
final _path = r'/api/dropTable/{tableName}'.replaceAll('{' r'tableName' '}', tableName.toString()); final _path = r'/api/dropTable/{tableName}'
.replaceAll('{' r'tableName' '}', tableName.toString());
final _options = Options( final _options = Options(
method: r'POST', method: r'POST',
headers: <String, dynamic>{ headers: <String, dynamic>{
@ -484,7 +481,6 @@ class DefaultApi {
_response.data!, _response.data!,
specifiedType: _responseType, specifiedType: _responseType,
) as OkResponse; ) as OkResponse;
} catch (error, stackTrace) { } catch (error, stackTrace) {
throw DioError( throw DioError(
requestOptions: _response.requestOptions, requestOptions: _response.requestOptions,
@ -508,10 +504,10 @@ class DefaultApi {
} }
/// Get Access Token /// Get Access Token
/// ///
/// ///
/// Parameters: /// Parameters:
/// * [authModel] /// * [authModel]
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
/// * [headers] - Can be used to add additional headers to the request /// * [headers] - Can be used to add additional headers to the request
/// * [extras] - Can be used to add flags to the request /// * [extras] - Can be used to add flags to the request
@ -521,7 +517,7 @@ class DefaultApi {
/// ///
/// Returns a [Future] containing a [Response] with a [AccessTokenResponse] as data /// Returns a [Future] containing a [Response] with a [AccessTokenResponse] as data
/// Throws [DioError] if API call or serialization fails /// Throws [DioError] if API call or serialization fails
Future<Response<AccessTokenResponse>> getAccessTokenApiGetAccessTokenPost({ Future<Response<AccessTokenResponse>> getAccessTokenApiGetAccessTokenPost({
required AuthModel authModel, required AuthModel authModel,
CancelToken? cancelToken, CancelToken? cancelToken,
Map<String, dynamic>? headers, Map<String, dynamic>? headers,
@ -549,10 +545,9 @@ class DefaultApi {
try { try {
const _type = FullType(AuthModel); const _type = FullType(AuthModel);
_bodyData = _serializers.serialize(authModel, specifiedType: _type); _bodyData = _serializers.serialize(authModel, specifiedType: _type);
} catch (error, stackTrace) {
} catch(error, stackTrace) {
throw DioError( throw DioError(
requestOptions: _options.compose( requestOptions: _options.compose(
_dio.options, _dio.options,
_path, _path,
), ),
@ -579,7 +574,6 @@ class DefaultApi {
_response.data!, _response.data!,
specifiedType: _responseType, specifiedType: _responseType,
) as AccessTokenResponse; ) as AccessTokenResponse;
} catch (error, stackTrace) { } catch (error, stackTrace) {
throw DioError( throw DioError(
requestOptions: _response.requestOptions, requestOptions: _response.requestOptions,
@ -603,10 +597,10 @@ class DefaultApi {
} }
/// Get Asset /// Get Asset
/// ///
/// ///
/// Parameters: /// Parameters:
/// * [fid] /// * [fid]
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
/// * [headers] - Can be used to add additional headers to the request /// * [headers] - Can be used to add additional headers to the request
/// * [extras] - Can be used to add flags to the request /// * [extras] - Can be used to add flags to the request
@ -616,7 +610,7 @@ class DefaultApi {
/// ///
/// Returns a [Future] containing a [Response] with a [JsonObject] as data /// Returns a [Future] containing a [Response] with a [JsonObject] as data
/// Throws [DioError] if API call or serialization fails /// Throws [DioError] if API call or serialization fails
Future<Response<JsonObject>> getAssetAssetsFidGet({ Future<Response<JsonObject>> getAssetAssetsFidGet({
required String fid, required String fid,
CancelToken? cancelToken, CancelToken? cancelToken,
Map<String, dynamic>? headers, Map<String, dynamic>? headers,
@ -654,7 +648,6 @@ class DefaultApi {
_response.data!, _response.data!,
specifiedType: _responseType, specifiedType: _responseType,
) as JsonObject; ) as JsonObject;
} catch (error, stackTrace) { } catch (error, stackTrace) {
throw DioError( throw DioError(
requestOptions: _response.requestOptions, requestOptions: _response.requestOptions,
@ -678,12 +671,12 @@ class DefaultApi {
} }
/// Get Items From Table /// Get Items From Table
/// ///
/// ///
/// Parameters: /// Parameters:
/// * [tableName] /// * [tableName]
/// * [itemsFieldSelectorList] /// * [itemsFieldSelectorList]
/// * [accessToken] /// * [accessToken]
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
/// * [headers] - Can be used to add additional headers to the request /// * [headers] - Can be used to add additional headers to the request
/// * [extras] - Can be used to add flags to the request /// * [extras] - Can be used to add flags to the request
@ -693,7 +686,7 @@ class DefaultApi {
/// ///
/// Returns a [Future] containing a [Response] with a [TableItemsResponse] as data /// Returns a [Future] containing a [Response] with a [TableItemsResponse] as data
/// Throws [DioError] if API call or serialization fails /// Throws [DioError] if API call or serialization fails
Future<Response<TableItemsResponse>> getItemsFromTableItemsTableNamePost({ Future<Response<TableItemsResponse>> getItemsFromTableItemsTableNamePost({
required String tableName, required String tableName,
required ItemsFieldSelectorList itemsFieldSelectorList, required ItemsFieldSelectorList itemsFieldSelectorList,
String? accessToken, String? accessToken,
@ -704,7 +697,8 @@ class DefaultApi {
ProgressCallback? onSendProgress, ProgressCallback? onSendProgress,
ProgressCallback? onReceiveProgress, ProgressCallback? onReceiveProgress,
}) async { }) async {
final _path = r'/items/{tableName}'.replaceAll('{' r'tableName' '}', tableName.toString()); final _path = r'/items/{tableName}'
.replaceAll('{' r'tableName' '}', tableName.toString());
final _options = Options( final _options = Options(
method: r'POST', method: r'POST',
headers: <String, dynamic>{ headers: <String, dynamic>{
@ -723,11 +717,11 @@ class DefaultApi {
try { try {
const _type = FullType(ItemsFieldSelectorList); const _type = FullType(ItemsFieldSelectorList);
_bodyData = _serializers.serialize(itemsFieldSelectorList, specifiedType: _type); _bodyData =
_serializers.serialize(itemsFieldSelectorList, specifiedType: _type);
} catch(error, stackTrace) { } catch (error, stackTrace) {
throw DioError( throw DioError(
requestOptions: _options.compose( requestOptions: _options.compose(
_dio.options, _dio.options,
_path, _path,
), ),
@ -754,7 +748,6 @@ class DefaultApi {
_response.data!, _response.data!,
specifiedType: _responseType, specifiedType: _responseType,
) as TableItemsResponse; ) as TableItemsResponse;
} catch (error, stackTrace) { } catch (error, stackTrace) {
throw DioError( throw DioError(
requestOptions: _response.requestOptions, requestOptions: _response.requestOptions,
@ -778,10 +771,10 @@ class DefaultApi {
} }
/// List Tables /// List Tables
/// ///
/// ///
/// Parameters: /// Parameters:
/// * [accessToken] /// * [accessToken]
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
/// * [headers] - Can be used to add additional headers to the request /// * [headers] - Can be used to add additional headers to the request
/// * [extras] - Can be used to add flags to the request /// * [extras] - Can be used to add flags to the request
@ -791,7 +784,7 @@ class DefaultApi {
/// ///
/// Returns a [Future] containing a [Response] with a [BuiltList<TableDefinition>] as data /// Returns a [Future] containing a [Response] with a [BuiltList<TableDefinition>] as data
/// Throws [DioError] if API call or serialization fails /// Throws [DioError] if API call or serialization fails
Future<Response<BuiltList<TableDefinition>>> listTablesApiListTablesGet({ Future<Response<BuiltList<TableDefinition>>> listTablesApiListTablesGet({
String? accessToken, String? accessToken,
CancelToken? cancelToken, CancelToken? cancelToken,
Map<String, dynamic>? headers, Map<String, dynamic>? headers,
@ -830,7 +823,6 @@ class DefaultApi {
_response.data!, _response.data!,
specifiedType: _responseType, specifiedType: _responseType,
) as BuiltList<TableDefinition>; ) as BuiltList<TableDefinition>;
} catch (error, stackTrace) { } catch (error, stackTrace) {
throw DioError( throw DioError(
requestOptions: _response.requestOptions, requestOptions: _response.requestOptions,
@ -854,11 +846,11 @@ class DefaultApi {
} }
/// Put Asset /// Put Asset
/// ///
/// ///
/// Parameters: /// Parameters:
/// * [asset] /// * [asset]
/// * [accessToken] /// * [accessToken]
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
/// * [headers] - Can be used to add additional headers to the request /// * [headers] - Can be used to add additional headers to the request
/// * [extras] - Can be used to add flags to the request /// * [extras] - Can be used to add flags to the request
@ -868,7 +860,7 @@ class DefaultApi {
/// ///
/// Returns a [Future] containing a [Response] with a [CreateAssetResponse] as data /// Returns a [Future] containing a [Response] with a [CreateAssetResponse] as data
/// Throws [DioError] if API call or serialization fails /// Throws [DioError] if API call or serialization fails
Future<Response<CreateAssetResponse>> putAssetAssetsPost({ Future<Response<CreateAssetResponse>> putAssetAssetsPost({
required MultipartFile asset, required MultipartFile asset,
String? accessToken, String? accessToken,
CancelToken? cancelToken, CancelToken? cancelToken,
@ -899,10 +891,9 @@ class DefaultApi {
_bodyData = FormData.fromMap(<String, dynamic>{ _bodyData = FormData.fromMap(<String, dynamic>{
r'asset': asset, r'asset': asset,
}); });
} catch (error, stackTrace) {
} catch(error, stackTrace) {
throw DioError( throw DioError(
requestOptions: _options.compose( requestOptions: _options.compose(
_dio.options, _dio.options,
_path, _path,
), ),
@ -929,7 +920,6 @@ class DefaultApi {
_response.data!, _response.data!,
specifiedType: _responseType, specifiedType: _responseType,
) as CreateAssetResponse; ) as CreateAssetResponse;
} catch (error, stackTrace) { } catch (error, stackTrace) {
throw DioError( throw DioError(
requestOptions: _response.requestOptions, requestOptions: _response.requestOptions,
@ -953,13 +943,13 @@ class DefaultApi {
} }
/// Remove Asset /// Remove Asset
/// ///
/// ///
/// Parameters: /// Parameters:
/// * [assetId] /// * [assetId]
/// * [checkReferences] /// * [checkReferences]
/// * [deleteReferencing] /// * [deleteReferencing]
/// * [accessToken] /// * [accessToken]
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
/// * [headers] - Can be used to add additional headers to the request /// * [headers] - Can be used to add additional headers to the request
/// * [extras] - Can be used to add flags to the request /// * [extras] - Can be used to add flags to the request
@ -969,7 +959,7 @@ class DefaultApi {
/// ///
/// Returns a [Future] containing a [Response] with a [OkResponse] as data /// Returns a [Future] containing a [Response] with a [OkResponse] as data
/// Throws [DioError] if API call or serialization fails /// Throws [DioError] if API call or serialization fails
Future<Response<OkResponse>> removeAssetAssetsAssetIdPost({ Future<Response<OkResponse>> removeAssetAssetsAssetIdPost({
required int assetId, required int assetId,
bool? checkReferences = true, bool? checkReferences = true,
bool? deleteReferencing = false, bool? deleteReferencing = false,
@ -981,7 +971,8 @@ class DefaultApi {
ProgressCallback? onSendProgress, ProgressCallback? onSendProgress,
ProgressCallback? onReceiveProgress, ProgressCallback? onReceiveProgress,
}) async { }) async {
final _path = r'/assets/{asset_id}/-'.replaceAll('{' r'asset_id' '}', assetId.toString()); final _path = r'/assets/{asset_id}/-'
.replaceAll('{' r'asset_id' '}', assetId.toString());
final _options = Options( final _options = Options(
method: r'POST', method: r'POST',
headers: <String, dynamic>{ headers: <String, dynamic>{
@ -996,8 +987,12 @@ class DefaultApi {
); );
final _queryParameters = <String, dynamic>{ final _queryParameters = <String, dynamic>{
if (checkReferences != null) r'check_references': encodeQueryParameter(_serializers, checkReferences, const FullType(bool)), if (checkReferences != null)
if (deleteReferencing != null) r'delete_referencing': encodeQueryParameter(_serializers, deleteReferencing, const FullType(bool)), r'check_references': encodeQueryParameter(
_serializers, checkReferences, const FullType(bool)),
if (deleteReferencing != null)
r'delete_referencing': encodeQueryParameter(
_serializers, deleteReferencing, const FullType(bool)),
}; };
final _response = await _dio.request<Object>( final _response = await _dio.request<Object>(
@ -1017,7 +1012,6 @@ class DefaultApi {
_response.data!, _response.data!,
specifiedType: _responseType, specifiedType: _responseType,
) as OkResponse; ) as OkResponse;
} catch (error, stackTrace) { } catch (error, stackTrace) {
throw DioError( throw DioError(
requestOptions: _response.requestOptions, requestOptions: _response.requestOptions,
@ -1041,11 +1035,11 @@ class DefaultApi {
} }
/// Remove User /// Remove User
/// ///
/// ///
/// Parameters: /// Parameters:
/// * [userId] /// * [userId]
/// * [accessToken] /// * [accessToken]
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
/// * [headers] - Can be used to add additional headers to the request /// * [headers] - Can be used to add additional headers to the request
/// * [extras] - Can be used to add flags to the request /// * [extras] - Can be used to add flags to the request
@ -1055,7 +1049,7 @@ class DefaultApi {
/// ///
/// Returns a [Future] containing a [Response] with a [OkResponse] as data /// Returns a [Future] containing a [Response] with a [OkResponse] as data
/// Throws [DioError] if API call or serialization fails /// Throws [DioError] if API call or serialization fails
Future<Response<OkResponse>> removeUserApiUsersPost({ Future<Response<OkResponse>> removeUserApiUsersPost({
required int userId, required int userId,
String? accessToken, String? accessToken,
CancelToken? cancelToken, CancelToken? cancelToken,
@ -1080,7 +1074,8 @@ class DefaultApi {
); );
final _queryParameters = <String, dynamic>{ final _queryParameters = <String, dynamic>{
r'user_id': encodeQueryParameter(_serializers, userId, const FullType(int)), r'user_id':
encodeQueryParameter(_serializers, userId, const FullType(int)),
}; };
final _response = await _dio.request<Object>( final _response = await _dio.request<Object>(
@ -1100,7 +1095,6 @@ class DefaultApi {
_response.data!, _response.data!,
specifiedType: _responseType, specifiedType: _responseType,
) as OkResponse; ) as OkResponse;
} catch (error, stackTrace) { } catch (error, stackTrace) {
throw DioError( throw DioError(
requestOptions: _response.requestOptions, requestOptions: _response.requestOptions,
@ -1124,12 +1118,12 @@ class DefaultApi {
} }
/// Update Asset Description /// Update Asset Description
/// ///
/// ///
/// Parameters: /// Parameters:
/// * [assetId] /// * [assetId]
/// * [assetDescription] /// * [assetDescription]
/// * [accessToken] /// * [accessToken]
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
/// * [headers] - Can be used to add additional headers to the request /// * [headers] - Can be used to add additional headers to the request
/// * [extras] - Can be used to add flags to the request /// * [extras] - Can be used to add flags to the request
@ -1139,7 +1133,7 @@ class DefaultApi {
/// ///
/// Returns a [Future] containing a [Response] with a [OkResponse] as data /// Returns a [Future] containing a [Response] with a [OkResponse] as data
/// Throws [DioError] if API call or serialization fails /// Throws [DioError] if API call or serialization fails
Future<Response<OkResponse>> updateAssetDescriptionAssetsAssetIdPost({ Future<Response<OkResponse>> updateAssetDescriptionAssetsAssetIdPost({
required int assetId, required int assetId,
required String assetDescription, required String assetDescription,
String? accessToken, String? accessToken,
@ -1150,7 +1144,8 @@ class DefaultApi {
ProgressCallback? onSendProgress, ProgressCallback? onSendProgress,
ProgressCallback? onReceiveProgress, ProgressCallback? onReceiveProgress,
}) async { }) async {
final _path = r'/assets/{asset_id}/*'.replaceAll('{' r'asset_id' '}', assetId.toString()); final _path = r'/assets/{asset_id}/*'
.replaceAll('{' r'asset_id' '}', assetId.toString());
final _options = Options( final _options = Options(
method: r'POST', method: r'POST',
headers: <String, dynamic>{ headers: <String, dynamic>{
@ -1165,7 +1160,8 @@ class DefaultApi {
); );
final _queryParameters = <String, dynamic>{ final _queryParameters = <String, dynamic>{
r'asset_description': encodeQueryParameter(_serializers, assetDescription, const FullType(String)), r'asset_description': encodeQueryParameter(
_serializers, assetDescription, const FullType(String)),
}; };
final _response = await _dio.request<Object>( final _response = await _dio.request<Object>(
@ -1185,7 +1181,6 @@ class DefaultApi {
_response.data!, _response.data!,
specifiedType: _responseType, specifiedType: _responseType,
) as OkResponse; ) as OkResponse;
} catch (error, stackTrace) { } catch (error, stackTrace) {
throw DioError( throw DioError(
requestOptions: _response.requestOptions, requestOptions: _response.requestOptions,
@ -1209,12 +1204,12 @@ class DefaultApi {
} }
/// Update Item In Table /// Update Item In Table
/// ///
/// ///
/// Parameters: /// Parameters:
/// * [tableName] /// * [tableName]
/// * [bodyUpdateItemInTableItemsTableNamePost] /// * [bodyUpdateItemInTableItemsTableNamePost]
/// * [accessToken] /// * [accessToken]
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
/// * [headers] - Can be used to add additional headers to the request /// * [headers] - Can be used to add additional headers to the request
/// * [extras] - Can be used to add flags to the request /// * [extras] - Can be used to add flags to the request
@ -1224,9 +1219,10 @@ class DefaultApi {
/// ///
/// Returns a [Future] containing a [Response] with a [OkResponse] as data /// Returns a [Future] containing a [Response] with a [OkResponse] as data
/// Throws [DioError] if API call or serialization fails /// Throws [DioError] if API call or serialization fails
Future<Response<OkResponse>> updateItemInTableItemsTableNamePost({ Future<Response<OkResponse>> updateItemInTableItemsTableNamePost({
required String tableName, required String tableName,
required BodyUpdateItemInTableItemsTableNamePost bodyUpdateItemInTableItemsTableNamePost, required BodyUpdateItemInTableItemsTableNamePost
bodyUpdateItemInTableItemsTableNamePost,
String? accessToken, String? accessToken,
CancelToken? cancelToken, CancelToken? cancelToken,
Map<String, dynamic>? headers, Map<String, dynamic>? headers,
@ -1235,7 +1231,8 @@ class DefaultApi {
ProgressCallback? onSendProgress, ProgressCallback? onSendProgress,
ProgressCallback? onReceiveProgress, ProgressCallback? onReceiveProgress,
}) async { }) async {
final _path = r'/items/{tableName}/*'.replaceAll('{' r'tableName' '}', tableName.toString()); final _path = r'/items/{tableName}/*'
.replaceAll('{' r'tableName' '}', tableName.toString());
final _options = Options( final _options = Options(
method: r'POST', method: r'POST',
headers: <String, dynamic>{ headers: <String, dynamic>{
@ -1254,11 +1251,12 @@ class DefaultApi {
try { try {
const _type = FullType(BodyUpdateItemInTableItemsTableNamePost); const _type = FullType(BodyUpdateItemInTableItemsTableNamePost);
_bodyData = _serializers.serialize(bodyUpdateItemInTableItemsTableNamePost, specifiedType: _type); _bodyData = _serializers.serialize(
bodyUpdateItemInTableItemsTableNamePost,
} catch(error, stackTrace) { specifiedType: _type);
} catch (error, stackTrace) {
throw DioError( throw DioError(
requestOptions: _options.compose( requestOptions: _options.compose(
_dio.options, _dio.options,
_path, _path,
), ),
@ -1285,7 +1283,6 @@ class DefaultApi {
_response.data!, _response.data!,
specifiedType: _responseType, specifiedType: _responseType,
) as OkResponse; ) as OkResponse;
} catch (error, stackTrace) { } catch (error, stackTrace) {
throw DioError( throw DioError(
requestOptions: _response.requestOptions, requestOptions: _response.requestOptions,
@ -1309,11 +1306,11 @@ class DefaultApi {
} }
/// Update User /// Update User
/// ///
/// ///
/// Parameters: /// Parameters:
/// * [userUpdateDefinition] /// * [userUpdateDefinition]
/// * [accessToken] /// * [accessToken]
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
/// * [headers] - Can be used to add additional headers to the request /// * [headers] - Can be used to add additional headers to the request
/// * [extras] - Can be used to add flags to the request /// * [extras] - Can be used to add flags to the request
@ -1323,7 +1320,7 @@ class DefaultApi {
/// ///
/// Returns a [Future] containing a [Response] with a [OkResponse] as data /// Returns a [Future] containing a [Response] with a [OkResponse] as data
/// Throws [DioError] if API call or serialization fails /// Throws [DioError] if API call or serialization fails
Future<Response<OkResponse>> updateUserApiUsersPost({ Future<Response<OkResponse>> updateUserApiUsersPost({
required UserUpdateDefinition userUpdateDefinition, required UserUpdateDefinition userUpdateDefinition,
String? accessToken, String? accessToken,
CancelToken? cancelToken, CancelToken? cancelToken,
@ -1352,11 +1349,11 @@ class DefaultApi {
try { try {
const _type = FullType(UserUpdateDefinition); const _type = FullType(UserUpdateDefinition);
_bodyData = _serializers.serialize(userUpdateDefinition, specifiedType: _type); _bodyData =
_serializers.serialize(userUpdateDefinition, specifiedType: _type);
} catch(error, stackTrace) { } catch (error, stackTrace) {
throw DioError( throw DioError(
requestOptions: _options.compose( requestOptions: _options.compose(
_dio.options, _dio.options,
_path, _path,
), ),
@ -1383,7 +1380,6 @@ class DefaultApi {
_response.data!, _response.data!,
specifiedType: _responseType, specifiedType: _responseType,
) as OkResponse; ) as OkResponse;
} catch (error, stackTrace) { } catch (error, stackTrace) {
throw DioError( throw DioError(
requestOptions: _response.requestOptions, requestOptions: _response.requestOptions,
@ -1405,5 +1401,4 @@ class DefaultApi {
extra: _response.extra, extra: _response.extra,
); );
} }
} }