unitysvc-services 0.2.2__tar.gz → 0.2.4__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 (61) hide show
  1. {unitysvc_services-0.2.2 → unitysvc_services-0.2.4}/PKG-INFO +5 -2
  2. {unitysvc_services-0.2.2 → unitysvc_services-0.2.4}/README.md +4 -1
  3. {unitysvc_services-0.2.2 → unitysvc_services-0.2.4}/docs/cli-reference.md +61 -14
  4. {unitysvc_services-0.2.2 → unitysvc_services-0.2.4}/docs/getting-started.md +8 -0
  5. {unitysvc_services-0.2.2 → unitysvc_services-0.2.4}/docs/workflows.md +9 -0
  6. {unitysvc_services-0.2.2 → unitysvc_services-0.2.4}/pyproject.toml +1 -1
  7. {unitysvc_services-0.2.2 → unitysvc_services-0.2.4}/src/unitysvc_services/publisher.py +7 -2
  8. unitysvc_services-0.2.4/src/unitysvc_services/query.py +670 -0
  9. {unitysvc_services-0.2.2 → unitysvc_services-0.2.4}/src/unitysvc_services.egg-info/PKG-INFO +5 -2
  10. unitysvc_services-0.2.2/src/unitysvc_services/query.py +0 -375
  11. {unitysvc_services-0.2.2 → unitysvc_services-0.2.4}/CONTRIBUTING.md +0 -0
  12. {unitysvc_services-0.2.2 → unitysvc_services-0.2.4}/HISTORY.md +0 -0
  13. {unitysvc_services-0.2.2 → unitysvc_services-0.2.4}/LICENSE +0 -0
  14. {unitysvc_services-0.2.2 → unitysvc_services-0.2.4}/MANIFEST.in +0 -0
  15. {unitysvc_services-0.2.2 → unitysvc_services-0.2.4}/docs/api-reference.md +0 -0
  16. {unitysvc_services-0.2.2 → unitysvc_services-0.2.4}/docs/contributing.md +0 -0
  17. {unitysvc_services-0.2.2 → unitysvc_services-0.2.4}/docs/data-structure.md +0 -0
  18. {unitysvc_services-0.2.2 → unitysvc_services-0.2.4}/docs/development.md +0 -0
  19. {unitysvc_services-0.2.2 → unitysvc_services-0.2.4}/docs/file-schemas.md +0 -0
  20. {unitysvc_services-0.2.2 → unitysvc_services-0.2.4}/docs/index.md +0 -0
  21. {unitysvc_services-0.2.2 → unitysvc_services-0.2.4}/docs/installation.md +0 -0
  22. {unitysvc_services-0.2.2 → unitysvc_services-0.2.4}/docs/usage.md +0 -0
  23. {unitysvc_services-0.2.2 → unitysvc_services-0.2.4}/setup.cfg +0 -0
  24. {unitysvc_services-0.2.2 → unitysvc_services-0.2.4}/src/unitysvc_services/__init__.py +0 -0
  25. {unitysvc_services-0.2.2 → unitysvc_services-0.2.4}/src/unitysvc_services/cli.py +0 -0
  26. {unitysvc_services-0.2.2 → unitysvc_services-0.2.4}/src/unitysvc_services/format_data.py +0 -0
  27. {unitysvc_services-0.2.2 → unitysvc_services-0.2.4}/src/unitysvc_services/list.py +0 -0
  28. {unitysvc_services-0.2.2 → unitysvc_services-0.2.4}/src/unitysvc_services/models/__init__.py +0 -0
  29. {unitysvc_services-0.2.2 → unitysvc_services-0.2.4}/src/unitysvc_services/models/base.py +0 -0
  30. {unitysvc_services-0.2.2 → unitysvc_services-0.2.4}/src/unitysvc_services/models/listing_v1.py +0 -0
  31. {unitysvc_services-0.2.2 → unitysvc_services-0.2.4}/src/unitysvc_services/models/provider_v1.py +0 -0
  32. {unitysvc_services-0.2.2 → unitysvc_services-0.2.4}/src/unitysvc_services/models/seller_v1.py +0 -0
  33. {unitysvc_services-0.2.2 → unitysvc_services-0.2.4}/src/unitysvc_services/models/service_v1.py +0 -0
  34. {unitysvc_services-0.2.2 → unitysvc_services-0.2.4}/src/unitysvc_services/populate.py +0 -0
  35. {unitysvc_services-0.2.2 → unitysvc_services-0.2.4}/src/unitysvc_services/py.typed +0 -0
  36. {unitysvc_services-0.2.2 → unitysvc_services-0.2.4}/src/unitysvc_services/scaffold.py +0 -0
  37. {unitysvc_services-0.2.2 → unitysvc_services-0.2.4}/src/unitysvc_services/update.py +0 -0
  38. {unitysvc_services-0.2.2 → unitysvc_services-0.2.4}/src/unitysvc_services/utils.py +0 -0
  39. {unitysvc_services-0.2.2 → unitysvc_services-0.2.4}/src/unitysvc_services/validator.py +0 -0
  40. {unitysvc_services-0.2.2 → unitysvc_services-0.2.4}/src/unitysvc_services.egg-info/SOURCES.txt +0 -0
  41. {unitysvc_services-0.2.2 → unitysvc_services-0.2.4}/src/unitysvc_services.egg-info/dependency_links.txt +0 -0
  42. {unitysvc_services-0.2.2 → unitysvc_services-0.2.4}/src/unitysvc_services.egg-info/entry_points.txt +0 -0
  43. {unitysvc_services-0.2.2 → unitysvc_services-0.2.4}/src/unitysvc_services.egg-info/requires.txt +0 -0
  44. {unitysvc_services-0.2.2 → unitysvc_services-0.2.4}/src/unitysvc_services.egg-info/top_level.txt +0 -0
  45. {unitysvc_services-0.2.2 → unitysvc_services-0.2.4}/tests/__init__.py +0 -0
  46. {unitysvc_services-0.2.2 → unitysvc_services-0.2.4}/tests/example_data/README.md +0 -0
  47. {unitysvc_services-0.2.2 → unitysvc_services-0.2.4}/tests/example_data/provider1/README.md +0 -0
  48. {unitysvc_services-0.2.2 → unitysvc_services-0.2.4}/tests/example_data/provider1/provider.toml +0 -0
  49. {unitysvc_services-0.2.2 → unitysvc_services-0.2.4}/tests/example_data/provider1/services/service1/code-example.md +0 -0
  50. {unitysvc_services-0.2.2 → unitysvc_services-0.2.4}/tests/example_data/provider1/services/service1/service.toml +0 -0
  51. {unitysvc_services-0.2.2 → unitysvc_services-0.2.4}/tests/example_data/provider1/services/service1/svcreseller.toml +0 -0
  52. {unitysvc_services-0.2.2 → unitysvc_services-0.2.4}/tests/example_data/provider1/terms-of-service.md +0 -0
  53. {unitysvc_services-0.2.2 → unitysvc_services-0.2.4}/tests/example_data/provider2/README.md +0 -0
  54. {unitysvc_services-0.2.2 → unitysvc_services-0.2.4}/tests/example_data/provider2/provider.json +0 -0
  55. {unitysvc_services-0.2.2 → unitysvc_services-0.2.4}/tests/example_data/provider2/services/service2/code-example.md +0 -0
  56. {unitysvc_services-0.2.2 → unitysvc_services-0.2.4}/tests/example_data/provider2/services/service2/service.json +0 -0
  57. {unitysvc_services-0.2.2 → unitysvc_services-0.2.4}/tests/example_data/provider2/services/service2/svcreseller.json +0 -0
  58. {unitysvc_services-0.2.2 → unitysvc_services-0.2.4}/tests/example_data/provider2/terms-of-service.md +0 -0
  59. {unitysvc_services-0.2.2 → unitysvc_services-0.2.4}/tests/example_data/seller.json +0 -0
  60. {unitysvc_services-0.2.2 → unitysvc_services-0.2.4}/tests/test_utils.py +0 -0
  61. {unitysvc_services-0.2.2 → unitysvc_services-0.2.4}/tests/test_validator.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: unitysvc-services
