Skip to content
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 ability to pin a note #301

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions generated/docs/ActionsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -296,13 +296,23 @@ with groundlight_openapi_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = actions_api.ActionsApi(api_client)
detector_id = "detector_id_example" # str |
page = 1 # int | A page number within the paginated result set. (optional)
page_size = 1 # int | Number of results to return per page. (optional)

# example passing only required values which don't have defaults set
try:
api_response = api_instance.list_detector_rules(detector_id)
pprint(api_response)
except groundlight_openapi_client.ApiException as e:
print("Exception when calling ActionsApi->list_detector_rules: %s\n" % e)

# example passing only required values which don't have defaults set
# and optional values
try:
api_response = api_instance.list_detector_rules(detector_id, page=page, page_size=page_size)
pprint(api_response)
except groundlight_openapi_client.ApiException as e:
print("Exception when calling ActionsApi->list_detector_rules: %s\n" % e)
```


Expand All @@ -311,6 +321,8 @@ with groundlight_openapi_client.ApiClient(configuration) as api_client:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**detector_id** | **str**| |
**page** | **int**| A page number within the paginated result set. | [optional]
**page_size** | **int**| Number of results to return per page. | [optional]

### Return type

Expand Down
2 changes: 1 addition & 1 deletion generated/docs/BinaryClassificationResult.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**label** | **str** | |
**confidence** | **float** | | [optional]
**confidence** | **float, none_type** | | [optional]
**source** | **str** | | [optional]
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]

Expand Down
4 changes: 2 additions & 2 deletions generated/docs/CountingResult.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**count** | **int** | |
**confidence** | **float** | | [optional]
**count** | **int, none_type** | |
**confidence** | **float, none_type** | | [optional]
**source** | **str** | | [optional]
**greater_than_max** | **bool** | | [optional]
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
Expand Down
6 changes: 3 additions & 3 deletions generated/docs/ImageQueriesApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,14 +201,14 @@ configuration.api_key['ApiToken'] = 'YOUR_API_KEY'
with groundlight_openapi_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = image_queries_api.ImageQueriesApi(api_client)
detector_id = "detector_id_example" # str | Optionally filter image queries by detector ID. (optional)
page = 1 # int | A page number within the paginated result set. (optional)
page_size = 1 # int | Number of items to return per page. (optional)
detector_id = "detector_id_example" # str | Optionally filter image queries by detector ID. (optional)

# example passing only required values which don't have defaults set
# and optional values
try:
api_response = api_instance.list_image_queries(page=page, page_size=page_size, detector_id=detector_id)
api_response = api_instance.list_image_queries(detector_id=detector_id, page=page, page_size=page_size)
pprint(api_response)
except groundlight_openapi_client.ApiException as e:
print("Exception when calling ImageQueriesApi->list_image_queries: %s\n" % e)
Expand All @@ -219,9 +219,9 @@ with groundlight_openapi_client.ApiClient(configuration) as api_client:

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**detector_id** | **str**| Optionally filter image queries by detector ID. | [optional]
**page** | **int**| A page number within the paginated result set. | [optional]
**page_size** | **int**| Number of items to return per page. | [optional]
**detector_id** | **str**| Optionally filter image queries by detector ID. | [optional]

### Return type

Expand Down
2 changes: 1 addition & 1 deletion generated/docs/MultiClassificationResult.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**label** | **str** | |
**confidence** | **float** | | [optional]
**confidence** | **float, none_type** | | [optional]
**source** | **str** | | [optional]
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]

Expand Down
3 changes: 2 additions & 1 deletion generated/docs/Note.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**detector_id** | **str** | | [readonly]
**content** | **str** | Text content of the note. |
**content** | **str, none_type** | Text content of the note. | [optional]
**is_pinned** | **bool, none_type** | | [optional]
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
Expand Down
3 changes: 2 additions & 1 deletion generated/docs/NoteRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**content** | **str** | Text content of the note. |
**content** | **str, none_type** | Text content of the note. | [optional]
**is_pinned** | **bool, none_type** | | [optional]
**image** | **file_type, none_type** | | [optional]
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]

Expand Down
20 changes: 14 additions & 6 deletions generated/docs/NotesApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ Method | HTTP request | Description


# **create_note**
> create_note(detector_id, note_request)
> create_note(detector_id)



Create a new note
Creates a new note.

### Example

Expand Down Expand Up @@ -49,12 +49,20 @@ with groundlight_openapi_client.ApiClient(configuration) as api_client:
detector_id = "detector_id_example" # str | the detector to associate the new note with
note_request = NoteRequest(
content="content_example",
is_pinned=True,
image=open('/path/to/file', 'rb'),
) # NoteRequest |
) # NoteRequest | (optional)

# example passing only required values which don't have defaults set
try:
api_instance.create_note(detector_id, note_request)
api_instance.create_note(detector_id)
except groundlight_openapi_client.ApiException as e:
print("Exception when calling NotesApi->create_note: %s\n" % e)

# example passing only required values which don't have defaults set
# and optional values
try:
api_instance.create_note(detector_id, note_request=note_request)
except groundlight_openapi_client.ApiException as e:
print("Exception when calling NotesApi->create_note: %s\n" % e)
```
Expand All @@ -65,7 +73,7 @@ with groundlight_openapi_client.ApiClient(configuration) as api_client:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**detector_id** | **str**| the detector to associate the new note with |
**note_request** | [**NoteRequest**](NoteRequest.md)| |
**note_request** | [**NoteRequest**](NoteRequest.md)| | [optional]

