graphlit-client 1.0.20260128001__py3-none-any.whl → 1.0.20260129002__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.
- graphlit_api/__init__.py +18 -0
- graphlit_api/add_contents_to_collections.py +3 -3
- graphlit_api/ask_graphlit.py +13 -13
- graphlit_api/async_base_client.py +34 -33
- graphlit_api/client.py +474 -474
- graphlit_api/complete_conversation.py +29 -29
- graphlit_api/continue_conversation.py +29 -29
- graphlit_api/create_view.py +53 -53
- graphlit_api/create_workflow.py +36 -36
- graphlit_api/delete_alerts.py +2 -2
- graphlit_api/delete_all_alerts.py +2 -2
- graphlit_api/delete_all_categories.py +2 -2
- graphlit_api/delete_all_collections.py +2 -2
- graphlit_api/delete_all_contents.py +2 -2
- graphlit_api/delete_all_conversations.py +2 -2
- graphlit_api/delete_all_events.py +2 -2
- graphlit_api/delete_all_facts.py +2 -2
- graphlit_api/delete_all_feeds.py +2 -2
- graphlit_api/delete_all_investment_funds.py +2 -2
- graphlit_api/delete_all_investments.py +2 -2
- graphlit_api/delete_all_labels.py +2 -2
- graphlit_api/delete_all_medical_conditions.py +2 -2
- graphlit_api/delete_all_medical_contraindications.py +2 -2
- graphlit_api/delete_all_medical_devices.py +2 -2
- graphlit_api/delete_all_medical_drug_classes.py +2 -2
- graphlit_api/delete_all_medical_drugs.py +2 -2
- graphlit_api/delete_all_medical_guidelines.py +2 -2
- graphlit_api/delete_all_medical_indications.py +2 -2
- graphlit_api/delete_all_medical_procedures.py +2 -2
- graphlit_api/delete_all_medical_studies.py +2 -2
- graphlit_api/delete_all_medical_tests.py +2 -2
- graphlit_api/delete_all_medical_therapies.py +2 -2
- graphlit_api/delete_all_organizations.py +2 -2
- graphlit_api/delete_all_persons.py +2 -2
- graphlit_api/delete_all_places.py +2 -2
- graphlit_api/delete_all_products.py +2 -2
- graphlit_api/delete_all_repos.py +2 -2
- graphlit_api/delete_all_softwares.py +2 -2
- graphlit_api/delete_all_specifications.py +2 -2
- graphlit_api/delete_all_views.py +2 -2
- graphlit_api/delete_all_workflows.py +2 -2
- graphlit_api/delete_categories.py +2 -2
- graphlit_api/delete_collections.py +2 -2
- graphlit_api/delete_contents.py +2 -2
- graphlit_api/delete_conversations.py +2 -2
- graphlit_api/delete_events.py +2 -2
- graphlit_api/delete_facts.py +2 -2
- graphlit_api/delete_feeds.py +2 -2
- graphlit_api/delete_investment_funds.py +2 -2
- graphlit_api/delete_investments.py +2 -2
- graphlit_api/delete_labels.py +2 -2
- graphlit_api/delete_medical_conditions.py +2 -2
- graphlit_api/delete_medical_contraindications.py +2 -2
- graphlit_api/delete_medical_devices.py +2 -2
- graphlit_api/delete_medical_drug_classes.py +2 -2
- graphlit_api/delete_medical_drugs.py +2 -2
- graphlit_api/delete_medical_guidelines.py +2 -2
- graphlit_api/delete_medical_indications.py +2 -2
- graphlit_api/delete_medical_procedures.py +2 -2
- graphlit_api/delete_medical_studies.py +2 -2
- graphlit_api/delete_medical_tests.py +2 -2
- graphlit_api/delete_medical_therapies.py +2 -2
- graphlit_api/delete_organizations.py +2 -2
- graphlit_api/delete_persons.py +2 -2
- graphlit_api/delete_places.py +2 -2
- graphlit_api/delete_products.py +2 -2
- graphlit_api/delete_repos.py +2 -2
- graphlit_api/delete_softwares.py +2 -2
- graphlit_api/delete_specifications.py +2 -2
- graphlit_api/delete_views.py +2 -2
- graphlit_api/delete_workflows.py +2 -2
- graphlit_api/describe_encoded_image.py +13 -13
- graphlit_api/describe_image.py +13 -13
- graphlit_api/enrich_organizations.py +2 -2
- graphlit_api/enrich_persons.py +2 -2
- graphlit_api/enrich_places.py +2 -2
- graphlit_api/enrich_products.py +2 -2
- graphlit_api/enums.py +10 -0
- graphlit_api/exceptions.py +12 -10
- graphlit_api/extract_contents.py +2 -2
- graphlit_api/extract_observables.py +23 -23
- graphlit_api/extract_text.py +2 -2
- graphlit_api/format_conversation.py +29 -29
- graphlit_api/get_alert.py +28 -28
- graphlit_api/get_category.py +2 -2
- graphlit_api/get_collection.py +2 -2
- graphlit_api/get_connector.py +2 -2
- graphlit_api/get_content.py +48 -48
- graphlit_api/get_conversation.py +69 -69
- graphlit_api/get_event.py +4 -4
- graphlit_api/get_fact.py +5 -5
- graphlit_api/get_feed.py +39 -15
- graphlit_api/get_investment.py +4 -4
- graphlit_api/get_investment_fund.py +7 -7
- graphlit_api/get_label.py +2 -2
- graphlit_api/get_medical_condition.py +4 -4
- graphlit_api/get_medical_contraindication.py +4 -4
- graphlit_api/get_medical_device.py +4 -4
- graphlit_api/get_medical_drug.py +4 -4
- graphlit_api/get_medical_drug_class.py +4 -4
- graphlit_api/get_medical_guideline.py +4 -4
- graphlit_api/get_medical_indication.py +4 -4
- graphlit_api/get_medical_procedure.py +4 -4
- graphlit_api/get_medical_study.py +4 -4
- graphlit_api/get_medical_test.py +4 -4
- graphlit_api/get_medical_therapy.py +4 -4
- graphlit_api/get_organization.py +13 -13
- graphlit_api/get_person.py +10 -10
- graphlit_api/get_place.py +4 -4
- graphlit_api/get_product.py +4 -4
- graphlit_api/get_repo.py +4 -4
- graphlit_api/get_software.py +4 -4
- graphlit_api/get_user.py +3 -3
- graphlit_api/get_user_by_identifier.py +3 -3
- graphlit_api/get_view.py +53 -53
- graphlit_api/get_workflow.py +36 -36
- graphlit_api/ingest_batch.py +5 -5
- graphlit_api/ingest_encoded_file.py +4 -4
- graphlit_api/ingest_event.py +4 -4
- graphlit_api/ingest_memory.py +4 -4
- graphlit_api/ingest_text.py +4 -4
- graphlit_api/ingest_text_batch.py +5 -5
- graphlit_api/ingest_uri.py +4 -4
- graphlit_api/input_types.py +319 -284
- graphlit_api/lookup_contents.py +48 -48
- graphlit_api/lookup_entity.py +2 -2
- graphlit_api/lookup_usage.py +2 -2
- graphlit_api/map_web.py +2 -2
- graphlit_api/operations.py +28 -6
- graphlit_api/prompt.py +14 -14
- graphlit_api/prompt_conversation.py +29 -29
- graphlit_api/prompt_specifications.py +15 -15
- graphlit_api/publish_contents.py +14 -14
- graphlit_api/publish_conversation.py +14 -14
- graphlit_api/publish_text.py +14 -14
- graphlit_api/query_alerts.py +29 -29
- graphlit_api/query_asana_projects.py +2 -2
- graphlit_api/query_asana_workspaces.py +2 -2
- graphlit_api/query_bamboo_hr_departments.py +2 -2
- graphlit_api/query_bamboo_hr_divisions.py +2 -2
- graphlit_api/query_bamboo_hr_employment_statuses.py +2 -2
- graphlit_api/query_bamboo_hr_locations.py +2 -2
- graphlit_api/query_box_folders.py +2 -2
- graphlit_api/query_categories.py +3 -3
- graphlit_api/query_collections.py +2 -2
- graphlit_api/query_confluence_spaces.py +2 -2
- graphlit_api/query_connectors.py +3 -3
- graphlit_api/query_contents.py +38 -38
- graphlit_api/query_contents_facets.py +2 -2
- graphlit_api/query_contents_graph.py +3 -3
- graphlit_api/query_contents_observations.py +40 -40
- graphlit_api/query_conversations.py +70 -70
- graphlit_api/query_discord_channels.py +2 -2
- graphlit_api/query_discord_guilds.py +2 -2
- graphlit_api/query_dropbox_folders.py +2 -2
- graphlit_api/query_events.py +5 -5
- graphlit_api/query_events_clusters.py +7 -7
- graphlit_api/query_facts.py +6 -6
- graphlit_api/query_facts_clusters.py +8 -8
- graphlit_api/query_facts_graph.py +3 -3
- graphlit_api/query_feeds.py +40 -16
- graphlit_api/query_git_hub_repositories.py +2 -2
- graphlit_api/query_google_calendars.py +2 -2
- graphlit_api/query_google_drive_folders.py +2 -2
- graphlit_api/query_graph.py +3 -3
- graphlit_api/query_gusto_companies.py +2 -2
- graphlit_api/query_gusto_departments.py +2 -2
- graphlit_api/query_gusto_locations.py +2 -2
- graphlit_api/query_investment_funds.py +5 -5
- graphlit_api/query_investment_funds_clusters.py +10 -10
- graphlit_api/query_investment_funds_expanded.py +8 -8
- graphlit_api/query_investments.py +5 -5
- graphlit_api/query_investments_clusters.py +7 -7
- graphlit_api/query_investments_expanded.py +5 -5
- graphlit_api/query_labels.py +3 -3
- graphlit_api/query_linear_projects.py +2 -2
- graphlit_api/query_medical_conditions.py +5 -5
- graphlit_api/query_medical_conditions_clusters.py +7 -7
- graphlit_api/query_medical_contraindications.py +5 -5
- graphlit_api/query_medical_contraindications_clusters.py +7 -7
- graphlit_api/query_medical_devices.py +5 -5
- graphlit_api/query_medical_devices_clusters.py +7 -7
- graphlit_api/query_medical_drug_classes.py +5 -5
- graphlit_api/query_medical_drug_classes_clusters.py +7 -7
- graphlit_api/query_medical_drugs.py +5 -5
- graphlit_api/query_medical_drugs_clusters.py +7 -7
- graphlit_api/query_medical_guidelines.py +5 -5
- graphlit_api/query_medical_guidelines_clusters.py +7 -7
- graphlit_api/query_medical_indications.py +5 -5
- graphlit_api/query_medical_indications_clusters.py +7 -7
- graphlit_api/query_medical_procedures.py +5 -5
- graphlit_api/query_medical_procedures_clusters.py +7 -7
- graphlit_api/query_medical_studies.py +5 -5
- graphlit_api/query_medical_studies_clusters.py +7 -7
- graphlit_api/query_medical_tests.py +5 -5
- graphlit_api/query_medical_tests_clusters.py +7 -7
- graphlit_api/query_medical_therapies.py +5 -5
- graphlit_api/query_medical_therapies_clusters.py +7 -7
- graphlit_api/query_microsoft_calendars.py +2 -2
- graphlit_api/query_microsoft_teams_channels.py +2 -2
- graphlit_api/query_microsoft_teams_teams.py +2 -2
- graphlit_api/query_models.py +6 -6
- graphlit_api/query_monday_boards.py +2 -2
- graphlit_api/query_notion_databases.py +2 -2
- graphlit_api/query_notion_pages.py +2 -2
- graphlit_api/query_observables.py +2 -2
- graphlit_api/query_one_drive_folders.py +2 -2
- graphlit_api/query_organizations.py +6 -6
- graphlit_api/query_organizations_clusters.py +16 -16
- graphlit_api/query_organizations_expanded.py +14 -14
- graphlit_api/query_persons.py +5 -5
- graphlit_api/query_persons_clusters.py +13 -13
- graphlit_api/query_persons_expanded.py +11 -11
- graphlit_api/query_places.py +5 -5
- graphlit_api/query_places_clusters.py +7 -7
- graphlit_api/query_products.py +5 -5
- graphlit_api/query_products_clusters.py +7 -7
- graphlit_api/query_repos.py +5 -5
- graphlit_api/query_repos_clusters.py +7 -7
- graphlit_api/query_share_point_folders.py +2 -2
- graphlit_api/query_share_point_libraries.py +2 -2
- graphlit_api/query_slack_channels.py +2 -2
- graphlit_api/query_softwares.py +5 -5
- graphlit_api/query_softwares_clusters.py +7 -7
- graphlit_api/query_specifications.py +2 -2
- graphlit_api/query_tokens.py +6 -6
- graphlit_api/query_usage.py +2 -2
- graphlit_api/query_users.py +4 -4
- graphlit_api/query_views.py +54 -54
- graphlit_api/query_workflows.py +37 -37
- graphlit_api/remove_contents_from_collection.py +2 -2
- graphlit_api/resolve_entities.py +5 -5
- graphlit_api/retrieve_entities.py +2 -2
- graphlit_api/retrieve_facts.py +6 -6
- graphlit_api/retrieve_sources.py +2 -2
- graphlit_api/retrieve_view.py +2 -2
- graphlit_api/revise_content.py +13 -13
- graphlit_api/revise_encoded_image.py +13 -13
- graphlit_api/revise_image.py +13 -13
- graphlit_api/revise_text.py +13 -13
- graphlit_api/screenshot_page.py +4 -4
- graphlit_api/search_web.py +2 -2
- graphlit_api/suggest_conversation.py +2 -2
- graphlit_api/summarize_contents.py +3 -3
- graphlit_api/summarize_text.py +2 -2
- graphlit_api/update_content.py +4 -4
- graphlit_api/update_view.py +53 -53
- graphlit_api/update_workflow.py +36 -36
- graphlit_api/upsert_view.py +53 -53
- graphlit_api/upsert_workflow.py +36 -36
- {graphlit_client-1.0.20260128001.dist-info → graphlit_client-1.0.20260129002.dist-info}/METADATA +1 -1
- graphlit_client-1.0.20260129002.dist-info/RECORD +420 -0
- graphlit_client-1.0.20260128001.dist-info/RECORD +0 -420
- {graphlit_client-1.0.20260128001.dist-info → graphlit_client-1.0.20260129002.dist-info}/WHEEL +0 -0
- {graphlit_client-1.0.20260128001.dist-info → graphlit_client-1.0.20260129002.dist-info}/licenses/LICENSE +0 -0
- {graphlit_client-1.0.20260128001.dist-info → graphlit_client-1.0.20260129002.dist-info}/top_level.txt +0 -0
graphlit_api/__init__.py
CHANGED
|
@@ -711,6 +711,7 @@ from .enums import (
|
|
|
711
711
|
HubSpotIssueAuthenticationTypes,
|
|
712
712
|
ImageProjectionTypes,
|
|
713
713
|
IntegrationServiceTypes,
|
|
714
|
+
IntercomConversationsAuthenticationTypes,
|
|
714
715
|
InvestmentFacetTypes,
|
|
715
716
|
InvestmentFundFacetTypes,
|
|
716
717
|
JinaModels,
|
|
@@ -1115,6 +1116,7 @@ from .get_feed import (
|
|
|
1115
1116
|
GetFeedFeedCrmGoogleContacts,
|
|
1116
1117
|
GetFeedFeedCrmGoogleContactsConnector,
|
|
1117
1118
|
GetFeedFeedCrmHubSpot,
|
|
1119
|
+
GetFeedFeedCrmHubSpotConnector,
|
|
1118
1120
|
GetFeedFeedCrmMicrosoftContacts,
|
|
1119
1121
|
GetFeedFeedCrmMicrosoftContactsConnector,
|
|
1120
1122
|
GetFeedFeedCrmSalesforce,
|
|
@@ -1133,6 +1135,8 @@ from .get_feed import (
|
|
|
1133
1135
|
GetFeedFeedHubSpotConversations,
|
|
1134
1136
|
GetFeedFeedHubSpotConversationsConnector,
|
|
1135
1137
|
GetFeedFeedIntercom,
|
|
1138
|
+
GetFeedFeedIntercomConversations,
|
|
1139
|
+
GetFeedFeedIntercomConversationsConnector,
|
|
1136
1140
|
GetFeedFeedIssue,
|
|
1137
1141
|
GetFeedFeedIssueAsana,
|
|
1138
1142
|
GetFeedFeedIssueAttio,
|
|
@@ -1893,6 +1897,8 @@ from .input_types import (
|
|
|
1893
1897
|
Int64RangeInput,
|
|
1894
1898
|
IntegrationConnectorInput,
|
|
1895
1899
|
IntegrationConnectorUpdateInput,
|
|
1900
|
+
IntercomConversationsFeedPropertiesInput,
|
|
1901
|
+
IntercomConversationsFeedPropertiesUpdateInput,
|
|
1896
1902
|
IntercomFeedPropertiesInput,
|
|
1897
1903
|
IntercomFeedPropertiesUpdateInput,
|
|
1898
1904
|
IntercomTicketsFeedPropertiesInput,
|
|
@@ -3103,6 +3109,7 @@ from .query_feeds import (
|
|
|
3103
3109
|
QueryFeedsFeedsResultsCrmGoogleContacts,
|
|
3104
3110
|
QueryFeedsFeedsResultsCrmGoogleContactsConnector,
|
|
3105
3111
|
QueryFeedsFeedsResultsCrmHubSpot,
|
|
3112
|
+
QueryFeedsFeedsResultsCrmHubSpotConnector,
|
|
3106
3113
|
QueryFeedsFeedsResultsCrmMicrosoftContacts,
|
|
3107
3114
|
QueryFeedsFeedsResultsCrmMicrosoftContactsConnector,
|
|
3108
3115
|
QueryFeedsFeedsResultsCrmSalesforce,
|
|
@@ -3121,6 +3128,8 @@ from .query_feeds import (
|
|
|
3121
3128
|
QueryFeedsFeedsResultsHubSpotConversations,
|
|
3122
3129
|
QueryFeedsFeedsResultsHubSpotConversationsConnector,
|
|
3123
3130
|
QueryFeedsFeedsResultsIntercom,
|
|
3131
|
+
QueryFeedsFeedsResultsIntercomConversations,
|
|
3132
|
+
QueryFeedsFeedsResultsIntercomConversationsConnector,
|
|
3124
3133
|
QueryFeedsFeedsResultsIssue,
|
|
3125
3134
|
QueryFeedsFeedsResultsIssueAsana,
|
|
3126
3135
|
QueryFeedsFeedsResultsIssueAttio,
|
|
@@ -5792,6 +5801,7 @@ __all__ = [
|
|
|
5792
5801
|
"GetFeedFeedCrmGoogleContacts",
|
|
5793
5802
|
"GetFeedFeedCrmGoogleContactsConnector",
|
|
5794
5803
|
"GetFeedFeedCrmHubSpot",
|
|
5804
|
+
"GetFeedFeedCrmHubSpotConnector",
|
|
5795
5805
|
"GetFeedFeedCrmMicrosoftContacts",
|
|
5796
5806
|
"GetFeedFeedCrmMicrosoftContactsConnector",
|
|
5797
5807
|
"GetFeedFeedCrmSalesforce",
|
|
@@ -5810,6 +5820,8 @@ __all__ = [
|
|
|
5810
5820
|
"GetFeedFeedHubSpotConversations",
|
|
5811
5821
|
"GetFeedFeedHubSpotConversationsConnector",
|
|
5812
5822
|
"GetFeedFeedIntercom",
|
|
5823
|
+
"GetFeedFeedIntercomConversations",
|
|
5824
|
+
"GetFeedFeedIntercomConversationsConnector",
|
|
5813
5825
|
"GetFeedFeedIssue",
|
|
5814
5826
|
"GetFeedFeedIssueAsana",
|
|
5815
5827
|
"GetFeedFeedIssueAttio",
|
|
@@ -6383,6 +6395,9 @@ __all__ = [
|
|
|
6383
6395
|
"IntegrationConnectorInput",
|
|
6384
6396
|
"IntegrationConnectorUpdateInput",
|
|
6385
6397
|
"IntegrationServiceTypes",
|
|
6398
|
+
"IntercomConversationsAuthenticationTypes",
|
|
6399
|
+
"IntercomConversationsFeedPropertiesInput",
|
|
6400
|
+
"IntercomConversationsFeedPropertiesUpdateInput",
|
|
6386
6401
|
"IntercomFeedPropertiesInput",
|
|
6387
6402
|
"IntercomFeedPropertiesUpdateInput",
|
|
6388
6403
|
"IntercomTicketsFeedPropertiesInput",
|
|
@@ -7200,6 +7215,7 @@ __all__ = [
|
|
|
7200
7215
|
"QueryFeedsFeedsResultsCrmGoogleContacts",
|
|
7201
7216
|
"QueryFeedsFeedsResultsCrmGoogleContactsConnector",
|
|
7202
7217
|
"QueryFeedsFeedsResultsCrmHubSpot",
|
|
7218
|
+
"QueryFeedsFeedsResultsCrmHubSpotConnector",
|
|
7203
7219
|
"QueryFeedsFeedsResultsCrmMicrosoftContacts",
|
|
7204
7220
|
"QueryFeedsFeedsResultsCrmMicrosoftContactsConnector",
|
|
7205
7221
|
"QueryFeedsFeedsResultsCrmSalesforce",
|
|
@@ -7218,6 +7234,8 @@ __all__ = [
|
|
|
7218
7234
|
"QueryFeedsFeedsResultsHubSpotConversations",
|
|
7219
7235
|
"QueryFeedsFeedsResultsHubSpotConversationsConnector",
|
|
7220
7236
|
"QueryFeedsFeedsResultsIntercom",
|
|
7237
|
+
"QueryFeedsFeedsResultsIntercomConversations",
|
|
7238
|
+
"QueryFeedsFeedsResultsIntercomConversationsConnector",
|
|
7221
7239
|
"QueryFeedsFeedsResultsIssue",
|
|
7222
7240
|
"QueryFeedsFeedsResultsIssueAsana",
|
|
7223
7241
|
"QueryFeedsFeedsResultsIssueAttio",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Generated by ariadne-codegen
|
|
2
2
|
# Source: ./documents
|
|
3
3
|
|
|
4
|
-
from typing import
|
|
4
|
+
from typing import Optional
|
|
5
5
|
|
|
6
6
|
from pydantic import Field
|
|
7
7
|
|
|
@@ -11,7 +11,7 @@ from .enums import CollectionTypes, EntityState
|
|
|
11
11
|
|
|
12
12
|
class AddContentsToCollections(BaseModel):
|
|
13
13
|
add_contents_to_collections: Optional[
|
|
14
|
-
|
|
14
|
+
list[Optional["AddContentsToCollectionsAddContentsToCollections"]]
|
|
15
15
|
] = Field(alias="addContentsToCollections")
|
|
16
16
|
|
|
17
17
|
|
|
@@ -21,7 +21,7 @@ class AddContentsToCollectionsAddContentsToCollections(BaseModel):
|
|
|
21
21
|
state: EntityState
|
|
22
22
|
type: Optional[CollectionTypes]
|
|
23
23
|
contents: Optional[
|
|
24
|
-
|
|
24
|
+
list[Optional["AddContentsToCollectionsAddContentsToCollectionsContents"]]
|
|
25
25
|
]
|
|
26
26
|
|
|
27
27
|
|
graphlit_api/ask_graphlit.py
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Generated by ariadne-codegen
|
|
2
2
|
# Source: ./documents
|
|
3
3
|
|
|
4
|
-
from typing import Any,
|
|
4
|
+
from typing import Any, Optional
|
|
5
5
|
|
|
6
6
|
from pydantic import Field
|
|
7
7
|
|
|
@@ -35,8 +35,8 @@ class AskGraphlitAskGraphlitMessage(BaseModel):
|
|
|
35
35
|
role: ConversationRoleTypes
|
|
36
36
|
author: Optional[str]
|
|
37
37
|
message: Optional[str]
|
|
38
|
-
citations: Optional[
|
|
39
|
-
tool_calls: Optional[
|
|
38
|
+
citations: Optional[list[Optional["AskGraphlitAskGraphlitMessageCitations"]]]
|
|
39
|
+
tool_calls: Optional[list[Optional["AskGraphlitAskGraphlitMessageToolCalls"]]] = (
|
|
40
40
|
Field(alias="toolCalls")
|
|
41
41
|
)
|
|
42
42
|
tokens: Optional[int]
|
|
@@ -88,13 +88,13 @@ class AskGraphlitAskGraphlitMessageCitationsContent(BaseModel):
|
|
|
88
88
|
snapshot_count: Optional[int] = Field(alias="snapshotCount")
|
|
89
89
|
summary: Optional[str]
|
|
90
90
|
custom_summary: Optional[str] = Field(alias="customSummary")
|
|
91
|
-
keywords: Optional[
|
|
92
|
-
bullets: Optional[
|
|
93
|
-
headlines: Optional[
|
|
94
|
-
posts: Optional[
|
|
95
|
-
chapters: Optional[
|
|
96
|
-
questions: Optional[
|
|
97
|
-
quotes: Optional[
|
|
91
|
+
keywords: Optional[list[str]]
|
|
92
|
+
bullets: Optional[list[str]]
|
|
93
|
+
headlines: Optional[list[str]]
|
|
94
|
+
posts: Optional[list[str]]
|
|
95
|
+
chapters: Optional[list[str]]
|
|
96
|
+
questions: Optional[list[str]]
|
|
97
|
+
quotes: Optional[list[str]]
|
|
98
98
|
video: Optional["AskGraphlitAskGraphlitMessageCitationsContentVideo"]
|
|
99
99
|
audio: Optional["AskGraphlitAskGraphlitMessageCitationsContentAudio"]
|
|
100
100
|
image: Optional["AskGraphlitAskGraphlitMessageCitationsContentImage"]
|
|
@@ -110,12 +110,12 @@ class AskGraphlitAskGraphlitMessageCitationsContentVideo(BaseModel):
|
|
|
110
110
|
software: Optional[str]
|
|
111
111
|
title: Optional[str]
|
|
112
112
|
description: Optional[str]
|
|
113
|
-
keywords: Optional[
|
|
113
|
+
keywords: Optional[list[Optional[str]]]
|
|
114
114
|
author: Optional[str]
|
|
115
115
|
|
|
116
116
|
|
|
117
117
|
class AskGraphlitAskGraphlitMessageCitationsContentAudio(BaseModel):
|
|
118
|
-
keywords: Optional[
|
|
118
|
+
keywords: Optional[list[Optional[str]]]
|
|
119
119
|
author: Optional[str]
|
|
120
120
|
series: Optional[str]
|
|
121
121
|
episode: Optional[str]
|
|
@@ -163,7 +163,7 @@ class AskGraphlitAskGraphlitMessageCitationsContentDocument(BaseModel):
|
|
|
163
163
|
last_modified_by: Optional[str] = Field(alias="lastModifiedBy")
|
|
164
164
|
publisher: Optional[str]
|
|
165
165
|
description: Optional[str]
|
|
166
|
-
keywords: Optional[
|
|
166
|
+
keywords: Optional[list[Optional[str]]]
|
|
167
167
|
page_count: Optional[int] = Field(alias="pageCount")
|
|
168
168
|
worksheet_count: Optional[int] = Field(alias="worksheetCount")
|
|
169
169
|
slide_count: Optional[int] = Field(alias="slideCount")
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
import enum
|
|
4
4
|
import json
|
|
5
|
-
from
|
|
5
|
+
from collections.abc import AsyncIterator
|
|
6
|
+
from typing import IO, Any, Optional, TypeVar, cast
|
|
6
7
|
from uuid import uuid4
|
|
7
8
|
|
|
8
9
|
import httpx
|
|
@@ -21,7 +22,7 @@ try:
|
|
|
21
22
|
from websockets import ( # type: ignore[import-not-found,unused-ignore]
|
|
22
23
|
ClientConnection,
|
|
23
24
|
)
|
|
24
|
-
from websockets import (
|
|
25
|
+
from websockets import ( # type: ignore[import-not-found,unused-ignore]
|
|
25
26
|
connect as ws_connect,
|
|
26
27
|
)
|
|
27
28
|
from websockets.typing import ( # type: ignore[import-not-found,unused-ignore]
|
|
@@ -65,12 +66,12 @@ class AsyncBaseClient:
|
|
|
65
66
|
def __init__(
|
|
66
67
|
self,
|
|
67
68
|
url: str = "",
|
|
68
|
-
headers: Optional[
|
|
69
|
+
headers: Optional[dict[str, str]] = None,
|
|
69
70
|
http_client: Optional[httpx.AsyncClient] = None,
|
|
70
71
|
ws_url: str = "",
|
|
71
|
-
ws_headers: Optional[
|
|
72
|
+
ws_headers: Optional[dict[str, Any]] = None,
|
|
72
73
|
ws_origin: Optional[str] = None,
|
|
73
|
-
ws_connection_init_payload: Optional[
|
|
74
|
+
ws_connection_init_payload: Optional[dict[str, Any]] = None,
|
|
74
75
|
) -> None:
|
|
75
76
|
self.url = url
|
|
76
77
|
self.headers = headers
|
|
@@ -98,7 +99,7 @@ class AsyncBaseClient:
|
|
|
98
99
|
self,
|
|
99
100
|
query: str,
|
|
100
101
|
operation_name: Optional[str] = None,
|
|
101
|
-
variables: Optional[
|
|
102
|
+
variables: Optional[dict[str, Any]] = None,
|
|
102
103
|
**kwargs: Any,
|
|
103
104
|
) -> httpx.Response:
|
|
104
105
|
processed_variables, files, files_map = self._process_variables(variables)
|
|
@@ -120,7 +121,7 @@ class AsyncBaseClient:
|
|
|
120
121
|
**kwargs,
|
|
121
122
|
)
|
|
122
123
|
|
|
123
|
-
def get_data(self, response: httpx.Response) ->
|
|
124
|
+
def get_data(self, response: httpx.Response) -> dict[str, Any]:
|
|
124
125
|
if not response.is_success:
|
|
125
126
|
raise GraphQLClientHttpError(
|
|
126
127
|
status_code=response.status_code, response=response
|
|
@@ -144,19 +145,19 @@ class AsyncBaseClient:
|
|
|
144
145
|
errors_dicts=errors, data=data
|
|
145
146
|
)
|
|
146
147
|
|
|
147
|
-
return cast(
|
|
148
|
+
return cast(dict[str, Any], data)
|
|
148
149
|
|
|
149
150
|
async def execute_ws(
|
|
150
151
|
self,
|
|
151
152
|
query: str,
|
|
152
153
|
operation_name: Optional[str] = None,
|
|
153
|
-
variables: Optional[
|
|
154
|
+
variables: Optional[dict[str, Any]] = None,
|
|
154
155
|
**kwargs: Any,
|
|
155
|
-
) -> AsyncIterator[
|
|
156
|
+
) -> AsyncIterator[dict[str, Any]]:
|
|
156
157
|
headers = self.ws_headers.copy()
|
|
157
158
|
headers.update(kwargs.get("extra_headers", {}))
|
|
158
159
|
|
|
159
|
-
merged_kwargs:
|
|
160
|
+
merged_kwargs: dict[str, Any] = {"origin": self.ws_origin}
|
|
160
161
|
merged_kwargs.update(kwargs)
|
|
161
162
|
merged_kwargs["extra_headers"] = headers
|
|
162
163
|
|
|
@@ -187,9 +188,9 @@ class AsyncBaseClient:
|
|
|
187
188
|
yield data
|
|
188
189
|
|
|
189
190
|
def _process_variables(
|
|
190
|
-
self, variables: Optional[
|
|
191
|
-
) ->
|
|
192
|
-
|
|
191
|
+
self, variables: Optional[dict[str, Any]]
|
|
192
|
+
) -> tuple[
|
|
193
|
+
dict[str, Any], dict[str, tuple[str, IO[bytes], str]], dict[str, list[str]]
|
|
193
194
|
]:
|
|
194
195
|
if not variables:
|
|
195
196
|
return {}, {}, {}
|
|
@@ -198,8 +199,8 @@ class AsyncBaseClient:
|
|
|
198
199
|
return self._get_files_from_variables(serializable_variables)
|
|
199
200
|
|
|
200
201
|
def _convert_dict_to_json_serializable(
|
|
201
|
-
self, dict_:
|
|
202
|
-
) ->
|
|
202
|
+
self, dict_: dict[str, Any]
|
|
203
|
+
) -> dict[str, Any]:
|
|
203
204
|
return {
|
|
204
205
|
key: self._convert_value(value)
|
|
205
206
|
for key, value in dict_.items()
|
|
@@ -214,12 +215,12 @@ class AsyncBaseClient:
|
|
|
214
215
|
return value
|
|
215
216
|
|
|
216
217
|
def _get_files_from_variables(
|
|
217
|
-
self, variables:
|
|
218
|
-
) ->
|
|
219
|
-
|
|
218
|
+
self, variables: dict[str, Any]
|
|
219
|
+
) -> tuple[
|
|
220
|
+
dict[str, Any], dict[str, tuple[str, IO[bytes], str]], dict[str, list[str]]
|
|
220
221
|
]:
|
|
221
|
-
files_map:
|
|
222
|
-
files_list:
|
|
222
|
+
files_map: dict[str, list[str]] = {}
|
|
223
|
+
files_list: list[Upload] = []
|
|
223
224
|
|
|
224
225
|
def separate_files(path: str, obj: Any) -> Any:
|
|
225
226
|
if isinstance(obj, list):
|
|
@@ -249,7 +250,7 @@ class AsyncBaseClient:
|
|
|
249
250
|
return obj
|
|
250
251
|
|
|
251
252
|
nulled_variables = separate_files("variables", variables)
|
|
252
|
-
files:
|
|
253
|
+
files: dict[str, tuple[str, IO[bytes], str]] = {
|
|
253
254
|
str(i): (file_.filename, cast(IO[bytes], file_.content), file_.content_type)
|
|
254
255
|
for i, file_ in enumerate(files_list)
|
|
255
256
|
}
|
|
@@ -259,9 +260,9 @@ class AsyncBaseClient:
|
|
|
259
260
|
self,
|
|
260
261
|
query: str,
|
|
261
262
|
operation_name: Optional[str],
|
|
262
|
-
variables:
|
|
263
|
-
files:
|
|
264
|
-
files_map:
|
|
263
|
+
variables: dict[str, Any],
|
|
264
|
+
files: dict[str, tuple[str, IO[bytes], str]],
|
|
265
|
+
files_map: dict[str, list[str]],
|
|
265
266
|
**kwargs: Any,
|
|
266
267
|
) -> httpx.Response:
|
|
267
268
|
data = {
|
|
@@ -284,13 +285,13 @@ class AsyncBaseClient:
|
|
|
284
285
|
self,
|
|
285
286
|
query: str,
|
|
286
287
|
operation_name: Optional[str],
|
|
287
|
-
variables:
|
|
288
|
+
variables: dict[str, Any],
|
|
288
289
|
**kwargs: Any,
|
|
289
290
|
) -> httpx.Response:
|
|
290
|
-
headers:
|
|
291
|
+
headers: dict[str, str] = {"Content-type": "application/json"}
|
|
291
292
|
headers.update(kwargs.get("headers", {}))
|
|
292
293
|
|
|
293
|
-
merged_kwargs:
|
|
294
|
+
merged_kwargs: dict[str, Any] = kwargs.copy()
|
|
294
295
|
merged_kwargs["headers"] = headers
|
|
295
296
|
|
|
296
297
|
return await self.http_client.post(
|
|
@@ -307,7 +308,7 @@ class AsyncBaseClient:
|
|
|
307
308
|
)
|
|
308
309
|
|
|
309
310
|
async def _send_connection_init(self, websocket: ClientConnection) -> None:
|
|
310
|
-
payload:
|
|
311
|
+
payload: dict[str, Any] = {
|
|
311
312
|
"type": GraphQLTransportWSMessageType.CONNECTION_INIT.value
|
|
312
313
|
}
|
|
313
314
|
if self.ws_connection_init_payload:
|
|
@@ -320,9 +321,9 @@ class AsyncBaseClient:
|
|
|
320
321
|
operation_id: str,
|
|
321
322
|
query: str,
|
|
322
323
|
operation_name: Optional[str] = None,
|
|
323
|
-
variables: Optional[
|
|
324
|
+
variables: Optional[dict[str, Any]] = None,
|
|
324
325
|
) -> None:
|
|
325
|
-
payload:
|
|
326
|
+
payload: dict[str, Any] = {
|
|
326
327
|
"id": operation_id,
|
|
327
328
|
"type": GraphQLTransportWSMessageType.SUBSCRIBE.value,
|
|
328
329
|
"payload": {"query": query, "operationName": operation_name},
|
|
@@ -338,7 +339,7 @@ class AsyncBaseClient:
|
|
|
338
339
|
message: Data,
|
|
339
340
|
websocket: ClientConnection,
|
|
340
341
|
expected_type: Optional[GraphQLTransportWSMessageType] = None,
|
|
341
|
-
) -> Optional[
|
|
342
|
+
) -> Optional[dict[str, Any]]:
|
|
342
343
|
try:
|
|
343
344
|
message_dict = json.loads(message)
|
|
344
345
|
except json.JSONDecodeError as exc:
|
|
@@ -358,7 +359,7 @@ class AsyncBaseClient:
|
|
|
358
359
|
if type_ == GraphQLTransportWSMessageType.NEXT:
|
|
359
360
|
if "data" not in payload:
|
|
360
361
|
raise GraphQLClientInvalidMessageFormat(message=message)
|
|
361
|
-
return cast(
|
|
362
|
+
return cast(dict[str, Any], payload["data"])
|
|
362
363
|
|
|
363
364
|
if type_ == GraphQLTransportWSMessageType.COMPLETE:
|
|
364
365
|
await websocket.close()
|