diff --git a/.github/workflows/main_avinyawebapp-production.yml b/.github/workflows/main_avinyawebapp-production.yml index a74c3f4..23ab40b 100644 --- a/.github/workflows/main_avinyawebapp-production.yml +++ b/.github/workflows/main_avinyawebapp-production.yml @@ -62,7 +62,7 @@ jobs: npm run test --if-present - name: Upload artifact for node app - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: node-app path: campus/deployment/node-app diff --git a/campus/bffs/enrollment/api/client.bal b/campus/bffs/enrollment/api/client.bal index 74f26eb..16d5c3b 100644 --- a/campus/bffs/enrollment/api/client.bal +++ b/campus/bffs/enrollment/api/client.bal @@ -29,22 +29,20 @@ public isolated client class GraphqlClient { } remote isolated function getPersons(int organization_id, int avinya_type_id) returns GetPersonsResponse|graphql:ClientError { - string query = string `query getPersons($organization_id:Int!,$avinya_type_id:Int!) {persons(organization_id:$organization_id,avinya_type_id:$avinya_type_id) {id preferred_name full_name date_of_birth sex asgardeo_id jwt_sub_id created updated jwt_email permanent_address {city {id name {name_en name_si name_ta}} street_address phone id} mailing_address {city {id name {name_en name_si name_ta}} street_address phone id} phone organization {id description notes address {id} avinya_type {id name} name {name_en}} avinya_type {id name} notes nic_no passport_no id_no email street_address digital_id avinya_phone bank_name bank_account_number bank_account_name academy_org_id bank_branch}}`; + string query = string `query getPersons($organization_id:Int!,$avinya_type_id:Int!) {persons(organization_id:$organization_id,avinya_type_id:$avinya_type_id) {id preferred_name full_name date_of_birth sex asgardeo_id jwt_sub_id created updated jwt_email permanent_address {city {id name {name_en name_si name_ta}} street_address phone id} mailing_address {city {id name {name_en name_si name_ta}} street_address phone id} phone organization {id description notes address {id} avinya_type {id name} name {name_en} parent_organizations {id name {name_en}}} avinya_type {id name} notes nic_no passport_no id_no email street_address digital_id avinya_phone bank_name bank_account_number bank_account_name academy_org_id bank_branch}}`; map variables = {"organization_id": organization_id, "avinya_type_id": avinya_type_id}; json graphqlResponse = check self.graphqlClient->executeWithType(query, variables); return check performDataBinding(graphqlResponse, GetPersonsResponse); } - remote isolated function getPersonById(int id) returns GetPersonByIdResponse|graphql:ClientError { - string query = string `query getPersonById($id:Int!) {person_by_id(id:$id) {id preferred_name full_name date_of_birth sex asgardeo_id jwt_sub_id created updated jwt_email permanent_address {city {id name {name_en name_si name_ta}} street_address phone id} mailing_address {city {id name {name_en name_si name_ta}} street_address phone id} phone organization {id description notes address {id} avinya_type {id name} name {name_en}} avinya_type {id name} notes nic_no passport_no id_no email street_address digital_id avinya_phone bank_name bank_account_number bank_account_name academy_org_id bank_branch}}`; + string query = string `query getPersonById($id:Int!) {person_by_id(id:$id) {id preferred_name full_name date_of_birth sex asgardeo_id jwt_sub_id created updated jwt_email permanent_address {city {id name {name_en name_si name_ta}} street_address phone id} mailing_address {city {id name {name_en name_si name_ta}} street_address phone id} phone organization {id description notes address {id} avinya_type {id name} name {name_en} parent_organizations {id name {name_en}}} avinya_type {id name} notes nic_no passport_no id_no email street_address digital_id avinya_phone bank_name bank_account_number bank_account_name academy_org_id bank_branch}}`; map variables = {"id": id}; json graphqlResponse = check self.graphqlClient->executeWithType(query, variables); return check performDataBinding(graphqlResponse, GetPersonByIdResponse); } - - remote isolated function updatePerson(Address mailing_address, Person person, Address permanent_address) returns UpdatePersonResponse|graphql:ClientError { - string query = string `mutation updatePerson($person:Person!,$permanent_address:Address!,$mailing_address:Address!) {update_person(person:$person,permanent_address:$permanent_address,mailing_address:$mailing_address) {id preferred_name full_name date_of_birth sex asgardeo_id jwt_sub_id created updated jwt_email permanent_address {city {id name {name_en name_si name_ta}} street_address phone id} mailing_address {city {id name {name_en name_si name_ta}} street_address phone id} phone organization {id description notes address {id} avinya_type {id name} name {name_en}} avinya_type {id name} notes nic_no passport_no id_no email street_address digital_id avinya_phone bank_name bank_account_number bank_account_name academy_org_id bank_branch}}`; - map variables = {"mailing_address": mailing_address, "person": person, "permanent_address": permanent_address}; + remote isolated function updatePerson(City permanent_address_city, Address mailing_address, Person person, Address permanent_address, City mailing_address_city) returns UpdatePersonResponse|graphql:ClientError { + string query = string `mutation updatePerson($person:Person!,$permanent_address:Address!,$permanent_address_city:City!,$mailing_address:Address!,$mailing_address_city:City!) {update_person(person:$person,permanent_address:$permanent_address,permanent_address_city:$permanent_address_city,mailing_address:$mailing_address,mailing_address_city:$mailing_address_city) {id preferred_name full_name date_of_birth sex asgardeo_id jwt_sub_id created updated jwt_email permanent_address {city {id name {name_en name_si name_ta}} street_address phone id} mailing_address {city {id name {name_en name_si name_ta}} street_address phone id} phone organization {id description notes address {id} avinya_type {id name} name {name_en} parent_organizations {id name {name_en}}} avinya_type {id name} notes nic_no passport_no id_no email street_address digital_id avinya_phone bank_name bank_account_number bank_account_name academy_org_id bank_branch}}`; + map variables = {"permanent_address_city": permanent_address_city, "mailing_address": mailing_address, "person": person, "permanent_address": permanent_address, "mailing_address_city": mailing_address_city}; json graphqlResponse = check self.graphqlClient->executeWithType(query, variables); return check performDataBinding(graphqlResponse, UpdatePersonResponse); } diff --git a/campus/bffs/enrollment/api/service.bal b/campus/bffs/enrollment/api/service.bal index 0578b9f..318abff 100644 --- a/campus/bffs/enrollment/api/service.bal +++ b/campus/bffs/enrollment/api/service.bal @@ -128,14 +128,19 @@ service / on new http:Listener(9095) { Address permanent_address =
person?.permanent_address; Address mailing_address =
person?.mailing_address; + City permanent_address_city = permanent_address?.city; + City mailing_address_city = mailing_address?.city; + anydata remove_permanent_address_city = permanent_address.remove("city"); + anydata remove_mailing_address_city = mailing_address.remove("city"); anydata remove_permanent_address = person.remove("permanent_address"); anydata remove_mailing_address = person.remove("mailing_address"); - log:printDebug(remove_permanent_address.toString()); log:printDebug(remove_mailing_address.toString()); + log:printDebug(remove_permanent_address_city.toString()); + log:printDebug(remove_mailing_address_city.toString()); - UpdatePersonResponse|graphql:ClientError updatePersonResponse = globalDataClient->updatePerson(mailing_address,person,permanent_address); + UpdatePersonResponse|graphql:ClientError updatePersonResponse = globalDataClient->updatePerson(permanent_address_city,mailing_address,person,permanent_address,mailing_address_city); if (updatePersonResponse is UpdatePersonResponse) { Person|error person_record = updatePersonResponse.update_person.cloneWithType(Person); if (person_record is Person) { diff --git a/campus/bffs/enrollment/api/types.bal b/campus/bffs/enrollment/api/types.bal index e0a5307..8e6ea92 100644 --- a/campus/bffs/enrollment/api/types.bal +++ b/campus/bffs/enrollment/api/types.bal @@ -1,11 +1,11 @@ public type Address record { - string street_address?; + string? street_address?; string? name_ta?; int? phone?; string? name_si?; int? id?; string? record_type?; - int city_id?; + int? city_id?; string name_en?; City? city?; }; @@ -32,7 +32,7 @@ public type Organization record { int? avinya_type_id?; int? id?; string? record_type?; - string name_en?; + string? name_en?; string? description?; string? notes?; Address? address?; @@ -55,15 +55,15 @@ public type City record { int? id?; District? district?; int district_id?; - string name_en?; + string? name_en?; string? name_ta?; string? name_si?; string? suburb_name_en?; string? suburb_name_ta?; string? suburb_name_si?; string? postcode?; - decimal latitude?; - decimal longitude?; + anydata? latitude?; + anydata? longitude?; }; public type Province record { @@ -129,12 +129,12 @@ public type GetPersonsResponse record {| record {| int? id; record {| - string name_en; + string? name_en; string? name_si; string? name_ta; |} name; |} city; - string street_address; + string? street_address; int? phone; int? id; |}? permanent_address; @@ -142,12 +142,12 @@ public type GetPersonsResponse record {| record {| int? id; record {| - string name_en; + string? name_en; string? name_si; string? name_ta; |} name; |} city; - string street_address; + string? street_address; int? phone; int? id; |}? mailing_address; @@ -164,8 +164,14 @@ public type GetPersonsResponse record {| string? name; |}? avinya_type; record {| - string name_en; + string? name_en; |} name; + record {| + int? id; + record {| + string? name_en; + |} name; + |}[]? parent_organizations; |}? organization; record {| int? id; @@ -204,12 +210,12 @@ public type GetPersonByIdResponse record {| record {| int? id; record {| - string name_en; + string? name_en; string? name_si; string? name_ta; |} name; |} city; - string street_address; + string? street_address; int? phone; int? id; |}? permanent_address; @@ -217,12 +223,12 @@ public type GetPersonByIdResponse record {| record {| int? id; record {| - string name_en; + string? name_en; string? name_si; string? name_ta; |} name; |} city; - string street_address; + string? street_address; int? phone; int? id; |}? mailing_address; @@ -239,8 +245,14 @@ public type GetPersonByIdResponse record {| string? name; |}? avinya_type; record {| - string name_en; + string? name_en; |} name; + record {| + int? id; + record {| + string? name_en; + |} name; + |}[]? parent_organizations; |}? organization; record {| int? id; @@ -279,12 +291,12 @@ public type UpdatePersonResponse record {| record {| int? id; record {| - string name_en; + string? name_en; string? name_si; string? name_ta; |} name; |} city; - string street_address; + string? street_address; int? phone; int? id; |}? permanent_address; @@ -292,12 +304,12 @@ public type UpdatePersonResponse record {| record {| int? id; record {| - string name_en; + string? name_en; string? name_si; string? name_ta; |} name; |} city; - string street_address; + string? street_address; int? phone; int? id; |}? mailing_address; @@ -314,8 +326,14 @@ public type UpdatePersonResponse record {| string? name; |}? avinya_type; record {| - string name_en; + string? name_en; |} name; + record {| + int? id; + record {| + string? name_en; + |} name; + |}[]? parent_organizations; |}? organization; record {| int? id; @@ -344,31 +362,44 @@ public type GetDistrictsResponse record {| record {| int? id; record {| - string name_en; + string? name_en; |} name; |} province; record {| - string name_en; + string? name_en; |} name; record {| int? id; record {| - string name_en; + string? name_en; |} name; |}[] cities; |}[] districts; |}; +public type GetAvinyaTypesResponse record {| + map __extensions?; + record {| + int? id; + boolean active; + string? name; + string global_type; + string? foundation_type; + string? focus; + int? level; + |}[] avinya_types; +|}; + public type GetAllOrganizationsResponse record {| map __extensions?; record {| int? id; record {| - string name_en; + string? name_en; |} name; record {| int? id; - string street_address; + string? street_address; |}? address; record {| int? id; diff --git a/campus/bffs/enrollment/graphql_client/enrollment.graphql b/campus/bffs/enrollment/graphql_client/enrollment.graphql index 0977633..9319678 100644 --- a/campus/bffs/enrollment/graphql_client/enrollment.graphql +++ b/campus/bffs/enrollment/graphql_client/enrollment.graphql @@ -1,225 +1,245 @@ -query getPersons($organization_id: Int!,$avinya_type_id: Int!) { - persons(organization_id: $organization_id,avinya_type_id: $avinya_type_id) { +query getPersons($organization_id: Int!, $avinya_type_id: Int!) { + persons(organization_id: $organization_id, avinya_type_id: $avinya_type_id) { + id + preferred_name + full_name + date_of_birth + sex + asgardeo_id + jwt_sub_id + created + updated + jwt_email + permanent_address { + city { id - preferred_name - full_name - date_of_birth - sex - asgardeo_id - jwt_sub_id - created - updated - jwt_email - permanent_address { - city { - id - name { - name_en - name_si - name_ta - } - } - street_address - phone - id - } - mailing_address { - city { - id - name { - name_en - name_si - name_ta - } - } - street_address - phone - id - } - phone - organization { + name { + name_en + name_si + name_ta + } + } + street_address + phone + id + } + mailing_address { + city { id - description - notes - address { - id - } - avinya_type { - id - name - } name { - name_en - } - } - avinya_type { + name_en + name_si + name_ta + } + } + street_address + phone + id + } + phone + organization { + id + description + notes + address { + id + } + avinya_type { id name + } + name { + name_en + } + parent_organizations { + id + name { + name_en } - notes - nic_no - passport_no - id_no - email - street_address - digital_id - avinya_phone - bank_name - bank_account_number - bank_account_name - academy_org_id - bank_branch + } + } + avinya_type { + id + name } + notes + nic_no + passport_no + id_no + email + street_address + digital_id + avinya_phone + bank_name + bank_account_number + bank_account_name + academy_org_id + bank_branch + } } query getPersonById($id: Int!) { - person_by_id(id: $id) { - id - preferred_name - full_name - date_of_birth - sex - asgardeo_id - jwt_sub_id - created - updated - jwt_email - permanent_address { - city { - id - name { - name_en - name_si - name_ta - } - } - street_address - phone + person_by_id(id: $id) { + id + preferred_name + full_name + date_of_birth + sex + asgardeo_id + jwt_sub_id + created + updated + jwt_email + permanent_address { + city { id - } - mailing_address { - city { - id - name { - name_en - name_si - name_ta - } - } - street_address - phone - id - } - phone - organization { + name { + name_en + name_si + name_ta + } + } + street_address + phone + id + } + mailing_address { + city { id - description - notes - address { - id - } - avinya_type { - id - name - } name { - name_en - } - } - avinya_type { + name_en + name_si + name_ta + } + } + street_address + phone + id + } + phone + organization { + id + description + notes + address { + id + } + avinya_type { id name + } + name { + name_en + } + parent_organizations { + id + name { + name_en } - notes - nic_no - passport_no - id_no - email - street_address - digital_id - avinya_phone - bank_name - bank_account_number - bank_account_name - academy_org_id - bank_branch + } + } + avinya_type { + id + name } + notes + nic_no + passport_no + id_no + email + street_address + digital_id + avinya_phone + bank_name + bank_account_number + bank_account_name + academy_org_id + bank_branch + } } -mutation updatePerson($person: Person!,$permanent_address:Address!,$mailing_address:Address!) { - update_person(person:$person,permanent_address:$permanent_address,mailing_address :$mailing_address) { +mutation updatePerson($person: Person!,$permanent_address: Address!,$permanent_address_city: City!,$mailing_address: Address!,$mailing_address_city: City!) { + update_person(person: $person,permanent_address: $permanent_address,permanent_address_city: $permanent_address_city, + mailing_address: $mailing_address,mailing_address_city: $mailing_address_city) { + id + preferred_name + full_name + date_of_birth + sex + asgardeo_id + jwt_sub_id + created + updated + jwt_email + permanent_address { + city { id - preferred_name - full_name - date_of_birth - sex - asgardeo_id - jwt_sub_id - created - updated - jwt_email - permanent_address { - city { - id - name { - name_en - name_si - name_ta - } - } - street_address - phone - id - } - mailing_address { - city { - id - name { - name_en - name_si - name_ta - } - } - street_address - phone + name { + name_en + name_si + name_ta + } + } + street_address + phone + id + } + mailing_address { + city { id - } - phone - organization { + name { + name_en + name_si + name_ta + } + } + street_address + phone + id + } + phone + organization { + id + description + notes + address { id - description - notes - address{ - id - } - avinya_type{ - id - name - } - name{ - name_en - } - } - avinya_type { + } + avinya_type { id name + } + name { + name_en + } + parent_organizations { + id + name { + name_en } - notes - nic_no - passport_no - id_no - email - street_address - digital_id - avinya_phone - bank_name - bank_account_number - bank_account_name - academy_org_id - bank_branch + } + } + avinya_type { + id + name } + notes + nic_no + passport_no + id_no + email + street_address + digital_id + avinya_phone + bank_name + bank_account_number + bank_account_name + academy_org_id + bank_branch + } } + query getDistricts { districts { id diff --git a/campus/bffs/enrollment/graphql_client/graphql_client_cg_src/client.bal b/campus/bffs/enrollment/graphql_client/graphql_client_cg_src/client.bal index 95631d9..0da245c 100644 --- a/campus/bffs/enrollment/graphql_client/graphql_client_cg_src/client.bal +++ b/campus/bffs/enrollment/graphql_client/graphql_client_cg_src/client.bal @@ -28,20 +28,20 @@ public isolated client class GraphqlClient { self.graphqlClient = clientEp; } remote isolated function getPersons(int organization_id, int avinya_type_id) returns GetPersonsResponse|graphql:ClientError { - string query = string `query getPersons($organization_id:Int!,$avinya_type_id:Int!) {persons(organization_id:$organization_id,avinya_type_id:$avinya_type_id) {id preferred_name full_name date_of_birth sex asgardeo_id jwt_sub_id created updated jwt_email permanent_address {city {id name {name_en name_si name_ta}} street_address phone id} mailing_address {city {id name {name_en name_si name_ta}} street_address phone id} phone organization {id description notes address {id} avinya_type {id name} name {name_en}} avinya_type {id name} notes nic_no passport_no id_no email street_address digital_id avinya_phone bank_name bank_account_number bank_account_name academy_org_id bank_branch}}`; + string query = string `query getPersons($organization_id:Int!,$avinya_type_id:Int!) {persons(organization_id:$organization_id,avinya_type_id:$avinya_type_id) {id preferred_name full_name date_of_birth sex asgardeo_id jwt_sub_id created updated jwt_email permanent_address {city {id name {name_en name_si name_ta}} street_address phone id} mailing_address {city {id name {name_en name_si name_ta}} street_address phone id} phone organization {id description notes address {id} avinya_type {id name} name {name_en} parent_organizations {id name {name_en}}} avinya_type {id name} notes nic_no passport_no id_no email street_address digital_id avinya_phone bank_name bank_account_number bank_account_name academy_org_id bank_branch}}`; map variables = {"organization_id": organization_id, "avinya_type_id": avinya_type_id}; json graphqlResponse = check self.graphqlClient->executeWithType(query, variables); return check performDataBinding(graphqlResponse, GetPersonsResponse); } remote isolated function getPersonById(int id) returns GetPersonByIdResponse|graphql:ClientError { - string query = string `query getPersonById($id:Int!) {person_by_id(id:$id) {id preferred_name full_name date_of_birth sex asgardeo_id jwt_sub_id created updated jwt_email permanent_address {city {id name {name_en name_si name_ta}} street_address phone id} mailing_address {city {id name {name_en name_si name_ta}} street_address phone id} phone organization {id description notes address {id} avinya_type {id name} name {name_en}} avinya_type {id name} notes nic_no passport_no id_no email street_address digital_id avinya_phone bank_name bank_account_number bank_account_name academy_org_id bank_branch}}`; + string query = string `query getPersonById($id:Int!) {person_by_id(id:$id) {id preferred_name full_name date_of_birth sex asgardeo_id jwt_sub_id created updated jwt_email permanent_address {city {id name {name_en name_si name_ta}} street_address phone id} mailing_address {city {id name {name_en name_si name_ta}} street_address phone id} phone organization {id description notes address {id} avinya_type {id name} name {name_en} parent_organizations {id name {name_en}}} avinya_type {id name} notes nic_no passport_no id_no email street_address digital_id avinya_phone bank_name bank_account_number bank_account_name academy_org_id bank_branch}}`; map variables = {"id": id}; json graphqlResponse = check self.graphqlClient->executeWithType(query, variables); return check performDataBinding(graphqlResponse, GetPersonByIdResponse); } - remote isolated function updatePerson(Address mailing_address, Person person, Address permanent_address) returns UpdatePersonResponse|graphql:ClientError { - string query = string `mutation updatePerson($person:Person!,$permanent_address:Address!,$mailing_address:Address!) {update_person(person:$person,permanent_address:$permanent_address,mailing_address:$mailing_address) {id preferred_name full_name date_of_birth sex asgardeo_id jwt_sub_id created updated jwt_email permanent_address {city {id name {name_en name_si name_ta}} street_address phone id} mailing_address {city {id name {name_en name_si name_ta}} street_address phone id} phone organization {id description notes address {id} avinya_type {id name} name {name_en}} avinya_type {id name} notes nic_no passport_no id_no email street_address digital_id avinya_phone bank_name bank_account_number bank_account_name academy_org_id bank_branch}}`; - map variables = {"mailing_address": mailing_address, "person": person, "permanent_address": permanent_address}; + remote isolated function updatePerson(City permanent_address_city, Address mailing_address, Person person, Address permanent_address, City mailing_address_city) returns UpdatePersonResponse|graphql:ClientError { + string query = string `mutation updatePerson($person:Person!,$permanent_address:Address!,$permanent_address_city:City!,$mailing_address:Address!,$mailing_address_city:City!) {update_person(person:$person,permanent_address:$permanent_address,permanent_address_city:$permanent_address_city,mailing_address:$mailing_address,mailing_address_city:$mailing_address_city) {id preferred_name full_name date_of_birth sex asgardeo_id jwt_sub_id created updated jwt_email permanent_address {city {id name {name_en name_si name_ta}} street_address phone id} mailing_address {city {id name {name_en name_si name_ta}} street_address phone id} phone organization {id description notes address {id} avinya_type {id name} name {name_en} parent_organizations {id name {name_en}}} avinya_type {id name} notes nic_no passport_no id_no email street_address digital_id avinya_phone bank_name bank_account_number bank_account_name academy_org_id bank_branch}}`; + map variables = {"permanent_address_city": permanent_address_city, "mailing_address": mailing_address, "person": person, "permanent_address": permanent_address, "mailing_address_city": mailing_address_city}; json graphqlResponse = check self.graphqlClient->executeWithType(query, variables); return check performDataBinding(graphqlResponse, UpdatePersonResponse); } diff --git a/campus/bffs/enrollment/graphql_client/graphql_client_cg_src/types.bal b/campus/bffs/enrollment/graphql_client/graphql_client_cg_src/types.bal index 7298761..9627c2c 100644 --- a/campus/bffs/enrollment/graphql_client/graphql_client_cg_src/types.bal +++ b/campus/bffs/enrollment/graphql_client/graphql_client_cg_src/types.bal @@ -69,12 +69,12 @@ public type ActivitySequencePlan record { }; public type Address record { - string street_address?; + string? street_address?; int? phone?; City? city?; int? id?; string? record_type?; - int city_id?; + int? city_id?; }; public type ApplicantConsent record { @@ -140,14 +140,14 @@ public type City record { string? suburb_name_si?; string? name_ta?; string? suburb_name_ta?; - anydata latitude?; + anydata? latitude?; string? postcode?; string? name_si?; int? id?; int? district_id?; string? record_type?; - string name_en?; - anydata longitude?; + string? name_en?; + anydata? longitude?; }; public type Consumable record { @@ -287,7 +287,7 @@ public type Organization record { int[]? parent_organizations?; int? phone?; int? id?; - string name_en?; + string? name_en?; }; public type Person record { @@ -443,12 +443,12 @@ public type GetPersonsResponse record {| record {| int? id; record {| - string name_en; + string? name_en; string? name_si; string? name_ta; |} name; |} city; - string street_address; + string? street_address; int? phone; int? id; |}? permanent_address; @@ -456,12 +456,12 @@ public type GetPersonsResponse record {| record {| int? id; record {| - string name_en; + string? name_en; string? name_si; string? name_ta; |} name; |} city; - string street_address; + string? street_address; int? phone; int? id; |}? mailing_address; @@ -478,8 +478,14 @@ public type GetPersonsResponse record {| string? name; |}? avinya_type; record {| - string name_en; + string? name_en; |} name; + record {| + int? id; + record {| + string? name_en; + |} name; + |}[]? parent_organizations; |}? organization; record {| int? id; @@ -518,12 +524,12 @@ public type GetPersonByIdResponse record {| record {| int? id; record {| - string name_en; + string? name_en; string? name_si; string? name_ta; |} name; |} city; - string street_address; + string? street_address; int? phone; int? id; |}? permanent_address; @@ -531,12 +537,12 @@ public type GetPersonByIdResponse record {| record {| int? id; record {| - string name_en; + string? name_en; string? name_si; string? name_ta; |} name; |} city; - string street_address; + string? street_address; int? phone; int? id; |}? mailing_address; @@ -553,8 +559,14 @@ public type GetPersonByIdResponse record {| string? name; |}? avinya_type; record {| - string name_en; + string? name_en; |} name; + record {| + int? id; + record {| + string? name_en; + |} name; + |}[]? parent_organizations; |}? organization; record {| int? id; @@ -593,12 +605,12 @@ public type UpdatePersonResponse record {| record {| int? id; record {| - string name_en; + string? name_en; string? name_si; string? name_ta; |} name; |} city; - string street_address; + string? street_address; int? phone; int? id; |}? permanent_address; @@ -606,12 +618,12 @@ public type UpdatePersonResponse record {| record {| int? id; record {| - string name_en; + string? name_en; string? name_si; string? name_ta; |} name; |} city; - string street_address; + string? street_address; int? phone; int? id; |}? mailing_address; @@ -628,8 +640,14 @@ public type UpdatePersonResponse record {| string? name; |}? avinya_type; record {| - string name_en; + string? name_en; |} name; + record {| + int? id; + record {| + string? name_en; + |} name; + |}[]? parent_organizations; |}? organization; record {| int? id; @@ -658,16 +676,16 @@ public type GetDistrictsResponse record {| record {| int? id; record {| - string name_en; + string? name_en; |} name; |} province; record {| - string name_en; + string? name_en; |} name; record {| int? id; record {| - string name_en; + string? name_en; |} name; |}[] cities; |}[]? districts; @@ -691,11 +709,11 @@ public type GetAllOrganizationsResponse record {| record {| int? id; record {| - string name_en; + string? name_en; |} name; record {| int? id; - string street_address; + string? street_address; |}? address; record {| int? id; diff --git a/campus/bffs/enrollment/graphql_client/schema.graphql b/campus/bffs/enrollment/graphql_client/schema.graphql index 82596b8..06786dd 100644 --- a/campus/bffs/enrollment/graphql_client/schema.graphql +++ b/campus/bffs/enrollment/graphql_client/schema.graphql @@ -163,15 +163,15 @@ type ActivitySequencePlanData { input Address { record_type: String = "address" id: Int - street_address: String! + street_address: String phone: Int - city_id: Int! + city_id: Int city: City } type AddressData { city: CityData! - street_address: String! + street_address: String phone: Int id: Int } @@ -318,11 +318,11 @@ input City { suburb_name_ta: String suburb_name_si: String postcode: String - name_en: String! + name_en: String name_ta: String name_si: String - latitude: Decimal! - longitude: Decimal! + latitude: Decimal + longitude: Decimal } type CityData { @@ -602,7 +602,7 @@ type InventoryData { } type LocalizedName { - name_en: String! + name_en: String name_ta: String name_si: String } @@ -665,7 +665,7 @@ type Mutation { consumable_depletion(person_id: Int!, organization_id: Int!, date: String!, inventories: [Inventory!]!): [InventoryData!] update_consumable_replenishment(inventories: [Inventory!]!): [InventoryData!] update_consumable_depletion(inventories: [Inventory!]!): [InventoryData!] - update_person(person: Person!, permanent_address: Address, mailing_address: Address): PersonData + update_person(person: Person!, permanent_address: Address, permanent_address_city: City, mailing_address: Address, mailing_address_city: City): PersonData } input Organization { @@ -679,7 +679,7 @@ input Organization { phone: Int description: String notes: String - name_en: String! + name_en: String name_ta: String name_si: String } diff --git a/campus/bffs/enrollment/graphql_client/schema.json b/campus/bffs/enrollment/graphql_client/schema.json index 5423368..eb62c48 100644 --- a/campus/bffs/enrollment/graphql_client/schema.json +++ b/campus/bffs/enrollment/graphql_client/schema.json @@ -3106,13 +3106,9 @@ { "name": "street_address", "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } + "kind": "SCALAR", + "name": "String", + "ofType": null }, "defaultValue": null }, @@ -3128,13 +3124,9 @@ { "name": "city_id", "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - } + "kind": "SCALAR", + "name": "Int", + "ofType": null }, "defaultValue": null }, @@ -5891,13 +5883,9 @@ "name": "name_en", "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } + "kind": "SCALAR", + "name": "String", + "ofType": null }, "isDeprecated": false, "deprecationReason": null @@ -6242,13 +6230,9 @@ { "name": "name_en", "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } + "kind": "SCALAR", + "name": "String", + "ofType": null }, "defaultValue": null }, @@ -6273,26 +6257,18 @@ { "name": "latitude", "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Decimal", - "ofType": null - } + "kind": "SCALAR", + "name": "Decimal", + "ofType": null }, "defaultValue": null }, { "name": "longitude", "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Decimal", - "ofType": null - } + "kind": "SCALAR", + "name": "Decimal", + "ofType": null }, "defaultValue": null } @@ -8659,6 +8635,15 @@ }, "defaultValue": null }, + { + "name": "permanent_address_city", + "type": { + "kind": "INPUT_OBJECT", + "name": "City", + "ofType": null + }, + "defaultValue": null + }, { "name": "mailing_address", "type": { @@ -8667,6 +8652,15 @@ "ofType": null }, "defaultValue": null + }, + { + "name": "mailing_address_city", + "type": { + "kind": "INPUT_OBJECT", + "name": "City", + "ofType": null + }, + "defaultValue": null } ], "type": { @@ -9824,13 +9818,9 @@ { "name": "name_en", "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } + "kind": "SCALAR", + "name": "String", + "ofType": null }, "defaultValue": null }, @@ -11160,13 +11150,9 @@ "name": "street_address", "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } + "kind": "SCALAR", + "name": "String", + "ofType": null }, "isDeprecated": false, "deprecationReason": null