Skip to content

Commit dfe4ef5

Browse files
Update OpenAPI to version generated from ref 34b8aa2 (#1263)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 34b8aa2 commit dfe4ef5

File tree

1 file changed

+227
-10
lines changed

1 file changed

+227
-10
lines changed

Diff for: api/openapi.json

+227-10
Original file line numberDiff line numberDiff line change
@@ -834,6 +834,67 @@
834834
"type": "string",
835835
"title": "Workspace Name"
836836
}
837+
},
838+
{
839+
"name": "page",
840+
"in": "query",
841+
"required": false,
842+
"schema": {
843+
"type": "integer",
844+
"minimum": 1,
845+
"default": 1,
846+
"title": "Page"
847+
}
848+
},
849+
{
850+
"name": "page_size",
851+
"in": "query",
852+
"required": false,
853+
"schema": {
854+
"type": "integer",
855+
"maximum": 100,
856+
"minimum": 1,
857+
"default": 50,
858+
"title": "Page Size"
859+
}
860+
},
861+
{
862+
"name": "filter_by_ids",
863+
"in": "query",
864+
"required": false,
865+
"schema": {
866+
"anyOf": [
867+
{
868+
"type": "array",
869+
"items": {
870+
"type": "string"
871+
}
872+
},
873+
{
874+
"type": "null"
875+
}
876+
],
877+
"title": "Filter By Ids"
878+
}
879+
},
880+
{
881+
"name": "filter_by_alert_trigger_types",
882+
"in": "query",
883+
"required": false,
884+
"schema": {
885+
"anyOf": [
886+
{
887+
"type": "array",
888+
"items": {
889+
"$ref": "#/components/schemas/AlertTriggerType"
890+
}
891+
},
892+
{
893+
"type": "null"
894+
}
895+
],
896+
"title": "Filter By Alert Trigger Types"
897+
}
837898
}
838899
],
839900
"responses": {
@@ -842,11 +903,60 @@
842903
"content": {
843904
"application/json": {
844905
"schema": {
845-
"type": "array",
846-
"items": {
847-
"$ref": "#/components/schemas/Conversation"
848-
},
849-
"title": "Response V1 Get Workspace Messages"
906+
"$ref": "#/components/schemas/PaginatedMessagesResponse"
907+
}
908+
}
909+
}
910+
},
911+
"422": {
912+
"description": "Validation Error",
913+
"content": {
914+
"application/json": {
915+
"schema": {
916+
"$ref": "#/components/schemas/HTTPValidationError"
917+
}
918+
}
919+
}
920+
}
921+
}
922+
}
923+
},
924+
"/api/v1/workspaces/{workspace_name}/messages/{prompt_id}": {
925+
"get": {
926+
"tags": [
927+
"CodeGate API",
928+
"Workspaces"
929+
],
930+
"summary": "Get Messages By Prompt Id",
931+
"description": "Get messages for a workspace.",
932+
"operationId": "v1_get_messages_by_prompt_id",
933+
"parameters": [
934+
{
935+
"name": "workspace_name",
936+
"in": "path",
937+
"required": true,
938+
"schema": {
939+
"type": "string",
940+
"title": "Workspace Name"
941+
}
942+
},
943+
{
944+
"name": "prompt_id",
945+
"in": "path",
946+
"required": true,
947+
"schema": {
948+
"type": "string",
949+
"title": "Prompt Id"
950+
}
951+
}
952+
],
953+
"responses": {
954+
"200": {
955+
"description": "Successful Response",
956+
"content": {
957+
"application/json": {
958+
"schema": {
959+
"$ref": "#/components/schemas/Conversation"
850960
}
851961
}
852962
}
@@ -1660,17 +1770,31 @@
16601770
"secrets": {
16611771
"type": "integer",
16621772
"title": "Secrets"
1773+
},
1774+
"total_alerts": {
1775+
"type": "integer",
1776+
"title": "Total Alerts"
16631777
}
16641778
},
16651779
"type": "object",
16661780
"required": [
16671781
"malicious_packages",
16681782
"pii",
1669-
"secrets"
1783+
"secrets",
1784+
"total_alerts"
16701785
],
16711786
"title": "AlertSummary",
16721787
"description": "Represents a set of summary alerts"
16731788
},
1789+
"AlertTriggerType": {
1790+
"type": "string",
1791+
"enum": [
1792+
"codegate-pii",
1793+
"codegate-context-retriever",
1794+
"codegate-secrets"
1795+
],
1796+
"title": "AlertTriggerType"
1797+
},
16741798
"ChatMessage": {
16751799
"properties": {
16761800
"message": {
@@ -1820,10 +1944,17 @@
18201944
]
18211945
},
18221946
"alerts": {
1823-
"items": {
1824-
"$ref": "#/components/schemas/Alert"
1825-
},
1826-
"type": "array",
1947+
"anyOf": [
1948+
{
1949+
"items": {
1950+
"$ref": "#/components/schemas/Alert"
1951+
},
1952+
"type": "array"
1953+
},
1954+
{
1955+
"type": "null"
1956+
}
1957+
],
18271958
"title": "Alerts",
18281959
"default": []
18291960
}
@@ -1840,6 +1971,61 @@
18401971
"title": "Conversation",
18411972
"description": "Represents a conversation."
18421973
},
1974+
"ConversationSummary": {
1975+
"properties": {
1976+
"chat_id": {
1977+
"type": "string",
1978+
"title": "Chat Id"
1979+
},
1980+
"prompt": {
1981+
"$ref": "#/components/schemas/ChatMessage"
1982+
},
1983+
"alerts_summary": {
1984+
"$ref": "#/components/schemas/AlertSummary"
1985+
},
1986+
"token_usage_agg": {
1987+
"anyOf": [
1988+
{
1989+
"$ref": "#/components/schemas/TokenUsageAggregate"
1990+
},
1991+
{
1992+
"type": "null"
1993+
}
1994+
]
1995+
},
1996+
"provider": {
1997+
"anyOf": [
1998+
{
1999+
"type": "string"
2000+
},
2001+
{
2002+
"type": "null"
2003+
}
2004+
],
2005+
"title": "Provider"
2006+
},
2007+
"type": {
2008+
"$ref": "#/components/schemas/QuestionType"
2009+
},
2010+
"conversation_timestamp": {
2011+
"type": "string",
2012+
"format": "date-time",
2013+
"title": "Conversation Timestamp"
2014+
}
2015+
},
2016+
"type": "object",
2017+
"required": [
2018+
"chat_id",
2019+
"prompt",
2020+
"alerts_summary",
2021+
"token_usage_agg",
2022+
"provider",
2023+
"type",
2024+
"conversation_timestamp"
2025+
],
2026+
"title": "ConversationSummary",
2027+
"description": "Represents a conversation summary."
2028+
},
18432029
"CustomInstructions": {
18442030
"properties": {
18452031
"prompt": {
@@ -2024,6 +2210,37 @@
20242210
"title": "MuxRule",
20252211
"description": "Represents a mux rule for a provider."
20262212
},
2213+
"PaginatedMessagesResponse": {
2214+
"properties": {
2215+
"data": {
2216+
"items": {
2217+
"$ref": "#/components/schemas/ConversationSummary"
2218+
},
2219+
"type": "array",
2220+
"title": "Data"
2221+
},
2222+
"limit": {
2223+
"type": "integer",
2224+
"title": "Limit"
2225+
},
2226+
"offset": {
2227+
"type": "integer",
2228+
"title": "Offset"
2229+
},
2230+
"total": {
2231+
"type": "integer",
2232+
"title": "Total"
2233+
}
2234+
},
2235+
"type": "object",
2236+
"required": [
2237+
"data",
2238+
"limit",
2239+
"offset",
2240+
"total"
2241+
],
2242+
"title": "PaginatedMessagesResponse"
2243+
},
20272244
"Persona": {
20282245
"properties": {
20292246
"id": {

0 commit comments

Comments
 (0)