Skip to content

Commit 32c8e52

Browse files
authored
Bump version to 0.22.4 and generate client code from updated spec (#337)
Bump version to 0.22.4. This updates the spec to the point of #4798, to avoid removing the `Label` enum (which may cause issues, I'm not sure). Spec changes include (as far as I can tell): - additional fields related to Webhook models - addition of bounding box mode components - edge `report-metrics` endpoint - `from_edge` field on results
1 parent b5a54b7 commit 32c8e52

34 files changed

+1083
-21
lines changed

generated/.openapi-generator/FILES

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ docs/BBoxGeometry.md
99
docs/BBoxGeometryRequest.md
1010
docs/BinaryClassificationResult.md
1111
docs/BlankEnum.md
12+
docs/BoundingBoxModeConfiguration.md
13+
docs/BoundingBoxResult.md
1214
docs/ChannelEnum.md
1315
docs/Condition.md
1416
docs/ConditionRequest.md
@@ -88,6 +90,8 @@ groundlight_openapi_client/model/b_box_geometry.py
8890
groundlight_openapi_client/model/b_box_geometry_request.py
8991
groundlight_openapi_client/model/binary_classification_result.py
9092
groundlight_openapi_client/model/blank_enum.py
93+
groundlight_openapi_client/model/bounding_box_mode_configuration.py
94+
groundlight_openapi_client/model/bounding_box_result.py
9195
groundlight_openapi_client/model/channel_enum.py
9296
groundlight_openapi_client/model/condition.py
9397
groundlight_openapi_client/model/condition_request.py

generated/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,9 @@ rule_request = RuleRequest(
9595
url="url_example",
9696
include_image=True,
9797
payload_template=None,
98+
last_message_failed=True,
99+
last_failure_error="last_failure_error_example",
100+
last_failed_at=dateutil_parser('1970-01-01T00:00:00.00Z'),
98101
),
99102
],
100103
) # RuleRequest |
@@ -127,6 +130,7 @@ Class | Method | HTTP request | Description
127130
*DetectorsApi* | [**get_detector_metrics**](docs/DetectorsApi.md#get_detector_metrics) | **GET** /v1/detectors/{detector_id}/metrics |
128131
*DetectorsApi* | [**list_detectors**](docs/DetectorsApi.md#list_detectors) | **GET** /v1/detectors |
129132
*DetectorsApi* | [**update_detector**](docs/DetectorsApi.md#update_detector) | **PATCH** /v1/detectors/{id} |
133+
*EdgeApi* | [**edge_report_metrics_create**](docs/EdgeApi.md#edge_report_metrics_create) | **POST** /v1/edge/report-metrics |
130134
*EdgeApi* | [**get_model_urls**](docs/EdgeApi.md#get_model_urls) | **GET** /v1/edge/fetch-model-urls/{detector_id}/ |
131135
*ImageQueriesApi* | [**get_image**](docs/ImageQueriesApi.md#get_image) | **GET** /v1/image-queries/{id}/image |
132136
*ImageQueriesApi* | [**get_image_query**](docs/ImageQueriesApi.md#get_image_query) | **GET** /v1/image-queries/{id} |
@@ -148,6 +152,8 @@ Class | Method | HTTP request | Description
148152
- [BBoxGeometryRequest](docs/BBoxGeometryRequest.md)
149153
- [BinaryClassificationResult](docs/BinaryClassificationResult.md)
150154
- [BlankEnum](docs/BlankEnum.md)
155+
- [BoundingBoxModeConfiguration](docs/BoundingBoxModeConfiguration.md)
156+
- [BoundingBoxResult](docs/BoundingBoxResult.md)
151157
- [ChannelEnum](docs/ChannelEnum.md)
152158
- [Condition](docs/Condition.md)
153159
- [ConditionRequest](docs/ConditionRequest.md)

generated/docs/ActionsApi.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ with groundlight_openapi_client.ApiClient(configuration) as api_client:
7070
url="url_example",
7171
include_image=True,
7272
payload_template=None,
73+
last_message_failed=True,
74+
last_failure_error="last_failure_error_example",
75+
last_failed_at=dateutil_parser('1970-01-01T00:00:00.00Z'),
7376
),
7477
],
7578
) # RuleRequest |

generated/docs/BinaryClassificationResult.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Name | Type | Description | Notes
88
**confidence** | **float, none_type** | | [optional]
99
**source** | **str** | | [optional]
1010
**result_type** | **str** | | [optional] if omitted the server will use the default value of "binary_classification"
11+
**from_edge** | **bool** | | [optional]
1112
**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]
1213

1314
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# BoundingBoxModeConfiguration
2+
3+
4+
## Properties
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**class_name** | **str** | |
8+
**max_num_bboxes** | **int** | | [optional]
9+
**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]
10+
11+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
12+
13+

generated/docs/BoundingBoxResult.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# BoundingBoxResult
2+
3+
4+
## Properties
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**label** | **str** | |
8+
**confidence** | **float, none_type** | | [optional]
9+
**source** | **str** | | [optional]
10+
**result_type** | **str** | | [optional] if omitted the server will use the default value of "bounding_box"
11+
**from_edge** | **bool** | | [optional]
12+
**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]
13+
14+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
15+
16+

generated/docs/CountingResult.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Name | Type | Description | Notes
88
**confidence** | **float, none_type** | | [optional]
99
**source** | **str** | | [optional]
1010
**result_type** | **str** | | [optional] if omitted the server will use the default value of "counting"
11+
**from_edge** | **bool** | | [optional]
1112
**greater_than_max** | **bool** | | [optional]
1213
**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]
1314

