groundx 2.0.11__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. groundx/__init__.py +107 -0
  2. groundx/buckets/__init__.py +2 -0
  3. groundx/buckets/client.py +761 -0
  4. groundx/client.py +160 -0
  5. groundx/core/__init__.py +47 -0
  6. groundx/core/api_error.py +15 -0
  7. groundx/core/client_wrapper.py +54 -0
  8. groundx/core/datetime_utils.py +28 -0
  9. groundx/core/file.py +67 -0
  10. groundx/core/http_client.py +499 -0
  11. groundx/core/jsonable_encoder.py +101 -0
  12. groundx/core/pydantic_utilities.py +296 -0
  13. groundx/core/query_encoder.py +58 -0
  14. groundx/core/remove_none_from_dict.py +11 -0
  15. groundx/core/request_options.py +35 -0
  16. groundx/core/serialization.py +272 -0
  17. groundx/customer/__init__.py +2 -0
  18. groundx/customer/client.py +112 -0
  19. groundx/documents/__init__.py +5 -0
  20. groundx/documents/client.py +1544 -0
  21. groundx/documents/types/__init__.py +6 -0
  22. groundx/documents/types/document_remote_ingest_request_documents_item.py +45 -0
  23. groundx/documents/types/website_crawl_request_websites_item.py +46 -0
  24. groundx/environment.py +7 -0
  25. groundx/errors/__init__.py +6 -0
  26. groundx/errors/bad_request_error.py +9 -0
  27. groundx/errors/unauthorized_error.py +9 -0
  28. groundx/groups/__init__.py +2 -0
  29. groundx/groups/client.py +1098 -0
  30. groundx/health/__init__.py +2 -0
  31. groundx/health/client.py +236 -0
  32. groundx/py.typed +0 -0
  33. groundx/search/__init__.py +5 -0
  34. groundx/search/client.py +489 -0
  35. groundx/search/types/__init__.py +5 -0
  36. groundx/search/types/search_content_request_id.py +5 -0
  37. groundx/types/__init__.py +83 -0
  38. groundx/types/bounding_box_detail.py +54 -0
  39. groundx/types/bucket_detail.py +46 -0
  40. groundx/types/bucket_list_response.py +20 -0
  41. groundx/types/bucket_response.py +20 -0
  42. groundx/types/bucket_update_detail.py +22 -0
  43. groundx/types/bucket_update_response.py +20 -0
  44. groundx/types/customer_detail.py +39 -0
  45. groundx/types/customer_response.py +20 -0
  46. groundx/types/document_detail.py +62 -0
  47. groundx/types/document_list_response.py +23 -0
  48. groundx/types/document_lookup_response.py +32 -0
  49. groundx/types/document_response.py +20 -0
  50. groundx/types/document_type.py +7 -0
  51. groundx/types/group_detail.py +52 -0
  52. groundx/types/group_list_response.py +20 -0
  53. groundx/types/group_response.py +20 -0
  54. groundx/types/health_response.py +20 -0
  55. groundx/types/health_response_health.py +20 -0
  56. groundx/types/health_service.py +36 -0
  57. groundx/types/health_service_status.py +5 -0
  58. groundx/types/ingest_response.py +20 -0
  59. groundx/types/ingest_response_ingest.py +23 -0
  60. groundx/types/message_response.py +19 -0
  61. groundx/types/meter_detail.py +40 -0
  62. groundx/types/process_status_response.py +20 -0
  63. groundx/types/process_status_response_ingest.py +26 -0
  64. groundx/types/process_status_response_ingest_progress.py +26 -0
  65. groundx/types/process_status_response_ingest_progress_cancelled.py +21 -0
  66. groundx/types/process_status_response_ingest_progress_complete.py +21 -0
  67. groundx/types/process_status_response_ingest_progress_errors.py +21 -0
  68. groundx/types/process_status_response_ingest_progress_processing.py +21 -0
  69. groundx/types/processing_status.py +5 -0
  70. groundx/types/search_response.py +20 -0
  71. groundx/types/search_response_search.py +59 -0
  72. groundx/types/search_result_item.py +96 -0
  73. groundx/types/sort.py +5 -0
  74. groundx/types/sort_order.py +5 -0
  75. groundx/types/subscription_detail.py +24 -0
  76. groundx/types/subscription_detail_meters.py +23 -0
  77. groundx/version.py +3 -0
  78. groundx-2.0.11.dist-info/METADATA +177 -0
  79. groundx-2.0.11.dist-info/RECORD +80 -0
  80. groundx-2.0.11.dist-info/WHEEL +4 -0
