Skip to content

Commit 24ff0ec

Browse files
authored
Merge pull request #7 from crowdsecurity/$main-c43b710
Update python SDK version for 1.18.5
2 parents c43b710 + 7a02cd0 commit 24ff0ec

File tree

11 files changed

+35
-5
lines changed

11 files changed

+35
-5
lines changed

crowdsec_service_api/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ class Server(Enum):
4242
'CtiScenario',
4343
'EntityType',
4444
'HTTPValidationError',
45+
'InfoResponse',
4546
'IntegrationCreateRequest',
4647
'IntegrationCreateResponse',
4748
'IntegrationGetResponse',
Binary file not shown.
Binary file not shown.

crowdsec_service_api/models.py

+16-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# generated by datamodel-codegen:
22
# filename: <stdin>
3-
# timestamp: 2024-06-25T12:59:16+00:00
3+
# timestamp: 2024-07-05T14:43:55+00:00
44

55
from __future__ import annotations
66

@@ -267,6 +267,21 @@ class EntityType(Enum):
267267
REMEDIATION_COMPONENT_INTEGRATION = 'remediation_component_integration'
268268

269269

270+
class InfoResponse(BaseModelSdk):
271+
organization_id: Annotated[
272+
str, Field(description='The organization ID', title='Organization Id')
273+
]
274+
subscription_type: Annotated[
275+
str,
276+
Field(
277+
description='The organization subscription type', title='Subscription Type'
278+
),
279+
]
280+
api_key_name: Annotated[
281+
str, Field(description='The API key name that is used', title='Api Key Name')
282+
]
283+
284+
270285
class IntegrationType(Enum):
271286
FIREWALL_INTEGRATION = 'firewall_integration'
272287
REMEDIATION_COMPONENT_INTEGRATION = 'remediation_component_integration'
Binary file not shown.

crowdsec_service_api/services/info.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class Info(Service):
88

99
def get_info(
1010
self,
11-
):
11+
)-> InfoResponse:
1212
endpoint_url = "/info"
1313
loc = locals()
1414
headers = {}
@@ -19,5 +19,5 @@ def get_info(
1919
url=endpoint_url, path_params=path_params, params=params, headers=headers
2020
)
2121

22-
return None
22+
return InfoResponse(**response.json())
2323

doc/Info.md

+2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
### Parameters:
1414
| Parameter | Type | Description | Required | Default |
1515
| --------- | ---- | ----------- | -------- | ------- |
16+
### Returns:
17+
[InfoResponse](./Models.md#inforesponse)
1618
### Usage
1719

1820
```python

doc/Models.md

+10
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,16 @@ ORG, TAG, ENGINE, FIREWALL_INTEGRATION, REMEDIATION_COMPONENT_INTEGRATION
319319
|----------|------|-------------|---------|
320320
| detail | list[ValidationError] | None ||
321321

322+
# **InfoResponse**
323+
## Required:
324+
organization_id, subscription_type, api_key_name
325+
## Properties
326+
| Property | Type | Description | Example |
327+
|----------|------|-------------|---------|
328+
| organization_id | str | The organization ID ||
329+
| subscription_type | str | The organization subscription type ||
330+
| api_key_name | str | The API key name that is used ||
331+
322332
# **IntegrationCreateRequest**
323333
## Required:
324334
name, entity_type, output_format

doc/README.md

+2
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ You can find a Quickstart about this SDK, following this [documentation](https:/
7777

7878
[HTTPValidationError](./Models.md#httpvalidationerror)
7979

80+
[InfoResponse](./Models.md#inforesponse)
81+
8082
[IntegrationCreateRequest](./Models.md#integrationcreaterequest)
8183

8284
[IntegrationCreateResponse](./Models.md#integrationcreateresponse)

openapi.json

+1-1
Large diffs are not rendered by default.

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "crowdsec_service_api"
7-
version = "1.18.1"
7+
version = "1.18.5"
88
license = { text = "MIT" }
99
authors = [
1010
{ name="crowdsec", email="[email protected]" }

0 commit comments

Comments
 (0)