Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(app): support uid filter in convs and msg list api #461

Merged
merged 5 commits into from
Sep 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions app/app/v1alpha/conversation.proto
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,13 @@ message ListConversationsRequest {
int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL];
// page token
string page_token = 4 [(google.api.field_behavior) = OPTIONAL];
// conversation_uid this is optional, if provided, only the conversation with the given conversation_uid will be returned
// first check conversation_uid, then check conversation_id, then check if_all
string conversation_uid = 5 [(google.api.field_behavior) = OPTIONAL];
// conversation_id this is optional, if provided, only the conversation with the given conversation_id will be returned
string conversation_id = 5 [(google.api.field_behavior) = OPTIONAL];
string conversation_id = 6 [(google.api.field_behavior) = OPTIONAL];
// If true, all conversations will be returned. This has higher priority over conversation_id, page_size, and page_token.
bool if_all = 6 [(google.api.field_behavior) = OPTIONAL];
bool if_all = 7 [(google.api.field_behavior) = OPTIONAL];
}

// ListConversationsResponse returns a list of conversations
Expand Down Expand Up @@ -177,6 +180,8 @@ message ListMessagesRequest {
bool include_system_messages = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
// If true, all messages will be returned. This has higher priority over latest_k, page_size, and page_token.
bool if_all = 8 [(google.api.field_behavior) = OPTIONAL];
// message_uid this is optional, if provided, only the message with the given message_uid will be returned
string message_uid = 9 [(google.api.field_behavior) = OPTIONAL];
}

// ListMessagesResponse returns a list of messages
Expand Down
11 changes: 10 additions & 1 deletion artifact/artifact/v1alpha/artifact_public_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,16 @@ service ArtifactPublicService {
post: "/v1alpha/catalogs/files/processAsync"
body: "*"
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {tags: "Catalog"};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
tags: "Catalog"
parameters: {
headers: {
name: "Instill-Requester-Uid"
description: "Indicates the authenticated namespace is making the request on behalf of another entity, typically an organization they belong to"
type: STRING
}
}
};
}

// List catalog files
Expand Down
12 changes: 12 additions & 0 deletions openapiv2/app/service.swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,13 @@ paths:
in: query
required: false
type: string
- name: conversationUid
description: |-
conversation_uid this is optional, if provided, only the conversation with the given conversation_uid will be returned
first check conversation_uid, then check conversation_id, then check if_all
in: query
required: false
type: string
- name: conversationId
description: conversation_id this is optional, if provided, only the conversation with the given conversation_id will be returned
in: query
Expand Down Expand Up @@ -350,6 +357,11 @@ paths:
in: query
required: false
type: boolean
- name: messageUid
description: message_uid this is optional, if provided, only the message with the given message_uid will be returned
in: query
required: false
type: string
tags:
- App
post:
Expand Down
5 changes: 5 additions & 0 deletions openapiv2/artifact/service.swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,11 @@ paths:
required: true
schema:
$ref: '#/definitions/v1alphaProcessCatalogFilesRequest'
- name: Instill-Requester-Uid
description: Indicates the authenticated namespace is making the request on behalf of another entity, typically an organization they belong to
in: header
required: false
type: string
tags:
- Catalog
/v1alpha/namespaces/{namespaceId}/catalogs/{catalogId}/chunks:
Expand Down