@@ -0,0 +1,6 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from .document_remote_ingest_request_documents_item import DocumentRemoteIngestRequestDocumentsItem
4
+ from .website_crawl_request_websites_item import WebsiteCrawlRequestWebsitesItem
5
+
6
+ __all__ = ["DocumentRemoteIngestRequestDocumentsItem", "WebsiteCrawlRequestWebsitesItem"]
@@ -0,0 +1,45 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from ...core.pydantic_utilities import UniversalBaseModel
4
+ import typing_extensions
5
+ from ...core.serialization import FieldMetadata
6
+ import pydantic
7
+ import typing
8
+ from ...types.document_type import DocumentType
9
+ from ...core.pydantic_utilities import IS_PYDANTIC_V2
10
+
11
+
12
+ class DocumentRemoteIngestRequestDocumentsItem(UniversalBaseModel):
13
+ bucket_id: typing_extensions.Annotated[int, FieldMetadata(alias="bucketId")] = pydantic.Field()
14
+ """
15
+ the bucketId of the bucket which this remote file will be ingested to.
16
+ """
17
+
18
+ file_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="fileName")] = pydantic.Field(
19
+ default=None
20
+ )
21
+ """
22
+ The name of the file being ingested
23
+ """
24
+
25
+ file_type: typing_extensions.Annotated[typing.Optional[DocumentType], FieldMetadata(alias="fileType")] = None
26
+ search_data: typing_extensions.Annotated[
27
+ typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]], FieldMetadata(alias="searchData")
28
+ ] = pydantic.Field(default=None)
29
+ """
30
+ Custom metadata which can be used to influence GroundX's search functionality. This data can be used to further hone GroundX search.
31
+ """
32
+
33
+ source_url: typing_extensions.Annotated[str, FieldMetadata(alias="sourceUrl")] = pydantic.Field()
34
+ """
35
+ The URL of the document being ingested by GroundX.
36
+ """
37
+
38
+ if IS_PYDANTIC_V2:
39
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
40
+ else:
41
+
42
+ class Config:
43
+ frozen = True
44
+ smart_union = True
45
+ extra = pydantic.Extra.allow
@@ -0,0 +1,46 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from ...core.pydantic_utilities import UniversalBaseModel
4
+ import typing_extensions
5
+ from ...core.serialization import FieldMetadata
6
+ import pydantic
7
+ import typing
8
+ from ...core.pydantic_utilities import IS_PYDANTIC_V2
9
+
10
+
11
+ class WebsiteCrawlRequestWebsitesItem(UniversalBaseModel):
12
+ bucket_id: typing_extensions.Annotated[int, FieldMetadata(alias="bucketId")] = pydantic.Field()
13
+ """
14
+ the bucketId of the bucket which this website will be ingested to.
15
+ """
16
+
17
+ cap: typing.Optional[int] = pydantic.Field(default=None)
18
+ """
19
+ The maximum number of pages to crawl
20
+ """
21
+
22
+ depth: typing.Optional[int] = pydantic.Field(default=None)
23
+ """
24
+ The maximum depth of linked pages to follow from the sourceUrl
25
+ """
26
+
27
+ search_data: typing_extensions.Annotated[
28
+ typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]], FieldMetadata(alias="searchData")
29
+ ] = pydantic.Field(default=None)
30
+ """
31
+ Custom metadata which can be used to influence GroundX's search functionality. This data can be used to further hone GroundX search.
32
+ """
33
+
34
+ source_url: typing_extensions.Annotated[str, FieldMetadata(alias="sourceUrl")] = pydantic.Field()
35
+ """
36
+ The URL from which the crawl is initiated.
37
+ """
38
+
39
+ if IS_PYDANTIC_V2:
40
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
41
+ else:
42
+
43
+ class Config:
44
+ frozen = True
45
+ smart_union = True
46
+ extra = pydantic.Extra.allow
groundx/environment.py ADDED
@@ -0,0 +1,7 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import enum
4
+
5
+
6
+ class GroundXEnvironment(enum.Enum):
7
+ DEFAULT = "https://api.groundx.ai/api"
@@ -0,0 +1,6 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from .bad_request_error import BadRequestError
4
+ from .unauthorized_error import UnauthorizedError
5
+
6
+ __all__ = ["BadRequestError", "UnauthorizedError"]
@@ -0,0 +1,9 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from ..core.api_error import ApiError
4
+ import typing
5
+
6
+
7
+ class BadRequestError(ApiError):
8
+ def __init__(self, body: typing.Optional[typing.Any]):
9
+ super().__init__(status_code=400, body=body)
@@ -0,0 +1,9 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from ..core.api_error import ApiError
4
+ import typing
5
+
6
+
7
+ class UnauthorizedError(ApiError):
8
+ def __init__(self, body: typing.Optional[typing.Any]):
9
+ super().__init__(status_code=401, body=body)
@@ -0,0 +1,2 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+