### Return type

Expand Down Expand Up @@ -94,7 +102,7 @@ void (empty response body)



Get all the notes from a given detector and return the answer in lists, one for each note_category
Retrieves all notes from a given detector and returns them in lists, one for each note_category.

### Example

Expand Down
10 changes: 10 additions & 0 deletions generated/groundlight_openapi_client/api/actions_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,8 @@ def __init__(self, api_client=None):
params_map={
"all": [
"detector_id",
"page",
"page_size",
],
"required": [
"detector_id",
Expand All @@ -186,12 +188,18 @@ def __init__(self, api_client=None):
"allowed_values": {},
"openapi_types": {
"detector_id": (str,),
"page": (int,),
"page_size": (int,),
},
"attribute_map": {
"detector_id": "detector_id",
"page": "page",
"page_size": "page_size",
},
"location_map": {
"detector_id": "path",
"page": "query",
"page_size": "query",
},
"collection_format_map": {},
},
Expand Down Expand Up @@ -434,6 +442,8 @@ def list_detector_rules(self, detector_id, **kwargs):
detector_id (str):

Keyword Args:
page (int): A page number within the paginated result set.. [optional]
page_size (int): Number of results to return per page.. [optional]
_return_http_data_only (bool): response data without head status
code and headers. Default is True.
_preload_content (bool): if False, the urllib3.HTTPResponse object
Expand Down
10 changes: 5 additions & 5 deletions generated/groundlight_openapi_client/api/image_queries_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,9 @@ def __init__(self, api_client=None):
},
params_map={
"all": [
"detector_id",
"page",
"page_size",
"detector_id",
],
"required": [],
"nullable": [],
Expand All @@ -140,19 +140,19 @@ def __init__(self, api_client=None):
"validations": {},
"allowed_values": {},
"openapi_types": {
"detector_id": (str,),
"page": (int,),
"page_size": (int,),
"detector_id": (str,),
},
"attribute_map": {
"detector_id": "detector_id",
"page": "page",
"page_size": "page_size",
"detector_id": "detector_id",
},
"location_map": {
"detector_id": "query",
"page": "query",
"page_size": "query",
"detector_id": "query",
},
"collection_format_map": {},
},
Expand Down Expand Up @@ -377,9 +377,9 @@ def list_image_queries(self, **kwargs):


Keyword Args:
detector_id (str): Optionally filter image queries by detector ID.. [optional]
page (int): A page number within the paginated result set.. [optional]
page_size (int): Number of items to return per page.. [optional]
detector_id (str): Optionally filter image queries by detector ID.. [optional]
_return_http_data_only (bool): response data without head status
code and headers. Default is True.
_preload_content (bool): if False, the urllib3.HTTPResponse object
Expand Down
12 changes: 5 additions & 7 deletions generated/groundlight_openapi_client/api/notes_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ def __init__(self, api_client=None):
],
"required": [
"detector_id",
"note_request",
],
"nullable": [],
"enum": [],
Expand Down Expand Up @@ -121,21 +120,21 @@ def __init__(self, api_client=None):
api_client=api_client,
)

