-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds the experimentalapi client class to the docs #228
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# generated by datamodel-codegen: | ||
# filename: public-api.yaml | ||
# timestamp: 2024-07-12T20:41:35+00:00 | ||
# timestamp: 2024-07-19T21:02:15+00:00 | ||
|
||
from __future__ import annotations | ||
|
||
|
@@ -12,6 +12,11 @@ | |
|
||
|
||
class ChannelEnum(Enum): | ||
""" | ||
* `EMAIL` - EMAIL | ||
* `TEXT` - TEXT | ||
""" | ||
|
||
EMAIL = "EMAIL" | ||
TEXT = "TEXT" | ||
|
||
|
@@ -25,6 +30,11 @@ class ImageQueryTypeEnum(Enum): | |
|
||
|
||
class ModeEnum(Enum): | ||
""" | ||
* `BINARY` - BINARY | ||
* `COUNT` - COUNT | ||
""" | ||
|
||
BINARY = "BINARY" | ||
COUNT = "COUNT" | ||
|
||
|
@@ -44,13 +54,28 @@ class ResultTypeEnum(Enum): | |
|
||
|
||
class SnoozeTimeUnitEnum(Enum): | ||
""" | ||
* `DAYS` - DAYS | ||
* `HOURS` - HOURS | ||
* `MINUTES` - MINUTES | ||
* `SECONDS` - SECONDS | ||
""" | ||
|
||
DAYS = "DAYS" | ||
HOURS = "HOURS" | ||
MINUTES = "MINUTES" | ||
SECONDS = "SECONDS" | ||
|
||
|
||
class VerbEnum(Enum): | ||
""" | ||
* `ANSWERED_CONSECUTIVELY` - ANSWERED_CONSECUTIVELY | ||
* `ANSWERED_WITHIN_TIME` - ANSWERED_WITHIN_TIME | ||
* `CHANGED_TO` - CHANGED_TO | ||
* `NO_CHANGE` - NO_CHANGE | ||
* `NO_QUERIES` - NO_QUERIES | ||
""" | ||
|
||
ANSWERED_CONSECUTIVELY = "ANSWERED_CONSECUTIVELY" | ||
ANSWERED_WITHIN_TIME = "ANSWERED_WITHIN_TIME" | ||
CHANGED_TO = "CHANGED_TO" | ||
|
@@ -81,6 +106,11 @@ class ActionRequest(BaseModel): | |
|
||
|
||
class AllNotes(BaseModel): | ||
""" | ||
Serializes all notes for a given detector, grouped by type as listed in UserProfile.NoteCategoryChoices | ||
The fields must match whats in USERPROFILE.NoteCategoryChoices | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
is all caps right? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Well, no... In fact, SDK users don't have access to UserProfiles so we shouldn't even mention that here. But the source of truth for this docstring lives in the BE, so that will require a separate change |
||
""" | ||
|
||
CUSTOMER: List[Note] | ||
GL: List[Note] | ||
|
||
|
@@ -96,6 +126,10 @@ class ConditionRequest(BaseModel): | |
|
||
|
||
class Detector(BaseModel): | ||
""" | ||
Spec for serializing a detector object in the public API. | ||
""" | ||
|
||
id: str = Field(..., description="A unique ID for this object.") | ||
type: DetectorTypeEnum = Field(..., description="The type of this object.") | ||
created_at: datetime = Field(..., description="When this detector was created.") | ||
|
@@ -117,6 +151,10 @@ class Detector(BaseModel): | |
|
||
|
||
class DetectorCreationInputRequest(BaseModel): | ||
""" | ||
Helper serializer for validating POST /detectors input. | ||
""" | ||
|
||
name: constr(min_length=1, max_length=200) = Field(..., description="A short, descriptive name for the detector.") | ||
query: constr(min_length=1, max_length=300) = Field(..., description="A question about the image.") | ||
group_name: Optional[constr(min_length=1, max_length=100)] = Field( | ||
|
@@ -148,6 +186,10 @@ class DetectorCreationInputRequest(BaseModel): | |
|
||
|
||
class ImageQuery(BaseModel): | ||
""" | ||
Spec for serializing a image-query object in the public API. | ||
""" | ||
|
||
metadata: Optional[Dict[str, Any]] = Field(..., description="Metadata about the image query.") | ||
id: str = Field(..., description="A unique ID for this object.") | ||
type: ImageQueryTypeEnum = Field(..., description="The type of this object.") | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what does this new flag do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It uses the schema description to generate docstrings on the generated classes