From fe2dfa5a780cc89b14a34cd86204b84ae36d5544 Mon Sep 17 00:00:00 2001 From: DeclanClarkeCGI <142809814+DeclanClarkeCGI@users.noreply.github.com> Date: Thu, 18 Jan 2024 08:56:46 +0000 Subject: [PATCH] new schemas from capita, v3 (#136) --- schemas/AccountDetails/details_out_json.json | 112 ---------------- ...son => of_f_get_defendant_account_in.json} | 0 .../of_f_get_defendant_account_out.json | 126 ++++++++++++++++++ .../of_f_get_defendant_account_out.xsd | 6 +- schemas/AccountNotes/of_create_note_in.json | 16 +++ schemas/AccountNotes/of_create_note_in.xsd | 20 +++ schemas/AccountNotes/of_create_note_out.json | 10 ++ schemas/AccountNotes/of_create_note_out.xsd | 4 + .../of_f_search_defendant_accounts_in.json | 27 ++++ ...> of_f_search_defendant_accounts_out.json} | 11 +- .../of_f_search_defendant_accounts_out.xsd | 1 + schemas/AccountSearch/search_in_json.json | 27 ---- 12 files changed, 213 insertions(+), 147 deletions(-) delete mode 100644 schemas/AccountDetails/details_out_json.json rename schemas/AccountDetails/{details_in_json.json => of_f_get_defendant_account_in.json} (100%) create mode 100644 schemas/AccountDetails/of_f_get_defendant_account_out.json create mode 100644 schemas/AccountNotes/of_create_note_in.json create mode 100644 schemas/AccountNotes/of_create_note_in.xsd create mode 100644 schemas/AccountNotes/of_create_note_out.json create mode 100644 schemas/AccountNotes/of_create_note_out.xsd create mode 100644 schemas/AccountSearch/of_f_search_defendant_accounts_in.json rename schemas/AccountSearch/{search_out_json.json => of_f_search_defendant_accounts_out.json} (78%) delete mode 100644 schemas/AccountSearch/search_in_json.json diff --git a/schemas/AccountDetails/details_out_json.json b/schemas/AccountDetails/details_out_json.json deleted file mode 100644 index 9885f43de..000000000 --- a/schemas/AccountDetails/details_out_json.json +++ /dev/null @@ -1,112 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "properties": { - "defendant_account": { - "type": "object", - "properties": { - "defendant_account_id": { "type": "integer" }, - "account_number": { "type": "string" }, - "amount_imposed": { "type": "number" }, - "amount_paid": { "type": "number" }, - "account_balance": { "type": "number" }, - "business_unit_id": { "type": "integer" }, - "business_unit_name": { "type": "string" }, - "account_status": { "type": "string" }, - "originator_name": { "type": "string" }, - "imposed_hearing_date": { "type": "string", "format": "date-time" }, - "imposing_court_code": { "type": "integer" }, - "last_hearing_date": { "type": "string", "format": "date-time" }, - "last_hearing_court_code": { "type": "integer" }, - "last_changed_date": { "type": "string", "format": "date-time" }, - "last_movement_date": { "type": "string", "format": "date-time" }, - "collection_order": { "type": "boolean" }, - "enforcing_court_code": { "type": "integer" }, - "last_enforcement": { "type": "integer" }, - "enf_override_result_id": { "type": "string" }, - "enf_override_enforcer_code": { "type": "integer" }, - "enf_override_tfo_lja_code": { "type": "integer" }, - "prosecutor_case_reference": { "type": "string" }, - "account_comments": { "type": "string" }, - "payment_terms": { - "type": "object", - "properties": { - "payment_terms_id": { "type": ["integer", "null"] }, - "effective_date": { "type": ["string", "null"], "format": "date-time" }, - "terms_type_code": { "type": "string" }, - "instalment_amount": { "type": ["number", "null"] }, - "instalment_period": { "type": "string" }, - "instalment_lump_sum": { "type": ["number", "null"] }, - "jail_days": { "type": ["integer", "null"] }, - "wording": { "type": "string" } - }, - "required": ["terms_type_code"] - }, - "parties": { - "type": "array", - "items": { - "type": "object", - "properties": { - "party_id": { "type": "integer" }, - "association_type": { "type": "string" }, - "debtor": { "type": "boolean" }, - "organisation": { "type": "boolean" }, - "organisation_name": { "type": ["string", "null"] }, - "surname": { "type": ["string", "null"] }, - "forenames": { "type": ["string", "null"] }, - "initials": { "type": ["string", "null"] }, - "title": { "type": ["string", "null"] }, - "birth_date": { "type": ["string", "null"], "format": "date-time" }, - "age": { "type": ["integer", "null"] }, - "national_insurance_number": { "type": ["string", "null"] }, - "last_changed_date": { "type": "string", "format": "date-time" }, - "full_name": { "type": "string" }, - "address_line_1": { "type": "string" }, - "address_line_2": { "type": ["string", "null"] }, - "address_line_3": { "type": ["string", "null"] }, - "address_line_4": { "type": ["string", "null"] }, - "address_line_5": { "type": ["string", "null"] }, - "postcode": { "type": "string" } - }, - "required": ["party_id", "association_type", "debtor", "organisation", "full_name", "address_line_1", "postcode"] - } - }, - "impositions": { - "type": "array", - "items": { - "type": "object", - "properties": { - "imposition_id": { "type": "integer" }, - "posted_date": { "type": "string", "format": "date-time" }, - "result_code": { "type": "string" }, - "imposed_date": { "type": "string", "format": "date-time" }, - "imposing_court_code": { "type": "integer" }, - "imposed_amount": { "type": "number" }, - "paid_amount": { "type": "number" }, - "offence_title": { "type": "string" }, - "creditor_account_number": { "type": "string" }, - "creditor_name": { "type": "string" } - }, - "required": ["imposition_id", "posted_date", "result_code", "imposed_date", "imposing_court_code", "imposed_amount", "paid_amount", "offence_title", "creditor_account_number"] - } - }, - "account_activities": { - "type": "array", - "items": { - "type": "object", - "properties": { - "activity_id": { "type": "integer" }, - "activity_type": { "type": "string" }, - "activity_type_code": { "type": "string" }, - "posted_date": { "type": "string", "format": "date-time" }, - "posted_by": { "type": ["string", "null"] }, - "amount": { "type": ["number", "null"] } - }, - "required": ["activity_id", "activity_type", "activity_type_code", "posted_date"] - } - } - }, - "required": ["defendant_account_id", "account_number", "amount_imposed", "amount_paid", "account_balance", "business_unit_id", "business_unit_name", "account_status", "originator_name", "imposed_hearing_date", "imposing_court_code", "last_hearing_date", "last_hearing_court_code", "last_changed_date", "last_movement_date", "collection_order", "enforcing_court_code", "last_enforcement", "prosecutor_case_reference", "account_comments", "payment_terms", "parties", "impositions", "account_activities"] - } - } -} diff --git a/schemas/AccountDetails/details_in_json.json b/schemas/AccountDetails/of_f_get_defendant_account_in.json similarity index 100% rename from schemas/AccountDetails/details_in_json.json rename to schemas/AccountDetails/of_f_get_defendant_account_in.json diff --git a/schemas/AccountDetails/of_f_get_defendant_account_out.json b/schemas/AccountDetails/of_f_get_defendant_account_out.json new file mode 100644 index 000000000..f48fd945f --- /dev/null +++ b/schemas/AccountDetails/of_f_get_defendant_account_out.json @@ -0,0 +1,126 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "properties": { + "defendant_account": { + "type": "object", + "properties": { + "defendant_account_id": { "type": "integer" }, + "account_number": { "type": "string" }, + "amount_imposed": { "type": "number" }, + "amount_paid": { "type": "number" }, + "account_balance": { "type": "number" }, + "business_unit_id": { "type": "integer" }, + "business_unit_name": { "type": "string" }, + "account_status": { "type": "string" }, + "originator_name": { "type": "string" }, + "imposed_hearing_date": { "type": "string", "format": "date-time" }, + "imposing_court_code": { "type": "integer" }, + "last_hearing_date": { "type": "string", "format": "date-time" }, + "last_hearing_court_code": { "type": "integer" }, + "last_changed_date": { "type": "string", "format": "date-time" }, + "last_movement_date": { "type": "string", "format": "date-time" }, + "collection_order": { "type": "boolean" }, + "enforcing_court_code": { "type": "integer" }, + "last_enforcement": { "type": "integer" }, + "enf_override_result_id": { "type": "string" }, + "enf_override_enforcer_code": { "type": "integer" }, + "enf_override_tfo_lja_code": { "type": "integer" }, + "prosecutor_case_reference": { "type": "string" }, + "account_comments": { "type": "string" }, + "payment_terms": { + "type": "object", + "properties": { + "terms_date": { "type": "string", "format": "date-time" }, + "terms_type_code": { "type": "string" }, + "instalment_amount": { "type": "number" }, + "instalment_period": { "type": "string" }, + "instalment_lump_sum": { "type": "number" }, + "jail_days": { "type": "integer" }, + "wording": { "type": "string" } + } + }, + "parties": { + "type": "object", + "properties": { + "party": { + "type": "array", + "items": { + "type": "object", + "properties": { + "party_id": { "type": "integer" }, + "association_type": { "type": "string" }, + "debtor": { "type": "boolean" }, + "organisation": { "type": "boolean" }, + "organisation_name": { "type": "string" }, + "surname": { "type": "string" }, + "forenames": { "type": "string" }, + "initials": { "type": "string" }, + "title": { "type": "string" }, + "birth_date": { "type": "string", "format": "date-time" }, + "age": { "type": "integer" }, + "national_insurance_number": { "type": "string" }, + "last_changed_date": { "type": "string", "format": "date-time" }, + "full_name": { "type": "string" }, + "address_line_1": { "type": "string" }, + "address_line_2": { "type": "string" }, + "address_line_3": { "type": "string" }, + "address_line_4": { "type": "string" }, + "address_line_5": { "type": "string" }, + "postcode": { "type": "string" } + }, + "required": ["party_id", "association_type", "debtor", "organisation", "address_line_1", "postcode"] + } + } + } + }, + "impositions": { + "type": "object", + "properties": { + "imposition": { + "type": "array", + "items": { + "type": "object", + "properties": { + "imposition_id": { "type": "integer" }, + "posted_date": { "type": "string", "format": "date-time" }, + "result_id": { "type": "string" }, + "imposed_date": { "type": "string", "format": "date-time" }, + "imposing_court_code": { "type": "integer" }, + "imposed_amount": { "type": "number" }, + "paid_amount": { "type": "number" }, + "offence_title": { "type": "string" }, + "creditor_account_number": { "type": "string" }, + "creditor_name": { "type": "string" } + }, + "required": ["imposition_id", "posted_date", "result_id", "imposed_date", "offence_title"] + } + } + } + }, + "account_activities": { + "type": "object", + "properties": { + "account_activity": { + "type": "array", + "items": { + "type": "object", + "properties": { + "activity_id": { "type": "integer" }, + "activity_type": { "type": "string" }, + "activity_type_code": { "type": "string" }, + "activity_text": { "type": "string" }, + "posted_date": { "type": "string", "format": "date-time" }, + "posted_by": { "type": "string" }, + "amount": { "type": "number" } + }, + "required": ["activity_id", "activity_type", "posted_date", "activity_text"] + } + } + } + } + }, + "required": ["defendant_account_id", "account_number", "amount_imposed", "amount_paid", "account_balance", "business_unit_id", "business_unit_name", "account_status", "originator_name", "imposing_court_code", "last_hearing_date", "last_hearing_court_code", "last_changed_date", "last_movement_date", "collection_order", "enforcing_court_code", "last_enforcement", "prosecutor_case_reference"] + } + } +} diff --git a/schemas/AccountDetails/of_f_get_defendant_account_out.xsd b/schemas/AccountDetails/of_f_get_defendant_account_out.xsd index f1b0e02e3..2917cca38 100644 --- a/schemas/AccountDetails/of_f_get_defendant_account_out.xsd +++ b/schemas/AccountDetails/of_f_get_defendant_account_out.xsd @@ -29,8 +29,7 @@ - - + @@ -80,7 +79,7 @@ - + @@ -103,6 +102,7 @@ + diff --git a/schemas/AccountNotes/of_create_note_in.json b/schemas/AccountNotes/of_create_note_in.json new file mode 100644 index 000000000..ca78c2aa7 --- /dev/null +++ b/schemas/AccountNotes/of_create_note_in.json @@ -0,0 +1,16 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "properties": { + "note": { + "type": "object", + "properties": { + "associated_record_id": { "type": "string" }, + "associated_record_type": { "type": "string", "enum": ["defendant_accounts", "creditor_accounts", "suspense_accounts"] }, + "note_text": { "type": "string" }, + "posted_by": { "type": "string" } + }, + "required": ["associated_record_id", "associated_record_type", "note_text", "posted_by"] + } + } +} diff --git a/schemas/AccountNotes/of_create_note_in.xsd b/schemas/AccountNotes/of_create_note_in.xsd new file mode 100644 index 000000000..d4154a320 --- /dev/null +++ b/schemas/AccountNotes/of_create_note_in.xsd @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/schemas/AccountNotes/of_create_note_out.json b/schemas/AccountNotes/of_create_note_out.json new file mode 100644 index 000000000..dc1756826 --- /dev/null +++ b/schemas/AccountNotes/of_create_note_out.json @@ -0,0 +1,10 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "properties": { + "note_id": { + "type": "integer" + } + }, + "required": ["note_id"] +} diff --git a/schemas/AccountNotes/of_create_note_out.xsd b/schemas/AccountNotes/of_create_note_out.xsd new file mode 100644 index 000000000..8b4fa01e5 --- /dev/null +++ b/schemas/AccountNotes/of_create_note_out.xsd @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/schemas/AccountSearch/of_f_search_defendant_accounts_in.json b/schemas/AccountSearch/of_f_search_defendant_accounts_in.json new file mode 100644 index 000000000..a332b3f0a --- /dev/null +++ b/schemas/AccountSearch/of_f_search_defendant_accounts_in.json @@ -0,0 +1,27 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "properties": { + "defendantAccountSearchCriteria": { + "type": "object", + "properties": { + "account_number": { "type": "string" }, + "business_unit_id": { "type": "integer" }, + "organisation": { "type": "boolean" }, + "organisation_name": { "type": "string" }, + "surname": { "type": "string" }, + "forenames": { "type": "string" }, + "initials": { "type": "string" }, + "birth_date": { "type": "string", "format": "date-time" }, + "national_insurance_number": { "type": "string" }, + "prosecutor_case_reference": { "type": "string" }, + "address_line_1": { "type": "string" }, + "searchAliases": { "type": "boolean" }, + "liveOnly": { "type": "boolean" }, + "firstRowNumber": { "type": "integer" }, + "lastRowNumber": { "type": "integer" } + }, + "required": ["firstRowNumber", "lastRowNumber"] + } + } +} diff --git a/schemas/AccountSearch/search_out_json.json b/schemas/AccountSearch/of_f_search_defendant_accounts_out.json similarity index 78% rename from schemas/AccountSearch/search_out_json.json rename to schemas/AccountSearch/of_f_search_defendant_accounts_out.json index 0be00ed26..e2624cce0 100644 --- a/schemas/AccountSearch/search_out_json.json +++ b/schemas/AccountSearch/of_f_search_defendant_accounts_out.json @@ -15,11 +15,12 @@ "business_unit_id": { "type": "integer" }, "business_unit_name": { "type": "string" }, "organisation": { "type": "boolean" }, - "organisation_name": { "type": ["string", "null"] }, - "surname": { "type": ["string", "null"] }, - "forenames": { "type": ["string", "null"] }, - "initials": { "type": ["string", "null"] }, - "birth_date": { "type": ["string", "null"], "format": "date-time" }, + "organisation_name": { "type": "string" }, + "surname": { "type": "string" }, + "forenames": { "type": "string" }, + "initials": { "type": "string" }, + "title": { "type": "string" }, + "birth_date": { "type": "string", "format": "date-time" }, "address_line_1": { "type": "string" }, "account_balance": { "type": "number" }, "rowNumber": { "type": "integer" } diff --git a/schemas/AccountSearch/of_f_search_defendant_accounts_out.xsd b/schemas/AccountSearch/of_f_search_defendant_accounts_out.xsd index bb00ce040..48697d0eb 100644 --- a/schemas/AccountSearch/of_f_search_defendant_accounts_out.xsd +++ b/schemas/AccountSearch/of_f_search_defendant_accounts_out.xsd @@ -15,6 +15,7 @@ + diff --git a/schemas/AccountSearch/search_in_json.json b/schemas/AccountSearch/search_in_json.json deleted file mode 100644 index 19fd314e4..000000000 --- a/schemas/AccountSearch/search_in_json.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "properties": { - "defendantAccountSearchCriteria": { - "type": "object", - "properties": { - "account_number": { "type": ["string", "null"] }, - "business_unit_id": { "type": ["integer", "null"] }, - "organisation": { "type": ["boolean", "null"] }, - "organisation_name": { "type": ["string", "null"] }, - "surname": { "type": ["string", "null"] }, - "forenames": { "type": ["string", "null"] }, - "initials": { "type": ["string", "null"] }, - "birth_date": { "type": ["string", "null"], "format": "date-time" }, - "national_insurance_number": { "type": ["string", "null"] }, - "prosecutor_case_reference": { "type": ["string", "null"] }, - "address_line_1": { "type": ["string", "null"] }, - "searchAliases": { "type": ["boolean", "null"] }, - "liveOnly": { "type": ["boolean", "null"] }, - "firstRowNumber": { "type": "integer" }, - "lastRowNumber": { "type": "integer" } - }, - "required": ["firstRowNumber", "lastRowNumber"] - } - } -}