Skip to content

Commit ee51392

Browse files
author
ks-release-bot
committed
chore(release): regenerate ksapi v2.4.2 from ks-backend
1 parent f5b7391 commit ee51392

78 files changed

Lines changed: 2504 additions & 184 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: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ docs/AskRequest.md
2727
docs/AskResponse.md
2828
docs/AuditEventsApi.md
2929
docs/AuthApi.md
30+
docs/BillingApi.md
31+
docs/BillingInterval.md
32+
docs/BillingPaymentResponse.md
33+
docs/BillingSystem.md
3034
docs/BlockChangeType.md
3135
docs/BlockKind.md
3236
docs/BrandingLogoType.md
@@ -57,6 +61,8 @@ docs/CellDiff.md
5761
docs/ChangeClass.md
5862
docs/ChangePhoneNumberRequest.md
5963
docs/ChangeSubscriptionRequest.md
64+
docs/CheckoutAction.md
65+
docs/CheckoutResponse.md
6066
docs/CheckpointDetails.md
6167
docs/ChunkBulkResponse.md
6268
docs/ChunkContentItem.md
@@ -222,6 +228,7 @@ docs/OnboardingCompanyRequest.md
222228
docs/OnboardingProfileRequest.md
223229
docs/PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDat.md
224230
docs/PaginatedResponseAnnotatedUnionSectionContentItemChunkContentItemDiscriminator.md
231+
docs/PaginatedResponseBillingPaymentResponse.md
225232
docs/PaginatedResponseDocumentResponse.md
226233
docs/PaginatedResponseDocumentVersionResponse.md
227234
docs/PaginatedResponseEventResponse.md
@@ -284,6 +291,7 @@ docs/RunFolder.md
284291
docs/RunFolderRef.md
285292
docs/RunTimeseriesResponse.md
286293
docs/SSOInitiateResponse.md
294+
docs/ScheduleCadence.md
287295
docs/ScoredChunkResponse.md
288296
docs/SearchSkillsRequest.md
289297
docs/SearchSkillsResponse.md
@@ -318,7 +326,6 @@ docs/StructuredChange.md
318326
docs/StructuredChangeType.md
319327
docs/StructuredDiff.md
320328
docs/SubmitFeedbackRequest.md
321-
docs/SubmitSubscriptionResponse.md
322329
docs/SubscriptionPlanResponse.md
323330
docs/SubscriptionsApi.md
324331
docs/SubtreeChunkGroup.md
@@ -339,6 +346,7 @@ docs/TenantQuotaStateResponse.md
339346
docs/TenantResponse.md
340347
docs/TenantSettingsResponse.md
341348
docs/TenantSettingsUpdate.md
349+
docs/TenantSubscriptionResponse.md
342350
docs/TenantUserEditRequest.md
343351
docs/TenantUserOrder.md
344352
docs/TenantUserResponse.md
@@ -364,6 +372,7 @@ docs/ToolStatus.md
364372
docs/TransferOwnerRequest.md
365373
docs/TransferOwnerResponse.md
366374
docs/TrashApi.md
375+
docs/TrashItemDetailResponse.md
367376
docs/TrashItemResponse.md
368377
docs/UpdateApiConnectionRequest.md
369378
docs/UpdateChunkContentRequest.md
@@ -437,6 +446,7 @@ ksapi/api/api_connections_api.py
437446
ksapi/api/api_keys_api.py
438447
ksapi/api/audit_events_api.py
439448
ksapi/api/auth_api.py
449+
ksapi/api/billing_api.py
440450
ksapi/api/bulk_delete_api.py
441451
ksapi/api/bulk_download_api.py
442452
ksapi/api/bulk_move_api.py
@@ -491,6 +501,9 @@ ksapi/models/append_memory_chunk_request.py
491501
ksapi/models/args.py
492502
ksapi/models/ask_request.py
493503
ksapi/models/ask_response.py
504+
ksapi/models/billing_interval.py
505+
ksapi/models/billing_payment_response.py
506+
ksapi/models/billing_system.py
494507
ksapi/models/block_change_type.py
495508
ksapi/models/block_kind.py
496509
ksapi/models/branding_logo_type.py
@@ -518,6 +531,8 @@ ksapi/models/cell_diff.py
518531
ksapi/models/change_class.py
519532
ksapi/models/change_phone_number_request.py
520533
ksapi/models/change_subscription_request.py
534+
ksapi/models/checkout_action.py
535+
ksapi/models/checkout_response.py
521536
ksapi/models/checkpoint_details.py
522537
ksapi/models/chunk_bulk_response.py
523538
ksapi/models/chunk_content_item.py
@@ -671,6 +686,7 @@ ksapi/models/onboarding_company_request.py
671686
ksapi/models/onboarding_profile_request.py
672687
ksapi/models/paginated_response_annotated_union_folder_response_document_response_workflow_definition_response_workflow_run_response_dat.py
673688
ksapi/models/paginated_response_annotated_union_section_content_item_chunk_content_item_discriminator.py
689+
ksapi/models/paginated_response_billing_payment_response.py
674690
ksapi/models/paginated_response_document_response.py
675691
ksapi/models/paginated_response_document_version_response.py
676692
ksapi/models/paginated_response_event_response.py
@@ -729,6 +745,7 @@ ksapi/models/root_response.py
729745
ksapi/models/run_folder.py
730746
ksapi/models/run_folder_ref.py
731747
ksapi/models/run_timeseries_response.py
748+
ksapi/models/schedule_cadence.py
732749
ksapi/models/scored_chunk_response.py
733750
ksapi/models/search_skills_request.py
734751
ksapi/models/search_skills_response.py
@@ -762,7 +779,6 @@ ksapi/models/structured_change.py
762779
ksapi/models/structured_change_type.py
763780
ksapi/models/structured_diff.py
764781
ksapi/models/submit_feedback_request.py
765-
ksapi/models/submit_subscription_response.py
766782
ksapi/models/subscription_plan_response.py
767783
ksapi/models/subtree_chunk_group.py
768784
ksapi/models/subtree_chunks_response.py
@@ -779,6 +795,7 @@ ksapi/models/tenant_quota_state_response.py
779795
ksapi/models/tenant_response.py
780796
ksapi/models/tenant_settings_response.py
781797
ksapi/models/tenant_settings_update.py
798+
ksapi/models/tenant_subscription_response.py
782799
ksapi/models/tenant_user_edit_request.py
783800
ksapi/models/tenant_user_order.py
784801
ksapi/models/tenant_user_response.py
@@ -800,6 +817,7 @@ ksapi/models/tool_part.py
800817
ksapi/models/tool_status.py
801818
ksapi/models/transfer_owner_request.py
802819
ksapi/models/transfer_owner_response.py
820+
ksapi/models/trash_item_detail_response.py
803821
ksapi/models/trash_item_response.py
804822
ksapi/models/update_api_connection_request.py
805823
ksapi/models/update_chunk_content_request.py
@@ -889,6 +907,10 @@ test/test_ask_request.py
889907
test/test_ask_response.py
890908
test/test_audit_events_api.py
891909
test/test_auth_api.py
910+
test/test_billing_api.py
911+
test/test_billing_interval.py
912+
test/test_billing_payment_response.py
913+
test/test_billing_system.py
892914
test/test_block_change_type.py
893915
test/test_block_kind.py
894916
test/test_branding_logo_type.py
@@ -919,6 +941,8 @@ test/test_cell_diff.py
919941
test/test_change_class.py
920942
test/test_change_phone_number_request.py
921943
test/test_change_subscription_request.py
944+
test/test_checkout_action.py
945+
test/test_checkout_response.py
922946
test/test_checkpoint_details.py
923947
test/test_chunk_bulk_response.py
924948
test/test_chunk_content_item.py
@@ -1084,6 +1108,7 @@ test/test_onboarding_company_request.py
10841108
test/test_onboarding_profile_request.py
10851109
test/test_paginated_response_annotated_union_folder_response_document_response_workflow_definition_response_workflow_run_response_dat.py
10861110
test/test_paginated_response_annotated_union_section_content_item_chunk_content_item_discriminator.py
1111+
test/test_paginated_response_billing_payment_response.py
10871112
test/test_paginated_response_document_response.py
10881113
test/test_paginated_response_document_version_response.py
10891114
test/test_paginated_response_event_response.py
@@ -1145,6 +1170,7 @@ test/test_root_response.py
11451170
test/test_run_folder.py
11461171
test/test_run_folder_ref.py
11471172
test/test_run_timeseries_response.py
1173+
test/test_schedule_cadence.py
11481174
test/test_scored_chunk_response.py
11491175
test/test_search_skills_request.py
11501176
test/test_search_skills_response.py
@@ -1180,7 +1206,6 @@ test/test_structured_change.py
11801206
test/test_structured_change_type.py
11811207
test/test_structured_diff.py
11821208
test/test_submit_feedback_request.py
1183-
test/test_submit_subscription_response.py
11841209
test/test_subscription_plan_response.py
11851210
test/test_subscriptions_api.py
11861211
test/test_subtree_chunk_group.py
@@ -1201,6 +1226,7 @@ test/test_tenant_quota_state_response.py
12011226
test/test_tenant_response.py
12021227
test/test_tenant_settings_response.py
12031228
test/test_tenant_settings_update.py
1229+
test/test_tenant_subscription_response.py
12041230
test/test_tenant_user_edit_request.py
12051231
test/test_tenant_user_order.py
12061232
test/test_tenant_user_response.py
@@ -1226,6 +1252,7 @@ test/test_tool_status.py
12261252
test/test_transfer_owner_request.py
12271253
test/test_transfer_owner_response.py
12281254
test/test_trash_api.py
1255+
test/test_trash_item_detail_response.py
12291256
test/test_trash_item_response.py
12301257
test/test_update_api_connection_request.py
12311258
test/test_update_chunk_content_request.py