3
- Version: 0.2.2
3
+ Version: 0.2.4
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>
@@ -87,8 +87,11 @@ unitysvc_services publish
87
87
  # Or publish specific types only
88
88
  unitysvc_services publish providers
89
89
 
90
- # Verify
90
+ # Verify with default fields
91
91
  unitysvc_services query offerings
92
+
93
+ # Query with custom fields
94
+ unitysvc_services query providers --fields id,name,contact_email
92
95
  ```
93
96
 
94
97
  ## Key Features
@@ -45,8 +45,11 @@ unitysvc_services publish
45
45
  # Or publish specific types only
46
46
  unitysvc_services publish providers
47
47
 
48
- # Verify
48
+ # Verify with default fields
49
49
  unitysvc_services query offerings
50
+
51
+ # Query with custom fields
52
+ unitysvc_services query providers --fields id,name,contact_email
50
53
  ```
51
54
 
52
55
  ## Key Features
@@ -157,6 +157,8 @@ unitysvc_services list listings [DATA_DIR]
157
157
 
158
158
  Query data from UnitySVC backend API.
159
159
 
160
+ All query commands support field selection to customize output columns and pagination options.
161
+
160
162
  ### query providers
161
163
 
162
164
  ```bash
@@ -166,11 +168,13 @@ unitysvc_services query providers [OPTIONS]
166
168
  **Options:**
167
169
 
168
170
  - `--format, -f {table|json}` - Output format (default: table)
171
+ - `--fields FIELDS` - Comma-separated list of fields to display (default: id,name,display_name,status)
172
+ - `--skip SKIP` - Number of records to skip for pagination (default: 0)
173
+ - `--limit LIMIT` - Maximum number of records to return (default: 100)
169
174
 
170
- **Required Environment Variables:**
175
+ **Available Fields:**
171
176
 
172
- - `UNITYSVC_BASE_URL` - Backend API URL
173
- - `UNITYSVC_API_KEY` - API key for authentication
177
+ id, name, display_name, contact_email, secondary_contact_email, homepage, description, status, created_at, updated_at
174
178
 
175
179
  ### query sellers
176
180
 
@@ -178,42 +182,85 @@ unitysvc_services query providers [OPTIONS]
178
182
  unitysvc_services query sellers [OPTIONS]
179
183
  ```