def create_note(self, detector_id, note_request, **kwargs):
def create_note(self, detector_id, **kwargs):
"""create_note # noqa: E501

Create a new note # noqa: E501
Creates a new note. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True

>>> thread = api.create_note(detector_id, note_request, async_req=True)
>>> thread = api.create_note(detector_id, async_req=True)
>>> result = thread.get()

Args:
detector_id (str): the detector to associate the new note with
note_request (NoteRequest):

Keyword Args:
note_request (NoteRequest): [optional]
_return_http_data_only (bool): response data without head status
code and headers. Default is True.
_preload_content (bool): if False, the urllib3.HTTPResponse object
Expand Down Expand Up @@ -178,13 +177,12 @@ def create_note(self, detector_id, note_request, **kwargs):
kwargs["_content_type"] = kwargs.get("_content_type")
kwargs["_host_index"] = kwargs.get("_host_index")
kwargs["detector_id"] = detector_id
kwargs["note_request"] = note_request
return self.create_note_endpoint.call_with_http_info(**kwargs)

def get_notes(self, detector_id, **kwargs):
"""get_notes # noqa: E501

Get all the notes from a given detector and return the answer in lists, one for each note_category # noqa: E501
Retrieves all notes from a given detector and returns them in lists, one for each note_category. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,10 @@ def openapi_types():
"""
return {
"label": (str,), # noqa: E501
"confidence": (float,), # noqa: E501
"confidence": (
float,
none_type,
), # noqa: E501
"source": (str,), # noqa: E501
}

Expand Down Expand Up @@ -164,7 +167,7 @@ def _from_openapi_data(cls, label, *args, **kwargs): # noqa: E501
Animal class but this time we won't travel
through its discriminator because we passed in
_visited_composed_classes = (Animal,)
confidence (float): [optional] # noqa: E501
confidence (float, none_type): [optional] # noqa: E501
source (str): [optional] # noqa: E501
"""

Expand Down Expand Up @@ -254,7 +257,7 @@ def __init__(self, label, *args, **kwargs): # noqa: E501
Animal class but this time we won't travel
through its discriminator because we passed in
_visited_composed_classes = (Animal,)
confidence (float): [optional] # noqa: E501
confidence (float, none_type): [optional] # noqa: E501
source (str): [optional] # noqa: E501
"""

Expand Down
18 changes: 12 additions & 6 deletions generated/groundlight_openapi_client/model/counting_result.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,14 @@ def openapi_types():
and the value is attribute type.
"""
return {
"count": (int,), # noqa: E501
"confidence": (float,), # noqa: E501
"count": (
int,
none_type,
), # noqa: E501
"confidence": (
float,
none_type,
), # noqa: E501
"source": (str,), # noqa: E501
"greater_than_max": (bool,), # noqa: E501
}
Expand All @@ -131,7 +137,7 @@ def _from_openapi_data(cls, count, *args, **kwargs): # noqa: E501
"""CountingResult - a model defined in OpenAPI

Args:
count (int):
count (int, none_type):

Keyword Args:
_check_type (bool): if True, values for parameters in openapi_types
Expand Down Expand Up @@ -164,7 +170,7 @@ def _from_openapi_data(cls, count, *args, **kwargs): # noqa: E501
Animal class but this time we won't travel
through its discriminator because we passed in
_visited_composed_classes = (Animal,)
confidence (float): [optional] # noqa: E501
confidence (float, none_type): [optional] # noqa: E501
source (str): [optional] # noqa: E501
greater_than_max (bool): [optional] # noqa: E501
"""
Expand Down Expand Up @@ -222,7 +228,7 @@ def __init__(self, count, *args, **kwargs): # noqa: E501
"""CountingResult - a model defined in OpenAPI

Args:
count (int):
count (int, none_type):

Keyword Args:
_check_type (bool): if True, values for parameters in openapi_types
Expand Down Expand Up @@ -255,7 +261,7 @@ def __init__(self, count, *args, **kwargs): # noqa: E501
Animal class but this time we won't travel
through its discriminator because we passed in
_visited_composed_classes = (Animal,)
confidence (float): [optional] # noqa: E501
confidence (float, none_type): [optional] # noqa: E501
source (str): [optional] # noqa: E501
greater_than_max (bool): [optional] # noqa: E501
"""
Expand Down
Loading