Skip to content

Commit

Permalink
Update OpenAPI Specification (#65)
Browse files Browse the repository at this point in the history
* Update OpenAPI Specification (api.yaml)

* Regenerate SDKs

---------

Co-authored-by: konfig-bot[bot] <121480725+konfig-bot[bot]@users.noreply.github.com>
Co-authored-by: konfig-publisher <publisher@konfigthis.com>
  • Loading branch information
konfig-bot[bot] and konfig-publisher authored Oct 2, 2024
1 parent 4841ed9 commit 07d28cc
Show file tree
Hide file tree
Showing 67 changed files with 233 additions and 37 deletions.
6 changes: 6 additions & 0 deletions .konfig/changesets/fine-jobs-search.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
python: patch
typescript: patch
---

Regenerate SDKs
6 changes: 3 additions & 3 deletions STATISTICS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

| SDK Name | Lines of Code |
| -------- | ------------- |
| python | 47673 |
| typescript | 15724 |
| **Total** | 63397 |
| python | 47829 |
| typescript | 15752 |
| **Total** | 63581 |
8 changes: 7 additions & 1 deletion api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ paths:
Interact with the "Request Body" below to explore the arguments of this function. Enter your GroundX API key to send a request directly from this web page. Select your language of choice to structure a code snippet based on your specified arguments.
parameters:
- description: The bucketId or projectId of the bucket or project being searched. The documents within the specified container will be compared to the query, and relevant information will be extracted.
- description: The bucketId, projectId, or documentId to be searched. The document or documents within the specified container will be compared to the query, and relevant information will be extracted.
in: path
name: id
required: true
Expand Down Expand Up @@ -833,6 +833,12 @@ components:
default: my search query
type: string
example: 'my search query'
relevance:
description: The minimum search relevance score required to include the result. By default, this is 10.0.
default: 10.0
type: number
format: float
example: 10.0
SearchResponse:
type: object
required:
Expand Down
2 changes: 1 addition & 1 deletion sdks/python/.konfig/generate-id.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
dfe7e157-3dfe-411a-b3d4-156dc5becddf
2fef5e18-2886-44bf-aa84-5319703d20e5
7 changes: 6 additions & 1 deletion sdks/python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1035,6 +1035,7 @@ Interact with the "Request Body" below to explore the arguments of this function
content_response = groundx.search.content(
query="my search query",
id=1,
relevance=10,
n=20,
next_token="eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9",
verbosity=0,
Expand All @@ -1049,7 +1050,11 @@ The search query to be used to find relevant documentation.

##### id: `int`<a id="id-int"></a>

The bucketId or projectId of the bucket or project being searched. The documents within the specified container will be compared to the query, and relevant information will be extracted.
The bucketId, projectId, or documentId to be searched. The document or documents within the specified container will be compared to the query, and relevant information will be extracted.

##### relevance: `Union[int, float]`<a id="relevance-unionint-float"></a>

The minimum search relevance score required to include the result. By default, this is 10.0.

##### n: `int`<a id="n-int"></a>

Expand Down
2 changes: 2 additions & 0 deletions sdks/python/groundx/api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
from urllib.parse import urlparse, quote
from urllib3.fields import RequestField as RequestFieldBase
from urllib3.fields import guess_content_type
from dateutil import parser
from datetime import datetime as dt

import frozendict

Expand Down
2 changes: 2 additions & 0 deletions sdks/python/groundx/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,8 @@ def __init__(self, host=None,
else:
raise ClientConfigurationError('API Key "ApiKeyAuth" is required')
if x_api_key:
if type(x_api_key) is not str:
raise ClientConfigurationError("x_api_key must be a string")
self.api_key['ApiKeyAuth'] = x_api_key
elif api_key is None:
raise ClientConfigurationError('API Key "ApiKeyAuth" is required')
Expand Down
14 changes: 12 additions & 2 deletions sdks/python/groundx/model/search_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,44 +39,54 @@ class MetaOapg:

class properties:
query = schemas.StrSchema
relevance = schemas.Float32Schema
__annotations__ = {
"query": query,
"relevance": relevance,
}

query: MetaOapg.properties.query

@typing.overload
def __getitem__(self, name: typing_extensions.Literal["query"]) -> MetaOapg.properties.query: ...

@typing.overload
def __getitem__(self, name: typing_extensions.Literal["relevance"]) -> MetaOapg.properties.relevance: ...

@typing.overload
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...

def __getitem__(self, name: typing.Union[typing_extensions.Literal["query", ], str]):
def __getitem__(self, name: typing.Union[typing_extensions.Literal["query", "relevance", ], str]):
# dict_instance[name] accessor
return super().__getitem__(name)


@typing.overload
def get_item_oapg(self, name: typing_extensions.Literal["query"]) -> MetaOapg.properties.query: ...

@typing.overload
def get_item_oapg(self, name: typing_extensions.Literal["relevance"]) -> typing.Union[MetaOapg.properties.relevance, schemas.Unset]: ...

@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...

def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["query", ], str]):
def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["query", "relevance", ], str]):
return super().get_item_oapg(name)