generated/docs/DetectorCreationInputRequest.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Name | Type | Description | Notes
1212
**patience_time** | **float** | How long Groundlight will attempt to generate a confident prediction | [optional] if omitted the server will use the default value of 30.0
1313
**pipeline_config** | **str, none_type** | (Advanced usage) Configuration needed to instantiate a prediction pipeline. | [optional]
1414
**metadata** | **str** | Base64-encoded metadata for the detector. This should be a JSON object with string keys. The size after encoding should not exceed 1362 bytes, corresponding to 1KiB before encoding. | [optional]
15-
**mode** | **bool, date, datetime, dict, float, int, list, str, none_type** | Mode in which this detector will work. * `BINARY` - BINARY * `COUNT` - COUNT * `MULTI_CLASS` - MULTI_CLASS * `TEXT` - TEXT | [optional]
15+
**mode** | **bool, date, datetime, dict, float, int, list, str, none_type** | Mode in which this detector will work. * `BINARY` - BINARY * `COUNT` - COUNT * `MULTI_CLASS` - MULTI_CLASS * `TEXT` - TEXT * `BOUNDING_BOX` - BOUNDING_BOX | [optional]
1616
**mode_configuration** | **bool, date, datetime, dict, float, int, list, str, none_type** | | [optional]
1717
**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]
1818

generated/docs/EdgeApi.md

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,81 @@ All URIs are relative to *https://api.groundlight.ai/device-api*
44

55
Method | HTTP request | Description
66
------------- | ------------- | -------------
7+
[**edge_report_metrics_create**](EdgeApi.md#edge_report_metrics_create) | **POST** /v1/edge/report-metrics |
78
[**get_model_urls**](EdgeApi.md#get_model_urls) | **GET** /v1/edge/fetch-model-urls/{detector_id}/ |
89

910

11+
# **edge_report_metrics_create**
12+
> edge_report_metrics_create()
13+
14+
15+
16+
Edge server periodically calls this to report metrics. POST body will have JSON data that we log.
17+
18+
### Example
19+
20+
* Api Key Authentication (ApiToken):
21+
22+
```python
23+
import time
24+
import groundlight_openapi_client
25+
from groundlight_openapi_client.api import edge_api
26+
from pprint import pprint
27+
# Defining the host is optional and defaults to https://api.groundlight.ai/device-api
28+
# See configuration.py for a list of all supported configuration parameters.
29+
configuration = groundlight_openapi_client.Configuration(
30+
host = "https://api.groundlight.ai/device-api"
31+
)
32+
33+
# The client must configure the authentication and authorization parameters
34+
# in accordance with the API server security policy.
35+
# Examples for each auth method are provided below, use the example that
36+
# satisfies your auth use case.
37+
38+
# Configure API key authorization: ApiToken
39+
configuration.api_key['ApiToken'] = 'YOUR_API_KEY'
40+
41+
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
42+
# configuration.api_key_prefix['ApiToken'] = 'Bearer'
43+
44+
# Enter a context with an instance of the API client
45+
with groundlight_openapi_client.ApiClient(configuration) as api_client:
46+
# Create an instance of the API class
47+
api_instance = edge_api.EdgeApi(api_client)
48+
49+
# example, this endpoint has no required or optional parameters
50+
try:
51+
api_instance.edge_report_metrics_create()
52+
except groundlight_openapi_client.ApiException as e:
53+
print("Exception when calling EdgeApi->edge_report_metrics_create: %s\n" % e)
54+
```
55+
56+
57+
### Parameters
58+
This endpoint does not need any parameter.
59+
60+
### Return type
61+
62+
void (empty response body)
63+
64+
### Authorization
65+
66+
[ApiToken](../README.md#ApiToken)
67+
68+
### HTTP request headers
69+
70+
- **Content-Type**: Not defined
71+
- **Accept**: Not defined
72+
73+
74+
### HTTP response details
75+
76+
| Status code | Description | Response headers |
77+
|-------------|-------------|------------------|
78+
**200** | No response body | - |
79+
80+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
81+
1082
# **get_model_urls**
1183
> EdgeModelInfo get_model_urls(detector_id)
1284

generated/docs/ModeEnum.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
## Properties
55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
7-
**value** | **str** | | must be one of ["BINARY", "COUNT", "MULTI_CLASS", "TEXT", ]
7+
**value** | **str** | | must be one of ["BINARY", "COUNT", "MULTI_CLASS", "TEXT", "BOUNDING_BOX", ]
88

99
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
1010

0 commit comments

Comments
 (0)