11interface DynamoDbBase {
2- PK : ID !
3- SK : ID !
4- ExpiresAfter : AWSTimestamp
2+ PK : ID !
3+ SK : ID !
4+ ExpiresAfter : AWSTimestamp
55}
66
77type Document implements DynamoDbBase @aws_cognito_user_pools @aws_iam {
@@ -30,7 +30,7 @@ type Document implements DynamoDbBase @aws_cognito_user_pools @aws_iam {
3030
3131type Section @aws_cognito_user_pools @aws_iam {
3232 Id : String
33- PageIds : [ Int ]
33+ PageIds : [Int ]
3434 Class : String
3535 OutputJSONUri : String
3636 ConfidenceThresholdAlerts : [ConfidenceThresholdAlert ]
@@ -51,18 +51,18 @@ type Page @aws_cognito_user_pools @aws_iam {
5151}
5252
5353type DocumentList @aws_cognito_user_pools @aws_iam {
54- Documents : [DocumentListItem ]
55- nextToken : String
54+ Documents : [DocumentListItem ]
55+ nextToken : String
5656}
5757
5858type DocumentListItem implements DynamoDbBase @aws_cognito_user_pools @aws_iam {
59- PK : ID !
60- SK : ID !
61- ObjectKey : ID
62- InitialEventTime : AWSDateTime
63- ExpiresAfter : AWSTimestamp
64- HITLStatus : String
65- HITLReviewURL : String
59+ PK : ID !
60+ SK : ID !
61+ ObjectKey : ID
62+ InitialEventTime : AWSDateTime
63+ ExpiresAfter : AWSTimestamp
64+ HITLStatus : String
65+ HITLReviewURL : String
6666}
6767
6868type ValidationError @aws_cognito_user_pools @aws_iam {
@@ -104,7 +104,6 @@ type DiscoveryJobListItem @aws_cognito_user_pools @aws_iam {
104104 createdAt : String
105105 updatedAt : String
106106 errorMessage : String
107-
108107}
109108
110109input CreateDocumentInput {
@@ -155,7 +154,7 @@ input UpdateDocumentInput {
155154
156155input SectionInput {
157156 Id : String
158- PageIds : [ Int ]
157+ PageIds : [Int ]
159158 Class : String
160159 OutputJSONUri : String
161160 ConfidenceThresholdAlerts : [ConfidenceThresholdAlertInput ]
@@ -225,7 +224,7 @@ type StepFunctionExecutionResponse @aws_cognito_user_pools @aws_iam {
225224 steps : [StepFunctionExecutionStep ]
226225}
227226
228- type DiscoveryJob @aws_cognito_user_pools @aws_iam {
227+ type DiscoveryJob @aws_cognito_user_pools @aws_iam {
229228 jobId : ID !
230229 status : String !
231230 errorMessage : String
@@ -240,14 +239,14 @@ type Agent @aws_cognito_user_pools @aws_iam {
240239
241240type AgentJob @aws_cognito_user_pools @aws_iam {
242241 jobId : ID !
243- status : String ! # "PENDING", "PROCESSING", "COMPLETED", "FAILED"
242+ status : String ! # "PENDING", "PROCESSING", "COMPLETED", "FAILED"
244243 query : String !
245- agentIds : String # JSON string containing list of agent IDs used
244+ agentIds : String # JSON string containing list of agent IDs used
246245 createdAt : AWSDateTime !
247246 completedAt : AWSDateTime
248247 result : String
249248 error : String
250- agent_messages : String # JSON string containing agent conversation messages
249+ agent_messages : String # JSON string containing agent conversation messages
251250}
252251
253252type AgentJobConnection @aws_cognito_user_pools @aws_iam {
@@ -263,6 +262,20 @@ type AgentChatMessage @aws_cognito_user_pools @aws_iam {
263262 sessionId : String
264263}
265264
265+ type ChatSession @aws_cognito_user_pools @aws_iam {
266+ sessionId : ID !
267+ title : String !
268+ createdAt : AWSDateTime !
269+ updatedAt : AWSDateTime !
270+ messageCount : Int !
271+ lastMessage : String
272+ }
273+
274+ type ChatSessionConnection @aws_cognito_user_pools @aws_iam {
275+ items : [ChatSession ]
276+ nextToken : String
277+ }
278+
266279type MessageContent {
267280 text : String
268281}
@@ -271,42 +284,95 @@ type Mutation {
271284 createDocument (input : CreateDocumentInput ! ): CreateDocumentOutput @aws_iam
272285 updateDocument (input : UpdateDocumentInput ! ): Document @aws_iam
273286 deleteDocument (objectKeys : [String ! ]! ): Boolean ! @aws_cognito_user_pools
274- updateConfiguration (customConfig : AWSJSON ! ): UpdateConfigurationResponse @aws_cognito_user_pools
275- uploadDocument (fileName : String ! , contentType : String , prefix : String , bucket : String ): PresignedUrlResponse ! @aws_cognito_user_pools
276- uploadDiscoveryDocument (fileName : String ! , contentType : String , prefix : String , bucket : String , groundTruthFileName : String ): DisPresignedUrlResponse ! @aws_cognito_user_pools
277- copyToBaseline (objectKey : String ! ): CopyToBaselineResponse ! @aws_cognito_user_pools
287+ updateConfiguration (customConfig : AWSJSON ! ): UpdateConfigurationResponse
288+ @aws_cognito_user_pools
289+ uploadDocument (
290+ fileName : String !
291+ contentType : String
292+ prefix : String
293+ bucket : String
294+ ): PresignedUrlResponse ! @aws_cognito_user_pools
295+ uploadDiscoveryDocument (
296+ fileName : String !
297+ contentType : String
298+ prefix : String
299+ bucket : String
300+ groundTruthFileName : String
301+ ): DisPresignedUrlResponse ! @aws_cognito_user_pools
302+ copyToBaseline (objectKey : String ! ): CopyToBaselineResponse !
303+ @aws_cognito_user_pools
278304 reprocessDocument (objectKeys : [String ! ]! ): Boolean ! @aws_cognito_user_pools
279- processChanges (objectKey : String ! , modifiedSections : [ModifiedSectionInput ! ]! ): ProcessChangesResponse ! @aws_cognito_user_pools
280- updateAgentJobStatus (jobId : ID ! , status : String ! , userId : String ! , result : String ): Boolean @aws_iam
281- updateDiscoveryJobStatus (jobId : ID ! , status : String ! , errorMessage : String ): DiscoveryJob @aws_iam
305+ processChanges (
306+ objectKey : String !
307+ modifiedSections : [ModifiedSectionInput ! ]!
308+ ): ProcessChangesResponse ! @aws_cognito_user_pools
309+ updateAgentJobStatus (
310+ jobId : ID !
311+ status : String !
312+ userId : String !
313+ result : String
314+ ): Boolean @aws_iam
315+ updateDiscoveryJobStatus (
316+ jobId : ID !
317+ status : String !
318+ errorMessage : String
319+ ): DiscoveryJob @aws_iam
282320 deleteAgentJob (jobId : ID ! ): Boolean @aws_cognito_user_pools
283- sendAgentChatMessage (prompt : String ! , sessionId : String , method : String , enableCodeIntelligence : Boolean ): AgentChatMessage @aws_cognito_user_pools @aws_iam
284- updateAgentChatMessage (sessionId : ID ! , content : String ! ): AgentChatMessage @aws_cognito_user_pools @aws_iam
321+ sendAgentChatMessage (
322+ prompt : String !
323+ sessionId : String
324+ method : String
325+ enableCodeIntelligence : Boolean
326+ ): AgentChatMessage @aws_cognito_user_pools @aws_iam
327+ updateAgentChatMessage (sessionId : ID ! , content : String ! ): AgentChatMessage
328+ @aws_cognito_user_pools
329+ @aws_iam
330+ deleteChatSession (sessionId : ID ! ): Boolean @aws_cognito_user_pools @aws_iam
331+ updateChatSessionTitle (sessionId : ID ! , title : String ! ): ChatSession
332+ @aws_cognito_user_pools
333+ @aws_iam
285334}
286335
287336type Query @aws_cognito_user_pools @aws_iam {
288337 getDocument (ObjectKey : ID ! ): Document
289- listDocuments (startDateTime : AWSDateTime , endDateTime : AWSDateTime ): DocumentList
338+ listDocuments (
339+ startDateTime : AWSDateTime
340+ endDateTime : AWSDateTime
341+ ): DocumentList
290342 listDocumentsDateHour (date : AWSDate , hour : Int ): DocumentList
291- listDocumentsDateShard (date : AWSDate , shard : Int ): DocumentList
343+ listDocumentsDateShard (date : AWSDate , shard : Int ): DocumentList
292344 getFileContents (s3Uri : String ! ): FileContentsResponse
293345 getConfiguration : ConfigurationResponse
294346 listDiscoveryJobs : DiscoveryJobList
295347 queryKnowledgeBase (input : String ! , sessionId : String ): String
296- chatWithDocument (s3Uri : String ! , prompt : String ! , history : AWSJSON ! , modelId : String ! ): String
348+ chatWithDocument (
349+ s3Uri : String !
350+ prompt : String !
351+ history : AWSJSON !
352+ modelId : String !
353+ ): String
297354 getStepFunctionExecution (executionArn : String ! ): StepFunctionExecutionResponse
298355 listAvailableAgents : [Agent ] @aws_cognito_user_pools @aws_iam
299- submitAgentQuery (query : String ! , agentIds : [String ! ]! ): AgentJob @aws_cognito_user_pools
356+ submitAgentQuery (query : String ! , agentIds : [String ! ]! ): AgentJob
357+ @aws_cognito_user_pools
300358 getAgentJobStatus (jobId : ID ! ): AgentJob @aws_cognito_user_pools
301- listAgentJobs (limit : Int , nextToken : String ): AgentJobConnection @aws_cognito_user_pools
302- getAgentChatMessages (sessionId : ID ! ): [AgentChatMessage ] @aws_cognito_user_pools @aws_iam
359+ listAgentJobs (limit : Int , nextToken : String ): AgentJobConnection
360+ @aws_cognito_user_pools
361+ getAgentChatMessages (sessionId : ID ! ): [AgentChatMessage ]
362+ @aws_cognito_user_pools
363+ @aws_iam
364+ listChatSessions (limit : Int , nextToken : String ): ChatSessionConnection
365+ @aws_cognito_user_pools
366+ @aws_iam
367+ getChatMessages (sessionId : ID ! ): [AgentChatMessage ]
368+ @aws_cognito_user_pools
369+ @aws_iam
303370}
304371
305372type Subscription @aws_cognito_user_pools @aws_iam {
306373 onCreateDocument : CreateDocumentOutput
307- @aws_subscribe (mutations : ["createDocument" ])
308- onUpdateDocument : Document
309- @aws_subscribe (mutations : ["updateDocument" ])
374+ @aws_subscribe (mutations : ["createDocument" ])
375+ onUpdateDocument : Document @aws_subscribe (mutations : ["updateDocument" ])
310376 onAgentJobComplete (jobId : ID ! ): Boolean
311377 @aws_subscribe (mutations : ["updateAgentJobStatus" ])
312378 onDiscoveryJobStatusChange (jobId : ID ! ): DiscoveryJob
0 commit comments