Skip to content

Commit 121e06d

Browse files
authored
Merge pull request #8060 from woocommerce/feat/8045-domain-suggestions-setup
Domain suggestions: Networking and Yosemite layers
2 parents 3447bda + 10b495f commit 121e06d

File tree

10 files changed

+304
-0
lines changed

10 files changed

+304
-0
lines changed

Networking/Networking.xcodeproj/project.pbxproj

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@
2626
021EAA5625493B3600AA8CCD /* OrderItemAttribute.swift in Sources */ = {isa = PBXBuildFile; fileRef = 021EAA5525493B3600AA8CCD /* OrderItemAttribute.swift */; };
2727
022902D422E2436400059692 /* stats_module_disabled_error.json in Resources */ = {isa = PBXBuildFile; fileRef = 022902D122E2436300059692 /* stats_module_disabled_error.json */; };
2828
022902D622E2436400059692 /* no_stats_permission_error.json in Resources */ = {isa = PBXBuildFile; fileRef = 022902D322E2436400059692 /* no_stats_permission_error.json */; };
29+
023930632918FF5400B2632F /* DomainRemote.swift in Sources */ = {isa = PBXBuildFile; fileRef = 023930622918FF5400B2632F /* DomainRemote.swift */; };
30+
0239306B291A96F800B2632F /* DomainRemoteTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0239306A291A96F800B2632F /* DomainRemoteTests.swift */; };
31+
0239306D291A973F00B2632F /* domain-suggestions.json in Resources */ = {isa = PBXBuildFile; fileRef = 0239306C291A973F00B2632F /* domain-suggestions.json */; };
2932
025CA2C0238EB8CB00B05C81 /* ProductShippingClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 025CA2BF238EB8CB00B05C81 /* ProductShippingClass.swift */; };
3033
025CA2C2238EBBAA00B05C81 /* ProductShippingClassListMapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 025CA2C1238EBBAA00B05C81 /* ProductShippingClassListMapper.swift */; };
3134
025CA2C4238EBC4300B05C81 /* ProductShippingClassRemote.swift in Sources */ = {isa = PBXBuildFile; fileRef = 025CA2C3238EBC4300B05C81 /* ProductShippingClassRemote.swift */; };
@@ -767,6 +770,9 @@
767770
021EAA5525493B3600AA8CCD /* OrderItemAttribute.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OrderItemAttribute.swift; sourceTree = "<group>"; };
768771
022902D122E2436300059692 /* stats_module_disabled_error.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = stats_module_disabled_error.json; sourceTree = "<group>"; };
769772
022902D322E2436400059692 /* no_stats_permission_error.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = no_stats_permission_error.json; sourceTree = "<group>"; };
773+
023930622918FF5400B2632F /* DomainRemote.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DomainRemote.swift; sourceTree = "<group>"; };
774+
0239306A291A96F800B2632F /* DomainRemoteTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DomainRemoteTests.swift; sourceTree = "<group>"; };
775+
0239306C291A973F00B2632F /* domain-suggestions.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "domain-suggestions.json"; sourceTree = "<group>"; };
770776
025CA2BF238EB8CB00B05C81 /* ProductShippingClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProductShippingClass.swift; sourceTree = "<group>"; };
771777
025CA2C1238EBBAA00B05C81 /* ProductShippingClassListMapper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProductShippingClassListMapper.swift; sourceTree = "<group>"; };
772778
025CA2C3238EBC4300B05C81 /* ProductShippingClassRemote.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProductShippingClassRemote.swift; sourceTree = "<group>"; };
@@ -1720,6 +1726,7 @@
17201726
DE34051E28BDFB0B00CF0D97 /* JetpackConnectionRemoteTests.swift */,
17211727
68BD37B228D9B8BD00C2A517 /* CustomerRemoteTests.swift */,
17221728
68F48B0E28E3BB850045C15B /* WCAnalyticsCustomerRemoteTests.swift */,
1729+
0239306A291A96F800B2632F /* DomainRemoteTests.swift */,
17231730
);
17241731
path = Remote;
17251732
sourceTree = "<group>";
@@ -1859,6 +1866,7 @@
18591866
AEF94584272974F2001DCCFB /* TelemetryRemote.swift */,
18601867
68CB800F28D89A0400E169F8 /* CustomerRemote.swift */,
18611868
68F48B0A28E3B1CD0045C15B /* WCAnalyticsCustomerRemote.swift */,
1869+
023930622918FF5400B2632F /* DomainRemote.swift */,
18621870
);
18631871
path = Remote;
18641872
sourceTree = "<group>";
@@ -1985,6 +1993,7 @@
19851993
028CB713290223CB00331C09 /* create-account-error-password.json */,
19861994
028CB71A290224D700331C09 /* create-account-error-username.json */,
19871995
028CB712290223CB00331C09 /* create-account-success.json */,
1996+
0239306C291A973F00B2632F /* domain-suggestions.json */,
19881997
DE50295F28C609A300551736 /* jetpack-connected-user.json */,
19891998
DE34051A28BDF12C00CF0D97 /* jetpack-connection-url.json */,
19901999
DE50296228C609DE00551736 /* jetpack-user-not-connected.json */,
@@ -2886,6 +2895,7 @@
28862895
3158FE8426129F3A00E566B9 /* wcpay-account-unknown-status.json in Resources */,
28872896
314EDF2B27C02CD300A56B6F /* stripe-account-complete-null-descriptor.json in Resources */,
28882897
31054720262E2F9D00C5C02B /* wcpay-payment-intent-processing.json in Resources */,
2898+
0239306D291A973F00B2632F /* domain-suggestions.json in Resources */,
28892899
);
28902900
runOnlyForDeploymentPostprocessing = 0;
28912901
};
@@ -2964,6 +2974,7 @@
29642974
26455E2425F66982008A1D32 /* ProductAttributeTermRemote.swift in Sources */,
29652975
036563DD29069BE400D84BFD /* JustInTimeMessageListMapper.swift in Sources */,
29662976
7426CA0D21AF27B9004E9FFC /* SiteAPIRemote.swift in Sources */,
2977+
023930632918FF5400B2632F /* DomainRemote.swift in Sources */,
29672978
451A97D1260A03900059D135 /* ShippingLabelCustomPackage.swift in Sources */,
29682979
DE34051328BDCA5100CF0D97 /* WordPressOrgRequest.swift in Sources */,
29692980
D88D5A45230BC6F9007B6E01 /* ProductReviewsRemote.swift in Sources */,
@@ -3338,6 +3349,7 @@
33383349
74AB5B4D21AF354E00859C12 /* SiteAPIMapperTests.swift in Sources */,
33393350
68F48B0F28E3BB850045C15B /* WCAnalyticsCustomerRemoteTests.swift in Sources */,
33403351
93D8BC01226BC20600AD2EB3 /* AccountSettingsRemoteTests.swift in Sources */,
3352+
0239306B291A96F800B2632F /* DomainRemoteTests.swift in Sources */,
33413353
262E5AD5255ACD6F000B2416 /* PaymentGatewayListMapperTests.swift in Sources */,
33423354
03DCB7442624AD9B00C8953D /* CouponListMapperTests.swift in Sources */,
33433355
AE2D6623272A8F6E004A2C3A /* TelemetryRemoteTests.swift in Sources */,
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
import Foundation
2+
3+
/// Protocol for `DomainRemote` mainly used for mocking.
4+
public protocol DomainRemoteProtocol {
5+
/// Loads domain suggestions that are free (`*.wordpress.com` only) based on the query.
6+
/// - Parameter query: What the domain suggestions are based on.
7+
/// - Returns: The result of free domain suggestions.
8+
func loadFreeDomainSuggestions(query: String) async -> Result<[FreeDomainSuggestion], Error>
9+
}
10+
11+
/// Domain: Remote Endpoints
12+
///
13+
public class DomainRemote: Remote, DomainRemoteProtocol {
14+
public func loadFreeDomainSuggestions(query: String) async -> Result<[FreeDomainSuggestion], Error> {
15+
let path = Path.domainSuggestions
16+
let parameters: [String: Any] = [
17+
ParameterKey.query: query,
18+
ParameterKey.quantity: Defaults.domainSuggestionsQuantity,
19+
ParameterKey.wordPressDotComSubdomainsOnly: true
20+
]
21+
let request = DotcomRequest(wordpressApiVersion: .mark1_1, method: .get, path: path, parameters: parameters)
22+
do {
23+
let suggestions: [FreeDomainSuggestion] = try await enqueue(request)
24+
return .success(suggestions)
25+
} catch {
26+
return .failure(error)
27+
}
28+
}
29+
}
30+
31+
/// Necessary data for a free domain suggestion.
32+
public struct FreeDomainSuggestion: Decodable, Equatable {
33+
/// Domain name.
34+
public let name: String
35+
/// Theoretically `true` for all domains in the result, but the client side can still filter any exceptions in the UI.
36+
public let isFree: Bool
37+
38+
public init(name: String, isFree: Bool) {
39+
self.name = name
40+
self.isFree = isFree
41+
}
42+
43+
private enum CodingKeys: String, CodingKey {
44+
case name = "domain_name"
45+
case isFree = "is_free"
46+
}
47+
}
48+
49+
// MARK: - Constants
50+
//
51+
private extension DomainRemote {
52+
enum Defaults {
53+
static let domainSuggestionsQuantity = 20
54+
}
55+
56+
enum ParameterKey {
57+
/// Term (e.g "flowers") or domain name (e.g. "flowers.com") to search alternative domain names from.
58+
static let query = "query"
59+
/// Maximum number of suggestions to return.
60+
static let quantity = "quantity"
61+
/// Whether to restrict suggestions to only wordpress.com subdomains. If `true`, only `quantity` and `query` parameters are respected.
62+
static let wordPressDotComSubdomainsOnly = "only_wordpressdotcom"
63+
}
64+
65+
enum Path {
66+
static let domainSuggestions = "domains/suggestions"
67+
}
68+
}
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
import XCTest
2+
@testable import Networking
3+
4+
final class DomainRemoteTests: XCTestCase {
5+
/// Mock network wrapper.
6+
private var network: MockNetwork!
7+
8+
override func setUp() {
9+
super.setUp()
10+
network = MockNetwork()
11+
}
12+
13+
override func tearDown() {
14+
network = nil
15+
super.tearDown()
16+
}
17+
18+
func test_loadFreeDomainSuggestions_returns_suggestions_on_success() async throws {
19+
// Given
20+
let remote = DomainRemote(network: network)
21+
network.simulateResponse(requestUrlSuffix: "domains/suggestions", filename: "domain-suggestions")
22+
23+
// When
24+
let result = await remote.loadFreeDomainSuggestions(query: "domain")
25+
26+
// Then
27+
XCTAssertTrue(result.isSuccess)
28+
let suggestions = try XCTUnwrap(result.get())
29+
XCTAssertEqual(suggestions, [
30+
.init(name: "domaintestingtips.wordpress.com", isFree: true),
31+
.init(name: "domaintestingtoday.wordpress.com", isFree: true),
32+
])
33+
}
34+
35+
func test_loadFreeDomainSuggestions_returns_error_on_empty_response() async throws {
36+
// Given
37+
let remote = DomainRemote(network: network)
38+
39+
// When
40+
let result = await remote.loadFreeDomainSuggestions(query: "domain")
41+
42+
// Then
43+
XCTAssertTrue(result.isFailure)
44+
let error = try XCTUnwrap(result.failure as? NetworkError)
45+
XCTAssertEqual(error, .notFound)
46+
}
47+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[
2+
{
3+
"domain_name": "domaintestingtips.wordpress.com",
4+
"cost": "Free",
5+
"is_free": true
6+
},
7+
{
8+
"domain_name": "domaintestingtoday.wordpress.com",
9+
"cost": "Free",
10+
"is_free": true
11+
}
12+
]

Yosemite/Yosemite.xcodeproj/project.pbxproj

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@
3939
022F9319257F24730011CD94 /* MockShippingLabel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 022F9318257F24730011CD94 /* MockShippingLabel.swift */; };
4040
022F931D257F27B40011CD94 /* MockShippingLabelAddress.swift in Sources */ = {isa = PBXBuildFile; fileRef = 022F931C257F27B40011CD94 /* MockShippingLabelAddress.swift */; };
4141
0232372922F7DA6E00715FAB /* StatsTimeRangeV4.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0232372822F7DA6E00715FAB /* StatsTimeRangeV4.swift */; };
42+
02393065291A018600B2632F /* DomainAction.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02393064291A018600B2632F /* DomainAction.swift */; };
43+
02393067291A02AC00B2632F /* DomainStore.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02393066291A02AC00B2632F /* DomainStore.swift */; };
4244
0248B3652459018100A271A4 /* ResultsController+FilterProducts.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0248B3642459018100A271A4 /* ResultsController+FilterProducts.swift */; };
4345
0248B3672459020500A271A4 /* ResultsController+FilterProductTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0248B3662459020500A271A4 /* ResultsController+FilterProductTests.swift */; };
4446
0248B36924590FC300A271A4 /* ProductStore+FilterProductsTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0248B36824590FC300A271A4 /* ProductStore+FilterProductsTests.swift */; };
@@ -65,6 +67,8 @@
6567
02C254FA2563B66600A04423 /* ShippingLabelRefund+ReadOnlyConvertible.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02C254F92563B66600A04423 /* ShippingLabelRefund+ReadOnlyConvertible.swift */; };
6668
02C254FE2563C6E500A04423 /* ShippingLabelSettings+ReadOnlyConvertible.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02C254FD2563C6E500A04423 /* ShippingLabelSettings+ReadOnlyConvertible.swift */; };
6769
02C255022563C76A00A04423 /* ShippingLabel+ReadOnlyConvertible.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02C255012563C76A00A04423 /* ShippingLabel+ReadOnlyConvertible.swift */; };
70+
02DAE7F8291A9F11009342B7 /* DomainStoreTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02DAE7F7291A9F11009342B7 /* DomainStoreTests.swift */; };
71+
02DAE7FA291A9F36009342B7 /* MockDomainRemote.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02DAE7F9291A9F36009342B7 /* MockDomainRemote.swift */; };
6872
02E262BD238CE46A00B79588 /* ShippingSettingsService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02E262BC238CE46A00B79588 /* ShippingSettingsService.swift */; };
6973
02E262C0238CE80100B79588 /* StorageShippingSettingsServiceTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02E262BF238CE80100B79588 /* StorageShippingSettingsServiceTests.swift */; };
7074
02E262C2238CF74D00B79588 /* StorageShippingSettingsService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02E262C1238CF74D00B79588 /* StorageShippingSettingsService.swift */; };
@@ -456,6 +460,8 @@
456460
022F9318257F24730011CD94 /* MockShippingLabel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MockShippingLabel.swift; sourceTree = "<group>"; };
457461
022F931C257F27B40011CD94 /* MockShippingLabelAddress.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MockShippingLabelAddress.swift; sourceTree = "<group>"; };
458462
0232372822F7DA6E00715FAB /* StatsTimeRangeV4.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StatsTimeRangeV4.swift; sourceTree = "<group>"; };
463+
02393064291A018600B2632F /* DomainAction.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DomainAction.swift; sourceTree = "<group>"; };
464+
02393066291A02AC00B2632F /* DomainStore.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DomainStore.swift; sourceTree = "<group>"; };
459465
0248B3642459018100A271A4 /* ResultsController+FilterProducts.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ResultsController+FilterProducts.swift"; sourceTree = "<group>"; };
460466
0248B3662459020500A271A4 /* ResultsController+FilterProductTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ResultsController+FilterProductTests.swift"; sourceTree = "<group>"; };
461467
0248B36824590FC300A271A4 /* ProductStore+FilterProductsTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ProductStore+FilterProductsTests.swift"; sourceTree = "<group>"; };
@@ -482,6 +488,8 @@
482488
02C254F92563B66600A04423 /* ShippingLabelRefund+ReadOnlyConvertible.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ShippingLabelRefund+ReadOnlyConvertible.swift"; sourceTree = "<group>"; };
483489
02C254FD2563C6E500A04423 /* ShippingLabelSettings+ReadOnlyConvertible.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ShippingLabelSettings+ReadOnlyConvertible.swift"; sourceTree = "<group>"; };
484490
02C255012563C76A00A04423 /* ShippingLabel+ReadOnlyConvertible.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ShippingLabel+ReadOnlyConvertible.swift"; sourceTree = "<group>"; };
491+
02DAE7F7291A9F11009342B7 /* DomainStoreTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DomainStoreTests.swift; sourceTree = "<group>"; };
492+
02DAE7F9291A9F36009342B7 /* MockDomainRemote.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MockDomainRemote.swift; sourceTree = "<group>"; };
485493
02E262BC238CE46A00B79588 /* ShippingSettingsService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShippingSettingsService.swift; sourceTree = "<group>"; };
486494
02E262BF238CE80100B79588 /* StorageShippingSettingsServiceTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StorageShippingSettingsServiceTests.swift; sourceTree = "<group>"; };
487495
02E262C1238CF74D00B79588 /* StorageShippingSettingsService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StorageShippingSettingsService.swift; sourceTree = "<group>"; };
@@ -1188,6 +1196,7 @@
11881196
02A26F1D2744FE97008E4EDB /* MockAccountRemote.swift */,
11891197
029249E7274B8AEE002E9C34 /* MockMediaRemote.swift */,
11901198
021BA0C328576940006E9886 /* MockDotcomAccountRemote.swift */,
1199+
02DAE7F9291A9F36009342B7 /* MockDomainRemote.swift */,
11911200
);
11921201
path = Remote;
11931202
sourceTree = "<group>";
@@ -1399,6 +1408,7 @@
13991408
DE3404FD28BC5F4200CF0D97 /* JetpackConnectionStore.swift */,
14001409
68BD37B428DB2E9800C2A517 /* CustomerStore.swift */,
14011410
02E3B622290267D3007E0F13 /* AccountCreationStore.swift */,
1411+
02393066291A02AC00B2632F /* DomainStore.swift */,
14021412
);
14031413
path = Stores;
14041414
sourceTree = "<group>";
@@ -1458,6 +1468,7 @@
14581468
DE50296628C7114800551736 /* JetpackConnectionStoreTests.swift */,
14591469
68BD37B828DB323D00C2A517 /* CustomerStoreTests.swift */,
14601470
02E3B629290622DE007E0F13 /* AccountCreationStoreTests.swift */,
1471+
02DAE7F7291A9F11009342B7 /* DomainStoreTests.swift */,
14611472
);
14621473
path = Stores;
14631474
sourceTree = "<group>";
@@ -1643,6 +1654,7 @@
16431654
B9AECD3D2850F41100E78584 /* OrderCardPresentPaymentEligibilityAction.swift */,
16441655
DE3404FB28BC5E7800CF0D97 /* JetpackConnectionAction.swift */,
16451656
02E3B624290267F2007E0F13 /* AccountCreationAction.swift */,
1657+
02393064291A018600B2632F /* DomainAction.swift */,
16461658
);
16471659
path = Actions;
16481660
sourceTree = "<group>";
@@ -2036,6 +2048,7 @@
20362048
2618707C2540B6A4006522A1 /* ShippingLineTax+ReadOnlyConvertible.swift in Sources */,
20372049
749375002249605E007D85D1 /* ProductAction.swift in Sources */,
20382050
D831E2E4230E3524000037D0 /* ProductReviewAction.swift in Sources */,
2051+
02393065291A018600B2632F /* DomainAction.swift in Sources */,
20392052
D831E2E6230E7149000037D0 /* ProductReview+ReadOnlyConvertible.swift in Sources */,
20402053
CE4FD4502350F27C00A16B31 /* OrderItemTax+ReadOnlyConvertible.swift in Sources */,
20412054
02FF055123D983F30058E6E7 /* MediaAssetExporter.swift in Sources */,
@@ -2162,6 +2175,7 @@
21622175
453305F7245AE68C00264E50 /* SitePostStore.swift in Sources */,
21632176
026CF62A237D92C6009563D4 /* ProductVariation+ReadOnlyConvertible.swift in Sources */,
21642177
02F6AAAC270556A4002425D0 /* Models+Copiable.generated.swift in Sources */,
2178+
02393067291A02AC00B2632F /* DomainStore.swift in Sources */,
21652179
);
21662180
runOnlyForDeploymentPostprocessing = 0;
21672181
};
@@ -2192,6 +2206,7 @@
21922206
E1F54D0427AD4DAF00012983 /* CardPresentConfigurationTests.swift in Sources */,
21932207
025CA2D0238F54E800B05C81 /* ProductShippingClassStoreTests.swift in Sources */,
21942208
74A7688E20D45ED400F9D437 /* OrderStoreTests.swift in Sources */,
2209+
02DAE7F8291A9F11009342B7 /* DomainStoreTests.swift in Sources */,
21952210
D8652E322630741000350F37 /* PaymentIntent+ReceiptParametersTests.swift in Sources */,
21962211
029249E8274B8AEE002E9C34 /* MockMediaRemote.swift in Sources */,
21972212
021BA0C428576940006E9886 /* MockDotcomAccountRemote.swift in Sources */,
@@ -2249,6 +2264,7 @@
22492264
265BCA0024301ACD004E53EE /* ProductCategoryStoreTests.swift in Sources */,
22502265
02FF056D23DEDCB90058E6E7 /* MockImageSourceWriter.swift in Sources */,
22512266
FE28F6F2268462A6004465C7 /* UserStoreTests.swift in Sources */,
2267+
02DAE7FA291A9F36009342B7 /* MockDomainRemote.swift in Sources */,
22522268
741F34842195F752005F5BD9 /* CommentStoreTests.swift in Sources */,
22532269
B5C9DE282087FF20006B910A /* MockSiteStore.swift in Sources */,
22542270
FEEB2F5F268A1C5E0075A6E0 /* User+RolesTests.swift in Sources */,
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import Foundation
2+
3+
// MARK: - DomainAction: Defines all of the Actions supported by the DomainStore.
4+
//
5+
public enum DomainAction: Action {
6+
case loadFreeDomainSuggestions(query: String, completion: (Result<[FreeDomainSuggestion], Error>) -> Void)
7+
}

0 commit comments

Comments
 (0)