-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #545 from canyongbs/feature/advapp-327-api-develop…
…ment-authorization-core-modules [ADVAPP-327]: API Development for Authorization and Core Modules
- Loading branch information
Showing
55 changed files
with
1,805 additions
and
136 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,3 +39,4 @@ public/api-docs/* | |
frankenphp | ||
frankenphp-worker.php | ||
/rr | ||
_temp_graphql_parse_ide_helper_models.php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
110 changes: 110 additions & 0 deletions
110
app-modules/assistant/graphql/assistant-chat-folder.graphql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
type AssistantChatFolder | ||
@model(class: "AdvisingApp\\Assistant\\Models\\AssistantChatFolder") { | ||
id: UUID! | ||
|
||
name: String! | ||
|
||
created_at: DateTime | ||
|
||
updated_at: DateTime | ||
|
||
user: User! @belongsTo | ||
|
||
chats: [AssistantChat!] @hasMany | ||
|
||
chats_count: Int! @count(relation: "chats") | ||
} | ||
|
||
input AssistantChatFoldersQuery { | ||
id: UUID | ||
|
||
name: String | ||
|
||
created_at: DateTime | ||
|
||
updated_at: DateTime | ||
|
||
user: UsersQuery | ||
|
||
chats: AssistantChatsQuery | ||
} | ||
|
||
type AssistantChatFolderQueries { | ||
"Get a specific assistant chat folder by ID." | ||
find( | ||
id: UUID! | ||
@whereKey | ||
@rules(apply: ["required", "uuid", "exists:assistant_chat_folders"]) | ||
): AssistantChatFolder @find | ||
|
||
"List multiple assistant chat folders." | ||
list( | ||
"Filter by the assistant chat folders attributes and relations." | ||
where: AssistantChatFoldersQuery @searchBy | ||
order: AssistantChatFoldersQuery @sortBy | ||
): [AssistantChatFolder!]! @paginate | ||
} | ||
|
||
extend type Query { | ||
assistantChatFolder: AssistantChatFolderQueries! @namespaced | ||
} | ||
|
||
input CreateAssistantChatFolderInput { | ||
"The name of the assistant chat folder." | ||
name: String! | ||
@rules( | ||
apply: [ | ||
"required" | ||
"string" | ||
"max:255" | ||
"AdvisingApp\\Assistant\\Rules\\UniqueAssistantChatFolderRule" | ||
] | ||
) | ||
|
||
"The ID of the user that the assistant chat folder belongs to." | ||
user_id: UUID! @rules(apply: ["required", "uuid", "exists:users,id"]) | ||
} | ||
|
||
input UpdateAssistantChatFolderInput { | ||
"The name of the assistant chat folder." | ||
name: String | ||
@rules( | ||
apply: [ | ||
"nullable" | ||
"string" | ||
"max:255" | ||
"AdvisingApp\\Assistant\\Rules\\UniqueAssistantChatFolderRule" | ||
] | ||
) | ||
} | ||
|
||
type AssistantChatFolderMutations { | ||
"Create a new assistant chat folder." | ||
create( | ||
"The attributes to create the assistant chat folder with." | ||
input: CreateAssistantChatFolderInput! @spread | ||
): AssistantChatFolder @create | ||
|
||
"Update an existing assistant chat folder." | ||
update( | ||
"The ID of the assistant chat folder to update." | ||
id: UUID! | ||
@whereKey | ||
@rules(apply: ["required", "uuid", "exists:assistant_chat_folders"]) | ||
|
||
"The attributes to update the assistant chat folder with." | ||
input: UpdateAssistantChatFolderInput! @spread | ||
): AssistantChatFolder @update | ||
|
||
"Delete an existing assistant chat folder." | ||
delete( | ||
"The ID of the assistant chat folder to delete." | ||
id: UUID! | ||
@whereKey | ||
@rules(apply: ["required", "uuid", "exists:assistant_chat_folders"]) | ||
): AssistantChatFolder @delete | ||
} | ||
|
||
extend type Mutation { | ||
assistantChatFolder: AssistantChatFolderMutations! @namespaced | ||
} |
62 changes: 62 additions & 0 deletions
62
app-modules/assistant/graphql/assistant-chat-message-log.graphql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
type AssistantChatMessageLog | ||
@model(class: "AdvisingApp\\Assistant\\Models\\AssistantChatMessageLog") { | ||
id: UUID! | ||
|
||
message: String! | ||
|
||
metadata: JSON! | ||
|
||
request: JSON! | ||
|
||
sent_at: DateTime! | ||
|
||
created_at: DateTime | ||
|
||
updated_at: DateTime | ||
|
||
user: User! @belongsTo | ||
} | ||
|
||
input AssistantChatMessageLogsQuery { | ||
id: UUID | ||
|
||
message: String | ||
|
||
metadata: JSON | ||
|
||
request: JSON | ||
|
||
sent_at: DateTime | ||
|
||
created_at: DateTime | ||
|
||
updated_at: DateTime | ||
|
||
user: UsersQuery | ||
} | ||
|
||
type AssistantChatMessageLogQueries { | ||
"Get a specific assistant chat message log by ID." | ||
find( | ||
id: UUID! | ||
@whereKey | ||
@rules( | ||
apply: [ | ||
"required" | ||
"uuid" | ||
"exists:assistant_chat_message_logs" | ||
] | ||
) | ||
): AssistantChatMessageLog @find @canResolved(ability: "view") | ||
|
||
"List multiple assistant chat message logs." | ||
list( | ||
"Filter by the assistant chat message logs attributes and relations." | ||
where: AssistantChatMessageLogsQuery @searchBy | ||
order: AssistantChatMessageLogsQuery @sortBy | ||
): [AssistantChatMessageLog!]! @paginate @canModel(ability: "viewAny") | ||
} | ||
|
||
extend type Query { | ||
assistantChatMessageLog: AssistantChatMessageLogQueries! @namespaced | ||
} |
50 changes: 50 additions & 0 deletions
50
app-modules/assistant/graphql/assistant-chat-message.graphql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
type AssistantChatMessage | ||
@model(class: "AdvisingApp\\Assistant\\Models\\AssistantChatMessage") { | ||
id: UUID! | ||
|
||
message: String! | ||
|
||
from: AIChatMessageFrom! | ||
|
||
created_at: DateTime | ||
|
||
updated_at: DateTime | ||
|
||
chat: AssistantChat! @belongsTo | ||
} | ||
|
||
input AssistantChatMessagesQuery { | ||
id: UUID | ||
|
||
message: String | ||
|
||
from: AIChatMessageFrom | ||
|
||
created_at: DateTime | ||
|
||
updated_at: DateTime | ||
|
||
chat: AssistantChatsQuery | ||
} | ||
|
||
type AssistantChatMessageQueries { | ||
"Get a specific assistant chat message by ID." | ||
find( | ||
id: UUID! | ||
@whereKey | ||
@rules( | ||
apply: ["required", "uuid", "exists:assistant_chat_messages"] | ||
) | ||
): AssistantChatMessage @find @canResolved(ability: "view") | ||
|
||
"List multiple assistant chat messages." | ||
list( | ||
"Filter by the assistant chat messages attributes and relations." | ||
where: AssistantChatMessagesQuery @searchBy | ||
order: AssistantChatMessagesQuery @sortBy | ||
): [AssistantChatMessage!]! @paginate @canModel(ability: "viewAny") | ||
} | ||
|
||
extend type Query { | ||
assistantChatMessage: AssistantChatMessageQueries! @namespaced | ||
} |
Oops, something went wrong.