Skip to content

Commit 20385b6

Browse files
committed
Regenerate client for API 2.22.7 and OpenAPI 7.19.0
Updated the generated Python client to API version 2.22.7 and OpenAPI Generator 7.19.0. Added new endpoints and models, including AnnotationSettingV1AlphaUcApi, SetupRequest, and new upload endpoints for attachments. Removed deprecated DefaultApi, LoginHistory, and UcUploadRequestFormData. Updated documentation and usage examples to reflect new and changed APIs.
1 parent 9098511 commit 20385b6

358 files changed

Lines changed: 1668 additions & 709 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.openapi-generator/FILES

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ docs/AddOperation.md
77
docs/AnnotationSetting.md
88
docs/AnnotationSettingList.md
99
docs/AnnotationSettingSpec.md
10+
docs/AnnotationSettingV1AlphaUcApi.md
1011
docs/AnnotationSettingV1alpha1Api.md
1112
docs/Attachment.md
1213
docs/AttachmentList.md
@@ -72,7 +73,6 @@ docs/CounterV1alpha1Api.md
7273
docs/CreateUserRequest.md
7374
docs/CustomTemplates.md
7475
docs/DashboardStats.md
75-
docs/DefaultApi.md
7676
docs/DetailedUser.md
7777
docs/Device.md
7878
docs/DeviceList.md
@@ -130,7 +130,6 @@ docs/LocalThumbnailList.md
130130
docs/LocalThumbnailSpec.md
131131
docs/LocalThumbnailStatus.md
132132
docs/LocalThumbnailV1alpha1Api.md
133-
docs/LoginHistory.md
134133
docs/MarkSpecifiedRequest.md
135134
docs/Menu.md
136135
docs/MenuItem.md
@@ -259,6 +258,7 @@ docs/SettingList.md
259258
docs/SettingRef.md
260259
docs/SettingSpec.md
261260
docs/SettingV1alpha1Api.md
261+
docs/SetupRequest.md
262262
docs/SinglePage.md
263263
docs/SinglePageList.md
264264
docs/SinglePageRequest.md
@@ -313,7 +313,6 @@ docs/TotpRequest.md
313313
docs/TwoFactorAuthSettings.md
314314
docs/TwoFactorAuthV1alpha1UcApi.md
315315
docs/UcUploadFromUrlRequest.md
316-
docs/UcUploadRequestFormData.md
317316
docs/UpgradeFromUriRequest.md
318317
docs/UploadFromUrlRequest.md
319318
docs/User.md
@@ -336,6 +335,7 @@ docs/VoteRequest.md
336335
git_push.sh
337336
halo_client/__init__.py
338337
halo_client/api/__init__.py
338+
halo_client/api/annotation_setting_v1_alpha_uc_api.py
339339
halo_client/api/annotation_setting_v1alpha1_api.py
340340
halo_client/api/attachment_v1alpha1_api.py
341341
halo_client/api/attachment_v1alpha1_console_api.py
@@ -350,7 +350,6 @@ halo_client/api/comment_v1alpha1_console_api.py
350350
halo_client/api/comment_v1alpha1_public_api.py
351351
halo_client/api/config_map_v1alpha1_api.py
352352
halo_client/api/counter_v1alpha1_api.py
353-
halo_client/api/default_api.py
354353
halo_client/api/device_v1alpha1_api.py
355354
halo_client/api/device_v1alpha1_uc_api.py
356355
halo_client/api/extension_definition_v1alpha1_api.py
@@ -524,7 +523,6 @@ halo_client/models/local_thumbnail.py
524523
halo_client/models/local_thumbnail_list.py
525524
halo_client/models/local_thumbnail_spec.py
526525
halo_client/models/local_thumbnail_status.py
527-
halo_client/models/login_history.py
528526
halo_client/models/mark_specified_request.py
529527
halo_client/models/menu.py
530528
halo_client/models/menu_item.py
@@ -619,6 +617,7 @@ halo_client/models/setting_form.py
619617
halo_client/models/setting_list.py
620618
halo_client/models/setting_ref.py
621619
halo_client/models/setting_spec.py
620+
halo_client/models/setup_request.py
622621
halo_client/models/single_page.py
623622
halo_client/models/single_page_list.py
624623
halo_client/models/single_page_request.py
@@ -656,7 +655,6 @@ halo_client/models/totp_auth_link_response.py
656655
halo_client/models/totp_request.py
657656
halo_client/models/two_factor_auth_settings.py
658657
halo_client/models/uc_upload_from_url_request.py
659-
halo_client/models/uc_upload_request_form_data.py
660658
halo_client/models/upgrade_from_uri_request.py
661659
halo_client/models/upload_from_url_request.py
662660
halo_client/models/user.py

