Skip to content

Commit

Permalink
Merge pull request #112 from Alfresco/FacetFilters
Browse files Browse the repository at this point in the history
Filter Queries
  • Loading branch information
gl-lovekesh authored Nov 29, 2021
2 parents b2c2e10 + 7037446 commit 33d9776
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 1 deletion.
2 changes: 1 addition & 1 deletion AlfrescoContent/AlfrescoContent.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Pod::Spec.new do |s|
s.osx.deployment_target = '10.14'
s.tvos.deployment_target = '12.0'
s.swift_version = '5.0'
s.version = '0.2.4'
s.version = '0.2.5'
s.source = {:git => 'https://github.com/Alfresco/alfresco-ios-swift-api.git', :tag => 'content/'+s.version.to_s}
s.authors = {'Alfresco' => '[email protected]'}
s.license = {:type => 'Apache License Version 2.0', :file => 'AlfrescoContent/LICENSE.md'}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ public class AdvanceSearchFilters: Codable {
public var isDefault: Bool? = false
public var filterQueries = [FilterQueries]()
public var categories = [SearchCategories]()
public var facetFields: FacetFields?
public var facetQueries: FacetQueries?
public var facetIntervals: FacetIntervals?

enum CodingKeys: String, CodingKey {
case filterWithContains
Expand All @@ -40,6 +43,9 @@ public class AdvanceSearchFilters: Codable {
case isDefault = "default"
case filterQueries
case categories
case facetFields
case facetQueries
case facetIntervals
}
}

Expand Down Expand Up @@ -119,3 +125,48 @@ public class SearchComponentOptions: Codable {
case isDefault = "default"
}
}

// MARK: - Facet Fields
public class FacetFields: Codable {
var expanded: Bool? = false
var fields = [Fields]()
}

public class Fields: Codable {
var field: String?
var mincount: Int?
var label: String?
}

// MARK: - Facet Queries
public class FacetQueries: Codable {
var label: String?
var pageSize: Int?
var expanded: Bool?
var mincount: Int?
var queries = [Queries]()
}

public class Queries: Codable {
var query: String?
var label: String?
}

// MARK: - Facet Intervals
public class FacetIntervals: Codable {
var expanded: Bool?
var intervals = [Intervals]()
}

public class Intervals: Codable {
var label: String?
var field: String?
var sets = [Sets]()
}

public class Sets: Codable {
var label: String?
var start: String?
var end: String?
var endInclusive: Bool? = false
}

0 comments on commit 33d9776

Please sign in to comment.