Skip to content

Commit a7f6433

Browse files
Update api spec (#411)
* YOYO NEW API SPEC! * I have generated the latest API! --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent d32c643 commit a7f6433

File tree

7 files changed

+556
-433
lines changed

7 files changed

+556
-433
lines changed

kittycad.py.patch.json

Lines changed: 405 additions & 405 deletions
Large diffs are not rendered by default.

kittycad/models/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
from .api_call_status import ApiCallStatus
1818
from .api_call_with_price import ApiCallWithPrice
1919
from .api_call_with_price_results_page import ApiCallWithPriceResultsPage
20+
from .api_endpoint import ApiEndpoint
2021
from .api_error import ApiError
2122
from .api_token import ApiToken
2223
from .api_token_results_page import ApiTokenResultsPage

kittycad/models/api_endpoint.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
from enum import Enum
2+
3+
4+
class ApiEndpoint(str, Enum):
5+
"""Types of API endpoints.""" # noqa: E501
6+
7+
"""# The modeling API. """ # noqa: E501
8+
MODELING = "modeling"
9+
"""# Machine learning API. """ # noqa: E501
10+
ML = "ml"
11+
"""# File API. """ # noqa: E501
12+
FILE = "file"
13+
14+
def __str__(self) -> str:
15+
return str(self.value)

kittycad/models/client_metrics.py

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,39 @@
1+
from typing import Optional
2+
13
from pydantic import BaseModel, ConfigDict
24

35

46
class ClientMetrics(BaseModel):
57
"""ClientMetrics contains information regarding the state of the peer."""
68

7-
rtc_frames_decoded: int
9+
rtc_frame_height: Optional[int] = None
10+
11+
rtc_frame_width: Optional[int] = None
12+
13+
rtc_frames_decoded: Optional[int] = None
14+
15+
rtc_frames_dropped: Optional[int] = None
16+
17+
rtc_frames_per_second: Optional[int] = None
18+
19+
rtc_frames_received: Optional[int] = None
20+
21+
rtc_freeze_count: Optional[int] = None
22+
23+
rtc_jitter_sec: Optional[float] = None
824

9-
rtc_frames_dropped: int
25+
rtc_keyframes_decoded: Optional[int] = None
1026

11-
rtc_frames_per_second: int
27+
rtc_packets_lost: Optional[int] = None
1228

13-
rtc_frames_received: int
29+
rtc_pause_count: Optional[int] = None
1430

15-
rtc_freeze_count: int
31+
rtc_pli_count: Optional[int] = None
1632

17-
rtc_jitter_sec: float
33+
rtc_stun_rtt_sec: Optional[float] = None
1834

19-
rtc_keyframes_decoded: int
35+
rtc_total_freezes_duration_sec: Optional[float] = None
2036

21-
rtc_total_freezes_duration_sec: float
37+
rtc_total_pauses_duration_sec: Optional[float] = None
2238

2339
model_config = ConfigDict(protected_namespaces=())

kittycad/models/modeling_app_subscription_tier.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
from pydantic import BaseModel, ConfigDict
44

5+
from ..models.api_endpoint import ApiEndpoint
56
from ..models.modeling_app_share_links import ModelingAppShareLinks
67
from ..models.modeling_app_subscription_tier_name import ModelingAppSubscriptionTierName
78
from ..models.subscription_tier_feature import SubscriptionTierFeature
@@ -21,6 +22,8 @@ class ModelingAppSubscriptionTier(BaseModel):
2122

2223
description: str
2324

25+
endpoints_included: Optional[List[ApiEndpoint]] = None
26+
2427
features: Optional[List[SubscriptionTierFeature]] = None
2528

2629
name: ModelingAppSubscriptionTierName

kittycad/models/zoo_product_subscription.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
from pydantic import BaseModel, ConfigDict
44

5+
from ..models.api_endpoint import ApiEndpoint
56
from ..models.modeling_app_share_links import ModelingAppShareLinks
67
from ..models.modeling_app_subscription_tier_name import ModelingAppSubscriptionTierName
78
from ..models.subscription_tier_feature import SubscriptionTierFeature
@@ -21,6 +22,8 @@ class ZooProductSubscription(BaseModel):
2122

2223
description: str
2324

25+
endpoints_included: Optional[List[ApiEndpoint]] = None
26+
2427
features: Optional[List[SubscriptionTierFeature]] = None
2528

2629
name: ModelingAppSubscriptionTierName

spec.json

Lines changed: 105 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -15469,6 +15469,32 @@
1546915469
"items"
1547015470
]
1547115471
},
15472+
"ApiEndpoint": {
15473+
"description": "Types of API endpoints.",
15474+
"oneOf": [
15475+
{
15476+
"description": "The modeling API.",
15477+
"type": "string",
15478+
"enum": [
15479+
"modeling"
15480+
]
15481+
},
15482+
{
15483+
"description": "Machine learning API.",
15484+
"type": "string",
15485+
"enum": [
15486+
"ml"
15487+
]
15488+
},
15489+
{
15490+
"description": "File API.",
15491+
"type": "string",
15492+
"enum": [
15493+
"file"
15494+
]
15495+
}
15496+
]
15497+
},
1547215498
"ApiError": {
1547315499
"description": "An error.",
1547415500
"type": "object",
@@ -17236,63 +17262,108 @@
1723617262
"description": "ClientMetrics contains information regarding the state of the peer.",
1723717263
"type": "object",
1723817264
"properties": {
17265+
"rtc_frame_height": {
17266+
"nullable": true,
17267+
"description": "The height of the inbound video stream in pixels.\n\nhttps://www.w3.org/TR/webrtc-stats/#dom-rtcinboundrtpstreamstats-frameheight",
17268+
"type": "integer",
17269+
"format": "uint32",
17270+
"minimum": 0
17271+
},
17272+
"rtc_frame_width": {
17273+
"nullable": true,
17274+
"description": "The width of the inbound video stream in pixels.\n\nhttps://www.w3.org/TR/webrtc-stats/#dom-rtcinboundrtpstreamstats-framewidth",
17275+
"type": "integer",
17276+
"format": "uint32",
17277+
"minimum": 0
17278+
},
1723917279
"rtc_frames_decoded": {
17240-
"description": "Counter of the number of WebRTC frames that the client has decoded during this session.",
17280+
"nullable": true,
17281+
"description": "Counter of the number of WebRTC frames that the client has decoded from the inbound video stream.\n\nhttps://www.w3.org/TR/webrtc-stats/#dom-rtcinboundrtpstreamstats-freezecount",
1724117282
"type": "integer",
1724217283
"format": "uint64",
1724317284
"minimum": 0
1724417285
},
1724517286
"rtc_frames_dropped": {
17246-
"description": "Counter of the number of WebRTC frames the client has dropped during this session.",
17287+
"nullable": true,
17288+
"description": "Counter of the number of WebRTC frames the client has dropped from the inbound video stream.\n\nhttps://www.w3.org/TR/webrtc-stats/#dom-rtcinboundrtpstreamstats-framesdropped",
1724717289
"type": "integer",
1724817290
"format": "uint32",
1724917291
"minimum": 0
1725017292
},
1725117293
"rtc_frames_per_second": {
17252-
"description": "Current number of frames being rendered per second. A good target is 60 frames per second, but it can fluctuate depending on network conditions.",
17294+
"nullable": true,
17295+
"description": "Current number of frames being rendered in the last second. A good target is 60 frames per second, but it can fluctuate depending on network conditions.\n\nhttps://www.w3.org/TR/webrtc-stats/#dom-rtcinboundrtpstreamstats-freezecount",
1725317296
"type": "integer",
1725417297
"format": "uint8",
1725517298
"minimum": 0
1725617299
},
1725717300
"rtc_frames_received": {
17258-
"description": "Counter of the number of WebRTC frames that the client has received during this session.",
17301+
"nullable": true,
17302+
"description": "Counter of the number of WebRTC frames that the client has received from the inbound video stream.\n\nhttps://www.w3.org/TR/webrtc-stats/#dom-rtcinboundrtpstreamstats-freezecount",
1725917303
"type": "integer",
1726017304
"format": "uint64",
1726117305
"minimum": 0
1726217306
},
1726317307
"rtc_freeze_count": {
17264-
"description": "Number of times the WebRTC playback has frozen. This is usually due to network conditions.",
17308+
"nullable": true,
17309+
"description": "Number of times the inbound video playback has frozen. This is usually due to network conditions.\n\nhttps://www.w3.org/TR/webrtc-stats/#dom-rtcinboundrtpstreamstats-freezecount",
1726517310
"type": "integer",
1726617311
"format": "uint32",
1726717312
"minimum": 0
1726817313
},
1726917314
"rtc_jitter_sec": {
17270-
"description": "Amount of \"jitter\" in the WebRTC session. Network latency is the time it takes a packet to traverse the network. The amount that the latency varies is the jitter. Video latency is the time it takes to render a frame sent by the server (including network latency). A low jitter means the video latency can be reduced without impacting smooth playback. High jitter means clients will increase video latency to ensure smooth playback.",
17315+
"nullable": true,
17316+
"description": "Amount of \"jitter\" in the inbound video stream. Network latency is the time it takes a packet to traverse the network. The amount that the latency varies is the jitter. Video latency is the time it takes to render a frame sent by the server (including network latency). A low jitter means the video latency can be reduced without impacting smooth playback. High jitter means clients will increase video latency to ensure smooth playback.\n\nhttps://www.w3.org/TR/webrtc-stats/#dom-rtcreceivedrtpstreamstats-jitter",
1727117317
"type": "number",
17272-
"format": "float"
17318+
"format": "double"
1727317319
},
1727417320
"rtc_keyframes_decoded": {
17275-
"description": "Number of \"key frames\" decoded in the underlying h.264 stream. A key frame is an expensive (bandwidth-wise) \"full image\" of the video frame. Data after the keyframe become -- effectively -- \"diff\" operations on that key frame. The Engine will only send a keyframe if required, which is an indication that some of the \"diffs\" have been lost, usually an indication of poor network conditions. We like this metric to understand times when the connection has had to recover.",
17321+
"nullable": true,
17322+
"description": "Number of \"key frames\" decoded in the inbound h.264 stream. A key frame is an expensive (bandwidth-wise) \"full image\" of the video frame. Data after the keyframe become -- effectively -- \"diff\" operations on that key frame. The Engine will only send a keyframe if required, which is an indication that some of the \"diffs\" have been lost, usually an indication of poor network conditions. We like this metric to understand times when the connection has had to recover.\n\nhttps://www.w3.org/TR/webrtc-stats/#dom-rtcinboundrtpstreamstats-keyframesdecoded",
17323+
"type": "integer",
17324+
"format": "uint32",
17325+
"minimum": 0
17326+
},
17327+
"rtc_packets_lost": {
17328+
"nullable": true,
17329+
"description": "Amount of packets lost in the inbound video stream.\n\nhttps://www.w3.org/TR/webrtc-stats/#dom-rtcreceivedrtpstreamstats-packetslost",
1727617330
"type": "integer",
1727717331
"format": "uint32",
1727817332
"minimum": 0
1727917333
},
17334+
"rtc_pause_count": {
17335+
"nullable": true,
17336+
"description": "Count of the total number of video pauses experienced by this receiver.\n\nhttps://www.w3.org/TR/webrtc-stats/#dom-rtcinboundrtpstreamstats-pausecount",
17337+
"type": "integer",
17338+
"format": "uint32",
17339+
"minimum": 0
17340+
},
17341+
"rtc_pli_count": {
17342+
"nullable": true,
17343+
"description": "Count the total number of Picture Loss Indication (PLI) packets.\n\nhttps://www.w3.org/TR/webrtc-stats/#dom-rtcinboundrtpstreamstats-plicount",
17344+
"type": "integer",
17345+
"format": "uint32",
17346+
"minimum": 0
17347+
},
17348+
"rtc_stun_rtt_sec": {
17349+
"nullable": true,
17350+
"description": "Total duration of pauses in seconds.\n\nThis is the \"ping\" between the client and the STUN server. Not to be confused with the E2E RTT documented [here](https://www.w3.org/TR/webrtc-stats/#dom-rtcremoteinboundrtpstreamstats-roundtriptime)\n\nhttps://www.w3.org/TR/webrtc-stats/#dom-rtcicecandidatepairstats-currentroundtriptime",
17351+
"type": "number",
17352+
"format": "float"
17353+
},
1728017354
"rtc_total_freezes_duration_sec": {
17281-
"description": "Number of seconds of frozen video the user has been subjected to.",
17355+
"nullable": true,
17356+
"description": "Number of seconds of frozen video the user has been subjected to.\n\nhttps://www.w3.org/TR/webrtc-stats/#dom-rtcinboundrtpstreamstats-totalfreezesduration",
17357+
"type": "number",
17358+
"format": "float"
17359+
},
17360+
"rtc_total_pauses_duration_sec": {
17361+
"nullable": true,
17362+
"description": "Count of the total number of video pauses experienced by this receiver.\n\nhttps://www.w3.org/TR/webrtc-stats/#dom-rtcinboundrtpstreamstats-totalpausesduration",
1728217363
"type": "number",
1728317364
"format": "float"
1728417365
}
17285-
},
17286-
"required": [
17287-
"rtc_frames_decoded",
17288-
"rtc_frames_dropped",
17289-
"rtc_frames_per_second",
17290-
"rtc_frames_received",
17291-
"rtc_freeze_count",
17292-
"rtc_jitter_sec",
17293-
"rtc_keyframes_decoded",
17294-
"rtc_total_freezes_duration_sec"
17295-
]
17366+
}
1729617367
},
1729717368
"ClosePath": {
1729817369
"description": "The response from the `ClosePath` command.",
@@ -21933,6 +22004,13 @@
2193322004
"description": "A description of the tier.",
2193422005
"type": "string"
2193522006
},
22007+
"endpoints_included": {
22008+
"description": "The Zoo API endpoints that are included when through an approved zoo tool.",
22009+
"type": "array",
22010+
"items": {
22011+
"$ref": "#/components/schemas/ApiEndpoint"
22012+
}
22013+
},
2193622014
"features": {
2193722015
"description": "Features that are included in the subscription.",
2193822016
"type": "array",
@@ -34377,6 +34455,13 @@
3437734455
"description": "A description of the tier.",
3437834456
"type": "string"
3437934457
},
34458+
"endpoints_included": {
34459+
"description": "The Zoo API endpoints that are included when through an approved zoo tool.",
34460+
"type": "array",
34461+
"items": {
34462+
"$ref": "#/components/schemas/ApiEndpoint"
34463+
}
34464+
},
3438034465
"features": {
3438134466
"description": "Features that are included in the subscription.",
3438234467
"type": "array",

0 commit comments

Comments
 (0)