fiuai-sdk-python 0.3.2__tar.gz → 0.3.3__tar.gz

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 (24) hide show
  1. {fiuai_sdk_python-0.3.2 → fiuai_sdk_python-0.3.3}/PKG-INFO +1 -1
  2. {fiuai_sdk_python-0.3.2 → fiuai_sdk_python-0.3.3}/pyproject.toml +1 -1
  3. {fiuai_sdk_python-0.3.2 → fiuai_sdk_python-0.3.3}/src/fiuai_sdk_python/bank.py +3 -1
  4. {fiuai_sdk_python-0.3.2 → fiuai_sdk_python-0.3.3}/src/fiuai_sdk_python/company.py +8 -8
  5. {fiuai_sdk_python-0.3.2 → fiuai_sdk_python-0.3.3}/src/fiuai_sdk_python/item.py +1 -1
  6. {fiuai_sdk_python-0.3.2 → fiuai_sdk_python-0.3.3}/.gitignore +0 -0
  7. {fiuai_sdk_python-0.3.2 → fiuai_sdk_python-0.3.3}/CHANGELOG.md +0 -0
  8. {fiuai_sdk_python-0.3.2 → fiuai_sdk_python-0.3.3}/LICENSE +0 -0
  9. {fiuai_sdk_python-0.3.2 → fiuai_sdk_python-0.3.3}/README.md +0 -0
  10. {fiuai_sdk_python-0.3.2 → fiuai_sdk_python-0.3.3}/src/fiuai_sdk_python/__init__.py +0 -0
  11. {fiuai_sdk_python-0.3.2 → fiuai_sdk_python-0.3.3}/src/fiuai_sdk_python/auth/__init__.py +0 -0
  12. {fiuai_sdk_python-0.3.2 → fiuai_sdk_python-0.3.3}/src/fiuai_sdk_python/auth/header.py +0 -0
  13. {fiuai_sdk_python-0.3.2 → fiuai_sdk_python-0.3.3}/src/fiuai_sdk_python/auth/helper.py +0 -0
  14. {fiuai_sdk_python-0.3.2 → fiuai_sdk_python-0.3.3}/src/fiuai_sdk_python/auth/test_auth.py +0 -0
  15. {fiuai_sdk_python-0.3.2 → fiuai_sdk_python-0.3.3}/src/fiuai_sdk_python/auth/type.py +0 -0
  16. {fiuai_sdk_python-0.3.2 → fiuai_sdk_python-0.3.3}/src/fiuai_sdk_python/client.py +0 -0
  17. {fiuai_sdk_python-0.3.2 → fiuai_sdk_python-0.3.3}/src/fiuai_sdk_python/const.py +0 -0
  18. {fiuai_sdk_python-0.3.2 → fiuai_sdk_python-0.3.3}/src/fiuai_sdk_python/error.py +0 -0
  19. {fiuai_sdk_python-0.3.2 → fiuai_sdk_python-0.3.3}/src/fiuai_sdk_python/perm.py +0 -0
  20. {fiuai_sdk_python-0.3.2 → fiuai_sdk_python-0.3.3}/src/fiuai_sdk_python/profile.py +0 -0
  21. {fiuai_sdk_python-0.3.2 → fiuai_sdk_python-0.3.3}/src/fiuai_sdk_python/setup.py +0 -0
  22. {fiuai_sdk_python-0.3.2 → fiuai_sdk_python-0.3.3}/src/fiuai_sdk_python/test_all.py +0 -0
  23. {fiuai_sdk_python-0.3.2 → fiuai_sdk_python-0.3.3}/src/fiuai_sdk_python/type.py +0 -0
  24. {fiuai_sdk_python-0.3.2 → fiuai_sdk_python-0.3.3}/src/fiuai_sdk_python/util.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fiuai_sdk_python
3
- Version: 0.3.2
3
+ Version: 0.3.3
4
4
  Summary: FiuAI Python SDK - 企业级AI服务集成开发工具包
5
5
  Project-URL: Homepage, https://github.com/fiuai/fiuai-sdk-python
