Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added missing '@types/uuid-validate' package. #26

Closed
wants to merge 17 commits into from
Closed
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
4f133b6
chore: Updated the DartClient with some enhancements to sync with the…
Mahmoud-Emad May 21, 2024
7d45689
Merge branch 'development' into development_dart_client_v1.0.9
Mahmoud-Emad May 21, 2024
f07212d
Merge branch 'development' into development_dart_client_v1.0.9
Mahmoud-Emad May 22, 2024
9200072
chore: Working on the dart client:
Mahmoud-Emad May 22, 2024
d4dadad
v1.3.4
Mahmoud-Emad May 22, 2024
85bb014
chore: Updated the Auth module with some enhancements:
Mahmoud-Emad May 22, 2024
186cc98
chore: Updated the organization example script with most of the organ…
Mahmoud-Emad May 22, 2024
a9ef277
fix: Fixed an issue with loading project environment, fixed an issue …
Mahmoud-Emad May 22, 2024
63da745
Merge branch 'development' into development_dart_client_v1.0.9
Mahmoud-Emad May 23, 2024
7f99072
chore: Updated the dart client with some missing methods, fixed some …
Mahmoud-Emad May 23, 2024
f57561e
v1.4.1
Mahmoud-Emad May 23, 2024
d86b79a
Merge branch 'development' into development_dart_client_v1.0.9
Mahmoud-Emad May 23, 2024
7874d4c
chore: Working on the dart client:
Mahmoud-Emad May 23, 2024
d6e9514
Merge branch 'development' of https://github.com/Mahmoud-Emad/Switch-…
Mahmoud-Emad May 23, 2024
27791fc
Merge branch 'development' of https://github.com/Mahmoud-Emad/Switch-…
Mahmoud-Emad May 27, 2024
3216c96
Merge branch 'development' into development_dart_client_v1.0.9
Mahmoud-Emad May 27, 2024
5be55ff
chore: Added missing '@types/uuid-validate' package.
Mahmoud-Emad May 27, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions clients/dart/switchkeys/example.dart
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import 'package:switchkeys/examples/auth.dart';
import 'package:switchkeys/examples/organization.dart';
import 'package:switchkeys/examples/projects.dart';
// import 'package:switchkeys/examples/environments.dart';
import 'package:switchkeys/examples/environments.dart';

// import 'package:switchkeys/examples/full_example.dart';

main() async {
await authExample();
await organizationsMain();
await projectsMain();
await environmentsMain();

// environmentsMain();
// switchKeysFullExample();
// switchKeysManagement();
}
12 changes: 11 additions & 1 deletion clients/dart/switchkeys/lib/examples/environments.dart
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@ Future<void> environmentsMain() async {
final SwitchKeys switchkeys = SwitchKeys();

print('\n------------------------------------------------------------------');
print('[+] Running the projects example.');
print('[+] Running the environments example.');
print('------------------------------------------------------------------\n');

// --------------------------------------------------------------------------
@@ -117,6 +117,16 @@ Future<void> environmentsMain() async {
"[+] Feature '${feature.name}' has been updated with new value: '${feature.value}'.",
);

print("[+] Environment features: ${environment.features.toList()}");

await environment.deleteFeature(
featureName: "theme",
);

print(
"[-] Feature '${feature.name}' deleted!",
);

print("[+] Environment features: ${environment.features.toList()}");
// ------------------------------------------------------------------------
// Delete the created organization
4 changes: 1 addition & 3 deletions clients/dart/switchkeys/lib/src/api/models/environments.dart
Original file line number Diff line number Diff line change
@@ -288,9 +288,7 @@ class SwitchKeysEnvironmentServices {
}) async {
String apiUrl = SwitchKeysRoutes.getRoute(
EndPoints.environmentDeleteFeature,
[
__environment.environmentKey.toString(),
],
[__environment.environmentKey.toString(), featureName],
);

try {
2 changes: 1 addition & 1 deletion clients/dart/switchkeys/lib/src/api/response/types.dart
Original file line number Diff line number Diff line change
@@ -161,7 +161,7 @@ class SwitchKeysFeature {
final String name;
final String value;
final String initialValue;
final Bool isDefault;
final bool isDefault;
final String created;
final String modified;

6 changes: 3 additions & 3 deletions clients/dart/switchkeys/lib/src/api/routes.dart
Original file line number Diff line number Diff line change
@@ -82,11 +82,11 @@ abstract class SwitchKeysRoutes {
case EndPoints.environmentsId:
return "${baseUrl}environments/${args![0]}/";
case EndPoints.environmentAddFeature:
return "${baseUrl}environments/${args![0]}/features/";
return "${baseUrl}environments/key/${args![0]}/features/";
case EndPoints.environmentUpdateFeature:
return "${baseUrl}environments/${args![0]}/features/update/${args[1]}/";
return "${baseUrl}environments/key/${args![0]}/features/update/${args[1]}/";
case EndPoints.environmentDeleteFeature:
return "${baseUrl}environments/${args![0]}/features/delete/${args[1]}/";
return "${baseUrl}environments/key/${args![0]}/features/delete/${args[1]}/";

// Projects
case EndPoints.projects:
1 change: 1 addition & 0 deletions clients/typescript/package.json
Original file line number Diff line number Diff line change
@@ -38,6 +38,7 @@
},
"dependencies": {
"@types/node": "^20.12.7",
"@types/uuid-validate": "^0.0.3",
"@typescript-eslint/eslint-plugin": "^7.10.0",
"@typescript-eslint/parser": "^7.10.0",
"axios": "^1.6.8",
5 changes: 5 additions & 0 deletions clients/typescript/yarn.lock
Original file line number Diff line number Diff line change
@@ -81,6 +81,11 @@
dependencies:
undici-types "~5.26.4"

"@types/uuid-validate@^0.0.3":
version "0.0.3"
resolved "https://registry.yarnpkg.com/@types/uuid-validate/-/uuid-validate-0.0.3.tgz#33f95a33ea776606862cc6eea3a8d49ccb90cba6"
integrity sha512-htkuv1+RZjjHkSrXets3a6kqDeqgYutBtdER3U6I1mWV58AIsDFWoUuN0cB6DMOWiqTHK0XqH3pXeqIVfJIrog==

"@typescript-eslint/eslint-plugin@^7.10.0":
version "7.10.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.10.0.tgz#07854a236f107bb45cbf4f62b89474cbea617f50"