xyp 0.1.0__py3-none-any.whl

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.
Files changed (569) hide show
  1. xyp/__init__.py +60 -0
  2. xyp/_client.py +176 -0
  3. xyp/_groups.py +264 -0
  4. xyp/_models.py +224 -0
  5. xyp/_operations.py +511 -0
  6. xyp/_service.py +15 -0
  7. xyp/_signer.py +74 -0
  8. xyp/_soap.py +163 -0
  9. xyp/_tls.py +39 -0
  10. xyp/_transport.py +162 -0
  11. xyp/auth.py +103 -0
  12. xyp/certs/MNICA-2022.pem +32 -0
  13. xyp/certs/MNRCA-2021.pem +32 -0
  14. xyp/errors.py +146 -0
  15. xyp/models/__init__.py +4 -0
  16. xyp/models/citizen.py +422 -0
  17. xyp/models/education.py +122 -0
  18. xyp/models/foreign_service.py +36 -0
  19. xyp/models/government_service.py +280 -0
  20. xyp/models/health.py +406 -0
  21. xyp/models/insurance.py +328 -0
  22. xyp/models/labor_welfare.py +104 -0
  23. xyp/models/legal_entity.py +134 -0
  24. xyp/models/meta.py +36 -0
  25. xyp/models/payment.py +188 -0
  26. xyp/models/pki.py +14 -0
  27. xyp/models/private_service.py +40 -0
  28. xyp/models/property.py +178 -0
  29. xyp/models/statistic.py +126 -0
  30. xyp/models/tax.py +54 -0
  31. xyp/models/transport.py +262 -0
  32. xyp/operations/__init__.py +4 -0
  33. xyp/operations/citizen/__init__.py +4 -0
  34. xyp/operations/citizen/active_vocational_student_info.py +109 -0
  35. xyp/operations/citizen/address_apartment_info.py +86 -0
  36. xyp/operations/citizen/address_street_info.py +86 -0
  37. xyp/operations/citizen/address_type_info.py +65 -0
  38. xyp/operations/citizen/affiliation_registration_info.py +100 -0
  39. xyp/operations/citizen/aimag_city_info.py +65 -0
  40. xyp/operations/citizen/authorize_citizen.py +78 -0
  41. xyp/operations/citizen/bag_khoroo_info.py +83 -0
  42. xyp/operations/citizen/border_ban.py +116 -0
  43. xyp/operations/citizen/check_citizen_address_info.py +107 -0
  44. xyp/operations/citizen/check_citizen_info.py +84 -0
  45. xyp/operations/citizen/check_citizen_non_passport.py +78 -0
  46. xyp/operations/citizen/check_citizen_regnum.py +72 -0
  47. xyp/operations/citizen/check_id_card_service.py +112 -0
  48. xyp/operations/citizen/check_twin_info.py +119 -0
  49. xyp/operations/citizen/children_rank_statistic_info.py +120 -0
  50. xyp/operations/citizen/citizen_address_list_english.py +125 -0
  51. xyp/operations/citizen/citizen_birth_info.py +101 -0
  52. xyp/operations/citizen/citizen_birth_info_ws101123.py +103 -0
  53. xyp/operations/citizen/citizen_denationalization_info.py +133 -0
  54. xyp/operations/citizen/citizen_doing_criminal_liabilityl_info.py +94 -0
  55. xyp/operations/citizen/citizen_doing_criminal_liabilty_eng_info.py +124 -0
  56. xyp/operations/citizen/citizen_graduate_school_description.py +93 -0
  57. xyp/operations/citizen/citizen_graduate_school_info.py +104 -0
  58. xyp/operations/citizen/citizen_graduate_school_list.py +96 -0
  59. xyp/operations/citizen/citizen_high_school_description.py +84 -0
  60. xyp/operations/citizen/citizen_kindergarten_description.py +84 -0
  61. xyp/operations/citizen/citizen_look_up_address.py +152 -0
  62. xyp/operations/citizen/citizen_look_up_info.py +150 -0
  63. xyp/operations/citizen/citizen_new_diploma_info.py +147 -0
  64. xyp/operations/citizen/citizen_was_criminal_liabilityl_info.py +124 -0
  65. xyp/operations/citizen/civil_info_at_burtgelmn.py +92 -0
  66. xyp/operations/citizen/civil_service_employee_info.py +117 -0
  67. xyp/operations/citizen/conformity_certificate_detail_service.py +142 -0
  68. xyp/operations/citizen/conformity_certificate_list.py +256 -0
  69. xyp/operations/citizen/current_passport_info.py +133 -0
  70. xyp/operations/citizen/decease_list_by_date.py +123 -0
  71. xyp/operations/citizen/entity_affil_by_regnum_service.py +102 -0
  72. xyp/operations/citizen/extend_term_of_granted_name.py +104 -0
  73. xyp/operations/citizen/extend_term_of_granted_name_update.py +90 -0
  74. xyp/operations/citizen/first_time_passport_info.py +93 -0
  75. xyp/operations/citizen/foreign_passport_unregistered_info_english.py +83 -0
  76. xyp/operations/citizen/get_children_info.py +119 -0
  77. xyp/operations/citizen/get_citizen_address_info.py +119 -0
  78. xyp/operations/citizen/get_citizen_before_address_info.py +87 -0
  79. xyp/operations/citizen/get_citizen_below_subsistence_level_info.py +106 -0
  80. xyp/operations/citizen/get_citizen_birth_info.py +107 -0
  81. xyp/operations/citizen/get_citizen_change_name_info.py +104 -0
  82. xyp/operations/citizen/get_citizen_change_regnum_info.py +88 -0
  83. xyp/operations/citizen/get_citizen_decease_info.py +91 -0
  84. xyp/operations/citizen/get_citizen_foul_info.py +74 -0
  85. xyp/operations/citizen/get_citizen_health_insurance_info.py +89 -0
  86. xyp/operations/citizen/get_citizen_id_card_info.py +173 -0
  87. xyp/operations/citizen/get_citizen_marriage_divorce_info.py +99 -0
  88. xyp/operations/citizen/get_citizen_marriage_info.py +97 -0
  89. xyp/operations/citizen/get_citizen_no_marriage_info.py +90 -0
  90. xyp/operations/citizen/get_citizen_non_id_card_info.py +141 -0
  91. xyp/operations/citizen/get_citizen_non_payment_info.py +111 -0
  92. xyp/operations/citizen/get_citizen_regnum_info.py +89 -0
  93. xyp/operations/citizen/get_dictionary_name_info.py +85 -0
  94. xyp/operations/citizen/get_dissolved_legal_entity_info.py +85 -0
  95. xyp/operations/citizen/get_election_location.py +91 -0
  96. xyp/operations/citizen/get_id_card_photo.py +97 -0
  97. xyp/operations/citizen/get_marriage_restore_info.py +122 -0
  98. xyp/operations/citizen/get_organization_where_citizen_works_info.py +132 -0
  99. xyp/operations/citizen/get_passport_civil_info.py +138 -0
  100. xyp/operations/citizen/get_passport_issued_place.py +81 -0
  101. xyp/operations/citizen/get_stamp_reference.py +95 -0
  102. xyp/operations/citizen/get_topic_scope.py +81 -0
  103. xyp/operations/citizen/get_topics.py +99 -0
  104. xyp/operations/citizen/graduated_vocational_student_info.py +121 -0
  105. xyp/operations/citizen/internal_troops_description.py +86 -0
  106. xyp/operations/citizen/legal_entity_name_validity_service.py +103 -0
  107. xyp/operations/citizen/list_of_civil_titles.py +110 -0
  108. xyp/operations/citizen/passport_info.py +114 -0
  109. xyp/operations/citizen/passport_info_second_time.py +104 -0
  110. xyp/operations/citizen/passport_invalid_info.py +153 -0
  111. xyp/operations/citizen/passport_validity_checker.py +102 -0
  112. xyp/operations/citizen/police_weapon_movement_transfer_service.py +140 -0
  113. xyp/operations/citizen/regnum_change_info_english.py +101 -0
  114. xyp/operations/citizen/regnum_info_english.py +89 -0
  115. xyp/operations/citizen/soum_district_info.py +77 -0
  116. xyp/operations/citizen/svc_marriage_restores.py +93 -0
  117. xyp/operations/education/__init__.py +4 -0
  118. xyp/operations/education/basic_edu_cert_request.py +97 -0
  119. xyp/operations/education/basic_education_certificate_supplement_en.py +139 -0
  120. xyp/operations/education/basic_education_certificate_supplement_mn.py +139 -0
  121. xyp/operations/education/certificate_supplement_look_up.py +139 -0
  122. xyp/operations/education/certificate_supplement_lookup_mn.py +139 -0
  123. xyp/operations/education/check_kindergarten_enrollment.py +115 -0
  124. xyp/operations/education/children_info_by_parent_civil_id.py +140 -0
  125. xyp/operations/education/civil_capacity_certificate_detail_service.py +97 -0
  126. xyp/operations/education/diploma_copy_bilingual_service.py +80 -0
  127. xyp/operations/education/foreign_higher_education_detail_service.py +111 -0
  128. xyp/operations/education/foreign_higher_education_service_one.py +111 -0
  129. xyp/operations/education/get_citizen_capacity_certificate_list.py +90 -0
  130. xyp/operations/education/kindergarten_description.py +88 -0
  131. xyp/operations/education/send_kindergarten_enrollment.py +290 -0
  132. xyp/operations/education/student_card.py +117 -0
  133. xyp/operations/education/teacher_card_info.py +84 -0
  134. xyp/operations/education/uee_reference_service.py +77 -0
  135. xyp/operations/education/umns_education_info.py +87 -0
  136. xyp/operations/foreign_service/__init__.py +4 -0
  137. xyp/operations/foreign_service/foreign_citizen_info_service.py +93 -0
  138. xyp/operations/foreign_service/foreigner_residence_permit_inquiry.py +90 -0
  139. xyp/operations/foreign_service/get_border_crossing_info.py +151 -0
  140. xyp/operations/foreign_service/new_executive_management_registration_verification.py +88 -0
  141. xyp/operations/foreign_service/non_governmental_organization_info.py +96 -0
  142. xyp/operations/foreign_service/visa_residency_info.py +139 -0
  143. xyp/operations/government_service/__init__.py +4 -0
  144. xyp/operations/government_service/agricultural_incentive_receipt_service.py +102 -0
  145. xyp/operations/government_service/available_courtroom_schedule_service.py +91 -0
  146. xyp/operations/government_service/check_imei.py +99 -0
  147. xyp/operations/government_service/citizen_birth_info_eng.py +98 -0
  148. xyp/operations/government_service/citizen_covid19_e_pass.py +77 -0
  149. xyp/operations/government_service/citizen_id_card_info_eng.py +162 -0
  150. xyp/operations/government_service/citizen_international_cert.py +116 -0
  151. xyp/operations/government_service/citizen_legal_entity_weapons.py +96 -0
  152. xyp/operations/government_service/citizen_marriage_info_eng.py +91 -0
  153. xyp/operations/government_service/citizen_no_marriage_info_data.py +83 -0
  154. xyp/operations/government_service/citizen_non_payment_eng_info.py +116 -0
  155. xyp/operations/government_service/citizen_weapon_registration_booking_service.py +107 -0
  156. xyp/operations/government_service/covid19_medical_certificate_info.py +132 -0
  157. xyp/operations/government_service/covid_vaccine_dose_count.py +80 -0
  158. xyp/operations/government_service/create_complaint_rating.py +99 -0
  159. xyp/operations/government_service/create_feedback_fact_call.py +144 -0
  160. xyp/operations/government_service/create_feedback_session.py +168 -0
  161. xyp/operations/government_service/docx_access_verification_service.py +80 -0
  162. xyp/operations/government_service/feedback_dimension_departments.py +74 -0
  163. xyp/operations/government_service/firearm_owner_certificate_info.py +79 -0
  164. xyp/operations/government_service/foreign_citizen_international_cert.py +98 -0
  165. xyp/operations/government_service/gas_gun_bullet_registration_certificate.py +111 -0
  166. xyp/operations/government_service/get_aimag_city_info_by_zipcode.py +81 -0
  167. xyp/operations/government_service/get_bag_district_list_by_zipcode.py +81 -0
  168. xyp/operations/government_service/get_complaint_status.py +100 -0
  169. xyp/operations/government_service/get_electoral_station_info.py +119 -0
  170. xyp/operations/government_service/get_explosive_tools_info.py +74 -0
  171. xyp/operations/government_service/get_explosives_info.py +81 -0
  172. xyp/operations/government_service/get_feedback_dimension_tags.py +74 -0
  173. xyp/operations/government_service/get_feedback_fact_call.py +123 -0
  174. xyp/operations/government_service/get_gun_models_info.py +94 -0
  175. xyp/operations/government_service/get_list_of_countries_info.py +81 -0
  176. xyp/operations/government_service/get_person_complaint_status_list.py +88 -0
  177. xyp/operations/government_service/get_pos_receipt_dtl_product.py +86 -0
  178. xyp/operations/government_service/get_raw_materials_info.py +81 -0
  179. xyp/operations/government_service/get_soum_district_list_by_zipcode.py +81 -0
  180. xyp/operations/government_service/get_tree_register.py +93 -0
  181. xyp/operations/government_service/lawyer_info_service.py +170 -0
  182. xyp/operations/government_service/non_adult_citizen_info.py +138 -0
  183. xyp/operations/government_service/notary_trust_archived_info.py +120 -0
  184. xyp/operations/government_service/notary_trust_info.py +140 -0
  185. xyp/operations/government_service/notary_vehicle_info.py +126 -0
  186. xyp/operations/government_service/operation_archive_by_regnum_service.py +101 -0
  187. xyp/operations/government_service/payment_confirmation_service.py +138 -0
  188. xyp/operations/government_service/payment_info_service.py +105 -0
  189. xyp/operations/government_service/registration_number_validator.py +73 -0
  190. xyp/operations/government_service/risk_reference_service.py +163 -0
  191. xyp/operations/government_service/risk_registration_service.py +149 -0
  192. xyp/operations/government_service/risk_status_change_service.py +107 -0
  193. xyp/operations/government_service/special_equipment_cartridge_registration_certificate.py +111 -0
  194. xyp/operations/government_service/student_soldier_info.py +127 -0
  195. xyp/operations/government_service/tree_register.py +99 -0
  196. xyp/operations/government_service/weapon_ballistic_registration_certificate.py +111 -0
  197. xyp/operations/government_service/weapon_registration_schedule_service.py +94 -0
  198. xyp/operations/health/__init__.py +4 -0
  199. xyp/operations/health/check_payment_months.py +80 -0
  200. xyp/operations/health/check_prescription_infoby_regnum.py +110 -0
  201. xyp/operations/health/citizen_image_diagnosis_and_analysis_info.py +112 -0
  202. xyp/operations/health/citizen_monthly_service_usage_inquiry_service.py +124 -0
  203. xyp/operations/health/citizen_questionnaire_submit_service.py +99 -0
  204. xyp/operations/health/citizen_service_package_number_inquiry_service.py +88 -0
  205. xyp/operations/health/covid_pcr_last_result_info.py +91 -0
  206. xyp/operations/health/docter_degree_info.py +84 -0
  207. xyp/operations/health/doctor_license_check.py +85 -0
  208. xyp/operations/health/e_health_check_patient_exists.py +80 -0
  209. xyp/operations/health/e_health_create_patient.py +122 -0
  210. xyp/operations/health/e_health_get_analysis_dates.py +82 -0
  211. xyp/operations/health/e_health_get_analysis_result.py +88 -0
  212. xyp/operations/health/e_health_get_free_time_list.py +100 -0
  213. xyp/operations/health/e_health_get_hospitals.py +86 -0
  214. xyp/operations/health/e_health_get_medical_services.py +91 -0
  215. xyp/operations/health/e_health_list_service.py +78 -0
  216. xyp/operations/health/e_health_online_appointment_order.py +113 -0
  217. xyp/operations/health/e_health_online_time_order_list.py +103 -0
  218. xyp/operations/health/e_health_time_order_approve.py +80 -0
  219. xyp/operations/health/e_health_time_order_cancel.py +80 -0
  220. xyp/operations/health/e_hospital_by_address.py +78 -0
  221. xyp/operations/health/e_hospital_check_patient_exists.py +80 -0
  222. xyp/operations/health/e_hospital_citizen_analysis_info.py +100 -0
  223. xyp/operations/health/e_hospital_create_patient.py +122 -0
  224. xyp/operations/health/e_hospital_find_address.py +68 -0
  225. xyp/operations/health/e_hospital_get_analysis_dates.py +80 -0
  226. xyp/operations/health/e_hospital_get_analysis_result.py +88 -0
  227. xyp/operations/health/e_hospital_get_free_time_list.py +100 -0
  228. xyp/operations/health/e_hospital_get_hospitals.py +86 -0
  229. xyp/operations/health/e_hospital_get_medical_services.py +91 -0
  230. xyp/operations/health/e_hospital_online_appointment_order.py +113 -0
  231. xyp/operations/health/e_hospital_online_time_order_list.py +103 -0
  232. xyp/operations/health/e_hospital_time_order_approve.py +80 -0
  233. xyp/operations/health/e_hospital_time_order_cancel.py +80 -0
  234. xyp/operations/health/early_detection_service.py +85 -0
  235. xyp/operations/health/get_active_pregnancy.py +90 -0
  236. xyp/operations/health/get_all_druglistings_info.py +139 -0
  237. xyp/operations/health/get_ambulatory.py +101 -0
  238. xyp/operations/health/get_ambulatory_dtl.py +112 -0
  239. xyp/operations/health/get_blood_type_service.py +78 -0
  240. xyp/operations/health/get_child_birth.py +84 -0
  241. xyp/operations/health/get_child_book.py +105 -0
  242. xyp/operations/health/get_child_book_check_ups.py +81 -0
  243. xyp/operations/health/get_children_birth_info.py +92 -0
  244. xyp/operations/health/get_data_by_form_summary.py +101 -0
  245. xyp/operations/health/get_drug_info.py +135 -0
  246. xyp/operations/health/get_ecare_by_regnum.py +123 -0
  247. xyp/operations/health/get_emd_service_history.py +111 -0
  248. xyp/operations/health/get_form13_a_info.py +146 -0
  249. xyp/operations/health/get_form13_a_list.py +94 -0
  250. xyp/operations/health/get_health_insurance_premium_list.py +91 -0
  251. xyp/operations/health/get_hospital_list_info.py +148 -0
  252. xyp/operations/health/get_hospital_operation_info.py +89 -0
  253. xyp/operations/health/get_hospitals_from_distance.py +174 -0
  254. xyp/operations/health/get_kid_question_result.py +104 -0
  255. xyp/operations/health/get_kindergarten_analysis_result_by_child_regno.py +107 -0
  256. xyp/operations/health/get_personal_info.py +84 -0
  257. xyp/operations/health/get_receipt_by_regnum_and_number.py +200 -0
  258. xyp/operations/health/get_streptococcus.py +100 -0
  259. xyp/operations/health/get_vaccine_by_regnum_info.py +151 -0
  260. xyp/operations/health/h_info_nc_diseases_report.py +157 -0
  261. xyp/operations/health/medicine_import_insert.py +87 -0
  262. xyp/operations/health/multi_degree_info.py +99 -0
  263. xyp/operations/health/multi_license_info.py +102 -0
  264. xyp/operations/health/pregnancy_control_note_reference_info.py +100 -0
  265. xyp/operations/health/pregnancy_summary.py +98 -0
  266. xyp/operations/health/preventive_screening_info.py +108 -0
  267. xyp/operations/health/receive_service_complain_data.py +89 -0
  268. xyp/operations/health/receive_tablet_complain.py +119 -0
  269. xyp/operations/health/request_prescription_register.py +126 -0
  270. xyp/operations/health/search_drug_images_by_barcode.py +85 -0
  271. xyp/operations/health/search_for_drug_instructions_by_barcode.py +87 -0
  272. xyp/operations/health/service_for_donor_card_check.py +90 -0
  273. xyp/operations/health/service_for_sending_health_insurance.py +179 -0
  274. xyp/operations/health/white_book_detail_info.py +121 -0
  275. xyp/operations/insurance/__init__.py +4 -0
  276. xyp/operations/insurance/check_child_money.py +72 -0
  277. xyp/operations/insurance/check_house_hold_child.py +72 -0
  278. xyp/operations/insurance/check_house_hold_food.py +72 -0
  279. xyp/operations/insurance/check_insured_eng_info.py +83 -0
  280. xyp/operations/insurance/check_is_insured_info.py +72 -0
  281. xyp/operations/insurance/check_mother_time_all_info.py +75 -0
  282. xyp/operations/insurance/citizen_insurance_info_for_statistic.py +115 -0
  283. xyp/operations/insurance/citizen_loss_of_ability_to_work_info.py +80 -0
  284. xyp/operations/insurance/disability_benefits_apply.py +115 -0
  285. xyp/operations/insurance/disability_medical_cert_edit.py +229 -0
  286. xyp/operations/insurance/disability_medical_cert_info.py +224 -0
  287. xyp/operations/insurance/disability_medical_cert_invalid.py +72 -0
  288. xyp/operations/insurance/disability_pension_document_eng_info.py +175 -0
  289. xyp/operations/insurance/disability_pension_document_info.py +163 -0
  290. xyp/operations/insurance/disabled_human_english_info.py +120 -0
  291. xyp/operations/insurance/disabled_human_info.py +120 -0
  292. xyp/operations/insurance/enterprises_org_contribution_info.py +178 -0
  293. xyp/operations/insurance/funeral_allowance_info.py +74 -0
  294. xyp/operations/insurance/get_bank_account.py +81 -0
  295. xyp/operations/insurance/get_camp_voucher_of_elder_info.py +88 -0
  296. xyp/operations/insurance/get_check_mother_time_info.py +84 -0
  297. xyp/operations/insurance/get_citizen_pension_inquiry.py +94 -0
  298. xyp/operations/insurance/get_citizen_salary_info.py +106 -0
  299. xyp/operations/insurance/get_citizen_salary_info_eng.py +104 -0
  300. xyp/operations/insurance/get_disabled_person_supply_info.py +86 -0
  301. xyp/operations/insurance/get_health_insurance_fee.py +98 -0
  302. xyp/operations/insurance/get_insurance_products.py +65 -0
  303. xyp/operations/insurance/get_insured_for_last_three_month_info.py +79 -0
  304. xyp/operations/insurance/get_insured_for_last_three_month_occupation_info.py +90 -0
  305. xyp/operations/insurance/get_insuree_work_history_info.py +80 -0
  306. xyp/operations/insurance/get_invoice_by_number.py +93 -0
  307. xyp/operations/insurance/get_org_ben_num_by36_month.py +100 -0
  308. xyp/operations/insurance/get_organization_dept_info.py +78 -0
  309. xyp/operations/insurance/get_payment_info.py +106 -0
  310. xyp/operations/insurance/get_pension_info.py +163 -0
  311. xyp/operations/insurance/get_total_work_month.py +74 -0
  312. xyp/operations/insurance/health_insurance_info.py +103 -0
  313. xyp/operations/insurance/insurance_info_by_org_service.py +90 -0
  314. xyp/operations/insurance/insurance_org_contribution_info.py +200 -0
  315. xyp/operations/insurance/insured_list_last3_month_by_date.py +87 -0
  316. xyp/operations/insurance/investment_application_service.py +103 -0
  317. xyp/operations/insurance/investment_bank_service.py +94 -0
  318. xyp/operations/insurance/list_of_investment_requests.py +98 -0
  319. xyp/operations/insurance/lost_caregiver_pension_document_eng_info.py +175 -0
  320. xyp/operations/insurance/lost_caregiver_pension_document_info.py +163 -0
  321. xyp/operations/insurance/medical_cert_check.py +85 -0
  322. xyp/operations/insurance/org_debt_with_transac_info.py +90 -0
  323. xyp/operations/insurance/org_has_debt.py +72 -0
  324. xyp/operations/insurance/org_info_for_statistic.py +128 -0
  325. xyp/operations/insurance/pension_document_eng_info.py +175 -0
  326. xyp/operations/insurance/pension_document_info.py +163 -0
  327. xyp/operations/insurance/pension_five_years_average_change.py +89 -0
  328. xyp/operations/insurance/pension_five_years_average_check_status.py +98 -0
  329. xyp/operations/insurance/pregnancy_childbirth_cert_invalid.py +72 -0
  330. xyp/operations/insurance/pregnancy_childbirth_cert_list.py +193 -0
  331. xyp/operations/insurance/pregnancy_childbirth_edit.py +223 -0
  332. xyp/operations/insurance/pregnancy_childbirth_info.py +218 -0
  333. xyp/operations/insurance/refund_half_account_list.py +89 -0
  334. xyp/operations/insurance/refund_half_bank_list.py +76 -0
  335. xyp/operations/insurance/refund_half_create_account.py +90 -0
  336. xyp/operations/insurance/refund_half_update_account.py +90 -0
  337. xyp/operations/insurance/retirement_list_info.py +88 -0
  338. xyp/operations/insurance/send_investment_request.py +102 -0
  339. xyp/operations/insurance/set_invoice_payment.py +90 -0
  340. xyp/operations/insurance/social_insurance_info.py +106 -0
  341. xyp/operations/insurance/unemployment_benefits_apply.py +169 -0
  342. xyp/operations/insurance/unemployment_benefits_count.py +79 -0
  343. xyp/operations/labor_welfare/__init__.py +4 -0
  344. xyp/operations/labor_welfare/below_standard_level_citizen.py +91 -0
  345. xyp/operations/labor_welfare/check_letter.py +89 -0
  346. xyp/operations/labor_welfare/citizen_info_disability_certified.py +88 -0
  347. xyp/operations/labor_welfare/civilized_confirmed_services.py +93 -0
  348. xyp/operations/labor_welfare/get_child_notification.py +76 -0
  349. xyp/operations/labor_welfare/get_child_request_info.py +96 -0
  350. xyp/operations/labor_welfare/get_citizen_labor_info.py +196 -0
  351. xyp/operations/labor_welfare/get_foster_parent_service_info.py +95 -0
  352. xyp/operations/labor_welfare/get_household_info_by_regnum.py +108 -0
  353. xyp/operations/labor_welfare/get_service_document_list.py +95 -0
  354. xyp/operations/labor_welfare/get_total_transaction_monthly.py +101 -0
  355. xyp/operations/labor_welfare/household_score_calculate_request.py +78 -0
  356. xyp/operations/labor_welfare/household_score_check.py +132 -0
  357. xyp/operations/labor_welfare/household_score_check_info.py +109 -0
  358. xyp/operations/labor_welfare/household_score_info.py +173 -0
  359. xyp/operations/labor_welfare/job_seeker_info.py +78 -0
  360. xyp/operations/labor_welfare/pension_info.py +86 -0
  361. xyp/operations/labor_welfare/set_child_request.py +91 -0
  362. xyp/operations/labor_welfare/set_user_service.py +85 -0
  363. xyp/operations/legal_entity/__init__.py +4 -0
  364. xyp/operations/legal_entity/check_legal_entity_name_info.py +80 -0
  365. xyp/operations/legal_entity/citizen_legal_entity_info_list.py +86 -0
  366. xyp/operations/legal_entity/citizen_legal_entity_list.py +83 -0
  367. xyp/operations/legal_entity/copy_of_the_legal_entity_cert.py +80 -0
  368. xyp/operations/legal_entity/copy_of_the_legal_entity_rules.py +80 -0
  369. xyp/operations/legal_entity/energy_license_certificate_info.py +97 -0
  370. xyp/operations/legal_entity/get_customs_offns_info.py +120 -0
  371. xyp/operations/legal_entity/get_ebalance_info.py +89 -0
  372. xyp/operations/legal_entity/get_legal_entity_info.py +139 -0
  373. xyp/operations/legal_entity/get_legal_entity_info_with_regnum.py +466 -0
  374. xyp/operations/legal_entity/get_non_legal_entity_info.py +74 -0
  375. xyp/operations/legal_entity/get_trade_service_license_citizen.py +96 -0
  376. xyp/operations/legal_entity/get_trade_service_license_org.py +102 -0
  377. xyp/operations/legal_entity/get_valid_special_permission.py +117 -0
  378. xyp/operations/legal_entity/legal_entity_general_info.py +140 -0
  379. xyp/operations/legal_entity/legal_entity_non_payment_info.py +106 -0
  380. xyp/operations/legal_entity/legal_entity_open_data.py +88 -0
  381. xyp/operations/legal_entity/liquidation_info_service.py +102 -0
  382. xyp/operations/legal_entity/valid_contracts_by_regnum.py +99 -0
  383. xyp/operations/meta/__init__.py +4 -0
  384. xyp/operations/meta/auth_service_check_by_citizen.py +90 -0
  385. xyp/operations/meta/auth_service_check_by_otp.py +78 -0
  386. xyp/operations/meta/check_access.py +98 -0
  387. xyp/operations/meta/check_otp.py +78 -0
  388. xyp/operations/meta/list_access.py +80 -0
  389. xyp/operations/meta/register_otp_request.py +109 -0
  390. xyp/operations/payment/__init__.py +4 -0
  391. xyp/operations/payment/check_transaction_info.py +114 -0
  392. xyp/operations/payment/citizen_bs_loan_info.py +102 -0
  393. xyp/operations/payment/citizen_create_invoice.py +118 -0
  394. xyp/operations/payment/citizen_fico_info.py +127 -0
  395. xyp/operations/payment/citizen_loan_info.py +74 -0
  396. xyp/operations/payment/citizen_loan_info_titan.py +167 -0
  397. xyp/operations/payment/court_decision_return.py +120 -0
  398. xyp/operations/payment/credit_score_nd_salary_income.py +80 -0
  399. xyp/operations/payment/exchange_rate.py +83 -0
  400. xyp/operations/payment/get_all_authority_info.py +121 -0
  401. xyp/operations/payment/get_list_of_ett_dividend_info.py +74 -0
  402. xyp/operations/payment/invoice_number_uth_payment_service.py +141 -0
  403. xyp/operations/payment/invoice_payment_info_service.py +87 -0
  404. xyp/operations/payment/invoice_payment_inquiry_servicer.py +121 -0
  405. xyp/operations/payment/invoice_status_service.py +84 -0
  406. xyp/operations/payment/legal_entity_bs_loan_info.py +117 -0
  407. xyp/operations/payment/orgenzation_loan_info_titan.py +116 -0
  408. xyp/operations/payment/overdue_citizen_loan_debt_reference.py +87 -0
  409. xyp/operations/payment/overdue_organization_loan_debt_reference.py +87 -0
  410. xyp/operations/payment/paid_fine_by_register_service.py +137 -0
  411. xyp/operations/payment/paid_fine_service.py +137 -0
  412. xyp/operations/payment/payment_info_by_register_service.py +161 -0
  413. xyp/operations/payment/payment_order_invoice_generator.py +154 -0
  414. xyp/operations/payment/payment_received.py +145 -0
  415. xyp/operations/payment/payment_verification_service.py +74 -0
  416. xyp/operations/payment/person_loan_info_titan.py +120 -0
  417. xyp/operations/payment/qr_code_generation_for_payment_orders_service.py +83 -0
  418. xyp/operations/payment/tax_payer_info.py +87 -0
  419. xyp/operations/payment/tax_receipt_bank_by_regnum.py +138 -0
  420. xyp/operations/payment/unpaid_fine_by_register_service.py +137 -0
  421. xyp/operations/payment/unpaid_fine_service.py +137 -0
  422. xyp/operations/payment/violation_payment_by_plate_number.py +291 -0
  423. xyp/operations/payment/violation_payment_by_regnum.py +289 -0
  424. xyp/operations/pki/__init__.py +4 -0
  425. xyp/operations/pki/certificate_info.py +87 -0
  426. xyp/operations/private_service/__init__.py +4 -0
  427. xyp/operations/private_service/check_kindergarten_enrollment.py +115 -0
  428. xyp/operations/private_service/children_info_by_parent_civil_id.py +172 -0
  429. xyp/operations/private_service/id_card_info_em.py +167 -0
  430. xyp/operations/private_service/kindergarten_description.py +88 -0
  431. xyp/operations/private_service/result_kindergarten_enrollment.py +98 -0
  432. xyp/operations/private_service/send_kindergarten_enrollment.py +293 -0
  433. xyp/operations/property/__init__.py +4 -0
  434. xyp/operations/property/cadastre_applicant_status_info.py +97 -0
  435. xyp/operations/property/electric_requirement_request.py +215 -0
  436. xyp/operations/property/electric_requirement_request_details.py +160 -0
  437. xyp/operations/property/electric_requirement_request_hold.py +72 -0
  438. xyp/operations/property/electric_requirement_request_list.py +125 -0
  439. xyp/operations/property/electric_requirement_request_remove.py +72 -0
  440. xyp/operations/property/get_bank_property_inquiry.py +110 -0
  441. xyp/operations/property/get_cadastral_map.py +72 -0
  442. xyp/operations/property/get_property_info.py +118 -0
  443. xyp/operations/property/get_property_info_by_national_property_number_eng.py +82 -0
  444. xyp/operations/property/get_property_info_certificate.py +80 -0
  445. xyp/operations/property/get_property_info_eng.py +92 -0
  446. xyp/operations/property/get_property_list.py +95 -0
  447. xyp/operations/property/get_property_type_list.py +147 -0
  448. xyp/operations/property/has_bank_property_inquiry.py +109 -0
  449. xyp/operations/property/is_property_check.py +73 -0
  450. xyp/operations/property/land_cadastral_map_info.py +110 -0
  451. xyp/operations/property/land_cadastre_agreement_info.py +111 -0
  452. xyp/operations/property/land_cadastre_applicant_info.py +103 -0
  453. xyp/operations/property/land_cadastre_qr.py +72 -0
  454. xyp/operations/property/land_cadastre_vicinity_info.py +111 -0
  455. xyp/operations/property/land_info_by_person_id_and_parcel_id.py +190 -0
  456. xyp/operations/property/land_owning_certificate_info.py +117 -0
  457. xyp/operations/property/land_owning_contract_info.py +147 -0
  458. xyp/operations/property/land_owning_decision_info.py +101 -0
  459. xyp/operations/property/land_settlement_act.py +148 -0
  460. xyp/operations/property/property_details_between_date.py +128 -0
  461. xyp/operations/property/property_info_eng.py +114 -0
  462. xyp/operations/property/property_value_info.py +75 -0
  463. xyp/operations/property/umns_property_info.py +90 -0
  464. xyp/operations/statistic/__init__.py +4 -0
  465. xyp/operations/statistic/additional_survey_service.py +124 -0
  466. xyp/operations/statistic/change_name_info.py +93 -0
  467. xyp/operations/statistic/change_register_info.py +86 -0
  468. xyp/operations/statistic/citizen_address_info.py +99 -0
  469. xyp/operations/statistic/citizen_and_legal_entity_livestock_info.py +93 -0
  470. xyp/operations/statistic/citizen_and_legal_entity_livestock_info_ws200135.py +105 -0
  471. xyp/operations/statistic/citizen_feedback_verify.py +88 -0
  472. xyp/operations/statistic/citizen_info.py +81 -0
  473. xyp/operations/statistic/citizen_livestock_info.py +102 -0
  474. xyp/operations/statistic/citizen_livestock_list.py +175 -0
  475. xyp/operations/statistic/citizen_pasture_info.py +187 -0
  476. xyp/operations/statistic/citizen_statistic_info.py +103 -0
  477. xyp/operations/statistic/citizen_suggestion_info.py +295 -0
  478. xyp/operations/statistic/delete_additional_survey_service.py +76 -0
  479. xyp/operations/statistic/delete_livestock_tax_survey_service.py +76 -0
  480. xyp/operations/statistic/get_household_info.py +175 -0
  481. xyp/operations/statistic/get_imei_lost_device_list.py +96 -0
  482. xyp/operations/statistic/get_livestock_tax_type.py +81 -0
  483. xyp/operations/statistic/ldfunded_survey_service.py +94 -0
  484. xyp/operations/statistic/legal_entity_livestock_info.py +93 -0
  485. xyp/operations/statistic/legal_entity_livestock_list.py +82 -0
  486. xyp/operations/statistic/livestock_tax_survey_service.py +106 -0
  487. xyp/operations/statistic/umns_household_info.py +106 -0
  488. xyp/operations/statistic/umns_livestock_info.py +77 -0
  489. xyp/operations/tax/__init__.py +4 -0
  490. xyp/operations/tax/citizen_tax_report_info.py +147 -0
  491. xyp/operations/tax/get_individual_info.py +116 -0
  492. xyp/operations/tax/get_organization_info.py +119 -0
  493. xyp/operations/tax/get_vehicle_paid_tax_history.py +110 -0
  494. xyp/operations/tax/licensing_info.py +154 -0
  495. xyp/operations/tax/tax_payment_service.py +108 -0
  496. xyp/operations/tax/tax_payment_verification_service.py +80 -0
  497. xyp/operations/tax/trade_info.py +151 -0
  498. xyp/operations/tax/unpaid_tax_information_service.py +135 -0
  499. xyp/operations/transport/__init__.py +4 -0
  500. xyp/operations/transport/border_registered_passengers.py +181 -0
  501. xyp/operations/transport/border_registered_transport.py +150 -0
  502. xyp/operations/transport/check_border_permit_vehicle.py +113 -0
  503. xyp/operations/transport/check_ecl_icense_from_kiosk.py +87 -0
  504. xyp/operations/transport/driver_license_ordered_log.py +71 -0
  505. xyp/operations/transport/ec_license_cancel.py +78 -0
  506. xyp/operations/transport/ec_license_checker.py +82 -0
  507. xyp/operations/transport/ec_license_creator.py +111 -0
  508. xyp/operations/transport/freight_transport_train_document_detail.py +108 -0
  509. xyp/operations/transport/freight_transport_train_document_list.py +92 -0
  510. xyp/operations/transport/get_citizen_vehicle_list.py +168 -0
  511. xyp/operations/transport/get_driver_info_with_register_and_license.py +125 -0
  512. xyp/operations/transport/get_driver_license_info.py +176 -0
  513. xyp/operations/transport/get_fine_info_using_fine_number.py +97 -0
  514. xyp/operations/transport/get_international_driver_info.py +106 -0
  515. xyp/operations/transport/get_organization_vehicle_list.py +171 -0
  516. xyp/operations/transport/get_pre_owned_org_vehicle_total.py +74 -0
  517. xyp/operations/transport/get_pre_owned_vehicle.py +107 -0
  518. xyp/operations/transport/get_pre_owned_vehicle_with_org_regnum.py +105 -0
  519. xyp/operations/transport/get_reserved_number_list.py +88 -0
  520. xyp/operations/transport/get_saved_number_list.py +88 -0
  521. xyp/operations/transport/get_vehicle_info.py +169 -0
  522. xyp/operations/transport/get_vehicle_inspection_data_by_plate_no.py +89 -0
  523. xyp/operations/transport/get_vehicle_inspection_info.py +82 -0
  524. xyp/operations/transport/get_vehicle_owner_history_list.py +109 -0
  525. xyp/operations/transport/get_vehicle_penalty_list.py +96 -0
  526. xyp/operations/transport/order_driver_license.py +192 -0
  527. xyp/operations/transport/pensioner_transport_service.py +100 -0
  528. xyp/operations/transport/plate_border_info.py +124 -0
  529. xyp/operations/transport/police_ec_license_checker.py +82 -0
  530. xyp/operations/transport/product_list.py +81 -0
  531. xyp/operations/transport/sas_company_info_list.py +70 -0
  532. xyp/operations/transport/special_driver_info.py +118 -0
  533. xyp/operations/transport/toll_invoice_details.py +99 -0
  534. xyp/operations/transport/train_border_info.py +126 -0
  535. xyp/operations/transport/transport_company_create_worker.py +253 -0
  536. xyp/operations/transport/transport_company_employee_list.py +88 -0
  537. xyp/operations/transport/transport_company_list.py +110 -0
  538. xyp/operations/transport/transport_company_route_list.py +94 -0
  539. xyp/operations/transport/transport_company_vehicles_list.py +97 -0
  540. xyp/operations/transport/umns_vehicle_info.py +92 -0
  541. xyp/operations/transport/unlicensed_vehicles_list.py +240 -0
  542. xyp/operations/transport/vehicle_and_driver_border_report.py +80 -0
  543. xyp/operations/transport/vehicle_border_info.py +128 -0
  544. xyp/operations/transport/vehicle_certificate.py +174 -0
  545. xyp/operations/transport/vehicle_legal_entity_info.py +227 -0
  546. xyp/operations/transport/vehicle_legal_entity_total.py +74 -0
  547. xyp/operations/transport/vehicle_tax_info_service.py +107 -0
  548. xyp/py.typed +0 -0
  549. xyp/services/__init__.py +4 -0
  550. xyp/services/citizen.py +516 -0
  551. xyp/services/education.py +147 -0
  552. xyp/services/foreign_service.py +57 -0
  553. xyp/services/government_service.py +349 -0
  554. xyp/services/health.py +479 -0
  555. xyp/services/insurance.py +424 -0
  556. xyp/services/labor_welfare.py +126 -0
  557. xyp/services/legal_entity.py +136 -0
  558. xyp/services/meta.py +51 -0
  559. xyp/services/payment.py +224 -0
  560. xyp/services/pki.py +24 -0
  561. xyp/services/private_service.py +57 -0
  562. xyp/services/property.py +195 -0
  563. xyp/services/statistic.py +151 -0
  564. xyp/services/tax.py +70 -0
  565. xyp/services/transport.py +309 -0
  566. xyp-0.1.0.dist-info/METADATA +245 -0
  567. xyp-0.1.0.dist-info/RECORD +569 -0
  568. xyp-0.1.0.dist-info/WHEEL +4 -0
  569. xyp-0.1.0.dist-info/licenses/LICENSE +21 -0