6
6
  Project-URL: Documentation, https://github.com/fiuai/fiuai-sdk-python#readme
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "fiuai_sdk_python"
3
- version = "0.3.2"
3
+ version = "0.3.3"
4
4
  description = "FiuAI Python SDK - 企业级AI服务集成开发工具包"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.12"
@@ -93,7 +93,7 @@ def get_bank_account_by_bank_id(client: FiuaiSDK, bank_id: str) -> BankAccount|N
93
93
  """
94
94
  根据银行账号id获取银行账号信息
95
95
  """
96
- resp = client.internal_get(
96
+ resp = client.internal_get_list(
97
97
  doctype="Bank Account",
98
98
  filters=[["name", "=", bank_id]],
99
99
  fields=[
@@ -107,6 +107,8 @@ def get_bank_account_by_bank_id(client: FiuaiSDK, bank_id: str) -> BankAccount|N
107
107
 
108
108
  if not resp:
109
109
  return None
110
+
111
+ resp = resp[0]
110
112
 
111
113
  # 获取支行信息
112
114
  bank_branch = ""
@@ -36,7 +36,7 @@ def get_target_company_by_name(client: FiuaiSDK, full_name: str, target_side: Li
36
36
  """
37
37
  connection_type = "Customer" if target_side == "buyer" else "Supplier"
38
38
 
39
- _lookup = client.internal_get(
39
+ _lookup = client.internal_get_list(
40
40
  doctype="Company Lookup",
41
41
  fields=["target_company_id", "unique_no"],
42
42
  filters=[["company_name", "=", full_name]])
@@ -45,19 +45,19 @@ def get_target_company_by_name(client: FiuaiSDK, full_name: str, target_side: Li
45
45
  return TargetCompanySearchResult(name="", full_name="", unique_no="", exists=False, in_network=False, comment="该公司不存在")
46
46
 
47
47
 
48
- _network = client.internal_get(
48
+ _network = client.internal_get_list(
49
49
  doctype="Company Network",
50
50
  fields=["name", "target_company_id", "target_company"],
51
- filters=[["target_company_id", "=", _lookup["target_company_id"]], ["connection_type", "=", connection_type]])
51
+ filters=[["target_company_id", "=", _lookup[0]["target_company_id"]], ["connection_type", "=", connection_type]])
52
52
  if not _network:
53
53
  logger.debug(f"get_target_company_by_name: {full_name} is not in network")
54
54
  return TargetCompanySearchResult(name="", full_name="", unique_no="", exists=True, in_network=False, comment="该公司不在本方网络中")
55
55
 
56
56
 
57
57
  n = TargetCompanySearchResult(
58
- name=_network["target_company_id"],
59
- full_name=_network["target_company"],
60
- unique_no=_lookup["unique_no"],
58
+ name=_network[0]["target_company_id"],
59
+ full_name=_network[0]["target_company"],
60
+ unique_no=_lookup[0]["unique_no"],
61
61
  exists=True,
62
62
  in_network=True,
63
63
  comment="",
@@ -70,7 +70,7 @@ def get_company_profile(client: FiuaiSDK, auth_company_id: str)-> CompanyProfile
70
70
  """
71
71
  获取公司信息
72
72
  """
73
- resp = client.internal_get(
73
+ resp = client.internal_get_list(
74
74
  doctype="Company",
75
75
  filters=[["name", "=", auth_company_id]],
76
76
  fields=[
@@ -95,7 +95,7 @@ def get_company_profile(client: FiuaiSDK, auth_company_id: str)-> CompanyProfile
95
95
  if not resp:
96
96
  return None
97
97
 
98
- r = resp
98
+ r = resp[0]
99
99
 
100
100
  if r["default_bank_account"]:
101
101
  rr = get_bank_account_by_bank_id(client, r["default_bank_account"])
@@ -26,7 +26,7 @@ def load_item_data(client: FiuaiSDK, auth_tenant_id: str, auth_company_id: str)-
26
26
  从frappe获取item数据
27
27
  """
28
28
 
29
- item_list = client.get_list(
29
+ item_list = client.internal_get_list(
30
30
  doctype="Item",
31
31
  filters=[
32
32
  ["disabled", "=", 0],