Add server-side work item search

This commit is contained in:
Georg Bauer
2026-07-31 21:03:01 +02:00
parent af392209e8
commit a3962449a2
9 changed files with 234 additions and 42 deletions

View File

@@ -665,11 +665,11 @@ public protocol GotchaCoreProtocol: AnyObject, Sendable {
func setAppearance(index: UInt32) throws
func setIssueFilters(owner: String, repository: String, milestone: String, labels: [String]) throws
func setIssueFilters(owner: String, repository: String, milestone: String, labels: [String], searchText: String) throws
func setIssueStatus(status: String) throws
func setPullFilters(milestone: String) throws
func setPullFilters(milestone: String, searchText: String) throws
func setPullStatus(status: String) throws
@@ -1176,14 +1176,15 @@ open func setAppearance(index: UInt32)throws {try rustCallWithError(FfiConvert
}
}
open func setIssueFilters(owner: String, repository: String, milestone: String, labels: [String])throws {try rustCallWithError(FfiConverterTypeGotchaError_lift) {
open func setIssueFilters(owner: String, repository: String, milestone: String, labels: [String], searchText: String)throws {try rustCallWithError(FfiConverterTypeGotchaError_lift) {
uniffiCallStatus in
uniffi_gotcha_core_fn_method_gotchacore_set_issue_filters(
self.uniffiCloneHandle(),
FfiConverterString.lower(owner),
FfiConverterString.lower(repository),
FfiConverterString.lower(milestone),
FfiConverterSequenceString.lower(labels),uniffiCallStatus
FfiConverterSequenceString.lower(labels),
FfiConverterString.lower(searchText),uniffiCallStatus
)
}
}
@@ -1197,11 +1198,12 @@ open func setIssueStatus(status: String)throws {try rustCallWithError(FfiConve
}
}
open func setPullFilters(milestone: String)throws {try rustCallWithError(FfiConverterTypeGotchaError_lift) {
open func setPullFilters(milestone: String, searchText: String)throws {try rustCallWithError(FfiConverterTypeGotchaError_lift) {
uniffiCallStatus in
uniffi_gotcha_core_fn_method_gotchacore_set_pull_filters(
self.uniffiCloneHandle(),
FfiConverterString.lower(milestone),uniffiCallStatus
FfiConverterString.lower(milestone),
FfiConverterString.lower(searchText),uniffiCallStatus
)
}
}
@@ -2117,15 +2119,17 @@ public struct IssueFilterOptions: Equatable, Hashable {
public var unavailableLabels: [String]
public var selectedMilestone: String
public var selectedLabels: [String]
public var searchText: String
// Default memberwise initializers are never public by default, so we
// declare one manually.
public init(milestones: [String], labels: [String], unavailableLabels: [String], selectedMilestone: String, selectedLabels: [String]) {
public init(milestones: [String], labels: [String], unavailableLabels: [String], selectedMilestone: String, selectedLabels: [String], searchText: String) {
self.milestones = milestones
self.labels = labels
self.unavailableLabels = unavailableLabels
self.selectedMilestone = selectedMilestone
self.selectedLabels = selectedLabels
self.searchText = searchText
}
@@ -2148,7 +2152,8 @@ public struct FfiConverterTypeIssueFilterOptions: FfiConverterRustBuffer {
labels: FfiConverterSequenceString.read(from: &buf),
unavailableLabels: FfiConverterSequenceString.read(from: &buf),
selectedMilestone: FfiConverterString.read(from: &buf),
selectedLabels: FfiConverterSequenceString.read(from: &buf)
selectedLabels: FfiConverterSequenceString.read(from: &buf),
searchText: FfiConverterString.read(from: &buf)
)
}
@@ -2158,6 +2163,7 @@ public struct FfiConverterTypeIssueFilterOptions: FfiConverterRustBuffer {
FfiConverterSequenceString.write(value.unavailableLabels, into: &buf)
FfiConverterString.write(value.selectedMilestone, into: &buf)
FfiConverterSequenceString.write(value.selectedLabels, into: &buf)
FfiConverterString.write(value.searchText, into: &buf)
}
}
@@ -2696,12 +2702,14 @@ public func FfiConverterTypeMilestoneRow_lower(_ value: MilestoneRow) -> RustBuf
public struct PullFilterOptions: Equatable, Hashable {
public var milestones: [String]
public var selectedMilestone: String
public var searchText: String
// Default memberwise initializers are never public by default, so we
// declare one manually.
public init(milestones: [String], selectedMilestone: String) {
public init(milestones: [String], selectedMilestone: String, searchText: String) {
self.milestones = milestones
self.selectedMilestone = selectedMilestone
self.searchText = searchText
}
@@ -2721,13 +2729,15 @@ public struct FfiConverterTypePullFilterOptions: FfiConverterRustBuffer {
return
try PullFilterOptions(
milestones: FfiConverterSequenceString.read(from: &buf),
selectedMilestone: FfiConverterString.read(from: &buf)
selectedMilestone: FfiConverterString.read(from: &buf),
searchText: FfiConverterString.read(from: &buf)
)
}
public static func write(_ value: PullFilterOptions, into buf: inout [UInt8]) {
FfiConverterSequenceString.write(value.milestones, into: &buf)
FfiConverterString.write(value.selectedMilestone, into: &buf)
FfiConverterString.write(value.searchText, into: &buf)
}
}
@@ -4211,13 +4221,13 @@ private let initializationResult: InitializationResult = {
if (uniffi_gotcha_core_checksum_method_gotchacore_set_appearance() != 61293) {
return InitializationResult.apiChecksumMismatch
}
if (uniffi_gotcha_core_checksum_method_gotchacore_set_issue_filters() != 45204) {
if (uniffi_gotcha_core_checksum_method_gotchacore_set_issue_filters() != 24891) {
return InitializationResult.apiChecksumMismatch
}
if (uniffi_gotcha_core_checksum_method_gotchacore_set_issue_status() != 44445) {
return InitializationResult.apiChecksumMismatch
}
if (uniffi_gotcha_core_checksum_method_gotchacore_set_pull_filters() != 39023) {
if (uniffi_gotcha_core_checksum_method_gotchacore_set_pull_filters() != 25211) {
return InitializationResult.apiChecksumMismatch
}
if (uniffi_gotcha_core_checksum_method_gotchacore_set_pull_status() != 1356) {

View File

@@ -416,7 +416,7 @@ void uniffi_gotcha_core_fn_method_gotchacore_set_appearance(uint64_t ptr, uint32
#endif
#ifndef UNIFFI_FFIDEF_UNIFFI_GOTCHA_CORE_FN_METHOD_GOTCHACORE_SET_ISSUE_FILTERS
#define UNIFFI_FFIDEF_UNIFFI_GOTCHA_CORE_FN_METHOD_GOTCHACORE_SET_ISSUE_FILTERS
void uniffi_gotcha_core_fn_method_gotchacore_set_issue_filters(uint64_t ptr, RustBuffer owner, RustBuffer repository, RustBuffer milestone, RustBuffer labels, RustCallStatus *_Nonnull out_status
void uniffi_gotcha_core_fn_method_gotchacore_set_issue_filters(uint64_t ptr, RustBuffer owner, RustBuffer repository, RustBuffer milestone, RustBuffer labels, RustBuffer search_text, RustCallStatus *_Nonnull out_status
);
#endif
#ifndef UNIFFI_FFIDEF_UNIFFI_GOTCHA_CORE_FN_METHOD_GOTCHACORE_SET_ISSUE_STATUS
@@ -426,7 +426,7 @@ void uniffi_gotcha_core_fn_method_gotchacore_set_issue_status(uint64_t ptr, Rust
#endif
#ifndef UNIFFI_FFIDEF_UNIFFI_GOTCHA_CORE_FN_METHOD_GOTCHACORE_SET_PULL_FILTERS
#define UNIFFI_FFIDEF_UNIFFI_GOTCHA_CORE_FN_METHOD_GOTCHACORE_SET_PULL_FILTERS
void uniffi_gotcha_core_fn_method_gotchacore_set_pull_filters(uint64_t ptr, RustBuffer milestone, RustCallStatus *_Nonnull out_status
void uniffi_gotcha_core_fn_method_gotchacore_set_pull_filters(uint64_t ptr, RustBuffer milestone, RustBuffer search_text, RustCallStatus *_Nonnull out_status
);
#endif
#ifndef UNIFFI_FFIDEF_UNIFFI_GOTCHA_CORE_FN_METHOD_GOTCHACORE_SET_PULL_STATUS