180
184
 
185
+ **Options:**
186
+
187
+ - `--format, -f {table|json}` - Output format (default: table)
188
+ - `--fields FIELDS` - Comma-separated list of fields to display (default: id,name,display_name,seller_type)
189
+ - `--skip SKIP` - Number of records to skip for pagination (default: 0)
190
+ - `--limit LIMIT` - Maximum number of records to return (default: 100)
191
+
192
+ **Available Fields:**
193
+
194
+ id, name, display_name, seller_type, contact_email, secondary_contact_email, homepage, description, business_registration, tax_id, account_manager_id, created_at, updated_at, status
195
+
181
196
  ### query offerings
182
197
 
183
198
  ```bash
184
199
  unitysvc_services query offerings [OPTIONS]
185
200
  ```
186
201
 
202
+ **Options:**
203
+
204
+ - `--format, -f {table|json}` - Output format (default: table)
205
+ - `--fields FIELDS` - Comma-separated list of fields to display (default: id,service_name,service_type,provider_name,status)
206
+ - `--skip SKIP` - Number of records to skip for pagination (default: 0)
207
+ - `--limit LIMIT` - Maximum number of records to return (default: 100)
208
+
209
+ **Available Fields:**
210
+
211
+ id, definition_id, provider_id, status, price, service_name, service_type, provider_name
212
+
187
213
  ### query listings
188
214
 
189
215
  ```bash
190
216
  unitysvc_services query listings [OPTIONS]
191
217
  ```
192
218
 
193
- ### query interfaces
219
+ **Options:**
194
220
 
195
- ```bash
196
- unitysvc_services query interfaces [OPTIONS]
197
- ```
221
+ - `--format, -f {table|json}` - Output format (default: table)
222
+ - `--fields FIELDS` - Comma-separated list of fields to display (default: id,service_name,service_type,seller_name,listing_type,status)
223
+ - `--skip SKIP` - Number of records to skip for pagination (default: 0)
224
+ - `--limit LIMIT` - Maximum number of records to return (default: 100)
198
225
 
199
- Query access interfaces (private endpoint).
226
+ **Available Fields:**
200
227
 
201
- ### query documents
228
+ id, offering_id, seller_id, status, created_at, updated_at, parameters_schema, parameters_ui_schema, tags, service_name, service_type, provider_name, seller_name, listing_type
202
229
 
203
- ```bash
204
- unitysvc_services query documents [OPTIONS]
205
- ```
230
+ **Required Environment Variables:**
206
231
 
207
- Query documents (private endpoint).
232
+ - `UNITYSVC_BASE_URL` - Backend API URL
233
+ - `UNITYSVC_API_KEY` - API key for authentication
208
234
 