xyp/__init__.py ADDED
@@ -0,0 +1,60 @@
1
+ """Typed Python SDK for XYP (ХУР), Mongolia's government data exchange system.
2
+
3
+ from xyp import Xyp
4
+
5
+ xyp = Xyp(access_token="...", private_key="private.key")
6
+ card = xyp.citizen.get_citizen_id_card_info(regnum="...")
7
+ """
8
+
9
+ from importlib.metadata import version
10
+
11
+ from xyp._client import AsyncXyp, Xyp
12
+ from xyp._models import Mismatch, XypModel, XypModelMismatchWarning
13
+ from xyp.auth import AuthType, CitizenAuth, OperatorAuth
14
+ from xyp.errors import (
15
+ AccessDeniedError,
16
+ AuthRequiredError,
17
+ CitizenDataError,
18
+ FingerprintError,
19
+ InternalError,
20
+ InvalidRequestError,
21
+ NotFoundError,
22
+ ProviderError,
23
+ SignatureError,
24
+ XypApiError,
25
+ XypConfigError,
26
+ XypConnectionError,
27
+ XypError,
28
+ XypResponseError,
29
+ XypTimeoutError,
30
+ XypValidationError,
31
+ )
32
+
33
+ __version__ = version("xyp")
34
+
35
+ __all__ = [
36
+ "AccessDeniedError",
37
+ "AsyncXyp",
38
+ "AuthRequiredError",
39
+ "AuthType",
40
+ "CitizenAuth",
41
+ "CitizenDataError",
42
+ "FingerprintError",
43
+ "InternalError",
44
+ "InvalidRequestError",
45
+ "Mismatch",
46
+ "NotFoundError",
47
+ "OperatorAuth",
48
+ "ProviderError",
49
+ "SignatureError",
50
+ "Xyp",
51
+ "XypApiError",
52
+ "XypConfigError",
53
+ "XypConnectionError",
54
+ "XypError",
55
+ "XypModel",
56
+ "XypModelMismatchWarning",
57
+ "XypResponseError",
58
+ "XypTimeoutError",
59
+ "XypValidationError",
60
+ ]
xyp/_client.py ADDED
@@ -0,0 +1,176 @@
1
+ """The two entry points: `Xyp` (sync) and `AsyncXyp` (async)."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import os
6
+ from collections.abc import Mapping
7
+ from types import TracebackType
8
+ from typing import Any
9
+
10
+ import httpx
11
+ from typing_extensions import Self
12
+
13
+ from xyp._groups import AsyncGroups, SyncGroups
14
+ from xyp._signer import PrivateKeySource, Signer
15
+ from xyp._tls import Verify, build_verify
16
+ from xyp._transport import DEFAULT_BASE_URL, DEFAULT_TIMEOUT_SECONDS, AsyncTransport, SyncTransport
17
+ from xyp.auth import CitizenAuth, OperatorAuth
18
+ from xyp.errors import XypConfigError
19
+
20
+ ACCESS_TOKEN_ENV = "XYP_ACCESS_TOKEN" # noqa: S105 - the variable's name, not a token
21
+ PRIVATE_KEY_ENV = "XYP_PRIVATE_KEY"
22
+
23
+
24
+ def _checked_base_url(base_url: str) -> str:
25
+ if not base_url.lower().startswith(("https://", "http://")):
26
+ raise XypConfigError(f"base_url must start with https:// (or http://), got {base_url!r}")
27
+ return base_url
28
+
29
+
30
+ def _signer_from(
31
+ access_token: str | None,
32
+ private_key: PrivateKeySource | None,
33
+ private_key_password: bytes | None,
34
+ ) -> Signer:
35
+ token = access_token or os.environ.get(ACCESS_TOKEN_ENV)
36
+ key = private_key or os.environ.get(PRIVATE_KEY_ENV)
37
+ if not token:
38
+ raise XypConfigError(
39
+ f"Pass access_token= or set the {ACCESS_TOKEN_ENV} environment variable"
40
+ )
41
+ if not key:
42
+ raise XypConfigError(
43
+ f"Pass private_key= (path, PEM text or bytes) or set {PRIVATE_KEY_ENV} to the key path"
44
+ )
45
+ return Signer(token, key, private_key_password)
46
+
47
+
48
+ class Xyp(SyncGroups):
49
+ """Synchronous XYP client.
50
+
51
+ xyp = Xyp(access_token="...", private_key="path/to/private.key")
52
+ card = xyp.citizen.get_citizen_id_card_info(regnum="...")
53
+
54
+ Services are grouped by XYP endpoint (`xyp.citizen`, `xyp.insurance`, ...).
55
+ Reuse one client: it keeps a connection pool. Use it as a context manager or
56
+ call `close()` when done.
57
+
58
+ Args:
59
+ access_token: Token issued by the National Data Center. Falls back to `XYP_ACCESS_TOKEN`.
60
+ private_key: RSA key as a file path, PEM text or PEM/DER bytes.
61
+ Falls back to the path in `XYP_PRIVATE_KEY`.
62
+ private_key_password: Password of an encrypted key.
63
+ base_url: Change only when you reach XYP through your own proxy.
64
+ timeout: Seconds to wait for XYP.
65
+ verify: `True` verifies against the bundled Mongolian national CAs. Pass a CA
66
+ bundle path or an `ssl.SSLContext` for a proxy, or `False` to disable
67
+ verification (see docs/tls.md before you do).
68
+ http_client: Bring your own `httpx.Client`; `timeout` and `verify` are then yours
69
+ to configure and the client is not closed by this object.
70
+ """
71
+
72
+ def __init__(
73
+ self,
74
+ *,
75
+ access_token: str | None = None,
76
+ private_key: PrivateKeySource | None = None,
77
+ private_key_password: bytes | None = None,
78
+ base_url: str = DEFAULT_BASE_URL,
79
+ timeout: float = DEFAULT_TIMEOUT_SECONDS,
80
+ verify: Verify = True,
81
+ http_client: httpx.Client | None = None,
82
+ ) -> None:
83
+ signer = _signer_from(access_token, private_key, private_key_password)
84
+ self._owns_client = http_client is None
85
+ client = http_client or httpx.Client(timeout=timeout, verify=build_verify(verify))
86
+ self._transport = SyncTransport(signer, _checked_base_url(base_url), client)
87
+
88
+ def call(
89
+ self,
90
+ operation: str,
91
+ params: Mapping[str, Any] | None = None,
92
+ *,
93
+ auth: CitizenAuth | None = None,
94
+ operator: OperatorAuth | None = None,
95
+ endpoint: str | None = None,
96
+ ) -> Any:
97
+ """Call a service by its original XYP name and get the raw response data.
98
+
99
+ xyp.call("WS100101_getCitizenIDCardInfo", {"regnum": "..."})
100
+
101
+ `params` uses XYP's own field names. Pass `endpoint="citizen-1.5.0"` for a
102
+ service that is newer than this SDK version.
103
+ """
104
+ return self._transport.call(operation, params or {}, auth, operator, endpoint)
105
+
106
+ def close(self) -> None:
107
+ if self._owns_client:
108
+ self._transport.close()
109
+
110
+ def __enter__(self) -> Self:
111
+ return self
112
+
113
+ def __exit__(
114
+ self,
115
+ exc_type: type[BaseException] | None,
116
+ exc: BaseException | None,
117
+ traceback: TracebackType | None,
118
+ ) -> None:
119
+ self.close()
120
+
121
+ def __repr__(self) -> str:
122
+ return "Xyp(access_token=***)"
123
+
124
+
125
+ class AsyncXyp(AsyncGroups):
126
+ """Asynchronous XYP client. Same options and services as `Xyp`, awaited:
127
+
128
+ async with AsyncXyp(access_token="...", private_key="private.key") as xyp:
129
+ card = await xyp.citizen.get_citizen_id_card_info(regnum="...")
130
+ """
131
+
132
+ def __init__(
133
+ self,
134
+ *,
135
+ access_token: str | None = None,
136
+ private_key: PrivateKeySource | None = None,
137
+ private_key_password: bytes | None = None,
138
+ base_url: str = DEFAULT_BASE_URL,
139
+ timeout: float = DEFAULT_TIMEOUT_SECONDS,
140
+ verify: Verify = True,
141
+ http_client: httpx.AsyncClient | None = None,
142
+ ) -> None:
143
+ signer = _signer_from(access_token, private_key, private_key_password)
144
+ self._owns_client = http_client is None
145
+ client = http_client or httpx.AsyncClient(timeout=timeout, verify=build_verify(verify))
146
+ self._transport = AsyncTransport(signer, _checked_base_url(base_url), client)
147
+
148
+ async def call(
149
+ self,
150
+ operation: str,
151
+ params: Mapping[str, Any] | None = None,
152
+ *,
153
+ auth: CitizenAuth | None = None,
154
+ operator: OperatorAuth | None = None,
155
+ endpoint: str | None = None,
156
+ ) -> Any:
157
+ """Async twin of `Xyp.call`."""
158
+ return await self._transport.call(operation, params or {}, auth, operator, endpoint)
159
+
160
+ async def close(self) -> None:
161
+ if self._owns_client:
162
+ await self._transport.close()
163
+
164
+ async def __aenter__(self) -> Self:
165
+ return self
166
+
167
+ async def __aexit__(
168
+ self,
169
+ exc_type: type[BaseException] | None,
170
+ exc: BaseException | None,
171
+ traceback: TracebackType | None,
172
+ ) -> None:
173
+ await self.close()
174
+
175
+ def __repr__(self) -> str:
176
+ return "AsyncXyp(access_token=***)"
xyp/_groups.py ADDED
@@ -0,0 +1,264 @@
1
+ """GENERATED by xyp-generator from spec/services.json. Do not edit.
2
+
3
+ Service groups are imported on first access so `import xyp` stays fast.
4
+ """
5
+
6
+ from __future__ import annotations
7
+
8
+ from functools import cached_property
9
+ from typing import TYPE_CHECKING
10
+
11
+ from xyp._transport import AsyncTransport, SyncTransport
12
+
13
+ if TYPE_CHECKING:
14
+ from xyp.services.citizen import AsyncCitizenService, CitizenService
15
+ from xyp.services.education import AsyncEducationService, EducationService
16
+ from xyp.services.foreign_service import AsyncForeignServiceService, ForeignServiceService
17
+ from xyp.services.government_service import (
18
+ AsyncGovernmentServiceService,
19
+ GovernmentServiceService,
20
+ )
21
+ from xyp.services.health import AsyncHealthService, HealthService
22
+ from xyp.services.insurance import AsyncInsuranceService, InsuranceService
23
+ from xyp.services.labor_welfare import AsyncLaborWelfareService, LaborWelfareService
24
+ from xyp.services.legal_entity import AsyncLegalEntityService, LegalEntityService
25
+ from xyp.services.meta import AsyncMetaService, MetaService
26
+ from xyp.services.payment import AsyncPaymentService, PaymentService
27
+ from xyp.services.pki import AsyncPkiService, PkiService
28
+ from xyp.services.private_service import AsyncPrivateServiceService, PrivateServiceService
29
+ from xyp.services.property import AsyncPropertyService, PropertyService
30
+ from xyp.services.statistic import AsyncStatisticService, StatisticService
31
+ from xyp.services.tax import AsyncTaxService, TaxService
32
+ from xyp.services.transport import AsyncTransportService, TransportService
33
+
34
+
35
+ class SyncGroups:
36
+ _transport: SyncTransport
37
+
38
+ @cached_property
39
+ def citizen(self) -> CitizenService:
40
+ """83 services served from citizen-1.5.0."""
41
+ from xyp.services.citizen import CitizenService
42
+
43
+ return CitizenService(self._transport)
44
+
45
+ @cached_property
46
+ def education(self) -> EducationService:
47
+ """18 services served from education-1.3.0, education-1.5.0."""
48
+ from xyp.services.education import EducationService
49
+
50
+ return EducationService(self._transport)
51
+
52
+ @cached_property
53
+ def foreign_service(self) -> ForeignServiceService:
54
+ """6 services served from foreign-service-1.5.0."""
55
+ from xyp.services.foreign_service import ForeignServiceService
56
+
57
+ return ForeignServiceService(self._transport)
58
+
59
+ @cached_property
60
+ def government_service(self) -> GovernmentServiceService:
61
+ """54 services served from government-service-1.5.0."""
62
+ from xyp.services.government_service import GovernmentServiceService
63
+
64
+ return GovernmentServiceService(self._transport)
65
+
66
+ @cached_property
67
+ def health(self) -> HealthService:
68
+ """76 services served from health-1.5.0."""
69
+ from xyp.services.health import HealthService
70
+
71
+ return HealthService(self._transport)
72
+
73
+ @cached_property
74
+ def insurance(self) -> InsuranceService:
75
+ """67 services served from insurance-1.5.0."""
76
+ from xyp.services.insurance import InsuranceService
77
+
78
+ return InsuranceService(self._transport)
79
+
80
+ @cached_property
81
+ def labor_welfare(self) -> LaborWelfareService:
82
+ """19 services served from labor-welfare-1.5.0."""
83
+ from xyp.services.labor_welfare import LaborWelfareService
84
+
85
+ return LaborWelfareService(self._transport)
86
+
87
+ @cached_property
88
+ def legal_entity(self) -> LegalEntityService:
89
+ """19 services served from legal-entity-1.5.0."""
90
+ from xyp.services.legal_entity import LegalEntityService
91
+
92
+ return LegalEntityService(self._transport)
93
+
94
+ @cached_property
95
+ def meta(self) -> MetaService:
96
+ """6 services served from meta-1.5.0."""
97
+ from xyp.services.meta import MetaService
98
+
99
+ return MetaService(self._transport)
100
+
101
+ @cached_property
102
+ def payment(self) -> PaymentService:
103
+ """33 services served from payment-1.5.0."""
104
+ from xyp.services.payment import PaymentService
105
+
106
+ return PaymentService(self._transport)
107
+
108
+ @cached_property
109
+ def pki(self) -> PkiService:
110
+ """1 services served from pki-1.5.0."""
111
+ from xyp.services.pki import PkiService
112
+
113
+ return PkiService(self._transport)
114
+
115
+ @cached_property
116
+ def private_service(self) -> PrivateServiceService:
117
+ """6 services served from private-service-1.5.0."""
118
+ from xyp.services.private_service import PrivateServiceService
119
+
120
+ return PrivateServiceService(self._transport)
121
+
122
+ @cached_property
123
+ def property(self) -> PropertyService:
124
+ """30 services served from property-1.5.0."""
125
+ from xyp.services.property import PropertyService
126
+
127
+ return PropertyService(self._transport)
128
+
129
+ @cached_property
130
+ def statistic(self) -> StatisticService:
131
+ """24 services served from statistic-1.5.0."""
132
+ from xyp.services.statistic import StatisticService
133
+
134
+ return StatisticService(self._transport)
135
+
136
+ @cached_property
137
+ def tax(self) -> TaxService:
138
+ """9 services served from tax-1.5.0."""
139
+ from xyp.services.tax import TaxService
140
+
141
+ return TaxService(self._transport)
142
+
143
+ @cached_property
144
+ def transport(self) -> TransportService:
145
+ """48 services served from transport-1.5.0."""
146
+ from xyp.services.transport import TransportService
147
+
148
+ return TransportService(self._transport)
149
+
150
+
151
+ class AsyncGroups:
152
+ _transport: AsyncTransport
153
+
154
+ @cached_property
155
+ def citizen(self) -> AsyncCitizenService:
156
+ """83 services served from citizen-1.5.0."""
157
+ from xyp.services.citizen import AsyncCitizenService
158
+
159
+ return AsyncCitizenService(self._transport)
160
+
161
+ @cached_property
162
+ def education(self) -> AsyncEducationService:
163
+ """18 services served from education-1.3.0, education-1.5.0."""
164
+ from xyp.services.education import AsyncEducationService
165
+
166
+ return AsyncEducationService(self._transport)
167
+
168
+ @cached_property
169
+ def foreign_service(self) -> AsyncForeignServiceService:
170
+ """6 services served from foreign-service-1.5.0."""
171
+ from xyp.services.foreign_service import AsyncForeignServiceService
172
+
173
+ return AsyncForeignServiceService(self._transport)
174
+
175
+ @cached_property
176
+ def government_service(self) -> AsyncGovernmentServiceService:
177
+ """54 services served from government-service-1.5.0."""
178
+ from xyp.services.government_service import AsyncGovernmentServiceService
179
+
180
+ return AsyncGovernmentServiceService(self._transport)
181
+
182
+ @cached_property
183
+ def health(self) -> AsyncHealthService:
184
+ """76 services served from health-1.5.0."""
185
+ from xyp.services.health import AsyncHealthService
186
+
187
+ return AsyncHealthService(self._transport)
188
+
189
+ @cached_property
190
+ def insurance(self) -> AsyncInsuranceService:
191
+ """67 services served from insurance-1.5.0."""
192
+ from xyp.services.insurance import AsyncInsuranceService
193
+
194
+ return AsyncInsuranceService(self._transport)
195
+
196
+ @cached_property
197
+ def labor_welfare(self) -> AsyncLaborWelfareService:
198
+ """19 services served from labor-welfare-1.5.0."""
199
+ from xyp.services.labor_welfare import AsyncLaborWelfareService
200
+
201
+ return AsyncLaborWelfareService(self._transport)
202
+
203
+ @cached_property
204
+ def legal_entity(self) -> AsyncLegalEntityService:
205
+ """19 services served from legal-entity-1.5.0."""
206
+ from xyp.services.legal_entity import AsyncLegalEntityService
207
+
208
+ return AsyncLegalEntityService(self._transport)
209
+
210
+ @cached_property
211
+ def meta(self) -> AsyncMetaService:
212
+ """6 services served from meta-1.5.0."""
213
+ from xyp.services.meta import AsyncMetaService
214
+
215
+ return AsyncMetaService(self._transport)
216
+
217
+ @cached_property
218
+ def payment(self) -> AsyncPaymentService:
219
+ """33 services served from payment-1.5.0."""
220
+ from xyp.services.payment import AsyncPaymentService
221
+
222
+ return AsyncPaymentService(self._transport)
223
+
224
+ @cached_property
225
+ def pki(self) -> AsyncPkiService:
226
+ """1 services served from pki-1.5.0."""
227
+ from xyp.services.pki import AsyncPkiService
228
+
229
+ return AsyncPkiService(self._transport)
230
+
231
+ @cached_property
232
+ def private_service(self) -> AsyncPrivateServiceService:
233
+ """6 services served from private-service-1.5.0."""
234
+ from xyp.services.private_service import AsyncPrivateServiceService
235
+
236
+ return AsyncPrivateServiceService(self._transport)
237
+
238
+ @cached_property
239
+ def property(self) -> AsyncPropertyService:
240
+ """30 services served from property-1.5.0."""
241
+ from xyp.services.property import AsyncPropertyService
242
+
243
+ return AsyncPropertyService(self._transport)
244
+
245
+ @cached_property
246
+ def statistic(self) -> AsyncStatisticService:
247
+ """24 services served from statistic-1.5.0."""
248
+ from xyp.services.statistic import AsyncStatisticService
249
+
250
+ return AsyncStatisticService(self._transport)
251
+
252
+ @cached_property
253
+ def tax(self) -> AsyncTaxService:
254
+ """9 services served from tax-1.5.0."""
255
+ from xyp.services.tax import AsyncTaxService
256
+
257
+ return AsyncTaxService(self._transport)
258
+
259
+ @cached_property
260
+ def transport(self) -> AsyncTransportService:
261
+ """48 services served from transport-1.5.0."""
262
+ from xyp.services.transport import AsyncTransportService
263
+
264
+ return AsyncTransportService(self._transport)