def __new__(
cls,
*args: typing.Union[dict, frozendict.frozendict, ],
query: typing.Union[MetaOapg.properties.query, str, ],
relevance: typing.Union[MetaOapg.properties.relevance, decimal.Decimal, int, float, schemas.Unset] = schemas.unset,
_configuration: typing.Optional[schemas.Configuration] = None,
**kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes],
) -> 'SearchRequest':
return super().__new__(
cls,
*args,
query=query,
relevance=relevance,
_configuration=_configuration,
**kwargs,
)
14 changes: 12 additions & 2 deletions sdks/python/groundx/model/search_request.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -39,44 +39,54 @@ class SearchRequest(

class properties:
query = schemas.StrSchema
relevance = schemas.Float32Schema
__annotations__ = {
"query": query,
"relevance": relevance,
}

query: MetaOapg.properties.query

@typing.overload
def __getitem__(self, name: typing_extensions.Literal["query"]) -> MetaOapg.properties.query: ...

@typing.overload
def __getitem__(self, name: typing_extensions.Literal["relevance"]) -> MetaOapg.properties.relevance: ...

@typing.overload
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...

def __getitem__(self, name: typing.Union[typing_extensions.Literal["query", ], str]):
def __getitem__(self, name: typing.Union[typing_extensions.Literal["query", "relevance", ], str]):
# dict_instance[name] accessor
return super().__getitem__(name)


@typing.overload
def get_item_oapg(self, name: typing_extensions.Literal["query"]) -> MetaOapg.properties.query: ...

@typing.overload
def get_item_oapg(self, name: typing_extensions.Literal["relevance"]) -> typing.Union[MetaOapg.properties.relevance, schemas.Unset]: ...

@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...

def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["query", ], str]):
def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["query", "relevance", ], str]):
return super().get_item_oapg(name)


