unitysvc-services 0.1.24__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 (37) hide show
  1. unitysvc_services/__init__.py +4 -0
  2. unitysvc_services/api.py +421 -0
  3. unitysvc_services/cli.py +23 -0
  4. unitysvc_services/format_data.py +140 -0
  5. unitysvc_services/interactive_prompt.py +1132 -0
  6. unitysvc_services/list.py +216 -0
  7. unitysvc_services/models/__init__.py +71 -0
  8. unitysvc_services/models/base.py +1375 -0
  9. unitysvc_services/models/listing_data.py +118 -0
  10. unitysvc_services/models/listing_v1.py +56 -0
  11. unitysvc_services/models/provider_data.py +79 -0
  12. unitysvc_services/models/provider_v1.py +54 -0
  13. unitysvc_services/models/seller_data.py +120 -0
  14. unitysvc_services/models/seller_v1.py +42 -0
  15. unitysvc_services/models/service_data.py +114 -0
  16. unitysvc_services/models/service_v1.py +81 -0
  17. unitysvc_services/populate.py +207 -0
  18. unitysvc_services/publisher.py +1628 -0
  19. unitysvc_services/py.typed +0 -0
  20. unitysvc_services/query.py +688 -0
  21. unitysvc_services/scaffold.py +1103 -0
  22. unitysvc_services/schema/base.json +777 -0
  23. unitysvc_services/schema/listing_v1.json +1286 -0
  24. unitysvc_services/schema/provider_v1.json +952 -0
  25. unitysvc_services/schema/seller_v1.json +379 -0
  26. unitysvc_services/schema/service_v1.json +1306 -0
  27. unitysvc_services/test.py +965 -0
  28. unitysvc_services/unpublisher.py +505 -0
  29. unitysvc_services/update.py +287 -0
  30. unitysvc_services/utils.py +533 -0
  31. unitysvc_services/validator.py +731 -0
  32. unitysvc_services-0.1.24.dist-info/METADATA +184 -0
  33. unitysvc_services-0.1.24.dist-info/RECORD +37 -0
  34. unitysvc_services-0.1.24.dist-info/WHEEL +5 -0
  35. unitysvc_services-0.1.24.dist-info/entry_points.txt +3 -0
  36. unitysvc_services-0.1.24.dist-info/licenses/LICENSE +21 -0
  37. unitysvc_services-0.1.24.dist-info/top_level.txt +1 -0