209
235
  **Examples:**
210
236
 
211
237
  ```bash
212
- # Table output
238
+ # Table output with default fields
213
239
  unitysvc_services query providers
214
240
 
215
241
  # JSON output
216
242
  unitysvc_services query offerings --format json
243
+
244
+ # Custom fields - show only specific columns
245
+ unitysvc_services query providers --fields id,name,contact_email
246
+
247
+ # Show all available fields for sellers
248
+ unitysvc_services query sellers --fields id,name,display_name,seller_type,contact_email,homepage,created_at,updated_at
249
+
250
+ # Custom fields for listings
251
+ unitysvc_services query listings --fields id,service_name,listing_type,status
252
+
253
+ # Retrieve more than 100 records
254
+ unitysvc_services query providers --limit 500
255
+
256
+ # Pagination: get second page of 100 records
257
+ unitysvc_services query offerings --skip 100 --limit 100
258
+
259
+ # Large dataset retrieval
260
+ unitysvc_services query listings --limit 1000
261
+
262
+ # Combine pagination with custom fields
263
+ unitysvc_services query sellers --skip 50 --limit 50 --fields id,name,contact_email
217
264
  ```
218
265
 
219
266
  ## publish - Publish to Backend
@@ -147,9 +147,17 @@ unitysvc_services publish sellers
147
147
  ### Step 9: Verify Your Published Data
148
148
 
149
149
  ```bash
150
+ # Query with default fields
150
151
  unitysvc_services query providers
151
152
  unitysvc_services query offerings
152
153
  unitysvc_services query listings
154
+
155
+ # Query with custom fields - show only specific columns
156
+ unitysvc_services query providers --fields id,name,contact_email
157
+ unitysvc_services query listings --fields id,service_name,listing_type,status
158
+
159
+ # Query as JSON for programmatic use
160
+ unitysvc_services query offerings --format json
153
161
  ```
154
162
 
155
163
  ## Next Steps
@@ -102,9 +102,14 @@ unitysvc_services publish --data-path ./data
102
102
  #### 7. Verify on Platform
103
103
 
104
104
  ```bash
105
+ # Query with default fields
105
106
  unitysvc_services query providers
106
107
  unitysvc_services query offerings
107
108
  unitysvc_services query listings
109
+
110
+ # Or query with custom fields for focused output
111
+ unitysvc_services query providers --fields id,name,status
112
+ unitysvc_services query listings --fields id,service_name,listing_type,status
108
113
  ```
109
114
 
110
115
  ### Version Control Integration
@@ -269,7 +274,11 @@ unitysvc_services publish
269
274
  #### 8. Verify
270
275
 
271
276
  ```bash
277
+ # Query with default fields
272
278
  unitysvc_services query offerings
279
+
280
+ # Or query with custom fields
281
+ unitysvc_services query offerings --fields id,service_name,status
273
282
  ```
274
283
 
275
284
  ### Automation with CI/CD
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "unitysvc-services"
3
- version = "0.2.2"
3
+ version = "0.2.4"
4
4
  description = "SDK for digital service providers on UnitySVC"
5
5
  readme = "README.md"
6
6
  authors = [{ name = "Bo Peng", email = "bo.peng@unitysvc.com" }]
@@ -106,6 +106,11 @@ class ServiceDataPublisher:
106
106
 
107
107
  # Resolve file references and include content
108
108
  base_path = data_file.parent
109
+ data = convert_convenience_fields_to_documents(
110
+ data, base_path, logo_field="logo", terms_field="terms_of_service"
111
+ )
112
+
113
+ # Resolve file references and include content
109
114
  data_with_content = self.resolve_file_references(data, base_path)
110
115
 
111
116
  # Extract provider_name from directory structure
@@ -139,7 +144,7 @@ class ServiceDataPublisher:
139
144
 
140
145
  # Post to the endpoint
141
146
  response = self.client.post(
142
- f"{self.base_url}/publish/service_offering",
147
+ f"{self.base_url}/publish/offering",
143
148
  json=data_with_content,
144
149
  )
145
150
  response.raise_for_status()
@@ -250,7 +255,7 @@ class ServiceDataPublisher:
250
255
 
251
256
  # Post to the endpoint
252
257
  response = self.client.post(
253
- f"{self.base_url}/publish/service_listing",
258
+ f"{self.base_url}/publish/listing",
254
259
  json=data_with_content,
255
260
  )
256
261
  response.raise_for_status()