Skip to content

Commit

Permalink
Merge pull request #151 from avinyafoundation/main
Browse files Browse the repository at this point in the history
build errors fixed after version update
  • Loading branch information
YujithIsura committed Aug 20, 2024
2 parents 51e56f5 + ce799dc commit 5f76dce
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 41 deletions.
72 changes: 49 additions & 23 deletions api/Dependencies.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

[ballerina]
dependencies-toml-version = "2"
distribution-version = "2201.5.0"
distribution-version = "2201.8.7"

[[package]]
org = "avinyafoundation"
Expand All @@ -29,7 +29,7 @@ modules = [
[[package]]
org = "ballerina"
name = "auth"
version = "2.8.0"
version = "2.10.0"
dependencies = [
{org = "ballerina", name = "crypto"},
{org = "ballerina", name = "jballerina.java"},
Expand All @@ -41,7 +41,7 @@ dependencies = [
[[package]]
org = "ballerina"
name = "cache"
version = "3.5.0"
version = "3.8.0"
dependencies = [
{org = "ballerina", name = "constraint"},
{org = "ballerina", name = "jballerina.java"},
Expand All @@ -52,15 +52,15 @@ dependencies = [
[[package]]
org = "ballerina"
name = "constraint"
version = "1.2.0"
version = "1.5.0"
dependencies = [
{org = "ballerina", name = "jballerina.java"}
]

[[package]]
org = "ballerina"
name = "crypto"
version = "2.3.2"
version = "2.6.3"
dependencies = [
{org = "ballerina", name = "jballerina.java"},
{org = "ballerina", name = "time"}
Expand All @@ -69,7 +69,7 @@ dependencies = [
[[package]]
org = "ballerina"
name = "file"
version = "1.7.1"
version = "1.9.0"
dependencies = [
{org = "ballerina", name = "io"},
{org = "ballerina", name = "jballerina.java"},
Expand All @@ -80,33 +80,38 @@ dependencies = [
[[package]]
org = "ballerina"
name = "graphql"
version = "1.8.1"
version = "1.11.2"
dependencies = [
{org = "ballerina", name = "auth"},
{org = "ballerina", name = "cache"},
{org = "ballerina", name = "crypto"},
{org = "ballerina", name = "file"},
{org = "ballerina", name = "http"},
{org = "ballerina", name = "io"},
{org = "ballerina", name = "jballerina.java"},
{org = "ballerina", name = "jwt"},
{org = "ballerina", name = "lang.array"},
{org = "ballerina", name = "lang.regexp"},
{org = "ballerina", name = "lang.value"},
{org = "ballerina", name = "log"},
{org = "ballerina", name = "mime"},
{org = "ballerina", name = "oauth2"},
{org = "ballerina", name = "task"},
{org = "ballerina", name = "time"},
{org = "ballerina", name = "uuid"},
{org = "ballerina", name = "websocket"}
]
modules = [
{org = "ballerina", packageName = "graphql", moduleName = "graphql"},
{org = "ballerina", packageName = "graphql", moduleName = "graphql.dataloader"},
{org = "ballerina", packageName = "graphql", moduleName = "graphql.parser"},
{org = "ballerina", packageName = "graphql", moduleName = "graphql.subgraph"}
]

[[package]]
org = "ballerina"
name = "http"
version = "2.8.7"
version = "2.10.15"
dependencies = [
{org = "ballerina", name = "auth"},
{org = "ballerina", name = "cache"},
Expand Down Expand Up @@ -134,7 +139,7 @@ dependencies = [
[[package]]
org = "ballerina"
name = "io"
version = "1.4.1"
version = "1.6.1"
dependencies = [
{org = "ballerina", name = "jballerina.java"},
{org = "ballerina", name = "lang.value"}
Expand All @@ -151,7 +156,7 @@ version = "0.0.0"
[[package]]
org = "ballerina"
name = "jwt"
version = "2.8.0"
version = "2.10.0"
dependencies = [
{org = "ballerina", name = "cache"},
{org = "ballerina", name = "crypto"},
Expand Down Expand Up @@ -188,6 +193,15 @@ dependencies = [
{org = "ballerina", name = "jballerina.java"}
]

[[package]]
org = "ballerina"
name = "lang.error"
version = "0.0.0"
scope = "testOnly"
dependencies = [
{org = "ballerina", name = "jballerina.java"}
]

[[package]]
org = "ballerina"
name = "lang.int"
Expand Down Expand Up @@ -239,7 +253,7 @@ dependencies = [
[[package]]
org = "ballerina"
name = "log"
version = "2.7.1"
version = "2.9.0"
dependencies = [
{org = "ballerina", name = "io"},
{org = "ballerina", name = "jballerina.java"},
Expand All @@ -253,7 +267,7 @@ modules = [
[[package]]
org = "ballerina"
name = "mime"
version = "2.7.1"
version = "2.9.0"
dependencies = [
{org = "ballerina", name = "io"},
{org = "ballerina", name = "jballerina.java"},
Expand All @@ -263,7 +277,7 @@ dependencies = [
[[package]]
org = "ballerina"
name = "oauth2"
version = "2.8.0"
version = "2.10.0"
dependencies = [
{org = "ballerina", name = "cache"},
{org = "ballerina", name = "crypto"},
Expand All @@ -276,15 +290,15 @@ dependencies = [
[[package]]
org = "ballerina"
name = "observe"
version = "1.0.7"
version = "1.2.3"
dependencies = [
{org = "ballerina", name = "jballerina.java"}
]

[[package]]
org = "ballerina"
name = "os"
version = "1.6.0"
version = "1.8.0"
dependencies = [
{org = "ballerina", name = "io"},
{org = "ballerina", name = "jballerina.java"}
Expand All @@ -293,7 +307,7 @@ dependencies = [
[[package]]
org = "ballerina"
name = "sql"
version = "1.9.1"
version = "1.12.2"
dependencies = [
{org = "ballerina", name = "io"},
{org = "ballerina", name = "jballerina.java"},
Expand All @@ -307,7 +321,7 @@ modules = [
[[package]]
org = "ballerina"
name = "task"
version = "2.3.2"
version = "2.5.0"
dependencies = [
{org = "ballerina", name = "jballerina.java"},
{org = "ballerina", name = "time"}
Expand All @@ -319,7 +333,8 @@ name = "test"
version = "0.0.0"
scope = "testOnly"
dependencies = [
{org = "ballerina", name = "jballerina.java"}
{org = "ballerina", name = "jballerina.java"},
{org = "ballerina", name = "lang.error"}
]
modules = [
{org = "ballerina", packageName = "test", moduleName = "test"}
Expand All @@ -328,7 +343,7 @@ modules = [
[[package]]
org = "ballerina"
name = "time"
version = "2.2.5"
version = "2.4.0"
dependencies = [
{org = "ballerina", name = "jballerina.java"}
]
Expand All @@ -339,15 +354,26 @@ modules = [
[[package]]
org = "ballerina"
name = "url"
version = "2.2.4"
version = "2.4.0"
dependencies = [
{org = "ballerina", name = "jballerina.java"}
]

[[package]]
org = "ballerina"
name = "uuid"
version = "1.7.0"
dependencies = [
{org = "ballerina", name = "crypto"},
{org = "ballerina", name = "jballerina.java"},
{org = "ballerina", name = "lang.int"},
{org = "ballerina", name = "time"}
]

[[package]]
org = "ballerina"
name = "websocket"
version = "2.8.2"
version = "2.10.2"
dependencies = [
{org = "ballerina", name = "auth"},
{org = "ballerina", name = "constraint"},
Expand Down Expand Up @@ -379,7 +405,7 @@ modules = [
[[package]]
org = "ballerinax"
name = "mysql"
version = "1.9.0"
version = "1.11.0"
dependencies = [
{org = "ballerina", name = "crypto"},
{org = "ballerina", name = "io"},
Expand All @@ -394,7 +420,7 @@ modules = [
[[package]]
org = "ballerinax"
name = "mysql.driver"
version = "1.4.1"
version = "1.6.0"
modules = [
{org = "ballerinax", packageName = "mysql.driver", moduleName = "mysql.driver"}
]
Expand Down
18 changes: 9 additions & 9 deletions api/main.bal
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import ballerina/time;
// label: "Global Data API",
// id: "global-data"
// }
service graphql:Service /graphql on new graphql:Listener(4000) {
service /graphql on new graphql:Listener(4000) {
resource function get geo() returns GeoData {
return new ();
}
Expand Down Expand Up @@ -1574,7 +1574,7 @@ service graphql:Service /graphql on new graphql:Listener(4000) {
return attendnaceDatas;
}

isolated resource function get person_attendance_report(int? person_id, int? activity_id, int? result_limit = -1) returns ActivityParticipantAttendanceData[]|error? {
isolated resource function get person_attendance_report(int? person_id, int? activity_id, int? result_limit = 0) returns ActivityParticipantAttendanceData[]|error? {
stream<ActivityParticipantAttendance, error?> attendance_records;

if (result_limit > 0) {
Expand Down Expand Up @@ -1613,7 +1613,7 @@ service graphql:Service /graphql on new graphql:Listener(4000) {
return attendnaceDatas;
}

isolated resource function get class_attendance_report(int? organization_id, int? parent_organization_id, int? activity_id, int? result_limit = -1, string? from_date = null, string? to_date = null) returns ActivityParticipantAttendanceData[]|error? {
isolated resource function get class_attendance_report(int? organization_id, int? parent_organization_id, int? activity_id, int? result_limit = 0, string? from_date = "", string? to_date = "") returns ActivityParticipantAttendanceData[]|error? {
stream<ActivityParticipantAttendance, error?> attendance_records;

time:Utc startTime = time:utcNow();
Expand Down Expand Up @@ -1715,7 +1715,7 @@ service graphql:Service /graphql on new graphql:Listener(4000) {
return attendnaceDatas;
}

isolated resource function get late_attendance_report(int? organization_id, int? parent_organization_id, int? activity_id, int? result_limit = -1, string? from_date = null, string? to_date = null) returns ActivityParticipantAttendanceDataForLateAttendance[]|error? {
isolated resource function get late_attendance_report(int? organization_id, int? parent_organization_id, int? activity_id, int? result_limit = 0, string? from_date = "", string? to_date = "") returns ActivityParticipantAttendanceDataForLateAttendance[]|error? {
stream<ActivityParticipantAttendanceForLateAttendance, error?> attendance_records;

time:Utc startTime = time:utcNow();
Expand Down Expand Up @@ -3701,7 +3701,7 @@ WHERE name = "Admission Cycle" AND NOW() BETWEEN start_time AND end_time;`
return new (insert_id);
}

isolated resource function get attendance_dashboard_data_by_date(int? organization_id, int? parent_organization_id, int? activity_id, string? from_date = null, string? to_date = null) returns AttendanceDashboardDataMain[]|error? {
isolated resource function get attendance_dashboard_data_by_date(int? organization_id, int? parent_organization_id, int? activity_id, string? from_date = "", string? to_date = "") returns AttendanceDashboardDataMain[]|error? {
stream<AttendanceDashboardDataForQuery, error?> present_count;
stream<AttendanceDashboardDataForQuery, error?> absent_count;
stream<AttendanceDashboardDataForQuery, error?> late_attendance;
Expand Down Expand Up @@ -4241,7 +4241,7 @@ AND p.organization_id IN (
return dashboardDatas;
}

isolated resource function get attendance_missed_by_security(int? organization_id, int? parent_organization_id, string? from_date = null, string? to_date = null) returns ActivityParticipantAttendanceMissedBySecurityData[]|error? {
isolated resource function get attendance_missed_by_security(int? organization_id, int? parent_organization_id, string? from_date = "", string? to_date = "") returns ActivityParticipantAttendanceMissedBySecurityData[]|error? {

stream<ActivityParticipantAttendanceMissedBySecurity, error?> attendance_missed_by_security_records;

Expand Down Expand Up @@ -4461,7 +4461,7 @@ AND p.organization_id IN (
}
}

isolated resource function get total_attendance_count_by_date(int? organization_id, int? parent_organization_id, string? from_date = null, string? to_date = null) returns TotalActivityParticipantAttendanceCountByDateData[]|error? {
isolated resource function get total_attendance_count_by_date(int? organization_id, int? parent_organization_id, string? from_date = "", string? to_date = "") returns TotalActivityParticipantAttendanceCountByDateData[]|error? {

stream<TotalActivityParticipantAttendanceCountByDate, error?> total_attendance_count_by_date_records;

Expand Down Expand Up @@ -4581,7 +4581,7 @@ AND p.organization_id IN (
}
}

isolated resource function get daily_attendance_summary_report(int? organization_id, int? avinya_type_id, string? from_date = null, string? to_date = null) returns DailyActivityParticipantAttendanceSummaryReportData[]|error? {
isolated resource function get daily_attendance_summary_report(int? organization_id, int? avinya_type_id, string? from_date = "", string? to_date = "") returns DailyActivityParticipantAttendanceSummaryReportData[]|error? {

stream<ActivityParticipantAttendanceSummaryReport, error?> daily_attendance_summary_report_records;

Expand Down Expand Up @@ -4695,7 +4695,7 @@ AND p.organization_id IN (
}
}

isolated resource function get inventory_data_by_organization(int? organization_id, string? date = null) returns InventoryData[]|error? {
isolated resource function get inventory_data_by_organization(int? organization_id, string? date = "") returns InventoryData[]|error? {

stream<Inventory, error?> inventory_data;

Expand Down
18 changes: 9 additions & 9 deletions api/tests/geo_data.bal
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ graphql:Client test_client = check new ("http://localhost:4000/graphql");
@test:Config {}
public function testGetProvince() {
// Attempt to get geo information for Dehiwala
json|error? a = test_client->executeWithType(string `
json|error? a = test_client->execute(string `
query test($name:String!) {
geo {
city(name: $name) {
Expand All @@ -25,17 +25,17 @@ public function testGetProvince() {
// Verify output
test:assertEquals(a,
{
"data": {
"geo": {
"city": {
"name": {"name_en": "Dehiwala"},
"district": {
"name": {"name_en": "Colombo"},
"province": {"name": {"name_en": "Western"}}
}
"data": {
"geo": {
"city": {
"name": {"name_en": "Dehiwala"},
"district": {
"name": {"name_en": "Colombo"},
"province": {"name": {"name_en": "Western"}}
}
}
}
}
}
);
}

0 comments on commit 5f76dce

Please sign in to comment.