.openapi-generator/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
7.16.0
1+
7.19.0

README.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ No description provided (generated by Openapi Generator https://github.com/opena
33

44
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
55

6-
- API version: 2.21.7
6+
- API version: 2.22.7
77
- Package version: 1.0.0
8-
- Generator version: 7.16.0
8+
- Generator version: 7.19.0
99
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
1010

1111
## Requirements.
@@ -81,15 +81,15 @@ configuration = halo_client.Configuration(
8181
# Enter a context with an instance of the API client
8282
with halo_client.ApiClient(configuration) as api_client:
8383
# Create an instance of the API class
84-
api_instance = halo_client.AnnotationSettingV1alpha1Api(api_client)
85-
annotation_setting = halo_client.AnnotationSetting() # AnnotationSetting | Fresh annotationsetting (optional)
84+
api_instance = halo_client.AnnotationSettingV1AlphaUcApi(api_client)
85+
target_ref = 'target_ref_example' # str | The targetRef of the AnnotationSetting. e.g.: 'content.halo.run/Post
8686

8787
try:
88-
api_response = api_instance.create_annotation_setting(annotation_setting=annotation_setting)
89-
print("The response of AnnotationSettingV1alpha1Api->create_annotation_setting:\n")
88+
api_response = api_instance.list_available_annotation_settings(target_ref)
89+
print("The response of AnnotationSettingV1AlphaUcApi->list_available_annotation_settings:\n")
9090
pprint(api_response)
9191
except ApiException as e:
92-
print("Exception when calling AnnotationSettingV1alpha1Api->create_annotation_setting: %s\n" % e)
92+
print("Exception when calling AnnotationSettingV1AlphaUcApi->list_available_annotation_settings: %s\n" % e)
9393

9494
```
9595

@@ -99,6 +99,7 @@ All URIs are relative to *http://localhost:8091*
9999

100100
Class | Method | HTTP request | Description
101101
------------ | ------------- | ------------- | -------------
102+
*AnnotationSettingV1AlphaUcApi* | [**list_available_annotation_settings**](docs/AnnotationSettingV1AlphaUcApi.md#list_available_annotation_settings) | **GET** /apis/uc.api.halo.run/v1alpha1/annotationsettings |
102103
*AnnotationSettingV1alpha1Api* | [**create_annotation_setting**](docs/AnnotationSettingV1alpha1Api.md#create_annotation_setting) | **POST** /api/v1alpha1/annotationsettings |
103104
*AnnotationSettingV1alpha1Api* | [**delete_annotation_setting**](docs/AnnotationSettingV1alpha1Api.md#delete_annotation_setting) | **DELETE** /api/v1alpha1/annotationsettings/{name} |
104105
*AnnotationSettingV1alpha1Api* | [**get_annotation_setting**](docs/AnnotationSettingV1alpha1Api.md#get_annotation_setting) | **GET** /api/v1alpha1/annotationsettings/{name} |
@@ -114,10 +115,11 @@ Class | Method | HTTP request | Description
114115
*AttachmentV1alpha1ConsoleApi* | [**external_transfer_attachment**](docs/AttachmentV1alpha1ConsoleApi.md#external_transfer_attachment) | **POST** /apis/api.console.halo.run/v1alpha1/attachments/-/upload-from-url |
115116
*AttachmentV1alpha1ConsoleApi* | [**search_attachments**](docs/AttachmentV1alpha1ConsoleApi.md#search_attachments) | **GET** /apis/api.console.halo.run/v1alpha1/attachments |
116117
*AttachmentV1alpha1ConsoleApi* | [**upload_attachment**](docs/AttachmentV1alpha1ConsoleApi.md#upload_attachment) | **POST** /apis/api.console.halo.run/v1alpha1/attachments/upload |
118+
*AttachmentV1alpha1ConsoleApi* | [**upload_attachment_for_console**](docs/AttachmentV1alpha1ConsoleApi.md#upload_attachment_for_console) | **POST** /apis/console.api.storage.halo.run/v1alpha1/attachments/-/upload |
117119
*AttachmentV1alpha1UcApi* | [**create_attachment_for_post**](docs/AttachmentV1alpha1UcApi.md#create_attachment_for_post) | **POST** /apis/uc.api.storage.halo.run/v1alpha1/attachments |
118120
*AttachmentV1alpha1UcApi* | [**external_transfer_attachment1**](docs/AttachmentV1alpha1UcApi.md#external_transfer_attachment1) | **POST** /apis/uc.api.storage.halo.run/v1alpha1/attachments/-/upload-from-url |
119121
*AttachmentV1alpha1UcApi* | [**list_my_attachments**](docs/AttachmentV1alpha1UcApi.md#list_my_attachments) | **GET** /apis/uc.api.storage.halo.run/v1alpha1/attachments |
120-
*AttachmentV1alpha1UcApi* | [**upload_uc_attachment**](docs/AttachmentV1alpha1UcApi.md#upload_uc_attachment) | **POST** /apis/uc.api.storage.halo.run/v1alpha1/attachments/-/upload |
122+
*AttachmentV1alpha1UcApi* | [**upload_attachment_for_uc**](docs/AttachmentV1alpha1UcApi.md#upload_attachment_for_uc) | **POST** /apis/uc.api.storage.halo.run/v1alpha1/attachments/-/upload |
121123
*AuthProviderV1alpha1Api* | [**create_auth_provider**](docs/AuthProviderV1alpha1Api.md#create_auth_provider) | **POST** /apis/auth.halo.run/v1alpha1/authproviders |
122124
*AuthProviderV1alpha1Api* | [**delete_auth_provider**](docs/AuthProviderV1alpha1Api.md#delete_auth_provider) | **DELETE** /apis/auth.halo.run/v1alpha1/authproviders/{name} |
123125
*AuthProviderV1alpha1Api* | [**get_auth_provider**](docs/AuthProviderV1alpha1Api.md#get_auth_provider) | **GET** /apis/auth.halo.run/v1alpha1/authproviders/{name} |
@@ -421,6 +423,7 @@ Class | Method | HTTP request | Description
421423
*SystemV1alpha1ConsoleApi* | [**get_stats**](docs/SystemV1alpha1ConsoleApi.md#get_stats) | **GET** /apis/api.console.halo.run/v1alpha1/stats |
422424
*SystemV1alpha1PublicApi* | [**jump_to_setup_page**](docs/SystemV1alpha1PublicApi.md#jump_to_setup_page) | **GET** /system/setup |
423425
*SystemV1alpha1PublicApi* | [**query_stats**](docs/SystemV1alpha1PublicApi.md#query_stats) | **GET** /apis/api.halo.run/v1alpha1/stats/- |
426+
*SystemV1alpha1PublicApi* | [**setup_system**](docs/SystemV1alpha1PublicApi.md#setup_system) | **POST** /system/setup |
424427
*TagV1alpha1Api* | [**create_tag**](docs/TagV1alpha1Api.md#create_tag) | **POST** /apis/content.halo.run/v1alpha1/tags |
425428
*TagV1alpha1Api* | [**delete_tag**](docs/TagV1alpha1Api.md#delete_tag) | **DELETE** /apis/content.halo.run/v1alpha1/tags/{name} |
426429
*TagV1alpha1Api* | [**get_tag**](docs/TagV1alpha1Api.md#get_tag) | **GET** /apis/content.halo.run/v1alpha1/tags/{name} |
@@ -493,7 +496,6 @@ Class | Method | HTTP request | Description
493496
*UserV1alpha1ConsoleApi* | [**update_current_user**](docs/UserV1alpha1ConsoleApi.md#update_current_user) | **PUT** /apis/api.console.halo.run/v1alpha1/users/- |
494497
*UserV1alpha1ConsoleApi* | [**upload_user_avatar**](docs/UserV1alpha1ConsoleApi.md#upload_user_avatar) | **POST** /apis/api.console.halo.run/v1alpha1/users/{name}/avatar |
495498
*UserV1alpha1ConsoleApi* | [**verify_email**](docs/UserV1alpha1ConsoleApi.md#verify_email) | **POST** /apis/api.console.halo.run/v1alpha1/users/-/verify-email |
496-
*DefaultApi* | [**set_no_cache_for_set_up_page**](docs/DefaultApi.md#set_no_cache_for_set_up_page) | **POST** /system/setup |
497499

498500

499501
## Documentation For Models
@@ -602,7 +604,6 @@ Class | Method | HTTP request | Description
602604
- [LocalThumbnailList](docs/LocalThumbnailList.md)
603605
- [LocalThumbnailSpec](docs/LocalThumbnailSpec.md)
604606
- [LocalThumbnailStatus](docs/LocalThumbnailStatus.md)
605-
- [LoginHistory](docs/LoginHistory.md)
606607
- [MarkSpecifiedRequest](docs/MarkSpecifiedRequest.md)
607608
- [Menu](docs/Menu.md)
608609
- [MenuItem](docs/MenuItem.md)
@@ -697,6 +698,7 @@ Class | Method | HTTP request | Description
697698
- [SettingList](docs/SettingList.md)
698699
- [SettingRef](docs/SettingRef.md)
699700
- [SettingSpec](docs/SettingSpec.md)
701+
- [SetupRequest](docs/SetupRequest.md)
700702
- [SinglePage](docs/SinglePage.md)
701703
- [SinglePageList](docs/SinglePageList.md)
702704
- [SinglePageRequest](docs/SinglePageRequest.md)
@@ -734,7 +736,6 @@ Class | Method | HTTP request | Description
734736
- [TotpRequest](docs/TotpRequest.md)
735737
- [TwoFactorAuthSettings](docs/TwoFactorAuthSettings.md)
736738
- [UcUploadFromUrlRequest](docs/UcUploadFromUrlRequest.md)
737-
- [UcUploadRequestFormData](docs/UcUploadRequestFormData.md)
738739
- [UpgradeFromUriRequest](docs/UpgradeFromUriRequest.md)
739740
- [UploadFromUrlRequest](docs/UploadFromUrlRequest.md)
740741
- [User](docs/User.md)
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
# halo_client.AnnotationSettingV1AlphaUcApi
2+
3+
All URIs are relative to *http://localhost:8091*
4+
5+
Method | HTTP request | Description
6+
------------- | ------------- | -------------
7+
[**list_available_annotation_settings**](AnnotationSettingV1AlphaUcApi.md#list_available_annotation_settings) | **GET** /apis/uc.api.halo.run/v1alpha1/annotationsettings |
8+
9+
10+
# **list_available_annotation_settings**
11+
> List[AnnotationSetting] list_available_annotation_settings(target_ref)
12+
13+
List available AnnotationSettings for the given targetRef. The available AnnotationSettings are determined by the currently activated theme and started plugins.
14+
15+
### Example
16+
17+
* Basic Authentication (basicAuth):
18+
* Bearer (JWT) Authentication (bearerAuth):
19+
20+
```python
21+
import halo_client
22+
from halo_client.models.annotation_setting import AnnotationSetting
23+
from halo_client.rest import ApiException
24+
from pprint import pprint
25+
26+
# Defining the host is optional and defaults to http://localhost:8091
27+
# See configuration.py for a list of all supported configuration parameters.
28+
configuration = halo_client.Configuration(
29+
host = "http://localhost:8091"
30+
)
31+
32+
# The client must configure the authentication and authorization parameters
33+
# in accordance with the API server security policy.
34+
# Examples for each auth method are provided below, use the example that
35+
# satisfies your auth use case.
36+
37+
# Configure HTTP basic authorization: basicAuth
38+
configuration = halo_client.Configuration(
39+
username = os.environ["USERNAME"],
40+
password = os.environ["PASSWORD"]
41+
)
42+
43+
# Configure Bearer authorization (JWT): bearerAuth
44+
configuration = halo_client.Configuration(
45+
access_token = os.environ["BEARER_TOKEN"]
46+
)
47+
48+
# Enter a context with an instance of the API client
49+
with halo_client.ApiClient(configuration) as api_client:
50+
# Create an instance of the API class
51+
api_instance = halo_client.AnnotationSettingV1AlphaUcApi(api_client)
52+
target_ref = 'target_ref_example' # str | The targetRef of the AnnotationSetting. e.g.: 'content.halo.run/Post
53+
54+
try:
55+
api_response = api_instance.list_available_annotation_settings(target_ref)
56+
print("The response of AnnotationSettingV1AlphaUcApi->list_available_annotation_settings:\n")
57+
pprint(api_response)
58+
except Exception as e:
59+
print("Exception when calling AnnotationSettingV1AlphaUcApi->list_available_annotation_settings: %s\n" % e)
60+
```
61+
62+
63+
64+
### Parameters
65+
66+
67+
Name | Type | Description | Notes
68+
------------- | ------------- | ------------- | -------------
69+
**target_ref** | **str**| The targetRef of the AnnotationSetting. e.g.: 'content.halo.run/Post |
70+
71+
### Return type
72+
73+
[**List[AnnotationSetting]**](AnnotationSetting.md)
74+
75+
### Authorization
76+
77+
[basicAuth](../README.md#basicAuth), [bearerAuth](../README.md#bearerAuth)
78+
79+
### HTTP request headers
80+
81+
- **Content-Type**: Not defined
82+
- **Accept**: */*
83+
84+
### HTTP response details
85+
86+
| Status code | Description | Response headers |
87+
|-------------|-------------|------------------|
88+
**0** | default response | - |
89+
90+
[[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)
91+

docs/AttachmentV1alpha1ConsoleApi.md

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Method | HTTP request | Description
77
[**external_transfer_attachment**](AttachmentV1alpha1ConsoleApi.md#external_transfer_attachment) | **POST** /apis/api.console.halo.run/v1alpha1/attachments/-/upload-from-url |
88
[**search_attachments**](AttachmentV1alpha1ConsoleApi.md#search_attachments) | **GET** /apis/api.console.halo.run/v1alpha1/attachments |
99
[**upload_attachment**](AttachmentV1alpha1ConsoleApi.md#upload_attachment) | **POST** /apis/api.console.halo.run/v1alpha1/attachments/upload |
10+
[**upload_attachment_for_console**](AttachmentV1alpha1ConsoleApi.md#upload_attachment_for_console) | **POST** /apis/console.api.storage.halo.run/v1alpha1/attachments/-/upload |
1011

1112

1213
# **external_transfer_attachment**
@@ -268,3 +269,89 @@ Name | Type | Description | Notes
268269

269270
[[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)
270271

272+
# **upload_attachment_for_console**
273+
> Attachment upload_attachment_for_console(file=file, filename=filename, url=url)
274+
275+
Upload attachment endpoint for console.
276+
277+
### Example
278+
279+
* Basic Authentication (basicAuth):
280+
* Bearer (JWT) Authentication (bearerAuth):
281+
282+
```python
283+
import halo_client
284+
from halo_client.models.attachment import Attachment
285+
from halo_client.rest import ApiException
286+
from pprint import pprint
287+
288+
# Defining the host is optional and defaults to http://localhost:8091
289+
# See configuration.py for a list of all supported configuration parameters.
290+
configuration = halo_client.Configuration(
291+
host = "http://localhost:8091"
292+
)
293+
294+
# The client must configure the authentication and authorization parameters
295+
# in accordance with the API server security policy.
296+
# Examples for each auth method are provided below, use the example that
297+
# satisfies your auth use case.
298+
299+
# Configure HTTP basic authorization: basicAuth
300+
configuration = halo_client.Configuration(
301+
username = os.environ["USERNAME"],
302+
password = os.environ["PASSWORD"]
303+
)
304+
305+
# Configure Bearer authorization (JWT): bearerAuth
306+
configuration = halo_client.Configuration(
307+
access_token = os.environ["BEARER_TOKEN"]
308+
)
309+
310+
# Enter a context with an instance of the API client
311+
with halo_client.ApiClient(configuration) as api_client:
312+
# Create an instance of the API class
313+
api_instance = halo_client.AttachmentV1alpha1ConsoleApi(api_client)
314+
file = None # bytearray | The file to upload. If not provided, the url will be used. (optional)
315+
filename = 'filename_example' # str | The filename to use when uploading from url. If not provided, the filename will be extracted from the url. (optional)
316+
url = 'url_example' # str | The url to upload from. If not provided, the file will be used. (optional)
317+
318+
try:
319+
api_response = api_instance.upload_attachment_for_console(file=file, filename=filename, url=url)
320+
print("The response of AttachmentV1alpha1ConsoleApi->upload_attachment_for_console:\n")
321+
pprint(api_response)
322+
except Exception as e:
323+
print("Exception when calling AttachmentV1alpha1ConsoleApi->upload_attachment_for_console: %s\n" % e)
324+
```
325+
326+
327+
328+
### Parameters
329+
330+
331+
Name | Type | Description | Notes
332+
------------- | ------------- | ------------- | -------------
333+
**file** | **bytearray**| The file to upload. If not provided, the url will be used. | [optional]
334+
**filename** | **str**| The filename to use when uploading from url. If not provided, the filename will be extracted from the url. | [optional]
335+
**url** | **str**| The url to upload from. If not provided, the file will be used. | [optional]
336+
337+
### Return type
338+
339+
[**Attachment**](Attachment.md)
340+
341+
### Authorization
342+
343+
[basicAuth](../README.md#basicAuth), [bearerAuth](../README.md#bearerAuth)
344+
345+
### HTTP request headers
346+
347+
- **Content-Type**: multipart/form-data
348+
- **Accept**: */*
349+
350+
### HTTP response details
351+
352+
| Status code | Description | Response headers |
353+
|-------------|-------------|------------------|
354+
**0** | default response | - |
355+
356+
[[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)
357+

0 commit comments

Comments
 (0)