maleo-metadata-client 0.0.20__tar.gz → 0.0.30__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.
Potentially problematic release.
This version of maleo-metadata-client might be problematic. Click here for more details.
- {maleo_metadata_client-0.0.20 → maleo_metadata_client-0.0.30}/PKG-INFO +35 -36
- {maleo_metadata_client-0.0.20 → maleo_metadata_client-0.0.30}/maleo_metadata_client.egg-info/PKG-INFO +35 -36
- {maleo_metadata_client-0.0.20 → maleo_metadata_client-0.0.30}/maleo_metadata_client.egg-info/SOURCES.txt +1 -0
- {maleo_metadata_client-0.0.20 → maleo_metadata_client-0.0.30}/maleo_metadata_client.egg-info/requires.txt +34 -35
- {maleo_metadata_client-0.0.20 → maleo_metadata_client-0.0.30}/pyproject.toml +36 -37
- {maleo_metadata_client-0.0.20 → maleo_metadata_client-0.0.30}/src/manager.py +9 -0
- maleo_metadata_client-0.0.30/src/services/organization_role.py +304 -0
- {maleo_metadata_client-0.0.20 → maleo_metadata_client-0.0.30}/LICENSE +0 -0
- {maleo_metadata_client-0.0.20 → maleo_metadata_client-0.0.30}/README.md +0 -0
- {maleo_metadata_client-0.0.20 → maleo_metadata_client-0.0.30}/maleo_metadata_client.egg-info/dependency_links.txt +0 -0
- {maleo_metadata_client-0.0.20 → maleo_metadata_client-0.0.30}/maleo_metadata_client.egg-info/top_level.txt +0 -0
- {maleo_metadata_client-0.0.20 → maleo_metadata_client-0.0.30}/setup.cfg +0 -0
- {maleo_metadata_client-0.0.20 → maleo_metadata_client-0.0.30}/src/__init__.py +0 -0
- {maleo_metadata_client-0.0.20 → maleo_metadata_client-0.0.30}/src/services/__init__.py +0 -0
- {maleo_metadata_client-0.0.20 → maleo_metadata_client-0.0.30}/src/services/blood_type.py +0 -0
- {maleo_metadata_client-0.0.20 → maleo_metadata_client-0.0.30}/src/services/gender.py +0 -0
- {maleo_metadata_client-0.0.20 → maleo_metadata_client-0.0.30}/src/services/medical_role.py +0 -0
- {maleo_metadata_client-0.0.20 → maleo_metadata_client-0.0.30}/src/services/medical_service.py +0 -0
- {maleo_metadata_client-0.0.20 → maleo_metadata_client-0.0.30}/src/services/organization_type.py +0 -0
- {maleo_metadata_client-0.0.20 → maleo_metadata_client-0.0.30}/src/services/service.py +0 -0
- {maleo_metadata_client-0.0.20 → maleo_metadata_client-0.0.30}/src/services/system_role.py +0 -0
- {maleo_metadata_client-0.0.20 → maleo_metadata_client-0.0.30}/src/services/user_type.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: maleo-metadata-client
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.30
|
|
4
4
|
Summary: MaleoMetadata client package
|
|
5
5
|
Author-email: Agra Bima Yuda <agra@nexmedis.com>
|
|
6
6
|
License: MIT
|
|
@@ -17,72 +17,71 @@ Requires-Dist: cachetools>=6.2.1
|
|
|
17
17
|
Requires-Dist: certifi>=2025.10.5
|
|
18
18
|
Requires-Dist: cffi>=2.0.0
|
|
19
19
|
Requires-Dist: cfgv>=3.4.0
|
|
20
|
-
Requires-Dist: charset-normalizer>=3.4.
|
|
20
|
+
Requires-Dist: charset-normalizer>=3.4.4
|
|
21
21
|
Requires-Dist: click>=8.3.0
|
|
22
22
|
Requires-Dist: colorama>=0.4.6
|
|
23
|
-
Requires-Dist: cryptography>=46.0.
|
|
23
|
+
Requires-Dist: cryptography>=46.0.3
|
|
24
24
|
Requires-Dist: distlib>=0.4.0
|
|
25
25
|
Requires-Dist: dnspython>=2.8.0
|
|
26
|
-
Requires-Dist: elastic-transport>=9.
|
|
26
|
+
Requires-Dist: elastic-transport>=9.2.0
|
|
27
27
|
Requires-Dist: elasticsearch>=9.1.1
|
|
28
|
-
Requires-Dist: fastapi>=0.119.
|
|
28
|
+
Requires-Dist: fastapi>=0.119.1
|
|
29
29
|
Requires-Dist: filelock>=3.20.0
|
|
30
|
-
Requires-Dist: google-api-core>=2.
|
|
30
|
+
Requires-Dist: google-api-core>=2.27.0
|
|
31
31
|
Requires-Dist: google-auth>=2.41.1
|
|
32
|
-
Requires-Dist: google-cloud-appengine-logging>=1.
|
|
33
|
-
Requires-Dist: google-cloud-audit-log>=0.
|
|
32
|
+
Requires-Dist: google-cloud-appengine-logging>=1.7.0
|
|
33
|
+
Requires-Dist: google-cloud-audit-log>=0.4.0
|
|
34
34
|
Requires-Dist: google-cloud-core>=2.4.3
|
|
35
35
|
Requires-Dist: google-cloud-logging>=3.12.1
|
|
36
36
|
Requires-Dist: google-cloud-pubsub>=2.31.1
|
|
37
|
-
Requires-Dist: google-cloud-secret-manager>=2.
|
|
37
|
+
Requires-Dist: google-cloud-secret-manager>=2.25.0
|
|
38
38
|
Requires-Dist: google-cloud-storage>=3.4.1
|
|
39
39
|
Requires-Dist: google-crc32c>=1.7.1
|
|
40
40
|
Requires-Dist: google-resumable-media>=2.7.2
|
|
41
|
-
Requires-Dist: googleapis-common-protos>=1.
|
|
41
|
+
Requires-Dist: googleapis-common-protos>=1.71.0
|
|
42
42
|
Requires-Dist: greenlet>=3.2.4
|
|
43
|
-
Requires-Dist: grpc-google-iam-v1>=0.14.
|
|
44
|
-
Requires-Dist: grpcio>=1.
|
|
45
|
-
Requires-Dist: grpcio-status>=1.
|
|
43
|
+
Requires-Dist: grpc-google-iam-v1>=0.14.3
|
|
44
|
+
Requires-Dist: grpcio>=1.76.0
|
|
45
|
+
Requires-Dist: grpcio-status>=1.76.0
|
|
46
46
|
Requires-Dist: h11>=0.16.0
|
|
47
47
|
Requires-Dist: httpcore>=1.0.9
|
|
48
48
|
Requires-Dist: httpx>=0.28.1
|
|
49
49
|
Requires-Dist: identify>=2.6.15
|
|
50
50
|
Requires-Dist: idna>=3.11
|
|
51
51
|
Requires-Dist: importlib_metadata>=8.7.0
|
|
52
|
-
Requires-Dist: iniconfig>=2.
|
|
53
|
-
Requires-Dist: maleo-client>=0.
|
|
54
|
-
Requires-Dist: maleo-crypto>=0.0.
|
|
55
|
-
Requires-Dist: maleo-database>=0.1.
|
|
56
|
-
Requires-Dist: maleo-enums>=0.0.
|
|
57
|
-
Requires-Dist: maleo-google>=0.1.
|
|
58
|
-
Requires-Dist: maleo-infra>=0.1.
|
|
59
|
-
Requires-Dist: maleo-logging>=0.0.
|
|
60
|
-
Requires-Dist: maleo-
|
|
61
|
-
Requires-Dist: maleo-
|
|
62
|
-
Requires-Dist: maleo-
|
|
63
|
-
Requires-Dist: maleo-
|
|
64
|
-
Requires-Dist: maleo-
|
|
65
|
-
Requires-Dist: maleo-
|
|
66
|
-
Requires-Dist: maleo-utils>=0.0.40
|
|
52
|
+
Requires-Dist: iniconfig>=2.3.0
|
|
53
|
+
Requires-Dist: maleo-client>=0.1.26
|
|
54
|
+
Requires-Dist: maleo-crypto>=0.0.46
|
|
55
|
+
Requires-Dist: maleo-database>=0.1.56
|
|
56
|
+
Requires-Dist: maleo-enums>=0.0.46
|
|
57
|
+
Requires-Dist: maleo-google>=0.1.26
|
|
58
|
+
Requires-Dist: maleo-infra>=0.1.56
|
|
59
|
+
Requires-Dist: maleo-logging>=0.0.46
|
|
60
|
+
Requires-Dist: maleo-metadata>=0.3.60
|
|
61
|
+
Requires-Dist: maleo-middlewares>=0.1.26
|
|
62
|
+
Requires-Dist: maleo-schemas>=0.1.56
|
|
63
|
+
Requires-Dist: maleo-soma>=0.2.16
|
|
64
|
+
Requires-Dist: maleo-types>=0.0.26
|
|
65
|
+
Requires-Dist: maleo-utils>=0.0.46
|
|
67
66
|
Requires-Dist: motor>=3.7.1
|
|
68
67
|
Requires-Dist: mypy_extensions>=1.1.0
|
|
69
68
|
Requires-Dist: nodeenv>=1.9.1
|
|
70
|
-
Requires-Dist: opentelemetry-api>=1.
|
|
71
|
-
Requires-Dist: opentelemetry-sdk>=1.
|
|
72
|
-
Requires-Dist: opentelemetry-semantic-conventions>=0.
|
|
69
|
+
Requires-Dist: opentelemetry-api>=1.38.0
|
|
70
|
+
Requires-Dist: opentelemetry-sdk>=1.38.0
|
|
71
|
+
Requires-Dist: opentelemetry-semantic-conventions>=0.59b0
|
|
73
72
|
Requires-Dist: packaging>=25.0
|
|
74
73
|
Requires-Dist: pathspec>=0.12.1
|
|
75
74
|
Requires-Dist: platformdirs>=4.5.0
|
|
76
75
|
Requires-Dist: pluggy>=1.6.0
|
|
77
76
|
Requires-Dist: pre_commit>=4.3.0
|
|
78
77
|
Requires-Dist: proto-plus>=1.26.1
|
|
79
|
-
Requires-Dist: protobuf>=6.
|
|
80
|
-
Requires-Dist: psutil>=7.1.
|
|
78
|
+
Requires-Dist: protobuf>=6.33.0
|
|
79
|
+
Requires-Dist: psutil>=7.1.1
|
|
81
80
|
Requires-Dist: pyasn1>=0.6.1
|
|
82
81
|
Requires-Dist: pyasn1_modules>=0.4.2
|
|
83
82
|
Requires-Dist: pycparser>=2.23
|
|
84
83
|
Requires-Dist: pycryptodome>=3.23.0
|
|
85
|
-
Requires-Dist: pydantic>=2.12.
|
|
84
|
+
Requires-Dist: pydantic>=2.12.3
|
|
86
85
|
Requires-Dist: pydantic-settings>=2.11.0
|
|
87
86
|
Requires-Dist: pydantic_core>=2.41.4
|
|
88
87
|
Requires-Dist: Pygments>=2.19.2
|
|
@@ -91,9 +90,9 @@ Requires-Dist: pymongo>=4.15.3
|
|
|
91
90
|
Requires-Dist: pytest>=8.4.2
|
|
92
91
|
Requires-Dist: python-dateutil>=2.9.0.post0
|
|
93
92
|
Requires-Dist: python-dotenv>=1.1.1
|
|
94
|
-
Requires-Dist: pytokens>=0.
|
|
93
|
+
Requires-Dist: pytokens>=0.2.0
|
|
95
94
|
Requires-Dist: PyYAML>=6.0.3
|
|
96
|
-
Requires-Dist: redis>=
|
|
95
|
+
Requires-Dist: redis>=7.0.0
|
|
97
96
|
Requires-Dist: requests>=2.32.5
|
|
98
97
|
Requires-Dist: rsa>=4.9.1
|
|
99
98
|
Requires-Dist: six>=1.17.0
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: maleo-metadata-client
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.30
|
|
4
4
|
Summary: MaleoMetadata client package
|
|
5
5
|
Author-email: Agra Bima Yuda <agra@nexmedis.com>
|
|
6
6
|
License: MIT
|
|
@@ -17,72 +17,71 @@ Requires-Dist: cachetools>=6.2.1
|
|
|
17
17
|
Requires-Dist: certifi>=2025.10.5
|
|
18
18
|
Requires-Dist: cffi>=2.0.0
|
|
19
19
|
Requires-Dist: cfgv>=3.4.0
|
|
20
|
-
Requires-Dist: charset-normalizer>=3.4.
|
|
20
|
+
Requires-Dist: charset-normalizer>=3.4.4
|
|
21
21
|
Requires-Dist: click>=8.3.0
|
|
22
22
|
Requires-Dist: colorama>=0.4.6
|
|
23
|
-
Requires-Dist: cryptography>=46.0.
|
|
23
|
+
Requires-Dist: cryptography>=46.0.3
|
|
24
24
|
Requires-Dist: distlib>=0.4.0
|
|
25
25
|
Requires-Dist: dnspython>=2.8.0
|
|
26
|
-
Requires-Dist: elastic-transport>=9.
|
|
26
|
+
Requires-Dist: elastic-transport>=9.2.0
|
|
27
27
|
Requires-Dist: elasticsearch>=9.1.1
|
|
28
|
-
Requires-Dist: fastapi>=0.119.
|
|
28
|
+
Requires-Dist: fastapi>=0.119.1
|
|
29
29
|
Requires-Dist: filelock>=3.20.0
|
|
30
|
-
Requires-Dist: google-api-core>=2.
|
|
30
|
+
Requires-Dist: google-api-core>=2.27.0
|
|
31
31
|
Requires-Dist: google-auth>=2.41.1
|
|
32
|
-
Requires-Dist: google-cloud-appengine-logging>=1.
|
|
33
|
-
Requires-Dist: google-cloud-audit-log>=0.
|
|
32
|
+
Requires-Dist: google-cloud-appengine-logging>=1.7.0
|
|
33
|
+
Requires-Dist: google-cloud-audit-log>=0.4.0
|
|
34
34
|
Requires-Dist: google-cloud-core>=2.4.3
|
|
35
35
|
Requires-Dist: google-cloud-logging>=3.12.1
|
|
36
36
|
Requires-Dist: google-cloud-pubsub>=2.31.1
|
|
37
|
-
Requires-Dist: google-cloud-secret-manager>=2.
|
|
37
|
+
Requires-Dist: google-cloud-secret-manager>=2.25.0
|
|
38
38
|
Requires-Dist: google-cloud-storage>=3.4.1
|
|
39
39
|
Requires-Dist: google-crc32c>=1.7.1
|
|
40
40
|
Requires-Dist: google-resumable-media>=2.7.2
|
|
41
|
-
Requires-Dist: googleapis-common-protos>=1.
|
|
41
|
+
Requires-Dist: googleapis-common-protos>=1.71.0
|
|
42
42
|
Requires-Dist: greenlet>=3.2.4
|
|
43
|
-
Requires-Dist: grpc-google-iam-v1>=0.14.
|
|
44
|
-
Requires-Dist: grpcio>=1.
|
|
45
|
-
Requires-Dist: grpcio-status>=1.
|
|
43
|
+
Requires-Dist: grpc-google-iam-v1>=0.14.3
|
|
44
|
+
Requires-Dist: grpcio>=1.76.0
|
|
45
|
+
Requires-Dist: grpcio-status>=1.76.0
|
|
46
46
|
Requires-Dist: h11>=0.16.0
|
|
47
47
|
Requires-Dist: httpcore>=1.0.9
|
|
48
48
|
Requires-Dist: httpx>=0.28.1
|
|
49
49
|
Requires-Dist: identify>=2.6.15
|
|
50
50
|
Requires-Dist: idna>=3.11
|
|
51
51
|
Requires-Dist: importlib_metadata>=8.7.0
|
|
52
|
-
Requires-Dist: iniconfig>=2.
|
|
53
|
-
Requires-Dist: maleo-client>=0.
|
|
54
|
-
Requires-Dist: maleo-crypto>=0.0.
|
|
55
|
-
Requires-Dist: maleo-database>=0.1.
|
|
56
|
-
Requires-Dist: maleo-enums>=0.0.
|
|
57
|
-
Requires-Dist: maleo-google>=0.1.
|
|
58
|
-
Requires-Dist: maleo-infra>=0.1.
|
|
59
|
-
Requires-Dist: maleo-logging>=0.0.
|
|
60
|
-
Requires-Dist: maleo-
|
|
61
|
-
Requires-Dist: maleo-
|
|
62
|
-
Requires-Dist: maleo-
|
|
63
|
-
Requires-Dist: maleo-
|
|
64
|
-
Requires-Dist: maleo-
|
|
65
|
-
Requires-Dist: maleo-
|
|
66
|
-
Requires-Dist: maleo-utils>=0.0.40
|
|
52
|
+
Requires-Dist: iniconfig>=2.3.0
|
|
53
|
+
Requires-Dist: maleo-client>=0.1.26
|
|
54
|
+
Requires-Dist: maleo-crypto>=0.0.46
|
|
55
|
+
Requires-Dist: maleo-database>=0.1.56
|
|
56
|
+
Requires-Dist: maleo-enums>=0.0.46
|
|
57
|
+
Requires-Dist: maleo-google>=0.1.26
|
|
58
|
+
Requires-Dist: maleo-infra>=0.1.56
|
|
59
|
+
Requires-Dist: maleo-logging>=0.0.46
|
|
60
|
+
Requires-Dist: maleo-metadata>=0.3.60
|
|
61
|
+
Requires-Dist: maleo-middlewares>=0.1.26
|
|
62
|
+
Requires-Dist: maleo-schemas>=0.1.56
|
|
63
|
+
Requires-Dist: maleo-soma>=0.2.16
|
|
64
|
+
Requires-Dist: maleo-types>=0.0.26
|
|
65
|
+
Requires-Dist: maleo-utils>=0.0.46
|
|
67
66
|
Requires-Dist: motor>=3.7.1
|
|
68
67
|
Requires-Dist: mypy_extensions>=1.1.0
|
|
69
68
|
Requires-Dist: nodeenv>=1.9.1
|
|
70
|
-
Requires-Dist: opentelemetry-api>=1.
|
|
71
|
-
Requires-Dist: opentelemetry-sdk>=1.
|
|
72
|
-
Requires-Dist: opentelemetry-semantic-conventions>=0.
|
|
69
|
+
Requires-Dist: opentelemetry-api>=1.38.0
|
|
70
|
+
Requires-Dist: opentelemetry-sdk>=1.38.0
|
|
71
|
+
Requires-Dist: opentelemetry-semantic-conventions>=0.59b0
|
|
73
72
|
Requires-Dist: packaging>=25.0
|
|
74
73
|
Requires-Dist: pathspec>=0.12.1
|
|
75
74
|
Requires-Dist: platformdirs>=4.5.0
|
|
76
75
|
Requires-Dist: pluggy>=1.6.0
|
|
77
76
|
Requires-Dist: pre_commit>=4.3.0
|
|
78
77
|
Requires-Dist: proto-plus>=1.26.1
|
|
79
|
-
Requires-Dist: protobuf>=6.
|
|
80
|
-
Requires-Dist: psutil>=7.1.
|
|
78
|
+
Requires-Dist: protobuf>=6.33.0
|
|
79
|
+
Requires-Dist: psutil>=7.1.1
|
|
81
80
|
Requires-Dist: pyasn1>=0.6.1
|
|
82
81
|
Requires-Dist: pyasn1_modules>=0.4.2
|
|
83
82
|
Requires-Dist: pycparser>=2.23
|
|
84
83
|
Requires-Dist: pycryptodome>=3.23.0
|
|
85
|
-
Requires-Dist: pydantic>=2.12.
|
|
84
|
+
Requires-Dist: pydantic>=2.12.3
|
|
86
85
|
Requires-Dist: pydantic-settings>=2.11.0
|
|
87
86
|
Requires-Dist: pydantic_core>=2.41.4
|
|
88
87
|
Requires-Dist: Pygments>=2.19.2
|
|
@@ -91,9 +90,9 @@ Requires-Dist: pymongo>=4.15.3
|
|
|
91
90
|
Requires-Dist: pytest>=8.4.2
|
|
92
91
|
Requires-Dist: python-dateutil>=2.9.0.post0
|
|
93
92
|
Requires-Dist: python-dotenv>=1.1.1
|
|
94
|
-
Requires-Dist: pytokens>=0.
|
|
93
|
+
Requires-Dist: pytokens>=0.2.0
|
|
95
94
|
Requires-Dist: PyYAML>=6.0.3
|
|
96
|
-
Requires-Dist: redis>=
|
|
95
|
+
Requires-Dist: redis>=7.0.0
|
|
97
96
|
Requires-Dist: requests>=2.32.5
|
|
98
97
|
Requires-Dist: rsa>=4.9.1
|
|
99
98
|
Requires-Dist: six>=1.17.0
|
|
@@ -8,72 +8,71 @@ cachetools>=6.2.1
|
|
|
8
8
|
certifi>=2025.10.5
|
|
9
9
|
cffi>=2.0.0
|
|
10
10
|
cfgv>=3.4.0
|
|
11
|
-
charset-normalizer>=3.4.
|
|
11
|
+
charset-normalizer>=3.4.4
|
|
12
12
|
click>=8.3.0
|
|
13
13
|
colorama>=0.4.6
|
|
14
|
-
cryptography>=46.0.
|
|
14
|
+
cryptography>=46.0.3
|
|
15
15
|
distlib>=0.4.0
|
|
16
16
|
dnspython>=2.8.0
|
|
17
|
-
elastic-transport>=9.
|
|
17
|
+
elastic-transport>=9.2.0
|
|
18
18
|
elasticsearch>=9.1.1
|
|
19
|
-
fastapi>=0.119.
|
|
19
|
+
fastapi>=0.119.1
|
|
20
20
|
filelock>=3.20.0
|
|
21
|
-
google-api-core>=2.
|
|
21
|
+
google-api-core>=2.27.0
|
|
22
22
|
google-auth>=2.41.1
|
|
23
|
-
google-cloud-appengine-logging>=1.
|
|
24
|
-
google-cloud-audit-log>=0.
|
|
23
|
+
google-cloud-appengine-logging>=1.7.0
|
|
24
|
+
google-cloud-audit-log>=0.4.0
|
|
25
25
|
google-cloud-core>=2.4.3
|
|
26
26
|
google-cloud-logging>=3.12.1
|
|
27
27
|
google-cloud-pubsub>=2.31.1
|
|
28
|
-
google-cloud-secret-manager>=2.
|
|
28
|
+
google-cloud-secret-manager>=2.25.0
|
|
29
29
|
google-cloud-storage>=3.4.1
|
|
30
30
|
google-crc32c>=1.7.1
|
|
31
31
|
google-resumable-media>=2.7.2
|
|
32
|
-
googleapis-common-protos>=1.
|
|
32
|
+
googleapis-common-protos>=1.71.0
|
|
33
33
|
greenlet>=3.2.4
|
|
34
|
-
grpc-google-iam-v1>=0.14.
|
|
35
|
-
grpcio>=1.
|
|
36
|
-
grpcio-status>=1.
|
|
34
|
+
grpc-google-iam-v1>=0.14.3
|
|
35
|
+
grpcio>=1.76.0
|
|
36
|
+
grpcio-status>=1.76.0
|
|
37
37
|
h11>=0.16.0
|
|
38
38
|
httpcore>=1.0.9
|
|
39
39
|
httpx>=0.28.1
|
|
40
40
|
identify>=2.6.15
|
|
41
41
|
idna>=3.11
|
|
42
42
|
importlib_metadata>=8.7.0
|
|
43
|
-
iniconfig>=2.
|
|
44
|
-
maleo-client>=0.
|
|
45
|
-
maleo-crypto>=0.0.
|
|
46
|
-
maleo-database>=0.1.
|
|
47
|
-
maleo-enums>=0.0.
|
|
48
|
-
maleo-google>=0.1.
|
|
49
|
-
maleo-infra>=0.1.
|
|
50
|
-
maleo-logging>=0.0.
|
|
51
|
-
maleo-
|
|
52
|
-
maleo-
|
|
53
|
-
maleo-
|
|
54
|
-
maleo-
|
|
55
|
-
maleo-
|
|
56
|
-
maleo-
|
|
57
|
-
maleo-utils>=0.0.40
|
|
43
|
+
iniconfig>=2.3.0
|
|
44
|
+
maleo-client>=0.1.26
|
|
45
|
+
maleo-crypto>=0.0.46
|
|
46
|
+
maleo-database>=0.1.56
|
|
47
|
+
maleo-enums>=0.0.46
|
|
48
|
+
maleo-google>=0.1.26
|
|
49
|
+
maleo-infra>=0.1.56
|
|
50
|
+
maleo-logging>=0.0.46
|
|
51
|
+
maleo-metadata>=0.3.60
|
|
52
|
+
maleo-middlewares>=0.1.26
|
|
53
|
+
maleo-schemas>=0.1.56
|
|
54
|
+
maleo-soma>=0.2.16
|
|
55
|
+
maleo-types>=0.0.26
|
|
56
|
+
maleo-utils>=0.0.46
|
|
58
57
|
motor>=3.7.1
|
|
59
58
|
mypy_extensions>=1.1.0
|
|
60
59
|
nodeenv>=1.9.1
|
|
61
|
-
opentelemetry-api>=1.
|
|
62
|
-
opentelemetry-sdk>=1.
|
|
63
|
-
opentelemetry-semantic-conventions>=0.
|
|
60
|
+
opentelemetry-api>=1.38.0
|
|
61
|
+
opentelemetry-sdk>=1.38.0
|
|
62
|
+
opentelemetry-semantic-conventions>=0.59b0
|
|
64
63
|
packaging>=25.0
|
|
65
64
|
pathspec>=0.12.1
|
|
66
65
|
platformdirs>=4.5.0
|
|
67
66
|
pluggy>=1.6.0
|
|
68
67
|
pre_commit>=4.3.0
|
|
69
68
|
proto-plus>=1.26.1
|
|
70
|
-
protobuf>=6.
|
|
71
|
-
psutil>=7.1.
|
|
69
|
+
protobuf>=6.33.0
|
|
70
|
+
psutil>=7.1.1
|
|
72
71
|
pyasn1>=0.6.1
|
|
73
72
|
pyasn1_modules>=0.4.2
|
|
74
73
|
pycparser>=2.23
|
|
75
74
|
pycryptodome>=3.23.0
|
|
76
|
-
pydantic>=2.12.
|
|
75
|
+
pydantic>=2.12.3
|
|
77
76
|
pydantic-settings>=2.11.0
|
|
78
77
|
pydantic_core>=2.41.4
|
|
79
78
|
Pygments>=2.19.2
|
|
@@ -82,9 +81,9 @@ pymongo>=4.15.3
|
|
|
82
81
|
pytest>=8.4.2
|
|
83
82
|
python-dateutil>=2.9.0.post0
|
|
84
83
|
python-dotenv>=1.1.1
|
|
85
|
-
pytokens>=0.
|
|
84
|
+
pytokens>=0.2.0
|
|
86
85
|
PyYAML>=6.0.3
|
|
87
|
-
redis>=
|
|
86
|
+
redis>=7.0.0
|
|
88
87
|
requests>=2.32.5
|
|
89
88
|
rsa>=4.9.1
|
|
90
89
|
six>=1.17.0
|
|
@@ -3,8 +3,8 @@ requires = ["setuptools", "wheel"]
|
|
|
3
3
|
build-backend = "setuptools.build_meta"
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
|
-
name = "maleo-metadata-client"
|
|
7
|
-
version = "0.0.
|
|
6
|
+
name = "maleo-metadata-client"
|
|
7
|
+
version = "0.0.30"
|
|
8
8
|
description = "MaleoMetadata client package"
|
|
9
9
|
authors = [
|
|
10
10
|
{ name = "Agra Bima Yuda", email = "agra@nexmedis.com" }
|
|
@@ -23,72 +23,71 @@ dependencies = [
|
|
|
23
23
|
"certifi>=2025.10.5",
|
|
24
24
|
"cffi>=2.0.0",
|
|
25
25
|
"cfgv>=3.4.0",
|
|
26
|
-
"charset-normalizer>=3.4.
|
|
26
|
+
"charset-normalizer>=3.4.4",
|
|
27
27
|
"click>=8.3.0",
|
|
28
28
|
"colorama>=0.4.6",
|
|
29
|
-
"cryptography>=46.0.
|
|
29
|
+
"cryptography>=46.0.3",
|
|
30
30
|
"distlib>=0.4.0",
|
|
31
31
|
"dnspython>=2.8.0",
|
|
32
|
-
"elastic-transport>=9.
|
|
32
|
+
"elastic-transport>=9.2.0",
|
|
33
33
|
"elasticsearch>=9.1.1",
|
|
34
|
-
"fastapi>=0.119.
|
|
34
|
+
"fastapi>=0.119.1",
|
|
35
35
|
"filelock>=3.20.0",
|
|
36
|
-
"google-api-core>=2.
|
|
36
|
+
"google-api-core>=2.27.0",
|
|
37
37
|
"google-auth>=2.41.1",
|
|
38
|
-
"google-cloud-appengine-logging>=1.
|
|
39
|
-
"google-cloud-audit-log>=0.
|
|
38
|
+
"google-cloud-appengine-logging>=1.7.0",
|
|
39
|
+
"google-cloud-audit-log>=0.4.0",
|
|
40
40
|
"google-cloud-core>=2.4.3",
|
|
41
41
|
"google-cloud-logging>=3.12.1",
|
|
42
42
|
"google-cloud-pubsub>=2.31.1",
|
|
43
|
-
"google-cloud-secret-manager>=2.
|
|
43
|
+
"google-cloud-secret-manager>=2.25.0",
|
|
44
44
|
"google-cloud-storage>=3.4.1",
|
|
45
45
|
"google-crc32c>=1.7.1",
|
|
46
46
|
"google-resumable-media>=2.7.2",
|
|
47
|
-
"googleapis-common-protos>=1.
|
|
47
|
+
"googleapis-common-protos>=1.71.0",
|
|
48
48
|
"greenlet>=3.2.4",
|
|
49
|
-
"grpc-google-iam-v1>=0.14.
|
|
50
|
-
"grpcio>=1.
|
|
51
|
-
"grpcio-status>=1.
|
|
49
|
+
"grpc-google-iam-v1>=0.14.3",
|
|
50
|
+
"grpcio>=1.76.0",
|
|
51
|
+
"grpcio-status>=1.76.0",
|
|
52
52
|
"h11>=0.16.0",
|
|
53
53
|
"httpcore>=1.0.9",
|
|
54
54
|
"httpx>=0.28.1",
|
|
55
55
|
"identify>=2.6.15",
|
|
56
56
|
"idna>=3.11",
|
|
57
57
|
"importlib_metadata>=8.7.0",
|
|
58
|
-
"iniconfig>=2.
|
|
59
|
-
"maleo-client>=0.
|
|
60
|
-
"maleo-crypto>=0.0.
|
|
61
|
-
"maleo-database>=0.1.
|
|
62
|
-
"maleo-enums>=0.0.
|
|
63
|
-
"maleo-google>=0.1.
|
|
64
|
-
"maleo-infra>=0.1.
|
|
65
|
-
"maleo-logging>=0.0.
|
|
66
|
-
"maleo-
|
|
67
|
-
"maleo-
|
|
68
|
-
"maleo-
|
|
69
|
-
"maleo-
|
|
70
|
-
"maleo-
|
|
71
|
-
"maleo-
|
|
72
|
-
"maleo-utils>=0.0.40",
|
|
58
|
+
"iniconfig>=2.3.0",
|
|
59
|
+
"maleo-client>=0.1.26",
|
|
60
|
+
"maleo-crypto>=0.0.46",
|
|
61
|
+
"maleo-database>=0.1.56",
|
|
62
|
+
"maleo-enums>=0.0.46",
|
|
63
|
+
"maleo-google>=0.1.26",
|
|
64
|
+
"maleo-infra>=0.1.56",
|
|
65
|
+
"maleo-logging>=0.0.46",
|
|
66
|
+
"maleo-metadata>=0.3.60",
|
|
67
|
+
"maleo-middlewares>=0.1.26",
|
|
68
|
+
"maleo-schemas>=0.1.56",
|
|
69
|
+
"maleo-soma>=0.2.16",
|
|
70
|
+
"maleo-types>=0.0.26",
|
|
71
|
+
"maleo-utils>=0.0.46",
|
|
73
72
|
"motor>=3.7.1",
|
|
74
73
|
"mypy_extensions>=1.1.0",
|
|
75
74
|
"nodeenv>=1.9.1",
|
|
76
|
-
"opentelemetry-api>=1.
|
|
77
|
-
"opentelemetry-sdk>=1.
|
|
78
|
-
"opentelemetry-semantic-conventions>=0.
|
|
75
|
+
"opentelemetry-api>=1.38.0",
|
|
76
|
+
"opentelemetry-sdk>=1.38.0",
|
|
77
|
+
"opentelemetry-semantic-conventions>=0.59b0",
|
|
79
78
|
"packaging>=25.0",
|
|
80
79
|
"pathspec>=0.12.1",
|
|
81
80
|
"platformdirs>=4.5.0",
|
|
82
81
|
"pluggy>=1.6.0",
|
|
83
82
|
"pre_commit>=4.3.0",
|
|
84
83
|
"proto-plus>=1.26.1",
|
|
85
|
-
"protobuf>=6.
|
|
86
|
-
"psutil>=7.1.
|
|
84
|
+
"protobuf>=6.33.0",
|
|
85
|
+
"psutil>=7.1.1",
|
|
87
86
|
"pyasn1>=0.6.1",
|
|
88
87
|
"pyasn1_modules>=0.4.2",
|
|
89
88
|
"pycparser>=2.23",
|
|
90
89
|
"pycryptodome>=3.23.0",
|
|
91
|
-
"pydantic>=2.12.
|
|
90
|
+
"pydantic>=2.12.3",
|
|
92
91
|
"pydantic-settings>=2.11.0",
|
|
93
92
|
"pydantic_core>=2.41.4",
|
|
94
93
|
"Pygments>=2.19.2",
|
|
@@ -97,9 +96,9 @@ dependencies = [
|
|
|
97
96
|
"pytest>=8.4.2",
|
|
98
97
|
"python-dateutil>=2.9.0.post0",
|
|
99
98
|
"python-dotenv>=1.1.1",
|
|
100
|
-
"pytokens>=0.
|
|
99
|
+
"pytokens>=0.2.0",
|
|
101
100
|
"PyYAML>=6.0.3",
|
|
102
|
-
"redis>=
|
|
101
|
+
"redis>=7.0.0",
|
|
103
102
|
"requests>=2.32.5",
|
|
104
103
|
"rsa>=4.9.1",
|
|
105
104
|
"six>=1.17.0",
|
|
@@ -4,6 +4,7 @@ from .services.blood_type import BloodTypeClientService
|
|
|
4
4
|
from .services.gender import GenderClientService
|
|
5
5
|
from .services.medical_role import MedicalRoleClientService
|
|
6
6
|
from .services.medical_service import MedicalServiceClientService
|
|
7
|
+
from .services.organization_role import OrganizationRoleClientService
|
|
7
8
|
from .services.organization_type import OrganizationTypeClientService
|
|
8
9
|
from .services.service import ServiceClientService
|
|
9
10
|
from .services.system_role import SystemRoleClientService
|
|
@@ -44,6 +45,14 @@ class MaleoMetadataClientManager(MaleoClientManager[MaleoMetadataClientConfig]):
|
|
|
44
45
|
private_key=self._private_key,
|
|
45
46
|
redis=self._redis,
|
|
46
47
|
)
|
|
48
|
+
self.organization_role = OrganizationRoleClientService(
|
|
49
|
+
application_context=self._application_context,
|
|
50
|
+
config=self._config,
|
|
51
|
+
logger=self._logger,
|
|
52
|
+
http_client_manager=self._http_client_manager,
|
|
53
|
+
private_key=self._private_key,
|
|
54
|
+
redis=self._redis,
|
|
55
|
+
)
|
|
47
56
|
self.organization_type = OrganizationTypeClientService(
|
|
48
57
|
application_context=self._application_context,
|
|
49
58
|
config=self._config,
|
|
@@ -0,0 +1,304 @@
|
|
|
1
|
+
import json
|
|
2
|
+
from copy import deepcopy
|
|
3
|
+
from datetime import datetime, timezone
|
|
4
|
+
from typing import Literal, overload
|
|
5
|
+
from uuid import UUID
|
|
6
|
+
from maleo.client.maleo.config import MaleoMetadataClientConfig
|
|
7
|
+
from maleo.client.maleo.service import MaleoClientService
|
|
8
|
+
from maleo.database.enums import Connection
|
|
9
|
+
from maleo.database.utils import build_cache_key
|
|
10
|
+
from maleo.enums.cardinality import Cardinality
|
|
11
|
+
from maleo.enums.connection import Header
|
|
12
|
+
from maleo.logging.enums import Level
|
|
13
|
+
from maleo.metadata.constants.organization_role import ORGANIZATION_ROLE_RESOURCE
|
|
14
|
+
from maleo.metadata.schemas.organization_role import (
|
|
15
|
+
ReadMultipleParameter,
|
|
16
|
+
ReadSingleParameter,
|
|
17
|
+
StandardOrganizationRoleSchema,
|
|
18
|
+
FullOrganizationRoleSchema,
|
|
19
|
+
)
|
|
20
|
+
from maleo.metadata.enums.organization_role import Granularity, IdentifierType
|
|
21
|
+
from maleo.metadata.utils.organization_role import get_schema_model
|
|
22
|
+
from maleo.schemas.connection import ConnectionContext
|
|
23
|
+
from maleo.schemas.exception.factory import Factory as MaleoExceptionFactory
|
|
24
|
+
from maleo.schemas.operation.action.resource import ReadResourceOperationAction
|
|
25
|
+
from maleo.schemas.operation.enums import OperationType, Target
|
|
26
|
+
from maleo.schemas.operation.mixins import Timestamp
|
|
27
|
+
from maleo.schemas.operation.resource import (
|
|
28
|
+
ReadMultipleResourceOperation,
|
|
29
|
+
ReadSingleResourceOperation,
|
|
30
|
+
)
|
|
31
|
+
from maleo.schemas.pagination import StrictPagination
|
|
32
|
+
from maleo.schemas.response import (
|
|
33
|
+
MultipleDataResponse,
|
|
34
|
+
ReadMultipleDataResponse,
|
|
35
|
+
SingleDataResponse,
|
|
36
|
+
ReadSingleDataResponse,
|
|
37
|
+
)
|
|
38
|
+
from maleo.schemas.security.authorization import (
|
|
39
|
+
OptAnyAuthorization,
|
|
40
|
+
AnyAuthorization,
|
|
41
|
+
Factory as AuthorizationFactory,
|
|
42
|
+
)
|
|
43
|
+
from maleo.schemas.security.impersonation import OptImpersonation
|
|
44
|
+
from maleo.types.dict import OptStrToStrDict
|
|
45
|
+
from maleo.utils.merger import merge_dicts
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
class OrganizationRoleClientService(MaleoClientService[MaleoMetadataClientConfig]):
|
|
49
|
+
resource = ORGANIZATION_ROLE_RESOURCE
|
|
50
|
+
|
|
51
|
+
@overload
|
|
52
|
+
async def read(
|
|
53
|
+
self,
|
|
54
|
+
cardinality: Literal[Cardinality.MULTIPLE],
|
|
55
|
+
granularity: Literal[Granularity.STANDARD],
|
|
56
|
+
*,
|
|
57
|
+
operation_id: UUID,
|
|
58
|
+
resource_operation_action: ReadResourceOperationAction,
|
|
59
|
+
connection_context: ConnectionContext,
|
|
60
|
+
authorization: AnyAuthorization,
|
|
61
|
+
impersonation: OptImpersonation = None,
|
|
62
|
+
parameters: ReadMultipleParameter,
|
|
63
|
+
headers: OptStrToStrDict = None,
|
|
64
|
+
) -> ReadMultipleDataResponse[StandardOrganizationRoleSchema, StrictPagination, None]: ...
|
|
65
|
+
@overload
|
|
66
|
+
async def read(
|
|
67
|
+
self,
|
|
68
|
+
cardinality: Literal[Cardinality.MULTIPLE],
|
|
69
|
+
granularity: Literal[Granularity.FULL],
|
|
70
|
+
*,
|
|
71
|
+
operation_id: UUID,
|
|
72
|
+
resource_operation_action: ReadResourceOperationAction,
|
|
73
|
+
connection_context: ConnectionContext,
|
|
74
|
+
authorization: AnyAuthorization,
|
|
75
|
+
impersonation: OptImpersonation = None,
|
|
76
|
+
parameters: ReadMultipleParameter,
|
|
77
|
+
headers: OptStrToStrDict = None,
|
|
78
|
+
) -> ReadMultipleDataResponse[FullOrganizationRoleSchema, StrictPagination, None]: ...
|
|
79
|
+
@overload
|
|
80
|
+
async def read(
|
|
81
|
+
self,
|
|
82
|
+
cardinality: Literal[Cardinality.SINGLE],
|
|
83
|
+
granularity: Literal[Granularity.STANDARD],
|
|
84
|
+
*,
|
|
85
|
+
operation_id: UUID,
|
|
86
|
+
resource_operation_action: ReadResourceOperationAction,
|
|
87
|
+
connection_context: ConnectionContext,
|
|
88
|
+
authorization: AnyAuthorization,
|
|
89
|
+
impersonation: OptImpersonation = None,
|
|
90
|
+
parameters: ReadSingleParameter,
|
|
91
|
+
headers: OptStrToStrDict = None,
|
|
92
|
+
) -> ReadSingleDataResponse[StandardOrganizationRoleSchema, None]: ...
|
|
93
|
+
@overload
|
|
94
|
+
async def read(
|
|
95
|
+
self,
|
|
96
|
+
cardinality: Literal[Cardinality.SINGLE],
|
|
97
|
+
granularity: Literal[Granularity.FULL],
|
|
98
|
+
*,
|
|
99
|
+
operation_id: UUID,
|
|
100
|
+
resource_operation_action: ReadResourceOperationAction,
|
|
101
|
+
connection_context: ConnectionContext,
|
|
102
|
+
authorization: AnyAuthorization,
|
|
103
|
+
impersonation: OptImpersonation = None,
|
|
104
|
+
parameters: ReadSingleParameter,
|
|
105
|
+
headers: OptStrToStrDict = None,
|
|
106
|
+
) -> ReadSingleDataResponse[FullOrganizationRoleSchema, None]: ...
|
|
107
|
+
async def read(
|
|
108
|
+
self,
|
|
109
|
+
cardinality: Cardinality,
|
|
110
|
+
granularity: Granularity,
|
|
111
|
+
*,
|
|
112
|
+
operation_id: UUID,
|
|
113
|
+
resource_operation_action: ReadResourceOperationAction,
|
|
114
|
+
connection_context: ConnectionContext,
|
|
115
|
+
authorization: OptAnyAuthorization = None,
|
|
116
|
+
impersonation: OptImpersonation = None,
|
|
117
|
+
parameters: ReadMultipleParameter | ReadSingleParameter,
|
|
118
|
+
headers: OptStrToStrDict = None,
|
|
119
|
+
) -> (
|
|
120
|
+
ReadMultipleDataResponse[StandardOrganizationRoleSchema, StrictPagination, None]
|
|
121
|
+
| ReadMultipleDataResponse[FullOrganizationRoleSchema, StrictPagination, None]
|
|
122
|
+
| ReadSingleDataResponse[StandardOrganizationRoleSchema, None]
|
|
123
|
+
| ReadSingleDataResponse[FullOrganizationRoleSchema, None]
|
|
124
|
+
):
|
|
125
|
+
redis_client = self._redis.manager.client.get(Connection.ASYNC)
|
|
126
|
+
data_model_cls = get_schema_model(granularity)
|
|
127
|
+
|
|
128
|
+
executed_at = datetime.now(tz=timezone.utc)
|
|
129
|
+
|
|
130
|
+
# Define arguments being used in this function
|
|
131
|
+
positional_arguments = [cardinality, granularity]
|
|
132
|
+
keyword_arguments = {
|
|
133
|
+
"authorization": (
|
|
134
|
+
authorization.model_dump(mode="json")
|
|
135
|
+
if authorization is not None
|
|
136
|
+
else None
|
|
137
|
+
),
|
|
138
|
+
"parameters": parameters.model_dump(mode="json"),
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
# Define full function string
|
|
142
|
+
ext = f"({json.dumps(positional_arguments)}|{json.dumps(keyword_arguments)})"
|
|
143
|
+
|
|
144
|
+
# Define full cache_key
|
|
145
|
+
cache_key = build_cache_key(ext, namespace=self._namespace)
|
|
146
|
+
|
|
147
|
+
if parameters.use_cache:
|
|
148
|
+
# Initialize cache operation context
|
|
149
|
+
operation_context = deepcopy(self._operation_context)
|
|
150
|
+
operation_context.target.type = Target.CACHE
|
|
151
|
+
|
|
152
|
+
redis_response_str = await redis_client.get(cache_key)
|
|
153
|
+
|
|
154
|
+
if redis_response_str is not None:
|
|
155
|
+
operation_timestamp = Timestamp.completed_now(executed_at)
|
|
156
|
+
if cardinality is Cardinality.MULTIPLE:
|
|
157
|
+
response = ReadMultipleDataResponse[
|
|
158
|
+
data_model_cls, StrictPagination, None
|
|
159
|
+
].model_validate_json(redis_response_str)
|
|
160
|
+
ReadMultipleResourceOperation[
|
|
161
|
+
data_model_cls, StrictPagination, None
|
|
162
|
+
](
|
|
163
|
+
application_context=self._application_context,
|
|
164
|
+
id=operation_id,
|
|
165
|
+
context=operation_context,
|
|
166
|
+
action=resource_operation_action,
|
|
167
|
+
resource=self.resource,
|
|
168
|
+
timestamp=operation_timestamp,
|
|
169
|
+
summary=f"Successfully retrieved {cardinality} {granularity} organization roles from cache",
|
|
170
|
+
connection_context=connection_context,
|
|
171
|
+
authentication=None,
|
|
172
|
+
authorization=authorization,
|
|
173
|
+
impersonation=impersonation,
|
|
174
|
+
response=response,
|
|
175
|
+
).log(
|
|
176
|
+
self._logger, Level.INFO
|
|
177
|
+
)
|
|
178
|
+
elif cardinality is Cardinality.SINGLE:
|
|
179
|
+
response = ReadSingleDataResponse[
|
|
180
|
+
data_model_cls, None
|
|
181
|
+
].model_validate_json(redis_response_str)
|
|
182
|
+
ReadSingleResourceOperation[data_model_cls, None](
|
|
183
|
+
application_context=self._application_context,
|
|
184
|
+
id=operation_id,
|
|
185
|
+
context=operation_context,
|
|
186
|
+
action=resource_operation_action,
|
|
187
|
+
resource=self.resource,
|
|
188
|
+
timestamp=operation_timestamp,
|
|
189
|
+
summary=f"Successfully retrieved {cardinality} {granularity} organization role from cache",
|
|
190
|
+
connection_context=connection_context,
|
|
191
|
+
authentication=None,
|
|
192
|
+
authorization=authorization,
|
|
193
|
+
impersonation=impersonation,
|
|
194
|
+
response=response,
|
|
195
|
+
).log(self._logger, Level.INFO)
|
|
196
|
+
|
|
197
|
+
return response # type: ignore
|
|
198
|
+
|
|
199
|
+
operation_context = deepcopy(self._operation_context)
|
|
200
|
+
operation_context.target.type = Target.MICROSERVICE
|
|
201
|
+
|
|
202
|
+
async with self._http_client_manager.get() as http_client:
|
|
203
|
+
base_headers = {
|
|
204
|
+
Header.CONTENT_TYPE.value: "application/json",
|
|
205
|
+
Header.X_OPERATION_ID.value: str(operation_id),
|
|
206
|
+
}
|
|
207
|
+
if impersonation is not None:
|
|
208
|
+
base_headers[Header.X_USER_ID.value] = str(impersonation.user_id)
|
|
209
|
+
if impersonation.organization_id is not None:
|
|
210
|
+
base_headers[Header.X_ORGANIZATION_ID.value] = str(
|
|
211
|
+
impersonation.organization_id
|
|
212
|
+
)
|
|
213
|
+
|
|
214
|
+
if headers is not None:
|
|
215
|
+
headers = merge_dicts(base_headers, headers)
|
|
216
|
+
else:
|
|
217
|
+
headers = base_headers
|
|
218
|
+
|
|
219
|
+
if authorization is not None:
|
|
220
|
+
auth = AuthorizationFactory.httpx_auth(
|
|
221
|
+
scheme=authorization.scheme, authorization=authorization.credentials
|
|
222
|
+
)
|
|
223
|
+
else:
|
|
224
|
+
auth = None
|
|
225
|
+
|
|
226
|
+
if isinstance(parameters, ReadMultipleParameter):
|
|
227
|
+
url = f"{self._config.url}/v1/{self.resource.identifiers[-1].slug}/"
|
|
228
|
+
elif isinstance(parameters, ReadSingleParameter):
|
|
229
|
+
if parameters.identifier_type is IdentifierType.ID:
|
|
230
|
+
url = f"{self._config.url}/v1/{self.resource.identifiers[-1].slug}/{parameters.identifier_value}"
|
|
231
|
+
else:
|
|
232
|
+
url = f"{self._config.url}/v1/{self.resource.identifiers[-1].slug}/{parameters.identifier_type}/{parameters.identifier_value}"
|
|
233
|
+
|
|
234
|
+
params = parameters.to_query_params()
|
|
235
|
+
|
|
236
|
+
response = await http_client.get(
|
|
237
|
+
url, params=params, headers=headers, auth=auth
|
|
238
|
+
)
|
|
239
|
+
|
|
240
|
+
operation_timestamp = Timestamp.completed_now(executed_at)
|
|
241
|
+
|
|
242
|
+
if response.is_error:
|
|
243
|
+
raise MaleoExceptionFactory.from_httpx(
|
|
244
|
+
response,
|
|
245
|
+
operation_type=OperationType.REQUEST,
|
|
246
|
+
application_context=self._application_context,
|
|
247
|
+
operation_id=operation_id,
|
|
248
|
+
operation_context=operation_context,
|
|
249
|
+
operation_action=resource_operation_action,
|
|
250
|
+
operation_timestamp=operation_timestamp,
|
|
251
|
+
connection_context=connection_context,
|
|
252
|
+
authentication=None,
|
|
253
|
+
authorization=authorization,
|
|
254
|
+
impersonation=impersonation,
|
|
255
|
+
logger=self._logger,
|
|
256
|
+
)
|
|
257
|
+
|
|
258
|
+
if isinstance(parameters, ReadMultipleParameter):
|
|
259
|
+
validated_response = MultipleDataResponse[
|
|
260
|
+
data_model_cls, StrictPagination, None
|
|
261
|
+
].model_validate(response.json())
|
|
262
|
+
service_response = ReadMultipleDataResponse[
|
|
263
|
+
data_model_cls, StrictPagination, None
|
|
264
|
+
].new(
|
|
265
|
+
data=validated_response.data,
|
|
266
|
+
pagination=validated_response.pagination,
|
|
267
|
+
)
|
|
268
|
+
ReadMultipleResourceOperation[data_model_cls, StrictPagination, None](
|
|
269
|
+
application_context=self._application_context,
|
|
270
|
+
id=operation_id,
|
|
271
|
+
context=operation_context,
|
|
272
|
+
action=resource_operation_action,
|
|
273
|
+
resource=ORGANIZATION_ROLE_RESOURCE,
|
|
274
|
+
timestamp=operation_timestamp,
|
|
275
|
+
summary=f"Successfully retrieved multiple {granularity} organization roles from microservice",
|
|
276
|
+
connection_context=connection_context,
|
|
277
|
+
authentication=None,
|
|
278
|
+
authorization=authorization,
|
|
279
|
+
impersonation=impersonation,
|
|
280
|
+
response=service_response,
|
|
281
|
+
).log(self._logger, Level.INFO)
|
|
282
|
+
elif isinstance(parameters, ReadSingleParameter):
|
|
283
|
+
validated_response = SingleDataResponse[
|
|
284
|
+
data_model_cls, None
|
|
285
|
+
].model_validate(response.json())
|
|
286
|
+
service_response = ReadSingleDataResponse[data_model_cls, None].new(
|
|
287
|
+
data=validated_response.data,
|
|
288
|
+
)
|
|
289
|
+
ReadSingleResourceOperation[data_model_cls, None](
|
|
290
|
+
application_context=self._application_context,
|
|
291
|
+
id=operation_id,
|
|
292
|
+
context=operation_context,
|
|
293
|
+
action=resource_operation_action,
|
|
294
|
+
resource=ORGANIZATION_ROLE_RESOURCE,
|
|
295
|
+
timestamp=operation_timestamp,
|
|
296
|
+
summary=f"Successfully retrieved single {granularity} organization role from microservice",
|
|
297
|
+
connection_context=connection_context,
|
|
298
|
+
authentication=None,
|
|
299
|
+
authorization=authorization,
|
|
300
|
+
impersonation=impersonation,
|
|
301
|
+
response=service_response,
|
|
302
|
+
).log(self._logger, Level.INFO)
|
|
303
|
+
|
|
304
|
+
return service_response # type: ignore
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{maleo_metadata_client-0.0.20 → maleo_metadata_client-0.0.30}/src/services/medical_service.py
RENAMED
|
File without changes
|
{maleo_metadata_client-0.0.20 → maleo_metadata_client-0.0.30}/src/services/organization_type.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|