def __new__(
cls,
*args: typing.Union[dict, frozendict.frozendict, ],
query: typing.Union[MetaOapg.properties.query, str, ],
relevance: typing.Union[MetaOapg.properties.relevance, decimal.Decimal, int, float, schemas.Unset] = schemas.unset,
_configuration: typing.Optional[schemas.Configuration] = None,
**kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes],
) -> 'SearchRequest':
return super().__new__(
cls,
*args,
query=query,
relevance=relevance,
_configuration=_configuration,
**kwargs,
)
3 changes: 3 additions & 0 deletions sdks/python/groundx/operation_parameter_map.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,9 @@
{
'name': 'id'
},
{
'name': 'relevance'
},
{
'name': 'n'
},
Expand Down
2 changes: 2 additions & 0 deletions sdks/python/groundx/paths/v1_bucket/get.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,7 @@ def list(
ApiResponseFor200,
api_client.ApiResponseWithoutDeserialization,
]:
""" List all buckets within your GroundX account Interact with the \"Request Body\" below to explore the arguments of this function. Enter your GroundX API key to send a request directly from this web page. Select your language of choice to structure a code snippet based on your specified arguments. """
args = self._list_mapped_args(
n=n,
next_token=next_token,
Expand Down Expand Up @@ -385,6 +386,7 @@ def get(
ApiResponseFor200,
api_client.ApiResponseWithoutDeserialization,
]:
""" List all buckets within your GroundX account Interact with the \"Request Body\" below to explore the arguments of this function. Enter your GroundX API key to send a request directly from this web page. Select your language of choice to structure a code snippet based on your specified arguments. """
args = self._list_mapped_args(
n=n,
next_token=next_token,
Expand Down
2 changes: 2 additions & 0 deletions sdks/python/groundx/paths/v1_bucket/get.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,7 @@ class List(BaseApi):
ApiResponseFor200,
api_client.ApiResponseWithoutDeserialization,
]:
""" List all buckets within your GroundX account Interact with the \"Request Body\" below to explore the arguments of this function. Enter your GroundX API key to send a request directly from this web page. Select your language of choice to structure a code snippet based on your specified arguments. """
args = self._list_mapped_args(
n=n,
next_token=next_token,
Expand Down Expand Up @@ -377,6 +378,7 @@ class ApiForget(BaseApi):
ApiResponseFor200,
api_client.ApiResponseWithoutDeserialization,
]:
""" List all buckets within your GroundX account Interact with the \"Request Body\" below to explore the arguments of this function. Enter your GroundX API key to send a request directly from this web page. Select your language of choice to structure a code snippet based on your specified arguments. """
args = self._list_mapped_args(
n=n,
next_token=next_token,
Expand Down
2 changes: 2 additions & 0 deletions sdks/python/groundx/paths/v1_bucket/post.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,7 @@ def create(
ApiResponseFor200,
api_client.ApiResponseWithoutDeserialization,
]:
""" Create a new bucket. Interact with the \"Request Body\" below to explore the arguments of this function. Enter your GroundX API key to send a request directly from this web page. Select your language of choice to structure a code snippet based on your specified arguments. """
args = self._create_mapped_args(
name=name,
)
Expand Down Expand Up @@ -373,6 +374,7 @@ def post(
ApiResponseFor200,
api_client.ApiResponseWithoutDeserialization,
]:
""" Create a new bucket. Interact with the \"Request Body\" below to explore the arguments of this function. Enter your GroundX API key to send a request directly from this web page. Select your language of choice to structure a code snippet based on your specified arguments. """
args = self._create_mapped_args(
name=name,
)
Expand Down
2 changes: 2 additions & 0 deletions sdks/python/groundx/paths/v1_bucket/post.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,7 @@ class Create(BaseApi):
ApiResponseFor200,
api_client.ApiResponseWithoutDeserialization,
]:
""" Create a new bucket. Interact with the \"Request Body\" below to explore the arguments of this function. Enter your GroundX API key to send a request directly from this web page. Select your language of choice to structure a code snippet based on your specified arguments. """
args = self._create_mapped_args(
name=name,
)
Expand Down Expand Up @@ -364,6 +365,7 @@ class ApiForpost(BaseApi):
ApiResponseFor200,
api_client.ApiResponseWithoutDeserialization,
]:
""" Create a new bucket. Interact with the \"Request Body\" below to explore the arguments of this function. Enter your GroundX API key to send a request directly from this web page. Select your language of choice to structure a code snippet based on your specified arguments. """
args = self._create_mapped_args(
name=name,
)
Expand Down
2 changes: 2 additions & 0 deletions sdks/python/groundx/paths/v1_bucket_bucket_id/delete.py
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,7 @@ def delete(
ApiResponseFor200,
api_client.ApiResponseWithoutDeserialization,
]:
""" Delete a bucket. Interact with the \"Request Body\" below to explore the arguments of this function. Enter your GroundX API key to send a request directly from this web page. Select your language of choice to structure a code snippet based on your specified arguments. """
args = self._delete_mapped_args(
bucket_id=bucket_id,
)
Expand Down Expand Up @@ -397,6 +398,7 @@ def delete(
ApiResponseFor200,
api_client.ApiResponseWithoutDeserialization,
]:
""" Delete a bucket. Interact with the \"Request Body\" below to explore the arguments of this function. Enter your GroundX API key to send a request directly from this web page. Select your language of choice to structure a code snippet based on your specified arguments. """
args = self._delete_mapped_args(
bucket_id=bucket_id,
)
Expand Down
2 changes: 2 additions & 0 deletions sdks/python/groundx/paths/v1_bucket_bucket_id/delete.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,7 @@ class Delete(BaseApi):
ApiResponseFor200,
api_client.ApiResponseWithoutDeserialization,
]:
""" Delete a bucket. Interact with the \"Request Body\" below to explore the arguments of this function. Enter your GroundX API key to send a request directly from this web page. Select your language of choice to structure a code snippet based on your specified arguments. """
args = self._delete_mapped_args(
bucket_id=bucket_id,
)
Expand Down Expand Up @@ -387,6 +388,7 @@ class ApiFordelete(BaseApi):
ApiResponseFor200,
api_client.ApiResponseWithoutDeserialization,
]:
""" Delete a bucket. Interact with the \"Request Body\" below to explore the arguments of this function. Enter your GroundX API key to send a request directly from this web page. Select your language of choice to structure a code snippet based on your specified arguments. """
args = self._delete_mapped_args(
bucket_id=bucket_id,
)
Expand Down
2 changes: 2 additions & 0 deletions sdks/python/groundx/paths/v1_bucket_bucket_id/get.py
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,7 @@ def get(
ApiResponseFor200,
api_client.ApiResponseWithoutDeserialization,
]:
""" Look up a specific bucket by its bucketId. Interact with the \"Request Body\" below to explore the arguments of this function. Enter your GroundX API key to send a request directly from this web page. Select your language of choice to structure a code snippet based on your specified arguments. """
args = self._get_mapped_args(
bucket_id=bucket_id,
)
Expand Down Expand Up @@ -397,6 +398,7 @@ def get(
ApiResponseFor200,
api_client.ApiResponseWithoutDeserialization,
]:
""" Look up a specific bucket by its bucketId. Interact with the \"Request Body\" below to explore the arguments of this function. Enter your GroundX API key to send a request directly from this web page. Select your language of choice to structure a code snippet based on your specified arguments. """
args = self._get_mapped_args(
bucket_id=bucket_id,
)
Expand Down
2 changes: 2 additions & 0 deletions sdks/python/groundx/paths/v1_bucket_bucket_id/get.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,7 @@ class Get(BaseApi):
ApiResponseFor200,
api_client.ApiResponseWithoutDeserialization,
]:
""" Look up a specific bucket by its bucketId. Interact with the \"Request Body\" below to explore the arguments of this function. Enter your GroundX API key to send a request directly from this web page. Select your language of choice to structure a code snippet based on your specified arguments. """
args = self._get_mapped_args(
bucket_id=bucket_id,
)
Expand Down Expand Up @@ -387,6 +388,7 @@ class ApiForget(BaseApi):
ApiResponseFor200,
api_client.ApiResponseWithoutDeserialization,
]:
""" Look up a specific bucket by its bucketId. Interact with the \"Request Body\" below to explore the arguments of this function. Enter your GroundX API key to send a request directly from this web page. Select your language of choice to structure a code snippet based on your specified arguments. """
args = self._get_mapped_args(
bucket_id=bucket_id,
)
Expand Down
2 changes: 2 additions & 0 deletions sdks/python/groundx/paths/v1_bucket_bucket_id/put.py
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,7 @@ def update(
ApiResponseFor200,
api_client.ApiResponseWithoutDeserialization,
]:
""" Rename a bucket. Interact with the \"Request Body\" below to explore the arguments of this function. Enter your GroundX API key to send a request directly from this web page. Select your language of choice to structure a code snippet based on your specified arguments. """
args = self._update_mapped_args(
new_name=new_name,
bucket_id=bucket_id,
Expand Down Expand Up @@ -461,6 +462,7 @@ def put(
ApiResponseFor200,
api_client.ApiResponseWithoutDeserialization,
]:
""" Rename a bucket. Interact with the \"Request Body\" below to explore the arguments of this function. Enter your GroundX API key to send a request directly from this web page. Select your language of choice to structure a code snippet based on your specified arguments. """
args = self._update_mapped_args(
new_name=new_name,
bucket_id=bucket_id,
Expand Down
2 changes: 2 additions & 0 deletions sdks/python/groundx/paths/v1_bucket_bucket_id/put.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,7 @@ class Update(BaseApi):
ApiResponseFor200,
api_client.ApiResponseWithoutDeserialization,
]:
""" Rename a bucket. Interact with the \"Request Body\" below to explore the arguments of this function. Enter your GroundX API key to send a request directly from this web page. Select your language of choice to structure a code snippet based on your specified arguments. """
args = self._update_mapped_args(
new_name=new_name,
bucket_id=bucket_id,
Expand Down Expand Up @@ -451,6 +452,7 @@ class ApiForput(BaseApi):
ApiResponseFor200,
api_client.ApiResponseWithoutDeserialization,
]:
""" Rename a bucket. Interact with the \"Request Body\" below to explore the arguments of this function. Enter your GroundX API key to send a request directly from this web page. Select your language of choice to structure a code snippet based on your specified arguments. """
args = self._update_mapped_args(
new_name=new_name,
bucket_id=bucket_id,
Expand Down
2 changes: 2 additions & 0 deletions sdks/python/groundx/paths/v1_customer/get.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@ def get(
ApiResponseFor200,
api_client.ApiResponseWithoutDeserialization,
]:
""" Get the account information associated with the API key. """
args = self._get_mapped_args(
)
return self._get_oapg(
Expand Down Expand Up @@ -292,6 +293,7 @@ def get(
ApiResponseFor200,
api_client.ApiResponseWithoutDeserialization,
]:
""" Get the account information associated with the API key. """
args = self._get_mapped_args(
)
return self._get_oapg(
Expand Down
2 changes: 2 additions & 0 deletions sdks/python/groundx/paths/v1_customer/get.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ class Get(BaseApi):
ApiResponseFor200,
api_client.ApiResponseWithoutDeserialization,
]:
""" Get the account information associated with the API key. """
args = self._get_mapped_args(
)
return self._get_oapg(
Expand Down Expand Up @@ -284,6 +285,7 @@ class ApiForget(BaseApi):
ApiResponseFor200,
api_client.ApiResponseWithoutDeserialization,
]:
""" Get the account information associated with the API key. """
args = self._get_mapped_args(
)
return self._get_oapg(
Expand Down
Loading

0 comments on commit 07d28cc

Please sign in to comment.