unitysvc-services 0.2.4__py3-none-any.whl → 0.2.5__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.
@@ -3,12 +3,7 @@ from typing import Any
3
3
 
4
4
  from pydantic import BaseModel, ConfigDict, Field
5
5
 
6
- from unitysvc_services.models.base import (
7
- AccessInterface,
8
- Document,
9
- ListingStatusEnum,
10
- Pricing,
11
- )
6
+ from unitysvc_services.models.base import AccessInterface, Document, ListingStatusEnum, Pricing
12
7
 
13
8
 
14
9
  class ListingV1(BaseModel):
@@ -32,6 +27,10 @@ class ListingV1(BaseModel):
32
27
 
33
28
  seller_name: str | None = Field(default=None, description="Name of the seller offering this service listing")
34
29
 
30
+ name: str = Field(
31
+ max_length=255,
32
+ description="Name identifier for the service listing, default to filename",
33
+ )
35
34
  # unique name for each provider, usually following upstream naming convention
36
35
  # status of the service, public, deprecated etc
37
36
  listing_status: ListingStatusEnum = Field(
@@ -159,6 +159,10 @@ class ServiceDataPublisher:
159
159
  # Load the listing data file
160
160
  data = self.load_data_file(data_file)
161
161
 
162
+ # If name is not provided, use filename (without extension)
163
+ if "name" not in data or not data.get("name"):
164
+ data["name"] = data_file.stem
165
+
162
166
  # Resolve file references and include content
163
167
  base_path = data_file.parent
164
168
  data_with_content = self.resolve_file_references(data, base_path)
@@ -46,10 +46,7 @@ class ServiceDataQuery:
46
46
  skip: Number of records to skip (for pagination)
47
47
  limit: Maximum number of records to return
48
48
  """
49
- response = self.client.get(
50
- f"{self.base_url}/publish/offerings",
51
- params={"skip": skip, "limit": limit}
52
- )
49
+ response = self.client.get(f"{self.base_url}/publish/offerings", params={"skip": skip, "limit": limit})
53
50
  response.raise_for_status()
54
51
  result = response.json()
55
52
  return result.get("data", result) if isinstance(result, dict) else result
@@ -61,10 +58,7 @@ class ServiceDataQuery:
61
58
  skip: Number of records to skip (for pagination)
62
59
  limit: Maximum number of records to return
63
60
  """
64
- response = self.client.get(
65
- f"{self.base_url}/publish/listings",
66
- params={"skip": skip, "limit": limit}
67
- )
61
+ response = self.client.get(f"{self.base_url}/publish/listings", params={"skip": skip, "limit": limit})
68
62
  response.raise_for_status()
69
63
  result = response.json()
70
64
  return result.get("data", result) if isinstance(result, dict) else result
@@ -76,10 +70,7 @@ class ServiceDataQuery:
76
70
  skip: Number of records to skip (for pagination)
77
71
  limit: Maximum number of records to return
78
72
  """
79
- response = self.client.get(
80
- f"{self.base_url}/publish/providers",
81
- params={"skip": skip, "limit": limit}
82
- )
73
+ response = self.client.get(f"{self.base_url}/publish/providers", params={"skip": skip, "limit": limit})
83
74
  response.raise_for_status()
84
75
  result = response.json()
85
76
  return result.get("data", result) if isinstance(result, dict) else result
@@ -91,10 +82,7 @@ class ServiceDataQuery:
91
82
  skip: Number of records to skip (for pagination)
92
83
  limit: Maximum number of records to return
93
84
  """
94
- response = self.client.get(
95
- f"{self.base_url}/publish/sellers",
96
- params={"skip": skip, "limit": limit}
97
- )
85
+ response = self.client.get(f"{self.base_url}/publish/sellers", params={"skip": skip, "limit": limit})
98
86
  response.raise_for_status()
99
87
  result = response.json()
100
88
  return result.get("data", result) if isinstance(result, dict) else result
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: unitysvc-services
3
- Version: 0.2.4
3
+ Version: 0.2.5
4
4
  Summary: SDK for digital service providers on UnitySVC
5
5
  Author-email: Bo Peng <bo.peng@unitysvc.com>
6
6
  Maintainer-email: Bo Peng <bo.peng@unitysvc.com>
@@ -3,22 +3,22 @@ unitysvc_services/cli.py,sha256=OK0IZyAckxP15jRWU_W49hl3t7XcNRtd8BoDMyRKqNM,682
3
3
  unitysvc_services/format_data.py,sha256=Jl9Vj3fRX852fHSUa5DzO-oiFQwuQHC3WMCDNIlo1Lc,5460
4
4
  unitysvc_services/list.py,sha256=QDp9BByaoeFeJxXJN9RQ-jU99mH9Guq9ampfXCbpZmI,7033
5
5
  unitysvc_services/populate.py,sha256=zkcjIy8BWuQSO7JwiRNHKgGoxQvc3ujluUQdYixdBvY,6626
6
- unitysvc_services/publisher.py,sha256=hRqbN9rXeFLgfsjK9ViFQjPNbYR3trcqanPUecjcSjM,35567
6
+ unitysvc_services/publisher.py,sha256=s3px0i1ov6FisnnYG-gkkMHwJhnGbf-Ug225vosfxxM,35733
7
7
  unitysvc_services/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
8
- unitysvc_services/query.py,sha256=yfCIMTjQwantf9LxktpRcE05qrBIKQMkanpb9JYYsi0,24228
8
+ unitysvc_services/query.py,sha256=M8-zklRYvIaLZSzmDVroZBf48OyGUa1nvhUaLzZXeuU,24092
9
9
  unitysvc_services/scaffold.py,sha256=Y73IX8vskImxSvxDgR0mvEFuAMYnBKfttn3bjcz3jmQ,40331
10
10
  unitysvc_services/update.py,sha256=K9swocTUnqqiSgARo6GmuzTzUySSpyqqPPW4xF7ZU-g,9659
11
11
  unitysvc_services/utils.py,sha256=GN0gkVTU8fOx2G0EbqnWmx8w9eFsoPfRprPjwCyPYkE,11371
12
12
  unitysvc_services/validator.py,sha256=zuFA44ezKlfUTtdJ8M2Xd7nk1Eot4HxbBksEUaIIpZs,26790
13
13
  unitysvc_services/models/__init__.py,sha256=hJCc2KSZmIHlKWKE6GpLGdeVB6LIpyVUKiOKnwmKvCs,200
14
14
  unitysvc_services/models/base.py,sha256=gm3xlcC35QNRST5ikJPhdk-dTTXoY9D_5Jxkyt8SBCU,13173
15
- unitysvc_services/models/listing_v1.py,sha256=CC_GXoN3NHJFzEQ3cBHDQpdUaBNpvLdHARHJ-LmC0RM,2305
15
+ unitysvc_services/models/listing_v1.py,sha256=8cSd91weXGpP5tX9aQg0iagi1H3gSd5WJddVhOJji3c,2421
16
16
  unitysvc_services/models/provider_v1.py,sha256=cYK5kDDmzQEnLvUC2C8dKz-ZXci7hVn3fjNrJkaSr10,2050
17
17
  unitysvc_services/models/seller_v1.py,sha256=SU4rqYAh9hE4EeUrEkqaVrLwusenV7MotPF77VcsRKo,3263
18
18
  unitysvc_services/models/service_v1.py,sha256=u16zqM3khrJoTw_v0d45tMcKXjko5k_v3w8xwUtZ6nM,2720
19
- unitysvc_services-0.2.4.dist-info/licenses/LICENSE,sha256=_p8V6A8OMPu2HIztn3O01v0-urZFwk0Dd3Yk_PTIlL8,1065
20
- unitysvc_services-0.2.4.dist-info/METADATA,sha256=FmrqIeMrb31pjtn7u0RyBz-tn-acfTo0omSIqLLwdNg,6628
21
- unitysvc_services-0.2.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
22
- unitysvc_services-0.2.4.dist-info/entry_points.txt,sha256=-vodnbPmo7QQmFu8jdG6sCyGRVM727w9Nhwp4Vwau_k,64
23
- unitysvc_services-0.2.4.dist-info/top_level.txt,sha256=GIotQj-Ro2ruR7eupM1r58PWqIHTAq647ORL7E2kneo,18
24
- unitysvc_services-0.2.4.dist-info/RECORD,,
19
+ unitysvc_services-0.2.5.dist-info/licenses/LICENSE,sha256=_p8V6A8OMPu2HIztn3O01v0-urZFwk0Dd3Yk_PTIlL8,1065
20
+ unitysvc_services-0.2.5.dist-info/METADATA,sha256=G6wUb0qoOpZtYWLYnp-MfOgv3tMZWHqh-K78vAm1POI,6628
21
+ unitysvc_services-0.2.5.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
22
+ unitysvc_services-0.2.5.dist-info/entry_points.txt,sha256=-vodnbPmo7QQmFu8jdG6sCyGRVM727w9Nhwp4Vwau_k,64
23
+ unitysvc_services-0.2.5.dist-info/top_level.txt,sha256=GIotQj-Ro2ruR7eupM1r58PWqIHTAq647ORL7E2kneo,18
24
+ unitysvc_services-0.2.5.dist-info/RECORD,,