@devlearning/swagger-generator 1.0.23 → 1.0.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.vscode/launch.json +22 -22
- package/README.md +209 -209
- package/autogen/identity/api/identity_api.dart +100 -99
- package/autogen/identity/models/auth_activate_command.dart +14 -14
- package/autogen/identity/models/auth_app_authenticate_command.dart +16 -16
- package/autogen/identity/models/auth_generate_reset_password_code_command.dart +15 -15
- package/autogen/identity/models/auth_refresh_token_command.dart +15 -15
- package/autogen/identity/models/auth_reset_password_command.dart +16 -16
- package/autogen/identity/models/auth_user_authenticate_command.dart +15 -15
- package/autogen/identity/models/auth_user_dto.dart +18 -18
- package/autogen/identity/models/auth_verify_reset_password_code_command.dart +14 -14
- package/autogen/identity/models/authentication_token.dart +17 -17
- package/autogen/mvc/models/problem_details.dart +17 -17
- package/autogen/product/api/product_api.dart +70 -0
- package/autogen/product/models/geoposition.dart +14 -0
- package/autogen/product/models/product_category_dto.dart +15 -0
- package/autogen/product/models/product_category_list_query_response.dart +14 -0
- package/autogen/product/models/product_category_save_command.dart +15 -0
- package/autogen/product/models/product_list_nearby_query.dart +20 -0
- package/autogen/product/models/product_list_nearby_query_filter.dart +15 -0
- package/autogen/product/models/product_list_nearby_query_order_by.dart +10 -0
- package/autogen/product/models/product_save_command.dart +13 -0
- package/autogen/service_defaults/models/application_exception.dart +14 -14
- package/autogen/service_defaults/models/result.dart +17 -17
- package/autogen/service_defaults/models/sort_direction.dart +10 -0
- package/autogen/user_profile/api/user_profile_api.dart +51 -60
- package/autogen/user_profile/models/user_general_info_save_command.dart +17 -13
- package/dist/api.constants.js +22 -22
- package/dist/generator.js +9 -4
- package/dist/generators-writers/angular/api-angular-writer.js +15 -15
- package/dist/generators-writers/angular/constants.js +24 -24
- package/dist/generators-writers/angular/model-angular-writer.js +6 -6
- package/dist/generators-writers/dart/api-dart-writer.js +5 -1
- package/dist/generators-writers/dart/model-dart-writer.js +63 -60
- package/dist/generators-writers/dart/templates/api.mustache +36 -34
- package/dist/generators-writers/dart/templates/enum.mustache +14 -0
- package/dist/generators-writers/dart/templates/model.mustache +18 -18
- package/dist/generators-writers/nextjs/api-nextjs-writer.js +12 -12
- package/dist/generators-writers/nextjs/constants.js +4 -4
- package/dist/generators-writers/nextjs/model-nextjs-writer.js +6 -6
- package/package.json +45 -45
- package/src/api.constants.ts +26 -26
- package/src/generator-old.ts +449 -449
- package/src/generator.ts +582 -577
- package/src/generators-writers/angular/api-angular-writer.ts +141 -141
- package/src/generators-writers/angular/constants.ts +36 -36
- package/src/generators-writers/angular/model-angular-writer.ts +62 -62
- package/src/generators-writers/dart/api-dart-writer.ts +190 -185
- package/src/generators-writers/dart/model-dart-writer.ts +162 -143
- package/src/generators-writers/dart/models/import-definition-dart.ts +5 -5
- package/src/generators-writers/dart/normalizator.ts +72 -72
- package/src/generators-writers/dart/templates/api.mustache +36 -34
- package/src/generators-writers/dart/templates/enum.mustache +14 -0
- package/src/generators-writers/dart/templates/model.mustache +18 -18
- package/src/generators-writers/nextjs/api-nextjs-writer.ts +156 -156
- package/src/generators-writers/nextjs/constants.ts +5 -5
- package/src/generators-writers/nextjs/model-nextjs-writer.ts +61 -61
- package/src/generators-writers/utils.ts +78 -78
- package/src/index.ts +96 -96
- package/src/models/api-dto.ts +17 -17
- package/src/models/enum-value-dto.ts +3 -3
- package/src/models/model-dto.ts +9 -9
- package/src/models/parameter-dto.ts +7 -7
- package/src/models/property-dto.ts +4 -4
- package/src/models/swagger/swagger-component-property.ts +11 -11
- package/src/models/swagger/swagger-component.ts +17 -17
- package/src/models/swagger/swagger-content.ts +4 -4
- package/src/models/swagger/swagger-info.ts +3 -3
- package/src/models/swagger/swagger-method.ts +7 -7
- package/src/models/swagger/swagger-schema.ts +20 -20
- package/src/models/swagger/swagger.ts +38 -38
- package/src/models/type-dto.ts +7 -7
- package/src/swagger-downloader.ts +12 -12
- package/tsconfig.json +28 -28
- package/autogen/user_profile/models/test_save_command.dart +0 -13
- package/dist/templates/api.mustache +0 -29
- package/dist/templates/model.mustache +0 -18
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import 'package:freezed_annotation/freezed_annotation.dart';
|
|
2
|
-
|
|
3
|
-
part 'auth_activate_command.freezed.dart';
|
|
4
|
-
part 'auth_activate_command.g.dart';
|
|
5
|
-
|
|
6
|
-
@freezed
|
|
7
|
-
abstract class
|
|
8
|
-
const factory
|
|
9
|
-
String? username,
|
|
10
|
-
String? activationCode,
|
|
11
|
-
}) =
|
|
12
|
-
|
|
13
|
-
factory
|
|
14
|
-
}
|
|
1
|
+
import 'package:freezed_annotation/freezed_annotation.dart';
|
|
2
|
+
|
|
3
|
+
part 'auth_activate_command.freezed.dart';
|
|
4
|
+
part 'auth_activate_command.g.dart';
|
|
5
|
+
|
|
6
|
+
@freezed
|
|
7
|
+
abstract class with _$ {
|
|
8
|
+
const factory ({
|
|
9
|
+
String? username,
|
|
10
|
+
String? activationCode,
|
|
11
|
+
}) = _;
|
|
12
|
+
|
|
13
|
+
factory .fromJson(Map<String, dynamic> json) => _$FromJson(json);
|
|
14
|
+
}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import 'package:freezed_annotation/freezed_annotation.dart';
|
|
2
|
-
|
|
3
|
-
part 'auth_app_authenticate_command.freezed.dart';
|
|
4
|
-
part 'auth_app_authenticate_command.g.dart';
|
|
5
|
-
|
|
6
|
-
@freezed
|
|
7
|
-
abstract class
|
|
8
|
-
const factory
|
|
9
|
-
String? appId,
|
|
10
|
-
String? secret,
|
|
11
|
-
String? audience,
|
|
12
|
-
String? ipAddress,
|
|
13
|
-
}) =
|
|
14
|
-
|
|
15
|
-
factory
|
|
16
|
-
}
|
|
1
|
+
import 'package:freezed_annotation/freezed_annotation.dart';
|
|
2
|
+
|
|
3
|
+
part 'auth_app_authenticate_command.freezed.dart';
|
|
4
|
+
part 'auth_app_authenticate_command.g.dart';
|
|
5
|
+
|
|
6
|
+
@freezed
|
|
7
|
+
abstract class with _$ {
|
|
8
|
+
const factory ({
|
|
9
|
+
String? appId,
|
|
10
|
+
String? secret,
|
|
11
|
+
String? audience,
|
|
12
|
+
String? ipAddress,
|
|
13
|
+
}) = _;
|
|
14
|
+
|
|
15
|
+
factory .fromJson(Map<String, dynamic> json) => _$FromJson(json);
|
|
16
|
+
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import 'package:freezed_annotation/freezed_annotation.dart';
|
|
2
|
-
|
|
3
|
-
part 'auth_generate_reset_password_code_command.freezed.dart';
|
|
4
|
-
part 'auth_generate_reset_password_code_command.g.dart';
|
|
5
|
-
|
|
6
|
-
@freezed
|
|
7
|
-
abstract class
|
|
8
|
-
const factory
|
|
9
|
-
String? usernameOrEmail,
|
|
10
|
-
String? host,
|
|
11
|
-
String? urlResetPassword,
|
|
12
|
-
}) =
|
|
13
|
-
|
|
14
|
-
factory
|
|
15
|
-
}
|
|
1
|
+
import 'package:freezed_annotation/freezed_annotation.dart';
|
|
2
|
+
|
|
3
|
+
part 'auth_generate_reset_password_code_command.freezed.dart';
|
|
4
|
+
part 'auth_generate_reset_password_code_command.g.dart';
|
|
5
|
+
|
|
6
|
+
@freezed
|
|
7
|
+
abstract class with _$ {
|
|
8
|
+
const factory ({
|
|
9
|
+
String? usernameOrEmail,
|
|
10
|
+
String? host,
|
|
11
|
+
String? urlResetPassword,
|
|
12
|
+
}) = _;
|
|
13
|
+
|
|
14
|
+
factory .fromJson(Map<String, dynamic> json) => _$FromJson(json);
|
|
15
|
+
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import 'package:freezed_annotation/freezed_annotation.dart';
|
|
2
|
-
|
|
3
|
-
part 'auth_refresh_token_command.freezed.dart';
|
|
4
|
-
part 'auth_refresh_token_command.g.dart';
|
|
5
|
-
|
|
6
|
-
@freezed
|
|
7
|
-
abstract class
|
|
8
|
-
const factory
|
|
9
|
-
String? uniqueName,
|
|
10
|
-
String? refreshToken,
|
|
11
|
-
String? ipAddress,
|
|
12
|
-
}) =
|
|
13
|
-
|
|
14
|
-
factory
|
|
15
|
-
}
|
|
1
|
+
import 'package:freezed_annotation/freezed_annotation.dart';
|
|
2
|
+
|
|
3
|
+
part 'auth_refresh_token_command.freezed.dart';
|
|
4
|
+
part 'auth_refresh_token_command.g.dart';
|
|
5
|
+
|
|
6
|
+
@freezed
|
|
7
|
+
abstract class with _$ {
|
|
8
|
+
const factory ({
|
|
9
|
+
String? uniqueName,
|
|
10
|
+
String? refreshToken,
|
|
11
|
+
String? ipAddress,
|
|
12
|
+
}) = _;
|
|
13
|
+
|
|
14
|
+
factory .fromJson(Map<String, dynamic> json) => _$FromJson(json);
|
|
15
|
+
}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import 'package:freezed_annotation/freezed_annotation.dart';
|
|
2
|
-
|
|
3
|
-
part 'auth_reset_password_command.freezed.dart';
|
|
4
|
-
part 'auth_reset_password_command.g.dart';
|
|
5
|
-
|
|
6
|
-
@freezed
|
|
7
|
-
abstract class
|
|
8
|
-
const factory
|
|
9
|
-
String? usernameOrEmail,
|
|
10
|
-
String? verificationCode,
|
|
11
|
-
String? password,
|
|
12
|
-
String? confirmPassword,
|
|
13
|
-
}) =
|
|
14
|
-
|
|
15
|
-
factory
|
|
16
|
-
}
|
|
1
|
+
import 'package:freezed_annotation/freezed_annotation.dart';
|
|
2
|
+
|
|
3
|
+
part 'auth_reset_password_command.freezed.dart';
|
|
4
|
+
part 'auth_reset_password_command.g.dart';
|
|
5
|
+
|
|
6
|
+
@freezed
|
|
7
|
+
abstract class with _$ {
|
|
8
|
+
const factory ({
|
|
9
|
+
String? usernameOrEmail,
|
|
10
|
+
String? verificationCode,
|
|
11
|
+
String? password,
|
|
12
|
+
String? confirmPassword,
|
|
13
|
+
}) = _;
|
|
14
|
+
|
|
15
|
+
factory .fromJson(Map<String, dynamic> json) => _$FromJson(json);
|
|
16
|
+
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import 'package:freezed_annotation/freezed_annotation.dart';
|
|
2
|
-
|
|
3
|
-
part 'auth_user_authenticate_command.freezed.dart';
|
|
4
|
-
part 'auth_user_authenticate_command.g.dart';
|
|
5
|
-
|
|
6
|
-
@freezed
|
|
7
|
-
abstract class
|
|
8
|
-
const factory
|
|
9
|
-
String? username,
|
|
10
|
-
String? password,
|
|
11
|
-
String? ipAddress,
|
|
12
|
-
}) =
|
|
13
|
-
|
|
14
|
-
factory
|
|
15
|
-
}
|
|
1
|
+
import 'package:freezed_annotation/freezed_annotation.dart';
|
|
2
|
+
|
|
3
|
+
part 'auth_user_authenticate_command.freezed.dart';
|
|
4
|
+
part 'auth_user_authenticate_command.g.dart';
|
|
5
|
+
|
|
6
|
+
@freezed
|
|
7
|
+
abstract class with _$ {
|
|
8
|
+
const factory ({
|
|
9
|
+
String? username,
|
|
10
|
+
String? password,
|
|
11
|
+
String? ipAddress,
|
|
12
|
+
}) = _;
|
|
13
|
+
|
|
14
|
+
factory .fromJson(Map<String, dynamic> json) => _$FromJson(json);
|
|
15
|
+
}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import 'package:freezed_annotation/freezed_annotation.dart';
|
|
2
|
-
|
|
3
|
-
part 'auth_user_dto.freezed.dart';
|
|
4
|
-
part 'auth_user_dto.g.dart';
|
|
5
|
-
|
|
6
|
-
@freezed
|
|
7
|
-
abstract class
|
|
8
|
-
const factory
|
|
9
|
-
required String idAuthUser,
|
|
10
|
-
required String uniqueId,
|
|
11
|
-
String? username,
|
|
12
|
-
String? email,
|
|
13
|
-
DateTime? activationDate,
|
|
14
|
-
DateTime? lockedDate,
|
|
15
|
-
}) =
|
|
16
|
-
|
|
17
|
-
factory
|
|
18
|
-
}
|
|
1
|
+
import 'package:freezed_annotation/freezed_annotation.dart';
|
|
2
|
+
|
|
3
|
+
part 'auth_user_dto.freezed.dart';
|
|
4
|
+
part 'auth_user_dto.g.dart';
|
|
5
|
+
|
|
6
|
+
@freezed
|
|
7
|
+
abstract class with _$ {
|
|
8
|
+
const factory ({
|
|
9
|
+
required String idAuthUser,
|
|
10
|
+
required String uniqueId,
|
|
11
|
+
String? username,
|
|
12
|
+
String? email,
|
|
13
|
+
DateTime? activationDate,
|
|
14
|
+
DateTime? lockedDate,
|
|
15
|
+
}) = _;
|
|
16
|
+
|
|
17
|
+
factory .fromJson(Map<String, dynamic> json) => _$FromJson(json);
|
|
18
|
+
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import 'package:freezed_annotation/freezed_annotation.dart';
|
|
2
|
-
|
|
3
|
-
part 'auth_verify_reset_password_code_command.freezed.dart';
|
|
4
|
-
part 'auth_verify_reset_password_code_command.g.dart';
|
|
5
|
-
|
|
6
|
-
@freezed
|
|
7
|
-
abstract class
|
|
8
|
-
const factory
|
|
9
|
-
String? usernameOrEmail,
|
|
10
|
-
String? verificationCode,
|
|
11
|
-
}) =
|
|
12
|
-
|
|
13
|
-
factory
|
|
14
|
-
}
|
|
1
|
+
import 'package:freezed_annotation/freezed_annotation.dart';
|
|
2
|
+
|
|
3
|
+
part 'auth_verify_reset_password_code_command.freezed.dart';
|
|
4
|
+
part 'auth_verify_reset_password_code_command.g.dart';
|
|
5
|
+
|
|
6
|
+
@freezed
|
|
7
|
+
abstract class with _$ {
|
|
8
|
+
const factory ({
|
|
9
|
+
String? usernameOrEmail,
|
|
10
|
+
String? verificationCode,
|
|
11
|
+
}) = _;
|
|
12
|
+
|
|
13
|
+
factory .fromJson(Map<String, dynamic> json) => _$FromJson(json);
|
|
14
|
+
}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import 'package:freezed_annotation/freezed_annotation.dart';
|
|
2
|
-
|
|
3
|
-
part 'authentication_token.freezed.dart';
|
|
4
|
-
part 'authentication_token.g.dart';
|
|
5
|
-
|
|
6
|
-
@freezed
|
|
7
|
-
abstract class
|
|
8
|
-
const factory
|
|
9
|
-
String? uniqueName,
|
|
10
|
-
String? accessToken,
|
|
11
|
-
int? expiresIn,
|
|
12
|
-
String? refreshToken,
|
|
13
|
-
int? refreshTokenExpiresIn,
|
|
14
|
-
}) =
|
|
15
|
-
|
|
16
|
-
factory
|
|
17
|
-
}
|
|
1
|
+
import 'package:freezed_annotation/freezed_annotation.dart';
|
|
2
|
+
|
|
3
|
+
part 'authentication_token.freezed.dart';
|
|
4
|
+
part 'authentication_token.g.dart';
|
|
5
|
+
|
|
6
|
+
@freezed
|
|
7
|
+
abstract class with _$ {
|
|
8
|
+
const factory ({
|
|
9
|
+
String? uniqueName,
|
|
10
|
+
String? accessToken,
|
|
11
|
+
int? expiresIn,
|
|
12
|
+
String? refreshToken,
|
|
13
|
+
int? refreshTokenExpiresIn,
|
|
14
|
+
}) = _;
|
|
15
|
+
|
|
16
|
+
factory .fromJson(Map<String, dynamic> json) => _$FromJson(json);
|
|
17
|
+
}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import 'package:freezed_annotation/freezed_annotation.dart';
|
|
2
|
-
|
|
3
|
-
part 'problem_details.freezed.dart';
|
|
4
|
-
part 'problem_details.g.dart';
|
|
5
|
-
|
|
6
|
-
@freezed
|
|
7
|
-
abstract class
|
|
8
|
-
const factory
|
|
9
|
-
String? type,
|
|
10
|
-
String? title,
|
|
11
|
-
int? status,
|
|
12
|
-
String? detail,
|
|
13
|
-
String? instance,
|
|
14
|
-
}) =
|
|
15
|
-
|
|
16
|
-
factory
|
|
17
|
-
}
|
|
1
|
+
import 'package:freezed_annotation/freezed_annotation.dart';
|
|
2
|
+
|
|
3
|
+
part 'problem_details.freezed.dart';
|
|
4
|
+
part 'problem_details.g.dart';
|
|
5
|
+
|
|
6
|
+
@freezed
|
|
7
|
+
abstract class with _$ {
|
|
8
|
+
const factory ({
|
|
9
|
+
String? type,
|
|
10
|
+
String? title,
|
|
11
|
+
int? status,
|
|
12
|
+
String? detail,
|
|
13
|
+
String? instance,
|
|
14
|
+
}) = _;
|
|
15
|
+
|
|
16
|
+
factory .fromJson(Map<String, dynamic> json) => _$FromJson(json);
|
|
17
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import 'package:coqudo_app/core/di/injector.dart';
|
|
2
|
+
import 'package:dio/dio.dart';
|
|
3
|
+
import 'package:coqudo_app/autogen/service_defaults/models/result.dart';
|
|
4
|
+
import 'package:coqudo_app/autogen/product/models/product_list_nearby_query.dart';
|
|
5
|
+
import 'package:coqudo_app/autogen/product/models/product_save_command.dart';
|
|
6
|
+
import 'package:coqudo_app/autogen/product/models/product_category_list_query_response.dart';
|
|
7
|
+
import 'package:coqudo_app/autogen/product/models/product_category_save_command.dart';
|
|
8
|
+
|
|
9
|
+
class ProductApi {
|
|
10
|
+
final Dio _dio;
|
|
11
|
+
|
|
12
|
+
ProductApi() : _dio = getIt<Dio>();
|
|
13
|
+
|
|
14
|
+
Future<Result> productRead(
|
|
15
|
+
|
|
16
|
+
int myProperty,
|
|
17
|
+
) async {
|
|
18
|
+
final response = await _dio.get(
|
|
19
|
+
'/product/product/read',
|
|
20
|
+
queryParameters: {
|
|
21
|
+
'myProperty': myProperty,
|
|
22
|
+
},
|
|
23
|
+
);
|
|
24
|
+
return Result.fromJson(response.data);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
Future<Result> productListNearby(
|
|
28
|
+
ProductListNearbyQuery request
|
|
29
|
+
) async {
|
|
30
|
+
final response = await _dio.post(
|
|
31
|
+
'/product/product/list-nearby',
|
|
32
|
+
data: request.toJson(),
|
|
33
|
+
);
|
|
34
|
+
return Result.fromJson(response.data);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
Future<Result> productSave(
|
|
38
|
+
ProductSaveCommand request
|
|
39
|
+
) async {
|
|
40
|
+
final response = await _dio.post(
|
|
41
|
+
'/product/product/save',
|
|
42
|
+
data: request.toJson(),
|
|
43
|
+
);
|
|
44
|
+
return Result.fromJson(response.data);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
Future<ProductCategoryListQueryResponse> productCategoryList(
|
|
48
|
+
|
|
49
|
+
int? idProductCategoryParent,
|
|
50
|
+
) async {
|
|
51
|
+
final response = await _dio.get(
|
|
52
|
+
'/product/product-category/list',
|
|
53
|
+
queryParameters: {
|
|
54
|
+
if (idProductCategoryParent != null) 'idProductCategoryParent': idProductCategoryParent,
|
|
55
|
+
},
|
|
56
|
+
);
|
|
57
|
+
return ProductCategoryListQueryResponse.fromJson(response.data);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
Future<Result> productCategorySave(
|
|
61
|
+
ProductCategorySaveCommand request
|
|
62
|
+
) async {
|
|
63
|
+
final response = await _dio.post(
|
|
64
|
+
'/product/product-category/save',
|
|
65
|
+
data: request.toJson(),
|
|
66
|
+
);
|
|
67
|
+
return Result.fromJson(response.data);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import 'package:freezed_annotation/freezed_annotation.dart';
|
|
2
|
+
|
|
3
|
+
part 'geoposition.freezed.dart';
|
|
4
|
+
part 'geoposition.g.dart';
|
|
5
|
+
|
|
6
|
+
@freezed
|
|
7
|
+
abstract class with _$ {
|
|
8
|
+
const factory ({
|
|
9
|
+
required double latitude,
|
|
10
|
+
required double longitude,
|
|
11
|
+
}) = _;
|
|
12
|
+
|
|
13
|
+
factory .fromJson(Map<String, dynamic> json) => _$FromJson(json);
|
|
14
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import 'package:freezed_annotation/freezed_annotation.dart';
|
|
2
|
+
|
|
3
|
+
part 'product_category_dto.freezed.dart';
|
|
4
|
+
part 'product_category_dto.g.dart';
|
|
5
|
+
|
|
6
|
+
@freezed
|
|
7
|
+
abstract class with _$ {
|
|
8
|
+
const factory ({
|
|
9
|
+
required int idProductCategory,
|
|
10
|
+
int? idProductCategoryParent,
|
|
11
|
+
String? name,
|
|
12
|
+
}) = _;
|
|
13
|
+
|
|
14
|
+
factory .fromJson(Map<String, dynamic> json) => _$FromJson(json);
|
|
15
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import 'package:freezed_annotation/freezed_annotation.dart';
|
|
2
|
+
import 'package:coqudo_app/autogen/product/models/product_category_dto.dart';
|
|
3
|
+
|
|
4
|
+
part 'product_category_list_query_response.freezed.dart';
|
|
5
|
+
part 'product_category_list_query_response.g.dart';
|
|
6
|
+
|
|
7
|
+
@freezed
|
|
8
|
+
abstract class with _$ {
|
|
9
|
+
const factory ({
|
|
10
|
+
ProductCategoryDto? items,
|
|
11
|
+
}) = _;
|
|
12
|
+
|
|
13
|
+
factory .fromJson(Map<String, dynamic> json) => _$FromJson(json);
|
|
14
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import 'package:freezed_annotation/freezed_annotation.dart';
|
|
2
|
+
|
|
3
|
+
part 'product_category_save_command.freezed.dart';
|
|
4
|
+
part 'product_category_save_command.g.dart';
|
|
5
|
+
|
|
6
|
+
@freezed
|
|
7
|
+
abstract class with _$ {
|
|
8
|
+
const factory ({
|
|
9
|
+
required int idProductCategory,
|
|
10
|
+
int? idProductCategoryParent,
|
|
11
|
+
String? name,
|
|
12
|
+
}) = _;
|
|
13
|
+
|
|
14
|
+
factory .fromJson(Map<String, dynamic> json) => _$FromJson(json);
|
|
15
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import 'package:freezed_annotation/freezed_annotation.dart';
|
|
2
|
+
import 'package:coqudo_app/autogen/product/models/product_list_nearby_query_filter.dart';
|
|
3
|
+
import 'package:coqudo_app/autogen/product/models/product_list_nearby_query_order_by.dart';
|
|
4
|
+
import 'package:coqudo_app/autogen/service_defaults/models/sort_direction.dart';
|
|
5
|
+
|
|
6
|
+
part 'product_list_nearby_query.freezed.dart';
|
|
7
|
+
part 'product_list_nearby_query.g.dart';
|
|
8
|
+
|
|
9
|
+
@freezed
|
|
10
|
+
abstract class with _$ {
|
|
11
|
+
const factory ({
|
|
12
|
+
ProductListNearbyQueryFilter? filter,
|
|
13
|
+
required int pageNumber,
|
|
14
|
+
required int pageSize,
|
|
15
|
+
required ProductListNearbyQueryOrderBy orderBy,
|
|
16
|
+
SortDirection? sortDirection,
|
|
17
|
+
}) = _;
|
|
18
|
+
|
|
19
|
+
factory .fromJson(Map<String, dynamic> json) => _$FromJson(json);
|
|
20
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import 'package:freezed_annotation/freezed_annotation.dart';
|
|
2
|
+
import 'package:coqudo_app/autogen/product/models/geoposition.dart';
|
|
3
|
+
|
|
4
|
+
part 'product_list_nearby_query_filter.freezed.dart';
|
|
5
|
+
part 'product_list_nearby_query_filter.g.dart';
|
|
6
|
+
|
|
7
|
+
@freezed
|
|
8
|
+
abstract class with _$ {
|
|
9
|
+
const factory ({
|
|
10
|
+
Geoposition? position,
|
|
11
|
+
required int radiusInKm,
|
|
12
|
+
}) = _;
|
|
13
|
+
|
|
14
|
+
factory .fromJson(Map<String, dynamic> json) => _$FromJson(json);
|
|
15
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import 'package:freezed_annotation/freezed_annotation.dart';
|
|
2
|
+
|
|
3
|
+
part 'product_save_command.freezed.dart';
|
|
4
|
+
part 'product_save_command.g.dart';
|
|
5
|
+
|
|
6
|
+
@freezed
|
|
7
|
+
abstract class with _$ {
|
|
8
|
+
const factory ({
|
|
9
|
+
required int myProperty,
|
|
10
|
+
}) = _;
|
|
11
|
+
|
|
12
|
+
factory .fromJson(Map<String, dynamic> json) => _$FromJson(json);
|
|
13
|
+
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import 'package:freezed_annotation/freezed_annotation.dart';
|
|
2
|
-
|
|
3
|
-
part 'application_exception.freezed.dart';
|
|
4
|
-
part 'application_exception.g.dart';
|
|
5
|
-
|
|
6
|
-
@freezed
|
|
7
|
-
abstract class
|
|
8
|
-
const factory
|
|
9
|
-
String? message,
|
|
10
|
-
String? stackTrace,
|
|
11
|
-
}) =
|
|
12
|
-
|
|
13
|
-
factory
|
|
14
|
-
}
|
|
1
|
+
import 'package:freezed_annotation/freezed_annotation.dart';
|
|
2
|
+
|
|
3
|
+
part 'application_exception.freezed.dart';
|
|
4
|
+
part 'application_exception.g.dart';
|
|
5
|
+
|
|
6
|
+
@freezed
|
|
7
|
+
abstract class with _$ {
|
|
8
|
+
const factory ({
|
|
9
|
+
String? message,
|
|
10
|
+
String? stackTrace,
|
|
11
|
+
}) = _;
|
|
12
|
+
|
|
13
|
+
factory .fromJson(Map<String, dynamic> json) => _$FromJson(json);
|
|
14
|
+
}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import 'package:freezed_annotation/freezed_annotation.dart';
|
|
2
|
-
import 'package:coqudo_app/autogen/service_defaults/models/application_exception.dart';
|
|
3
|
-
|
|
4
|
-
part 'result.freezed.dart';
|
|
5
|
-
part 'result.g.dart';
|
|
6
|
-
|
|
7
|
-
@freezed
|
|
8
|
-
abstract class
|
|
9
|
-
const factory
|
|
10
|
-
required bool isSuccess,
|
|
11
|
-
String? message,
|
|
12
|
-
String? stackTrace,
|
|
13
|
-
ApplicationException? exception,
|
|
14
|
-
}) =
|
|
15
|
-
|
|
16
|
-
factory
|
|
17
|
-
}
|
|
1
|
+
import 'package:freezed_annotation/freezed_annotation.dart';
|
|
2
|
+
import 'package:coqudo_app/autogen/service_defaults/models/application_exception.dart';
|
|
3
|
+
|
|
4
|
+
part 'result.freezed.dart';
|
|
5
|
+
part 'result.g.dart';
|
|
6
|
+
|
|
7
|
+
@freezed
|
|
8
|
+
abstract class with _$ {
|
|
9
|
+
const factory ({
|
|
10
|
+
required bool isSuccess,
|
|
11
|
+
String? message,
|
|
12
|
+
String? stackTrace,
|
|
13
|
+
ApplicationException? exception,
|
|
14
|
+
}) = _;
|
|
15
|
+
|
|
16
|
+
factory .fromJson(Map<String, dynamic> json) => _$FromJson(json);
|
|
17
|
+
}
|