‎docs/BillingApi.md‎

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
# ksapi.BillingApi
2+
3+
All URIs are relative to *http://localhost:8000*
4+
5+
Method | HTTP request | Description
6+
------------- | ------------- | -------------
7+
[**list_billing_payments**](BillingApi.md#list_billing_payments) | **GET** /v1/tenants/{tenant_id}/billing/payments | List Billing Payments Handler
8+
9+
10+
# **list_billing_payments**
11+
> PaginatedResponseBillingPaymentResponse list_billing_payments(tenant_id, limit=limit, offset=offset)
12+
13+
List Billing Payments Handler
14+
15+
Newest-first payment history for the tenant (OWNER/ADMIN only).
16+
17+
Backs the billing page's receipts list. ``invoice_url`` links the
18+
Stripe-hosted invoice when the payment ran through Stripe; CN
19+
(Ping++) payments render an in-app receipt from the row itself.
20+
21+
### Example
22+
23+
* Api Key Authentication (cookieAuth):
24+
* Bearer Authentication (bearerAuth):
25+
26+
```python
27+
import ksapi
28+
from ksapi.models.paginated_response_billing_payment_response import PaginatedResponseBillingPaymentResponse
29+
from ksapi.rest import ApiException
30+
from pprint import pprint
31+
32+
# Defining the host is optional and defaults to http://localhost:8000
33+
# See configuration.py for a list of all supported configuration parameters.
34+
configuration = ksapi.Configuration(
35+
host = "http://localhost:8000"
36+
)
37+
38+
# The client must configure the authentication and authorization parameters
39+
# in accordance with the API server security policy.
40+
# Examples for each auth method are provided below, use the example that
41+
# satisfies your auth use case.
42+
43+
# Configure API key authorization: cookieAuth
44+
configuration.api_key['cookieAuth'] = os.environ["API_KEY"]
45+
46+
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
47+
# configuration.api_key_prefix['cookieAuth'] = 'Bearer'
48+
49+
# Configure Bearer authorization: bearerAuth
50+
configuration = ksapi.Configuration(
51+
access_token = os.environ["BEARER_TOKEN"]
52+
)
53+
54+
# Enter a context with an instance of the API client
55+
with ksapi.ApiClient(configuration) as api_client:
56+
# Create an instance of the API class
57+
api_instance = ksapi.BillingApi(api_client)
58+
tenant_id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID |
59+
limit = 20 # int | Number of items per page (optional) (default to 20)
60+
offset = 0 # int | Number of items to skip (optional) (default to 0)
61+
62+
try:
63+
# List Billing Payments Handler
64+
api_response = api_instance.list_billing_payments(tenant_id, limit=limit, offset=offset)
65+
print("The response of BillingApi->list_billing_payments:\n")
66+
pprint(api_response)
67+
except Exception as e:
68+
print("Exception when calling BillingApi->list_billing_payments: %s\n" % e)
69+
```
70+
71+
72+
73+
### Parameters
74+
75+
76+
Name | Type | Description | Notes
77+
------------- | ------------- | ------------- | -------------
78+
**tenant_id** | **UUID**| |
79+
**limit** | **int**| Number of items per page | [optional] [default to 20]
80+
**offset** | **int**| Number of items to skip | [optional] [default to 0]
81+
82+
### Return type
83+
84+
[**PaginatedResponseBillingPaymentResponse**](PaginatedResponseBillingPaymentResponse.md)
85+
86+
### Authorization
87+
88+
[cookieAuth](../README.md#cookieAuth), [bearerAuth](../README.md#bearerAuth)
89+
90+
### HTTP request headers
91+
92+
- **Content-Type**: Not defined
93+
- **Accept**: application/json
94+
95+
### HTTP response details
96+
97+
| Status code | Description | Response headers |
98+
|-------------|-------------|------------------|
99+
**200** | Successful Response | - |
100+
**422** | Validation Error | - |
101+
**0** | Error response. | - |
102+
103+
[[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)
104+

‎docs/BillingInterval.md‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# BillingInterval
2+
3+
Self-serve billing period length.
4+
5+
## Enum
6+
7+
* `MONTHLY` (value: `'MONTHLY'`)
8+
9+
* `ANNUAL` (value: `'ANNUAL'`)
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+

‎docs/BillingPaymentResponse.md‎

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# BillingPaymentResponse
2+
3+
One confirmed payment, as shown in the tenant's billing history. Backs in-app receipts: CN payments have no provider-hosted invoice (``invoice_url`` is NULL) — the frontend renders a receipt from these fields. Stripe payments link the hosted invoice.
4+
5+
## Properties
6+
7+
Name | Type | Description | Notes
8+
------------ | ------------- | ------------- | -------------
9+
**id** | **UUID** | Payment id. |
10+
**billing_system** | [**BillingSystem**](BillingSystem.md) | |
11+
**plan_id** | **UUID** | Plan purchased. |
12+
**interval** | **str** | Billing period purchased. |
13+
**num_seats** | **int** | Seats purchased. |
14+
**amount** | **int** | Total charged, in the currency's minor unit. |
15+
**currency** | **str** | USD (cents) or CNY (fen). |
16+
**invoice_url** | **str** | Provider-hosted invoice/receipt, when available. | [optional]
17+
**created_at** | **datetime** | When the payment confirmed. |
18+
19+
## Example
20+
21+
```python
22+
from ksapi.models.billing_payment_response import BillingPaymentResponse
23+
24+
# TODO update the JSON string below
25+
json = "{}"
26+
# create an instance of BillingPaymentResponse from a JSON string
27+
billing_payment_response_instance = BillingPaymentResponse.from_json(json)
28+
# print the JSON string representation of the object
29+
print(BillingPaymentResponse.to_json())
30+
31+
# convert the object into a dict
32+
billing_payment_response_dict = billing_payment_response_instance.to_dict()
33+
# create an instance of BillingPaymentResponse from a dict
34+
billing_payment_response_from_dict = BillingPaymentResponse.from_dict(billing_payment_response_dict)
35+
```
36+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
37+
38+

‎docs/BillingSystem.md‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# BillingSystem
2+
3+
External payment platform a subscription or payment is linked to. ``STRIPE`` serves North America; ``PING_PP`` (Ping++, a mainland-China payment aggregator fronting Alipay + WeChat Pay) serves China. Rows with no external billing linkage (free / admin-issued / synthetic fall-back subscriptions) carry NULL instead of a value.
4+
5+
## Enum
6+
7+
* `STRIPE` (value: `'STRIPE'`)
8+
9+
* `PING_PP` (value: `'PING_PP'`)
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+

‎docs/ChangeSubscriptionRequest.md‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
# ChangeSubscriptionRequest
22

3-
Body for ``POST /v1/tenants/{tenant_id}/subscriptions``.
3+
Body for ``POST /v1/tenants/{tenant_id}/subscriptions``. For a priced plan, ``interval`` and ``billing_system`` are required (``channel`` too for Ping++); the response carries the provider checkout to complete. For the free plan they are ignored — the downgrade is applied immediately (unbilled tenants) or scheduled for period end (billed tenants).
44

55
## Properties
66

77
Name | Type | Description | Notes
88
------------ | ------------- | ------------- | -------------
99
**subscription_id** | **UUID** | Target plan to switch to. |
1010
**num_seats** | **int** | Desired seat cap. Must be <= plan.max_seats and >= the count of active TenantUser rows. |
11+
**interval** | [**BillingInterval**](BillingInterval.md) | | [optional]
12+
**billing_system** | [**BillingSystem**](BillingSystem.md) | | [optional]
13+
**channel** | **str** | Ping++ payment channel chosen in the UI (e.g. 'alipay_pc_direct', 'wx_pub_qr'). Required when billing_system=PING_PP. | [optional]
14+
**channel_extra** | **Dict[str, object]** | Channel-specific Ping++ charge `extra` parameters (success_url, product ids, ... — see the Ping++ charge API for the chosen channel). Passed through verbatim; amounts are always resolved server-side. | [optional]
1115

1216
## Example
1317

‎docs/CheckoutAction.md‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# CheckoutAction
2+
3+
What the client must do next after a subscription-change request.
4+
5+
## Enum
6+
7+
* `REDIRECT` (value: `'REDIRECT'`)
8+
9+
* `CREDENTIAL` (value: `'CREDENTIAL'`)
10+
11+
* `SCHEDULED` (value: `'SCHEDULED'`)
12+
13+
* `APPLIED` (value: `'APPLIED'`)
14+
15+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
16+
17+

0 commit comments

Comments
 (0)