Skip to content

Commit e5ee4e5

Browse files
committed
Updated to latest API release.
1 parent 455af6d commit e5ee4e5

File tree

12 files changed

+147
-0
lines changed

12 files changed

+147
-0
lines changed

documents/agent/GetAgent.graphql

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ query GetAgent($id: ID!, $correlationId: String) {
3232
instructions
3333
label
3434
}
35+
connectors {
36+
id
37+
}
3538
timeout
3639
prompt
3740
scratchpad

documents/agent/QueryAgents.graphql

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ query QueryAgents($filter: AgentFilter, $correlationId: String) {
3434
instructions
3535
label
3636
}
37+
connectors {
38+
id
39+
}
3740
timeout
3841
prompt
3942
scratchpad
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
mutation AddContentLabel($id: ID!, $label: String!) {
2+
addContentLabel(id: $id, label: $label) {
3+
id
4+
name
5+
}
6+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
mutation RemoveContentLabel($id: ID!, $label: String!) {
2+
removeContentLabel(id: $id, label: $label) {
3+
id
4+
name
5+
}
6+
}

graphlit_api/__init__.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Generated by ariadne-codegen
22

3+
from .add_content_label import AddContentLabel, AddContentLabelAddContentLabel
34
from .add_contents_to_collections import (
45
AddContentsToCollections,
56
AddContentsToCollectionsAddContentsToCollections,
@@ -971,6 +972,7 @@
971972
GetAgent,
972973
GetAgentAgent,
973974
GetAgentAgentChannels,
975+
GetAgentAgentConnectors,
974976
GetAgentAgentFilter,
975977
GetAgentAgentFilterFeeds,
976978
GetAgentAgentOwner,
@@ -2492,6 +2494,7 @@
24922494
MatchEntityMatchEntityReferenceObservable,
24932495
)
24942496
from .operations import (
2497+
ADD_CONTENT_LABEL_GQL,
24952498
ADD_CONTENTS_TO_COLLECTIONS_GQL,
24962499
ADD_CONVERSATIONS_TO_COLLECTIONS_GQL,
24972500
ADD_SKILLS_TO_COLLECTIONS_GQL,
@@ -2879,6 +2882,7 @@
28792882
QUERY_VIEWS_GQL,
28802883
QUERY_WORKFLOWS_GQL,
28812884
REJECT_CONTENT_GQL,
2885+
REMOVE_CONTENT_LABEL_GQL,
28822886
REMOVE_CONTENTS_FROM_COLLECTION_GQL,
28832887
REMOVE_CONVERSATIONS_FROM_COLLECTION_GQL,
28842888
REMOVE_SKILLS_FROM_COLLECTION_GQL,
@@ -3061,6 +3065,7 @@
30613065
QueryAgentsAgents,
30623066
QueryAgentsAgentsResults,
30633067
QueryAgentsAgentsResultsChannels,
3068+
QueryAgentsAgentsResultsConnectors,
30643069
QueryAgentsAgentsResultsFilter,
30653070
QueryAgentsAgentsResultsFilterFeeds,
30663071
QueryAgentsAgentsResultsOwner,
@@ -4547,6 +4552,10 @@
45474552
QueryWorkflowsWorkflowsResultsStoragePolicy,
45484553
)
45494554
from .reject_content import RejectContent, RejectContentRejectContent
4555+
from .remove_content_label import (
4556+
RemoveContentLabel,
4557+
RemoveContentLabelRemoveContentLabel,
4558+
)
45504559
from .remove_contents_from_collection import (
45514560
RemoveContentsFromCollection,
45524561
RemoveContentsFromCollectionRemoveContentsFromCollection,
@@ -5075,10 +5084,13 @@
50755084

50765085
__all__ = [
50775086
"ADD_CONTENTS_TO_COLLECTIONS_GQL",
5087+
"ADD_CONTENT_LABEL_GQL",
50785088
"ADD_CONVERSATIONS_TO_COLLECTIONS_GQL",
50795089
"ADD_SKILLS_TO_COLLECTIONS_GQL",
50805090
"APPROVE_CONTENT_GQL",
50815091
"ASK_GRAPHLIT_GQL",
5092+
"AddContentLabel",
5093+
"AddContentLabelAddContentLabel",
50825094
"AddContentsToCollections",
50835095
"AddContentsToCollectionsAddContentsToCollections",
50845096
"AddContentsToCollectionsAddContentsToCollectionsContents",
@@ -6281,6 +6293,7 @@
62816293
"GetAgent",
62826294
"GetAgentAgent",
62836295
"GetAgentAgentChannels",
6296+
"GetAgentAgentConnectors",
62846297
"GetAgentAgentFilter",
62856298
"GetAgentAgentFilterFeeds",
62866299
"GetAgentAgentOwner",
@@ -7738,6 +7751,7 @@
77387751
"QueryAgentsAgents",
77397752
"QueryAgentsAgentsResults",
77407753
"QueryAgentsAgentsResultsChannels",
7754+
"QueryAgentsAgentsResultsConnectors",
77417755
"QueryAgentsAgentsResultsFilter",
77427756
"QueryAgentsAgentsResultsFilterFeeds",
77437757
"QueryAgentsAgentsResultsOwner",
@@ -9034,6 +9048,7 @@
90349048
"QuiverImagePublishingPropertiesInput",
90359049
"REJECT_CONTENT_GQL",
90369050
"REMOVE_CONTENTS_FROM_COLLECTION_GQL",
9051+
"REMOVE_CONTENT_LABEL_GQL",
90379052
"REMOVE_CONVERSATIONS_FROM_COLLECTION_GQL",
90389053
"REMOVE_SKILLS_FROM_COLLECTION_GQL",
90399054
"RESEARCH_CONTENTS_GQL",
@@ -9064,6 +9079,8 @@
90649079
"RejectContent",
90659080
"RejectContentRejectContent",
90669081
"RelationshipDirections",
9082+
"RemoveContentLabel",
9083+
"RemoveContentLabelRemoveContentLabel",
90679084
"RemoveContentsFromCollection",
90689085
"RemoveContentsFromCollectionRemoveContentsFromCollection",
90699086
"RemoveContentsFromCollectionRemoveContentsFromCollectionContents",

graphlit_api/add_content_label.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Generated by ariadne-codegen
2+
# Source: ./documents
3+
4+
from typing import Optional
5+
6+
from pydantic import Field
7+
8+
from .base_model import BaseModel
9+
10+
11+
class AddContentLabel(BaseModel):
12+
add_content_label: Optional["AddContentLabelAddContentLabel"] = Field(
13+
alias="addContentLabel"
14+
)
15+
16+
17+
class AddContentLabelAddContentLabel(BaseModel):
18+
id: str
19+
name: str
20+
21+
22+
AddContentLabel.model_rebuild()

graphlit_api/client.py

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
from typing import Any, Optional, Union
55

6+
from .add_content_label import AddContentLabel
67
from .add_contents_to_collections import AddContentsToCollections
78
from .add_conversations_to_collections import AddConversationsToCollections
89
from .add_skills_to_collections import AddSkillsToCollections
@@ -460,6 +461,7 @@
460461
from .map_web import MapWeb
461462
from .match_entity import MatchEntity
462463
from .operations import (
464+
ADD_CONTENT_LABEL_GQL,
463465
ADD_CONTENTS_TO_COLLECTIONS_GQL,
464466
ADD_CONVERSATIONS_TO_COLLECTIONS_GQL,
465467
ADD_SKILLS_TO_COLLECTIONS_GQL,
@@ -847,6 +849,7 @@
847849
QUERY_VIEWS_GQL,
848850
QUERY_WORKFLOWS_GQL,
849851
REJECT_CONTENT_GQL,
852+
REMOVE_CONTENT_LABEL_GQL,
850853
REMOVE_CONTENTS_FROM_COLLECTION_GQL,
851854
REMOVE_CONVERSATIONS_FROM_COLLECTION_GQL,
852855
REMOVE_SKILLS_FROM_COLLECTION_GQL,
@@ -1042,6 +1045,7 @@
10421045
from .query_views import QueryViews
10431046
from .query_workflows import QueryWorkflows
10441047
from .reject_content import RejectContent
1048+
from .remove_content_label import RemoveContentLabel
10451049
from .remove_contents_from_collection import RemoveContentsFromCollection
10461050
from .remove_conversations_from_collection import RemoveConversationsFromCollection
10471051
from .remove_skills_from_collection import RemoveSkillsFromCollection
@@ -1916,6 +1920,19 @@ async def update_connector(
19161920
data = self.get_data(response)
19171921
return UpdateConnector.model_validate(data)
19181922

1923+
async def add_content_label(
1924+
self, id: str, label: str, **kwargs: Any
1925+
) -> AddContentLabel:
1926+
variables: dict[str, object] = {"id": id, "label": label}
1927+
response = await self.execute(
1928+
query=ADD_CONTENT_LABEL_GQL,
1929+
operation_name="AddContentLabel",
1930+
variables=variables,
1931+
**kwargs
1932+
)
1933+
data = self.get_data(response)
1934+
return AddContentLabel.model_validate(data)
1935+
19191936
async def approve_content(self, id: str, **kwargs: Any) -> ApproveContent:
19201937
variables: dict[str, object] = {"id": id}
19211938
response = await self.execute(
@@ -2642,6 +2659,19 @@ async def reject_content(
26422659
data = self.get_data(response)
26432660
return RejectContent.model_validate(data)
26442661

2662+
async def remove_content_label(
2663+
self, id: str, label: str, **kwargs: Any
2664+
) -> RemoveContentLabel:
2665+
variables: dict[str, object] = {"id": id, "label": label}
2666+
response = await self.execute(
2667+
query=REMOVE_CONTENT_LABEL_GQL,
2668+
operation_name="RemoveContentLabel",
2669+
variables=variables,
2670+
**kwargs
2671+
)
2672+
data = self.get_data(response)
2673+
return RemoveContentLabel.model_validate(data)
2674+
26452675
async def research_contents(
26462676
self,
26472677
connector: ContentPublishingConnectorInput,

graphlit_api/get_agent.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ class GetAgentAgent(BaseModel):
3535
alias="schedulePolicy"
3636
)
3737
channels: Optional[list["GetAgentAgentChannels"]]
38+
connectors: Optional[list["GetAgentAgentConnectors"]]
3839
timeout: Optional[Any]
3940
prompt: Optional[str]
4041
scratchpad: Optional[str]
@@ -74,6 +75,10 @@ class GetAgentAgentChannels(BaseModel):
7475
label: Optional[str]
7576

7677

78+
class GetAgentAgentConnectors(BaseModel):
79+
id: str
80+
81+
7782
GetAgent.model_rebuild()
7883
GetAgentAgent.model_rebuild()
7984
GetAgentAgentFilter.model_rebuild()

graphlit_api/input_types.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2825,6 +2825,7 @@ class AgentInput(BaseModel):
28252825
prompt: Optional[str] = None
28262826
scratchpad: Optional[str] = None
28272827
channels: Optional[list["AgentChannelInput"]] = None
2828+
connectors: Optional[list["EntityReferenceInput"]] = None
28282829

28292830

28302831
class CrustdataPersonDiscoveryFilterInput(BaseModel):
@@ -7034,6 +7035,7 @@ class AgentUpdateInput(BaseModel):
70347035
prompt: Optional[str] = None
70357036
scratchpad: Optional[str] = None
70367037
channels: Optional[list["AgentChannelInput"]] = None
7038+
connectors: Optional[list["EntityReferenceInput"]] = None
70377039

70387040

70397041
class IssueFeedPropertiesInput(BaseModel):

graphlit_api/operations.py

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
__all__ = [
55
"ADD_CONTENTS_TO_COLLECTIONS_GQL",
6+
"ADD_CONTENT_LABEL_GQL",
67
"ADD_CONVERSATIONS_TO_COLLECTIONS_GQL",
78
"ADD_SKILLS_TO_COLLECTIONS_GQL",
89
"APPROVE_CONTENT_GQL",
@@ -390,6 +391,7 @@
390391
"QUERY_WORKFLOWS_GQL",
391392
"REJECT_CONTENT_GQL",
392393
"REMOVE_CONTENTS_FROM_COLLECTION_GQL",
394+
"REMOVE_CONTENT_LABEL_GQL",
393395
"REMOVE_CONVERSATIONS_FROM_COLLECTION_GQL",
394396
"REMOVE_SKILLS_FROM_COLLECTION_GQL",
395397
"RESEARCH_CONTENTS_GQL",
@@ -572,6 +574,9 @@
572574
instructions
573575
label
574576
}
577+
connectors {
578+
id
579+
}
575580
timeout
576581
prompt
577582
scratchpad
@@ -616,6 +621,9 @@
616621
instructions
617622
label
618623
}
624+
connectors {
625+
id
626+
}
619627
timeout
620628
prompt
621629
scratchpad
@@ -1618,6 +1626,15 @@
16181626
}
16191627
"""
16201628

1629+
ADD_CONTENT_LABEL_GQL = """
1630+
mutation AddContentLabel($id: ID!, $label: String!) {
1631+
addContentLabel(id: $id, label: $label) {
1632+
id
1633+
name
1634+
}
1635+
}
1636+
"""
1637+
16211638
APPROVE_CONTENT_GQL = """
16221639
mutation ApproveContent($id: ID!) {
16231640
approveContent(id: $id) {
@@ -4749,6 +4766,15 @@
47494766
}
47504767
"""
47514768

4769+
REMOVE_CONTENT_LABEL_GQL = """
4770+
mutation RemoveContentLabel($id: ID!, $label: String!) {
4771+
removeContentLabel(id: $id, label: $label) {
4772+
id
4773+
name
4774+
}
4775+
}
4776+
"""
4777+
47524778
RESEARCH_CONTENTS_GQL = """
47534779
mutation ResearchContents($connector: ContentPublishingConnectorInput!, $filter: ContentFilter, $name: String, $summarySpecification: EntityReferenceInput, $publishSpecification: EntityReferenceInput, $workflow: EntityReferenceInput, $correlationId: String) {
47544780
researchContents(

0 commit comments

Comments
 (0)