@@ -0,0 +1,777 @@
1
+ {
2
+ "$defs": {
3
+ "AccessMethodEnum": {
4
+ "enum": [
5
+ "http",
6
+ "websocket",
7
+ "grpc"
8
+ ],
9
+ "title": "AccessMethodEnum",
10
+ "type": "string"
11
+ },
12
+ "AuthMethodEnum": {
13
+ "enum": [
14
+ "api_key",
15
+ "oauth",
16
+ "jwt",
17
+ "bearer_token",
18
+ "basic_auth"
19
+ ],
20
+ "title": "AuthMethodEnum",
21
+ "type": "string"
22
+ },
23
+ "ContentFilterEnum": {
24
+ "enum": [
25
+ "adult",
26
+ "violence",
27
+ "hate_speech",
28
+ "profanity",
29
+ "pii"
30
+ ],
31
+ "title": "ContentFilterEnum",
32
+ "type": "string"
33
+ },
34
+ "Document": {
35
+ "additionalProperties": false,
36
+ "properties": {
37
+ "category": {
38
+ "$ref": "#/$defs/DocumentCategoryEnum",
39
+ "description": "Document category for organization and filtering"
40
+ },
41
+ "description": {
42
+ "anyOf": [
43
+ {
44
+ "maxLength": 500,
45
+ "type": "string"
46
+ },
47
+ {
48
+ "type": "null"
49
+ }
50
+ ],
51
+ "default": null,
52
+ "description": "Document description",
53
+ "title": "Description"
54
+ },
55
+ "external_url": {
56
+ "anyOf": [
57
+ {
58
+ "maxLength": 1000,
59
+ "type": "string"
60
+ },
61
+ {
62
+ "type": "null"
63
+ }
64
+ ],
65
+ "default": null,
66
+ "description": "External URL for the document (mutually exclusive with object_key)",
67
+ "title": "External Url"
68
+ },
69
+ "file_path": {
70
+ "anyOf": [
71
+ {
72
+ "maxLength": 1000,
73
+ "type": "string"
74
+ },
75
+ {
76
+ "type": "null"
77
+ }
78
+ ],
79
+ "default": null,
80
+ "description": "Path to file to upload (mutually exclusive with external_url)",
81
+ "title": "File Path"
82
+ },
83
+ "is_active": {
84
+ "default": true,
85
+ "description": "Whether document is active",
86
+ "title": "Is Active",
87
+ "type": "boolean"
88
+ },
89
+ "is_public": {
90
+ "default": false,
91
+ "description": "Whether document is publicly accessible without authentication",
92
+ "title": "Is Public",
93
+ "type": "boolean"
94
+ },
95
+ "meta": {
96
+ "anyOf": [
97
+ {
98
+ "additionalProperties": true,
99
+ "type": "object"
100
+ },
101
+ {
102
+ "type": "null"
103
+ }
104
+ ],
105
+ "default": null,
106
+ "description": "JSON containing operation stats",
107
+ "title": "Meta"
108
+ },
109
+ "mime_type": {
110
+ "$ref": "#/$defs/MimeTypeEnum",
111
+ "description": "Document MIME type"
112
+ },
113
+ "sort_order": {
114
+ "default": 0,
115
+ "description": "Sort order within category",
116
+ "title": "Sort Order",
117
+ "type": "integer"
118
+ },
119
+ "title": {
120
+ "description": "Document title",
121
+ "maxLength": 255,
122
+ "minLength": 5,
123
+ "title": "Title",
124
+ "type": "string"
125
+ },
126
+ "version": {
127
+ "anyOf": [
128
+ {
129
+ "maxLength": 50,
130
+ "type": "string"
131
+ },
132
+ {
133
+ "type": "null"
134
+ }
135
+ ],
136
+ "default": null,
137
+ "description": "Document version",
138
+ "title": "Version"
139
+ }
140
+ },
141
+ "required": [
142
+ "title",
143
+ "mime_type",
144
+ "category"
145
+ ],
146
+ "title": "Document",
147
+ "type": "object"
148
+ },
149
+ "DocumentCategoryEnum": {
150
+ "enum": [
151
+ "getting_started",
152
+ "api_reference",
153
+ "tutorial",
154
+ "code_example",
155
+ "code_example_output",
156
+ "use_case",
157
+ "troubleshooting",
158
+ "changelog",
159
+ "best_practice",
160
+ "specification",
161
+ "service_level_agreement",
162
+ "terms_of_service",
163
+ "invoice",
164
+ "logo",
165
+ "avatar",
166
+ "other"
167
+ ],
168
+ "title": "DocumentCategoryEnum",
169
+ "type": "string"
170
+ },
171
+ "MimeTypeEnum": {
172
+ "enum": [
173
+ "markdown",
174
+ "python",
175
+ "javascript",
176
+ "bash",
177
+ "html",
178
+ "text",
179
+ "pdf",
180
+ "jpeg",
181
+ "png",
182
+ "svg",
183
+ "url"
184
+ ],
185
+ "title": "MimeTypeEnum",
186
+ "type": "string"
187
+ },
188
+ "OveragePolicyEnum": {
189
+ "enum": [
190
+ "block",
191
+ "throttle",
192
+ "charge",
193
+ "queue"
194
+ ],
195
+ "title": "OveragePolicyEnum",
196
+ "type": "string"
197
+ },
198
+ "QuotaResetCycleEnum": {
199
+ "enum": [
200
+ "daily",
201
+ "weekly",
202
+ "monthly",
203
+ "yearly"
204
+ ],
205
+ "title": "QuotaResetCycleEnum",
206
+ "type": "string"
207
+ },
208
+ "RateLimit": {
209
+ "additionalProperties": false,
210
+ "description": "Store rate limiting rules for services.",
211
+ "properties": {
212
+ "burst_limit": {
213
+ "anyOf": [
214
+ {
215
+ "type": "integer"
216
+ },
217
+ {
218
+ "type": "null"
219
+ }
220
+ ],
221
+ "default": null,
222
+ "description": "Short-term burst allowance",
223
+ "title": "Burst Limit"
224
+ },
225
+ "description": {
226
+ "anyOf": [
227
+ {
228
+ "maxLength": 255,
229
+ "type": "string"
230
+ },
231
+ {
232
+ "type": "null"
233
+ }
234
+ ],
235
+ "default": null,
236
+ "description": "Human-readable description",
237
+ "title": "Description"
238
+ },
239
+ "is_active": {
240
+ "default": true,
241
+ "description": "Whether rate limit is active",
242
+ "title": "Is Active",
243
+ "type": "boolean"
244
+ },
245
+ "limit": {
246
+ "description": "Maximum allowed in the time window",
247
+ "title": "Limit",
248
+ "type": "integer"
249
+ },
250
+ "unit": {
251
+ "$ref": "#/$defs/RateLimitUnitEnum",
252
+ "description": "What is being limited"
253
+ },
254
+ "window": {
255
+ "$ref": "#/$defs/TimeWindowEnum",
256
+ "description": "Time window for the limit"
257
+ }
258
+ },
259
+ "required": [
260
+ "limit",
261
+ "unit",
262
+ "window"
263
+ ],
264
+ "title": "RateLimit",
265
+ "type": "object"
266
+ },
267
+ "RateLimitUnitEnum": {
268
+ "enum": [
269
+ "requests",
270
+ "tokens",
271
+ "input_tokens",
272
+ "output_tokens",
273
+ "bytes",
274
+ "concurrent"
275
+ ],
276
+ "title": "RateLimitUnitEnum",
277
+ "type": "string"
278
+ },
279
+ "RequestTransformEnum": {
280
+ "enum": [
281
+ "proxy_rewrite",
282
+ "body_transformer"
283
+ ],
284
+ "title": "RequestTransformEnum",
285
+ "type": "string"
286
+ },
287
+ "ServiceConstraints": {
288
+ "additionalProperties": false,
289
+ "properties": {
290
+ "auth_methods": {
291
+ "anyOf": [
292
+ {
293
+ "items": {
294
+ "$ref": "#/$defs/AuthMethodEnum"
295
+ },
296
+ "type": "array"
297
+ },
298
+ {
299
+ "type": "null"
300
+ }
301
+ ],
302
+ "default": null,
303
+ "description": "Supported authentication methods",
304
+ "title": "Auth Methods"
305
+ },
306
+ "connection_timeout_seconds": {
307
+ "anyOf": [
308
+ {
309
+ "type": "integer"
310
+ },
311
+ {
312
+ "type": "null"
313
+ }
314
+ ],
315
+ "default": null,
316
+ "description": "Connection timeout in seconds",
317
+ "title": "Connection Timeout Seconds"
318
+ },
319
+ "content_filters": {
320
+ "anyOf": [
321
+ {
322
+ "items": {
323
+ "$ref": "#/$defs/ContentFilterEnum"
324
+ },
325
+ "type": "array"
326
+ },
327
+ {
328
+ "type": "null"
329
+ }
330
+ ],
331
+ "default": null,
332
+ "description": "Active content filtering policies",
333
+ "title": "Content Filters"
334
+ },
335
+ "daily_quota": {
336
+ "anyOf": [
337
+ {
338
+ "type": "integer"
339
+ },
340
+ {
341
+ "type": "null"
342
+ }
343
+ ],
344
+ "default": null,
345
+ "description": "Daily usage quota (requests, tokens, etc.)",
346
+ "title": "Daily Quota"
347
+ },
348
+ "input_languages": {
349
+ "anyOf": [
350
+ {
351
+ "items": {
352
+ "type": "string"
353
+ },
354
+ "type": "array"
355
+ },
356
+ {
357
+ "type": "null"
358
+ }
359
+ ],
360
+ "default": null,
361
+ "description": "Supported input languages (ISO 639-1 codes)",
362
+ "title": "Input Languages"
363
+ },
364
+ "ip_whitelist_required": {
365
+ "anyOf": [
366
+ {
367
+ "type": "boolean"
368
+ },
369
+ {
370
+ "type": "null"
371
+ }
372
+ ],
373
+ "default": null,
374
+ "description": "Whether IP whitelisting is required",
375
+ "title": "Ip Whitelist Required"
376
+ },
377
+ "maintenance_windows": {
378
+ "anyOf": [
379
+ {
380
+ "items": {
381
+ "type": "string"
382
+ },
383
+ "type": "array"
384
+ },
385
+ {
386
+ "type": "null"
387
+ }
388
+ ],
389
+ "default": null,
390
+ "description": "Scheduled maintenance windows",
391
+ "title": "Maintenance Windows"
392
+ },
393
+ "max_batch_size": {
394
+ "anyOf": [
395
+ {
396
+ "type": "integer"
397
+ },
398
+ {
399
+ "type": "null"
400
+ }
401
+ ],
402
+ "default": null,
403
+ "description": "Maximum number of items in batch requests",
404
+ "title": "Max Batch Size"
405
+ },
406
+ "max_concurrent_requests": {
407
+ "anyOf": [
408
+ {
409
+ "type": "integer"
410
+ },
411
+ {
412
+ "type": "null"
413
+ }
414
+ ],
415
+ "default": null,
416
+ "description": "Maximum concurrent requests allowed",
417
+ "title": "Max Concurrent Requests"
418
+ },
419
+ "max_connections_per_ip": {
420
+ "anyOf": [
421
+ {
422
+ "type": "integer"
423
+ },
424
+ {
425
+ "type": "null"
426
+ }
427
+ ],
428
+ "default": null,
429
+ "description": "Maximum connections per IP address",
430
+ "title": "Max Connections Per Ip"
431
+ },
432
+ "max_context_length": {
433
+ "anyOf": [
434
+ {
435
+ "type": "integer"
436
+ },
437
+ {
438
+ "type": "null"
439
+ }
440
+ ],
441
+ "default": null,
442
+ "description": "Maximum context length in tokens",
443
+ "title": "Max Context Length"
444
+ },
445
+ "max_request_size_bytes": {
446
+ "anyOf": [
447
+ {
448
+ "type": "integer"
449
+ },
450
+ {
451
+ "type": "null"
452
+ }
453
+ ],
454
+ "default": null,
455
+ "description": "Maximum request payload size in bytes",
456
+ "title": "Max Request Size Bytes"
457
+ },
458
+ "max_response_size_bytes": {
459
+ "anyOf": [
460
+ {
461
+ "type": "integer"
462
+ },
463
+ {
464
+ "type": "null"
465
+ }
466
+ ],
467
+ "default": null,
468
+ "description": "Maximum response payload size in bytes",
469
+ "title": "Max Response Size Bytes"
470
+ },
471
+ "monthly_quota": {
472
+ "anyOf": [
473
+ {
474
+ "type": "integer"
475
+ },
476
+ {
477
+ "type": "null"
478
+ }
479
+ ],
480
+ "default": null,
481
+ "description": "Monthly usage quota (requests, tokens, etc.)",
482
+ "title": "Monthly Quota"
483
+ },
484
+ "output_languages": {
485
+ "anyOf": [
486
+ {
487
+ "items": {
488
+ "type": "string"
489
+ },
490
+ "type": "array"
491
+ },
492
+ {
493
+ "type": "null"
494
+ }
495
+ ],
496
+ "default": null,
497
+ "description": "Supported output languages (ISO 639-1 codes)",
498
+ "title": "Output Languages"
499
+ },
500
+ "overage_policy": {
501
+ "anyOf": [
502
+ {
503
+ "$ref": "#/$defs/OveragePolicyEnum"
504
+ },
505
+ {
506
+ "type": "null"
507
+ }
508
+ ],
509
+ "default": null,
510
+ "description": "What happens when quota is exceeded"
511
+ },
512
+ "quota_reset_cycle": {
513
+ "anyOf": [
514
+ {
515
+ "$ref": "#/$defs/QuotaResetCycleEnum"
516
+ },
517
+ {
518
+ "type": "null"
519
+ }
520
+ ],
521
+ "default": null,
522
+ "description": "How often quotas reset"
523
+ },
524
+ "quota_unit": {
525
+ "anyOf": [
526
+ {
527
+ "$ref": "#/$defs/RateLimitUnitEnum"
528
+ },
529
+ {
530
+ "type": "null"
531
+ }
532
+ ],
533
+ "default": null,
534
+ "description": "Unit for quota limits"
535
+ },
536
+ "region_restrictions": {
537
+ "anyOf": [
538
+ {
539
+ "items": {
540
+ "type": "string"
541
+ },
542
+ "type": "array"
543
+ },
544
+ {
545
+ "type": "null"
546
+ }
547
+ ],
548
+ "default": null,
549
+ "description": "Geographic restrictions (ISO country codes)",
550
+ "title": "Region Restrictions"
551
+ },
552
+ "response_time_sla_ms": {
553
+ "anyOf": [
554
+ {
555
+ "type": "integer"
556
+ },
557
+ {
558
+ "type": "null"
559
+ }
560
+ ],
561
+ "default": null,
562
+ "description": "Response time SLA in milliseconds",
563
+ "title": "Response Time Sla Ms"
564
+ },
565
+ "timeout_seconds": {
566
+ "anyOf": [
567
+ {
568
+ "type": "integer"
569
+ },
570
+ {
571
+ "type": "null"
572
+ }
573
+ ],
574
+ "default": null,
575
+ "description": "Request timeout in seconds",
576
+ "title": "Timeout Seconds"
577
+ },
578
+ "tls_version_min": {
579
+ "anyOf": [
580
+ {
581
+ "type": "string"
582
+ },
583
+ {
584
+ "type": "null"
585
+ }
586
+ ],
587
+ "default": null,
588
+ "description": "Minimum TLS version required",
589
+ "title": "Tls Version Min"
590
+ },
591
+ "uptime_sla_percent": {
592
+ "anyOf": [
593
+ {
594
+ "type": "number"
595
+ },
596
+ {
597
+ "type": "null"
598
+ }
599
+ ],
600
+ "default": null,
601
+ "description": "Uptime SLA percentage (e.g., 99.9)",
602
+ "title": "Uptime Sla Percent"
603
+ }
604
+ },
605
+ "title": "ServiceConstraints",
606
+ "type": "object"
607
+ },
608
+ "TimeWindowEnum": {
609
+ "enum": [
610
+ "second",
611
+ "minute",
612
+ "hour",
613
+ "day",
614
+ "month"
615
+ ],
616
+ "title": "TimeWindowEnum",
617
+ "type": "string"
618
+ }
619
+ },
620
+ "additionalProperties": true,
621
+ "properties": {
622
+ "access_method": {
623
+ "$ref": "#/$defs/AccessMethodEnum",
624
+ "default": "http",
625
+ "description": "Type of access method"
626
+ },
627
+ "api_key": {
628
+ "anyOf": [
629
+ {
630
+ "maxLength": 2000,
631
+ "type": "string"
632
+ },
633
+ {
634
+ "type": "null"
635
+ }
636
+ ],
637
+ "default": null,
638
+ "description": "API key if required",
639
+ "title": "Api Key"
640
+ },
641
+ "base_url": {
642
+ "description": "Base URL for api access",
643
+ "maxLength": 500,
644
+ "title": "Base Url",
645
+ "type": "string"
646
+ },
647
+ "constraint": {
648
+ "anyOf": [
649
+ {
650
+ "$ref": "#/$defs/ServiceConstraints"
651
+ },
652
+ {
653
+ "type": "null"
654
+ }
655
+ ],
656
+ "default": null,
657
+ "description": "Service constraints and conditions"
658
+ },
659
+ "description": {
660
+ "anyOf": [
661
+ {
662
+ "maxLength": 500,
663
+ "type": "string"
664
+ },
665
+ {
666
+ "type": "null"
667
+ }
668
+ ],
669
+ "default": null,
670
+ "description": "Interface description",
671
+ "title": "Description"
672
+ },
673
+ "documents": {
674
+ "anyOf": [
675
+ {
676
+ "items": {
677
+ "$ref": "#/$defs/Document"
678
+ },
679
+ "type": "array"
680
+ },
681
+ {
682
+ "type": "null"
683
+ }
684
+ ],
685
+ "default": null,
686
+ "description": "List of documents associated with the interface",
687
+ "title": "Documents"
688
+ },
689
+ "is_active": {
690
+ "default": true,
691
+ "description": "Whether interface is active",
692
+ "title": "Is Active",
693
+ "type": "boolean"
694
+ },
695
+ "is_primary": {
696
+ "default": false,
697
+ "description": "Whether this is the primary interface",
698
+ "title": "Is Primary",
699
+ "type": "boolean"
700
+ },
701
+ "name": {
702
+ "anyOf": [
703
+ {
704
+ "maxLength": 100,
705
+ "type": "string"
706
+ },
707
+ {
708
+ "type": "null"
709
+ }
710
+ ],
711
+ "default": null,
712
+ "description": "Interface name",
713
+ "title": "Name"
714
+ },
715
+ "rate_limits": {
716
+ "anyOf": [
717
+ {
718
+ "items": {
719
+ "$ref": "#/$defs/RateLimit"
720
+ },
721
+ "type": "array"
722
+ },
723
+ {
724
+ "type": "null"
725
+ }
726
+ ],
727
+ "default": null,
728
+ "description": "Rate limit",
729
+ "title": "Rate Limits"
730
+ },
731
+ "request_transformer": {
732
+ "anyOf": [
733
+ {
734
+ "additionalProperties": {
735
+ "additionalProperties": true,
736
+ "type": "object"
737
+ },
738
+ "propertyNames": {
739
+ "$ref": "#/$defs/RequestTransformEnum"
740
+ },
741
+ "type": "object"
742
+ },
743
+ {
744
+ "type": "null"
745
+ }
746
+ ],
747
+ "default": null,
748
+ "description": "Request transformation configuration",
749
+ "title": "Request Transformer"
750
+ },
751
+ "routing_key": {
752
+ "anyOf": [
753
+ {
754
+ "additionalProperties": true,
755
+ "type": "object"
756
+ },
757
+ {
758
+ "type": "null"
759
+ }
760
+ ],
761
+ "default": null,
762
+ "description": "Request routing key for matching (e.g., {'model': 'gpt-4'})",
763
+ "title": "Routing Key"
764
+ },
765
+ "sort_order": {
766
+ "default": 0,
767
+ "description": "Display order",
768
+ "title": "Sort Order",
769
+ "type": "integer"
770
+ }
771
+ },
772
+ "required": [
773
+ "base_url"
774
+ ],
775
+ "title": "AccessInterface",
776
+ "type": "object"
777
+ }